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
@@ -19,9 +19,12 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
19
  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
20
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
21
21
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
22
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
23
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
24
- 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"); }
22
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
23
+ 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; } }
24
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
25
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
26
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
27
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
25
28
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'nestedHeaders';
26
29
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 280;
27
30
 
@@ -74,40 +77,203 @@ var _stateManager = /*#__PURE__*/new WeakMap();
74
77
  var _hidingIndexMapObserver = /*#__PURE__*/new WeakMap();
75
78
  var _focusInitialCoords = /*#__PURE__*/new WeakMap();
76
79
  var _isColumnsSelectionInProgress = /*#__PURE__*/new WeakMap();
77
- var _NestedHeaders_brand = /*#__PURE__*/new WeakSet();
80
+ var _updateFocusHighlightPosition = /*#__PURE__*/new WeakSet();
81
+ var _onBeforeViewportScrollHorizontally = /*#__PURE__*/new WeakSet();
82
+ var _onBeforeHighlightingColumnHeader = /*#__PURE__*/new WeakSet();
83
+ var _onBeforeCopy = /*#__PURE__*/new WeakSet();
84
+ var _onBeforeOnCellMouseDown = /*#__PURE__*/new WeakSet();
85
+ var _onAfterOnCellMouseDown = /*#__PURE__*/new WeakSet();
86
+ var _onBeforeOnCellMouseOver = /*#__PURE__*/new WeakSet();
87
+ var _onBeforeOnCellMouseUp = /*#__PURE__*/new WeakSet();
88
+ var _onBeforeSelectionHighlightSet = /*#__PURE__*/new WeakSet();
89
+ var _onModifyTransformStart = /*#__PURE__*/new WeakSet();
90
+ var _onBeforeSelectColumns = /*#__PURE__*/new WeakSet();
91
+ var _onAfterGetColumnHeaderRenderers = /*#__PURE__*/new WeakSet();
92
+ var _onAfterViewportColumnCalculatorOverride = /*#__PURE__*/new WeakSet();
93
+ var _onModifyColWidth = /*#__PURE__*/new WeakSet();
94
+ var _onModifyColumnHeaderValue = /*#__PURE__*/new WeakSet();
95
+ var _onModifyFocusedElement = /*#__PURE__*/new WeakSet();
96
+ var _onInit = /*#__PURE__*/new WeakSet();
97
+ var _onAfterLoadData = /*#__PURE__*/new WeakSet();
78
98
  class NestedHeaders extends _base.BasePlugin {
79
99
  constructor() {
80
100
  super(...arguments);
101
+ /**
102
+ * Updates the plugin state after new dataset load.
103
+ *
104
+ * @param {Array[]} sourceData Array of arrays or array of objects containing data.
105
+ * @param {boolean} initialLoad Flag that determines whether the data has been loaded
106
+ * during the initialization.
107
+ */
108
+ _classPrivateMethodInitSpec(this, _onAfterLoadData);
109
+ /**
110
+ * Updates the plugin state after HoT initialization.
111
+ */
112
+ _classPrivateMethodInitSpec(this, _onInit);
113
+ /**
114
+ * `modifyFocusedElement` hook callback.
115
+ *
116
+ * @param {number} row Row index.
117
+ * @param {number} column Column index.
118
+ * @returns {HTMLTableCellElement} The `TH` element to be focused.
119
+ */
120
+ _classPrivateMethodInitSpec(this, _onModifyFocusedElement);
121
+ /**
122
+ * Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
123
+ * the internal state and settings of the plugin.
124
+ *
125
+ * @param {string} value The column header value.
126
+ * @param {number} visualColumnIndex The visual column index.
127
+ * @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
128
+ * and negative (-1 to -N) values. For positive values, 0 points to the
129
+ * top most header, and for negative direction, -1 points to the most bottom
130
+ * header (the header closest to the cells).
131
+ * @returns {string} Returns the column header value to update.
132
+ */
133
+ _classPrivateMethodInitSpec(this, _onModifyColumnHeaderValue);
134
+ /**
135
+ * `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
136
+ *
137
+ * @param {number} width Width from hook.
138
+ * @param {number} column Visual index of an column.
139
+ * @returns {number}
140
+ */
141
+ _classPrivateMethodInitSpec(this, _onModifyColWidth);
142
+ /**
143
+ * Make the renderer render the first nested column in its entirety.
144
+ *
145
+ * @param {object} calc Viewport column calculator.
146
+ */
147
+ _classPrivateMethodInitSpec(this, _onAfterViewportColumnCalculatorOverride);
148
+ /**
149
+ * `afterGetColumnHeader` hook callback - prepares the header structure.
150
+ *
151
+ * @param {Array} renderersArray Array of renderers.
152
+ */
153
+ _classPrivateMethodInitSpec(this, _onAfterGetColumnHeaderRenderers);
154
+ /**
155
+ * The hook observes the column selection from the Selection API and modifies the column range to
156
+ * ensure that the whole nested column will be covered.
157
+ *
158
+ * @param {CellCoords} from The coords object where the selection starts.
159
+ * @param {CellCoords} to The coords object where the selection ends.
160
+ */
161
+ _classPrivateMethodInitSpec(this, _onBeforeSelectColumns);
162
+ /**
163
+ * `modifyTransformStart` hook is called every time the keyboard navigation is used.
164
+ *
165
+ * @param {object} delta The transformation delta.
166
+ */
167
+ _classPrivateMethodInitSpec(this, _onModifyTransformStart);
168
+ /**
169
+ * The hook checks and ensures that the focus position that depends on the selected columns
170
+ * range is always positioned within the range.
171
+ */
172
+ _classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
173
+ /**
174
+ * Switches internal flag about selection progress to `false`.
175
+ */
176
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseUp);
177
+ /**
178
+ * Makes the header-selection properly select the nested headers.
179
+ *
180
+ * @param {MouseEvent} event Mouse event.
181
+ * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
182
+ * @param {HTMLElement} TD The cell element.
183
+ * @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
184
+ * a boolean value that allows or disallows changing the selection for that particular area.
185
+ */
186
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseOver);
187
+ /**
188
+ * Allows to control how the column selection based on the coordinates and the nested headers is made.
189
+ *
190
+ * @param {MouseEvent} event Mouse event.
191
+ * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
192
+ */
193
+ _classPrivateMethodInitSpec(this, _onAfterOnCellMouseDown);
194
+ /**
195
+ * Allows blocking the column selection that is controlled by the core Selection module.
196
+ *
197
+ * @param {MouseEvent} event Mouse event.
198
+ * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
199
+ * @param {CellCoords} TD The table cell or header element.
200
+ * @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
201
+ * a boolean value that allows or disallows changing the selection for that particular area.
202
+ */
203
+ _classPrivateMethodInitSpec(this, _onBeforeOnCellMouseDown);
204
+ /**
205
+ * Listens the `beforeCopy` hook that allows processing the copied column headers so that the
206
+ * merged column headers do not propagate the value for each column but only once at the beginning
207
+ * of the column.
208
+ *
209
+ * @private
210
+ * @param {Array[]} data An array of arrays which contains data to copied.
211
+ * @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
212
+ * which will copied.
213
+ * @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
214
+ * the number of copied headers.
215
+ */
216
+ _classPrivateMethodInitSpec(this, _onBeforeCopy);
217
+ /**
218
+ * Allows to control which header DOM element will be used to highlight.
219
+ *
220
+ * @param {number} visualColumn A visual column index of the highlighted row header.
221
+ * @param {number} headerLevel A row header level that is currently highlighted.
222
+ * @param {object} highlightMeta An object with meta data that describes the highlight state.
223
+ * @returns {number}
224
+ */
225
+ _classPrivateMethodInitSpec(this, _onBeforeHighlightingColumnHeader);
226
+ /**
227
+ * Allows to control to which column index the viewport will be scrolled. To ensure that the viewport
228
+ * is scrolled to the correct column for the nested header the most left and the most right visual column
229
+ * indexes are used.
230
+ *
231
+ * @param {number} visualColumn A visual column index to which the viewport will be scrolled.
232
+ * @returns {number}
233
+ */
234
+ _classPrivateMethodInitSpec(this, _onBeforeViewportScrollHorizontally);
81
235
  /**
82
236
  * Updates the selection focus highlight position to point to the nested header root element (TH)
83
237
  * even when the logical coordinates point in-between the header.
84
238
  */
