handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-85c3085-20230713

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.

Files changed (133) hide show
  1. package/3rdparty/walkontable/src/cell/coords.js +37 -22
  2. package/3rdparty/walkontable/src/cell/coords.mjs +37 -22
  3. package/3rdparty/walkontable/src/cell/range.js +54 -39
  4. package/3rdparty/walkontable/src/cell/range.mjs +54 -39
  5. package/3rdparty/walkontable/src/core/_base.js +33 -31
  6. package/3rdparty/walkontable/src/core/_base.mjs +33 -31
  7. package/3rdparty/walkontable/src/core/clone.js +6 -3
  8. package/3rdparty/walkontable/src/core/clone.mjs +6 -3
  9. package/3rdparty/walkontable/src/event.js +2 -1
  10. package/3rdparty/walkontable/src/event.mjs +2 -1
  11. package/3rdparty/walkontable/src/overlay/_base.js +10 -8
  12. package/3rdparty/walkontable/src/overlay/_base.mjs +10 -8
  13. package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
  14. package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
  15. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
  16. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -1
  17. package/3rdparty/walkontable/src/overlay/top.js +11 -9
  18. package/3rdparty/walkontable/src/overlay/top.mjs +11 -9
  19. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
  20. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
  21. package/3rdparty/walkontable/src/overlays.js +75 -80
  22. package/3rdparty/walkontable/src/overlays.mjs +75 -80
  23. package/3rdparty/walkontable/src/scroll.js +27 -24
  24. package/3rdparty/walkontable/src/scroll.mjs +27 -24
  25. package/3rdparty/walkontable/src/settings.js +18 -17
  26. package/3rdparty/walkontable/src/settings.mjs +18 -17
  27. package/3rdparty/walkontable/src/table.js +42 -37
  28. package/3rdparty/walkontable/src/table.mjs +42 -37
  29. package/base.js +2 -2
  30. package/base.mjs +2 -2
  31. package/core.js +8 -8
  32. package/core.mjs +8 -8
  33. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
  34. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
  35. package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
  36. package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
  37. package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
  38. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
  39. package/dataMap/metaManager/utils.js +4 -2
  40. package/dataMap/metaManager/utils.mjs +4 -2
  41. package/dist/handsontable.css +2 -2
  42. package/dist/handsontable.full.css +2 -2
  43. package/dist/handsontable.full.js +3247 -2847
  44. package/dist/handsontable.full.min.css +2 -2
  45. package/dist/handsontable.full.min.js +17 -17
  46. package/dist/handsontable.js +3249 -2849
  47. package/dist/handsontable.min.css +2 -2
  48. package/dist/handsontable.min.js +17 -17
  49. package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
  50. package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
  51. package/editors/baseEditor/baseEditor.js +1 -1
  52. package/editors/baseEditor/baseEditor.mjs +1 -1
  53. package/editors/dateEditor/dateEditor.js +2 -1
  54. package/editors/dateEditor/dateEditor.mjs +2 -1
  55. package/helpers/mixed.js +1 -1
  56. package/helpers/mixed.mjs +1 -1
  57. package/helpers/object.js +1 -0
  58. package/helpers/object.mjs +1 -0
  59. package/index.js +5 -5
  60. package/index.mjs +5 -5
  61. package/package.json +1 -1
  62. package/plugins/autoColumnSize/autoColumnSize.js +4 -1
  63. package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
  64. package/plugins/collapsibleColumns/collapsibleColumns.js +54 -38
  65. package/plugins/collapsibleColumns/collapsibleColumns.mjs +54 -38
  66. package/plugins/columnSorting/columnSorting.js +2 -1
  67. package/plugins/columnSorting/columnSorting.mjs +2 -1
  68. package/plugins/columnSorting/columnStatesManager.js +2 -1
  69. package/plugins/columnSorting/columnStatesManager.mjs +2 -1
  70. package/plugins/comments/comments.js +2 -2
  71. package/plugins/comments/comments.mjs +2 -2
  72. package/plugins/copyPaste/copyPaste.js +6 -4
  73. package/plugins/copyPaste/copyPaste.mjs +6 -4
  74. package/plugins/customBorders/customBorders.js +13 -9
  75. package/plugins/customBorders/customBorders.mjs +13 -9
  76. package/plugins/customBorders/utils.js +3 -3
  77. package/plugins/customBorders/utils.mjs +3 -3
  78. package/plugins/filters/conditionCollection.js +6 -5
  79. package/plugins/filters/conditionCollection.mjs +6 -5
  80. package/plugins/filters/filters.js +13 -7
  81. package/plugins/filters/filters.mjs +13 -7
  82. package/plugins/formulas/engine/register.js +3 -3
  83. package/plugins/formulas/engine/register.mjs +3 -3
  84. package/plugins/formulas/engine/settings.js +6 -3
  85. package/plugins/formulas/engine/settings.mjs +6 -3
  86. package/plugins/formulas/formulas.js +151 -143
  87. package/plugins/formulas/formulas.mjs +151 -143
  88. package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
  89. package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
  90. package/plugins/formulas/indexSyncer/index.js +100 -64
  91. package/plugins/formulas/indexSyncer/index.mjs +100 -64
  92. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
  93. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
  94. package/plugins/hiddenColumns/hiddenColumns.js +51 -34
  95. package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
  96. package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
  97. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
  98. package/plugins/hiddenRows/hiddenRows.js +50 -33
  99. package/plugins/hiddenRows/hiddenRows.mjs +50 -33
  100. package/plugins/manualRowResize/manualRowResize.js +2 -1
  101. package/plugins/manualRowResize/manualRowResize.mjs +2 -1
  102. package/plugins/mergeCells/mergeCells.js +1 -1
  103. package/plugins/mergeCells/mergeCells.mjs +1 -1
  104. package/plugins/nestedHeaders/nestedHeaders.js +88 -67
  105. package/plugins/nestedHeaders/nestedHeaders.mjs +87 -66
  106. package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
  107. package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
  108. package/plugins/nestedHeaders/stateManager/index.js +70 -49
  109. package/plugins/nestedHeaders/stateManager/index.mjs +68 -47
  110. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
  111. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
  112. package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
  113. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
  114. package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
  115. package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
  116. package/plugins/nestedRows/data/dataManager.js +4 -2
  117. package/plugins/nestedRows/data/dataManager.mjs +4 -2
  118. package/plugins/persistentState/storage.js +1 -0
  119. package/plugins/persistentState/storage.mjs +1 -0
  120. package/plugins/undoRedo/undoRedo.js +2 -1
  121. package/plugins/undoRedo/undoRedo.mjs +2 -1
  122. package/selection/highlight/visualSelection.js +10 -6
  123. package/selection/highlight/visualSelection.mjs +10 -6
  124. package/tableView.js +98 -80
  125. package/tableView.mjs +98 -80
  126. package/translations/changesObservable/observable.js +82 -54
  127. package/translations/changesObservable/observable.mjs +82 -54
  128. package/translations/changesObservable/observer.js +24 -11
  129. package/translations/changesObservable/observer.mjs +24 -11
  130. package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
  131. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
  132. package/utils/dataStructures/tree.js +21 -18
  133. package/utils/dataStructures/tree.mjs +21 -18
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.error.cause.js");
3
4
  exports.__esModule = true;
