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
@@ -145,25 +145,6 @@ class CoreAbstract {
145
145
  if (!topmost) {
146
146
  return this.wtTable.getCell(coords);
147
147
  }
148
- const totalRows = this.wtSettings.getSetting('totalRows');
149
- const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
150
- const fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
151
- const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
152
- if (coords.row < fixedRowsTop && coords.col < fixedColumnsStart) {
153
- return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(coords);
154
- } else if (coords.row < fixedRowsTop) {
155
- return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);
156
- } else if (coords.col < fixedColumnsStart && coords.row >= totalRows - fixedRowsBottom) {
157
- if (this.wtOverlays.bottomInlineStartCornerOverlay && this.wtOverlays.bottomInlineStartCornerOverlay.clone) {
158
- return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(coords);
159
- }
160
- } else if (coords.col < fixedColumnsStart) {
161
- return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(coords);
162
- } else if (coords.row < totalRows && coords.row >= totalRows - fixedRowsBottom) {
163
- if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {
164
- return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);
165
- }
166
- }
167
148
  return this.wtTable.getCell(coords);
168
149
  }
169
150
 
@@ -141,25 +141,6 @@ export default class CoreAbstract {
141
141
  if (!topmost) {
142
142
  return this.wtTable.getCell(coords);
143
143
  }
144
- const totalRows = this.wtSettings.getSetting('totalRows');
145
- const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
146
- const fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
147
- const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
148
- if (coords.row < fixedRowsTop && coords.col < fixedColumnsStart) {
149
- return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(coords);
150
- } else if (coords.row < fixedRowsTop) {
151
- return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);
152
- } else if (coords.col < fixedColumnsStart && coords.row >= totalRows - fixedRowsBottom) {
153
- if (this.wtOverlays.bottomInlineStartCornerOverlay && this.wtOverlays.bottomInlineStartCornerOverlay.clone) {
154
- return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(coords);
155
- }
156
- } else if (coords.col < fixedColumnsStart) {
157
- return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(coords);
158
- } else if (coords.row < totalRows && coords.row >= totalRows - fixedRowsBottom) {
159
- if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {
160
- return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);
161
- }
162
- }
163
144
  return this.wtTable.getCell(coords);
164
145
  }
165
146
 
