handsontable 0.0.0-next-3a00df6-20241001 → 0.0.0-next-a9e3646-20241001

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 (96) hide show
  1. package/3rdparty/walkontable/src/selection/manager.js +7 -7
  2. package/3rdparty/walkontable/src/selection/manager.mjs +7 -7
  3. package/3rdparty/walkontable/src/selection/scanner.js +7 -7
  4. package/3rdparty/walkontable/src/selection/scanner.mjs +7 -7
  5. package/CHANGELOG.md +0 -29
  6. package/base.js +2 -2
  7. package/base.mjs +2 -2
  8. package/core.js +18 -7
  9. package/core.mjs +18 -7
  10. package/dataMap/metaManager/lazyFactoryMap.js +7 -7
  11. package/dataMap/metaManager/lazyFactoryMap.mjs +7 -7
  12. package/dataMap/metaManager/metaSchema.js +17 -0
  13. package/dataMap/metaManager/metaSchema.mjs +19 -2
  14. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -7
  15. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -7
  16. package/dataMap/metaManager/mods/extendMetaProperties.js +7 -7
  17. package/dataMap/metaManager/mods/extendMetaProperties.mjs +7 -7
  18. package/dataMap/metaManager/utils.js +7 -7
  19. package/dataMap/metaManager/utils.mjs +7 -7
  20. package/dist/handsontable.css +296 -145
  21. package/dist/handsontable.full.css +305 -152
  22. package/dist/handsontable.full.js +3641 -3755
  23. package/dist/handsontable.full.min.css +85 -14
  24. package/dist/handsontable.full.min.js +132 -122
  25. package/dist/handsontable.js +3336 -3440
  26. package/dist/handsontable.min.css +82 -11
  27. package/dist/handsontable.min.js +23 -23
  28. package/editors/dateEditor/dateEditor.js +2 -0
  29. package/editors/dateEditor/dateEditor.mjs +2 -0
  30. package/editors/handsontableEditor/handsontableEditor.js +1 -1
  31. package/editors/handsontableEditor/handsontableEditor.mjs +1 -1
  32. package/editors/selectEditor/selectEditor.js +20 -9
  33. package/editors/selectEditor/selectEditor.mjs +20 -9
  34. package/editors/textEditor/textEditor.js +4 -11
  35. package/editors/textEditor/textEditor.mjs +4 -11
  36. package/helpers/array.js +7 -7
  37. package/helpers/array.mjs +7 -7
  38. package/helpers/mixed.js +3 -3
  39. package/helpers/mixed.mjs +3 -3
  40. package/helpers/number.js +7 -7
  41. package/helpers/number.mjs +7 -7
  42. package/helpers/themes.js +17 -0
  43. package/helpers/themes.mjs +13 -0
  44. package/package.json +10 -3
  45. package/pluginHooks.js +1 -3
  46. package/pluginHooks.mjs +1 -3
  47. package/plugins/columnSorting/utils.js +7 -7
  48. package/plugins/columnSorting/utils.mjs +7 -7
  49. package/plugins/comments/commentEditor.js +8 -1
  50. package/plugins/comments/commentEditor.mjs +8 -1
  51. package/plugins/comments/comments.js +1 -1
  52. package/plugins/comments/comments.mjs +1 -1
  53. package/plugins/contextMenu/menu/menu.js +4 -4
  54. package/plugins/contextMenu/menu/menu.mjs +4 -4
  55. package/plugins/filters/utils.js +7 -7
  56. package/plugins/filters/utils.mjs +7 -7
  57. package/plugins/formulas/formulas.js +7 -7
  58. package/plugins/formulas/formulas.mjs +7 -7
  59. package/plugins/hiddenColumns/hiddenColumns.js +7 -7
  60. package/plugins/hiddenColumns/hiddenColumns.mjs +7 -7
  61. package/plugins/hiddenRows/hiddenRows.js +7 -7
  62. package/plugins/hiddenRows/hiddenRows.mjs +7 -7
  63. package/plugins/mergeCells/cellsCollection.js +7 -7
  64. package/plugins/mergeCells/cellsCollection.mjs +7 -7
  65. package/plugins/mergeCells/mergeCells.js +7 -7
  66. package/plugins/mergeCells/mergeCells.mjs +7 -7
  67. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +7 -7
  68. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +7 -7
  69. package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.js +7 -7
  70. package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +7 -7
  71. package/plugins/nestedRows/nestedRows.js +7 -7
  72. package/plugins/nestedRows/nestedRows.mjs +7 -7
  73. package/plugins/trimRows/trimRows.js +7 -7
  74. package/plugins/trimRows/trimRows.mjs +7 -7
  75. package/selection/selection.js +7 -7
  76. package/selection/selection.mjs +7 -7
  77. package/selection/utils.js +7 -7
  78. package/selection/utils.mjs +7 -7
  79. package/shortcuts/keyObserver.js +7 -7
  80. package/shortcuts/keyObserver.mjs +7 -7
  81. package/styles/handsontable.css +1858 -0
  82. package/styles/handsontable.min.css +30 -0
  83. package/styles/ht-theme-gemini.css +689 -0
  84. package/styles/ht-theme-gemini.min.css +30 -0
  85. package/styles/ht-theme-main.css +697 -0
  86. package/styles/ht-theme-main.min.css +30 -0
  87. package/translations/changesObservable/observable.js +7 -7
  88. package/translations/changesObservable/observable.mjs +7 -7
  89. package/translations/indexMapper.js +7 -7
  90. package/translations/indexMapper.mjs +7 -7
  91. package/utils/dataStructures/uniqueSet.js +7 -7
  92. package/utils/dataStructures/uniqueSet.mjs +7 -7
  93. package/utils/ghostTable.js +1 -1
  94. package/utils/ghostTable.mjs +1 -1
  95. package/utils/paginator.js +7 -7
  96. package/utils/paginator.mjs +7 -7
