handsontable 0.0.0-next-c3b1327-20230428 → 0.0.0-next-80f5f61-20230504

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
@@ -152,7 +152,7 @@ var domMessages = {
152
152
  function _injectProductInfo(key, element) {
153
153
  var hasValidType = !isEmpty(key);
154
154
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
155
- var hotVersion = "0.0.0-next-c3b1327-20230428";
155
+ var hotVersion = "0.0.0-next-80f5f61-20230504";
156
156
  var keyValidityDate;
157
157
  var consoleMessageState = 'invalid';
158
158
  var domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -142,7 +142,7 @@ var domMessages = {
142
142
  export function _injectProductInfo(key, element) {
143
143
  var hasValidType = !isEmpty(key);
144
144
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
145
- var hotVersion = "0.0.0-next-c3b1327-20230428";
145
+ var hotVersion = "0.0.0-next-80f5f61-20230504";
146
146
  var keyValidityDate;
147
147
  var consoleMessageState = 'invalid';
148
148
  var 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-c3b1327-20230428",
13
+ "version": "0.0.0-next-80f5f61-20230504",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -14,9 +14,6 @@ require("core-js/modules/es.symbol.iterator.js");
14
14
  require("core-js/modules/es.function.name.js");
15
15
  require("core-js/modules/es.array.from.js");
16
16
  require("core-js/modules/es.regexp.exec.js");
17
- require("core-js/modules/es.object.keys.js");
18
- require("core-js/modules/es.array.filter.js");
19
- require("core-js/modules/es.object.get-own-property-descriptors.js");
20
17
  exports.__esModule = true;
21
18
  exports.SETTING_KEYS = exports.PLUGIN_PRIORITY = exports.PLUGIN_KEY = exports.Formulas = void 0;
22
19
  require("core-js/modules/es.array.concat.js");
@@ -51,8 +48,6 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
51
48
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
52
49
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
53
50
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
54
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
55
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
56
51
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
57
52
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
58
53
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -727,19 +722,41 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
727
722
  }, {
728
723
  key: "onBeforeAutofill",
729
724
  value: function onBeforeAutofill(fillData, sourceRange, targetRange) {
730
- var _this13 = this;
731
- var withSheetId = function withSheetId(range) {
732
- return _objectSpread(_objectSpread({}, range), {}, {
733
- sheet: _this13.sheetId
734
- });
735
- };
725
+ var _sourceRange$getTopSt = sourceRange.getTopStartCorner(),
726
+ sourceTopStartRow = _sourceRange$getTopSt.row,
727
+ sourceTopStartColumn = _sourceRange$getTopSt.col;
728
+ var _sourceRange$getBotto = sourceRange.getBottomEndCorner(),
729
+ sourceBottomEndRow = _sourceRange$getBotto.row,
730
+ sourceBottomEndColumn = _sourceRange$getBotto.col;
731
+ var _targetRange$getTopSt = targetRange.getTopStartCorner(),
732
+ targetTopStartRow = _targetRange$getTopSt.row,
733
+ targetTopStartColumn = _targetRange$getTopSt.col;
734
+ var _targetRange$getBotto = targetRange.getBottomEndCorner(),
735
+ targetBottomEndRow = _targetRange$getBotto.row,
736
+ targetBottomEndColumn = _targetRange$getBotto.col;
736
737
  var engineSourceRange = {
737
- start: withSheetId(sourceRange.getTopStartCorner()),
738
- end: withSheetId(sourceRange.getBottomEndCorner())
738
+ start: {
739
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(sourceTopStartRow),
740
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(sourceTopStartColumn),
741
+ sheet: this.sheetId
742
+ },
743
+ end: {
744
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(sourceBottomEndRow),
745
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(sourceBottomEndColumn),
746
+ sheet: this.sheetId
747
+ }
739
748
  };
740
749
  var engineTargetRange = {
741
- start: withSheetId(targetRange.getTopStartCorner()),
742
- end: withSheetId(targetRange.getBottomEndCorner())
750
+ start: {
751
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(targetTopStartRow),
752
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(targetTopStartColumn),
753
+ sheet: this.sheetId
754
+ },
755
+ end: {
756
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(targetBottomEndRow),
757
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(targetBottomEndColumn),
758
+ sheet: this.sheetId
759
+ }
743
760
  };
744
761
 
745
762
  // Blocks the autofill operation if HyperFormula says that at least one of
@@ -805,19 +822,19 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
805
822
  }, {
806
823
  key: "onAfterCellMetaReset",
807
824
  value: function onAfterCellMetaReset() {
808
- var _this14 = this;
825
+ var _this13 = this;
809
826
  var sourceDataArray = this.hot.getSourceDataArray();
810
827
  var valueChanged = false;
811
828
  sourceDataArray.forEach(function (rowData, rowIndex) {
812
829
  rowData.forEach(function (cellValue, columnIndex) {
813
- var cellMeta = _this14.hot.getCellMeta(rowIndex, columnIndex);
830
+ var cellMeta = _this13.hot.getCellMeta(rowIndex, columnIndex);
814
831
  var dateFormat = cellMeta.dateFormat;
815
832
  if ((0, _utils.isDate)(cellValue, cellMeta.type)) {
816
833
  valueChanged = true;
817
834
  if ((0, _utils.isDateValid)(cellValue, dateFormat)) {
818
835
  // Rewriting date in HOT format to HF format.
819
836
  sourceDataArray[rowIndex][columnIndex] = (0, _utils.getDateInHfFormat)(cellValue, dateFormat);
820
- } else if (_this14.isFormulaCellType(rowIndex, columnIndex) === false) {
837
+ } else if (_this13.isFormulaCellType(rowIndex, columnIndex) === false) {
821
838
  // Escaping value from date parsing using "'" sign (HF feature).
822
839
  sourceDataArray[rowIndex][columnIndex] = "'".concat(cellValue);
823
840
  }
@@ -967,7 +984,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
967
984
  }, {
968
985
  key: "onAfterSetDataAtCell",
969
986
  value: function onAfterSetDataAtCell(changes, source) {
970
- var _this15 = this;
987
+ var _this14 = this;
971
988
  if (isBlockedSource(source)) {
972
989
  return;
973
990
  }
@@ -979,16 +996,16 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
979
996
  visualRow = _ref10[0],
980
997
  prop = _ref10[1],
981
998
  newValue = _ref10[3];
982
- var visualColumn = _this15.hot.propToCol(prop);
983
- var physicalRow = _this15.hot.toPhysicalRow(visualRow);
984
- var physicalColumn = _this15.hot.toPhysicalColumn(visualColumn);
999
+ var visualColumn = _this14.hot.propToCol(prop);
1000
+ var physicalRow = _this14.hot.toPhysicalRow(visualRow);
1001
+ var physicalColumn = _this14.hot.toPhysicalColumn(visualColumn);
985
1002
  var address = {
986
- row: _this15.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
987
- col: _this15.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
988
- sheet: _this15.sheetId
1003
+ row: _this14.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
1004
+ col: _this14.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
1005
+ sheet: _this14.sheetId
989
1006
  };
990
1007
  if (physicalRow !== null && physicalColumn !== null) {
991
- _this15.syncChangeWithEngine(visualRow, visualColumn, newValue);
1008
+ _this14.syncChangeWithEngine(visualRow, visualColumn, newValue);
992
1009
  } else {
993
1010
  outOfBoundsChanges.push([visualRow, visualColumn, newValue]);
994
1011
  }
@@ -1001,16 +1018,16 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1001
1018
  // Workaround for rows/columns being created two times (by HOT and the engine).
1002
1019
  // (unfortunately, this requires an extra re-render)
1003
1020
  this.hot.addHookOnce('afterChange', function () {
1004
- var outOfBoundsDependentCells = _this15.engine.batch(function () {
1021
+ var outOfBoundsDependentCells = _this14.engine.batch(function () {
1005
1022
  outOfBoundsChanges.forEach(function (_ref11) {
1006
1023
  var _ref12 = _slicedToArray(_ref11, 3),
1007
1024
  row = _ref12[0],
1008
1025
  column = _ref12[1],
1009
1026
  newValue = _ref12[2];
1010
- _this15.syncChangeWithEngine(row, column, newValue);
1027
+ _this14.syncChangeWithEngine(row, column, newValue);
1011
1028
  });
1012
1029
  });
1013
- _this15.renderDependentSheets(outOfBoundsDependentCells, true);
1030
+ _this14.renderDependentSheets(outOfBoundsDependentCells, true);
1014
1031
  });
1015
1032
  }
1016
1033
  this.renderDependentSheets(dependentCells);
@@ -1028,7 +1045,7 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1028
1045
  }, {
1029
1046
  key: "onAfterSetSourceDataAtCell",
1030
1047
  value: function onAfterSetSourceDataAtCell(changes, source) {
1031
- var _this16 = this;
1048
+ var _this15 = this;
1032
1049
  if (isBlockedSource(source)) {
1033
1050
  return;
1034
1051
  }
@@ -1039,23 +1056,23 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1039
1056
  visualRow = _ref14[0],
1040
1057
  prop = _ref14[1],
1041
1058
  newValue = _ref14[3];
1042
- var visualColumn = _this16.hot.propToCol(prop);
1059
+ var visualColumn = _this15.hot.propToCol(prop);
1043
1060
  if (!(0, _number.isNumeric)(visualColumn)) {
1044
1061
  return;
1045
1062
  }
1046
1063
  var address = {
1047
- row: _this16.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
1048
- col: _this16.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
1049
- sheet: _this16.sheetId
1064
+ row: _this15.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
1065
+ col: _this15.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
1066
+ sheet: _this15.sheetId
1050
1067
  };
1051
- if (!_this16.engine.isItPossibleToSetCellContents(address)) {
1068
+ if (!_this15.engine.isItPossibleToSetCellContents(address)) {
1052
1069
  (0, _console.warn)("Not possible to set source cell data at ".concat(JSON.stringify(address)));
1053
1070
  return;
1054
1071
  }
1055
1072
  changedCells.push({
1056
1073
  address: address
1057
1074
  });
1058
- dependentCells.push.apply(dependentCells, _toConsumableArray(_this16.engine.setCellContents(address, newValue)));
1075
+ dependentCells.push.apply(dependentCells, _toConsumableArray(_this15.engine.setCellContents(address, newValue)));
1059
1076
  });
1060
1077
  this.renderDependentSheets(dependentCells);
1061
1078
  this.validateDependentCells(dependentCells, changedCells);
@@ -1115,10 +1132,10 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1115
1132
  }, {
1116
1133
  key: "onBeforeRemoveRow",
1117
1134
  value: function onBeforeRemoveRow(row, amount, physicalRows) {
1118
- var _this17 = this;
1135
+ var _this16 = this;
1119
1136
  var hfRows = this.rowAxisSyncer.setRemovedHfIndexes(physicalRows);
1120
1137
  var possible = hfRows.every(function (hfRow) {
1121
- return _this17.engine.isItPossibleToRemoveRows(_this17.sheetId, [hfRow, 1]);
1138
+ return _this16.engine.isItPossibleToRemoveRows(_this16.sheetId, [hfRow, 1]);
1122
1139
  });
1123
1140
  return possible === false ? false : void 0;
1124
1141
  }
@@ -1135,10 +1152,10 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1135
1152
  }, {
1136
1153
  key: "onBeforeRemoveCol",
1137
1154
  value: function onBeforeRemoveCol(col, amount, physicalColumns) {
1138
- var _this18 = this;
1155
+ var _this17 = this;
1139
1156
  var hfColumns = this.columnAxisSyncer.setRemovedHfIndexes(physicalColumns);
1140
1157
  var possible = hfColumns.every(function (hfColumn) {
1141
- return _this18.engine.isItPossibleToRemoveColumns(_this18.sheetId, [hfColumn, 1]);
1158
+ return _this17.engine.isItPossibleToRemoveColumns(_this17.sheetId, [hfColumn, 1]);
1142
1159
  });
1143
1160
  return possible === false ? false : void 0;
1144
1161
  }
@@ -1194,14 +1211,14 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1194
1211
  }, {
1195
1212
  key: "onAfterRemoveRow",
1196
1213
  value: function onAfterRemoveRow(row, amount, physicalRows, source) {
1197
- var _this19 = this;
1214
+ var _this18 = this;
1198
1215
  if (isBlockedSource(source)) {
1199
1216
  return;
1200
1217
  }
1201
1218
  var descendingHfRows = this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse();
1202
1219
  var changes = this.engine.batch(function () {
1203
1220
  descendingHfRows.forEach(function (hfRow) {
1204
- _this19.engine.removeRows(_this19.sheetId, [hfRow, 1]);
1221
+ _this18.engine.removeRows(_this18.sheetId, [hfRow, 1]);
1205
1222
  });
1206
1223
  });
1207
1224
  this.renderDependentSheets(changes);
@@ -1220,14 +1237,14 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1220
1237
  }, {
1221
1238
  key: "onAfterRemoveCol",
1222
1239
  value: function onAfterRemoveCol(col, amount, physicalColumns, source) {
1223
- var _this20 = this;
1240
+ var _this19 = this;
1224
1241
  if (isBlockedSource(source)) {
1225
1242
  return;
1226
1243
  }
1227
1244
  var descendingHfColumns = this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse();
1228
1245
  var changes = this.engine.batch(function () {
1229
1246
  descendingHfColumns.forEach(function (hfColumn) {
1230
- _this20.engine.removeColumns(_this20.sheetId, [hfColumn, 1]);
1247
+ _this19.engine.removeColumns(_this19.sheetId, [hfColumn, 1]);
1231
1248
  });
1232
1249
  });
1233
1250
  this.renderDependentSheets(changes);
@@ -1246,16 +1263,16 @@ var Formulas = /*#__PURE__*/function (_BasePlugin) {
1246
1263
  key: "onAfterDetachChild",
1247
1264
  value: function onAfterDetachChild(parent, element, finalElementRowIndex) {
1248
1265
  var _element$__children,
1249
- _this21 = this;
1266
+ _this20 = this;
1250
1267
  _classPrivateFieldSet(this, _internalOperationPending, true);
1251
1268
  var rowsData = this.hot.getSourceDataArray(finalElementRowIndex, 0, finalElementRowIndex + (((_element$__children = element.__children) === null || _element$__children === void 0 ? void 0 : _element$__children.length) || 0), this.hot.countSourceCols());
1252
1269
  _classPrivateFieldSet(this, _internalOperationPending, false);
1253
1270
  rowsData.forEach(function (row, relativeRowIndex) {
1254
1271
  row.forEach(function (value, colIndex) {
1255
- _this21.engine.setCellContents({
1272
+ _this20.engine.setCellContents({
1256
1273
  col: colIndex,
1257
1274
  row: finalElementRowIndex + relativeRowIndex,
1258
- sheet: _this21.sheetId
1275
+ sheet: _this20.sheetId
1259
1276
  }, [[value]]);
1260
1277
  });
1261
1278
  });
@@ -2,8 +2,6 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
2
2
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
4
4
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
5
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
6
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
7
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -40,9 +38,6 @@ import "core-js/modules/es.symbol.iterator.js";
40
38
  import "core-js/modules/es.function.name.js";
41
39
  import "core-js/modules/es.array.from.js";
42
40
  import "core-js/modules/es.regexp.exec.js";
43
- import "core-js/modules/es.object.keys.js";
44
- import "core-js/modules/es.array.filter.js";
45
- import "core-js/modules/es.object.get-own-property-descriptors.js";
46
41
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
47
42
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
48
43
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -719,19 +714,41 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
719
714
  }, {
720
715
  key: "onBeforeAutofill",
721
716
  value: function onBeforeAutofill(fillData, sourceRange, targetRange) {
722
- var _this13 = this;
723
- var withSheetId = function withSheetId(range) {
724
- return _objectSpread(_objectSpread({}, range), {}, {
725
- sheet: _this13.sheetId
726
- });
727
- };
717
+ var _sourceRange$getTopSt = sourceRange.getTopStartCorner(),
718
+ sourceTopStartRow = _sourceRange$getTopSt.row,
719
+ sourceTopStartColumn = _sourceRange$getTopSt.col;
720
+ var _sourceRange$getBotto = sourceRange.getBottomEndCorner(),
721
+ sourceBottomEndRow = _sourceRange$getBotto.row,
722
+ sourceBottomEndColumn = _sourceRange$getBotto.col;
723
+ var _targetRange$getTopSt = targetRange.getTopStartCorner(),
724
+ targetTopStartRow = _targetRange$getTopSt.row,
725
+ targetTopStartColumn = _targetRange$getTopSt.col;
726
+ var _targetRange$getBotto = targetRange.getBottomEndCorner(),
727
+ targetBottomEndRow = _targetRange$getBotto.row,
728
+ targetBottomEndColumn = _targetRange$getBotto.col;
728
729
  var engineSourceRange = {
729
- start: withSheetId(sourceRange.getTopStartCorner()),
730
- end: withSheetId(sourceRange.getBottomEndCorner())
730
+ start: {
731
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(sourceTopStartRow),
732
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(sourceTopStartColumn),
733
+ sheet: this.sheetId
734
+ },
735
+ end: {
736
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(sourceBottomEndRow),
737
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(sourceBottomEndColumn),
738
+ sheet: this.sheetId
739
+ }
731
740
  };
732
741
  var engineTargetRange = {
733
- start: withSheetId(targetRange.getTopStartCorner()),
734
- end: withSheetId(targetRange.getBottomEndCorner())
742
+ start: {
743
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(targetTopStartRow),
744
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(targetTopStartColumn),
745
+ sheet: this.sheetId
746
+ },
747
+ end: {
748
+ row: this.rowAxisSyncer.getHfIndexFromVisualIndex(targetBottomEndRow),
749
+ col: this.columnAxisSyncer.getHfIndexFromVisualIndex(targetBottomEndColumn),
750
+ sheet: this.sheetId
751
+ }
735
752
  };
736
753
 
737
754
  // Blocks the autofill operation if HyperFormula says that at least one of
@@ -797,19 +814,19 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
797
814
  }, {
798
815
  key: "onAfterCellMetaReset",
799
816
  value: function onAfterCellMetaReset() {
800
- var _this14 = this;
817
+ var _this13 = this;
801
818
  var sourceDataArray = this.hot.getSourceDataArray();
802
819
  var valueChanged = false;
803
820
  sourceDataArray.forEach(function (rowData, rowIndex) {
804
821
  rowData.forEach(function (cellValue, columnIndex) {
805
- var cellMeta = _this14.hot.getCellMeta(rowIndex, columnIndex);
822
+ var cellMeta = _this13.hot.getCellMeta(rowIndex, columnIndex);
806
823
  var dateFormat = cellMeta.dateFormat;
807
824
  if (isDate(cellValue, cellMeta.type)) {
808
825
  valueChanged = true;
809
826
  if (isDateValid(cellValue, dateFormat)) {
810
827
  // Rewriting date in HOT format to HF format.
811
828
  sourceDataArray[rowIndex][columnIndex] = getDateInHfFormat(cellValue, dateFormat);
812
- } else if (_this14.isFormulaCellType(rowIndex, columnIndex) === false) {
829
+ } else if (_this13.isFormulaCellType(rowIndex, columnIndex) === false) {
813
830
  // Escaping value from date parsing using "'" sign (HF feature).
814
831
  sourceDataArray[rowIndex][columnIndex] = "'".concat(cellValue);
815
832
  }
@@ -959,7 +976,7 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
959
976
  }, {
960
977
  key: "onAfterSetDataAtCell",
961
978
  value: function onAfterSetDataAtCell(changes, source) {
962
- var _this15 = this;
979
+ var _this14 = this;
963
980
  if (isBlockedSource(source)) {
964
981
  return;
965
982
  }
@@ -971,16 +988,16 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
971
988
  visualRow = _ref10[0],
972
989
  prop = _ref10[1],
973
990
  newValue = _ref10[3];
974
- var visualColumn = _this15.hot.propToCol(prop);
975
- var physicalRow = _this15.hot.toPhysicalRow(visualRow);
976
- var physicalColumn = _this15.hot.toPhysicalColumn(visualColumn);
991
+ var visualColumn = _this14.hot.propToCol(prop);
992
+ var physicalRow = _this14.hot.toPhysicalRow(visualRow);
993
+ var physicalColumn = _this14.hot.toPhysicalColumn(visualColumn);
977
994
  var address = {
978
- row: _this15.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
979
- col: _this15.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
980
- sheet: _this15.sheetId
995
+ row: _this14.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
996
+ col: _this14.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
997
+ sheet: _this14.sheetId
981
998
  };
982
999
  if (physicalRow !== null && physicalColumn !== null) {
983
- _this15.syncChangeWithEngine(visualRow, visualColumn, newValue);
1000
+ _this14.syncChangeWithEngine(visualRow, visualColumn, newValue);
984
1001
  } else {
985
1002
  outOfBoundsChanges.push([visualRow, visualColumn, newValue]);
986
1003
  }
@@ -993,16 +1010,16 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
993
1010
  // Workaround for rows/columns being created two times (by HOT and the engine).
994
1011
  // (unfortunately, this requires an extra re-render)
995
1012
  this.hot.addHookOnce('afterChange', function () {
996
- var outOfBoundsDependentCells = _this15.engine.batch(function () {
1013
+ var outOfBoundsDependentCells = _this14.engine.batch(function () {
997
1014
  outOfBoundsChanges.forEach(function (_ref11) {
998
1015
  var _ref12 = _slicedToArray(_ref11, 3),
999
1016
  row = _ref12[0],
1000
1017
  column = _ref12[1],
1001
1018
  newValue = _ref12[2];
1002
- _this15.syncChangeWithEngine(row, column, newValue);
1019
+ _this14.syncChangeWithEngine(row, column, newValue);
1003
1020
  });
1004
1021
  });
1005
- _this15.renderDependentSheets(outOfBoundsDependentCells, true);
1022
+ _this14.renderDependentSheets(outOfBoundsDependentCells, true);
1006
1023
  });
1007
1024
  }
1008
1025
  this.renderDependentSheets(dependentCells);
@@ -1020,7 +1037,7 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1020
1037
  }, {
1021
1038
  key: "onAfterSetSourceDataAtCell",
1022
1039
  value: function onAfterSetSourceDataAtCell(changes, source) {
1023
- var _this16 = this;
1040
+ var _this15 = this;
1024
1041
  if (isBlockedSource(source)) {
1025
1042
  return;
1026
1043
  }
@@ -1031,23 +1048,23 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1031
1048
  visualRow = _ref14[0],
1032
1049
  prop = _ref14[1],
1033
1050
  newValue = _ref14[3];
1034
- var visualColumn = _this16.hot.propToCol(prop);
1051
+ var visualColumn = _this15.hot.propToCol(prop);
1035
1052
  if (!isNumeric(visualColumn)) {
1036
1053
  return;
1037
1054
  }
1038
1055
  var address = {
1039
- row: _this16.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
1040
- col: _this16.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
1041
- sheet: _this16.sheetId
1056
+ row: _this15.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow),
1057
+ col: _this15.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn),
1058
+ sheet: _this15.sheetId
1042
1059
  };
1043
- if (!_this16.engine.isItPossibleToSetCellContents(address)) {
1060
+ if (!_this15.engine.isItPossibleToSetCellContents(address)) {
1044
1061
  warn("Not possible to set source cell data at ".concat(JSON.stringify(address)));
1045
1062
  return;
1046
1063
  }
1047
1064
  changedCells.push({
1048
1065
  address: address
1049
1066
  });
1050
- dependentCells.push.apply(dependentCells, _toConsumableArray(_this16.engine.setCellContents(address, newValue)));
1067
+ dependentCells.push.apply(dependentCells, _toConsumableArray(_this15.engine.setCellContents(address, newValue)));
1051
1068
  });
1052
1069
  this.renderDependentSheets(dependentCells);
1053
1070
  this.validateDependentCells(dependentCells, changedCells);
@@ -1107,10 +1124,10 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1107
1124
  }, {
1108
1125
  key: "onBeforeRemoveRow",
1109
1126
  value: function onBeforeRemoveRow(row, amount, physicalRows) {
1110
- var _this17 = this;
1127
+ var _this16 = this;
1111
1128
  var hfRows = this.rowAxisSyncer.setRemovedHfIndexes(physicalRows);
1112
1129
  var possible = hfRows.every(function (hfRow) {
1113
- return _this17.engine.isItPossibleToRemoveRows(_this17.sheetId, [hfRow, 1]);
1130
+ return _this16.engine.isItPossibleToRemoveRows(_this16.sheetId, [hfRow, 1]);
1114
1131
  });
1115
1132
  return possible === false ? false : void 0;
1116
1133
  }
@@ -1127,10 +1144,10 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1127
1144
  }, {
1128
1145
  key: "onBeforeRemoveCol",
1129
1146
  value: function onBeforeRemoveCol(col, amount, physicalColumns) {
1130
- var _this18 = this;
1147
+ var _this17 = this;
1131
1148
  var hfColumns = this.columnAxisSyncer.setRemovedHfIndexes(physicalColumns);
1132
1149
  var possible = hfColumns.every(function (hfColumn) {
1133
- return _this18.engine.isItPossibleToRemoveColumns(_this18.sheetId, [hfColumn, 1]);
1150
+ return _this17.engine.isItPossibleToRemoveColumns(_this17.sheetId, [hfColumn, 1]);
1134
1151
  });
1135
1152
  return possible === false ? false : void 0;
1136
1153
  }
@@ -1186,14 +1203,14 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1186
1203
  }, {
1187
1204
  key: "onAfterRemoveRow",
1188
1205
  value: function onAfterRemoveRow(row, amount, physicalRows, source) {
1189
- var _this19 = this;
1206
+ var _this18 = this;
1190
1207
  if (isBlockedSource(source)) {
1191
1208
  return;
1192
1209
  }
1193
1210
  var descendingHfRows = this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse();
1194
1211
  var changes = this.engine.batch(function () {
1195
1212
  descendingHfRows.forEach(function (hfRow) {
1196
- _this19.engine.removeRows(_this19.sheetId, [hfRow, 1]);
1213
+ _this18.engine.removeRows(_this18.sheetId, [hfRow, 1]);
1197
1214
  });
1198
1215
  });
1199
1216
  this.renderDependentSheets(changes);
@@ -1212,14 +1229,14 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1212
1229
  }, {
1213
1230
  key: "onAfterRemoveCol",
1214
1231
  value: function onAfterRemoveCol(col, amount, physicalColumns, source) {
1215
- var _this20 = this;
1232
+ var _this19 = this;
1216
1233
  if (isBlockedSource(source)) {
1217
1234
  return;
1218
1235
  }
1219
1236
  var descendingHfColumns = this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse();
1220
1237
  var changes = this.engine.batch(function () {
1221
1238
  descendingHfColumns.forEach(function (hfColumn) {
1222
- _this20.engine.removeColumns(_this20.sheetId, [hfColumn, 1]);
1239
+ _this19.engine.removeColumns(_this19.sheetId, [hfColumn, 1]);
1223
1240
  });
1224
1241
  });
1225
1242
  this.renderDependentSheets(changes);
@@ -1238,16 +1255,16 @@ export var Formulas = /*#__PURE__*/function (_BasePlugin) {
1238
1255
  key: "onAfterDetachChild",
1239
1256
  value: function onAfterDetachChild(parent, element, finalElementRowIndex) {
1240
1257
  var _element$__children,
1241
- _this21 = this;
1258
+ _this20 = this;
1242
1259
  _classPrivateFieldSet(this, _internalOperationPending, true);
1243
1260
  var rowsData = this.hot.getSourceDataArray(finalElementRowIndex, 0, finalElementRowIndex + (((_element$__children = element.__children) === null || _element$__children === void 0 ? void 0 : _element$__children.length) || 0), this.hot.countSourceCols());
1244
1261
  _classPrivateFieldSet(this, _internalOperationPending, false);
1245
1262
  rowsData.forEach(function (row, relativeRowIndex) {
1246
1263
  row.forEach(function (value, colIndex) {
1247
- _this21.engine.setCellContents({
1264
+ _this20.engine.setCellContents({
1248
1265
  col: colIndex,
1249
1266
  row: finalElementRowIndex + relativeRowIndex,
1250
- sheet: _this21.sheetId
1267
+ sheet: _this20.sheetId
1251
1268
  }, [[value]]);
1252
1269
  });
1253
1270
  });