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,11 +1,14 @@
1
- import "core-js/modules/es.error.cause.js";
2
1
  import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/es.error.cause.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
5
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
6
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
7
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
8
- 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"); }
6
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
7
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
8
+ 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; } }
9
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
10
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
11
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
9
12
  import { BasePlugin } from "../base/index.mjs";
10
13
  import { addClass, closest, hasClass, removeClass, outerHeight, isDetached } from "../../helpers/dom/element.mjs";
11
14
  import { arrayEach } from "../../helpers/array.mjs";
@@ -45,7 +48,15 @@ var _dblclick = /*#__PURE__*/new WeakMap();
45
48
  var _autoresizeTimeout = /*#__PURE__*/new WeakMap();
46
49
  var _columnWidthsMap = /*#__PURE__*/new WeakMap();
47
50
  var _config = /*#__PURE__*/new WeakMap();
48
- var _ManualColumnResize_brand = /*#__PURE__*/new WeakSet();
51
+ var _onMapInit = /*#__PURE__*/new WeakSet();
52
+ var _onMouseOver = /*#__PURE__*/new WeakSet();
53
+ var _onMouseDown = /*#__PURE__*/new WeakSet();
54
+ var _onMouseMove = /*#__PURE__*/new WeakSet();
55
+ var _onMouseUp = /*#__PURE__*/new WeakSet();
56
+ var _onContextMenu = /*#__PURE__*/new WeakSet();
57
+ var _onModifyColWidth = /*#__PURE__*/new WeakSet();
58
+ var _onBeforeStretchingColumnWidth = /*#__PURE__*/new WeakSet();
59
+ var _onBeforeColumnResize = /*#__PURE__*/new WeakSet();
49
60
  export class ManualColumnResize extends BasePlugin {
50
61
  static get PLUGIN_KEY() {
51
62
  return PLUGIN_KEY;
@@ -60,79 +71,176 @@ export class ManualColumnResize extends BasePlugin {
60
71
 
61
72
  constructor(hotInstance) {
62
73
  super(hotInstance);
74
+ /**
75
+ * `beforeColumnResize` hook callback.
76
+ */
77
+ _classPrivateMethodInitSpec(this, _onBeforeColumnResize);
78
+ /**
79
+ * Modifies the provided column stretched width. This hook decides if specified column should be stretched or not.
80
+ *
81
+ * @param {number} stretchedWidth Stretched width.
82
+ * @param {number} column Visual column index.
83
+ * @returns {number}
84
+ */
85
+ _classPrivateMethodInitSpec(this, _onBeforeStretchingColumnWidth);
86
+ /**
87
+ * Modifies the provided column width, based on the plugin settings.
88
+ *
89
+ * @param {number} width Column width.
90
+ * @param {number} column Visual column index.
91
+ * @returns {number}
92
+ */
93
+ _classPrivateMethodInitSpec(this, _onModifyColWidth);
94
+ /**
95
+ * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
96
+ */
97
+ _classPrivateMethodInitSpec(this, _onContextMenu);
98
+ /**
99
+ * 'mouseup' event callback - apply the column resizing.
100
+ *
101
+ * @fires Hooks#beforeColumnResize
102
+ * @fires Hooks#afterColumnResize
103
+ */
104
+ _classPrivateMethodInitSpec(this, _onMouseUp);
105
+ /**
106
+ * 'mousemove' event callback - refresh the handle and guide positions, cache the new column width.
107
+ *
108
+ * @param {MouseEvent} event The mouse event.
109
+ */
110
+ _classPrivateMethodInitSpec(this, _onMouseMove);
111
+ /**
112
+ * 'mousedown' event callback.
113
+ *
114
+ * @param {MouseEvent} event The mouse event.
115
+ */
116
+ _classPrivateMethodInitSpec(this, _onMouseDown);
117
+ /**
118
+ * 'mouseover' event callback - set the handle position.
119
+ *
120
+ * @param {MouseEvent} event The mouse event.
121
+ */
122
+ _classPrivateMethodInitSpec(this, _onMouseOver);
63
123
  /**
64
124
  * Callback to call on map's `init` local hook.
65
125
  *
66
126
  * @private
67
127
  */
68
- _classPrivateMethodInitSpec(this, _ManualColumnResize_brand);
69
- _classPrivateFieldInitSpec(this, _currentTH, null);
128
+ _classPrivateMethodInitSpec(this, _onMapInit);
129
+ _classPrivateFieldInitSpec(this, _currentTH, {
130
+ writable: true,
131
+ value: null
132
+ });
70
133
  /**
71
134
  * @type {number}
72
135
  */
73
- _classPrivateFieldInitSpec(this, _currentCol, null);
136
+ _classPrivateFieldInitSpec(this, _currentCol, {
137
+ writable: true,
138
+ value: null
139
+ });
74
140
  /**
75
141
  * @type {number[]}
76
142
  */
77
- _classPrivateFieldInitSpec(this, _selectedCols, []);
143
+ _classPrivateFieldInitSpec(this, _selectedCols, {
144
+ writable: true,
145
+ value: []
146
+ });
78
147
  /**
79
148
  * @type {number}
80
149
  */
81
- _classPrivateFieldInitSpec(this, _currentWidth, null);
150
+ _classPrivateFieldInitSpec(this, _currentWidth, {
151
+ writable: true,
152
+ value: null
153
+ });
82
154
  /**
83
155
  * @type {number}
84
156
  */
85
- _classPrivateFieldInitSpec(this, _newSize, null);
157
+ _classPrivateFieldInitSpec(this, _newSize, {
158
+ writable: true,
159
+ value: null
160
+ });
86
161
  /**
87
162
  * @type {number}
88
163
  */
89
- _classPrivateFieldInitSpec(this, _startY, null);
164
+ _classPrivateFieldInitSpec(this, _startY, {
165
+ writable: true,
166
+ value: null
167
+ });
90
168
  /**
91
169
  * @type {number}
92
170
  */
93
- _classPrivateFieldInitSpec(this, _startWidth, null);
171
+ _classPrivateFieldInitSpec(this, _startWidth, {
172
+ writable: true,
173
+ value: null
174
+ });
94
175
  /**
95
176
  * @type {number}
96
177
  */
97
- _classPrivateFieldInitSpec(this, _startOffset, null);
178
+ _classPrivateFieldInitSpec(this, _startOffset, {
179
+ writable: true,
180
+ value: null
181
+ });
98
182
  /**
99
183
  * @type {HTMLElement}
100
184
  */
101
- _classPrivateFieldInitSpec(this, _handle, this.hot.rootDocument.createElement('DIV'));
185
+ _classPrivateFieldInitSpec(this, _handle, {
186
+ writable: true,
187
+ value: this.hot.rootDocument.createElement('DIV')
188
+ });
102
189
  /**
103
190
  * @type {HTMLElement}
104
191
  */
105
- _classPrivateFieldInitSpec(this, _guide, this.hot.rootDocument.createElement('DIV'));
192
+ _classPrivateFieldInitSpec(this, _guide, {
193
+ writable: true,
194
+ value: this.hot.rootDocument.createElement('DIV')
195
+ });
106
196
  /**
107
197
  * @type {boolean}
108
198
  */
109
- _classPrivateFieldInitSpec(this, _pressed, null);
199
+ _classPrivateFieldInitSpec(this, _pressed, {
200
+ writable: true,
201
+ value: null
202
+ });
110
203
  /**
111
204
  * @type {boolean}
112
205
  */
113
- _classPrivateFieldInitSpec(this, _isTriggeredByRMB, false);
206
+ _classPrivateFieldInitSpec(this, _isTriggeredByRMB, {
207
+ writable: true,
208
+ value: false
209
+ });
114
210
  /**
115
211
  * @type {number}
116
212
  */
117
- _classPrivateFieldInitSpec(this, _dblclick, 0);
213
+ _classPrivateFieldInitSpec(this, _dblclick, {
214
+ writable: true,
215
+ value: 0
216
+ });
118
217
  /**
119
218
  * @type {number}
120
219
  */
121
- _classPrivateFieldInitSpec(this, _autoresizeTimeout, null);
220
+ _classPrivateFieldInitSpec(this, _autoresizeTimeout, {
221
+ writable: true,
222
+ value: null
223
+ });
122
224
  /**
123
225
  * PhysicalIndexToValueMap to keep and track widths for physical column indexes.
124
226
  *
125
227
  * @type {PhysicalIndexToValueMap}
126
228
  */
127
- _classPrivateFieldInitSpec(this, _columnWidthsMap, void 0);
229
+ _classPrivateFieldInitSpec(this, _columnWidthsMap, {
230
+ writable: true,
231
+ value: void 0
232
+ });
128
233
  /**
129
234
  * Private pool to save configuration from updateSettings.
130
235
  *
131
236
  * @type {object}
132
237
  */
133
- _classPrivateFieldInitSpec(this, _config, void 0);
134
- addClass(_classPrivateFieldGet(_handle, this), 'manualColumnResizer');
135
- addClass(_classPrivateFieldGet(_guide, this), 'manualColumnResizerGuide');
238
+ _classPrivateFieldInitSpec(this, _config, {
239
+ writable: true,
240
+ value: void 0
241
+ });
242
+ addClass(_classPrivateFieldGet(this, _handle), 'manualColumnResizer');
243
+ addClass(_classPrivateFieldGet(this, _guide), 'manualColumnResizerGuide');
136
244
  }
137
245
 
138
246
  /**
@@ -160,12 +268,12 @@ export class ManualColumnResize extends BasePlugin {
160
268
  if (this.enabled) {
161
269
  return;
162
270
  }
163
- _classPrivateFieldSet(_columnWidthsMap, this, new IndexToValueMap());
164
- _classPrivateFieldGet(_columnWidthsMap, this).addLocalHook('init', () => _assertClassBrand(_ManualColumnResize_brand, this, _onMapInit).call(this));
165
- this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_columnWidthsMap, this));
166
- this.addHook('modifyColWidth', (width, col) => _assertClassBrand(_ManualColumnResize_brand, this, _onModifyColWidth).call(this, width, col));
167
- this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => _assertClassBrand(_ManualColumnResize_brand, this, _onBeforeStretchingColumnWidth).call(this, stretchedWidth, column));
168
- this.addHook('beforeColumnResize', (newSize, column, isDoubleClick) => _assertClassBrand(_ManualColumnResize_brand, this, _onBeforeColumnResize).call(this, newSize, column, isDoubleClick));
271
+ _classPrivateFieldSet(this, _columnWidthsMap, new IndexToValueMap());
272
+ _classPrivateFieldGet(this, _columnWidthsMap).addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
273
+ this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _columnWidthsMap));
274
+ this.addHook('modifyColWidth', (width, col) => _classPrivateMethodGet(this, _onModifyColWidth, _onModifyColWidth2).call(this, width, col));
275
+ this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => _classPrivateMethodGet(this, _onBeforeStretchingColumnWidth, _onBeforeStretchingColumnWidth2).call(this, stretchedWidth, column));
276
+ this.addHook('beforeColumnResize', (newSize, column, isDoubleClick) => _classPrivateMethodGet(this, _onBeforeColumnResize, _onBeforeColumnResize2).call(this, newSize, column, isDoubleClick));
169
277
  this.bindEvents();
170
278
  super.enablePlugin();
171
279
  }
@@ -186,7 +294,7 @@ export class ManualColumnResize extends BasePlugin {
186
294
  * Disables the plugin functionality for this Handsontable instance.
187
295
  */
188
296
  disablePlugin() {
189
- _classPrivateFieldSet(_config, this, _classPrivateFieldGet(_columnWidthsMap, this).getValues());
297
+ _classPrivateFieldSet(this, _config, _classPrivateFieldGet(this, _columnWidthsMap).getValues());
190
298
  this.hot.columnIndexMapper.unregisterMap(this.pluginName);
191
299
  super.disablePlugin();
192
300
  }
@@ -197,7 +305,7 @@ export class ManualColumnResize extends BasePlugin {
197
305
  * @fires Hooks#persistentStateSave
198
306
  */
199
307
  saveManualColumnWidths() {
200
- this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, _classPrivateFieldGet(_columnWidthsMap, this).getValues());
308
+ this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, _classPrivateFieldGet(this, _columnWidthsMap).getValues());
201
309
  }
202
310
 
203
311
  /**
@@ -222,7 +330,7 @@ export class ManualColumnResize extends BasePlugin {
222
330
  setManualSize(column, width) {
223
331
  const newWidth = Math.max(width, 20);
224
332
  const physicalColumn = this.hot.toPhysicalColumn(column);
225
- _classPrivateFieldGet(_columnWidthsMap, this).setValueAtIndex(physicalColumn, newWidth);
333
+ _classPrivateFieldGet(this, _columnWidthsMap).setValueAtIndex(physicalColumn, newWidth);
226
334
  return newWidth;
227
335
  }
228
336
 
@@ -233,7 +341,7 @@ export class ManualColumnResize extends BasePlugin {
233
341
  */
234
342
  clearManualSize(column) {
235
343
  const physicalColumn = this.hot.toPhysicalColumn(column);
236
- _classPrivateFieldGet(_columnWidthsMap, this).setValueAtIndex(physicalColumn, null);
344
+ _classPrivateFieldGet(this, _columnWidthsMap).setValueAtIndex(physicalColumn, null);
237
345
  }
238
346
  /**
239
347
  * Set the resize handle position.
@@ -245,34 +353,34 @@ export class ManualColumnResize extends BasePlugin {
245
353
  if (!TH.parentNode) {
246
354
  return;
247
355
  }
248
- _classPrivateFieldSet(_currentTH, this, TH);
356
+ _classPrivateFieldSet(this, _currentTH, TH);
249
357
  const {
250
358
  _wt: wt
251
359
  } = this.hot.view;
252
- const cellCoords = wt.wtTable.getCoords(_classPrivateFieldGet(_currentTH, this));
360
+ const cellCoords = wt.wtTable.getCoords(_classPrivateFieldGet(this, _currentTH));
253
361
  const col = cellCoords.col;
254
362
 
255
363
  // Ignore column headers.
256
364
  if (col < 0) {
257
365
  return;
258
366
  }
259
- const headerHeight = outerHeight(_classPrivateFieldGet(_currentTH, this));
260
- const box = _classPrivateFieldGet(_currentTH, this).getBoundingClientRect();
367
+ const headerHeight = outerHeight(_classPrivateFieldGet(this, _currentTH));
368
+ const box = _classPrivateFieldGet(this, _currentTH).getBoundingClientRect();
261
369
  // Read "fixedColumnsStart" through the Walkontable as in that context, the fixed columns
262
370
  // are modified (reduced by the number of hidden columns) by TableView module.
263
371
  const fixedColumn = col < wt.getSetting('fixedColumnsStart');
264
372
  let relativeHeaderPosition;
265
373
  if (fixedColumn) {
266
- relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(_classPrivateFieldGet(_currentTH, this), cellCoords.row, cellCoords.col);
374
+ relativeHeaderPosition = wt.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(_classPrivateFieldGet(this, _currentTH), cellCoords.row, cellCoords.col);
267
375
  }
268
376
 
269
377
  // If the TH is not a child of the top-left overlay, recalculate using
270
378
  // the top overlay - as this overlay contains the rest of the headers.
271
379
  if (!relativeHeaderPosition) {
272
- relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition(_classPrivateFieldGet(_currentTH, this), cellCoords.row, cellCoords.col);
380
+ relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition(_classPrivateFieldGet(this, _currentTH), cellCoords.row, cellCoords.col);
273
381
  }
274
- _classPrivateFieldSet(_currentCol, this, this.hot.columnIndexMapper.getVisualFromRenderableIndex(col));
275
- _classPrivateFieldSet(_selectedCols, this, []);
382
+ _classPrivateFieldSet(this, _currentCol, this.hot.columnIndexMapper.getVisualFromRenderableIndex(col));
383
+ _classPrivateFieldSet(this, _selectedCols, []);
276
384
  const isFullColumnSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByColumnHeader();
277
385
  if (this.hot.selection.isSelected() && isFullColumnSelected) {
278
386
  const selectionRanges = this.hot.getSelectedRange();
@@ -282,23 +390,23 @@ export class ManualColumnResize extends BasePlugin {
282
390
 
283
391
  // Add every selected column for resize action.
284
392
  rangeEach(fromColumn, toColumn, columnIndex => {
285
- if (!_classPrivateFieldGet(_selectedCols, this).includes(columnIndex)) {
286
- _classPrivateFieldGet(_selectedCols, this).push(columnIndex);
393
+ if (!_classPrivateFieldGet(this, _selectedCols).includes(columnIndex)) {
394
+ _classPrivateFieldGet(this, _selectedCols).push(columnIndex);
287
395
  }
288
396
  });
289
397
  });
290
398
  }
291
399
 
292
400
  // Resizing element beyond the current selection (also when there is no selection).
293
- if (!_classPrivateFieldGet(_selectedCols, this).includes(_classPrivateFieldGet(_currentCol, this))) {
294
- _classPrivateFieldSet(_selectedCols, this, [_classPrivateFieldGet(_currentCol, this)]);
401
+ if (!_classPrivateFieldGet(this, _selectedCols).includes(_classPrivateFieldGet(this, _currentCol))) {
402
+ _classPrivateFieldSet(this, _selectedCols, [_classPrivateFieldGet(this, _currentCol)]);
295
403
  }
296
- _classPrivateFieldSet(_startOffset, this, relativeHeaderPosition.start - 6);
297
- _classPrivateFieldSet(_startWidth, this, parseInt(box.width, 10));
298
- _classPrivateFieldGet(_handle, this).style.top = `${relativeHeaderPosition.top}px`;
299
- _classPrivateFieldGet(_handle, this).style[this.inlineDir] = `${_classPrivateFieldGet(_startOffset, this) + _classPrivateFieldGet(_startWidth, this)}px`;
300
- _classPrivateFieldGet(_handle, this).style.height = `${headerHeight}px`;
301
- this.hot.rootElement.appendChild(_classPrivateFieldGet(_handle, this));
404
+ _classPrivateFieldSet(this, _startOffset, relativeHeaderPosition.start - 6);
405
+ _classPrivateFieldSet(this, _startWidth, parseInt(box.width, 10));
406
+ _classPrivateFieldGet(this, _handle).style.top = `${relativeHeaderPosition.top}px`;
407
+ _classPrivateFieldGet(this, _handle).style[this.inlineDir] = `${_classPrivateFieldGet(this, _startOffset) + _classPrivateFieldGet(this, _startWidth)}px`;
408
+ _classPrivateFieldGet(this, _handle).style.height = `${headerHeight}px`;
409
+ this.hot.rootElement.appendChild(_classPrivateFieldGet(this, _handle));
302
410
  }
303
411
 
304
412
  /**
@@ -307,7 +415,7 @@ export class ManualColumnResize extends BasePlugin {
307
415
  * @private
308
416
  */
309
417
  refreshHandlePosition() {
310
- _classPrivateFieldGet(_handle, this).style[this.inlineDir] = `${_classPrivateFieldGet(_startOffset, this) + _classPrivateFieldGet(_currentWidth, this)}px`;
418
+ _classPrivateFieldGet(this, _handle).style[this.inlineDir] = `${_classPrivateFieldGet(this, _startOffset) + _classPrivateFieldGet(this, _currentWidth)}px`;
311
419
  }
312
420
 
313
421
  /**
@@ -316,15 +424,15 @@ export class ManualColumnResize extends BasePlugin {
316
424
  * @private
317
425
  */
318
426
  setupGuidePosition() {
319
- const handleHeight = parseInt(outerHeight(_classPrivateFieldGet(_handle, this)), 10);
320
- const handleBottomPosition = parseInt(_classPrivateFieldGet(_handle, this).style.top, 10) + handleHeight;
427
+ const handleHeight = parseInt(outerHeight(_classPrivateFieldGet(this, _handle)), 10);
428
+ const handleBottomPosition = parseInt(_classPrivateFieldGet(this, _handle).style.top, 10) + handleHeight;
321
429
  const maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);
322
- addClass(_classPrivateFieldGet(_handle, this), 'active');
323
- addClass(_classPrivateFieldGet(_guide, this), 'active');
324
- _classPrivateFieldGet(_guide, this).style.top = `${handleBottomPosition}px`;
430
+ addClass(_classPrivateFieldGet(this, _handle), 'active');
431
+ addClass(_classPrivateFieldGet(this, _guide), 'active');
432
+ _classPrivateFieldGet(this, _guide).style.top = `${handleBottomPosition}px`;
325
433
  this.refreshGuidePosition();
326
- _classPrivateFieldGet(_guide, this).style.height = `${maximumVisibleElementHeight - handleHeight}px`;
327
- this.hot.rootElement.appendChild(_classPrivateFieldGet(_guide, this));
434
+ _classPrivateFieldGet(this, _guide).style.height = `${maximumVisibleElementHeight - handleHeight}px`;
435
+ this.hot.rootElement.appendChild(_classPrivateFieldGet(this, _guide));
328
436
  }
329
437
 
330
438
  /**
@@ -333,7 +441,7 @@ export class ManualColumnResize extends BasePlugin {
333
441
  * @private
334
442
  */
335
443
  refreshGuidePosition() {
336
- _classPrivateFieldGet(_guide, this).style[this.inlineDir] = _classPrivateFieldGet(_handle, this).style[this.inlineDir];
444
+ _classPrivateFieldGet(this, _guide).style[this.inlineDir] = _classPrivateFieldGet(this, _handle).style[this.inlineDir];
337
445
  }
338
446
 
339
447
  /**
@@ -342,8 +450,8 @@ export class ManualColumnResize extends BasePlugin {
342
450
  * @private
343
451
  */
344
452
  hideHandleAndGuide() {
345
- removeClass(_classPrivateFieldGet(_handle, this), 'active');
346
- removeClass(_classPrivateFieldGet(_guide, this), 'active');
453
+ removeClass(_classPrivateFieldGet(this, _handle), 'active');
454
+ removeClass(_classPrivateFieldGet(this, _guide), 'active');
347
455
  }
348
456
 
349
457
  /**
@@ -378,13 +486,6 @@ export class ManualColumnResize extends BasePlugin {
378
486
  }
379
487
  return null;
380
488
  }
381
-
382
- /**
383
- * 'mouseover' event callback - set the handle position.
384
- *
385
- * @param {MouseEvent} event The mouse event.
386
- */
387
-
388
489
  /**
389
490
  * Auto-size row after doubleclick - callback.
390
491
  *
@@ -399,44 +500,37 @@ export class ManualColumnResize extends BasePlugin {
399
500
  this.hot.view.adjustElementsSize(true);
400
501
  };
401
502
  const resize = (column, forceRender) => {
402
- const hookNewSize = this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(_newSize, this), column, true);
503
+ const hookNewSize = this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(this, _newSize), column, true);
403
504
  if (hookNewSize !== undefined) {
404
- _classPrivateFieldSet(_newSize, this, hookNewSize);
505
+ _classPrivateFieldSet(this, _newSize, hookNewSize);
405
506
  }
406
507
  if (this.hot.getSettings().stretchH === 'all') {
407
508
  this.clearManualSize(column);
408
509
  } else {
409
- this.setManualSize(column, _classPrivateFieldGet(_newSize, this)); // double click sets by auto row size plugin
510
+ this.setManualSize(column, _classPrivateFieldGet(this, _newSize)); // double click sets by auto row size plugin
410
511
  }
411
512
  this.saveManualColumnWidths();
412
- this.hot.runHooks('afterColumnResize', _classPrivateFieldGet(_newSize, this), column, true);
513
+ this.hot.runHooks('afterColumnResize', _classPrivateFieldGet(this, _newSize), column, true);
413
514
  if (forceRender) {
414
515
  render();
415
516
  }
416
517
  };
417
- if (_classPrivateFieldGet(_dblclick, this) >= 2) {
418
- const selectedColsLength = _classPrivateFieldGet(_selectedCols, this).length;
518
+ if (_classPrivateFieldGet(this, _dblclick) >= 2) {
519
+ const selectedColsLength = _classPrivateFieldGet(this, _selectedCols).length;
419
520
  if (selectedColsLength > 1) {
420
- arrayEach(_classPrivateFieldGet(_selectedCols, this), selectedCol => {
521
+ arrayEach(_classPrivateFieldGet(this, _selectedCols), selectedCol => {
421
522
  resize(selectedCol);
422
523
  });
423
524
  render();
424
525
  } else {
425
- arrayEach(_classPrivateFieldGet(_selectedCols, this), selectedCol => {
526
+ arrayEach(_classPrivateFieldGet(this, _selectedCols), selectedCol => {
426
527
  resize(selectedCol, true);
427
528
  });
428
529
  }
429
530
  }
430
- _classPrivateFieldSet(_dblclick, this, 0);
431
- _classPrivateFieldSet(_autoresizeTimeout, this, null);
531
+ _classPrivateFieldSet(this, _dblclick, 0);
532
+ _classPrivateFieldSet(this, _autoresizeTimeout, null);
432
533
  }
433
-
434
- /**
435
- * 'mousedown' event callback.
436
- *
437
- * @param {MouseEvent} event The mouse event.
438
- */
439
-
440
534
  /**
441
535
  * Binds the mouse events.
442
536
  *
@@ -447,21 +541,12 @@ export class ManualColumnResize extends BasePlugin {
447
541
  rootWindow,
448
542
  rootElement
449
543
  } = this.hot;
450
- this.eventManager.addEventListener(rootElement, 'mouseover', e => _assertClassBrand(_ManualColumnResize_brand, this, _onMouseOver).call(this, e));
451
- this.eventManager.addEventListener(rootElement, 'mousedown', e => _assertClassBrand(_ManualColumnResize_brand, this, _onMouseDown).call(this, e));
452
- this.eventManager.addEventListener(rootWindow, 'mousemove', e => _assertClassBrand(_ManualColumnResize_brand, this, _onMouseMove).call(this, e));
453
- this.eventManager.addEventListener(rootWindow, 'mouseup', () => _assertClassBrand(_ManualColumnResize_brand, this, _onMouseUp).call(this));
454
- this.eventManager.addEventListener(_classPrivateFieldGet(_handle, this), 'contextmenu', () => _assertClassBrand(_ManualColumnResize_brand, this, _onContextMenu).call(this));
544
+ this.eventManager.addEventListener(rootElement, 'mouseover', e => _classPrivateMethodGet(this, _onMouseOver, _onMouseOver2).call(this, e));
545
+ this.eventManager.addEventListener(rootElement, 'mousedown', e => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, e));
546
+ this.eventManager.addEventListener(rootWindow, 'mousemove', e => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, e));
547
+ this.eventManager.addEventListener(rootWindow, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
548
+ this.eventManager.addEventListener(_classPrivateFieldGet(this, _handle), 'contextmenu', () => _classPrivateMethodGet(this, _onContextMenu, _onContextMenu2).call(this));
455
549
  }
456
-
457
- /**
458
- * Modifies the provided column width, based on the plugin settings.
459
- *
460
- * @param {number} width Column width.
461
- * @param {number} column Visual column index.
462
- * @returns {number}
463
- */
464
-
465
550
  /**
466
551
  * Destroys the plugin instance.
467
552
  */
@@ -469,31 +554,31 @@ export class ManualColumnResize extends BasePlugin {
469
554
  super.destroy();
470
555
  }
471
556
  }