85
- _classPrivateMethodInitSpec(this, _NestedHeaders_brand);
239
+ _classPrivateMethodInitSpec(this, _updateFocusHighlightPosition);
86
240
  /**
87
241
  * The state manager for the nested headers.
88
242
  *
89
243
  * @type {StateManager}
90
244
  */
91
- _classPrivateFieldInitSpec(this, _stateManager, new _stateManager2.default());
245
+ _classPrivateFieldInitSpec(this, _stateManager, {
246
+ writable: true,
247
+ value: new _stateManager2.default()
248
+ });
92
249
  /**
93
250
  * The instance of the ChangesObservable class that allows track the changes that happens in the
94
251
  * column indexes.
95
252
  *
96
253
  * @type {ChangesObservable}
97
254
  */
98
- _classPrivateFieldInitSpec(this, _hidingIndexMapObserver, null);
255
+ _classPrivateFieldInitSpec(this, _hidingIndexMapObserver, {
256
+ writable: true,
257
+ value: null
258
+ });
99
259
  /**
100
260
  * Holds the coords that points to the place where the column selection starts.
101
261
  *
102
262
  * @type {number|null}
103
263
  */
104
- _classPrivateFieldInitSpec(this, _focusInitialCoords, null);
264
+ _classPrivateFieldInitSpec(this, _focusInitialCoords, {
265
+ writable: true,
266
+ value: null
267
+ });
105
268
  /**
106
269
  * Determines if there is performed the column selection.
107
270
  *
108
271
  * @type {boolean}
109
272
  */
