handsontable 0.0.0-next-6d7bdba-20230620 → 0.0.0-next-06a64be-20230621

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 (281) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
  4. package/3rdparty/walkontable/src/cell/coords.js +12 -61
  5. package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
  6. package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
  7. package/3rdparty/walkontable/src/cell/range.js +7 -44
  8. package/3rdparty/walkontable/src/cell/range.mjs +7 -44
  9. package/3rdparty/walkontable/src/core/_base.js +3 -9
  10. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  11. package/3rdparty/walkontable/src/core/clone.js +2 -2
  12. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  13. package/3rdparty/walkontable/src/core/core.js +2 -3
  14. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  15. package/3rdparty/walkontable/src/event.js +7 -7
  16. package/3rdparty/walkontable/src/event.mjs +7 -7
  17. package/3rdparty/walkontable/src/facade/core.js +2 -2
  18. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  19. package/3rdparty/walkontable/src/index.js +2 -10
  20. package/3rdparty/walkontable/src/index.mjs +2 -2
  21. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +4 -2
  26. package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
  27. package/3rdparty/walkontable/src/selection.js +355 -0
  28. package/3rdparty/walkontable/src/selection.mjs +349 -0
  29. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  30. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  31. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  32. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  33. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  34. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  35. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  36. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  37. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  38. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  39. package/3rdparty/walkontable/src/table.js +79 -7
  40. package/3rdparty/walkontable/src/table.mjs +80 -8
  41. package/base.js +2 -2
  42. package/base.mjs +2 -2
  43. package/core.d.ts +3 -5
  44. package/core.js +309 -127
  45. package/core.mjs +309 -127
  46. package/dataMap/metaManager/metaSchema.js +0 -19
  47. package/dataMap/metaManager/metaSchema.mjs +0 -19
  48. package/dist/handsontable.css +3 -8
  49. package/dist/handsontable.full.css +3 -8
  50. package/dist/handsontable.full.js +10685 -13607
  51. package/dist/handsontable.full.min.css +3 -3
  52. package/dist/handsontable.full.min.js +112 -112
  53. package/dist/handsontable.js +13664 -16586
  54. package/dist/handsontable.min.css +3 -3
  55. package/dist/handsontable.min.js +4 -4
  56. package/editorManager.js +94 -21
  57. package/editorManager.mjs +98 -26
  58. package/editors/textEditor/textEditor.js +11 -3
  59. package/editors/textEditor/textEditor.mjs +12 -4
  60. package/helpers/mixed.js +1 -1
  61. package/helpers/mixed.mjs +1 -1
  62. package/helpers/number.d.ts +0 -1
  63. package/helpers/number.js +0 -18
  64. package/helpers/number.mjs +0 -17
  65. package/package.json +1 -1
  66. package/pluginHooks.d.ts +1 -5
  67. package/pluginHooks.js +1 -89
  68. package/pluginHooks.mjs +1 -89
  69. package/plugins/collapsibleColumns/collapsibleColumns.js +24 -81
  70. package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -81
  71. package/plugins/columnSorting/columnSorting.js +8 -50
  72. package/plugins/columnSorting/columnSorting.mjs +9 -49
  73. package/plugins/columnSorting/index.js +2 -4
  74. package/plugins/columnSorting/index.mjs +1 -1
  75. package/plugins/comments/comments.js +4 -11
  76. package/plugins/comments/comments.mjs +4 -11
  77. package/plugins/contextMenu/contextMenu.d.ts +1 -1
  78. package/plugins/contextMenu/contextMenu.js +29 -80
  79. package/plugins/contextMenu/contextMenu.mjs +30 -81
  80. package/plugins/contextMenu/predefinedItems/alignment.js +0 -7
  81. package/plugins/contextMenu/predefinedItems/alignment.mjs +0 -7
  82. package/plugins/contextMenu/predefinedItems/clearColumn.js +3 -5
  83. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +3 -5
  84. package/plugins/contextMenu/predefinedItems/columnLeft.js +3 -5
  85. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +3 -5
  86. package/plugins/contextMenu/predefinedItems/columnRight.js +3 -5
  87. package/plugins/contextMenu/predefinedItems/columnRight.mjs +3 -5
  88. package/plugins/contextMenu/predefinedItems/readOnly.js +0 -7
  89. package/plugins/contextMenu/predefinedItems/readOnly.mjs +0 -7
  90. package/plugins/contextMenu/predefinedItems/removeColumn.js +5 -7
  91. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +3 -5
  92. package/plugins/contextMenu/predefinedItems/removeRow.js +5 -7
  93. package/plugins/contextMenu/predefinedItems/removeRow.mjs +3 -5
  94. package/plugins/contextMenu/predefinedItems/rowAbove.js +3 -5
  95. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +3 -5
  96. package/plugins/contextMenu/predefinedItems/rowBelow.js +3 -5
  97. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +3 -5
  98. package/plugins/contextMenu/utils.js +16 -25
  99. package/plugins/contextMenu/utils.mjs +15 -24
  100. package/plugins/copyPaste/contextMenuItem/copy.js +0 -7
  101. package/plugins/copyPaste/contextMenuItem/copy.mjs +0 -7
  102. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +1 -9
  103. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +1 -9
  104. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +1 -9
  105. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +1 -9
  106. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +1 -9
  107. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +1 -9
  108. package/plugins/copyPaste/contextMenuItem/cut.js +0 -7
  109. package/plugins/copyPaste/contextMenuItem/cut.mjs +0 -7
  110. package/plugins/copyPaste/copyPaste.js +1 -5
  111. package/plugins/copyPaste/copyPaste.mjs +1 -5
  112. package/plugins/customBorders/customBorders.js +53 -25
  113. package/plugins/customBorders/customBorders.mjs +54 -26
  114. package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
  115. package/plugins/dropdownMenu/dropdownMenu.js +30 -94
  116. package/plugins/dropdownMenu/dropdownMenu.mjs +30 -94
  117. package/plugins/manualColumnResize/manualColumnResize.js +36 -5
  118. package/plugins/manualColumnResize/manualColumnResize.mjs +36 -5
  119. package/plugins/manualRowResize/manualRowResize.js +40 -9
  120. package/plugins/manualRowResize/manualRowResize.mjs +40 -9
  121. package/plugins/mergeCells/mergeCells.js +18 -5
  122. package/plugins/mergeCells/mergeCells.mjs +18 -5
  123. package/plugins/multiColumnSorting/multiColumnSorting.js +3 -42
  124. package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -42
  125. package/plugins/nestedHeaders/nestedHeaders.js +10 -132
  126. package/plugins/nestedHeaders/nestedHeaders.mjs +10 -132
  127. package/plugins/nestedHeaders/stateManager/index.js +0 -37
  128. package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
  129. package/plugins/nestedRows/nestedRows.js +7 -52
  130. package/plugins/nestedRows/nestedRows.mjs +7 -52
  131. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  132. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  133. package/selection/highlight/constants.js +16 -0
  134. package/selection/highlight/constants.mjs +6 -0
  135. package/selection/highlight/highlight.js +89 -312
  136. package/selection/highlight/highlight.mjs +85 -302
  137. package/selection/highlight/types/activeHeader.js +9 -10
  138. package/selection/highlight/types/activeHeader.mjs +8 -10
  139. package/selection/highlight/types/area.js +27 -12
  140. package/selection/highlight/types/area.mjs +30 -16
  141. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  142. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  143. package/selection/highlight/types/customSelection.js +10 -7
  144. package/selection/highlight/types/customSelection.mjs +9 -7
  145. package/selection/highlight/types/fill.js +8 -5
  146. package/selection/highlight/types/fill.mjs +7 -5
  147. package/selection/highlight/types/header.js +20 -10
  148. package/selection/highlight/types/header.mjs +19 -10
  149. package/selection/highlight/types/{row.js → index.js} +31 -27
  150. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  151. package/selection/highlight/visualSelection.js +27 -31
  152. package/selection/highlight/visualSelection.mjs +27 -31
  153. package/selection/index.js +7 -4
  154. package/selection/index.mjs +3 -2
  155. package/selection/mouseEventHandler.js +1 -1
  156. package/selection/mouseEventHandler.mjs +1 -1
  157. package/selection/range.js +8 -8
  158. package/selection/range.mjs +8 -8
  159. package/selection/selection.js +181 -315
  160. package/selection/selection.mjs +180 -310
  161. package/selection/transformation.js +96 -233
  162. package/selection/transformation.mjs +93 -230
  163. package/selection/utils.js +36 -12
  164. package/selection/utils.mjs +36 -13
  165. package/settings.d.ts +0 -1
  166. package/shortcuts/manager.js +0 -2
  167. package/shortcuts/manager.mjs +0 -2
  168. package/shortcuts/recorder.js +2 -2
  169. package/shortcuts/recorder.mjs +2 -2
  170. package/shortcuts/utils.js +5 -21
  171. package/shortcuts/utils.mjs +4 -20
  172. package/tableView.js +9 -58
  173. package/tableView.mjs +9 -58
  174. package/translations/indexMapper.js +9 -8
  175. package/translations/indexMapper.mjs +9 -8
  176. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  177. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  178. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  179. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  180. package/3rdparty/walkontable/src/selection/index.js +0 -30
  181. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  182. package/3rdparty/walkontable/src/selection/manager.js +0 -329
  183. package/3rdparty/walkontable/src/selection/manager.mjs +0 -323
  184. package/3rdparty/walkontable/src/selection/scanner.js +0 -364
  185. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -360
  186. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  187. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  188. package/selection/highlight/types/areaLayered.js +0 -54
  189. package/selection/highlight/types/areaLayered.mjs +0 -49
  190. package/selection/highlight/types/column.js +0 -50
  191. package/selection/highlight/types/column.mjs +0 -45
  192. package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
  193. package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
  194. package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
  195. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
  196. package/shortcutContexts/commands/editor/fastOpen.js +0 -16
  197. package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
  198. package/shortcutContexts/commands/editor/index.js +0 -16
  199. package/shortcutContexts/commands/editor/index.mjs +0 -12
  200. package/shortcutContexts/commands/editor/open.js +0 -29
  201. package/shortcutContexts/commands/editor/open.mjs +0 -24
  202. package/shortcutContexts/commands/emptySelectedCells.js +0 -12
  203. package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
  204. package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
  205. package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
  206. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
  207. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
  208. package/shortcutContexts/commands/extendCellsSelection/index.js +0 -26
  209. package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -22
  210. package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
  211. package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
  212. package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
  213. package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
  214. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +0 -19
  215. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +0 -14
  216. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
  217. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
  218. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
  219. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
  220. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
  221. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
  222. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -40
  223. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -35
  224. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -40
  225. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -35
  226. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
  227. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
  228. package/shortcutContexts/commands/extendCellsSelection/toRows.js +0 -19
  229. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +0 -14
  230. package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
  231. package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
  232. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
  233. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
  234. package/shortcutContexts/commands/index.js +0 -52
  235. package/shortcutContexts/commands/index.mjs +0 -48
  236. package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
  237. package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
  238. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -29
  239. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -24
  240. package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
  241. package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
  242. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
  243. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
  244. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
  245. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
  246. package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
  247. package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
  248. package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
  249. package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
  250. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
  251. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
  252. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
  253. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
  254. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
  255. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
  256. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
  257. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
  258. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -36
  259. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -31
  260. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -36
  261. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -31
  262. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
  263. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
  264. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
  265. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
  266. package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
  267. package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
  268. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -29
  269. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -24
  270. package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
  271. package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
  272. package/shortcutContexts/commands/selectAll.js +0 -11
  273. package/shortcutContexts/commands/selectAll.mjs +0 -6
  274. package/shortcutContexts/constants.js +0 -19
  275. package/shortcutContexts/constants.mjs +0 -12
  276. package/shortcutContexts/editor.js +0 -29
  277. package/shortcutContexts/editor.mjs +0 -25
  278. package/shortcutContexts/grid.js +0 -244
  279. package/shortcutContexts/grid.mjs +0 -240
  280. package/shortcutContexts/index.js +0 -29
  281. package/shortcutContexts/index.mjs +0 -15
