handsontable 0.0.0-next-e2116ad-20250117 → 0.0.0-next-542a54e-20250121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (43) hide show
  1. package/3rdparty/walkontable/src/core/_base.js +0 -19
  2. package/3rdparty/walkontable/src/core/_base.mjs +0 -19
  3. package/3rdparty/walkontable/src/overlay/_base.js +8 -44
  4. package/3rdparty/walkontable/src/overlay/_base.mjs +8 -44
  5. package/3rdparty/walkontable/src/overlay/bottom.js +1 -0
  6. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -0
  7. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +1 -0
  8. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +1 -0
  9. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -0
  10. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -0
  11. package/3rdparty/walkontable/src/overlay/top.js +1 -0
  12. package/3rdparty/walkontable/src/overlay/top.mjs +1 -0
  13. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +1 -0
  14. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +1 -0
  15. package/3rdparty/walkontable/src/overlays.js +45 -355
  16. package/3rdparty/walkontable/src/overlays.mjs +45 -355
  17. package/3rdparty/walkontable/src/table.js +99 -94
  18. package/3rdparty/walkontable/src/table.mjs +99 -94
  19. package/base.js +2 -2
  20. package/base.mjs +2 -2
  21. package/dist/handsontable.css +4 -20
  22. package/dist/handsontable.full.css +4 -20
  23. package/dist/handsontable.full.js +166 -522
  24. package/dist/handsontable.full.min.css +3 -3
  25. package/dist/handsontable.full.min.js +108 -108
  26. package/dist/handsontable.js +166 -522
  27. package/dist/handsontable.min.css +3 -3
  28. package/dist/handsontable.min.js +15 -15
  29. package/editors/baseEditor/baseEditor.js +1 -2
  30. package/editors/baseEditor/baseEditor.mjs +1 -2
  31. package/helpers/mixed.js +1 -1
  32. package/helpers/mixed.mjs +1 -1
  33. package/package.json +1 -1
  34. package/plugins/dragToScroll/dragToScroll.js +1 -1
  35. package/plugins/dragToScroll/dragToScroll.mjs +1 -1
  36. package/styles/handsontable.css +2 -7
  37. package/styles/handsontable.min.css +3 -3
  38. package/styles/ht-theme-horizon.css +2 -2
  39. package/styles/ht-theme-horizon.min.css +2 -2
  40. package/styles/ht-theme-main.css +2 -2
  41. package/styles/ht-theme-main.min.css +2 -2
  42. package/tableView.js +2 -2
  43. package/tableView.mjs +2 -2
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-e2116ad-20250117
29
- * Release date: 16/12/2024 (built at 17/01/2025 11:44:24)
28
+ * Version: 0.0.0-next-542a54e-20250121
29
+ * Release date: 16/12/2024 (built at 21/01/2025 09:00:27)
30
30
  */