@@ -63,33 +63,14 @@ class Overlay {
63
63
  this.wtRootElement = wtRootElement;
64
64
  this.trimmingContainer = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
65
65
  this.needFullRender = this.shouldBeRendered();
66
- this.clone = this.makeClone();
67
- }
68
-
69
- /**
70
- * Checks if the overlay rendering state has changed.
71
- *
72
- * @returns {boolean}
73
- */
74
- hasRenderingStateChanged() {
75
- return this.needFullRender !== this.shouldBeRendered();
76
- }
77
-
78
- /**
79
- * Updates internal state with an information about the need of full rendering of the overlay in the next draw cycles.
80
- *
81
- * If the state is changed to render the overlay, the `needFullRender` property is set to `true` which means that
82
- * the overlay will be fully rendered in the current draw cycle. If the state is changed to not render the overlay,
83
- * the `needFullRender` property is set to `false` which means that the overlay will be fully rendered in the
84
- * current draw cycle but it will not be rendered in the next draw cycles.
85
- *
86
- * @param {'before' | 'after'} drawPhase The phase of the rendering process.
87
- */
88
- updateStateOfRendering(drawPhase) {
89
- if (drawPhase === 'before' && this.shouldBeRendered()) {
90
- this.needFullRender = true;
91
- } else if (drawPhase === 'after' && !this.shouldBeRendered()) {
92
- this.needFullRender = false;
66
+ const preventOverflow = this.wtSettings.getSetting('preventOverflow');
67
+ const tableParent = this.wot.wtTable.wtRootElement.parentNode;
68
+ if (preventOverflow === true || preventOverflow === 'horizontal' && this.type === _constants.CLONE_TOP || preventOverflow === 'vertical' && this.type === _constants.CLONE_INLINE_START) {
69
+ this.mainTableScrollableElement = domBindings.rootWindow;
70
+ } else if (domBindings.rootWindow.getComputedStyle(tableParent).getPropertyValue('overflow') === 'hidden') {
71
+ this.mainTableScrollableElement = holder;
72
+ } else {
73
+ this.mainTableScrollableElement = (0, _element.getScrollableElement)(TABLE);
93
74
  }
94
75
  }
95
76
 
@@ -109,23 +90,6 @@ class Overlay {
109
90
  this.trimmingContainer = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
110
91
  }
111
92
 
112
- /**
113
- * Update the main scrollable element.
114
- */
115
- updateMainScrollableElement() {
116
- const {
117
- wtTable
118
- } = this.wot;
119
- const {
120
- rootWindow
121
- } = this.domBindings;
122
- if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {
123
- this.mainTableScrollableElement = this.wot.wtTable.holder;
124
- } else {
125
- this.mainTableScrollableElement = (0, _element.getScrollableElement)(wtTable.TABLE);
126
- }
127
- }
128
-
129
93
  /**
130
94
  * Calculates coordinates of the provided element, relative to the root Handsontable element.
131
95
  * NOTE: The element needs to be a child of the overlay in order for the method to work correctly.
@@ -59,33 +59,14 @@ export class Overlay {
59
59
  this.wtRootElement = wtRootElement;
60
60
  this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);
61
61
  this.needFullRender = this.shouldBeRendered();
62
- this.clone = this.makeClone();
63
- }
64
-
65
- /**
66
- * Checks if the overlay rendering state has changed.
67
- *
68
- * @returns {boolean}
69
- */
70
- hasRenderingStateChanged() {
71
- return this.needFullRender !== this.shouldBeRendered();
72
- }
73
-
74
- /**
75
- * Updates internal state with an information about the need of full rendering of the overlay in the next draw cycles.
76
- *
77
- * If the state is changed to render the overlay, the `needFullRender` property is set to `true` which means that
78
- * the overlay will be fully rendered in the current draw cycle. If the state is changed to not render the overlay,
79
- * the `needFullRender` property is set to `false` which means that the overlay will be fully rendered in the
80
- * current draw cycle but it will not be rendered in the next draw cycles.
81
- *
82
- * @param {'before' | 'after'} drawPhase The phase of the rendering process.
83
- */
84
- updateStateOfRendering(drawPhase) {
85
- if (drawPhase === 'before' && this.shouldBeRendered()) {
86
- this.needFullRender = true;
87
- } else if (drawPhase === 'after' && !this.shouldBeRendered()) {
88
- this.needFullRender = false;
62
+ const preventOverflow = this.wtSettings.getSetting('preventOverflow');
63
+ const tableParent = this.wot.wtTable.wtRootElement.parentNode;
64
+ if (preventOverflow === true || preventOverflow === 'horizontal' && this.type === CLONE_TOP || preventOverflow === 'vertical' && this.type === CLONE_INLINE_START) {
65
+ this.mainTableScrollableElement = domBindings.rootWindow;
66
+ } else if (domBindings.rootWindow.getComputedStyle(tableParent).getPropertyValue('overflow') === 'hidden') {
67
+ this.mainTableScrollableElement = holder;
68
+ } else {
69
+ this.mainTableScrollableElement = getScrollableElement(TABLE);
89
70
  }
90
71
  }
91
72
 
@@ -105,23 +86,6 @@ export class Overlay {
105
86
  this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);
106
87
  }
107
88
 
108
- /**
109
- * Update the main scrollable element.
110
- */
111
- updateMainScrollableElement() {
112
- const {
113
- wtTable
114
- } = this.wot;
115
- const {
116
- rootWindow
117
- } = this.domBindings;
118
- if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {
119
- this.mainTableScrollableElement = this.wot.wtTable.holder;
120
- } else {
121
- this.mainTableScrollableElement = getScrollableElement(wtTable.TABLE);
122
- }
123
- }
124
-
125
89
  /**
126
90
  * Calculates coordinates of the provided element, relative to the root Handsontable element.
127
91
  * NOTE: The element needs to be a child of the overlay in order for the method to work correctly.
@@ -54,6 +54,7 @@ class BottomOverlay extends _base.Overlay {
54
54
  shouldBeRendered() {
55
55
  return this.wtSettings.getSetting('shouldRenderBottomOverlay');
56
56
  }
57
+ draw() {}
57
58
 
58
59
  /**
59
60
  * Updates the top overlay position.
@@ -50,6 +50,7 @@ export class BottomOverlay extends Overlay {
50
50
  shouldBeRendered() {
51
51
  return this.wtSettings.getSetting('shouldRenderBottomOverlay');
52
52
  }
53
+ draw() {}
53
54
 
54
55
  /**
55
56
  * Updates the top overlay position.
@@ -46,6 +46,7 @@ class BottomInlineStartCornerOverlay extends _base.Overlay {
46
46
  shouldBeRendered() {
47
47
  return this.wtSettings.getSetting('shouldRenderBottomOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
48
48
  }
49
+ draw() {}
49
50
 
50
51
  /**
51
52
  * Updates the corner overlay position.
@@ -42,6 +42,7 @@ export class BottomInlineStartCornerOverlay extends Overlay {
42
42
  shouldBeRendered() {
43
43
  return this.wtSettings.getSetting('shouldRenderBottomOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
44
44
  }
45
+ draw() {}
45
46
 
46
47
  /**
47
48
  * Updates the corner overlay position.
@@ -44,6 +44,7 @@ class InlineStartOverlay extends _base.Overlay {
44
44
  shouldBeRendered() {
45
45
  return this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
46
46
  }
47
+ draw() {}
47
48
 
48
49
  /**
49
50
  * Updates the left overlay position.
@@ -40,6 +40,7 @@ export class InlineStartOverlay extends Overlay {
40
40
  shouldBeRendered() {
41
41
  return this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
42
42
  }
43
+ draw() {}
43
44
 
44
45
  /**
45
46
  * Updates the left overlay position.
@@ -55,6 +55,7 @@ class TopOverlay extends _base.Overlay {
55
55
  shouldBeRendered() {
56
56
  return this.wtSettings.getSetting('shouldRenderTopOverlay');
57
57
  }
58
+ draw() {}
58
59
 
59
60
  /**
60
61
  * Updates the top overlay position.
@@ -51,6 +51,7 @@ export class TopOverlay extends Overlay {
51
51
  shouldBeRendered() {
52
52
  return this.wtSettings.getSetting('shouldRenderTopOverlay');
53
53
  }
54
+ draw() {}
54
55
 
55
56
  /**
56
57
  * Updates the top overlay position.
@@ -62,6 +62,7 @@ class TopInlineStartCornerOverlay extends _base.Overlay {
62
62
  shouldBeRendered() {
63
63
  return this.wtSettings.getSetting('shouldRenderTopOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
64
64
  }
65
+ draw() {}
65
66
 
66
67
  /**
67
68
  * Updates the corner overlay position.
@@ -58,6 +58,7 @@ export class TopInlineStartCornerOverlay extends Overlay {
58
58
  shouldBeRendered() {
59
59
  return this.wtSettings.getSetting('shouldRenderTopOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
60
60
  }
61
+ draw() {}
61
62
 
62
63
  /**
63
64
  * Updates the corner overlay position.