handsontable 0.0.0-next-ff10728-20250410 → 0.0.0-next-d9b3885-20250415

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.

Files changed (122) hide show
  1. package/3rdparty/walkontable/src/cell/range.js +14 -0
  2. package/3rdparty/walkontable/src/cell/range.mjs +14 -0
  3. package/3rdparty/walkontable/src/renderer/rowHeaders.js +4 -1
  4. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +4 -1
  5. package/3rdparty/walkontable/src/selection/border/border.js +5 -0
  6. package/3rdparty/walkontable/src/selection/border/border.mjs +5 -0
  7. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +3 -4
  8. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +3 -4
  9. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +8 -10
  10. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +8 -10
  11. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +3 -4
  12. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +3 -4
  13. package/3rdparty/walkontable/src/table.js +5 -2
  14. package/3rdparty/walkontable/src/table.mjs +5 -2
  15. package/CHANGELOG.md +39 -0
  16. package/base.js +2 -2
  17. package/base.mjs +2 -2
  18. package/core/focusCatcher/focusDetector.js +1 -1
  19. package/core/focusCatcher/focusDetector.mjs +2 -2
  20. package/core/hooks/constants.js +266 -0
  21. package/core/hooks/constants.mjs +266 -0
  22. package/core/hooks/index.d.ts +1 -0
  23. package/core.d.ts +0 -1
  24. package/core.js +71 -25
  25. package/core.mjs +72 -26
  26. package/dataMap/dataMap.js +0 -7
  27. package/dataMap/dataMap.mjs +0 -7
  28. package/dataMap/metaManager/metaSchema.js +28 -0
  29. package/dataMap/metaManager/metaSchema.mjs +28 -0
  30. package/dist/handsontable.css +3 -3
  31. package/dist/handsontable.full.css +3 -3
  32. package/dist/handsontable.full.js +1375 -350
  33. package/dist/handsontable.full.min.css +3 -3
  34. package/dist/handsontable.full.min.js +17 -17
  35. package/dist/handsontable.js +1375 -350
  36. package/dist/handsontable.min.css +3 -3
  37. package/dist/handsontable.min.js +18 -18
  38. package/editorManager.js +1 -7
  39. package/editorManager.mjs +1 -7
  40. package/editors/autocompleteEditor/autocompleteEditor.js +14 -4
  41. package/editors/autocompleteEditor/autocompleteEditor.mjs +14 -4
  42. package/editors/textEditor/textEditor.js +1 -1
  43. package/editors/textEditor/textEditor.mjs +2 -2
  44. package/helpers/browser.js +1 -1
  45. package/helpers/browser.mjs +1 -1
  46. package/helpers/dom/element.js +2 -2
  47. package/helpers/dom/element.mjs +1 -1
  48. package/helpers/mixed.js +2 -2
  49. package/helpers/mixed.mjs +2 -2
  50. package/helpers/object.js +3 -0
  51. package/helpers/object.mjs +3 -0
  52. package/package.json +1 -1
  53. package/plugins/autoColumnSize/autoColumnSize.js +48 -1
  54. package/plugins/autoColumnSize/autoColumnSize.mjs +48 -1
  55. package/plugins/autoRowSize/autoRowSize.js +46 -6
  56. package/plugins/autoRowSize/autoRowSize.mjs +46 -6
  57. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +13 -0
  58. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +13 -0
  59. package/plugins/collapsibleColumns/collapsibleColumns.js +31 -0
  60. package/plugins/collapsibleColumns/collapsibleColumns.mjs +31 -0
  61. package/plugins/columnSorting/columnSorting.js +0 -4
  62. package/plugins/columnSorting/columnSorting.mjs +0 -4
  63. package/plugins/columnSummary/columnSummary.js +33 -0
  64. package/plugins/columnSummary/columnSummary.mjs +33 -0
  65. package/plugins/comments/comments.js +54 -0
  66. package/plugins/comments/comments.mjs +54 -0
  67. package/plugins/contextMenu/menu/defaultShortcutsList.js +2 -2
  68. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +2 -2
  69. package/plugins/contextMenu/menu/menu.js +1 -0
  70. package/plugins/contextMenu/menu/menu.mjs +1 -0
  71. package/plugins/contextMenu/menu/positioner.js +10 -2
  72. package/plugins/contextMenu/menu/positioner.mjs +10 -2
  73. package/plugins/copyPaste/copyPaste.js +12 -15
  74. package/plugins/copyPaste/copyPaste.mjs +13 -16
  75. package/plugins/copyPaste/pasteEvent.js +3 -0
  76. package/plugins/copyPaste/pasteEvent.mjs +3 -0
  77. package/plugins/dropdownMenu/dropdownMenu.js +15 -0
  78. package/plugins/dropdownMenu/dropdownMenu.mjs +15 -0
  79. package/plugins/exportFile/exportFile.js +58 -0
  80. package/plugins/exportFile/exportFile.mjs +58 -0
  81. package/plugins/filters/filters.js +99 -24
  82. package/plugins/filters/filters.mjs +99 -24
  83. package/plugins/filters/ui/multipleSelect.js +7 -1
  84. package/plugins/filters/ui/multipleSelect.mjs +7 -1
  85. package/plugins/hiddenColumns/hiddenColumns.js +65 -1
  86. package/plugins/hiddenColumns/hiddenColumns.mjs +65 -1
  87. package/plugins/hiddenRows/hiddenRows.js +65 -1
  88. package/plugins/hiddenRows/hiddenRows.mjs +65 -1
  89. package/plugins/manualColumnResize/manualColumnResize.js +4 -6
  90. package/plugins/manualColumnResize/manualColumnResize.mjs +4 -6
  91. package/plugins/manualRowResize/manualRowResize.js +4 -6
  92. package/plugins/manualRowResize/manualRowResize.mjs +4 -6
  93. package/plugins/mergeCells/mergeCells.js +26 -29
  94. package/plugins/mergeCells/mergeCells.mjs +26 -29
  95. package/plugins/mergeCells/renderer.js +15 -0
  96. package/plugins/mergeCells/renderer.mjs +15 -0
  97. package/plugins/mergeCells/utils.js +31 -0
  98. package/plugins/mergeCells/utils.mjs +27 -0
  99. package/plugins/nestedHeaders/nestedHeaders.js +25 -0
  100. package/plugins/nestedHeaders/nestedHeaders.mjs +25 -0
  101. package/plugins/nestedRows/data/dataManager.js +2 -2
  102. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  103. package/plugins/stretchColumns/stretchColumns.js +13 -0
  104. package/plugins/stretchColumns/stretchColumns.mjs +13 -0
  105. package/plugins/trimRows/trimRows.js +61 -0
  106. package/plugins/trimRows/trimRows.mjs +61 -0
  107. package/plugins/undoRedo/actions/removeColumn.js +19 -14
  108. package/plugins/undoRedo/actions/removeColumn.mjs +19 -14
  109. package/plugins/undoRedo/actions/removeRow.js +12 -4
  110. package/plugins/undoRedo/actions/removeRow.mjs +12 -4
  111. package/selection/selection.js +3 -1
  112. package/selection/selection.mjs +3 -1
  113. package/styles/handsontable.css +14 -15
  114. package/styles/handsontable.min.css +3 -3
  115. package/styles/ht-theme-horizon.css +2 -2
  116. package/styles/ht-theme-horizon.min.css +2 -2
  117. package/styles/ht-theme-main.css +2 -2
  118. package/styles/ht-theme-main.min.css +2 -2
  119. package/tableView.js +5 -8
  120. package/tableView.mjs +5 -8
  121. package/utils/ghostTable.js +3 -0
  122. package/utils/ghostTable.mjs +3 -0
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-ff10728-20250410
29
- * Release date: 20/02/2025 (built at 10/04/2025 06:43:56)
28
+ * Version: 0.0.0-next-d9b3885-20250415
29
+ * Release date: 19/03/2025 (built at 15/04/2025 10:06:49)
30
30
  */
