handsontable 14.0.0-next-477622d-20231128 → 14.0.0-next-c648fa4-20231128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 = "14.0.0-next-477622d-20231128";
137
+ const hotVersion = "14.0.0-next-c648fa4-20231128";
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)("29/11/2023", 'DD/MM/YYYY');
145
+ const releaseDate = (0, _moment.default)("30/11/2023", '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');
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 = "14.0.0-next-477622d-20231128";
127
+ const hotVersion = "14.0.0-next-c648fa4-20231128";
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("29/11/2023", 'DD/MM/YYYY');
135
+ const releaseDate = moment("30/11/2023", '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');
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": "14.0.0-next-477622d-20231128",
13
+ "version": "14.0.0-next-c648fa4-20231128",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -190,7 +190,7 @@ class ContextMenu extends _base.BasePlugin {
190
190
  */
191
191
  registerShortcuts() {
192
192
  this.hot.getShortcutManager().getContext('grid').addShortcut({
193
- keys: [['Control/Meta', 'Shift', '\\'], ['Shift', 'F10']],
193
+ keys: [['Control/Meta', 'Shift', 'Backslash'], ['Shift', 'F10']],
194
194
  callback: () => {
195
195
  const {
196
196
  highlight
@@ -186,7 +186,7 @@ export class ContextMenu extends BasePlugin {
186
186
  */
187
187
  registerShortcuts() {
188
188
  this.hot.getShortcutManager().getContext('grid').addShortcut({
189
- keys: [['Control/Meta', 'Shift', '\\'], ['Shift', 'F10']],
189
+ keys: [['Control/Meta', 'Shift', 'Backslash'], ['Shift', 'F10']],
190
190
  callback: () => {
191
191
  const {
192
192
  highlight
@@ -42,6 +42,7 @@ const getKeysList = normalizedKeys => {
42
42
  */
43
43
  exports.getKeysList = getKeysList;
44
44
  const codeToKeyRegExp = new RegExp('^(?:Key|Digit)([A-Z0-9])$');
45
+ const keyCodeNames = new Set(['Backquote', 'Minus', 'Equal', 'BracketLeft', 'BracketRight', 'Backslash', 'Semicolon', 'Quote', 'Comma', 'Period', 'Slash']);
45
46
 
46
47
  /**
47
48
  * Normalizes a keyboard event key value to a key before its modification. When the keyboard event
@@ -58,6 +59,12 @@ const normalizeEventKey = _ref => {
58
59
  key,
59
60
  code
60
61
  } = _ref;
61
- return (codeToKeyRegExp.test(code) ? code.replace(codeToKeyRegExp, '$1') : key).toLowerCase();
62
+ let normalizedKey = key;
63
+ if (codeToKeyRegExp.test(code)) {
64
+ normalizedKey = code.replace(codeToKeyRegExp, '$1');
65
+ } else if (keyCodeNames.has(code)) {
66
+ normalizedKey = code;
67
+ }
68
+ return normalizedKey.toLowerCase();
62
69
  };
63
70
  exports.normalizeEventKey = normalizeEventKey;
@@ -37,6 +37,7 @@ export const getKeysList = normalizedKeys => {
37
37
  * the string.
38
38
  */
39
39
  const codeToKeyRegExp = new RegExp('^(?:Key|Digit)([A-Z0-9])$');
40
+ const keyCodeNames = new Set(['Backquote', 'Minus', 'Equal', 'BracketLeft', 'BracketRight', 'Backslash', 'Semicolon', 'Quote', 'Comma', 'Period', 'Slash']);
40
41
 
41
42
  /**
42
43
  * Normalizes a keyboard event key value to a key before its modification. When the keyboard event
@@ -53,5 +54,11 @@ export const normalizeEventKey = _ref => {
53
54
  key,
54
55
  code
55
56
  } = _ref;
56
- return (codeToKeyRegExp.test(code) ? code.replace(codeToKeyRegExp, '$1') : key).toLowerCase();
57
+ let normalizedKey = key;
58
+ if (codeToKeyRegExp.test(code)) {
59
+ normalizedKey = code.replace(codeToKeyRegExp, '$1');
60
+ } else if (keyCodeNames.has(code)) {
61
+ normalizedKey = code;
62
+ }
63
+ return normalizedKey.toLowerCase();
57
64
  };