110
- _classPrivateFieldInitSpec(this, _isColumnsSelectionInProgress, false);
273
+ _classPrivateFieldInitSpec(this, _isColumnsSelectionInProgress, {
274
+ writable: true,
275
+ value: false
276
+ });
111
277
  /**
112
278
  * Custom helper for getting widths of the nested headers.
113
279
  *
@@ -154,102 +320,101 @@ class NestedHeaders extends _base.BasePlugin {
154
320
  (0, _console.warn)((0, _templateLiteralTag.toSingleLine)`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
155
321
  passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`);
156
322
  }
157
- this.addHook('init', () => _assertClassBrand(_NestedHeaders_brand, this, _onInit).call(this));
323
+ this.addHook('init', () => _classPrivateMethodGet(this, _onInit, _onInit2).call(this));
158
324
  this.addHook('afterLoadData', function () {
159
325
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
160
326
  args[_key] = arguments[_key];
161
327
  }
162
- return _assertClassBrand(_NestedHeaders_brand, _this, _onAfterLoadData).call(_this, ...args);
328
+ return _classPrivateMethodGet(_this, _onAfterLoadData, _onAfterLoadData2).call(_this, ...args);
163
329
  });
164
330
  this.addHook('beforeOnCellMouseDown', function () {
165
331
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
166
332
  args[_key2] = arguments[_key2];
167
333
  }
168
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeOnCellMouseDown).call(_this, ...args);
334
+ return _classPrivateMethodGet(_this, _onBeforeOnCellMouseDown, _onBeforeOnCellMouseDown2).call(_this, ...args);
169
335
  });
170
336
  this.addHook('afterOnCellMouseDown', function () {
171
337
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
172
338
  args[_key3] = arguments[_key3];
173
339
  }
174
- return _assertClassBrand(_NestedHeaders_brand, _this, _onAfterOnCellMouseDown).call(_this, ...args);
340
+ return _classPrivateMethodGet(_this, _onAfterOnCellMouseDown, _onAfterOnCellMouseDown2).call(_this, ...args);
175
341
  });
176
342
  this.addHook('beforeOnCellMouseOver', function () {
177
343
  for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
178
344
  args[_key4] = arguments[_key4];
179
345
  }
180
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeOnCellMouseOver).call(_this, ...args);
346
+ return _classPrivateMethodGet(_this, _onBeforeOnCellMouseOver, _onBeforeOnCellMouseOver2).call(_this, ...args);
181
347
  });
182
348
  this.addHook('beforeOnCellMouseUp', function () {
183
349
  for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
184
350
  args[_key5] = arguments[_key5];
185
351
  }
186
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeOnCellMouseUp).call(_this, ...args);
352
+ return _classPrivateMethodGet(_this, _onBeforeOnCellMouseUp, _onBeforeOnCellMouseUp2).call(_this, ...args);
187
353
  });
188
354
  this.addHook('beforeSelectionHighlightSet', function () {
189
355
  for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
190
356
  args[_key6] = arguments[_key6];
191
357
  }
192
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeSelectionHighlightSet).call(_this, ...args);
358
+ return _classPrivateMethodGet(_this, _onBeforeSelectionHighlightSet, _onBeforeSelectionHighlightSet2).call(_this, ...args);
193
359
  });
194
360
  this.addHook('modifyTransformStart', function () {
195
361
  for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
196
362
  args[_key7] = arguments[_key7];
197
363
  }
198
- return _assertClassBrand(_NestedHeaders_brand, _this, _onModifyTransformStart).call(_this, ...args);
364
+ return _classPrivateMethodGet(_this, _onModifyTransformStart, _onModifyTransformStart2).call(_this, ...args);
199
365
  });
200
- this.addHook('afterSelection', () => _assertClassBrand(_NestedHeaders_brand, this, _updateFocusHighlightPosition).call(this));
201
- this.addHook('afterSelectionFocusSet', () => _assertClassBrand(_NestedHeaders_brand, this, _updateFocusHighlightPosition).call(this));
366
+ this.addHook('afterSelection', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
202
367
  this.addHook('beforeViewportScrollHorizontally', function () {
203
368
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
204
369
  args[_key8] = arguments[_key8];
205
370
  }
206
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeViewportScrollHorizontally).call(_this, ...args);
371
+ return _classPrivateMethodGet(_this, _onBeforeViewportScrollHorizontally, _onBeforeViewportScrollHorizontally2).call(_this, ...args);
207
372
  });
208
- this.addHook('afterGetColumnHeaderRenderers', array => _assertClassBrand(_NestedHeaders_brand, this, _onAfterGetColumnHeaderRenderers).call(this, array));
373
+ this.addHook('afterGetColumnHeaderRenderers', array => _classPrivateMethodGet(this, _onAfterGetColumnHeaderRenderers, _onAfterGetColumnHeaderRenderers2).call(this, array));
209
374
  this.addHook('modifyColWidth', function () {
210
375
  for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
211
376
  args[_key9] = arguments[_key9];
212
377
  }
213
- return _assertClassBrand(_NestedHeaders_brand, _this, _onModifyColWidth).call(_this, ...args);
378
+ return _classPrivateMethodGet(_this, _onModifyColWidth, _onModifyColWidth2).call(_this, ...args);
214
379
  });
215
380
  this.addHook('modifyColumnHeaderValue', function () {
216
381
  for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
217
382
  args[_key10] = arguments[_key10];
218
383
  }
219
- return _assertClassBrand(_NestedHeaders_brand, _this, _onModifyColumnHeaderValue).call(_this, ...args);
384
+ return _classPrivateMethodGet(_this, _onModifyColumnHeaderValue, _onModifyColumnHeaderValue2).call(_this, ...args);
220
385
  });
221
386
  this.addHook('beforeHighlightingColumnHeader', function () {
222
387
  for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
223
388
  args[_key11] = arguments[_key11];
224
389
  }
225
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeHighlightingColumnHeader).call(_this, ...args);
390
+ return _classPrivateMethodGet(_this, _onBeforeHighlightingColumnHeader, _onBeforeHighlightingColumnHeader2).call(_this, ...args);
226
391
  });
227
392
  this.addHook('beforeCopy', function () {
228
393
  for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
229
394
  args[_key12] = arguments[_key12];
230
395
  }
231
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeCopy).call(_this, ...args);
396
+ return _classPrivateMethodGet(_this, _onBeforeCopy, _onBeforeCopy2).call(_this, ...args);
232
397
  });
233
398
  this.addHook('beforeSelectColumns', function () {
234
399
  for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
235
400
  args[_key13] = arguments[_key13];
236
401
  }
237
- return _assertClassBrand(_NestedHeaders_brand, _this, _onBeforeSelectColumns).call(_this, ...args);
402
+ return _classPrivateMethodGet(_this, _onBeforeSelectColumns, _onBeforeSelectColumns2).call(_this, ...args);
238
403
  });
239
404
  this.addHook('afterViewportColumnCalculatorOverride', function () {
240
405
  for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
241
406
  args[_key14] = arguments[_key14];
242
407
  }
243
- return _assertClassBrand(_NestedHeaders_brand, _this, _onAfterViewportColumnCalculatorOverride).call(_this, ...args);
408
+ return _classPrivateMethodGet(_this, _onAfterViewportColumnCalculatorOverride, _onAfterViewportColumnCalculatorOverride2).call(_this, ...args);
244
409
  });
245
410
  this.addHook('modifyFocusedElement', function () {
246
411
  for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
247
412
  args[_key15] = arguments[_key15];
248
413
  }
249
- return _assertClassBrand(_NestedHeaders_brand, _this, _onModifyFocusedElement).call(_this, ...args);
414
+ return _classPrivateMethodGet(_this, _onModifyFocusedElement, _onModifyFocusedElement2).call(_this, ...args);
250
415
  });
251
- this.hot.columnIndexMapper.addLocalHook('cacheUpdated', () => _assertClassBrand(_NestedHeaders_brand, this, _updateFocusHighlightPosition).call(this));
252
- this.hot.rowIndexMapper.addLocalHook('cacheUpdated', () => _assertClassBrand(_NestedHeaders_brand, this, _updateFocusHighlightPosition).call(this));
416
+ this.hot.columnIndexMapper.addLocalHook('cacheUpdated', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
417
+ this.hot.rowIndexMapper.addLocalHook('cacheUpdated', () => _classPrivateMethodGet(this, _updateFocusHighlightPosition, _updateFocusHighlightPosition2).call(this));
253
418
  super.enablePlugin();
254
419
  this.updatePlugin(); // @TODO: Workaround for broken plugin initialization abstraction.
255
420
  }
@@ -268,9 +433,9 @@ class NestedHeaders extends _base.BasePlugin {
268
433
  const {
269
434
  nestedHeaders
270
435
  } = this.hot.getSettings();
271
- _classPrivateFieldGet(_stateManager, this).setColumnsLimit(this.hot.countCols());
436
+ _classPrivateFieldGet(this, _stateManager).setColumnsLimit(this.hot.countCols());
272
437
  if (Array.isArray(nestedHeaders)) {
273
- this.detectedOverlappedHeaders = _classPrivateFieldGet(_stateManager, this).setState(nestedHeaders);
438
+ this.detectedOverlappedHeaders = _classPrivateFieldGet(this, _stateManager).setState(nestedHeaders);
274
439
  }
275
440
  if (this.detectedOverlappedHeaders) {
276
441
  (0, _console.warn)((0, _templateLiteralTag.toSingleLine)`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
@@ -282,11 +447,11 @@ class NestedHeaders extends _base.BasePlugin {
282
447
  // as if all the columns are visible, needs to be modified to be in sync with a dataset.
283
448
  this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((isColumnHidden, physicalColumnIndex) => {
284
449
  const actionName = isColumnHidden === true ? 'hide-column' : 'show-column';
285
- _classPrivateFieldGet(_stateManager, this).triggerColumnModification(actionName, physicalColumnIndex);
450
+ _classPrivateFieldGet(this, _stateManager).triggerColumnModification(actionName, physicalColumnIndex);
286
451
  });
287
452
  }
288
- if (!_classPrivateFieldGet(_hidingIndexMapObserver, this) && this.enabled) {
289
- _classPrivateFieldSet(_hidingIndexMapObserver, this, this.hot.columnIndexMapper.createChangesObserver('hiding').subscribe(changes => {
453
+ if (!_classPrivateFieldGet(this, _hidingIndexMapObserver) && this.enabled) {
454
+ _classPrivateFieldSet(this, _hidingIndexMapObserver, this.hot.columnIndexMapper.createChangesObserver('hiding').subscribe(changes => {
290
455
  changes.forEach(_ref => {
291
456
  let {
292
457
  op,
@@ -295,7 +460,7 @@ class NestedHeaders extends _base.BasePlugin {
295
460
  } = _ref;
296
461
  if (op === 'replace') {
297
462
  const actionName = newValue === true ? 'hide-column' : 'show-column';
298
- _classPrivateFieldGet(_stateManager, this).triggerColumnModification(actionName, columnIndex);
463
+ _classPrivateFieldGet(this, _stateManager).triggerColumnModification(actionName, columnIndex);
299
464
  }
300
465
  });
301
466
  this.ghostTable.buildWidthsMap();
@@ -310,9 +475,9 @@ class NestedHeaders extends _base.BasePlugin {
310
475
  */