31
31
  (function webpackUniversalModuleDefinition(root, factory) {
32
32
  if(typeof exports === 'object' && typeof module === 'object')
@@ -104,8 +104,8 @@ Handsontable.hooks = _hooks.Hooks.getSingleton();
104
104
  Handsontable.CellCoords = _src.CellCoords;
105
105
  Handsontable.CellRange = _src.CellRange;
106
106
  Handsontable.packageName = 'handsontable';
107
- Handsontable.buildDate = "10/04/2025 06:43:56";
108
- Handsontable.version = "0.0.0-next-ff10728-20250410";
107
+ Handsontable.buildDate = "15/04/2025 10:06:49";
108
+ Handsontable.version = "0.0.0-next-d9b3885-20250415";
109
109
  Handsontable.languages = {
110
110
  dictionaryKeys: _registry.dictionaryKeys,
111
111
  getLanguageDictionary: _registry.getLanguageDictionary,
@@ -215,6 +215,12 @@ const deprecationWarns = new Set();
215
215
  * by using React's `ref` feature (read more on the [Instance methods](@/guides/getting-started/react-methods/react-methods.md) page).
216
216
  * :::
217
217
  *
218
+ * ::: only-for angular
219
+ * To use these methods, associate a Handsontable instance with your instance
220
+ * of the [`HotTable` component](@/guides/getting-started/installation/installation.md#5-use-the-hottable-component),
221
+ * by using `@ViewChild` decorator (read more on the [Instance access](@/guides/getting-started/angular-hot-instance/angular-hot-instance.md) page).
222
+ * :::
223
+ *
218
224
  * ## How to call a method
219
225
  *
220
226
  * ::: only-for javascript
@@ -245,6 +251,39 @@ const deprecationWarns = new Set();
245
251
  * ```
246
252
  * :::
247
253
  *
254
+ * ::: only-for angular
255
+ * ```ts
256
+ * import { Component, ViewChild, AfterViewInit } from "@angular/core";
257
+ * import {
258
+ * GridSettings,
259
+ * HotTableComponent,
260
+ * HotTableModule,
261
+ * } from "@handsontable/angular-wrapper";
262
+ *
263
+ * `@Component`({
264
+ * standalone: true,
265
+ * imports: [HotTableModule],
266
+ * template: ` <div class="ht-theme-main">
267
+ * <hot-table [settings]="gridSettings" />
268
+ * </div>`,
269
+ * })
270
+ * export class ExampleComponent implements AfterViewInit {
271
+ * `@ViewChild`(HotTableComponent, { static: false })
272
+ * readonly hotTable!: HotTableComponent;
273
+ *
274
+ * readonly gridSettings = <GridSettings>{
275
+ * columns: [{}],
276
+ * };
277
+ *
278
+ * ngAfterViewInit(): void {
279
+ * // Access the Handsontable instance
280
+ * // Call a method
281
+ * this.hotTable?.hotInstance?.setDataAtCell(0, 0, "new value");
282
+ * }
283
+ * }
284
+ * ```
285
+ * :::
286
+ *
248
287
  * @param {HTMLElement} rootElement The element to which the Handsontable instance is injected.
249
288
  * @param {object} userSettings The user defined options.
250
289
  * @param {boolean} [rootInstanceSymbol=false] Indicates if the instance is root of all later instances created.
@@ -362,7 +401,6 @@ function Core(rootElement, userSettings) {
362
401
  const globalMeta = metaManager.getGlobalMeta();
363
402
  const pluginsRegistry = (0, _uniqueMap.createUniqueMap)();
364
403
  this.container = this.rootDocument.createElement('div');
365
- this.renderCall = false;
366
404
  rootElement.insertBefore(this.container, rootElement.firstChild);
367
405
  if ((0, _rootInstance.isRootInstance)(this)) {
368
406
  (0, _mixed._injectProductInfo)(userSettings.licenseKey, rootElement);
@@ -394,6 +432,9 @@ function Core(rootElement, userSettings) {
394
432
  this.rowIndexMapper.addLocalHook('indexesSequenceChange', source => {
395
433
  instance.runHooks('afterRowSequenceChange', source);
396
434
  });
435
+ eventManager.addEventListener(this.rootDocument.documentElement, 'compositionstart', event => {
436
+ instance.runHooks('beforeCompositionStart', event);
437
+ });
397
438
  dataSource = new _dataSource.default(instance);
398
439
  if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
399
440
  this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
@@ -473,6 +514,7 @@ function Core(rootElement, userSettings) {
473
514
  let {
474
515
  hiddenIndexesChanged
475
516
  } = _ref;
517
+ this.forceFullRender = true;
476
518
  if (hiddenIndexesChanged) {
477
519
  this.selection.commit();
478
520
  }
@@ -756,13 +798,6 @@ function Core(rootElement, userSettings) {
756
798
  }
757
799
  }
758
800
  const totalRows = instance.countRows();
759
- if (totalRows === 0) {
760
- selection.deselect();
761
- } else if (source === 'ContextMenu.removeRow') {
762
- selection.refresh();
763
- } else {
764
- selection.shiftRows(groupIndex, -groupAmount);
765
- }
766
801
  const fixedRowsTop = tableMeta.fixedRowsTop;
767
802
  if (fixedRowsTop >= calcIndex + 1) {
768
803
  tableMeta.fixedRowsTop -= Math.min(groupAmount, fixedRowsTop - calcIndex);
@@ -771,6 +806,13 @@ function Core(rootElement, userSettings) {
771
806
  if (fixedRowsBottom && calcIndex >= totalRows - fixedRowsBottom) {
772
807
  tableMeta.fixedRowsBottom -= Math.min(groupAmount, fixedRowsBottom);
773
808
  }
809
+ if (totalRows === 0) {
810
+ selection.deselect();
811
+ } else if (source === 'ContextMenu.removeRow') {
812
+ selection.refresh();
813
+ } else {
814
+ selection.shiftRows(groupIndex, -groupAmount);
815
+ }
774
816
  offset += groupAmount;
775
817
  });
776
818
  };
@@ -1180,8 +1222,7 @@ function Core(rootElement, userSettings) {
1180
1222
  (0, _index.installFocusCatcher)(instance);
1181
1223
  }
1182
1224
  instance.runHooks('init');
1183
- this.forceFullRender = true; // used when data was changed
1184
- this.view.render();
1225
+ this.render();
1185
1226
 
1186
1227
  // Run the logic only if it's the table's initialization and the root element is not visible.
1187
1228
  if (!!firstRun && instance.rootElement.offsetParent === null) {
@@ -1354,13 +1395,11 @@ function Core(rootElement, userSettings) {
1354
1395
  datamap.set(changes[i][0], changes[i][1], changes[i][3]);
1355
1396
  }
1356
1397
  const hasChanges = changes.length > 0;
1357
- instance.forceFullRender = true; // used when data was changed or when all cells need to be re-rendered
1358
-
1359
1398
  if (hasChanges) {
1360
1399
  grid.adjustRowsAndCols();
1361
1400
  instance.runHooks('beforeChangeRender', changes, source);
1362
1401
  editorManager.closeEditor();
1363
- instance.view.render();
1402
+ instance.render();
1364
1403
  editorManager.prepareEditor();
1365
1404
  instance.view.adjustElementsSize();
1366
1405
  instance.runHooks('afterChange', changes, source || 'edit');
@@ -1369,7 +1408,7 @@ function Core(rootElement, userSettings) {
1369
1408
  activeEditor.refreshValue();
1370
1409
  }
1371
1410
  } else {
1372
- instance.view.render();
1411
+ instance.render();
1373
1412
  }
1374
1413
  }
1375
1414
 
@@ -1519,9 +1558,22 @@ function Core(rootElement, userSettings) {
1519
1558
  ...tableMeta
1520
1559
  };
1521
1560
  }
1522
- if (cellProperties.type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
1561
+ const {
1562
+ type,
1563
+ checkedTemplate,
1564
+ uncheckedTemplate
1565
+ } = cellProperties;
1566
+ if (type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
1523
1567
  filteredChanges[i][3] = getParsedNumber(newValue);
1524
1568
  }
1569
+ if (type === 'checkbox') {
1570
+ const stringifiedValue = (0, _mixed.stringify)(newValue);
1571
+ const isChecked = stringifiedValue === (0, _mixed.stringify)(checkedTemplate);
1572
+ const isUnchecked = stringifiedValue === (0, _mixed.stringify)(uncheckedTemplate);
1573
+ if (isChecked || isUnchecked) {
1574
+ filteredChanges[i][3] = isChecked ? checkedTemplate : uncheckedTemplate;
1575
+ }
1576
+ }
1525
1577
  }
1526
1578
  return filteredChanges;
1527
1579
  }
@@ -1923,11 +1975,7 @@ function Core(rootElement, userSettings) {
1923
1975
  const nextValue = this.renderSuspendedCounter - 1;
1924
1976
  this.renderSuspendedCounter = Math.max(nextValue, 0);
1925
1977
  if (!this.isRenderSuspended() && nextValue === this.renderSuspendedCounter) {
1926
- if (this.renderCall) {
1927
- this.render();
1928
- } else {
1929
- instance.view.render();
1930
- }
1978
+ instance.view.render();
1931
1979
  }
1932
1980
  };
1933
1981
 
@@ -1943,9 +1991,8 @@ function Core(rootElement, userSettings) {
1943
1991
  */
1944
1992
  this.render = function () {
1945
1993
  if (this.view) {
1946
- this.renderCall = true;
1947
- this.forceFullRender = true; // used when data was changed or when all cells need to be re-rendered
1948
-
1994
+ // used when data was changed or when all cells need to be re-rendered (slow render)
1995
+ this.forceFullRender = true;
1949
1996
  if (!this.isRenderSuspended()) {
1950
1997
  instance.view.render();
1951
1998
  }
@@ -2558,8 +2605,7 @@ function Core(rootElement, userSettings) {
2558
2605
  }
2559
2606
  grid.adjustRowsAndCols();
2560
2607
  if (instance.view && !firstRun) {
2561
- instance.forceFullRender = true; // used when data was changed
2562
- instance.view.render();
2608
+ instance.render();
2563
2609
  instance.view._wt.wtOverlays.adjustElementsSize();
2564
2610
  }
2565
2611
  if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
@@ -8671,8 +8717,8 @@ exports.isChildOf = isChildOf;
8671
8717
  exports.isDetached = isDetached;
8672
8718
  exports.isHTMLElement = isHTMLElement;
8673
8719
  exports.isInput = isInput;
8720
+ exports.isInternalElement = isInternalElement;
8674
8721
  exports.isOutsideInput = isOutsideInput;
8675
- exports.isThisHotChild = isThisHotChild;
8676
8722
  exports.isVisible = isVisible;
8677
8723
  exports.makeElementContentEditableAndSelectItsContent = makeElementContentEditableAndSelectItsContent;
8678
8724
  exports.matchesCSSRules = matchesCSSRules;
@@ -8733,7 +8779,7 @@ function getParent(element) {
8733
8779
  * @param {HTMLElement} thisHotContainer The Handsontable container.
8734
8780
  * @returns {boolean}
8735
8781
  */
8736
- function isThisHotChild(element, thisHotContainer) {
8782
+ function isInternalElement(element, thisHotContainer) {
8737
8783
  const closestHandsontableContainer = element.closest('.handsontable');
8738
8784
  return !!closestHandsontableContainer && (closestHandsontableContainer.parentNode === thisHotContainer || closestHandsontableContainer === thisHotContainer);
8739
8785
  }
@@ -10097,7 +10143,7 @@ const domMessages = {
10097
10143
  function _injectProductInfo(key, element) {
10098
10144
  const hasValidType = !isEmpty(key);
10099
10145
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
10100
- const hotVersion = "0.0.0-next-ff10728-20250410";
10146
+ const hotVersion = "0.0.0-next-d9b3885-20250415";
10101
10147
  let keyValidityDate;
10102
10148
  let consoleMessageState = 'invalid';
10103
10149
  let domMessageState = 'invalid';
@@ -10105,7 +10151,7 @@ function _injectProductInfo(key, element) {
10105
10151
  const schemaValidity = _checkKeySchema(key);
10106
10152
  if (hasValidType || isNonCommercial || schemaValidity) {
10107
10153
  if (schemaValidity) {
10108
- const releaseDate = (0, _moment.default)("20/02/2025", 'DD/MM/YYYY');
10154
+ const releaseDate = (0, _moment.default)("19/03/2025", 'DD/MM/YYYY');
10109
10155
  const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
10110
10156
  const keyValidityDays = _extractTime(key);
10111
10157
  keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
@@ -10999,7 +11045,7 @@ const platforms = {
10999
11045
  mac: tester(platform => /^Mac/.test(platform)),
11000
11046
  win: tester(platform => /^Win/.test(platform)),
11001
11047
  linux: tester(platform => /^Linux/.test(platform)),
11002
- ios: tester(ua => /iPhone|iPad|iPod/i.test(ua))
11048
+ ios: tester(platform => /iPhone|iPad|iPod/i.test(platform))
11003
11049
  };
11004
11050
 
11005
11051
  /**
@@ -11427,6 +11473,9 @@ function getProperty(object, name) {
11427
11473
  * @param {*} value Value to be assigned at the provided property.
11428
11474
  */
11429
11475
  function setProperty(object, name, value) {
11476
+ if (typeof name !== 'string') {
11477
+ return;
11478
+ }
11430
11479
  const names = name.split('.');
11431
11480
  let workingObject = object;
11432
11481
  names.forEach((propName, index) => {
@@ -11793,13 +11842,7 @@ class EditorManager {
11793
11842
  this.selection = _selection;
11794
11843
  this.eventManager = new _eventManager.default(hotInstance);
11795
11844
  this.hot.addHook('afterDocumentKeyDown', event => _assertClassBrand(_EditorManager_brand, this, _onAfterDocumentKeyDown).call(this, event));
11796
-
11797
- // Open editor when text composition is started (IME editor)
11798
- this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'compositionstart', event => {
11799
- if (!this.destroyed && this.hot.isListening()) {
11800
- this.openEditor('', event);
11801
- }
11802
- });
11845
+ this.hot.addHook('beforeCompositionStart', event => _assertClassBrand(_EditorManager_brand, this, _onAfterDocumentKeyDown).call(this, event));
11803
11846
  this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _assertClassBrand(_EditorManager_brand, this, _onCellDblClick).call(this, event, coords, elem));
11804
11847
  }
11805
11848
 
@@ -12988,6 +13031,22 @@ exports.__esModule = true;
12988
13031
  * />
12989
13032
  * :::
12990
13033
  *
13034
+ * ::: only-for angular
13035
+ * ```ts
13036
+ * settings = {
13037
+ * afterChange: (changes, source) => {
13038
+ * changes?.forEach(([row, prop, oldValue, newValue]) => {
13039
+ * // Some logic...
13040
+ * });
13041
+ * },
13042
+ * };
13043
+ * ```
13044
+ *
13045
+ * ```html
13046
+ * <hot-table [settings]="settings" />
13047
+ * ```
13048
+ * :::
13049
+ *
12991
13050
  * ::: only-for javascript
12992
13051
  * ```js
12993
13052
  * // using events as plugin hooks
@@ -13092,6 +13151,22 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13092
13151
  * />
13093
13152
  * ```
13094
13153
  * :::
13154
+ *
13155
+ * ::: only-for angular
13156
+ * ```ts
13157
+ * settings = {
13158
+ * afterChange: (changes, source) => {
13159
+ * changes?.forEach(([row, prop, oldValue, newValue]) => {
13160
+ * // Some logic...
13161
+ * });
13162
+ * },
13163
+ * };
13164
+ * ```
13165
+ *
13166
+ * ```html
13167
+ * <hot-table [settings]="settings"></hot-table>
13168
+ * ```
13169
+ * :::
13095
13170
  */
13096
13171
  'afterChange',
13097
13172
  /**
@@ -13195,6 +13270,21 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13195
13270
  * />
13196
13271
  * ```
13197
13272
  * :::
13273
+ *
13274
+ * ::: only-for angular
13275
+ * ```ts
13276
+ * settings = {
13277
+ * beforeCreateCol: (data, coords) => {
13278
+ * // Return `false` to cancel column inserting.
13279
+ * return false;
13280
+ * },
13281
+ * };
13282
+ * ```
13283
+ *
13284
+ * ```html
13285
+ * <hot-table [settings]="settings"></hot-table>
13286
+ * ```
13287
+ * :::
13198
13288
  */
13199
13289
  'beforeCreateCol',
13200
13290
  /**
@@ -13275,6 +13365,14 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13275
13365
  * @returns {string[]|undefined} Can return an `Array` of `String`s. Each of these strings will act like class names to be removed from all the cells in the table.
13276
13366
  */
13277
13367
  'beforeRemoveCellClassNames',
13368
+ /**
13369
+ * Hook fired after `compositionstart` event is handled.
13370
+ *
13371
+ * @event Hooks#beforeCompositionStart
13372
+ * @since 15.3.0
13373
+ * @param {Event} event A native `composition` event object.
13374
+ */
13375
+ 'beforeCompositionStart',
13278
13376
  /**
13279
13377
  * Fired after getting the cell settings.
13280
13378
  *
@@ -13570,6 +13668,31 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13570
13668
  * }}
13571
13669
  * />
13572
13670
  * ```
13671
+ * :::
13672
+ *
13673
+ * ::: only-for angular
13674
+ * ```ts
13675
+ * settings = {
13676
+ * afterSelection: (
13677
+ * row,
13678
+ * column,
13679
+ * row2,
13680
+ * column2,
13681
+ * preventScrolling,
13682
+ * selectionLayerLevel
13683
+ * ) => {
13684
+ * // If set to `false` (default): when cell selection is outside the viewport,
13685
+ * // Handsontable scrolls the viewport to cell selection's end corner.
13686
+ * // If set to `true`: when cell selection is outside the viewport,
13687
+ * // Handsontable doesn't scroll to cell selection's end corner.
13688
+ * preventScrolling.value = true;
13689
+ * },
13690
+ * };
13691
+ * ```
13692
+ *
13693
+ * ```html
13694
+ * <hot-table [settings]="settings"></hot-table>
13695
+ * ```
13573
13696
  * :::
13574
13697
  */
13575
13698
  'afterSelection',
@@ -13609,6 +13732,28 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13609
13732
  * />
13610
13733
  * ```
13611
13734
  * :::
13735
+ *
13736
+ * ::: only-for angular
13737
+ * ```ts
13738
+ * settings = {
13739
+ * afterSelectionByProp: (
13740
+ * row,
13741
+ * column,
13742
+ * row2,
13743
+ * column2,
13744
+ * preventScrolling,
13745
+ * selectionLayerLevel
13746
+ * ) => {
13747
+ * // Setting if prevent scrolling after selection
13748
+ * preventScrolling.value = true;
13749
+ * },
13750
+ * };
13751
+ * ```
13752
+ *
13753
+ * ```html
13754
+ * <hot-table [settings]="settings"></hot-table>
13755
+ * ```
13756
+ * :::
13612
13757
  */
13613
13758
  'afterSelectionByProp',
13614
13759
  /**
@@ -13673,6 +13818,24 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13673
13818
  * />
13674
13819
  * ```
13675
13820
  * :::
13821
+ *
13822
+ * ::: only-for angular
13823
+ * ```ts
13824
+ * settings = {
13825
+ * afterSelectionFocusSet: (row, column, preventScrolling) => {
13826
+ * // If set to `false` (default): when focused cell selection is outside the viewport,
13827
+ * // Handsontable scrolls the viewport to that cell.
13828
+ * // If set to `true`: when focused cell selection is outside the viewport,
13829
+ * // Handsontable doesn't scroll the viewport.
13830
+ * preventScrolling.value = true;
13831
+ * },
13832
+ * };
13833
+ * ```
13834
+ *
13835
+ * ```html
13836
+ * <hot-table [settings]="settings"></hot-table>
13837
+ * ```
13838
+ * :::
13676
13839
  */
13677
13840
  'afterSelectionFocusSet',
13678
13841
  /**
@@ -13707,6 +13870,22 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13707
13870
  * />
13708
13871
  * ```
13709
13872
  * :::
13873
+ *
13874
+ * ::: only-for angular
13875
+ * ```ts
13876
+ * settings = {
13877
+ * beforeSelectColumns: (from, to, highlight) => {
13878
+ * // Extend the column selection by one column left and one column right.
13879
+ * from.col = Math.max(from.col - 1, 0);
13880
+ * to.col = Math.min(to.col + 1, this.countCols() - 1);
13881
+ * },
13882
+ * };
13883
+ * ```
13884
+ *
13885
+ * ```html
13886
+ * <hot-table [settings]="settings"></hot-table>
13887
+ * ```
13888
+ * :::
13710
13889
  */
13711
13890
  'beforeSelectColumns',
13712
13891
  /**
@@ -13751,6 +13930,22 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13751
13930
  * />
13752
13931
  * ```
13753
13932
  * :::
13933
+ *
13934
+ * ::: only-for angular
13935
+ * ```ts
13936
+ * settings = {
13937
+ * beforeSelectRows: (from, to, highlight) => {
13938
+ * // Extend the row selection by one row up and one row down.
13939
+ * from.row = Math.max(from.row - 1, 0);
13940
+ * to.row = Math.min(to.row + 1, this.countRows() - 1);
13941
+ * },
13942
+ * };
13943
+ * ```
13944
+ *
13945
+ * ```html
13946
+ * <hot-table [settings]="settings"></hot-table>
13947
+ * ```
13948
+ * :::
13754
13949
  */
13755
13950
  'beforeSelectRows',
13756
13951
  /**
@@ -13971,6 +14166,42 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
13971
14166
  * />
13972
14167
  * ```
13973
14168
  * :::
14169
+ * ::: only-for angular
14170
+ *```ts
14171
+ * // To alter a single change, overwrite the desired value with `changes[i][3]`
14172
+ * settings1 = {
14173
+ * beforeChange: (changes, source) => {
14174
+ * // [[row, prop, oldVal, newVal], ...]
14175
+ * changes[0][3] = 10;
14176
+ * },
14177
+ * };
14178
+ *
14179
+ * // To ignore a single change, set `changes[i]` to `null`
14180
+ * // or remove `changes[i]` from the array, by using changes.splice(i, 1).
14181
+ * settings2 = {
14182
+ * beforeChange: (changes, source) => {
14183
+ * // [[row, prop, oldVal, newVal], ...]
14184
+ * changes[0] = null;
14185
+ * },
14186
+ * };
14187
+ *
14188
+ * // To ignore all changes, return `false`
14189
+ * // or set the array's length to 0 (`changes.length = 0`)
14190
+ * settings3 = {
14191
+ * beforeChange: (changes, source) => {
14192
+ * // [[row, prop, oldVal, newVal], ...]
14193
+ * return false;
14194
+ * },
14195
+ * };
14196
+ * ```
14197
+ *
14198
+ * ```html
14199
+ * <hot-table [settings]="settings1"></hot-table>
14200
+ * <hot-table [settings]="settings2"></hot-table>
14201
+ * <hot-table [settings]="settings3"></hot-table>
14202
+ * ```
14203
+ *
14204
+ * :::
13974
14205
  */
13975
14206
  'beforeChange',
13976
14207
  /**
@@ -14581,6 +14812,32 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
14581
14812
  * />
14582
14813
  * ```
14583
14814
  * :::
14815
+ *
14816
+ * ::: only-for angular
14817
+ *```ts
14818
+ * // To disregard a single row, remove it from the array using data.splice(i, 1).
14819
+ * settings1 = {
14820
+ * beforeCut: (data, coords) => {
14821
+ * // data -> [[1, 2, 3], [4, 5, 6]]
14822
+ * data.splice(0, 1);
14823
+ * // data -> [[4, 5, 6]]
14824
+ * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
14825
+ * },
14826
+ * };
14827
+ *
14828
+ * // To cancel a cutting action, just return `false`.
14829
+ * settings2 = {
14830
+ * beforeCut: (data, coords) => {
14831
+ * return false;
14832
+ * },
14833
+ * };
14834
+ * ```
14835
+ *
14836
+ * ```html
14837
+ * <hot-table [settings]="settings1"></hot-table>
14838
+ * <hot-table [settings]="settings2"></hot-table>
14839
+ * ```
14840
+ * :::
14584
14841
  */
14585
14842
  'beforeCut',
14586
14843
  /**
@@ -14653,6 +14910,32 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
14653
14910
  * ...
14654
14911
  * ```
14655
14912
  * :::
14913
+ *
14914
+ * ::: only-for angular
14915
+ * ```ts
14916
+ * // To disregard a single row, remove it from the array using data.splice(i, 1).
14917
+ * settings1 = {
14918
+ * beforeCopy: (data, coords) => {
14919
+ * // data -> [[1, 2, 3], [4, 5, 6]]
14920
+ * data.splice(0, 1);
14921
+ * // data -> [[4, 5, 6]]
14922
+ * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
14923
+ * },
14924
+ * };
14925
+ *
14926
+ * // To cancel copying, return false from the callback.
14927
+ * settings2 = {
14928
+ * beforeCopy: (data, coords) => {
14929
+ * return false;
14930
+ * },
14931
+ * };
14932
+ * ```
14933
+ *
14934
+ * ```html
14935
+ * <hot-table [settings]="settings1"></hot-table>
14936
+ * <hot-table [settings]="settings2"></hot-table>
14937
+ * ```
14938
+ * :::
14656
14939
  */
14657
14940
  'beforeCopy',
14658
14941
  /**
@@ -14715,6 +14998,32 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
14715
14998
  * />
14716
14999
  * ```
14717
15000
  * :::
15001
+ *
15002
+ * ::: only-for angular
15003
+ * ```ts
15004
+ * // To disregard a single row, remove it from the array using data.splice(i, 1).
15005
+ * settings1 = {
15006
+ * beforePaste: (data, coords) => {
15007
+ * // data -> [[1, 2, 3], [4, 5, 6]]
15008
+ * data.splice(0, 1);
15009
+ * // data -> [[4, 5, 6]]
15010
+ * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
15011
+ * },
15012
+ * };
15013
+ *
15014
+ * // To cancel pasting, return false from the callback.
15015
+ * settings2 = {
15016
+ * beforePaste: (data, coords) => {
15017
+ * return false;
15018
+ * },
15019
+ * };
15020
+ * ```
15021
+ *
15022
+ * ```html
15023
+ * <hot-table [settings]="settings1"></hot-table>
15024
+ * <hot-table [settings]="settings2"></hot-table>
15025
+ * ```
15026
+ * :::
14718
15027
  */
14719
15028
  'beforePaste',
14720
15029
  /**
@@ -17891,16 +18200,16 @@ class TableView {
17891
18200
  */
17892
18201
  render() {
17893
18202
  if (!this.hot.isRenderSuspended()) {
17894
- this.hot.runHooks('beforeRender', this.hot.forceFullRender);
18203
+ const isFullRender = this.hot.forceFullRender;
18204
+ this.hot.runHooks('beforeRender', isFullRender);
17895
18205
  if (this.postponedAdjustElementsSize) {
17896
18206
  this.postponedAdjustElementsSize = false;
17897
18207
  this.adjustElementsSize();
17898
18208
  }
17899
- this._wt.draw(!this.hot.forceFullRender);
18209
+ this._wt.draw(!isFullRender);
17900
18210
  _assertClassBrand(_TableView_brand, this, _updateScrollbarClassNames).call(this);
17901
- this.hot.runHooks('afterRender', this.hot.forceFullRender);
18211
+ this.hot.runHooks('afterRender', isFullRender);
17902
18212
  this.hot.forceFullRender = false;
17903
- this.hot.renderCall = false;
17904
18213
  }
17905
18214
  }
17906
18215
 
@@ -18807,8 +19116,7 @@ class TableView {
18807
19116
  this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'click', () => {
18808
19117
  if (this.settings.observeDOMVisibility) {
18809
19118
  if (this._wt.drawInterrupted) {
18810
- this.hot.forceFullRender = true;
18811
- this.render();
19119
+ this.hot.render();
18812
19120
  }
18813
19121
  }
18814
19122
  });
@@ -18881,7 +19189,6 @@ class TableView {
18881
19189
  */
18882
19190
  beforeRender(force, skipRender) {
18883
19191
  if (force) {
18884
- // this.hot.forceFullRender = did Handsontable request full render?
18885
19192
  this.hot.runHooks('beforeViewRender', this.hot.forceFullRender, skipRender);
18886
19193
  }
18887
19194
  }
@@ -18895,7 +19202,6 @@ class TableView {
18895
19202
  */
18896
19203
  afterRender(force) {
18897
19204
  if (force) {
18898
- // this.hot.forceFullRender = did Handsontable request full render?
18899
19205
  this.hot.runHooks('afterViewRender', this.hot.forceFullRender);
18900
19206
  }
18901
19207
  }
@@ -21001,6 +21307,20 @@ class CellRange {
21001
21307
  return this;
21002
21308
  }
21003
21309
 
21310
+ /**
21311
+ * Normalizes the coordinates in your `CellRange` instance to the nearest valid position.
21312
+ *
21313
+ * Coordinates that point to headers (negative values) are normalized to `0`.
21314
+ *
21315
+ * @returns {CellRange}
21316
+ */
21317
+ normalize() {
21318
+ this.highlight.normalize();
21319
+ this.from.normalize();
21320
+ this.to.normalize();
21321
+ return this;
21322
+ }
21323
+
21004
21324
  /**
21005
21325
  * Checks if the coordinates in your `CellRange` instance are valid
21006
21326
  * in the context of given table parameters.
@@ -23622,8 +23942,8 @@ class Table {
23622
23942
  } else {
23623
23943
  this.tableOffset = this.dataAccessObject.parentTableOffset;
23624
23944
  }
23625
- const startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;
23626
- const startColumn = totalColumns > 0 ? this.getFirstRenderedColumn() : 0;
23945
+ const startRow = Math.max(this.getFirstRenderedRow(), 0);
23946
+ const startColumn = Math.max(this.getFirstRenderedColumn(), 0);
23627
23947
  this.rowFilter = new _row.default(startRow, totalRows, columnHeadersCount);
23628
23948
  this.columnFilter = new _column.default(startColumn, totalColumns, rowHeadersCount);
23629
23949
  let performRedraw = true;
@@ -23941,6 +24261,9 @@ class Table {
23941
24261
  return null;
23942
24262
  }
23943
24263
  const TR = cellElement.parentNode;
24264
+ if (!TR) {
24265
+ return null;
24266
+ }
23944
24267
  const CONTAINER = TR.parentNode;
23945
24268
  let row = (0, _element.index)(TR);
23946
24269
  let col = cellElement.cellIndex;
@@ -24760,7 +25083,10 @@ class RowHeadersRenderer extends _base.BaseRenderer {
24760
25083
  const orderView = this.obtainOrderView(TR);
24761
25084
  const cellsView = cells.obtainOrderView(TR);
24762
25085
  orderView.appendView(cellsView).setSize(rowHeadersCount).setOffset(0).start();
24763
- for (let visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {
25086
+
25087
+ // Reading the row header renderers in reverse because of how the Eco Renderers handle rendering
25088
+ // (prepending the nodes when rendering row headers).
25089
+ for (let visibleColumnIndex = rowHeadersCount - 1; visibleColumnIndex >= 0; visibleColumnIndex--) {
24764
25090
  orderView.render();
24765
25091
  const TH = orderView.getCurrentNode();
24766
25092
  TH.className = '';
@@ -26625,16 +26951,11 @@ const stickyRowsBottom = {
26625
26951
  * @this Table
26626
26952
  */
26627
26953
  getFirstRenderedRow() {
26628
- const totalRows = this.wtSettings.getSetting('totalRows');
26629
- const fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
26630
- const index = totalRows - fixedRowsBottom;
26631
- if (totalRows === 0 || fixedRowsBottom === 0) {
26954
+ const allStickyRows = this.getRenderedRowsCount();
26955
+ if (allStickyRows === 0) {
26632
26956
  return -1;
26633
26957
  }
26634
- if (index < 0) {
26635
- return 0;
26636
- }
26637
- return index;
26958
+ return this.wtSettings.getSetting('totalRows') - allStickyRows;
26638
26959
  },
26639
26960
  /**
26640
26961
  * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.
@@ -26663,6 +26984,10 @@ const stickyRowsBottom = {
26663
26984
  * @this Table
26664
26985
  */
26665
26986
  getLastRenderedRow() {
26987
+ const allStickyRows = this.getRenderedRowsCount();
26988
+ if (allStickyRows === 0) {
26989
+ return -1;
26990
+ }
26666
26991
  return this.wtSettings.getSetting('totalRows') - 1;
26667
26992
  },
26668
26993
  /**
@@ -26692,8 +27017,7 @@ const stickyRowsBottom = {
26692
27017
  * @this Table
26693
27018
  */
26694
27019
  getRenderedRowsCount() {
26695
- const totalRows = this.wtSettings.getSetting('totalRows');
26696
- return Math.min(this.wtSettings.getSetting('fixedRowsBottom'), totalRows);
27020
+ return Math.min(this.wtSettings.getSetting('totalRows'), this.wtSettings.getSetting('fixedRowsBottom'));
26697
27021
  },
26698
27022
  /**
26699
27023
  * Get the number of fully visible rows in the viewport.
@@ -26748,8 +27072,8 @@ const stickyColumnsStart = {
26748
27072
  * @this Table
26749
27073
  */
26750
27074
  getFirstRenderedColumn() {
26751
- const totalColumns = this.wtSettings.getSetting('totalColumns');
26752
- if (totalColumns === 0) {
27075
+ const allStickyColumns = this.getRenderedColumnsCount();
27076
+ if (allStickyColumns === 0) {
26753
27077
  return -1;
26754
27078
  }
26755
27079
  return 0;
@@ -26810,8 +27134,7 @@ const stickyColumnsStart = {
26810
27134
  * @this Table
26811
27135
  */
26812
27136
  getRenderedColumnsCount() {
26813
- const totalColumns = this.wtSettings.getSetting('totalColumns');
26814
- return Math.min(this.wtSettings.getSetting('fixedColumnsStart'), totalColumns);
27137
+ return Math.min(this.wtSettings.getSetting('totalColumns'), this.wtSettings.getSetting('fixedColumnsStart'));
26815
27138
  },
26816
27139
  /**
26817
27140
  * Get the number of fully visible columns in the viewport.
@@ -30265,6 +30588,11 @@ class Border {
30265
30588
  const lastRenderedRow = wtTable.getLastRenderedRow();
30266
30589
  const firstRenderedColumn = wtTable.getFirstRenderedColumn();
30267
30590
  const lastRenderedColumn = wtTable.getLastRenderedColumn();
30591
+ if (firstRenderedColumn < 0 && lastRenderedColumn < 0 || firstRenderedRow < 0 && lastRenderedRow < 0) {
30592
+ // ...also when overlays have rendered only headers skip it
30593
+ this.disappear();
30594
+ return;
30595
+ }
30268
30596
  let fromTD;
30269
30597
  if (isMultiple) {
30270
30598
  fromColumn = Math.max(fromColumn, firstRenderedColumn);
@@ -30759,8 +31087,8 @@ const stickyRowsTop = {
30759
31087
  * @this Table
30760
31088
  */
30761
31089
  getFirstRenderedRow() {
30762
- const totalRows = this.wtSettings.getSetting('totalRows');
30763
- if (totalRows === 0) {
31090
+ const allStickyRows = this.getRenderedRowsCount();
31091
+ if (allStickyRows === 0) {
30764
31092
  return -1;
30765
31093
  }
30766
31094
  return 0;
@@ -30821,8 +31149,7 @@ const stickyRowsTop = {
30821
31149
  * @this Table
30822
31150
  */
30823
31151
  getRenderedRowsCount() {
30824
- const totalRows = this.wtSettings.getSetting('totalRows');
30825
- return Math.min(this.wtSettings.getSetting('fixedRowsTop'), totalRows);
31152
+ return Math.min(this.wtSettings.getSetting('totalRows'), this.wtSettings.getSetting('fixedRowsTop'));
30826
31153
  },
30827
31154
  /**
30828
31155
  * Get the number of fully visible rows in the viewport.
@@ -37070,7 +37397,9 @@ class Selection {
37070
37397
  col: (0, _number.clamp)(to.col, 0, countColumns - 1)
37071
37398
  });
37072
37399
  this.selectedRange.ranges.push(range);
37073
- this.highlight.getFocus().add(highlight).commit().syncWith(range);
37400
+ if (this.highlight.isEnabledFor(_highlight.FOCUS_TYPE, this.selectedRange.current().highlight)) {
37401
+ this.highlight.getFocus().add(highlight).commit().syncWith(range);
37402
+ }
37074
37403
  this.applyAndCommit(range);
37075
37404
  }
37076
37405
 
@@ -39223,8 +39552,6 @@ class DataMap {
39223
39552
  }
39224
39553
  }
39225
39554
  this.hot.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
39226
- this.hot.forceFullRender = true; // used when data was changed
39227
-
39228
39555
  return {
39229
39556
  delta: numberOfCreatedRows,
39230
39557
  startPhysicalIndex: physicalRowIndex
@@ -39310,8 +39637,6 @@ class DataMap {
39310
39637
  }
39311
39638
  const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
39312
39639
  this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
39313
- this.hot.forceFullRender = true; // used when data was changed
39314
-
39315
39640
  this.refreshDuckSchema();
39316
39641
  return {
39317
39642
  delta: numberOfCreatedCols,
@@ -39358,8 +39683,6 @@ class DataMap {
39358
39683
  this.metaManager.removeRow(rowPhysicalIndex, 1);
39359
39684
  });
39360
39685
  this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
39361
- this.hot.forceFullRender = true; // used when data was changed
39362
-
39363
39686
  return true;
39364
39687
  }
39365
39688
 
@@ -39419,7 +39742,6 @@ class DataMap {
39419
39742
  }
39420
39743
  }
39421
39744
  this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
39422
- this.hot.forceFullRender = true; // used when data was changed
39423
39745
  this.refreshDuckSchema();
39424
39746
  return true;
39425
39747
  }
@@ -40642,6 +40964,33 @@ var _object = __webpack_require__(165);
40642
40964
  * ```
40643
40965
  * :::
40644
40966
  *
40967
+ * ::: only-for angular
40968
+ * ```ts
40969
+ * settings = {
40970
+ * data: [
40971
+ * ["A1", "B1", "C1", "D1", "E1"],
40972
+ * ["A2", "B2", "C2", "D2", "E2"],
40973
+ * ["A3", "B3", "C3", "D3", "E3"],
40974
+ * ["A4", "B4", "C4", "D4", "E4"],
40975
+ * ["A5", "B5", "C5", "D5", "E5"],
40976
+ * ],
40977
+ * width: 400,
40978
+ * height: 300,
40979
+ * colHeaders: true,
40980
+ * rowHeaders: true,
40981
+ * customBorders: true,
40982
+ * dropdownMenu: true,
40983
+ * multiColumnSorting: true,
40984
+ * filters: true,
40985
+ * manualRowMove: true,
40986
+ * };
40987
+ * ```
40988
+ *
40989
+ * ```html
40990
+ * <hot-table [settings]="settings" />
40991
+ * ```
40992
+ * :::
40993
+ *
40645
40994
  * Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:
40646
40995
  * - [The entire grid](@/guides/getting-started/configuration-options/configuration-options.md#set-grid-options)
40647
40996
  * - [Individual columns](@/guides/getting-started/configuration-options/configuration-options.md#set-column-options)
@@ -43208,6 +43557,7 @@ var _default = () => {
43208
43557
  * | `'de-CH'` | German - Switzerland |
43209
43558
  * | `'de-DE'` | German - Germany |
43210
43559
  * | `'es-MX'` | Spanish - Mexico |
43560
+ * | `'fa-IR'` | Persian - Iran |
43211
43561
  * | `'fr-FR'` | French - France |
43212
43562
  * | `'hr-HR'` | Croatian - Croatia |
43213
43563
  * | `'it-IT'` | Italian - Italy |
@@ -49039,7 +49389,7 @@ function createInputElement(hot) {
49039
49389
  input.name = '__htFocusCatcher';
49040
49390
  input.classList.add('htFocusCatcher');
49041
49391
  if (hot.getSettings().ariaTags) {
49042
- (0, _element.setAttribute)(input, [(0, _a11y.A11Y_PRESENTATION)(), (0, _a11y.A11Y_HIDDEN)()]);
49392
+ (0, _element.setAttribute)(input, [(0, _a11y.A11Y_LABEL)('Focus catcher')]);
49043
49393
  }
49044
49394
  return input;
49045
49395
  }
@@ -50281,7 +50631,7 @@ class TextEditor extends _baseEditor.BaseEditor {
50281
50631
  */
50282
50632
  close() {
50283
50633
  this.autoResize.unObserve();
50284
- if ((0, _element.isThisHotChild)(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
50634
+ if ((0, _element.isInternalElement)(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
50285
50635
  this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
50286
50636
  }
50287
50637
  this.hideEditableElement();
@@ -51124,6 +51474,7 @@ var _string = __webpack_require__(156);
51124
51474
  var _unicode = __webpack_require__(174);
51125
51475
  var _textRenderer = __webpack_require__(426);
51126
51476
  var _a11y = __webpack_require__(162);
51477
+ var _function = __webpack_require__(163);
51127
51478
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
51128
51479
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
51129
51480
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
@@ -51136,6 +51487,7 @@ const EDITOR_TYPE = exports.EDITOR_TYPE = 'autocomplete';
51136
51487
  * @class AutocompleteEditor
51137
51488
  */
51138
51489
  var _idPrefix = /*#__PURE__*/new WeakMap();
51490
+ var _focusDebounced = /*#__PURE__*/new WeakMap();
51139
51491
  var _AutocompleteEditor_brand = /*#__PURE__*/new WeakSet();
51140
51492
  class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
51141
51493
  constructor() {
@@ -51168,6 +51520,12 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
51168
51520
  * @type {string}
51169
51521
  */
51170
51522
  _classPrivateFieldInitSpec(this, _idPrefix, this.hot.guid.slice(0, 9));
51523
+ /**
51524
+ * Runs focus method after debounce.
51525
+ */
51526
+ _classPrivateFieldInitSpec(this, _focusDebounced, (0, _function.debounce)(() => {
51527
+ this.focus();
51528
+ }, 100));
51171
51529
  /**
51172
51530
  * Filters and sorts by relevance.
51173
51531
  *
@@ -51253,7 +51611,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
51253
51611
  }
51254
51612
  return this.TEXTAREA.value;
51255
51613
  }
51256
-
51257
51614
  /**
51258
51615
  * Creates an editor's elements and adds necessary CSS classnames.
51259
51616
  */
@@ -51299,10 +51656,10 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
51299
51656
  this.showEditableElement();
51300
51657
  this.focus();
51301
51658
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
51659
+ this.htEditor.addHook('afterScroll', _classPrivateFieldGet(_focusDebounced, this));
51302
51660
  this.htEditor.updateSettings({
51303
51661
  colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
51304
51662
  autoColumnSize: true,
51305
- autoRowSize: true,
51306
51663
  renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
51307
51664
  (0, _textRenderer.textRenderer)(hotInstance, TD, row, col, prop, value, cellProperties);
51308
51665
  const {
@@ -51574,7 +51931,10 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
51574
51931
  const maxItems = Math.min(this.cellProperties.visibleRows, this.strippedChoices.length);
51575
51932
  const height = Array.from({
51576
51933
  length: maxItems
51577
- }, (_, i) => i).reduce((h, index) => h + this.htEditor.getRowHeight(index), 0);
51934
+ }, (_, i) => i).reduce((totalHeight, index) => {
51935
+ const rowHeight = this.htEditor.getRowHeight(index) || this.htEditor.view.getDefaultRowHeight();
51936
+ return totalHeight + rowHeight;
51937
+ }, 0);
51578
51938
  return height + borderVerticalCompensation + 1;
51579
51939
  }
51580
51940
 
@@ -51672,7 +52032,7 @@ exports.AutocompleteEditor = AutocompleteEditor;
51672
52032
  function _fixDropdownWidth() {
51673
52033
  if (this.htEditor.view.hasVerticalScroll()) {
51674
52034
  this.htEditor.updateSettings({
51675
- width: this.htEditor.getSettings().width + (0, _element.getScrollbarWidth)(this.hot.rootDocument)
52035
+ width: this.getWidth() + (0, _element.getScrollbarWidth)(this.hot.rootDocument)
51676
52036
  });
51677
52037
  }
51678
52038
  }
@@ -54671,25 +55031,25 @@ var _manualRowResize = __webpack_require__(686);
54671
55031
  exports.ManualRowResize = _manualRowResize.ManualRowResize;
54672
55032
  var _mergeCells = __webpack_require__(688);
54673
55033
  exports.MergeCells = _mergeCells.MergeCells;
54674
- var _multiColumnSorting = __webpack_require__(702);
55034
+ var _multiColumnSorting = __webpack_require__(703);
54675
55035
  exports.MultiColumnSorting = _multiColumnSorting.MultiColumnSorting;
54676
- var _multipleSelectionHandles = __webpack_require__(706);
55036
+ var _multipleSelectionHandles = __webpack_require__(707);
54677
55037
  exports.MultipleSelectionHandles = _multipleSelectionHandles.MultipleSelectionHandles;
54678
- var _nestedHeaders = __webpack_require__(708);
55038
+ var _nestedHeaders = __webpack_require__(709);
54679
55039
  exports.NestedHeaders = _nestedHeaders.NestedHeaders;
54680
- var _nestedRows = __webpack_require__(724);
55040
+ var _nestedRows = __webpack_require__(725);
54681
55041
  exports.NestedRows = _nestedRows.NestedRows;
54682
- var _persistentState = __webpack_require__(732);
55042
+ var _persistentState = __webpack_require__(733);
54683
55043
  exports.PersistentState = _persistentState.PersistentState;
54684
- var _search = __webpack_require__(735);
55044
+ var _search = __webpack_require__(736);
54685
55045
  exports.Search = _search.Search;
54686
- var _stretchColumns = __webpack_require__(737);
55046
+ var _stretchColumns = __webpack_require__(738);
54687
55047
  exports.StretchColumns = _stretchColumns.StretchColumns;
54688
- var _touchScroll = __webpack_require__(743);
55048
+ var _touchScroll = __webpack_require__(744);
54689
55049
  exports.TouchScroll = _touchScroll.TouchScroll;
54690
- var _trimRows = __webpack_require__(745);
55050
+ var _trimRows = __webpack_require__(746);
54691
55051
  exports.TrimRows = _trimRows.TrimRows;
54692
- var _undoRedo = __webpack_require__(747);
55052
+ var _undoRedo = __webpack_require__(748);
54693
55053
  exports.UndoRedo = _undoRedo.UndoRedo;
54694
55054
  var _registry = __webpack_require__(198);
54695
55055
  exports.registerPlugin = _registry.registerPlugin;
@@ -54880,6 +55240,53 @@ const COLUMN_SIZE_MAP_NAME = 'autoColumnSize';
54880
55240
  * }
54881
55241
  * ```
54882
55242
  * :::
55243
+ *
55244
+ * ::: only-for angular
55245
+ *
55246
+ * ```ts
55247
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
55248
+ * import {
55249
+ * GridSettings,
55250
+ * HotTableModule,
55251
+ * HotTableComponent,
55252
+ * } from "@handsontable/angular-wrapper";
55253
+ *
55254
+ * `@Component`({
55255
+ * selector: "app-example",
55256
+ * standalone: true,
55257
+ * imports: [HotTableModule],
55258
+ * template: ` <div class="ht-theme-main">
55259
+ * <hot-table [settings]="gridSettings" />
55260
+ * </div>`,
55261
+ * })
55262
+ * export class ExampleComponent implements AfterViewInit {
55263
+ * `@ViewChild`(HotTableComponent, { static: false })
55264
+ * readonly hotTable!: HotTableComponent;
55265
+ *
55266
+ * readonly gridSettings = <GridSettings>{
55267
+ * data: this.getData(),
55268
+ * autoColumnSize: true,
55269
+ * };
55270
+ *
55271
+ * ngAfterViewInit(): void {
55272
+ * // Access to plugin instance:
55273
+ * const hot = this.hotTable.hotInstance;
55274
+ * const plugin = hot.getPlugin("autoColumnSize");
55275
+ *
55276
+ * plugin.getColumnWidth(4);
55277
+ *
55278
+ * if (plugin.isEnabled()) {
55279
+ * // code...
55280
+ * }
55281
+ * }
55282
+ *
55283
+ * private getData(): any[] {
55284
+ * //get some data
55285
+ * }
55286
+ * }
55287
+ * ```
55288
+ *
55289
+ * :::
54883
55290
  */
54884
55291
  /* eslint-enable jsdoc/require-description-complete-sentence */
54885
55292
  var _isInitialized = /*#__PURE__*/new WeakMap();
@@ -55078,7 +55485,7 @@ class AutoColumnSize extends _base.BasePlugin {
55078
55485
  if (firstVisibleColumn === -1 || lastVisibleColumn === -1) {
55079
55486
  return;
55080
55487
  }
55081
- const overwriteCache = this.hot.renderCall;
55488
+ const overwriteCache = this.hot.forceFullRender;
55082
55489
  this.calculateColumnsWidth({
55083
55490
  from: firstVisibleColumn,
55084
55491
  to: lastVisibleColumn
@@ -55885,6 +56292,9 @@ class GhostTable {
55885
56292
  this.table = this.createTable(this.hot.table.className);
55886
56293
  this.table.colGroup.appendChild(this.createColGroupsCol(row));
55887
56294
  this.table.tr.appendChild(this.createRow(row));
56295
+ if (row === 0) {
56296
+ (0, _element.addClass)(this.table.table, 'htGhostTableFirstRow');
56297
+ }
55888
56298
  this.container.container.appendChild(this.table.fragment);
55889
56299
  rowObject.table = this.table.table;
55890
56300
  }
@@ -57278,6 +57688,51 @@ const ROW_WIDTHS_MAP_NAME = 'autoRowSize';
57278
57688
  * }
57279
57689
  * ```
57280
57690
  * :::
57691
+ *
57692
+ * ::: only-for angular
57693
+ * ```ts
57694
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
57695
+ * import {
57696
+ * GridSettings,
57697
+ * HotTableModule,
57698
+ * HotTableComponent,
57699
+ * } from "@handsontable/angular-wrapper";
57700
+ *
57701
+ * `@Component`({
57702
+ * selector: "app-example",
57703
+ * standalone: true,
57704
+ * imports: [HotTableModule],
57705
+ * template: ` <div class="ht-theme-main">
57706
+ * <hot-table [settings]="gridSettings" />
57707
+ * </div>`,
57708
+ * })
57709
+ * export class ExampleComponent implements AfterViewInit {
57710
+ * `@ViewChild`(HotTableComponent, { static: false })
57711
+ * readonly hotTable!: HotTableComponent;
57712
+ *
57713
+ * readonly gridSettings = <GridSettings>{
57714
+ * data: this.getData(),
57715
+ * autoRowSize: true,
57716
+ * };
57717
+ *
57718
+ * ngAfterViewInit(): void {
57719
+ * // Access to plugin instance:
57720
+ * const hot = this.hotTable.hotInstance;
57721
+ * const plugin = hot.getPlugin("autoRowSize");
57722
+ *
57723
+ * plugin.getRowHeight(4);
57724
+ *
57725
+ * if (plugin.isEnabled()) {
57726
+ * // code...
57727
+ * }
57728
+ * }
57729
+ *
57730
+ * private getData(): any[] {
57731
+ * // get some data
57732
+ * }
57733
+ * }
57734
+ * ```
57735
+ * :::
57281
57736
  */
57282
57737
  /* eslint-enable jsdoc/require-description-complete-sentence */
57283
57738
  var _visualRowsToRefresh = /*#__PURE__*/new WeakMap();
@@ -57472,7 +57927,7 @@ class AutoRowSize extends _base.BasePlugin {
57472
57927
  if (firstVisibleRow === -1 || lastVisibleRow === -1) {
57473
57928
  return;
57474
57929
  }
57475
- const overwriteCache = this.hot.renderCall;
57930
+ const overwriteCache = this.hot.forceFullRender;
57476
57931
  this.calculateRowsHeight({
57477
57932
  from: firstVisibleRow,
57478
57933
  to: lastVisibleRow
@@ -57573,11 +58028,6 @@ class AutoRowSize extends _base.BasePlugin {
57573
58028
 
57574
58029
  // @TODO Should call once per render cycle, currently fired separately in different plugins
57575
58030
  this.hot.view.adjustElementsSize();
57576
-
57577
- // tmp
57578
- if (this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender) {
57579
- this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw();
57580
- }
57581
58031
  }
57582
58032
  };
57583
58033
  const syncLimit = this.getSyncCalculationLimit();
@@ -57911,6 +58361,19 @@ const bindTypeToMapStrategy = new Map([['loose', _looseBindsMap.default], ['stri
57911
58361
  * />
57912
58362
  * ```
57913
58363
  * :::
58364
+ *
58365
+ * ::: only-for angular
58366
+ * ```ts
58367
+ * settings = {
58368
+ * data: getData(),
58369
+ * bindRowsWithHeaders: true,
58370
+ * };
58371
+ * ```
58372
+ *
58373
+ * ```html
58374
+ * <hot-table [settings]="settings" />
58375
+ * ```
58376
+ * :::
57914
58377
  */
57915
58378
  var _BindRowsWithHeaders_brand = /*#__PURE__*/new WeakSet();
57916
58379
  class BindRowsWithHeaders extends _base.BasePlugin {
@@ -58210,6 +58673,37 @@ const actionDictionary = new Map([['collapse', {
58210
58673
  * />
58211
58674
  * ```
58212
58675
  * :::
58676
+ *
58677
+ * ::: only-for angular
58678
+ * ```ts
58679
+ * // Enable the collapsibleColumns plugin
58680
+ * settings = {
58681
+ * data: generateDataObj(),
58682
+ * colHeaders: true,
58683
+ * rowHeaders: true,
58684
+ * nestedHeaders: true,
58685
+ * // enable plugin
58686
+ * collapsibleColumns: true,
58687
+ * };
58688
+ *
58689
+ * // Or enable and configure specific collapsible columns
58690
+ * settings = {
58691
+ * data: generateDataObj(),
58692
+ * colHeaders: true,
58693
+ * rowHeaders: true,
58694
+ * nestedHeaders: true,
58695
+ * // enable and configure which columns can be collapsed
58696
+ * collapsibleColumns: [
58697
+ * { row: -4, col: 1, collapsible: true },
58698
+ * { row: -3, col: 5, collapsible: true },
58699
+ * ],
58700
+ * };
58701
+ * ```
58702
+ *
58703
+ * ```html
58704
+ * <hot-table [settings]="settings"></hot-table>
58705
+ * ```
58706
+ * :::
58213
58707
  */
58214
58708
  var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
58215
58709
  var _CollapsibleColumns_brand = /*#__PURE__*/new WeakSet();
@@ -59028,10 +59522,6 @@ class ColumnSorting extends _base.BasePlugin {
59028
59522
  this.hot.runHooks('afterColumnSort', currentSortConfig, sortPossible ? destinationSortConfigs : currentSortConfig, sortPossible);
59029
59523
  if (sortPossible) {
59030
59524
  this.hot.render();
59031
- // TODO: Workaround? This triggers fast redraw. One test won't pass after removal.
59032
- // It should be refactored / described.
59033
- this.hot.forceFullRender = false;
59034
- this.hot.view.render();
59035
59525
  }
59036
59526
  }
59037
59527
 
@@ -60496,6 +60986,39 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 220;
60496
60986
  * />
60497
60987
  * ```
60498
60988
  * :::
60989
+ *
60990
+ * ::: only-for angular
60991
+ * ```ts
60992
+ * settings = {
60993
+ * data: getData(),
60994
+ * colHeaders: true,
60995
+ * rowHeaders: true,
60996
+ * columnSummary: [
60997
+ * {
60998
+ * type: "min",
60999
+ * destinationRow: 4,
61000
+ * destinationColumn: 1,
61001
+ * },
61002
+ * {
61003
+ * type: "max",
61004
+ * destinationRow: 0,
61005
+ * destinationColumn: 3,
61006
+ * reversedRowCoords: true,
61007
+ * },
61008
+ * {
61009
+ * type: "sum",
61010
+ * destinationRow: 4,
61011
+ * destinationColumn: 5,
61012
+ * forceNumeric: true,
61013
+ * },
61014
+ * ],
61015
+ * };
61016
+ * ```
61017
+ *
61018
+ * ```html
61019
+ * <hot-table [settings]="settings"></hot-table>
61020
+ * ```
61021
+ * :::
60499
61022
  */
60500
61023
  var _ColumnSummary_brand = /*#__PURE__*/new WeakSet();
60501
61024
  class ColumnSummary extends _base.BasePlugin {
@@ -61585,6 +62108,59 @@ const SHORTCUTS_CONTEXT_NAME = `plugin:${PLUGIN_KEY}`;
61585
62108
  * commentsPlugin.removeComment();
61586
62109
  * ```
61587
62110
  * :::
62111
+ *
62112
+ * ::: only-for angular
62113
+ * ```ts
62114
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
62115
+ * import {
62116
+ * GridSettings,
62117
+ * HotTableModule,
62118
+ * HotTableComponent,
62119
+ * } from "@handsontable/angular-wrapper";
62120
+ *
62121
+ * `@Component`({
62122
+ * selector: "app-example",
62123
+ * standalone: true,
62124
+ * imports: [HotTableModule],
62125
+ * template: ` <div class="ht-theme-main">
62126
+ * <hot-table [settings]="gridSettings" />
62127
+ * </div>`,
62128
+ * })
62129
+ * export class ExampleComponent implements AfterViewInit {
62130
+ * `@ViewChild`(HotTableComponent, { static: false })
62131
+ * readonly hotTable!: HotTableComponent;
62132
+ *
62133
+ * readonly gridSettings = <GridSettings>{
62134
+ * data: this.getData(),
62135
+ * comments: true,
62136
+ * cell: [
62137
+ * { row: 1, col: 1, comment: { value: "Foo" } },
62138
+ * { row: 2, col: 2, comment: { value: "Bar" } },
62139
+ * ],
62140
+ * };
62141
+ *
62142
+ * ngAfterViewInit(): void {
62143
+ * // Access to plugin instance:
62144
+ * const hot = this.hotTable.hotInstance;
62145
+ * const commentsPlugin = hot.getPlugin("comments");
62146
+ *
62147
+ * // Manage comments programmatically:
62148
+ * commentsPlugin.setCommentAtCell(1, 6, "Comment contents");
62149
+ * commentsPlugin.showAtCell(1, 6);
62150
+ * commentsPlugin.removeCommentAtCell(1, 6);
62151
+ *
62152
+ * // You can also set range once and use proper methods:
62153
+ * commentsPlugin.setRange({ from: { row: 1, col: 6 } });
62154
+ * commentsPlugin.setComment("Comment contents");
62155
+ * commentsPlugin.show();
62156
+ * }
62157
+ *
62158
+ * private getData(): any[] {
62159
+ * // get some data
62160
+ * }
62161
+ * }
62162
+ * ```
62163
+ * :::
61588
62164
  */
61589
62165
  var _editor = /*#__PURE__*/new WeakMap();
61590
62166
  var _displaySwitch = /*#__PURE__*/new WeakMap();
@@ -61698,6 +62274,7 @@ class Comments extends _base.BasePlugin {
61698
62274
  this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
61699
62275
  this.addHook('afterBeginEditing', () => this.hide());
61700
62276
  this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
62277
+ this.addHook('beforeCompositionStart', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
61701
62278
  this.addHook('afterSetTheme', function () {
61702
62279
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
61703
62280
  args[_key2] = arguments[_key2];
@@ -64832,6 +65409,7 @@ class Menu {
64832
65409
  layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
64833
65410
  ariaTags: false,
64834
65411
  themeName: this.hot.getCurrentThemeName(),
65412
+ beforeRefreshDimensions: () => false,
64835
65413
  beforeOnCellMouseOver: (event, coords) => {
64836
65414
  _classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
64837
65415
  },
@@ -65375,7 +65953,11 @@ class Positioner {
65375
65953
  setPositionAboveCursor() {
65376
65954
  let top = _classPrivateFieldGet(_offset, this).above + _classPrivateFieldGet(_cursor, this).top - _classPrivateFieldGet(_container, this).offsetHeight;
65377
65955
  if (_classPrivateFieldGet(_parentContainer, this)) {
65378
- top = _classPrivateFieldGet(_cursor, this).top + _classPrivateFieldGet(_cursor, this).cellHeight - _classPrivateFieldGet(_container, this).offsetHeight + 3;
65956
+ const rootWindow = _classPrivateFieldGet(_parentContainer, this).ownerDocument.defaultView;
65957
+ const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
65958
+ const paddingTop = Number.parseInt(style.paddingTop, 10);
65959
+ const borderTop = Number.parseInt(style.borderTop, 10);
65960
+ top = _classPrivateFieldGet(_cursor, this).top + _classPrivateFieldGet(_cursor, this).cellHeight - _classPrivateFieldGet(_container, this).scrollHeight + paddingTop + borderTop;
65379
65961
  }
65380
65962
  _classPrivateFieldGet(_container, this).style.top = `${top}px`;
65381
65963
  }
@@ -65386,7 +65968,11 @@ class Positioner {
65386
65968
  setPositionBelowCursor() {
65387
65969
  let top = _classPrivateFieldGet(_offset, this).below + _classPrivateFieldGet(_cursor, this).top + 1;
65388
65970
  if (_classPrivateFieldGet(_parentContainer, this)) {
65389
- top = _classPrivateFieldGet(_cursor, this).top - 1;
65971
+ const rootWindow = _classPrivateFieldGet(_parentContainer, this).ownerDocument.defaultView;
65972
+ const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
65973
+ const paddingTop = Number.parseInt(style.paddingTop, 10);
65974
+ const borderTop = Number.parseInt(style.borderTop, 10);
65975
+ top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop - 1;
65390
65976
  }
65391
65977
  _classPrivateFieldGet(_container, this).style.top = `${top}px`;
65392
65978
  }
@@ -66127,7 +66713,7 @@ function createDefaultShortcutsList(menu) {
66127
66713
  keys: [['ArrowUp']],
66128
66714
  callback: () => menu.getNavigator().toPreviousItem()
66129
66715
  }, {
66130
- keys: [['ArrowRight']],
66716
+ keys: [[hot.isRtl() ? 'ArrowLeft' : 'ArrowRight']],
66131
66717
  callback: () => {
66132
66718
  const selection = hotMenu.getSelectedLast();
66133
66719
  if (selection) {
@@ -66138,7 +66724,7 @@ function createDefaultShortcutsList(menu) {
66138
66724
  }
66139
66725
  }
66140
66726
  }, {
66141
- keys: [['ArrowLeft']],
66727
+ keys: [[hot.isRtl() ? 'ArrowRight' : 'ArrowLeft']],
66142
66728
  callback: () => {
66143
66729
  const selection = hotMenu.getSelectedLast();
66144
66730
  if (selection && menu.isSubMenu()) {
@@ -66528,6 +67114,9 @@ class CopyPaste extends _base.BasePlugin {
66528
67114
  return _assertClassBrand(_CopyPaste_brand, _this, _onAfterSelection).call(_this, ...args);
66529
67115
  });
66530
67116
  this.addHook('afterSelectionEnd', () => _assertClassBrand(_CopyPaste_brand, this, _onAfterSelectionEnd).call(this));
67117
+
67118
+ // Events are attached to the document, not the root table element - as it should,
67119
+ // for Chrome 133 and lower to copy/paste/cut work properly (#dev-2277).
66531
67120
  this.eventManager.addEventListener(this.hot.rootDocument, 'copy', function () {
66532
67121
  return _this.onCopy(...arguments);
66533
67122
  });
@@ -66834,12 +67423,10 @@ class CopyPaste extends _base.BasePlugin {
66834
67423
  * @private
66835
67424
  */
66836
67425
  onCopy(event) {
66837
- var _event$target, _this$hot$getSelected;
67426
+ const eventTarget = event.composedPath()[0];
66838
67427
  const focusedElement = this.hot.getFocusManager().getRefocusElement();
66839
- const isHotInput = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.hasAttribute('data-hot-input');
66840
- const selectedCell = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
66841
- const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
66842
- if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || (0, _element.isHTMLElement)(event.target) && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
67428
+ const isHotInput = eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.hasAttribute('data-hot-input');
67429
+ if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCopy, this) || this.isEditorOpened() || (0, _element.isHTMLElement)(eventTarget) && (isHotInput && eventTarget !== focusedElement || !isHotInput && eventTarget !== this.hot.rootDocument.body && !(0, _element.isInternalElement)(eventTarget, this.hot.rootElement))) {
66843
67430
  return;
66844
67431
  }
66845
67432
  event.preventDefault();
@@ -66869,12 +67456,10 @@ class CopyPaste extends _base.BasePlugin {
66869
67456
  * @private
66870
67457
  */
66871
67458
  onCut(event) {
66872
- var _event$target2, _this$hot$getSelected2;
67459
+ const eventTarget = event.composedPath()[0];
66873
67460
  const focusedElement = this.hot.getFocusManager().getRefocusElement();
66874
- const isHotInput = (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.hasAttribute('data-hot-input');
66875
- const selectedCell = (_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight;
66876
- const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
66877
- if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || (0, _element.isHTMLElement)(event.target) && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
67461
+ const isHotInput = eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.hasAttribute('data-hot-input');
67462
+ if (!this.hot.isListening() && !_classPrivateFieldGet(_isTriggeredByCut, this) || this.isEditorOpened() || (0, _element.isHTMLElement)(eventTarget) && (isHotInput && eventTarget !== focusedElement || !isHotInput && eventTarget !== this.hot.rootDocument.body && !(0, _element.isInternalElement)(eventTarget, this.hot.rootElement))) {
66878
67463
  return;
66879
67464
  }
66880
67465
  event.preventDefault();
@@ -66903,12 +67488,10 @@ class CopyPaste extends _base.BasePlugin {
66903
67488
  * @private
66904
67489
  */
66905
67490
  onPaste(event) {
66906
- var _event$target3, _this$hot$getSelected3;
67491
+ const eventTarget = event.composedPath()[0];
66907
67492
  const focusedElement = this.hot.getFocusManager().getRefocusElement();
66908
- const isHotInput = (_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.hasAttribute('data-hot-input');
66909
- const selectedCell = (_this$hot$getSelected3 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected3 === void 0 ? void 0 : _this$hot$getSelected3.highlight;
66910
- const TD = selectedCell ? this.hot.getCell(selectedCell.row, selectedCell.col, true) : null;
66911
- if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || (0, _element.isHTMLElement)(event.target) && (isHotInput && event.target !== focusedElement || !isHotInput && event.target !== this.hot.rootDocument.body && TD !== event.target)) {
67493
+ const isHotInput = eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.hasAttribute('data-hot-input');
67494
+ if (!this.hot.isListening() || this.isEditorOpened() || !this.hot.getSelected() || (0, _element.isHTMLElement)(eventTarget) && (isHotInput && eventTarget !== focusedElement || !isHotInput && eventTarget !== this.hot.rootDocument.body && !(0, _element.isInternalElement)(eventTarget, this.hot.rootElement))) {
66912
67495
  return;
66913
67496
  }
66914
67497
  event.preventDefault();
@@ -67355,6 +67938,9 @@ class PasteEvent {
67355
67938
  this.clipboardData = new _clipboardData.default();
67356
67939
  }
67357
67940
  preventDefault() {}
67941
+ composedPath() {
67942
+ return [];
67943
+ }
67358
67944
  }
67359
67945
  exports["default"] = PasteEvent;
67360
67946
 
@@ -69197,6 +69783,21 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
69197
69783
  * />
69198
69784
  * ```
69199
69785
  * :::
69786
+ *
69787
+ * ::: only-for angular
69788
+ * ```ts
69789
+ * settings = {
69790
+ * data: data,
69791
+ * comments: true,
69792
+ * // enable and configure dropdown menu
69793
+ * dropdownMenu: ["remove_col", "---------", "make_read_only", "alignment"],
69794
+ * };
69795
+ * ```
69796
+ *
69797
+ * ```html
69798
+ * <hot-table [settings]="settings"></hot-table>
69799
+ * ```
69800
+ * :::
69200
69801
  */
69201
69802
  var _isButtonClicked = /*#__PURE__*/new WeakMap();
69202
69803
  var _DropdownMenu_brand = /*#__PURE__*/new WeakSet();
@@ -69777,6 +70378,64 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 240;
69777
70378
  * });
69778
70379
  * ```
69779
70380
  * :::
70381
+ *
70382
+ * ::: only-for angular
70383
+ * ```ts
70384
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
70385
+ * import {
70386
+ * GridSettings,
70387
+ * HotTableModule,
70388
+ * HotTableComponent,
70389
+ * } from "@handsontable/angular-wrapper";
70390
+ *
70391
+ * `@Component`({
70392
+ * selector: "app-example",
70393
+ * standalone: true,
70394
+ * imports: [HotTableModule],
70395
+ * template: ` <div class="ht-theme-main">
70396
+ * <hot-table [settings]="gridSettings" />
70397
+ * </div>`,
70398
+ * })
70399
+ * export class ExampleComponent implements AfterViewInit {
70400
+ * `@ViewChild`(HotTableComponent, { static: false })
70401
+ * readonly hotTable!: HotTableComponent;
70402
+ *
70403
+ * readonly gridSettings = <GridSettings>{
70404
+ * data: this.getData(),
70405
+ * };
70406
+ *
70407
+ * ngAfterViewInit(): void {
70408
+ * // Access to plugin instance:
70409
+ * const hot = this.hotTable.hotInstance;
70410
+ * // Access to exportFile plugin instance
70411
+ * const exportPlugin = hot.getPlugin("exportFile");
70412
+ *
70413
+ * // Export as a string
70414
+ * exportPlugin.exportAsString("csv");
70415
+ *
70416
+ * // Export as a blob object
70417
+ * exportPlugin.exportAsBlob("csv");
70418
+ *
70419
+ * // Export to downloadable file (named: MyFile.csv)
70420
+ * exportPlugin.downloadFile("csv", { filename: "MyFile" });
70421
+ *
70422
+ * // Export as a string (with specified data range):
70423
+ * exportPlugin.exportAsString("csv", {
70424
+ * exportHiddenRows: true, // default false
70425
+ * exportHiddenColumns: true, // default false
70426
+ * columnHeaders: true, // default false
70427
+ * rowHeaders: true, // default false
70428
+ * columnDelimiter: ";", // default ','
70429
+ * range: [1, 1, 6, 6], // [startRow, endRow, startColumn, endColumn]
70430
+ * });
70431
+ * }
70432
+ *
70433
+ * private getData(): any[] {
70434
+ * // get some data
70435
+ * }
70436
+ * }
70437
+ * ```
70438
+ * :::
69780
70439
  */
69781
70440
  class ExportFile extends _base.BasePlugin {
69782
70441
  static get PLUGIN_KEY() {
@@ -70358,6 +71017,22 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
70358
71017
  * />
70359
71018
  * ```
70360
71019
  * :::
71020
+ *
71021
+ * ::: only-for angular
71022
+ * ```ts
71023
+ * settings = {
71024
+ * data: getData(),
71025
+ * colHeaders: true,
71026
+ * rowHeaders: true,
71027
+ * dropdownMenu: true,
71028
+ * filters: true,
71029
+ * };
71030
+ * ```
71031
+ *
71032
+ * ```html
71033
+ * <hot-table [settings]="settings"></hot-table>
71034
+ * ```
71035
+ * :::
70361
71036
  */
70362
71037
  var _menuFocusNavigator = /*#__PURE__*/new WeakMap();
70363
71038
  var _dropdownMenuTraces = /*#__PURE__*/new WeakMap();
@@ -70740,6 +71415,64 @@ class Filters extends _base.BasePlugin {
70740
71415
  * ```
70741
71416
  * :::
70742
71417
  *
71418
+ * ::: only-for angular
71419
+ * ```ts
71420
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
71421
+ * import {
71422
+ * GridSettings,
71423
+ * HotTableModule,
71424
+ * HotTableComponent,
71425
+ * } from "@handsontable/angular-wrapper";
71426
+ *
71427
+ * `@Component`({
71428
+ * selector: "app-example",
71429
+ * standalone: true,
71430
+ * imports: [HotTableModule],
71431
+ * template: ` <div class="ht-theme-main">
71432
+ * <hot-table [settings]="gridSettings" />
71433
+ * </div>`,
71434
+ * })
71435
+ * export class ExampleComponent implements AfterViewInit {
71436
+ * `@ViewChild`(HotTableComponent, { static: false })
71437
+ * readonly hotTable!: HotTableComponent;
71438
+ *
71439
+ * readonly gridSettings = <GridSettings>{
71440
+ * data: this.getData(),
71441
+ * filters: true,
71442
+ * };
71443
+ *
71444
+ * ngAfterViewInit(): void {
71445
+ * // Access to filters plugin instance
71446
+ * const hot = this.hotTable.hotInstance;
71447
+ * const filtersPlugin = hot.getPlugin("filters");
71448
+ *
71449
+ * // Add filter "Greater than" 95 to column at index 1
71450
+ * filtersPlugin.addCondition(1, "gt", [95]);
71451
+ * filtersPlugin.filter();
71452
+ *
71453
+ * // Add filter "By value" to column at index 1
71454
+ * // In this case, all values that don't match will be filtered.
71455
+ * filtersPlugin.addCondition(1, "by_value", [["ing", "ed", "as", "on"]]);
71456
+ * filtersPlugin.filter();
71457
+ *
71458
+ * // Add filter "Begins with" with value "de" AND "Not contains" with value "ing"
71459
+ * filtersPlugin.addCondition(1, "begins_with", ["de"], "conjunction");
71460
+ * filtersPlugin.addCondition(1, "not_contains", ["ing"], "conjunction");
71461
+ * filtersPlugin.filter();
71462
+ *
71463
+ * // Add filter "Begins with" with value "de" OR "Not contains" with value "ing"
71464
+ * filtersPlugin.addCondition(1, "begins_with", ["de"], "disjunction");
71465
+ * filtersPlugin.addCondition(1, "not_contains", ["ing"], "disjunction");
71466
+ * filtersPlugin.filter();
71467
+ * }
71468
+ *
71469
+ * private getData(): any[] {
71470
+ * // Get some data
71471
+ * }
71472
+ * }
71473
+ * ```
71474
+ * :::
71475
+ *
70743
71476
  * @param {number} column Visual column index.
70744
71477
  * @param {string} name Condition short name.
70745
71478
  * @param {Array} args Condition arguments.
@@ -70822,10 +71555,10 @@ class Filters extends _base.BasePlugin {
70822
71555
  *
70823
71556
  * @returns {Array}
70824
71557
  */
70825
- /* eslint-enable jsdoc/require-description-complete-sentence */
70826
71558
  exportConditions() {
70827
71559
  return this.conditionCollection.exportAllConditions();
70828
71560
  }
71561
+ /* eslint-enable jsdoc/require-description-complete-sentence */
70829
71562
 
70830
71563
  /**
70831
71564
  * Filters data based on added filter conditions.
@@ -70842,38 +71575,39 @@ class Filters extends _base.BasePlugin {
70842
71575
  let visibleVisualRows = [];
70843
71576
  const conditions = this.exportConditions();
70844
71577
  const allowFiltering = this.hot.runHooks('beforeFilter', conditions, _classPrivateFieldGet(_previousConditionStack, this));
70845
- if (allowFiltering !== false) {
70846
- if (needToFilter) {
70847
- const trimmedRows = [];
70848
- this.hot.batchExecution(() => {
70849
- this.filtersRowsMap.clear();
70850
- visibleVisualRows = (0, _array.arrayMap)(dataFilter.filter(), rowData => rowData.meta.visualRow);
70851
- const visibleVisualRowsAssertion = (0, _utils.createArrayAssertion)(visibleVisualRows);
70852
- (0, _number.rangeEach)(this.hot.countSourceRows() - 1, row => {
70853
- if (!visibleVisualRowsAssertion(row)) {
70854
- trimmedRows.push(row);
70855
- }
70856
- });
70857
- (0, _array.arrayEach)(trimmedRows, physicalRow => {
70858
- this.filtersRowsMap.setValueAtIndex(physicalRow, true);
70859
- });
70860
- }, true);
70861
- if (!navigableHeaders && !visibleVisualRows.length) {
70862
- this.hot.deselectCell();
70863
- }
70864
- } else {
71578
+ if (allowFiltering !== false && needToFilter) {
71579
+ const trimmedRows = [];
71580
+ this.hot.batchExecution(() => {
70865
71581
  this.filtersRowsMap.clear();
71582
+ visibleVisualRows = (0, _array.arrayMap)(dataFilter.filter(), rowData => rowData.meta.visualRow);
71583
+ const visibleVisualRowsAssertion = (0, _utils.createArrayAssertion)(visibleVisualRows);
71584
+ (0, _number.rangeEach)(this.hot.countSourceRows() - 1, row => {
71585
+ if (!visibleVisualRowsAssertion(row)) {
71586
+ trimmedRows.push(row);
71587
+ }
71588
+ });
71589
+ (0, _array.arrayEach)(trimmedRows, physicalRow => {
71590
+ this.filtersRowsMap.setValueAtIndex(physicalRow, true);
71591
+ });
71592
+ }, true);
71593
+ if (!navigableHeaders && !visibleVisualRows.length) {
71594
+ this.hot.deselectCell();
70866
71595
  }
70867
71596
  _classPrivateFieldSet(_previousConditionStack, this, this.exportConditions());
70868
- this.hot.runHooks('afterFilter', conditions);
70869
- this.hot.view.adjustElementsSize();
70870
- this.hot.render();
71597
+ } else if (allowFiltering !== false && !needToFilter) {
71598
+ _classPrivateFieldSet(_previousConditionStack, this, this.exportConditions());
71599
+ this.filtersRowsMap.clear();
70871
71600
  } else {
70872
71601
  this.importConditions(_classPrivateFieldGet(_previousConditionStack, this));
70873
71602
  }
70874
71603
  if (this.hot.selection.isSelected()) {
70875
71604
  this.hot.selectCell(navigableHeaders ? -1 : 0, this.hot.getSelectedRangeLast().highlight.col);
70876
71605
  }
71606
+ if (allowFiltering !== false) {
71607
+ this.hot.runHooks('afterFilter', conditions);
71608
+ this.hot.view.adjustElementsSize();
71609
+ this.hot.render();
71610
+ }
70877
71611
  }
70878
71612
 
70879
71613
  /**
@@ -74300,7 +75034,13 @@ class MultipleSelectUI extends _base.BaseUI {
74300
75034
  beforeOnCellMouseUp: () => {
74301
75035
  _classPrivateFieldGet(_itemsBox, this).listen();
74302
75036
  },
74303
- colWidths: () => _classPrivateFieldGet(_itemsBox, this).container.scrollWidth - (0, _element.getScrollbarWidth)(rootDocument),
75037
+ modifyColWidth: width => {
75038
+ const minWidth = _classPrivateFieldGet(_itemsBox, this).container.scrollWidth - (0, _element.getScrollbarWidth)(rootDocument);
75039
+ if (width !== undefined && width < minWidth) {
75040
+ return minWidth;
75041
+ }
75042
+ return width;
75043
+ },
74304
75044
  maxCols: 1,
74305
75045
  autoWrapCol: true,
74306
75046
  height: 110,
@@ -77923,6 +78663,70 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 310;
77923
78663
  * hot.render();
77924
78664
  * ```
77925
78665
  * :::
78666
+ *
78667
+ * ::: only-for angular
78668
+ * ```ts
78669
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
78670
+ * import {
78671
+ * GridSettings,
78672
+ * HotTableModule,
78673
+ * HotTableComponent,
78674
+ * } from "@handsontable/angular-wrapper";
78675
+ *
78676
+ * `@Component`({
78677
+ * selector: "app-example",
78678
+ * standalone: true,
78679
+ * imports: [HotTableModule],
78680
+ * template: ` <div class="ht-theme-main">
78681
+ * <hot-table [settings]="gridSettings" />
78682
+ * </div>`,
78683
+ * })
78684
+ * export class ExampleComponent implements AfterViewInit {
78685
+ * `@ViewChild`(HotTableComponent, { static: false })
78686
+ * readonly hotTable!: HotTableComponent;
78687
+ *
78688
+ * readonly gridSettings = <GridSettings>{
78689
+ * data: this.getData(),
78690
+ * hiddenColumns: {
78691
+ * copyPasteEnabled: true,
78692
+ * indicators: true,
78693
+ * columns: [1, 2, 5],
78694
+ * },
78695
+ * };
78696
+ *
78697
+ * ngAfterViewInit(): void {
78698
+ * // Access the `HiddenColumns` plugin's instance
78699
+ * const hot = this.hotTable.hotInstance;
78700
+ * const hiddenColumnsPlugin = hot.getPlugin("hiddenColumns");
78701
+ *
78702
+ * // Hide a single column
78703
+ * hiddenColumnsPlugin.hideColumn(1);
78704
+ *
78705
+ * // Hide multiple columns
78706
+ * hiddenColumnsPlugin.hideColumn(1, 2, 9);
78707
+ *
78708
+ * // Hide multiple columns as an array
78709
+ * hiddenColumnsPlugin.hideColumns([1, 2, 9]);
78710
+ *
78711
+ * // Unhide a single column
78712
+ * hiddenColumnsPlugin.showColumn(1);
78713
+ *
78714
+ * // Unhide multiple columns
78715
+ * hiddenColumnsPlugin.showColumn(1, 2, 9);
78716
+ *
78717
+ * // Unhide multiple columns as an array
78718
+ * hiddenColumnsPlugin.showColumns([1, 2, 9]);
78719
+ *
78720
+ * // To see your changes, re-render your Handsontable instance
78721
+ * hot.render();
78722
+ * }
78723
+ *
78724
+ * private getData(): any[] {
78725
+ * // Get some data
78726
+ * }
78727
+ * }
78728
+ * ```
78729
+ * :::
77926
78730
  */
77927
78731
  var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
77928
78732
  var _HiddenColumns_brand = /*#__PURE__*/new WeakSet();
@@ -78013,8 +78817,8 @@ class HiddenColumns extends _base.BasePlugin {
78013
78817
  * Disables the plugin functionality for this Handsontable instance.
78014
78818
  */
78015
78819
  disablePlugin() {
78016
- this.hot.columnIndexMapper.unregisterMap(this.pluginName);
78017
78820
  super.disablePlugin();
78821
+ this.hot.columnIndexMapper.unregisterMap(this.pluginName);
78018
78822
  this.resetCellsMeta();
78019
78823
  }
78020
78824
 
@@ -78612,6 +79416,70 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 320;
78612
79416
  * hot.render();
78613
79417
  * ```
78614
79418
  * :::
79419
+ *
79420
+ * ::: only-for angular
79421
+ * ```ts
79422
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
79423
+ * import {
79424
+ * GridSettings,
79425
+ * HotTableModule,
79426
+ * HotTableComponent,
79427
+ * } from "@handsontable/angular-wrapper";
79428
+ *
79429
+ * `@Component`({
79430
+ * selector: "app-example",
79431
+ * standalone: true,
79432
+ * imports: [HotTableModule],
79433
+ * template: ` <div class="ht-theme-main">
79434
+ * <hot-table [settings]="gridSettings" />
79435
+ * </div>`,
79436
+ * })
79437
+ * export class ExampleComponent implements AfterViewInit {
79438
+ * `@ViewChild`(HotTableComponent, { static: false })
79439
+ * readonly hotTable!: HotTableComponent;
79440
+ *
79441
+ * readonly gridSettings = <GridSettings>{
79442
+ * data: this.getData(),
79443
+ * hiddenRows: {
79444
+ * copyPasteEnabled: true,
79445
+ * indicators: true,
79446
+ * rows: [1, 2, 5],
79447
+ * },
79448
+ * };
79449
+ *
79450
+ * ngAfterViewInit(): void {
79451
+ * // Access the `HiddenRows` plugin's instance
79452
+ * const hot = this.hotTable.hotInstance;
79453
+ * const hiddenRowsPlugin = hot.getPlugin("hiddenRows");
79454
+ *
79455
+ * // Hide a single row
79456
+ * hiddenRowsPlugin.hideRow(1);
79457
+ *
79458
+ * // Hide multiple rows
79459
+ * hiddenRowsPlugin.hideRow(1, 2, 9);
79460
+ *
79461
+ * // Hide multiple rows as an array
79462
+ * hiddenRowsPlugin.hideRows([1, 2, 9]);
79463
+ *
79464
+ * // Unhide a single row
79465
+ * hiddenRowsPlugin.showRow(1);
79466
+ *
79467
+ * // Unhide multiple rows
79468
+ * hiddenRowsPlugin.showRow(1, 2, 9);
79469
+ *
79470
+ * // Unhide multiple rows as an array
79471
+ * hiddenRowsPlugin.showRows([1, 2, 9]);
79472
+ *
79473
+ * // To see your changes, re-render your Handsontable instance
79474
+ * hot.render();
79475
+ * }
79476
+ *
79477
+ * private getData(): any[] {
79478
+ * // Get some data
79479
+ * }
79480
+ * }
79481
+ * ```
79482
+ * :::
78615
79483
  */
78616
79484
  var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
78617
79485
  var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
@@ -78702,8 +79570,8 @@ class HiddenRows extends _base.BasePlugin {
78702
79570
  * Disables the plugin functionality for this Handsontable instance.
78703
79571
  */
78704
79572
  disablePlugin() {
78705
- this.hot.rowIndexMapper.unregisterMap(this.pluginName);
78706
79573
  super.disablePlugin();
79574
+ this.hot.rowIndexMapper.unregisterMap(this.pluginName);
78707
79575
  this.resetCellsMeta();
78708
79576
  }
78709
79577
 
@@ -80742,12 +81610,12 @@ class ManualColumnResize extends _base.BasePlugin {
80742
81610
  setupGuidePosition() {
80743
81611
  const handleHeight = parseInt((0, _element.outerHeight)(_classPrivateFieldGet(_handle, this)), 10);
80744
81612
  const handleBottomPosition = parseInt(_classPrivateFieldGet(_handle, this).style.top, 10) + handleHeight;
80745
- const maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);
81613
+ const tableHeight = this.hot.view.getTableHeight();
80746
81614
  (0, _element.addClass)(_classPrivateFieldGet(_handle, this), 'active');
80747
81615
  (0, _element.addClass)(_classPrivateFieldGet(_guide, this), 'active');
80748
81616
  _classPrivateFieldGet(_guide, this).style.top = `${handleBottomPosition}px`;
80749
81617
  this.refreshGuidePosition();
80750
- _classPrivateFieldGet(_guide, this).style.height = `${maximumVisibleElementHeight - handleHeight}px`;
81618
+ _classPrivateFieldGet(_guide, this).style.height = `${tableHeight - handleHeight}px`;
80751
81619
  this.hot.rootElement.appendChild(_classPrivateFieldGet(_guide, this));
80752
81620
  }
80753
81621
 
@@ -80818,8 +81686,7 @@ class ManualColumnResize extends _base.BasePlugin {
80818
81686
  */
80819
81687
  afterMouseDownTimeout() {
80820
81688
  const render = () => {
80821
- this.hot.forceFullRender = true;
80822
- this.hot.view.render(); // updates all
81689
+ this.hot.render();
80823
81690
  this.hot.view.adjustElementsSize();
80824
81691
  };
80825
81692
  const resize = (column, forceRender) => {
@@ -80979,8 +81846,7 @@ function _onMouseMove(event) {
80979
81846
  */
80980
81847
  function _onMouseUp() {
80981
81848
  const render = () => {
80982
- this.hot.forceFullRender = true;
80983
- this.hot.view.render(); // updates all
81849
+ this.hot.render();
80984
81850
  this.hot.view.adjustElementsSize();
80985
81851
  };
80986
81852
  const resize = (column, forceRender) => {
@@ -82304,12 +83170,12 @@ class ManualRowResize extends _base.BasePlugin {
82304
83170
  setupGuidePosition() {
82305
83171
  const handleWidth = parseInt((0, _element.outerWidth)(_classPrivateFieldGet(_handle, this)), 10);
82306
83172
  const handleEndPosition = parseInt(_classPrivateFieldGet(_handle, this).style[this.inlineDir], 10) + handleWidth;
82307
- const maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);
83173
+ const tableWidth = this.hot.view.getTableWidth();
82308
83174
  (0, _element.addClass)(_classPrivateFieldGet(_handle, this), 'active');
82309
83175
  (0, _element.addClass)(_classPrivateFieldGet(_guide, this), 'active');
82310
83176
  _classPrivateFieldGet(_guide, this).style.top = _classPrivateFieldGet(_handle, this).style.top;
82311
83177
  _classPrivateFieldGet(_guide, this).style[this.inlineDir] = `${handleEndPosition}px`;
82312
- _classPrivateFieldGet(_guide, this).style.width = `${maximumVisibleElementWidth - handleWidth}px`;
83178
+ _classPrivateFieldGet(_guide, this).style.width = `${tableWidth - handleWidth}px`;
82313
83179
  this.hot.rootElement.appendChild(_classPrivateFieldGet(_guide, this));
82314
83180
  }
82315
83181
 
@@ -82390,8 +83256,7 @@ class ManualRowResize extends _base.BasePlugin {
82390
83256
  */
82391
83257
  afterMouseDownTimeout() {
82392
83258
  const render = () => {
82393
- this.hot.forceFullRender = true;
82394
- this.hot.view.render(); // updates all
83259
+ this.hot.render();
82395
83260
  this.hot.view.adjustElementsSize();
82396
83261
  };
82397
83262
  const resize = (row, forceRender) => {
@@ -82519,8 +83384,7 @@ function _onMouseMove(event) {
82519
83384
  */
82520
83385
  function _onMouseUp() {
82521
83386
  const render = () => {
82522
- this.hot.forceFullRender = true;
82523
- this.hot.view.render(); // updates all
83387
+ this.hot.render();
82524
83388
  this.hot.view.adjustElementsSize();
82525
83389
  };
82526
83390
  const runHooks = (row, forceRender) => {
@@ -82653,6 +83517,7 @@ var _element = __webpack_require__(155);
82653
83517
  var _browser = __webpack_require__(164);
82654
83518
  var _focusOrder2 = __webpack_require__(699);
82655
83519
  var _renderer = __webpack_require__(701);
83520
+ var _utils = __webpack_require__(702);
82656
83521
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
82657
83522
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
82658
83523
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
@@ -82703,6 +83568,24 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
82703
83568
  * />
82704
83569
  * ```
82705
83570
  * :::
83571
+ *
83572
+ * ::: only-for angular
83573
+ * ```ts
83574
+ * settings = {
83575
+ * data: getData(),
83576
+ * // Enable plugin
83577
+ * mergeCells: [
83578
+ * { row: 0, col: 3, rowspan: 3, colspan: 3 },
83579
+ * { row: 2, col: 6, rowspan: 2, colspan: 2 },
83580
+ * { row: 4, col: 8, rowspan: 3, colspan: 3 },
83581
+ * ],
83582
+ * };
83583
+ * ```
83584
+ *
83585
+ * ```html
83586
+ * <hot-table [settings]="settings"></hot-table>
83587
+ * ```
83588
+ * :::
82706
83589
  */
82707
83590
  var _lastSelectedFocus = /*#__PURE__*/new WeakMap();
82708
83591
  var _lastFocusDelta = /*#__PURE__*/new WeakMap();
@@ -83285,8 +84168,12 @@ class MergeCells extends _base.BasePlugin {
83285
84168
  * @param {CellRange} cellRange The cell range to merge or unmerged.
83286
84169
  */
83287
84170
  toggleMerge(cellRange) {
83288
- const mergedCell = this.mergedCellsCollection.get(cellRange.from.row, cellRange.from.col);
83289
- const mergedCellCoversWholeRange = mergedCell.row === cellRange.from.row && mergedCell.col === cellRange.from.col && mergedCell.row + mergedCell.rowspan - 1 === cellRange.to.row && mergedCell.col + mergedCell.colspan - 1 === cellRange.to.col;
84171
+ const {
84172
+ from,
84173
+ to
84174
+ } = cellRange.clone().normalize();
84175
+ const mergedCell = this.mergedCellsCollection.get(from.row, from.col);
84176
+ const mergedCellCoversWholeRange = mergedCell.row === from.row && mergedCell.col === from.col && mergedCell.row + mergedCell.rowspan - 1 === to.row && mergedCell.col + mergedCell.colspan - 1 === to.col;
83290
84177
  if (mergedCellCoversWholeRange) {
83291
84178
  this.unmergeRange(cellRange);
83292
84179
  } else {
@@ -84098,36 +84985,10 @@ function _onModifyRowHeightByOverlayName(height, row, overlayType) {
84098
84985
  } else {
84099
84986
  rowspanAfterCorrection = rowspan - rowspanCorrection;
84100
84987
  }
84101
- height = Math.max(height !== null && height !== void 0 ? height : 0, _assertClassBrand(_MergeCells_brand, this, _sumCellsHeights).call(this, row, rowspanAfterCorrection));
84988
+ height = Math.max(height !== null && height !== void 0 ? height : 0, (0, _utils.sumCellsHeights)(this.hot, row, rowspanAfterCorrection));
84102
84989
  });
84103
84990
  return height;
84104
84991
  }
84105
- /**
84106
- * Sums the heights of the all cells that the merge cell consists of.
84107
- *
84108
- * @param {number} row The visual row index of the merged cell.
84109
- * @param {number} rowspan The rowspan value of the merged cell.
84110
- * @returns {number}
84111
- */
84112
- function _sumCellsHeights(row, rowspan) {
84113
- const {
84114
- view,
84115
- rowIndexMapper
84116
- } = this.hot;
84117
- const stylesHandler = view.getStylesHandler();
84118
- const defaultHeight = view.getDefaultRowHeight();
84119
- let height = 0;
84120
- for (let i = row; i < row + rowspan; i++) {
84121
- if (!rowIndexMapper.isHidden(i)) {
84122
- var _this$hot$getRowHeigh;
84123
- height += (_this$hot$getRowHeigh = this.hot.getRowHeight(i)) !== null && _this$hot$getRowHeigh !== void 0 ? _this$hot$getRowHeigh : defaultHeight;
84124
- if (i === 0 && !stylesHandler.isClassicTheme()) {
84125
- height += 1; // border-top-width
84126
- }
84127
- }
84128
- }
84129
- return height;
84130
- }
84131
84992
 
84132
84993
  /***/ }),
84133
84994
  /* 690 */
@@ -86312,6 +87173,8 @@ var _default = exports["default"] = LinkedList;
86312
87173
  exports.__esModule = true;
86313
87174
  exports.createMergeCellRenderer = createMergeCellRenderer;
86314
87175
  var _object = __webpack_require__(165);
87176
+ var _browser = __webpack_require__(164);
87177
+ var _utils = __webpack_require__(702);
86315
87178
  /**
86316
87179
  * Creates a renderer object for the `MergeCells` plugin.
86317
87180
  *
@@ -86327,6 +87190,7 @@ function createMergeCellRenderer(plugin) {
86327
87190
  rowIndexMapper: rowMapper,
86328
87191
  columnIndexMapper: columnMapper
86329
87192
  } = hot;
87193
+ const updateNextCellsHeight = new Map();
86330
87194
 
86331
87195
  /**
86332
87196
  * Runs before the cell is rendered.
@@ -86348,6 +87212,10 @@ function createMergeCellRenderer(plugin) {
86348
87212
  if (!(0, _object.isObject)(mergedCell)) {
86349
87213
  TD.removeAttribute('rowspan');
86350
87214
  TD.removeAttribute('colspan');
87215
+ if ((0, _browser.isSafari)() && updateNextCellsHeight.has(row) && !hot.getSettings().rowHeaders) {
87216
+ TD.style.height = `${updateNextCellsHeight.get(row)}px`;
87217
+ updateNextCellsHeight.delete(row);
87218
+ }
86351
87219
  TD.style.display = '';
86352
87220
  return;
86353
87221
  }
@@ -86359,6 +87227,14 @@ function createMergeCellRenderer(plugin) {
86359
87227
  } = mergedCell;
86360
87228
  const [lastMergedRowIndex, lastMergedColumnIndex] = plugin.translateMergedCellToRenderable(origRow, origRowspan, origColumn, origColspan);
86361
87229
  const isVirtualRenderingEnabled = plugin.getSetting('virtualized');
87230
+
87231
+ // Safari bug fix - the height of the cells next to the merged cell must be defined
87232
+ // so that their height is proportional to the height of the merged cell
87233
+ // (this emulates default behavior in Chrome, FF etc.)
87234
+ if ((0, _browser.isSafari)() && origColumn === 0 && !hot.getSettings().rowHeaders) {
87235
+ const height = (0, _utils.sumCellsHeights)(hot, origRow, origRowspan);
87236
+ updateNextCellsHeight.set(row, height / origRowspan);
87237
+ }
86362
87238
  const renderedRowIndex = rowMapper.getRenderableFromVisualIndex(row);
86363
87239
  const renderedColumnIndex = columnMapper.getRenderableFromVisualIndex(col);
86364
87240
  const maxRowSpan = lastMergedRowIndex - renderedRowIndex + 1; // Number of rendered columns.
@@ -86394,19 +87270,56 @@ function createMergeCellRenderer(plugin) {
86394
87270
 
86395
87271
  /***/ }),
86396
87272
  /* 702 */
87273
+ /***/ ((__unused_webpack_module, exports) => {
87274
+
87275
+ "use strict";
87276
+
87277
+
87278
+ exports.__esModule = true;
87279
+ exports.sumCellsHeights = sumCellsHeights;
87280
+ /**
87281
+ * Calculates the total height of the merged cell.
87282
+ *
87283
+ * @param {Core} hotInstance The Handsontable instance.
87284
+ * @param {*} row The merged cell's row index.
87285
+ * @param {*} rowspan The merged cell height.
87286
+ * @returns {number}
87287
+ */
87288
+ function sumCellsHeights(hotInstance, row, rowspan) {
87289
+ const {
87290
+ view,
87291
+ rowIndexMapper
87292
+ } = hotInstance;
87293
+ const stylesHandler = view.getStylesHandler();
87294
+ const defaultHeight = view.getDefaultRowHeight();
87295
+ let height = 0;
87296
+ for (let i = row; i < row + rowspan; i++) {
87297
+ if (!rowIndexMapper.isHidden(i)) {
87298
+ var _hotInstance$getRowHe;
87299
+ height += (_hotInstance$getRowHe = hotInstance.getRowHeight(i)) !== null && _hotInstance$getRowHe !== void 0 ? _hotInstance$getRowHe : defaultHeight;
87300
+ if (i === 0 && !stylesHandler.isClassicTheme()) {
87301
+ height += 1; // border-top-width
87302
+ }
87303
+ }
87304
+ }
87305
+ return height;
87306
+ }
87307
+
87308
+ /***/ }),
87309
+ /* 703 */
86397
87310
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
86398
87311
 
86399
87312
  "use strict";
86400
87313
 
86401
87314
 
86402
87315
  exports.__esModule = true;
86403
- var _multiColumnSorting = __webpack_require__(703);
87316
+ var _multiColumnSorting = __webpack_require__(704);
86404
87317
  exports.PLUGIN_KEY = _multiColumnSorting.PLUGIN_KEY;
86405
87318
  exports.PLUGIN_PRIORITY = _multiColumnSorting.PLUGIN_PRIORITY;
86406
87319
  exports.MultiColumnSorting = _multiColumnSorting.MultiColumnSorting;
86407
87320
 
86408
87321
  /***/ }),
86409
- /* 703 */
87322
+ /* 704 */
86410
87323
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
86411
87324
 
86412
87325
  "use strict";
@@ -86419,8 +87332,8 @@ var _columnSorting = __webpack_require__(522);
86419
87332
  var _sortService = __webpack_require__(526);
86420
87333
  var _utils = __webpack_require__(525);
86421
87334
  var _element = __webpack_require__(155);
86422
- var _rootComparator = __webpack_require__(704);
86423
- var _domHelpers = __webpack_require__(705);
87335
+ var _rootComparator = __webpack_require__(705);
87336
+ var _domHelpers = __webpack_require__(706);
86424
87337
  var _shortcutContexts = __webpack_require__(352);
86425
87338
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'multiColumnSorting';
86426
87339
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 170;
@@ -86706,7 +87619,7 @@ class MultiColumnSorting extends _columnSorting.ColumnSorting {
86706
87619
  exports.MultiColumnSorting = MultiColumnSorting;
86707
87620
 
86708
87621
  /***/ }),
86709
- /* 704 */
87622
+ /* 705 */
86710
87623
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
86711
87624
 
86712
87625
  "use strict";
@@ -86748,7 +87661,7 @@ function rootComparator(sortingOrders, columnMetas) {
86748
87661
  }
86749
87662
 
86750
87663
  /***/ }),
86751
- /* 705 */
87664
+ /* 706 */
86752
87665
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
86753
87666
 
86754
87667
  "use strict";
@@ -86794,20 +87707,20 @@ function getClassesToRemove(htmlElement) {
86794
87707
  }
86795
87708
 
86796
87709
  /***/ }),
86797
- /* 706 */
87710
+ /* 707 */
86798
87711
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
86799
87712
 
86800
87713
  "use strict";
86801
87714
 
86802
87715
 
86803
87716
  exports.__esModule = true;
86804
- var _multipleSelectionHandles = __webpack_require__(707);
87717
+ var _multipleSelectionHandles = __webpack_require__(708);
86805
87718
  exports.PLUGIN_KEY = _multipleSelectionHandles.PLUGIN_KEY;
86806
87719
  exports.PLUGIN_PRIORITY = _multipleSelectionHandles.PLUGIN_PRIORITY;
86807
87720
  exports.MultipleSelectionHandles = _multipleSelectionHandles.MultipleSelectionHandles;
86808
87721
 
86809
87722
  /***/ }),
86810
- /* 707 */
87723
+ /* 708 */
86811
87724
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
86812
87725
 
86813
87726
  "use strict";
@@ -87146,20 +88059,20 @@ class MultipleSelectionHandles extends _base.BasePlugin {
87146
88059
  exports.MultipleSelectionHandles = MultipleSelectionHandles;
87147
88060
 
87148
88061
  /***/ }),
87149
- /* 708 */
88062
+ /* 709 */
87150
88063
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
87151
88064
 
87152
88065
  "use strict";
87153
88066
 
87154
88067
 
87155
88068
  exports.__esModule = true;
87156
- var _nestedHeaders = __webpack_require__(709);
88069
+ var _nestedHeaders = __webpack_require__(710);
87157
88070
  exports.PLUGIN_KEY = _nestedHeaders.PLUGIN_KEY;
87158
88071
  exports.PLUGIN_PRIORITY = _nestedHeaders.PLUGIN_PRIORITY;
87159
88072
  exports.NestedHeaders = _nestedHeaders.NestedHeaders;
87160
88073
 
87161
88074
  /***/ }),
87162
- /* 709 */
88075
+ /* 710 */
87163
88076
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
87164
88077
 
87165
88078
  "use strict";
@@ -87179,8 +88092,8 @@ var _event = __webpack_require__(175);
87179
88092
  var _console = __webpack_require__(178);
87180
88093
  var _selection = __webpack_require__(318);
87181
88094
  var _base = __webpack_require__(507);
87182
- var _stateManager2 = _interopRequireDefault(__webpack_require__(710));
87183
- var _ghostTable = _interopRequireDefault(__webpack_require__(723));
88095
+ var _stateManager2 = _interopRequireDefault(__webpack_require__(711));
88096
+ var _ghostTable = _interopRequireDefault(__webpack_require__(724));
87184
88097
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
87185
88098
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
87186
88099
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
@@ -87235,6 +88148,31 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 280;
87235
88148
  * />
87236
88149
  * ```
87237
88150
  * :::
88151
+ *
88152
+ * ::: only-for angular
88153
+ * ```ts
88154
+ * settings = {
88155
+ * data: getData(),
88156
+ * nestedHeaders: [
88157
+ * ["A", { label: "B", colspan: 8, headerClassName: "htRight" }, "C"],
88158
+ * ["D", { label: "E", colspan: 4 }, { label: "F", colspan: 4 }, "G"],
88159
+ * [
88160
+ * "H",
88161
+ * { label: "I", colspan: 2 },
88162
+ * { label: "J", colspan: 2 },
88163
+ * { label: "K", colspan: 2 },
88164
+ * { label: "L", colspan: 2 },
88165
+ * "M",
88166
+ * ],
88167
+ * ["N", "O", "P", "Q", "R", "S", "T", "U", "V", "W"],
88168
+ * ],
88169
+ * };
88170
+ * ```
88171
+ *
88172
+ * ```html
88173
+ * <hot-table [settings]="settings"></hot-table>
88174
+ * ```
88175
+ * :::
87238
88176
  */
87239
88177
  var _stateManager = /*#__PURE__*/new WeakMap();
87240
88178
  var _hidingIndexMapObserver = /*#__PURE__*/new WeakMap();
@@ -88168,7 +89106,7 @@ function _onAfterLoadData(sourceData, initialLoad) {
88168
89106
  }
88169
89107
 
88170
89108
  /***/ }),
88171
- /* 710 */
89109
+ /* 711 */
88172
89110
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
88173
89111
 
88174
89112
  "use strict";
@@ -88181,11 +89119,11 @@ __webpack_require__(87);
88181
89119
  __webpack_require__(115);
88182
89120
  __webpack_require__(142);
88183
89121
  var _array = __webpack_require__(161);
88184
- var _sourceSettings2 = _interopRequireDefault(__webpack_require__(711));
88185
- var _headersTree2 = _interopRequireDefault(__webpack_require__(714));
88186
- var _nodeModifiers = __webpack_require__(716);
88187
- var _matrixGenerator = __webpack_require__(722);
88188
- var _tree = __webpack_require__(715);
89122
+ var _sourceSettings2 = _interopRequireDefault(__webpack_require__(712));
89123
+ var _headersTree2 = _interopRequireDefault(__webpack_require__(715));
89124
+ var _nodeModifiers = __webpack_require__(717);
89125
+ var _matrixGenerator = __webpack_require__(723);
89126
+ var _tree = __webpack_require__(716);
88189
89127
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
88190
89128
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
88191
89129
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
@@ -88660,7 +89598,7 @@ class StateManager {
88660
89598
  exports["default"] = StateManager;
88661
89599
 
88662
89600
  /***/ }),
88663
- /* 711 */
89601
+ /* 712 */
88664
89602
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
88665
89603
 
88666
89604
  "use strict";
@@ -88671,7 +89609,7 @@ __webpack_require__(5);
88671
89609
  __webpack_require__(87);
88672
89610
  var _object = __webpack_require__(165);
88673
89611
  var _array = __webpack_require__(161);
88674
- var _settingsNormalizer = __webpack_require__(712);
89612
+ var _settingsNormalizer = __webpack_require__(713);
88675
89613
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
88676
89614
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
88677
89615
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
@@ -88882,7 +89820,7 @@ class SourceSettings {
88882
89820
  exports["default"] = SourceSettings;
88883
89821
 
88884
89822
  /***/ }),
88885
- /* 712 */
89823
+ /* 713 */
88886
89824
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
88887
89825
 
88888
89826
  "use strict";
@@ -88894,7 +89832,7 @@ __webpack_require__(87);
88894
89832
  var _array = __webpack_require__(161);
88895
89833
  var _object = __webpack_require__(165);
88896
89834
  var _mixed = __webpack_require__(158);
88897
- var _utils = __webpack_require__(713);
89835
+ var _utils = __webpack_require__(714);
88898
89836
  /* eslint-disable jsdoc/require-description-complete-sentence */
88899
89837
 
88900
89838
  /**
@@ -88996,7 +89934,7 @@ function normalizeSettings(sourceSettings) {
88996
89934
  }
88997
89935
 
88998
89936
  /***/ }),
88999
- /* 713 */
89937
+ /* 714 */
89000
89938
  /***/ ((__unused_webpack_module, exports) => {
89001
89939
 
89002
89940
  "use strict";
@@ -89073,7 +90011,7 @@ function createPlaceholderHeaderSettings() {
89073
90011
  }
89074
90012
 
89075
90013
  /***/ }),
89076
- /* 714 */
90014
+ /* 715 */
89077
90015
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89078
90016
 
89079
90017
  "use strict";
@@ -89083,7 +90021,7 @@ var _interopRequireDefault = __webpack_require__(1);
89083
90021
  exports.__esModule = true;
89084
90022
  __webpack_require__(5);
89085
90023
  var _array = __webpack_require__(161);
89086
- var _tree = _interopRequireDefault(__webpack_require__(715));
90024
+ var _tree = _interopRequireDefault(__webpack_require__(716));
89087
90025
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
89088
90026
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
89089
90027
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
@@ -89311,7 +90249,7 @@ class HeadersTree {
89311
90249
  exports["default"] = HeadersTree;
89312
90250
 
89313
90251
  /***/ }),
89314
- /* 715 */
90252
+ /* 716 */
89315
90253
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89316
90254
 
89317
90255
  "use strict";
@@ -89530,7 +90468,7 @@ class TreeNode {
89530
90468
  exports["default"] = TreeNode;
89531
90469
 
89532
90470
  /***/ }),
89533
- /* 716 */
90471
+ /* 717 */
89534
90472
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89535
90473
 
89536
90474
  "use strict";
@@ -89539,10 +90477,10 @@ exports["default"] = TreeNode;
89539
90477
  exports.__esModule = true;
89540
90478
  exports.triggerNodeModification = triggerNodeModification;
89541
90479
  __webpack_require__(5);
89542
- var _collapse = __webpack_require__(717);
89543
- var _expand = __webpack_require__(718);
89544
- var _hideColumn = __webpack_require__(720);
89545
- var _showColumn = __webpack_require__(721);
90480
+ var _collapse = __webpack_require__(718);
90481
+ var _expand = __webpack_require__(719);
90482
+ var _hideColumn = __webpack_require__(721);
90483
+ var _showColumn = __webpack_require__(722);
89546
90484
  /**
89547
90485
  * The NodeModifiers module is responsible for the modification of a tree structure
89548
90486
  * in a way to achieve new column headers state.
@@ -89572,7 +90510,7 @@ function triggerNodeModification(actionName, nodeToProcess, gridColumnIndex) {
89572
90510
  }
89573
90511
 
89574
90512
  /***/ }),
89575
- /* 717 */
90513
+ /* 718 */
89576
90514
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89577
90515
 
89578
90516
  "use strict";
@@ -89588,8 +90526,8 @@ __webpack_require__(109);
89588
90526
  __webpack_require__(111);
89589
90527
  __webpack_require__(113);
89590
90528
  var _array = __webpack_require__(161);
89591
- var _expand = __webpack_require__(718);
89592
- var _tree = __webpack_require__(719);
90529
+ var _expand = __webpack_require__(719);
90530
+ var _tree = __webpack_require__(720);
89593
90531
  /**
89594
90532
  * Collapsing a node is a process where the processing node is collapsed
89595
90533
  * to the colspan width of the first child. All node children, except the
@@ -89682,7 +90620,7 @@ function collapseNode(nodeToProcess) {
89682
90620
  }
89683
90621
 
89684
90622
  /***/ }),
89685
- /* 718 */
90623
+ /* 719 */
89686
90624
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89687
90625
 
89688
90626
  "use strict";
@@ -89698,8 +90636,8 @@ __webpack_require__(109);
89698
90636
  __webpack_require__(111);
89699
90637
  __webpack_require__(113);
89700
90638
  var _array = __webpack_require__(161);
89701
- var _collapse = __webpack_require__(717);
89702
- var _tree = __webpack_require__(719);
90639
+ var _collapse = __webpack_require__(718);
90640
+ var _tree = __webpack_require__(720);
89703
90641
  /**
89704
90642
  * Expanding a node is a process where the processing node is expanded to
89705
90643
  * its original colspan width. To restore an original state of all node
@@ -89787,7 +90725,7 @@ function expandNode(nodeToProcess) {
89787
90725
  }
89788
90726
 
89789
90727
  /***/ }),
89790
- /* 719 */
90728
+ /* 720 */
89791
90729
  /***/ ((__unused_webpack_module, exports) => {
89792
90730
 
89793
90731
  "use strict";
@@ -89858,7 +90796,7 @@ function isNodeReflectsFirstChildColspan(node) {
89858
90796
  }
89859
90797
 
89860
90798
  /***/ }),
89861
- /* 720 */
90799
+ /* 721 */
89862
90800
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89863
90801
 
89864
90802
  "use strict";
@@ -89921,7 +90859,7 @@ the last node, the hide column modification can be applied.`);
89921
90859
  }
89922
90860
 
89923
90861
  /***/ }),
89924
- /* 721 */
90862
+ /* 722 */
89925
90863
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89926
90864
 
89927
90865
  "use strict";
@@ -89982,7 +90920,7 @@ the last node, the show column modification can be applied.`);
89982
90920
  }
89983
90921
 
89984
90922
  /***/ }),
89985
- /* 722 */
90923
+ /* 723 */
89986
90924
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89987
90925
 
89988
90926
  "use strict";
@@ -89992,7 +90930,7 @@ exports.__esModule = true;
89992
90930
  exports.generateMatrix = generateMatrix;
89993
90931
  __webpack_require__(87);
89994
90932
  var _array = __webpack_require__(161);
89995
- var _utils = __webpack_require__(713);
90933
+ var _utils = __webpack_require__(714);
89996
90934
  /* eslint-disable jsdoc/require-description-complete-sentence */
89997
90935
 
89998
90936
  /**
@@ -90088,7 +91026,7 @@ function createNestedArrayIfNecessary(array, index) {
90088
91026
  }
90089
91027
 
90090
91028
  /***/ }),
90091
- /* 723 */
91029
+ /* 724 */
90092
91030
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
90093
91031
 
90094
91032
  "use strict";
@@ -90244,20 +91182,20 @@ class GhostTable {
90244
91182
  var _default = exports["default"] = GhostTable;
90245
91183
 
90246
91184
  /***/ }),
90247
- /* 724 */
91185
+ /* 725 */
90248
91186
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
90249
91187
 
90250
91188
  "use strict";
90251
91189
 
90252
91190
 
90253
91191
  exports.__esModule = true;
90254
- var _nestedRows = __webpack_require__(725);
91192
+ var _nestedRows = __webpack_require__(726);
90255
91193
  exports.PLUGIN_KEY = _nestedRows.PLUGIN_KEY;
90256
91194
  exports.PLUGIN_PRIORITY = _nestedRows.PLUGIN_PRIORITY;
90257
91195
  exports.NestedRows = _nestedRows.NestedRows;
90258
91196
 
90259
91197
  /***/ }),
90260
- /* 725 */
91198
+ /* 726 */
90261
91199
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
90262
91200
 
90263
91201
  "use strict";
@@ -90279,15 +91217,15 @@ __webpack_require__(133);
90279
91217
  __webpack_require__(196);
90280
91218
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
90281
91219
  var _base = __webpack_require__(507);
90282
- var _dataManager = _interopRequireDefault(__webpack_require__(726));
90283
- var _collapsing = _interopRequireDefault(__webpack_require__(727));
90284
- var _headers = _interopRequireDefault(__webpack_require__(729));
90285
- var _contextMenu = _interopRequireDefault(__webpack_require__(730));
91220
+ var _dataManager = _interopRequireDefault(__webpack_require__(727));
91221
+ var _collapsing = _interopRequireDefault(__webpack_require__(728));
91222
+ var _headers = _interopRequireDefault(__webpack_require__(730));
91223
+ var _contextMenu = _interopRequireDefault(__webpack_require__(731));
90286
91224
  var _console = __webpack_require__(178);
90287
91225
  var _data = __webpack_require__(288);
90288
91226
  var _translations = __webpack_require__(291);
90289
91227
  var _shortcutContexts = __webpack_require__(352);
90290
- var _rowMoveController = _interopRequireDefault(__webpack_require__(731));
91228
+ var _rowMoveController = _interopRequireDefault(__webpack_require__(732));
90291
91229
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
90292
91230
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
90293
91231
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
@@ -90819,7 +91757,7 @@ function _onBeforeLoadData(data) {
90819
91757
  }
90820
91758
 
90821
91759
  /***/ }),
90822
- /* 726 */
91760
+ /* 727 */
90823
91761
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
90824
91762
 
90825
91763
  "use strict";
@@ -91450,7 +92388,7 @@ class DataManager {
91450
92388
  */
91451
92389
  syncRowWithRawSource(rowElement) {
91452
92390
  let upmostParent = rowElement;
91453
- let tempParent = null;
92391
+ let tempParent = upmostParent;
91454
92392
  do {
91455
92393
  tempParent = this.getRowParent(tempParent);
91456
92394
  if (tempParent !== null) {
@@ -91458,7 +92396,7 @@ class DataManager {
91458
92396
  }
91459
92397
  } while (tempParent !== null);
91460
92398
  this.plugin.disableCoreAPIModifiers();
91461
- this.hot.setSourceDataAtCell(this.getRowIndex(upmostParent), '__children', upmostParent.__children, 'NestedRows.syncRowWithRawSource');
92399
+ this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(upmostParent), '__children', upmostParent.__children, 'NestedRows.syncRowWithRawSource');
91462
92400
  this.plugin.enableCoreAPIModifiers();
91463
92401
  }
91464
92402
 
@@ -91535,7 +92473,7 @@ class DataManager {
91535
92473
  var _default = exports["default"] = DataManager;
91536
92474
 
91537
92475
  /***/ }),
91538
- /* 727 */
92476
+ /* 728 */
91539
92477
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
91540
92478
 
91541
92479
  "use strict";
@@ -91548,8 +92486,8 @@ var _event = __webpack_require__(175);
91548
92486
  var _array = __webpack_require__(161);
91549
92487
  var _number = __webpack_require__(200);
91550
92488
  var _element = __webpack_require__(155);
91551
- var _base = _interopRequireDefault(__webpack_require__(728));
91552
- var _headers = _interopRequireDefault(__webpack_require__(729));
92489
+ var _base = _interopRequireDefault(__webpack_require__(729));
92490
+ var _headers = _interopRequireDefault(__webpack_require__(730));
91553
92491
  /**
91554
92492
  * Class responsible for the UI for collapsing and expanding groups.
91555
92493
  *
@@ -92010,7 +92948,7 @@ class CollapsingUI extends _base.default {
92010
92948
  var _default = exports["default"] = CollapsingUI;
92011
92949
 
92012
92950
  /***/ }),
92013
- /* 728 */
92951
+ /* 729 */
92014
92952
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92015
92953
 
92016
92954
  "use strict";
@@ -92044,7 +92982,7 @@ class BaseUI {
92044
92982
  var _default = exports["default"] = BaseUI;
92045
92983
 
92046
92984
  /***/ }),
92047
- /* 729 */
92985
+ /* 730 */
92048
92986
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92049
92987
 
92050
92988
  "use strict";
@@ -92055,7 +92993,7 @@ exports.__esModule = true;
92055
92993
  var _array = __webpack_require__(161);
92056
92994
  var _number = __webpack_require__(200);
92057
92995
  var _element = __webpack_require__(155);
92058
- var _base = _interopRequireDefault(__webpack_require__(728));
92996
+ var _base = _interopRequireDefault(__webpack_require__(729));
92059
92997
  var _a11y = __webpack_require__(162);
92060
92998
  /**
92061
92999
  * Class responsible for the UI in the Nested Rows' row headers.
@@ -92188,7 +93126,7 @@ class HeadersUI extends _base.default {
92188
93126
  var _default = exports["default"] = HeadersUI;
92189
93127
 
92190
93128
  /***/ }),
92191
- /* 730 */
93129
+ /* 731 */
92192
93130
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92193
93131
 
92194
93132
  "use strict";
@@ -92201,7 +93139,7 @@ var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
92201
93139
  var _number = __webpack_require__(200);
92202
93140
  var _array = __webpack_require__(161);
92203
93141
  var C = _interopRequireWildcard(__webpack_require__(317));
92204
- var _base = _interopRequireDefault(__webpack_require__(728));
93142
+ var _base = _interopRequireDefault(__webpack_require__(729));
92205
93143
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
92206
93144
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
92207
93145
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
@@ -92307,7 +93245,7 @@ class ContextMenuUI extends _base.default {
92307
93245
  var _default = exports["default"] = ContextMenuUI;
92308
93246
 
92309
93247
  /***/ }),
92310
- /* 731 */
93248
+ /* 732 */
92311
93249
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92312
93250
 
92313
93251
  "use strict";
@@ -92596,20 +93534,20 @@ class RowMoveController {
92596
93534
  exports["default"] = RowMoveController;
92597
93535
 
92598
93536
  /***/ }),
92599
- /* 732 */
93537
+ /* 733 */
92600
93538
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92601
93539
 
92602
93540
  "use strict";
92603
93541
 
92604
93542
 
92605
93543
  exports.__esModule = true;
92606
- var _persistentState = __webpack_require__(733);
93544
+ var _persistentState = __webpack_require__(734);
92607
93545
  exports.PLUGIN_KEY = _persistentState.PLUGIN_KEY;
92608
93546
  exports.PLUGIN_PRIORITY = _persistentState.PLUGIN_PRIORITY;
92609
93547
  exports.PersistentState = _persistentState.PersistentState;
92610
93548
 
92611
93549
  /***/ }),
92612
- /* 733 */
93550
+ /* 734 */
92613
93551
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92614
93552
 
92615
93553
  "use strict";
@@ -92619,7 +93557,7 @@ var _interopRequireDefault = __webpack_require__(1);
92619
93557
  exports.__esModule = true;
92620
93558
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
92621
93559
  var _base = __webpack_require__(507);
92622
- var _storage = _interopRequireDefault(__webpack_require__(734));
93560
+ var _storage = _interopRequireDefault(__webpack_require__(735));
92623
93561
  var _hooks = __webpack_require__(177);
92624
93562
  _hooks.Hooks.getSingleton().register('persistentStateSave');
92625
93563
  _hooks.Hooks.getSingleton().register('persistentStateLoad');
@@ -92760,7 +93698,7 @@ class PersistentState extends _base.BasePlugin {
92760
93698
  exports.PersistentState = PersistentState;
92761
93699
 
92762
93700
  /***/ }),
92763
- /* 734 */
93701
+ /* 735 */
92764
93702
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92765
93703
 
92766
93704
  "use strict";
@@ -92884,20 +93822,20 @@ class Storage {
92884
93822
  var _default = exports["default"] = Storage;
92885
93823
 
92886
93824
  /***/ }),
92887
- /* 735 */
93825
+ /* 736 */
92888
93826
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92889
93827
 
92890
93828
  "use strict";
92891
93829
 
92892
93830
 
92893
93831
  exports.__esModule = true;
92894
- var _search = __webpack_require__(736);
93832
+ var _search = __webpack_require__(737);
92895
93833
  exports.PLUGIN_KEY = _search.PLUGIN_KEY;
92896
93834
  exports.PLUGIN_PRIORITY = _search.PLUGIN_PRIORITY;
92897
93835
  exports.Search = _search.Search;
92898
93836
 
92899
93837
  /***/ }),
92900
- /* 736 */
93838
+ /* 737 */
92901
93839
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92902
93840
 
92903
93841
  "use strict";
@@ -93205,20 +94143,20 @@ function _onBeforeRenderer(TD, row, col, prop, value, cellProperties) {
93205
94143
  }
93206
94144
 
93207
94145
  /***/ }),
93208
- /* 737 */
94146
+ /* 738 */
93209
94147
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93210
94148
 
93211
94149
  "use strict";
93212
94150
 
93213
94151
 
93214
94152
  exports.__esModule = true;
93215
- var _stretchColumns = __webpack_require__(738);
94153
+ var _stretchColumns = __webpack_require__(739);
93216
94154
  exports.PLUGIN_KEY = _stretchColumns.PLUGIN_KEY;
93217
94155
  exports.PLUGIN_PRIORITY = _stretchColumns.PLUGIN_PRIORITY;
93218
94156
  exports.StretchColumns = _stretchColumns.StretchColumns;
93219
94157
 
93220
94158
  /***/ }),
93221
- /* 738 */
94159
+ /* 739 */
93222
94160
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93223
94161
 
93224
94162
  "use strict";
@@ -93229,7 +94167,7 @@ __webpack_require__(5);
93229
94167
  __webpack_require__(115);
93230
94168
  __webpack_require__(133);
93231
94169
  var _base = __webpack_require__(507);
93232
- var _calculator = __webpack_require__(739);
94170
+ var _calculator = __webpack_require__(740);
93233
94171
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
93234
94172
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
93235
94173
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
@@ -93286,6 +94224,19 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 155;
93286
94224
  * />
93287
94225
  * ```
93288
94226
  * :::
94227
+ *
94228
+ * ::: only-for angular
94229
+ * ```ts
94230
+ * settings = {
94231
+ * data: getData(),
94232
+ * stretchH: "all",
94233
+ * };
94234
+ * ```
94235
+ *
94236
+ * ```html
94237
+ * <hot-table [settings]="settings"></hot-table>
94238
+ * ```
94239
+ * :::
93289
94240
  */
93290
94241
  /* eslint-enable jsdoc/require-description-complete-sentence */
93291
94242
  var _stretchCalculator = /*#__PURE__*/new WeakMap();
@@ -93446,7 +94397,7 @@ function _onBeforeRender(fullRender) {
93446
94397
  }
93447
94398
 
93448
94399
  /***/ }),
93449
- /* 739 */
94400
+ /* 740 */
93450
94401
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93451
94402
 
93452
94403
  "use strict";
@@ -93458,8 +94409,8 @@ __webpack_require__(115);
93458
94409
  __webpack_require__(133);
93459
94410
  var _src = __webpack_require__(206);
93460
94411
  var _element = __webpack_require__(155);
93461
- var _all = __webpack_require__(740);
93462
- var _last = __webpack_require__(742);
94412
+ var _all = __webpack_require__(741);
94413
+ var _last = __webpack_require__(743);
93463
94414
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
93464
94415
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
93465
94416
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
@@ -93614,7 +94565,7 @@ function _overwriteColumnWidthFn(columnWidth, columnVisualIndex) {
93614
94565
  }
93615
94566
 
93616
94567
  /***/ }),
93617
- /* 740 */
94568
+ /* 741 */
93618
94569
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93619
94570
 
93620
94571
  "use strict";
@@ -93626,7 +94577,7 @@ __webpack_require__(115);
93626
94577
  __webpack_require__(133);
93627
94578
  __webpack_require__(196);
93628
94579
  var _src = __webpack_require__(206);
93629
- var _base = __webpack_require__(741);
94580
+ var _base = __webpack_require__(742);
93630
94581
  /**
93631
94582
  * The strategy calculates the column widths by stretching all columns evenly.
93632
94583
  *
@@ -93691,7 +94642,7 @@ class StretchAllStrategy extends _base.StretchStrategy {
93691
94642
  exports.StretchAllStrategy = StretchAllStrategy;
93692
94643
 
93693
94644
  /***/ }),
93694
- /* 741 */
94645
+ /* 742 */
93695
94646
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93696
94647
 
93697
94648
  "use strict";
@@ -93780,7 +94731,7 @@ class StretchStrategy {
93780
94731
  exports.StretchStrategy = StretchStrategy;
93781
94732
 
93782
94733
  /***/ }),
93783
- /* 742 */
94734
+ /* 743 */
93784
94735
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93785
94736
 
93786
94737
  "use strict";
@@ -93790,7 +94741,7 @@ exports.__esModule = true;
93790
94741
  __webpack_require__(5);
93791
94742
  __webpack_require__(115);
93792
94743
  __webpack_require__(196);
93793
- var _base = __webpack_require__(741);
94744
+ var _base = __webpack_require__(742);
93794
94745
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
93795
94746
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
93796
94747
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
@@ -93865,20 +94816,20 @@ class StretchLastStrategy extends _base.StretchStrategy {
93865
94816
  exports.StretchLastStrategy = StretchLastStrategy;
93866
94817
 
93867
94818
  /***/ }),
93868
- /* 743 */
94819
+ /* 744 */
93869
94820
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93870
94821
 
93871
94822
  "use strict";
93872
94823
 
93873
94824
 
93874
94825
  exports.__esModule = true;
93875
- var _touchScroll = __webpack_require__(744);
94826
+ var _touchScroll = __webpack_require__(745);
93876
94827
  exports.PLUGIN_KEY = _touchScroll.PLUGIN_KEY;
93877
94828
  exports.PLUGIN_PRIORITY = _touchScroll.PLUGIN_PRIORITY;
93878
94829
  exports.TouchScroll = _touchScroll.TouchScroll;
93879
94830
 
93880
94831
  /***/ }),
93881
- /* 744 */
94832
+ /* 745 */
93882
94833
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
93883
94834
 
93884
94835
  "use strict";
@@ -94067,20 +95018,20 @@ function _onAfterMomentumScroll() {
94067
95018
  }
94068
95019
 
94069
95020
  /***/ }),
94070
- /* 745 */
95021
+ /* 746 */
94071
95022
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94072
95023
 
94073
95024
  "use strict";
94074
95025
 
94075
95026
 
94076
95027
  exports.__esModule = true;
94077
- var _trimRows = __webpack_require__(746);
95028
+ var _trimRows = __webpack_require__(747);
94078
95029
  exports.PLUGIN_KEY = _trimRows.PLUGIN_KEY;
94079
95030
  exports.PLUGIN_PRIORITY = _trimRows.PLUGIN_PRIORITY;
94080
95031
  exports.TrimRows = _trimRows.TrimRows;
94081
95032
 
94082
95033
  /***/ }),
94083
- /* 746 */
95034
+ /* 747 */
94084
95035
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94085
95036
 
94086
95037
  "use strict";
@@ -94195,6 +95146,67 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 330;
94195
95146
  * hot.render();
94196
95147
  * ```
94197
95148
  * :::
95149
+ *
95150
+ * ::: only-for angular
95151
+ * ```ts
95152
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
95153
+ * import {
95154
+ * GridSettings,
95155
+ * HotTableModule,
95156
+ * HotTableComponent,
95157
+ * } from "@handsontable/angular-wrapper";
95158
+ *
95159
+ * `@Component`({
95160
+ * selector: "app-example",
95161
+ * standalone: true,
95162
+ * imports: [HotTableModule],
95163
+ * template: ` <div class="ht-theme-main">
95164
+ * <hot-table [settings]="gridSettings" />
95165
+ * </div>`,
95166
+ * })
95167
+ * export class ExampleComponent implements AfterViewInit {
95168
+ * `@ViewChild`(HotTableComponent, { static: false })
95169
+ * readonly hotTable!: HotTableComponent;
95170
+ *
95171
+ * readonly gridSettings = <GridSettings>{
95172
+ * data: this.getData(),
95173
+ * // Hide selected rows on table initialization
95174
+ * trimRows: [1, 2, 5],
95175
+ * };
95176
+ *
95177
+ * ngAfterViewInit(): void {
95178
+ * // Access the trimRows plugin instance
95179
+ * const hot = this.hotTable.hotInstance;
95180
+ * const trimRowsPlugin = hot.getPlugin("trimRows");
95181
+ *
95182
+ * // Hide a single row
95183
+ * trimRowsPlugin.trimRow(1);
95184
+ *
95185
+ * // Hide multiple rows
95186
+ * trimRowsPlugin.trimRow(1, 2, 9);
95187
+ *
95188
+ * // Or as an array
95189
+ * trimRowsPlugin.trimRows([1, 2, 9]);
95190
+ *
95191
+ * // Show a single row
95192
+ * trimRowsPlugin.untrimRow(1);
95193
+ *
95194
+ * // Show multiple rows
95195
+ * trimRowsPlugin.untrimRow(1, 2, 9);
95196
+ *
95197
+ * // Or as an array
95198
+ * trimRowsPlugin.untrimRows([1, 2, 9]);
95199
+ *
95200
+ * // Re-render table to see the changes
95201
+ * hot.render();
95202
+ * }
95203
+ *
95204
+ * private getData(): any[] {
95205
+ * // Get some data
95206
+ * }
95207
+ * }
95208
+ * ```
95209
+ * :::
94198
95210
  */
94199
95211
  var _TrimRows_brand = /*#__PURE__*/new WeakSet();
94200
95212
  class TrimRows extends _base.BasePlugin {
@@ -94412,20 +95424,20 @@ function _onMapInit() {
94412
95424
  }
94413
95425
 
94414
95426
  /***/ }),
94415
- /* 747 */
95427
+ /* 748 */
94416
95428
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94417
95429
 
94418
95430
  "use strict";
94419
95431
 
94420
95432
 
94421
95433
  exports.__esModule = true;
94422
- var _undoRedo = __webpack_require__(748);
95434
+ var _undoRedo = __webpack_require__(749);
94423
95435
  exports.PLUGIN_KEY = _undoRedo.PLUGIN_KEY;
94424
95436
  exports.PLUGIN_PRIORITY = _undoRedo.PLUGIN_PRIORITY;
94425
95437
  exports.UndoRedo = _undoRedo.UndoRedo;
94426
95438
 
94427
95439
  /***/ }),
94428
- /* 748 */
95440
+ /* 749 */
94429
95441
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94430
95442
 
94431
95443
  "use strict";
@@ -94448,7 +95460,7 @@ var _hooks = __webpack_require__(177);
94448
95460
  var _object = __webpack_require__(165);
94449
95461
  var _templateLiteralTag = __webpack_require__(160);
94450
95462
  var _console = __webpack_require__(178);
94451
- var _actions = __webpack_require__(749);
95463
+ var _actions = __webpack_require__(750);
94452
95464
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
94453
95465
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
94454
95466
  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"); }
@@ -94818,7 +95830,7 @@ function _removeAPIFromCore() {
94818
95830
  }
94819
95831
 
94820
95832
  /***/ }),
94821
- /* 749 */
95833
+ /* 750 */
94822
95834
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94823
95835
 
94824
95836
  "use strict";
@@ -94828,18 +95840,18 @@ exports.__esModule = true;
94828
95840
  exports.registerActions = registerActions;
94829
95841
  __webpack_require__(115);
94830
95842
  __webpack_require__(133);
94831
- var _cellAlignment = __webpack_require__(750);
94832
- var _columnMove = __webpack_require__(752);
94833
- var _columnSort = __webpack_require__(753);
94834
- var _createColumn = __webpack_require__(754);
94835
- var _createRow = __webpack_require__(755);
94836
- var _dataChange = __webpack_require__(756);
94837
- var _filters = __webpack_require__(757);
94838
- var _mergeCells = __webpack_require__(758);
94839
- var _removeColumn = __webpack_require__(759);
94840
- var _removeRow = __webpack_require__(762);
94841
- var _rowMove = __webpack_require__(763);
94842
- var _unmergeCells = __webpack_require__(764);
95843
+ var _cellAlignment = __webpack_require__(751);
95844
+ var _columnMove = __webpack_require__(753);
95845
+ var _columnSort = __webpack_require__(754);
95846
+ var _createColumn = __webpack_require__(755);
95847
+ var _createRow = __webpack_require__(756);
95848
+ var _dataChange = __webpack_require__(757);
95849
+ var _filters = __webpack_require__(758);
95850
+ var _mergeCells = __webpack_require__(759);
95851
+ var _removeColumn = __webpack_require__(760);
95852
+ var _removeRow = __webpack_require__(763);
95853
+ var _rowMove = __webpack_require__(764);
95854
+ var _unmergeCells = __webpack_require__(765);
94843
95855
  /**
94844
95856
  * Register all undo/redo actions.
94845
95857
  *
@@ -94851,7 +95863,7 @@ function registerActions(hot, undoRedoPlugin) {
94851
95863
  }
94852
95864
 
94853
95865
  /***/ }),
94854
- /* 750 */
95866
+ /* 751 */
94855
95867
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94856
95868
 
94857
95869
  "use strict";
@@ -94860,7 +95872,7 @@ function registerActions(hot, undoRedoPlugin) {
94860
95872
  var _interopRequireDefault = __webpack_require__(1);
94861
95873
  exports.__esModule = true;
94862
95874
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
94863
- var _base = __webpack_require__(751);
95875
+ var _base = __webpack_require__(752);
94864
95876
  var _utils = __webpack_require__(547);
94865
95877
  var _array = __webpack_require__(161);
94866
95878
  /**
@@ -94940,7 +95952,7 @@ class CellAlignmentAction extends _base.BaseAction {
94940
95952
  exports.CellAlignmentAction = CellAlignmentAction;
94941
95953
 
94942
95954
  /***/ }),
94943
- /* 751 */
95955
+ /* 752 */
94944
95956
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94945
95957
 
94946
95958
  "use strict";
@@ -94974,7 +95986,7 @@ class BaseAction {
94974
95986
  exports.BaseAction = BaseAction;
94975
95987
 
94976
95988
  /***/ }),
94977
- /* 752 */
95989
+ /* 753 */
94978
95990
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
94979
95991
 
94980
95992
  "use strict";
@@ -94985,7 +95997,7 @@ exports.__esModule = true;
94985
95997
  __webpack_require__(115);
94986
95998
  __webpack_require__(133);
94987
95999
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
94988
- var _base = __webpack_require__(751);
96000
+ var _base = __webpack_require__(752);
94989
96001
  var _moves = __webpack_require__(661);
94990
96002
  /**
94991
96003
  * Action that tracks column move changes.
@@ -95062,7 +96074,7 @@ class ColumnMoveAction extends _base.BaseAction {
95062
96074
  exports.ColumnMoveAction = ColumnMoveAction;
95063
96075
 
95064
96076
  /***/ }),
95065
- /* 753 */
96077
+ /* 754 */
95066
96078
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95067
96079
 
95068
96080
  "use strict";
@@ -95071,7 +96083,7 @@ exports.ColumnMoveAction = ColumnMoveAction;
95071
96083
  var _interopRequireDefault = __webpack_require__(1);
95072
96084
  exports.__esModule = true;
95073
96085
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95074
- var _base = __webpack_require__(751);
96086
+ var _base = __webpack_require__(752);
95075
96087
  /**
95076
96088
  * Action that tracks column sort changes.
95077
96089
  *
@@ -95139,7 +96151,7 @@ class ColumnSortAction extends _base.BaseAction {
95139
96151
  exports.ColumnSortAction = ColumnSortAction;
95140
96152
 
95141
96153
  /***/ }),
95142
- /* 754 */
96154
+ /* 755 */
95143
96155
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95144
96156
 
95145
96157
  "use strict";
@@ -95148,7 +96160,7 @@ exports.ColumnSortAction = ColumnSortAction;
95148
96160
  var _interopRequireDefault = __webpack_require__(1);
95149
96161
  exports.__esModule = true;
95150
96162
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95151
- var _base = __webpack_require__(751);
96163
+ var _base = __webpack_require__(752);
95152
96164
  /**
95153
96165
  * Action that tracks column creation.
95154
96166
  *
@@ -95203,7 +96215,7 @@ class CreateColumnAction extends _base.BaseAction {
95203
96215
  exports.CreateColumnAction = CreateColumnAction;
95204
96216
 
95205
96217
  /***/ }),
95206
- /* 755 */
96218
+ /* 756 */
95207
96219
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95208
96220
 
95209
96221
  "use strict";
@@ -95212,7 +96224,7 @@ exports.CreateColumnAction = CreateColumnAction;
95212
96224
  var _interopRequireDefault = __webpack_require__(1);
95213
96225
  exports.__esModule = true;
95214
96226
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95215
- var _base = __webpack_require__(751);
96227
+ var _base = __webpack_require__(752);
95216
96228
  /**
95217
96229
  * Action that tracks row creation.
95218
96230
  *
@@ -95272,7 +96284,7 @@ class CreateRowAction extends _base.BaseAction {
95272
96284
  exports.CreateRowAction = CreateRowAction;
95273
96285
 
95274
96286
  /***/ }),
95275
- /* 756 */
96287
+ /* 757 */
95276
96288
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95277
96289
 
95278
96290
  "use strict";
@@ -95286,7 +96298,7 @@ __webpack_require__(185);
95286
96298
  __webpack_require__(133);
95287
96299
  __webpack_require__(196);
95288
96300
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95289
- var _base = __webpack_require__(751);
96301
+ var _base = __webpack_require__(752);
95290
96302
  var _object = __webpack_require__(165);
95291
96303
  /**
95292
96304
  * Action that tracks data changes.
@@ -95399,7 +96411,7 @@ class DataChangeAction extends _base.BaseAction {
95399
96411
  exports.DataChangeAction = DataChangeAction;
95400
96412
 
95401
96413
  /***/ }),
95402
- /* 757 */
96414
+ /* 758 */
95403
96415
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95404
96416
 
95405
96417
  "use strict";
@@ -95410,7 +96422,7 @@ exports.__esModule = true;
95410
96422
  __webpack_require__(115);
95411
96423
  __webpack_require__(127);
95412
96424
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95413
- var _base = __webpack_require__(751);
96425
+ var _base = __webpack_require__(752);
95414
96426
  /**
95415
96427
  * Action that tracks filter changes.
95416
96428
  *
@@ -95469,7 +96481,7 @@ class FiltersAction extends _base.BaseAction {
95469
96481
  exports.FiltersAction = FiltersAction;
95470
96482
 
95471
96483
  /***/ }),
95472
- /* 758 */
96484
+ /* 759 */
95473
96485
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95474
96486
 
95475
96487
  "use strict";
@@ -95478,7 +96490,7 @@ exports.FiltersAction = FiltersAction;
95478
96490
  var _interopRequireDefault = __webpack_require__(1);
95479
96491
  exports.__esModule = true;
95480
96492
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95481
- var _base = __webpack_require__(751);
96493
+ var _base = __webpack_require__(752);
95482
96494
  /**
95483
96495
  * Action that tracks changes in merged cells.
95484
96496
  *
@@ -95539,7 +96551,7 @@ class MergeCellsAction extends _base.BaseAction {
95539
96551
  exports.MergeCellsAction = MergeCellsAction;
95540
96552
 
95541
96553
  /***/ }),
95542
- /* 759 */
96554
+ /* 760 */
95543
96555
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95544
96556
 
95545
96557
  "use strict";
@@ -95551,8 +96563,8 @@ __webpack_require__(87);
95551
96563
  __webpack_require__(115);
95552
96564
  __webpack_require__(133);
95553
96565
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95554
- var _base = __webpack_require__(751);
95555
- var _utils = __webpack_require__(760);
96566
+ var _base = __webpack_require__(752);
96567
+ var _utils = __webpack_require__(761);
95556
96568
  var _number = __webpack_require__(200);
95557
96569
  var _array = __webpack_require__(161);
95558
96570
  /**
@@ -95580,7 +96592,7 @@ class RemoveColumnAction extends _base.BaseAction {
95580
96592
  */
95581
96593
  (0, _defineProperty2.default)(this, "index", void 0);
95582
96594
  /**
95583
- * @param {number[]} indexes The visual column indexes.
96595
+ * @param {number[]} indexes The physical column indexes.
95584
96596
  */
95585
96597
  (0, _defineProperty2.default)(this, "indexes", void 0);
95586
96598
  /**
@@ -95646,16 +96658,14 @@ class RemoveColumnAction extends _base.BaseAction {
95646
96658
  headers.push(hot.getSettings().colHeaders[hot.toPhysicalColumn(columnIndex + i)] || null);
95647
96659
  });
95648
96660
  }
95649
- const columnsMap = hot.columnIndexMapper.getIndexesSequence();
95650
- const rowsMap = hot.rowIndexMapper.getIndexesSequence();
95651
96661
  return new RemoveColumnAction({
95652
96662
  index: columnIndex,
95653
96663
  indexes,
95654
96664
  data: removedData,
95655
96665
  amount,
95656
96666
  headers,
95657
- columnPositions: columnsMap,
95658
- rowPositions: rowsMap,
96667
+ columnPositions: hot.columnIndexMapper.getIndexesSequence(),
96668
+ rowPositions: hot.rowIndexMapper.getIndexesSequence(),
95659
96669
  fixedColumnsStart: hot.getSettings().fixedColumnsStart,
95660
96670
  removedCellMetas: (0, _utils.getCellMetas)(hot, 0, hot.countRows(), columnIndex, lastColumnIndex)
95661
96671
  });
@@ -95682,14 +96692,27 @@ class RemoveColumnAction extends _base.BaseAction {
95682
96692
  }
95683
96693
  const sortedHeaders = (0, _array.arrayMap)(this.headers, sortByIndexes);
95684
96694
  const changes = [];
95685
- hot.alter('insert_col_start', this.indexes[0], this.indexes.length, 'UndoRedo.undo');
96695
+
96696
+ // The indexes sequence have to be applied twice.
96697
+ // * First for proper index translation. The alter method accepts a visual index
96698
+ // and we are able to retrieve the correct index indicating where to add a new row based
96699
+ // only on the previous order state of the columns;
96700
+ // * The alter method shifts the indexes (a side-effect), so we need to reapply the indexes sequence
96701
+ // the same as it was in the previous state;
96702
+ hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
96703
+ hot.alter('insert_col_start', hot.toVisualColumn(this.indexes[0]), this.indexes.length, 'UndoRedo.undo');
96704
+ hot.batchExecution(() => {
96705
+ // Restore row sequence in a case when all columns are removed. the original
96706
+ // row sequence is lost in that case.
96707
+ hot.rowIndexMapper.setIndexesSequence(this.rowPositions);
96708
+ hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
96709
+ }, true);
95686
96710
  (0, _array.arrayEach)(hot.getSourceDataArray(), (rowData, rowIndex) => {
95687
96711
  (0, _array.arrayEach)(ascendingIndexes, (changedIndex, contiquesIndex) => {
95688
96712
  rowData[changedIndex] = sortedData[rowIndex][contiquesIndex];
95689
96713
  changes.push([rowIndex, changedIndex, rowData[changedIndex]]);
95690
96714
  });
95691
96715
  });
95692
- hot.setSourceDataAtCell(changes, undefined, undefined, 'UndoRedo.undo');
95693
96716
  if (typeof this.headers !== 'undefined') {
95694
96717
  (0, _array.arrayEach)(sortedHeaders, (headerData, columnIndex) => {
95695
96718
  hot.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
@@ -95699,14 +96722,8 @@ class RemoveColumnAction extends _base.BaseAction {
95699
96722
  let [rowIndex, columnIndex, cellMeta] = _ref2;
95700
96723
  hot.setCellMetaObject(rowIndex, columnIndex, cellMeta);
95701
96724
  });
95702
- hot.batchExecution(() => {
95703
- // Restore row sequence in a case when all columns are removed. the original
95704
- // row sequence is lost in that case.
95705
- hot.rowIndexMapper.setIndexesSequence(this.rowPositions);
95706
- hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
95707
- }, true);
95708
96725
  hot.addHookOnce('afterViewRender', undoneCallback);
95709
- hot.render();
96726
+ hot.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
95710
96727
  }
95711
96728
 
95712
96729
  /**
@@ -95721,7 +96738,7 @@ class RemoveColumnAction extends _base.BaseAction {
95721
96738
  exports.RemoveColumnAction = RemoveColumnAction;
95722
96739
 
95723
96740
  /***/ }),
95724
- /* 760 */
96741
+ /* 761 */
95725
96742
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95726
96743
 
95727
96744
  "use strict";
@@ -95730,7 +96747,7 @@ exports.RemoveColumnAction = RemoveColumnAction;
95730
96747
  exports.__esModule = true;
95731
96748
  exports.getCellMetas = getCellMetas;
95732
96749
  __webpack_require__(87);
95733
- __webpack_require__(761);
96750
+ __webpack_require__(762);
95734
96751
  __webpack_require__(115);
95735
96752
  __webpack_require__(127);
95736
96753
  var _number = __webpack_require__(200);
@@ -95764,7 +96781,7 @@ function getCellMetas(hot, fromRow, toRow, fromColumn, toColumn) {
95764
96781
  }
95765
96782
 
95766
96783
  /***/ }),
95767
- /* 761 */
96784
+ /* 762 */
95768
96785
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
95769
96786
 
95770
96787
  "use strict";
@@ -95787,7 +96804,7 @@ $({ target: 'Object', stat: true }, {
95787
96804
 
95788
96805
 
95789
96806
  /***/ }),
95790
- /* 762 */
96807
+ /* 763 */
95791
96808
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95792
96809
 
95793
96810
  "use strict";
@@ -95799,8 +96816,8 @@ __webpack_require__(87);
95799
96816
  __webpack_require__(115);
95800
96817
  __webpack_require__(133);
95801
96818
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95802
- var _base = __webpack_require__(751);
95803
- var _utils = __webpack_require__(760);
96819
+ var _base = __webpack_require__(752);
96820
+ var _utils = __webpack_require__(761);
95804
96821
  var _object = __webpack_require__(165);
95805
96822
  /**
95806
96823
  * Action that tracks changes in row removal.
@@ -95820,7 +96837,7 @@ class RemoveRowAction extends _base.BaseAction {
95820
96837
  } = _ref;
95821
96838
  super('remove_row');
95822
96839
  /**
95823
- * @param {number} index The visual row index.
96840
+ * @param {number} index The physical row index.
95824
96841
  */
95825
96842
  (0, _defineProperty2.default)(this, "index", void 0);
95826
96843
  /**
@@ -95888,14 +96905,22 @@ class RemoveRowAction extends _base.BaseAction {
95888
96905
  changes.push([this.index + rowIndexDelta, isNaN(columnIndex) ? columnProp : columnIndex, dataRow[columnProp]]);
95889
96906
  });
95890
96907
  });
95891
- hot.alter('insert_row_above', this.index, this.data.length, 'UndoRedo.undo');
96908
+
96909
+ // The indexes sequence have to be applied twice.
96910
+ // * First for proper index translation. The alter method accepts a visual index
96911
+ // and we are able to retrieve the correct index indicating where to add a new row based
96912
+ // only on the previous order state of the rows;
96913
+ // * The alter method shifts the indexes (a side-effect), so we need to reapply the indexes sequence
96914
+ // the same as it was in the previous state;
96915
+ hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
96916
+ hot.alter('insert_row_above', hot.toVisualRow(this.index), this.data.length, 'UndoRedo.undo');
96917
+ hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
95892
96918
  this.removedCellMetas.forEach(_ref2 => {
95893
96919
  let [rowIndex, columnIndex, cellMeta] = _ref2;
95894
96920
  hot.setCellMetaObject(rowIndex, columnIndex, cellMeta);
95895
96921
  });
95896
96922
  hot.addHookOnce('afterViewRender', undoneCallback);
95897
96923
  hot.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
95898
- hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
95899
96924
  }
95900
96925
 
95901
96926
  /**
@@ -95904,13 +96929,13 @@ class RemoveRowAction extends _base.BaseAction {
95904
96929
  */
95905
96930
  redo(hot, redoneCallback) {
95906
96931
  hot.addHookOnce('afterRemoveRow', redoneCallback);
95907
- hot.alter('remove_row', this.index, this.data.length, 'UndoRedo.redo');
96932
+ hot.alter('remove_row', hot.toVisualRow(this.index), this.data.length, 'UndoRedo.redo');
95908
96933
  }
95909
96934
  }
95910
96935
  exports.RemoveRowAction = RemoveRowAction;
95911
96936
 
95912
96937
  /***/ }),
95913
- /* 763 */
96938
+ /* 764 */
95914
96939
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95915
96940
 
95916
96941
  "use strict";
@@ -95921,7 +96946,7 @@ exports.__esModule = true;
95921
96946
  __webpack_require__(115);
95922
96947
  __webpack_require__(133);
95923
96948
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
95924
- var _base = __webpack_require__(751);
96949
+ var _base = __webpack_require__(752);
95925
96950
  var _moves = __webpack_require__(661);
95926
96951
  /**
95927
96952
  * Action that tracks row move changes.
@@ -95998,7 +97023,7 @@ class RowMoveAction extends _base.BaseAction {
95998
97023
  exports.RowMoveAction = RowMoveAction;
95999
97024
 
96000
97025
  /***/ }),
96001
- /* 764 */
97026
+ /* 765 */
96002
97027
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
96003
97028
 
96004
97029
  "use strict";
@@ -96007,7 +97032,7 @@ exports.RowMoveAction = RowMoveAction;
96007
97032
  var _interopRequireDefault = __webpack_require__(1);
96008
97033
  exports.__esModule = true;
96009
97034
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(170));
96010
- var _base = __webpack_require__(751);
97035
+ var _base = __webpack_require__(752);
96011
97036
  /**
96012
97037
  * Action that tracks changes in merged cells.
96013
97038
  *
@@ -96061,7 +97086,7 @@ class UnmergeCellsAction extends _base.BaseAction {
96061
97086
  exports.UnmergeCellsAction = UnmergeCellsAction;
96062
97087
 
96063
97088
  /***/ }),
96064
- /* 765 */
97089
+ /* 766 */
96065
97090
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
96066
97091
 
96067
97092
  "use strict";
@@ -96170,7 +97195,7 @@ exports.CellRange = _base.CellRange;
96170
97195
  var _registry = __webpack_require__(430);
96171
97196
  var _eventManager = _interopRequireWildcard(__webpack_require__(188));
96172
97197
  var _translations = __webpack_require__(291);
96173
- var _jquery = _interopRequireDefault(__webpack_require__(765));
97198
+ var _jquery = _interopRequireDefault(__webpack_require__(766));
96174
97199
  var _ghostTable = _interopRequireDefault(__webpack_require__(509));
96175
97200
  var parseTableHelpers = _interopRequireWildcard(__webpack_require__(190));
96176
97201
  var arrayHelpers = _interopRequireWildcard(__webpack_require__(161));