handsontable 0.0.0-next-b67ec03-20241118 → 0.0.0-next-164adf2-20241118

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 (106) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +2 -1
  2. package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
  5. package/3rdparty/walkontable/src/core/_base.js +0 -3
  6. package/3rdparty/walkontable/src/core/_base.mjs +0 -3
  7. package/3rdparty/walkontable/src/core/clone.js +0 -1
  8. package/3rdparty/walkontable/src/core/clone.mjs +0 -1
  9. package/3rdparty/walkontable/src/core/core.js +0 -2
  10. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  11. package/3rdparty/walkontable/src/facade/core.js +0 -3
  12. package/3rdparty/walkontable/src/facade/core.mjs +0 -3
  13. package/3rdparty/walkontable/src/index.js +1 -0
  14. package/3rdparty/walkontable/src/index.mjs +2 -2
  15. package/3rdparty/walkontable/src/overlay/_base.js +1 -3
  16. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -3
  17. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  21. package/3rdparty/walkontable/src/renderer/index.js +2 -4
  22. package/3rdparty/walkontable/src/renderer/index.mjs +2 -4
  23. package/3rdparty/walkontable/src/renderer/table.js +3 -12
  24. package/3rdparty/walkontable/src/renderer/table.mjs +3 -12
  25. package/3rdparty/walkontable/src/settings.js +2 -0
  26. package/3rdparty/walkontable/src/settings.mjs +2 -0
  27. package/3rdparty/walkontable/src/table.js +9 -17
  28. package/3rdparty/walkontable/src/table.mjs +9 -17
  29. package/3rdparty/walkontable/src/types.js +0 -1
  30. package/3rdparty/walkontable/src/types.mjs +0 -1
  31. package/3rdparty/walkontable/src/utils/column.js +1 -1
  32. package/3rdparty/walkontable/src/utils/column.mjs +1 -1
  33. package/3rdparty/walkontable/src/viewport.js +0 -1
  34. package/3rdparty/walkontable/src/viewport.mjs +0 -1
  35. package/base.js +2 -2
  36. package/base.mjs +2 -2
  37. package/core/hooks/constants.js +0 -9
  38. package/core/hooks/constants.mjs +0 -9
  39. package/core/hooks/index.d.ts +0 -1
  40. package/core.d.ts +0 -2
  41. package/core.js +0 -47
  42. package/core.mjs +0 -47
  43. package/dataMap/metaManager/metaSchema.js +3 -23
  44. package/dataMap/metaManager/metaSchema.mjs +3 -23
  45. package/dist/handsontable.css +9 -17
  46. package/dist/handsontable.full.css +240 -249
  47. package/dist/handsontable.full.js +4218 -4552
  48. package/dist/handsontable.full.min.css +9 -11
  49. package/dist/handsontable.full.min.js +53 -53
  50. package/dist/handsontable.js +3919 -4259
  51. package/dist/handsontable.min.css +4 -5
  52. package/dist/handsontable.min.js +24 -24
  53. package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
  54. package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
  55. package/editors/baseEditor/baseEditor.js +1 -1
  56. package/editors/baseEditor/baseEditor.mjs +1 -1
  57. package/editors/dateEditor/dateEditor.js +0 -9
  58. package/editors/dateEditor/dateEditor.mjs +1 -10
  59. package/editors/handsontableEditor/handsontableEditor.js +1 -7
  60. package/editors/handsontableEditor/handsontableEditor.mjs +1 -7
  61. package/editors/selectEditor/selectEditor.js +9 -20
  62. package/editors/selectEditor/selectEditor.mjs +9 -20
  63. package/editors/textEditor/textEditor.js +11 -4
  64. package/editors/textEditor/textEditor.mjs +11 -4
  65. package/helpers/dom/element.js +1 -32
  66. package/helpers/dom/element.mjs +1 -31
  67. package/helpers/mixed.js +2 -2
  68. package/helpers/mixed.mjs +2 -2
  69. package/package.json +3 -10
  70. package/plugins/comments/commentEditor.js +0 -9
  71. package/plugins/comments/commentEditor.mjs +0 -9
  72. package/plugins/comments/comments.js +0 -14
  73. package/plugins/comments/comments.mjs +1 -15
  74. package/plugins/contextMenu/menu/menu.js +4 -9
  75. package/plugins/contextMenu/menu/menu.mjs +4 -9
  76. package/plugins/filters/ui/multipleSelect.js +0 -6
  77. package/plugins/filters/ui/multipleSelect.mjs +0 -6
  78. package/plugins/manualRowMove/manualRowMove.js +1 -1
  79. package/plugins/manualRowMove/manualRowMove.mjs +1 -1
  80. package/plugins/manualRowResize/manualRowResize.js +2 -1
  81. package/plugins/manualRowResize/manualRowResize.mjs +3 -2
  82. package/plugins/mergeCells/mergeCells.js +1 -1
  83. package/plugins/mergeCells/mergeCells.mjs +1 -1
  84. package/plugins/nestedRows/ui/headers.js +1 -7
  85. package/plugins/nestedRows/ui/headers.mjs +1 -7
  86. package/plugins/stretchColumns/calculator.js +1 -2
  87. package/plugins/stretchColumns/calculator.mjs +2 -3
  88. package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
  89. package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
  90. package/settings.d.ts +0 -1
  91. package/tableView.js +0 -46
  92. package/tableView.mjs +1 -47
  93. package/utils/autoResize.js +1 -4
  94. package/utils/autoResize.mjs +1 -4
  95. package/utils/ghostTable.js +3 -5
  96. package/utils/ghostTable.mjs +3 -5
  97. package/3rdparty/walkontable/src/utils/stylesHandler.js +0 -287
  98. package/3rdparty/walkontable/src/utils/stylesHandler.mjs +0 -283
  99. package/helpers/themes.js +0 -17
  100. package/helpers/themes.mjs +0 -13
  101. package/styles/handsontable.css +0 -2166
  102. package/styles/handsontable.min.css +0 -30
  103. package/styles/ht-theme-horizon.css +0 -607
  104. package/styles/ht-theme-horizon.min.css +0 -30
  105. package/styles/ht-theme-main.css +0 -613
  106. package/styles/ht-theme-main.min.css +0 -30