@@ -66,7 +66,9 @@ class DateEditor extends _textEditor.TextEditor {
66
66
  this.datePickerStyle.left = 0;
67
67
  this.datePickerStyle.zIndex = 9999;
68
68
  this.datePicker.setAttribute('dir', this.hot.isRtl() ? 'rtl' : 'ltr');
69
+ const themeClassName = this.hot.getSettings().themeName;
69
70
  (0, _element.addClass)(this.datePicker, 'htDatepickerHolder');
71
+ (0, _element.addClass)(this.datePicker, themeClassName);
70
72
  this.hot.rootDocument.body.appendChild(this.datePicker);
71
73
 
72
74
  /**
@@ -62,7 +62,9 @@ export class DateEditor extends TextEditor {
62
62
  this.datePickerStyle.left = 0;
63
63
  this.datePickerStyle.zIndex = 9999;
64
64
  this.datePicker.setAttribute('dir', this.hot.isRtl() ? 'rtl' : 'ltr');
65
+ const themeClassName = this.hot.getSettings().themeName;
65
66
  addClass(this.datePicker, 'htDatepickerHolder');
67
+ addClass(this.datePicker, themeClassName);
66
68
  this.hot.rootDocument.body.appendChild(this.datePicker);
67
69
 
68
70
  /**
@@ -158,7 +158,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
158
158
  * @returns {number}
159
159
  */
160
160
  getHeight() {
161
- return this.htEditor.view.getTableHeight();
161
+ return this.htEditor.view.getTableHeight() + 1;
162
162
  }
163
163
 
164
164
  /**
@@ -155,7 +155,7 @@ export class HandsontableEditor extends TextEditor {
155
155
  * @returns {number}
156
156
  */
157
157
  getHeight() {
158
- return this.htEditor.view.getTableHeight();
158
+ return this.htEditor.view.getTableHeight() + 1;
159
159
  }
160
160
 
161
161
  /**
@@ -4,6 +4,7 @@ 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");
7
8
  const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
8
9
  const SHORTCUTS_GROUP = 'selectEditor';
9
10
  const EDITOR_TYPE = exports.EDITOR_TYPE = 'select';
@@ -21,11 +22,21 @@ class SelectEditor extends _baseEditor.BaseEditor {
21
22
  * Initializes editor instance, DOM Element and mount hooks.
22
23
  */
23
24
  init() {
25
+ this.selectWrapper = this.hot.rootDocument.createElement('div');
24
26
  this.select = this.hot.rootDocument.createElement('select');
25
27
  this.select.setAttribute('data-hot-input', 'true');
26
- this.select.style.display = 'none';
27
- (0, _element.addClass)(this.select, 'htSelectEditor');
28
- this.hot.rootElement.appendChild(this.select);
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);
29
40
  this.registerHooks();
30
41
  }
31
42
 
