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
@@ -110,6 +110,67 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 330;
110
110
  * hot.render();
111
111
  * ```
112
112
  * :::
113
+ *
114
+ * ::: only-for angular
115
+ * ```ts
116
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
117
+ * import {
118
+ * GridSettings,
119
+ * HotTableModule,
120
+ * HotTableComponent,
121
+ * } from "@handsontable/angular-wrapper";
122
+ *
123
+ * `@Component`({
124
+ * selector: "app-example",
125
+ * standalone: true,
126
+ * imports: [HotTableModule],
127
+ * template: ` <div class="ht-theme-main">
128
+ * <hot-table [settings]="gridSettings" />
129
+ * </div>`,
130
+ * })
131
+ * export class ExampleComponent implements AfterViewInit {
132
+ * `@ViewChild`(HotTableComponent, { static: false })
133
+ * readonly hotTable!: HotTableComponent;
134
+ *
135
+ * readonly gridSettings = <GridSettings>{
136
+ * data: this.getData(),
137
+ * // Hide selected rows on table initialization
138
+ * trimRows: [1, 2, 5],
139
+ * };
140
+ *
141
+ * ngAfterViewInit(): void {
142
+ * // Access the trimRows plugin instance
143
+ * const hot = this.hotTable.hotInstance;
144
+ * const trimRowsPlugin = hot.getPlugin("trimRows");
145
+ *
146
+ * // Hide a single row
147
+ * trimRowsPlugin.trimRow(1);
148
+ *
149
+ * // Hide multiple rows
150
+ * trimRowsPlugin.trimRow(1, 2, 9);
151
+ *
152
+ * // Or as an array
153
+ * trimRowsPlugin.trimRows([1, 2, 9]);
154
+ *
155
+ * // Show a single row
156
+ * trimRowsPlugin.untrimRow(1);
157
+ *
158
+ * // Show multiple rows
159
+ * trimRowsPlugin.untrimRow(1, 2, 9);
160
+ *
161
+ * // Or as an array
162
+ * trimRowsPlugin.untrimRows([1, 2, 9]);
163
+ *
164
+ * // Re-render table to see the changes
165
+ * hot.render();
166
+ * }
167
+ *
168
+ * private getData(): any[] {
169
+ * // Get some data
170
+ * }
171
+ * }
172
+ * ```
173
+ * :::
113
174
  */
114
175
  var _TrimRows_brand = /*#__PURE__*/new WeakSet();
115
176
  class TrimRows extends _base.BasePlugin {
@@ -107,6 +107,67 @@ export const PLUGIN_PRIORITY = 330;
107
107
  * hot.render();
108
108
  * ```
109
109
  * :::
110
+ *
111
+ * ::: only-for angular
112
+ * ```ts
113
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
114
+ * import {
115
+ * GridSettings,
116
+ * HotTableModule,
117
+ * HotTableComponent,
118
+ * } from "@handsontable/angular-wrapper";
119
+ *
120
+ * `@Component`({
121
+ * selector: "app-example",
122
+ * standalone: true,
123
+ * imports: [HotTableModule],
124
+ * template: ` <div class="ht-theme-main">
125
+ * <hot-table [settings]="gridSettings" />
126
+ * </div>`,
127
+ * })
128
+ * export class ExampleComponent implements AfterViewInit {
129
+ * `@ViewChild`(HotTableComponent, { static: false })
130
+ * readonly hotTable!: HotTableComponent;
131
+ *
132
+ * readonly gridSettings = <GridSettings>{
133
+ * data: this.getData(),
134
+ * // Hide selected rows on table initialization
135
+ * trimRows: [1, 2, 5],
136
+ * };
137
+ *
138
+ * ngAfterViewInit(): void {
139
+ * // Access the trimRows plugin instance
140
+ * const hot = this.hotTable.hotInstance;
141
+ * const trimRowsPlugin = hot.getPlugin("trimRows");
142
+ *
143
+ * // Hide a single row
144
+ * trimRowsPlugin.trimRow(1);
145
+ *
146
+ * // Hide multiple rows
147
+ * trimRowsPlugin.trimRow(1, 2, 9);
148
+ *
149
+ * // Or as an array
150
+ * trimRowsPlugin.trimRows([1, 2, 9]);
151
+ *
152
+ * // Show a single row
153
+ * trimRowsPlugin.untrimRow(1);
154
+ *
155
+ * // Show multiple rows
156
+ * trimRowsPlugin.untrimRow(1, 2, 9);
157
+ *
158
+ * // Or as an array
159
+ * trimRowsPlugin.untrimRows([1, 2, 9]);
160
+ *
161
+ * // Re-render table to see the changes
162
+ * hot.render();
163
+ * }
164
+ *
165
+ * private getData(): any[] {
166
+ * // Get some data
167
+ * }
168
+ * }
169
+ * ```
170
+ * :::
110
171
  */
