handsontable 0.0.0-next-bfb0e3a-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 (280) 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/overlays.js +1 -1
  15. package/3rdparty/walkontable/src/overlays.mjs +1 -1
  16. package/3rdparty/walkontable/src/scroll.js +17 -15
  17. package/3rdparty/walkontable/src/scroll.mjs +17 -15
  18. package/3rdparty/walkontable/src/selection/manager.js +69 -48
  19. package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
  20. package/3rdparty/walkontable/src/selection/scanner.js +42 -33
  21. package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
  22. package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
  23. package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
  24. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  25. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  26. package/base.js +2 -2
  27. package/base.mjs +2 -2
  28. package/core/viewportScroll/index.js +1 -4
  29. package/core/viewportScroll/index.mjs +1 -4
  30. package/core.d.ts +3 -4
  31. package/core.js +22 -77
  32. package/core.mjs +22 -77
  33. package/dataMap/dataSource.js +1 -1
  34. package/dataMap/dataSource.mjs +1 -1
  35. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  36. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  37. package/dataMap/metaManager/metaSchema.js +1 -1
  38. package/dataMap/metaManager/metaSchema.mjs +1 -1
  39. package/dataMap/replaceData.js +1 -1
  40. package/dataMap/replaceData.mjs +1 -1
  41. package/dist/handsontable.css +4 -4
  42. package/dist/handsontable.full.css +4 -4
  43. package/dist/handsontable.full.js +9117 -8969
  44. package/dist/handsontable.full.min.css +3 -3
  45. package/dist/handsontable.full.min.js +292 -292
  46. package/dist/handsontable.js +6569 -6874
  47. package/dist/handsontable.min.css +3 -3
  48. package/dist/handsontable.min.js +25 -25
  49. package/dist/languages/all.min.js +1 -1
  50. package/dist/languages/ar-AR.min.js +1 -1
  51. package/dist/languages/cs-CZ.min.js +1 -1
  52. package/dist/languages/de-CH.min.js +1 -1
  53. package/dist/languages/de-DE.min.js +1 -1
  54. package/dist/languages/en-US.min.js +1 -1
  55. package/dist/languages/es-MX.min.js +1 -1
  56. package/dist/languages/fr-FR.min.js +1 -1
  57. package/dist/languages/hr-HR.min.js +1 -1
  58. package/dist/languages/it-IT.min.js +1 -1
  59. package/dist/languages/ja-JP.min.js +1 -1
  60. package/dist/languages/ko-KR.min.js +1 -1
  61. package/dist/languages/lv-LV.min.js +1 -1
  62. package/dist/languages/nb-NO.min.js +1 -1
  63. package/dist/languages/nl-NL.min.js +1 -1
  64. package/dist/languages/pl-PL.min.js +1 -1
  65. package/dist/languages/pt-BR.min.js +1 -1
  66. package/dist/languages/ru-RU.min.js +1 -1
  67. package/dist/languages/sr-SP.min.js +1 -1
  68. package/dist/languages/zh-CN.min.js +1 -1
  69. package/dist/languages/zh-TW.min.js +1 -1
  70. package/editorManager.js +23 -25
  71. package/editorManager.mjs +23 -25
  72. package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
  73. package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
  74. package/editors/selectEditor/selectEditor.js +19 -20
  75. package/editors/selectEditor/selectEditor.mjs +19 -20
  76. package/eventManager.js +1 -1
  77. package/eventManager.mjs +1 -1
  78. package/focusManager.js +82 -64
  79. package/focusManager.mjs +82 -64
  80. package/helpers/dom/element.js +1 -1
  81. package/helpers/dom/element.mjs +1 -1
  82. package/helpers/mixed.js +1 -1
  83. package/helpers/mixed.mjs +1 -1
  84. package/helpers/object.js +2 -2
  85. package/helpers/object.mjs +2 -2
  86. package/index.d.ts +0 -10
  87. package/package.json +2 -7
  88. package/pluginHooks.d.ts +3 -4
  89. package/pluginHooks.js +38 -99
  90. package/pluginHooks.mjs +38 -99
  91. package/plugins/autoColumnSize/autoColumnSize.js +65 -49
  92. package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
  93. package/plugins/autoRowSize/autoRowSize.js +34 -28
  94. package/plugins/autoRowSize/autoRowSize.mjs +34 -28
  95. package/plugins/autofill/autofill.js +38 -30
  96. package/plugins/autofill/autofill.mjs +38 -30
  97. package/plugins/base/base.js +17 -12
  98. package/plugins/base/base.mjs +17 -12
  99. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  100. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  101. package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
  102. package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
  103. package/plugins/columnSorting/columnSorting.js +45 -49
  104. package/plugins/columnSorting/columnSorting.mjs +45 -49
  105. package/plugins/columnSummary/columnSummary.js +26 -22
  106. package/plugins/columnSummary/columnSummary.mjs +26 -22
  107. package/plugins/comments/comments.js +158 -116
  108. package/plugins/comments/comments.mjs +158 -116
  109. package/plugins/contextMenu/contextMenu.js +26 -20
  110. package/plugins/contextMenu/contextMenu.mjs +26 -20
  111. package/plugins/contextMenu/itemsFactory.js +1 -1
  112. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  113. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  114. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  115. package/plugins/contextMenu/menu/menu.js +21 -13
  116. package/plugins/contextMenu/menu/menu.mjs +21 -13
  117. package/plugins/contextMenu/menu/positioner.js +58 -41
  118. package/plugins/contextMenu/menu/positioner.mjs +58 -41
  119. package/plugins/copyPaste/copyPaste.js +157 -116
  120. package/plugins/copyPaste/copyPaste.mjs +157 -116
  121. package/plugins/copyPaste/copyableRanges.js +66 -43
  122. package/plugins/copyPaste/copyableRanges.mjs +66 -43
  123. package/plugins/customBorders/customBorders.js +13 -11
  124. package/plugins/customBorders/customBorders.mjs +13 -11
  125. package/plugins/dragToScroll/dragToScroll.js +6 -6
  126. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  127. package/plugins/dropdownMenu/dropdownMenu.js +106 -80
  128. package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
  129. package/plugins/exportFile/dataProvider.js +1 -1
  130. package/plugins/exportFile/dataProvider.mjs +1 -1
  131. package/plugins/filters/component/actionBar.js +9 -9
  132. package/plugins/filters/component/actionBar.mjs +8 -8
  133. package/plugins/filters/component/condition.js +15 -13
  134. package/plugins/filters/component/condition.mjs +15 -13
  135. package/plugins/filters/component/operators.js +6 -6
  136. package/plugins/filters/component/operators.mjs +6 -6
  137. package/plugins/filters/component/value.js +28 -24
  138. package/plugins/filters/component/value.mjs +28 -24
  139. package/plugins/filters/conditionUpdateObserver.js +24 -22
  140. package/plugins/filters/conditionUpdateObserver.mjs +24 -22
  141. package/plugins/filters/dataFilter.js +1 -1
  142. package/plugins/filters/dataFilter.mjs +1 -1
  143. package/plugins/filters/filters.js +95 -81
  144. package/plugins/filters/filters.mjs +95 -81
  145. package/plugins/filters/ui/input.js +19 -13
  146. package/plugins/filters/ui/input.mjs +19 -13
  147. package/plugins/filters/ui/link.js +13 -8
  148. package/plugins/filters/ui/link.mjs +13 -8
  149. package/plugins/filters/ui/multipleSelect.js +112 -85
  150. package/plugins/filters/ui/multipleSelect.mjs +112 -85
  151. package/plugins/filters/ui/radioInput.js +20 -12
  152. package/plugins/filters/ui/radioInput.mjs +20 -12
  153. package/plugins/filters/ui/select.js +72 -50
  154. package/plugins/filters/ui/select.mjs +71 -49
  155. package/plugins/formulas/formulas.js +326 -268
  156. package/plugins/formulas/formulas.mjs +327 -269
  157. package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
  158. package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
  159. package/plugins/formulas/indexSyncer/index.js +48 -25
  160. package/plugins/formulas/indexSyncer/index.mjs +48 -25
  161. package/plugins/hiddenColumns/hiddenColumns.js +83 -64
  162. package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
  163. package/plugins/hiddenRows/hiddenRows.js +82 -63
  164. package/plugins/hiddenRows/hiddenRows.mjs +82 -63
  165. package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
  166. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
  167. package/plugins/manualColumnMove/manualColumnMove.js +170 -126
  168. package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
  169. package/plugins/manualColumnResize/manualColumnResize.js +230 -169
  170. package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
  171. package/plugins/manualRowMove/manualRowMove.js +128 -99
  172. package/plugins/manualRowMove/manualRowMove.mjs +128 -99
  173. package/plugins/manualRowResize/manualRowResize.js +209 -150
  174. package/plugins/manualRowResize/manualRowResize.mjs +209 -150
  175. package/plugins/mergeCells/calculations/selection.js +71 -2
  176. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  177. package/plugins/mergeCells/cellsCollection.js +1 -117
  178. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  179. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  180. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  181. package/plugins/mergeCells/mergeCells.js +397 -499
  182. package/plugins/mergeCells/mergeCells.mjs +397 -499
  183. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
  184. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
  185. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  186. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  187. package/plugins/nestedHeaders/nestedHeaders.js +253 -205
  188. package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
  189. package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
  190. package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
  191. package/plugins/nestedHeaders/stateManager/index.js +41 -30
  192. package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
  193. package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
  194. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
  195. package/plugins/nestedRows/data/dataManager.js +1 -1
  196. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  197. package/plugins/nestedRows/nestedRows.js +182 -151
  198. package/plugins/nestedRows/nestedRows.mjs +183 -152
  199. package/plugins/nestedRows/ui/contextMenu.js +15 -11
  200. package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
  201. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  202. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  203. package/plugins/persistentState/storage.js +2 -2
  204. package/plugins/persistentState/storage.mjs +2 -2
  205. package/plugins/search/search.js +7 -7
  206. package/plugins/search/search.mjs +7 -7
  207. package/plugins/touchScroll/touchScroll.js +19 -15
  208. package/plugins/touchScroll/touchScroll.mjs +20 -16
  209. package/plugins/trimRows/trimRows.js +6 -6
  210. package/plugins/trimRows/trimRows.mjs +6 -6
  211. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  212. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  213. package/selection/highlight/highlight.js +14 -14
  214. package/selection/highlight/highlight.mjs +13 -13
  215. package/selection/highlight/visualSelection.js +0 -2
  216. package/selection/highlight/visualSelection.mjs +0 -2
  217. package/selection/selection.js +67 -225
  218. package/selection/selection.mjs +66 -224
  219. package/selection/transformation.js +118 -149
  220. package/selection/transformation.mjs +118 -149
  221. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  222. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  223. package/shortcutContexts/commands/editor/open.js +3 -18
  224. package/shortcutContexts/commands/editor/open.mjs +3 -18
  225. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  226. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  227. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  228. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  229. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  230. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  231. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  232. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  233. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  234. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  235. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  236. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  237. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  238. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  239. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  240. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  241. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  242. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  243. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  244. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  245. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  246. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  247. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  248. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  249. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  250. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  251. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  252. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  253. package/shortcutContexts/grid.js +3 -9
  254. package/shortcutContexts/grid.mjs +3 -9
  255. package/shortcuts/context.js +1 -2
  256. package/shortcuts/context.mjs +1 -2
  257. package/tableView.js +78 -52
  258. package/tableView.mjs +78 -52
  259. package/translations/changesObservable/observable.js +38 -21
  260. package/translations/changesObservable/observable.mjs +38 -21
  261. package/translations/changesObservable/observer.js +12 -7
  262. package/translations/changesObservable/observer.mjs +11 -6
  263. package/translations/mapCollections/aggregatedCollection.js +1 -1
  264. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  265. package/translations/maps/indexMap.js +1 -1
  266. package/translations/maps/indexMap.mjs +1 -1
  267. package/utils/dataStructures/linkedList.js +1 -6
  268. package/utils/dataStructures/linkedList.mjs +1 -6
  269. package/utils/dataStructures/tree.js +1 -1
  270. package/utils/dataStructures/tree.mjs +1 -1
  271. package/utils/interval.js +44 -26
  272. package/utils/interval.mjs +44 -26
  273. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  274. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  275. package/i18n/languages/ar-AR.d.ts +0 -5
  276. package/i18n/languages/cs-CZ.d.ts +0 -5
  277. package/i18n/languages/hr-HR.d.ts +0 -5
  278. package/i18n/languages/sr-SP.d.ts +0 -5
  279. package/plugins/mergeCells/focusOrder.js +0 -305
  280. package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -6,9 +6,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
