handsontable 0.0.0-next-d1c8e0e-20230621 → 0.0.0-next-c765185-20230622

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.

Files changed (280) 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 +355 -0
  28. package/3rdparty/walkontable/src/selection.mjs +349 -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/CHANGELOG.md +31 -0
  42. package/base.js +2 -2
  43. package/base.mjs +2 -2
  44. package/core.d.ts +3 -5
  45. package/core.js +309 -127
  46. package/core.mjs +309 -127
  47. package/dataMap/metaManager/metaSchema.js +0 -19
  48. package/dataMap/metaManager/metaSchema.mjs +0 -19
  49. package/dist/handsontable.css +3 -8
  50. package/dist/handsontable.full.css +3 -8
  51. package/dist/handsontable.full.js +10826 -13821
  52. package/dist/handsontable.full.min.css +3 -3
  53. package/dist/handsontable.full.min.js +115 -115
  54. package/dist/handsontable.js +13565 -16560
  55. package/dist/handsontable.min.css +3 -3
  56. package/dist/handsontable.min.js +4 -4
  57. package/editorManager.js +94 -21
  58. package/editorManager.mjs +98 -26
  59. package/editors/textEditor/textEditor.js +11 -3
  60. package/editors/textEditor/textEditor.mjs +12 -4
  61. package/helpers/mixed.js +2 -2
  62. package/helpers/mixed.mjs +2 -2
  63. package/helpers/number.d.ts +0 -1
  64. package/helpers/number.js +0 -18
  65. package/helpers/number.mjs +0 -17
  66. package/package.json +1 -1
  67. package/pluginHooks.d.ts +1 -5
  68. package/pluginHooks.js +1 -89
  69. package/pluginHooks.mjs +1 -89
  70. package/plugins/collapsibleColumns/collapsibleColumns.js +24 -81
  71. package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -81
  72. package/plugins/columnSorting/columnSorting.js +8 -50
  73. package/plugins/columnSorting/columnSorting.mjs +9 -49
  74. package/plugins/columnSorting/index.js +2 -4
  75. package/plugins/columnSorting/index.mjs +1 -1
  76. package/plugins/comments/comments.js +4 -11
  77. package/plugins/comments/comments.mjs +4 -11
  78. package/plugins/contextMenu/contextMenu.d.ts +1 -1
  79. package/plugins/contextMenu/contextMenu.js +29 -80
  80. package/plugins/contextMenu/contextMenu.mjs +30 -81
  81. package/plugins/contextMenu/predefinedItems/alignment.js +0 -7
  82. package/plugins/contextMenu/predefinedItems/alignment.mjs +0 -7
  83. package/plugins/contextMenu/predefinedItems/clearColumn.js +3 -5
  84. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +3 -5
  85. package/plugins/contextMenu/predefinedItems/columnLeft.js +3 -5
  86. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +3 -5
  87. package/plugins/contextMenu/predefinedItems/columnRight.js +3 -5
  88. package/plugins/contextMenu/predefinedItems/columnRight.mjs +3 -5
  89. package/plugins/contextMenu/predefinedItems/readOnly.js +0 -7
  90. package/plugins/contextMenu/predefinedItems/readOnly.mjs +0 -7
  91. package/plugins/contextMenu/predefinedItems/removeColumn.js +5 -7
  92. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +3 -5
  93. package/plugins/contextMenu/predefinedItems/removeRow.js +5 -7
  94. package/plugins/contextMenu/predefinedItems/removeRow.mjs +3 -5
  95. package/plugins/contextMenu/predefinedItems/rowAbove.js +3 -5
  96. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +3 -5
  97. package/plugins/contextMenu/predefinedItems/rowBelow.js +3 -5
  98. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +3 -5
  99. package/plugins/contextMenu/utils.js +16 -25
  100. package/plugins/contextMenu/utils.mjs +15 -24
  101. package/plugins/copyPaste/contextMenuItem/copy.js +0 -7
  102. package/plugins/copyPaste/contextMenuItem/copy.mjs +0 -7
  103. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +1 -9
  104. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +1 -9
  105. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +1 -9
  106. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +1 -9
  107. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +1 -9
  108. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +1 -9
  109. package/plugins/copyPaste/contextMenuItem/cut.js +0 -7
  110. package/plugins/copyPaste/contextMenuItem/cut.mjs +0 -7
  111. package/plugins/copyPaste/copyPaste.js +1 -5
  112. package/plugins/copyPaste/copyPaste.mjs +1 -5
  113. package/plugins/customBorders/customBorders.js +53 -25
  114. package/plugins/customBorders/customBorders.mjs +54 -26
  115. package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
  116. package/plugins/dropdownMenu/dropdownMenu.js +30 -94
  117. package/plugins/dropdownMenu/dropdownMenu.mjs +30 -94
  118. package/plugins/filters/filters.js +42 -62
  119. package/plugins/filters/filters.mjs +41 -61
  120. package/plugins/mergeCells/mergeCells.js +18 -5
  121. package/plugins/mergeCells/mergeCells.mjs +18 -5
  122. package/plugins/multiColumnSorting/multiColumnSorting.js +3 -42
  123. package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -42
  124. package/plugins/nestedHeaders/nestedHeaders.js +10 -132
  125. package/plugins/nestedHeaders/nestedHeaders.mjs +10 -132
  126. package/plugins/nestedHeaders/stateManager/index.js +0 -37
  127. package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
  128. package/plugins/nestedRows/nestedRows.js +7 -52
  129. package/plugins/nestedRows/nestedRows.mjs +7 -52
  130. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  131. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  132. package/selection/highlight/constants.js +16 -0
  133. package/selection/highlight/constants.mjs +6 -0
  134. package/selection/highlight/highlight.js +89 -312
  135. package/selection/highlight/highlight.mjs +85 -302
  136. package/selection/highlight/types/activeHeader.js +9 -10
  137. package/selection/highlight/types/activeHeader.mjs +8 -10
  138. package/selection/highlight/types/area.js +27 -12
  139. package/selection/highlight/types/area.mjs +30 -16
  140. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  141. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  142. package/selection/highlight/types/customSelection.js +10 -7
  143. package/selection/highlight/types/customSelection.mjs +9 -7
  144. package/selection/highlight/types/fill.js +8 -5
  145. package/selection/highlight/types/fill.mjs +7 -5
  146. package/selection/highlight/types/header.js +20 -10
  147. package/selection/highlight/types/header.mjs +19 -10
  148. package/selection/highlight/types/{row.js → index.js} +31 -27
  149. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  150. package/selection/highlight/visualSelection.js +27 -31
  151. package/selection/highlight/visualSelection.mjs +27 -31
  152. package/selection/index.js +7 -4
  153. package/selection/index.mjs +3 -2
  154. package/selection/mouseEventHandler.js +1 -1
  155. package/selection/mouseEventHandler.mjs +1 -1
  156. package/selection/range.js +8 -8
  157. package/selection/range.mjs +8 -8
  158. package/selection/selection.js +181 -315
  159. package/selection/selection.mjs +180 -310
  160. package/selection/transformation.js +96 -233
  161. package/selection/transformation.mjs +93 -230
  162. package/selection/utils.js +36 -12
  163. package/selection/utils.mjs +36 -13
  164. package/settings.d.ts +0 -1
  165. package/shortcuts/manager.js +0 -2
  166. package/shortcuts/manager.mjs +0 -2
  167. package/shortcuts/recorder.js +2 -2
  168. package/shortcuts/recorder.mjs +2 -2
  169. package/shortcuts/utils.js +5 -21
  170. package/shortcuts/utils.mjs +4 -20
  171. package/tableView.js +9 -58
  172. package/tableView.mjs +9 -58
  173. package/translations/indexMapper.js +9 -8
  174. package/translations/indexMapper.mjs +9 -8
  175. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  176. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  177. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  178. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  179. package/3rdparty/walkontable/src/selection/index.js +0 -30
  180. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  181. package/3rdparty/walkontable/src/selection/manager.js +0 -329
  182. package/3rdparty/walkontable/src/selection/manager.mjs +0 -323
  183. package/3rdparty/walkontable/src/selection/scanner.js +0 -364
  184. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -360
  185. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  186. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  187. package/selection/highlight/types/areaLayered.js +0 -54
  188. package/selection/highlight/types/areaLayered.mjs +0 -49
  189. package/selection/highlight/types/column.js +0 -50
  190. package/selection/highlight/types/column.mjs +0 -45
  191. package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
  192. package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
  193. package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
  194. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
  195. package/shortcutContexts/commands/editor/fastOpen.js +0 -16
  196. package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
  197. package/shortcutContexts/commands/editor/index.js +0 -16
  198. package/shortcutContexts/commands/editor/index.mjs +0 -12
  199. package/shortcutContexts/commands/editor/open.js +0 -29
  200. package/shortcutContexts/commands/editor/open.mjs +0 -24
  201. package/shortcutContexts/commands/emptySelectedCells.js +0 -12
  202. package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
  203. package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
  204. package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
  205. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
  206. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
  207. package/shortcutContexts/commands/extendCellsSelection/index.js +0 -26
  208. package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -22
  209. package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
  210. package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
  211. package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
  212. package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
  213. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +0 -19
  214. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +0 -14
  215. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
  216. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
  217. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
  218. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
  219. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
  220. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
  221. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -40
  222. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -35
  223. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -40
  224. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -35
  225. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
  226. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
  227. package/shortcutContexts/commands/extendCellsSelection/toRows.js +0 -19
  228. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +0 -14
  229. package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
  230. package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
  231. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
  232. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
  233. package/shortcutContexts/commands/index.js +0 -52
  234. package/shortcutContexts/commands/index.mjs +0 -48
  235. package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
  236. package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
  237. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -29
  238. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -24
  239. package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
  240. package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
  241. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
  242. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
  243. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
  244. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
  245. package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
  246. package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
  247. package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
  248. package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
  249. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
  250. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
  251. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
  252. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
  253. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
  254. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
  255. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
  256. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
  257. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -36
  258. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -31
  259. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -36
  260. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -31
  261. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
  262. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
  263. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
  264. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
  265. package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
  266. package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
  267. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -29
  268. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -24
  269. package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
  270. package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
  271. package/shortcutContexts/commands/selectAll.js +0 -11
  272. package/shortcutContexts/commands/selectAll.mjs +0 -6
  273. package/shortcutContexts/constants.js +0 -19
  274. package/shortcutContexts/constants.mjs +0 -12
  275. package/shortcutContexts/editor.js +0 -29
  276. package/shortcutContexts/editor.mjs +0 -25
  277. package/shortcutContexts/grid.js +0 -247
  278. package/shortcutContexts/grid.mjs +0 -243
  279. package/shortcutContexts/index.js +0 -29
  280. package/shortcutContexts/index.mjs +0 -15
