handsontable 0.0.0-next-53a190b-20240403 → 0.0.0-next-5a535ed-20240403

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (284) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +17 -12
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
  5. package/3rdparty/walkontable/src/cell/coords.js +17 -12
  6. package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
  7. package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
  8. package/3rdparty/walkontable/src/cell/range.js +28 -40
  9. package/3rdparty/walkontable/src/cell/range.mjs +28 -40
  10. package/3rdparty/walkontable/src/core/_base.js +1 -1
  11. package/3rdparty/walkontable/src/core/_base.mjs +1 -1
  12. package/3rdparty/walkontable/src/event.js +104 -72
  13. package/3rdparty/walkontable/src/event.mjs +104 -72
  14. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -15
  15. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -16
  16. package/3rdparty/walkontable/src/overlay/top.js +0 -11
  17. package/3rdparty/walkontable/src/overlay/top.mjs +1 -12
  18. package/3rdparty/walkontable/src/overlays.js +4 -46
  19. package/3rdparty/walkontable/src/overlays.mjs +4 -46
  20. package/3rdparty/walkontable/src/scroll.js +17 -15
  21. package/3rdparty/walkontable/src/scroll.mjs +17 -15
  22. package/3rdparty/walkontable/src/selection/manager.js +69 -48
  23. package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
  24. package/3rdparty/walkontable/src/selection/scanner.js +42 -33
  25. package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
  26. package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
  27. package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
  28. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  29. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  30. package/base.js +2 -2
  31. package/base.mjs +2 -2
  32. package/core/viewportScroll/index.js +1 -4
  33. package/core/viewportScroll/index.mjs +1 -4
  34. package/core.d.ts +3 -4
  35. package/core.js +22 -77
  36. package/core.mjs +22 -77
  37. package/dataMap/dataSource.js +1 -1
  38. package/dataMap/dataSource.mjs +1 -1
  39. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  40. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  41. package/dataMap/metaManager/metaSchema.js +1 -1
  42. package/dataMap/metaManager/metaSchema.mjs +1 -1
  43. package/dataMap/replaceData.js +1 -1
  44. package/dataMap/replaceData.mjs +1 -1
  45. package/dist/handsontable.css +4 -4
  46. package/dist/handsontable.full.css +4 -4
  47. package/dist/handsontable.full.js +9121 -9062
  48. package/dist/handsontable.full.min.css +3 -3
  49. package/dist/handsontable.full.min.js +292 -292
  50. package/dist/handsontable.js +6573 -6967
  51. package/dist/handsontable.min.css +3 -3
  52. package/dist/handsontable.min.js +25 -25
  53. package/dist/languages/all.min.js +1 -1
  54. package/dist/languages/ar-AR.min.js +1 -1
  55. package/dist/languages/cs-CZ.min.js +1 -1
  56. package/dist/languages/de-CH.min.js +1 -1
  57. package/dist/languages/de-DE.min.js +1 -1
  58. package/dist/languages/en-US.min.js +1 -1
  59. package/dist/languages/es-MX.min.js +1 -1
  60. package/dist/languages/fr-FR.min.js +1 -1
  61. package/dist/languages/hr-HR.min.js +1 -1
  62. package/dist/languages/it-IT.min.js +1 -1
  63. package/dist/languages/ja-JP.min.js +1 -1
  64. package/dist/languages/ko-KR.min.js +1 -1
  65. package/dist/languages/lv-LV.min.js +1 -1
  66. package/dist/languages/nb-NO.min.js +1 -1
  67. package/dist/languages/nl-NL.min.js +1 -1
  68. package/dist/languages/pl-PL.min.js +1 -1
  69. package/dist/languages/pt-BR.min.js +1 -1
  70. package/dist/languages/ru-RU.min.js +1 -1
  71. package/dist/languages/sr-SP.min.js +1 -1
  72. package/dist/languages/zh-CN.min.js +1 -1
  73. package/dist/languages/zh-TW.min.js +1 -1
  74. package/editorManager.js +23 -25
  75. package/editorManager.mjs +23 -25
  76. package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
  77. package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
  78. package/editors/selectEditor/selectEditor.js +19 -20
  79. package/editors/selectEditor/selectEditor.mjs +19 -20
  80. package/eventManager.js +1 -1
  81. package/eventManager.mjs +1 -1
  82. package/focusManager.js +82 -64
  83. package/focusManager.mjs +82 -64
  84. package/helpers/dom/element.js +1 -23
  85. package/helpers/dom/element.mjs +1 -21
  86. package/helpers/mixed.js +1 -1
  87. package/helpers/mixed.mjs +1 -1
  88. package/helpers/object.js +2 -2
  89. package/helpers/object.mjs +2 -2
  90. package/index.d.ts +0 -10
  91. package/package.json +2 -7
  92. package/pluginHooks.d.ts +3 -4
  93. package/pluginHooks.js +38 -99
  94. package/pluginHooks.mjs +38 -99
  95. package/plugins/autoColumnSize/autoColumnSize.js +65 -49
  96. package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
  97. package/plugins/autoRowSize/autoRowSize.js +34 -28
  98. package/plugins/autoRowSize/autoRowSize.mjs +34 -28
  99. package/plugins/autofill/autofill.js +38 -30
  100. package/plugins/autofill/autofill.mjs +38 -30
  101. package/plugins/base/base.js +17 -12
  102. package/plugins/base/base.mjs +17 -12
  103. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  104. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  105. package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
  106. package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
  107. package/plugins/columnSorting/columnSorting.js +45 -49
  108. package/plugins/columnSorting/columnSorting.mjs +45 -49
  109. package/plugins/columnSummary/columnSummary.js +26 -22
  110. package/plugins/columnSummary/columnSummary.mjs +26 -22
  111. package/plugins/comments/comments.js +158 -116
  112. package/plugins/comments/comments.mjs +158 -116
  113. package/plugins/contextMenu/contextMenu.js +26 -20
  114. package/plugins/contextMenu/contextMenu.mjs +26 -20
  115. package/plugins/contextMenu/itemsFactory.js +1 -1
  116. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  117. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  118. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  119. package/plugins/contextMenu/menu/menu.js +21 -13
  120. package/plugins/contextMenu/menu/menu.mjs +21 -13
  121. package/plugins/contextMenu/menu/positioner.js +58 -41
  122. package/plugins/contextMenu/menu/positioner.mjs +58 -41
  123. package/plugins/copyPaste/copyPaste.js +157 -116
  124. package/plugins/copyPaste/copyPaste.mjs +157 -116
  125. package/plugins/copyPaste/copyableRanges.js +66 -43
  126. package/plugins/copyPaste/copyableRanges.mjs +66 -43
  127. package/plugins/customBorders/customBorders.js +13 -11
  128. package/plugins/customBorders/customBorders.mjs +13 -11
  129. package/plugins/dragToScroll/dragToScroll.js +6 -6
  130. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  131. package/plugins/dropdownMenu/dropdownMenu.js +106 -80
  132. package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
  133. package/plugins/exportFile/dataProvider.js +1 -1
  134. package/plugins/exportFile/dataProvider.mjs +1 -1
  135. package/plugins/filters/component/actionBar.js +9 -9
  136. package/plugins/filters/component/actionBar.mjs +8 -8
  137. package/plugins/filters/component/condition.js +15 -13
  138. package/plugins/filters/component/condition.mjs +15 -13
  139. package/plugins/filters/component/operators.js +6 -6
  140. package/plugins/filters/component/operators.mjs +6 -6
  141. package/plugins/filters/component/value.js +28 -24
  142. package/plugins/filters/component/value.mjs +28 -24
  143. package/plugins/filters/conditionUpdateObserver.js +24 -22
  144. package/plugins/filters/conditionUpdateObserver.mjs +24 -22
  145. package/plugins/filters/dataFilter.js +1 -1
  146. package/plugins/filters/dataFilter.mjs +1 -1
  147. package/plugins/filters/filters.js +95 -81
  148. package/plugins/filters/filters.mjs +95 -81
  149. package/plugins/filters/ui/input.js +19 -13
  150. package/plugins/filters/ui/input.mjs +19 -13
  151. package/plugins/filters/ui/link.js +13 -8
  152. package/plugins/filters/ui/link.mjs +13 -8
  153. package/plugins/filters/ui/multipleSelect.js +112 -85
  154. package/plugins/filters/ui/multipleSelect.mjs +112 -85
  155. package/plugins/filters/ui/radioInput.js +20 -12
  156. package/plugins/filters/ui/radioInput.mjs +20 -12
  157. package/plugins/filters/ui/select.js +72 -50
  158. package/plugins/filters/ui/select.mjs +71 -49
  159. package/plugins/formulas/formulas.js +326 -268
  160. package/plugins/formulas/formulas.mjs +327 -269
  161. package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
  162. package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
  163. package/plugins/formulas/indexSyncer/index.js +48 -25
  164. package/plugins/formulas/indexSyncer/index.mjs +48 -25
  165. package/plugins/hiddenColumns/hiddenColumns.js +83 -64
  166. package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
  167. package/plugins/hiddenRows/hiddenRows.js +82 -63
  168. package/plugins/hiddenRows/hiddenRows.mjs +82 -63
  169. package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
  170. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
  171. package/plugins/manualColumnMove/manualColumnMove.js +170 -126
  172. package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
  173. package/plugins/manualColumnResize/manualColumnResize.js +230 -169
  174. package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
  175. package/plugins/manualRowMove/manualRowMove.js +128 -99
  176. package/plugins/manualRowMove/manualRowMove.mjs +128 -99
  177. package/plugins/manualRowResize/manualRowResize.js +209 -150
  178. package/plugins/manualRowResize/manualRowResize.mjs +209 -150
  179. package/plugins/mergeCells/calculations/selection.js +71 -2
  180. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  181. package/plugins/mergeCells/cellsCollection.js +1 -117
  182. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  183. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  184. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  185. package/plugins/mergeCells/mergeCells.js +397 -499
  186. package/plugins/mergeCells/mergeCells.mjs +397 -499
  187. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
  188. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
  189. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  190. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  191. package/plugins/nestedHeaders/nestedHeaders.js +253 -205
  192. package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
  193. package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
  194. package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
  195. package/plugins/nestedHeaders/stateManager/index.js +41 -30
  196. package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
  197. package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
  198. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
  199. package/plugins/nestedRows/data/dataManager.js +1 -1
  200. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  201. package/plugins/nestedRows/nestedRows.js +182 -151
  202. package/plugins/nestedRows/nestedRows.mjs +183 -152
  203. package/plugins/nestedRows/ui/contextMenu.js +15 -11
  204. package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
  205. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  206. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  207. package/plugins/persistentState/storage.js +2 -2
  208. package/plugins/persistentState/storage.mjs +2 -2
  209. package/plugins/search/search.js +7 -7
  210. package/plugins/search/search.mjs +7 -7
  211. package/plugins/touchScroll/touchScroll.js +19 -15
  212. package/plugins/touchScroll/touchScroll.mjs +20 -16
  213. package/plugins/trimRows/trimRows.js +6 -6
  214. package/plugins/trimRows/trimRows.mjs +6 -6
  215. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  216. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  217. package/selection/highlight/highlight.js +14 -14
  218. package/selection/highlight/highlight.mjs +13 -13
  219. package/selection/highlight/visualSelection.js +0 -2
  220. package/selection/highlight/visualSelection.mjs +0 -2
  221. package/selection/selection.js +67 -225
  222. package/selection/selection.mjs +66 -224
  223. package/selection/transformation.js +118 -149
  224. package/selection/transformation.mjs +118 -149
  225. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  226. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  227. package/shortcutContexts/commands/editor/open.js +3 -18
  228. package/shortcutContexts/commands/editor/open.mjs +3 -18
  229. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  230. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  231. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  232. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  233. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  234. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  235. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  236. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  237. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  238. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  239. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  240. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  241. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  242. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  243. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  244. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  245. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  246. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  247. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  248. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  249. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  250. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  251. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  252. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  253. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  254. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  255. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  256. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  257. package/shortcutContexts/grid.js +3 -9
  258. package/shortcutContexts/grid.mjs +3 -9
  259. package/shortcuts/context.js +1 -2
  260. package/shortcuts/context.mjs +1 -2
  261. package/tableView.js +78 -52
  262. package/tableView.mjs +78 -52
  263. package/translations/changesObservable/observable.js +38 -21
  264. package/translations/changesObservable/observable.mjs +38 -21
  265. package/translations/changesObservable/observer.js +12 -7
  266. package/translations/changesObservable/observer.mjs +11 -6
  267. package/translations/mapCollections/aggregatedCollection.js +1 -1
  268. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  269. package/translations/maps/indexMap.js +1 -1
  270. package/translations/maps/indexMap.mjs +1 -1
  271. package/utils/dataStructures/linkedList.js +1 -6
  272. package/utils/dataStructures/linkedList.mjs +1 -6
  273. package/utils/dataStructures/tree.js +1 -1
  274. package/utils/dataStructures/tree.mjs +1 -1
  275. package/utils/interval.js +44 -26
  276. package/utils/interval.mjs +44 -26
  277. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  278. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  279. package/i18n/languages/ar-AR.d.ts +0 -5
  280. package/i18n/languages/cs-CZ.d.ts +0 -5
  281. package/i18n/languages/hr-HR.d.ts +0 -5
  282. package/i18n/languages/sr-SP.d.ts +0 -5
  283. package/plugins/mergeCells/focusOrder.js +0 -305
  284. package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