8
8
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
10
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
11
- 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"); }
9
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
10
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
11
+ 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; } }
12
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
13
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
14
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
12
15
  import { addClass, closest, isChildOf, hasClass, outerWidth, outerHeight } from "../../helpers/dom/element.mjs";
13
16
  import { stopImmediatePropagation } from "../../helpers/dom/event.mjs";
14
17
  import { deepClone, deepExtend, isObject } from "../../helpers/object.mjs";
@@ -125,16 +128,75 @@ var _preventEditorHiding = /*#__PURE__*/new WeakMap();
125
128
  var _tempEditorDimensions = /*#__PURE__*/new WeakMap();
126
129
  var _cellBelowCursor = /*#__PURE__*/new WeakMap();
127
130
  var _commentValueBeforeSave = /*#__PURE__*/new WeakMap();
128
- var _Comments_brand = /*#__PURE__*/new WeakSet();
131
+ var _onMouseDown = /*#__PURE__*/new WeakSet();
132
+ var _onMouseOver = /*#__PURE__*/new WeakSet();
133
+ var _onMouseUp = /*#__PURE__*/new WeakSet();
134
+ var _onAfterRenderer = /*#__PURE__*/new WeakSet();
135
+ var _onEditorBlur = /*#__PURE__*/new WeakSet();
136
+ var _onEditorFocus = /*#__PURE__*/new WeakSet();
137
+ var _onEditorMouseDown = /*#__PURE__*/new WeakSet();
138
+ var _onEditorMouseUp = /*#__PURE__*/new WeakSet();
139
+ var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
140
+ var _onAfterScroll = /*#__PURE__*/new WeakSet();
129
141
  export class Comments extends BasePlugin {
130
142
  constructor() {
131
143
  super(...arguments);
144
+ /**
145
+ * Observes the changes in the scroll position if triggered it hides the comment editor.
146
+ */
147
+ _classPrivateMethodInitSpec(this, _onAfterScroll);
148
+ /**
149
+ * Observes the pressed keys and if there is already opened the comment editor prevents open
150
+ * the table editor into the fast edit mode.
151
+ *
152
+ * @param {Event} event The keydown event.
153
+ */
154
+ _classPrivateMethodInitSpec(this, _onAfterDocumentKeyDown);
155
+ /**
156
+ * `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.
157
+ *
158
+ * @param {MouseEvent} event The `mouseup` event.
159
+ */
160
+ _classPrivateMethodInitSpec(this, _onEditorMouseUp);
161
+ /**
162
+ * `mousedown` hook. Along with `onEditorMouseUp` used to simulate the textarea resizing event.
163
+ *
164
+ * @param {MouseEvent} event The `mousedown` event.
165
+ */
166
+ _classPrivateMethodInitSpec(this, _onEditorMouseDown);
167
+ /**
168
+ * Hook observer the "focus" event from the comments editor element. The hook takes the control of
169
+ * the keyboard shortcuts by switching the context to plugins one.
170
+ */
171
+ _classPrivateMethodInitSpec(this, _onEditorFocus);
172
+ /**
173
+ * Hook observer the "blur" event from the comments editor element. The hook clears the
174
+ * editor content and gives back the keyboard shortcuts control by switching to the "grid" context.
175
+ */
176
+ _classPrivateMethodInitSpec(this, _onEditorBlur);
177
+ /**
178
+ * The `afterRenderer` hook callback.
179
+ *
180
+ * @param {HTMLTableCellElement} TD The rendered `TD` element.
181
+ * @param {object} cellProperties The rendered cell's property object.
182
+ */
183
+ _classPrivateMethodInitSpec(this, _onAfterRenderer);
184
+ /**
185
+ * `mouseup` event callback.
186
+ */
187
+ _classPrivateMethodInitSpec(this, _onMouseUp);
188
+ /**
189
+ * `mouseover` event callback.
190
+ *
191
+ * @param {MouseEvent} event The `mouseover` event.
192
+ */
193
+ _classPrivateMethodInitSpec(this, _onMouseOver);
132
194
  /**
133
195
  * `mousedown` event callback.
134
196
  *
135
197
  * @param {MouseEvent} event The `mousedown` event.
136
198
  */
137
- _classPrivateMethodInitSpec(this, _Comments_brand);
199
+ _classPrivateMethodInitSpec(this, _onMouseDown);
138
200
  /**
139
201
  * Current cell range, an object with `from` property, with `row` and `col` properties (e.q. `{from: {row: 1, col: 6}}`).
140
202
  *
@@ -147,21 +209,30 @@ export class Comments extends BasePlugin {
147
209
  * @private
148
210
  * @type {CommentEditor}
149
211
  */
150
- _classPrivateFieldInitSpec(this, _editor, null);
212
+ _classPrivateFieldInitSpec(this, _editor, {
213
+ writable: true,
214
+ value: null
215
+ });
151
216
  /**
152
217
  * Instance of {@link DisplaySwitch}.
153
218
  *
154
219
  * @private
155
220
  * @type {DisplaySwitch}
156
221
  */
157
- _classPrivateFieldInitSpec(this, _displaySwitch, null);
222
+ _classPrivateFieldInitSpec(this, _displaySwitch, {
223
+ writable: true,
224
+ value: null
225
+ });
158
226
  /**
159
227
  * Prevents showing/hiding editor that reacts on the logic triggered by the "mouseover" events.
160
228
  *
161
229
  * @private
162
230
  * @type {boolean}
163
231
  */
164
- _classPrivateFieldInitSpec(this, _preventEditorAutoSwitch, false);
232
+ _classPrivateFieldInitSpec(this, _preventEditorAutoSwitch, {
233
+ writable: true,
234
+ value: false
235
+ });
165
236
  /**
166
237
  * Prevents hiding editor when the table viewport is scrolled and that scroll is triggered by the
167
238
  * keyboard shortcut that insert or edits the comment.
@@ -169,28 +240,40 @@ export class Comments extends BasePlugin {
169
240
  * @private
170
241
  * @type {boolean}
171
242
  */
172
- _classPrivateFieldInitSpec(this, _preventEditorHiding, false);
243
+ _classPrivateFieldInitSpec(this, _preventEditorHiding, {
244
+ writable: true,
245
+ value: false
246
+ });
173
247
  /**
174
248
  * The property for holding editor dimensions for further processing.
175
249
  *
176
250
  * @private
177
251
  * @type {object}
178
252
  */
179
- _classPrivateFieldInitSpec(this, _tempEditorDimensions, {});
253
+ _classPrivateFieldInitSpec(this, _tempEditorDimensions, {
254
+ writable: true,
255
+ value: {}
256
+ });
180
257
  /**
181
258
  * The flag that allows processing mousedown event correctly when comments editor is triggered.
182
259
  *
183
260
  * @private
184
261
  * @type {boolean}
185
262
  */
186
- _classPrivateFieldInitSpec(this, _cellBelowCursor, null);
263
+ _classPrivateFieldInitSpec(this, _cellBelowCursor, {
264
+ writable: true,
265
+ value: null
266
+ });
187
267
  /**
188
268
  * Holds the comment value before it's actually saved to the cell meta.
189
269
  *
190
270
  * @private
191
271
  * @type {string}
192
272
  */
193
- _classPrivateFieldInitSpec(this, _commentValueBeforeSave, '');
273
+ _classPrivateFieldInitSpec(this, _commentValueBeforeSave, {
274
+ writable: true,
275
+ value: ''
276
+ });
194
277
  }
195
278
  static get PLUGIN_KEY() {
196
279
  return PLUGIN_KEY;
@@ -215,19 +298,19 @@ export class Comments extends BasePlugin {
215
298
  if (this.enabled) {
216
299
  return;
217
300
  }
218
- if (!_classPrivateFieldGet(_editor, this)) {
219
- _classPrivateFieldSet(_editor, this, new CommentEditor(this.hot.rootDocument, this.hot.isRtl()));
301
+ if (!_classPrivateFieldGet(this, _editor)) {
302
+ _classPrivateFieldSet(this, _editor, new CommentEditor(this.hot.rootDocument, this.hot.isRtl()));
220
303
  }
221
- if (!_classPrivateFieldGet(_displaySwitch, this)) {
222
- _classPrivateFieldSet(_displaySwitch, this, new DisplaySwitch(this.getDisplayDelaySetting()));
304
+ if (!_classPrivateFieldGet(this, _displaySwitch)) {
305
+ _classPrivateFieldSet(this, _displaySwitch, new DisplaySwitch(this.getDisplayDelaySetting()));
223
306
  }
224
307
  this.addHook('afterContextMenuDefaultOptions', options => this.addToContextMenu(options));
225
- this.addHook('afterRenderer', (TD, row, col, prop, value, cellProperties) => _assertClassBrand(_Comments_brand, this, _onAfterRenderer).call(this, TD, cellProperties));
226
- this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
308
+ this.addHook('afterRenderer', (TD, row, col, prop, value, cellProperties) => _classPrivateMethodGet(this, _onAfterRenderer, _onAfterRenderer2).call(this, TD, cellProperties));
309
+ this.addHook('afterScroll', () => _classPrivateMethodGet(this, _onAfterScroll, _onAfterScroll2).call(this));
227
310
  this.addHook('afterBeginEditing', () => this.hide());
228
- this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
229
- _classPrivateFieldGet(_displaySwitch, this).addLocalHook('hide', () => this.hide());
230
- _classPrivateFieldGet(_displaySwitch, this).addLocalHook('show', (row, col) => this.showAtCell(row, col));
311
+ this.addHook('afterDocumentKeyDown', event => _classPrivateMethodGet(this, _onAfterDocumentKeyDown, _onAfterDocumentKeyDown2).call(this, event));
312
+ _classPrivateFieldGet(this, _displaySwitch).addLocalHook('hide', () => this.hide());
313
+ _classPrivateFieldGet(this, _displaySwitch).addLocalHook('show', (row, col) => this.showAtCell(row, col));
231
314
  this.registerShortcuts();
232
315
  this.registerListeners();
233
316
  super.enablePlugin();
@@ -240,7 +323,7 @@ export class Comments extends BasePlugin {
240
323
  * - [`comments`](@/api/options.md#comments)
241
324
  */
242
325
  updatePlugin() {
243
- _classPrivateFieldGet(_displaySwitch, this).updateDelay(this.getDisplayDelaySetting());
326
+ _classPrivateFieldGet(this, _displaySwitch).updateDelay(this.getDisplayDelaySetting());
244
327
  super.updatePlugin();
245
328
  }
246
329
 
@@ -265,34 +348,34 @@ export class Comments extends BasePlugin {
265
348
  keys: [['Control', 'Alt', 'M']],
266
349
  callback: () => {
267
350
  const range = this.hot.getSelectedRangeLast();
268
- _classPrivateFieldSet(_preventEditorHiding, this, true);
351
+ _classPrivateFieldSet(this, _preventEditorHiding, true);
269
352
  this.hot.scrollToFocusedCell(() => {
270
353
  this.setRange(range);
271
354
  this.show();
272
355
  this.focusEditor();
273
356
  manager.setActiveContextName(SHORTCUTS_CONTEXT_NAME);
274
357
  this.hot._registerTimeout(() => {
275
- _classPrivateFieldSet(_preventEditorHiding, this, false);
358
+ _classPrivateFieldSet(this, _preventEditorHiding, false);
276
359
  });
277
360
  });
278
361
  },
279
362
  stopPropagation: true,
280
363
  runOnlyIf: () => {
281
364
  var _this$hot$getSelected;
282
- return ((_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isCell()) && !_classPrivateFieldGet(_editor, this).isVisible();
365
+ return ((_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isCell()) && !_classPrivateFieldGet(this, _editor).isVisible();
283
366
  },
284
367
  group: SHORTCUTS_GROUP
285
368
  });
286
369
  pluginContext.addShortcut({
287
370
  keys: [['Escape']],
288
371
  callback: () => {
289
- _classPrivateFieldGet(_editor, this).setValue(_classPrivateFieldGet(_commentValueBeforeSave, this));
372
+ _classPrivateFieldGet(this, _editor).setValue(_classPrivateFieldGet(this, _commentValueBeforeSave));
290
373
  this.hide();
291
374
  manager.setActiveContextName('grid');
292
375
  },
293
376
  runOnlyIf: () => {
294
377
  var _this$hot$getSelected2;
295
- return ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight.isCell()) && _classPrivateFieldGet(_editor, this).isVisible();
378
+ return ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight.isCell()) && _classPrivateFieldGet(this, _editor).isVisible();
296
379
  },
297
380
  group: SHORTCUTS_GROUP
298
381
  });
@@ -304,7 +387,7 @@ export class Comments extends BasePlugin {
304
387
  },
305
388
  runOnlyIf: () => {
306
389
  var _this$hot$getSelected3;
307
- return ((_this$hot$getSelected3 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected3 === void 0 ? void 0 : _this$hot$getSelected3.highlight.isCell()) && _classPrivateFieldGet(_editor, this).isVisible();
390
+ return ((_this$hot$getSelected3 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected3 === void 0 ? void 0 : _this$hot$getSelected3.highlight.isCell()) && _classPrivateFieldGet(this, _editor).isVisible();
308
391
  },
309
392
  group: SHORTCUTS_GROUP
310
393
  });
@@ -329,13 +412,13 @@ export class Comments extends BasePlugin {
329
412
  rootDocument
330
413
  } = this.hot;
331
414
  const editorElement = this.getEditorInputElement();
332
- this.eventManager.addEventListener(rootDocument, 'mouseover', event => _assertClassBrand(_Comments_brand, this, _onMouseOver).call(this, event));
333
- this.eventManager.addEventListener(rootDocument, 'mousedown', event => _assertClassBrand(_Comments_brand, this, _onMouseDown).call(this, event));
334
- this.eventManager.addEventListener(rootDocument, 'mouseup', () => _assertClassBrand(_Comments_brand, this, _onMouseUp).call(this));
335
- this.eventManager.addEventListener(editorElement, 'focus', () => _assertClassBrand(_Comments_brand, this, _onEditorFocus).call(this));
336
- this.eventManager.addEventListener(editorElement, 'blur', () => _assertClassBrand(_Comments_brand, this, _onEditorBlur).call(this));
337
- this.eventManager.addEventListener(editorElement, 'mousedown', event => _assertClassBrand(_Comments_brand, this, _onEditorMouseDown).call(this, event));
338
- this.eventManager.addEventListener(editorElement, 'mouseup', event => _assertClassBrand(_Comments_brand, this, _onEditorMouseUp).call(this, event));
415
+ this.eventManager.addEventListener(rootDocument, 'mouseover', event => _classPrivateMethodGet(this, _onMouseOver, _onMouseOver2).call(this, event));
416
+ this.eventManager.addEventListener(rootDocument, 'mousedown', event => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, event));
417
+ this.eventManager.addEventListener(rootDocument, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
418
+ this.eventManager.addEventListener(editorElement, 'focus', () => _classPrivateMethodGet(this, _onEditorFocus, _onEditorFocus2).call(this));
419
+ this.eventManager.addEventListener(editorElement, 'blur', () => _classPrivateMethodGet(this, _onEditorBlur, _onEditorBlur2).call(this));
420
+ this.eventManager.addEventListener(editorElement, 'mousedown', event => _classPrivateMethodGet(this, _onEditorMouseDown, _onEditorMouseDown2).call(this, event));
421
+ this.eventManager.addEventListener(editorElement, 'mouseup', event => _classPrivateMethodGet(this, _onEditorMouseUp, _onEditorMouseUp2).call(this, event));
339
422
  }
340
423
 
341
424
  /**
@@ -386,7 +469,7 @@ export class Comments extends BasePlugin {
386
469
  if (!this.range.from) {
387
470
  throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');
388
471
  }
389
- const editorValue = _classPrivateFieldGet(_editor, this).getValue();
472
+ const editorValue = _classPrivateFieldGet(this, _editor).getValue();
390
473
  let comment = '';
391
474
  if (value !== null && value !== undefined) {
392
475
  comment = value;
@@ -489,9 +572,9 @@ export class Comments extends BasePlugin {
489
572
  return false;
490
573
  }
491
574
  const meta = this.hot.getCellMeta(this.range.from.row, this.range.from.col);
492
- _classPrivateFieldGet(_displaySwitch, this).cancelHiding();
493
- _classPrivateFieldGet(_editor, this).setValue((_ref = meta[META_COMMENT] ? meta[META_COMMENT][META_COMMENT_VALUE] : null) !== null && _ref !== void 0 ? _ref : '');
494
- _classPrivateFieldGet(_editor, this).show();
575
+ _classPrivateFieldGet(this, _displaySwitch).cancelHiding();
576
+ _classPrivateFieldGet(this, _editor).setValue((_ref = meta[META_COMMENT] ? meta[META_COMMENT][META_COMMENT_VALUE] : null) !== null && _ref !== void 0 ? _ref : '');
577
+ _classPrivateFieldGet(this, _editor).show();
495
578
  this.refreshEditor(true);
496
579
  return true;
497
580
  }
@@ -514,7 +597,7 @@ export class Comments extends BasePlugin {
514
597
  * Hides the comment editor.
515
598
  */
516
599
  hide() {
517
- _classPrivateFieldGet(_editor, this).hide();
600
+ _classPrivateFieldGet(this, _editor).hide();
518
601
  }
519
602
 
520
603
  /**
@@ -525,7 +608,7 @@ export class Comments extends BasePlugin {
525
608
  refreshEditor() {
526
609
  var _renderableRow, _renderableColumn;
527
610
  let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
528
- if (!force && (!this.range.from || !_classPrivateFieldGet(_editor, this).isVisible())) {
611
+ if (!force && (!this.range.from || !_classPrivateFieldGet(this, _editor).isVisible())) {
529
612
  return;
530
613
  }
531
614
  const {
@@ -543,7 +626,7 @@ export class Comments extends BasePlugin {
543
626
 
544
627
  // Reset the editor position to (0, 0) so the opening direction calculation wouldn't be influenced by its
545
628
  // previous position
546
- _classPrivateFieldGet(_editor, this).setPosition(0, 0);
629
+ _classPrivateFieldGet(this, _editor).setPosition(0, 0);
547
630
  if (renderableRow === null) {
548
631
  renderableRow = rowIndexMapper.getRenderableFromVisualIndex(rowIndexMapper.getNearestNotHiddenIndex(visualRow, -1));
549
632
  }
@@ -571,9 +654,9 @@ export class Comments extends BasePlugin {
571
654
  }, true);
572
655
  const commentStyle = this.getCommentMeta(visualRow, visualColumn, META_STYLE);
573
656
  if (commentStyle) {
574
- _classPrivateFieldGet(_editor, this).setSize(commentStyle.width, commentStyle.height);
657
+ _classPrivateFieldGet(this, _editor).setSize(commentStyle.width, commentStyle.height);
575
658
  } else {
576
- _classPrivateFieldGet(_editor, this).resetSize();
659
+ _classPrivateFieldGet(this, _editor).resetSize();
577
660
  }
578
661
  const lastColWidth = isBeforeRenderedColumns ? 0 : wtTable.getStretchedColumnWidth(renderableColumn);
579
662
  const lastRowHeight = targetingPreviousRow && !isBeforeRenderedRows ? outerHeight(TD) : 0;
@@ -586,7 +669,7 @@ export class Comments extends BasePlugin {
586
669
  const {
587
670
  width: editorWidth,
588
671
  height: editorHeight
589
- } = _classPrivateFieldGet(_editor, this).getSize();
672
+ } = _classPrivateFieldGet(this, _editor).getSize();
590
673
  const {
591
674
  innerWidth,
592
675
  innerHeight
@@ -607,15 +690,15 @@ export class Comments extends BasePlugin {
607
690
  if (top + editorHeight > innerHeight) {
608
691
  y -= editorHeight - cellHeight + 1;
609
692
  }
610
- _classPrivateFieldGet(_editor, this).setPosition(x, y);
611
- _classPrivateFieldGet(_editor, this).setReadOnlyState(this.getCommentMeta(visualRow, visualColumn, META_READONLY));
693
+ _classPrivateFieldGet(this, _editor).setPosition(x, y);
694
+ _classPrivateFieldGet(this, _editor).setReadOnlyState(this.getCommentMeta(visualRow, visualColumn, META_READONLY));
612
695
  }
613
696
 
614
697
  /**
615
698
  * Focuses the comments editor element.
616
699
  */
617
700
  focusEditor() {
618
- _classPrivateFieldGet(_editor, this).focus();
701
+ _classPrivateFieldGet(this, _editor).focus();
619
702
  }
620
703
 
621
704
  /**
@@ -684,27 +767,27 @@ export class Comments extends BasePlugin {
684
767
  * @returns {HTMLTextAreaElement}
685
768
  */
686
769
  getEditorInputElement() {
687
- return _classPrivateFieldGet(_editor, this).getInputElement();
770
+ return _classPrivateFieldGet(this, _editor).getInputElement();
688
771
  }
689
772
 
690
773
  /**
691
774
  * Destroys the plugin instance.
692
775
  */
693
776
  destroy() {
694
- if (_classPrivateFieldGet(_editor, this)) {
695
- _classPrivateFieldGet(_editor, this).destroy();
777
+ if (_classPrivateFieldGet(this, _editor)) {
778
+ _classPrivateFieldGet(this, _editor).destroy();
696
779
  }
697
- if (_classPrivateFieldGet(_displaySwitch, this)) {
698
- _classPrivateFieldGet(_displaySwitch, this).destroy();
780
+ if (_classPrivateFieldGet(this, _displaySwitch)) {
781
+ _classPrivateFieldGet(this, _displaySwitch).destroy();
699
782
  }
700
783
  super.destroy();
701
784
  }
702
785
  }
703
- function _onMouseDown(event) {
786
+ function _onMouseDown2(event) {
704
787
  if (!this.hot.view || !this.hot.view._wt) {
705
788
  return;
706
789
  }
707
- if (!_classPrivateFieldGet(_preventEditorAutoSwitch, this) && !this.targetIsCommentTextArea(event)) {
790
+ if (!_classPrivateFieldGet(this, _preventEditorAutoSwitch) && !this.targetIsCommentTextArea(event)) {
708
791
  const eventCell = closest(event.target, 'TD', 'TBODY');
709
792
  let coordinates = null;
710
793
  if (eventCell) {
@@ -715,81 +798,49 @@ function _onMouseDown(event) {
715
798
  }
716
799
  }
717
800
  }
718
- /**
719
- * `mouseover` event callback.
720
- *
721
- * @param {MouseEvent} event The `mouseover` event.
722
- */
723
- function _onMouseOver(event) {
801
+ function _onMouseOver2(event) {
724
802
  const {
725
803
  rootDocument
726
804
  } = this.hot;
727
- if (_classPrivateFieldGet(_preventEditorAutoSwitch, this) || _classPrivateFieldGet(_editor, this).isFocused() || hasClass(event.target, 'wtBorder') || _classPrivateFieldGet(_cellBelowCursor, this) === event.target || !_classPrivateFieldGet(_editor, this)) {
805
+ if (_classPrivateFieldGet(this, _preventEditorAutoSwitch) || _classPrivateFieldGet(this, _editor).isFocused() || hasClass(event.target, 'wtBorder') || _classPrivateFieldGet(this, _cellBelowCursor) === event.target || !_classPrivateFieldGet(this, _editor)) {
728
806
  return;
729
807
  }
730
- _classPrivateFieldSet(_cellBelowCursor, this, rootDocument.elementFromPoint(event.clientX, event.clientY));
808
+ _classPrivateFieldSet(this, _cellBelowCursor, rootDocument.elementFromPoint(event.clientX, event.clientY));
731
809
  if (this.targetIsCellWithComment(event)) {
732
810
  const range = this.hot._createCellRange(this.hot.getCoords(event.target));
733
- _classPrivateFieldGet(_displaySwitch, this).show(range);
811
+ _classPrivateFieldGet(this, _displaySwitch).show(range);
734
812
  } else if (isChildOf(event.target, rootDocument) && !this.targetIsCommentTextArea(event)) {
735
- _classPrivateFieldGet(_displaySwitch, this).hide();
813
+ _classPrivateFieldGet(this, _displaySwitch).hide();
736
814
  }
737
815
  }
738
- /**
739
- * `mouseup` event callback.
740
- */
741
- function _onMouseUp() {
742
- _classPrivateFieldSet(_preventEditorAutoSwitch, this, false);
816
+ function _onMouseUp2() {
817
+ _classPrivateFieldSet(this, _preventEditorAutoSwitch, false);
743
818
  }
744
- /**
745
- * The `afterRenderer` hook callback.
746
- *
747
- * @param {HTMLTableCellElement} TD The rendered `TD` element.
748
- * @param {object} cellProperties The rendered cell's property object.
749
- */
750
- function _onAfterRenderer(TD, cellProperties) {
819
+ function _onAfterRenderer2(TD, cellProperties) {
751
820
  if (cellProperties[META_COMMENT] && cellProperties[META_COMMENT][META_COMMENT_VALUE]) {
752
821
  addClass(TD, cellProperties.commentedCellClassName);
753
822
  }
754
823
  }
755
- /**
756
- * Hook observer the "blur" event from the comments editor element. The hook clears the
757
- * editor content and gives back the keyboard shortcuts control by switching to the "grid" context.
758
- */
759
- function _onEditorBlur() {
760
- _classPrivateFieldSet(_commentValueBeforeSave, this, '');
824
+ function _onEditorBlur2() {
825
+ _classPrivateFieldSet(this, _commentValueBeforeSave, '');
761
826
  this.hot.getShortcutManager().setActiveContextName('grid');
762
827
  this.setComment();
763
828
  }
764
- /**
765
- * Hook observer the "focus" event from the comments editor element. The hook takes the control of
766
- * the keyboard shortcuts by switching the context to plugins one.
767
- */
768
- function _onEditorFocus() {
769
- _classPrivateFieldSet(_commentValueBeforeSave, this, this.getComment());
829
+ function _onEditorFocus2() {
830
+ _classPrivateFieldSet(this, _commentValueBeforeSave, this.getComment());
770
831
  this.hot.listen();
771
832
  this.hot.getShortcutManager().setActiveContextName(SHORTCUTS_CONTEXT_NAME);
772
833
  }
773
- /**
774
- * `mousedown` hook. Along with `onEditorMouseUp` used to simulate the textarea resizing event.
775
- *
776
- * @param {MouseEvent} event The `mousedown` event.
777
- */
778
- function _onEditorMouseDown(event) {
779
- _classPrivateFieldSet(_tempEditorDimensions, this, {
834
+ function _onEditorMouseDown2(event) {
835
+ _classPrivateFieldSet(this, _tempEditorDimensions, {
780
836
  width: outerWidth(event.target),
781
837
  height: outerHeight(event.target)
782
838
  });
783
839
  }
784
- /**
785
- * `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.
786
- *
787
- * @param {MouseEvent} event The `mouseup` event.
788
- */
789
- function _onEditorMouseUp(event) {
840
+ function _onEditorMouseUp2(event) {
790
841
  const currentWidth = outerWidth(event.target);
791
842
  const currentHeight = outerHeight(event.target);
792
- if (currentWidth !== _classPrivateFieldGet(_tempEditorDimensions, this).width + 1 || currentHeight !== _classPrivateFieldGet(_tempEditorDimensions, this).height + 2) {
843
+ if (currentWidth !== _classPrivateFieldGet(this, _tempEditorDimensions).width + 1 || currentHeight !== _classPrivateFieldGet(this, _tempEditorDimensions).height + 2) {
793
844
  this.updateCommentMeta(this.range.from.row, this.range.from.col, {
794
845
  [META_STYLE]: {
795
846
  width: currentWidth,
@@ -798,22 +849,13 @@ function _onEditorMouseUp(event) {
798
849
  });
799
850
  }
800
851
  }
801
- /**
802
- * Observes the pressed keys and if there is already opened the comment editor prevents open
803
- * the table editor into the fast edit mode.
804
- *
805
- * @param {Event} event The keydown event.
806
- */
807
- function _onAfterDocumentKeyDown(event) {
808
- if (_classPrivateFieldGet(_editor, this).isVisible()) {
852
+ function _onAfterDocumentKeyDown2(event) {
853
+ if (_classPrivateFieldGet(this, _editor).isVisible()) {
809
854
  stopImmediatePropagation(event);
810
855
  }
811
856
  }
812
- /**
813
- * Observes the changes in the scroll position if triggered it hides the comment editor.
814
- */
815
- function _onAfterScroll() {
816
- if (!_classPrivateFieldGet(_preventEditorHiding, this)) {
857
+ function _onAfterScroll2() {
858
+ if (!_classPrivateFieldGet(this, _preventEditorHiding)) {
817
859
  this.hide();
818
860
  }
819
861
  }
@@ -18,7 +18,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
18
18
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
19
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
20
20
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
- 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"); }
21
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
22
22
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'contextMenu';
23
23
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 70;
24
24
  const SHORTCUTS_GROUP = PLUGIN_KEY;
@@ -52,16 +52,31 @@ _pluginHooks.default.getSingleton().register('afterContextMenuExecute');
52
52
  *
53
53
  * @plugin ContextMenu
54
54
  */
55
- var _ContextMenu_brand = /*#__PURE__*/new WeakSet();
55
+ var _onAfterOnCellContextMenu = /*#__PURE__*/new WeakSet();
56
+ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
57
+ var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
58
+ var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
56
59
  class ContextMenu extends _base.BasePlugin {
57
60
  constructor() {
58
61
  super(...arguments);
62
+ /**
63
+ * On menu after close listener.
64
+ */
65
+ _classPrivateMethodInitSpec(this, _onMenuAfterClose);
66
+ /**
67
+ * On menu after open listener.
68
+ */
69
+ _classPrivateMethodInitSpec(this, _onMenuAfterOpen);
70
+ /**
71
+ * On menu before open listener.
72
+ */
73
+ _classPrivateMethodInitSpec(this, _onMenuBeforeOpen);
59
74
  /**
60
75
  * On contextmenu listener.
61
76
  *
62
77
  * @param {Event} event The mouse event object.
63
78
  */
64
- _classPrivateMethodInitSpec(this, _ContextMenu_brand);
79
+ _classPrivateMethodInitSpec(this, _onAfterOnCellContextMenu);
65
80
  /**
66
81
  * Instance of {@link CommandExecutor}.
67
82
  *
@@ -129,16 +144,16 @@ class ContextMenu extends _base.BasePlugin {
129
144
  keepInViewport: true,
130
145
  container: settings.uiContainer || this.hot.rootDocument.body
131
146
  });
132
- this.menu.addLocalHook('beforeOpen', () => _assertClassBrand(_ContextMenu_brand, this, _onMenuBeforeOpen).call(this));
133
- this.menu.addLocalHook('afterOpen', () => _assertClassBrand(_ContextMenu_brand, this, _onMenuAfterOpen).call(this));
134
- this.menu.addLocalHook('afterClose', () => _assertClassBrand(_ContextMenu_brand, this, _onMenuAfterClose).call(this));
147
+ this.menu.addLocalHook('beforeOpen', () => _classPrivateMethodGet(this, _onMenuBeforeOpen, _onMenuBeforeOpen2).call(this));
148
+ this.menu.addLocalHook('afterOpen', () => _classPrivateMethodGet(this, _onMenuAfterOpen, _onMenuAfterOpen2).call(this));
149
+ this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
135
150
  this.menu.addLocalHook('executeCommand', function () {
136
151
  for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
137
152
  params[_key] = arguments[_key];
138
153
  }
139
154
  return _this.executeCommand.call(_this, ...params);
140
155
  });
141
- this.addHook('afterOnCellContextMenu', event => _assertClassBrand(_ContextMenu_brand, this, _onAfterOnCellContextMenu).call(this, event));
156
+ this.addHook('afterOnCellContextMenu', event => _classPrivateMethodGet(this, _onAfterOnCellContextMenu, _onAfterOnCellContextMenu2).call(this, event));
142
157
  this.registerShortcuts();
143
158
  super.enablePlugin();
144
159
  }
@@ -326,7 +341,7 @@ class ContextMenu extends _base.BasePlugin {
326
341
  }
327
342
  }
328
343
  exports.ContextMenu = ContextMenu;
329
- function _onAfterOnCellContextMenu(event) {
344
+ function _onAfterOnCellContextMenu2(event) {
330
345
  const settings = this.hot.getSettings();
331
346
  const showRowHeaders = settings.rowHeaders;
332
347
  const showColHeaders = settings.colHeaders;
@@ -357,22 +372,13 @@ function _onAfterOnCellContextMenu(event) {
357
372
  left: event.clientX + offset.left
358
373
  });
359
374
  }
360
- /**
361
- * On menu before open listener.
362
- */
363
- function _onMenuBeforeOpen() {
375
+ function _onMenuBeforeOpen2() {
364
376
  this.hot.runHooks('beforeContextMenuShow', this);
365
377
  }
366
- /**
367
- * On menu after open listener.
368
- */
369
- function _onMenuAfterOpen() {
378
+ function _onMenuAfterOpen2() {
370
379
  this.hot.runHooks('afterContextMenuShow', this);
371
380
  }
372
- /**
373
- * On menu after close listener.
374
- */
375
- function _onMenuAfterClose() {
381
+ function _onMenuAfterClose2() {
376
382
  this.hot.listen();
377
383
  this.hot.runHooks('afterContextMenuHide', this);
378
384
  }