handsontable 0.0.0-next-ecc62fd-20230525 → 0.0.0-next-93e34dc-20230601
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/coords.d.ts +6 -1
- package/3rdparty/walkontable/src/cell/coords.js +61 -12
- package/3rdparty/walkontable/src/cell/coords.mjs +61 -12
- package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
- package/3rdparty/walkontable/src/cell/range.js +44 -7
- package/3rdparty/walkontable/src/cell/range.mjs +44 -7
- package/3rdparty/walkontable/src/core/_base.js +9 -3
- package/3rdparty/walkontable/src/core/_base.mjs +9 -3
- 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 +3 -2
- package/3rdparty/walkontable/src/core/core.mjs +3 -2
- 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 +10 -2
- 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 +2 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
- package/3rdparty/walkontable/src/overlay/top.js +2 -4
- package/3rdparty/walkontable/src/overlay/top.mjs +2 -4
- package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
- package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
- package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
- package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
- package/3rdparty/walkontable/src/selection/constants.js +63 -0
- package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
- package/3rdparty/walkontable/src/selection/index.js +30 -0
- package/3rdparty/walkontable/src/selection/index.mjs +5 -0
- package/3rdparty/walkontable/src/selection/manager.js +328 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +322 -0
- package/3rdparty/walkontable/src/selection/scanner.js +363 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
- package/3rdparty/walkontable/src/selection/selection.js +133 -0
- package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
- package/3rdparty/walkontable/src/table.js +7 -79
- package/3rdparty/walkontable/src/table.mjs +8 -80
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +5 -3
- package/core.js +82 -300
- package/core.mjs +82 -300
- package/dataMap/metaManager/metaSchema.js +15 -0
- package/dataMap/metaManager/metaSchema.mjs +15 -0
- package/dist/handsontable.css +8 -3
- package/dist/handsontable.full.css +8 -3
- package/dist/handsontable.full.js +12245 -9953
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +15898 -13606
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +20 -82
- package/editorManager.mjs +25 -86
- package/editors/textEditor/textEditor.js +3 -11
- package/editors/textEditor/textEditor.mjs +4 -12
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +1 -0
- package/helpers/number.js +18 -0
- package/helpers/number.mjs +17 -0
- package/package.json +1 -1
- package/pluginHooks.js +1 -1
- package/pluginHooks.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +5 -1
- package/plugins/copyPaste/copyPaste.mjs +5 -1
- package/plugins/customBorders/customBorders.js +18 -52
- package/plugins/customBorders/customBorders.mjs +19 -53
- package/plugins/mergeCells/mergeCells.js +5 -18
- package/plugins/mergeCells/mergeCells.mjs +5 -18
- package/plugins/nestedHeaders/nestedHeaders.js +89 -9
- package/plugins/nestedHeaders/nestedHeaders.mjs +89 -9
- package/plugins/nestedHeaders/stateManager/index.js +37 -0
- package/plugins/nestedHeaders/stateManager/index.mjs +37 -0
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/highlight.js +311 -88
- package/selection/highlight/highlight.mjs +301 -84
- package/selection/highlight/types/activeHeader.js +10 -9
- package/selection/highlight/types/activeHeader.mjs +10 -8
- package/selection/highlight/types/area.js +12 -27
- package/selection/highlight/types/area.mjs +16 -30
- package/selection/highlight/types/areaLayered.js +54 -0
- package/selection/highlight/types/areaLayered.mjs +49 -0
- package/selection/highlight/types/column.js +50 -0
- package/selection/highlight/types/column.mjs +45 -0
- package/selection/highlight/types/customSelection.js +7 -10
- package/selection/highlight/types/customSelection.mjs +7 -9
- package/selection/highlight/types/fill.js +5 -8
- package/selection/highlight/types/fill.mjs +5 -7
- package/selection/highlight/types/{cell.js → focus.js} +5 -8
- package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
- package/selection/highlight/types/header.js +10 -20
- package/selection/highlight/types/header.mjs +10 -19
- package/selection/highlight/types/{index.js → row.js} +27 -31
- package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
- package/selection/highlight/visualSelection.js +23 -28
- package/selection/highlight/visualSelection.mjs +23 -28
- package/selection/index.js +4 -7
- package/selection/index.mjs +2 -3
- 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 +296 -180
- package/selection/selection.mjs +291 -179
- package/selection/transformation.js +233 -96
- package/selection/transformation.mjs +230 -93
- package/selection/utils.js +12 -35
- package/selection/utils.mjs +13 -35
- package/settings.d.ts +1 -0
- package/shortcutContexts/commands/editor/closeAndSave.js +15 -0
- package/shortcutContexts/commands/editor/closeAndSave.mjs +10 -0
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +13 -0
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
- package/shortcutContexts/commands/editor/fastOpen.js +16 -0
- package/shortcutContexts/commands/editor/fastOpen.mjs +11 -0
- package/shortcutContexts/commands/editor/index.js +16 -0
- package/shortcutContexts/commands/editor/index.mjs +12 -0
- package/shortcutContexts/commands/editor/open.js +29 -0
- package/shortcutContexts/commands/editor/open.mjs +24 -0
- package/shortcutContexts/commands/emptySelectedCells.js +12 -0
- package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
- package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +10 -0
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +16 -0
- package/shortcutContexts/commands/extendCellsSelection/index.js +24 -0
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +20 -0
- package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +10 -0
- package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +10 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +22 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +17 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +17 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +12 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +17 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +12 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +39 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +34 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +39 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +34 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +22 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +17 -0
- package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +10 -0
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +16 -0
- package/shortcutContexts/commands/index.js +51 -0
- package/shortcutContexts/commands/index.mjs +47 -0
- package/shortcutContexts/commands/moveCellSelection/down.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/down.mjs +7 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +11 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
- package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/left.js +11 -0
- package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/right.js +11 -0
- package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +16 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +11 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +12 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +16 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +11 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +35 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +30 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +35 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +30 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +16 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +11 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +18 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/up.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/up.mjs +7 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +11 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +6 -0
- package/shortcutContexts/commands/populateSelectedCellsData.js +35 -0
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +30 -0
- package/shortcutContexts/commands/selectAll.js +11 -0
- package/shortcutContexts/commands/selectAll.mjs +6 -0
- package/shortcutContexts/constants.js +19 -0
- package/shortcutContexts/constants.mjs +12 -0
- package/shortcutContexts/editor.js +29 -0
- package/shortcutContexts/editor.mjs +25 -0
- package/shortcutContexts/grid.js +232 -0
- package/shortcutContexts/grid.mjs +228 -0
- package/shortcutContexts/index.js +29 -0
- package/shortcutContexts/index.mjs +15 -0
- package/tableView.js +58 -9
- package/tableView.mjs +58 -9
- package/3rdparty/walkontable/src/selection.js +0 -354
- package/3rdparty/walkontable/src/selection.mjs +0 -348
- package/selection/highlight/constants.js +0 -16
- package/selection/highlight/constants.mjs +0 -6
@@ -79,6 +79,15 @@ var calculatedRows = {
|
|
79
79
|
*/
|
80
80
|
getVisibleRowsCount: function getVisibleRowsCount() {
|
81
81
|
return this.dataAccessObject.countRowsVisible;
|
82
|
+
},
|
83
|
+
/**
|
84
|
+
* Get the number of rendered column headers.
|
85
|
+
*
|
86
|
+
* @returns {number}
|
87
|
+
* @this Table
|
88
|
+
*/
|
89
|
+
getColumnHeadersCount: function getColumnHeadersCount() {
|
90
|
+
return this.dataAccessObject.columnHeaders.length;
|
82
91
|
}
|
83
92
|
};
|
84
93
|
defineGetter(calculatedRows, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -75,6 +75,15 @@ var stickyColumnsStart = {
|
|
75
75
|
*/
|
76
76
|
getVisibleColumnsCount: function getVisibleColumnsCount() {
|
77
77
|
return this.getRenderedColumnsCount();
|
78
|
+
},
|
79
|
+
/**
|
80
|
+
* Get the number of rendered row headers.
|
81
|
+
*
|
82
|
+
* @returns {number}
|
83
|
+
* @this Table
|
84
|
+
*/
|
85
|
+
getRowHeadersCount: function getRowHeadersCount() {
|
86
|
+
return this.dataAccessObject.rowHeaders.length;
|
78
87
|
}
|
79
88
|
};
|
80
89
|
(0, _object.defineGetter)(stickyColumnsStart, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -71,6 +71,15 @@ var stickyColumnsStart = {
|
|
71
71
|
*/
|
72
72
|
getVisibleColumnsCount: function getVisibleColumnsCount() {
|
73
73
|
return this.getRenderedColumnsCount();
|
74
|
+
},
|
75
|
+
/**
|
76
|
+
* Get the number of rendered row headers.
|
77
|
+
*
|
78
|
+
* @returns {number}
|
79
|
+
* @this Table
|
80
|
+
*/
|
81
|
+
getRowHeadersCount: function getRowHeadersCount() {
|
82
|
+
return this.dataAccessObject.rowHeaders.length;
|
74
83
|
}
|
75
84
|
};
|
76
85
|
defineGetter(stickyColumnsStart, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -80,6 +80,15 @@ var stickyRowsBottom = {
|
|
80
80
|
*/
|
81
81
|
getVisibleRowsCount: function getVisibleRowsCount() {
|
82
82
|
return this.getRenderedRowsCount();
|
83
|
+
},
|
84
|
+
/**
|
85
|
+
* Get the number of rendered column headers.
|
86
|
+
*
|
87
|
+
* @returns {number}
|
88
|
+
* @this Table
|
89
|
+
*/
|
90
|
+
getColumnHeadersCount: function getColumnHeadersCount() {
|
91
|
+
return 0;
|
83
92
|
}
|
84
93
|
};
|
85
94
|
(0, _object.defineGetter)(stickyRowsBottom, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -76,6 +76,15 @@ var stickyRowsBottom = {
|
|
76
76
|
*/
|
77
77
|
getVisibleRowsCount: function getVisibleRowsCount() {
|
78
78
|
return this.getRenderedRowsCount();
|
79
|
+
},
|
80
|
+
/**
|
81
|
+
* Get the number of rendered column headers.
|
82
|
+
*
|
83
|
+
* @returns {number}
|
84
|
+
* @this Table
|
85
|
+
*/
|
86
|
+
getColumnHeadersCount: function getColumnHeadersCount() {
|
87
|
+
return 0;
|
79
88
|
}
|
80
89
|
};
|
81
90
|
defineGetter(stickyRowsBottom, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -75,6 +75,15 @@ var stickyRowsTop = {
|
|
75
75
|
*/
|
76
76
|
getVisibleRowsCount: function getVisibleRowsCount() {
|
77
77
|
return this.getRenderedRowsCount();
|
78
|
+
},
|
79
|
+
/**
|
80
|
+
* Get the number of rendered column headers.
|
81
|
+
*
|
82
|
+
* @returns {number}
|
83
|
+
* @this Table
|
84
|
+
*/
|
85
|
+
getColumnHeadersCount: function getColumnHeadersCount() {
|
86
|
+
return this.dataAccessObject.columnHeaders.length;
|
78
87
|
}
|
79
88
|
};
|
80
89
|
(0, _object.defineGetter)(stickyRowsTop, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -71,6 +71,15 @@ var stickyRowsTop = {
|
|
71
71
|
*/
|
72
72
|
getVisibleRowsCount: function getVisibleRowsCount() {
|
73
73
|
return this.getRenderedRowsCount();
|
74
|
+
},
|
75
|
+
/**
|
76
|
+
* Get the number of rendered column headers.
|
77
|
+
*
|
78
|
+
* @returns {number}
|
79
|
+
* @this Table
|
80
|
+
*/
|
81
|
+
getColumnHeadersCount: function getColumnHeadersCount() {
|
82
|
+
return this.dataAccessObject.columnHeaders.length;
|
74
83
|
}
|
75
84
|
};
|
76
85
|
defineGetter(stickyRowsTop, 'MIXIN_NAME', MIXIN_NAME, {
|
@@ -2,15 +2,14 @@
|
|
2
2
|
|
3
3
|
require("core-js/modules/es.symbol.iterator.js");
|
4
4
|
require("core-js/modules/es.array.iterator.js");
|
5
|
+
require("core-js/modules/es.string.iterator.js");
|
5
6
|
require("core-js/modules/web.dom-collections.iterator.js");
|
6
7
|
require("core-js/modules/es.array.slice.js");
|
8
|
+
require("core-js/modules/es.array.from.js");
|
7
9
|
require("core-js/modules/es.regexp.exec.js");
|
8
10
|
exports.__esModule = true;
|
9
11
|
exports.default = void 0;
|
10
12
|
require("core-js/modules/es.function.name.js");
|
11
|
-
require("core-js/modules/es.array.from.js");
|
12
|
-
require("core-js/modules/es.string.iterator.js");
|
13
|
-
require("core-js/modules/es.array.includes.js");
|
14
13
|
require("core-js/modules/es.object.to-string.js");
|
15
14
|
require("core-js/modules/web.dom-collections.for-each.js");
|
16
15
|
require("core-js/modules/es.symbol.to-primitive.js");
|
@@ -387,7 +386,7 @@ var Table = /*#__PURE__*/function () {
|
|
387
386
|
wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
|
388
387
|
wtOverlays.adjustElementsSize();
|
389
388
|
} else {
|
390
|
-
this.
|
389
|
+
this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
|
391
390
|
}
|
392
391
|
if (syncScroll) {
|
393
392
|
wtOverlays.syncScrollWithMaster();
|
@@ -479,74 +478,6 @@ var Table = /*#__PURE__*/function () {
|
|
479
478
|
}
|
480
479
|
}
|
481
480
|
|
482
|
-
/**
|
483
|
-
* @param {string} className The CSS class name to remove from the table cells.
|
484
|
-
*/
|
485
|
-
}, {
|
486
|
-
key: "removeClassFromCells",
|
487
|
-
value: function removeClassFromCells(className) {
|
488
|
-
var nodes = this.TABLE.querySelectorAll(".".concat(className));
|
489
|
-
for (var i = 0, len = nodes.length; i < len; i++) {
|
490
|
-
(0, _element.removeClass)(nodes[i], className);
|
491
|
-
}
|
492
|
-
}
|
493
|
-
|
494
|
-
/**
|
495
|
-
* Refresh the table selection by re-rendering Selection instances connected with that instance.
|
496
|
-
*
|
497
|
-
* @param {boolean} fastDraw If fast drawing is enabled than additionally className clearing is applied.
|
498
|
-
*/
|
499
|
-
}, {
|
500
|
-
key: "refreshSelections",
|
501
|
-
value: function refreshSelections(fastDraw) {
|
502
|
-
var wtSettings = this.wtSettings;
|
503
|
-
var selections = this.dataAccessObject.selections;
|
504
|
-
if (!selections) {
|
505
|
-
return;
|
506
|
-
}
|
507
|
-
var highlights = Array.from(selections);
|
508
|
-
var len = highlights.length;
|
509
|
-
if (fastDraw) {
|
510
|
-
var classesToRemove = [];
|
511
|
-
for (var i = 0; i < len; i++) {
|
512
|
-
var _highlights$i$setting = highlights[i].settings,
|
513
|
-
highlightHeaderClassName = _highlights$i$setting.highlightHeaderClassName,
|
514
|
-
highlightRowClassName = _highlights$i$setting.highlightRowClassName,
|
515
|
-
highlightColumnClassName = _highlights$i$setting.highlightColumnClassName;
|
516
|
-
var classNames = highlights[i].classNames;
|
517
|
-
var classNamesLength = classNames.length;
|
518
|
-
for (var j = 0; j < classNamesLength; j++) {
|
519
|
-
if (!classesToRemove.includes(classNames[j])) {
|
520
|
-
classesToRemove.push(classNames[j]);
|
521
|
-
}
|
522
|
-
}
|
523
|
-
if (highlightHeaderClassName && !classesToRemove.includes(highlightHeaderClassName)) {
|
524
|
-
classesToRemove.push(highlightHeaderClassName);
|
525
|
-
}
|
526
|
-
if (highlightRowClassName && !classesToRemove.includes(highlightRowClassName)) {
|
527
|
-
classesToRemove.push(highlightRowClassName);
|
528
|
-
}
|
529
|
-
if (highlightColumnClassName && !classesToRemove.includes(highlightColumnClassName)) {
|
530
|
-
classesToRemove.push(highlightColumnClassName);
|
531
|
-
}
|
532
|
-
}
|
533
|
-
var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');
|
534
|
-
if (Array.isArray(additionalClassesToRemove)) {
|
535
|
-
for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {
|
536
|
-
classesToRemove.push(additionalClassesToRemove[_i]);
|
537
|
-
}
|
538
|
-
}
|
539
|
-
var classesToRemoveLength = classesToRemove.length;
|
540
|
-
for (var _i2 = 0; _i2 < classesToRemoveLength; _i2++) {
|
541
|
-
// there was no rerender, so we need to remove classNames by ourselves
|
542
|
-
this.removeClassFromCells(classesToRemove[_i2]);
|
543
|
-
}
|
544
|
-
}
|
545
|
-
for (var _i3 = 0; _i3 < len; _i3++) {
|
546
|
-
highlights[_i3].draw(this.facadeGetter(), fastDraw);
|
547
|
-
}
|
548
|
-
}
|
549
|
-
|
550
481
|
/**
|
551
482
|
* Get cell element at coords.
|
552
483
|
* Negative coords.row or coords.col are used to retrieve header cells. If there are multiple header levels, the
|
@@ -680,14 +611,14 @@ var Table = /*#__PURE__*/function () {
|
|
680
611
|
key: "getRowHeader",
|
681
612
|
value: function getRowHeader(row) {
|
682
613
|
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
683
|
-
if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
|
684
|
-
return;
|
685
|
-
}
|
686
614
|
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
687
615
|
if (level >= rowHeadersCount) {
|
688
616
|
return;
|
689
617
|
}
|
690
|
-
var
|
618
|
+
var renderedRow = this.rowFilter.sourceToRendered(row);
|
619
|
+
var visibleRow = renderedRow < 0 ? this.rowFilter.sourceRowToVisibleColHeadedRow(row) : renderedRow;
|
620
|
+
var parentElement = renderedRow < 0 ? this.THEAD : this.TBODY;
|
621
|
+
var TR = parentElement.childNodes[visibleRow];
|
691
622
|
return TR === null || TR === void 0 ? void 0 : TR.childNodes[level];
|
692
623
|
}
|
693
624
|
|
@@ -700,9 +631,6 @@ var Table = /*#__PURE__*/function () {
|
|
700
631
|
}, {
|
701
632
|
key: "getRowHeaders",
|
702
633
|
value: function getRowHeaders(row) {
|
703
|
-
if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
|
704
|
-
return [];
|
705
|
-
}
|
706
634
|
var THs = [];
|
707
635
|
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
708
636
|
for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {
|
@@ -10,9 +10,6 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
10
10
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
12
|
import "core-js/modules/es.function.name.js";
|
13
|
-
import "core-js/modules/es.array.from.js";
|
14
|
-
import "core-js/modules/es.string.iterator.js";
|
15
|
-
import "core-js/modules/es.array.includes.js";
|
16
13
|
import "core-js/modules/es.object.to-string.js";
|
17
14
|
import "core-js/modules/web.dom-collections.for-each.js";
|
18
15
|
import "core-js/modules/es.symbol.to-primitive.js";
|
@@ -22,8 +19,10 @@ import "core-js/modules/es.symbol.description.js";
|
|
22
19
|
import "core-js/modules/es.number.constructor.js";
|
23
20
|
import "core-js/modules/es.symbol.iterator.js";
|
24
21
|
import "core-js/modules/es.array.iterator.js";
|
22
|
+
import "core-js/modules/es.string.iterator.js";
|
25
23
|
import "core-js/modules/web.dom-collections.iterator.js";
|
26
24
|
import "core-js/modules/es.array.slice.js";
|
25
|
+
import "core-js/modules/es.array.from.js";
|
27
26
|
import "core-js/modules/es.regexp.exec.js";
|
28
27
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
29
28
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
@@ -31,7 +30,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
31
30
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
32
31
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
33
32
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
34
|
-
import { hasClass, index, offset,
|
33
|
+
import { hasClass, index, offset, removeTextNodes, overlayContainsElement, closest, outerHeight, outerWidth, innerHeight, isVisible as _isVisible } from "../../../helpers/dom/element.mjs";
|
35
34
|
import { isFunction } from "../../../helpers/function.mjs";
|
36
35
|
import ColumnFilter from "./filter/column.mjs";
|
37
36
|
import RowFilter from "./filter/row.mjs";
|
@@ -382,7 +381,7 @@ var Table = /*#__PURE__*/function () {
|
|
382
381
|
wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
|
383
382
|
wtOverlays.adjustElementsSize();
|
384
383
|
} else {
|
385
|
-
this.
|
384
|
+
this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
|
386
385
|
}
|
387
386
|
if (syncScroll) {
|
388
387
|
wtOverlays.syncScrollWithMaster();
|
@@ -474,74 +473,6 @@ var Table = /*#__PURE__*/function () {
|
|
474
473
|
}
|
475
474
|
}
|
476
475
|
|
477
|
-
/**
|
478
|
-
* @param {string} className The CSS class name to remove from the table cells.
|
479
|
-
*/
|
480
|
-
}, {
|
481
|
-
key: "removeClassFromCells",
|
482
|
-
value: function removeClassFromCells(className) {
|
483
|
-
var nodes = this.TABLE.querySelectorAll(".".concat(className));
|
484
|
-
for (var i = 0, len = nodes.length; i < len; i++) {
|
485
|
-
removeClass(nodes[i], className);
|
486
|
-
}
|
487
|
-
}
|
488
|
-
|
489
|
-
/**
|
490
|
-
* Refresh the table selection by re-rendering Selection instances connected with that instance.
|
491
|
-
*
|
492
|
-
* @param {boolean} fastDraw If fast drawing is enabled than additionally className clearing is applied.
|
493
|
-
*/
|
494
|
-
}, {
|
495
|
-
key: "refreshSelections",
|
496
|
-
value: function refreshSelections(fastDraw) {
|
497
|
-
var wtSettings = this.wtSettings;
|
498
|
-
var selections = this.dataAccessObject.selections;
|
499
|
-
if (!selections) {
|
500
|
-
return;
|
501
|
-
}
|
502
|
-
var highlights = Array.from(selections);
|
503
|
-
var len = highlights.length;
|
504
|
-
if (fastDraw) {
|
505
|
-
var classesToRemove = [];
|
506
|
-
for (var i = 0; i < len; i++) {
|
507
|
-
var _highlights$i$setting = highlights[i].settings,
|
508
|
-
highlightHeaderClassName = _highlights$i$setting.highlightHeaderClassName,
|
509
|
-
highlightRowClassName = _highlights$i$setting.highlightRowClassName,
|
510
|
-
highlightColumnClassName = _highlights$i$setting.highlightColumnClassName;
|
511
|
-
var classNames = highlights[i].classNames;
|
512
|
-
var classNamesLength = classNames.length;
|
513
|
-
for (var j = 0; j < classNamesLength; j++) {
|
514
|
-
if (!classesToRemove.includes(classNames[j])) {
|
515
|
-
classesToRemove.push(classNames[j]);
|
516
|
-
}
|
517
|
-
}
|
518
|
-
if (highlightHeaderClassName && !classesToRemove.includes(highlightHeaderClassName)) {
|
519
|
-
classesToRemove.push(highlightHeaderClassName);
|
520
|
-
}
|
521
|
-
if (highlightRowClassName && !classesToRemove.includes(highlightRowClassName)) {
|
522
|
-
classesToRemove.push(highlightRowClassName);
|
523
|
-
}
|
524
|
-
if (highlightColumnClassName && !classesToRemove.includes(highlightColumnClassName)) {
|
525
|
-
classesToRemove.push(highlightColumnClassName);
|
526
|
-
}
|
527
|
-
}
|
528
|
-
var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');
|
529
|
-
if (Array.isArray(additionalClassesToRemove)) {
|
530
|
-
for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {
|
531
|
-
classesToRemove.push(additionalClassesToRemove[_i]);
|
532
|
-
}
|
533
|
-
}
|
534
|
-
var classesToRemoveLength = classesToRemove.length;
|
535
|
-
for (var _i2 = 0; _i2 < classesToRemoveLength; _i2++) {
|
536
|
-
// there was no rerender, so we need to remove classNames by ourselves
|
537
|
-
this.removeClassFromCells(classesToRemove[_i2]);
|
538
|
-
}
|
539
|
-
}
|
540
|
-
for (var _i3 = 0; _i3 < len; _i3++) {
|
541
|
-
highlights[_i3].draw(this.facadeGetter(), fastDraw);
|
542
|
-
}
|
543
|
-
}
|
544
|
-
|
545
476
|
/**
|
546
477
|
* Get cell element at coords.
|
547
478
|
* Negative coords.row or coords.col are used to retrieve header cells. If there are multiple header levels, the
|
@@ -675,14 +606,14 @@ var Table = /*#__PURE__*/function () {
|
|
675
606
|
key: "getRowHeader",
|
676
607
|
value: function getRowHeader(row) {
|
677
608
|
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
678
|
-
if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
|
679
|
-
return;
|
680
|
-
}
|
681
609
|
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
682
610
|
if (level >= rowHeadersCount) {
|
683
611
|
return;
|
684
612
|
}
|
685
|
-
var
|
613
|
+
var renderedRow = this.rowFilter.sourceToRendered(row);
|
614
|
+
var visibleRow = renderedRow < 0 ? this.rowFilter.sourceRowToVisibleColHeadedRow(row) : renderedRow;
|
615
|
+
var parentElement = renderedRow < 0 ? this.THEAD : this.TBODY;
|
616
|
+
var TR = parentElement.childNodes[visibleRow];
|
686
617
|
return TR === null || TR === void 0 ? void 0 : TR.childNodes[level];
|
687
618
|
}
|
688
619
|
|
@@ -695,9 +626,6 @@ var Table = /*#__PURE__*/function () {
|
|
695
626
|
}, {
|
696
627
|
key: "getRowHeaders",
|
697
628
|
value: function getRowHeaders(row) {
|
698
|
-
if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
|
699
|
-
return [];
|
700
|
-
}
|
701
629
|
var THs = [];
|
702
630
|
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
703
631
|
for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {
|
package/base.js
CHANGED
@@ -44,8 +44,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
44
44
|
Handsontable.CellCoords = _src.CellCoords;
|
45
45
|
Handsontable.CellRange = _src.CellRange;
|
46
46
|
Handsontable.packageName = 'handsontable';
|
47
|
-
Handsontable.buildDate = "
|
48
|
-
Handsontable.version = "0.0.0-next-
|
47
|
+
Handsontable.buildDate = "01/06/2023 11:45:12";
|
48
|
+
Handsontable.version = "0.0.0-next-93e34dc-20230601";
|
49
49
|
Handsontable.languages = {
|
50
50
|
dictionaryKeys: _registry.dictionaryKeys,
|
51
51
|
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 = "01/06/2023 11:45:28";
|
39
|
+
Handsontable.version = "0.0.0-next-93e34dc-20230601";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys: dictionaryKeys,
|
42
42
|
getLanguageDictionary: getLanguageDictionary,
|
package/core.d.ts
CHANGED
@@ -45,6 +45,8 @@ export default class Core {
|
|
45
45
|
countSourceRows(): number;
|
46
46
|
countVisibleCols(): number;
|
47
47
|
countVisibleRows(): number;
|
48
|
+
countRowHeaders(): number;
|
49
|
+
countColHeaders(): number;
|
48
50
|
deselectCell(): void;
|
49
51
|
destroy(): void;
|
50
52
|
destroyEditor(revertOriginal?: boolean, prepareEditorIfNeeded?: boolean): void;
|
@@ -130,12 +132,12 @@ export default class Core {
|
|
130
132
|
rowIndexMapper: IndexMapper;
|
131
133
|
runHooks(key: keyof Events, p1?: any, p2?: any, p3?: any, p4?: any, p5?: any, p6?: any): any;
|
132
134
|
scrollViewportTo(row?: number, column?: number, snapToBottom?: boolean, snapToRight?: boolean, considerHiddenIndexes?: boolean): boolean;
|
133
|
-
selectAll(): void;
|
135
|
+
selectAll(rowHeaderLevel?: boolean | number, columnHeaderLevel?: boolean | number): void;
|
134
136
|
selectCell(row: number, col: number, endRow?: number, endCol?: number, scrollToCell?: boolean, changeListener?: boolean): boolean;
|
135
137
|
selectCellByProp(row: number, prop: string, endRow?: number, endProp?: string, scrollToCell?: boolean): boolean;
|
136
138
|
selectCells(coords: Array<[number, number | string, number, number | string]> | CellRange[], scrollToCell?: boolean, changeListener?: boolean): boolean;
|
137
|
-
selectColumns(startColumn: number | string, endColumn?: number | string): boolean;
|
138
|
-
selectRows(startRow: number, endRow?: number): boolean;
|
139
|
+
selectColumns(startColumn: number | string, endColumn?: number | string, headerLevel?: number): boolean;
|
140
|
+
selectRows(startRow: number, endRow?: number, headerLevel?: number): boolean;
|
139
141
|
setCellMeta(row: number, col: number, key: string, val: any): void;
|
140
142
|
setCellMeta<K extends keyof CellMeta>(row: number, col: number, key: K, val: CellMeta[K]): void;
|
141
143
|
setCellMetaObject(row: number, col: number, prop: CellMeta): void;
|