472
- function _onMapInit() {
557
+ function _onMapInit2() {
473
558
  const initialSetting = this.hot.getSettings()[PLUGIN_KEY];
474
559
  const loadedManualColumnWidths = this.loadManualColumnWidths();
475
560
  if (typeof loadedManualColumnWidths !== 'undefined') {
476
561
  this.hot.batchExecution(() => {
477
562
  loadedManualColumnWidths.forEach((width, physicalIndex) => {
478
- _classPrivateFieldGet(_columnWidthsMap, this).setValueAtIndex(physicalIndex, width);
563
+ _classPrivateFieldGet(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
479
564
  });
480
565
  }, true);
481
566
  } else if (Array.isArray(initialSetting)) {
482
567
  this.hot.batchExecution(() => {
483
568
  initialSetting.forEach((width, physicalIndex) => {
484
- _classPrivateFieldGet(_columnWidthsMap, this).setValueAtIndex(physicalIndex, width);
569
+ _classPrivateFieldGet(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
485
570
  });
486
571
  }, true);
487
- _classPrivateFieldSet(_config, this, initialSetting);
488
- } else if (initialSetting === true && Array.isArray(_classPrivateFieldGet(_config, this))) {
572
+ _classPrivateFieldSet(this, _config, initialSetting);
573
+ } else if (initialSetting === true && Array.isArray(_classPrivateFieldGet(this, _config))) {
489
574
  this.hot.batchExecution(() => {
490
- _classPrivateFieldGet(_config, this).forEach((width, physicalIndex) => {
491
- _classPrivateFieldGet(_columnWidthsMap, this).setValueAtIndex(physicalIndex, width);
575
+ _classPrivateFieldGet(this, _config).forEach((width, physicalIndex) => {
576
+ _classPrivateFieldGet(this, _columnWidthsMap).setValueAtIndex(physicalIndex, width);
492
577
  });
493
578
  }, true);
494
579
  }
495
580
  }
496
- function _onMouseOver(event) {
581
+ function _onMouseOver2(event) {
497
582
  // Workaround for #6926 - if the `event.target` is temporarily detached, we can skip this callback and wait for
498
583
  // the next `onmouseover`.
499
584
  if (isDetached(event.target)) {
@@ -501,7 +586,7 @@ function _onMouseOver(event) {
501
586
  }
502
587
 
503
588
  // A "mouseover" action is triggered right after executing "contextmenu" event. It should be ignored.
504
- if (_classPrivateFieldGet(_isTriggeredByRMB, this) === true) {
589
+ if (_classPrivateFieldGet(this, _isTriggeredByRMB) === true) {
505
590
  return;
506
591
  }
507
592
  if (this.checkIfColumnHeader(event.target)) {
@@ -511,129 +596,105 @@ function _onMouseOver(event) {
511
596
  }
512
597
  const colspan = th.getAttribute('colspan');
513
598
  if (th && (colspan === null || colspan === '1')) {
514
- if (!_classPrivateFieldGet(_pressed, this)) {
599
+ if (!_classPrivateFieldGet(this, _pressed)) {
515
600
  this.setupHandlePosition(th);
516
601
  }
517
602
  }
518
603
  }
519
604
  }
520
- function _onMouseDown(event) {
605
+ function _onMouseDown2(event) {
521
606
  if (event.target.parentNode !== this.hot.rootElement) {
522
607
  return;
523
608
  }
524
609
  if (hasClass(event.target, 'manualColumnResizer')) {
525
- this.setupHandlePosition(_classPrivateFieldGet(_currentTH, this));
610
+ this.setupHandlePosition(_classPrivateFieldGet(this, _currentTH));
526
611
  this.setupGuidePosition();
527
- _classPrivateFieldSet(_pressed, this, true);
528
- if (_classPrivateFieldGet(_autoresizeTimeout, this) === null) {
529
- _classPrivateFieldSet(_autoresizeTimeout, this, setTimeout(() => this.afterMouseDownTimeout(), 500));
530
- this.hot._registerTimeout(_classPrivateFieldGet(_autoresizeTimeout, this));
612
+ _classPrivateFieldSet(this, _pressed, true);
613
+ if (_classPrivateFieldGet(this, _autoresizeTimeout) === null) {
614
+ _classPrivateFieldSet(this, _autoresizeTimeout, setTimeout(() => this.afterMouseDownTimeout(), 500));
615
+ this.hot._registerTimeout(_classPrivateFieldGet(this, _autoresizeTimeout));
531
616
  }
532
- _classPrivateFieldSet(_dblclick, this, _classPrivateFieldGet(_dblclick, this) + 1);
617
+ _classPrivateFieldSet(this, _dblclick, _classPrivateFieldGet(this, _dblclick) + 1);
533
618
  this.startX = event.pageX;
534
- _classPrivateFieldSet(_newSize, this, _classPrivateFieldGet(_startWidth, this));
619
+ _classPrivateFieldSet(this, _newSize, _classPrivateFieldGet(this, _startWidth));
535
620
  }
536
621
  }
537
- /**
538
- * 'mousemove' event callback - refresh the handle and guide positions, cache the new column width.
539
- *
540
- * @param {MouseEvent} event The mouse event.
541
- */
542
- function _onMouseMove(event) {
543
- if (_classPrivateFieldGet(_pressed, this)) {
622
+ function _onMouseMove2(event) {
623
+ if (_classPrivateFieldGet(this, _pressed)) {
544
624
  const change = (event.pageX - this.startX) * this.hot.getDirectionFactor();
545
- _classPrivateFieldSet(_currentWidth, this, _classPrivateFieldGet(_startWidth, this) + change);
546
- arrayEach(_classPrivateFieldGet(_selectedCols, this), selectedCol => {
547
- _classPrivateFieldSet(_newSize, this, this.setManualSize(selectedCol, _classPrivateFieldGet(_currentWidth, this)));
625
+ _classPrivateFieldSet(this, _currentWidth, _classPrivateFieldGet(this, _startWidth) + change);
626
+ arrayEach(_classPrivateFieldGet(this, _selectedCols), selectedCol => {
627
+ _classPrivateFieldSet(this, _newSize, this.setManualSize(selectedCol, _classPrivateFieldGet(this, _currentWidth)));
548
628
  });
549
629
  this.refreshHandlePosition();
550
630
  this.refreshGuidePosition();
551
631
  }
552
632
  }
553
- /**
554
- * 'mouseup' event callback - apply the column resizing.
555
- *
556
- * @fires Hooks#beforeColumnResize
557
- * @fires Hooks#afterColumnResize
558
- */
559
- function _onMouseUp() {
633
+ function _onMouseUp2() {
560
634
  const render = () => {
561
635
  this.hot.forceFullRender = true;
562
636
  this.hot.view.render(); // updates all
563
637
  this.hot.view.adjustElementsSize(true);
564
638
  };
565
639
  const resize = (column, forceRender) => {
566
- this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(_newSize, this), column, false);
640
+ this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(this, _newSize), column, false);
567
641
  if (forceRender) {
568
642
  render();
569
643
  }
570
644
  this.saveManualColumnWidths();
571
- this.hot.runHooks('afterColumnResize', _classPrivateFieldGet(_newSize, this), column, false);
645
+ this.hot.runHooks('afterColumnResize', _classPrivateFieldGet(this, _newSize), column, false);
572
646
  };
573
- if (_classPrivateFieldGet(_pressed, this)) {
647
+ if (_classPrivateFieldGet(this, _pressed)) {
574
648
  this.hideHandleAndGuide();
575
- _classPrivateFieldSet(_pressed, this, false);
576
- if (_classPrivateFieldGet(_newSize, this) !== _classPrivateFieldGet(_startWidth, this)) {
577
- const selectedColsLength = _classPrivateFieldGet(_selectedCols, this).length;
649
+ _classPrivateFieldSet(this, _pressed, false);
650
+ if (_classPrivateFieldGet(this, _newSize) !== _classPrivateFieldGet(this, _startWidth)) {
651
+ const selectedColsLength = _classPrivateFieldGet(this, _selectedCols).length;
578
652
  if (selectedColsLength > 1) {
579
- arrayEach(_classPrivateFieldGet(_selectedCols, this), selectedCol => {
653
+ arrayEach(_classPrivateFieldGet(this, _selectedCols), selectedCol => {
580
654
  resize(selectedCol);
581
655
  });
582
656
  render();
583
657
  } else {
584
- arrayEach(_classPrivateFieldGet(_selectedCols, this), selectedCol => {
658
+ arrayEach(_classPrivateFieldGet(this, _selectedCols), selectedCol => {
585
659
  resize(selectedCol, true);
586
660
  });
587
661
  }
588
662
  }
589
- this.setupHandlePosition(_classPrivateFieldGet(_currentTH, this));
663
+ this.setupHandlePosition(_classPrivateFieldGet(this, _currentTH));
590
664
  }
591
665
  }
592
- /**
593
- * Callback for "contextmenu" event triggered on element showing move handle. It removes handle and guide elements.
594
- */
595
- function _onContextMenu() {
666
+ function _onContextMenu2() {
596
667
  this.hideHandleAndGuide();
597
- this.hot.rootElement.removeChild(_classPrivateFieldGet(_handle, this));
598
- this.hot.rootElement.removeChild(_classPrivateFieldGet(_guide, this));
599
- _classPrivateFieldSet(_pressed, this, false);
600
- _classPrivateFieldSet(_isTriggeredByRMB, this, true);
668
+ this.hot.rootElement.removeChild(_classPrivateFieldGet(this, _handle));
669
+ this.hot.rootElement.removeChild(_classPrivateFieldGet(this, _guide));
670
+ _classPrivateFieldSet(this, _pressed, false);
671
+ _classPrivateFieldSet(this, _isTriggeredByRMB, true);
601
672
 
602
673
  // There is thrown "mouseover" event right after opening a context menu. This flag inform that handle
603
674
  // shouldn't be drawn just after removing it.
604
675
  this.hot._registerImmediate(() => {
605
- _classPrivateFieldSet(_isTriggeredByRMB, this, false);
676
+ _classPrivateFieldSet(this, _isTriggeredByRMB, false);
606
677
  });
607
678
  }
608
- function _onModifyColWidth(width, column) {
679
+ function _onModifyColWidth2(width, column) {
609
680
  let newWidth = width;
610
681
  if (this.enabled) {
611
682
  const physicalColumn = this.hot.toPhysicalColumn(column);
612
- const columnWidth = _classPrivateFieldGet(_columnWidthsMap, this).getValueAtIndex(physicalColumn);
683
+ const columnWidth = _classPrivateFieldGet(this, _columnWidthsMap).getValueAtIndex(physicalColumn);
613
684
  if (this.hot.getSettings()[PLUGIN_KEY] && columnWidth) {
614
685
  newWidth = columnWidth;
615
686
  }
616
687
  }
617
688
  return newWidth;
618
689
  }
619
- /**
620
- * Modifies the provided column stretched width. This hook decides if specified column should be stretched or not.
621
- *
622
- * @param {number} stretchedWidth Stretched width.
623
- * @param {number} column Visual column index.
624
- * @returns {number}
625
- */
626
- function _onBeforeStretchingColumnWidth(stretchedWidth, column) {
627
- let width = _classPrivateFieldGet(_columnWidthsMap, this).getValueAtIndex(column);
690
+ function _onBeforeStretchingColumnWidth2(stretchedWidth, column) {
691
+ let width = _classPrivateFieldGet(this, _columnWidthsMap).getValueAtIndex(column);
628
692
  if (width === null) {
629
693
  width = stretchedWidth;
630
694
  }
631
695
  return width;
632
696
  }
633
- /**
634
- * `beforeColumnResize` hook callback.
635
- */
636
- function _onBeforeColumnResize() {
697
+ function _onBeforeColumnResize2() {
637
698
  // clear the header height cache information
638
699
  this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked();
639
700
  }