111
172
  var _TrimRows_brand = /*#__PURE__*/new WeakSet();
112
173
  export class TrimRows extends BasePlugin {
@@ -37,7 +37,7 @@ class RemoveColumnAction extends _base.BaseAction {
37
37
  */
38
38
  _defineProperty(this, "index", void 0);
39
39
  /**
40
- * @param {number[]} indexes The visual column indexes.
40
+ * @param {number[]} indexes The physical column indexes.
41
41
  */
42
42
  _defineProperty(this, "indexes", void 0);
43
43
  /**
@@ -103,16 +103,14 @@ class RemoveColumnAction extends _base.BaseAction {
103
103
  headers.push(hot.getSettings().colHeaders[hot.toPhysicalColumn(columnIndex + i)] || null);
104
104
  });
105
105
  }
106
- const columnsMap = hot.columnIndexMapper.getIndexesSequence();
107
- const rowsMap = hot.rowIndexMapper.getIndexesSequence();
108
106
  return new RemoveColumnAction({
109
107
  index: columnIndex,
110
108
  indexes,
111
109
  data: removedData,
112
110
  amount,
113
111
  headers,
114
- columnPositions: columnsMap,
115
- rowPositions: rowsMap,
112
+ columnPositions: hot.columnIndexMapper.getIndexesSequence(),
113
+ rowPositions: hot.rowIndexMapper.getIndexesSequence(),
116
114
  fixedColumnsStart: hot.getSettings().fixedColumnsStart,
117
115
  removedCellMetas: (0, _utils.getCellMetas)(hot, 0, hot.countRows(), columnIndex, lastColumnIndex)
118
116
  });
@@ -139,14 +137,27 @@ class RemoveColumnAction extends _base.BaseAction {
139
137
  }
140
138
  const sortedHeaders = (0, _array.arrayMap)(this.headers, sortByIndexes);
141
139
  const changes = [];
142
- hot.alter('insert_col_start', this.indexes[0], this.indexes.length, 'UndoRedo.undo');
140
+
141
+ // The indexes sequence have to be applied twice.
142
+ // * First for proper index translation. The alter method accepts a visual index
143
+ // and we are able to retrieve the correct index indicating where to add a new row based
144
+ // only on the previous order state of the columns;
145
+ // * The alter method shifts the indexes (a side-effect), so we need to reapply the indexes sequence
146
+ // the same as it was in the previous state;
147
+ hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
148
+ hot.alter('insert_col_start', hot.toVisualColumn(this.indexes[0]), this.indexes.length, 'UndoRedo.undo');
149
+ hot.batchExecution(() => {
150
+ // Restore row sequence in a case when all columns are removed. the original
151
+ // row sequence is lost in that case.
152
+ hot.rowIndexMapper.setIndexesSequence(this.rowPositions);
153
+ hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
154
+ }, true);
143
155
  (0, _array.arrayEach)(hot.getSourceDataArray(), (rowData, rowIndex) => {
144
156
  (0, _array.arrayEach)(ascendingIndexes, (changedIndex, contiquesIndex) => {
145
157
  rowData[changedIndex] = sortedData[rowIndex][contiquesIndex];
146
158
  changes.push([rowIndex, changedIndex, rowData[changedIndex]]);
147
159
  });
148
160
  });
149
- hot.setSourceDataAtCell(changes, undefined, undefined, 'UndoRedo.undo');
150
161
  if (typeof this.headers !== 'undefined') {
151
162
  (0, _array.arrayEach)(sortedHeaders, (headerData, columnIndex) => {
152
163
  hot.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
@@ -156,14 +167,8 @@ class RemoveColumnAction extends _base.BaseAction {
156
167
  let [rowIndex, columnIndex, cellMeta] = _ref2;
157
168
  hot.setCellMetaObject(rowIndex, columnIndex, cellMeta);
158
169
  });
159
- hot.batchExecution(() => {
160
- // Restore row sequence in a case when all columns are removed. the original
161
- // row sequence is lost in that case.
162
- hot.rowIndexMapper.setIndexesSequence(this.rowPositions);
163
- hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
164
- }, true);
165
170
  hot.addHookOnce('afterViewRender', undoneCallback);
166
- hot.render();
171
+ hot.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
167
172
  }
168
173
 
169
174
  /**
@@ -34,7 +34,7 @@ export class RemoveColumnAction extends BaseAction {
34
34
  */
35
35
  _defineProperty(this, "index", void 0);
36
36
  /**
37
- * @param {number[]} indexes The visual column indexes.
37
+ * @param {number[]} indexes The physical column indexes.
38
38
  */
39
39
  _defineProperty(this, "indexes", void 0);
40
40
  /**
@@ -100,16 +100,14 @@ export class RemoveColumnAction extends BaseAction {
100
100
  headers.push(hot.getSettings().colHeaders[hot.toPhysicalColumn(columnIndex + i)] || null);
101
101
  });
102
102
  }
103
- const columnsMap = hot.columnIndexMapper.getIndexesSequence();
104
- const rowsMap = hot.rowIndexMapper.getIndexesSequence();
105
103
  return new RemoveColumnAction({
106
104
  index: columnIndex,
107
105
  indexes,
108
106
  data: removedData,
109
107
  amount,
110
108
  headers,
111
- columnPositions: columnsMap,
112
- rowPositions: rowsMap,
109
+ columnPositions: hot.columnIndexMapper.getIndexesSequence(),
110
+ rowPositions: hot.rowIndexMapper.getIndexesSequence(),
113
111
  fixedColumnsStart: hot.getSettings().fixedColumnsStart,
114
112
  removedCellMetas: getCellMetas(hot, 0, hot.countRows(), columnIndex, lastColumnIndex)
115
113
  });
@@ -136,14 +134,27 @@ export class RemoveColumnAction extends BaseAction {
136
134
  }
137
135
  const sortedHeaders = arrayMap(this.headers, sortByIndexes);
138
136
  const changes = [];
139
- hot.alter('insert_col_start', this.indexes[0], this.indexes.length, 'UndoRedo.undo');
137
+
138
+ // The indexes sequence have to be applied twice.
139
+ // * First for proper index translation. The alter method accepts a visual index
140
+ // and we are able to retrieve the correct index indicating where to add a new row based
141
+ // only on the previous order state of the columns;
142
+ // * The alter method shifts the indexes (a side-effect), so we need to reapply the indexes sequence
143
+ // the same as it was in the previous state;
144
+ hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
145
+ hot.alter('insert_col_start', hot.toVisualColumn(this.indexes[0]), this.indexes.length, 'UndoRedo.undo');
146
+ hot.batchExecution(() => {
147
+ // Restore row sequence in a case when all columns are removed. the original
148
+ // row sequence is lost in that case.
149
+ hot.rowIndexMapper.setIndexesSequence(this.rowPositions);
150
+ hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
151
+ }, true);
140
152
  arrayEach(hot.getSourceDataArray(), (rowData, rowIndex) => {
141
153
  arrayEach(ascendingIndexes, (changedIndex, contiquesIndex) => {
142
154
  rowData[changedIndex] = sortedData[rowIndex][contiquesIndex];
143
155
  changes.push([rowIndex, changedIndex, rowData[changedIndex]]);
144
156
  });
145
157
  });
146
- hot.setSourceDataAtCell(changes, undefined, undefined, 'UndoRedo.undo');
147
158
  if (typeof this.headers !== 'undefined') {
148
159
  arrayEach(sortedHeaders, (headerData, columnIndex) => {
149
160
  hot.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
@@ -153,14 +164,8 @@ export class RemoveColumnAction extends BaseAction {
153
164
  let [rowIndex, columnIndex, cellMeta] = _ref2;
154
165
  hot.setCellMetaObject(rowIndex, columnIndex, cellMeta);
155
166
  });
156
- hot.batchExecution(() => {
157
- // Restore row sequence in a case when all columns are removed. the original
158
- // row sequence is lost in that case.
159
- hot.rowIndexMapper.setIndexesSequence(this.rowPositions);
160
- hot.columnIndexMapper.setIndexesSequence(this.columnPositions);
161
- }, true);
162
167
  hot.addHookOnce('afterViewRender', undoneCallback);
163
- hot.render();
168
+ hot.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
164
169
  }
165
170
 
166
171
  /**
@@ -29,7 +29,7 @@ class RemoveRowAction extends _base.BaseAction {
29
29
  } = _ref;
30
30
  super('remove_row');
31
31
  /**
32
- * @param {number} index The visual row index.
32
+ * @param {number} index The physical row index.
33
33
  */
34
34
  _defineProperty(this, "index", void 0);
35
35
  /**
@@ -97,14 +97,22 @@ class RemoveRowAction extends _base.BaseAction {
97
97
  changes.push([this.index + rowIndexDelta, isNaN(columnIndex) ? columnProp : columnIndex, dataRow[columnProp]]);
98
98
  });
99
99
  });
100
- hot.alter('insert_row_above', this.index, this.data.length, 'UndoRedo.undo');
100
+
101
+ // The indexes sequence have to be applied twice.
102
+ // * First for proper index translation. The alter method accepts a visual index
103
+ // and we are able to retrieve the correct index indicating where to add a new row based
104
+ // only on the previous order state of the rows;
105
+ // * The alter method shifts the indexes (a side-effect), so we need to reapply the indexes sequence
106
+ // the same as it was in the previous state;
107
+ hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
108
+ hot.alter('insert_row_above', hot.toVisualRow(this.index), this.data.length, 'UndoRedo.undo');
109
+ hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
101
110
  this.removedCellMetas.forEach(_ref2 => {
102
111
  let [rowIndex, columnIndex, cellMeta] = _ref2;
103
112
  hot.setCellMetaObject(rowIndex, columnIndex, cellMeta);
104
113
  });
105
114
  hot.addHookOnce('afterViewRender', undoneCallback);
106
115
  hot.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
107
- hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
108
116
  }
109
117
 
110
118
  /**
@@ -113,7 +121,7 @@ class RemoveRowAction extends _base.BaseAction {
113
121
  */
114
122
  redo(hot, redoneCallback) {
115
123
  hot.addHookOnce('afterRemoveRow', redoneCallback);
116
- hot.alter('remove_row', this.index, this.data.length, 'UndoRedo.redo');
124
+ hot.alter('remove_row', hot.toVisualRow(this.index), this.data.length, 'UndoRedo.redo');
117
125
  }
118
126
  }
119
127
  exports.RemoveRowAction = RemoveRowAction;
@@ -26,7 +26,7 @@ export class RemoveRowAction extends BaseAction {
26
26
  } = _ref;
27
27
  super('remove_row');
28
28
  /**
29
- * @param {number} index The visual row index.
29
+ * @param {number} index The physical row index.
30
30
  */
31
31
  _defineProperty(this, "index", void 0);
32
32
  /**
@@ -94,14 +94,22 @@ export class RemoveRowAction extends BaseAction {
94
94
  changes.push([this.index + rowIndexDelta, isNaN(columnIndex) ? columnProp : columnIndex, dataRow[columnProp]]);
95
95
  });
96
96
  });
97
- hot.alter('insert_row_above', this.index, this.data.length, 'UndoRedo.undo');
97
+
98
+ // The indexes sequence have to be applied twice.
99
+ // * First for proper index translation. The alter method accepts a visual index
100
+ // and we are able to retrieve the correct index indicating where to add a new row based
101
+ // only on the previous order state of the rows;
102
+ // * The alter method shifts the indexes (a side-effect), so we need to reapply the indexes sequence
103
+ // the same as it was in the previous state;
104
+ hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
105
+ hot.alter('insert_row_above', hot.toVisualRow(this.index), this.data.length, 'UndoRedo.undo');
106
+ hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
98
107
  this.removedCellMetas.forEach(_ref2 => {
99
108
  let [rowIndex, columnIndex, cellMeta] = _ref2;
100
109
  hot.setCellMetaObject(rowIndex, columnIndex, cellMeta);
101
110
  });
102
111
  hot.addHookOnce('afterViewRender', undoneCallback);
103
112
  hot.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
104
- hot.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
105
113
  }
106
114
 
107
115
  /**
@@ -110,6 +118,6 @@ export class RemoveRowAction extends BaseAction {
110
118
  */
111
119
  redo(hot, redoneCallback) {
112
120
  hot.addHookOnce('afterRemoveRow', redoneCallback);
113
- hot.alter('remove_row', this.index, this.data.length, 'UndoRedo.redo');
121
+ hot.alter('remove_row', hot.toVisualRow(this.index), this.data.length, 'UndoRedo.redo');
114
122
  }
115
123
  }