@@ -53,7 +64,7 @@ class SelectEditor extends _baseEditor.BaseEditor {
53
64
  open() {
54
65
  this._opened = true;
55
66
  this.refreshDimensions();
56
- this.select.style.display = '';
67
+ this.selectWrapper.style.display = '';
57
68
  const shortcutManager = this.hot.getShortcutManager();
58
69
  shortcutManager.setActiveContextName('editor');
59
70
  this.registerShortcuts();
@@ -64,9 +75,9 @@ class SelectEditor extends _baseEditor.BaseEditor {
64
75
  */
65
76
  close() {
66
77
  this._opened = false;
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);
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);
70
81
  }
71
82
  this.unregisterShortcuts();
72
83
  this.clearHooks();
@@ -172,13 +183,13 @@ class SelectEditor extends _baseEditor.BaseEditor {
172
183
  width,
173
184
  height
174
185
  } = this.getEditedCellRect();
175
- const selectStyle = this.select.style;
186
+ const selectStyle = this.selectWrapper.style;
176
187
  selectStyle.height = `${height}px`;
177
188
  selectStyle.width = `${width}px`;
178
189
  selectStyle.top = `${top}px`;
179
190
  selectStyle[this.hot.isRtl() ? 'right' : 'left'] = `${start}px`;
180
191
  selectStyle.margin = '0px';
181
- (0, _element.addClass)(this.select, EDITOR_VISIBLE_CLASS_NAME);
192
+ (0, _element.addClass)(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
182
193
  }
183
194
 
184
195
  /**
@@ -1,6 +1,7 @@
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";
4
5
  const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
5
6
  const SHORTCUTS_GROUP = 'selectEditor';
6
7
  export const EDITOR_TYPE = 'select';
@@ -18,11 +19,21 @@ export class SelectEditor extends BaseEditor {
18
19
  * Initializes editor instance, DOM Element and mount hooks.
19
20
  */
20
21
  init() {
22
+ this.selectWrapper = this.hot.rootDocument.createElement('div');
21
23
  this.select = this.hot.rootDocument.createElement('select');
22
24
  this.select.setAttribute('data-hot-input', 'true');
23
- this.select.style.display = 'none';
24
- addClass(this.select, 'htSelectEditor');
25
- this.hot.rootElement.appendChild(this.select);
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);
26
37
  this.registerHooks();
27
38
  }
28
39
 
