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