handsontable 15.2.0-next-43dc07f-20250319 → 15.3.0-next-38401d0-20250424
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.
- package/3rdparty/walkontable/src/cell/range.js +14 -0
- package/3rdparty/walkontable/src/cell/range.mjs +14 -0
- package/3rdparty/walkontable/src/core/_base.js +2 -2
- package/3rdparty/walkontable/src/core/_base.mjs +3 -3
- package/3rdparty/walkontable/src/overlay/_base.js +0 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +0 -2
- package/3rdparty/walkontable/src/overlay/bottom.js +9 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +9 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -5
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +8 -5
- package/3rdparty/walkontable/src/overlay/top.js +11 -6
- package/3rdparty/walkontable/src/overlay/top.mjs +11 -6
- package/3rdparty/walkontable/src/overlays.js +15 -11
- package/3rdparty/walkontable/src/overlays.mjs +15 -11
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +4 -1
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +4 -1
- package/3rdparty/walkontable/src/selection/border/border.js +5 -0
- package/3rdparty/walkontable/src/selection/border/border.mjs +5 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +3 -4
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +3 -4
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +8 -10
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +8 -10
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +3 -4
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +3 -4
- package/3rdparty/walkontable/src/table.js +5 -2
- package/3rdparty/walkontable/src/table.mjs +5 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.js +0 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.mjs +0 -2
- package/CHANGELOG.md +45 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/focusDetector.js +1 -1
- package/core/focusCatcher/focusDetector.mjs +2 -2
- package/core/hooks/constants.js +8 -0
- package/core/hooks/constants.mjs +8 -0
- package/core/hooks/index.d.ts +1 -0
- package/core/viewportScroll/scrollStrategies/columnHeaderScroll.js +7 -5
- package/core/viewportScroll/scrollStrategies/columnHeaderScroll.mjs +7 -5
- package/core/viewportScroll/scrollStrategies/focusScroll.js +8 -1
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +8 -1
- package/core/viewportScroll/scrollStrategies/multipleScroll.js +13 -1
- package/core/viewportScroll/scrollStrategies/multipleScroll.mjs +13 -1
- package/core/viewportScroll/scrollStrategies/noncontiguousScroll.js +13 -1
- package/core/viewportScroll/scrollStrategies/noncontiguousScroll.mjs +13 -1
- package/core/viewportScroll/scrollStrategies/rowHeaderScroll.js +7 -5
- package/core/viewportScroll/scrollStrategies/rowHeaderScroll.mjs +7 -5
- package/core/viewportScroll/scrollStrategies/singleScroll.js +8 -4
- package/core/viewportScroll/scrollStrategies/singleScroll.mjs +8 -4
- package/core/viewportScroll/utils.js +111 -0
- package/core/viewportScroll/utils.mjs +106 -0
- package/core.d.ts +2 -3
- package/core.js +125 -71
- package/core.mjs +126 -72
- package/dataMap/dataMap.js +0 -7
- package/dataMap/dataMap.mjs +0 -7
- package/dataMap/metaManager/index.js +8 -9
- package/dataMap/metaManager/index.mjs +8 -9
- package/dataMap/metaManager/mods/dynamicCellMeta.js +4 -1
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +4 -1
- package/dist/handsontable.css +4 -15
- package/dist/handsontable.full.css +4 -17
- package/dist/handsontable.full.js +4573 -4013
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +148 -148
- package/dist/handsontable.js +4287 -3730
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +19 -19
- package/editorManager.js +1 -7
- package/editorManager.mjs +1 -7
- package/editors/autocompleteEditor/autocompleteEditor.js +31 -7
- package/editors/autocompleteEditor/autocompleteEditor.mjs +31 -7
- package/focusManager.js +4 -2
- package/focusManager.mjs +4 -2
- package/helpers/browser.js +1 -1
- package/helpers/browser.mjs +1 -1
- package/helpers/dom/element.d.ts +1 -0
- package/helpers/dom/element.js +20 -0
- package/helpers/dom/element.mjs +19 -0
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/object.js +3 -0
- package/helpers/object.mjs +3 -0
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +38 -17
- package/plugins/autoColumnSize/autoColumnSize.mjs +38 -17
- package/plugins/autoRowSize/autoRowSize.js +12 -6
- package/plugins/autoRowSize/autoRowSize.mjs +12 -6
- package/plugins/columnSorting/columnSorting.js +0 -4
- package/plugins/columnSorting/columnSorting.mjs +0 -4
- package/plugins/comments/comments.js +1 -0
- package/plugins/comments/comments.mjs +1 -0
- package/plugins/contextMenu/menu/defaultShortcutsList.js +2 -2
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +2 -2
- package/plugins/contextMenu/menu/menu.js +1 -0
- package/plugins/contextMenu/menu/menu.mjs +1 -0
- package/plugins/contextMenu/menu/positioner.js +10 -2
- package/plugins/contextMenu/menu/positioner.mjs +10 -2
- package/plugins/contextMenu/predefinedItems/redo.js +3 -3
- package/plugins/contextMenu/predefinedItems/redo.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/undo.js +3 -3
- package/plugins/contextMenu/predefinedItems/undo.mjs +3 -3
- package/plugins/copyPaste/copyPaste.js +12 -9
- package/plugins/copyPaste/copyPaste.mjs +12 -9
- package/plugins/copyPaste/pasteEvent.js +3 -0
- package/plugins/copyPaste/pasteEvent.mjs +3 -0
- package/plugins/exportFile/exportFile.d.ts +1 -0
- package/plugins/exportFile/exportFile.js +2 -1
- package/plugins/exportFile/exportFile.mjs +2 -1
- package/plugins/exportFile/types/csv.js +76 -11
- package/plugins/exportFile/types/csv.mjs +76 -11
- package/plugins/filters/filters.js +24 -23
- package/plugins/filters/filters.mjs +24 -23
- package/plugins/filters/ui/multipleSelect.js +7 -1
- package/plugins/filters/ui/multipleSelect.mjs +7 -1
- package/plugins/formulas/formulas.d.ts +1 -1
- package/plugins/formulas/formulas.js +57 -60
- package/plugins/formulas/formulas.mjs +59 -62
- package/plugins/formulas/indexSyncer/axisSyncer.js +5 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +5 -1
- package/plugins/hiddenColumns/hiddenColumns.js +1 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -1
- package/plugins/hiddenRows/hiddenRows.js +1 -1
- package/plugins/hiddenRows/hiddenRows.mjs +1 -1
- package/plugins/manualColumnResize/manualColumnResize.js +4 -6
- package/plugins/manualColumnResize/manualColumnResize.mjs +4 -6
- package/plugins/manualRowResize/manualRowResize.js +4 -6
- package/plugins/manualRowResize/manualRowResize.mjs +4 -6
- package/plugins/mergeCells/mergeCells.js +10 -30
- package/plugins/mergeCells/mergeCells.mjs +10 -30
- package/plugins/mergeCells/renderer.js +15 -0
- package/plugins/mergeCells/renderer.mjs +15 -0
- package/plugins/mergeCells/utils.js +31 -0
- package/plugins/mergeCells/utils.mjs +27 -0
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/undoRedo/actions/index.js +0 -2
- package/plugins/undoRedo/actions/index.mjs +0 -2
- package/plugins/undoRedo/actions/removeColumn.js +19 -14
- package/plugins/undoRedo/actions/removeColumn.mjs +19 -14
- package/plugins/undoRedo/actions/removeRow.js +12 -4
- package/plugins/undoRedo/actions/removeRow.mjs +12 -4
- package/selection/selection.js +3 -1
- package/selection/selection.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/down.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +8 -2
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +8 -2
- package/shortcutContexts/commands/extendCellsSelection/left.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/right.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/up.js +7 -2
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +7 -2
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +8 -2
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +8 -2
- package/shortcutContexts/commands/index.js +0 -2
- package/shortcutContexts/commands/index.mjs +0 -2
- package/shortcutContexts/commands/moveCellSelection/down.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/down.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +8 -3
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -3
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +8 -3
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -3
- package/shortcutContexts/commands/moveCellSelection/left.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/right.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +4 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +4 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +6 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/up.js +2 -0
- package/shortcutContexts/commands/moveCellSelection/up.mjs +2 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +6 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +6 -1
- package/shortcutContexts/commands/selectAllCells.js +7 -2
- package/shortcutContexts/commands/selectAllCells.mjs +7 -2
- package/shortcutContexts/commands/selectAllCellsAndHeaders.js +7 -2
- package/shortcutContexts/commands/selectAllCellsAndHeaders.mjs +7 -2
- package/shortcutContexts/index.js +2 -2
- package/shortcutContexts/index.mjs +0 -2
- package/styles/handsontable.css +15 -17
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-horizon.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
- package/tableView.js +5 -8
- package/tableView.mjs +5 -8
- package/translations/indexMapper.js +0 -1
- package/translations/indexMapper.mjs +0 -1
- package/utils/ghostTable.js +3 -0
- package/utils/ghostTable.mjs +3 -0
@@ -105,6 +105,20 @@ class CellRange {
|
|
105
105
|
return this;
|
106
106
|
}
|
107
107
|
|
108
|
+
/**
|
109
|
+
* Normalizes the coordinates in your `CellRange` instance to the nearest valid position.
|
110
|
+
*
|
111
|
+
* Coordinates that point to headers (negative values) are normalized to `0`.
|
112
|
+
*
|
113
|
+
* @returns {CellRange}
|
114
|
+
*/
|
115
|
+
normalize() {
|
116
|
+
this.highlight.normalize();
|
117
|
+
this.from.normalize();
|
118
|
+
this.to.normalize();
|
119
|
+
return this;
|
120
|
+
}
|
121
|
+
|
108
122
|
/**
|
109
123
|
* Checks if the coordinates in your `CellRange` instance are valid
|
110
124
|
* in the context of given table parameters.
|
@@ -101,6 +101,20 @@ class CellRange {
|
|
101
101
|
return this;
|
102
102
|
}
|
103
103
|
|
104
|
+
/**
|
105
|
+
* Normalizes the coordinates in your `CellRange` instance to the nearest valid position.
|
106
|
+
*
|
107
|
+
* Coordinates that point to headers (negative values) are normalized to `0`.
|
108
|
+
*
|
109
|
+
* @returns {CellRange}
|
110
|
+
*/
|
111
|
+
normalize() {
|
112
|
+
this.highlight.normalize();
|
113
|
+
this.from.normalize();
|
114
|
+
this.to.normalize();
|
115
|
+
return this;
|
116
|
+
}
|
117
|
+
|
104
118
|
/**
|
105
119
|
* Checks if the coordinates in your `CellRange` instance are valid
|
106
120
|
* in the context of given table parameters.
|
@@ -121,8 +121,8 @@ class CoreAbstract {
|
|
121
121
|
draw() {
|
122
122
|
let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
123
123
|
this.drawInterrupted = false;
|
124
|
-
if (!this.wtTable.isVisible()) {
|
125
|
-
// draw interrupted because TABLE is not visible
|
124
|
+
if (!this.wtTable.isVisible() || (0, _element.hasZeroHeight)(this.wtTable.wtRootElement.parentNode)) {
|
125
|
+
// draw interrupted because TABLE is not visible or has the height set to 0
|
126
126
|
this.drawInterrupted = true;
|
127
127
|
} else {
|
128
128
|
this.wtTable.draw(fastDraw);
|
@@ -3,7 +3,7 @@ import "core-js/modules/es.array.push.js";
|
|
3
3
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
|
-
import { fastInnerText } from "../../../../helpers/dom/element.mjs";
|
6
|
+
import { fastInnerText, hasZeroHeight } from "../../../../helpers/dom/element.mjs";
|
7
7
|
import { randomString } from "../../../../helpers/string.mjs";
|
8
8
|
import EventManager from "../../../../eventManager.mjs";
|
9
9
|
import Scroll from "../scroll.mjs";
|
@@ -117,8 +117,8 @@ export default class CoreAbstract {
|
|
117
117
|
draw() {
|
118
118
|
let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
119
119
|
this.drawInterrupted = false;
|
120
|
-
if (!this.wtTable.isVisible()) {
|
121
|
-
// draw interrupted because TABLE is not visible
|
120
|
+
if (!this.wtTable.isVisible() || hasZeroHeight(this.wtTable.wtRootElement.parentNode)) {
|
121
|
+
// draw interrupted because TABLE is not visible or has the height set to 0
|
122
122
|
this.drawInterrupted = true;
|
123
123
|
} else {
|
124
124
|
this.wtTable.draw(fastDraw);
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
6
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
7
5
|
var _element = require("../../../../helpers/dom/element");
|
8
6
|
var _object = require("../../../../helpers/object");
|
9
7
|
var _console = require("../../../../helpers/console");
|
@@ -1,6 +1,4 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
3
|
-
import "core-js/modules/esnext.iterator.for-each.js";
|
4
2
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
5
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
6
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -116,13 +116,16 @@ class BottomOverlay extends _base.Overlay {
|
|
116
116
|
const {
|
117
117
|
rootWindow
|
118
118
|
} = this.domBindings;
|
119
|
+
const scrollableElement = this.mainTableScrollableElement;
|
119
120
|
let result = false;
|
120
|
-
if (
|
121
|
-
rootWindow.
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
121
|
+
if (scrollableElement === rootWindow && pos !== rootWindow.scrollY) {
|
122
|
+
const oldScrollX = rootWindow.scrollY;
|
123
|
+
rootWindow.scrollTo((0, _element.getWindowScrollLeft)(rootWindow), top);
|
124
|
+
result = oldScrollX !== rootWindow.scrollY;
|
125
|
+
} else if (pos !== scrollableElement.scrollTop) {
|
126
|
+
const oldScrollLeft = scrollableElement.scrollTop;
|
127
|
+
scrollableElement.scrollTop = pos;
|
128
|
+
result = oldScrollLeft !== scrollableElement.scrollTop;
|
126
129
|
}
|
127
130
|
return result;
|
128
131
|
}
|
@@ -112,13 +112,16 @@ export class BottomOverlay extends Overlay {
|
|
112
112
|
const {
|
113
113
|
rootWindow
|
114
114
|
} = this.domBindings;
|
115
|
+
const scrollableElement = this.mainTableScrollableElement;
|
115
116
|
let result = false;
|
116
|
-
if (
|
117
|
-
rootWindow.
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
if (scrollableElement === rootWindow && pos !== rootWindow.scrollY) {
|
118
|
+
const oldScrollX = rootWindow.scrollY;
|
119
|
+
rootWindow.scrollTo(getWindowScrollLeft(rootWindow), top);
|
120
|
+
result = oldScrollX !== rootWindow.scrollY;
|
121
|
+
} else if (pos !== scrollableElement.scrollTop) {
|
122
|
+
const oldScrollLeft = scrollableElement.scrollTop;
|
123
|
+
scrollableElement.scrollTop = pos;
|
124
|
+
result = oldScrollLeft !== scrollableElement.scrollTop;
|
122
125
|
}
|
123
126
|
return result;
|
124
127
|
}
|
@@ -90,12 +90,15 @@ class InlineStartOverlay extends _base.Overlay {
|
|
90
90
|
if (this.isRtl()) {
|
91
91
|
pos = -pos;
|
92
92
|
}
|
93
|
-
|
93
|
+
const scrollableElement = this.mainTableScrollableElement;
|
94
|
+
if (scrollableElement === rootWindow && pos !== rootWindow.scrollX) {
|
95
|
+
const oldScrollX = rootWindow.scrollX;
|
94
96
|
rootWindow.scrollTo(pos, (0, _element.getWindowScrollTop)(rootWindow));
|
95
|
-
result =
|
96
|
-
} else if (
|
97
|
-
|
98
|
-
|
97
|
+
result = oldScrollX !== rootWindow.scrollX;
|
98
|
+
} else if (pos !== scrollableElement.scrollLeft) {
|
99
|
+
const oldScrollLeft = scrollableElement.scrollLeft;
|
100
|
+
scrollableElement.scrollLeft = pos;
|
101
|
+
result = oldScrollLeft !== scrollableElement.scrollLeft;
|
99
102
|
}
|
100
103
|
return result;
|
101
104
|
}
|
@@ -86,12 +86,15 @@ export class InlineStartOverlay extends Overlay {
|
|
86
86
|
if (this.isRtl()) {
|
87
87
|
pos = -pos;
|
88
88
|
}
|
89
|
-
|
89
|
+
const scrollableElement = this.mainTableScrollableElement;
|
90
|
+
if (scrollableElement === rootWindow && pos !== rootWindow.scrollX) {
|
91
|
+
const oldScrollX = rootWindow.scrollX;
|
90
92
|
rootWindow.scrollTo(pos, getWindowScrollTop(rootWindow));
|
91
|
-
result =
|
92
|
-
} else if (
|
93
|
-
|
94
|
-
|
93
|
+
result = oldScrollX !== rootWindow.scrollX;
|
94
|
+
} else if (pos !== scrollableElement.scrollLeft) {
|
95
|
+
const oldScrollLeft = scrollableElement.scrollLeft;
|
96
|
+
scrollableElement.scrollLeft = pos;
|
97
|
+
result = oldScrollLeft !== scrollableElement.scrollLeft;
|
95
98
|
}
|
96
99
|
return result;
|
97
100
|
}
|
@@ -111,14 +111,19 @@ class TopOverlay extends _base.Overlay {
|
|
111
111
|
* @returns {boolean}
|
112
112
|
*/
|
113
113
|
setScrollPosition(pos) {
|
114
|
-
const
|
114
|
+
const {
|
115
|
+
rootWindow
|
116
|
+
} = this.domBindings;
|
117
|
+
const scrollableElement = this.mainTableScrollableElement;
|
115
118
|
let result = false;
|
116
|
-
if (
|
119
|
+
if (scrollableElement === rootWindow && pos !== rootWindow.scrollY) {
|
120
|
+
const oldScrollX = rootWindow.scrollY;
|
117
121
|
rootWindow.scrollTo((0, _element.getWindowScrollLeft)(rootWindow), pos);
|
118
|
-
result =
|
119
|
-
} else if (
|
120
|
-
|
121
|
-
|
122
|
+
result = oldScrollX !== rootWindow.scrollY;
|
123
|
+
} else if (pos !== scrollableElement.scrollTop) {
|
124
|
+
const oldScrollLeft = scrollableElement.scrollTop;
|
125
|
+
scrollableElement.scrollTop = pos;
|
126
|
+
result = oldScrollLeft !== scrollableElement.scrollTop;
|
122
127
|
}
|
123
128
|
return result;
|
124
129
|
}
|
@@ -107,14 +107,19 @@ export class TopOverlay extends Overlay {
|
|
107
107
|
* @returns {boolean}
|
108
108
|
*/
|
109
109
|
setScrollPosition(pos) {
|
110
|
-
const
|
110
|
+
const {
|
111
|
+
rootWindow
|
112
|
+
} = this.domBindings;
|
113
|
+
const scrollableElement = this.mainTableScrollableElement;
|
111
114
|
let result = false;
|
112
|
-
if (
|
115
|
+
if (scrollableElement === rootWindow && pos !== rootWindow.scrollY) {
|
116
|
+
const oldScrollX = rootWindow.scrollY;
|
113
117
|
rootWindow.scrollTo(getWindowScrollLeft(rootWindow), pos);
|
114
|
-
result =
|
115
|
-
} else if (
|
116
|
-
|
117
|
-
|
118
|
+
result = oldScrollX !== rootWindow.scrollY;
|
119
|
+
} else if (pos !== scrollableElement.scrollTop) {
|
120
|
+
const oldScrollLeft = scrollableElement.scrollTop;
|
121
|
+
scrollableElement.scrollTop = pos;
|
122
|
+
result = oldScrollLeft !== scrollableElement.scrollTop;
|
118
123
|
}
|
119
124
|
return result;
|
120
125
|
}
|
@@ -460,27 +460,31 @@ class Overlays {
|
|
460
460
|
if (this.destroyed) {
|
461
461
|
return;
|
462
462
|
}
|
463
|
-
const {
|
464
|
-
rootWindow
|
465
|
-
} = this.domBindings;
|
466
463
|
const topHolder = this.topOverlay.clone.wtTable.holder; // todo rethink
|
467
464
|
const leftHolder = this.inlineStartOverlay.clone.wtTable.holder; // todo rethink
|
468
465
|
|
469
|
-
|
470
|
-
|
471
|
-
this.
|
472
|
-
|
473
|
-
|
466
|
+
let scrollX = this.scrollableElement.scrollLeft;
|
467
|
+
let scrollY = this.scrollableElement.scrollTop;
|
468
|
+
if (this.wot.wtViewport.isHorizontallyScrollableByWindow()) {
|
469
|
+
scrollX = this.scrollableElement.scrollX;
|
470
|
+
}
|
471
|
+
if (this.wot.wtViewport.isVerticallyScrollableByWindow()) {
|
472
|
+
scrollY = this.scrollableElement.scrollY;
|
473
|
+
}
|
474
|
+
this.horizontalScrolling = this.lastScrollX !== scrollX;
|
475
|
+
this.verticalScrolling = this.lastScrollY !== scrollY;
|
476
|
+
this.lastScrollX = scrollX;
|
477
|
+
this.lastScrollY = scrollY;
|
474
478
|
if (this.horizontalScrolling) {
|
475
|
-
topHolder.scrollLeft =
|
479
|
+
topHolder.scrollLeft = scrollX;
|
476
480
|
const bottomHolder = this.bottomOverlay.needFullRender ? this.bottomOverlay.clone.wtTable.holder : null; // todo rethink
|
477
481
|
|
478
482
|
if (bottomHolder) {
|
479
|
-
bottomHolder.scrollLeft =
|
483
|
+
bottomHolder.scrollLeft = scrollX;
|
480
484
|
}
|
481
485
|
}
|
482
486
|
if (this.verticalScrolling) {
|
483
|
-
leftHolder.scrollTop =
|
487
|
+
leftHolder.scrollTop = scrollY;
|
484
488
|
}
|
485
489
|
this.refreshAll();
|
486
490
|
}
|
@@ -457,27 +457,31 @@ class Overlays {
|
|
457
457
|
if (this.destroyed) {
|
458
458
|
return;
|
459
459
|
}
|
460
|
-
const {
|
461
|
-
rootWindow
|
462
|
-
} = this.domBindings;
|
463
460
|
const topHolder = this.topOverlay.clone.wtTable.holder; // todo rethink
|
464
461
|
const leftHolder = this.inlineStartOverlay.clone.wtTable.holder; // todo rethink
|
465
462
|
|
466
|
-
|
467
|
-
|
468
|
-
this.
|
469
|
-
|
470
|
-
|
463
|
+
let scrollX = this.scrollableElement.scrollLeft;
|
464
|
+
let scrollY = this.scrollableElement.scrollTop;
|
465
|
+
if (this.wot.wtViewport.isHorizontallyScrollableByWindow()) {
|
466
|
+
scrollX = this.scrollableElement.scrollX;
|
467
|
+
}
|
468
|
+
if (this.wot.wtViewport.isVerticallyScrollableByWindow()) {
|
469
|
+
scrollY = this.scrollableElement.scrollY;
|
470
|
+
}
|
471
|
+
this.horizontalScrolling = this.lastScrollX !== scrollX;
|
472
|
+
this.verticalScrolling = this.lastScrollY !== scrollY;
|
473
|
+
this.lastScrollX = scrollX;
|
474
|
+
this.lastScrollY = scrollY;
|
471
475
|
if (this.horizontalScrolling) {
|
472
|
-
topHolder.scrollLeft =
|
476
|
+
topHolder.scrollLeft = scrollX;
|
473
477
|
const bottomHolder = this.bottomOverlay.needFullRender ? this.bottomOverlay.clone.wtTable.holder : null; // todo rethink
|
474
478
|
|
475
479
|
if (bottomHolder) {
|
476
|
-
bottomHolder.scrollLeft =
|
480
|
+
bottomHolder.scrollLeft = scrollX;
|
477
481
|
}
|
478
482
|
}
|
479
483
|
if (this.verticalScrolling) {
|
480
|
-
leftHolder.scrollTop =
|
484
|
+
leftHolder.scrollTop = scrollY;
|
481
485
|
}
|
482
486
|
this.refreshAll();
|
483
487
|
}
|
@@ -74,7 +74,10 @@ class RowHeadersRenderer extends _base.BaseRenderer {
|
|
74
74
|
const orderView = this.obtainOrderView(TR);
|
75
75
|
const cellsView = cells.obtainOrderView(TR);
|
76
76
|
orderView.appendView(cellsView).setSize(rowHeadersCount).setOffset(0).start();
|
77
|
-
|
77
|
+
|
78
|
+
// Reading the row header renderers in reverse because of how the Eco Renderers handle rendering
|
79
|
+
// (prepending the nodes when rendering row headers).
|
80
|
+
for (let visibleColumnIndex = rowHeadersCount - 1; visibleColumnIndex >= 0; visibleColumnIndex--) {
|
78
81
|
orderView.render();
|
79
82
|
const TH = orderView.getCurrentNode();
|
80
83
|
TH.className = '';
|
@@ -71,7 +71,10 @@ export class RowHeadersRenderer extends BaseRenderer {
|
|
71
71
|
const orderView = this.obtainOrderView(TR);
|
72
72
|
const cellsView = cells.obtainOrderView(TR);
|
73
73
|
orderView.appendView(cellsView).setSize(rowHeadersCount).setOffset(0).start();
|
74
|
-
|
74
|
+
|
75
|
+
// Reading the row header renderers in reverse because of how the Eco Renderers handle rendering
|
76
|
+
// (prepending the nodes when rendering row headers).
|
77
|
+
for (let visibleColumnIndex = rowHeadersCount - 1; visibleColumnIndex >= 0; visibleColumnIndex--) {
|
75
78
|
orderView.render();
|
76
79
|
const TH = orderView.getCurrentNode();
|
77
80
|
TH.className = '';
|
@@ -352,6 +352,11 @@ class Border {
|
|
352
352
|
const lastRenderedRow = wtTable.getLastRenderedRow();
|
353
353
|
const firstRenderedColumn = wtTable.getFirstRenderedColumn();
|
354
354
|
const lastRenderedColumn = wtTable.getLastRenderedColumn();
|
355
|
+
if (firstRenderedColumn < 0 && lastRenderedColumn < 0 || firstRenderedRow < 0 && lastRenderedRow < 0) {
|
356
|
+
// ...also when overlays have rendered only headers skip it
|
357
|
+
this.disappear();
|
358
|
+
return;
|
359
|
+
}
|
355
360
|
let fromTD;
|
356
361
|
if (isMultiple) {
|
357
362
|
fromColumn = Math.max(fromColumn, firstRenderedColumn);
|
@@ -349,6 +349,11 @@ class Border {
|
|
349
349
|
const lastRenderedRow = wtTable.getLastRenderedRow();
|
350
350
|
const firstRenderedColumn = wtTable.getFirstRenderedColumn();
|
351
351
|
const lastRenderedColumn = wtTable.getLastRenderedColumn();
|
352
|
+
if (firstRenderedColumn < 0 && lastRenderedColumn < 0 || firstRenderedRow < 0 && lastRenderedRow < 0) {
|
353
|
+
// ...also when overlays have rendered only headers skip it
|
354
|
+
this.disappear();
|
355
|
+
return;
|
356
|
+
}
|
352
357
|
let fromTD;
|
353
358
|
if (isMultiple) {
|
354
359
|
fromColumn = Math.max(fromColumn, firstRenderedColumn);
|
@@ -20,8 +20,8 @@ const stickyColumnsStart = {
|
|
20
20
|
* @this Table
|
21
21
|
*/
|
22
22
|
getFirstRenderedColumn() {
|
23
|
-
const
|
24
|
-
if (
|
23
|
+
const allStickyColumns = this.getRenderedColumnsCount();
|
24
|
+
if (allStickyColumns === 0) {
|
25
25
|
return -1;
|
26
26
|
}
|
27
27
|
return 0;
|
@@ -82,8 +82,7 @@ const stickyColumnsStart = {
|
|
82
82
|
* @this Table
|
83
83
|
*/
|
84
84
|
getRenderedColumnsCount() {
|
85
|
-
|
86
|
-
return Math.min(this.wtSettings.getSetting('fixedColumnsStart'), totalColumns);
|
85
|
+
return Math.min(this.wtSettings.getSetting('totalColumns'), this.wtSettings.getSetting('fixedColumnsStart'));
|
87
86
|
},
|
88
87
|
/**
|
89
88
|
* Get the number of fully visible columns in the viewport.
|
@@ -17,8 +17,8 @@ const stickyColumnsStart = {
|
|
17
17
|
* @this Table
|
18
18
|
*/
|
19
19
|
getFirstRenderedColumn() {
|
20
|
-
const
|
21
|
-
if (
|
20
|
+
const allStickyColumns = this.getRenderedColumnsCount();
|
21
|
+
if (allStickyColumns === 0) {
|
22
22
|
return -1;
|
23
23
|
}
|
24
24
|
return 0;
|
@@ -79,8 +79,7 @@ const stickyColumnsStart = {
|
|
79
79
|
* @this Table
|
80
80
|
*/
|
81
81
|
getRenderedColumnsCount() {
|
82
|
-
|
83
|
-
return Math.min(this.wtSettings.getSetting('fixedColumnsStart'), totalColumns);
|
82
|
+
return Math.min(this.wtSettings.getSetting('totalColumns'), this.wtSettings.getSetting('fixedColumnsStart'));
|
84
83
|
},
|
85
84
|
/**
|
86
85
|
* Get the number of fully visible columns in the viewport.
|
@@ -20,16 +20,11 @@ const stickyRowsBottom = {
|
|
20
20
|
* @this Table
|
21
21
|
*/
|
22
22
|
getFirstRenderedRow() {
|
23
|
-
const
|
24
|
-
|
25
|
-
const index = totalRows - fixedRowsBottom;
|
26
|
-
if (totalRows === 0 || fixedRowsBottom === 0) {
|
23
|
+
const allStickyRows = this.getRenderedRowsCount();
|
24
|
+
if (allStickyRows === 0) {
|
27
25
|
return -1;
|
28
26
|
}
|
29
|
-
|
30
|
-
return 0;
|
31
|
-
}
|
32
|
-
return index;
|
27
|
+
return this.wtSettings.getSetting('totalRows') - allStickyRows;
|
33
28
|
},
|
34
29
|
/**
|
35
30
|
* Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.
|
@@ -58,6 +53,10 @@ const stickyRowsBottom = {
|
|
58
53
|
* @this Table
|
59
54
|
*/
|
60
55
|
getLastRenderedRow() {
|
56
|
+
const allStickyRows = this.getRenderedRowsCount();
|
57
|
+
if (allStickyRows === 0) {
|
58
|
+
return -1;
|
59
|
+
}
|
61
60
|
return this.wtSettings.getSetting('totalRows') - 1;
|
62
61
|
},
|
63
62
|
/**
|
@@ -87,8 +86,7 @@ const stickyRowsBottom = {
|
|
87
86
|
* @this Table
|
88
87
|
*/
|
89
88
|
getRenderedRowsCount() {
|
90
|
-
|
91
|
-
return Math.min(this.wtSettings.getSetting('fixedRowsBottom'), totalRows);
|
89
|
+
return Math.min(this.wtSettings.getSetting('totalRows'), this.wtSettings.getSetting('fixedRowsBottom'));
|
92
90
|
},
|
93
91
|
/**
|
94
92
|
* Get the number of fully visible rows in the viewport.
|
@@ -17,16 +17,11 @@ const stickyRowsBottom = {
|
|
17
17
|
* @this Table
|
18
18
|
*/
|
19
19
|
getFirstRenderedRow() {
|
20
|
-
const
|
21
|
-
|
22
|
-
const index = totalRows - fixedRowsBottom;
|
23
|
-
if (totalRows === 0 || fixedRowsBottom === 0) {
|
20
|
+
const allStickyRows = this.getRenderedRowsCount();
|
21
|
+
if (allStickyRows === 0) {
|
24
22
|
return -1;
|
25
23
|
}
|
26
|
-
|
27
|
-
return 0;
|
28
|
-
}
|
29
|
-
return index;
|
24
|
+
return this.wtSettings.getSetting('totalRows') - allStickyRows;
|
30
25
|
},
|
31
26
|
/**
|
32
27
|
* Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.
|
@@ -55,6 +50,10 @@ const stickyRowsBottom = {
|
|
55
50
|
* @this Table
|
56
51
|
*/
|
57
52
|
getLastRenderedRow() {
|
53
|
+
const allStickyRows = this.getRenderedRowsCount();
|
54
|
+
if (allStickyRows === 0) {
|
55
|
+
return -1;
|
56
|
+
}
|
58
57
|
return this.wtSettings.getSetting('totalRows') - 1;
|
59
58
|
},
|
60
59
|
/**
|
@@ -84,8 +83,7 @@ const stickyRowsBottom = {
|
|
84
83
|
* @this Table
|
85
84
|
*/
|
86
85
|
getRenderedRowsCount() {
|
87
|
-
|
88
|
-
return Math.min(this.wtSettings.getSetting('fixedRowsBottom'), totalRows);
|
86
|
+
return Math.min(this.wtSettings.getSetting('totalRows'), this.wtSettings.getSetting('fixedRowsBottom'));
|
89
87
|
},
|
90
88
|
/**
|
91
89
|
* Get the number of fully visible rows in the viewport.
|
@@ -20,8 +20,8 @@ const stickyRowsTop = {
|
|
20
20
|
* @this Table
|
21
21
|
*/
|
22
22
|
getFirstRenderedRow() {
|
23
|
-
const
|
24
|
-
if (
|
23
|
+
const allStickyRows = this.getRenderedRowsCount();
|
24
|
+
if (allStickyRows === 0) {
|
25
25
|
return -1;
|
26
26
|
}
|
27
27
|
return 0;
|
@@ -82,8 +82,7 @@ const stickyRowsTop = {
|
|
82
82
|
* @this Table
|
83
83
|
*/
|
84
84
|
getRenderedRowsCount() {
|
85
|
-
|
86
|
-
return Math.min(this.wtSettings.getSetting('fixedRowsTop'), totalRows);
|
85
|
+
return Math.min(this.wtSettings.getSetting('totalRows'), this.wtSettings.getSetting('fixedRowsTop'));
|
87
86
|
},
|
88
87
|
/**
|
89
88
|
* Get the number of fully visible rows in the viewport.
|
@@ -17,8 +17,8 @@ const stickyRowsTop = {
|
|
17
17
|
* @this Table
|
18
18
|
*/
|
19
19
|
getFirstRenderedRow() {
|
20
|
-
const
|
21
|
-
if (
|
20
|
+
const allStickyRows = this.getRenderedRowsCount();
|
21
|
+
if (allStickyRows === 0) {
|
22
22
|
return -1;
|
23
23
|
}
|
24
24
|
return 0;
|
@@ -79,8 +79,7 @@ const stickyRowsTop = {
|
|
79
79
|
* @this Table
|
80
80
|
*/
|
81
81
|
getRenderedRowsCount() {
|
82
|
-
|
83
|
-
return Math.min(this.wtSettings.getSetting('fixedRowsTop'), totalRows);
|
82
|
+
return Math.min(this.wtSettings.getSetting('totalRows'), this.wtSettings.getSetting('fixedRowsTop'));
|
84
83
|
},
|
85
84
|
/**
|
86
85
|
* Get the number of fully visible rows in the viewport.
|
@@ -279,8 +279,8 @@ class Table {
|
|
279
279
|
} else {
|
280
280
|
this.tableOffset = this.dataAccessObject.parentTableOffset;
|
281
281
|
}
|
282
|
-
const startRow =
|
283
|
-
const startColumn =
|
282
|
+
const startRow = Math.max(this.getFirstRenderedRow(), 0);
|
283
|
+
const startColumn = Math.max(this.getFirstRenderedColumn(), 0);
|
284
284
|
this.rowFilter = new _row.default(startRow, totalRows, columnHeadersCount);
|
285
285
|
this.columnFilter = new _column.default(startColumn, totalColumns, rowHeadersCount);
|
286
286
|
let performRedraw = true;
|
@@ -598,6 +598,9 @@ class Table {
|
|
598
598
|
return null;
|
599
599
|
}
|
600
600
|
const TR = cellElement.parentNode;
|
601
|
+
if (!TR) {
|
602
|
+
return null;
|
603
|
+
}
|
601
604
|
const CONTAINER = TR.parentNode;
|
602
605
|
let row = (0, _element.index)(TR);
|
603
606
|
let col = cellElement.cellIndex;
|
@@ -275,8 +275,8 @@ class Table {
|
|
275
275
|
} else {
|
276
276
|
this.tableOffset = this.dataAccessObject.parentTableOffset;
|
277
277
|
}
|
278
|
-
const startRow =
|
279
|
-
const startColumn =
|
278
|
+
const startRow = Math.max(this.getFirstRenderedRow(), 0);
|
279
|
+
const startColumn = Math.max(this.getFirstRenderedColumn(), 0);
|
280
280
|
this.rowFilter = new RowFilter(startRow, totalRows, columnHeadersCount);
|
281
281
|
this.columnFilter = new ColumnFilter(startColumn, totalColumns, rowHeadersCount);
|
282
282
|
let performRedraw = true;
|
@@ -594,6 +594,9 @@ class Table {
|
|
594
594
|
return null;
|
595
595
|
}
|
596
596
|
const TR = cellElement.parentNode;
|
597
|
+
if (!TR) {
|
598
|
+
return null;
|
599
|
+
}
|
597
600
|
const CONTAINER = TR.parentNode;
|
598
601
|
let row = index(TR);
|
599
602
|
let col = cellElement.cellIndex;
|
@@ -3,8 +3,6 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
require("core-js/modules/es.array.unshift.js");
|
6
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
7
|
-
require("core-js/modules/esnext.iterator.map.js");
|
8
6
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
9
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
8
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.unshift.js";
|
3
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
4
|
-
import "core-js/modules/esnext.iterator.map.js";
|
5
3
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
6
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
7
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|