handsontable 0.0.0-next-dbd8d56-20240110 → 0.0.0-next-faee814-20240110

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/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-dbd8d56-20240110";
137
+ const hotVersion = "0.0.0-next-faee814-20240110";
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-dbd8d56-20240110";
127
+ const hotVersion = "0.0.0-next-faee814-20240110";
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-dbd8d56-20240110",
13
+ "version": "0.0.0-next-faee814-20240110",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -1069,7 +1069,15 @@ function _onModifyData2(physicalRow, visualColumn, valueHolder, ioMode) {
1069
1069
  sheet: this.sheetId
1070
1070
  };
1071
1071
  let cellValue = this.engine.getCellValue(address); // Date as an integer (Excel like date).
1072
- const cellMeta = this.hot.getCellMeta(visualRow, visualColumn);
1072
+
1073
+ // TODO: Workaround. We use HOT's `getCellsMeta` method instead of HOT's `getCellMeta` method. Getting cell meta
1074
+ // using the second method lead to execution of the `cells` method. Using the `getDataAtCell` (which may be useful)
1075
+ // in a callback to the `cells` method leads to triggering the `modifyData` hook. Thus, the `onModifyData` callback
1076
+ // is executed once again and it cause creation of an infinite loop.
1077
+ let cellMeta = this.hot.getCellsMeta().find(singleCellMeta => singleCellMeta.visualRow === visualRow && singleCellMeta.visualCol === visualColumn);
1078
+ if (cellMeta === undefined) {
1079
+ cellMeta = {};
1080
+ }
1073
1081
  if (cellMeta.type === 'date' && (0, _number.isNumeric)(cellValue)) {
1074
1082
  cellValue = (0, _utils.getDateFromExcelDate)(cellValue, cellMeta.dateFormat);
1075
1083
  }
@@ -1064,7 +1064,15 @@ function _onModifyData2(physicalRow, visualColumn, valueHolder, ioMode) {
1064
1064
  sheet: this.sheetId
1065
1065
  };
1066
1066
  let cellValue = this.engine.getCellValue(address); // Date as an integer (Excel like date).
1067
- const cellMeta = this.hot.getCellMeta(visualRow, visualColumn);
1067
+
1068
+ // TODO: Workaround. We use HOT's `getCellsMeta` method instead of HOT's `getCellMeta` method. Getting cell meta
1069
+ // using the second method lead to execution of the `cells` method. Using the `getDataAtCell` (which may be useful)
1070
+ // in a callback to the `cells` method leads to triggering the `modifyData` hook. Thus, the `onModifyData` callback
1071
+ // is executed once again and it cause creation of an infinite loop.
1072
+ let cellMeta = this.hot.getCellsMeta().find(singleCellMeta => singleCellMeta.visualRow === visualRow && singleCellMeta.visualCol === visualColumn);
1073
+ if (cellMeta === undefined) {
1074
+ cellMeta = {};
1075
+ }
1068
1076
  if (cellMeta.type === 'date' && isNumeric(cellValue)) {
1069
1077
  cellValue = getDateFromExcelDate(cellValue, cellMeta.dateFormat);
1070
1078
  }