5
+ require("core-js/modules/es.json.stringify.js");
4
6
  require("core-js/modules/es.array.push.js");
5
7
  var _base = require("../base");
6
8
  var _staticRegister = _interopRequireDefault(require("../../utils/staticRegister"));
@@ -15,6 +17,16 @@ var _string = require("../../helpers/string");
15
17
  var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
16
18
  var _indexSyncer = _interopRequireDefault(require("./indexSyncer"));
17
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
22
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
23
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
24
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
25
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
26
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
27
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
28
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
29
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
18
30
  const PLUGIN_KEY = 'formulas';
19
31
  exports.PLUGIN_KEY = PLUGIN_KEY;
20
32
  const SETTING_KEYS = ['maxRows', 'maxColumns', 'language'];
@@ -44,7 +56,94 @@ const isBlockedSource = source => source === 'UndoRedo.undo' || source === 'Undo
44
56
  * @plugin Formulas
45
57
  * @class Formulas
46
58
  */
59
+ var _internalOperationPending = /*#__PURE__*/new WeakMap();
60
+ var _hotWasInitializedWithEmptyData = /*#__PURE__*/new WeakMap();
61
+ var _engineListeners = /*#__PURE__*/new WeakMap();
47
62
  class Formulas extends _base.BasePlugin {
63
+ constructor() {
64
+ var _this;
65
+ super(...arguments);
66
+ _this = this;
67
+ /**
68
+ * Flag used to bypass hooks in internal operations.
69
+ *
70
+ * @private
71
+ * @type {boolean}
72
+ */
73
+ _classPrivateFieldInitSpec(this, _internalOperationPending, {
74
+ writable: true,
75
+ value: false
76
+ });
77
+ /**
78
+ * Flag needed to mark if Handsontable was initialized with no data.
79
+ * (Required to work around the fact, that Handsontable auto-generates sample data, when no data is provided).
80
+ *
81
+ * @type {boolean}
82
+ */
83
+ _classPrivateFieldInitSpec(this, _hotWasInitializedWithEmptyData, {
84
+ writable: true,
85
+ value: false
86
+ });
87
+ /**
88
+ * The list of the HyperFormula listeners.
89
+ *
90
+ * @type {Array}
91
+ */
92
+ _classPrivateFieldInitSpec(this, _engineListeners, {
93
+ writable: true,
94
+ value: [['valuesUpdated', function () {
95
+ return _this.onEngineValuesUpdated(...arguments);
96
+ }], ['namedExpressionAdded', function () {
97
+ return _this.onEngineNamedExpressionsAdded(...arguments);
98
+ }], ['namedExpressionRemoved', function () {
99
+ return _this.onEngineNamedExpressionsRemoved(...arguments);
100
+ }], ['sheetAdded', function () {
101
+ return _this.onEngineSheetAdded(...arguments);
102
+ }], ['sheetRenamed', function () {
103
+ return _this.onEngineSheetRenamed(...arguments);
104
+ }], ['sheetRemoved', function () {
105
+ return _this.onEngineSheetRemoved(...arguments);
106
+ }]]
107
+ });
108
+ /**
109
+ * Static register used to set up one global HyperFormula instance.
110
+ * TODO: currently used in tests, might be removed later.
111
+ *
112
+ * @private
113
+ * @type {object}
114
+ */
115
+ _defineProperty(this, "staticRegister", (0, _staticRegister.default)('formulas'));
116
+ /**
117
+ * The engine instance that will be used for this instance of Handsontable.
118
+ *
119
+ * @type {HyperFormula|null}
120
+ */
121
+ _defineProperty(this, "engine", null);
122
+ /**
123
+ * HyperFormula's sheet name.
124
+ *
125
+ * @type {string|null}
126
+ */
127
+ _defineProperty(this, "sheetName", null);
128
+ /**
129
+ * Index synchronizer responsible for manipulating with some general options related to indexes synchronization.
130
+ *
131
+ * @type {IndexSyncer|null}
132
+ */
133
+ _defineProperty(this, "indexSyncer", null);
134
+ /**
135
+ * Index synchronizer responsible for syncing the order of HOT and HF's data for the axis of the rows.
136
+ *
137
+ * @type {AxisSyncer|null}
138
+ */
139
+ _defineProperty(this, "rowAxisSyncer", null);
140
+ /**
141
+ * Index synchronizer responsible for syncing the order of HOT and HF's data for the axis of the columns.
142
+ *
143
+ * @type {AxisSyncer|null}
144
+ */
145
+ _defineProperty(this, "columnAxisSyncer", null);
146
+ }
48
147
  static get PLUGIN_KEY() {
49
148
  return PLUGIN_KEY;
50
149
  }
@@ -54,101 +153,6 @@ class Formulas extends _base.BasePlugin {
54
153
  static get SETTING_KEYS() {
55
154
  return [PLUGIN_KEY, ...SETTING_KEYS];
56
155
  }
57
-
58
- /**
59
- * Flag used to bypass hooks in internal operations.
60
- *
61
- * @private
62
- * @type {boolean}
63
- */
64
- #internalOperationPending = false;
65
-
66
- /**
67
- * Flag needed to mark if Handsontable was initialized with no data.
68
- * (Required to work around the fact, that Handsontable auto-generates sample data, when no data is provided).
69
- *
70
- * @type {boolean}
71
- */
72
- #hotWasInitializedWithEmptyData = false;
73
-
74
- /**
75
- * The list of the HyperFormula listeners.
76
- *
77
- * @type {Array}
78
- */
79
- #engineListeners = [['valuesUpdated', (() => {
80
- var _this = this;
81
- return function () {
82
- return _this.onEngineValuesUpdated(...arguments);
83
- };
84
- })()], ['namedExpressionAdded', (() => {
85
- var _this2 = this;
86
- return function () {
87
- return _this2.onEngineNamedExpressionsAdded(...arguments);
88
- };
89
- })()], ['namedExpressionRemoved', (() => {
90
- var _this3 = this;
91
- return function () {
92
- return _this3.onEngineNamedExpressionsRemoved(...arguments);
93
- };
94
- })()], ['sheetAdded', (() => {
95
- var _this4 = this;
96
- return function () {
97
- return _this4.onEngineSheetAdded(...arguments);
98
- };
99
- })()], ['sheetRenamed', (() => {
100
- var _this5 = this;
101
- return function () {
102
- return _this5.onEngineSheetRenamed(...arguments);
103
- };
104
- })()], ['sheetRemoved', (() => {
105
- var _this6 = this;
106
- return function () {
107
- return _this6.onEngineSheetRemoved(...arguments);
108
- };
109
- })()]];
110
-
111
- /**
112
- * Static register used to set up one global HyperFormula instance.
113
- * TODO: currently used in tests, might be removed later.
114
- *
115
- * @private
116
- * @type {object}
117
- */
118
- staticRegister = (0, _staticRegister.default)('formulas');
119
-
120
- /**
121
- * The engine instance that will be used for this instance of Handsontable.
122
- *
123
- * @type {HyperFormula|null}
124
- */
125
- engine = null;
126
-
127
- /**
128
- * HyperFormula's sheet name.
129
- *
130
- * @type {string|null}
131
- */
132
- sheetName = null;
133
- /**
134
- * Index synchronizer responsible for manipulating with some general options related to indexes synchronization.
135
- *
136
- * @type {IndexSyncer|null}
137
- */
138
- indexSyncer = null;
139
- /**
140
- * Index synchronizer responsible for syncing the order of HOT and HF's data for the axis of the rows.
141
- *
142
- * @type {AxisSyncer|null}
143
- */
144
- rowAxisSyncer = null;
145
- /**
146
- * Index synchronizer responsible for syncing the order of HOT and HF's data for the axis of the columns.
147
- *
148
- * @type {AxisSyncer|null}
149
- */
150
- columnAxisSyncer = null;
151
-
152
156
  /**
153
157
  * HyperFormula's sheet id.
154
158
  *
@@ -174,11 +178,11 @@ class Formulas extends _base.BasePlugin {
174
178
  */