@@ -379,7 +379,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
379
379
  let lastRowHeight = 0;
380
380
  let height = null;
381
381
  do {
382
- lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view.getDefaultRowHeight();
382
+ lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view._wt.getSetting('defaultRowHeight');
383
383
  tempHeight += lastRowHeight;
384
384
  i += 1;
385
385
  } while (tempHeight < spaceAvailable);
@@ -376,7 +376,7 @@ export class AutocompleteEditor extends HandsontableEditor {
376
376
  let lastRowHeight = 0;
377
377
  let height = null;
378
378
  do {
379
- lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view.getDefaultRowHeight();
379
+ lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view._wt.getSetting('defaultRowHeight');
380
380
  tempHeight += lastRowHeight;
381
381
  i += 1;
382
382
  } while (tempHeight < spaceAvailable);
@@ -492,7 +492,7 @@ class BaseEditor {
492
492
  const actualVerticalScrollbarWidth = (0, _element.hasVerticalScrollbar)(scrollableContainerTop) ? scrollbarWidth : 0;
493
493
  const actualHorizontalScrollbarWidth = (0, _element.hasHorizontalScrollbar)(scrollableContainerLeft) ? scrollbarWidth : 0;
494
494
  const maxWidth = this.hot.view.maximumVisibleElementWidth(cellStartOffset) - actualVerticalScrollbarWidth + inlineStartBorderCompensation;
495
- const maxHeight = Math.max(this.hot.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth + topBorderCompensation, this.hot.view.getDefaultRowHeight());
495
+ const maxHeight = Math.max(this.hot.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth + topBorderCompensation, 23);
496
496
  return {
497
497
  top: topPos,
498
498
  start: inlineStartPos,
@@ -488,7 +488,7 @@ export class BaseEditor {
488
488
  const actualVerticalScrollbarWidth = hasVerticalScrollbar(scrollableContainerTop) ? scrollbarWidth : 0;
489
489
  const actualHorizontalScrollbarWidth = hasHorizontalScrollbar(scrollableContainerLeft) ? scrollbarWidth : 0;
490
490
  const maxWidth = this.hot.view.maximumVisibleElementWidth(cellStartOffset) - actualVerticalScrollbarWidth + inlineStartBorderCompensation;
491
- const maxHeight = Math.max(this.hot.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth + topBorderCompensation, this.hot.view.getDefaultRowHeight());
491
+ const maxHeight = Math.max(this.hot.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth + topBorderCompensation, 23);
492
492
  return {
493
493
  top: topPos,
494
494
  start: inlineStartPos,
@@ -52,12 +52,6 @@ class DateEditor extends _textEditor.TextEditor {
52
52
  this.parentDestroyed = true;
53
53
  this.destroyElements();
54
54
  });
55
- this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
56
- if (!firstRun) {
57
- (0, _element.removeClass)(this.datePicker, /ht-theme-.*/g);
58
- (0, _element.addClass)(this.datePicker, themeName);
59
- }
60
- });
61
55
  }
62
56
 
63
57
  /**
@@ -73,9 +67,6 @@ class DateEditor extends _textEditor.TextEditor {
73
67
  this.datePickerStyle.zIndex = 9999;
74
68
  this.datePicker.setAttribute('dir', this.hot.isRtl() ? 'rtl' : 'ltr');
75
69
  (0, _element.addClass)(this.datePicker, 'htDatepickerHolder');
76
- const themeClassName = this.hot.getCurrentThemeName();
77
- (0, _element.removeClass)(this.datePicker, /ht-theme-.*/g);
78
- (0, _element.addClass)(this.datePicker, themeClassName);
79
70
  this.hot.rootDocument.body.appendChild(this.datePicker);