package/editorManager.js CHANGED
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.object.keys.js");
4
+ require("core-js/modules/es.array.filter.js");
5
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
6
+ require("core-js/modules/web.dom-collections.for-each.js");
7
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
3
8
  require("core-js/modules/es.symbol.iterator.js");
4
9
  require("core-js/modules/es.array.slice.js");
5
10
  require("core-js/modules/es.regexp.to-string.js");
@@ -7,7 +12,9 @@ require("core-js/modules/es.function.name.js");
7
12
  require("core-js/modules/es.array.from.js");
8
13
  require("core-js/modules/es.regexp.exec.js");
9
14
  exports.__esModule = true;
10
- exports.default = exports.SHORTCUTS_GROUP_NAVIGATION = void 0;
15
+ exports.default = exports.SHORTCUTS_GROUP_NAVIGATION = exports.SHORTCUTS_GROUP_EDITOR = void 0;
16
+ require("core-js/modules/es.array.includes.js");
17
+ require("core-js/modules/es.string.includes.js");
11
18
  require("core-js/modules/es.symbol.to-primitive.js");
12
19
  require("core-js/modules/es.date.to-primitive.js");
13
20
  require("core-js/modules/es.symbol.js");
@@ -19,8 +26,8 @@ require("core-js/modules/es.string.iterator.js");
19
26
  require("core-js/modules/es.weak-map.js");