@@ -1192,7 +1192,9 @@ class Selection {
1192
1192
  col: (0, _number.clamp)(to.col, 0, countColumns - 1)
1193
1193
  });
1194
1194
  this.selectedRange.ranges.push(range);
1195
- this.highlight.getFocus().add(highlight).commit().syncWith(range);
1195
+ if (this.highlight.isEnabledFor(_highlight.FOCUS_TYPE, this.selectedRange.current().highlight)) {
1196
+ this.highlight.getFocus().add(highlight).commit().syncWith(range);
1197
+ }
1196
1198
  this.applyAndCommit(range);
1197
1199
  }
1198
1200
 
@@ -1186,7 +1186,9 @@ class Selection {
1186
1186
  col: clamp(to.col, 0, countColumns - 1)
1187
1187
  });
1188
1188
  this.selectedRange.ranges.push(range);
1189
- this.highlight.getFocus().add(highlight).commit().syncWith(range);
1189
+ if (this.highlight.isEnabledFor(FOCUS_TYPE, this.selectedRange.current().highlight)) {
1190
+ this.highlight.getFocus().add(highlight).commit().syncWith(range);
1191
+ }
1190
1192
  this.applyAndCommit(range);
1191
1193
  }
1192
1194
 
@@ -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
  .ht-wrapper:not([class*=ht-theme]) {
32
32
  --ht-gap-size: 4px;
@@ -85,14 +85,16 @@
85
85
  .handsontable.htGhostTable table thead th {
86
86
  border-bottom-width: 0;
87
87
  }
88
- .handsontable.htGhostTable table tbody tr td,
89
- .handsontable.htGhostTable table tbody tr th {
88
+ .handsontable.htGhostTable table tbody tr th,
89
+ .handsontable.htGhostTable table tbody tr td {
90
90
  border-top-width: 0;
91
- }
92
- .handsontable.htGhostTable table tbody tr:first-of-type th,
93
- .handsontable.htGhostTable table tbody tr:first-of-type td {
94
91
  height: calc(var(--ht-cell-vertical-padding) * 2 + var(--ht-line-height) + 1px);
95
92
  }
93
+ .handsontable.htGhostTable table.htGhostTableFirstRow tbody tr th,
94
+ .handsontable.htGhostTable table.htGhostTableFirstRow tbody tr td {
95
+ border-top-width: 1px;
96
+ height: calc(var(--ht-cell-vertical-padding) * 2 + var(--ht-line-height) + 2px);
97
+ }
96
98
  .handsontable.htHasScrollX .ht_master .wtHolder, .handsontable.htHasScrollY .ht_master .wtHolder {
97
99
  background-color: var(--ht-background-color);
98
100
  border-radius: var(--ht-wrapper-border-radius, 0);
@@ -1785,9 +1787,6 @@
1785
1787
  .handsontable.htDropdownMenu table tbody tr td .htUIButton input, .handsontable.htContextMenu table tbody tr td .htUIButton input, .handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input {
1786
1788
  width: 100%;
1787
1789
  }
1788
- .handsontable.htContextMenuSub_Alignment, .handsontable.htDropdownMenuSub_Alignment {
1789
- margin-top: calc(var(--ht-menu-vertical-padding) * -1);
1790
- }
1791
1790
  .handsontable .htUIClearAll a,
1792
1791
  .handsontable .htUISelectAll a {
1793
1792
  padding: var(--ht-gap-size);
@@ -1909,7 +1908,7 @@
1909
1908
  outline: 1px solid var(--ht-link-hover-color);
1910
1909
  }
1911
1910
  .handsontable .htUIMultipleSelect .ht_master .wtHolder {
1912
- overflow-y: auto;
1911
+ overflow: auto;
1913
1912
  }
1914
1913
  .handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,
1915
1914
  .handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,
@@ -1962,20 +1961,20 @@
1962
1961
  background-color: var(--ht-comments-textarea-focus-background-color, #ffffff);
1963
1962
  }
1964
1963
 
1965
- .handsontable .columnSorting {
1964
+ .handsontable .columnSorting:not(.indicatorDisabled) {
1966
1965
  position: relative;
1967
1966
  }
1968
- .handsontable .columnSorting.sortAction {
1967
+ .handsontable .columnSorting:not(.indicatorDisabled).sortAction {
1969
1968
  padding-inline-start: calc(var(--ht-icon-size, 16px) + 2px);
1970
1969
  padding-inline-end: calc(var(--ht-icon-size, 16px) + 2px);
1971
1970
  min-width: calc(var(--ht-icon-size, 16px) + 8px);
1972
1971
  max-width: calc(100% - var(--ht-icon-size, 16px) * 2 - 4px);
1973
1972
  }
1974
- .handsontable .columnSorting.sortAction:hover {
1973
+ .handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover {
1975
1974
  text-decoration: none;
1976
1975
  cursor: pointer;
1977
1976
  }
1978
- .handsontable .columnSorting.sortAction::before {
1977
+ .handsontable .columnSorting:not(.indicatorDisabled).sortAction::before {
1979
1978
  content: "";
1980
1979
  display: block;
1981
1980
  width: var(--ht-icon-size, 16px);