handsontable 0.0.0-next-11d07aa-20240814 → 0.0.0-next-b87a425-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.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +296 -145
- package/dist/handsontable.full.css +305 -152
- package/dist/handsontable.full.js +3471 -3674
- package/dist/handsontable.full.min.css +85 -14
- package/dist/handsontable.full.min.js +26 -26
- package/dist/handsontable.js +3181 -3375
- package/dist/handsontable.min.css +82 -11
- package/dist/handsontable.min.js +23 -23
- package/editors/selectEditor/selectEditor.js +20 -9
- package/editors/selectEditor/selectEditor.mjs +20 -9
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/package.json +4 -3
- package/shortcuts/utils.js +3 -1
- package/shortcuts/utils.mjs +3 -1
- package/styles/handsontable.css +1968 -0
- package/styles/handsontable.min.css +30 -0
- package/styles/ht-theme-elegant-dark-auto.css +184 -0
- package/styles/ht-theme-elegant-dark-auto.min.css +30 -0
- package/styles/ht-theme-elegant-dark.css +104 -0
- package/styles/ht-theme-elegant-dark.min.css +30 -0
- package/styles/ht-theme-elegant-light.css +104 -0
- package/styles/ht-theme-elegant-light.min.css +30 -0
- package/styles/ht-theme-main-dark-auto.css +184 -0
- package/styles/ht-theme-main-dark-auto.min.css +30 -0
- package/styles/ht-theme-main-dark.css +104 -0
- package/styles/ht-theme-main-dark.min.css +30 -0
- package/styles/ht-theme-main-light.css +104 -0
- package/styles/ht-theme-main-light.min.css +30 -0
@@ -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.
|
27
|
-
|
28
|
-
this.hot.
|
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.
|
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.
|
68
|
-
if ((0, _element.hasClass)(this.
|
69
|
-
(0, _element.removeClass)(this.
|
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.
|
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.
|
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.
|
24
|
-
|
25
|
-
this.hot.
|
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.
|
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.
|
65
|
-
if (hasClass(this.
|
66
|
-
removeClass(this.
|
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.
|
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.
|
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-
|
137
|
+
const hotVersion = "0.0.0-next-b87a425-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-
|
127
|
+
const hotVersion = "0.0.0-next-b87a425-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-
|
13
|
+
"version": "0.0.0-next-b87a425-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"
|
package/shortcuts/utils.js
CHANGED
@@ -36,7 +36,9 @@ const getKeysList = normalizedKeys => {
|
|
36
36
|
return normalizedKeys.split('+');
|
37
37
|
};
|
38
38
|
exports.getKeysList = getKeysList;
|
39
|
-
const specialCharactersSet = new Map([[
|
39
|
+
const specialCharactersSet = new Map([[96, 'numpad0'], [97, 'numpad1'], [98, 'numpad2'], [99, 'numpad3'], [100, 'numpad4'], [101, 'numpad5'], [102, 'numpad6'], [103, 'numpad7'], [104, 'numpad8'], [105, 'numpad9'], [106, 'multiply'], [107, 'add'], [108, 'decimal'],
|
40
|
+
// firefox
|
41
|
+
[109, 'subtract'], [110, 'decimal'], [111, 'divide'], [112, 'f1'], [113, 'f2'], [114, 'f3'], [115, 'f4'], [116, 'f5'], [117, 'f6'], [118, 'f7'], [119, 'f8'], [120, 'f9'], [121, 'f10'], [122, 'f11'], [123, 'f12'], [186, 'semicolon'], [187, 'equal'], [188, 'comma'], [189, 'minus'], [190, 'period'], [191, 'slash'], [192, 'backquote'], [219, 'bracketleft'], [220, 'backslash'], [221, 'bracketright'], [222, 'quote']]);
|
40
42
|
|
41
43
|
/**
|
42
44
|
* Normalizes a keyboard event key value to a key before its modification.
|
package/shortcuts/utils.mjs
CHANGED
@@ -31,7 +31,9 @@ export const normalizeKeys = keys => {
|
|
31
31
|
export const getKeysList = normalizedKeys => {
|
32
32
|
return normalizedKeys.split('+');
|
33
33
|
};
|
34
|
-
const specialCharactersSet = new Map([[
|
34
|
+
const specialCharactersSet = new Map([[96, 'numpad0'], [97, 'numpad1'], [98, 'numpad2'], [99, 'numpad3'], [100, 'numpad4'], [101, 'numpad5'], [102, 'numpad6'], [103, 'numpad7'], [104, 'numpad8'], [105, 'numpad9'], [106, 'multiply'], [107, 'add'], [108, 'decimal'],
|
35
|
+
// firefox
|
36
|
+
[109, 'subtract'], [110, 'decimal'], [111, 'divide'], [112, 'f1'], [113, 'f2'], [114, 'f3'], [115, 'f4'], [116, 'f5'], [117, 'f6'], [118, 'f7'], [119, 'f8'], [120, 'f9'], [121, 'f10'], [122, 'f11'], [123, 'f12'], [186, 'semicolon'], [187, 'equal'], [188, 'comma'], [189, 'minus'], [190, 'period'], [191, 'slash'], [192, 'backquote'], [219, 'bracketleft'], [220, 'backslash'], [221, 'bracketright'], [222, 'quote']]);
|
35
37
|
|
36
38
|
/**
|
37
39
|
* Normalizes a keyboard event key value to a key before its modification.
|