handsontable 0.0.0-next-48677e7-20230509 → 0.0.0-next-c73b24c-20230510

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (227) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.js +13 -40
  4. package/3rdparty/walkontable/src/cell/coords.mjs +13 -40
  5. package/3rdparty/walkontable/src/cell/range.js +25 -29
  6. package/3rdparty/walkontable/src/cell/range.mjs +24 -28
  7. package/3rdparty/walkontable/src/core/_base.js +3 -9
  8. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  9. package/3rdparty/walkontable/src/core/clone.js +2 -2
  10. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  11. package/3rdparty/walkontable/src/core/core.js +2 -3
  12. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  13. package/3rdparty/walkontable/src/event.js +10 -12
  14. package/3rdparty/walkontable/src/event.mjs +10 -12
  15. package/3rdparty/walkontable/src/facade/core.js +2 -2
  16. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  17. package/3rdparty/walkontable/src/index.js +2 -10
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +7 -8
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +7 -8
  21. package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
  22. package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +10 -9
  26. package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
  27. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
  28. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
  29. package/3rdparty/walkontable/src/overlays.js +55 -64
  30. package/3rdparty/walkontable/src/overlays.mjs +55 -64
  31. package/3rdparty/walkontable/src/renderer/table.js +0 -2
  32. package/3rdparty/walkontable/src/renderer/table.mjs +0 -2
  33. package/3rdparty/walkontable/src/scroll.js +20 -23
  34. package/3rdparty/walkontable/src/scroll.mjs +20 -23
  35. package/3rdparty/walkontable/src/selection.js +354 -0
  36. package/3rdparty/walkontable/src/selection.mjs +348 -0
  37. package/3rdparty/walkontable/src/settings.js +13 -15
  38. package/3rdparty/walkontable/src/settings.mjs +13 -15
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  49. package/3rdparty/walkontable/src/table.js +101 -33
  50. package/3rdparty/walkontable/src/table.mjs +102 -34
  51. package/base.js +2 -4
  52. package/base.mjs +2 -2
  53. package/core.d.ts +0 -4
  54. package/core.js +24 -52
  55. package/core.mjs +24 -52
  56. package/dataMap/dataSource.js +5 -5
  57. package/dataMap/dataSource.mjs +5 -5
  58. package/dataMap/metaManager/metaSchema.js +1 -8
  59. package/dataMap/metaManager/metaSchema.mjs +1 -8
  60. package/dist/handsontable.css +2 -7
  61. package/dist/handsontable.full.css +2 -7
  62. package/dist/handsontable.full.js +9101 -9413
  63. package/dist/handsontable.full.min.css +3 -3
  64. package/dist/handsontable.full.min.js +123 -115
  65. package/dist/handsontable.js +8761 -9074
  66. package/dist/handsontable.min.css +3 -3
  67. package/dist/handsontable.min.js +11 -3
  68. package/dist/languages/all.js +133 -0
  69. package/dist/languages/ar-AR.js +7 -0
  70. package/dist/languages/cs-CZ.js +7 -0
  71. package/dist/languages/de-CH.js +7 -0
  72. package/dist/languages/de-DE.js +7 -0
  73. package/dist/languages/en-US.js +7 -0
  74. package/dist/languages/es-MX.js +7 -0
  75. package/dist/languages/fr-FR.js +7 -0
  76. package/dist/languages/it-IT.js +7 -0
  77. package/dist/languages/ja-JP.js +7 -0
  78. package/dist/languages/ko-KR.js +7 -0
  79. package/dist/languages/lv-LV.js +7 -0
  80. package/dist/languages/nb-NO.js +7 -0
  81. package/dist/languages/nl-NL.js +7 -0
  82. package/dist/languages/pl-PL.js +7 -0
  83. package/dist/languages/pt-BR.js +7 -0
  84. package/dist/languages/ru-RU.js +7 -0
  85. package/dist/languages/sr-SP.js +7 -0
  86. package/dist/languages/zh-CN.js +7 -0
  87. package/dist/languages/zh-TW.js +7 -0
  88. package/editorManager.js +3 -7
  89. package/editorManager.mjs +3 -7
  90. package/editors/textEditor/textEditor.js +16 -3
  91. package/editors/textEditor/textEditor.mjs +17 -4
  92. package/helpers/dom/element.js +0 -11
  93. package/helpers/dom/element.mjs +0 -10
  94. package/helpers/mixed.js +1 -1
  95. package/helpers/mixed.mjs +1 -1
  96. package/i18n/languages/ar-AR.js +7 -1
  97. package/i18n/languages/cs-CZ.js +7 -1
  98. package/i18n/languages/de-CH.js +7 -1
  99. package/i18n/languages/de-DE.js +7 -1
  100. package/i18n/languages/en-US.js +7 -1
  101. package/i18n/languages/es-MX.js +7 -1
  102. package/i18n/languages/fr-FR.js +7 -1
  103. package/i18n/languages/it-IT.js +7 -1
  104. package/i18n/languages/ja-JP.js +7 -1
  105. package/i18n/languages/ko-KR.js +7 -1
  106. package/i18n/languages/lv-LV.js +7 -1
  107. package/i18n/languages/nb-NO.js +7 -1
  108. package/i18n/languages/nl-NL.js +7 -1
  109. package/i18n/languages/pl-PL.js +7 -1
  110. package/i18n/languages/pt-BR.js +7 -1
  111. package/i18n/languages/ru-RU.js +7 -1
  112. package/i18n/languages/sr-SP.js +7 -1
  113. package/i18n/languages/zh-CN.js +7 -1
  114. package/i18n/languages/zh-TW.js +7 -1
  115. package/languages/all.js +133 -0
  116. package/languages/ar-AR.js +7 -0
  117. package/languages/cs-CZ.js +7 -0
  118. package/languages/de-CH.js +7 -0
  119. package/languages/de-DE.js +7 -0
  120. package/languages/en-US.js +7 -0
  121. package/languages/es-MX.js +7 -0
  122. package/languages/fr-FR.js +7 -0
  123. package/languages/index.js +133 -0
  124. package/languages/it-IT.js +7 -0
  125. package/languages/ja-JP.js +7 -0
  126. package/languages/ko-KR.js +7 -0
  127. package/languages/lv-LV.js +7 -0
  128. package/languages/nb-NO.js +7 -0
  129. package/languages/nl-NL.js +7 -0
  130. package/languages/pl-PL.js +7 -0
  131. package/languages/pt-BR.js +7 -0
  132. package/languages/ru-RU.js +7 -0
  133. package/languages/sr-SP.js +7 -0
  134. package/languages/zh-CN.js +7 -0
  135. package/languages/zh-TW.js +7 -0
  136. package/package.json +3 -2
  137. package/pluginHooks.js +17 -7
  138. package/pluginHooks.mjs +16 -4
  139. package/plugins/autoRowSize/autoRowSize.js +2 -2
  140. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  141. package/plugins/copyPaste/copyPaste.js +93 -12
  142. package/plugins/copyPaste/copyPaste.mjs +93 -12
  143. package/plugins/copyPaste/copyableRanges.js +25 -31
  144. package/plugins/copyPaste/copyableRanges.mjs +18 -24
  145. package/plugins/copyPaste/focusableElement.js +219 -0
  146. package/plugins/copyPaste/focusableElement.mjs +213 -0
  147. package/plugins/customBorders/customBorders.js +2 -6
  148. package/plugins/customBorders/customBorders.mjs +3 -7
  149. package/plugins/filters/filters.js +5 -0
  150. package/plugins/filters/filters.mjs +5 -0
  151. package/plugins/formulas/formulas.js +190 -168
  152. package/plugins/formulas/formulas.mjs +190 -168
  153. package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
  154. package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
  155. package/plugins/formulas/indexSyncer/index.js +225 -0
  156. package/plugins/formulas/indexSyncer/index.mjs +219 -0
  157. package/plugins/mergeCells/mergeCells.js +16 -0
  158. package/plugins/mergeCells/mergeCells.mjs +16 -0
  159. package/plugins/nestedHeaders/nestedHeaders.js +4 -3
  160. package/plugins/nestedHeaders/nestedHeaders.mjs +4 -3
  161. package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
  162. package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
  163. package/plugins/nestedHeaders/stateManager/index.js +3 -3
  164. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
  165. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  166. package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
  167. package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
  168. package/plugins/registry.js +3 -1
  169. package/plugins/undoRedo/undoRedo.js +0 -1
  170. package/plugins/undoRedo/undoRedo.mjs +0 -1
  171. package/renderers/baseRenderer/baseRenderer.js +0 -3
  172. package/renderers/baseRenderer/baseRenderer.mjs +0 -3
  173. package/selection/highlight/constants.js +16 -0
  174. package/selection/highlight/constants.mjs +6 -0
  175. package/selection/highlight/highlight.js +133 -335
  176. package/selection/highlight/highlight.mjs +129 -325
  177. package/selection/highlight/types/activeHeader.js +9 -10
  178. package/selection/highlight/types/activeHeader.mjs +8 -10
  179. package/selection/highlight/types/area.js +27 -12
  180. package/selection/highlight/types/area.mjs +30 -16
  181. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  182. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  183. package/selection/highlight/types/customSelection.js +10 -7
  184. package/selection/highlight/types/customSelection.mjs +9 -7
  185. package/selection/highlight/types/fill.js +8 -5
  186. package/selection/highlight/types/fill.mjs +7 -5
  187. package/selection/highlight/types/header.js +20 -10
  188. package/selection/highlight/types/header.mjs +19 -10
  189. package/selection/highlight/types/{row.js → index.js} +31 -27
  190. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  191. package/selection/highlight/visualSelection.js +21 -12
  192. package/selection/highlight/visualSelection.mjs +21 -12
  193. package/selection/index.js +7 -4
  194. package/selection/index.mjs +3 -2
  195. package/selection/selection.js +46 -88
  196. package/selection/selection.mjs +44 -82
  197. package/settings.d.ts +0 -1
  198. package/tableView.js +66 -94
  199. package/tableView.mjs +66 -94
  200. package/translations/changesObservable/observable.js +41 -46
  201. package/translations/changesObservable/observable.mjs +36 -41
  202. package/translations/changesObservable/observer.js +1 -1
  203. package/translations/indexMapper.js +21 -0
  204. package/translations/indexMapper.mjs +21 -0
  205. package/utils/dataStructures/tree.js +15 -18
  206. package/utils/dataStructures/tree.mjs +15 -18
  207. package/utils/parseTable.js +5 -1
  208. package/utils/parseTable.mjs +5 -1
  209. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  210. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  211. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  212. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  213. package/3rdparty/walkontable/src/selection/index.js +0 -30
  214. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  215. package/3rdparty/walkontable/src/selection/manager.js +0 -334
  216. package/3rdparty/walkontable/src/selection/manager.mjs +0 -328
  217. package/3rdparty/walkontable/src/selection/scanner.js +0 -363
  218. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
  219. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  220. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  221. package/focusManager.d.ts +0 -12
  222. package/focusManager.js +0 -249
  223. package/focusManager.mjs +0 -245
  224. package/selection/highlight/types/areaLayered.js +0 -54
  225. package/selection/highlight/types/areaLayered.mjs +0 -49
  226. package/selection/highlight/types/column.js +0 -50
  227. package/selection/highlight/types/column.mjs +0 -45
