handsontable 0.0.0-next-9568df7-20230828 → 0.0.0-next-b914b0f-20230828

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.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

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-9568df7-20230828";
137
+ const hotVersion = "0.0.0-next-b914b0f-20230828";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
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-9568df7-20230828";
127
+ const hotVersion = "0.0.0-next-b914b0f-20230828";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
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-9568df7-20230828",
13
+ "version": "0.0.0-next-b914b0f-20230828",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
4
5
  var _uniqueMap = require("../utils/dataStructures/uniqueMap");
5
6
  var _context = require("./context");
6
7
  var _recorder = require("./recorder");
8
+ var _templateLiteralTag = require("../helpers/templateLiteralTag");
7
9
  /* eslint-disable jsdoc/require-description-complete-sentence */
8
10
 
9
11
  /**
@@ -84,6 +86,10 @@ const createShortcutManager = _ref => {
84
86
  * @param {string} contextName The name of the shortcut context
85
87
  */
86
88
  const setActiveContextName = contextName => {
89
+ if (!CONTEXTS.hasItem(contextName)) {
90
+ throw new Error((0, _templateLiteralTag.toSingleLine)`You've tried to activate the "${contextName}" shortcut context\x20
91
+ that does not exist. Before activation, register the context using the "addContext" method.`);
92
+ }
87
93
  activeContextName = contextName;
88
94
  };
89
95
 
@@ -1,6 +1,8 @@
1
+ import "core-js/modules/es.error.cause.js";
1
2
  import { createUniqueMap } from "../utils/dataStructures/uniqueMap.mjs";
2
3
  import { createContext } from "./context.mjs";
3
4
  import { useRecorder } from "./recorder.mjs";
5
+ import { toSingleLine } from "../helpers/templateLiteralTag.mjs";
4
6
  /* eslint-disable jsdoc/require-description-complete-sentence */
5
7
  /**
6
8
  * The `ShortcutManager` API lets you store and manage [keyboard shortcut contexts](@/guides/accessories-and-menus/keyboard-shortcuts.md#keyboard-shortcut-contexts) ([`ShortcutContext`](@/api/shortcutContext.md)).
@@ -80,6 +82,10 @@ export const createShortcutManager = _ref => {
80
82
  * @param {string} contextName The name of the shortcut context
81
83
  */
82
84
  const setActiveContextName = contextName => {
85
+ if (!CONTEXTS.hasItem(contextName)) {
86
+ throw new Error(toSingleLine`You've tried to activate the "${contextName}" shortcut context\x20
87
+ that does not exist. Before activation, register the context using the "addContext" method.`);
88
+ }
83
89
  activeContextName = contextName;
84
90
  };
85
91