handsontable 0.0.0-next-fad35d5-20240924 → 0.0.0-next-d7edb4b-20240927

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 (127) hide show
  1. package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.js +0 -23
  2. package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.mjs +0 -23
  3. package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.js +0 -23
  4. package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.mjs +0 -23
  5. package/3rdparty/walkontable/src/core/_base.js +0 -7
  6. package/3rdparty/walkontable/src/core/_base.mjs +0 -7
  7. package/3rdparty/walkontable/src/facade/core.js +0 -3
  8. package/3rdparty/walkontable/src/facade/core.mjs +0 -3
  9. package/3rdparty/walkontable/src/overlay/_base.js +0 -3
  10. package/3rdparty/walkontable/src/overlay/_base.mjs +0 -3
  11. package/3rdparty/walkontable/src/selection/border/border.js +45 -33
  12. package/3rdparty/walkontable/src/selection/border/border.mjs +46 -34
  13. package/3rdparty/walkontable/src/selection/scanner.js +11 -46
  14. package/3rdparty/walkontable/src/selection/scanner.mjs +11 -46
  15. package/3rdparty/walkontable/src/settings.js +0 -8
  16. package/3rdparty/walkontable/src/settings.mjs +0 -8
  17. package/3rdparty/walkontable/src/table/master.js +1 -1
  18. package/3rdparty/walkontable/src/table/master.mjs +2 -2
  19. package/3rdparty/walkontable/src/table.js +3 -6
  20. package/3rdparty/walkontable/src/table.mjs +3 -6
  21. package/3rdparty/walkontable/src/viewport.js +4 -26
  22. package/3rdparty/walkontable/src/viewport.mjs +4 -26
  23. package/base.js +4 -4
  24. package/base.mjs +3 -3
  25. package/core.d.ts +1 -1
  26. package/core.js +12 -13
  27. package/core.mjs +4 -5
  28. package/dataMap/metaManager/metaSchema.js +2 -68
  29. package/dataMap/metaManager/metaSchema.mjs +2 -68
  30. package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
  31. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +1 -1
  32. package/dist/handsontable.css +2 -2
  33. package/dist/handsontable.full.css +2 -2
  34. package/dist/handsontable.full.js +2685 -3046
  35. package/dist/handsontable.full.min.css +2 -2
  36. package/dist/handsontable.full.min.js +75 -75
  37. package/dist/handsontable.js +2687 -3048
  38. package/dist/handsontable.min.css +2 -2
  39. package/dist/handsontable.min.js +18 -18
  40. package/editorManager.js +2 -2
  41. package/editorManager.mjs +2 -2
  42. package/editors/autocompleteEditor/autocompleteEditor.js +31 -14
  43. package/editors/autocompleteEditor/autocompleteEditor.mjs +31 -14
  44. package/editors/baseEditor/baseEditor.js +17 -24
  45. package/editors/baseEditor/baseEditor.mjs +18 -25
  46. package/editors/dropdownEditor/dropdownEditor.js +3 -2
  47. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  48. package/editors/handsontableEditor/handsontableEditor.js +24 -0
  49. package/editors/handsontableEditor/handsontableEditor.mjs +24 -0
  50. package/editors/registry.js +2 -2
  51. package/editors/registry.mjs +1 -1
  52. package/editors/textEditor/textEditor.js +2 -2
  53. package/editors/textEditor/textEditor.mjs +3 -3
  54. package/helpers/dom/element.js +4 -17
  55. package/helpers/dom/element.mjs +4 -16
  56. package/helpers/mixed.js +1 -1
  57. package/helpers/mixed.mjs +1 -1
  58. package/index.d.ts +1 -2
  59. package/package.json +1 -1
  60. package/{core/hooks/index.d.ts → pluginHooks.d.ts} +21 -17
  61. package/{core/hooks/constants.mjs → pluginHooks.js} +489 -16
  62. package/{core/hooks/constants.js → pluginHooks.mjs} +486 -20
  63. package/plugins/autoColumnSize/autoColumnSize.js +27 -18
  64. package/plugins/autoColumnSize/autoColumnSize.mjs +27 -18
  65. package/plugins/autoRowSize/autoRowSize.js +22 -16
  66. package/plugins/autoRowSize/autoRowSize.mjs +23 -17
  67. package/plugins/autofill/autofill.js +5 -4
  68. package/plugins/autofill/autofill.mjs +1 -1
  69. package/plugins/base/base.d.ts +1 -1
  70. package/plugins/base/base.js +0 -39
  71. package/plugins/base/base.mjs +1 -40
  72. package/plugins/base/index.js +1 -2
  73. package/plugins/base/index.mjs +1 -1
  74. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -2
  75. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -2
  76. package/plugins/columnSorting/columnSorting.js +4 -3
  77. package/plugins/columnSorting/columnSorting.mjs +1 -1
  78. package/plugins/comments/comments.js +15 -7
  79. package/plugins/comments/comments.mjs +16 -8
  80. package/plugins/contextMenu/contextMenu.js +7 -6
  81. package/plugins/contextMenu/contextMenu.mjs +1 -1
  82. package/plugins/contextMenu/menu/menu.js +1 -1
  83. package/plugins/contextMenu/menu/menu.mjs +2 -2
  84. package/plugins/contextMenu/menu/positioner.js +4 -2
  85. package/plugins/contextMenu/menu/positioner.mjs +4 -2
  86. package/plugins/copyPaste/copyPaste.js +23 -29
  87. package/plugins/copyPaste/copyPaste.mjs +15 -21
  88. package/plugins/dropdownMenu/dropdownMenu.js +7 -6
  89. package/plugins/dropdownMenu/dropdownMenu.mjs +1 -1
  90. package/plugins/formulas/formulas.js +7 -7
  91. package/plugins/formulas/formulas.mjs +1 -1
  92. package/plugins/hiddenColumns/hiddenColumns.js +30 -19
  93. package/plugins/hiddenColumns/hiddenColumns.mjs +26 -15
  94. package/plugins/hiddenRows/hiddenRows.js +29 -18
  95. package/plugins/hiddenRows/hiddenRows.mjs +25 -14
  96. package/plugins/manualColumnFreeze/manualColumnFreeze.js +5 -5
  97. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +1 -1
  98. package/plugins/manualColumnMove/manualColumnMove.js +3 -3
  99. package/plugins/manualColumnMove/manualColumnMove.mjs +1 -1
  100. package/plugins/manualRowMove/manualRowMove.js +5 -5
  101. package/plugins/manualRowMove/manualRowMove.mjs +3 -3
  102. package/plugins/mergeCells/cellsCollection.js +3 -15
  103. package/plugins/mergeCells/cellsCollection.mjs +4 -16
  104. package/plugins/mergeCells/mergeCells.d.ts +2 -6
  105. package/plugins/mergeCells/mergeCells.js +55 -78
  106. package/plugins/mergeCells/mergeCells.mjs +53 -76
  107. package/plugins/mergeCells/renderer.js +3 -13
  108. package/plugins/mergeCells/renderer.mjs +3 -13
  109. package/plugins/persistentState/persistentState.js +4 -4
  110. package/plugins/persistentState/persistentState.mjs +1 -1
  111. package/plugins/undoRedo/undoRedo.js +5 -4
  112. package/plugins/undoRedo/undoRedo.mjs +3 -3
  113. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  114. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  115. package/settings.d.ts +1 -3
  116. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +1 -1
  117. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +1 -1
  118. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +1 -1
  119. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +1 -1
  120. package/shortcutContexts/commands/scrollToFocusedCell.js +4 -4
  121. package/shortcutContexts/commands/scrollToFocusedCell.mjs +4 -4
  122. package/tableView.js +43 -38
  123. package/tableView.mjs +43 -38
  124. package/core/hooks/bucket.js +0 -180
  125. package/core/hooks/bucket.mjs +0 -176
  126. package/core/hooks/index.js +0 -385
  127. package/core/hooks/index.mjs +0 -381
