handsontable 0.0.0-next-542a54e-20250121 → 0.0.0-next-8d1d868-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.
- package/3rdparty/walkontable/src/core/_base.js +19 -0
- package/3rdparty/walkontable/src/core/_base.mjs +19 -0
- package/3rdparty/walkontable/src/overlay/_base.js +44 -8
- package/3rdparty/walkontable/src/overlay/_base.mjs +44 -8
- package/3rdparty/walkontable/src/overlay/bottom.js +0 -1
- package/3rdparty/walkontable/src/overlay/bottom.mjs +0 -1
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +0 -1
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +0 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +0 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +0 -1
- package/3rdparty/walkontable/src/overlay/top.js +0 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +0 -1
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +0 -1
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +0 -1
- package/3rdparty/walkontable/src/overlays.js +355 -45
- package/3rdparty/walkontable/src/overlays.mjs +355 -45
- package/3rdparty/walkontable/src/table.js +94 -99
- package/3rdparty/walkontable/src/table.mjs +94 -99
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +20 -4
- package/dist/handsontable.full.css +20 -4
- package/dist/handsontable.full.js +522 -166
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +108 -108
- package/dist/handsontable.js +522 -166
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +15 -15
- package/editors/baseEditor/baseEditor.js +2 -1
- package/editors/baseEditor/baseEditor.mjs +2 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/dragToScroll/dragToScroll.js +1 -1
- package/plugins/dragToScroll/dragToScroll.mjs +1 -1
- package/styles/handsontable.css +7 -2
- 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 +2 -2
- package/tableView.mjs +2 -2
|
@@ -145,6 +145,25 @@ 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
|
+
}
|
|
148
167
|
return this.wtTable.getCell(coords);
|
|
149
168
|
}
|
|
150
169
|
|
|
@@ -141,6 +141,25 @@ 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
|
+
}
|
|
144
163
|
return this.wtTable.getCell(coords);
|
|
145
164
|
}
|
|
146
165
|
|
|
@@ -63,14 +63,33 @@ 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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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;
|
|
74
93
|
}
|
|
75
94
|
}
|
|
76
95
|
|
|
@@ -90,6 +109,23 @@ class Overlay {
|
|
|
90
109
|
this.trimmingContainer = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
|
|
91
110
|
}
|
|
92
111
|
|
|
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
|
+
|
|
93
129
|
/**
|
|
94
130
|
* Calculates coordinates of the provided element, relative to the root Handsontable element.
|
|
95
131
|
* NOTE: The element needs to be a child of the overlay in order for the method to work correctly.
|
|
@@ -59,14 +59,33 @@ export class Overlay {
|
|
|
59
59
|
this.wtRootElement = wtRootElement;
|
|
60
60
|
this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);
|
|
61
61
|
this.needFullRender = this.shouldBeRendered();
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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;
|
|
70
89
|
}
|
|
71
90
|
}
|
|
72
91
|
|
|
@@ -86,6 +105,23 @@ export class Overlay {
|
|
|
86
105
|
this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);
|
|
87
106
|
}
|
|
88
107
|
|
|
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
|
+
|
|
89
125
|
/**
|
|
90
126
|
* Calculates coordinates of the provided element, relative to the root Handsontable element.
|
|
91
127
|
* NOTE: The element needs to be a child of the overlay in order for the method to work correctly.
|
|
@@ -46,7 +46,6 @@ class BottomInlineStartCornerOverlay extends _base.Overlay {
|
|
|
46
46
|
shouldBeRendered() {
|
|
47
47
|
return this.wtSettings.getSetting('shouldRenderBottomOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
|
|
48
48
|
}
|
|
49
|
-
draw() {}
|
|
50
49
|
|
|
51
50
|
/**
|
|
52
51
|
* Updates the corner overlay position.
|
|
@@ -42,7 +42,6 @@ export class BottomInlineStartCornerOverlay extends Overlay {
|
|
|
42
42
|
shouldBeRendered() {
|
|
43
43
|
return this.wtSettings.getSetting('shouldRenderBottomOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
|
|
44
44
|
}
|
|
45
|
-
draw() {}
|
|
46
45
|
|
|
47
46
|
/**
|
|
48
47
|
* Updates the corner overlay position.
|
|
@@ -62,7 +62,6 @@ class TopInlineStartCornerOverlay extends _base.Overlay {
|
|
|
62
62
|
shouldBeRendered() {
|
|
63
63
|
return this.wtSettings.getSetting('shouldRenderTopOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
|
|
64
64
|
}
|
|
65
|
-
draw() {}
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
67
|
* Updates the corner overlay position.
|
|
@@ -58,7 +58,6 @@ export class TopInlineStartCornerOverlay extends Overlay {
|
|
|
58
58
|
shouldBeRendered() {
|
|
59
59
|
return this.wtSettings.getSetting('shouldRenderTopOverlay') && this.wtSettings.getSetting('shouldRenderInlineStartOverlay');
|
|
60
60
|
}
|
|
61
|
-
draw() {}
|
|
62
61
|
|
|
63
62
|
/**
|
|
64
63
|
* Updates the corner overlay position.
|