20
27
  require("core-js/modules/web.dom-collections.iterator.js");
21
28
  var _unicode = require("./helpers/unicode");
22
- var _element = require("./helpers/dom/element");
23
29
  var _event = require("./helpers/dom/event");
30
+ var _element = require("./helpers/dom/element");
24
31
  var _registry = require("./editors/registry");
25
32
  var _eventManager = _interopRequireDefault(require("./eventManager"));
26
33
  var _mixed = require("./helpers/mixed");
@@ -32,6 +39,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
32
39
  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; }
33
40
  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; } }
34
41
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
42
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
43
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
44
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
45
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
36
46
  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); } }
37
47
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -39,6 +49,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
39
49
  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); }
40
50
  var SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
41
51
  exports.SHORTCUTS_GROUP_NAVIGATION = SHORTCUTS_GROUP_NAVIGATION;
52
+ var SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';
53
+ exports.SHORTCUTS_GROUP_EDITOR = SHORTCUTS_GROUP_EDITOR;
42
54
  var EditorManager = /*#__PURE__*/function () {
43
55
  /**
44
56
  * @param {Core} instance The Handsontable instance.
@@ -103,6 +115,9 @@ var EditorManager = /*#__PURE__*/function () {
103
115
  * @type {object}
104
116
  */
105
117
  this.cellProperties = void 0;
118
+ var shortcutManager = this.instance.getShortcutManager();
119
+ shortcutManager.addContext('editor');
120
+ this.registerShortcuts();
106
121
  this.instance.addHook('afterDocumentKeyDown', function (event) {
107
122
  return _this.onAfterDocumentKeyDown(event);
108
123
  });
@@ -119,10 +134,70 @@ var EditorManager = /*#__PURE__*/function () {
119
134
  }
120
135
 
121
136
  /**
122
- * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
123
- * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
137
+ * Register shortcuts responsible for handling some actions related to an editor.
138
+ *
139
+ * @private
124
140
  */
125
141
  _createClass(EditorManager, [{
142
+ key: "registerShortcuts",
143
+ value: function registerShortcuts() {
144
+ var _this2 = this;
145
+ var shortcutManager = this.instance.getShortcutManager();
146
+ var gridContext = shortcutManager.getContext('grid');
147
+ var editorContext = shortcutManager.getContext('editor');
148
+ var config = {
149
+ group: SHORTCUTS_GROUP_EDITOR
150
+ };
151
+ editorContext.addShortcuts([{
152
+ keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],
153
+ callback: function callback(event, keys) {
154
+ _this2.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());
155
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
156
+ }
157
+ }, {
158
+ keys: [['Escape'], ['Escape', 'Control/Meta']],
159
+ callback: function callback() {
160
+ _this2.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());
161
+ _this2.activeEditor.focus();
162
+ }
163
+ }], config);
164
+ gridContext.addShortcuts([{
165
+ keys: [['F2']],
166
+ callback: function callback(event) {
167
+ _this2.openEditor(null, event, true);
168
+ }
169
+ }, {
170
+ keys: [['Backspace'], ['Delete']],
171
+ callback: function callback() {
172
+ _this2.instance.emptySelectedCells();
173
+ _this2.prepareEditor();
174
+ }
175
+ }, {
176
+ keys: [['Enter'], ['Enter', 'Shift']],
177
+ callback: function callback(event, keys) {
178
+ if (_this2.instance.getSettings().enterBeginsEditing) {
179
+ if (_this2.cellProperties.readOnly) {
180
+ _this2.moveSelectionAfterEnter();
181
+ } else {
182
+ _this2.openEditor(null, event, true);
183
+ }
184
+ } else {
185
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
186
+ }
187
+ (0, _event.stopImmediatePropagation)(event); // required by HandsontableEditor
188
+ }
189
+ }], _objectSpread(_objectSpread({}, config), {}, {
190
+ runOnlyIf: function runOnlyIf() {
191
+ return (0, _mixed.isDefined)(_this2.instance.getSelected());
192
+ }
193
+ }));
194
+ }
195
+
196
+ /**
197
+ * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
198
+ * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
199
+ */
200
+ }, {
126
201
  key: "lockEditor",
127
202
  value: function lockEditor() {
128
203
  this.lock = true;
@@ -169,25 +244,21 @@ var EditorManager = /*#__PURE__*/function () {
169
244
  }, {
170
245
  key: "prepareEditor",
171
246
  value: function prepareEditor() {
172
- var _this2 = this;
247
+ var _this3 = this;
173
248
  if (this.lock) {
174
249
  return;
175
250
  }
176
251
  if (this.activeEditor && this.activeEditor.isWaiting()) {
177
252
  this.closeEditor(false, false, function (dataSaved) {
178
253
  if (dataSaved) {
179
- _this2.prepareEditor();
254
+ _this3.prepareEditor();
180
255
  }
181
256
  });
182
257
  return;
183
258
  }
184
- var _this$instance$getSel = this.instance.getSelectedRangeLast(),
185
- highlight = _this$instance$getSel.highlight;
186
- if (highlight.isHeader()) {
187
- return;
188
- }
189
- var row = highlight.row,
190
- col = highlight.col;
259
+ var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,
260
+ row = _this$instance$getSel.row,
261
+ col = _this$instance$getSel.col;
191
262
  var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
192
263
  var visualRowToCheck = row;
193
264
  var visualColumnToCheck = col;
@@ -377,12 +448,14 @@ var EditorManager = /*#__PURE__*/function () {
377
448
  }, {
378
449
  key: "onAfterDocumentKeyDown",
379
450
  value: function onAfterDocumentKeyDown(event) {
380
- var _this3 = this;
381
- var selection = this.instance.getSelectedRangeLast();
382
- if (!this.instance.isListening() || !selection || selection.highlight.isHeader() || (0, _event.isImmediatePropagationStopped)(event)) {
451
+ var _this4 = this;
452
+ if (!this.instance.isListening()) {
383
453
  return;
384
454
  }
385
455
  var keyCode = event.keyCode;
456
+ if (!this.selection.isSelected()) {
457
+ return;
458
+ }
386
459
 
387
460
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
388
461
  var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
@@ -392,29 +465,29 @@ var EditorManager = /*#__PURE__*/function () {
392
465
  var editorContext = shortcutManager.getContext('editor');
393
466
  var runOnlySelectedConfig = {
394
467
  runOnlyIf: function runOnlyIf() {
395
- return (0, _mixed.isDefined)(_this3.instance.getSelected());
468
+ return (0, _mixed.isDefined)(_this4.instance.getSelected());
396
469
  },
397
470
  group: SHORTCUTS_GROUP_NAVIGATION
398
471
  };
399
472
  editorContext.addShortcuts([{
400
473
  keys: [['ArrowUp']],
401
474
  callback: function callback() {
402
- _this3.instance.selection.transformStart(-1, 0);
475
+ _this4.instance.selection.transformStart(-1, 0);
403
476
  }
404
477
  }, {
405
478
  keys: [['ArrowDown']],
406
479
  callback: function callback() {
407
- _this3.instance.selection.transformStart(1, 0);
480
+ _this4.instance.selection.transformStart(1, 0);
408
481
  }
409
482
  }, {
410
483
  keys: [['ArrowLeft']],
411
484
  callback: function callback() {
412
- _this3.instance.selection.transformStart(0, -1 * _this3.instance.getDirectionFactor());
485
+ _this4.instance.selection.transformStart(0, -1 * _this4.instance.getDirectionFactor());
413
486
  }
414
487
  }, {
415
488
  keys: [['ArrowRight']],
416
489
  callback: function callback() {
417
- _this3.instance.selection.transformStart(0, _this3.instance.getDirectionFactor());
490
+ _this4.instance.selection.transformStart(0, _this4.instance.getDirectionFactor());
418
491
  }
419
492
  }], runOnlySelectedConfig);
420
493
  this.openEditor('', event);
package/editorManager.mjs CHANGED
@@ -1,4 +1,15 @@
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
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ import "core-js/modules/es.array.includes.js";
12
+ import "core-js/modules/es.string.includes.js";
2
13
  import "core-js/modules/es.array.iterator.js";
3
14
  import "core-js/modules/es.object.to-string.js";
4
15
  import "core-js/modules/es.string.iterator.js";
@@ -9,30 +20,30 @@ import "core-js/modules/es.date.to-primitive.js";
9
20
  import "core-js/modules/es.symbol.js";
10
21
  import "core-js/modules/es.symbol.description.js";
11
22
  import "core-js/modules/es.number.constructor.js";
23
+ import "core-js/modules/es.object.keys.js";
24
+ import "core-js/modules/es.array.filter.js";
25
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
26
+ import "core-js/modules/web.dom-collections.for-each.js";
27
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
12
28
  import "core-js/modules/es.symbol.iterator.js";
13
29
  import "core-js/modules/es.array.slice.js";
14
30
  import "core-js/modules/es.regexp.to-string.js";
15
31
  import "core-js/modules/es.function.name.js";
16
32
  import "core-js/modules/es.array.from.js";
17
33
  import "core-js/modules/es.regexp.exec.js";
18
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
- 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."); }
20
- 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); }
21
- 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; }
22
- 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; } }
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
34
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
35
  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); } }
26
36
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
37
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
28
38
  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); }