4
3
  require("core-js/modules/es.error.cause.js");
4
+ exports.__esModule = true;
5
5
  require("core-js/modules/es.array.push.js");
6
6
  var _base = require("../base");
7
7
  var _element = require("../../helpers/dom/element");
@@ -12,9 +12,12 @@ var _src = require("../../3rdparty/walkontable/src");
12
12
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
13
13
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
14
14
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
15
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
16
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
17
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
15
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
16
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
17
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
18
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
19
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
20
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
18
21
  // Developer note! Whenever you make a change in this file, make an analogous change in manualColumnResize.js
19
22
 
20
23
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'manualRowResize';
@@ -51,7 +54,13 @@ var _dblclick = /*#__PURE__*/new WeakMap();
51
54
  var _autoresizeTimeout = /*#__PURE__*/new WeakMap();
52
55
  var _rowHeightsMap = /*#__PURE__*/new WeakMap();
53
56
  var _config = /*#__PURE__*/new WeakMap();
54
- var _ManualRowResize_brand = /*#__PURE__*/new WeakSet();
57
+ var _onMouseOver = /*#__PURE__*/new WeakSet();
58
+ var _onMouseDown = /*#__PURE__*/new WeakSet();
59
+ var _onMouseMove = /*#__PURE__*/new WeakSet();
60
+ var _onMouseUp = /*#__PURE__*/new WeakSet();
61
+ var _onContextMenu = /*#__PURE__*/new WeakSet();
62
+ var _onModifyRowHeight = /*#__PURE__*/new WeakSet();
63
+ var _onMapInit = /*#__PURE__*/new WeakSet();
55
64
  class ManualRowResize extends _base.BasePlugin {
56
65
  static get PLUGIN_KEY() {
57
66
  return PLUGIN_KEY;
@@ -66,79 +75,162 @@ class ManualRowResize extends _base.BasePlugin {
66
75
 
67
76
  constructor(hotInstance) {
68
77
  super(hotInstance);
78
+ /**
79
+ * Callback to call on map's `init` local hook.
80
+ */
81
+ _classPrivateMethodInitSpec(this, _onMapInit);
82
+ /**
83
+ * Modifies the provided row height, based on the plugin settings.
84
+ *
85
+ * @param {number} height Row height.
86
+ * @param {number} row Visual row index.
87
+ * @returns {number}
88
+ */
89
+ _classPrivateMethodInitSpec(this, _onModifyRowHeight);
90
+ /**
91
+ * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
92
+ */
93
+ _classPrivateMethodInitSpec(this, _onContextMenu);
94
+ /**
95
+ * 'mouseup' event callback - apply the row resizing.
96
+ *
97
+ * @fires Hooks#beforeRowResize
98
+ * @fires Hooks#afterRowResize
99
+ */
100
+ _classPrivateMethodInitSpec(this, _onMouseUp);
101
+ /**
102
+ * 'mousemove' event callback - refresh the handle and guide positions, cache the new row height.
103
+ *
104
+ * @param {MouseEvent} event The mouse event.
105
+ */
106
+ _classPrivateMethodInitSpec(this, _onMouseMove);
107
+ /**
108
+ * 'mousedown' event callback.
109
+ *
110
+ * @param {MouseEvent} event The mouse event.
111
+ */
112
+ _classPrivateMethodInitSpec(this, _onMouseDown);
69
113
  /**
70
114
  * 'mouseover' event callback - set the handle position.
71
115
  *
72
116
  * @param {MouseEvent} event The mouse event.
73
117
  */
74
- _classPrivateMethodInitSpec(this, _ManualRowResize_brand);
75
- _classPrivateFieldInitSpec(this, _currentTH, null);
118
+ _classPrivateMethodInitSpec(this, _onMouseOver);
119
+ _classPrivateFieldInitSpec(this, _currentTH, {
120
+ writable: true,
121
+ value: null
122
+ });
76
123
  /**
77
124
  * @type {number}
78
125
  */
79
- _classPrivateFieldInitSpec(this, _currentRow, null);
126
+ _classPrivateFieldInitSpec(this, _currentRow, {
127
+ writable: true,
128
+ value: null
129
+ });
80
130
  /**
81
131
  * @type {number[]}
82
132
  */
83
- _classPrivateFieldInitSpec(this, _selectedRows, []);
133
+ _classPrivateFieldInitSpec(this, _selectedRows, {
134
+ writable: true,
135
+ value: []
136
+ });
84
137
  /**
85
138
  * @type {number}
86
139
  */
87
- _classPrivateFieldInitSpec(this, _currentHeight, null);
140
+ _classPrivateFieldInitSpec(this, _currentHeight, {
141
+ writable: true,
142
+ value: null
143
+ });
88
144
  /**
89
145
  * @type {number}
90
146
  */
91
- _classPrivateFieldInitSpec(this, _newSize, null);
147
+ _classPrivateFieldInitSpec(this, _newSize, {
148
+ writable: true,
149
+ value: null
150
+ });
92
151
  /**
93
152
  * @type {number}
94
153
  */
95
- _classPrivateFieldInitSpec(this, _startY, null);
154
+ _classPrivateFieldInitSpec(this, _startY, {
155
+ writable: true,
156
+ value: null
157
+ });
96
158
  /**
97
159
  * @type {number}
98
160
  */
99
- _classPrivateFieldInitSpec(this, _startHeight, null);
161
+ _classPrivateFieldInitSpec(this, _startHeight, {
162
+ writable: true,
163
+ value: null
164
+ });
100
165
  /**
101
166
  * @type {number}
102
167
  */
103
- _classPrivateFieldInitSpec(this, _startOffset, null);
168
+ _classPrivateFieldInitSpec(this, _startOffset, {
169
+ writable: true,
170
+ value: null
171
+ });
104
172
  /**
105
173
  * @type {HTMLElement}
106
174
  */
107
- _classPrivateFieldInitSpec(this, _handle, this.hot.rootDocument.createElement('DIV'));
175
+ _classPrivateFieldInitSpec(this, _handle, {
176
+ writable: true,
177
+ value: this.hot.rootDocument.createElement('DIV')
178
+ });
108
179
  /**
109
180
  * @type {HTMLElement}
110
181
  */
111
- _classPrivateFieldInitSpec(this, _guide, this.hot.rootDocument.createElement('DIV'));
182
+ _classPrivateFieldInitSpec(this, _guide, {
183
+ writable: true,
184
+ value: this.hot.rootDocument.createElement('DIV')
185
+ });
112
186
  /**
113
187
  * @type {boolean}
114
188
  */
115
- _classPrivateFieldInitSpec(this, _pressed, false);
189
+ _classPrivateFieldInitSpec(this, _pressed, {
190
+ writable: true,
191
+ value: false
192
+ });
116
193
  /**
117
194
  * @type {boolean}
118
195
  */
119
- _classPrivateFieldInitSpec(this, _isTriggeredByRMB, false);
196
+ _classPrivateFieldInitSpec(this, _isTriggeredByRMB, {
197
+ writable: true,
198
+ value: false
199
+ });
120
200
  /**
121
201
  * @type {number}
122
202
  */
123
- _classPrivateFieldInitSpec(this, _dblclick, 0);
203
+ _classPrivateFieldInitSpec(this, _dblclick, {
204
+ writable: true,
205
+ value: 0
206
+ });
124
207
  /**
125
208
  * @type {number}
126
209
  */
127
- _classPrivateFieldInitSpec(this, _autoresizeTimeout, null);
210
+ _classPrivateFieldInitSpec(this, _autoresizeTimeout, {
211
+ writable: true,
212
+ value: null
213
+ });
128
214
  /**
129
215
  * PhysicalIndexToValueMap to keep and track widths for physical row indexes.
130
216
  *
131
217
  * @type {PhysicalIndexToValueMap}
132
218
  */
133
- _classPrivateFieldInitSpec(this, _rowHeightsMap, void 0);
219
+ _classPrivateFieldInitSpec(this, _rowHeightsMap, {
220
+ writable: true,
221
+ value: void 0
222
+ });
134
223
  /**
135
224
  * Private pool to save configuration from updateSettings.
136
225
  *
137
226
  * @type {object}
138
227
  */
139
- _classPrivateFieldInitSpec(this, _config, void 0);
140
- (0, _element.addClass)(_classPrivateFieldGet(_handle, this), 'manualRowResizer');
141
- (0, _element.addClass)(_classPrivateFieldGet(_guide, this), 'manualRowResizerGuide');
228
+ _classPrivateFieldInitSpec(this, _config, {
229
+ writable: true,
230
+ value: void 0
231
+ });
232
+ (0, _element.addClass)(_classPrivateFieldGet(this, _handle), 'manualRowResizer');
233
+ (0, _element.addClass)(_classPrivateFieldGet(this, _guide), 'manualRowResizerGuide');
142
234
  }
143
235
 
144
236
  /**
@@ -166,10 +258,10 @@ class ManualRowResize extends _base.BasePlugin {
166
258
  if (this.enabled) {
167
259
  return;
168
260
  }
169
- _classPrivateFieldSet(_rowHeightsMap, this, new _translations.PhysicalIndexToValueMap());
170
- _classPrivateFieldGet(_rowHeightsMap, this).addLocalHook('init', () => _assertClassBrand(_ManualRowResize_brand, this, _onMapInit).call(this));
171
- this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_rowHeightsMap, this));
172
- this.addHook('modifyRowHeight', (height, row) => _assertClassBrand(_ManualRowResize_brand, this, _onModifyRowHeight).call(this, height, row));
261
+ _classPrivateFieldSet(this, _rowHeightsMap, new _translations.PhysicalIndexToValueMap());
262
+ _classPrivateFieldGet(this, _rowHeightsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
263
+ this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _rowHeightsMap));
264
+ this.addHook('modifyRowHeight', (height, row) => _classPrivateMethodGet(this, _onModifyRowHeight, _onModifyRowHeight2).call(this, height, row));
173
265
  this.bindEvents();
174
266
  super.enablePlugin();
175
267
  }
@@ -190,7 +282,7 @@ class ManualRowResize extends _base.BasePlugin {
190
282
  * Disables the plugin functionality for this Handsontable instance.
191
283
  */
192
284
  disablePlugin() {
193
- _classPrivateFieldSet(_config, this, _classPrivateFieldGet(_rowHeightsMap, this).getValues());
285
+ _classPrivateFieldSet(this, _config, _classPrivateFieldGet(this, _rowHeightsMap).getValues());
194
286
  this.hot.rowIndexMapper.unregisterMap(this.pluginName);
195
287
  super.disablePlugin();
196
288
  }
@@ -202,7 +294,7 @@ class ManualRowResize extends _base.BasePlugin {
202
294
  * @fires Hooks#persistentStateSave
203
295
  */
204
296
  saveManualRowHeights() {
205
- this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, _classPrivateFieldGet(_rowHeightsMap, this).getValues());
297
+ this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, _classPrivateFieldGet(this, _rowHeightsMap).getValues());
206
298
  }
207
299
 
208
300
  /**
@@ -228,7 +320,7 @@ class ManualRowResize extends _base.BasePlugin {
228
320
  setManualSize(row, height) {
229
321
  const physicalRow = this.hot.toPhysicalRow(row);
230
322
  const newHeight = Math.max(height, _src.ViewportRowsCalculator.DEFAULT_HEIGHT);
231
- _classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(physicalRow, newHeight);
323
+ _classPrivateFieldGet(this, _rowHeightsMap).setValueAtIndex(physicalRow, newHeight);
232
324
  return newHeight;
233
325
  }
234
326
 
@@ -239,40 +331,40 @@ class ManualRowResize extends _base.BasePlugin {
239
331
  * @param {HTMLCellElement} TH TH HTML element.
240
332
  */
241
333
  setupHandlePosition(TH) {
242
- _classPrivateFieldSet(_currentTH, this, TH);
334
+ _classPrivateFieldSet(this, _currentTH, TH);
243
335
  const {
244
336
  view
245
337
  } = this.hot;
246
338
  const {
247
339
  _wt: wt
248
340
  } = view;
249
- const cellCoords = wt.wtTable.getCoords(_classPrivateFieldGet(_currentTH, this));
341
+ const cellCoords = wt.wtTable.getCoords(_classPrivateFieldGet(this, _currentTH));
250
342
  const row = cellCoords.row;
251
343
 
252
344
  // Ignore row headers.
253
345
  if (row < 0) {
254
346
  return;
255
347
  }
256
- const headerWidth = (0, _element.outerWidth)(_classPrivateFieldGet(_currentTH, this));
257
- const box = _classPrivateFieldGet(_currentTH, this).getBoundingClientRect();
348
+ const headerWidth = (0, _element.outerWidth)(_classPrivateFieldGet(this, _currentTH));
349
+ const box = _classPrivateFieldGet(this, _currentTH).getBoundingClientRect();
258
350
  // Read "fixedRowsTop" and "fixedRowsBottom" through the Walkontable as in that context, the fixed
259
351
  // rows are modified (reduced by the number of hidden rows) by TableView module.
260
352
  const fixedRowTop = row < wt.getSetting('fixedRowsTop');
261
353
  const fixedRowBottom = row >= view.countNotHiddenRowIndexes(0, 1) - wt.getSetting('fixedRowsBottom');
262
354
  let relativeHeaderPosition;
263
355
  if (fixedRowTop) {
264
- relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(_classPrivateFieldGet(_currentTH, this), cellCoords.row, cellCoords.col);
356
+ relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(_classPrivateFieldGet(this, _currentTH), cellCoords.row, cellCoords.col);
265
357
  } else if (fixedRowBottom) {
266
- relativeHeaderPosition = wt.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(_classPrivateFieldGet(_currentTH, this), cellCoords.row, cellCoords.col);
358
+ relativeHeaderPosition = wt.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(_classPrivateFieldGet(this, _currentTH), cellCoords.row, cellCoords.col);
267
359
  }
268
360
 
269
361
  // If the TH is not a child of the top-left/bottom-left overlay, recalculate using
270
362
  // the left overlay - as this overlay contains the rest of the headers.
271
363
  if (!relativeHeaderPosition) {
272
- relativeHeaderPosition = wt.wtOverlays.inlineStartOverlay.getRelativeCellPosition(_classPrivateFieldGet(_currentTH, this), cellCoords.row, cellCoords.col);
364
+ relativeHeaderPosition = wt.wtOverlays.inlineStartOverlay.getRelativeCellPosition(_classPrivateFieldGet(this, _currentTH), cellCoords.row, cellCoords.col);
273
365
  }
274
- _classPrivateFieldSet(_currentRow, this, this.hot.rowIndexMapper.getVisualFromRenderableIndex(row));
275
- _classPrivateFieldSet(_selectedRows, this, []);
366
+ _classPrivateFieldSet(this, _currentRow, this.hot.rowIndexMapper.getVisualFromRenderableIndex(row));
367
+ _classPrivateFieldSet(this, _selectedRows, []);
276
368
  const isFullRowSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByRowHeader();
277
369
  if (this.hot.selection.isSelected() && isFullRowSelected) {
278
370
  const selectionRanges = this.hot.getSelectedRange();
@@ -282,23 +374,23 @@ class ManualRowResize extends _base.BasePlugin {
282
374
 
283
375
  // Add every selected row for resize action.
284
376
  (0, _number.rangeEach)(fromRow, toRow, rowIndex => {
285
- if (!_classPrivateFieldGet(_selectedRows, this).includes(rowIndex)) {
286
- _classPrivateFieldGet(_selectedRows, this).push(rowIndex);
377
+ if (!_classPrivateFieldGet(this, _selectedRows).includes(rowIndex)) {
378
+ _classPrivateFieldGet(this, _selectedRows).push(rowIndex);
287
379
  }
288
380
  });
289
381
  });
290
382
  }
291
383
 
292
384
  // Resizing element beyond the current selection (also when there is no selection).
293
- if (!_classPrivateFieldGet(_selectedRows, this).includes(_classPrivateFieldGet(_currentRow, this))) {
294
- _classPrivateFieldSet(_selectedRows, this, [_classPrivateFieldGet(_currentRow, this)]);
385
+ if (!_classPrivateFieldGet(this, _selectedRows).includes(_classPrivateFieldGet(this, _currentRow))) {
386
+ _classPrivateFieldSet(this, _selectedRows, [_classPrivateFieldGet(this, _currentRow)]);
295
387
  }
296
- _classPrivateFieldSet(_startOffset, this, relativeHeaderPosition.top - 6);
297
- _classPrivateFieldSet(_startHeight, this, parseInt(box.height, 10));
298
- _classPrivateFieldGet(_handle, this).style.top = `${_classPrivateFieldGet(_startOffset, this) + _classPrivateFieldGet(_startHeight, this)}px`;
299
- _classPrivateFieldGet(_handle, this).style[this.inlineDir] = `${relativeHeaderPosition.start}px`;
300
- _classPrivateFieldGet(_handle, this).style.width = `${headerWidth}px`;
301
- this.hot.rootElement.appendChild(_classPrivateFieldGet(_handle, this));
388
+ _classPrivateFieldSet(this, _startOffset, relativeHeaderPosition.top - 6);
389
+ _classPrivateFieldSet(this, _startHeight, parseInt(box.height, 10));
390
+ _classPrivateFieldGet(this, _handle).style.top = `${_classPrivateFieldGet(this, _startOffset) + _classPrivateFieldGet(this, _startHeight)}px`;
391
+ _classPrivateFieldGet(this, _handle).style[this.inlineDir] = `${relativeHeaderPosition.start}px`;
392
+ _classPrivateFieldGet(this, _handle).style.width = `${headerWidth}px`;
393
+ this.hot.rootElement.appendChild(_classPrivateFieldGet(this, _handle));
302
394
  }
303
395
 
304
396
  /**
@@ -307,7 +399,7 @@ class ManualRowResize extends _base.BasePlugin {
307
399
  * @private
308
400
  */
309
401
  refreshHandlePosition() {
310
- _classPrivateFieldGet(_handle, this).style.top = `${_classPrivateFieldGet(_startOffset, this) + _classPrivateFieldGet(_currentHeight, this)}px`;
402
+ _classPrivateFieldGet(this, _handle).style.top = `${_classPrivateFieldGet(this, _startOffset) + _classPrivateFieldGet(this, _currentHeight)}px`;
311
403
  }
312
404
 
313
405
  /**
@@ -316,15 +408,15 @@ class ManualRowResize extends _base.BasePlugin {
316
408
  * @private
317
409
  */
318
410
  setupGuidePosition() {
319
- const handleWidth = parseInt((0, _element.outerWidth)(_classPrivateFieldGet(_handle, this)), 10);
320
- const handleEndPosition = parseInt(_classPrivateFieldGet(_handle, this).style[this.inlineDir], 10) + handleWidth;
411
+ const handleWidth = parseInt((0, _element.outerWidth)(_classPrivateFieldGet(this, _handle)), 10);
412
+ const handleEndPosition = parseInt(_classPrivateFieldGet(this, _handle).style[this.inlineDir], 10) + handleWidth;
321
413
  const maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);
322
- (0, _element.addClass)(_classPrivateFieldGet(_handle, this), 'active');
323
- (0, _element.addClass)(_classPrivateFieldGet(_guide, this), 'active');
324
- _classPrivateFieldGet(_guide, this).style.top = _classPrivateFieldGet(_handle, this).style.top;
325
- _classPrivateFieldGet(_guide, this).style[this.inlineDir] = `${handleEndPosition}px`;
326
- _classPrivateFieldGet(_guide, this).style.width = `${maximumVisibleElementWidth - handleWidth}px`;
327
- this.hot.rootElement.appendChild(_classPrivateFieldGet(_guide, this));
414
+ (0, _element.addClass)(_classPrivateFieldGet(this, _handle), 'active');
415
+ (0, _element.addClass)(_classPrivateFieldGet(this, _guide), 'active');
416
+ _classPrivateFieldGet(this, _guide).style.top = _classPrivateFieldGet(this, _handle).style.top;
417
+ _classPrivateFieldGet(this, _guide).style[this.inlineDir] = `${handleEndPosition}px`;
418
+ _classPrivateFieldGet(this, _guide).style.width = `${maximumVisibleElementWidth - handleWidth}px`;
419
+ this.hot.rootElement.appendChild(_classPrivateFieldGet(this, _guide));
328
420
  }
329
421
 
330
422
  /**
@@ -333,7 +425,7 @@ class ManualRowResize extends _base.BasePlugin {
333
425
  * @private
334
426
  */
335
427
  refreshGuidePosition() {
336
- _classPrivateFieldGet(_guide, this).style.top = _classPrivateFieldGet(_handle, this).style.top;
428
+ _classPrivateFieldGet(this, _guide).style.top = _classPrivateFieldGet(this, _handle).style.top;
337
429
  }
338
430
 
339
431
  /**
@@ -342,8 +434,8 @@ class ManualRowResize extends _base.BasePlugin {
342
434
  * @private
343
435
  */
344
436
  hideHandleAndGuide() {
345
- (0, _element.removeClass)(_classPrivateFieldGet(_handle, this), 'active');
346
- (0, _element.removeClass)(_classPrivateFieldGet(_guide, this), 'active');
437
+ (0, _element.removeClass)(_classPrivateFieldGet(this, _handle), 'active');
438
+ (0, _element.removeClass)(_classPrivateFieldGet(this, _guide), 'active');
347
439
  }
348
440
 
349
441
  /**
@@ -390,10 +482,10 @@ class ManualRowResize extends _base.BasePlugin {
390
482
  getActualRowHeight(row) {
391
483
  // TODO: this should utilize `this.hot.getRowHeight` after it's fixed and working properly.
392
484
  const walkontableHeight = this.hot.view._wt.wtTable.getRowHeight(row);
393
- if (walkontableHeight !== undefined && _classPrivateFieldGet(_newSize, this) < walkontableHeight) {
485
+ if (walkontableHeight !== undefined && _classPrivateFieldGet(this, _newSize) < walkontableHeight) {
394
486
  return walkontableHeight;
395
487
  }
396
- return _classPrivateFieldGet(_newSize, this);
488
+ return _classPrivateFieldGet(this, _newSize);
397
489
  }
398
490
  /**
399
491
  * Auto-size row after doubleclick - callback.
@@ -411,38 +503,31 @@ class ManualRowResize extends _base.BasePlugin {
411
503
  const resize = (row, forceRender) => {
412
504
  const hookNewSize = this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, true);
413
505
  if (hookNewSize !== undefined) {
414
- _classPrivateFieldSet(_newSize, this, hookNewSize);
506
+ _classPrivateFieldSet(this, _newSize, hookNewSize);
415
507
  }
416
- this.setManualSize(row, _classPrivateFieldGet(_newSize, this)); // double click sets auto row size
508
+ this.setManualSize(row, _classPrivateFieldGet(this, _newSize)); // double click sets auto row size
417
509
 
418
510
  this.hot.runHooks('afterRowResize', this.getActualRowHeight(row), row, true);
419
511
  if (forceRender) {
420
512
  render();
421
513
  }
422
514
  };
423
- if (_classPrivateFieldGet(_dblclick, this) >= 2) {
424
- const selectedRowsLength = _classPrivateFieldGet(_selectedRows, this).length;
515
+ if (_classPrivateFieldGet(this, _dblclick) >= 2) {
516
+ const selectedRowsLength = _classPrivateFieldGet(this, _selectedRows).length;
425
517
  if (selectedRowsLength > 1) {
426
- (0, _array.arrayEach)(_classPrivateFieldGet(_selectedRows, this), selectedRow => {
518
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _selectedRows), selectedRow => {
427
519
  resize(selectedRow);
428
520
  });
429
521
  render();
430
522
  } else {
431
- (0, _array.arrayEach)(_classPrivateFieldGet(_selectedRows, this), selectedRow => {
523
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _selectedRows), selectedRow => {
432
524
  resize(selectedRow, true);
433
525
  });
434
526
  }
435
527
  }
436
- _classPrivateFieldSet(_dblclick, this, 0);
437
- _classPrivateFieldSet(_autoresizeTimeout, this, null);
528
+ _classPrivateFieldSet(this, _dblclick, 0);
529
+ _classPrivateFieldSet(this, _autoresizeTimeout, null);
438
530
  }
439
-
440
- /**
441
- * 'mousedown' event callback.
442
- *
443
- * @param {MouseEvent} event The mouse event.
444
- */
445
-
446
531
  /**
447
532
  * Binds the mouse events.
448
533
  *
@@ -453,21 +538,12 @@ class ManualRowResize extends _base.BasePlugin {
453
538
  rootElement,
454
539
  rootWindow
455
540
  } = this.hot;
456
- this.eventManager.addEventListener(rootElement, 'mouseover', e => _assertClassBrand(_ManualRowResize_brand, this, _onMouseOver).call(this, e));
457
- this.eventManager.addEventListener(rootElement, 'mousedown', e => _assertClassBrand(_ManualRowResize_brand, this, _onMouseDown).call(this, e));
458
- this.eventManager.addEventListener(rootWindow, 'mousemove', e => _assertClassBrand(_ManualRowResize_brand, this, _onMouseMove).call(this, e));
459
- this.eventManager.addEventListener(rootWindow, 'mouseup', () => _assertClassBrand(_ManualRowResize_brand, this, _onMouseUp).call(this));
460
- this.eventManager.addEventListener(_classPrivateFieldGet(_handle, this), 'contextmenu', () => _assertClassBrand(_ManualRowResize_brand, this, _onContextMenu).call(this));
541
+ this.eventManager.addEventListener(rootElement, 'mouseover', e => _classPrivateMethodGet(this, _onMouseOver, _onMouseOver2).call(this, e));
542
+ this.eventManager.addEventListener(rootElement, 'mousedown', e => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, e));
543
+ this.eventManager.addEventListener(rootWindow, 'mousemove', e => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, e));
544
+ this.eventManager.addEventListener(rootWindow, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
545
+ this.eventManager.addEventListener(_classPrivateFieldGet(this, _handle), 'contextmenu', () => _classPrivateMethodGet(this, _onContextMenu, _onContextMenu2).call(this));
461
546
  }
462
-
463
- /**
464
- * Modifies the provided row height, based on the plugin settings.
465
- *
466
- * @param {number} height Row height.
467
- * @param {number} row Visual row index.
468
- * @returns {number}
469
- */
470
-
471
547
  /**
472
548
  * Destroys the plugin instance.
473
549
  */
@@ -476,7 +552,7 @@ class ManualRowResize extends _base.BasePlugin {
476
552
  }
477
553
  }
478
554
  exports.ManualRowResize = ManualRowResize;
479
- function _onMouseOver(event) {
555
+ function _onMouseOver2(event) {
480
556
  // Workaround for #6926 - if the `event.target` is temporarily detached, we can skip this callback and wait for
481
557
  // the next `onmouseover`.
482
558
  if ((0, _element.isDetached)(event.target)) {
@@ -484,54 +560,43 @@ function _onMouseOver(event) {
484
560
  }
485
561
 
486
562
  // A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
487
- if (_classPrivateFieldGet(_isTriggeredByRMB, this) === true) {
563
+ if (_classPrivateFieldGet(this, _isTriggeredByRMB) === true) {
488
564
  return;
489
565
  }
490
566
  if (this.checkIfRowHeader(event.target)) {
491
567
  const th = this.getClosestTHParent(event.target);
492
568
  if (th) {
493
- if (!_classPrivateFieldGet(_pressed, this)) {
569
+ if (!_classPrivateFieldGet(this, _pressed)) {
494
570
  this.setupHandlePosition(th);
495
571
  }
496
572
  }
497
573
  }
498
574
  }
499
- function _onMouseDown(event) {
575
+ function _onMouseDown2(event) {
500
576
  if ((0, _element.hasClass)(event.target, 'manualRowResizer')) {
501
- this.setupHandlePosition(_classPrivateFieldGet(_currentTH, this));
577
+ this.setupHandlePosition(_classPrivateFieldGet(this, _currentTH));
502
578
  this.setupGuidePosition();
503
- _classPrivateFieldSet(_pressed, this, true);
504
- if (_classPrivateFieldGet(_autoresizeTimeout, this) === null) {
505
- _classPrivateFieldSet(_autoresizeTimeout, this, setTimeout(() => this.afterMouseDownTimeout(), 500));
506
- this.hot._registerTimeout(_classPrivateFieldGet(_autoresizeTimeout, this));
579
+ _classPrivateFieldSet(this, _pressed, true);
580
+ if (_classPrivateFieldGet(this, _autoresizeTimeout) === null) {
581
+ _classPrivateFieldSet(this, _autoresizeTimeout, setTimeout(() => this.afterMouseDownTimeout(), 500));
582
+ this.hot._registerTimeout(_classPrivateFieldGet(this, _autoresizeTimeout));
507
583
  }
508
- _classPrivateFieldSet(_dblclick, this, _classPrivateFieldGet(_dblclick, this) + 1);
509
- _classPrivateFieldSet(_startY, this, event.pageY);
510
- _classPrivateFieldSet(_newSize, this, _classPrivateFieldGet(_startHeight, this));
584
+ _classPrivateFieldSet(this, _dblclick, _classPrivateFieldGet(this, _dblclick) + 1);
585
+ _classPrivateFieldSet(this, _startY, event.pageY);
586
+ _classPrivateFieldSet(this, _newSize, _classPrivateFieldGet(this, _startHeight));
511
587
  }
512
588
  }
513
- /**
514
- * 'mousemove' event callback - refresh the handle and guide positions, cache the new row height.
515
- *
516
- * @param {MouseEvent} event The mouse event.
517
- */
518
- function _onMouseMove(event) {
519
- if (_classPrivateFieldGet(_pressed, this)) {
520
- _classPrivateFieldSet(_currentHeight, this, _classPrivateFieldGet(_startHeight, this) + (event.pageY - _classPrivateFieldGet(_startY, this)));
521
- (0, _array.arrayEach)(_classPrivateFieldGet(_selectedRows, this), selectedRow => {
522
- _classPrivateFieldSet(_newSize, this, this.setManualSize(selectedRow, _classPrivateFieldGet(_currentHeight, this)));
589
+ function _onMouseMove2(event) {
590
+ if (_classPrivateFieldGet(this, _pressed)) {
591
+ _classPrivateFieldSet(this, _currentHeight, _classPrivateFieldGet(this, _startHeight) + (event.pageY - _classPrivateFieldGet(this, _startY)));
592
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _selectedRows), selectedRow => {
593
+ _classPrivateFieldSet(this, _newSize, this.setManualSize(selectedRow, _classPrivateFieldGet(this, _currentHeight)));
523
594
  });
524
595
  this.refreshHandlePosition();
525
596
  this.refreshGuidePosition();
526
597
  }
527
598
  }
528
- /**
529
- * 'mouseup' event callback - apply the row resizing.
530
- *
531
- * @fires Hooks#beforeRowResize
532
- * @fires Hooks#afterRowResize
533
- */
534
- function _onMouseUp() {
599
+ function _onMouseUp2() {
535
600
  const render = () => {
536
601
  this.hot.forceFullRender = true;
537
602
  this.hot.view.render(); // updates all
@@ -545,71 +610,65 @@ function _onMouseUp() {
545
610
  this.saveManualRowHeights();
546
611
  this.hot.runHooks('afterRowResize', this.getActualRowHeight(row), row, false);
547
612
  };
548
- if (_classPrivateFieldGet(_pressed, this)) {
613
+ if (_classPrivateFieldGet(this, _pressed)) {
549
614
  this.hideHandleAndGuide();
550
- _classPrivateFieldSet(_pressed, this, false);
551
- if (_classPrivateFieldGet(_newSize, this) !== _classPrivateFieldGet(_startHeight, this)) {
552
- const selectedRowsLength = _classPrivateFieldGet(_selectedRows, this).length;
615
+ _classPrivateFieldSet(this, _pressed, false);
616
+ if (_classPrivateFieldGet(this, _newSize) !== _classPrivateFieldGet(this, _startHeight)) {
617
+ const selectedRowsLength = _classPrivateFieldGet(this, _selectedRows).length;
553
618
  if (selectedRowsLength > 1) {
554
- (0, _array.arrayEach)(_classPrivateFieldGet(_selectedRows, this), selectedRow => {
619
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _selectedRows), selectedRow => {
555
620
  runHooks(selectedRow);
556
621
  });
557
622
  render();
558
623
  } else {
559
- (0, _array.arrayEach)(_classPrivateFieldGet(_selectedRows, this), selectedRow => {
624
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _selectedRows), selectedRow => {
560
625
  runHooks(selectedRow, true);
561
626
  });
562
627
  }
563
628
  }
564
- this.setupHandlePosition(_classPrivateFieldGet(_currentTH, this));
629
+ this.setupHandlePosition(_classPrivateFieldGet(this, _currentTH));
565
630
  }
566
631
  }
567
- /**
568
- * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
569
- */
570
- function _onContextMenu() {
632
+ function _onContextMenu2() {
571
633
  this.hideHandleAndGuide();
572
- this.hot.rootElement.removeChild(_classPrivateFieldGet(_handle, this));
573
- this.hot.rootElement.removeChild(_classPrivateFieldGet(_guide, this));
574
- _classPrivateFieldSet(_pressed, this, false);
575
- _classPrivateFieldSet(_isTriggeredByRMB, this, true);
634
+ this.hot.rootElement.removeChild(_classPrivateFieldGet(this, _handle));
635
+ this.hot.rootElement.removeChild(_classPrivateFieldGet(this, _guide));
636
+ _classPrivateFieldSet(this, _pressed, false);
637
+ _classPrivateFieldSet(this, _isTriggeredByRMB, true);
576
638
 
577
639
  // There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
578
640
  // shouldn't be drawn just after removing it.
579
641
  this.hot._registerImmediate(() => {
580
- _classPrivateFieldSet(_isTriggeredByRMB, this, false);
642
+ _classPrivateFieldSet(this, _isTriggeredByRMB, false);
581
643
  });
582
644
  }
583
- function _onModifyRowHeight(height, row) {
645
+ function _onModifyRowHeight2(height, row) {
584
646
  let newHeight = height;
585
647
  if (this.enabled) {
586
648
  const physicalRow = this.hot.toPhysicalRow(row);
587
- const rowHeight = _classPrivateFieldGet(_rowHeightsMap, this).getValueAtIndex(physicalRow);
649
+ const rowHeight = _classPrivateFieldGet(this, _rowHeightsMap).getValueAtIndex(physicalRow);
588
650
  if (this.hot.getSettings()[PLUGIN_KEY] && rowHeight) {
589
651
  newHeight = rowHeight;
590
652
  }
591
653
  }
592
654
  return newHeight;
593
655
  }
594
- /**
595
- * Callback to call on map's `init` local hook.
596
- */
597
- function _onMapInit() {
656
+ function _onMapInit2() {
598
657
  const initialSetting = this.hot.getSettings()[PLUGIN_KEY];
599
658
  const loadedManualRowHeights = this.loadManualRowHeights();
600
659
  this.hot.batchExecution(() => {
601
660
  if (typeof loadedManualRowHeights !== 'undefined') {
602
661
  loadedManualRowHeights.forEach((height, index) => {
603
- _classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(index, height);
662
+ _classPrivateFieldGet(this, _rowHeightsMap).setValueAtIndex(index, height);
604
663
  });
605
664
  } else if (Array.isArray(initialSetting)) {
606
665
  initialSetting.forEach((height, index) => {
607
- _classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(index, height);
666
+ _classPrivateFieldGet(this, _rowHeightsMap).setValueAtIndex(index, height);
608
667
  });
609
- _classPrivateFieldSet(_config, this, initialSetting);
610
- } else if (initialSetting === true && Array.isArray(_classPrivateFieldGet(_config, this))) {
611
- _classPrivateFieldGet(_config, this).forEach((height, index) => {
612
- _classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(index, height);
668
+ _classPrivateFieldSet(this, _config, initialSetting);
669
+ } else if (initialSetting === true && Array.isArray(_classPrivateFieldGet(this, _config))) {
670
+ _classPrivateFieldGet(this, _config).forEach((height, index) => {
671
+ _classPrivateFieldGet(this, _rowHeightsMap).setValueAtIndex(index, height);
613
672
  });
614
673
  }
615
674
  }, true);