@@ -14,8 +14,10 @@ var _base = require("../base");
14
14
  var _element = require("../../helpers/dom/element");
15
15
  var _number = require("../../helpers/number");
16
16
  var _array = require("../../helpers/array");
17
+ var _object = require("../../helpers/object");
18
+ var _mixed = require("../../helpers/mixed");
17
19
  var _predefinedItems = require("../contextMenu/predefinedItems");
18
- var _hooks = require("../../core/hooks");
20
+ var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
19
21
  var _hideRow = _interopRequireDefault(require("./contextMenuItem/hideRow"));
20
22
  var _showRow = _interopRequireDefault(require("./contextMenuItem/showRow"));
21
23
  var _translations = require("../../translations");
@@ -26,10 +28,10 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
26
28
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
27
29
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
28
30
  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"); }
29
- _hooks.Hooks.getSingleton().register('beforeHideRows');
30
- _hooks.Hooks.getSingleton().register('afterHideRows');
31
- _hooks.Hooks.getSingleton().register('beforeUnhideRows');
32
- _hooks.Hooks.getSingleton().register('afterUnhideRows');
31
+ _pluginHooks.default.getSingleton().register('beforeHideRows');
32
+ _pluginHooks.default.getSingleton().register('afterHideRows');
33
+ _pluginHooks.default.getSingleton().register('beforeUnhideRows');
34
+ _pluginHooks.default.getSingleton().register('afterUnhideRows');
33
35
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'hiddenRows';
34
36
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 320;
35
37
 