175
179
  enablePlugin() {
176
180
  var _setupEngine,
177
- _this7 = this;
181
+ _this2 = this;
178
182
  if (this.enabled) {
179
183
  return;
180
184
  }
181
- this.engine = (_setupEngine = (0, _register.setupEngine)(this.hot)) != null ? _setupEngine : this.engine;
185
+ this.engine = (_setupEngine = (0, _register.setupEngine)(this.hot)) !== null && _setupEngine !== void 0 ? _setupEngine : this.engine;
182
186
  if (!this.engine) {
183
187
  (0, _console.warn)('Missing the required `engine` key in the Formulas settings. Please fill it with either an' + ' engine class or an engine instance.');
184
188
  return;
@@ -192,60 +196,60 @@ class Formulas extends _base.BasePlugin {
192
196
  }
193
197
  }
194
198
  this.addHook('beforeLoadData', function () {
195
- return _this7.onBeforeLoadData(...arguments);
199
+ return _this2.onBeforeLoadData(...arguments);
196
200
  });
197
201
  this.addHook('afterLoadData', function () {
198
- return _this7.onAfterLoadData(...arguments);
202
+ return _this2.onAfterLoadData(...arguments);
199
203
  });
200
204
 
201
205
  // The `updateData` hooks utilize the same logic as the `loadData` hooks.
202
206
  this.addHook('beforeUpdateData', function () {
203
- return _this7.onBeforeLoadData(...arguments);
207
+ return _this2.onBeforeLoadData(...arguments);
204
208
  });
205
209
  this.addHook('afterUpdateData', function () {
206
- return _this7.onAfterLoadData(...arguments);
210
+ return _this2.onAfterLoadData(...arguments);
207
211
  });
208
212
  this.addHook('modifyData', function () {
209
- return _this7.onModifyData(...arguments);
213
+ return _this2.onModifyData(...arguments);
210
214
  });
211
215
  this.addHook('modifySourceData', function () {
212
- return _this7.onModifySourceData(...arguments);
216
+ return _this2.onModifySourceData(...arguments);
213
217
  });
214
218
  this.addHook('beforeValidate', function () {
215
- return _this7.onBeforeValidate(...arguments);
219
+ return _this2.onBeforeValidate(...arguments);
216
220
  });
217
221
  this.addHook('afterSetSourceDataAtCell', function () {
218
- return _this7.onAfterSetSourceDataAtCell(...arguments);
222
+ return _this2.onAfterSetSourceDataAtCell(...arguments);
219
223
  });
220
224
  this.addHook('afterSetDataAtCell', function () {
221
- return _this7.onAfterSetDataAtCell(...arguments);
225
+ return _this2.onAfterSetDataAtCell(...arguments);
222
226
  });
223
227
  this.addHook('afterSetDataAtRowProp', function () {
224
- return _this7.onAfterSetDataAtCell(...arguments);
228
+ return _this2.onAfterSetDataAtCell(...arguments);
225
229
  });
226
230
  this.addHook('beforeCreateRow', function () {
227
- return _this7.onBeforeCreateRow(...arguments);
231
+ return _this2.onBeforeCreateRow(...arguments);
228
232
  });
229
233
  this.addHook('beforeCreateCol', function () {
230
- return _this7.onBeforeCreateCol(...arguments);
234
+ return _this2.onBeforeCreateCol(...arguments);
231
235
  });
232
236
  this.addHook('afterCreateRow', function () {
233
- return _this7.onAfterCreateRow(...arguments);
237
+ return _this2.onAfterCreateRow(...arguments);
234
238
  });
235
239
  this.addHook('afterCreateCol', function () {
236
- return _this7.onAfterCreateCol(...arguments);
240
+ return _this2.onAfterCreateCol(...arguments);
237
241
  });
238
242
  this.addHook('beforeRemoveRow', function () {
239
- return _this7.onBeforeRemoveRow(...arguments);
243
+ return _this2.onBeforeRemoveRow(...arguments);
240
244
  });
241
245
  this.addHook('beforeRemoveCol', function () {
242
- return _this7.onBeforeRemoveCol(...arguments);
246
+ return _this2.onBeforeRemoveCol(...arguments);
243
247
  });
244
248
  this.addHook('afterRemoveRow', function () {
245
- return _this7.onAfterRemoveRow(...arguments);
249
+ return _this2.onAfterRemoveRow(...arguments);
246
250
  });
247
251
  this.addHook('afterRemoveCol', function () {
248
- return _this7.onAfterRemoveCol(...arguments);
252
+ return _this2.onAfterRemoveCol(...arguments);
249
253
  });
250
254
  this.indexSyncer = new _indexSyncer.default(this.hot.rowIndexMapper, this.hot.columnIndexMapper, postponedAction => {
251
255
  this.hot.addHookOnce('init', () => {
@@ -287,7 +291,7 @@ class Formulas extends _base.BasePlugin {
287
291
  // hook, because some hooks, such as `afterLoadData` doesn't have information about composed cell properties.
288
292
  // Another hooks are triggered to late for setting HF's engine data needed for some actions.
289
293
  this.addHook('afterCellMetaReset', function () {
290
- return _this7.onAfterCellMetaReset(...arguments);
294
+ return _this2.onAfterCellMetaReset(...arguments);
291
295
  });
292
296
 
293
297
  // Handling undo actions on data just using HyperFormula's UndoRedo mechanism
@@ -308,12 +312,12 @@ class Formulas extends _base.BasePlugin {
308
312
  this.indexSyncer.setPerformRedo(false);
309
313
  });
310
314
  this.addHook('afterDetachChild', function () {
311
- return _this7.onAfterDetachChild(...arguments);
315
+ return _this2.onAfterDetachChild(...arguments);
312
316
  });
313
317
  this.addHook('beforeAutofill', function () {
314
- return _this7.onBeforeAutofill(...arguments);
318
+ return _this2.onBeforeAutofill(...arguments);
315
319
  });
316
- this.#engineListeners.forEach(_ref => {
320
+ _classPrivateFieldGet(this, _engineListeners).forEach(_ref => {
317
321
  let [eventName, listener] = _ref;
318
322
  return this.engine.on(eventName, listener);
319
323
  });
@@ -324,7 +328,7 @@ class Formulas extends _base.BasePlugin {
324
328
  * Disables the plugin functionality for this Handsontable instance.
325
329
  */
326
330
  disablePlugin() {
327
- this.#engineListeners.forEach(_ref2 => {
331
+ _classPrivateFieldGet(this, _engineListeners).forEach(_ref2 => {
328
332
  let [eventName, listener] = _ref2;
329
333
  return this.engine.off(eventName, listener);
330
334
  });
@@ -356,7 +360,7 @@ class Formulas extends _base.BasePlugin {
356
360
  if (sheetName && this.engine.doesSheetExist(sheetName)) {
357
361
  this.switchSheet(this.sheetName);
358
362
  } else {
359
- this.sheetName = this.addSheet(sheetName != null ? sheetName : void 0, this.hot.getSourceDataArray());
363
+ this.sheetName = this.addSheet(sheetName !== null && sheetName !== void 0 ? sheetName : void 0, this.hot.getSourceDataArray());
360
364
  }
361
365
  }
362
366
  super.updatePlugin(newSettings);
@@ -366,11 +370,12 @@ class Formulas extends _base.BasePlugin {
366
370
  * Destroys the plugin instance.
367
371
  */
368
372
  destroy() {
369
- this.#engineListeners.forEach(_ref3 => {
373
+ _classPrivateFieldGet(this, _engineListeners).forEach(_ref3 => {
374
+ var _this$engine;
370
375
  let [eventName, listener] = _ref3;
371
- return this.engine?.off(eventName, listener);
376
+ return (_this$engine = this.engine) === null || _this$engine === void 0 ? void 0 : _this$engine.off(eventName, listener);
372
377
  });
373
- this.#engineListeners = null;
378
+ _classPrivateFieldSet(this, _engineListeners, null);
374
379
  (0, _register.unregisterEngine)(this.engine, this.hot);
375
380
  this.engine = null;
376
381
  super.destroy();
@@ -396,7 +401,7 @@ class Formulas extends _base.BasePlugin {
396
401
  return false;
397
402
  }
398
403
  try {
399
- const actualSheetName = this.engine.addSheet(sheetName != null ? sheetName : void 0);
404
+ const actualSheetName = this.engine.addSheet(sheetName !== null && sheetName !== void 0 ? sheetName : void 0);
400
405
  if (sheetData) {
401
406
  this.engine.setSheetContent(this.engine.getSheetId(actualSheetName), sheetData);
402
407
  }
@@ -478,8 +483,9 @@ class Formulas extends _base.BasePlugin {
478
483
  let renderSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
479
484
  const affectedSheetIds = new Set();
480
485
  dependentCells.forEach(change => {
486
+ var _change$address;
481
487
  // For the Named expression the address is empty, hence the `sheetId` is undefined.
482
- const sheetId = change?.address?.sheet;
488
+ const sheetId = change === null || change === void 0 || (_change$address = change.address) === null || _change$address === void 0 ? void 0 : _change$address.sheet;
483
489
  if (sheetId !== void 0) {
484
490
  if (!affectedSheetIds.has(sheetId)) {
485
491
  affectedSheetIds.add(sheetId);
@@ -488,8 +494,9 @@ class Formulas extends _base.BasePlugin {
488
494
  });
489
495
  (0, _register.getRegisteredHotInstances)(this.engine).forEach((relatedHot, sheetId) => {
490
496
  if ((renderSelf || sheetId !== this.sheetId) && affectedSheetIds.has(sheetId)) {
497
+ var _relatedHot$view;
491
498
  relatedHot.render();
492
- relatedHot.view?.adjustElementsSize();
499
+ (_relatedHot$view = relatedHot.view) === null || _relatedHot$view === void 0 ? void 0 : _relatedHot$view.adjustElementsSize();
493
500
  }
494
501
  });
495
502
  }
@@ -504,21 +511,21 @@ class Formulas extends _base.BasePlugin {
504
511
  validateDependentCells(dependentCells) {
505
512
  let changedCells = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
506
513
  const stringifyAddress = change => {
507
- var _change$address;
514
+ var _change$address2;
508
515
  const {
509
516
  row,
510
517
  col,
511
518
  sheet
512
- } = (_change$address = change?.address) != null ? _change$address : {};
519
+ } = (_change$address2 = change === null || change === void 0 ? void 0 : change.address) !== null && _change$address2 !== void 0 ? _change$address2 : {};
513
520
  return (0, _mixed.isDefined)(sheet) ? `${sheet}:${row}x${col}` : '';
514
521
  };
515
522
  const changedCellsSet = new Set(changedCells.map(change => stringifyAddress(change)));
516
523
  dependentCells.forEach(change => {
517
- var _change$address2;
524
+ var _change$address3, _change$address4;
518
525
  const {
519
526
  row,
520
527
  col
521
- } = (_change$address2 = change.address) != null ? _change$address2 : {};
528
+ } = (_change$address3 = change.address) !== null && _change$address3 !== void 0 ? _change$address3 : {};
522
529
 
523
530
  // Don't try to validate cells outside of the visual part of the table.
524
531
  if ((0, _mixed.isDefined)(row) === false || (0, _mixed.isDefined)(col) === false || row >= this.hot.countRows() || col >= this.hot.countCols()) {
@@ -526,7 +533,7 @@ class Formulas extends _base.BasePlugin {
526
533
  }
527
534
 
528
535
  // For the Named expression the address is empty, hence the `sheetId` is undefined.
529
- const sheetId = change?.address?.sheet;
536
+ const sheetId = change === null || change === void 0 || (_change$address4 = change.address) === null || _change$address4 === void 0 ? void 0 : _change$address4.sheet;
530
537
  const addressId = stringifyAddress(change);
531
538
 
532
539
  // Validate the cells that depend on the calculated formulas. Skip that cells
@@ -712,7 +719,7 @@ class Formulas extends _base.BasePlugin {
712
719
 
713
720
  // This flag needs to be defined, because not passing data to HOT results in HOT auto-generating a `null`-filled
714
721
  // initial dataset.
715
- this.#hotWasInitializedWithEmptyData = (0, _mixed.isUndefined)(this.hot.getSettings().data);
722
+ _classPrivateFieldSet(this, _hotWasInitializedWithEmptyData, (0, _mixed.isUndefined)(this.hot.getSettings().data));
716
723
  }
717
724
 
718
725
  /**
@@ -740,9 +747,9 @@ class Formulas extends _base.BasePlugin {
740
747
  });
741
748
  });
742
749
  if (valueChanged === true) {
743
- this.#internalOperationPending = true;
750
+ _classPrivateFieldSet(this, _internalOperationPending, true);
744
751
  this.engine.setSheetContent(this.sheetId, sourceDataArray);
745
- this.#internalOperationPending = false;
752
+ _classPrivateFieldSet(this, _internalOperationPending, false);
746
753
  }
747
754
  }
748
755
 
@@ -760,14 +767,14 @@ class Formulas extends _base.BasePlugin {
760
767
  return;
761
768
  }
762
769
  this.sheetName = (0, _register.setupSheet)(this.engine, this.hot.getSettings()[PLUGIN_KEY].sheetName);
763
- if (!this.#hotWasInitializedWithEmptyData) {
770
+ if (!_classPrivateFieldGet(this, _hotWasInitializedWithEmptyData)) {
764
771
  const sourceDataArray = this.hot.getSourceDataArray();
765
772
  if (this.engine.isItPossibleToReplaceSheetContent(this.sheetId, sourceDataArray)) {
766
- this.#internalOperationPending = true;
773
+ _classPrivateFieldSet(this, _internalOperationPending, true);
767
774
  const dependentCells = this.engine.setSheetContent(this.sheetId, sourceDataArray);
768
775
  this.indexSyncer.setupSyncEndpoint(this.engine, this.sheetId);
769
776
  this.renderDependentSheets(dependentCells);
770
- this.#internalOperationPending = false;
777
+ _classPrivateFieldSet(this, _internalOperationPending, false);
771
778
  }
772
779
  } else {
773
780
  this.switchSheet(this.sheetName);
@@ -785,7 +792,7 @@ class Formulas extends _base.BasePlugin {
785
792
  * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
786
793
  */
787
794
  onModifyData(physicalRow, visualColumn, valueHolder, ioMode) {
788
- if (ioMode !== 'get' || this.#internalOperationPending || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
795
+ if (ioMode !== 'get' || _classPrivateFieldGet(this, _internalOperationPending) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
789
796
  return;
790
797
  }
791
798
  const visualRow = this.hot.toVisualRow(physicalRow);
@@ -831,7 +838,7 @@ class Formulas extends _base.BasePlugin {
831
838
  * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
832
839
  */
833
840
  onModifySourceData(row, columnOrProp, valueHolder, ioMode) {
834
- if (ioMode !== 'get' || this.#internalOperationPending || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
841
+ if (ioMode !== 'get' || _classPrivateFieldGet(this, _internalOperationPending) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
835
842
  return;
836
843
  }
837
844
  const visualRow = this.hot.toVisualRow(row);
@@ -1117,9 +1124,10 @@ class Formulas extends _base.BasePlugin {
1117
1124
  * @param {number} finalElementRowIndex The final row index of the detached element.
1118
1125
  */
1119
1126
  onAfterDetachChild(parent, element, finalElementRowIndex) {
1120
- this.#internalOperationPending = true;
1121
- const rowsData = this.hot.getSourceDataArray(finalElementRowIndex, 0, finalElementRowIndex + (element.__children?.length || 0), this.hot.countSourceCols());
1122
- this.#internalOperationPending = false;
1127
+ var _element$__children;
1128
+ _classPrivateFieldSet(this, _internalOperationPending, true);
1129
+ const 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());
1130
+ _classPrivateFieldSet(this, _internalOperationPending, false);
1123
1131
  rowsData.forEach((row, relativeRowIndex) => {
1124
1132
  row.forEach((value, colIndex) => {
1125
1133
  this.engine.setCellContents({