handsontable 14.0.0-next-c080457-20231107 → 14.0.0-next-bfad250-20231108

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. package/3rdparty/SheetClip/SheetClip.js +2 -2
  2. package/3rdparty/SheetClip/SheetClip.mjs +2 -2
  3. package/3rdparty/autoResize/autoResize.js +2 -2
  4. package/3rdparty/autoResize/autoResize.mjs +2 -2
  5. package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
  6. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
  7. package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
  8. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
  9. package/3rdparty/walkontable/src/cell/coords.js +7 -5
  10. package/3rdparty/walkontable/src/cell/coords.mjs +7 -5
  11. package/3rdparty/walkontable/src/core/clone.js +6 -0
  12. package/3rdparty/walkontable/src/core/clone.mjs +6 -0
  13. package/3rdparty/walkontable/src/event.js +125 -74
  14. package/3rdparty/walkontable/src/event.mjs +125 -74
  15. package/3rdparty/walkontable/src/filter/column.js +16 -0
  16. package/3rdparty/walkontable/src/filter/column.mjs +16 -0
  17. package/3rdparty/walkontable/src/filter/row.js +16 -0
  18. package/3rdparty/walkontable/src/filter/row.mjs +16 -0
  19. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  21. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  23. package/3rdparty/walkontable/src/renderer/_base.js +12 -5
  24. package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
  25. package/3rdparty/walkontable/src/renderer/cells.js +6 -2
  26. package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
  27. package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
  28. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
  29. package/3rdparty/walkontable/src/renderer/rows.js +5 -0
  30. package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
  31. package/3rdparty/walkontable/src/renderer/table.js +24 -17
  32. package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
  33. package/3rdparty/walkontable/src/scroll.js +2 -2
  34. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  35. package/3rdparty/walkontable/src/selection/border/border.js +1 -1
  36. package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
  37. package/3rdparty/walkontable/src/settings.js +10 -10
  38. package/3rdparty/walkontable/src/settings.mjs +10 -10
  39. package/3rdparty/walkontable/src/table.js +3 -3
  40. package/3rdparty/walkontable/src/table.mjs +3 -3
  41. package/3rdparty/walkontable/src/utils/column.js +19 -4
  42. package/3rdparty/walkontable/src/utils/column.mjs +19 -4
  43. package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
  44. package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
  45. package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
  46. package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
  47. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
  48. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
  49. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
  50. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
  51. package/3rdparty/walkontable/src/utils/row.js +14 -2
  52. package/3rdparty/walkontable/src/utils/row.mjs +14 -2
  53. package/3rdparty/walkontable/src/viewport.js +9 -9
  54. package/3rdparty/walkontable/src/viewport.mjs +9 -9
  55. package/base.js +2 -2
  56. package/base.mjs +2 -2
  57. package/core.js +25 -25
  58. package/core.mjs +25 -25
  59. package/dataMap/dataMap.js +99 -90
  60. package/dataMap/dataMap.mjs +99 -90
  61. package/dataMap/dataSource.js +14 -8
  62. package/dataMap/dataSource.mjs +14 -8
  63. package/dataMap/metaManager/lazyFactoryMap.js +19 -7
  64. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
  65. package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
  66. package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
  67. package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
  68. package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
  69. package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
  70. package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
  71. package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
  72. package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
  73. package/dataMap/metaManager/metaSchema.js +55 -55
  74. package/dataMap/metaManager/metaSchema.mjs +55 -55
  75. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
  76. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
  77. package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
  78. package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
  79. package/dataMap/metaManager/utils.js +2 -2
  80. package/dataMap/metaManager/utils.mjs +2 -2
  81. package/dist/handsontable.css +2 -2
  82. package/dist/handsontable.full.css +2 -2
  83. package/dist/handsontable.full.js +7337 -6389
  84. package/dist/handsontable.full.min.css +2 -2
  85. package/dist/handsontable.full.min.js +154 -154
  86. package/dist/handsontable.js +7336 -6388
  87. package/dist/handsontable.min.css +2 -2
  88. package/dist/handsontable.min.js +28 -28
  89. package/editorManager.js +105 -95
  90. package/editorManager.mjs +105 -95
  91. package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
  92. package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
  93. package/editors/baseEditor/baseEditor.js +23 -26
  94. package/editors/baseEditor/baseEditor.mjs +23 -26
  95. package/editors/dateEditor/dateEditor.js +24 -15
  96. package/editors/dateEditor/dateEditor.mjs +24 -15
  97. package/editors/dropdownEditor/dropdownEditor.js +1 -1
  98. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  99. package/editors/handsontableEditor/handsontableEditor.js +4 -4
  100. package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
  101. package/editors/textEditor/textEditor.js +23 -17
  102. package/editors/textEditor/textEditor.mjs +24 -18
  103. package/eventManager.js +8 -0
  104. package/eventManager.mjs +8 -0
  105. package/helpers/array.js +2 -2
  106. package/helpers/array.mjs +2 -2
  107. package/helpers/dom/element.js +7 -7
  108. package/helpers/dom/element.mjs +7 -7
  109. package/helpers/function.js +1 -1
  110. package/helpers/function.mjs +1 -1
  111. package/helpers/mixed.js +1 -1
  112. package/helpers/mixed.mjs +1 -1
  113. package/helpers/object.js +4 -4
  114. package/helpers/object.mjs +4 -4
  115. package/helpers/string.js +1 -1
  116. package/helpers/string.mjs +1 -1
  117. package/package.json +1 -1
  118. package/pluginHooks.d.ts +0 -2
  119. package/pluginHooks.js +12 -3
  120. package/pluginHooks.mjs +12 -3
  121. package/plugins/autoColumnSize/autoColumnSize.js +141 -130
  122. package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
  123. package/plugins/autoRowSize/autoRowSize.js +112 -125
  124. package/plugins/autoRowSize/autoRowSize.mjs +110 -123
  125. package/plugins/autofill/autofill.d.ts +0 -1
  126. package/plugins/autofill/autofill.js +98 -102
  127. package/plugins/autofill/autofill.mjs +97 -101
  128. package/plugins/base/base.js +61 -28
  129. package/plugins/base/base.mjs +60 -28
  130. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
  131. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
  132. package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
  133. package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
  134. package/plugins/columnSorting/columnSorting.js +107 -99
  135. package/plugins/columnSorting/columnSorting.mjs +106 -98
  136. package/plugins/columnSorting/columnStatesManager.js +12 -6
  137. package/plugins/columnSorting/columnStatesManager.mjs +12 -6
  138. package/plugins/columnSummary/columnSummary.js +71 -58
  139. package/plugins/columnSummary/columnSummary.mjs +70 -57
  140. package/plugins/columnSummary/endpoints.js +20 -14
  141. package/plugins/columnSummary/endpoints.mjs +20 -14
  142. package/plugins/comments/commentEditor.js +30 -2
  143. package/plugins/comments/commentEditor.mjs +30 -2
  144. package/plugins/comments/comments.js +158 -169
  145. package/plugins/comments/comments.mjs +157 -168
  146. package/plugins/comments/displaySwitch.js +7 -3
  147. package/plugins/comments/displaySwitch.mjs +7 -3
  148. package/plugins/contextMenu/commandExecutor.js +15 -2
  149. package/plugins/contextMenu/commandExecutor.mjs +15 -2
  150. package/plugins/contextMenu/contextMenu.js +96 -102
  151. package/plugins/contextMenu/contextMenu.mjs +95 -101
  152. package/plugins/contextMenu/itemsFactory.js +19 -4
  153. package/plugins/contextMenu/itemsFactory.mjs +19 -4
  154. package/plugins/contextMenu/menu/cursor.js +36 -0
  155. package/plugins/contextMenu/menu/cursor.mjs +36 -0
  156. package/plugins/contextMenu/menu/menu.js +57 -5
  157. package/plugins/contextMenu/menu/menu.mjs +57 -5
  158. package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
  159. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
  160. package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
  161. package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
  162. package/plugins/copyPaste/copyPaste.js +74 -75
  163. package/plugins/copyPaste/copyPaste.mjs +74 -75
  164. package/plugins/customBorders/customBorders.js +57 -50
  165. package/plugins/customBorders/customBorders.mjs +56 -49
  166. package/plugins/dragToScroll/dragToScroll.js +50 -54
  167. package/plugins/dragToScroll/dragToScroll.mjs +49 -52
  168. package/plugins/dropdownMenu/dropdownMenu.js +136 -131
  169. package/plugins/dropdownMenu/dropdownMenu.mjs +136 -131
  170. package/plugins/exportFile/dataProvider.js +7 -2
  171. package/plugins/exportFile/dataProvider.mjs +7 -2
  172. package/plugins/exportFile/exportFile.js +1 -1
  173. package/plugins/exportFile/exportFile.mjs +1 -1
  174. package/plugins/exportFile/types/_base.js +14 -6
  175. package/plugins/exportFile/types/_base.mjs +14 -6
  176. package/plugins/filters/component/actionBar.js +9 -0
  177. package/plugins/filters/component/actionBar.mjs +9 -0
  178. package/plugins/filters/component/condition.js +13 -0
  179. package/plugins/filters/component/condition.mjs +13 -0
  180. package/plugins/filters/component/operators.js +9 -0
  181. package/plugins/filters/component/operators.mjs +9 -0
  182. package/plugins/filters/component/value.js +9 -0
  183. package/plugins/filters/component/value.mjs +9 -0
  184. package/plugins/filters/conditionCollection.js +9 -4
  185. package/plugins/filters/conditionCollection.mjs +9 -4
  186. package/plugins/filters/conditionUpdateObserver.js +53 -42
  187. package/plugins/filters/conditionUpdateObserver.mjs +53 -42
  188. package/plugins/filters/dataFilter.js +9 -3
  189. package/plugins/filters/dataFilter.mjs +9 -3
  190. package/plugins/filters/filters.js +184 -189
  191. package/plugins/filters/filters.mjs +182 -187
  192. package/plugins/filters/ui/_base.js +1 -1
  193. package/plugins/filters/ui/_base.mjs +1 -1
  194. package/plugins/filters/utils.js +1 -1
  195. package/plugins/filters/utils.mjs +1 -1
  196. package/plugins/formulas/engine/settings.js +1 -1
  197. package/plugins/formulas/engine/settings.mjs +1 -1
  198. package/plugins/formulas/formulas.js +684 -602
  199. package/plugins/formulas/formulas.mjs +682 -600
  200. package/plugins/hiddenColumns/hiddenColumns.js +174 -169
  201. package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
  202. package/plugins/hiddenRows/hiddenRows.js +170 -165
  203. package/plugins/hiddenRows/hiddenRows.mjs +169 -164
  204. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  205. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  206. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  207. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  208. package/plugins/manualColumnFreeze/manualColumnFreeze.js +66 -53
  209. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
  210. package/plugins/manualColumnMove/manualColumnMove.js +287 -232
  211. package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
  212. package/plugins/manualColumnMove/ui/_base.js +9 -3
  213. package/plugins/manualColumnMove/ui/_base.mjs +9 -3
  214. package/plugins/manualColumnResize/manualColumnResize.js +291 -246
  215. package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
  216. package/plugins/manualRowMove/manualRowMove.js +223 -208
  217. package/plugins/manualRowMove/manualRowMove.mjs +222 -207
  218. package/plugins/manualRowMove/ui/_base.js +10 -5
  219. package/plugins/manualRowMove/ui/_base.mjs +10 -5
  220. package/plugins/manualRowResize/manualRowResize.js +254 -209
  221. package/plugins/manualRowResize/manualRowResize.mjs +253 -207
  222. package/plugins/mergeCells/calculations/autofill.js +9 -3
  223. package/plugins/mergeCells/calculations/autofill.mjs +9 -3
  224. package/plugins/mergeCells/calculations/selection.js +10 -4
  225. package/plugins/mergeCells/calculations/selection.mjs +10 -4
  226. package/plugins/mergeCells/cellCoords.js +16 -6
  227. package/plugins/mergeCells/cellCoords.mjs +16 -6
  228. package/plugins/mergeCells/cellsCollection.js +10 -4
  229. package/plugins/mergeCells/cellsCollection.mjs +10 -4
  230. package/plugins/mergeCells/mergeCells.js +582 -502
  231. package/plugins/mergeCells/mergeCells.mjs +580 -500
  232. package/plugins/multiColumnSorting/multiColumnSorting.js +15 -11
  233. package/plugins/multiColumnSorting/multiColumnSorting.mjs +15 -11
  234. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
  235. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
  236. package/plugins/nestedHeaders/nestedHeaders.js +542 -499
  237. package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
  238. package/plugins/nestedHeaders/stateManager/index.js +1 -1
  239. package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
  240. package/plugins/nestedRows/data/dataManager.js +21 -15
  241. package/plugins/nestedRows/data/dataManager.mjs +21 -15
  242. package/plugins/nestedRows/nestedRows.js +335 -279
  243. package/plugins/nestedRows/nestedRows.mjs +334 -278
  244. package/plugins/nestedRows/ui/_base.js +7 -1
  245. package/plugins/nestedRows/ui/_base.mjs +7 -1
  246. package/plugins/nestedRows/ui/collapsing.js +2 -2
  247. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  248. package/plugins/nestedRows/ui/contextMenu.js +28 -18
  249. package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
  250. package/plugins/nestedRows/utils/rowMoveController.js +12 -4
  251. package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
  252. package/plugins/persistentState/persistentState.js +14 -11
  253. package/plugins/persistentState/persistentState.mjs +14 -11
  254. package/plugins/persistentState/storage.js +11 -6
  255. package/plugins/persistentState/storage.mjs +11 -6
  256. package/plugins/registry.js +2 -2
  257. package/plugins/registry.mjs +2 -2
  258. package/plugins/search/search.js +57 -46
  259. package/plugins/search/search.mjs +56 -45
  260. package/plugins/touchScroll/touchScroll.js +102 -100
  261. package/plugins/touchScroll/touchScroll.mjs +100 -98
  262. package/plugins/trimRows/trimRows.js +33 -28
  263. package/plugins/trimRows/trimRows.mjs +32 -27
  264. package/plugins/undoRedo/undoRedo.js +2 -2
  265. package/plugins/undoRedo/undoRedo.mjs +2 -2
  266. package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
  267. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
  268. package/renderers/baseRenderer/baseRenderer.js +2 -2
  269. package/renderers/baseRenderer/baseRenderer.mjs +2 -2
  270. package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
  271. package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
  272. package/renderers/dateRenderer/dateRenderer.js +4 -4
  273. package/renderers/dateRenderer/dateRenderer.mjs +4 -4
  274. package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
  275. package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
  276. package/renderers/htmlRenderer/htmlRenderer.js +4 -4
  277. package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
  278. package/renderers/numericRenderer/numericRenderer.js +3 -3
  279. package/renderers/numericRenderer/numericRenderer.mjs +3 -3
  280. package/renderers/passwordRenderer/passwordRenderer.js +3 -3
  281. package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
  282. package/renderers/selectRenderer/selectRenderer.js +4 -4
  283. package/renderers/selectRenderer/selectRenderer.mjs +4 -4
  284. package/renderers/textRenderer/textRenderer.js +5 -5
  285. package/renderers/textRenderer/textRenderer.mjs +5 -5
  286. package/renderers/timeRenderer/timeRenderer.js +3 -3
  287. package/renderers/timeRenderer/timeRenderer.mjs +3 -3
  288. package/selection/range.js +12 -2
  289. package/selection/range.mjs +12 -2
  290. package/selection/selection.js +28 -10
  291. package/selection/selection.mjs +28 -10
  292. package/selection/utils.js +24 -14
  293. package/selection/utils.mjs +25 -15
  294. package/shortcuts/manager.js +1 -1
  295. package/shortcuts/manager.mjs +1 -1
  296. package/tableView.js +208 -200
  297. package/tableView.mjs +208 -200
  298. package/translations/changesObservable/utils.js +2 -2
  299. package/translations/changesObservable/utils.mjs +2 -2
  300. package/translations/indexMapper.js +25 -22
  301. package/translations/indexMapper.mjs +25 -22
  302. package/translations/mapCollections/aggregatedCollection.js +8 -2
  303. package/translations/mapCollections/aggregatedCollection.mjs +8 -2
  304. package/translations/mapCollections/mapCollection.js +5 -2
  305. package/translations/mapCollections/mapCollection.mjs +5 -2
  306. package/translations/maps/indexMap.js +6 -1
  307. package/translations/maps/indexMap.mjs +6 -1
  308. package/translations/maps/utils/physicallyIndexed.js +2 -2
  309. package/translations/maps/utils/physicallyIndexed.mjs +2 -2
  310. package/utils/dataStructures/linkedList.js +10 -6
  311. package/utils/dataStructures/linkedList.mjs +10 -6
  312. package/utils/dataStructures/queue.js +1 -1
  313. package/utils/dataStructures/queue.mjs +1 -1
  314. package/utils/dataStructures/stack.js +1 -1
  315. package/utils/dataStructures/stack.mjs +1 -1
  316. package/utils/ghostTable.js +2 -2
  317. package/utils/ghostTable.mjs +2 -2
  318. package/utils/interval.js +73 -36
  319. package/utils/interval.mjs +73 -36
  320. package/utils/parseTable.js +1 -1
  321. package/utils/parseTable.mjs +1 -1
  322. package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
  323. package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
  324. package/validators/dateValidator/dateValidator.js +1 -1
  325. package/validators/dateValidator/dateValidator.mjs +1 -1
  326. package/validators/numericValidator/numericValidator.js +1 -1
  327. package/validators/numericValidator/numericValidator.mjs +1 -1