29
39
  import { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
40
+ import { stopImmediatePropagation } from "./helpers/dom/event.mjs";
30
41
  import { isOutsideInput } from "./helpers/dom/element.mjs";
31
- import { isImmediatePropagationStopped } from "./helpers/dom/event.mjs";
32
42
  import { getEditorInstance } from "./editors/registry.mjs";
33
43
  import EventManager from "./eventManager.mjs";
34
44
  import { isDefined } from "./helpers/mixed.mjs";
35
45
  export var SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
46
+ export var SHORTCUTS_GROUP_EDITOR = 'editorManager.handlingEditor';
36
47
  var EditorManager = /*#__PURE__*/function () {
37
48
  /**
38
49
  * @param {Core} instance The Handsontable instance.
@@ -97,6 +108,9 @@ var EditorManager = /*#__PURE__*/function () {
97
108
  * @type {object}
98
109
  */
99
110
  this.cellProperties = void 0;
111
+ var shortcutManager = this.instance.getShortcutManager();
112
+ shortcutManager.addContext('editor');
113
+ this.registerShortcuts();
100
114
  this.instance.addHook('afterDocumentKeyDown', function (event) {
101
115
  return _this.onAfterDocumentKeyDown(event);
102
116
  });
@@ -113,10 +127,70 @@ var EditorManager = /*#__PURE__*/function () {
113
127
  }
114
128
 
115
129
  /**
116
- * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
117
- * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
130
+ * Register shortcuts responsible for handling some actions related to an editor.
131
+ *
132
+ * @private
118
133
  */
119
134
  _createClass(EditorManager, [{
135
+ key: "registerShortcuts",
136
+ value: function registerShortcuts() {
137
+ var _this2 = this;
138
+ var shortcutManager = this.instance.getShortcutManager();
139
+ var gridContext = shortcutManager.getContext('grid');
140
+ var editorContext = shortcutManager.getContext('editor');
141
+ var config = {
142
+ group: SHORTCUTS_GROUP_EDITOR
143
+ };
144
+ editorContext.addShortcuts([{
145
+ keys: [['Enter'], ['Enter', 'Shift'], ['Enter', 'Control/Meta'], ['Enter', 'Control/Meta', 'Shift']],
146
+ callback: function callback(event, keys) {
147
+ _this2.closeEditorAndSaveChanges(shortcutManager.isCtrlPressed());
148
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
149
+ }
150
+ }, {
151
+ keys: [['Escape'], ['Escape', 'Control/Meta']],
152
+ callback: function callback() {
153
+ _this2.closeEditorAndRestoreOriginalValue(shortcutManager.isCtrlPressed());
154
+ _this2.activeEditor.focus();
155
+ }
156
+ }], config);
157
+ gridContext.addShortcuts([{
158
+ keys: [['F2']],
159
+ callback: function callback(event) {
160
+ _this2.openEditor(null, event, true);
161
+ }
162
+ }, {
163
+ keys: [['Backspace'], ['Delete']],
164
+ callback: function callback() {
165
+ _this2.instance.emptySelectedCells();
166
+ _this2.prepareEditor();
167
+ }
168
+ }, {
169
+ keys: [['Enter'], ['Enter', 'Shift']],
170
+ callback: function callback(event, keys) {
171
+ if (_this2.instance.getSettings().enterBeginsEditing) {
172
+ if (_this2.cellProperties.readOnly) {
173
+ _this2.moveSelectionAfterEnter();
174
+ } else {
175
+ _this2.openEditor(null, event, true);
176
+ }
177
+ } else {
178
+ _this2.moveSelectionAfterEnter(keys.includes('shift'));
179
+ }
180
+ stopImmediatePropagation(event); // required by HandsontableEditor
181
+ }
182
+ }], _objectSpread(_objectSpread({}, config), {}, {
183
+ runOnlyIf: function runOnlyIf() {
184
+ return isDefined(_this2.instance.getSelected());
185
+ }
186
+ }));
187
+ }
188
+
189
+ /**
190
+ * Lock the editor from being prepared and closed. Locking the editor prevents its closing and
191
+ * reinitialized after selecting the new cell. This feature is necessary for a mobile editor.
192
+ */
193
+ }, {
120
194
  key: "lockEditor",
121
195
  value: function lockEditor() {
122
196
  this.lock = true;
@@ -163,25 +237,21 @@ var EditorManager = /*#__PURE__*/function () {
163
237
  }, {
164
238
  key: "prepareEditor",
165
239
  value: function prepareEditor() {
166
- var _this2 = this;
240
+ var _this3 = this;
167
241
  if (this.lock) {
168
242
  return;
169
243
  }
170
244
  if (this.activeEditor && this.activeEditor.isWaiting()) {
171
245
  this.closeEditor(false, false, function (dataSaved) {
172
246
  if (dataSaved) {
173
- _this2.prepareEditor();
247
+ _this3.prepareEditor();
174
248
  }
175
249
  });
176
250
  return;
177
251
  }
178
- var _this$instance$getSel = this.instance.getSelectedRangeLast(),
179
- highlight = _this$instance$getSel.highlight;
180
- if (highlight.isHeader()) {
181
- return;
182
- }
183
- var row = highlight.row,
184
- col = highlight.col;
252
+ var _this$instance$getSel = this.instance.getSelectedRangeLast().highlight,
253
+ row = _this$instance$getSel.row,
254
+ col = _this$instance$getSel.col;
185
255
  var modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
186
256
  var visualRowToCheck = row;
187
257
  var visualColumnToCheck = col;
@@ -371,12 +441,14 @@ var EditorManager = /*#__PURE__*/function () {
371
441
  }, {
372
442
  key: "onAfterDocumentKeyDown",
373
443
  value: function onAfterDocumentKeyDown(event) {
374
- var _this3 = this;
375
- var selection = this.instance.getSelectedRangeLast();
376
- if (!this.instance.isListening() || !selection || selection.highlight.isHeader() || isImmediatePropagationStopped(event)) {
444
+ var _this4 = this;
445
+ if (!this.instance.isListening()) {
377
446
  return;
378
447
  }
379
448
  var keyCode = event.keyCode;
449
+ if (!this.selection.isSelected()) {
450
+ return;
451
+ }
380
452
 
381
453
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
382
454
  var isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
@@ -386,29 +458,29 @@ var EditorManager = /*#__PURE__*/function () {
386
458
  var editorContext = shortcutManager.getContext('editor');
387
459
  var runOnlySelectedConfig = {
388
460
  runOnlyIf: function runOnlyIf() {
389
- return isDefined(_this3.instance.getSelected());
461
+ return isDefined(_this4.instance.getSelected());
390
462
  },
391
463
  group: SHORTCUTS_GROUP_NAVIGATION
392
464
  };
393
465
  editorContext.addShortcuts([{
394
466
  keys: [['ArrowUp']],
395
467
  callback: function callback() {
396
- _this3.instance.selection.transformStart(-1, 0);
468
+ _this4.instance.selection.transformStart(-1, 0);
397
469
  }
398
470
  }, {
399
471
  keys: [['ArrowDown']],
400
472
  callback: function callback() {
401
- _this3.instance.selection.transformStart(1, 0);
473
+ _this4.instance.selection.transformStart(1, 0);
402
474
  }
403
475
  }, {
404
476
  keys: [['ArrowLeft']],
405
477
  callback: function callback() {
406
- _this3.instance.selection.transformStart(0, -1 * _this3.instance.getDirectionFactor());
478
+ _this4.instance.selection.transformStart(0, -1 * _this4.instance.getDirectionFactor());
407
479
  }
408
480
  }, {
409
481
  keys: [['ArrowRight']],
410
482
  callback: function callback() {
411
- _this3.instance.selection.transformStart(0, _this3.instance.getDirectionFactor());
483
+ _this4.instance.selection.transformStart(0, _this4.instance.getDirectionFactor());
412
484
  }
413
485
  }], runOnlySelectedConfig);
414
486
  this.openEditor('', event);
@@ -508,7 +508,9 @@ var TextEditor = /*#__PURE__*/function (_BaseEditor) {
508
508
  // We trigger a data population for multiple selection.
509
509
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
510
510
  !event.altKey;
511
- }
511
+ },
512
+ relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
513
+ position: 'before'
512
514
  }, {
513
515
  keys: [['Meta', 'Enter']],
514
516
  callback: function callback() {
@@ -518,13 +520,19 @@ var TextEditor = /*#__PURE__*/function (_BaseEditor) {
518
520
 
519
521
  runOnlyIf: function runOnlyIf() {
520
522
  return !_this4.hot.selection.isMultiple();
521
- } // We trigger a data population for multiple selection.
523
+ },
524
+ // We trigger a data population for multiple selection.
525
+ relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
526
+ position: 'before'
522
527
  }, {
523
528
  keys: [['Alt', 'Enter']],
524
529
  callback: function callback() {
525
530
  insertNewLine();
526
531
  return false; // Will block closing editor.
527
- }
532
+ },
533
+
534
+ relativeToGroup: _editorManager.SHORTCUTS_GROUP_EDITOR,
535
+ position: 'before'
528
536
  }, {
529
537
  // TODO: Duplicated part of code (callback to shortcut)
530
538
  keys: [['PageUp']],
@@ -48,7 +48,7 @@ import { rangeEach } from "../../helpers/number.mjs";
48
48
  import { KEY_CODES } from "../../helpers/unicode.mjs";
49
49
  import { autoResize } from "../../3rdparty/autoResize/index.mjs";
50
50
  import { isDefined } from "../../helpers/mixed.mjs";
51
- import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
51
+ import { SHORTCUTS_GROUP_NAVIGATION, SHORTCUTS_GROUP_EDITOR as EDITOR_MANAGER_GROUP } from "../../editorManager.mjs";
52
52
  import { SHORTCUTS_GROUP_EDITOR } from "../baseEditor/baseEditor.mjs";
53
53
  import { updateCaretPosition } from "./caretPositioner.mjs";
54
54
  var EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
@@ -502,7 +502,9 @@ export var TextEditor = /*#__PURE__*/function (_BaseEditor) {
502
502
  // We trigger a data population for multiple selection.
503
503
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
504
504
  !event.altKey;
505
- }
505
+ },
506
+ relativeToGroup: EDITOR_MANAGER_GROUP,
507
+ position: 'before'
506
508
  }, {
507
509
  keys: [['Meta', 'Enter']],
508
510
  callback: function callback() {
@@ -512,13 +514,19 @@ export var TextEditor = /*#__PURE__*/function (_BaseEditor) {
512
514
 
513
515
  runOnlyIf: function runOnlyIf() {
514
516
  return !_this4.hot.selection.isMultiple();
515
- } // We trigger a data population for multiple selection.
517
+ },
518
+ // We trigger a data population for multiple selection.
519
+ relativeToGroup: EDITOR_MANAGER_GROUP,
520
+ position: 'before'
516
521
  }, {
517
522
  keys: [['Alt', 'Enter']],
518
523
  callback: function callback() {
519
524
  insertNewLine();
520
525
  return false; // Will block closing editor.
521
- }
526
+ },
527
+
528
+ relativeToGroup: EDITOR_MANAGER_GROUP,
529
+ position: 'before'
522
530
  }, {
523
531
  // TODO: Duplicated part of code (callback to shortcut)
524
532
  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-d1c8e0e-20230621";
155
+ var hotVersion = "0.0.0-next-c765185-20230622";
156
156
  var keyValidityDate;
157
157
  var consoleMessageState = 'invalid';
158
158
  var domMessageState = 'invalid';
@@ -160,7 +160,7 @@ function _injectProductInfo(key, element) {
160
160
  var schemaValidity = _checkKeySchema(key);
161
161
  if (hasValidType || isNonCommercial || schemaValidity) {
162
162
  if (schemaValidity) {
163
- var releaseDate = (0, _moment.default)("23/05/2023", 'DD/MM/YYYY');
163
+ var releaseDate = (0, _moment.default)("22/06/2023", 'DD/MM/YYYY');
164
164
  var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
165
165
  var keyValidityDays = _extractTime(key);
166
166
  keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
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-d1c8e0e-20230621";
145
+ var hotVersion = "0.0.0-next-c765185-20230622";
146
146
  var keyValidityDate;
147
147
  var consoleMessageState = 'invalid';
148
148
  var domMessageState = 'invalid';
@@ -150,7 +150,7 @@ export function _injectProductInfo(key, element) {
150
150
  var schemaValidity = _checkKeySchema(key);
151
151
  if (hasValidType || isNonCommercial || schemaValidity) {
152
152
  if (schemaValidity) {
153
- var releaseDate = moment("23/05/2023", 'DD/MM/YYYY');
153
+ var releaseDate = moment("22/06/2023", 'DD/MM/YYYY');
154
154
  var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
155
155
  var keyValidityDays = _extractTime(key);
156
156
  keyValidityDate = moment((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
@@ -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-d1c8e0e-20230621",
13
+ "version": "0.0.0-next-c765185-20230622",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",