handsontable 0.0.0-next-93e34dc-20230601 → 0.0.0-next-b7cca45-20230605

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 (216) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
  4. package/3rdparty/walkontable/src/cell/coords.js +12 -61
  5. package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
  6. package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
  7. package/3rdparty/walkontable/src/cell/range.js +7 -44
  8. package/3rdparty/walkontable/src/cell/range.mjs +7 -44
  9. package/3rdparty/walkontable/src/core/_base.js +3 -9
  10. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  11. package/3rdparty/walkontable/src/core/clone.js +2 -2
  12. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  13. package/3rdparty/walkontable/src/core/core.js +2 -3
  14. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  15. package/3rdparty/walkontable/src/event.js +7 -7
  16. package/3rdparty/walkontable/src/event.mjs +7 -7
  17. package/3rdparty/walkontable/src/facade/core.js +2 -2
  18. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  19. package/3rdparty/walkontable/src/index.js +2 -10
  20. package/3rdparty/walkontable/src/index.mjs +2 -2
  21. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +4 -2
  26. package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
  27. package/3rdparty/walkontable/src/selection.js +354 -0
  28. package/3rdparty/walkontable/src/selection.mjs +348 -0
  29. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  30. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  31. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  32. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  33. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  34. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  35. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  36. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  37. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  38. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  39. package/3rdparty/walkontable/src/table.js +79 -7
  40. package/3rdparty/walkontable/src/table.mjs +80 -8
  41. package/base.js +2 -2
  42. package/base.mjs +2 -2
  43. package/core.d.ts +3 -5
  44. package/core.js +300 -82
  45. package/core.mjs +300 -82
  46. package/dataMap/metaManager/metaSchema.js +0 -15
  47. package/dataMap/metaManager/metaSchema.mjs +0 -15
  48. package/dist/handsontable.css +3 -8
  49. package/dist/handsontable.full.css +3 -8
  50. package/dist/handsontable.full.js +9926 -12218
  51. package/dist/handsontable.full.min.css +3 -3
  52. package/dist/handsontable.full.min.js +120 -120
  53. package/dist/handsontable.js +14628 -16920
  54. package/dist/handsontable.min.css +3 -3
  55. package/dist/handsontable.min.js +4 -4
  56. package/editorManager.js +82 -20
  57. package/editorManager.mjs +86 -25
  58. package/editors/textEditor/textEditor.js +11 -3
  59. package/editors/textEditor/textEditor.mjs +12 -4
  60. package/helpers/mixed.js +1 -1
  61. package/helpers/mixed.mjs +1 -1
  62. package/helpers/number.d.ts +0 -1
  63. package/helpers/number.js +0 -18
  64. package/helpers/number.mjs +0 -17
  65. package/package.json +1 -1
  66. package/pluginHooks.js +1 -1
  67. package/pluginHooks.mjs +1 -1
  68. package/plugins/copyPaste/copyPaste.js +1 -5
  69. package/plugins/copyPaste/copyPaste.mjs +1 -5
  70. package/plugins/customBorders/customBorders.js +52 -18
  71. package/plugins/customBorders/customBorders.mjs +53 -19
  72. package/plugins/mergeCells/mergeCells.js +18 -5
  73. package/plugins/mergeCells/mergeCells.mjs +18 -5
  74. package/plugins/nestedHeaders/nestedHeaders.js +9 -89
  75. package/plugins/nestedHeaders/nestedHeaders.mjs +9 -89
  76. package/plugins/nestedHeaders/stateManager/index.js +0 -37
  77. package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
  78. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  79. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  80. package/selection/highlight/constants.js +16 -0
  81. package/selection/highlight/constants.mjs +6 -0
  82. package/selection/highlight/highlight.js +88 -311
  83. package/selection/highlight/highlight.mjs +84 -301
  84. package/selection/highlight/types/activeHeader.js +9 -10
  85. package/selection/highlight/types/activeHeader.mjs +8 -10
  86. package/selection/highlight/types/area.js +27 -12
  87. package/selection/highlight/types/area.mjs +30 -16
  88. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  89. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  90. package/selection/highlight/types/customSelection.js +10 -7
  91. package/selection/highlight/types/customSelection.mjs +9 -7
  92. package/selection/highlight/types/fill.js +8 -5
  93. package/selection/highlight/types/fill.mjs +7 -5
  94. package/selection/highlight/types/header.js +20 -10
  95. package/selection/highlight/types/header.mjs +19 -10
  96. package/selection/highlight/types/{row.js → index.js} +31 -27
  97. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  98. package/selection/highlight/visualSelection.js +28 -23
  99. package/selection/highlight/visualSelection.mjs +28 -23
  100. package/selection/index.js +7 -4
  101. package/selection/index.mjs +3 -2
  102. package/selection/mouseEventHandler.js +1 -1
  103. package/selection/mouseEventHandler.mjs +1 -1
  104. package/selection/range.js +8 -8
  105. package/selection/range.mjs +8 -8
  106. package/selection/selection.js +180 -296
  107. package/selection/selection.mjs +179 -291
  108. package/selection/transformation.js +96 -233
  109. package/selection/transformation.mjs +93 -230
  110. package/selection/utils.js +35 -12
  111. package/selection/utils.mjs +35 -13
  112. package/settings.d.ts +0 -1
  113. package/tableView.js +9 -58
  114. package/tableView.mjs +9 -58
  115. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  116. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  117. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  118. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  119. package/3rdparty/walkontable/src/selection/index.js +0 -30
  120. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  121. package/3rdparty/walkontable/src/selection/manager.js +0 -328
  122. package/3rdparty/walkontable/src/selection/manager.mjs +0 -322
  123. package/3rdparty/walkontable/src/selection/scanner.js +0 -363
  124. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
  125. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  126. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  127. package/selection/highlight/types/areaLayered.js +0 -54
  128. package/selection/highlight/types/areaLayered.mjs +0 -49
  129. package/selection/highlight/types/column.js +0 -50
  130. package/selection/highlight/types/column.mjs +0 -45
  131. package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
  132. package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
  133. package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
  134. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
  135. package/shortcutContexts/commands/editor/fastOpen.js +0 -16
  136. package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
  137. package/shortcutContexts/commands/editor/index.js +0 -16
  138. package/shortcutContexts/commands/editor/index.mjs +0 -12
  139. package/shortcutContexts/commands/editor/open.js +0 -29
  140. package/shortcutContexts/commands/editor/open.mjs +0 -24
  141. package/shortcutContexts/commands/emptySelectedCells.js +0 -12
  142. package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
  143. package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
  144. package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
  145. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
  146. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
  147. package/shortcutContexts/commands/extendCellsSelection/index.js +0 -24
  148. package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -20
  149. package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
  150. package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
  151. package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
  152. package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
  153. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
  154. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
  155. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
  156. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
  157. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
  158. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
  159. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -39
  160. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -34
  161. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -39
  162. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -34
  163. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
  164. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
  165. package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
  166. package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
  167. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
  168. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
  169. package/shortcutContexts/commands/index.js +0 -51
  170. package/shortcutContexts/commands/index.mjs +0 -47
  171. package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
  172. package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
  173. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -11
  174. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -6
  175. package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
  176. package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
  177. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
  178. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
  179. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
  180. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
  181. package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
  182. package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
  183. package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
  184. package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
  185. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
  186. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
  187. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
  188. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
  189. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
  190. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
  191. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
  192. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
  193. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -35
  194. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -30
  195. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -35
  196. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -30
  197. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
  198. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
  199. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
  200. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
  201. package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
  202. package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
  203. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -11
  204. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -6
  205. package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
  206. package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
  207. package/shortcutContexts/commands/selectAll.js +0 -11
  208. package/shortcutContexts/commands/selectAll.mjs +0 -6
  209. package/shortcutContexts/constants.js +0 -19
  210. package/shortcutContexts/constants.mjs +0 -12
  211. package/shortcutContexts/editor.js +0 -29
  212. package/shortcutContexts/editor.mjs +0 -25
  213. package/shortcutContexts/grid.js +0 -232
  214. package/shortcutContexts/grid.mjs +0 -228
  215. package/shortcutContexts/index.js +0 -29
  216. package/shortcutContexts/index.mjs +0 -15
