handsontable 0.0.0-next-81abafa-20240814 → 0.0.0-next-4c6aa91-20240814

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.

@@ -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
  /**
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-81abafa-20240814";
137
+ const hotVersion = "0.0.0-next-4c6aa91-20240814";
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 = '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-81abafa-20240814";
127
+ const hotVersion = "0.0.0-next-4c6aa91-20240814";
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 = '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/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-81abafa-20240814",
13
+ "version": "0.0.0-next-4c6aa91-20240814",
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,20 @@
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-elegant-dark-auto.css": "./styles/ht-theme-elegant-dark-auto.css",
774
+ "./styles/ht-theme-elegant-dark-auto.min.css": "./styles/ht-theme-elegant-dark-auto.min.css",
775
+ "./styles/ht-theme-elegant-dark.css": "./styles/ht-theme-elegant-dark.css",
776
+ "./styles/ht-theme-elegant-dark.min.css": "./styles/ht-theme-elegant-dark.min.css",
777
+ "./styles/ht-theme-elegant-light.css": "./styles/ht-theme-elegant-light.css",
778
+ "./styles/ht-theme-elegant-light.min.css": "./styles/ht-theme-elegant-light.min.css",
779
+ "./styles/ht-theme-main-dark-auto.css": "./styles/ht-theme-main-dark-auto.css",
780
+ "./styles/ht-theme-main-dark-auto.min.css": "./styles/ht-theme-main-dark-auto.min.css",
781
+ "./styles/ht-theme-main-dark.css": "./styles/ht-theme-main-dark.css",
782
+ "./styles/ht-theme-main-dark.min.css": "./styles/ht-theme-main-dark.min.css",
783
+ "./styles/ht-theme-main-light.css": "./styles/ht-theme-main-light.css",
784
+ "./styles/ht-theme-main-light.min.css": "./styles/ht-theme-main-light.min.css",
770
785
  ".": {
771
786
  "types": "./index.d.ts",
772
787
  "import": "./index.mjs",