@@ -33,7 +33,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
33
33
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
34
34
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
35
35
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
36
- import Highlight, { AREA_TYPE, HEADER_TYPE, FOCUS_TYPE } from "./highlight/highlight.mjs";
36
+ import Highlight from "./highlight/highlight.mjs";
37
+ import { AREA_TYPE, HEADER_TYPE, CELL_TYPE } from "./highlight/constants.mjs";
37
38
  import SelectionRange from "./range.mjs";
38
39
  import { createObjectPropListener, mixin } from "./../helpers/object.mjs";
39
40
  import { isUndefined } from "./../helpers/mixed.mjs";
@@ -146,12 +147,6 @@ var Selection = /*#__PURE__*/function () {
146
147
  countCols: function countCols() {
147
148
  return _this.tableProps.countColsTranslated();
148
149
  },
149
- countRowHeaders: function countRowHeaders() {
150
- return _this.tableProps.countRowHeaders();
151
- },
152
- countColHeaders: function countColHeaders() {
153
- return _this.tableProps.countColHeaders();
154
- },
155
150
  visualToRenderableCoords: function visualToRenderableCoords(coords) {
156
151
  return _this.tableProps.visualToRenderableCoords(coords);
157
152
  },
@@ -336,9 +331,9 @@ var Selection = /*#__PURE__*/function () {
336
331
  }
337
332
 
338
333
  // Set up current selection.
339
- this.highlight.getFocus().clear();
340
- if (this.highlight.isEnabledFor(FOCUS_TYPE, cellRange.highlight)) {
341
- this.highlight.getFocus().add(this.selectedRange.current().highlight).commit().syncWith(cellRange);
334
+ this.highlight.getCell().clear();
335
+ if (this.highlight.isEnabledFor(CELL_TYPE, cellRange.highlight)) {
336
+ this.highlight.getCell().add(this.selectedRange.current().highlight).commit().syncWith(cellRange);
342
337
  }
343
338
  var layerLevel = this.getLayerLevel();
344
339
 
@@ -348,85 +343,64 @@ var Selection = /*#__PURE__*/function () {
348
343
  arrayEach(this.highlight.getAreas(), function (highlight) {
349
344
  return void highlight.clear();
350
345
  });
351
- arrayEach(this.highlight.getLayeredAreas(), function (highlight) {
352
- return void highlight.clear();
353
- });
354
- arrayEach(this.highlight.getRowHeaders(), function (highlight) {
355
- return void highlight.clear();
356
- });
357
- arrayEach(this.highlight.getColumnHeaders(), function (highlight) {
358
- return void highlight.clear();
359
- });
360
- arrayEach(this.highlight.getActiveRowHeaders(), function (highlight) {
361
- return void highlight.clear();
362
- });
363
- arrayEach(this.highlight.getActiveColumnHeaders(), function (highlight) {
364
- return void highlight.clear();
365
- });
366
- arrayEach(this.highlight.getRowHighlights(), function (highlight) {
346
+ arrayEach(this.highlight.getHeaders(), function (highlight) {
367
347
  return void highlight.clear();
368
348
  });
369
- arrayEach(this.highlight.getColumnHighlights(), function (highlight) {
349
+ arrayEach(this.highlight.getActiveHeaders(), function (highlight) {
370
350
  return void highlight.clear();
371
351
  });
372
352
  }
373
353
  this.highlight.useLayerLevel(layerLevel);
374
- var areaHighlight = this.highlight.createArea();
375
- var layeredAreaHighlight = this.highlight.createLayeredArea();
376
- var rowHeaderHighlight = this.highlight.createRowHeader();
377
- var columnHeaderHighlight = this.highlight.createColumnHeader();
378
- var activeRowHeaderHighlight = this.highlight.createActiveRowHeader();
379
- var activeColumnHeaderHighlight = this.highlight.createActiveColumnHeader();
380
- var rowHighlight = this.highlight.createRowHighlight();
381
- var columnHighlight = this.highlight.createColumnHighlight();
354
+ var areaHighlight = this.highlight.createOrGetArea();
355
+ var headerHighlight = this.highlight.createOrGetHeader();
356
+ var activeHeaderHighlight = this.highlight.createOrGetActiveHeader();
382
357
  areaHighlight.clear();
383
- layeredAreaHighlight.clear();
384
- rowHeaderHighlight.clear();
385
- columnHeaderHighlight.clear();
386
- activeRowHeaderHighlight.clear();
387
- activeColumnHeaderHighlight.clear();
388
- rowHighlight.clear();
389
- columnHighlight.clear();
358
+ headerHighlight.clear();
359
+ activeHeaderHighlight.clear();
390
360
  if (this.highlight.isEnabledFor(AREA_TYPE, cellRange.highlight) && (this.isMultiple() || layerLevel >= 1)) {
391
361
  areaHighlight.add(cellRange.from).add(cellRange.to).commit();
392
- layeredAreaHighlight.add(cellRange.from).add(cellRange.to).commit();
393
362
  if (layerLevel === 1) {
394
363
  // For single cell selection in the same layer, we do not create area selection to prevent blue background.
395
364
  // When non-consecutive selection is performed we have to add that missing area selection to the previous layer
396
365
  // based on previous coordinates. It only occurs when the previous selection wasn't select multiple cells.
397
366
  var previousRange = this.selectedRange.previous();
398
- this.highlight.useLayerLevel(layerLevel - 1);
399
- this.highlight.createArea().add(previousRange.from).commit()
400
- // Range may start with hidden indexes. Commit would not found start point (as we add just the `from` coords).
401
- .syncWith(previousRange);
402
- this.highlight.createLayeredArea().add(previousRange.from).commit()
367
+ this.highlight.useLayerLevel(layerLevel - 1).createOrGetArea().add(previousRange.from).commit()
403
368
  // Range may start with hidden indexes. Commit would not found start point (as we add just the `from` coords).
404
369
  .syncWith(previousRange);
405
370
  this.highlight.useLayerLevel(layerLevel);
406
371
  }
407
372
  }
408
373
  if (this.highlight.isEnabledFor(HEADER_TYPE, cellRange.highlight)) {
409
- var rowCoordsFrom = this.tableProps.createCellCoords(Math.max(cellRange.from.row, 0), -1);
410
- var rowCoordsTo = this.tableProps.createCellCoords(cellRange.to.row, -1);
411
- var columnCoordsFrom = this.tableProps.createCellCoords(-1, Math.max(cellRange.from.col, 0));
412
- var columnCoordsTo = this.tableProps.createCellCoords(-1, cellRange.to.col);
374
+ // The header selection generally contains cell selection. In a case when all rows (or columns)
375
+ // are hidden that visual coordinates are translated to renderable coordinates that do not exist.
376
+ // Hence no header highlight is generated. In that case, to make a column (or a row) header
377
+ // highlight, the row and column index has to point to the header (the negative value). See #7052.
378
+ var areAnyRowsRendered = this.tableProps.countRowsTranslated() === 0;
379
+ var areAnyColumnsRendered = this.tableProps.countColsTranslated() === 0;
380
+ var headerCellRange = cellRange;
381
+ if (areAnyRowsRendered || areAnyColumnsRendered) {
382
+ headerCellRange = cellRange.clone();
383
+ }
384
+ if (areAnyRowsRendered) {
385
+ headerCellRange.from.row = -1;
386
+ }
387
+ if (areAnyColumnsRendered) {
388
+ headerCellRange.from.col = -1;
389
+ }
413
390
  if (this.settings.selectionMode === 'single') {
414
- rowHeaderHighlight.add(rowCoordsFrom).commit();
415
- columnHeaderHighlight.add(columnCoordsFrom).commit();
416
- rowHighlight.add(rowCoordsFrom).commit();
417
- columnHighlight.add(columnCoordsFrom).commit();
391
+ if (this.isSelectedByAnyHeader()) {
392
+ headerCellRange.from.normalize();
393
+ }
394
+ headerHighlight.add(headerCellRange.from).commit();
418
395
  } else {
419
- rowHeaderHighlight.add(rowCoordsFrom).add(rowCoordsTo).commit();
420
- columnHeaderHighlight.add(columnCoordsFrom).add(columnCoordsTo).commit();
421
- rowHighlight.add(rowCoordsFrom).add(rowCoordsTo).commit();
422
- columnHighlight.add(columnCoordsFrom).add(columnCoordsTo).commit();
396
+ headerHighlight.add(headerCellRange.from).add(headerCellRange.to).commit();
423
397
  }
424
398
  if (this.isEntireRowSelected()) {
425
399
  var isRowSelected = this.tableProps.countCols() === cellRange.getWidth();
426
400
 
427
401
  // Make sure that the whole row is selected (in case where selectionMode is set to 'single')
428
402
  if (isRowSelected) {
429
- activeRowHeaderHighlight.add(this.tableProps.createCellCoords(cellRange.from.row, Math.min(-this.tableProps.countRowHeaders(), -1))).add(this.tableProps.createCellCoords(cellRange.to.row, -1)).commit();
403
+ activeHeaderHighlight.add(this.tableProps.createCellCoords(cellRange.from.row, -1)).add(this.tableProps.createCellCoords(cellRange.to.row, -1)).commit();
430
404
  }
431
405
  }
432
406
  if (this.isEntireColumnSelected()) {
@@ -434,7 +408,7 @@ var Selection = /*#__PURE__*/function () {
434
408
 
435
409
  // Make sure that the whole column is selected (in case where selectionMode is set to 'single')
436
410
  if (isColumnSelected) {
437
- activeColumnHeaderHighlight.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(), -1), cellRange.from.col)).add(this.tableProps.createCellCoords(-1, cellRange.to.col)).commit();
411
+ activeHeaderHighlight.add(this.tableProps.createCellCoords(-1, cellRange.from.col)).add(this.tableProps.createCellCoords(-1, cellRange.to.col)).commit();
438
412
  }
439
413
  }
440
414
  }
@@ -669,9 +643,7 @@ var Selection = /*#__PURE__*/function () {
669
643
  if (!includeRowHeaders && !includeColumnHeaders && (nrOfRows === 0 || nrOfColumns === 0)) {
670
644
  return;
671
645
  }
672
- var rowFrom = includeColumnHeaders ? -this.tableProps.countColHeaders() : 0;
673
- var columnFrom = includeRowHeaders ? -this.tableProps.countRowHeaders() : 0;
674
- var startCoords = this.tableProps.createCellCoords(rowFrom, columnFrom);
646
+ var startCoords = this.tableProps.createCellCoords(includeColumnHeaders ? -1 : 0, includeRowHeaders ? -1 : 0);
675
647
  var endCoords = this.tableProps.createCellCoords(nrOfRows - 1, nrOfColumns - 1);
676
648
  this.clear();
677
649
  this.setRangeStartOnly(startCoords);
@@ -805,29 +777,19 @@ var Selection = /*#__PURE__*/function () {
805
777
  if (!this.isSelected()) {
806
778
  return;
807
779
  }
808
- var focusHighlight = this.highlight.getFocus();
780
+ var cellHighlight = this.highlight.getCell();
809
781
  var currentLayer = this.getLayerLevel();
810
- focusHighlight.commit().syncWith(this.selectedRange.current());
782
+ cellHighlight.commit().syncWith(this.selectedRange.current());
811
783
 
812
784
  // Rewriting rendered ranges going through all layers.
813
785
  for (var layerLevel = 0; layerLevel < this.selectedRange.size(); layerLevel += 1) {
814
786
  this.highlight.useLayerLevel(layerLevel);
815
- var areaHighlight = this.highlight.createArea();
816
- var areaLayeredHighlight = this.highlight.createLayeredArea();
817
- var rowHeaderHighlight = this.highlight.createRowHeader();
818
- var columnHeaderHighlight = this.highlight.createColumnHeader();
819
- var activeRowHeaderHighlight = this.highlight.createActiveRowHeader();
820
- var activeColumnHeaderHighlight = this.highlight.createActiveColumnHeader();
821
- var rowHighlight = this.highlight.createRowHighlight();
822
- var columnHighlight = this.highlight.createColumnHighlight();
787
+ var areaHighlight = this.highlight.createOrGetArea();
788
+ var headerHighlight = this.highlight.createOrGetHeader();
789
+ var activeHeaderHighlight = this.highlight.createOrGetActiveHeader();
823
790
  areaHighlight.commit();
824
- areaLayeredHighlight.commit();
825
- rowHeaderHighlight.commit();
826
- columnHeaderHighlight.commit();
827
- activeRowHeaderHighlight.commit();
828
- activeColumnHeaderHighlight.commit();
829
- rowHighlight.commit();
830
- columnHighlight.commit();
791
+ headerHighlight.commit();
792
+ activeHeaderHighlight.commit();
831
793
  }
832
794
 
833
795
  // Reverting starting layer for the Highlight.
package/settings.d.ts CHANGED
@@ -144,7 +144,6 @@ export interface GridSettings extends Events {
144
144
  hiddenColumns?: HiddenColumnsSettings;
145
145
  hiddenRows?: HiddenRowsSettings;
146
146
  invalidCellClassName?: string;
147
- imeFastEdit?: boolean;
148
147
  isEmptyCol?: (this: Core, col: number) => boolean;
149
148
  isEmptyRow?: (this: Core, row: number) => boolean;
150
149
  label?: LabelOptions;
package/tableView.js CHANGED
@@ -58,98 +58,88 @@ var privatePool = new WeakMap();
58
58
  var _columnHeadersCount = /*#__PURE__*/new WeakMap();
59
59
  var _rowHeadersCount = /*#__PURE__*/new WeakMap();
60
60
  var TableView = /*#__PURE__*/function () {
61
- /**
62
- * Instance of {@link Handsontable}.
63
- *
64
- * @private
65
- * @type {Handsontable}
66
- */
67
-
68
- /**
69
- * Instance of {@link EventManager}.
70
- *
71
- * @private
72
- * @type {EventManager}
73
- */
74
-
75
- /**
76
- * Current Handsontable's GridSettings object.
77
- *
78
- * @private
79
- * @type {GridSettings}
80
- */
81
-
82
- /**
83
- * Main <THEAD> element.
84
- *
85
- * @private
86
- * @type {HTMLTableSectionElement}
87
- */
88
-
89
- /**
90
- * Main <TBODY> element.
91
- *
92
- * @private
93
- * @type {HTMLTableSectionElement}
94
- */
95
-
96
- /**
97
- * Main Walkontable instance.
98
- *
99
- * @private
100
- * @type {Walkontable}
101
- */
102
-
103
- /**
104
- * Main Walkontable instance.
105
- *
106
- * @private
107
- * @type {Walkontable}
108
- */
109
-
110
- /**
111
- * The total number of the column header renderers applied to the table through the
112
- * `afterGetColumnHeaderRenderers` hook.
113
- *
114
- * @type {number}
115
- */
116
-
117
- /**
118
- * The total number of the row header renderers applied to the table through the
119
- * `afterGetRowHeaderRenderers` hook.
120
- *
121
- * @type {number}
122
- */
123
-
124
- /**
125
- * The flag determines if the `adjustElementsSize` method call was made during
126
- * the render suspending. If true, the method has to be triggered once after render
127
- * resuming.
128
- *
129
- * @private
130
- * @type {boolean}
131
- */
132
-
133
61
  /**
134
62
  * @param {Hanstontable} instance Instance of {@link Handsontable}.
135
63
  */
136
64
  function TableView(instance) {
137
65
  _classCallCheck(this, TableView);
66
+ /**
67
+ * Instance of {@link Handsontable}.
68
+ *
69
+ * @private
70
+ * @type {Handsontable}
71
+ */
138
72
  _defineProperty(this, "instance", void 0);
73
+ /**
74
+ * Instance of {@link EventManager}.
75
+ *
76
+ * @private
77
+ * @type {EventManager}
78
+ */
139
79
  _defineProperty(this, "eventManager", void 0);
80
+ /**
81
+ * Current Handsontable's GridSettings object.
82
+ *
83
+ * @private
84
+ * @type {GridSettings}
85
+ */
140
86
  _defineProperty(this, "settings", void 0);
87
+ /**
88
+ * Main <THEAD> element.
89
+ *
90
+ * @private
91
+ * @type {HTMLTableSectionElement}
92
+ */
141
93
  _defineProperty(this, "THEAD", void 0);
94
+ /**
95
+ * Main <TBODY> element.
96
+ *
97
+ * @private
98
+ * @type {HTMLTableSectionElement}
99
+ */
142
100
  _defineProperty(this, "TBODY", void 0);
101
+ /**
102
+ * Main Walkontable instance.
103
+ *
104
+ * @private
105
+ * @type {Walkontable}
106
+ */
143
107
  _defineProperty(this, "_wt", void 0);
108
+ /**
109
+ * Main Walkontable instance.
110
+ *
111
+ * @private
112
+ * @type {Walkontable}
113
+ */
144
114
  _defineProperty(this, "activeWt", void 0);
115
+ /**
116
+ * The total number of the column header renderers applied to the table through the
117
+ * `afterGetColumnHeaderRenderers` hook.
118
+ *
119
+ * @type {number}
120
+ */
145
121
  _classPrivateFieldInitSpec(this, _columnHeadersCount, {
146
122
  writable: true,
147
123
  value: 0
148
124
  });
125
+ /**
126
+ * The total number of the row header renderers applied to the table through the
127
+ * `afterGetRowHeaderRenderers` hook.
128
+ *
129
+ * @type {number}
130
+ */
149
131
  _classPrivateFieldInitSpec(this, _rowHeadersCount, {
150
132
  writable: true,
151
133
  value: 0
152
134
  });
135
+ /**
136
+ * The flag determines if the `adjustElementsSize` method call was made during
137
+ * the render suspending. If true, the method has to be triggered once after render
138
+ * resuming.
139
+ *
140
+ * @private
141
+ * @type {boolean}
142
+ */
153
143
  _defineProperty(this, "postponedAdjustElementsSize", false);
154
144
  this.instance = instance;
155
145
  this.eventManager = new _eventManager.default(this.instance);
@@ -297,7 +287,6 @@ var TableView = /*#__PURE__*/function () {
297
287
  }, {
298
288
  key: "createElements",
299
289
  value: function createElements() {
300
- var _this$settings, _this$settings$data, _this$settings2, _this$settings2$data$;
301
290
  var priv = privatePool.get(this);
302
291
  var _this$instance = this.instance,
303
292
  rootElement = _this$instance.rootElement,
@@ -310,9 +299,6 @@ var TableView = /*#__PURE__*/function () {
310
299
  (0, _element.addClass)(rootElement, 'handsontable');
311
300
  priv.table = rootDocument.createElement('TABLE');
312
301
  (0, _element.addClass)(priv.table, 'htCore');
313
- priv.table.ariaRowCount = (_this$settings = this.settings) === null || _this$settings === void 0 ? void 0 : (_this$settings$data = _this$settings.data) === null || _this$settings$data === void 0 ? void 0 : _this$settings$data.length;
314
- priv.table.ariaColCount = (_this$settings2 = this.settings) === null || _this$settings2 === void 0 ? void 0 : (_this$settings2$data$ = _this$settings2.data[0]) === null || _this$settings2$data$ === void 0 ? void 0 : _this$settings2$data$.length;
315
- priv.table.setAttribute('role', 'treegrid');
316
302
  if (this.instance.getSettings().tableClassName) {
317
303
  (0, _element.addClass)(priv.table, this.instance.getSettings().tableClassName);
318
304
  }
@@ -897,29 +883,15 @@ var TableView = /*#__PURE__*/function () {
897
883
  },
898
884
  onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(renderableRow, headerLevel, highlightMeta) {
899
885
  var rowMapper = _this2.instance.rowIndexMapper;
900
- var areColumnHeadersSelected = renderableRow < 0;
901
- var visualRow = renderableRow;
902
- if (!areColumnHeadersSelected) {
903
- visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
904
- }
886
+ var visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
905
887
  var newVisualRow = _this2.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
906
- if (!areColumnHeadersSelected) {
907
- return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
908
- }
909
- return newVisualRow;
888
+ return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
910
889
  },
911
890
  onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(renderableColumn, headerLevel, highlightMeta) {
912
891
  var columnMapper = _this2.instance.columnIndexMapper;
913
- var areRowHeadersSelected = renderableColumn < 0;
914
- var visualColumn = renderableColumn;
915
- if (!areRowHeadersSelected) {
916
- visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
917
- }
892
+ var visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
918
893
  var newVisualColumn = _this2.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
919
- if (!areRowHeadersSelected) {
920
- return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
921
- }
922
- return newVisualColumn;
894
+ return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
923
895
  },
924
896
  onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {
925
897
  var cornersOfSelection;
package/tableView.mjs CHANGED
@@ -53,98 +53,88 @@ var privatePool = new WeakMap();
53
53
  var _columnHeadersCount = /*#__PURE__*/new WeakMap();
54
54
  var _rowHeadersCount = /*#__PURE__*/new WeakMap();
55
55
  var TableView = /*#__PURE__*/function () {
56
- /**
57
- * Instance of {@link Handsontable}.
58
- *
59
- * @private
60
- * @type {Handsontable}
61
- */
62
-
63
- /**
64
- * Instance of {@link EventManager}.
65
- *
66
- * @private
67
- * @type {EventManager}
68
- */
69
-
70
- /**
71
- * Current Handsontable's GridSettings object.
72
- *
73
- * @private
74
- * @type {GridSettings}
75
- */
76
-
77
- /**
78
- * Main <THEAD> element.
79
- *
80
- * @private
81
- * @type {HTMLTableSectionElement}
82
- */
83
-
84
- /**
85
- * Main <TBODY> element.
86
- *
87
- * @private
88
- * @type {HTMLTableSectionElement}
89
- */
90
-
91
- /**
92
- * Main Walkontable instance.
93
- *
94
- * @private
95
- * @type {Walkontable}
96
- */
97
-
98
- /**
99
- * Main Walkontable instance.
100
- *
101
- * @private
102
- * @type {Walkontable}
103
- */
104
-
105
- /**
106
- * The total number of the column header renderers applied to the table through the
107
- * `afterGetColumnHeaderRenderers` hook.
108
- *
109
- * @type {number}
110
- */
111
-
112
- /**
113
- * The total number of the row header renderers applied to the table through the
114
- * `afterGetRowHeaderRenderers` hook.
115
- *
116
- * @type {number}
117
- */
118
-
119
- /**
120
- * The flag determines if the `adjustElementsSize` method call was made during
121
- * the render suspending. If true, the method has to be triggered once after render
122
- * resuming.
123
- *
124
- * @private
125
- * @type {boolean}
126
- */
127
-
128
56
  /**
129
57
  * @param {Hanstontable} instance Instance of {@link Handsontable}.
130
58
  */
131
59
  function TableView(instance) {
132
60
  _classCallCheck(this, TableView);
61
+ /**
62
+ * Instance of {@link Handsontable}.
63
+ *
64
+ * @private
65
+ * @type {Handsontable}
66
+ */
133
67
  _defineProperty(this, "instance", void 0);
68
+ /**
69
+ * Instance of {@link EventManager}.
70
+ *
71
+ * @private
72
+ * @type {EventManager}
73
+ */
134
74
  _defineProperty(this, "eventManager", void 0);
75
+ /**
76
+ * Current Handsontable's GridSettings object.
77
+ *
78
+ * @private
79
+ * @type {GridSettings}
80
+ */
135
81
  _defineProperty(this, "settings", void 0);
82
+ /**
83
+ * Main <THEAD> element.
84
+ *
85
+ * @private
86
+ * @type {HTMLTableSectionElement}
87
+ */
136
88
  _defineProperty(this, "THEAD", void 0);
89
+ /**
90
+ * Main <TBODY> element.
91
+ *
92
+ * @private
93
+ * @type {HTMLTableSectionElement}
94
+ */
137
95
  _defineProperty(this, "TBODY", void 0);
96
+ /**
97
+ * Main Walkontable instance.
98
+ *
99
+ * @private
100
+ * @type {Walkontable}
101
+ */
138
102
  _defineProperty(this, "_wt", void 0);
103
+ /**
104
+ * Main Walkontable instance.
105
+ *
106
+ * @private
107
+ * @type {Walkontable}
108
+ */
139
109
  _defineProperty(this, "activeWt", void 0);
110
+ /**
111
+ * The total number of the column header renderers applied to the table through the
112
+ * `afterGetColumnHeaderRenderers` hook.
113
+ *
114
+ * @type {number}
115
+ */
140
116
  _classPrivateFieldInitSpec(this, _columnHeadersCount, {
141
117
  writable: true,
142
118
  value: 0
143
119
  });
120
+ /**
121
+ * The total number of the row header renderers applied to the table through the
122
+ * `afterGetRowHeaderRenderers` hook.
123
+ *
124
+ * @type {number}
125
+ */
144
126
  _classPrivateFieldInitSpec(this, _rowHeadersCount, {
145
127
  writable: true,
146
128
  value: 0
147
129
  });
130
+ /**
131
+ * The flag determines if the `adjustElementsSize` method call was made during
132
+ * the render suspending. If true, the method has to be triggered once after render
133
+ * resuming.
134
+ *
135
+ * @private
136
+ * @type {boolean}
137
+ */
148
138
  _defineProperty(this, "postponedAdjustElementsSize", false);
149
139
  this.instance = instance;
150
140
  this.eventManager = new EventManager(this.instance);
@@ -292,7 +282,6 @@ var TableView = /*#__PURE__*/function () {
292
282
  }, {
293
283
  key: "createElements",
294
284
  value: function createElements() {
295
- var _this$settings, _this$settings$data, _this$settings2, _this$settings2$data$;
296
285
  var priv = privatePool.get(this);
297
286
  var _this$instance = this.instance,
298
287
  rootElement = _this$instance.rootElement,
@@ -305,9 +294,6 @@ var TableView = /*#__PURE__*/function () {
305
294
  addClass(rootElement, 'handsontable');
306
295
  priv.table = rootDocument.createElement('TABLE');
307
296
  addClass(priv.table, 'htCore');
308
- priv.table.ariaRowCount = (_this$settings = this.settings) === null || _this$settings === void 0 ? void 0 : (_this$settings$data = _this$settings.data) === null || _this$settings$data === void 0 ? void 0 : _this$settings$data.length;
309
- priv.table.ariaColCount = (_this$settings2 = this.settings) === null || _this$settings2 === void 0 ? void 0 : (_this$settings2$data$ = _this$settings2.data[0]) === null || _this$settings2$data$ === void 0 ? void 0 : _this$settings2$data$.length;
310
- priv.table.setAttribute('role', 'treegrid');
311
297
  if (this.instance.getSettings().tableClassName) {
312
298
  addClass(priv.table, this.instance.getSettings().tableClassName);
313
299
  }
@@ -892,29 +878,15 @@ var TableView = /*#__PURE__*/function () {
892
878
  },
893
879
  onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(renderableRow, headerLevel, highlightMeta) {
894
880
  var rowMapper = _this2.instance.rowIndexMapper;
895
- var areColumnHeadersSelected = renderableRow < 0;
896
- var visualRow = renderableRow;
897
- if (!areColumnHeadersSelected) {
898
- visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
899
- }
881
+ var visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
900
882
  var newVisualRow = _this2.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
901
- if (!areColumnHeadersSelected) {
902
- return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
903
- }
904
- return newVisualRow;
883
+ return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
905
884
  },
906
885
  onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(renderableColumn, headerLevel, highlightMeta) {
907
886
  var columnMapper = _this2.instance.columnIndexMapper;
908
- var areRowHeadersSelected = renderableColumn < 0;
909
- var visualColumn = renderableColumn;
910
- if (!areRowHeadersSelected) {
911
- visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
912
- }
887
+ var visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
913
888
  var newVisualColumn = _this2.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
914
- if (!areRowHeadersSelected) {
915
- return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
916
- }
917
- return newVisualColumn;
889
+ return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
918
890
  },
919
891
  onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {
920
892
  var cornersOfSelection;