package/editorManager.js CHANGED
@@ -6,7 +6,9 @@ require("core-js/modules/es.function.name.js");
6
6
  require("core-js/modules/es.array.from.js");
7
7
  require("core-js/modules/es.regexp.exec.js");
8
8
  exports.__esModule = true;
9
- exports.default = exports.SHORTCUTS_GROUP_NAVIGATION = void 0;
9
+ exports.default = exports.SHORTCUTS_GROUP_NAVIGATION = exports.SHORTCUTS_GROUP_EDITOR = void 0;
10
+ require("core-js/modules/es.array.includes.js");
11
+ require("core-js/modules/es.string.includes.js");
10
12
  require("core-js/modules/es.symbol.to-primitive.js");
11
13
  require("core-js/modules/es.date.to-primitive.js");
12
14
  require("core-js/modules/es.symbol.js");
@@ -18,6 +20,7 @@ require("core-js/modules/es.string.iterator.js");
18
20
  require("core-js/modules/es.weak-map.js");
19
21
  require("core-js/modules/web.dom-collections.iterator.js");
20
22
  var _unicode = require("./helpers/unicode");
23
+ var _event = require("./helpers/dom/event");
21
24
  var _element = require("./helpers/dom/element");
22
25
  var _registry = require("./editors/registry");