311
476
  disablePlugin() {
312
477
  this.clearColspans();
313
- _classPrivateFieldGet(_stateManager, this).clear();
314
- _classPrivateFieldGet(_hidingIndexMapObserver, this).unsubscribe();
315
- _classPrivateFieldSet(_hidingIndexMapObserver, this, null);
478
+ _classPrivateFieldGet(this, _stateManager).clear();
479
+ _classPrivateFieldGet(this, _hidingIndexMapObserver).unsubscribe();
480
+ _classPrivateFieldSet(this, _hidingIndexMapObserver, null);
316
481
  this.ghostTable.clear();
317
482
  super.disablePlugin();
318
483
  }
@@ -324,7 +489,7 @@ class NestedHeaders extends _base.BasePlugin {
324
489
  * @returns {StateManager}
325
490
  */
326
491
  getStateManager() {
327
- return _classPrivateFieldGet(_stateManager, this);
492
+ return _classPrivateFieldGet(this, _stateManager);
328
493
  }
329
494
 
330
495
  /**
@@ -334,7 +499,7 @@ class NestedHeaders extends _base.BasePlugin {
334
499
  * @returns {number}
335
500
  */
336
501
  getLayersCount() {
337
- return _classPrivateFieldGet(_stateManager, this).getLayersCount();
502
+ return _classPrivateFieldGet(this, _stateManager).getLayersCount();
338
503
  }
339
504
 
340
505
  /**
@@ -348,7 +513,7 @@ class NestedHeaders extends _base.BasePlugin {
348
513
  * @returns {object}
349
514
  */
350
515
  getHeaderSettings(headerLevel, columnIndex) {
351
- return _classPrivateFieldGet(_stateManager, this).getHeaderSettings(headerLevel, columnIndex);
516
+ return _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, columnIndex);
352
517
  }
