handsontable 0.0.0-next-aebdd36-20240821 → 0.0.0-next-9891faa-20240822

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/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-aebdd36-20240821";
137
+ const hotVersion = "0.0.0-next-9891faa-20240822";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-aebdd36-20240821";
127
+ const hotVersion = "0.0.0-next-9891faa-20240822";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-aebdd36-20240821",
13
+ "version": "0.0.0-next-9891faa-20240822",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -424,18 +424,20 @@ class MergedCellsCollection {
424
424
  break;
425
425
  default:
426
426
  }
427
- (0, _array.arrayEach)(this.mergedCells, currentMerge => {
428
- _assertClassBrand(_MergedCellsCollection_brand, this, _removeMergedCellFromMatrix).call(this, currentMerge);
427
+ const removedMergedCells = [];
428
+ this.mergedCells.forEach(currentMerge => {
429
429
  currentMerge.shift(shiftVector, index);
430
- _assertClassBrand(_MergedCellsCollection_brand, this, _addMergedCellToMatrix).call(this, currentMerge);
431
- });
432
- (0, _number.rangeEachReverse)(this.mergedCells.length - 1, 0, i => {
433
- const currentMerge = this.mergedCells[i];
434
- if (currentMerge && currentMerge.removed) {
435
- this.mergedCells.splice(this.mergedCells.indexOf(currentMerge), 1);
436
- _assertClassBrand(_MergedCellsCollection_brand, this, _removeMergedCellFromMatrix).call(this, currentMerge);
430
+ if (currentMerge.removed) {
431
+ removedMergedCells.push(currentMerge);
437
432
  }
438
433
  });
434
+ removedMergedCells.forEach(removedMerge => {
435
+ this.mergedCells.splice(this.mergedCells.indexOf(removedMerge), 1);
436
+ });
437
+ this.mergedCellsMatrix.clear();
438
+ this.mergedCells.forEach(currentMerge => {
439
+ _assertClassBrand(_MergedCellsCollection_brand, this, _addMergedCellToMatrix).call(this, currentMerge);
440
+ });
439
441
  }
440
442
 
441
443
  /**
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
15
15
  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); }
16
16
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
17
17
  import MergedCellCoords from "./cellCoords.mjs";
18
- import { rangeEach, rangeEachReverse } from "../../helpers/number.mjs";
18
+ import { rangeEach } from "../../helpers/number.mjs";
19
19
  import { warn } from "../../helpers/console.mjs";
20
20
  import { arrayEach } from "../../helpers/array.mjs";
21
21
  import { toSingleLine } from "../../helpers/templateLiteralTag.mjs";
@@ -420,18 +420,20 @@ class MergedCellsCollection {
420
420
  break;
421
421
  default:
422
422
  }
423
- arrayEach(this.mergedCells, currentMerge => {
424
- _assertClassBrand(_MergedCellsCollection_brand, this, _removeMergedCellFromMatrix).call(this, currentMerge);
423
+ const removedMergedCells = [];
424
+ this.mergedCells.forEach(currentMerge => {
425
425
  currentMerge.shift(shiftVector, index);
426
- _assertClassBrand(_MergedCellsCollection_brand, this, _addMergedCellToMatrix).call(this, currentMerge);
427
- });
428
- rangeEachReverse(this.mergedCells.length - 1, 0, i => {
429
- const currentMerge = this.mergedCells[i];
430
- if (currentMerge && currentMerge.removed) {
431
- this.mergedCells.splice(this.mergedCells.indexOf(currentMerge), 1);
432
- _assertClassBrand(_MergedCellsCollection_brand, this, _removeMergedCellFromMatrix).call(this, currentMerge);
426
+ if (currentMerge.removed) {
427
+ removedMergedCells.push(currentMerge);
433
428
  }
434
429
  });
430
+ removedMergedCells.forEach(removedMerge => {
431
+ this.mergedCells.splice(this.mergedCells.indexOf(removedMerge), 1);
432
+ });
433
+ this.mergedCellsMatrix.clear();
434
+ this.mergedCells.forEach(currentMerge => {
435
+ _assertClassBrand(_MergedCellsCollection_brand, this, _addMergedCellToMatrix).call(this, currentMerge);
436
+ });
435
437
  }
436
438
 
437
439
  /**