@@ -22,9 +22,7 @@ require("core-js/modules/es.object.set-prototype-of.js");
22
22
  require("core-js/modules/es.object.get-prototype-of.js");
23
23
  var _base = require("../base");
24
24
  var _array = require("../../helpers/array");
25
- var _object = require("../../helpers/object");
26
25
  var _commandExecutor = _interopRequireDefault(require("../contextMenu/commandExecutor"));
27
- var _utils = require("../contextMenu/utils");
28
26
  var _eventManager = _interopRequireDefault(require("../../eventManager"));
29
27
  var _element = require("../../helpers/dom/element");
30
28
  var _itemsFactory = _interopRequireDefault(require("../contextMenu/itemsFactory"));
@@ -56,7 +54,6 @@ exports.PLUGIN_KEY = PLUGIN_KEY;
56
54
  var PLUGIN_PRIORITY = 230;
57
55
  exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
58
56
  var BUTTON_CLASS_NAME = 'changeType';
59
- var SHORTCUTS_GROUP = PLUGIN_KEY;
60
57
 
61
58
  /* eslint-disable jsdoc/require-description-complete-sentence */
62
59
  /**
@@ -185,7 +182,6 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
185
182
  if (typeof settings.callback === 'function') {
186
183
  this.commandExecutor.setCommonCallback(settings.callback);
187
184
  }
188
- this.registerShortcuts();
189
185
  _get(_getPrototypeOf(DropdownMenu.prototype), "enablePlugin", this).call(this);
190
186
  this.callOnPluginsReady(function () {
191
187
  _this2.hot.runHooks('afterDropdownMenuDefaultOptions', predefinedItems);
@@ -249,71 +245,9 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
249
245
  if (this.menu) {
250
246
  this.menu.destroy();
251
247
  }
252
- this.unregisterShortcuts();
253
248
  _get(_getPrototypeOf(DropdownMenu.prototype), "disablePlugin", this).call(this);
254
249
  }
255
250
 
256
- /**
257
- * Register shortcuts responsible for toggling dropdown menu.
258
- *
259
- * @private
260
- */
261
- }, {
262
- key: "registerShortcuts",
263
- value: function registerShortcuts() {
264
- var _this3 = this;
265
- var context = this.hot.getShortcutManager().getContext('grid');
266
- var callback = function callback() {
267
- var _this3$hot$getSelecte = _this3.hot.getSelectedRangeLast(),
268
- highlight = _this3$hot$getSelecte.highlight;
269
- if ((highlight.isHeader() && highlight.row === -1 || highlight.isCell()) && highlight.col >= 0) {
270
- _this3.hot.selectColumns(highlight.col, highlight.col, -1);
271
- var _this3$hot$getSelecte2 = _this3.hot.getSelectedRangeLast(),
272
- from = _this3$hot$getSelecte2.from;
273
- var offset = (0, _utils.getDocumentOffsetByElement)(_this3.menu.container, _this3.hot.rootDocument);
274
- var target = _this3.hot.getCell(-1, from.col, true);
275
- var rect = target.getBoundingClientRect();
276
- _this3.open({
277
- left: rect.left + offset.left,
278
- top: rect.top + target.offsetHeight + offset.top
279
- }, {
280
- left: rect.width
281
- });
282
- _this3.hot._registerTimeout(function () {
283
- _this3.menu.selectFirstCell();
284
- });
285
- }
286
- };
287
- context.addShortcuts([{
288
- keys: [['Shift', 'Alt', 'ArrowDown'], ['Shift', 'Enter']],
289
- callback: callback,
290
- runOnlyIf: function runOnlyIf() {
291
- var _this3$hot$getSelecte3;
292
- return ((_this3$hot$getSelecte3 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte3 === void 0 ? void 0 : _this3$hot$getSelecte3.highlight.isHeader()) && !_this3.menu.isOpened();
293
- },
294
- group: SHORTCUTS_GROUP
295
- }, {
296
- keys: [['Shift', 'Alt', 'ArrowDown']],
297
- callback: callback,
298
- runOnlyIf: function runOnlyIf() {
299
- var _this3$hot$getSelecte4;
300
- return ((_this3$hot$getSelecte4 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte4 === void 0 ? void 0 : _this3$hot$getSelecte4.highlight.isCell()) && !_this3.menu.isOpened();
301
- },
302
- group: SHORTCUTS_GROUP
303
- }]);
304
- }
305
-
306
- /**
307
- * Unregister shortcuts responsible for toggling dropdown menu.
308
- *
309
- * @private
310
- */
311
- }, {
312
- key: "unregisterShortcuts",
313
- value: function unregisterShortcuts() {
314
- this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
315
- }
316
-
317
251
  /**
318
252
  * Registers the DOM listeners.
319
253
  *
@@ -322,42 +256,33 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
322
256
  }, {
323
257
  key: "registerEvents",
324
258
  value: function registerEvents() {
325
- var _this4 = this;
259
+ var _this3 = this;
326
260
  this.eventManager.addEventListener(this.hot.rootElement, 'click', function (event) {
327
- return _this4.onTableClick(event);
261
+ return _this3.onTableClick(event);
328
262
  });
329
263
  }
330
264
 
331
265
  /**
332
266
  * Opens menu and re-position it based on the passed coordinates.
333
267
  *
334
- * @param {{ top: number, left: number }|Event} position An object with `top` and `left` properties
335
- * which contains coordinates relative to the browsers viewport (without included scroll offsets).
336
- * Or if the native event is passed the menu will be positioned based on the `pageX` and `pageY`
337
- * coordinates.
338
- * @param {{ above?: number, below?: number, left?: number, right?: number }} offset An object allows applying
339
- * the offset to the menu position.
268
+ * @param {object|Event} position An object with `pageX` and `pageY` properties which contains values relative to
269
+ * the top left of the fully rendered content area in the browser or with `clientX`
270
+ * and `clientY` properties which contains values relative to the upper left edge
271
+ * of the content area (the viewport) of the browser window. This object is structurally
272
+ * compatible with native mouse event so it can be used either.
340
273
  * @fires Hooks#beforeDropdownMenuShow
341
274
  * @fires Hooks#afterDropdownMenuShow
342
275
  */
343
276
  }, {
344
277
  key: "open",
345
278
  value: function open(position) {
346
- var _this$menu,
347
- _this5 = this;
348
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
349
- above: 0,
350
- below: 0,
351
- left: 0,
352
- right: 0
353
- };
354
- if ((_this$menu = this.menu) !== null && _this$menu !== void 0 && _this$menu.isOpened()) {
279
+ if (!this.menu) {
355
280
  return;
356
281
  }
357
282
  this.menu.open();
358
- (0, _object.objectEach)(offset, function (value, key) {
359
- _this5.menu.setOffset(key, value);
360
- });
283
+ if (position.width) {
284
+ this.menu.setOffset('left', position.width);
285
+ }
361
286
  this.menu.setPosition(position);
362
287
  }
363
288
 
@@ -367,8 +292,10 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
367
292
  }, {
368
293
  key: "close",
369
294
  value: function close() {
370
- var _this$menu2;
371
- (_this$menu2 = this.menu) === null || _this$menu2 === void 0 ? void 0 : _this$menu2.close();
295
+ if (!this.menu) {
296
+ return;
297
+ }
298
+ this.menu.close();
372
299
  }
373
300
 
374
301
  /**
@@ -440,14 +367,23 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
440
367
  key: "onTableClick",
441
368
  value: function onTableClick(event) {
442
369
  event.stopPropagation();
443
- if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME)) {
444
- var offset = (0, _utils.getDocumentOffsetByElement)(this.menu.container, this.hot.rootDocument);
370
+ if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME) && !this.menu.isOpened()) {
371
+ var offsetTop = 0;
372
+ var offsetLeft = 0;
373
+ if (this.hot.rootDocument !== this.menu.container.ownerDocument) {
374
+ var frameElement = this.hot.rootWindow.frameElement;
375
+ var _frameElement$getBoun = frameElement.getBoundingClientRect(),
376
+ top = _frameElement$getBoun.top,
377
+ left = _frameElement$getBoun.left;
378
+ offsetTop = top;
379
+ offsetLeft = left;
380
+ }
445
381
  var rect = event.target.getBoundingClientRect();
446
382
  this.open({
447
- left: rect.left + offset.left,
448
- top: rect.top + event.target.offsetHeight + 3 + offset.top
449
- }, {
450
- left: rect.width
383
+ left: rect.left + offsetLeft,
384
+ top: rect.top + event.target.offsetHeight + 3 + offsetTop,
385
+ width: rect.width,
386
+ height: rect.height
451
387
  });
452
388
  }
453
389
  }
@@ -32,9 +32,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
32
32
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
33
  import { BasePlugin } from "../base/index.mjs";
34
34
  import { arrayEach } from "../../helpers/array.mjs";
35
- import { objectEach } from "../../helpers/object.mjs";
36
35
  import CommandExecutor from "../contextMenu/commandExecutor.mjs";
37
- import { getDocumentOffsetByElement } from "../contextMenu/utils.mjs";
38
36
  import EventManager from "../../eventManager.mjs";
39
37
  import { hasClass } from "../../helpers/dom/element.mjs";
40
38
  import ItemsFactory from "../contextMenu/itemsFactory.mjs";
@@ -49,7 +47,6 @@ Hooks.getSingleton().register('afterDropdownMenuExecute');
49
47
  export var PLUGIN_KEY = 'dropdownMenu';
50
48
  export var PLUGIN_PRIORITY = 230;
51
49
  var BUTTON_CLASS_NAME = 'changeType';
52
- var SHORTCUTS_GROUP = PLUGIN_KEY;
53
50
 
54
51
  /* eslint-disable jsdoc/require-description-complete-sentence */
55
52
  /**
@@ -179,7 +176,6 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
179
176
  if (typeof settings.callback === 'function') {
180
177
  this.commandExecutor.setCommonCallback(settings.callback);
181
178
  }
182
- this.registerShortcuts();
183
179
  _get(_getPrototypeOf(DropdownMenu.prototype), "enablePlugin", this).call(this);
184
180
  this.callOnPluginsReady(function () {
185
181
  _this2.hot.runHooks('afterDropdownMenuDefaultOptions', predefinedItems);
@@ -243,71 +239,9 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
243
239
  if (this.menu) {
244
240
  this.menu.destroy();
245
241
  }
246
- this.unregisterShortcuts();
247
242
  _get(_getPrototypeOf(DropdownMenu.prototype), "disablePlugin", this).call(this);
248
243
  }
249
244
 
250
- /**
251
- * Register shortcuts responsible for toggling dropdown menu.
252
- *
253
- * @private
254
- */
255
- }, {
256
- key: "registerShortcuts",
257
- value: function registerShortcuts() {
258
- var _this3 = this;
259
- var context = this.hot.getShortcutManager().getContext('grid');
260
- var callback = function callback() {
261
- var _this3$hot$getSelecte = _this3.hot.getSelectedRangeLast(),
262
- highlight = _this3$hot$getSelecte.highlight;
263
- if ((highlight.isHeader() && highlight.row === -1 || highlight.isCell()) && highlight.col >= 0) {
264
- _this3.hot.selectColumns(highlight.col, highlight.col, -1);
265
- var _this3$hot$getSelecte2 = _this3.hot.getSelectedRangeLast(),
266
- from = _this3$hot$getSelecte2.from;
267
- var offset = getDocumentOffsetByElement(_this3.menu.container, _this3.hot.rootDocument);
268
- var target = _this3.hot.getCell(-1, from.col, true);
269
- var rect = target.getBoundingClientRect();
270
- _this3.open({
271
- left: rect.left + offset.left,
272
- top: rect.top + target.offsetHeight + offset.top
273
- }, {
274
- left: rect.width
275
- });
276
- _this3.hot._registerTimeout(function () {
277
- _this3.menu.selectFirstCell();
278
- });
279
- }
280
- };
281
- context.addShortcuts([{
282
- keys: [['Shift', 'Alt', 'ArrowDown'], ['Shift', 'Enter']],
283
- callback: callback,
284
- runOnlyIf: function runOnlyIf() {
285
- var _this3$hot$getSelecte3;
286
- return ((_this3$hot$getSelecte3 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte3 === void 0 ? void 0 : _this3$hot$getSelecte3.highlight.isHeader()) && !_this3.menu.isOpened();
287
- },
288
- group: SHORTCUTS_GROUP
289
- }, {
290
- keys: [['Shift', 'Alt', 'ArrowDown']],
291
- callback: callback,
292
- runOnlyIf: function runOnlyIf() {
293
- var _this3$hot$getSelecte4;
294
- return ((_this3$hot$getSelecte4 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte4 === void 0 ? void 0 : _this3$hot$getSelecte4.highlight.isCell()) && !_this3.menu.isOpened();
295
- },
296
- group: SHORTCUTS_GROUP
297
- }]);
298
- }
299
-
300
- /**
301
- * Unregister shortcuts responsible for toggling dropdown menu.
302
- *
303
- * @private
304
- */
305
- }, {
306
- key: "unregisterShortcuts",
307
- value: function unregisterShortcuts() {
308
- this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
309
- }
310
-
311
245
  /**
312
246
  * Registers the DOM listeners.
313
247
  *
@@ -316,42 +250,33 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
316
250
  }, {
317
251
  key: "registerEvents",
318
252
  value: function registerEvents() {
319
- var _this4 = this;
253
+ var _this3 = this;
320
254
  this.eventManager.addEventListener(this.hot.rootElement, 'click', function (event) {
321
- return _this4.onTableClick(event);
255
+ return _this3.onTableClick(event);
322
256
  });
323
257
  }
324
258
 
325
259
  /**
326
260
  * Opens menu and re-position it based on the passed coordinates.
327
261
  *
328
- * @param {{ top: number, left: number }|Event} position An object with `top` and `left` properties
329
- * which contains coordinates relative to the browsers viewport (without included scroll offsets).
330
- * Or if the native event is passed the menu will be positioned based on the `pageX` and `pageY`
331
- * coordinates.
332
- * @param {{ above?: number, below?: number, left?: number, right?: number }} offset An object allows applying
333
- * the offset to the menu position.
262
+ * @param {object|Event} position An object with `pageX` and `pageY` properties which contains values relative to
263
+ * the top left of the fully rendered content area in the browser or with `clientX`
264
+ * and `clientY` properties which contains values relative to the upper left edge
265
+ * of the content area (the viewport) of the browser window. This object is structurally
266
+ * compatible with native mouse event so it can be used either.
334
267
  * @fires Hooks#beforeDropdownMenuShow
335
268
  * @fires Hooks#afterDropdownMenuShow
336
269
  */
337
270
  }, {
338
271
  key: "open",
339
272
  value: function open(position) {
340
- var _this$menu,
341
- _this5 = this;
342
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
343
- above: 0,
344
- below: 0,
345
- left: 0,
346
- right: 0
347
- };
348
- if ((_this$menu = this.menu) !== null && _this$menu !== void 0 && _this$menu.isOpened()) {
273
+ if (!this.menu) {
349
274
  return;
350
275
  }
351
276
  this.menu.open();
352
- objectEach(offset, function (value, key) {
353
- _this5.menu.setOffset(key, value);
354
- });
277
+ if (position.width) {
278
+ this.menu.setOffset('left', position.width);
279
+ }
355
280
  this.menu.setPosition(position);
356
281
  }
357
282
 
@@ -361,8 +286,10 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
361
286
  }, {
362
287
  key: "close",
363
288
  value: function close() {
364
- var _this$menu2;
365
- (_this$menu2 = this.menu) === null || _this$menu2 === void 0 ? void 0 : _this$menu2.close();
289
+ if (!this.menu) {
290
+ return;
291
+ }
292
+ this.menu.close();
366
293
  }
367
294
 
368
295
  /**
@@ -434,14 +361,23 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
434
361
  key: "onTableClick",
435
362
  value: function onTableClick(event) {
436
363
  event.stopPropagation();
437
- if (hasClass(event.target, BUTTON_CLASS_NAME)) {
438
- var offset = getDocumentOffsetByElement(this.menu.container, this.hot.rootDocument);
364
+ if (hasClass(event.target, BUTTON_CLASS_NAME) && !this.menu.isOpened()) {
365
+ var offsetTop = 0;
366
+ var offsetLeft = 0;
367
+ if (this.hot.rootDocument !== this.menu.container.ownerDocument) {
368
+ var frameElement = this.hot.rootWindow.frameElement;
369
+ var _frameElement$getBoun = frameElement.getBoundingClientRect(),
370
+ top = _frameElement$getBoun.top,
371
+ left = _frameElement$getBoun.left;
372
+ offsetTop = top;
373
+ offsetLeft = left;
374
+ }
439
375
  var rect = event.target.getBoundingClientRect();
440
376
  this.open({
441
- left: rect.left + offset.left,
442
- top: rect.top + event.target.offsetHeight + 3 + offset.top
443
- }, {
444
- left: rect.width
377
+ left: rect.left + offsetLeft,
378
+ top: rect.top + event.target.offsetHeight + 3 + offsetTop,
379
+ width: rect.width,
380
+ height: rect.height
445
381
  });
446
382
  }
447
383
  }
@@ -87,6 +87,7 @@ var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
87
87
  _this.guide = rootDocument.createElement('DIV');
88
88
  _this.eventManager = new _eventManager.default(_assertThisInitialized(_this));
89
89
  _this.pressed = null;
90
+ _this.isTriggeredByRMB = false;
90
91
  _this.dblclick = 0;
91
92
  _this.autoresizeTimeout = null;
92
93
 
@@ -437,6 +438,11 @@ var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
437
438
  if ((0, _element.isDetached)(event.target)) {
438
439
  return;
439
440
  }
441
+
442
+ // A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
443
+ if (this.isTriggeredByRMB === true) {
444
+ return;
445
+ }
440
446
  if (this.checkIfColumnHeader(event.target)) {
441
447
  var th = this.getClosestTHParent(event.target);
442
448
  if (!th) {
@@ -593,6 +599,28 @@ var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
593
599
  }
594
600
  }
595
601
 
602
+ /**
603
+ * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
604
+ *
605
+ * @private
606
+ */
607
+ }, {
608
+ key: "onContextMenu",
609
+ value: function onContextMenu() {
610
+ var _this9 = this;
611
+ this.hideHandleAndGuide();
612
+ this.hot.rootElement.removeChild(this.handle);
613
+ this.hot.rootElement.removeChild(this.guide);
614
+ this.pressed = false;
615
+ this.isTriggeredByRMB = true;
616
+
617
+ // There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
618
+ // shouldn't be drawn just after removing it.
619
+ this.hot._registerImmediate(function () {
620
+ _this9.isTriggeredByRMB = false;
621
+ });
622
+ }
623
+
596
624
  /**
597
625
  * Binds the mouse events.
598
626
  *
@@ -601,21 +629,24 @@ var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
601
629
  }, {
602
630
  key: "bindEvents",
603
631
  value: function bindEvents() {
604
- var _this9 = this;
632
+ var _this10 = this;
605
633
  var _this$hot = this.hot,
606
634
  rootWindow = _this$hot.rootWindow,
607
635
  rootElement = _this$hot.rootElement;
608
636
  this.eventManager.addEventListener(rootElement, 'mouseover', function (e) {
609
- return _this9.onMouseOver(e);
637
+ return _this10.onMouseOver(e);
610
638
  });
611
639
  this.eventManager.addEventListener(rootElement, 'mousedown', function (e) {
612
- return _this9.onMouseDown(e);
640
+ return _this10.onMouseDown(e);
613
641
  });
614
642
  this.eventManager.addEventListener(rootWindow, 'mousemove', function (e) {
615
- return _this9.onMouseMove(e);
643
+ return _this10.onMouseMove(e);
616
644
  });
617
645
  this.eventManager.addEventListener(rootWindow, 'mouseup', function () {
618
- return _this9.onMouseUp();
646
+ return _this10.onMouseUp();
647
+ });
648
+ this.eventManager.addEventListener(this.handle, 'contextmenu', function () {
649
+ return _this10.onContextMenu();
619
650
  });
620
651
  }
621
652
 
@@ -78,6 +78,7 @@ export var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
78
78
  _this.guide = rootDocument.createElement('DIV');
79
79
  _this.eventManager = new EventManager(_assertThisInitialized(_this));
80
80
  _this.pressed = null;
81
+ _this.isTriggeredByRMB = false;
81
82
  _this.dblclick = 0;
82
83
  _this.autoresizeTimeout = null;
83
84
 
@@ -428,6 +429,11 @@ export var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
428
429
  if (isDetached(event.target)) {
429
430
  return;
430
431
  }
432
+
433
+ // A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
434
+ if (this.isTriggeredByRMB === true) {
435
+ return;
436
+ }
431
437
  if (this.checkIfColumnHeader(event.target)) {
432
438
  var th = this.getClosestTHParent(event.target);
433
439
  if (!th) {
@@ -584,6 +590,28 @@ export var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
584
590
  }
585
591
  }
586
592
 
593
+ /**
594
+ * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
595
+ *
596
+ * @private
597
+ */
598
+ }, {
599
+ key: "onContextMenu",
600
+ value: function onContextMenu() {
601
+ var _this9 = this;
602
+ this.hideHandleAndGuide();
603
+ this.hot.rootElement.removeChild(this.handle);
604
+ this.hot.rootElement.removeChild(this.guide);
605
+ this.pressed = false;
606
+ this.isTriggeredByRMB = true;
607
+
608
+ // There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
609
+ // shouldn't be drawn just after removing it.
610
+ this.hot._registerImmediate(function () {
611
+ _this9.isTriggeredByRMB = false;
612
+ });
613
+ }
614
+
587
615
  /**
588
616
  * Binds the mouse events.
589
617
  *
@@ -592,21 +620,24 @@ export var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {
592
620
  }, {
593
621
  key: "bindEvents",
594
622
  value: function bindEvents() {
595
- var _this9 = this;
623
+ var _this10 = this;
596
624
  var _this$hot = this.hot,
597
625
  rootWindow = _this$hot.rootWindow,
598
626
  rootElement = _this$hot.rootElement;
599
627
  this.eventManager.addEventListener(rootElement, 'mouseover', function (e) {
600
- return _this9.onMouseOver(e);
628
+ return _this10.onMouseOver(e);
601
629
  });
602
630
  this.eventManager.addEventListener(rootElement, 'mousedown', function (e) {
603
- return _this9.onMouseDown(e);
631
+ return _this10.onMouseDown(e);
604
632
  });
605
633
  this.eventManager.addEventListener(rootWindow, 'mousemove', function (e) {
606
- return _this9.onMouseMove(e);
634
+ return _this10.onMouseMove(e);
607
635
  });
608
636
  this.eventManager.addEventListener(rootWindow, 'mouseup', function () {
609
- return _this9.onMouseUp();
637
+ return _this10.onMouseUp();
638
+ });
639
+ this.eventManager.addEventListener(this.handle, 'contextmenu', function () {
640
+ return _this10.onContextMenu();
610
641
  });
611
642
  }
612
643
 
@@ -88,6 +88,7 @@ var ManualRowResize = /*#__PURE__*/function (_BasePlugin) {
88
88
  _this.guide = rootDocument.createElement('DIV');
89
89
  _this.eventManager = new _eventManager.default(_assertThisInitialized(_this));
90
90
  _this.pressed = null;
91
+ _this.isTriggeredByRMB = false;
91
92
  _this.dblclick = 0;
92
93
  _this.autoresizeTimeout = null;
93
94
 
@@ -409,6 +410,11 @@ var ManualRowResize = /*#__PURE__*/function (_BasePlugin) {
409
410
  if ((0, _element.isDetached)(event.target)) {
410
411
  return;
411
412
  }
413
+
414
+ // A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
415
+ if (this.isTriggeredByRMB === true) {
416
+ return;
417
+ }
412
418
  if (this.checkIfRowHeader(event.target)) {
413
419
  var th = this.getClosestTHParent(event.target);
414
420
  if (th) {
@@ -555,6 +561,28 @@ var ManualRowResize = /*#__PURE__*/function (_BasePlugin) {
555
561
  }
556
562
  }
557
563
 
564
+ /**
565
+ * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
566
+ *
567
+ * @private
568
+ */
569
+ }, {
570
+ key: "onContextMenu",
571
+ value: function onContextMenu() {
572
+ var _this8 = this;
573
+ this.hideHandleAndGuide();
574
+ this.hot.rootElement.removeChild(this.handle);
575
+ this.hot.rootElement.removeChild(this.guide);
576
+ this.pressed = false;
577
+ this.isTriggeredByRMB = true;
578
+
579
+ // There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
580
+ // shouldn't be drawn just after removing it.
581
+ this.hot._registerImmediate(function () {
582
+ _this8.isTriggeredByRMB = false;
583
+ });
584
+ }
585
+
558
586
  /**
559
587
  * Binds the mouse events.
560
588
  *
@@ -563,21 +591,24 @@ var ManualRowResize = /*#__PURE__*/function (_BasePlugin) {
563
591
  }, {
564
592
  key: "bindEvents",
565
593
  value: function bindEvents() {
566
- var _this8 = this;
594
+ var _this9 = this;
567
595
  var _this$hot = this.hot,
568
596
  rootElement = _this$hot.rootElement,
569
597
  rootWindow = _this$hot.rootWindow;
570
598
  this.eventManager.addEventListener(rootElement, 'mouseover', function (e) {
571
- return _this8.onMouseOver(e);
599
+ return _this9.onMouseOver(e);
572
600
  });
573
601
  this.eventManager.addEventListener(rootElement, 'mousedown', function (e) {
574
- return _this8.onMouseDown(e);
602
+ return _this9.onMouseDown(e);
575
603
  });
576
604
  this.eventManager.addEventListener(rootWindow, 'mousemove', function (e) {
577
- return _this8.onMouseMove(e);
605
+ return _this9.onMouseMove(e);
578
606
  });
579
607
  this.eventManager.addEventListener(rootWindow, 'mouseup', function () {
580
- return _this8.onMouseUp();
608
+ return _this9.onMouseUp();
609
+ });
610
+ this.eventManager.addEventListener(this.handle, 'contextmenu', function () {
611
+ return _this9.onContextMenu();
581
612
  });
582
613
  }
583
614
 
@@ -611,23 +642,23 @@ var ManualRowResize = /*#__PURE__*/function (_BasePlugin) {
611
642
  }, {
612
643
  key: "onMapInit",
613
644
  value: function onMapInit() {
614
- var _this9 = this;
645
+ var _this10 = this;
615
646
  var priv = privatePool.get(this);
616
647
  var initialSetting = this.hot.getSettings()[PLUGIN_KEY];
617
648
  var loadedManualRowHeights = this.loadManualRowHeights();
618
649
  this.hot.batchExecution(function () {
619
650
  if (typeof loadedManualRowHeights !== 'undefined') {
620
651
  loadedManualRowHeights.forEach(function (height, index) {
621
- _this9.rowHeightsMap.setValueAtIndex(index, height);
652
+ _this10.rowHeightsMap.setValueAtIndex(index, height);
622
653
  });
623
654
  } else if (Array.isArray(initialSetting)) {
624
655
  initialSetting.forEach(function (height, index) {
625
- _this9.rowHeightsMap.setValueAtIndex(index, height);
656
+ _this10.rowHeightsMap.setValueAtIndex(index, height);
626
657
  });
627
658
  priv.config = initialSetting;
628
659
  } else if (initialSetting === true && Array.isArray(priv.config)) {
629
660
  priv.config.forEach(function (height, index) {
630
- _this9.rowHeightsMap.setValueAtIndex(index, height);
661
+ _this10.rowHeightsMap.setValueAtIndex(index, height);
631
662
  });
632
663
  }
633
664
  }, true);