handsontable 0.0.0-next-59715d3-20230523 → 0.0.0-next-93e34dc-20230601

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