handsontable 0.0.0-next-2b3d6d8-20230623 → 0.0.0-next-c3d199b-20230626

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