package/editorManager.js CHANGED
@@ -1,84 +1,111 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
4
5
  var _unicode = require("./helpers/unicode");
5
6
  var _event = require("./helpers/dom/event");
6
7
  var _registry = require("./editors/registry");
7
8
  var _eventManager = _interopRequireDefault(require("./eventManager"));
8
9
  var _mixed = require("./helpers/mixed");
9
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
12
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
13
+ 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; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
+ 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); }
16
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
10
17
  const SHORTCUTS_GROUP_NAVIGATION = exports.SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
18
+ var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
19
+ var _onCellDblClick = /*#__PURE__*/new WeakSet();
11
20
  class EditorManager {
12
21
  /**
13
- * @param {Core} instance The Handsontable instance.
22
+ * @param {Core} hotInstance The Handsontable instance.
14
23
  * @param {TableMeta} tableMeta The table meta instance.
15
24
  * @param {Selection} selection The selection instance.
16
25
  */
17
- constructor(instance, tableMeta, selection) {
26
+ constructor(hotInstance, tableMeta, _selection) {
27
+ /**
28
+ * OnCellDblClick callback.
29
+ *
30
+ * @param {MouseEvent} event The mouse event object.
31
+ * @param {object} coords The cell coordinates.
32
+ * @param {HTMLTableCellElement|HTMLTableHeaderCellElement} elem The element which triggers the action.
33
+ */
34
+ _classPrivateMethodInitSpec(this, _onCellDblClick);
35
+ /**
36
+ * OnAfterDocumentKeyDown callback.
37
+ *
38
+ * @param {KeyboardEvent} event The keyboard event object.
39
+ */
40
+ _classPrivateMethodInitSpec(this, _onAfterDocumentKeyDown);
18
41
  /**
19
42
  * Instance of {@link Handsontable}.
20
43
  *
21
44
  * @private
22
45
  * @type {Handsontable}
23
46
  */
24
- this.instance = instance;
47
+ _defineProperty(this, "hot", void 0);
25
48
  /**
26
49
  * Reference to an instance's private GridSettings object.
27
50
  *
28
51
  * @private
29
52
  * @type {GridSettings}
30
53
  */
31
- this.tableMeta = tableMeta;
54
+ _defineProperty(this, "tableMeta", void 0);
32
55
  /**
33
56
  * Instance of {@link Selection}.
34
57
  *
35
58
  * @private
36
59
  * @type {Selection}
37
60
  */
38
- this.selection = selection;
61
+ _defineProperty(this, "selection", void 0);
39
62
  /**
40
63
  * Instance of {@link EventManager}.
41
64
  *
42
65
  * @private
43
66
  * @type {EventManager}
44
67
  */
45
- this.eventManager = new _eventManager.default(instance);
68
+ _defineProperty(this, "eventManager", void 0);
46
69
  /**
47
70
  * Determines if EditorManager is destroyed.
48
71
  *
49
72
  * @private
50
73
  * @type {boolean}
51
74
  */
52
- this.destroyed = false;
75
+ _defineProperty(this, "destroyed", false);
53
76
  /**
54
77
  * Determines if EditorManager is locked.
55
78
  *
56
79
  * @private
57
80
  * @type {boolean}
58
81
  */
59
- this.lock = false;
82
+ _defineProperty(this, "lock", false);
60
83
  /**
61
84
  * A reference to an instance of the activeEditor.
62
85
  *
63
86
  * @private
64
87
  * @type {BaseEditor}
65
88
  */
66
- this.activeEditor = void 0;
89
+ _defineProperty(this, "activeEditor", void 0);
67
90
  /**
68
91
  * Keeps a reference to the cell's properties object.
69
92
  *
70
93
  * @type {object}
71
94
  */
72
- this.cellProperties = void 0;
73
- this.instance.addHook('afterDocumentKeyDown', event => this.onAfterDocumentKeyDown(event));
95
+ _defineProperty(this, "cellProperties", void 0);
96
+ this.hot = hotInstance;
97
+ this.tableMeta = tableMeta;
98
+ this.selection = _selection;
99
+ this.eventManager = new _eventManager.default(hotInstance);
100
+ this.hot.addHook('afterDocumentKeyDown', event => _classPrivateMethodGet(this, _onAfterDocumentKeyDown, _onAfterDocumentKeyDown2).call(this, event));
74
101
 
75
102
  // Open editor when text composition is started (IME editor)
76
- this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'compositionstart', event => {
77
- if (!this.destroyed && this.instance.isListening()) {
103
+ this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'compositionstart', event => {
104
+ if (!this.destroyed && this.hot.isListening()) {
78
105
  this.openEditor('', event);
79
106
  }
80
107
  });
81
- this.instance.view._wt.update('onCellDblClick', (event, coords, elem) => this.onCellDblClick(event, coords, elem));
108
+ this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _classPrivateMethodGet(this, _onCellDblClick, _onCellDblClick2).call(this, event, coords, elem));
82
109
  }
83
110
 
84
111
  /**
@@ -135,7 +162,7 @@ class EditorManager {
135
162
  }
136
163
  const {
137
164
  highlight
138
- } = this.instance.getSelectedRangeLast();
165
+ } = this.hot.getSelectedRangeLast();
139
166
  if (highlight.isHeader()) {
140
167
  return;
141
168
  }
@@ -143,7 +170,7 @@ class EditorManager {
143
170
  row,
144
171
  col
145
172
  } = highlight;
146
- const modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
173
+ const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', row, col);
147
174
  let visualRowToCheck = row;
148
175
  let visualColumnToCheck = col;
149
176
  if (Array.isArray(modifiedCellCoords)) {
@@ -151,20 +178,20 @@ class EditorManager {
151
178
  }
152
179
 
153
180
  // Getting values using the modified coordinates.
154
- this.cellProperties = this.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);
181
+ this.cellProperties = this.hot.getCellMeta(visualRowToCheck, visualColumnToCheck);
155
182
  if (!this.isCellEditable()) {
156
183
  this.clearActiveEditor();
157
184
  return;
158
185
  }
159
- const td = this.instance.getCell(row, col, true);
186
+ const td = this.hot.getCell(row, col, true);
160
187
 
161
188
  // Skip the preparation when the cell is not rendered in the DOM. The cell is scrolled out of
162
189
  // the table's viewport.
163
190
  if (td) {
164
- const editorClass = this.instance.getCellEditor(this.cellProperties);
165
- const prop = this.instance.colToProp(visualColumnToCheck);
166
- const originalValue = this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(visualRowToCheck), visualColumnToCheck);
167
- this.activeEditor = (0, _registry.getEditorInstance)(editorClass, this.instance);
191
+ const editorClass = this.hot.getCellEditor(this.cellProperties);
192
+ const prop = this.hot.colToProp(visualColumnToCheck);
193
+ const originalValue = this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(visualRowToCheck), visualColumnToCheck);
194
+ this.activeEditor = (0, _registry.getEditorInstance)(editorClass, this.hot);
168
195
  // Using not modified coordinates, as we need to get the table element using selection coordinates.
169
196
  // There is an extra translation in the editor for saving value.
170
197
  this.activeEditor.prepare(row, col, prop, td, originalValue, this.cellProperties);
@@ -195,7 +222,7 @@ class EditorManager {
195
222
  return;
196
223
  }
197
224
  if (!this.activeEditor) {
198
- this.instance.scrollToFocusedCell();
225
+ this.hot.scrollToFocusedCell();
199
226
  this.prepareEditor();
200
227
  }
201
228
  if (this.activeEditor) {
@@ -245,7 +272,7 @@ class EditorManager {
245
272
  * @private
246
273
  */
247
274
  clearActiveEditor() {
248
- this.activeEditor = void 0;
275
+ this.activeEditor = undefined;
249
276
  }
250
277
 
251
278
  /**
@@ -259,11 +286,11 @@ class EditorManager {
259
286
  * @returns {boolean}
260
287
  */
261
288
  isCellEditable() {
262
- const selection = this.instance.getSelectedRangeLast();
289
+ const selection = this.hot.getSelectedRangeLast();
263
290
  if (!selection) {
264
291
  return false;
265
292
  }
266
- const editorClass = this.instance.getCellEditor(this.cellProperties);
293
+ const editorClass = this.hot.getCellEditor(this.cellProperties);
267
294
  const {
268
295
  row,
269
296
  col
@@ -271,8 +298,8 @@ class EditorManager {
271
298
  const {
272
299
  rowIndexMapper,
273
300
  columnIndexMapper
274
- } = this.instance;
275
- const isCellHidden = rowIndexMapper.isHidden(this.instance.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.instance.toPhysicalColumn(col));
301
+ } = this.hot;
302
+ const isCellHidden = rowIndexMapper.isHidden(this.hot.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.hot.toPhysicalColumn(col));
276
303
  if (this.cellProperties.readOnly || !editorClass || isCellHidden) {
277
304
  return false;
278
305
  }
@@ -295,73 +322,6 @@ class EditorManager {
295
322
  this.selection.transformStart(enterMoves.row, enterMoves.col, true);
296
323
  }
297
324
  }
298
-
299
- /**
300
- * OnAfterDocumentKeyDown callback.
301
- *
302
- * @private
303
- * @param {KeyboardEvent} event The keyboard event object.
304
- */
305
- onAfterDocumentKeyDown(event) {
306
- const selection = this.instance.getSelectedRangeLast();
307
- if (!this.instance.isListening() || !selection || selection.highlight.isHeader() || (0, _event.isImmediatePropagationStopped)(event)) {
308
- return;
309
- }
310
- const {
311
- keyCode
312
- } = event;
313
-
314
- // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
315
- const isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
316
- if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {
317
- if (!(0, _unicode.isFunctionKey)(keyCode) && !(0, _unicode.isCtrlMetaKey)(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {
318
- const shortcutManager = this.instance.getShortcutManager();
319
- const editorContext = shortcutManager.getContext('editor');
320
- const runOnlySelectedConfig = {
321
- runOnlyIf: () => (0, _mixed.isDefined)(this.instance.getSelected()),
322
- group: SHORTCUTS_GROUP_NAVIGATION
323
- };
324
- editorContext.addShortcuts([{
325
- keys: [['ArrowUp']],
326
- callback: () => {
327
- this.instance.selection.transformStart(-1, 0);
328
- }
329
- }, {
330
- keys: [['ArrowDown']],
331
- callback: () => {
332
- this.instance.selection.transformStart(1, 0);
333
- }
334
- }, {
335
- keys: [['ArrowLeft']],
336
- callback: () => {
337
- this.instance.selection.transformStart(0, -1 * this.instance.getDirectionFactor());
338
- }
339
- }, {
340
- keys: [['ArrowRight']],
341
- callback: () => {
342
- this.instance.selection.transformStart(0, this.instance.getDirectionFactor());
343
- }
344
- }], runOnlySelectedConfig);
345
- this.openEditor('', event);
346
- }
347
- }
348
- }
349
-
350
- /**
351
- * OnCellDblClick callback.
352
- *
353
- * @private
354
- * @param {MouseEvent} event The mouse event object.
355
- * @param {object} coords The cell coordinates.
356
- * @param {HTMLTableCellElement|HTMLTableHeaderCellElement} elem The element which triggers the action.
357
- */
358
- onCellDblClick(event, coords, elem) {
359
- // may be TD or TH
360
- if (elem.nodeName === 'TD') {
361
- this.openEditor(null, event, true);
362
- }
363
- }
364
-
365
325
  /**
366
326
  * Destroy the instance.
367
327
  */
@@ -370,6 +330,56 @@ class EditorManager {
370
330
  this.eventManager.destroy();
371
331
  }
372
332
  }
333
+ function _onAfterDocumentKeyDown2(event) {
334
+ const selection = this.hot.getSelectedRangeLast();
335
+ if (!this.hot.isListening() || !selection || selection.highlight.isHeader() || (0, _event.isImmediatePropagationStopped)(event)) {
336
+ return;
337
+ }
338
+ const {
339
+ keyCode
340
+ } = event;
341
+
342
+ // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
343
+ const isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
344
+ if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {
345
+ if (!(0, _unicode.isFunctionKey)(keyCode) && !(0, _unicode.isCtrlMetaKey)(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {
346
+ const shortcutManager = this.hot.getShortcutManager();
347
+ const editorContext = shortcutManager.getContext('editor');
348
+ const runOnlySelectedConfig = {
349
+ runOnlyIf: () => (0, _mixed.isDefined)(this.hot.getSelected()),
350
+ group: SHORTCUTS_GROUP_NAVIGATION
351
+ };
352
+ editorContext.addShortcuts([{
353
+ keys: [['ArrowUp']],
354
+ callback: () => {
355
+ this.hot.selection.transformStart(-1, 0);
356
+ }
357
+ }, {
358
+ keys: [['ArrowDown']],
359
+ callback: () => {
360
+ this.hot.selection.transformStart(1, 0);
361
+ }
362
+ }, {
363
+ keys: [['ArrowLeft']],
364
+ callback: () => {
365
+ this.hot.selection.transformStart(0, -1 * this.hot.getDirectionFactor());
366
+ }
367
+ }, {
368
+ keys: [['ArrowRight']],
369
+ callback: () => {
370
+ this.hot.selection.transformStart(0, this.hot.getDirectionFactor());
371
+ }
372
+ }], runOnlySelectedConfig);
373
+ this.openEditor('', event);
374
+ }
375
+ }
376
+ }
377
+ function _onCellDblClick2(event, coords, elem) {
378
+ // may be TD or TH
379
+ if (elem.nodeName === 'TD') {
380
+ this.openEditor(null, event, true);
381
+ }
382
+ }
373
383
  const instances = new WeakMap();
374
384
 
375
385
  /**
package/editorManager.mjs CHANGED
@@ -1,80 +1,107 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
3
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ 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; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
1
8
  import { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
2
9
  import { isImmediatePropagationStopped } from "./helpers/dom/event.mjs";
3
10
  import { getEditorInstance } from "./editors/registry.mjs";
4
11
  import EventManager from "./eventManager.mjs";
5
12
  import { isDefined } from "./helpers/mixed.mjs";
6
13
  export const SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
14
+ var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
15
+ var _onCellDblClick = /*#__PURE__*/new WeakSet();
7
16
  class EditorManager {
8
17
  /**
9
- * @param {Core} instance The Handsontable instance.
18
+ * @param {Core} hotInstance The Handsontable instance.
10
19
  * @param {TableMeta} tableMeta The table meta instance.
11
20
  * @param {Selection} selection The selection instance.
12
21
  */
13
- constructor(instance, tableMeta, selection) {
22
+ constructor(hotInstance, tableMeta, _selection) {
23
+ /**
24
+ * OnCellDblClick callback.
25
+ *
26
+ * @param {MouseEvent} event The mouse event object.
27
+ * @param {object} coords The cell coordinates.
28
+ * @param {HTMLTableCellElement|HTMLTableHeaderCellElement} elem The element which triggers the action.
29
+ */
30
+ _classPrivateMethodInitSpec(this, _onCellDblClick);
31
+ /**
32
+ * OnAfterDocumentKeyDown callback.
33
+ *
34
+ * @param {KeyboardEvent} event The keyboard event object.
35
+ */
36
+ _classPrivateMethodInitSpec(this, _onAfterDocumentKeyDown);
14
37
  /**
15
38
  * Instance of {@link Handsontable}.
16
39
  *
17
40
  * @private
18
41
  * @type {Handsontable}
19
42
  */
20
- this.instance = instance;
43
+ _defineProperty(this, "hot", void 0);
21
44
  /**
22
45
  * Reference to an instance's private GridSettings object.
23
46
  *
24
47
  * @private
25
48
  * @type {GridSettings}
26
49
  */
27
- this.tableMeta = tableMeta;
50
+ _defineProperty(this, "tableMeta", void 0);
28
51
  /**
29
52
  * Instance of {@link Selection}.
30
53
  *
31
54
  * @private
32
55
  * @type {Selection}
33
56
  */
34
- this.selection = selection;
57
+ _defineProperty(this, "selection", void 0);
35
58
  /**
36
59
  * Instance of {@link EventManager}.
37
60
  *
38
61
  * @private
39
62
  * @type {EventManager}
40
63
  */
41
- this.eventManager = new EventManager(instance);
64
+ _defineProperty(this, "eventManager", void 0);
42
65
  /**
43
66
  * Determines if EditorManager is destroyed.
44
67
  *
45
68
  * @private
46
69
  * @type {boolean}
47
70
  */
48
- this.destroyed = false;
71
+ _defineProperty(this, "destroyed", false);
49
72
  /**
50
73
  * Determines if EditorManager is locked.
51
74
  *
52
75
  * @private
53
76
  * @type {boolean}
54
77
  */
55
- this.lock = false;
78
+ _defineProperty(this, "lock", false);
56
79
  /**
57
80
  * A reference to an instance of the activeEditor.
58
81
  *
59
82
  * @private
60
83
  * @type {BaseEditor}
61
84
  */
62
- this.activeEditor = void 0;
85
+ _defineProperty(this, "activeEditor", void 0);
63
86
  /**
64
87
  * Keeps a reference to the cell's properties object.
65
88
  *
66
89
  * @type {object}
67
90
  */
68
- this.cellProperties = void 0;
69
- this.instance.addHook('afterDocumentKeyDown', event => this.onAfterDocumentKeyDown(event));
91
+ _defineProperty(this, "cellProperties", void 0);
92
+ this.hot = hotInstance;
93
+ this.tableMeta = tableMeta;
94
+ this.selection = _selection;
95
+ this.eventManager = new EventManager(hotInstance);
96
+ this.hot.addHook('afterDocumentKeyDown', event => _classPrivateMethodGet(this, _onAfterDocumentKeyDown, _onAfterDocumentKeyDown2).call(this, event));
70
97
 
71
98
  // Open editor when text composition is started (IME editor)
72
- this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'compositionstart', event => {
73
- if (!this.destroyed && this.instance.isListening()) {
99
+ this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'compositionstart', event => {
100
+ if (!this.destroyed && this.hot.isListening()) {
74
101
  this.openEditor('', event);
75
102
  }
76
103
  });
77
- this.instance.view._wt.update('onCellDblClick', (event, coords, elem) => this.onCellDblClick(event, coords, elem));
104
+ this.hot.view._wt.update('onCellDblClick', (event, coords, elem) => _classPrivateMethodGet(this, _onCellDblClick, _onCellDblClick2).call(this, event, coords, elem));
78
105
  }
79
106
 
80
107
  /**
@@ -131,7 +158,7 @@ class EditorManager {
131
158
  }
132
159
  const {
133
160
  highlight
134
- } = this.instance.getSelectedRangeLast();
161
+ } = this.hot.getSelectedRangeLast();
135
162
  if (highlight.isHeader()) {
136
163
  return;
137
164
  }
@@ -139,7 +166,7 @@ class EditorManager {
139
166
  row,
140
167
  col
141
168
  } = highlight;
142
- const modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', row, col);
169
+ const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', row, col);
143
170
  let visualRowToCheck = row;
144
171
  let visualColumnToCheck = col;
145
172
  if (Array.isArray(modifiedCellCoords)) {
@@ -147,20 +174,20 @@ class EditorManager {
147
174
  }
148
175
 
149
176
  // Getting values using the modified coordinates.
150
- this.cellProperties = this.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);
177
+ this.cellProperties = this.hot.getCellMeta(visualRowToCheck, visualColumnToCheck);
151
178
  if (!this.isCellEditable()) {
152
179
  this.clearActiveEditor();
153
180
  return;
154
181
  }
155
- const td = this.instance.getCell(row, col, true);
182
+ const td = this.hot.getCell(row, col, true);
156
183
 
157
184
  // Skip the preparation when the cell is not rendered in the DOM. The cell is scrolled out of
158
185
  // the table's viewport.
159
186
  if (td) {
160
- const editorClass = this.instance.getCellEditor(this.cellProperties);
161
- const prop = this.instance.colToProp(visualColumnToCheck);
162
- const originalValue = this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(visualRowToCheck), visualColumnToCheck);
163
- this.activeEditor = getEditorInstance(editorClass, this.instance);
187
+ const editorClass = this.hot.getCellEditor(this.cellProperties);
188
+ const prop = this.hot.colToProp(visualColumnToCheck);
189
+ const originalValue = this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(visualRowToCheck), visualColumnToCheck);
190
+ this.activeEditor = getEditorInstance(editorClass, this.hot);
164
191
  // Using not modified coordinates, as we need to get the table element using selection coordinates.
165
192
  // There is an extra translation in the editor for saving value.
166
193
  this.activeEditor.prepare(row, col, prop, td, originalValue, this.cellProperties);
@@ -191,7 +218,7 @@ class EditorManager {
191
218
  return;
192
219
  }
193
220
  if (!this.activeEditor) {
194
- this.instance.scrollToFocusedCell();
221
+ this.hot.scrollToFocusedCell();
195
222
  this.prepareEditor();
196
223
  }
197
224
  if (this.activeEditor) {
@@ -241,7 +268,7 @@ class EditorManager {
241
268
  * @private
242
269
  */
243
270
  clearActiveEditor() {
244
- this.activeEditor = void 0;
271
+ this.activeEditor = undefined;
245
272
  }
246
273
 
247
274
  /**
@@ -255,11 +282,11 @@ class EditorManager {
255
282
  * @returns {boolean}
256
283
  */
257
284
  isCellEditable() {
258
- const selection = this.instance.getSelectedRangeLast();
285
+ const selection = this.hot.getSelectedRangeLast();
259
286
  if (!selection) {
260
287
  return false;
261
288
  }
262
- const editorClass = this.instance.getCellEditor(this.cellProperties);
289
+ const editorClass = this.hot.getCellEditor(this.cellProperties);
263
290
  const {
264
291
  row,
265
292
  col
@@ -267,8 +294,8 @@ class EditorManager {
267
294
  const {
268
295
  rowIndexMapper,
269
296
  columnIndexMapper
270
- } = this.instance;
271
- const isCellHidden = rowIndexMapper.isHidden(this.instance.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.instance.toPhysicalColumn(col));
297
+ } = this.hot;
298
+ const isCellHidden = rowIndexMapper.isHidden(this.hot.toPhysicalRow(row)) || columnIndexMapper.isHidden(this.hot.toPhysicalColumn(col));
272
299
  if (this.cellProperties.readOnly || !editorClass || isCellHidden) {
273
300
  return false;
274
301
  }
@@ -291,73 +318,6 @@ class EditorManager {
291
318
  this.selection.transformStart(enterMoves.row, enterMoves.col, true);
292
319
  }
293
320
  }
294
-
295
- /**
296
- * OnAfterDocumentKeyDown callback.
297
- *
298
- * @private
299
- * @param {KeyboardEvent} event The keyboard event object.
300
- */
301
- onAfterDocumentKeyDown(event) {
302
- const selection = this.instance.getSelectedRangeLast();
303
- if (!this.instance.isListening() || !selection || selection.highlight.isHeader() || isImmediatePropagationStopped(event)) {
304
- return;
305
- }
306
- const {
307
- keyCode
308
- } = event;
309
-
310
- // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
311
- const isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
312
- if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {
313
- if (!isFunctionKey(keyCode) && !isCtrlMetaKey(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {
314
- const shortcutManager = this.instance.getShortcutManager();
315
- const editorContext = shortcutManager.getContext('editor');
316
- const runOnlySelectedConfig = {
317
- runOnlyIf: () => isDefined(this.instance.getSelected()),
318
- group: SHORTCUTS_GROUP_NAVIGATION
319
- };
320
- editorContext.addShortcuts([{
321
- keys: [['ArrowUp']],
322
- callback: () => {
323
- this.instance.selection.transformStart(-1, 0);
324
- }
325
- }, {
326
- keys: [['ArrowDown']],
327
- callback: () => {
328
- this.instance.selection.transformStart(1, 0);
329
- }
330
- }, {
331
- keys: [['ArrowLeft']],
332
- callback: () => {
333
- this.instance.selection.transformStart(0, -1 * this.instance.getDirectionFactor());
334
- }
335
- }, {
336
- keys: [['ArrowRight']],
337
- callback: () => {
338
- this.instance.selection.transformStart(0, this.instance.getDirectionFactor());
339
- }
340
- }], runOnlySelectedConfig);
341
- this.openEditor('', event);
342
- }
343
- }
344
- }
345
-
346
- /**
347
- * OnCellDblClick callback.
348
- *
349
- * @private
350
- * @param {MouseEvent} event The mouse event object.
351
- * @param {object} coords The cell coordinates.
352
- * @param {HTMLTableCellElement|HTMLTableHeaderCellElement} elem The element which triggers the action.
353
- */
354
- onCellDblClick(event, coords, elem) {
355
- // may be TD or TH
356
- if (elem.nodeName === 'TD') {
357
- this.openEditor(null, event, true);
358
- }
359
- }
360
-
361
321
  /**
362
322
  * Destroy the instance.
363
323
  */
@@ -366,6 +326,56 @@ class EditorManager {
366
326
  this.eventManager.destroy();
367
327
  }
368
328
  }
329
+ function _onAfterDocumentKeyDown2(event) {
330
+ const selection = this.hot.getSelectedRangeLast();
331
+ if (!this.hot.isListening() || !selection || selection.highlight.isHeader() || isImmediatePropagationStopped(event)) {
332
+ return;
333
+ }
334
+ const {
335
+ keyCode
336
+ } = event;
337
+
338
+ // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
339
+ const isCtrlPressed = (event.ctrlKey || event.metaKey) && !event.altKey;
340
+ if (!this.activeEditor || this.activeEditor && !this.activeEditor.isWaiting()) {
341
+ if (!isFunctionKey(keyCode) && !isCtrlMetaKey(keyCode) && !isCtrlPressed && !this.isEditorOpened()) {
342
+ const shortcutManager = this.hot.getShortcutManager();
343
+ const editorContext = shortcutManager.getContext('editor');
344
+ const runOnlySelectedConfig = {
345
+ runOnlyIf: () => isDefined(this.hot.getSelected()),
346
+ group: SHORTCUTS_GROUP_NAVIGATION
347
+ };
348
+ editorContext.addShortcuts([{
349
+ keys: [['ArrowUp']],
350
+ callback: () => {
351
+ this.hot.selection.transformStart(-1, 0);
352
+ }
353
+ }, {
354
+ keys: [['ArrowDown']],
355
+ callback: () => {
356
+ this.hot.selection.transformStart(1, 0);
357
+ }
358
+ }, {
359
+ keys: [['ArrowLeft']],
360
+ callback: () => {
361
+ this.hot.selection.transformStart(0, -1 * this.hot.getDirectionFactor());
362
+ }
363
+ }, {
364
+ keys: [['ArrowRight']],
365
+ callback: () => {
366
+ this.hot.selection.transformStart(0, this.hot.getDirectionFactor());
367
+ }
368
+ }], runOnlySelectedConfig);
369
+ this.openEditor('', event);
370
+ }
371
+ }
372
+ }
373
+ function _onCellDblClick2(event, coords, elem) {
374
+ // may be TD or TH
375
+ if (elem.nodeName === 'TD') {
376
+ this.openEditor(null, event, true);
377
+ }
378
+ }
369
379
  const instances = new WeakMap();
370
380
 
371
381
  /**