@@ -50,7 +61,7 @@ export class SelectEditor extends BaseEditor {
50
61
  open() {
51
62
  this._opened = true;
52
63
  this.refreshDimensions();
53
- this.select.style.display = '';
64
+ this.selectWrapper.style.display = '';
54
65
  const shortcutManager = this.hot.getShortcutManager();
55
66
  shortcutManager.setActiveContextName('editor');
56
67
  this.registerShortcuts();
@@ -61,9 +72,9 @@ export class SelectEditor extends BaseEditor {
61
72
  */
62
73
  close() {
63
74
  this._opened = false;
64
- this.select.style.display = 'none';
65
- if (hasClass(this.select, EDITOR_VISIBLE_CLASS_NAME)) {
66
- removeClass(this.select, EDITOR_VISIBLE_CLASS_NAME);
75
+ this.selectWrapper.style.display = 'none';
76
+ if (hasClass(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME)) {
77
+ removeClass(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
67
78
  }
68
79
  this.unregisterShortcuts();
69
80
  this.clearHooks();
@@ -169,13 +180,13 @@ export class SelectEditor extends BaseEditor {
169
180
  width,
170
181
  height
171
182
  } = this.getEditedCellRect();
172
- const selectStyle = this.select.style;
183
+ const selectStyle = this.selectWrapper.style;
173
184
  selectStyle.height = `${height}px`;
174
185
  selectStyle.width = `${width}px`;
175
186
  selectStyle.top = `${top}px`;
176
187
  selectStyle[this.hot.isRtl() ? 'right' : 'left'] = `${start}px`;
177
188
  selectStyle.margin = '0px';
178
- addClass(this.select, EDITOR_VISIBLE_CLASS_NAME);
189
+ addClass(this.selectWrapper, EDITOR_VISIBLE_CLASS_NAME);
179
190
  }
180
191
 
181
192
  /**
@@ -312,19 +312,12 @@ class TextEditor extends _baseEditor.BaseEditor {
312
312
  this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;
313
313
  this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;
314
314
  this.TEXTAREA.style.backgroundColor = this.TD.style.backgroundColor;
315
- const textareaComputedStyle = this.hot.rootWindow.getComputedStyle(this.TEXTAREA);
316
- const horizontalPadding = parseInt(textareaComputedStyle.paddingLeft, 10) + parseInt(textareaComputedStyle.paddingRight, 10);
317
- const verticalPadding = parseInt(textareaComputedStyle.paddingTop, 10) + parseInt(textareaComputedStyle.paddingBottom, 10);
318
- const finalWidth = width - horizontalPadding;
319
- const finalHeight = height - verticalPadding;
320
- const finalMaxWidth = maxWidth - horizontalPadding;
321
- const finalMaxHeight = maxHeight - verticalPadding;
322
315
  this.autoResize.init(this.TEXTAREA, {
323
- minWidth: Math.min(finalWidth, finalMaxWidth),
324
- minHeight: Math.min(finalHeight, finalMaxHeight),
316
+ minWidth: Math.min(width, maxWidth),
317
+ minHeight: Math.min(height, maxHeight),
325
318
  // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)
326
- maxWidth: finalMaxWidth,
327
- maxHeight: finalMaxHeight
319
+ maxWidth,
320
+ maxHeight
328
321
  }, true);
329
322
  }
330
323
 
@@ -308,19 +308,12 @@ export class TextEditor extends BaseEditor {
308
308
  this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;
309
309
  this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;
310
310
  this.TEXTAREA.style.backgroundColor = this.TD.style.backgroundColor;
311
- const textareaComputedStyle = this.hot.rootWindow.getComputedStyle(this.TEXTAREA);
312
- const horizontalPadding = parseInt(textareaComputedStyle.paddingLeft, 10) + parseInt(textareaComputedStyle.paddingRight, 10);
313
- const verticalPadding = parseInt(textareaComputedStyle.paddingTop, 10) + parseInt(textareaComputedStyle.paddingBottom, 10);
314
- const finalWidth = width - horizontalPadding;
315
- const finalHeight = height - verticalPadding;
316
- const finalMaxWidth = maxWidth - horizontalPadding;
317
- const finalMaxHeight = maxHeight - verticalPadding;
318
311
  this.autoResize.init(this.TEXTAREA, {
319
- minWidth: Math.min(finalWidth, finalMaxWidth),
320
- minHeight: Math.min(finalHeight, finalMaxHeight),
312
+ minWidth: Math.min(width, maxWidth),
313
+ minHeight: Math.min(height, maxHeight),
321
314
  // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)
322
- maxWidth: finalMaxWidth,
323
- maxHeight: finalMaxHeight
315
+ maxWidth,
316
+ maxHeight
324
317
  }, true);
325
318
  }
326
319
 
package/helpers/array.js CHANGED
@@ -19,13 +19,13 @@ exports.pivot = pivot;
19
19
  exports.stringToArray = stringToArray;
20
20
  exports.to2dArray = to2dArray;
21
21
  require("core-js/modules/es.array.push.js");
22
- require("core-js/modules/es.set.difference.v2.js");
23
- require("core-js/modules/es.set.intersection.v2.js");
24
- require("core-js/modules/es.set.is-disjoint-from.v2.js");
25
- require("core-js/modules/es.set.is-subset-of.v2.js");
26
- require("core-js/modules/es.set.is-superset-of.v2.js");
27
- require("core-js/modules/es.set.symmetric-difference.v2.js");
28
- require("core-js/modules/es.set.union.v2.js");
22
+ require("core-js/modules/esnext.set.difference.v2.js");
23
+ require("core-js/modules/esnext.set.intersection.v2.js");
24
+ require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
25
+ require("core-js/modules/esnext.set.is-subset-of.v2.js");
26
+ require("core-js/modules/esnext.set.is-superset-of.v2.js");
27
+ require("core-js/modules/esnext.set.symmetric-difference.v2.js");
28
+ require("core-js/modules/esnext.set.union.v2.js");
29
29
  /**
30
30
  * @param {Array} arr An array to process.
31
31
  */
package/helpers/array.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import "core-js/modules/es.array.push.js";
2
- import "core-js/modules/es.set.difference.v2.js";
3
- import "core-js/modules/es.set.intersection.v2.js";
4
- import "core-js/modules/es.set.is-disjoint-from.v2.js";
5
- import "core-js/modules/es.set.is-subset-of.v2.js";
6
- import "core-js/modules/es.set.is-superset-of.v2.js";
7
- import "core-js/modules/es.set.symmetric-difference.v2.js";
8
- import "core-js/modules/es.set.union.v2.js";
2
+ import "core-js/modules/esnext.set.difference.v2.js";
3
+ import "core-js/modules/esnext.set.intersection.v2.js";
4
+ import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
5
+ import "core-js/modules/esnext.set.is-subset-of.v2.js";
6
+ import "core-js/modules/esnext.set.is-superset-of.v2.js";
7
+ import "core-js/modules/esnext.set.symmetric-difference.v2.js";
8
+ import "core-js/modules/esnext.set.union.v2.js";
9
9
  /**
10
10
  * @param {Array} arr An array to process.
11
11
  */
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-3a00df6-20241001";
137
+ const hotVersion = "0.0.0-next-a9e3646-20241001";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
@@ -142,7 +142,7 @@ function _injectProductInfo(key, element) {
142
142
  const schemaValidity = _checkKeySchema(key);
143
143
  if (hasValidType || isNonCommercial || schemaValidity) {
144
144
  if (schemaValidity) {
145
- const releaseDate = (0, _moment.default)("01/10/2024", 'DD/MM/YYYY');
145
+ const releaseDate = (0, _moment.default)("30/07/2024", 'DD/MM/YYYY');
146
146
  const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
147
147
  const keyValidityDays = _extractTime(key);
148
148
  keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
@@ -188,7 +188,7 @@ function _injectProductInfo(key, element) {
188
188
  });
189
189
  if (message) {
190
190
  const messageNode = document.createElement('div');
191
- messageNode.className = 'hot-display-license-info';
191
+ messageNode.className = 'handsontable 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-3a00df6-20241001";
127
+ const hotVersion = "0.0.0-next-a9e3646-20241001";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
@@ -132,7 +132,7 @@ export function _injectProductInfo(key, element) {
132
132
  const schemaValidity = _checkKeySchema(key);
133
133
  if (hasValidType || isNonCommercial || schemaValidity) {
134
134
  if (schemaValidity) {
135
- const releaseDate = moment("01/10/2024", 'DD/MM/YYYY');
135
+ const releaseDate = moment("30/07/2024", 'DD/MM/YYYY');
136
136
  const releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
137
137
  const keyValidityDays = _extractTime(key);
138
138
  keyValidityDate = moment((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
@@ -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 = 'hot-display-license-info';
181
+ messageNode.className = 'handsontable hot-display-license-info';
182
182
  messageNode.innerHTML = domMessages[domMessageState]({
183
183
  keyValidityDate,
184
184
  hotVersion
package/helpers/number.js CHANGED
@@ -7,13 +7,13 @@ exports.isNumericLike = isNumericLike;
7
7
  exports.rangeEach = rangeEach;
8
8
  exports.rangeEachReverse = rangeEachReverse;
9
9
  exports.valueAccordingPercent = valueAccordingPercent;
10
- require("core-js/modules/es.set.difference.v2.js");
11
- require("core-js/modules/es.set.intersection.v2.js");
12
- require("core-js/modules/es.set.is-disjoint-from.v2.js");
13
- require("core-js/modules/es.set.is-subset-of.v2.js");
14
- require("core-js/modules/es.set.is-superset-of.v2.js");
15
- require("core-js/modules/es.set.symmetric-difference.v2.js");
16
- require("core-js/modules/es.set.union.v2.js");
10
+ require("core-js/modules/esnext.set.difference.v2.js");
11
+ require("core-js/modules/esnext.set.intersection.v2.js");
12
+ require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
13
+ require("core-js/modules/esnext.set.is-subset-of.v2.js");
14
+ require("core-js/modules/esnext.set.is-superset-of.v2.js");
15
+ require("core-js/modules/esnext.set.symmetric-difference.v2.js");
16
+ require("core-js/modules/esnext.set.union.v2.js");
17
17
  /* eslint-disable jsdoc/require-description-complete-sentence */
18
18
  /**
19
19
  * Checks if the passed value is numeric one. For example these values (passed as string or number)
@@ -1,10 +1,10 @@
1
- import "core-js/modules/es.set.difference.v2.js";
2
- import "core-js/modules/es.set.intersection.v2.js";
3
- import "core-js/modules/es.set.is-disjoint-from.v2.js";
4
- import "core-js/modules/es.set.is-subset-of.v2.js";
5
- import "core-js/modules/es.set.is-superset-of.v2.js";
6
- import "core-js/modules/es.set.symmetric-difference.v2.js";
7
- import "core-js/modules/es.set.union.v2.js";
1
+ import "core-js/modules/esnext.set.difference.v2.js";
2
+ import "core-js/modules/esnext.set.intersection.v2.js";
3
+ import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
4
+ import "core-js/modules/esnext.set.is-subset-of.v2.js";
5
+ import "core-js/modules/esnext.set.is-superset-of.v2.js";
6
+ import "core-js/modules/esnext.set.symmetric-difference.v2.js";
7
+ import "core-js/modules/esnext.set.union.v2.js";
8
8
  /* eslint-disable jsdoc/require-description-complete-sentence */
9
9
  /**
10
10
  * Checks if the passed value is numeric one. For example these values (passed as string or number)
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.getThemeClassName = getThemeClassName;
5
+ /**
6
+ * Get theme class name from rootElement class.
7
+ *
8
+ * @param {string} className Class names.
9
+ * @returns {string}
10
+ */
11
+ function getThemeClassName(className) {
12
+ if (!className || typeof className !== 'string') {
13
+ return false;
14
+ }
15
+ const [match] = className.match(/ht-theme-[a-zA-Z0-9_-]+/) || [];
16
+ return match;
17
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Get theme class name from rootElement class.
3
+ *
4
+ * @param {string} className Class names.
5
+ * @returns {string}
6
+ */
7
+ export function getThemeClassName(className) {
8
+ if (!className || typeof className !== 'string') {
9
+ return false;
10
+ }
11
+ const [match] = className.match(/ht-theme-[a-zA-Z0-9_-]+/) || [];
12
+ return match;
13
+ }
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-3a00df6-20241001",
13
+ "version": "0.0.0-next-a9e3646-20241001",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -50,7 +50,6 @@
50
50
  "@babel/register": "^7.8.3",
51
51
  "@babel/runtime": "^7.11.2",
52
52
  "@babel/types": "^7.12.12",
53
- "@typescript-eslint/eslint-plugin": "^4.33.0",
54
53
  "babel-jest": "^26.6.3",
55
54
  "babel-loader": "^8.0.4",
56
55
  "babel-plugin-forbidden-imports": "^0.1.2",
@@ -94,8 +93,10 @@
94
93
  "string-replace-loader": "^3.1.0",
95
94
  "stylelint": "^16.3.1",
96
95
  "typescript": "3.8.2",
96
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
97
97
  "webpack": "^5.88.1",
98
- "webpack-cli": "^5.1.4"
98
+ "webpack-cli": "^5.1.4",
99
+ "webpack-remove-empty-scripts": "^1.0.4"
99
100
  },
100
101
  "optionalDependencies": {
101
102
  "hyperformula": "^2.6.2"
@@ -767,6 +768,12 @@
767
768
  "./dist/languages/zh-CN.min.js": "./dist/languages/zh-CN.min.js",
768
769
  "./dist/languages/zh-TW.js": "./dist/languages/zh-TW.js",
769
770
  "./dist/languages/zh-TW.min.js": "./dist/languages/zh-TW.min.js",
771
+ "./styles/handsontable.css": "./styles/handsontable.css",
772
+ "./styles/handsontable.min.css": "./styles/handsontable.min.css",
773
+ "./styles/ht-theme-gemini.css": "./styles/ht-theme-gemini.css",
774
+ "./styles/ht-theme-gemini.min.css": "./styles/ht-theme-gemini.min.css",
775
+ "./styles/ht-theme-main.css": "./styles/ht-theme-main.css",
776
+ "./styles/ht-theme-main.min.css": "./styles/ht-theme-main.min.css",
770
777
  ".": {
771
778
  "types": "./index.d.ts",
772
779
  "import": "./index.mjs",
package/pluginHooks.js CHANGED
@@ -1953,9 +1953,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1953
1953
  * Fired by the [`Filters`](@/api/filters.md) plugin,
1954
1954
  * before a [column filter](@/guides/columns/column-filter/column-filter.md) gets applied.
1955
1955
  *
1956
- * [`beforeFilter`](#beforefilter) takes two arguments: `conditionsStack` and `previousConditionsStack`, both are
1957
- * arrays of objects.
1958
- *
1956
+ * [`beforeFilter`](#beforefilter) takes one argument (`conditionsStack`), which is an array of objects.
1959
1957
  * Each object represents one of your [column filters](@/api/filters.md#addcondition),
1960
1958
  * and consists of the following properties:
1961
1959
  *
package/pluginHooks.mjs CHANGED
@@ -1949,9 +1949,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1949
1949
  * Fired by the [`Filters`](@/api/filters.md) plugin,
1950
1950
  * before a [column filter](@/guides/columns/column-filter/column-filter.md) gets applied.
1951
1951
  *
1952
- * [`beforeFilter`](#beforefilter) takes two arguments: `conditionsStack` and `previousConditionsStack`, both are
1953
- * arrays of objects.
1954
- *
1952
+ * [`beforeFilter`](#beforefilter) takes one argument (`conditionsStack`), which is an array of objects.
1955
1953
  * Each object represents one of your [column filters](@/api/filters.md#addcondition),
1956
1954
  * and consists of the following properties:
1957
1955
  *
@@ -7,13 +7,13 @@ exports.getHeaderSpanElement = getHeaderSpanElement;
7
7
  exports.getNextSortOrder = getNextSortOrder;
8
8
  exports.isFirstLevelColumnHeader = isFirstLevelColumnHeader;
9
9
  exports.wasHeaderClickedProperly = wasHeaderClickedProperly;
10
- require("core-js/modules/es.set.difference.v2.js");
11
- require("core-js/modules/es.set.intersection.v2.js");
12
- require("core-js/modules/es.set.is-disjoint-from.v2.js");
13
- require("core-js/modules/es.set.is-subset-of.v2.js");
14
- require("core-js/modules/es.set.is-superset-of.v2.js");
15
- require("core-js/modules/es.set.symmetric-difference.v2.js");
16
- require("core-js/modules/es.set.union.v2.js");
10
+ require("core-js/modules/esnext.set.difference.v2.js");
11
+ require("core-js/modules/esnext.set.intersection.v2.js");
12
+ require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
13
+ require("core-js/modules/esnext.set.is-subset-of.v2.js");
14
+ require("core-js/modules/esnext.set.is-superset-of.v2.js");
15
+ require("core-js/modules/esnext.set.symmetric-difference.v2.js");
16
+ require("core-js/modules/esnext.set.union.v2.js");
17
17
  var _moment = _interopRequireDefault(require("moment"));
18
18
  var _object = require("../../helpers/object");
19
19
  var _event = require("../../helpers/dom/event");
@@ -1,10 +1,10 @@
1
- import "core-js/modules/es.set.difference.v2.js";
2
- import "core-js/modules/es.set.intersection.v2.js";
3
- import "core-js/modules/es.set.is-disjoint-from.v2.js";
4
- import "core-js/modules/es.set.is-subset-of.v2.js";
5
- import "core-js/modules/es.set.is-superset-of.v2.js";
6
- import "core-js/modules/es.set.symmetric-difference.v2.js";
7
- import "core-js/modules/es.set.union.v2.js";
1
+ import "core-js/modules/esnext.set.difference.v2.js";
2
+ import "core-js/modules/esnext.set.intersection.v2.js";
3
+ import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
4
+ import "core-js/modules/esnext.set.is-subset-of.v2.js";
5
+ import "core-js/modules/esnext.set.is-superset-of.v2.js";
6
+ import "core-js/modules/esnext.set.symmetric-difference.v2.js";
7
+ import "core-js/modules/esnext.set.union.v2.js";
8
8
  import moment from 'moment';
9
9
  import { isObject } from "../../helpers/object.mjs";
10
10
  import { isRightClick } from "../../helpers/dom/event.mjs";
@@ -25,6 +25,7 @@ var _editor = /*#__PURE__*/new WeakMap();
25
25
  var _editorStyle = /*#__PURE__*/new WeakMap();
26
26
  var _hidden = /*#__PURE__*/new WeakMap();
27
27
  var _resizeObserver = /*#__PURE__*/new WeakMap();
28
+ var _themeClassName = /*#__PURE__*/new WeakMap();
28
29
  class CommentEditor {
29
30
  static get CLASS_EDITOR_CONTAINER() {
30
31
  return 'htCommentsContainer';
@@ -43,7 +44,7 @@ class CommentEditor {
43
44
  * @type {Document}
44
45
  */
45
46
 
46
- constructor(rootDocument, isRtl) {
47
+ constructor(rootDocument, isRtl, themeClassName) {
47
48
  var _this = this;
48
49
  _classPrivateFieldInitSpec(this, _rootDocument, void 0);
49
50
  /**
@@ -70,8 +71,13 @@ class CommentEditor {
70
71
  * @type {EditorResizeObserver}
71
72
  */
72
73
  _classPrivateFieldInitSpec(this, _resizeObserver, new _editorResizeObserver.EditorResizeObserver());
74
+ /**
75
+ * @type {string}
76
+ */
77
+ _classPrivateFieldInitSpec(this, _themeClassName, void 0);
73
78
  _classPrivateFieldSet(_rootDocument, this, rootDocument);
74
79
  _classPrivateFieldSet(_isRtl, this, isRtl);
80
+ _classPrivateFieldSet(_themeClassName, this, themeClassName);
75
81
  _classPrivateFieldSet(_editor, this, this.createEditor());
76
82
  _classPrivateFieldSet(_editorStyle, this, _classPrivateFieldGet(_editor, this).style);
77
83
  _classPrivateFieldGet(_resizeObserver, this).setObservedElement(this.getInputElement());
@@ -223,6 +229,7 @@ class CommentEditor {
223
229
  _classPrivateFieldSet(_container, this, _classPrivateFieldGet(_rootDocument, this).createElement('div'));
224
230
  _classPrivateFieldGet(_container, this).setAttribute('dir', _classPrivateFieldGet(_isRtl, this) ? 'rtl' : 'ltr');
225
231
  (0, _element.addClass)(_classPrivateFieldGet(_container, this), CommentEditor.CLASS_EDITOR_CONTAINER);
232
+ (0, _element.addClass)(_classPrivateFieldGet(_container, this), _classPrivateFieldGet(_themeClassName, this));
226
233
  _classPrivateFieldGet(_rootDocument, this).body.appendChild(_classPrivateFieldGet(_container, this));
227
234
  (0, _element.addClass)(editor, CommentEditor.CLASS_EDITOR);
228
235
  (0, _element.addClass)(textarea, CommentEditor.CLASS_INPUT);
@@ -21,6 +21,7 @@ var _editor = /*#__PURE__*/new WeakMap();
21
21
  var _editorStyle = /*#__PURE__*/new WeakMap();
22
22
  var _hidden = /*#__PURE__*/new WeakMap();
23
23
  var _resizeObserver = /*#__PURE__*/new WeakMap();
24
+ var _themeClassName = /*#__PURE__*/new WeakMap();
24
25
  class CommentEditor {
25
26
  static get CLASS_EDITOR_CONTAINER() {
26
27
  return 'htCommentsContainer';
@@ -39,7 +40,7 @@ class CommentEditor {
39
40
  * @type {Document}
40
41
  */
41
42
 
42
- constructor(rootDocument, isRtl) {
43
+ constructor(rootDocument, isRtl, themeClassName) {
43
44
  var _this = this;
44
45
  _classPrivateFieldInitSpec(this, _rootDocument, void 0);
45
46
  /**
@@ -66,8 +67,13 @@ class CommentEditor {
66
67
  * @type {EditorResizeObserver}
67
68
  */
68
69
  _classPrivateFieldInitSpec(this, _resizeObserver, new EditorResizeObserver());
70
+ /**
71
+ * @type {string}
72
+ */
73
+ _classPrivateFieldInitSpec(this, _themeClassName, void 0);
69
74
  _classPrivateFieldSet(_rootDocument, this, rootDocument);
70
75
  _classPrivateFieldSet(_isRtl, this, isRtl);
76
+ _classPrivateFieldSet(_themeClassName, this, themeClassName);
71
77
  _classPrivateFieldSet(_editor, this, this.createEditor());
72
78
  _classPrivateFieldSet(_editorStyle, this, _classPrivateFieldGet(_editor, this).style);
73
79
  _classPrivateFieldGet(_resizeObserver, this).setObservedElement(this.getInputElement());
@@ -219,6 +225,7 @@ class CommentEditor {
219
225
  _classPrivateFieldSet(_container, this, _classPrivateFieldGet(_rootDocument, this).createElement('div'));
220
226
  _classPrivateFieldGet(_container, this).setAttribute('dir', _classPrivateFieldGet(_isRtl, this) ? 'rtl' : 'ltr');
221
227
  addClass(_classPrivateFieldGet(_container, this), CommentEditor.CLASS_EDITOR_CONTAINER);
228
+ addClass(_classPrivateFieldGet(_container, this), _classPrivateFieldGet(_themeClassName, this));
222
229
  _classPrivateFieldGet(_rootDocument, this).body.appendChild(_classPrivateFieldGet(_container, this));
223
230
  addClass(editor, CommentEditor.CLASS_EDITOR);
224
231
  addClass(textarea, CommentEditor.CLASS_INPUT);
@@ -213,7 +213,7 @@ class Comments extends _base.BasePlugin {
213
213
  return;
214
214
  }
215
215
  if (!_classPrivateFieldGet(_editor, this)) {
216
- _classPrivateFieldSet(_editor, this, new _commentEditor.default(this.hot.rootDocument, this.hot.isRtl()));
216
+ _classPrivateFieldSet(_editor, this, new _commentEditor.default(this.hot.rootDocument, this.hot.isRtl(), this.hot.getSettings().themeName));
217
217
  _classPrivateFieldGet(_editor, this).addLocalHook('resize', function () {
218
218
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
219
219
  args[_key] = arguments[_key];
@@ -209,7 +209,7 @@ export class Comments extends BasePlugin {
209
209
  return;
210
210
  }
211
211
  if (!_classPrivateFieldGet(_editor, this)) {
212
- _classPrivateFieldSet(_editor, this, new CommentEditor(this.hot.rootDocument, this.hot.isRtl()));
212
+ _classPrivateFieldSet(_editor, this, new CommentEditor(this.hot.rootDocument, this.hot.isRtl(), this.hot.getSettings().themeName));
213
213
  _classPrivateFieldGet(_editor, this).addLocalHook('resize', function () {
214
214
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
215
215
  args[_key] = arguments[_key];
@@ -579,10 +579,8 @@ class Menu {
579
579
  const currentRowHeight = itemCell ? (0, _element.outerHeight)(this.hotMenu.getCell(index, 0)) : 0;
580
580
  return accumulator + (value.name === _predefinedItems.SEPARATOR ? 1 : currentRowHeight);
581
581
  }, 0);
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`;
582
+ holderStyle.width = `${currentHiderWidth}px`;
583
+ holderStyle.height = `${realHeight}px`;
586
584
  hiderStyle.height = holderStyle.height;
587
585
  }
588
586
 
@@ -612,8 +610,10 @@ class Menu {
612
610
  container = doc.querySelector(`.${this.options.className}.${className}`);
613
611
  }
614
612
  if (!container) {
613
+ const themeClassName = this.hot.getSettings().themeName;
615
614
  container = doc.createElement('div');
616
615
  (0, _element.addClass)(container, `htMenu ${this.options.className}`);
616
+ (0, _element.addClass)(container, themeClassName);
617
617
  if (className) {
618
618
  (0, _element.addClass)(container, className);
619
619
  }