353
518
 
354
519
  /**
@@ -417,7 +582,7 @@ class NestedHeaders extends _base.BasePlugin {
417
582
  colspan,
418
583
  isHidden,
419
584
  isPlaceholder
420
- } = (_classPrivateFieldGet2 = _classPrivateFieldGet(_stateManager, this).getHeaderSettings(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : {
585
+ } = (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : {
421
586
  label: ''
422
587
  };
423
588
  if (isPlaceholder || isHidden) {
@@ -458,7 +623,7 @@ class NestedHeaders extends _base.BasePlugin {
458
623
  const {
459
624
  isHidden,
460
625
  isPlaceholder
461
- } = (_classPrivateFieldGet3 = _classPrivateFieldGet(_stateManager, this).getHeaderSettings(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet3 !== void 0 ? _classPrivateFieldGet3 : {};
626
+ } = (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet3 !== void 0 ? _classPrivateFieldGet3 : {};
462
627
  if (isPlaceholder || isHidden) {
463
628
  return '';
464
629
  }
@@ -468,10 +633,10 @@ class NestedHeaders extends _base.BasePlugin {
468
633
  * Destroys the plugin instance.
469
634
  */
470
635
  destroy() {
471
- _classPrivateFieldSet(_stateManager, this, null);
472
- if (_classPrivateFieldGet(_hidingIndexMapObserver, this) !== null) {
473
- _classPrivateFieldGet(_hidingIndexMapObserver, this).unsubscribe();
474
- _classPrivateFieldSet(_hidingIndexMapObserver, this, null);
636
+ _classPrivateFieldSet(this, _stateManager, null);
637
+ if (_classPrivateFieldGet(this, _hidingIndexMapObserver) !== null) {
638
+ _classPrivateFieldGet(this, _hidingIndexMapObserver).unsubscribe();
639
+ _classPrivateFieldSet(this, _hidingIndexMapObserver, null);
475
640
  }
476
641
  super.destroy();
477
642
  }
@@ -487,11 +652,11 @@ class NestedHeaders extends _base.BasePlugin {
487
652
  if (coords.row >= 0 || coords.col < 0) {
488
653
  return;
489
654
  }
490
- return _classPrivateFieldGet(_stateManager, this).getHeaderTreeNodeData(coords.row, coords.col);
655
+ return _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(coords.row, coords.col);
491
656
  }
492
657
  }
493
658
  exports.NestedHeaders = NestedHeaders;