31
31
  (function webpackUniversalModuleDefinition(root, factory) {
32
32
  if(typeof exports === 'object' && typeof module === 'object')
@@ -42855,8 +42855,8 @@ Handsontable.hooks = _hooks.Hooks.getSingleton();
42855
42855
  Handsontable.CellCoords = _src.CellCoords;
42856
42856
  Handsontable.CellRange = _src.CellRange;
42857
42857
  Handsontable.packageName = 'handsontable';
42858
- Handsontable.buildDate = "17/01/2025 11:44:24";
42859
- Handsontable.version = "0.0.0-next-e2116ad-20250117";
42858
+ Handsontable.buildDate = "21/01/2025 09:00:27";
42859
+ Handsontable.version = "0.0.0-next-542a54e-20250121";
42860
42860
  Handsontable.languages = {
42861
42861
  dictionaryKeys: _registry.dictionaryKeys,
42862
42862
  getLanguageDictionary: _registry.getLanguageDictionary,
@@ -54189,7 +54189,7 @@ const domMessages = {
54189
54189
  function _injectProductInfo(key, element) {
54190
54190
  const hasValidType = !isEmpty(key);
54191
54191
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
54192
- const hotVersion = "0.0.0-next-e2116ad-20250117";
54192
+ const hotVersion = "0.0.0-next-542a54e-20250121";
54193
54193
  let keyValidityDate;
54194
54194
  let consoleMessageState = 'invalid';
54195
54195
  let domMessageState = 'invalid';
@@ -68807,7 +68807,7 @@ class TableView {
68807
68807
  if (this.hot.isRenderSuspended()) {
68808
68808
  this.postponedAdjustElementsSize = true;
68809
68809
  } else {
68810
- this._wt.wtOverlays.adjustElementsSize();
68810
+ // this._wt.wtOverlays.adjustElementsSize();
68811
68811
  }
68812
68812
  }
68813
68813
 
@@ -69888,7 +69888,7 @@ class TableView {
69888
69888
  updateCellHeader(element, index, content) {
69889
69889
  let headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
69890
69890
  let renderedIndex = index;
69891
- const parentOverlay = this._wt.wtOverlays.getParentOverlay(element) || this._wt;
69891
+ const parentOverlay = this._wt;
69892
69892
 
69893
69893
  // prevent wrong calculations from SampleGenerator
69894
69894
  if (element.parentNode) {
@@ -73329,9 +73329,6 @@ var _interopRequireDefault = __webpack_require__(197);
73329
73329
  exports.__esModule = true;
73330
73330
  __webpack_require__(201);
73331
73331
  __webpack_require__(283);
73332
- __webpack_require__(311);
73333
- __webpack_require__(329);
73334
- __webpack_require__(530);
73335
73332
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(504));
73336
73333
  var _element = __webpack_require__(351);
73337
73334
  var _feature = __webpack_require__(502);
@@ -73349,7 +73346,6 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
73349
73346
  * @class Overlays
73350
73347
  */
73351
73348
  var _overlays = /*#__PURE__*/new WeakMap();
73352
- var _hasRenderingStateChanged = /*#__PURE__*/new WeakMap();
73353
73349
  var _containerDomResizeCount = /*#__PURE__*/new WeakMap();
73354
73350
  var _containerDomResizeCountTimeout = /*#__PURE__*/new WeakMap();
73355
73351
  class Overlays {
@@ -73424,12 +73420,6 @@ class Overlays {
73424
73420
  * @type {Settings}
73425
73421
  */
73426
73422
  (0, _defineProperty2.default)(this, "wtSettings", null);
73427
- /**
73428
- * Indicates whether the rendering state has changed for one of the overlays.
73429
- *
73430
- * @type {boolean}
73431
- */
73432
- _classPrivateFieldInitSpec(this, _hasRenderingStateChanged, false);
73433
73423
  /**
73434
73424
  * The amount of times the ResizeObserver callback was fired in direct succession.
73435
73425
  *
@@ -73476,32 +73466,16 @@ class Overlays {
73476
73466
  this.domBindings = domBindings;
73477
73467
  this.facadeGetter = facadeGetter;
73478
73468
  this.wtTable = wtTable;
73469
+ this.eventManager = eventManager;
73470
+ this.destroyed = false;
73479
73471
  const {
73480
- rootDocument,
73481
73472
  rootWindow
73482
73473
  } = this.domBindings;
73483
-
73484
- // legacy support
73485
- this.instance = this.wot; // todo refactoring: move to facade
73486
- this.eventManager = eventManager;
73487
-
73488
- // TODO refactoring: probably invalid place to this logic
73489
- this.scrollbarSize = (0, _element.getScrollbarWidth)(rootDocument);
73490
73474
  const isOverflowHidden = rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden';
73491
73475
  this.scrollableElement = isOverflowHidden ? wtTable.holder : (0, _element.getScrollableElement)(wtTable.TABLE);
73492
73476
  this.initOverlays();
73493
- this.destroyed = false;
73494
- this.keyPressed = false;
73495
- this.spreaderLastSize = {
73496
- width: null,
73497
- height: null
73498
- };
73499
- this.verticalScrolling = false;
73500
- this.horizontalScrolling = false;
73501
73477
  this.initBrowserLineHeight();
73502
73478
  this.registerListeners();
73503
- this.lastScrollX = rootWindow.scrollX;
73504
- this.lastScrollY = rootWindow.scrollY;
73505
73479
  }
73506
73480
 
73507
73481
  /**
@@ -73536,8 +73510,8 @@ class Overlays {
73536
73510
  * Https://developer.mozilla.org/pl/docs/Web/CSS/line-height#Values.
73537
73511
  */
73538
73512
  const lineHeight = parseInt(computedStyle.lineHeight, 10);
73539
- const lineHeightFalback = parseInt(computedStyle.fontSize, 10) * 1.2;
73540
- this.browserLineHeight = lineHeight || lineHeightFalback;
73513
+ const lineHeightFallback = parseInt(computedStyle.fontSize, 10) * 1.2;
73514
+ this.browserLineHeight = lineHeight || lineHeightFallback;
73541
73515
  }
73542
73516
 
73543
73517
  /**
@@ -73547,15 +73521,9 @@ class Overlays {
73547
73521
  */
73548
73522
  initOverlays() {
73549
73523
  const args = [this.wot, this.facadeGetter, this.wtSettings, this.domBindings];
73550
-
73551
- // todo refactoring: IOC, collection or factories.
73552
- // TODO refactoring, conceive about using generic collection of overlays.
73553
73524
  this.topOverlay = new _overlay.TopOverlay(...args);
73554
73525
  this.bottomOverlay = new _overlay.BottomOverlay(...args);
73555
73526
  this.inlineStartOverlay = new _overlay.InlineStartOverlay(...args);
73556
-
73557
- // TODO discuss, the controversial here would be removing the lazy creation mechanism for corners.
73558
- // TODO cond. Has no any visual impact. They're initially hidden in same way like left, top, and bottom overlays.
73559
73527
  this.topInlineStartCornerOverlay = new _overlay.TopInlineStartCornerOverlay(...args, this.topOverlay, this.inlineStartOverlay);
73560
73528
  this.bottomInlineStartCornerOverlay = new _overlay.BottomInlineStartCornerOverlay(...args, this.bottomOverlay, this.inlineStartOverlay);
73561
73529
  _classPrivateFieldSet(_overlays, this, [this.topOverlay, this.bottomOverlay, this.inlineStartOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay]);
@@ -73564,48 +73532,20 @@ class Overlays {
73564
73532
  /**
73565
73533
  * Runs logic for the overlays before the table is drawn.
73566
73534
  */
73567
- beforeDraw() {
73568
- _classPrivateFieldSet(_hasRenderingStateChanged, this, _classPrivateFieldGet(_overlays, this).reduce((acc, overlay) => {
73569
- return overlay.hasRenderingStateChanged() || acc;
73570
- }, false));
73571
- _classPrivateFieldGet(_overlays, this).forEach(overlay => overlay.updateStateOfRendering('before'));
73572
- }
73535
+ beforeDraw() {}
73573
73536
 
73574
73537
  /**
73575
73538
  * Runs logic for the overlays after the table is drawn.
73576
73539
  */
73577
- afterDraw() {
73578
- this.syncScrollWithMaster();
73579
- _classPrivateFieldGet(_overlays, this).forEach(overlay => {
73580
- const hasRenderingStateChanged = overlay.hasRenderingStateChanged();
73581
- overlay.updateStateOfRendering('after');
73582
- if (hasRenderingStateChanged && !overlay.needFullRender) {
73583
- overlay.reset();
73584
- }
73585
- });
73586
- }
73540
+ afterDraw() {}
73587
73541
 
73588
73542
  /**
73589
73543
  * Refresh and redraw table.
73590
73544
  */
73591
- refreshAll() {
73592
- if (!this.wot.drawn) {
73593
- return;
73594
- }
73595
- if (!this.wtTable.holder.parentNode) {
73596
- // Walkontable was detached from DOM, but this handler was not removed
73597
- this.destroy();
73598
- return;
73599
- }
73600
- this.wot.draw(true);
73601
- if (this.verticalScrolling) {
73602
- this.inlineStartOverlay.onScroll(); // todo the inlineStartOverlay.onScroll() fires hook. Why is it needed there, not in any another place?
73603
- }
73604
- if (this.horizontalScrolling) {
73605
- this.topOverlay.onScroll();
73606
- }
73607
- this.verticalScrolling = false;
73608
- this.horizontalScrolling = false;
73545
+ draw(fastDraw) {
73546
+ (0, _array.arrayEach)(_classPrivateFieldGet(_overlays, this), overlay => {
73547
+ overlay.adjustRootElementSize();
73548
+ });
73609
73549
  }
73610
73550
 
73611
73551
  /**
@@ -73613,39 +73553,22 @@ class Overlays {
73613
73553
  */
73614
73554
  registerListeners() {
73615
73555
  const {
73616
- rootDocument,
73617
73556
  rootWindow
73618
73557
  } = this.domBindings;
73619
- const {
73620
- mainTableScrollableElement: topOverlayScrollableElement
73621
- } = this.topOverlay;
73622
- const {
73623
- mainTableScrollableElement: inlineStartOverlayScrollableElement
73624
- } = this.inlineStartOverlay;
73625
- this.eventManager.addEventListener(rootDocument.documentElement, 'keydown', event => this.onKeyDown(event));
73626
- this.eventManager.addEventListener(rootDocument.documentElement, 'keyup', () => this.onKeyUp());
73627
- this.eventManager.addEventListener(rootDocument, 'visibilitychange', () => this.onKeyUp());
73628
- this.eventManager.addEventListener(topOverlayScrollableElement, 'scroll', event => this.onTableScroll(event), {
73629
- passive: true
73630
- });
73631
- if (topOverlayScrollableElement !== inlineStartOverlayScrollableElement) {
73632
- this.eventManager.addEventListener(inlineStartOverlayScrollableElement, 'scroll', event => this.onTableScroll(event), {
73633
- passive: true
73634
- });
73635
- }
73636
73558
  const isHighPixelRatio = rootWindow.devicePixelRatio && rootWindow.devicePixelRatio > 1;
73637
73559
  const isScrollOnWindow = this.scrollableElement === rootWindow;
73638
73560
  const preventWheel = this.wtSettings.getSetting('preventWheel');
73639
73561
  const wheelEventOptions = {
73640
73562
  passive: isScrollOnWindow
73641
73563
  };
73564
+ this.eventManager.addEventListener(this.scrollableElement, 'scroll', event => {
73565
+ this.wot.draw(true);
73566
+ }, {
73567
+ passive: true
73568
+ });
73642
73569
  if (preventWheel || isHighPixelRatio || !(0, _browser.isChrome)()) {
73643
73570
  this.eventManager.addEventListener(this.wtTable.wtRootElement, 'wheel', event => this.onCloneWheel(event, preventWheel), wheelEventOptions);
73644
73571
  }
73645
- const overlays = [this.topOverlay, this.bottomOverlay, this.inlineStartOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay];
73646
- overlays.forEach(overlay => {
73647
- this.eventManager.addEventListener(overlay.clone.wtTable.holder, 'wheel', event => this.onCloneWheel(event, preventWheel), wheelEventOptions);
73648
- });
73649
73572
  let resizeTimeout;
73650
73573
  this.eventManager.addEventListener(rootWindow, 'resize', () => {
73651
73574
  (0, _feature.requestAnimationFrame)(() => {
@@ -73662,29 +73585,6 @@ class Overlays {
73662
73585
  }
73663
73586
  }
73664
73587
 
73665
- /**
73666
- * Scroll listener.
73667
- *
73668
- * @param {Event} event The mouse event object.
73669
- */
73670
- onTableScroll(event) {
73671
- // There was if statement which controlled flow of this function. It avoided the execution of the next lines
73672
- // on mobile devices. It was changed. Broader description of this case is included within issue #4856.
73673
- const rootWindow = this.domBindings.rootWindow;
73674
- const masterHorizontal = this.inlineStartOverlay.mainTableScrollableElement;
73675
- const masterVertical = this.topOverlay.mainTableScrollableElement;
73676
- const target = event.target;
73677
-
73678
- // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered
73679
- // by hot.refreshBorder
73680
- if (this.keyPressed) {
73681
- if (masterVertical !== rootWindow && target !== rootWindow && !event.target.contains(masterVertical) || masterHorizontal !== rootWindow && target !== rootWindow && !event.target.contains(masterHorizontal)) {
73682
- return;
73683
- }
73684
- }
73685
- this.syncScrollPositions(event);
73686
- }
73687
-
73688
73588
  /**
73689
73589
  * Wheel listener for cloned overlays.
73690
73590
  *
@@ -73695,43 +73595,12 @@ class Overlays {
73695
73595
  const {
73696
73596
  rootWindow
73697
73597
  } = this.domBindings;
73698
-
73699
- // There was if statement which controlled flow of this function. It avoided the execution of the next lines
73700
- // on mobile devices. It was changed. Broader description of this case is included within issue #4856.
73701
-
73702
- const masterHorizontal = this.inlineStartOverlay.mainTableScrollableElement;
73703
- const masterVertical = this.topOverlay.mainTableScrollableElement;
73704
- const target = event.target;
73705
-
73706
- // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered
73707
- // by hot.refreshBorder
73708
- const shouldNotWheelVertically = masterVertical !== rootWindow && target !== rootWindow && !target.contains(masterVertical);
73709
- const shouldNotWheelHorizontally = masterHorizontal !== rootWindow && target !== rootWindow && !target.contains(masterHorizontal);
73710
- if (this.keyPressed && (shouldNotWheelVertically || shouldNotWheelHorizontally) || this.scrollableElement === rootWindow) {
73711
- return;
73712
- }
73713
73598
  const isScrollPossible = this.translateMouseWheelToScroll(event);
73714
73599
  if (preventDefault || this.scrollableElement !== rootWindow && isScrollPossible) {
73715
73600
  event.preventDefault();
73716
73601
  }
73717
73602
  }
73718
73603
 
73719
- /**
73720
- * Key down listener.
73721
- *
73722
- * @param {Event} event The keyboard event object.
73723
- */
73724
- onKeyDown(event) {
73725
- this.keyPressed = (0, _unicode.isKey)(event.keyCode, 'ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT');
73726
- }
73727
-
73728
- /**
73729
- * Key up listener.
73730
- */
73731
- onKeyUp() {
73732
- this.keyPressed = false;
73733
- }
73734
-
73735
73604
  /**
73736
73605
  * Translate wheel event into scroll event and sync scroll overlays position.
73737
73606
  *
@@ -73774,130 +73643,6 @@ class Overlays {
73774
73643
  this.scrollableElement.scrollLeft += delta;
73775
73644
  return previousScroll !== this.scrollableElement.scrollLeft;
73776
73645
  }
73777
-
73778
- /**
73779
- * Synchronize scroll position between master table and overlay table.
73780
- *
73781
- * @private
73782
- */
73783
- syncScrollPositions() {
73784
- if (this.destroyed) {
73785
- return;
73786
- }
73787
- const {
73788
- rootWindow
73789
- } = this.domBindings;
73790
- const topHolder = this.topOverlay.clone.wtTable.holder; // todo rethink
73791
- const leftHolder = this.inlineStartOverlay.clone.wtTable.holder; // todo rethink
73792
-
73793
- const [scrollLeft, scrollTop] = [this.scrollableElement.scrollLeft, this.scrollableElement.scrollTop];
73794
- this.horizontalScrolling = topHolder.scrollLeft !== scrollLeft || this.lastScrollX !== rootWindow.scrollX;
73795
- this.verticalScrolling = leftHolder.scrollTop !== scrollTop || this.lastScrollY !== rootWindow.scrollY;
73796
- this.lastScrollX = rootWindow.scrollX;
73797
- this.lastScrollY = rootWindow.scrollY;
73798
- if (this.horizontalScrolling) {
73799
- topHolder.scrollLeft = scrollLeft;
73800
- const bottomHolder = this.bottomOverlay.needFullRender ? this.bottomOverlay.clone.wtTable.holder : null; // todo rethink
73801
-
73802
- if (bottomHolder) {
73803
- bottomHolder.scrollLeft = scrollLeft;
73804
- }
73805
- }
73806
- if (this.verticalScrolling) {
73807
- leftHolder.scrollTop = scrollTop;
73808
- }
73809
- this.refreshAll();
73810
- }
73811
-
73812
- /**
73813
- * Synchronize overlay scrollbars with the master scrollbar.
73814
- */
73815
- syncScrollWithMaster() {
73816
- if (!_classPrivateFieldGet(_hasRenderingStateChanged, this)) {
73817
- return;
73818
- }
73819
- const master = this.topOverlay.mainTableScrollableElement;
73820
- const {
73821
- scrollLeft,
73822
- scrollTop
73823
- } = master;
73824
- if (this.topOverlay.needFullRender) {
73825
- this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()
73826
- }
73827
- if (this.bottomOverlay.needFullRender) {
73828
- this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()
73829
- }
73830
- if (this.inlineStartOverlay.needFullRender) {
73831
- this.inlineStartOverlay.clone.wtTable.holder.scrollTop = scrollTop; // todo rethink, *overlay.setScroll*()
73832
- }
73833
- _classPrivateFieldSet(_hasRenderingStateChanged, this, false);
73834
- }
73835
-
73836
- /**
73837
- *
73838
- */
73839
- destroy() {
73840
- this.resizeObserver.disconnect();
73841
- this.eventManager.destroy();
73842
- // todo, probably all below `destroy` calls has no sense. To analyze
73843
- this.topOverlay.destroy();
73844
- if (this.bottomOverlay.clone) {
73845
- this.bottomOverlay.destroy();
73846
- }
73847
- this.inlineStartOverlay.destroy();
73848
- if (this.topInlineStartCornerOverlay) {
73849
- this.topInlineStartCornerOverlay.destroy();
73850
- }
73851
- if (this.bottomInlineStartCornerOverlay && this.bottomInlineStartCornerOverlay.clone) {
73852
- this.bottomInlineStartCornerOverlay.destroy();
73853
- }
73854
- this.destroyed = true;
73855
- }
73856
-
73857
- /**
73858
- * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering
73859
- * the data. It will only work if Table.draw() does not force
73860
- * rendering anyway.
73861
- */
73862
- refresh() {
73863
- let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
73864
- const wasSpreaderSizeUpdated = this.updateLastSpreaderSize();
73865
- if (wasSpreaderSizeUpdated) {
73866
- this.adjustElementsSize();
73867
- }
73868
- if (this.bottomOverlay.clone) {
73869
- this.bottomOverlay.refresh(fastDraw);
73870
- }
73871
- this.inlineStartOverlay.refresh(fastDraw);
73872
- this.topOverlay.refresh(fastDraw);
73873
- if (this.topInlineStartCornerOverlay) {
73874
- this.topInlineStartCornerOverlay.refresh(fastDraw);
73875
- }
73876
- if (this.bottomInlineStartCornerOverlay && this.bottomInlineStartCornerOverlay.clone) {
73877
- this.bottomInlineStartCornerOverlay.refresh(fastDraw);
73878
- }
73879
- }
73880
-
73881
- /**
73882
- * Update the last cached spreader size with the current size.
73883
- *
73884
- * @returns {boolean} `true` if the lastSpreaderSize cache was updated, `false` otherwise.
73885
- */
73886
- updateLastSpreaderSize() {
73887
- const spreader = this.wtTable.spreader;
73888
- const width = spreader.clientWidth;
73889
- const height = spreader.clientHeight;
73890
- const needsUpdating = width !== this.spreaderLastSize.width || height !== this.spreaderLastSize.height;
73891
- if (needsUpdating) {
73892
- this.spreaderLastSize.width = width;
73893
- this.spreaderLastSize.height = height;
73894
- }
73895
- return needsUpdating;
73896
- }
73897
-
73898
- /**
73899
- * Adjust overlays elements size and master table size.
73900
- */
73901
73646
  adjustElementsSize() {
73902
73647
  const {
73903
73648
  wtViewport
@@ -73917,99 +73662,44 @@ class Overlays {
73917
73662
  const proposedHiderWidth = headerRowSize + this.inlineStartOverlay.sumCellSizes(0, totalColumns);
73918
73663
  const hiderElement = wtTable.hider;
73919
73664
  const hiderStyle = hiderElement.style;
73920
- const isScrolledBeyondHiderHeight = () => {
73921
- return isWindowScrolled ? false : this.scrollableElement.scrollTop > Math.max(0, proposedHiderHeight - wtTable.holder.clientHeight);
73922
- };
73923
- const isScrolledBeyondHiderWidth = () => {
73924
- return isWindowScrolled ? false : this.scrollableElement.scrollLeft > Math.max(0, proposedHiderWidth - wtTable.holder.clientWidth);
73925
- };
73926
- const columnHeaderBorderCompensation = isScrolledBeyondHiderHeight() ? 1 : 0;
73927
- const rowHeaderBorderCompensation = isScrolledBeyondHiderWidth() ? 1 : 0;
73928
-
73929
- // If the elements are being adjusted after scrolling the table from the very beginning to the very end,
73930
- // we need to adjust the hider dimensions by the header border size. (https://github.com/handsontable/dev-handsontable/issues/1772)
73931
- hiderStyle.width = `${proposedHiderWidth + rowHeaderBorderCompensation}px`;
73932
- hiderStyle.height = `${proposedHiderHeight + columnHeaderBorderCompensation}px`;
73933
- this.topOverlay.adjustElementsSize();
73934
- this.inlineStartOverlay.adjustElementsSize();
73935
- this.bottomOverlay.adjustElementsSize();
73936
- }
73937
-
73938
- /**
73939
- * Expand the hider vertically element by the provided delta value.
73940
- *
73941
- * @param {number} heightDelta The delta value to expand the hider element by.
73942
- */
73943
- expandHiderVerticallyBy(heightDelta) {
73944
- const {
73945
- wtTable
73946
- } = this;
73947
- wtTable.hider.style.height = `${parseInt(wtTable.hider.style.height, 10) + heightDelta}px`;
73948
- }
73949
-
73950
- /**
73951
- * Expand the hider horizontally element by the provided delta value.
73952
- *
73953
- * @param {number} widthDelta The delta value to expand the hider element by.
73954
- */
73955
- expandHiderHorizontallyBy(widthDelta) {
73956
- const {
73957
- wtTable
73958
- } = this;
73959
- wtTable.hider.style.width = `${parseInt(wtTable.hider.style.width, 10) + widthDelta}px`;
73960
- }
73961
-
73962
- /**
73963
- *
73964
- */
73965
- applyToDOM() {
73966
- if (!this.wtTable.isVisible()) {
73967
- return;
73665
+ hiderStyle.width = `${proposedHiderWidth}px`;
73666
+ hiderStyle.height = `${proposedHiderHeight}px`;
73667
+ const styleProperty = this.wtSettings.getSetting('rtlMode') ? 'right' : 'paddingLeft';
73668
+ if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {
73669
+ wtTable.spreader.style[styleProperty] = `${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;
73670
+ } else if (totalColumns === 0) {
73671
+ wtTable.spreader.style[styleProperty] = '0';
73672
+ } else {
73673
+ throw new Error('Incorrect value of the columnsRenderCalculator');
73968
73674
  }
73969
- this.topOverlay.applyToDOM();
73970
- if (this.bottomOverlay.clone) {
73971
- this.bottomOverlay.applyToDOM();
73675
+ if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {
73676
+ wtTable.spreader.style.paddingTop = `${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;
73677
+ } else if (totalRows === 0) {
73678
+ wtTable.spreader.style.paddingTop = '0';
73679
+ } else {
73680
+ throw new Error('Incorrect value of the rowsRenderCalculator');
73972
73681
  }
73973
- this.inlineStartOverlay.applyToDOM();
73974
73682
  }
73975
73683
 
73976
73684
  /**
73977
- * Get the parent overlay of the provided element.
73978
73685
  *
73979
- * @param {HTMLElement} element An element to process.
73980
- * @returns {object|null}
73981
73686
  */
73982
- getParentOverlay(element) {
73983
- if (!element) {
73984
- return null;
73687
+ destroy() {
73688
+ this.resizeObserver.disconnect();
73689
+ this.eventManager.destroy();
73690
+ // todo, probably all below `destroy` calls has no sense. To analyze
73691
+ this.topOverlay.destroy();
73692
+ if (this.bottomOverlay.clone) {
73693
+ this.bottomOverlay.destroy();
73985
73694
  }
73986
- const overlays = [this.topOverlay, this.inlineStartOverlay, this.bottomOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay];
73987
- let result = null;
73988
- (0, _array.arrayEach)(overlays, overlay => {
73989
- if (!overlay) {
73990
- return;
73991
- }
73992
- if (overlay.clone && overlay.clone.wtTable.TABLE.contains(element)) {
73993
- // todo demeter
73994
- result = overlay.clone;
73995
- }
73996
- });
73997
- return result;
73998
- }
73999
-
74000
- /**
74001
- * Synchronize the class names between the main overlay table and the tables on the other overlays.
74002
- *
74003
- */
74004
- syncOverlayTableClassNames() {
74005
- const masterTable = this.wtTable.TABLE;
74006
- const overlays = [this.topOverlay, this.inlineStartOverlay, this.bottomOverlay, this.topInlineStartCornerOverlay, this.bottomInlineStartCornerOverlay];
74007
- (0, _array.arrayEach)(overlays, elem => {
74008
- if (!elem) {
74009
- return;
74010
- }
74011
- elem.clone.wtTable.TABLE.className = masterTable.className; // todo demeter
74012
- });
73695
+ this.inlineStartOverlay.destroy();
73696
+ if (this.topInlineStartCornerOverlay) {
73697
+ this.topInlineStartCornerOverlay.destroy();
73698
+ }
73699
+ if (this.bottomInlineStartCornerOverlay && this.bottomInlineStartCornerOverlay.clone) {
73700
+ this.bottomInlineStartCornerOverlay.destroy();
73701
+ }
73702
+ this.destroyed = true;
74013
73703
  }
74014
73704
  }
74015
73705
  var _default = exports["default"] = Overlays;
@@ -74105,6 +73795,7 @@ class BottomInlineStartCornerOverlay extends _base.Overlay {
74105
73795
  shouldBeRendered() {
74106
73796
  return this.wtSettings.getSetting('shouldRenderBottomOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
74107
73797
  }
73798
+ draw() {}
74108
73799
 
74109
73800
  /**
74110
73801
  * Updates the corner overlay position.
@@ -74214,6 +73905,7 @@ __webpack_require__(201);
74214
73905
  __webpack_require__(283);
74215
73906
  __webpack_require__(311);
74216
73907
  __webpack_require__(329);
73908
+ __webpack_require__(338);
74217
73909
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(504));
74218
73910
  var _element = __webpack_require__(351);
74219
73911
  var _function = __webpack_require__(497);
@@ -74227,7 +73919,6 @@ var _a11y = __webpack_require__(496);
74227
73919
  /**
74228
73920
  * @todo These mixes are never added to the class Table, however their members are used here.
74229
73921
  * @todo Continue: Potentially it works only, because some of these mixes are added to every inherited class.
74230
- * @todo Refactoring, move code from `if(this.isMaster)` into MasterTable, and others like that.
74231
73922
  * @mixes stickyColumnsStart
74232
73923
  * @mixes stickyRowsBottom
74233
73924
  * @mixes stickyRowsTop
@@ -74284,7 +73975,6 @@ class Table {
74284
73975
  *
74285
73976
  * @type {boolean}
74286
73977
  */
74287
- this.isMaster = name === 'master';
74288
73978
  this.name = name;
74289
73979
  this.dataAccessObject = dataAccessObject;
74290
73980
  this.facadeGetter = facadeGetter;
@@ -74301,9 +73991,7 @@ class Table {
74301
73991
  this.hider = this.createHider(this.spreader);
74302
73992
  this.holder = this.createHolder(this.hider);
74303
73993
  this.wtRootElement = this.holder.parentNode;
74304
- if (this.isMaster) {
74305
- this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
74306
- }
73994
+ this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
74307
73995
  this.fixTableDomTree();
74308
73996
  this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
74309
73997
  this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
@@ -74323,7 +74011,31 @@ class Table {
74323
74011
  TBODY: this.TBODY,
74324
74012
  rowUtils: this.rowUtils,
74325
74013
  columnUtils: this.columnUtils,
74326
- cellRenderer: this.wtSettings.getSettingPure('cellRenderer'),
74014
+ cellRenderer: (row, column, TD) => {
74015
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
74016
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
74017
+ this.wtSettings.getSettingPure('cellRenderer')(row, column, TD);
74018
+ if (column < fixedColumnsStart) {
74019
+ const left = this.dataAccessObject.wtViewport.getRowHeaderWidth() + this.dataAccessObject.wtOverlays.inlineStartOverlay.sumCellSizes(0, column);
74020
+ TD.style.position = 'sticky';
74021
+ TD.style.left = `${left}px`;
74022
+ if (row < fixedRowsTop) {
74023
+ TD.style.zIndex = '9';
74024
+ } else {
74025
+ TD.style.zIndex = '5';
74026
+ }
74027
+ }
74028
+ if (row < fixedRowsTop) {
74029
+ const top = this.dataAccessObject.wtViewport.getColumnHeaderHeight() + this.dataAccessObject.wtOverlays.topOverlay.sumCellSizes(0, row);
74030
+ TD.style.position = 'sticky';
74031
+ TD.style.top = `${top}px`;
74032
+ if (column < fixedColumnsStart) {
74033
+ TD.style.zIndex = '10';
74034
+ } else {
74035
+ TD.style.zIndex = '6';
74036
+ }
74037
+ }
74038
+ },
74327
74039
  stylesHandler: this.dataAccessObject.stylesHandler
74328
74040
  });
74329
74041
  }
@@ -74423,12 +74135,10 @@ class Table {
74423
74135
  // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it
74424
74136
  parent.insertBefore(holder, hider);
74425
74137
  }
74426
- if (this.isMaster) {
74427
- holder.parentNode.className += 'ht_master handsontable';
74428
- holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
74429
- if (this.wtSettings.getSetting('ariaTags')) {
74430
- (0, _element.setAttribute)(holder.parentNode, [(0, _a11y.A11Y_PRESENTATION)()]);
74431
- }
74138
+ holder.parentNode.className += 'ht_master handsontable';
74139
+ holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
74140
+ if (this.wtSettings.getSetting('ariaTags')) {
74141
+ (0, _element.setAttribute)(holder.parentNode, [(0, _a11y.A11Y_PRESENTATION)()]);
74432
74142
  }
74433
74143
  holder.appendChild(hider);
74434
74144
  }
@@ -74456,100 +74166,89 @@ class Table {
74456
74166
  } = this.dataAccessObject;
74457
74167
  const totalRows = wtSettings.getSetting('totalRows');
74458
74168
  const totalColumns = wtSettings.getSetting('totalColumns');
74459
- const rowHeaders = wtSettings.getSetting('rowHeaders');
74169
+ const rowHeaders = wtSettings.getSetting('rowHeaders').map(origRowRenderer => {
74170
+ return (row, TH, column) => {
74171
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
74172
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
74173
+ if (row < fixedRowsTop) {
74174
+ let top = 0;
74175
+ if (row >= 0) {
74176
+ top = this.dataAccessObject.wtViewport.getColumnHeaderHeight() + this.dataAccessObject.wtOverlays.topOverlay.sumCellSizes(0, row);
74177
+ }
74178
+ TH.style.top = `${top}px`;
74179
+ if (column < fixedColumnsStart) {
74180
+ TH.style.zIndex = '20';
74181
+ } else {
74182
+ TH.style.zIndex = '10';
74183
+ }
74184
+ } else {
74185
+ TH.style.top = '0px';
74186
+ TH.style.zIndex = '3';
74187
+ }
74188
+ origRowRenderer(row, TH, column);
74189
+ TH.style.position = 'sticky';
74190
+ TH.style.left = '0px';
74191
+ };
74192
+ });
74460
74193
  const rowHeadersCount = rowHeaders.length;
74461
- const columnHeaders = wtSettings.getSetting('columnHeaders');
74194
+ const columnHeaders = wtSettings.getSetting('columnHeaders').map(origColumnRenderer => {
74195
+ return (column, TH, row) => {
74196
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
74197
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
74198
+ if (column < fixedColumnsStart) {
74199
+ let left = 0;
74200
+ if (column >= 0) {
74201
+ left = this.dataAccessObject.wtViewport.getRowHeaderWidth() + this.dataAccessObject.wtOverlays.inlineStartOverlay.sumCellSizes(0, column);
74202
+ }
74203
+ TH.style.left = `${left}px`;
74204
+ if (row < fixedRowsTop) {
74205
+ TH.style.zIndex = '20';
74206
+ } else {
74207
+ TH.style.zIndex = '10';
74208
+ }
74209
+ } else {
74210
+ TH.style.zIndex = '3';
74211
+ TH.style.left = '0px';
74212
+ }
74213
+ origColumnRenderer(column, TH, row);
74214
+ TH.style.position = 'sticky';
74215
+ TH.style.top = '0px';
74216
+ };
74217
+ });
74462
74218
  const columnHeadersCount = columnHeaders.length;
74463
74219
  let runFastDraw = fastDraw;
74464
- if (this.isMaster) {
74465
- wtOverlays.beforeDraw();
74466
- this.holderOffset = (0, _element.offset)(this.holder);
74467
- runFastDraw = wtViewport.createCalculators(runFastDraw);
74468
- if (rowHeadersCount && !wtSettings.getSetting('fixedColumnsStart')) {
74469
- const leftScrollPos = wtOverlays.inlineStartOverlay.getScrollPosition();
74470
- const previousState = this.correctHeaderWidth;
74471
- this.correctHeaderWidth = leftScrollPos !== 0;
74472
- if (previousState !== this.correctHeaderWidth) {
74473
- runFastDraw = false;
74474
- }
74475
- }
74476
- }
74477
- if (runFastDraw) {
74478
- if (this.isMaster) {
74479
- wtOverlays.refresh(true);
74480
- }
74481
- } else {
74482
- if (this.isMaster) {
74483
- this.tableOffset = (0, _element.offset)(this.TABLE);
74484
- } else {
74485
- this.tableOffset = this.dataAccessObject.parentTableOffset;
74486
- }
74220
+ wtOverlays.beforeDraw();
74221
+ this.holderOffset = (0, _element.offset)(this.holder);
74222
+ runFastDraw = wtViewport.createCalculators(runFastDraw);
74223
+ if (!runFastDraw) {
74224
+ this.tableOffset = (0, _element.offset)(this.TABLE);
74487
74225
  const startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;
74488
74226
  const startColumn = totalColumns > 0 ? this.getFirstRenderedColumn() : 0;
74489
74227
  this.rowFilter = new _row.default(startRow, totalRows, columnHeadersCount);
74490
74228
  this.columnFilter = new _column.default(startColumn, totalColumns, rowHeadersCount);
74491
74229
  let performRedraw = true;
74492
-
74493
- // Only master table rendering can be skipped
74494
- if (this.isMaster) {
74495
- this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
74496
- const skipRender = {};
74497
- this.wtSettings.getSetting('beforeDraw', true, skipRender);
74498
- performRedraw = skipRender.skipRender !== true;
74499
- }
74230
+ this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
74231
+ const skipRender = {};
74232
+ this.wtSettings.getSetting('beforeDraw', true, skipRender);
74233
+ performRedraw = skipRender.skipRender !== true;
74500
74234
  if (performRedraw) {
74501
74235
  this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);
74502
- if (this.is(_overlay.CLONE_BOTTOM) || this.is(_overlay.CLONE_BOTTOM_INLINE_START_CORNER)) {
74503
- // do NOT render headers on the bottom or bottom-left corner overlay
74504
- this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);
74505
- }
74506
74236
  this.resetOversizedRows();
74507
74237
  this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(), this.getRenderedColumnsCount()).setFilters(this.rowFilter, this.columnFilter).render();
74508
- if (this.isMaster) {
74509
- this.markOversizedColumnHeaders();
74510
- }
74238
+ this.markOversizedColumnHeaders();
74511
74239
  this.adjustColumnHeaderHeights();
74512
- if (this.isMaster || this.is(_overlay.CLONE_BOTTOM)) {
74513
- this.markOversizedRows();
74514
- }
74515
- if (this.isMaster) {
74516
- if (!this.wtSettings.getSetting('externalRowCalculator')) {
74517
- wtViewport.createVisibleCalculators();
74518
- }
74519
- wtOverlays.refresh(false);
74520
- wtOverlays.applyToDOM();
74521
- this.wtSettings.getSetting('onDraw', true);
74522
- } else if (this.is(_overlay.CLONE_BOTTOM)) {
74523
- this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize();
74240
+ this.markOversizedRows();
74241
+ if (!this.wtSettings.getSetting('externalRowCalculator')) {
74242
+ wtViewport.createVisibleCalculators();
74524
74243
  }
74244
+ wtOverlays.adjustElementsSize();
74245
+ // wtOverlays.draw(fastDraw);
74246
+
74247
+ this.wtSettings.getSetting('onDraw', true);
74525
74248
  }
74526
74249
  }
74527
- let positionChanged = false;
74528
- if (this.isMaster) {
74529
- positionChanged = wtOverlays.topOverlay.resetFixedPosition();
74530
- if (wtOverlays.bottomOverlay.clone) {
74531
- positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
74532
- }
74533
- positionChanged = wtOverlays.inlineStartOverlay.resetFixedPosition() || positionChanged;
74534
- if (wtOverlays.topInlineStartCornerOverlay) {
74535
- wtOverlays.topInlineStartCornerOverlay.resetFixedPosition();
74536
- }
74537
- if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
74538
- wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
74539
- }
74540
- }
74541
- if (positionChanged) {
74542
- // It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
74543
- // remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
74544
- // when there is a switch between rendering from 0 to N rows/columns and vice versa).
74545
- wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
74546
- wtOverlays.adjustElementsSize();
74547
- } else {
74548
- this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
74549
- }
74550
- if (this.isMaster) {
74551
- wtOverlays.afterDraw();
74552
- }
74250
+ this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
74251
+ wtOverlays.afterDraw();
74553
74252
  this.dataAccessObject.drawn = true;
74554
74253
  return this;
74555
74254
  }
@@ -74621,9 +74320,6 @@ class Table {
74621
74320
  const {
74622
74321
  wtViewport
74623
74322
  } = this.dataAccessObject;
74624
- if (!this.isMaster && !this.is(_overlay.CLONE_BOTTOM)) {
74625
- return;
74626
- }
74627
74323
  if (!wtSettings.getSetting('externalRowCalculator')) {
74628
74324
  const rowsToRender = this.getRenderedRowsCount();
74629
74325
 
@@ -74659,7 +74355,7 @@ class Table {
74659
74355
  getCell(coords) {
74660
74356
  let row = coords.row;
74661
74357
  let column = coords.col;
74662
- const hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column, !this.isMaster, 'render');
74358
+ const hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column, false, 'render');
74663
74359
  if (hookResult && Array.isArray(hookResult)) {
74664
74360
  [row, column] = hookResult;
74665
74361
  }
@@ -77768,33 +77464,14 @@ class Overlay {
77768
77464
  this.wtRootElement = wtRootElement;
77769
77465
  this.trimmingContainer = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
77770
77466
  this.needFullRender = this.shouldBeRendered();
77771
- this.clone = this.makeClone();
77772
- }
77773
-
77774
- /**
77775
- * Checks if the overlay rendering state has changed.
77776
- *
77777
- * @returns {boolean}
77778
- */
77779
- hasRenderingStateChanged() {
77780
- return this.needFullRender !== this.shouldBeRendered();
77781
- }
77782
-
77783
- /**
77784
- * Updates internal state with an information about the need of full rendering of the overlay in the next draw cycles.
77785
- *
77786
- * If the state is changed to render the overlay, the `needFullRender` property is set to `true` which means that
77787
- * the overlay will be fully rendered in the current draw cycle. If the state is changed to not render the overlay,
77788
- * the `needFullRender` property is set to `false` which means that the overlay will be fully rendered in the
77789
- * current draw cycle but it will not be rendered in the next draw cycles.
77790
- *
77791
- * @param {'before' | 'after'} drawPhase The phase of the rendering process.
77792
- */
77793
- updateStateOfRendering(drawPhase) {
77794
- if (drawPhase === 'before' && this.shouldBeRendered()) {
77795
- this.needFullRender = true;
77796
- } else if (drawPhase === 'after' && !this.shouldBeRendered()) {
77797
- this.needFullRender = false;
77467
+ const preventOverflow = this.wtSettings.getSetting('preventOverflow');
77468
+ const tableParent = this.wot.wtTable.wtRootElement.parentNode;
77469
+ if (preventOverflow === true || preventOverflow === 'horizontal' && this.type === _constants.CLONE_TOP || preventOverflow === 'vertical' && this.type === _constants.CLONE_INLINE_START) {
77470
+ this.mainTableScrollableElement = domBindings.rootWindow;
77471
+ } else if (domBindings.rootWindow.getComputedStyle(tableParent).getPropertyValue('overflow') === 'hidden') {
77472
+ this.mainTableScrollableElement = holder;
77473
+ } else {
77474
+ this.mainTableScrollableElement = (0, _element.getScrollableElement)(TABLE);
77798
77475
  }
77799
77476
  }
77800
77477
 
@@ -77814,23 +77491,6 @@ class Overlay {
77814
77491
  this.trimmingContainer = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
77815
77492
  }
77816
77493
 
77817
- /**
77818
- * Update the main scrollable element.
77819
- */
77820
- updateMainScrollableElement() {
77821
- const {
77822
- wtTable
77823
- } = this.wot;
77824
- const {
77825
- rootWindow
77826
- } = this.domBindings;
77827
- if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {
77828
- this.mainTableScrollableElement = this.wot.wtTable.holder;
77829
- } else {
77830
- this.mainTableScrollableElement = (0, _element.getScrollableElement)(wtTable.TABLE);
77831
- }
77832
- }
77833
-
77834
77494
  /**
77835
77495
  * Calculates coordinates of the provided element, relative to the root Handsontable element.
77836
77496
  * NOTE: The element needs to be a child of the overlay in order for the method to work correctly.
@@ -78277,25 +77937,6 @@ class CoreAbstract {
78277
77937
  if (!topmost) {
78278
77938
  return this.wtTable.getCell(coords);
78279
77939
  }
78280
- const totalRows = this.wtSettings.getSetting('totalRows');
78281
- const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
78282
- const fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
78283
- const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
78284
- if (coords.row < fixedRowsTop && coords.col < fixedColumnsStart) {
78285
- return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(coords);
78286
- } else if (coords.row < fixedRowsTop) {
78287
- return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);
78288
- } else if (coords.col < fixedColumnsStart && coords.row >= totalRows - fixedRowsBottom) {
78289
- if (this.wtOverlays.bottomInlineStartCornerOverlay && this.wtOverlays.bottomInlineStartCornerOverlay.clone) {
78290
- return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(coords);
78291
- }
78292
- } else if (coords.col < fixedColumnsStart) {
78293
- return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(coords);
78294
- } else if (coords.row < totalRows && coords.row >= totalRows - fixedRowsBottom) {
78295
- if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {
78296
- return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);
78297
- }
78298
- }
78299
77940
  return this.wtTable.getCell(coords);
78300
77941
  }
78301
77942
 
@@ -78870,6 +78511,7 @@ class BottomOverlay extends _base.Overlay {
78870
78511
  shouldBeRendered() {
78871
78512
  return this.wtSettings.getSetting('shouldRenderBottomOverlay');
78872
78513
  }
78514
+ draw() {}
78873
78515
 
78874
78516
  /**
78875
78517
  * Updates the top overlay position.
@@ -79380,6 +79022,7 @@ class InlineStartOverlay extends _base.Overlay {
79380
79022
  shouldBeRendered() {
79381
79023
  return this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
79382
79024
  }
79025
+ draw() {}
79383
79026
 
79384
79027
  /**
79385
79028
  * Updates the left overlay position.
@@ -81512,6 +81155,7 @@ class TopInlineStartCornerOverlay extends _base.Overlay {
81512
81155
  shouldBeRendered() {
81513
81156
  return this.wtSettings.getSetting('shouldRenderTopOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
81514
81157
  }
81158
+ draw() {}
81515
81159
 
81516
81160
  /**
81517
81161
  * Updates the corner overlay position.
@@ -81758,6 +81402,7 @@ class TopOverlay extends _base.Overlay {
81758
81402
  shouldBeRendered() {
81759
81403
  return this.wtSettings.getSetting('shouldRenderTopOverlay');
81760
81404
  }
81405
+ draw() {}
81761
81406
 
81762
81407
  /**
81763
81408
  * Updates the top overlay position.
@@ -98310,7 +97955,6 @@ class BaseEditor {
98310
97955
  * @returns {{top: number, start: number, width: number, maxWidth: number, height: number, maxHeight: number} | undefined}
98311
97956
  */
98312
97957
  getEditedCellRect() {
98313
- var _wtOverlays$getParent;
98314
97958
  const TD = this.getEditedCell();
98315
97959
 
98316
97960
  // TD is outside of the viewport.
@@ -98333,7 +97977,7 @@ class BaseEditor {
98333
97977
  const gridMostRightPos = rootWindow.innerWidth - containerOffset.left - containerWidth;
98334
97978
  const {
98335
97979
  wtTable: overlayTable
98336
- } = (_wtOverlays$getParent = wtOverlays.getParentOverlay(TD)) !== null && _wtOverlays$getParent !== void 0 ? _wtOverlays$getParent : this.hot.view._wt;
97980
+ } = this.hot.view._wt;
98337
97981
  const overlayName = overlayTable.name;
98338
97982
  const scrollTop = ['master', 'inline_start'].includes(overlayName) ? containerScrollTop : 0;
98339
97983
  const scrollLeft = ['master', 'top', 'bottom'].includes(overlayName) ? containerScrollLeft : 0;
@@ -126228,7 +125872,7 @@ function _setupListening(event) {
126228
125872
  if ((0, _event.isRightClick)(event)) {
126229
125873
  return;
126230
125874
  }
126231
- const scrollHandler = this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;
125875
+ const scrollHandler = this.hot.view._wt.wtOverlays.scrollableElement;
126232
125876
  this.setBoundaries(scrollHandler !== this.hot.rootWindow ? scrollHandler.getBoundingClientRect() : undefined);
126233
125877
  this.setCallback((scrollX, scrollY) => {
126234
125878
  var _scrollHandler$scroll, _scrollHandler$scroll2;