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
@@ -1,11 +1,11 @@
1
- import "core-js/modules/es.error.cause.js";
2
1
  import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/es.error.cause.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
5
5
  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; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
7
  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); }
8
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
8
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
9
9
  import { BasePlugin } from "../base/index.mjs";
10
10
  import Hooks from "../../pluginHooks.mjs";
11
11
  import { offset, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
@@ -35,16 +35,40 @@ const INTERVAL_FOR_ADDING_ROW = 200;
35
35
  * @class Autofill
36
36
  * @plugin Autofill
37
37
  */
38
- var _Autofill_brand = /*#__PURE__*/new WeakSet();
38
+ var _onCellCornerDblClick = /*#__PURE__*/new WeakSet();
39
+ var _onAfterCellCornerMouseDown = /*#__PURE__*/new WeakSet();
40
+ var _onBeforeCellMouseOver = /*#__PURE__*/new WeakSet();
41
+ var _onMouseUp = /*#__PURE__*/new WeakSet();
42
+ var _onMouseMove = /*#__PURE__*/new WeakSet();
39
43
  export class Autofill extends BasePlugin {
40
44
  constructor() {
41
45
  super(...arguments);
46
+ /**
47
+ * On mouse move listener.
48
+ *
49
+ * @param {MouseEvent} event `mousemove` event properties.
50
+ */
51
+ _classPrivateMethodInitSpec(this, _onMouseMove);
52
+ /**
53
+ * On mouse up listener.
54
+ */
55
+ _classPrivateMethodInitSpec(this, _onMouseUp);
56
+ /**
57
+ * On before cell mouse over listener.
58
+ *
59
+ * @param {CellCoords} coords `CellCoords` coord object.
60
+ */
61
+ _classPrivateMethodInitSpec(this, _onBeforeCellMouseOver);
62
+ /**
63
+ * On after cell corner mouse down listener.
64
+ */
65
+ _classPrivateMethodInitSpec(this, _onAfterCellCornerMouseDown);
42
66
  /**
43
67
  * On cell corner double click callback.
44
68
  *
45
69
  * @private
46
70
  */
47
- _classPrivateMethodInitSpec(this, _Autofill_brand);
71
+ _classPrivateMethodInitSpec(this, _onCellCornerDblClick);
48
72
  /**
49
73
  * Specifies if adding new row started.
50
74
  *
@@ -115,9 +139,9 @@ export class Autofill extends BasePlugin {
115
139
  }
116
140
  this.mapSettings();
117
141
  this.registerEvents();
118
- this.addHook('afterOnCellCornerMouseDown', event => _assertClassBrand(_Autofill_brand, this, _onAfterCellCornerMouseDown).call(this, event));
119
- this.addHook('afterOnCellCornerDblClick', event => _assertClassBrand(_Autofill_brand, this, _onCellCornerDblClick).call(this, event));
120
- this.addHook('beforeOnCellMouseOver', (_, coords) => _assertClassBrand(_Autofill_brand, this, _onBeforeCellMouseOver).call(this, coords));
142
+ this.addHook('afterOnCellCornerMouseDown', event => _classPrivateMethodGet(this, _onAfterCellCornerMouseDown, _onAfterCellCornerMouseDown2).call(this, event));
143
+ this.addHook('afterOnCellCornerDblClick', event => _classPrivateMethodGet(this, _onCellCornerDblClick, _onCellCornerDblClick2).call(this, event));
144
+ this.addHook('beforeOnCellMouseOver', (_, coords) => _classPrivateMethodGet(this, _onBeforeCellMouseOver, _onBeforeCellMouseOver2).call(this, coords));
121
145
  super.enablePlugin();
122
146
  }
123
147
 
@@ -461,8 +485,8 @@ export class Autofill extends BasePlugin {
461
485
  const {
462
486
  documentElement
463
487
  } = this.hot.rootDocument;
464
- this.eventManager.addEventListener(documentElement, 'mouseup', () => _assertClassBrand(_Autofill_brand, this, _onMouseUp).call(this));
465
- this.eventManager.addEventListener(documentElement, 'mousemove', event => _assertClassBrand(_Autofill_brand, this, _onMouseMove).call(this, event));
488
+ this.eventManager.addEventListener(documentElement, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
489
+ this.eventManager.addEventListener(documentElement, 'mousemove', event => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, event));
466
490
  }
467
491
  /**
468
492
  * Clears mapped settings.
@@ -492,35 +516,24 @@ export class Autofill extends BasePlugin {
492
516
  super.destroy();
493
517
  }
494
518
  }
495
- function _onCellCornerDblClick() {
519
+ function _onCellCornerDblClick2() {
496
520
  const selectionApplied = this.selectAdjacent();
497
521
  if (selectionApplied) {
498
522
  this.fillIn();
499
523
  }
500
524
  }
501
- /**
502
- * On after cell corner mouse down listener.
503
- */
504
- function _onAfterCellCornerMouseDown() {
525
+ function _onAfterCellCornerMouseDown2() {
505
526
  this.handleDraggedCells = 1;
506
527
  this.mouseDownOnCellCorner = true;
507
528
  }
508
- /**
509
- * On before cell mouse over listener.
510
- *
511
- * @param {CellCoords} coords `CellCoords` coord object.
512
- */
513
- function _onBeforeCellMouseOver(coords) {
529
+ function _onBeforeCellMouseOver2(coords) {
514
530
  if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) {
515
531
  this.handleDraggedCells += 1;
516
532
  this.showBorder(coords);
517
533
  this.addNewRowIfNeeded();
518
534
  }
519
535
  }
520
- /**
521
- * On mouse up listener.
522
- */
523
- function _onMouseUp() {
536
+ function _onMouseUp2() {
524
537
  if (this.handleDraggedCells) {
525
538
  if (this.handleDraggedCells > 1) {
526
539
  this.fillIn();
@@ -529,12 +542,7 @@ function _onMouseUp() {
529
542
  this.mouseDownOnCellCorner = false;
530
543
  }
531
544
  }
532
- /**
533
- * On mouse move listener.
534
- *
535
- * @param {MouseEvent} event `mousemove` event properties.
536
- */
537
- function _onMouseMove(event) {
545
+ function _onMouseMove2(event) {
538
546
  const mouseWasDraggedOutside = this.getIfMouseWasDraggedOutside(event);
539
547
  if (this.addingStarted === false && this.handleDraggedCells > 0 && mouseWasDraggedOutside) {
540
548
  this.mouseDragOutside = true;
@@ -18,8 +18,10 @@ 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 _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
22
- 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
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
23
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
24
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
23
25
  const DEPS_TYPE_CHECKERS = new Map([['plugin', _registry.hasPlugin], ['cell-type', _registry2.hasCellType], ['editor', _registry3.hasEditor], ['renderer', _registry4.hasRenderer], ['validator', _registry5.hasValidator]]);
24
26
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'base';
25
27
  const missingDepsMsgs = [];
@@ -30,7 +32,7 @@ let initializedPlugins = null;
30
32
  * @property {Core} hot Handsontable instance.
31
33
  */
32
34
  var _hooks = /*#__PURE__*/new WeakMap();
33
- var _BasePlugin_brand = /*#__PURE__*/new WeakSet();
35
+ var _isRelevantToSettings = /*#__PURE__*/new WeakSet();
34
36
  class BasePlugin {
35
37
  static get PLUGIN_KEY() {
36
38
  return PLUGIN_KEY;
@@ -68,7 +70,7 @@ class BasePlugin {
68
70
  * @param {Handsontable.DefaultSettings} settings The config object passed to `updateSettings`.
69
71
  * @returns {boolean}
70
72
  */
71
- _classPrivateMethodInitSpec(this, _BasePlugin_brand);
73
+ _classPrivateMethodInitSpec(this, _isRelevantToSettings);
72
74
  _defineProperty(this, "eventManager", new _eventManager.default(this));
73
75
  /**
74
76
  * @type {string}
@@ -93,7 +95,10 @@ class BasePlugin {
93
95
  /**
94
96
  * Collection of the reference to the plugins hooks.
95
97
  */
96
- _classPrivateFieldInitSpec(this, _hooks, {});
98
+ _classPrivateFieldInitSpec(this, _hooks, {
99
+ writable: true,
100
+ value: {}
101
+ });
97
102
  /**
98
103
  * Handsontable instance.
99
104
  *
@@ -180,11 +185,11 @@ class BasePlugin {
180
185
  * @param {Function} callback The listener function to add.
181
186
  */
182
187
  addHook(name, callback) {
183
- _classPrivateFieldGet(_hooks, this)[name] = _classPrivateFieldGet(_hooks, this)[name] || [];
184
- const hooks = _classPrivateFieldGet(_hooks, this)[name];
188
+ _classPrivateFieldGet(this, _hooks)[name] = _classPrivateFieldGet(this, _hooks)[name] || [];
189
+ const hooks = _classPrivateFieldGet(this, _hooks)[name];
185
190
  this.hot.addHook(name, callback);
186
191
  hooks.push(callback);
187
- _classPrivateFieldGet(_hooks, this)[name] = hooks;
192
+ _classPrivateFieldGet(this, _hooks)[name] = hooks;
188
193
  }
189
194
 
190
195
  /**
@@ -193,7 +198,7 @@ class BasePlugin {
193
198
  * @param {string} name The hook name.
194
199
  */
195
200
  removeHooks(name) {
196
- (0, _array.arrayEach)(_classPrivateFieldGet(_hooks, this)[name] || [], callback => {
201
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _hooks)[name] || [], callback => {
197
202
  this.hot.removeHook(name, callback);
198
203
  });
199
204
  }
@@ -202,7 +207,7 @@ class BasePlugin {
202
207
  * Clear all hooks.
203
208
  */
204
209
  clearHooks() {
205
- const hooks = _classPrivateFieldGet(_hooks, this);
210
+ const hooks = _classPrivateFieldGet(this, _hooks);
206
211
  (0, _object.objectEach)(hooks, (callbacks, name) => this.removeHooks(name));
207
212
  hooks.length = 0;
208
213
  }
@@ -237,7 +242,7 @@ class BasePlugin {
237
242
  * @param {object} newSettings New set of settings passed to the `updateSettings` method.
238
243
  */
239
244
  onUpdateSettings(newSettings) {
240
- const relevantToSettings = _assertClassBrand(_BasePlugin_brand, this, _isRelevantToSettings).call(this, newSettings);
245
+ const relevantToSettings = _classPrivateMethodGet(this, _isRelevantToSettings, _isRelevantToSettings2).call(this, newSettings);
241
246
  if (this.isEnabled) {
242
247
  if (this.enabled && !this.isEnabled()) {
243
248
  this.disablePlugin();
@@ -275,7 +280,7 @@ class BasePlugin {
275
280
  }
276
281
  }
277
282
  exports.BasePlugin = BasePlugin;
278
- function _isRelevantToSettings(settings) {
283
+ function _isRelevantToSettings2(settings) {
279
284
  if (!settings) {
280
285
  return false;
281
286
  }
@@ -6,8 +6,10 @@ 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 _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
10
- 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 _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
11
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
12
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
11
13
  import { defineGetter, objectEach } from "../../helpers/object.mjs";
12
14
  import { arrayEach } from "../../helpers/array.mjs";
13
15
  import { getPluginsNames, hasPlugin } from "../registry.mjs";
@@ -26,7 +28,7 @@ let initializedPlugins = null;
26
28
  * @property {Core} hot Handsontable instance.
27
29
  */
28
30
  var _hooks = /*#__PURE__*/new WeakMap();
29
- var _BasePlugin_brand = /*#__PURE__*/new WeakSet();
31
+ var _isRelevantToSettings = /*#__PURE__*/new WeakSet();
30
32
  export class BasePlugin {
31
33
  static get PLUGIN_KEY() {
32
34
  return PLUGIN_KEY;
@@ -64,7 +66,7 @@ export class BasePlugin {
64
66
  * @param {Handsontable.DefaultSettings} settings The config object passed to `updateSettings`.
65
67
  * @returns {boolean}
66
68
  */
67
- _classPrivateMethodInitSpec(this, _BasePlugin_brand);
69
+ _classPrivateMethodInitSpec(this, _isRelevantToSettings);
68
70
  _defineProperty(this, "eventManager", new EventManager(this));
69
71
  /**
70
72
  * @type {string}
@@ -89,7 +91,10 @@ export class BasePlugin {
89
91
  /**
90
92
  * Collection of the reference to the plugins hooks.
91
93
  */
92
- _classPrivateFieldInitSpec(this, _hooks, {});
94
+ _classPrivateFieldInitSpec(this, _hooks, {
95
+ writable: true,
96
+ value: {}
97
+ });
93
98
  /**
94
99
  * Handsontable instance.
95
100
  *
@@ -176,11 +181,11 @@ export class BasePlugin {
176
181
  * @param {Function} callback The listener function to add.
177
182
  */
178
183
  addHook(name, callback) {
179
- _classPrivateFieldGet(_hooks, this)[name] = _classPrivateFieldGet(_hooks, this)[name] || [];
180
- const hooks = _classPrivateFieldGet(_hooks, this)[name];
184
+ _classPrivateFieldGet(this, _hooks)[name] = _classPrivateFieldGet(this, _hooks)[name] || [];
185
+ const hooks = _classPrivateFieldGet(this, _hooks)[name];
181
186
  this.hot.addHook(name, callback);
182
187
  hooks.push(callback);
183
- _classPrivateFieldGet(_hooks, this)[name] = hooks;
188
+ _classPrivateFieldGet(this, _hooks)[name] = hooks;
184
189
  }
185
190
 
186
191
  /**
@@ -189,7 +194,7 @@ export class BasePlugin {
189
194
  * @param {string} name The hook name.
190
195
  */
191
196
  removeHooks(name) {
192
- arrayEach(_classPrivateFieldGet(_hooks, this)[name] || [], callback => {
197
+ arrayEach(_classPrivateFieldGet(this, _hooks)[name] || [], callback => {
193
198
  this.hot.removeHook(name, callback);
194
199
  });
195
200
  }
@@ -198,7 +203,7 @@ export class BasePlugin {
198
203
  * Clear all hooks.
199
204
  */
200
205
  clearHooks() {
201
- const hooks = _classPrivateFieldGet(_hooks, this);
206
+ const hooks = _classPrivateFieldGet(this, _hooks);
202
207
  objectEach(hooks, (callbacks, name) => this.removeHooks(name));
203
208
  hooks.length = 0;
204
209
  }
@@ -233,7 +238,7 @@ export class BasePlugin {
233
238
  * @param {object} newSettings New set of settings passed to the `updateSettings` method.
234
239
  */
235
240
  onUpdateSettings(newSettings) {
236
- const relevantToSettings = _assertClassBrand(_BasePlugin_brand, this, _isRelevantToSettings).call(this, newSettings);
241
+ const relevantToSettings = _classPrivateMethodGet(this, _isRelevantToSettings, _isRelevantToSettings2).call(this, newSettings);
237
242
  if (this.isEnabled) {
238
243
  if (this.enabled && !this.isEnabled()) {
239
244
  this.disablePlugin();
@@ -270,7 +275,7 @@ export class BasePlugin {
270
275
  delete this.hot;
271
276
  }
272
277
  }
273
- function _isRelevantToSettings(settings) {
278
+ function _isRelevantToSettings2(settings) {
274
279
  if (!settings) {
275
280
  return false;
276
281
  }
@@ -11,7 +11,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
11
11
  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; }
12
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
13
13
  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); }
14
- 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
15
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'bindRowsWithHeaders';
16
16
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 210;
17
17
  const DEFAULT_BIND = 'loose';
@@ -49,7 +49,7 @@ const bindTypeToMapStrategy = new Map([['loose', _looseBindsMap.default], ['stri
49
49
  * ```
50
50
  * :::
51
51
  */
52
- var _BindRowsWithHeaders_brand = /*#__PURE__*/new WeakSet();
52
+ var _onModifyRowHeader = /*#__PURE__*/new WeakSet();
53
53
  class BindRowsWithHeaders extends _base.BasePlugin {
54
54
  constructor() {
55
55
  super(...arguments);
@@ -59,7 +59,7 @@ class BindRowsWithHeaders extends _base.BasePlugin {
59
59
  * @param {number} row Row index.
60
60
  * @returns {number}
61
61
  */
62
- _classPrivateMethodInitSpec(this, _BindRowsWithHeaders_brand);
62
+ _classPrivateMethodInitSpec(this, _onModifyRowHeader);
63
63
  /**
64
64
  * Plugin indexes cache.
65
65
  *
@@ -97,7 +97,7 @@ class BindRowsWithHeaders extends _base.BasePlugin {
97
97
  }
98
98
  const MapStrategy = bindTypeToMapStrategy.get(bindType);
99
99
  this.headerIndexes = this.hot.rowIndexMapper.registerMap('bindRowsWithHeaders', new MapStrategy());
100
- this.addHook('modifyRowHeader', row => _assertClassBrand(_BindRowsWithHeaders_brand, this, _onModifyRowHeader).call(this, row));
100
+ this.addHook('modifyRowHeader', row => _classPrivateMethodGet(this, _onModifyRowHeader, _onModifyRowHeader2).call(this, row));
101
101
  super.enablePlugin();
102
102
  }
103
103
 
@@ -116,6 +116,6 @@ class BindRowsWithHeaders extends _base.BasePlugin {
116
116
  }
117
117
  }
118
118
  exports.BindRowsWithHeaders = BindRowsWithHeaders;
119
- function _onModifyRowHeader(row) {
119
+ function _onModifyRowHeader2(row) {
120
120
  return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(row));
121
121
  }
@@ -4,7 +4,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
4
4
  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; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
6
6
  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); }
7
- 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"); }
7
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
8
8
  import { BasePlugin } from "../base/index.mjs";
9
9
  import LooseBindsMap from "./maps/looseBindsMap.mjs";
10
10
  import StrictBindsMap from "./maps/strictBindsMap.mjs";
@@ -45,7 +45,7 @@ const bindTypeToMapStrategy = new Map([['loose', LooseBindsMap], ['strict', Stri
45
45
  * ```
46
46
  * :::
47
47
  */
48
- var _BindRowsWithHeaders_brand = /*#__PURE__*/new WeakSet();
48
+ var _onModifyRowHeader = /*#__PURE__*/new WeakSet();
49
49
  export class BindRowsWithHeaders extends BasePlugin {
50
50
  constructor() {
51
51
  super(...arguments);
@@ -55,7 +55,7 @@ export class BindRowsWithHeaders extends BasePlugin {
55
55
  * @param {number} row Row index.
56
56
  * @returns {number}
57
57
  */
58
- _classPrivateMethodInitSpec(this, _BindRowsWithHeaders_brand);
58
+ _classPrivateMethodInitSpec(this, _onModifyRowHeader);
59
59
  /**
60
60
  * Plugin indexes cache.
61
61
  *
@@ -93,7 +93,7 @@ export class BindRowsWithHeaders extends BasePlugin {
93
93
  }
94
94
  const MapStrategy = bindTypeToMapStrategy.get(bindType);
95
95
  this.headerIndexes = this.hot.rowIndexMapper.registerMap('bindRowsWithHeaders', new MapStrategy());
96
- this.addHook('modifyRowHeader', row => _assertClassBrand(_BindRowsWithHeaders_brand, this, _onModifyRowHeader).call(this, row));
96
+ this.addHook('modifyRowHeader', row => _classPrivateMethodGet(this, _onModifyRowHeader, _onModifyRowHeader2).call(this, row));
97
97
  super.enablePlugin();
98
98
  }
99
99
 
@@ -111,6 +111,6 @@ export class BindRowsWithHeaders extends BasePlugin {
111
111
  super.destroy();
112
112
  }
113
113
  }
114
- function _onModifyRowHeader(row) {
114
+ function _onModifyRowHeader2(row) {
115
115
  return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(row));
116
116
  }
@@ -9,7 +9,6 @@ var _number = require("../../helpers/number");
9
9
  var _console = require("../../helpers/console");
10
10
  var _element = require("../../helpers/dom/element");
11
11
  var _event = require("../../helpers/dom/event");
12
- var _shortcutContexts = require("../../shortcutContexts");
13
12
  var _a11y = require("../../helpers/a11y");
14
13
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
15
14
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
@@ -17,9 +16,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
17
16
  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; }
18
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
19
18
  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); }
20
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
21
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
22
- 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"); }
19
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
20
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
21
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
22
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
23
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
24
+ 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; } }
23
25
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'collapsibleColumns';
24
26
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 290;
25
27
  const SETTING_KEYS = ['nestedHeaders'];
@@ -107,10 +109,32 @@ const actionDictionary = new Map([['collapse', {
107
109
  * :::
108
110
  */
109
111
  var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
110
- var _CollapsibleColumns_brand = /*#__PURE__*/new WeakSet();
112
+ var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
113
+ var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
114
+ var _onInit = /*#__PURE__*/new WeakSet();
115
+ var _onAfterLoadData = /*#__PURE__*/new WeakSet();
111
116
  class CollapsibleColumns extends _base.BasePlugin {
112
117
  constructor() {
113
118
  super(...arguments);
119
+ /**
120
+ * Updates the plugin state after new dataset load.
121
+ *
122
+ * @param {Array[]} sourceData Array of arrays or array of objects containing data.
123
+ * @param {boolean} initialLoad Flag that determines whether the data has been loaded
124
+ * during the initialization.
125
+ */
126
+ _classPrivateMethodInitSpec(this, _onAfterLoadData);
127
+ /**
128
+ * Updates the plugin state after HoT initialization.
129
+ */
130
+ _classPrivateMethodInitSpec(this, _onInit);
131
+ /**
132
+ * Indicator mouse event callback.
133
+ *
134
+ * @param {object} event Mouse event.
135
+ * @param {object} coords Event coordinates.
136
+ */
137
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
114
138
  /**
115
139
  * Adds the indicator to the headers.
116
140
  *
@@ -119,7 +143,7 @@ class CollapsibleColumns extends _base.BasePlugin {
119
143
  * @param {number} headerLevel The index of header level counting from the top (positive
120
144
  * values counting from 0 to N).
121
145
  */
122
- _classPrivateMethodInitSpec(this, _CollapsibleColumns_brand);
146
+ _classPrivateMethodInitSpec(this, _onAfterGetColHeader);
123
147
  /**
124
148
  * Cached reference to the NestedHeaders plugin.
125
149
  *
@@ -140,7 +164,10 @@ class CollapsibleColumns extends _base.BasePlugin {
140
164
  * @private
141
165
  * @type {HidingMap|null}
142
166
  */
143
- _classPrivateFieldInitSpec(this, _collapsedColumnsMap, null);
167
+ _classPrivateFieldInitSpec(this, _collapsedColumnsMap, {
168
+ writable: true,
169
+ value: null
170
+ });
144
171
  }
145
172
  static get PLUGIN_KEY() {
146
173
  return PLUGIN_KEY;
@@ -178,23 +205,23 @@ class CollapsibleColumns extends _base.BasePlugin {
178
205
  if (!nestedHeaders) {
179
206
  (0, _console.warn)('You need to configure the Nested Headers plugin in order to use collapsible headers.');
180
207
  }
181
- _classPrivateFieldSet(_collapsedColumnsMap, this, this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName, 'hiding'));
208
+ _classPrivateFieldSet(this, _collapsedColumnsMap, this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName, 'hiding'));
182
209
  this.nestedHeadersPlugin = this.hot.getPlugin('nestedHeaders');
183
210
  this.headerStateManager = this.nestedHeadersPlugin.getStateManager();
184
- this.addHook('init', () => _assertClassBrand(_CollapsibleColumns_brand, this, _onInit).call(this));
211
+ this.addHook('init', () => _classPrivateMethodGet(this, _onInit, _onInit2).call(this));
185
212
  this.addHook('afterLoadData', function () {
186
213
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
187
214
  args[_key] = arguments[_key];
188
215
  }
189
- return _assertClassBrand(_CollapsibleColumns_brand, _this, _onAfterLoadData).call(_this, ...args);
216
+ return _classPrivateMethodGet(_this, _onAfterLoadData, _onAfterLoadData2).call(_this, ...args);
190
217
  });
191
218
  this.addHook('afterGetColHeader', function () {
192
219
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
193
220
  args[_key2] = arguments[_key2];
194
221
  }
195
- return _assertClassBrand(_CollapsibleColumns_brand, _this, _onAfterGetColHeader).call(_this, ...args);
222
+ return _classPrivateMethodGet(_this, _onAfterGetColHeader, _onAfterGetColHeader2).call(_this, ...args);
196
223
  });
197
- this.addHook('beforeOnCellMouseDown', (event, coords, TD) => _assertClassBrand(_CollapsibleColumns_brand, this, _onBeforeOnCellMouseDown).call(this, event, coords, TD));
224
+ this.addHook('beforeOnCellMouseDown', (event, coords, TD) => _classPrivateMethodGet(this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(this, event, coords, TD));
198
225
  this.registerShortcuts();
199
226
  super.enablePlugin();
200
227
  // @TODO: Workaround for broken plugin initialization abstraction (#6806).
@@ -241,7 +268,7 @@ class CollapsibleColumns extends _base.BasePlugin {
241
268
  */
242
269
  disablePlugin() {
243
270
  this.hot.columnIndexMapper.unregisterMap(this.pluginName);
244
- _classPrivateFieldSet(_collapsedColumnsMap, this, null);
271
+ _classPrivateFieldSet(this, _collapsedColumnsMap, null);
245
272
  this.nestedHeadersPlugin = null;
246
273
  this.unregisterShortcuts();
247
274
  this.clearButtons();
@@ -281,17 +308,12 @@ class CollapsibleColumns extends _base.BasePlugin {
281
308
  col: columnIndex
282
309
  });
283
310
  }
284
-
285
- // prevent default Enter behavior (move to the next row within a selection range)
286
- return false;
287
311
  },
288
312
  runOnlyIf: () => {
289
- var _this$hot$getSelected, _this$hot$getSelected2;
290
- return ((_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.isSingle()) && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight.isHeader());
313
+ var _this$hot$getSelected;
314
+ return (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isHeader();
291
315
  },
292
- group: SHORTCUTS_GROUP,
293
- relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
294
- position: 'before'
316
+ group: SHORTCUTS_GROUP
295
317
  });
296
318
  }
297
319
 
@@ -475,25 +497,10 @@ class CollapsibleColumns extends _base.BasePlugin {
475
497
  }
476
498
  this.hot.batchExecution(() => {
477
499
  (0, _array.arrayEach)(affectedColumnsIndexes, visualColumn => {
478
- _classPrivateFieldGet(_collapsedColumnsMap, this).setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);
500
+ _classPrivateFieldGet(this, _collapsedColumnsMap).setValueAtIndex(this.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);
479
501
  });
480
502
  }, true);
481
503
  const isActionPerformed = this.getCollapsedColumns().length !== currentCollapsedColumns.length;
482
- const selectionRange = this.hot.getSelectedRangeLast();
483
- if (action === 'collapse' && isActionPerformed && selectionRange) {
484
- const {
485
- row,
486
- col
487
- } = selectionRange.highlight;
488
- const isHidden = this.hot.rowIndexMapper.isHidden(row) || this.hot.columnIndexMapper.isHidden(col);
489
- if (isHidden && affectedColumnsIndexes.includes(col)) {
490
- const nextRow = row >= 0 ? this.hot.rowIndexMapper.getNearestNotHiddenIndex(row, 1, true) : row;
491
- const nextColumn = col >= 0 ? this.hot.columnIndexMapper.getNearestNotHiddenIndex(col, 1, true) : col;
492
- if (nextRow !== null && nextColumn !== null) {
493
- this.hot.selectCell(nextRow, nextColumn);
494
- }
495
- }
496
- }
497
504
  this.hot.runHooks(actionTranslator.afterHook, currentCollapsedColumns, destinationCollapsedColumns, isActionPossible, isActionPerformed);
498
505
  this.hot.render();
499
506
  this.hot.view.adjustElementsSize(true);
@@ -506,18 +513,18 @@ class CollapsibleColumns extends _base.BasePlugin {
506
513
  * @returns {number[]}
507
514
  */
508
515
  getCollapsedColumns() {
509
- return _classPrivateFieldGet(_collapsedColumnsMap, this).getHiddenIndexes();
516
+ return _classPrivateFieldGet(this, _collapsedColumnsMap).getHiddenIndexes();
510
517
  }
511
518
  /**
512
519
  * Destroys the plugin instance.
513
520
  */
514
521
  destroy() {
515
- _classPrivateFieldSet(_collapsedColumnsMap, this, null);
522
+ _classPrivateFieldSet(this, _collapsedColumnsMap, null);
516
523
  super.destroy();
517
524
  }
518
525
  }
519
526
  exports.CollapsibleColumns = CollapsibleColumns;
520
- function _onAfterGetColHeader(column, TH, headerLevel) {
527
+ function _onAfterGetColHeader2(column, TH, headerLevel) {
521
528
  var _this$headerStateMana3;
522
529
  const {
523
530
  collapsible,
@@ -560,13 +567,7 @@ function _onAfterGetColHeader(column, TH, headerLevel) {
560
567
  (_collapsibleElement = collapsibleElement) === null || _collapsibleElement === void 0 || _collapsibleElement.remove();
561
568
  }
562
569
  }
563
- /**
564
- * Indicator mouse event callback.
565
- *
566
- * @param {object} event Mouse event.
567
- * @param {object} coords Event coordinates.
568
- */
569
- function _onBeforeOnCellMouseDown(event, coords) {
570
+ function _onBeforeOnCellMouseDown2(event, coords) {
570
571
  if ((0, _element.hasClass)(event.target, COLLAPSIBLE_ELEMENT_CLASS)) {
571
572
  if ((0, _element.hasClass)(event.target, 'expanded')) {
572
573
  this.eventManager.fireEvent(event.target, 'mouseup');
@@ -578,21 +579,11 @@ function _onBeforeOnCellMouseDown(event, coords) {
578
579
  (0, _event.stopImmediatePropagation)(event);
579
580
  }
580
581
  }
581
- /**
582
- * Updates the plugin state after HoT initialization.
583
- */
584
- function _onInit() {
582
+ function _onInit2() {
585
583
  // @TODO: Workaround for broken plugin initialization abstraction (#6806).
586
584
  this.updatePlugin();
587
585
  }
588
- /**
589
- * Updates the plugin state after new dataset load.
590
- *
591
- * @param {Array[]} sourceData Array of arrays or array of objects containing data.
592
- * @param {boolean} initialLoad Flag that determines whether the data has been loaded
593
- * during the initialization.
594
- */
595
- function _onAfterLoadData(sourceData, initialLoad) {
586
+ function _onAfterLoadData2(sourceData, initialLoad) {
596
587
  if (!initialLoad) {
597
588
  this.updatePlugin();
598
589
  }