494
- function _updateFocusHighlightPosition() {
659
+ function _updateFocusHighlightPosition2() {
495
660
  var _this$hot;
496
661
  const selection = (_this$hot = this.hot) === null || _this$hot === void 0 ? void 0 : _this$hot.getSelectedRangeLast();
497
662
  if (!selection) {
@@ -502,7 +667,7 @@ function _updateFocusHighlightPosition() {
502
667
  } = selection;
503
668
  const isNestedHeadersRange = highlight.isHeader() && highlight.col >= 0;
504
669
  if (isNestedHeadersRange) {
505
- const columnIndex = _classPrivateFieldGet(_stateManager, this).findLeftMostColumnIndex(highlight.row, highlight.col);
670
+ const columnIndex = _classPrivateFieldGet(this, _stateManager).findLeftMostColumnIndex(highlight.row, highlight.col);
506
671
  const focusHighlight = this.hot.selection.highlight.getFocus();
507
672
 
508
673
  // Correct the highlight/focus selection to highlight the correct TH element
@@ -512,15 +677,7 @@ function _updateFocusHighlightPosition() {
512
677
  focusHighlight.commit();
513
678
  }
514
679
  }
515
- /**
516
- * Allows to control to which column index the viewport will be scrolled. To ensure that the viewport
517
- * is scrolled to the correct column for the nested header the most left and the most right visual column
518
- * indexes are used.
519
- *
520
- * @param {number} visualColumn A visual column index to which the viewport will be scrolled.
521
- * @returns {number}
522
- */
523
- function _onBeforeViewportScrollHorizontally(visualColumn) {
680
+ function _onBeforeViewportScrollHorizontally2(visualColumn) {
524
681
  const selection = this.hot.getSelectedRangeLast();
525
682
  if (!selection) {
526
683
  return visualColumn;
@@ -534,8 +691,8 @@ function _onBeforeViewportScrollHorizontally(visualColumn) {
534
691
  }
535
692
  const firstColumn = this.hot.view.getFirstFullyVisibleColumn();
536
693
  const lastColumn = this.hot.view.getLastFullyVisibleColumn();
537
- const mostLeftColumnIndex = _classPrivateFieldGet(_stateManager, this).findLeftMostColumnIndex(highlight.row, highlight.col);
538
- const mostRightColumnIndex = _classPrivateFieldGet(_stateManager, this).findRightMostColumnIndex(highlight.row, highlight.col);
694
+ const mostLeftColumnIndex = _classPrivateFieldGet(this, _stateManager).findLeftMostColumnIndex(highlight.row, highlight.col);
695
+ const mostRightColumnIndex = _classPrivateFieldGet(this, _stateManager).findRightMostColumnIndex(highlight.row, highlight.col);
539
696
 
540
697
  // do not scroll the viewport when the header is wider than the viewport
541
698
  if (mostLeftColumnIndex < firstColumn && mostRightColumnIndex > lastColumn) {
@@ -543,16 +700,8 @@ function _onBeforeViewportScrollHorizontally(visualColumn) {
543
700
  }
544
701
  return mostLeftColumnIndex < firstColumn ? mostLeftColumnIndex : mostRightColumnIndex;
545
702
  }
546
- /**
547
- * Allows to control which header DOM element will be used to highlight.
548
- *
549
- * @param {number} visualColumn A visual column index of the highlighted row header.
550
- * @param {number} headerLevel A row header level that is currently highlighted.
551
- * @param {object} highlightMeta An object with meta data that describes the highlight state.
552
- * @returns {number}
553
- */
554
- function _onBeforeHighlightingColumnHeader(visualColumn, headerLevel, highlightMeta) {
555
- const headerNodeData = _classPrivateFieldGet(_stateManager, this).getHeaderTreeNodeData(headerLevel, visualColumn);
703
+ function _onBeforeHighlightingColumnHeader2(visualColumn, headerLevel, highlightMeta) {
704
+ const headerNodeData = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumn);
556
705
  if (!headerNodeData) {
557
706
  return visualColumn;
558
707
  }
@@ -564,7 +713,7 @@ function _onBeforeHighlightingColumnHeader(visualColumn, headerLevel, highlightM
564
713
  const {
565
714
  isRoot,
566
715
  colspan
567
- } = _classPrivateFieldGet(_stateManager, this).getHeaderSettings(headerLevel, visualColumn);
716
+ } = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumn);
568
717
  if (selectionType === _selection.HEADER_TYPE) {
569
718
  if (!isRoot) {
570
719
  return headerNodeData.columnIndex;
@@ -577,19 +726,7 @@ function _onBeforeHighlightingColumnHeader(visualColumn, headerLevel, highlightM
577
726
  }
578
727
  return visualColumn;
579
728
  }
580
- /**
581
- * Listens the `beforeCopy` hook that allows processing the copied column headers so that the
582
- * merged column headers do not propagate the value for each column but only once at the beginning
583
- * of the column.
584
- *
585
- * @private
586
- * @param {Array[]} data An array of arrays which contains data to copied.
587
- * @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
588
- * which will copied.
589
- * @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
590
- * the number of copied headers.
591
- */
592
- function _onBeforeCopy(data, copyableRanges, _ref2) {
729
+ function _onBeforeCopy2(data, copyableRanges, _ref2) {
593
730
  let {
594
731
  columnHeadersCount
595
732
  } = _ref2;
@@ -618,7 +755,7 @@ function _onBeforeCopy(data, copyableRanges, _ref2) {
618
755
  if (zeroBasedColumnIndex === 0) {
619
756
  continue; // eslint-disable-line no-continue
620
757
  }
621
- const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(_stateManager, this).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
758
+ const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
622
759
  if (isRoot === false) {
623
760
  data[zeroBasedColumnHeaderLevel][zeroBasedColumnIndex] = '';
624
761
  }
@@ -626,16 +763,7 @@ function _onBeforeCopy(data, copyableRanges, _ref2) {
626
763
  }
627
764
  }
628
765
  }
629
- /**
630
- * Allows blocking the column selection that is controlled by the core Selection module.
631
- *
632
- * @param {MouseEvent} event Mouse event.
633
- * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
634
- * @param {CellCoords} TD The table cell or header element.
635
- * @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
636
- * a boolean value that allows or disallows changing the selection for that particular area.
637
- */
638
- function _onBeforeOnCellMouseDown(event, coords, TD, controller) {
766
+ function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
639
767
  const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
640
768
  if (headerNodeData) {
641
769
  // Block the Selection module in controlling how the columns are selected. Pass the
@@ -643,19 +771,13 @@ function _onBeforeOnCellMouseDown(event, coords, TD, controller) {
643
771
  controller.column = true;
644
772
  }
645
773
  }
646
- /**
647
- * Allows to control how the column selection based on the coordinates and the nested headers is made.
648
- *
649
- * @param {MouseEvent} event Mouse event.
650
- * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
651
- */
652
- function _onAfterOnCellMouseDown(event, coords) {
774
+ function _onAfterOnCellMouseDown2(event, coords) {
653
775
  const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
654
776
  if (!headerNodeData) {
655
777
  return;
656
778
  }
657
- _classPrivateFieldSet(_focusInitialCoords, this, coords.clone());
658
- _classPrivateFieldSet(_isColumnsSelectionInProgress, this, true);
779
+ _classPrivateFieldSet(this, _focusInitialCoords, coords.clone());
780
+ _classPrivateFieldSet(this, _isColumnsSelectionInProgress, true);
659
781
  const {
660
782
  selection
661
783
  } = this.hot;
@@ -686,16 +808,7 @@ function _onAfterOnCellMouseDown(event, coords) {
686
808
  // The plugin takes control of how the columns are selected.
687
809
  selection.selectColumns(...columnsToSelect);
688
810
  }
689
- /**
690
- * Makes the header-selection properly select the nested headers.
691
- *
692
- * @param {MouseEvent} event Mouse event.
693
- * @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
694
- * @param {HTMLElement} TD The cell element.
695
- * @param {object} controller An object with properties `row`, `column` and `cell`. Each property contains
696
- * a boolean value that allows or disallows changing the selection for that particular area.
697
- */
698
- function _onBeforeOnCellMouseOver(event, coords, TD, controller) {
811
+ function _onBeforeOnCellMouseOver2(event, coords, TD, controller) {
699
812
  if (!this.hot.view.isMouseDown()) {
700
813
  return;
701
814
  }
@@ -729,21 +842,14 @@ function _onBeforeOnCellMouseOver(event, coords, TD, controller) {
729
842
  }
730
843
  this.hot.selection.selectColumns(...columnsToSelect);
731
844
  }
732
- /**
733
- * Switches internal flag about selection progress to `false`.
734
- */
735
- function _onBeforeOnCellMouseUp() {
736
- _classPrivateFieldSet(_isColumnsSelectionInProgress, this, false);
845
+ function _onBeforeOnCellMouseUp2() {
846
+ _classPrivateFieldSet(this, _isColumnsSelectionInProgress, false);
737
847
  }
738
- /**
739
- * The hook checks and ensures that the focus position that depends on the selected columns
740
- * range is always positioned within the range.
741
- */
742
- function _onBeforeSelectionHighlightSet() {
848
+ function _onBeforeSelectionHighlightSet2() {
743
849
  const {
744
850
  navigableHeaders
745
851
  } = this.hot.getSettings();
746
- if (!this.hot.view.isMouseDown() || !_classPrivateFieldGet(_isColumnsSelectionInProgress, this) || !navigableHeaders) {
852
+ if (!this.hot.view.isMouseDown() || !_classPrivateFieldGet(this, _isColumnsSelectionInProgress) || !navigableHeaders) {
747
853
  return;
748
854
  }
749
855
  const selectedRange = this.hot.getSelectedRangeLast();
@@ -752,20 +858,15 @@ function _onBeforeSelectionHighlightSet() {
752
858
  const {
753
859
  columnIndex,
754
860
  origColspan
755
- } = _classPrivateFieldGet(_stateManager, this).getHeaderTreeNodeData(_classPrivateFieldGet(_focusInitialCoords, this).row, _classPrivateFieldGet(_focusInitialCoords, this).col);
756
- selectedRange.setHighlight(_classPrivateFieldGet(_focusInitialCoords, this));
861
+ } = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(_classPrivateFieldGet(this, _focusInitialCoords).row, _classPrivateFieldGet(this, _focusInitialCoords).col);
862
+ selectedRange.setHighlight(_classPrivateFieldGet(this, _focusInitialCoords));
757
863
  if (origColspan > selectedRange.getWidth() || columnIndex < columnStart || columnIndex + origColspan - 1 > columnEnd) {
758
- const headerLevel = _classPrivateFieldGet(_stateManager, this).findTopMostEntireHeaderLevel((0, _number.clamp)(columnStart, columnIndex, columnIndex + origColspan - 1), (0, _number.clamp)(columnEnd, columnIndex, columnIndex + origColspan - 1));
864
+ const headerLevel = _classPrivateFieldGet(this, _stateManager).findTopMostEntireHeaderLevel((0, _number.clamp)(columnStart, columnIndex, columnIndex + origColspan - 1), (0, _number.clamp)(columnEnd, columnIndex, columnIndex + origColspan - 1));
759
865
  selectedRange.highlight.row = headerLevel;
760
866
  selectedRange.highlight.col = selectedRange.from.col;
761
867
  }
762
868
  }
763
- /**
764
- * `modifyTransformStart` hook is called every time the keyboard navigation is used.
765
- *
766
- * @param {object} delta The transformation delta.
767
- */
768
- function _onModifyTransformStart(delta) {
869
+ function _onModifyTransformStart2(delta) {
769
870
  const {
770
871
  highlight
771
872
  } = this.hot.getSelectedRangeLast();
@@ -774,8 +875,8 @@ function _onModifyTransformStart(delta) {
774
875
  if (!isNestedHeadersRange) {
775
876
  return;
776
877
  }
777
- const visualColumnIndexStart = _classPrivateFieldGet(_stateManager, this).findLeftMostColumnIndex(nextCoords.row, nextCoords.col);
778
- const visualColumnIndexEnd = _classPrivateFieldGet(_stateManager, this).findRightMostColumnIndex(nextCoords.row, nextCoords.col);
878
+ const visualColumnIndexStart = _classPrivateFieldGet(this, _stateManager).findLeftMostColumnIndex(nextCoords.row, nextCoords.col);
879
+ const visualColumnIndexEnd = _classPrivateFieldGet(this, _stateManager).findRightMostColumnIndex(nextCoords.row, nextCoords.col);
779
880
  if (delta.col < 0) {
780
881
  const nextColumn = highlight.col >= visualColumnIndexStart && highlight.col <= visualColumnIndexEnd ? visualColumnIndexStart - 1 : visualColumnIndexEnd;
781
882
  const notHiddenColumnIndex = this.hot.columnIndexMapper.getNearestNotHiddenIndex(nextColumn, -1);
@@ -798,14 +899,7 @@ function _onModifyTransformStart(delta) {
798
899
  }
799
900
  }
800
901
  }
801
- /**
802
- * The hook observes the column selection from the Selection API and modifies the column range to
803
- * ensure that the whole nested column will be covered.
804
- *
805
- * @param {CellCoords} from The coords object where the selection starts.
806
- * @param {CellCoords} to The coords object where the selection ends.
807
- */
808
- function _onBeforeSelectColumns(from, to) {
902
+ function _onBeforeSelectColumns2(from, to) {
809
903
  const headerLevel = from.row;
810
904
  const startNodeData = this._getHeaderTreeNodeDataByCoords({
811
905
  row: headerLevel,
@@ -833,28 +927,18 @@ function _onBeforeSelectColumns(from, to) {
833
927
  }
834
928
  }
835
929
  }
836
- /**
837
- * `afterGetColumnHeader` hook callback - prepares the header structure.
838
- *
839
- * @param {Array} renderersArray Array of renderers.
840
- */
841
- function _onAfterGetColumnHeaderRenderers(renderersArray) {
930
+ function _onAfterGetColumnHeaderRenderers2(renderersArray) {
842
931
  renderersArray.length = 0;
843
- for (let headerLayer = 0; headerLayer < _classPrivateFieldGet(_stateManager, this).getLayersCount(); headerLayer++) {
932
+ for (let headerLayer = 0; headerLayer < _classPrivateFieldGet(this, _stateManager).getLayersCount(); headerLayer++) {
844
933
  renderersArray.push(this.headerRendererFactory(headerLayer));
845
934
  }
846
935
  }
847
- /**
848
- * Make the renderer render the first nested column in its entirety.
849
- *
850
- * @param {object} calc Viewport column calculator.
851
- */
852
- function _onAfterViewportColumnCalculatorOverride(calc) {
853
- const headerLayersCount = _classPrivateFieldGet(_stateManager, this).getLayersCount();
936
+ function _onAfterViewportColumnCalculatorOverride2(calc) {
937
+ const headerLayersCount = _classPrivateFieldGet(this, _stateManager).getLayersCount();
854
938
  let newStartColumn = calc.startColumn;
855
939
  let nonRenderable = !!headerLayersCount;
856
940
  for (let headerLayer = 0; headerLayer < headerLayersCount; headerLayer++) {
857
- const startColumn = _classPrivateFieldGet(_stateManager, this).findLeftMostColumnIndex(headerLayer, calc.startColumn);
941
+ const startColumn = _classPrivateFieldGet(this, _stateManager).findLeftMostColumnIndex(headerLayer, calc.startColumn);
858
942
  const renderedStartColumn = this.hot.columnIndexMapper.getRenderableFromVisualIndex(startColumn);
859
943
 
860
944
  // If any of the headers for that column index is rendered, all of them should be rendered properly, see
@@ -873,67 +957,31 @@ function _onAfterViewportColumnCalculatorOverride(calc) {
873
957
 
874
958
  // If no headers for the provided column index are renderable, start rendering from the beginning of the upmost
875
959
  // header for that position.
876
- calc.startColumn = nonRenderable ? _classPrivateFieldGet(_stateManager, this).getHeaderTreeNodeData(0, newStartColumn).columnIndex : newStartColumn;
960
+ calc.startColumn = nonRenderable ? _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(0, newStartColumn).columnIndex : newStartColumn;
877
961
  }
878
- /**
879
- * `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
880
- *
881
- * @param {number} width Width from hook.
882
- * @param {number} column Visual index of an column.
883
- * @returns {number}
884
- */
885
- function _onModifyColWidth(width, column) {
962
+ function _onModifyColWidth2(width, column) {
886
963
  const cachedWidth = this.ghostTable.getWidth(column);
887
964
  return width > cachedWidth ? width : cachedWidth;
888
965
  }
889
- /**
890
- * Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
891
- * the internal state and settings of the plugin.
892
- *
893
- * @param {string} value The column header value.
894
- * @param {number} visualColumnIndex The visual column index.
895
- * @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
896
- * and negative (-1 to -N) values. For positive values, 0 points to the
897
- * top most header, and for negative direction, -1 points to the most bottom
898
- * header (the header closest to the cells).
899
- * @returns {string} Returns the column header value to update.
900
- */
901
- function _onModifyColumnHeaderValue(value, visualColumnIndex, headerLevel) {
966
+ function _onModifyColumnHeaderValue2(value, visualColumnIndex, headerLevel) {
902
967
  var _classPrivateFieldGet5;
903
968
  const {
904
969
  label
905
- } = (_classPrivateFieldGet5 = _classPrivateFieldGet(_stateManager, this).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
970
+ } = (_classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
906
971
  label: ''
907
972
  };
908
973
  return label;
909
974
  }
910
- /**
911
- * `modifyFocusedElement` hook callback.
912
- *
913
- * @param {number} row Row index.
914
- * @param {number} column Column index.
915
- * @returns {HTMLTableCellElement} The `TH` element to be focused.
916
- */
917
- function _onModifyFocusedElement(row, column) {
975
+ function _onModifyFocusedElement2(row, column) {
918
976
  if (row < 0) {
919
- return this.hot.getCell(row, _classPrivateFieldGet(_stateManager, this).findLeftMostColumnIndex(row, column), true);
977
+ return this.hot.getCell(row, _classPrivateFieldGet(this, _stateManager).findLeftMostColumnIndex(row, column), true);
920
978
  }
921
979
  }
922
- /**
923
- * Updates the plugin state after HoT initialization.
924
- */
925
- function _onInit() {
980
+ function _onInit2() {
926
981
  // @TODO: Workaround for broken plugin initialization abstraction.
927
982
  this.updatePlugin();
928
983
  }
929
- /**
930
- * Updates the plugin state after new dataset load.
931
- *
932
- * @param {Array[]} sourceData Array of arrays or array of objects containing data.
933
- * @param {boolean} initialLoad Flag that determines whether the data has been loaded
934
- * during the initialization.
935
- */
936
- function _onAfterLoadData(sourceData, initialLoad) {
984
+ function _onAfterLoadData2(sourceData, initialLoad) {
937
985
  if (!initialLoad) {
938
986
  this.updatePlugin();
939
987
  }