handsontable 0.0.0-next-dd74723-20240507 → 0.0.0-next-b6c1230-20240508

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 CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
45
45
  Handsontable.CellCoords = _src.CellCoords;
46
46
  Handsontable.CellRange = _src.CellRange;
47
47
  Handsontable.packageName = 'handsontable';
48
- Handsontable.buildDate = "07/05/2024 13:36:02";
49
- Handsontable.version = "0.0.0-next-dd74723-20240507";
48
+ Handsontable.buildDate = "08/05/2024 14:02:43";
49
+ Handsontable.version = "0.0.0-next-b6c1230-20240508";
50
50
  Handsontable.languages = {
51
51
  dictionaryKeys: _registry.dictionaryKeys,
52
52
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "07/05/2024 13:36:07";
39
- Handsontable.version = "0.0.0-next-dd74723-20240507";
38
+ Handsontable.buildDate = "08/05/2024 14:02:48";
39
+ Handsontable.version = "0.0.0-next-b6c1230-20240508";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys,
42
42
  getLanguageDictionary,
package/core.js CHANGED
@@ -1204,8 +1204,18 @@ function Core(rootElement, userSettings) {
1204
1204
  };
1205
1205
  for (let i = changes.length - 1; i >= 0; i--) {
1206
1206
  const [row, prop,, newValue] = changes[i];
1207
- const col = datamap.propToCol(prop);
1208
- const cellProperties = instance.getCellMeta(row, col);
1207
+ const visualCol = datamap.propToCol(prop);
1208
+ let cellProperties;
1209
+ if (Number.isInteger(visualCol)) {
1210
+ cellProperties = instance.getCellMeta(row, visualCol);
1211
+ } else {
1212
+ // If there's no requested visual column, we can use the table meta as the cell properties when retrieving
1213
+ // the cell validator.
1214
+ cellProperties = {
1215
+ ...Object.getPrototypeOf(tableMeta),
1216
+ ...tableMeta
1217
+ };
1218
+ }
1209
1219
  if (cellProperties.type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
1210
1220
  changes[i][3] = getParsedNumber(newValue);
1211
1221
  }
@@ -1507,6 +1517,9 @@ function Core(rootElement, userSettings) {
1507
1517
  for (i = 0, ilen = input.length; i < ilen; i++) {
1508
1518
  changes.push([input[i][0], input[i][1], dataSource.getAtCell(this.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);
1509
1519
  }
1520
+
1521
+ // TODO: I don't think `prop` should be used as `changeSource` here, but removing it would be a breaking change.
1522
+ // We should remove it with the next major release.
1510
1523
  if (!changeSource && typeof row === 'object') {
1511
1524
  changeSource = prop;
1512
1525
  }
@@ -2608,7 +2621,7 @@ function Core(rootElement, userSettings) {
2608
2621
  }
2609
2622
  renderableRowIndex = this.rowIndexMapper.getRenderableFromVisualIndex(row);
2610
2623
  }
2611
- if (renderableRowIndex === null || renderableColumnIndex === null) {
2624
+ if (renderableRowIndex === null || renderableColumnIndex === null || renderableRowIndex === undefined || renderableColumnIndex === undefined) {
2612
2625
  return null;
2613
2626
  }
2614
2627
  return instance.view.getCellAtCoords(instance._createCellCoords(renderableRowIndex, renderableColumnIndex), topmost);
package/core.mjs CHANGED
@@ -1199,8 +1199,18 @@ export default function Core(rootElement, userSettings) {
1199
1199
  };
1200
1200
  for (let i = changes.length - 1; i >= 0; i--) {
1201
1201
  const [row, prop,, newValue] = changes[i];
1202
- const col = datamap.propToCol(prop);
1203
- const cellProperties = instance.getCellMeta(row, col);
1202
+ const visualCol = datamap.propToCol(prop);
1203
+ let cellProperties;
1204
+ if (Number.isInteger(visualCol)) {
1205
+ cellProperties = instance.getCellMeta(row, visualCol);
1206
+ } else {
1207
+ // If there's no requested visual column, we can use the table meta as the cell properties when retrieving
1208
+ // the cell validator.
1209
+ cellProperties = {
1210
+ ...Object.getPrototypeOf(tableMeta),
1211
+ ...tableMeta
1212
+ };
1213
+ }
1204
1214
  if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
1205
1215
  changes[i][3] = getParsedNumber(newValue);
1206
1216
  }
@@ -1502,6 +1512,9 @@ export default function Core(rootElement, userSettings) {
1502
1512
  for (i = 0, ilen = input.length; i < ilen; i++) {
1503
1513
  changes.push([input[i][0], input[i][1], dataSource.getAtCell(this.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);
1504
1514
  }
1515
+
1516
+ // TODO: I don't think `prop` should be used as `changeSource` here, but removing it would be a breaking change.
1517
+ // We should remove it with the next major release.
1505
1518
  if (!changeSource && typeof row === 'object') {
1506
1519
  changeSource = prop;
1507
1520
  }
@@ -2603,7 +2616,7 @@ export default function Core(rootElement, userSettings) {
2603
2616
  }
2604
2617
  renderableRowIndex = this.rowIndexMapper.getRenderableFromVisualIndex(row);
2605
2618
  }
2606
- if (renderableRowIndex === null || renderableColumnIndex === null) {
2619
+ if (renderableRowIndex === null || renderableColumnIndex === null || renderableRowIndex === undefined || renderableColumnIndex === undefined) {
2607
2620
  return null;
2608
2621
  }
2609
2622
  return instance.view.getCellAtCoords(instance._createCellCoords(renderableRowIndex, renderableColumnIndex), topmost);
@@ -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-dd74723-20240507
29
- * Release date: 16/04/2024 (built at 07/05/2024 13:36:12)
28
+ * Version: 0.0.0-next-b6c1230-20240508
29
+ * Release date: 16/04/2024 (built at 08/05/2024 14:02:53)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -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-dd74723-20240507
29
- * Release date: 16/04/2024 (built at 07/05/2024 13:36:12)
28
+ * Version: 0.0.0-next-b6c1230-20240508
29
+ * Release date: 16/04/2024 (built at 08/05/2024 14:02:53)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles