handsontable 0.0.0-next-29d7f5c-20241210 → 0.0.0-next-2580147-20241212
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +4 -6
- package/core.mjs +4 -6
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +123 -112
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +61 -61
- package/dist/handsontable.js +123 -112
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +12 -12
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/filters/conditionCollection.js +8 -7
- package/plugins/filters/conditionCollection.mjs +8 -7
- package/plugins/filters/utils.js +7 -24
- package/plugins/filters/utils.mjs +7 -24
- package/plugins/mergeCells/calculations/autofill.js +60 -44
- package/plugins/mergeCells/calculations/autofill.mjs +60 -44
- package/plugins/mergeCells/cellsCollection.js +25 -8
- package/plugins/mergeCells/cellsCollection.mjs +25 -8
- package/plugins/mergeCells/mergeCells.js +10 -14
- package/plugins/mergeCells/mergeCells.mjs +10 -14
- package/plugins/undoRedo/actions/filters.js +1 -3
- package/plugins/undoRedo/actions/filters.mjs +1 -3
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +1 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +1 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +2 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +2 -1
- package/styles/handsontable.css +5 -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
@@ -1,4 +1,6 @@
|
|
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.every.js";
|
2
4
|
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; }
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
6
|
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); }
|
@@ -35,35 +37,20 @@ class AutofillCalculations {
|
|
35
37
|
this.mergedCellsCollection = this.plugin.mergedCellsCollection;
|
36
38
|
}
|
37
39
|
|
38
|
-
/**
|
39
|
-
* Correct the provided selection area, so it's not selecting only a part of a merged cell.
|
40
|
-
*
|
41
|
-
* @param {Array} selectionArea The selection to correct.
|
42
|
-
*/
|
43
|
-
correctSelectionAreaSize(selectionArea) {
|
44
|
-
if (selectionArea[0] === selectionArea[2] && selectionArea[1] === selectionArea[3]) {
|
45
|
-
const mergedCell = this.mergedCellsCollection.get(selectionArea[0], selectionArea[1]);
|
46
|
-
if (mergedCell) {
|
47
|
-
selectionArea[2] = selectionArea[0] + mergedCell.rowspan - 1;
|
48
|
-
selectionArea[3] = selectionArea[1] + mergedCell.colspan - 1;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
40
|
/**
|
54
41
|
* Get the direction of the autofill process.
|
55
42
|
*
|
56
|
-
* @param {Array}
|
57
|
-
* @param {Array}
|
43
|
+
* @param {Array} baseArea The selection area.
|
44
|
+
* @param {Array} fullArea The final area (base + drag).
|
58
45
|
* @returns {string} `up`, `down`, `left` or `right`.
|
59
46
|
*/
|
60
|
-
getDirection(
|
47
|
+
getDirection(baseArea, fullArea) {
|
61
48
|
let direction = null;
|
62
|
-
if (
|
49
|
+
if (fullArea[0] === baseArea[0] && fullArea[1] === baseArea[1] && fullArea[3] === baseArea[3]) {
|
63
50
|
direction = 'down';
|
64
|
-
} else if (
|
51
|
+
} else if (fullArea[2] === baseArea[2] && fullArea[1] === baseArea[1] && fullArea[3] === baseArea[3]) {
|
65
52
|
direction = 'up';
|
66
|
-
} else if (
|
53
|
+
} else if (fullArea[1] === baseArea[1] && fullArea[2] === baseArea[2]) {
|
67
54
|
direction = 'right';
|
68
55
|
} else {
|
69
56
|
direction = 'left';
|
@@ -75,20 +62,20 @@ class AutofillCalculations {
|
|
75
62
|
* Snap the drag area to the farthest merged cell, so it won't clip any of the merged cells.
|
76
63
|
*
|
77
64
|
* @param {Array} baseArea The base selected area.
|
78
|
-
* @param {Array}
|
65
|
+
* @param {Array} fullArea The drag area.
|
79
66
|
* @param {string} dragDirection The autofill drag direction.
|
80
67
|
* @param {Array} foundMergedCells MergeCellCoords found in the base selection area.
|
81
68
|
* @returns {Array} The new drag area.
|
82
69
|
*/
|
83
|
-
snapDragArea(baseArea,
|
84
|
-
const newDragArea =
|
85
|
-
const fillSize = this.getAutofillSize(baseArea,
|
70
|
+
snapDragArea(baseArea, fullArea, dragDirection, foundMergedCells) {
|
71
|
+
const newDragArea = fullArea.slice(0);
|
72
|
+
const fillSize = this.getAutofillSize(baseArea, fullArea, dragDirection);
|
86
73
|
const [baseAreaStartRow, baseAreaStartColumn, baseAreaEndRow, baseAreaEndColumn] = baseArea;
|
87
74
|
const verticalDirection = ['up', 'down'].indexOf(dragDirection) > -1;
|
88
75
|
const fullCycle = verticalDirection ? baseAreaEndRow - baseAreaStartRow + 1 : baseAreaEndColumn - baseAreaStartColumn + 1;
|
89
76
|
const fulls = Math.floor(fillSize / fullCycle) * fullCycle;
|
90
77
|
const partials = fillSize - fulls;
|
91
|
-
const farthestCollection = this.getFarthestCollection(baseArea,
|
78
|
+
const farthestCollection = this.getFarthestCollection(baseArea, fullArea, dragDirection, foundMergedCells);
|
92
79
|
if (farthestCollection) {
|
93
80
|
if (dragDirection === 'down') {
|
94
81
|
const fill = farthestCollection.row + farthestCollection.rowspan - baseAreaStartRow - partials;
|
@@ -153,13 +140,13 @@ class AutofillCalculations {
|
|
153
140
|
*
|
154
141
|
* @private
|
155
142
|
* @param {Array} baseArea The base selection area.
|
156
|
-
* @param {Array}
|
143
|
+
* @param {Array} fullArea The drag area (containing the base area).
|
157
144
|
* @param {string} direction The drag direction.
|
158
145
|
* @returns {number|null} The "length" (height or width, depending on the direction) of the drag.
|
159
146
|
*/
|
160
|
-
getAutofillSize(baseArea,
|
147
|
+
getAutofillSize(baseArea, fullArea, direction) {
|
161
148
|
const [baseAreaStartRow, baseAreaStartColumn, baseAreaEndRow, baseAreaEndColumn] = baseArea;
|
162
|
-
const [dragAreaStartRow, dragAreaStartColumn, dragAreaEndRow, dragAreaEndColumn] =
|
149
|
+
const [dragAreaStartRow, dragAreaStartColumn, dragAreaEndRow, dragAreaEndColumn] = fullArea;
|
163
150
|
switch (direction) {
|
164
151
|
case 'up':
|
165
152
|
return baseAreaStartRow - dragAreaStartRow;
|
@@ -179,22 +166,30 @@ class AutofillCalculations {
|
|
179
166
|
*
|
180
167
|
* @private
|
181
168
|
* @param {Array} baseArea The base selection area.
|
182
|
-
* @param {Array}
|
169
|
+
* @param {Array} fullArea The base selection area extended by the drag area.
|
183
170
|
* @param {string} direction Drag direction.
|
184
171
|
* @returns {Array|null} Array representing the drag area coordinates.
|
185
172
|
*/
|
186
|
-
getDragArea(baseArea,
|
173
|
+
getDragArea(baseArea, fullArea, direction) {
|
187
174
|
const [baseAreaStartRow, baseAreaStartColumn, baseAreaEndRow, baseAreaEndColumn] = baseArea;
|
188
|
-
const [
|
175
|
+
const [fullAreaStartRow, fullAreaStartColumn, fullAreaEndRow, fullAreaEndColumn] = fullArea;
|
189
176
|
switch (direction) {
|
190
177
|
case 'up':
|
191
|
-
return [
|
178
|
+
return [fullAreaStartRow, fullAreaStartColumn, baseAreaStartRow - 1, baseAreaEndColumn];
|
192
179
|
case 'down':
|
193
|
-
|
180
|
+
{
|
181
|
+
const mergedCell = this.mergedCellsCollection.get(fullAreaEndRow, baseAreaEndColumn);
|
182
|
+
const rowShift = mergedCell ? mergedCell.rowspan - 1 : 0;
|
183
|
+
return [baseAreaEndRow + 1, baseAreaStartColumn, fullAreaEndRow + rowShift, baseAreaEndColumn];
|
184
|
+
}
|
194
185
|
case 'left':
|
195
|
-
return [
|
186
|
+
return [fullAreaStartRow, fullAreaStartColumn, baseAreaEndRow, baseAreaStartColumn - 1];
|
196
187
|
case 'right':
|
197
|
-
|
188
|
+
{
|
189
|
+
const mergedCell = this.mergedCellsCollection.get(fullAreaEndRow, baseAreaEndColumn);
|
190
|
+
const columnShift = mergedCell ? mergedCell.colspan - 1 : 0;
|
191
|
+
return [baseAreaStartRow, baseAreaEndColumn + columnShift, fullAreaEndRow, fullAreaEndColumn];
|
192
|
+
}
|
198
193
|
default:
|
199
194
|
return null;
|
200
195
|
}
|
@@ -205,17 +200,17 @@ class AutofillCalculations {
|
|
205
200
|
*
|
206
201
|
* @private
|
207
202
|
* @param {Array} baseArea The base selection area.
|
208
|
-
* @param {Array}
|
203
|
+
* @param {Array} fullArea The drag area (containing the base area).
|
209
204
|
* @param {string} direction The drag direction.
|
210
205
|
* @param {Array} mergedCellArray Array of the merged cells found in the base area.
|
211
206
|
* @returns {MergedCellCoords|null}
|
212
207
|
*/
|
213
|
-
getFarthestCollection(baseArea,
|
208
|
+
getFarthestCollection(baseArea, fullArea, direction, mergedCellArray) {
|
214
209
|
const [baseAreaStartRow, baseAreaStartColumn, baseAreaEndRow, baseAreaEndColumn] = baseArea;
|
215
210
|
const verticalDirection = ['up', 'down'].indexOf(direction) > -1;
|
216
211
|
const baseEnd = verticalDirection ? baseAreaEndRow : baseAreaEndColumn;
|
217
212
|
const baseStart = verticalDirection ? baseAreaStartRow : baseAreaStartColumn;
|
218
|
-
const fillSize = this.getAutofillSize(baseArea,
|
213
|
+
const fillSize = this.getAutofillSize(baseArea, fullArea, direction);
|
219
214
|
const fullCycle = verticalDirection ? baseAreaEndRow - baseAreaStartRow + 1 : baseAreaEndColumn - baseAreaStartColumn + 1;
|
220
215
|
const fulls = Math.floor(fillSize / fullCycle) * fullCycle;
|
221
216
|
const partials = fillSize - fulls;
|
@@ -290,7 +285,7 @@ class AutofillCalculations {
|
|
290
285
|
rowspan: current.rowspan,
|
291
286
|
col: current.col,
|
292
287
|
colspan: current.colspan
|
293
|
-
});
|
288
|
+
}, true);
|
294
289
|
break;
|
295
290
|
case 'down':
|
296
291
|
this.plugin.mergedCellsCollection.add({
|
@@ -298,7 +293,7 @@ class AutofillCalculations {
|
|
298
293
|
rowspan: current.rowspan,
|
299
294
|
col: current.col,
|
300
295
|
colspan: current.colspan
|
301
|
-
});
|
296
|
+
}, true);
|
302
297
|
break;
|
303
298
|
case 'left':
|
304
299
|
this.plugin.mergedCellsCollection.add({
|
@@ -306,7 +301,7 @@ class AutofillCalculations {
|
|
306
301
|
rowspan: current.rowspan,
|
307
302
|
col: current.col - fillOffset,
|
308
303
|
colspan: current.colspan
|
309
|
-
});
|
304
|
+
}, true);
|
310
305
|
break;
|
311
306
|
case 'right':
|
312
307
|
this.plugin.mergedCellsCollection.add({
|
@@ -314,7 +309,7 @@ class AutofillCalculations {
|
|
314
309
|
rowspan: current.rowspan,
|
315
310
|
col: current.col + fillOffset,
|
316
311
|
colspan: current.colspan
|
317
|
-
});
|
312
|
+
}, true);
|
318
313
|
break;
|
319
314
|
default:
|
320
315
|
}
|
@@ -389,7 +384,28 @@ class AutofillCalculations {
|
|
389
384
|
const topLeft = this.plugin.hot._createCellCoords(dragAreaStartRow, dragAreaStartColumn);
|
390
385
|
const bottomRight = this.plugin.hot._createCellCoords(dragAreaEndRow, dragAreaEndColumn);
|
391
386
|
const dragRange = this.plugin.hot._createCellRange(topLeft, topLeft, bottomRight);
|
392
|
-
|
387
|
+
const mergedCellsWithPartials = this.mergedCellsCollection.getWithinRange(dragRange, true);
|
388
|
+
if (mergedCellsWithPartials.length === 0) {
|
389
|
+
return false;
|
390
|
+
}
|
391
|
+
const mergedCellsWithoutPartials = this.mergedCellsCollection.getWithinRange(dragRange, false);
|
392
|
+
if (mergedCellsWithoutPartials.length === 0) {
|
393
|
+
return true;
|
394
|
+
}
|
395
|
+
if (direction === 'up' || direction === 'down') {
|
396
|
+
return !mergedCellsWithoutPartials.every(_ref => {
|
397
|
+
let {
|
398
|
+
colspan
|
399
|
+
} = _ref;
|
400
|
+
return colspan === dragRange.getWidth();
|
401
|
+
});
|
402
|
+
}
|
403
|
+
return !mergedCellsWithoutPartials.every(_ref2 => {
|
404
|
+
let {
|
405
|
+
rowspan
|
406
|
+
} = _ref2;
|
407
|
+
return rowspan === dragRange.getHeight();
|
408
|
+
});
|
393
409
|
}
|
394
410
|
}
|
395
411
|
export default AutofillCalculations;
|
@@ -109,18 +109,33 @@ class MergedCellsCollection {
|
|
109
109
|
/**
|
110
110
|
* Get the first-found merged cell containing the provided range.
|
111
111
|
*
|
112
|
-
* @param {CellRange
|
113
|
-
* @returns {MergedCellCoords|
|
112
|
+
* @param {CellRange} range The range to search merged cells for.
|
113
|
+
* @returns {MergedCellCoords | false}
|
114
114
|
*/
|
115
115
|
getByRange(range) {
|
116
|
+
const {
|
117
|
+
row: rowStart,
|
118
|
+
col: columnStart
|
119
|
+
} = range.getTopStartCorner();
|
120
|
+
const {
|
121
|
+
row: rowEnd,
|
122
|
+
col: columnEnd
|
123
|
+
} = range.getBottomEndCorner();
|
124
|
+
const mergedCellsLength = this.mergedCells.length;
|
116
125
|
let result = false;
|
117
|
-
(0
|
118
|
-
|
126
|
+
for (let i = 0; i < mergedCellsLength; i++) {
|
127
|
+
const mergedCell = this.mergedCells[i];
|
128
|
+
const {
|
129
|
+
row,
|
130
|
+
col,
|
131
|
+
rowspan,
|
132
|
+
colspan
|
133
|
+
} = mergedCell;
|
134
|
+
if (row >= rowStart && row + rowspan - 1 <= rowEnd && col >= columnStart && col + colspan - 1 <= columnEnd) {
|
119
135
|
result = mergedCell;
|
120
|
-
|
136
|
+
break;
|
121
137
|
}
|
122
|
-
|
123
|
-
});
|
138
|
+
}
|
124
139
|
return result;
|
125
140
|
}
|
126
141
|
|
@@ -230,7 +245,9 @@ class MergedCellsCollection {
|
|
230
245
|
_assertClassBrand(_MergedCellsCollection_brand, this, _addMergedCellToMatrix).call(this, newMergedCell);
|
231
246
|
return newMergedCell;
|
232
247
|
}
|
233
|
-
|
248
|
+
if (isOverlapping) {
|
249
|
+
(0, _console.warn)(MergedCellsCollection.IS_OVERLAPPING_WARNING(newMergedCell));
|
250
|
+
}
|
234
251
|
return false;
|
235
252
|
}
|
236
253
|
|
@@ -105,18 +105,33 @@ class MergedCellsCollection {
|
|
105
105
|
/**
|
106
106
|
* Get the first-found merged cell containing the provided range.
|
107
107
|
*
|
108
|
-
* @param {CellRange
|
109
|
-
* @returns {MergedCellCoords|
|
108
|
+
* @param {CellRange} range The range to search merged cells for.
|
109
|
+
* @returns {MergedCellCoords | false}
|
110
110
|
*/
|
111
111
|
getByRange(range) {
|
112
|
+
const {
|
113
|
+
row: rowStart,
|
114
|
+
col: columnStart
|
115
|
+
} = range.getTopStartCorner();
|
116
|
+
const {
|
117
|
+
row: rowEnd,
|
118
|
+
col: columnEnd
|
119
|
+
} = range.getBottomEndCorner();
|
120
|
+
const mergedCellsLength = this.mergedCells.length;
|
112
121
|
let result = false;
|
113
|
-
|
114
|
-
|
122
|
+
for (let i = 0; i < mergedCellsLength; i++) {
|
123
|
+
const mergedCell = this.mergedCells[i];
|
124
|
+
const {
|
125
|
+
row,
|
126
|
+
col,
|
127
|
+
rowspan,
|
128
|
+
colspan
|
129
|
+
} = mergedCell;
|
130
|
+
if (row >= rowStart && row + rowspan - 1 <= rowEnd && col >= columnStart && col + colspan - 1 <= columnEnd) {
|
115
131
|
result = mergedCell;
|
116
|
-
|
132
|
+
break;
|
117
133
|
}
|
118
|
-
|
119
|
-
});
|
134
|
+
}
|
120
135
|
return result;
|
121
136
|
}
|
122
137
|
|
@@ -226,7 +241,9 @@ class MergedCellsCollection {
|
|
226
241
|
_assertClassBrand(_MergedCellsCollection_brand, this, _addMergedCellToMatrix).call(this, newMergedCell);
|
227
242
|
return newMergedCell;
|
228
243
|
}
|
229
|
-
|
244
|
+
if (isOverlapping) {
|
245
|
+
warn(MergedCellsCollection.IS_OVERLAPPING_WARNING(newMergedCell));
|
246
|
+
}
|
230
247
|
return false;
|
231
248
|
}
|
232
249
|
|
@@ -909,8 +909,8 @@ class MergeCells extends _base.BasePlugin {
|
|
909
909
|
/**
|
910
910
|
* The `modifyAutofillRange` hook callback.
|
911
911
|
*
|
912
|
-
* @param {Array}
|
913
|
-
* @param {Array}
|
912
|
+
* @param {Array} fullArea The drag + base area coordinates.
|
913
|
+
* @param {Array} baseArea The selection information.
|
914
914
|
* @returns {Array} The new drag area.
|
915
915
|
*/
|
916
916
|
}
|
@@ -1294,23 +1294,19 @@ function _onAfterViewportColumnCalculatorOverride(calc) {
|
|
1294
1294
|
this.modifyViewportColumnStart(calc, nrOfRows);
|
1295
1295
|
this.modifyViewportColumnEnd(calc, nrOfRows);
|
1296
1296
|
}
|
1297
|
-
function _onModifyAutofillRange(
|
1298
|
-
this.autofillCalculations.
|
1299
|
-
|
1300
|
-
|
1301
|
-
if (this.autofillCalculations.dragAreaOverlapsCollections(select, dragArea, dragDirection)) {
|
1302
|
-
dragArea = select;
|
1303
|
-
return dragArea;
|
1297
|
+
function _onModifyAutofillRange(fullArea, baseArea) {
|
1298
|
+
const dragDirection = this.autofillCalculations.getDirection(baseArea, fullArea);
|
1299
|
+
if (this.autofillCalculations.dragAreaOverlapsCollections(baseArea, fullArea, dragDirection)) {
|
1300
|
+
return baseArea;
|
1304
1301
|
}
|
1305
|
-
const from = this.hot._createCellCoords(
|
1306
|
-
const to = this.hot._createCellCoords(
|
1302
|
+
const from = this.hot._createCellCoords(baseArea[0], baseArea[1]);
|
1303
|
+
const to = this.hot._createCellCoords(baseArea[2], baseArea[3]);
|
1307
1304
|
const range = this.hot._createCellRange(from, from, to);
|
1308
1305
|
const mergedCellsWithinSelectionArea = this.mergedCellsCollection.getWithinRange(range);
|
1309
1306
|
if (mergedCellsWithinSelectionArea.length === 0) {
|
1310
|
-
return
|
1307
|
+
return fullArea;
|
1311
1308
|
}
|
1312
|
-
|
1313
|
-
return dragArea;
|
1309
|
+
return this.autofillCalculations.snapDragArea(baseArea, fullArea, dragDirection, mergedCellsWithinSelectionArea);
|
1314
1310
|
}
|
1315
1311
|
/**
|
1316
1312
|
* `afterCreateCol` hook callback.
|
@@ -905,8 +905,8 @@ export class MergeCells extends BasePlugin {
|
|
905
905
|
/**
|
906
906
|
* The `modifyAutofillRange` hook callback.
|
907
907
|
*
|
908
|
-
* @param {Array}
|
909
|
-
* @param {Array}
|
908
|
+
* @param {Array} fullArea The drag + base area coordinates.
|
909
|
+
* @param {Array} baseArea The selection information.
|
910
910
|
* @returns {Array} The new drag area.
|
911
911
|
*/
|
912
912
|
}
|
@@ -1289,23 +1289,19 @@ function _onAfterViewportColumnCalculatorOverride(calc) {
|
|
1289
1289
|
this.modifyViewportColumnStart(calc, nrOfRows);
|
1290
1290
|
this.modifyViewportColumnEnd(calc, nrOfRows);
|
1291
1291
|
}
|
1292
|
-
function _onModifyAutofillRange(
|
1293
|
-
this.autofillCalculations.
|
1294
|
-
|
1295
|
-
|
1296
|
-
if (this.autofillCalculations.dragAreaOverlapsCollections(select, dragArea, dragDirection)) {
|
1297
|
-
dragArea = select;
|
1298
|
-
return dragArea;
|
1292
|
+
function _onModifyAutofillRange(fullArea, baseArea) {
|
1293
|
+
const dragDirection = this.autofillCalculations.getDirection(baseArea, fullArea);
|
1294
|
+
if (this.autofillCalculations.dragAreaOverlapsCollections(baseArea, fullArea, dragDirection)) {
|
1295
|
+
return baseArea;
|
1299
1296
|
}
|
1300
|
-
const from = this.hot._createCellCoords(
|
1301
|
-
const to = this.hot._createCellCoords(
|
1297
|
+
const from = this.hot._createCellCoords(baseArea[0], baseArea[1]);
|
1298
|
+
const to = this.hot._createCellCoords(baseArea[2], baseArea[3]);
|
1302
1299
|
const range = this.hot._createCellRange(from, from, to);
|
1303
1300
|
const mergedCellsWithinSelectionArea = this.mergedCellsCollection.getWithinRange(range);
|
1304
1301
|
if (mergedCellsWithinSelectionArea.length === 0) {
|
1305
|
-
return
|
1302
|
+
return fullArea;
|
1306
1303
|
}
|
1307
|
-
|
1308
|
-
return dragArea;
|
1304
|
+
return this.autofillCalculations.snapDragArea(baseArea, fullArea, dragDirection, mergedCellsWithinSelectionArea);
|
1309
1305
|
}
|
1310
1306
|
/**
|
1311
1307
|
* `afterCreateCol` hook callback.
|
@@ -48,9 +48,7 @@ class FiltersAction extends _base.BaseAction {
|
|
48
48
|
undo(hot, undoneCallback) {
|
49
49
|
const filters = hot.getPlugin('filters');
|
50
50
|
hot.addHookOnce('afterViewRender', undoneCallback);
|
51
|
-
|
52
|
-
filters.conditionCollection.importAllConditions(this.previousConditionsStack);
|
53
|
-
}
|
51
|
+
filters.conditionCollection.importAllConditions(this.previousConditionsStack);
|
54
52
|
filters.filter();
|
55
53
|
}
|
56
54
|
|
@@ -45,9 +45,7 @@ export class FiltersAction extends BaseAction {
|
|
45
45
|
undo(hot, undoneCallback) {
|
46
46
|
const filters = hot.getPlugin('filters');
|
47
47
|
hot.addHookOnce('afterViewRender', undoneCallback);
|
48
|
-
|
49
|
-
filters.conditionCollection.importAllConditions(this.previousConditionsStack);
|
50
|
-
}
|
48
|
+
filters.conditionCollection.importAllConditions(this.previousConditionsStack);
|
51
49
|
filters.filter();
|
52
50
|
}
|
53
51
|
|
@@ -12,6 +12,7 @@ const command = exports.command = {
|
|
12
12
|
row
|
13
13
|
} = hot.getSelectedRangeLast().highlight;
|
14
14
|
let rowsStep = hot.countVisibleRows() + columnHeadersCount;
|
15
|
+
rowsStep = rowsStep === 0 ? 1 : rowsStep;
|
15
16
|
|
16
17
|
// if the last row is currently selected move the focus to the first row (if autoWrap is enabled)
|
17
18
|
if (row === hot.countRows() - 1) {
|
@@ -9,6 +9,7 @@ export const command = {
|
|
9
9
|
row
|
10
10
|
} = hot.getSelectedRangeLast().highlight;
|
11
11
|
let rowsStep = hot.countVisibleRows() + columnHeadersCount;
|
12
|
+
rowsStep = rowsStep === 0 ? 1 : rowsStep;
|
12
13
|
|
13
14
|
// if the last row is currently selected move the focus to the first row (if autoWrap is enabled)
|
14
15
|
if (row === hot.countRows() - 1) {
|
@@ -11,7 +11,8 @@ const command = exports.command = {
|
|
11
11
|
const {
|
12
12
|
row
|
13
13
|
} = hot.getSelectedRangeLast().highlight;
|
14
|
-
let rowsStep =
|
14
|
+
let rowsStep = hot.countVisibleRows() + columnHeadersCount;
|
15
|
+
rowsStep = rowsStep === 0 ? -1 : -rowsStep;
|
15
16
|
|
16
17
|
// if the first row is currently selected move the focus to the last row (if autoWrap is enabled)
|
17
18
|
if (row === -columnHeadersCount) {
|
@@ -8,7 +8,8 @@ export const command = {
|
|
8
8
|
const {
|
9
9
|
row
|
10
10
|
} = hot.getSelectedRangeLast().highlight;
|
11
|
-
let rowsStep =
|
11
|
+
let rowsStep = hot.countVisibleRows() + columnHeadersCount;
|
12
|
+
rowsStep = rowsStep === 0 ? -1 : -rowsStep;
|
12
13
|
|
13
14
|
// if the first row is currently selected move the focus to the last row (if autoWrap is enabled)
|
14
15
|
if (row === -columnHeadersCount) {
|
package/styles/handsontable.css
CHANGED
@@ -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-
|
29
|
-
* Release date: 17/10/2024 (built at
|
28
|
+
* Version: 0.0.0-next-2580147-20241212
|
29
|
+
* Release date: 17/10/2024 (built at 12/12/2024 09:18:43)
|
30
30
|
*/
|
31
31
|
.ht-wrapper:not([class*=ht-theme]) {
|
32
32
|
--ht-cell-horizontal-padding: 8px;
|
@@ -210,6 +210,9 @@
|
|
210
210
|
.handsontable tbody tr td:last-child {
|
211
211
|
border-inline-end-color: var(--ht-border-color);
|
212
212
|
}
|
213
|
+
.handsontable thead tr:only-of-type th .relative::after {
|
214
|
+
bottom: 0;
|
215
|
+
}
|
213
216
|
.handsontable thead tr th {
|
214
217
|
padding: 0;
|
215
218
|
}
|