80
71
 
81
72
  /**
@@ -6,7 +6,7 @@ import moment from 'moment';
6
6
  import Pikaday from '@handsontable/pikaday';
7
7
  import { EDITOR_STATE } from "../baseEditor/index.mjs";
8
8
  import { TextEditor } from "../textEditor/index.mjs";
9
- import { addClass, removeClass, hasClass, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
9
+ import { addClass, hasClass, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
10
10
  import { deepExtend } from "../../helpers/object.mjs";
11
11
  import { isFunctionKey } from "../../helpers/unicode.mjs";
12
12
  export const EDITOR_TYPE = 'date';
@@ -48,12 +48,6 @@ export class DateEditor extends TextEditor {
48
48
  this.parentDestroyed = true;
49
49
  this.destroyElements();
50
50
  });
51
- this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
52
- if (!firstRun) {
53
- removeClass(this.datePicker, /ht-theme-.*/g);
54
- addClass(this.datePicker, themeName);
55
- }
56
- });
57
51
  }
58
52
 
59
53
  /**
@@ -69,9 +63,6 @@ export class DateEditor extends TextEditor {
69
63
  this.datePickerStyle.zIndex = 9999;
70
64
  this.datePicker.setAttribute('dir', this.hot.isRtl() ? 'rtl' : 'ltr');
71
65
  addClass(this.datePicker, 'htDatepickerHolder');
72
- const themeClassName = this.hot.getCurrentThemeName();
73
- removeClass(this.datePicker, /ht-theme-.*/g);
74
- addClass(this.datePicker, themeClassName);
75
66
  this.hot.rootDocument.body.appendChild(this.datePicker);
76
67
 
77
68
  /**
@@ -89,7 +89,6 @@ class HandsontableEditor extends _textEditor.TextEditor {
89
89
  autoWrapCol: false,
90
90
  autoWrapRow: false,
91
91
  ariaTags: false,
92
- themeName: this.hot.getCurrentThemeName(),
93
92
  afterOnCellMouseDown(_, coords) {
94
93
  const sourceValue = this.getSourceData(coords.row, coords.col);
95
94
 
@@ -163,7 +162,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
163
162
  * @returns {number}
164
163
  */
165
164
  getHeight() {
166
- return this.htEditor.view.getTableHeight() + 1;
165
+ return this.htEditor.view.getTableHeight();
167
166
  }
168
167
 
169
168
  /**
@@ -187,11 +186,6 @@ class HandsontableEditor extends _textEditor.TextEditor {
187
186
  this.htEditor.destroy();
188
187
  }
189
188
  });
190
- this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
191
- if (!firstRun) {
192
- this.htEditor.useTheme(themeName);
193
- }
194
- });
195
189
  }
196
190
 
197
191
  /**
@@ -86,7 +86,6 @@ export class HandsontableEditor extends TextEditor {
86
86
  autoWrapCol: false,
87
87
  autoWrapRow: false,
88
88
  ariaTags: false,
89
- themeName: this.hot.getCurrentThemeName(),
90
89
  afterOnCellMouseDown(_, coords) {
91
90
  const sourceValue = this.getSourceData(coords.row, coords.col);
92
91
 
@@ -160,7 +159,7 @@ export class HandsontableEditor extends TextEditor {
160
159
  * @returns {number}
161
160
  */
162
161
  getHeight() {
163
- return this.htEditor.view.getTableHeight() + 1;
162
+ return this.htEditor.view.getTableHeight();
164
163
  }
165
164
 
166
165
  /**
@@ -184,11 +183,6 @@ export class HandsontableEditor extends TextEditor {
184
183
  this.htEditor.destroy();
185
184
  }
186
185
  });
187
- this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
188
- if (!firstRun) {
189
- this.htEditor.useTheme(themeName);
190
- }
191
- });
192
186
  }
193
187
 
194
188
  /**
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  var _baseEditor = require("../baseEditor");
5
5
  var _element = require("../../helpers/dom/element");
6
6
  var _object = require("../../helpers/object");
7
- var _a11y = require("../../helpers/a11y");
8
7
  const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
9
8
  const SHORTCUTS_GROUP = 'selectEditor';
10
9
  const EDITOR_TYPE = exports.EDITOR_TYPE = 'select';
@@ -22,21 +21,11 @@ class SelectEditor extends _baseEditor.BaseEditor {
22
21
  * Initializes editor instance, DOM Element and mount hooks.
23
22
  */