@@ -139,6 +141,7 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 320;
139
141
  * ```
140
142
  * :::
141
143
  */
144
+ var _settings = /*#__PURE__*/new WeakMap();
142
145
  var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
143
146
  var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
144
147
  class HiddenRows extends _base.BasePlugin {
@@ -152,6 +155,13 @@ class HiddenRows extends _base.BasePlugin {
152
155
  * @returns {number}
153
156
  */
154
157
  _classPrivateMethodInitSpec(this, _HiddenRows_brand);
158
+ /**
159
+ * Cached settings from Handsontable settings.
160
+ *
161
+ * @private
162
+ * @type {object}
163
+ */
164
+ _classPrivateFieldInitSpec(this, _settings, {});
155
165
  /**
156
166
  * Map of hidden rows by the plugin.
157
167
  *
@@ -166,13 +176,6 @@ class HiddenRows extends _base.BasePlugin {
166
176
  static get PLUGIN_PRIORITY() {
167
177
  return PLUGIN_PRIORITY;
168
178
  }
169
- static get DEFAULT_SETTINGS() {
170
- return {
171
- copyPasteEnabled: true,
172
- indicators: false,
173
- rows: []
174
- };
175
- }
176
179
  /**
177
180
  * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
178
181
  * hook and if it returns `true` then the {@link HiddenRows#enablePlugin} method is called.
@@ -191,6 +194,13 @@ class HiddenRows extends _base.BasePlugin {
191
194
  if (this.enabled) {
192
195
  return;
193
196
  }
197
+ const pluginSettings = this.hot.getSettings()[PLUGIN_KEY];
198
+ if ((0, _object.isObject)(pluginSettings)) {
199
+ _classPrivateFieldSet(_settings, this, pluginSettings);
200
+ if ((0, _mixed.isUndefined)(pluginSettings.copyPasteEnabled)) {
201
+ pluginSettings.copyPasteEnabled = true;
202
+ }
203
+ }
194
204
  _classPrivateFieldSet(_hiddenRowsMap, this, new _translations.HidingMap());
195
205
  _classPrivateFieldGet(_hiddenRowsMap, this).addLocalHook('init', () => _assertClassBrand(_HiddenRows_brand, this, _onMapInit).call(this));
196
206
  this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_hiddenRowsMap, this));
@@ -229,6 +239,7 @@ class HiddenRows extends _base.BasePlugin {
229
239
  */
230
240
  disablePlugin() {
231
241
  this.hot.rowIndexMapper.unregisterMap(this.pluginName);
242
+ _classPrivateFieldSet(_settings, this, {});
232
243
  super.disablePlugin();
233
244
  this.resetCellsMeta();
234
245
  }
@@ -371,6 +382,7 @@ class HiddenRows extends _base.BasePlugin {
371
382
  * Destroys the plugin instance.
372
383
  */
373
384
  destroy() {
385
+ _classPrivateFieldSet(_settings, this, null);
374
386
  _classPrivateFieldSet(_hiddenRowsMap, this, null);
375
387
  super.destroy();
376
388
  }
@@ -392,7 +404,7 @@ function _onModifyRowHeight(height, row) {
392
404
  * @param {object} cellProperties Object containing the cell properties.
393
405
  */
394
406
  function _onAfterGetCellMeta(row, column, cellProperties) {
395
- if (this.getSetting('copyPasteEnabled') === false && this.isHidden(row)) {
407
+ if (_classPrivateFieldGet(_settings, this).copyPasteEnabled === false && this.isHidden(row)) {
396
408
  // Cell property handled by the `Autofill` and the `CopyPaste` plugins.
397
409
  cellProperties.skipRowOnPaste = true;
398
410
  }
@@ -420,7 +432,7 @@ function _onAfterGetCellMeta(row, column, cellProperties) {
420
432
  */
421
433
  function _onModifyCopyableRange(ranges) {
422
434
  // Ranges shouldn't be modified when `copyPasteEnabled` option is set to `true` (by default).
423
- if (this.getSetting('copyPasteEnabled')) {
435
+ if (_classPrivateFieldGet(_settings, this).copyPasteEnabled) {
424
436
  return ranges;
425
437
  }
426
438
  const newRanges = [];
@@ -461,7 +473,7 @@ function _onModifyCopyableRange(ranges) {
461
473
  * @param {HTMLElement} TH Header's TH element.
462
474
  */
463
475
  function _onAfterGetRowHeader(row, TH) {
464
- if (!this.getSetting('indicators') || row < 0) {
476
+ if (!_classPrivateFieldGet(_settings, this).indicators || row < 0) {
465
477
  return;
466
478
  }
467
479
  const classList = [];
@@ -487,8 +499,7 @@ function _onAfterContextMenuDefaultOptions(options) {
487
499
  * On map initialized hook callback.
488
500
  */
489
501
  function _onMapInit() {
490
- const rows = this.getSetting('rows');
491
- if (Array.isArray(rows)) {
492
- this.hideRows(rows);
502
+ if (Array.isArray(_classPrivateFieldGet(_settings, this).rows)) {
503
+ this.hideRows(_classPrivateFieldGet(_settings, this).rows);
493
504
  }
494
505
  }
@@ -17,8 +17,10 @@ import { BasePlugin } from "../base/index.mjs";
17
17
  import { addClass } from "../../helpers/dom/element.mjs";
18
18
  import { rangeEach } from "../../helpers/number.mjs";
19
19
  import { arrayEach, arrayMap, arrayReduce } from "../../helpers/array.mjs";
20
+ import { isObject } from "../../helpers/object.mjs";
21
+ import { isUndefined } from "../../helpers/mixed.mjs";
20
22
  import { SEPARATOR } from "../contextMenu/predefinedItems/index.mjs";
21
- import { Hooks } from "../../core/hooks/index.mjs";
23
+ import Hooks from "../../pluginHooks.mjs";
22
24
  import hideRowItem from "./contextMenuItem/hideRow.mjs";
23
25
  import showRowItem from "./contextMenuItem/showRow.mjs";
24
26
  import { HidingMap } from "../../translations/index.mjs";
@@ -135,6 +137,7 @@ export const PLUGIN_PRIORITY = 320;
135
137
  * ```