23
26
  var _eventManager = _interopRequireDefault(require("./eventManager"));
@@ -37,6 +40,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
37
40
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
38
41
  var SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
39
42
  exports.SHORTCUTS_GROUP_NAVIGATION = SHORTCUTS_GROUP_NAVIGATION;
43
+ var SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';
44
+ exports.SHORTCUTS_GROUP_EDITOR = SHORTCUTS_GROUP_EDITOR;
40
45
  var EditorManager = /*#__PURE__*/function () {
41
46
  /**
42
47
  * @param {Core} instance The Handsontable instance.
@@ -101,6 +106,9 @@ var EditorManager = /*#__PURE__*/function () {
101
106
  * @type {object}
102
107
  */
103
108
  this.cellProperties = void 0;
109
+ var shortcutManager = this.instance.getShortcutManager();
110
+ shortcutManager.addContext('editor');
111
+ this.registerShortcuts();
104
112
  this.instance.addHook('afterDocumentKeyDown', function (event) {
105
113
  return _this.onAfterDocumentKeyDown(event);
106
114
  });
@@ -117,10 +125,66 @@ var EditorManager = /*#__PURE__*/function () {
117
125
  }
118
126
 
119
127
  /**
120
- * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
121
- * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
128
+ * Register shortcuts responsible for handling some actions related to an editor.
129
+ *
130
+ * @private
122
131
  */
123
132
  _createClass(EditorManager, [{
133
+ key: "registerShortcuts",
134
+ value: function registerShortcuts() {
135
+ var _this2 = this;
136
+ var shortcutManager = this.instance.getShortcutManager();
137
+ var gridContext = shortcutManager.getContext('grid');
138
+ var editorContext = shortcutManager.getContext('editor');
139
+ var config = {
140
+ group: SHORTCUTS_GROUP_EDITOR
141
+ };
142
+ editorContext.addShortcuts([{
143
+ keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],
144
+ callback: function callback(event, keys) {
145
+ _this2.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());
146
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
147
+ }
148
+ }, {
149
+ keys: [['Escape'], ['Escape', 'Control/Meta']],
150
+ callback: function callback() {
151
+ _this2.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());
152
+ _this2.activeEditor.focus();
153
+ }
154
+ }], config);
155
+ gridContext.addShortcuts([{
156
+ keys: [['F2']],
157
+ callback: function callback(event) {
158
+ _this2.openEditor(null, event, true);
159
+ }
160
+ }, {
161
+ keys: [['Backspace'], ['Delete']],
162
+ callback: function callback() {
163
+ _this2.instance.emptySelectedCells();
164
+ _this2.prepareEditor();
165
+ }
166
+ }, {
167
+ keys: [['Enter'], ['Enter', 'Shift']],
168
+ callback: function callback(event, keys) {
169
+ if (_this2.instance.getSettings().enterBeginsEditing) {
170
+ if (_this2.cellProperties.readOnly) {
171
+ _this2.moveSelectionAfterEnter();
172
+ } else {
173
+ _this2.openEditor(null, event, true);
174
+ }
175
+ } else {
176
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
177
+ }
178
+ (0, _event.stopImmediatePropagation)(event); // required by HandsontableEditor
179
+ }
180
+ }], config);
181
+ }
182
+
183
+ /**
184
+ * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
185
+ * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
186
+ */
187
+ }, {
124
188
  key: "lockEditor",
125
189
  value: function lockEditor() {
126
190
  this.lock = true;
@@ -167,25 +231,21 @@ var EditorManager = /*#__PURE__*/function () {
167
231
  }, {
168
232
  key: "prepareEditor",
169
233
  value: function prepareEditor() {
170
- var _this2 = this;
234
+ var _this3 = this;
171
235
  if (this.lock) {
172
236
  return;
173
237
  }
174
238
  if (this.activeEditor && this.activeEditor.isWaiting()) {
175
239
  this.closeEditor(false, false, function (dataSaved) {
176
240
  if (dataSaved) {
177
- _this2.prepareEditor();
241
+ _this3.prepareEditor();
178
242
  }
179
243
  });
180
244
  return;
181
245
  }
182
- var _this$instance$getSel = this.instance.getSelectedRangeLast(),
183
- highlight = _this$instance$getSel.highlight;
184
- if (highlight.isHeader()) {
185
- return;
186
- }
187
- var row = highlight.row,
188
- col = highlight.col;
246
+ var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,
247
+ row = _this$instance$getSel.row,
248
+ col = _this$instance$getSel.col;
189
249
  var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
190
250
  var visualRowToCheck = row;
191
251
  var visualColumnToCheck = col;
@@ -375,12 +435,14 @@ var EditorManager = /*#__PURE__*/function () {
375
435
  }, {
376
436
  key: "onAfterDocumentKeyDown",
377
437
  value: function onAfterDocumentKeyDown(event) {
378
- var _this3 = this;
379
- var selection = this.instance.getSelectedRangeLast();
380
- if (!this.instance.isListening() || !selection || selection.highlight.isHeader()) {
438
+ var _this4 = this;
439
+ if (!this.instance.isListening()) {
381
440
  return;
382
441
  }
383
442
  var keyCode = event.keyCode;
443
+ if (!this.selection.isSelected()) {
444
+ return;
445
+ }
384
446
 
385
447
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
386
448
  var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
@@ -390,29 +452,29 @@ var EditorManager = /*#__PURE__*/function () {
390
452
  var editorContext = shortcutManager.getContext('editor');
391
453
  var runOnlySelectedConfig = {
392
454
  runOnlyIf: function runOnlyIf() {
393
- return (0, _mixed.isDefined)(_this3.instance.getSelected());
455
+ return (0, _mixed.isDefined)(_this4.instance.getSelected());
394
456
  },
395
457
  group: SHORTCUTS_GROUP_NAVIGATION
396
458
  };
397
459
  editorContext.addShortcuts([{
398
460
  keys: [['ArrowUp']],
399
461
  callback: function callback() {
400
- _this3.instance.selection.transformStart(-1, 0);
462
+ _this4.instance.selection.transformStart(-1, 0);
401
463
  }
402
464
  }, {
403
465
  keys: [['ArrowDown']],
404
466
  callback: function callback() {
405
- _this3.instance.selection.transformStart(1, 0);
467
+ _this4.instance.selection.transformStart(1, 0);
406
468
  }
407
469
  }, {
408
470
  keys: [['ArrowLeft']],
409
471
  callback: function callback() {
410
- _this3.instance.selection.transformStart(0, -1 * _this3.instance.getDirectionFactor());
472
+ _this4.instance.selection.transformStart(0, -1 * _this4.instance.getDirectionFactor());
411
473
  }
412
474
  }, {
413
475
  keys: [['ArrowRight']],
414
476
  callback: function callback() {
415
- _this3.instance.selection.transformStart(0, _this3.instance.getDirectionFactor());
477
+ _this4.instance.selection.transformStart(0, _this4.instance.getDirectionFactor());
416
478
  }
417
479
  }], runOnlySelectedConfig);
418
480
  this.openEditor('', event);
package/editorManager.mjs CHANGED
@@ -1,4 +1,12 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import "core-js/modules/es.array.includes.js";
9
+ import "core-js/modules/es.string.includes.js";
2
10
  import "core-js/modules/es.array.iterator.js";
3
11
  import "core-js/modules/es.object.to-string.js";
4
12
  import "core-js/modules/es.string.iterator.js";
@@ -14,23 +22,19 @@ import "core-js/modules/es.array.slice.js";
14
22
  import "core-js/modules/es.function.name.js";
15
23
  import "core-js/modules/es.array.from.js";
16
24
  import "core-js/modules/es.regexp.exec.js";
17
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
21
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
25
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
26
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
25
27
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
28
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
29
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
30
  import { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
31
+ import { stopImmediatePropagation } from "./helpers/dom/event.mjs";
29
32
  import { isOutsideInput } from "./helpers/dom/element.mjs";
30
33
  import { getEditorInstance } from "./editors/registry.mjs";
31
34
  import EventManager from "./eventManager.mjs";
32
35
  import { isDefined } from "./helpers/mixed.mjs";
33
36
  export var SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
37
+ export var SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';
34
38
  var EditorManager = /*#__PURE__*/function () {
35
39
  /**
36
40
  * @param {Core} instance The Handsontable instance.
@@ -95,6 +99,9 @@ var EditorManager = /*#__PURE__*/function () {
95
99
  * @type {object}
96
100
  */
97
101
  this.cellProperties = void 0;
102
+ var shortcutManager = this.instance.getShortcutManager();
103
+ shortcutManager.addContext('editor');
104
+ this.registerShortcuts();
98
105
  this.instance.addHook('afterDocumentKeyDown', function (event) {
99
106
  return _this.onAfterDocumentKeyDown(event);
100
107
  });
@@ -111,10 +118,66 @@ var EditorManager = /*#__PURE__*/function () {
111
118
  }
112
119
 
113
120
  /**
114
- * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
115
- * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
121
+ * Register shortcuts responsible for handling some actions related to an editor.
122
+ *
123
+ * @private
116
124
  */
117
125
  _createClass(EditorManager, [{
126
+ key: "registerShortcuts",
127
+ value: function registerShortcuts() {
128
+ var _this2 = this;
129
+ var shortcutManager = this.instance.getShortcutManager();
130
+ var gridContext = shortcutManager.getContext('grid');
131
+ var editorContext = shortcutManager.getContext('editor');
132
+ var config = {
133
+ group: SHORTCUTS_GROUP_EDITOR
134
+ };
135
+ editorContext.addShortcuts([{
136
+ keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],
137
+ callback: function callback(event, keys) {
138
+ _this2.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());
139
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
140
+ }
141
+ }, {
142
+ keys: [['Escape'], ['Escape', 'Control/Meta']],
143
+ callback: function callback() {
144
+ _this2.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());
145
+ _this2.activeEditor.focus();
146
+ }
147
+ }], config);
148
+ gridContext.addShortcuts([{
149
+ keys: [['F2']],
150
+ callback: function callback(event) {
151
+ _this2.openEditor(null, event, true);
152
+ }
153
+ }, {
154
+ keys: [['Backspace'], ['Delete']],
155
+ callback: function callback() {
156
+ _this2.instance.emptySelectedCells();
157
+ _this2.prepareEditor();
158
+ }
159
+ }, {
160
+ keys: [['Enter'], ['Enter', 'Shift']],
161
+ callback: function callback(event, keys) {
162
+ if (_this2.instance.getSettings().enterBeginsEditing) {
163
+ if (_this2.cellProperties.readOnly) {
164
+ _this2.moveSelectionAfterEnter();
165
+ } else {
166
+ _this2.openEditor(null, event, true);
167
+ }
168
+ } else {
169
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
170
+ }
171
+ stopImmediatePropagation(event); // required by HandsontableEditor
172
+ }
173
+ }], config);
174
+ }
175
+
176
+ /**
177
+ * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
178
+ * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
179
+ */
180
+ }, {
118
181
  key: "lockEditor",
119
182
  value: function lockEditor() {
120
183
  this.lock = true;
@@ -161,25 +224,21 @@ var EditorManager = /*#__PURE__*/function () {
161
224
  }, {
162
225
  key: "prepareEditor",
163
226
  value: function prepareEditor() {
164
- var _this2 = this;
227
+ var _this3 = this;
165
228
  if (this.lock) {
166
229
  return;
167
230
  }
168
231
  if (this.activeEditor && this.activeEditor.isWaiting()) {
169
232
  this.closeEditor(false, false, function (dataSaved) {
170
233
  if (dataSaved) {
171
- _this2.prepareEditor();
234
+ _this3.prepareEditor();
172
235
  }
173
236
  });
174
237
  return;
175
238
  }
176
- var _this$instance$getSel = this.instance.getSelectedRangeLast(),
177
- highlight = _this$instance$getSel.highlight;
178
- if (highlight.isHeader()) {
179
- return;
180
- }
181
- var row = highlight.row,
182
- col = highlight.col;
239
+ var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,
240
+ row = _this$instance$getSel.row,
241
+ col = _this$instance$getSel.col;
183
242
  var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
184
243
  var visualRowToCheck = row;
185
244
  var visualColumnToCheck = col;
@@ -369,12 +428,14 @@ var EditorManager = /*#__PURE__*/function () {
369
428
  }, {
370
429
  key: "onAfterDocumentKeyDown",
371
430
  value: function onAfterDocumentKeyDown(event) {
372
- var _this3 = this;
373
- var selection = this.instance.getSelectedRangeLast();
374
- if (!this.instance.isListening() || !selection || selection.highlight.isHeader()) {
431
+ var _this4 = this;
432
+ if (!this.instance.isListening()) {
375
433
  return;
376
434
  }
377
435
  var keyCode = event.keyCode;
436
+ if (!this.selection.isSelected()) {
437
+ return;
438
+ }
378
439
 
379
440
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
380
441
  var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
@@ -384,29 +445,29 @@ var EditorManager = /*#__PURE__*/function () {
384
445
  var editorContext = shortcutManager.getContext('editor');
385
446
  var runOnlySelectedConfig = {
386
447
  runOnlyIf: function runOnlyIf() {
387
- return isDefined(_this3.instance.getSelected());
448
+ return isDefined(_this4.instance.getSelected());
388
449
  },
389
450
  group: SHORTCUTS_GROUP_NAVIGATION
390
451
  };
391
452
  editorContext.addShortcuts([{
392
453
  keys: [['ArrowUp']],
393
454
  callback: function callback() {
394
- _this3.instance.selection.transformStart(-1, 0);
455
+ _this4.instance.selection.transformStart(-1, 0);
395
456
  }
396
457
  }, {
397
458
  keys: [['ArrowDown']],
398
459
  callback: function callback() {
399
- _this3.instance.selection.transformStart(1, 0);
460
+ _this4.instance.selection.transformStart(1, 0);
400
461
  }
401
462
  }, {
402
463
  keys: [['ArrowLeft']],
403
464
  callback: function callback() {
404
- _this3.instance.selection.transformStart(0, -1 * _this3.instance.getDirectionFactor());
465
+ _this4.instance.selection.transformStart(0, -1 * _this4.instance.getDirectionFactor());
405
466
  }
406
467
  }, {
407
468
  keys: [['ArrowRight']],
408
469
  callback: function callback() {
409
- _this3.instance.selection.transformStart(0, _this3.instance.getDirectionFactor());
470
+ _this4.instance.selection.transformStart(0, _this4.instance.getDirectionFactor());
410
471
  }
411
472
  }], runOnlySelectedConfig);
412
473
  this.openEditor('', event);
@@ -507,7 +507,9 @@ var TextEditor = /*#__PURE__*/function (_BaseEditor) {
507
507
  // We trigger a data population for multiple selection.
508
508
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
509
509
  !event.altKey;
510
- }
510
+ },
511
+ relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
512
+ position: 'before'
511
513
  }, {
512
514
  keys: [['Meta', 'Enter']],
513
515
  callback: function callback() {
@@ -517,13 +519,19 @@ var TextEditor = /*#__PURE__*/function (_BaseEditor) {
517
519
 
518
520
  runOnlyIf: function runOnlyIf() {
519
521
  return !_this4.hot.selection.isMultiple();
520
- } // We trigger a data population for multiple selection.
522
+ },
523
+ // We trigger a data population for multiple selection.
524
+ relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
525
+ position: 'before'
521
526
  }, {
522
527
  keys: [['Alt', 'Enter']],
523
528
  callback: function callback() {
524
529
  insertNewLine();
525
530
  return false; // Will block closing editor.
526
- }
531
+ },
532
+
533
+ relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
534
+ position: 'before'
527
535
  }, {
528
536
  // TODO: Duplicated part of code (callback to shortcut)
529
537
  keys: [['PageUp']],
@@ -47,7 +47,7 @@ import { rangeEach } from "../../helpers/number.mjs";
47
47
  import { KEY_CODES } from "../../helpers/unicode.mjs";
48
48
  import { autoResize } from "../../3rdparty/autoResize/index.mjs";
49
49
  import { isDefined } from "../../helpers/mixed.mjs";
50
- import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
50
+ import { SHORTCUTS_GROUP_NAVIGATION, SHORTCUTS_GROUP_EDITOR as EDITOR_MANAGER_GROUP } from "../../editorManager.mjs";
51
51
  import { SHORTCUTS_GROUP_EDITOR } from "../baseEditor/baseEditor.mjs";
52
52
  import { updateCaretPosition } from "./caretPositioner.mjs";
53
53
  var EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
@@ -501,7 +501,9 @@ export var TextEditor = /*#__PURE__*/function (_BaseEditor) {
501
501
  // We trigger a data population for multiple selection.
502
502
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
503
503
  !event.altKey;
504
- }
504
+ },
505
+ relativeToGroup: EDITOR_MANAGER_GROUP,
506
+ position: 'before'
505
507
  }, {
506
508
  keys: [['Meta', 'Enter']],
507
509
  callback: function callback() {
@@ -511,13 +513,19 @@ export var TextEditor = /*#__PURE__*/function (_BaseEditor) {
511
513
 
512
514
  runOnlyIf: function runOnlyIf() {
513
515
  return !_this4.hot.selection.isMultiple();
514
- } // We trigger a data population for multiple selection.
516
+ },
517
+ // We trigger a data population for multiple selection.
518
+ relativeToGroup: EDITOR_MANAGER_GROUP,
519
+ position: 'before'
515
520
  }, {
516
521
  keys: [['Alt', 'Enter']],
517
522
  callback: function callback() {
518
523
  insertNewLine();
519
524
  return false; // Will block closing editor.
520
- }
525
+ },
526
+
527
+ relativeToGroup: EDITOR_MANAGER_GROUP,
528
+ position: 'before'
521
529
  }, {
522
530
  // TODO: Duplicated part of code (callback to shortcut)
523
531
  keys: [['PageUp']],
package/helpers/mixed.js CHANGED
@@ -152,7 +152,7 @@ var domMessages = {
152
152
  function _injectProductInfo(key, element) {
153
153
  var hasValidType = !isEmpty(key);
154
154
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
155
- var hotVersion = "0.0.0-next-93e34dc-20230601";
155
+ var hotVersion = "0.0.0-next-b7cca45-20230605";
156
156
  var keyValidityDate;
157
157
  var consoleMessageState = 'invalid';
158
158
  var domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -142,7 +142,7 @@ var domMessages = {
142
142
  export function _injectProductInfo(key, element) {
143
143
  var hasValidType = !isEmpty(key);
144
144
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
145
- var hotVersion = "0.0.0-next-93e34dc-20230601";
145
+ var hotVersion = "0.0.0-next-b7cca45-20230605";
146
146
  var keyValidityDate;
147
147
  var consoleMessageState = 'invalid';
148
148
  var domMessageState = 'invalid';
@@ -3,4 +3,3 @@ export function isNumericLike(value: any): boolean;
3
3
  export function rangeEach(rangeFrom: number, rangeTo: number, iteratee: (index: number) => void): void;
4
4
  export function rangeEachReverse(rangeFrom: number, rangeTo: number, iteratee: (index: number) => void): void;
5
5
  export function valueAccordingPercent(value: number, percent: string | number): number;
6
- export function clamp(value: number, minValue: number, maxValue: number): number;
package/helpers/number.js CHANGED
@@ -3,7 +3,6 @@
3
3
  require("core-js/modules/es.array.slice.js");
4
4
  require("core-js/modules/es.function.name.js");
5
5
  exports.__esModule = true;
6
- exports.clamp = clamp;
7
6
  exports.isNumeric = isNumeric;
8
7
  exports.isNumericLike = isNumericLike;
9
8
  exports.rangeEach = rangeEach;
@@ -140,21 +139,4 @@ function valueAccordingPercent(value, percent) {
140
139
  percent = parseInt(percent.toString().replace('%', ''), 10);
141
140
  percent = isNaN(percent) ? 0 : percent;
142
141
  return parseInt(value * percent / 100, 10);
143
- }
144
-
145
- /**
146
- * Clamps the value between min and max.
147
- *
148
- * @param {number} value The base number value.
149
- * @param {number} minValue The max number value.
150
- * @param {number} maxValue The min number value.
151
- * @returns {number}
152
- */
153
- function clamp(value, minValue, maxValue) {
154
- if (Math.min(value, minValue) === value) {
155
- return minValue;
156
- } else if (Math.max(value, maxValue) === value) {
157
- return maxValue;
158
- }
159
- return value;
160
142
  }
@@ -131,21 +131,4 @@ export function valueAccordingPercent(value, percent) {
131
131
  percent = parseInt(percent.toString().replace('%', ''), 10);
132
132
  percent = isNaN(percent) ? 0 : percent;
133
133
  return parseInt(value * percent / 100, 10);
134
- }
135
-
136
- /**
137
- * Clamps the value between min and max.
138
- *
139
- * @param {number} value The base number value.
140
- * @param {number} minValue The max number value.
141
- * @param {number} maxValue The min number value.
142
- * @returns {number}
143
- */
144
- export function clamp(value, minValue, maxValue) {
145
- if (Math.min(value, minValue) === value) {
146
- return minValue;
147
- } else if (Math.max(value, maxValue) === value) {
148
- return maxValue;
149
- }
150
- return value;
151
134
  }
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-93e34dc-20230601",
13
+ "version": "0.0.0-next-b7cca45-20230605",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.js CHANGED
@@ -2414,7 +2414,7 @@ var REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['u
2414
2414
  * @type {Map<string, string>}
2415
2415
  */
2416
2416
  /* eslint-enable jsdoc/require-description-complete-sentence */
2417
- var DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.'], ['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
2417
+ var DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.']]);
2418
2418
  var Hooks = /*#__PURE__*/function () {
2419
2419
  /**
2420
2420
  *
package/pluginHooks.mjs CHANGED
@@ -2411,7 +2411,7 @@ var REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['u
2411
2411
  * @type {Map<string, string>}
2412
2412
  */
2413
2413
  /* eslint-enable jsdoc/require-description-complete-sentence */
2414
- var DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.'], ['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
2414
+ var DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.']]);
2415
2415
  var Hooks = /*#__PURE__*/function () {
2416
2416
  /**
2417
2417
  *
@@ -527,10 +527,6 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
527
527
  if (!selectionRange) {
528
528
  return;
529
529
  }
530
- if (selectionRange.isSingleHeader()) {
531
- this.copyableRanges = [];
532
- return;
533
- }
534
530
  _classPrivateFieldGet(this, _copyableRangesFactory).setSelectedRange(selectionRange);
535
531
  var groupedRanges = new Map([['headers', null], ['cells', null]]);
536
532
  if (_classPrivateFieldGet(this, _copyMode) === 'column-headers-only') {
@@ -759,7 +755,7 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
759
755
  if (typeof pastedData === 'string') {
760
756
  pastedData = (0, _SheetClip.parse)(pastedData);
761
757
  }
762
- if (pastedData === void 0 || pastedData && pastedData.length === 0) {
758
+ if (pastedData && pastedData.length === 0) {
763
759
  return;
764
760
  }
765
761
  if (this.hot.runHooks('beforePaste', pastedData, this.copyableRanges) === false) {
@@ -520,10 +520,6 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
520
520
  if (!selectionRange) {
521
521
  return;
522
522
  }
523
- if (selectionRange.isSingleHeader()) {
524
- this.copyableRanges = [];
525
- return;
526
- }
527
523
  _classPrivateFieldGet(this, _copyableRangesFactory).setSelectedRange(selectionRange);
528
524
  var groupedRanges = new Map([['headers', null], ['cells', null]]);
529
525
  if (_classPrivateFieldGet(this, _copyMode) === 'column-headers-only') {
@@ -752,7 +748,7 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
752
748
  if (typeof pastedData === 'string') {
753
749
  pastedData = parse(pastedData);
754
750
  }
755
- if (pastedData === void 0 || pastedData && pastedData.length === 0) {
751
+ if (pastedData && pastedData.length === 0) {
756
752
  return;
757
753
  }
758
754
  if (this.hot.runHooks('beforePaste', pastedData, this.copyableRanges) === false) {