24
23
  init() {
25
- this.selectWrapper = this.hot.rootDocument.createElement('div');
26
24
  this.select = this.hot.rootDocument.createElement('select');
27
25
  this.select.setAttribute('data-hot-input', 'true');
28
- this.selectWrapper.style.display = 'none';
29
- const ARROW = this.hot.rootDocument.createElement('DIV');
30
- const isAriaEnabled = this.hot.getSettings().ariaTags;
31
- ARROW.className = 'htAutocompleteArrow';
32
- if (isAriaEnabled) {
33
- ARROW.setAttribute(...(0, _a11y.A11Y_HIDDEN)());
34
- }
35
- ARROW.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660)));
36
- (0, _element.addClass)(this.selectWrapper, 'htSelectEditor');
37
- this.selectWrapper.appendChild(this.select);
38
- this.selectWrapper.insertBefore(ARROW, this.selectWrapper.firstChild);
39
- this.hot.rootElement.appendChild(this.selectWrapper);
26
+ this.select.style.display = 'none';
27
+ (0, _element.addClass)(this.select, 'htSelectEditor');
28
+ this.hot.rootElement.appendChild(this.select);
40
29
  this.registerHooks();
41
30
  }
42
31
 
@@ -64,7 +53,7 @@ class SelectEditor extends _baseEditor.BaseEditor {
64
53
  open() {
65
54
  this._opened = true;
66
55
  this.refreshDimensions();
67
- this.selectWrapper.style.display = '';
56
+ this.select.style.display = '';
68
57
  const shortcutManager = this.hot.getShortcutManager();
69
58
  shortcutManager.setActiveContextName('editor');
70
59
  this.registerShortcuts();
@@ -75,9 +64,9 @@ class SelectEditor extends _baseEditor.BaseEditor {
75
64
  */
76
65
  close() {
77
66
  this._opened = false;
78
- this.selectWrapper.style.display = 'none';
79
- if ((0, _element.hasClass)(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME)) {
80
- (0, _element.removeClass)(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
67
+ this.select.style.display = 'none';
68
+ if ((0, _element.hasClass)(this.select, EDITOR_VISIBLE_CLASS_NAME)) {
69
+ (0, _element.removeClass)(this.select, EDITOR_VISIBLE_CLASS_NAME);
81
70
  }
82
71
  this.unregisterShortcuts();
83
72
  this.clearHooks();
@@ -183,13 +172,13 @@ class SelectEditor extends _baseEditor.BaseEditor {
183
172
  width,
184
173
  height
185
174
  } = this.getEditedCellRect();
186
- const selectStyle = this.selectWrapper.style;
175
+ const selectStyle = this.select.style;
187
176
  selectStyle.height = `${height}px`;
188
177
  selectStyle.width = `${width}px`;
189
178
  selectStyle.top = `${top}px`;
190
179
  selectStyle[this.hot.isRtl() ? 'right' : 'left'] = `${start}px`;
191
180
  selectStyle.margin = '0px';
192
- (0, _element.addClass)(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
181
+ (0, _element.addClass)(this.select, EDITOR_VISIBLE_CLASS_NAME);
193
182
  }
194
183
 
195
184
  /**
@@ -1,7 +1,6 @@
1
1
  import { BaseEditor, EDITOR_STATE } from "../baseEditor/index.mjs";
2
2
  import { addClass, empty, fastInnerHTML, hasClass, removeClass } from "../../helpers/dom/element.mjs";
3
3
  import { objectEach } from "../../helpers/object.mjs";
4
- import { A11Y_HIDDEN } from "../../helpers/a11y.mjs";
5
4
  const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
6
5
  const SHORTCUTS_GROUP = 'selectEditor';
7
6
  export const EDITOR_TYPE = 'select';
@@ -19,21 +18,11 @@ export class SelectEditor extends BaseEditor {
19
18
  * Initializes editor instance, DOM Element and mount hooks.
20
19
  */
21
20
  init() {
22
- this.selectWrapper = this.hot.rootDocument.createElement('div');
23
21
  this.select = this.hot.rootDocument.createElement('select');
24
22
  this.select.setAttribute('data-hot-input', 'true');
25
- this.selectWrapper.style.display = 'none';
26
- const ARROW = this.hot.rootDocument.createElement('DIV');
27
- const isAriaEnabled = this.hot.getSettings().ariaTags;
28
- ARROW.className = 'htAutocompleteArrow';
29
- if (isAriaEnabled) {
30
- ARROW.setAttribute(...A11Y_HIDDEN());
31
- }
32
- ARROW.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660)));
33
- addClass(this.selectWrapper, 'htSelectEditor');
34
- this.selectWrapper.appendChild(this.select);
35
- this.selectWrapper.insertBefore(ARROW, this.selectWrapper.firstChild);
36
- this.hot.rootElement.appendChild(this.selectWrapper);
23
+ this.select.style.display = 'none';
24
+ addClass(this.select, 'htSelectEditor');
25
+ this.hot.rootElement.appendChild(this.select);
37
26
  this.registerHooks();
38
27
  }
39
28
 
@@ -61,7 +50,7 @@ export class SelectEditor extends BaseEditor {
61
50
  open() {
62
51
  this._opened = true;
63
52
  this.refreshDimensions();
64
- this.selectWrapper.style.display = '';
53
+ this.select.style.display = '';
65
54
  const shortcutManager = this.hot.getShortcutManager();
66
55
  shortcutManager.setActiveContextName('editor');
67
56
  this.registerShortcuts();
@@ -72,9 +61,9 @@ export class SelectEditor extends BaseEditor {
72
61
  */
73
62
  close() {
74
63
  this._opened = false;
75
- this.selectWrapper.style.display = 'none';
76
- if (hasClass(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME)) {
77
- removeClass(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
64
+ this.select.style.display = 'none';
65
+ if (hasClass(this.select, EDITOR_VISIBLE_CLASS_NAME)) {
66
+ removeClass(this.select, EDITOR_VISIBLE_CLASS_NAME);
78
67
  }
79
68
  this.unregisterShortcuts();
80
69
  this.clearHooks();
@@ -180,13 +169,13 @@ export class SelectEditor extends BaseEditor {
180
169
  width,
181
170
  height
182
171
  } = this.getEditedCellRect();
183
- const selectStyle = this.selectWrapper.style;
172
+ const selectStyle = this.select.style;
184
173
  selectStyle.height = `${height}px`;
185
174
  selectStyle.width = `${width}px`;
186
175
  selectStyle.top = `${top}px`;
187
176
  selectStyle[this.hot.isRtl() ? 'right' : 'left'] = `${start}px`;
188
177
  selectStyle.margin = '0px';
189
- addClass(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
178
+ addClass(this.select, EDITOR_VISIBLE_CLASS_NAME);
190
179
  }
191
180
 
192
181
  /**
@@ -309,12 +309,19 @@ class TextEditor extends _baseEditor.BaseEditor {
309
309
  this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;
310
310
  this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;
311
311
  this.TEXTAREA.style.backgroundColor = this.TD.style.backgroundColor;
312
+ const textareaComputedStyle = this.hot.rootWindow.getComputedStyle(this.TEXTAREA);
313
+ const horizontalPadding = parseInt(textareaComputedStyle.paddingLeft, 10) + parseInt(textareaComputedStyle.paddingRight, 10);
314
+ const verticalPadding = parseInt(textareaComputedStyle.paddingTop, 10) + parseInt(textareaComputedStyle.paddingBottom, 10);
315
+ const finalWidth = width - horizontalPadding;
316
+ const finalHeight = height - verticalPadding;
317
+ const finalMaxWidth = maxWidth - horizontalPadding;
318
+ const finalMaxHeight = maxHeight - verticalPadding;
312
319
  this.autoResize.init(this.TEXTAREA, {
313
- minWidth: Math.min(width, maxWidth),
314
- minHeight: Math.min(height, maxHeight),
320
+ minWidth: Math.min(finalWidth, finalMaxWidth),
321
+ minHeight: Math.min(finalHeight, finalMaxHeight),
315
322
  // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)
316
- maxWidth,
317
- maxHeight
323
+ maxWidth: finalMaxWidth,
324
+ maxHeight: finalMaxHeight
318
325
  }, true);
319
326
  }
320
327
 
@@ -305,12 +305,19 @@ export class TextEditor extends BaseEditor {
305
305
  this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;
306
306
  this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;
307
307
  this.TEXTAREA.style.backgroundColor = this.TD.style.backgroundColor;
308
+ const textareaComputedStyle = this.hot.rootWindow.getComputedStyle(this.TEXTAREA);
309
+ const horizontalPadding = parseInt(textareaComputedStyle.paddingLeft, 10) + parseInt(textareaComputedStyle.paddingRight, 10);
310
+ const verticalPadding = parseInt(textareaComputedStyle.paddingTop, 10) + parseInt(textareaComputedStyle.paddingBottom, 10);
311
+ const finalWidth = width - horizontalPadding;
312
+ const finalHeight = height - verticalPadding;
313
+ const finalMaxWidth = maxWidth - horizontalPadding;
314
+ const finalMaxHeight = maxHeight - verticalPadding;
308
315
  this.autoResize.init(this.TEXTAREA, {
309
- minWidth: Math.min(width, maxWidth),
310
- minHeight: Math.min(height, maxHeight),
316
+ minWidth: Math.min(finalWidth, finalMaxWidth),
317
+ minHeight: Math.min(finalHeight, finalMaxHeight),
311
318
  // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)
312
- maxWidth,
313
- maxHeight
319
+ maxWidth: finalMaxWidth,
320
+ maxHeight: finalMaxHeight
314
321
  }, true);
315
322
  }
316
323
 
@@ -9,7 +9,6 @@ exports.closestDown = closestDown;
9
9
  exports.empty = empty;
10
10
  exports.fastInnerHTML = fastInnerHTML;
11
11
  exports.fastInnerText = fastInnerText;
12
- exports.findFirstParentWithClass = findFirstParentWithClass;
13
12
  exports.getCaretPosition = getCaretPosition;
14
13
  exports.getCssTransform = getCssTransform;
15
14
  exports.getFrameElement = getFrameElement;
@@ -198,36 +197,6 @@ function closestDown(element, nodes, until) {
198
197
  return length ? matched[length - 1] : null;
199
198
  }
200
199
 
201
- /**
202
- * Traverses up the DOM tree from the given element and finds parent elements that have a specified class name
203
- * or match a provided class name regular expression.
204
- *
205
- * @param {HTMLElement} element - The element from which to start traversing.
206
- * @param {string|RegExp} className - The class name or class name regular expression to check.
207
- * @returns {{element: HTMLElement, classNames: string[]}} - Returns an object containing the matched parent element and an array of matched class names.
208
- */
209
- function findFirstParentWithClass(element, className) {
210
- const matched = {
211
- element: undefined,
212
- classNames: []
213
- };
214
- let elementToCheck = element;
215
- while (elementToCheck !== null && elementToCheck !== element.ownerDocument.documentElement && !matched.element) {
216
- if (typeof className === 'string' && elementToCheck.classList.contains(className)) {
217
- matched.element = elementToCheck;
218
- matched.classNames.push(className);
219
- } else if (className instanceof RegExp) {
220
- const matchingClasses = Array.from(elementToCheck.classList).filter(cls => className.test(cls));
221
- if (matchingClasses.length) {
222
- matched.element = elementToCheck;
223
- matched.classNames.push(...matchingClasses);
224
- }
225
- }
226
- elementToCheck = elementToCheck.parentElement;
227
- }
228
- return matched;
229
- }
230
-
231
200
  /**
232
201
  * Goes up the DOM tree and checks if element is child of another element.
233
202
  *
@@ -365,7 +334,7 @@ function addClass(element, className) {
365
334
  * Remove class name from an element.
366
335
  *
367
336
  * @param {HTMLElement} element An element to process.
368
- * @param {string|RegExp|Array<string|RegExp>} className Class name as string or array of strings.
337
+ * @param {string|Array<string|RegExp>} className Class name as string or array of strings.
369
338
  */
370
339
  function removeClass(element, className) {
371
340
  if (typeof className === 'string') {
@@ -138,36 +138,6 @@ export function closestDown(element, nodes, until) {
138
138
  return length ? matched[length - 1] : null;
139
139
  }
140
140
 
141
- /**
142
- * Traverses up the DOM tree from the given element and finds parent elements that have a specified class name
143
- * or match a provided class name regular expression.
144
- *
145
- * @param {HTMLElement} element - The element from which to start traversing.
146
- * @param {string|RegExp} className - The class name or class name regular expression to check.
147
- * @returns {{element: HTMLElement, classNames: string[]}} - Returns an object containing the matched parent element and an array of matched class names.
148
- */
149
- export function findFirstParentWithClass(element, className) {
150
- const matched = {
151
- element: undefined,
152
- classNames: []
153
- };
154
- let elementToCheck = element;
155
- while (elementToCheck !== null && elementToCheck !== element.ownerDocument.documentElement && !matched.element) {
156
- if (typeof className === 'string' && elementToCheck.classList.contains(className)) {
157
- matched.element = elementToCheck;
158
- matched.classNames.push(className);
159
- } else if (className instanceof RegExp) {
160
- const matchingClasses = Array.from(elementToCheck.classList).filter(cls => className.test(cls));
161
- if (matchingClasses.length) {
162
- matched.element = elementToCheck;
163
- matched.classNames.push(...matchingClasses);
164
- }
165
- }
166
- elementToCheck = elementToCheck.parentElement;
167
- }
168
- return matched;
169
- }
170
-
171
141
  /**
172
142
  * Goes up the DOM tree and checks if element is child of another element.
173
143
  *
@@ -305,7 +275,7 @@ export function addClass(element, className) {
305
275
  * Remove class name from an element.
306
276
  *
307
277
  * @param {HTMLElement} element An element to process.
308
- * @param {string|RegExp|Array<string|RegExp>} className Class name as string or array of strings.
278
+ * @param {string|Array<string|RegExp>} className Class name as string or array of strings.
309
279
  */
310
280
  export function removeClass(element, className) {
311
281
  if (typeof className === 'string') {
package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-b67ec03-20241118";
137
+ const hotVersion = "0.0.0-next-164adf2-20241118";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
@@ -188,7 +188,7 @@ function _injectProductInfo(key, element) {
188
188
  });
189
189
  if (message) {
190
190
  const messageNode = document.createElement('div');
191
- messageNode.className = 'handsontable hot-display-license-info';
191
+ messageNode.className = 'hot-display-license-info';
192
192
  messageNode.innerHTML = domMessages[domMessageState]({
193
193
  keyValidityDate,
194
194
  hotVersion
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-b67ec03-20241118";
127
+ const hotVersion = "0.0.0-next-164adf2-20241118";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
@@ -178,7 +178,7 @@ export function _injectProductInfo(key, element) {
178
178
  });
179
179
  if (message) {
180
180
  const messageNode = document.createElement('div');
181
- messageNode.className = 'handsontable hot-display-license-info';
181
+ messageNode.className = 'hot-display-license-info';
182
182
  messageNode.innerHTML = domMessages[domMessageState]({
183
183
  keyValidityDate,
184
184
  hotVersion
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-b67ec03-20241118",
13
+ "version": "0.0.0-next-164adf2-20241118",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -48,6 +48,7 @@
48
48
  "@babel/register": "^7.8.3",
49
49
  "@babel/runtime": "^7.11.2",
50
50
  "@babel/types": "^7.12.12",
51
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
51
52
  "babel-jest": "^26.6.3",
52
53
  "babel-loader": "^8.0.4",
53
54
  "babel-plugin-forbidden-imports": "^0.1.2",
@@ -91,10 +92,8 @@
91
92
  "string-replace-loader": "^3.1.0",
92
93
  "stylelint": "^16.3.1",
93
94
  "typescript": "3.8.2",
94
- "@typescript-eslint/eslint-plugin": "^4.33.0",
95
95
  "webpack": "^5.88.1",
96
- "webpack-cli": "^5.1.4",
97
- "webpack-remove-empty-scripts": "^1.0.4"
96
+ "webpack-cli": "^5.1.4"
98
97
  },
99
98
  "optionalDependencies": {
100
99
  "hyperformula": "^2.6.2"
@@ -771,12 +770,6 @@
771
770
  "./dist/languages/zh-CN.min.js": "./dist/languages/zh-CN.min.js",
772
771
  "./dist/languages/zh-TW.js": "./dist/languages/zh-TW.js",
773
772
  "./dist/languages/zh-TW.min.js": "./dist/languages/zh-TW.min.js",
774
- "./styles/handsontable.css": "./styles/handsontable.css",
775
- "./styles/handsontable.min.css": "./styles/handsontable.min.css",
776
- "./styles/ht-theme-horizon.css": "./styles/ht-theme-horizon.css",
777
- "./styles/ht-theme-horizon.min.css": "./styles/ht-theme-horizon.min.css",
778
- "./styles/ht-theme-main.css": "./styles/ht-theme-main.css",
779
- "./styles/ht-theme-main.min.css": "./styles/ht-theme-main.min.css",
780
773
  ".": {
781
774
  "types": "./index.d.ts",
782
775
  "import": "./index.mjs",
@@ -241,15 +241,6 @@ class CommentEditor {
241
241
  return _classPrivateFieldGet(_editor, this).querySelector(`.${CommentEditor.CLASS_INPUT}`);
242
242
  }
243
243
 
244
- /**
245
- * Get the editor element.
246
- *
247
- * @returns {HTMLElement} The editor element.
248
- */
249
- getEditorElement() {
250
- return _classPrivateFieldGet(_editor, this);
251
- }
252
-
253
244
  /**
254
245
  * Destroy the comments editor.
255
246
  */
@@ -237,15 +237,6 @@ class CommentEditor {
237
237
  return _classPrivateFieldGet(_editor, this).querySelector(`.${CommentEditor.CLASS_INPUT}`);
238
238
  }
239
239
 
240
- /**
241
- * Get the editor element.
242
- *
243
- * @returns {HTMLElement} The editor element.
244
- */
245
- getEditorElement() {
246
- return _classPrivateFieldGet(_editor, this);
247
- }
248
-
249
240
  /**
250
241
  * Destroy the comments editor.
251
242
  */
@@ -234,12 +234,6 @@ class Comments extends _base.BasePlugin {
234
234
  this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
235
235
  this.addHook('afterBeginEditing', () => this.hide());
236
236
  this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
237
- this.addHook('afterSetTheme', function () {
238
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
239
- args[_key2] = arguments[_key2];
240
- }
241
- return _assertClassBrand(_Comments_brand, _this, _updateEditorThemeClassName).call(_this, ...args);
242
- });
243
237
  _classPrivateFieldGet(_displaySwitch, this).addLocalHook('hide', () => this.hide());
244
238
  _classPrivateFieldGet(_displaySwitch, this).addLocalHook('show', (row, col) => this.showAtCell(row, col));
245
239
  this.registerShortcuts();
@@ -794,12 +788,4 @@ function _onAfterScroll() {
794
788
  if (!_classPrivateFieldGet(_preventEditorHiding, this)) {
795
789
  this.hide();
796
790
  }
797
- }
798
- /**
799
- * Updates the editor theme class name.
800
- */
801
- function _updateEditorThemeClassName() {
802
- const editorElement = _classPrivateFieldGet(_editor, this).getEditorElement();
803
- (0, _element.removeClass)(editorElement, /ht-theme-.*/g);
804
- (0, _element.addClass)(editorElement, this.hot.getCurrentThemeName());
805
791
  }
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
9
9
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
10
10
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
11
11
  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"); }
12
- import { addClass, removeClass, closest, isChildOf, hasClass, outerHeight } from "../../helpers/dom/element.mjs";
12
+ import { addClass, closest, isChildOf, hasClass, outerHeight } from "../../helpers/dom/element.mjs";
13
13
  import { stopImmediatePropagation } from "../../helpers/dom/event.mjs";
14
14
  import { deepClone, deepExtend } from "../../helpers/object.mjs";
15
15
  import { BasePlugin } from "../base/index.mjs";
@@ -230,12 +230,6 @@ export class Comments extends BasePlugin {
230
230
  this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
231
231
  this.addHook('afterBeginEditing', () => this.hide());
232
232
  this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
233
- this.addHook('afterSetTheme', function () {
234
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
235
- args[_key2] = arguments[_key2];
236
- }
237
- return _assertClassBrand(_Comments_brand, _this, _updateEditorThemeClassName).call(_this, ...args);
238
- });
239
233
  _classPrivateFieldGet(_displaySwitch, this).addLocalHook('hide', () => this.hide());
240
234
  _classPrivateFieldGet(_displaySwitch, this).addLocalHook('show', (row, col) => this.showAtCell(row, col));
241
235
  this.registerShortcuts();
@@ -789,12 +783,4 @@ function _onAfterScroll() {
789
783
  if (!_classPrivateFieldGet(_preventEditorHiding, this)) {
790
784
  this.hide();
791
785
  }
792
- }
793
- /**
794
- * Updates the editor theme class name.
795
- */
796
- function _updateEditorThemeClassName() {
797
- const editorElement = _classPrivateFieldGet(_editor, this).getEditorElement();
798
- removeClass(editorElement, /ht-theme-.*/g);
799
- addClass(editorElement, this.hot.getCurrentThemeName());
800
786
  }
@@ -162,12 +162,6 @@ class Menu {
162
162
  return _this.parentMenu.runLocalHooks('afterSelectionChange', ...args);
163
163
  });
164
164
  }
165
- this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
166
- if (!firstRun) {
167
- var _this$hotMenu;
168
- (_this$hotMenu = this.hotMenu) === null || _this$hotMenu === void 0 || _this$hotMenu.useTheme(themeName);
169
- }
170
- });
171
165
  }
172
166
 
173
167
  /**
@@ -292,7 +286,6 @@ class Menu {
292
286
  disableVisualSelection: 'area',
293
287
  layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
294
288
  ariaTags: false,
295
- themeName: this.hot.getCurrentThemeName(),
296
289
  beforeOnCellMouseOver: (event, coords) => {
297
290
  _classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
298
291
  },
@@ -586,8 +579,10 @@ class Menu {
586
579
  const currentRowHeight = itemCell ? (0, _element.outerHeight)(this.hotMenu.getCell(index, 0)) : 0;
587
580
  return accumulator + (value.name === _predefinedItems.SEPARATOR ? 1 : currentRowHeight);
588
581
  }, 0);
589
- holderStyle.width = `${currentHiderWidth}px`;
590
- holderStyle.height = `${realHeight}px`;
582
+
583
+ // Additional 3px to menu's size because of additional border around its `table.htCore`.
584
+ holderStyle.width = `${currentHiderWidth + 3}px`;
585
+ holderStyle.height = `${realHeight + 3}px`;
591
586
  hiderStyle.height = holderStyle.height;
592
587
  }
593
588