136
138
  * :::
137
139
  */
140
+ var _settings = /*#__PURE__*/new WeakMap();
138
141
  var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
139
142
  var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
140
143
  export class HiddenRows extends BasePlugin {
@@ -148,6 +151,13 @@ export class HiddenRows extends BasePlugin {
148
151
  * @returns {number}
149
152
  */
150
153
  _classPrivateMethodInitSpec(this, _HiddenRows_brand);
154
+ /**
155
+ * Cached settings from Handsontable settings.
156
+ *
157
+ * @private
158
+ * @type {object}
159
+ */
160
+ _classPrivateFieldInitSpec(this, _settings, {});
151
161
  /**
152
162
  * Map of hidden rows by the plugin.
153
163
  *
@@ -162,13 +172,6 @@ export class HiddenRows extends BasePlugin {
162
172
  static get PLUGIN_PRIORITY() {
163
173
  return PLUGIN_PRIORITY;
164
174
  }
165
- static get DEFAULT_SETTINGS() {
166
- return {
167
- copyPasteEnabled: true,
168
- indicators: false,
169
- rows: []
170
- };
171
- }
172
175
  /**
173
176
  * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
174
177
  * hook and if it returns `true` then the {@link HiddenRows#enablePlugin} method is called.
@@ -187,6 +190,13 @@ export class HiddenRows extends BasePlugin {
187
190
  if (this.enabled) {
188
191
  return;
189
192
  }
193
+ const pluginSettings = this.hot.getSettings()[PLUGIN_KEY];
194
+ if (isObject(pluginSettings)) {
195
+ _classPrivateFieldSet(_settings, this, pluginSettings);
196
+ if (isUndefined(pluginSettings.copyPasteEnabled)) {
197
+ pluginSettings.copyPasteEnabled = true;
198
+ }
199
+ }
190
200
  _classPrivateFieldSet(_hiddenRowsMap, this, new HidingMap());
191
201
  _classPrivateFieldGet(_hiddenRowsMap, this).addLocalHook('init', () => _assertClassBrand(_HiddenRows_brand, this, _onMapInit).call(this));
192
202
  this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_hiddenRowsMap, this));
@@ -225,6 +235,7 @@ export class HiddenRows extends BasePlugin {
225
235
  */
226
236
  disablePlugin() {
227
237
  this.hot.rowIndexMapper.unregisterMap(this.pluginName);
238
+ _classPrivateFieldSet(_settings, this, {});
228
239
  super.disablePlugin();
229
240
  this.resetCellsMeta();
230
241
  }
@@ -367,6 +378,7 @@ export class HiddenRows extends BasePlugin {
367
378
  * Destroys the plugin instance.
368
379
  */
369
380
  destroy() {
381
+ _classPrivateFieldSet(_settings, this, null);
370
382
  _classPrivateFieldSet(_hiddenRowsMap, this, null);
371
383
  super.destroy();
372
384
  }
@@ -387,7 +399,7 @@ function _onModifyRowHeight(height, row) {
387
399
  * @param {object} cellProperties Object containing the cell properties.
388
400
  */
389
401
  function _onAfterGetCellMeta(row, column, cellProperties) {
390
- if (this.getSetting('copyPasteEnabled') === false && this.isHidden(row)) {
402
+ if (_classPrivateFieldGet(_settings, this).copyPasteEnabled === false && this.isHidden(row)) {
391
403
  // Cell property handled by the `Autofill` and the `CopyPaste` plugins.
392
404
  cellProperties.skipRowOnPaste = true;
393
405
  }
@@ -415,7 +427,7 @@ function _onAfterGetCellMeta(row, column, cellProperties) {
415
427
  */
416
428
  function _onModifyCopyableRange(ranges) {
417
429
  // Ranges shouldn't be modified when `copyPasteEnabled` option is set to `true` (by default).
418
- if (this.getSetting('copyPasteEnabled')) {
430
+ if (_classPrivateFieldGet(_settings, this).copyPasteEnabled) {
419
431
  return ranges;
420
432
  }
421
433
  const newRanges = [];
@@ -456,7 +468,7 @@ function _onModifyCopyableRange(ranges) {
456
468
  * @param {HTMLElement} TH Header's TH element.
457
469
  */
458
470
  function _onAfterGetRowHeader(row, TH) {
459
- if (!this.getSetting('indicators') || row < 0) {
471
+ if (!_classPrivateFieldGet(_settings, this).indicators || row < 0) {
460
472
  return;
461
473
  }
462
474
  const classList = [];
@@ -482,8 +494,7 @@ function _onAfterContextMenuDefaultOptions(options) {
482
494
  * On map initialized hook callback.
483
495
  */
484
496
  function _onMapInit() {
485
- const rows = this.getSetting('rows');
486
- if (Array.isArray(rows)) {
487
- this.hideRows(rows);
497
+ if (Array.isArray(_classPrivateFieldGet(_settings, this).rows)) {
498
+ this.hideRows(_classPrivateFieldGet(_settings, this).rows);
488
499
  }
489
500
  }
@@ -4,7 +4,7 @@ exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  require("core-js/modules/es.array.push.js");
6
6
  var _base = require("../base");
7
- var _hooks = require("../../core/hooks");
7
+ var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
8
8
  var _freezeColumn = _interopRequireDefault(require("./contextMenuItem/freezeColumn"));
9
9
  var _unfreezeColumn = _interopRequireDefault(require("./contextMenuItem/unfreezeColumn"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -14,10 +14,10 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
14
14
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
15
15
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
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
- _hooks.Hooks.getSingleton().register('beforeColumnFreeze');
18
- _hooks.Hooks.getSingleton().register('afterColumnFreeze');
19
- _hooks.Hooks.getSingleton().register('beforeColumnUnfreeze');
20
- _hooks.Hooks.getSingleton().register('afterColumnUnfreeze');
17
+ _pluginHooks.default.getSingleton().register('beforeColumnFreeze');
18
+ _pluginHooks.default.getSingleton().register('afterColumnFreeze');
19
+ _pluginHooks.default.getSingleton().register('beforeColumnUnfreeze');
20
+ _pluginHooks.default.getSingleton().register('afterColumnUnfreeze');
21
21
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'manualColumnFreeze';
22
22
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 110;
23
23
 
@@ -7,7 +7,7 @@ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
7
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
8
8
  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"); }
9
9
  import { BasePlugin } from "../base/index.mjs";
10
- import { Hooks } from "../../core/hooks/index.mjs";
10
+ import Hooks from "../../pluginHooks.mjs";
11
11
  import freezeColumnItem from "./contextMenuItem/freezeColumn.mjs";
12
12
  import unfreezeColumnItem from "./contextMenuItem/unfreezeColumn.mjs";
13
13
  Hooks.getSingleton().register('beforeColumnFreeze');
@@ -4,7 +4,7 @@ exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  require("core-js/modules/es.array.push.js");
6
6
  var _base = require("../base");
7
- var _hooks = require("../../core/hooks");
7
+ var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
8
8
  var _array = require("../../helpers/array");
9
9
  var _element = require("../../helpers/dom/element");
10
10
  var _event = require("../../helpers/dom/event");
@@ -18,8 +18,8 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
18
18
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
19
19
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
20
20
  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"); }
21
- _hooks.Hooks.getSingleton().register('beforeColumnMove');
22
- _hooks.Hooks.getSingleton().register('afterColumnMove');
21
+ _pluginHooks.default.getSingleton().register('beforeColumnMove');
22
+ _pluginHooks.default.getSingleton().register('afterColumnMove');
23
23
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'manualColumnMove';
24
24
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 120;
25
25
  const CSS_PLUGIN = 'ht__manualColumnMove';
@@ -7,7 +7,7 @@ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a),
7
7
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
8
8
  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"); }
9
9
  import { BasePlugin } from "../base/index.mjs";
10
- import { Hooks } from "../../core/hooks/index.mjs";
10
+ import Hooks from "../../pluginHooks.mjs";
11
11
  import { arrayReduce } from "../../helpers/array.mjs";
12
12
  import { addClass, removeClass, offset, hasClass, outerWidth } from "../../helpers/dom/element.mjs";
13
13
  import { offsetRelativeTo } from "../../helpers/dom/event.mjs";
@@ -4,7 +4,7 @@ exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  require("core-js/modules/es.array.push.js");
6
6
  var _base = require("../base");
7
- var _hooks = require("../../core/hooks");
7
+ var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
8
8
  var _array = require("../../helpers/array");
9
9
  var _element = require("../../helpers/dom/element");
10
10
  var _number = require("../../helpers/number");
@@ -17,8 +17,8 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
17
17
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
18
18
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
19
19
  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"); }
20
- _hooks.Hooks.getSingleton().register('beforeRowMove');
21
- _hooks.Hooks.getSingleton().register('afterRowMove');
20
+ _pluginHooks.default.getSingleton().register('beforeRowMove');
21
+ _pluginHooks.default.getSingleton().register('afterRowMove');
22
22
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'manualRowMove';
23
23
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 140;
24
24
  const CSS_PLUGIN = 'ht__manualRowMove';
@@ -417,8 +417,8 @@ class ManualRowMove extends _base.BasePlugin {
417
417
  */
418
418
  refreshPositions() {
419
419
  const coords = _classPrivateFieldGet(_target, this).coords;
420
- const firstVisible = this.hot.getFirstFullyVisibleRow();
421
- const lastVisible = this.hot.getLastFullyVisibleRow();
420
+ const firstVisible = this.hot.view.getFirstFullyVisibleRow();
421
+ const lastVisible = this.hot.view.getLastFullyVisibleRow();
422
422
  const countRows = this.hot.countRows();
423
423
  if (this.isFixedRowTop(coords.row) && firstVisible > 0) {
424
424
  this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(firstVisible - 1, -1));
@@ -7,7 +7,7 @@ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a),
7
7
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
8
8
  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"); }
9
9
  import { BasePlugin } from "../base/index.mjs";
10
- import { Hooks } from "../../core/hooks/index.mjs";
10
+ import Hooks from "../../pluginHooks.mjs";
11
11
  import { arrayReduce } from "../../helpers/array.mjs";
12
12
  import { addClass, removeClass, offset, getTrimmingContainer } from "../../helpers/dom/element.mjs";
13
13
  import { rangeEach } from "../../helpers/number.mjs";
@@ -413,8 +413,8 @@ export class ManualRowMove extends BasePlugin {
413
413
  */
414
414
  refreshPositions() {
415
415
  const coords = _classPrivateFieldGet(_target, this).coords;
416
- const firstVisible = this.hot.getFirstFullyVisibleRow();
417
- const lastVisible = this.hot.getLastFullyVisibleRow();
416
+ const firstVisible = this.hot.view.getFirstFullyVisibleRow();
417
+ const lastVisible = this.hot.view.getLastFullyVisibleRow();
418
418
  const countRows = this.hot.countRows();
419
419
  if (this.isFixedRowTop(coords.row) && firstVisible > 0) {
420
420
  this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(firstVisible - 1, -1));
@@ -302,21 +302,9 @@ class MergedCellsCollection {
302
302
  */
303
303
  isFirstRenderableMergedCell(row, column) {
304
304
  const mergeParent = this.get(row, column);
305
- if (!mergeParent) {
306
- return false;
307
- }
308
- const {
309
- row: mergeRow,
310
- col: mergeColumn,
311
- rowspan,
312
- colspan
313
- } = mergeParent;
314
- const overlayName = this.hot.view.getActiveOverlayName();
315
- const firstRenderedRow = ['top', 'top_inline_start_corner'].includes(overlayName) ? 0 : this.hot.getFirstRenderedVisibleRow();
316
- const firstRenderedColumn = ['inline_start', 'top_inline_start_corner', 'bottom_inline_start_corner'].includes(overlayName) ? 0 : this.hot.getFirstRenderedVisibleColumn();
317
- const mergeCellsTopRow = (0, _number.clamp)(firstRenderedRow, mergeRow, mergeRow + rowspan - 1);
318
- const mergeCellsStartColumn = (0, _number.clamp)(firstRenderedColumn, mergeColumn, mergeColumn + colspan - 1);
319
- return this.hot.rowIndexMapper.getNearestNotHiddenIndex(mergeCellsTopRow, 1) === row && this.hot.columnIndexMapper.getNearestNotHiddenIndex(mergeCellsStartColumn, 1) === column;
305
+
306
+ // Return if row and column indexes are within merge area and if they are first rendered indexes within the area.
307
+ return mergeParent && this.hot.rowIndexMapper.getNearestNotHiddenIndex(mergeParent.row, 1) === row && this.hot.columnIndexMapper.getNearestNotHiddenIndex(mergeParent.col, 1) === column;
320
308
  }
321
309
 
322
310
  /**
@@ -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, clamp } 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";
@@ -298,21 +298,9 @@ class MergedCellsCollection {
298
298
  */
299
299
  isFirstRenderableMergedCell(row, column) {
300
300
  const mergeParent = this.get(row, column);
301
- if (!mergeParent) {
302
- return false;
303
- }
304
- const {
305
- row: mergeRow,
306
- col: mergeColumn,
307
- rowspan,
308
- colspan
309
- } = mergeParent;
310
- const overlayName = this.hot.view.getActiveOverlayName();
311
- const firstRenderedRow = ['top', 'top_inline_start_corner'].includes(overlayName) ? 0 : this.hot.getFirstRenderedVisibleRow();
312
- const firstRenderedColumn = ['inline_start', 'top_inline_start_corner', 'bottom_inline_start_corner'].includes(overlayName) ? 0 : this.hot.getFirstRenderedVisibleColumn();
313
- const mergeCellsTopRow = clamp(firstRenderedRow, mergeRow, mergeRow + rowspan - 1);
314
- const mergeCellsStartColumn = clamp(firstRenderedColumn, mergeColumn, mergeColumn + colspan - 1);
315
- return this.hot.rowIndexMapper.getNearestNotHiddenIndex(mergeCellsTopRow, 1) === row && this.hot.columnIndexMapper.getNearestNotHiddenIndex(mergeCellsStartColumn, 1) === column;
301
+
302
+ // Return if row and column indexes are within merge area and if they are first rendered indexes within the area.
303
+ return mergeParent && this.hot.rowIndexMapper.getNearestNotHiddenIndex(mergeParent.row, 1) === row && this.hot.columnIndexMapper.getNearestNotHiddenIndex(mergeParent.col, 1) === column;
316
304
  }
317
305
 
318
306
  /**
@@ -2,18 +2,14 @@ import Core from '../../core';
2
2
  import { BasePlugin } from '../base';
3
3
  import CellRange from '../../3rdparty/walkontable/src/cell/range';
4
4
 
5
- export interface MergeCellsSettings {
5
+ export interface DetailedSettings {
6
6
  row: number;
7
7
  col: number;
8
8
  rowspan: number;
9
9
  colspan: number;
10
10
  }
11
- export interface DetailedSettings {
12
- virtualized: boolean;
13
- cells: MergeCellsSettings[];
14
- }
15
11
 
16
- export type Settings = boolean | MergeCellsSettings[] | DetailedSettings;
12
+ export type Settings = boolean | DetailedSettings[];
17
13
 
18
14
  export class MergeCells extends BasePlugin {
19
15
  constructor(hotInstance: Core);