handsontable 14.0.0-next-c080457-20231107 → 14.0.0-next-bfad250-20231108

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. package/3rdparty/SheetClip/SheetClip.js +2 -2
  2. package/3rdparty/SheetClip/SheetClip.mjs +2 -2
  3. package/3rdparty/autoResize/autoResize.js +2 -2
  4. package/3rdparty/autoResize/autoResize.mjs +2 -2
  5. package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
  6. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
  7. package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
  8. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
  9. package/3rdparty/walkontable/src/cell/coords.js +7 -5
  10. package/3rdparty/walkontable/src/cell/coords.mjs +7 -5
  11. package/3rdparty/walkontable/src/core/clone.js +6 -0
  12. package/3rdparty/walkontable/src/core/clone.mjs +6 -0
  13. package/3rdparty/walkontable/src/event.js +125 -74
  14. package/3rdparty/walkontable/src/event.mjs +125 -74
  15. package/3rdparty/walkontable/src/filter/column.js +16 -0
  16. package/3rdparty/walkontable/src/filter/column.mjs +16 -0
  17. package/3rdparty/walkontable/src/filter/row.js +16 -0
  18. package/3rdparty/walkontable/src/filter/row.mjs +16 -0
  19. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  21. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  23. package/3rdparty/walkontable/src/renderer/_base.js +12 -5
  24. package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
  25. package/3rdparty/walkontable/src/renderer/cells.js +6 -2
  26. package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
  27. package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
  28. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
  29. package/3rdparty/walkontable/src/renderer/rows.js +5 -0
  30. package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
  31. package/3rdparty/walkontable/src/renderer/table.js +24 -17
  32. package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
  33. package/3rdparty/walkontable/src/scroll.js +2 -2
  34. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  35. package/3rdparty/walkontable/src/selection/border/border.js +1 -1
  36. package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
  37. package/3rdparty/walkontable/src/settings.js +10 -10
  38. package/3rdparty/walkontable/src/settings.mjs +10 -10
  39. package/3rdparty/walkontable/src/table.js +3 -3
  40. package/3rdparty/walkontable/src/table.mjs +3 -3
  41. package/3rdparty/walkontable/src/utils/column.js +19 -4
  42. package/3rdparty/walkontable/src/utils/column.mjs +19 -4
  43. package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
  44. package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
  45. package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
  46. package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
  47. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
  48. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
  49. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
  50. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
  51. package/3rdparty/walkontable/src/utils/row.js +14 -2
  52. package/3rdparty/walkontable/src/utils/row.mjs +14 -2
  53. package/3rdparty/walkontable/src/viewport.js +9 -9
  54. package/3rdparty/walkontable/src/viewport.mjs +9 -9
  55. package/base.js +2 -2
  56. package/base.mjs +2 -2
  57. package/core.js +25 -25
  58. package/core.mjs +25 -25
  59. package/dataMap/dataMap.js +99 -90
  60. package/dataMap/dataMap.mjs +99 -90
  61. package/dataMap/dataSource.js +14 -8
  62. package/dataMap/dataSource.mjs +14 -8
  63. package/dataMap/metaManager/lazyFactoryMap.js +19 -7
  64. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
  65. package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
  66. package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
  67. package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
  68. package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
  69. package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
  70. package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
  71. package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
  72. package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
  73. package/dataMap/metaManager/metaSchema.js +55 -55
  74. package/dataMap/metaManager/metaSchema.mjs +55 -55
  75. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
  76. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
  77. package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
  78. package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
  79. package/dataMap/metaManager/utils.js +2 -2
  80. package/dataMap/metaManager/utils.mjs +2 -2
  81. package/dist/handsontable.css +2 -2
  82. package/dist/handsontable.full.css +2 -2
  83. package/dist/handsontable.full.js +7337 -6389
  84. package/dist/handsontable.full.min.css +2 -2
  85. package/dist/handsontable.full.min.js +154 -154
  86. package/dist/handsontable.js +7336 -6388
  87. package/dist/handsontable.min.css +2 -2
  88. package/dist/handsontable.min.js +28 -28
  89. package/editorManager.js +105 -95
  90. package/editorManager.mjs +105 -95
  91. package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
  92. package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
  93. package/editors/baseEditor/baseEditor.js +23 -26
  94. package/editors/baseEditor/baseEditor.mjs +23 -26
  95. package/editors/dateEditor/dateEditor.js +24 -15
  96. package/editors/dateEditor/dateEditor.mjs +24 -15
  97. package/editors/dropdownEditor/dropdownEditor.js +1 -1
  98. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  99. package/editors/handsontableEditor/handsontableEditor.js +4 -4
  100. package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
  101. package/editors/textEditor/textEditor.js +23 -17
  102. package/editors/textEditor/textEditor.mjs +24 -18
  103. package/eventManager.js +8 -0
  104. package/eventManager.mjs +8 -0
  105. package/helpers/array.js +2 -2
  106. package/helpers/array.mjs +2 -2
  107. package/helpers/dom/element.js +7 -7
  108. package/helpers/dom/element.mjs +7 -7
  109. package/helpers/function.js +1 -1
  110. package/helpers/function.mjs +1 -1
  111. package/helpers/mixed.js +1 -1
  112. package/helpers/mixed.mjs +1 -1
  113. package/helpers/object.js +4 -4
  114. package/helpers/object.mjs +4 -4
  115. package/helpers/string.js +1 -1
  116. package/helpers/string.mjs +1 -1
  117. package/package.json +1 -1
  118. package/pluginHooks.d.ts +0 -2
  119. package/pluginHooks.js +12 -3
  120. package/pluginHooks.mjs +12 -3
  121. package/plugins/autoColumnSize/autoColumnSize.js +141 -130
  122. package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
  123. package/plugins/autoRowSize/autoRowSize.js +112 -125
  124. package/plugins/autoRowSize/autoRowSize.mjs +110 -123
  125. package/plugins/autofill/autofill.d.ts +0 -1
  126. package/plugins/autofill/autofill.js +98 -102
  127. package/plugins/autofill/autofill.mjs +97 -101
  128. package/plugins/base/base.js +61 -28
  129. package/plugins/base/base.mjs +60 -28
  130. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
  131. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
  132. package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
  133. package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
  134. package/plugins/columnSorting/columnSorting.js +107 -99
  135. package/plugins/columnSorting/columnSorting.mjs +106 -98
  136. package/plugins/columnSorting/columnStatesManager.js +12 -6
  137. package/plugins/columnSorting/columnStatesManager.mjs +12 -6
  138. package/plugins/columnSummary/columnSummary.js +71 -58
  139. package/plugins/columnSummary/columnSummary.mjs +70 -57
  140. package/plugins/columnSummary/endpoints.js +20 -14
  141. package/plugins/columnSummary/endpoints.mjs +20 -14
  142. package/plugins/comments/commentEditor.js +30 -2
  143. package/plugins/comments/commentEditor.mjs +30 -2
  144. package/plugins/comments/comments.js +158 -169
  145. package/plugins/comments/comments.mjs +157 -168
  146. package/plugins/comments/displaySwitch.js +7 -3
  147. package/plugins/comments/displaySwitch.mjs +7 -3
  148. package/plugins/contextMenu/commandExecutor.js +15 -2
  149. package/plugins/contextMenu/commandExecutor.mjs +15 -2
  150. package/plugins/contextMenu/contextMenu.js +96 -102
  151. package/plugins/contextMenu/contextMenu.mjs +95 -101
  152. package/plugins/contextMenu/itemsFactory.js +19 -4
  153. package/plugins/contextMenu/itemsFactory.mjs +19 -4
  154. package/plugins/contextMenu/menu/cursor.js +36 -0
  155. package/plugins/contextMenu/menu/cursor.mjs +36 -0
  156. package/plugins/contextMenu/menu/menu.js +57 -5
  157. package/plugins/contextMenu/menu/menu.mjs +57 -5
  158. package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
  159. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
  160. package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
  161. package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
  162. package/plugins/copyPaste/copyPaste.js +74 -75
  163. package/plugins/copyPaste/copyPaste.mjs +74 -75
  164. package/plugins/customBorders/customBorders.js +57 -50
  165. package/plugins/customBorders/customBorders.mjs +56 -49
  166. package/plugins/dragToScroll/dragToScroll.js +50 -54
  167. package/plugins/dragToScroll/dragToScroll.mjs +49 -52
  168. package/plugins/dropdownMenu/dropdownMenu.js +136 -131
  169. package/plugins/dropdownMenu/dropdownMenu.mjs +136 -131
  170. package/plugins/exportFile/dataProvider.js +7 -2
  171. package/plugins/exportFile/dataProvider.mjs +7 -2
  172. package/plugins/exportFile/exportFile.js +1 -1
  173. package/plugins/exportFile/exportFile.mjs +1 -1
  174. package/plugins/exportFile/types/_base.js +14 -6
  175. package/plugins/exportFile/types/_base.mjs +14 -6
  176. package/plugins/filters/component/actionBar.js +9 -0
  177. package/plugins/filters/component/actionBar.mjs +9 -0
  178. package/plugins/filters/component/condition.js +13 -0
  179. package/plugins/filters/component/condition.mjs +13 -0
  180. package/plugins/filters/component/operators.js +9 -0
  181. package/plugins/filters/component/operators.mjs +9 -0
  182. package/plugins/filters/component/value.js +9 -0
  183. package/plugins/filters/component/value.mjs +9 -0
  184. package/plugins/filters/conditionCollection.js +9 -4
  185. package/plugins/filters/conditionCollection.mjs +9 -4
  186. package/plugins/filters/conditionUpdateObserver.js +53 -42
  187. package/plugins/filters/conditionUpdateObserver.mjs +53 -42
  188. package/plugins/filters/dataFilter.js +9 -3
  189. package/plugins/filters/dataFilter.mjs +9 -3
  190. package/plugins/filters/filters.js +184 -189
  191. package/plugins/filters/filters.mjs +182 -187
  192. package/plugins/filters/ui/_base.js +1 -1
  193. package/plugins/filters/ui/_base.mjs +1 -1
  194. package/plugins/filters/utils.js +1 -1
  195. package/plugins/filters/utils.mjs +1 -1
  196. package/plugins/formulas/engine/settings.js +1 -1
  197. package/plugins/formulas/engine/settings.mjs +1 -1
  198. package/plugins/formulas/formulas.js +684 -602
  199. package/plugins/formulas/formulas.mjs +682 -600
  200. package/plugins/hiddenColumns/hiddenColumns.js +174 -169
  201. package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
  202. package/plugins/hiddenRows/hiddenRows.js +170 -165
  203. package/plugins/hiddenRows/hiddenRows.mjs +169 -164
  204. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  205. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  206. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  207. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  208. package/plugins/manualColumnFreeze/manualColumnFreeze.js +66 -53
  209. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
  210. package/plugins/manualColumnMove/manualColumnMove.js +287 -232
  211. package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
  212. package/plugins/manualColumnMove/ui/_base.js +9 -3
  213. package/plugins/manualColumnMove/ui/_base.mjs +9 -3
  214. package/plugins/manualColumnResize/manualColumnResize.js +291 -246
  215. package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
  216. package/plugins/manualRowMove/manualRowMove.js +223 -208
  217. package/plugins/manualRowMove/manualRowMove.mjs +222 -207
  218. package/plugins/manualRowMove/ui/_base.js +10 -5
  219. package/plugins/manualRowMove/ui/_base.mjs +10 -5
  220. package/plugins/manualRowResize/manualRowResize.js +254 -209
  221. package/plugins/manualRowResize/manualRowResize.mjs +253 -207
  222. package/plugins/mergeCells/calculations/autofill.js +9 -3
  223. package/plugins/mergeCells/calculations/autofill.mjs +9 -3
  224. package/plugins/mergeCells/calculations/selection.js +10 -4
  225. package/plugins/mergeCells/calculations/selection.mjs +10 -4
  226. package/plugins/mergeCells/cellCoords.js +16 -6
  227. package/plugins/mergeCells/cellCoords.mjs +16 -6
  228. package/plugins/mergeCells/cellsCollection.js +10 -4
  229. package/plugins/mergeCells/cellsCollection.mjs +10 -4
  230. package/plugins/mergeCells/mergeCells.js +582 -502
  231. package/plugins/mergeCells/mergeCells.mjs +580 -500
  232. package/plugins/multiColumnSorting/multiColumnSorting.js +15 -11
  233. package/plugins/multiColumnSorting/multiColumnSorting.mjs +15 -11
  234. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
  235. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
  236. package/plugins/nestedHeaders/nestedHeaders.js +542 -499
  237. package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
  238. package/plugins/nestedHeaders/stateManager/index.js +1 -1
  239. package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
  240. package/plugins/nestedRows/data/dataManager.js +21 -15
  241. package/plugins/nestedRows/data/dataManager.mjs +21 -15
  242. package/plugins/nestedRows/nestedRows.js +335 -279
  243. package/plugins/nestedRows/nestedRows.mjs +334 -278
  244. package/plugins/nestedRows/ui/_base.js +7 -1
  245. package/plugins/nestedRows/ui/_base.mjs +7 -1
  246. package/plugins/nestedRows/ui/collapsing.js +2 -2
  247. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  248. package/plugins/nestedRows/ui/contextMenu.js +28 -18
  249. package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
  250. package/plugins/nestedRows/utils/rowMoveController.js +12 -4
  251. package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
  252. package/plugins/persistentState/persistentState.js +14 -11
  253. package/plugins/persistentState/persistentState.mjs +14 -11
  254. package/plugins/persistentState/storage.js +11 -6
  255. package/plugins/persistentState/storage.mjs +11 -6
  256. package/plugins/registry.js +2 -2
  257. package/plugins/registry.mjs +2 -2
  258. package/plugins/search/search.js +57 -46
  259. package/plugins/search/search.mjs +56 -45
  260. package/plugins/touchScroll/touchScroll.js +102 -100
  261. package/plugins/touchScroll/touchScroll.mjs +100 -98
  262. package/plugins/trimRows/trimRows.js +33 -28
  263. package/plugins/trimRows/trimRows.mjs +32 -27
  264. package/plugins/undoRedo/undoRedo.js +2 -2
  265. package/plugins/undoRedo/undoRedo.mjs +2 -2
  266. package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
  267. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
  268. package/renderers/baseRenderer/baseRenderer.js +2 -2
  269. package/renderers/baseRenderer/baseRenderer.mjs +2 -2
  270. package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
  271. package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
  272. package/renderers/dateRenderer/dateRenderer.js +4 -4
  273. package/renderers/dateRenderer/dateRenderer.mjs +4 -4
  274. package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
  275. package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
  276. package/renderers/htmlRenderer/htmlRenderer.js +4 -4
  277. package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
  278. package/renderers/numericRenderer/numericRenderer.js +3 -3
  279. package/renderers/numericRenderer/numericRenderer.mjs +3 -3
  280. package/renderers/passwordRenderer/passwordRenderer.js +3 -3
  281. package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
  282. package/renderers/selectRenderer/selectRenderer.js +4 -4
  283. package/renderers/selectRenderer/selectRenderer.mjs +4 -4
  284. package/renderers/textRenderer/textRenderer.js +5 -5
  285. package/renderers/textRenderer/textRenderer.mjs +5 -5
  286. package/renderers/timeRenderer/timeRenderer.js +3 -3
  287. package/renderers/timeRenderer/timeRenderer.mjs +3 -3
  288. package/selection/range.js +12 -2
  289. package/selection/range.mjs +12 -2
  290. package/selection/selection.js +28 -10
  291. package/selection/selection.mjs +28 -10
  292. package/selection/utils.js +24 -14
  293. package/selection/utils.mjs +25 -15
  294. package/shortcuts/manager.js +1 -1
  295. package/shortcuts/manager.mjs +1 -1
  296. package/tableView.js +208 -200
  297. package/tableView.mjs +208 -200
  298. package/translations/changesObservable/utils.js +2 -2
  299. package/translations/changesObservable/utils.mjs +2 -2
  300. package/translations/indexMapper.js +25 -22
  301. package/translations/indexMapper.mjs +25 -22
  302. package/translations/mapCollections/aggregatedCollection.js +8 -2
  303. package/translations/mapCollections/aggregatedCollection.mjs +8 -2
  304. package/translations/mapCollections/mapCollection.js +5 -2
  305. package/translations/mapCollections/mapCollection.mjs +5 -2
  306. package/translations/maps/indexMap.js +6 -1
  307. package/translations/maps/indexMap.mjs +6 -1
  308. package/translations/maps/utils/physicallyIndexed.js +2 -2
  309. package/translations/maps/utils/physicallyIndexed.mjs +2 -2
  310. package/utils/dataStructures/linkedList.js +10 -6
  311. package/utils/dataStructures/linkedList.mjs +10 -6
  312. package/utils/dataStructures/queue.js +1 -1
  313. package/utils/dataStructures/queue.mjs +1 -1
  314. package/utils/dataStructures/stack.js +1 -1
  315. package/utils/dataStructures/stack.mjs +1 -1
  316. package/utils/ghostTable.js +2 -2
  317. package/utils/ghostTable.mjs +2 -2
  318. package/utils/interval.js +73 -36
  319. package/utils/interval.mjs +73 -36
  320. package/utils/parseTable.js +1 -1
  321. package/utils/parseTable.mjs +1 -1
  322. package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
  323. package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
  324. package/validators/dateValidator/dateValidator.js +1 -1
  325. package/validators/dateValidator/dateValidator.mjs +1 -1
  326. package/validators/numericValidator/numericValidator.js +1 -1
  327. package/validators/numericValidator/numericValidator.mjs +1 -1
package/tableView.js CHANGED
@@ -21,26 +21,29 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
21
21
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
22
22
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
23
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
- const privatePool = new WeakMap();
25
-
26
24
  /**
27
25
  * @class TableView
28
26
  * @private
29
27
  */
30
28
  var _columnHeadersCount = /*#__PURE__*/new WeakMap();
31
29
  var _rowHeadersCount = /*#__PURE__*/new WeakMap();
30
+ var _selectionMouseDown = /*#__PURE__*/new WeakMap();
31
+ var _mouseDown = /*#__PURE__*/new WeakMap();
32
+ var _table = /*#__PURE__*/new WeakMap();
33
+ var _lastWidth = /*#__PURE__*/new WeakMap();
34
+ var _lastHeight = /*#__PURE__*/new WeakMap();
32
35
  class TableView {
33
36
  /**
34
- * @param {Hanstontable} instance Instance of {@link Handsontable}.
37
+ * @param {Hanstontable} hotInstance Instance of {@link Handsontable}.
35
38
  */
36
- constructor(instance) {
39
+ constructor(hotInstance) {
37
40
  /**
38
41
  * Instance of {@link Handsontable}.
39
42
  *
40
43
  * @private
41
44
  * @type {Handsontable}
42
45
  */
43
- _defineProperty(this, "instance", void 0);
46
+ _defineProperty(this, "hot", void 0);
44
47
  /**
45
48
  * Instance of {@link EventManager}.
46
49
  *
@@ -79,7 +82,6 @@ class TableView {
79
82
  /**
80
83
  * Main Walkontable instance.
81
84
  *
82
- * @private
83
85
  * @type {Walkontable}
84
86
  */
85
87
  _defineProperty(this, "activeWt", void 0);
@@ -112,42 +114,52 @@ class TableView {
112
114
  * @type {boolean}
113
115
  */
114
116
  _defineProperty(this, "postponedAdjustElementsSize", false);
115
- this.instance = instance;
116
- this.eventManager = new _eventManager.default(this.instance);
117
- this.settings = this.instance.getSettings();
118
- privatePool.set(this, {
119
- /**
120
- * Defines if the text should be selected during mousemove.
121
- *
122
- * @private
123
- * @type {boolean}
124
- */
125
- selectionMouseDown: false,
126
- /**
127
- * @private
128
- * @type {boolean}
129
- */
130
- mouseDown: void 0,
131
- /**
132
- * Main <TABLE> element.
133
- *
134
- * @private
135
- * @type {HTMLTableElement}
136
- */
137
- table: void 0,
138
- /**
139
- * Cached width of the rootElement.
140
- *
141
- * @type {number}
142
- */
143
- lastWidth: 0,
144
- /**
145
- * Cached height of the rootElement.
146
- *
147
- * @type {number}
148
- */
149
- lastHeight: 0
117
+ /**
118
+ * Defines if the text should be selected during mousemove.
119
+ *
120
+ * @type {boolean}
121
+ */
122
+ _classPrivateFieldInitSpec(this, _selectionMouseDown, {
123
+ writable: true,
124
+ value: false
125
+ });
126
+ /**
127
+ * @type {boolean}
128
+ */
129
+ _classPrivateFieldInitSpec(this, _mouseDown, {
130
+ writable: true,
131
+ value: void 0
132
+ });
133
+ /**
134
+ * Main <TABLE> element.
135
+ *
136
+ * @type {HTMLTableElement}
137
+ */
138
+ _classPrivateFieldInitSpec(this, _table, {
139
+ writable: true,
140
+ value: void 0
141
+ });
142
+ /**
143
+ * Cached width of the rootElement.
144
+ *
145
+ * @type {number}
146
+ */
147
+ _classPrivateFieldInitSpec(this, _lastWidth, {
148
+ writable: true,
149
+ value: 0
150
+ });
151
+ /**
152
+ * Cached height of the rootElement.
153
+ *
154
+ * @type {number}
155
+ */
156
+ _classPrivateFieldInitSpec(this, _lastHeight, {
157
+ writable: true,
158
+ value: 0
150
159
  });
160
+ this.hot = hotInstance;
161
+ this.eventManager = new _eventManager.default(this.hot);
162
+ this.settings = this.hot.getSettings();
151
163
  this.createElements();
152
164
  this.registerEvents();
153
165
  this.initializeWalkontable();
@@ -157,16 +169,16 @@ class TableView {
157
169
  * Renders WalkontableUI.
158
170
  */
159
171
  render() {
160
- if (!this.instance.isRenderSuspended()) {
161
- this.instance.runHooks('beforeRender', this.instance.forceFullRender);
172
+ if (!this.hot.isRenderSuspended()) {
173
+ this.hot.runHooks('beforeRender', this.hot.forceFullRender);
162
174
  if (this.postponedAdjustElementsSize) {
163
175
  this.postponedAdjustElementsSize = false;
164
176
  this.adjustElementsSize(true);
165
177
  }
166
- this._wt.draw(!this.instance.forceFullRender);
167
- this.instance.runHooks('afterRender', this.instance.forceFullRender);
168
- this.instance.forceFullRender = false;
169
- this.instance.renderCall = false;
178
+ this._wt.draw(!this.hot.forceFullRender);
179
+ this.hot.runHooks('afterRender', this.hot.forceFullRender);
180
+ this.hot.forceFullRender = false;
181
+ this.hot.renderCall = false;
170
182
  }
171
183
  }
172
184
 
@@ -177,7 +189,7 @@ class TableView {
177
189
  */
178
190
  adjustElementsSize() {
179
191
  let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
180
- if (this.instance.isRenderSuspended()) {
192
+ if (this.hot.isRenderSuspended()) {
181
193
  this.postponedAdjustElementsSize = true;
182
194
  } else {
183
195
  this._wt.wtOverlays.adjustElementsSize(force);
@@ -244,32 +256,31 @@ class TableView {
244
256
  * @private
245
257
  */
246
258
  createElements() {
247
- const priv = privatePool.get(this);
248
259
  const {
249
260
  rootElement,
250
261
  rootDocument
251
- } = this.instance;
262
+ } = this.hot;
252
263
  const originalStyle = rootElement.getAttribute('style');
253
264
  if (originalStyle) {
254
265
  rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
255
266
  }
256
267
 
257
268
  (0, _element.addClass)(rootElement, 'handsontable');
258
- priv.table = rootDocument.createElement('TABLE');
259
- (0, _element.addClass)(priv.table, 'htCore');
260
- if (this.instance.getSettings().tableClassName) {
261
- (0, _element.addClass)(priv.table, this.instance.getSettings().tableClassName);
269
+ _classPrivateFieldSet(this, _table, rootDocument.createElement('TABLE'));
270
+ (0, _element.addClass)(_classPrivateFieldGet(this, _table), 'htCore');
271
+ if (this.hot.getSettings().tableClassName) {
272
+ (0, _element.addClass)(_classPrivateFieldGet(this, _table), this.hot.getSettings().tableClassName);
262
273
  }
263
274
  if (this.settings.ariaTags) {
264
- (0, _element.setAttribute)(priv.table, [(0, _a11y.A11Y_PRESENTATION)()]);
265
- (0, _element.setAttribute)(rootElement, [(0, _a11y.A11Y_TREEGRID)(), (0, _a11y.A11Y_ROWCOUNT)(this.instance.countRows()), (0, _a11y.A11Y_COLCOUNT)(this.instance.countCols()), (0, _a11y.A11Y_MULTISELECTABLE)()]);
275
+ (0, _element.setAttribute)(_classPrivateFieldGet(this, _table), [(0, _a11y.A11Y_PRESENTATION)()]);
276
+ (0, _element.setAttribute)(rootElement, [(0, _a11y.A11Y_TREEGRID)(), (0, _a11y.A11Y_ROWCOUNT)(this.hot.countRows()), (0, _a11y.A11Y_COLCOUNT)(this.hot.countCols()), (0, _a11y.A11Y_MULTISELECTABLE)()]);
266
277
  }
267
278
  this.THEAD = rootDocument.createElement('THEAD');
268
- priv.table.appendChild(this.THEAD);
279
+ _classPrivateFieldGet(this, _table).appendChild(this.THEAD);
269
280
  this.TBODY = rootDocument.createElement('TBODY');
270
- priv.table.appendChild(this.TBODY);
271
- this.instance.table = priv.table;
272
- this.instance.container.insertBefore(priv.table, this.instance.container.firstChild);
281
+ _classPrivateFieldGet(this, _table).appendChild(this.TBODY);
282
+ this.hot.table = _classPrivateFieldGet(this, _table);
283
+ this.hot.container.insertBefore(_classPrivateFieldGet(this, _table), this.hot.container.firstChild);
273
284
  }
274
285
 
275
286
  /**
@@ -278,19 +289,18 @@ class TableView {
278
289
  * @private
279
290
  */
280
291
  registerEvents() {
281
- const priv = privatePool.get(this);
282
292
  const {
283
293
  rootElement,
284
294
  rootDocument,
285
295
  selection
286
- } = this.instance;
296
+ } = this.hot;
287
297
  const documentElement = rootDocument.documentElement;
288
298
  this.eventManager.addEventListener(rootElement, 'mousedown', event => {
289
- priv.selectionMouseDown = true;
299
+ _classPrivateFieldSet(this, _selectionMouseDown, true);
290
300
  if (!this.isTextSelectionAllowed(event.target)) {
291
301
  const {
292
302
  rootWindow
293
- } = this.instance;
303
+ } = this.hot;
294
304
  (0, _element.clearTextSelection)(rootWindow);
295
305
  event.preventDefault();
296
306
  rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
@@ -298,13 +308,13 @@ class TableView {
298
308
  });
299
309
 
300
310
  this.eventManager.addEventListener(rootElement, 'mouseup', () => {
301
- priv.selectionMouseDown = false;
311
+ _classPrivateFieldSet(this, _selectionMouseDown, false);
302
312
  });
303
313
  this.eventManager.addEventListener(rootElement, 'mousemove', event => {
304
- if (priv.selectionMouseDown && !this.isTextSelectionAllowed(event.target)) {
314
+ if (_classPrivateFieldGet(this, _selectionMouseDown) && !this.isTextSelectionAllowed(event.target)) {
305
315
  // Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.
306
316
  if (this.settings.fragmentSelection) {
307
- (0, _element.clearTextSelection)(this.instance.rootWindow);
317
+ (0, _element.clearTextSelection)(this.hot.rootWindow);
308
318
  }
309
319
  event.preventDefault();
310
320
  }
@@ -319,40 +329,40 @@ class TableView {
319
329
  if (selection.isInProgress() && (0, _event.isLeftClick)(event)) {
320
330
  selection.finish();
321
331
  }
322
- priv.mouseDown = false;
332
+ _classPrivateFieldSet(this, _mouseDown, false);
323
333
  const isOutsideInputElement = (0, _element.isOutsideInput)(rootDocument.activeElement);
324
334
  if (!isOutsideInputElement) {
325
335
  return;
326
336
  }
327
337
  if (isOutsideInputElement || !selection.isSelected() && !selection.isSelectedByAnyHeader() && !rootElement.contains(event.target) && !(0, _event.isRightClick)(event)) {
328
- this.instance.unlisten();
338
+ this.hot.unlisten();
329
339
  }
330
340
  });
331
341
  this.eventManager.addEventListener(documentElement, 'contextmenu', event => {
332
342
  if (selection.isInProgress() && (0, _event.isRightClick)(event)) {
333
343
  selection.finish();
334
- priv.mouseDown = false;
344
+ _classPrivateFieldSet(this, _mouseDown, false);
335
345
  }
336
346
  });
337
347
  this.eventManager.addEventListener(documentElement, 'touchend', () => {
338
348
  if (selection.isInProgress()) {
339
349
  selection.finish();
340
350
  }
341
- priv.mouseDown = false;
351
+ _classPrivateFieldSet(this, _mouseDown, false);
342
352
  });
343
353
  this.eventManager.addEventListener(documentElement, 'mousedown', event => {
344
354
  const originalTarget = event.target;
345
355
  const eventX = event.x || event.clientX;
346
356
  const eventY = event.y || event.clientY;
347
357
  let next = event.target;
348
- if (priv.mouseDown || !rootElement || !this.instance.view) {
358
+ if (_classPrivateFieldGet(this, _mouseDown) || !rootElement || !this.hot.view) {
349
359
  return; // it must have been started in a cell
350
360
  }
351
361
 
352
362
  // immediate click on "holder" means click on the right side of vertical scrollbar
353
363
  const {
354
364
  holder
355
- } = this.instance.view._wt.wtTable;
365
+ } = this.hot.view._wt.wtTable;
356
366
  if (next === holder) {
357
367
  const scrollbarWidth = (0, _element.getScrollbarWidth)(rootDocument);
358
368
  if (rootDocument.elementFromPoint(eventX + scrollbarWidth, eventY) !== holder || rootDocument.elementFromPoint(eventX, eventY + scrollbarWidth) !== holder) {
@@ -379,12 +389,12 @@ class TableView {
379
389
  // function did not return until here, we have an outside click!
380
390
  const outsideClickDeselects = typeof this.settings.outsideClickDeselects === 'function' ? this.settings.outsideClickDeselects(originalTarget) : this.settings.outsideClickDeselects;
381
391
  if (outsideClickDeselects) {
382
- this.instance.deselectCell();
392
+ this.hot.deselectCell();
383
393
  } else {
384
- this.instance.destroyEditor(false, false);
394
+ this.hot.destroyEditor(false, false);
385
395
  }
386
396
  });
387
- this.eventManager.addEventListener(priv.table, 'selectstart', event => {
397
+ this.eventManager.addEventListener(_classPrivateFieldGet(this, _table), 'selectstart', event => {
388
398
  if (this.settings.fragmentSelection || (0, _element.isInput)(event.target)) {
389
399
  return;
390
400
  }
@@ -406,7 +416,7 @@ class TableView {
406
416
  col
407
417
  } = _ref;
408
418
  // TODO: To consider an idea to reusing the CellCoords instance instead creating new one.
409
- return this.instance._createCellCoords(...this.translateFromRenderableToVisualIndex(row, col));
419
+ return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(row, col));
410
420
  }
411
421
 
412
422
  /**
@@ -419,8 +429,8 @@ class TableView {
419
429
  translateFromRenderableToVisualIndex(renderableRow, renderableColumn) {
420
430
  // TODO: Some helper may be needed.
421
431
  // We perform translation for indexes (without headers).
422
- let visualRow = renderableRow >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;
423
- let visualColumn = renderableColumn >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;
432
+ let visualRow = renderableRow >= 0 ? this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;
433
+ let visualColumn = renderableColumn >= 0 ? this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;
424
434
  if (visualRow === null) {
425
435
  visualRow = renderableRow;
426
436
  }
@@ -457,7 +467,7 @@ class TableView {
457
467
  * @returns {number}
458
468
  */
459
469
  countRenderableColumns() {
460
- return this.countRenderableIndexes(this.instance.columnIndexMapper, this.settings.maxCols);
470
+ return this.countRenderableIndexes(this.hot.columnIndexMapper, this.settings.maxCols);
461
471
  }
462
472
 
463
473
  /**
@@ -466,7 +476,7 @@ class TableView {
466
476
  * @returns {number}
467
477
  */
468
478
  countRenderableRows() {
469
- return this.countRenderableIndexes(this.instance.rowIndexMapper, this.settings.maxRows);
479
+ return this.countRenderableIndexes(this.hot.rowIndexMapper, this.settings.maxRows);
470
480
  }
471
481
 
472
482
  /**
@@ -478,7 +488,7 @@ class TableView {
478
488
  * @returns {number}
479
489
  */
480
490
  countNotHiddenRowIndexes(visualIndex, incrementBy) {
481
- return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.rowIndexMapper, this.countRenderableRows());
491
+ return this.countNotHiddenIndexes(visualIndex, incrementBy, this.hot.rowIndexMapper, this.countRenderableRows());
482
492
  }
483
493
 
484
494
  /**
@@ -490,7 +500,7 @@ class TableView {
490
500
  * @returns {number}
491
501
  */
492
502
  countNotHiddenColumnIndexes(visualIndex, incrementBy) {
493
- return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.columnIndexMapper, this.countRenderableColumns());
503
+ return this.countNotHiddenIndexes(visualIndex, incrementBy, this.hot.columnIndexMapper, this.countRenderableColumns());
494
504
  }
495
505
 
496
506
  /**
@@ -529,7 +539,7 @@ class TableView {
529
539
  * @returns {number}
530
540
  */
531
541
  countNotHiddenFixedColumnsStart() {
532
- const countCols = this.instance.countCols();
542
+ const countCols = this.hot.countCols();
533
543
  const visualFixedColumnsStart = Math.min(parseInt(this.settings.fixedColumnsStart, 10), countCols) - 1;
534
544
  return this.countNotHiddenColumnIndexes(visualFixedColumnsStart, -1);
535
545
  }
@@ -541,7 +551,7 @@ class TableView {
541
551
  * @returns {number}
542
552
  */
543
553
  countNotHiddenFixedRowsTop() {
544
- const countRows = this.instance.countRows();
554
+ const countRows = this.hot.countRows();
545
555
  const visualFixedRowsTop = Math.min(parseInt(this.settings.fixedRowsTop, 10), countRows) - 1;
546
556
  return this.countNotHiddenRowIndexes(visualFixedRowsTop, -1);
547
557
  }
@@ -553,7 +563,7 @@ class TableView {
553
563
  * @returns {number}
554
564
  */
555
565
  countNotHiddenFixedRowsBottom() {
556
- const countRows = this.instance.countRows();
566
+ const countRows = this.hot.countRows();
557
567
  const visualFixedRowsBottom = Math.max(countRows - parseInt(this.settings.fixedRowsBottom, 10), 0);
558
568
  return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);
559
569
  }
@@ -568,7 +578,7 @@ class TableView {
568
578
  countRenderableColumnsInRange(columnStart, columnEnd) {
569
579
  let count = 0;
570
580
  for (let column = columnStart; column <= columnEnd; column++) {
571
- if (this.instance.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
581
+ if (this.hot.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
572
582
  count += 1;
573
583
  }
574
584
  }
@@ -585,7 +595,7 @@ class TableView {
585
595
  countRenderableRowsInRange(rowStart, rowEnd) {
586
596
  let count = 0;
587
597
  for (let row = rowStart; row <= rowEnd; row++) {
588
- if (this.instance.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
598
+ if (this.hot.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
589
599
  count += 1;
590
600
  }
591
601
  }
@@ -601,7 +611,7 @@ class TableView {
601
611
  isMainTableNotFullyCoveredByOverlays() {
602
612
  const fixedAllRows = this.countNotHiddenFixedRowsTop() + this.countNotHiddenFixedRowsBottom();
603
613
  const fixedAllColumns = this.countNotHiddenFixedColumnsStart();
604
- return this.instance.countRenderedRows() > fixedAllRows && this.instance.countRenderedCols() > fixedAllColumns;
614
+ return this.hot.countRenderedRows() > fixedAllRows && this.hot.countRenderedCols() > fixedAllColumns;
605
615
  }
606
616
 
607
617
  /**
@@ -610,18 +620,17 @@ class TableView {
610
620
  * @private
611
621
  */
612
622
  initializeWalkontable() {
613
- const priv = privatePool.get(this);
614
623
  const walkontableConfig = {
615
624
  ariaTags: this.settings.ariaTags,
616
- rtlMode: this.instance.isRtl(),
617
- externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),
618
- table: priv.table,
619
- isDataViewInstance: () => (0, _rootInstance.isRootInstance)(this.instance),
625
+ rtlMode: this.hot.isRtl(),
626
+ externalRowCalculator: this.hot.getPlugin('autoRowSize') && this.hot.getPlugin('autoRowSize').isEnabled(),
627
+ table: _classPrivateFieldGet(this, _table),
628
+ isDataViewInstance: () => (0, _rootInstance.isRootInstance)(this.hot),
620
629
  preventOverflow: () => this.settings.preventOverflow,
621
630
  preventWheel: () => this.settings.preventWheel,
622
631
  stretchH: () => this.settings.stretchH,
623
632
  data: (renderableRow, renderableColumn) => {
624
- return this.instance.getDataAtCell(...this.translateFromRenderableToVisualIndex(renderableRow, renderableColumn));
633
+ return this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(renderableRow, renderableColumn));
625
634
  },
626
635
  totalRows: () => this.countRenderableRows(),
627
636
  totalColumns: () => this.countRenderableColumns(),
@@ -647,74 +656,74 @@ class TableView {
647
656
  renderAllRows: this.settings.renderAllRows,
648
657
  rowHeaders: () => {
649
658
  const headerRenderers = [];
650
- if (this.instance.hasRowHeaders()) {
659
+ if (this.hot.hasRowHeaders()) {
651
660
  headerRenderers.push((renderableRowIndex, TH) => {
652
661
  // TODO: Some helper may be needed.
653
662
  // We perform translation for row indexes (without row headers).
654
- const visualRowIndex = renderableRowIndex >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
663
+ const visualRowIndex = renderableRowIndex >= 0 ? this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
655
664
  this.appendRowHeader(visualRowIndex, TH);
656
665
  });
657
666
  }
658
- this.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);
667
+ this.hot.runHooks('afterGetRowHeaderRenderers', headerRenderers);
659
668
  _classPrivateFieldSet(this, _rowHeadersCount, headerRenderers.length);
660
669
  return headerRenderers;
661
670
  },
662
671
  columnHeaders: () => {
663
672
  const headerRenderers = [];
664
- if (this.instance.hasColHeaders()) {
673
+ if (this.hot.hasColHeaders()) {
665
674
  headerRenderers.push((renderedColumnIndex, TH) => {
666
675
  // TODO: Some helper may be needed.
667
676
  // We perform translation for columns indexes (without column headers).
668
- const visualColumnsIndex = renderedColumnIndex >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;
677
+ const visualColumnsIndex = renderedColumnIndex >= 0 ? this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;
669
678
  this.appendColHeader(visualColumnsIndex, TH);
670
679
  });
671
680
  }
672
- this.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
681
+ this.hot.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
673
682
  _classPrivateFieldSet(this, _columnHeadersCount, headerRenderers.length);
674
683
  return headerRenderers;
675
684
  },
676
685
  columnWidth: renderedColumnIndex => {
677
- const visualIndex = this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
686
+ const visualIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
678
687
 
679
688
  // It's not a bug that we can't find visual index for some handled by method indexes. The function is called also
680
689
  // for indexes that are not displayed (indexes that are beyond the grid's boundaries), i.e. when `fixedColumnsStart` > `startCols` (wrong config?) or
681
690
  // scrolling and dataset is empty (scroll should handle that?).
682
- return this.instance.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);
691
+ return this.hot.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);
683
692
  },
684
693
  rowHeight: renderedRowIndex => {
685
- const visualIndex = this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);
686
- return this.instance.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);
694
+ const visualIndex = this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);
695
+ return this.hot.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);
687
696
  },
688
697
  cellRenderer: (renderedRowIndex, renderedColumnIndex, TD) => {
689
698
  const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex);
690
699
 
691
700
  // Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.
692
- const modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
701
+ const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
693
702
  let visualRowToCheck = visualRowIndex;
694
703
  let visualColumnToCheck = visualColumnIndex;
695
704
  if (Array.isArray(modifiedCellCoords)) {
696
705
  [visualRowToCheck, visualColumnToCheck] = modifiedCellCoords;
697
706
  }
698
- const cellProperties = this.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);
699
- const prop = this.instance.colToProp(visualColumnToCheck);
700
- let value = this.instance.getDataAtRowProp(visualRowToCheck, prop);
701
- if (this.instance.hasHook('beforeValueRender')) {
702
- value = this.instance.runHooks('beforeValueRender', value, cellProperties);
707
+ const cellProperties = this.hot.getCellMeta(visualRowToCheck, visualColumnToCheck);
708
+ const prop = this.hot.colToProp(visualColumnToCheck);
709
+ let value = this.hot.getDataAtRowProp(visualRowToCheck, prop);
710
+ if (this.hot.hasHook('beforeValueRender')) {
711
+ value = this.hot.runHooks('beforeValueRender', value, cellProperties);
703
712
  }
704
- this.instance.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
705
- this.instance.getCellRenderer(cellProperties)(this.instance, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
706
- this.instance.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
713
+ this.hot.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
714
+ this.hot.getCellRenderer(cellProperties)(this.hot, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
715
+ this.hot.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
707
716
  },
708
- selections: this.instance.selection.highlight,
717
+ selections: this.hot.selection.highlight,
709
718
  hideBorderOnMouseDownOver: () => this.settings.fragmentSelection,
710
719
  onWindowResize: () => {
711
- if (this.instance && !this.instance.isDestroyed) {
712
- this.instance.refreshDimensions();
720
+ if (this.hot && !this.hot.isDestroyed) {
721
+ this.hot.refreshDimensions();
713
722
  }
714
723
  },
715
724
  onContainerElementResize: () => {
716
- if (this.instance && !this.instance.isDestroyed && (0, _element.isVisible)(this.instance.rootElement)) {
717
- this.instance.refreshDimensions();
725
+ if (this.hot && !this.hot.isDestroyed && (0, _element.isVisible)(this.hot.rootElement)) {
726
+ this.hot.refreshDimensions();
718
727
  }
719
728
  },
720
729
  onCellMouseDown: (event, coords, TD, wt) => {
@@ -724,44 +733,44 @@ class TableView {
724
733
  column: false,
725
734
  cell: false
726
735
  };
727
- this.instance.listen();
736
+ this.hot.listen();
728
737
  this.activeWt = wt;
729
- priv.mouseDown = true;
730
- this.instance.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
738
+ _classPrivateFieldSet(this, _mouseDown, true);
739
+ this.hot.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
731
740
  if ((0, _event.isImmediatePropagationStopped)(event)) {
732
741
  return;
733
742
  }
734
743
  (0, _mouseEventHandler.handleMouseEvent)(event, {
735
744
  coords: visualCoords,
736
- selection: this.instance.selection,
745
+ selection: this.hot.selection,
737
746
  controller,
738
- cellCoordsFactory: (row, column) => this.instance._createCellCoords(row, column)
747
+ cellCoordsFactory: (row, column) => this.hot._createCellCoords(row, column)
739
748
  });
740
- this.instance.runHooks('afterOnCellMouseDown', event, visualCoords, TD);
749
+ this.hot.runHooks('afterOnCellMouseDown', event, visualCoords, TD);
741
750
  this.activeWt = this._wt;
742
751
  },
743
752
  onCellContextMenu: (event, coords, TD, wt) => {
744
753
  const visualCoords = this.translateFromRenderableToVisualCoords(coords);
745
754
  this.activeWt = wt;
746
- priv.mouseDown = false;
747
- if (this.instance.selection.isInProgress()) {
748
- this.instance.selection.finish();
755
+ _classPrivateFieldSet(this, _mouseDown, false);
756
+ if (this.hot.selection.isInProgress()) {
757
+ this.hot.selection.finish();
749
758
  }
750
- this.instance.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);
759
+ this.hot.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);
751
760
  if ((0, _event.isImmediatePropagationStopped)(event)) {
752
761
  return;
753
762
  }
754
- this.instance.runHooks('afterOnCellContextMenu', event, visualCoords, TD);
763
+ this.hot.runHooks('afterOnCellContextMenu', event, visualCoords, TD);
755
764
  this.activeWt = this._wt;
756
765
  },
757
766
  onCellMouseOut: (event, coords, TD, wt) => {
758
767
  const visualCoords = this.translateFromRenderableToVisualCoords(coords);
759
768
  this.activeWt = wt;
760
- this.instance.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);
769
+ this.hot.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);
761
770
  if ((0, _event.isImmediatePropagationStopped)(event)) {
762
771
  return;
763
772
  }
764
- this.instance.runHooks('afterOnCellMouseOut', event, visualCoords, TD);
773
+ this.hot.runHooks('afterOnCellMouseOut', event, visualCoords, TD);
765
774
  this.activeWt = this._wt;
766
775
  },
767
776
  onCellMouseOver: (event, coords, TD, wt) => {
@@ -772,48 +781,48 @@ class TableView {
772
781
  cell: false
773
782
  };
774
783
  this.activeWt = wt;
775
- this.instance.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);
784
+ this.hot.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);
776
785
  if ((0, _event.isImmediatePropagationStopped)(event)) {
777
786
  return;
778
787
  }
779
- if (priv.mouseDown) {
788
+ if (_classPrivateFieldGet(this, _mouseDown)) {
780
789
  (0, _mouseEventHandler.handleMouseEvent)(event, {
781
790
  coords: visualCoords,
782
- selection: this.instance.selection,
791
+ selection: this.hot.selection,
783
792
  controller,
784
- cellCoordsFactory: (row, column) => this.instance._createCellCoords(row, column)
793
+ cellCoordsFactory: (row, column) => this.hot._createCellCoords(row, column)
785
794
  });
786
795
  }
787
- this.instance.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
796
+ this.hot.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
788
797
  this.activeWt = this._wt;
789
798
  },
790
799
  onCellMouseUp: (event, coords, TD, wt) => {
791
800
  const visualCoords = this.translateFromRenderableToVisualCoords(coords);
792
801
  this.activeWt = wt;
793
- this.instance.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);
802
+ this.hot.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);
794
803
 
795
804
  // TODO: The second condition check is a workaround. Callback corresponding the method `updateSettings`
796
805
  // disable plugin and enable it again. Disabling plugin closes the menu. Thus, calling the
797
806
  // `updateSettings` in a body of any callback executed right after some context-menu action
798
807
  // breaks the table (#7231).
799
- if ((0, _event.isImmediatePropagationStopped)(event) || this.instance.isDestroyed) {
808
+ if ((0, _event.isImmediatePropagationStopped)(event) || this.hot.isDestroyed) {
800
809
  return;
801
810
  }
802
- this.instance.runHooks('afterOnCellMouseUp', event, visualCoords, TD);
811
+ this.hot.runHooks('afterOnCellMouseUp', event, visualCoords, TD);
803
812
  this.activeWt = this._wt;
804
813
  },
805
814
  onCellCornerMouseDown: event => {
806
815
  event.preventDefault();
807
- this.instance.runHooks('afterOnCellCornerMouseDown', event);
816
+ this.hot.runHooks('afterOnCellCornerMouseDown', event);
808
817
  },
809
818
  onCellCornerDblClick: event => {
810
819
  event.preventDefault();
811
- this.instance.runHooks('afterOnCellCornerDblClick', event);
820
+ this.hot.runHooks('afterOnCellCornerDblClick', event);
812
821
  },
813
822
  beforeDraw: (force, skipRender) => this.beforeRender(force, skipRender),
814
823
  onDraw: force => this.afterRender(force),
815
824
  onBeforeViewportScrollVertically: renderableRow => {
816
- const rowMapper = this.instance.rowIndexMapper;
825
+ const rowMapper = this.hot.rowIndexMapper;
817
826
  const areColumnHeadersSelected = renderableRow < 0;
818
827
  let visualRow = renderableRow;
819
828
  if (!areColumnHeadersSelected) {
@@ -824,15 +833,15 @@ class TableView {
824
833
  return renderableRow;
825
834
  }
826
835
  }
827
- visualRow = this.instance.runHooks('beforeViewportScrollVertically', visualRow);
828
- this.instance.runHooks('beforeViewportScroll');
836
+ visualRow = this.hot.runHooks('beforeViewportScrollVertically', visualRow);
837
+ this.hot.runHooks('beforeViewportScroll');
829
838
  if (!areColumnHeadersSelected) {
830
839
  return rowMapper.getRenderableFromVisualIndex(visualRow);
831
840
  }
832
841
  return visualRow;
833
842
  },
834
843
  onBeforeViewportScrollHorizontally: renderableColumn => {
835
- const columnMapper = this.instance.columnIndexMapper;
844
+ const columnMapper = this.hot.columnIndexMapper;
836
845
  const areRowHeadersSelected = renderableColumn < 0;
837
846
  let visualColumn = renderableColumn;
838
847
  if (!areRowHeadersSelected) {
@@ -843,43 +852,43 @@ class TableView {
843
852
  return renderableColumn;
844
853
  }
845
854
  }
846
- visualColumn = this.instance.runHooks('beforeViewportScrollHorizontally', visualColumn);
847
- this.instance.runHooks('beforeViewportScroll');
855
+ visualColumn = this.hot.runHooks('beforeViewportScrollHorizontally', visualColumn);
856
+ this.hot.runHooks('beforeViewportScroll');
848
857
  if (!areRowHeadersSelected) {
849
858
  return columnMapper.getRenderableFromVisualIndex(visualColumn);
850
859
  }
851
860
  return visualColumn;
852
861
  },
853
862
  onScrollVertically: () => {
854
- this.instance.runHooks('afterScrollVertically');
855
- this.instance.runHooks('afterScroll');
863
+ this.hot.runHooks('afterScrollVertically');
864
+ this.hot.runHooks('afterScroll');
856
865
  },
857
866
  onScrollHorizontally: () => {
858
- this.instance.runHooks('afterScrollHorizontally');
859
- this.instance.runHooks('afterScroll');
867
+ this.hot.runHooks('afterScrollHorizontally');
868
+ this.hot.runHooks('afterScroll');
860
869
  },
861
- onBeforeRemoveCellClassNames: () => this.instance.runHooks('beforeRemoveCellClassNames'),
870
+ onBeforeRemoveCellClassNames: () => this.hot.runHooks('beforeRemoveCellClassNames'),
862
871
  onBeforeHighlightingRowHeader: (renderableRow, headerLevel, highlightMeta) => {
863
- const rowMapper = this.instance.rowIndexMapper;
872
+ const rowMapper = this.hot.rowIndexMapper;
864
873
  const areColumnHeadersSelected = renderableRow < 0;
865
874
  let visualRow = renderableRow;
866
875
  if (!areColumnHeadersSelected) {
867
876
  visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
868
877
  }
869
- const newVisualRow = this.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
878
+ const newVisualRow = this.hot.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
870
879
  if (!areColumnHeadersSelected) {
871
880
  return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
872
881
  }
873
882
  return newVisualRow;
874
883
  },
875
884
  onBeforeHighlightingColumnHeader: (renderableColumn, headerLevel, highlightMeta) => {
876
- const columnMapper = this.instance.columnIndexMapper;
885
+ const columnMapper = this.hot.columnIndexMapper;
877
886
  const areRowHeadersSelected = renderableColumn < 0;
878
887
  let visualColumn = renderableColumn;
879
888
  if (!areRowHeadersSelected) {
880
889
  visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
881
890
  }
882
- const newVisualColumn = this.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
891
+ const newVisualColumn = this.hot.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
883
892
  if (!areRowHeadersSelected) {
884
893
  return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
885
894
  }
@@ -888,34 +897,34 @@ class TableView {
888
897
  onAfterDrawSelection: (currentRow, currentColumn, layerLevel) => {
889
898
  let cornersOfSelection;
890
899
  const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(currentRow, currentColumn);
891
- const selectedRange = this.instance.selection.getSelectedRange();
900
+ const selectedRange = this.hot.selection.getSelectedRange();
892
901
  const selectionRangeSize = selectedRange.size();
893
902
  if (selectionRangeSize > 0) {
894
903
  const selectionForLayer = selectedRange.peekByIndex(layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0);
895
904
  cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];
896
905
  }
897
- return this.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
906
+ return this.hot.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
898
907
  },
899
908
  onBeforeDrawBorders: (corners, borderClassName) => {
900
909
  const [startRenderableRow, startRenderableColumn, endRenderableRow, endRenderableColumn] = corners;
901
- const visualCorners = [this.instance.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), this.instance.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), this.instance.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), this.instance.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];
902
- return this.instance.runHooks('beforeDrawBorders', visualCorners, borderClassName);
910
+ const visualCorners = [this.hot.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), this.hot.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), this.hot.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), this.hot.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];
911
+ return this.hot.runHooks('beforeDrawBorders', visualCorners, borderClassName);
903
912
  },
904
- onBeforeTouchScroll: () => this.instance.runHooks('beforeTouchScroll'),
905
- onAfterMomentumScroll: () => this.instance.runHooks('afterMomentumScroll'),
913
+ onBeforeTouchScroll: () => this.hot.runHooks('beforeTouchScroll'),
914
+ onAfterMomentumScroll: () => this.hot.runHooks('afterMomentumScroll'),
906
915
  onBeforeStretchingColumnWidth: (stretchedWidth, renderedColumnIndex) => {
907
- const visualColumnIndex = this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
908
- return this.instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
916
+ const visualColumnIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
917
+ return this.hot.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
909
918
  },
910
- onModifyRowHeaderWidth: rowHeaderWidth => this.instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth),
919
+ onModifyRowHeaderWidth: rowHeaderWidth => this.hot.runHooks('modifyRowHeaderWidth', rowHeaderWidth),
911
920
  onModifyGetCellCoords: (renderableRowIndex, renderableColumnIndex, topmost) => {
912
- const rowMapper = this.instance.rowIndexMapper;
913
- const columnMapper = this.instance.columnIndexMapper;
921
+ const rowMapper = this.hot.rowIndexMapper;
922
+ const columnMapper = this.hot.columnIndexMapper;
914
923
 
915
924
  // Callback handle also headers. We shouldn't translate them.
916
925
  const visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;
917
926
  const visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
918
- const visualIndexes = this.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
927
+ const visualIndexes = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
919
928
  if (Array.isArray(visualIndexes)) {
920
929
  const [visualRowFrom, visualColumnFrom, visualRowTo, visualColumnTo] = visualIndexes;
921
930
 
@@ -941,7 +950,7 @@ class TableView {
941
950
  calc.endRow = Math.min(lastRenderedRow + offset, renderableRows - 1);
942
951
  }
943
952
  }
944
- this.instance.runHooks('afterViewportRowCalculatorOverride', calc);
953
+ this.hot.runHooks('afterViewportRowCalculatorOverride', calc);
945
954
  },
946
955
  viewportColumnCalculatorOverride: calc => {
947
956
  let viewportOffset = this.settings.viewportColumnRenderingOffset;
@@ -962,15 +971,15 @@ class TableView {
962
971
  calc.endColumn = Math.min(lastRenderedColumn + offset, renderableColumns - 1);
963
972
  }
964
973
  }
965
- this.instance.runHooks('afterViewportColumnCalculatorOverride', calc);
974
+ this.hot.runHooks('afterViewportColumnCalculatorOverride', calc);
966
975
  },
967
976
  rowHeaderWidth: () => this.settings.rowHeaderWidth,
968
977
  columnHeaderHeight: () => {
969
- const columnHeaderHeight = this.instance.runHooks('modifyColumnHeaderHeight');
978
+ const columnHeaderHeight = this.hot.runHooks('modifyColumnHeaderHeight');
970
979
  return this.settings.columnHeaderHeight || columnHeaderHeight;
971
980
  }
972
981
  };
973
- this.instance.runHooks('beforeInitWalkontable', walkontableConfig);
982
+ this.hot.runHooks('beforeInitWalkontable', walkontableConfig);
974
983
  this._wt = new _src.default(walkontableConfig);
975
984
  this.activeWt = this._wt;
976
985
  const spreader = this._wt.wtTable.spreader;
@@ -978,7 +987,7 @@ class TableView {
978
987
  const {
979
988
  width,
980
989
  height
981
- } = this.instance.rootElement.getBoundingClientRect();
990
+ } = this.hot.rootElement.getBoundingClientRect();
982
991
  this.setLastSize(width, height);
983
992
  this.eventManager.addEventListener(spreader, 'mousedown', event => {
984
993
  // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
@@ -992,10 +1001,10 @@ class TableView {
992
1001
  event.stopPropagation();
993
1002
  }
994
1003
  });
995
- this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'click', () => {
1004
+ this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'click', () => {
996
1005
  if (this.settings.observeDOMVisibility) {
997
1006
  if (this._wt.drawInterrupted) {
998
- this.instance.forceFullRender = true;
1007
+ this.hot.forceFullRender = true;
999
1008
  this.render();
1000
1009
  }
1001
1010
  }
@@ -1013,7 +1022,7 @@ class TableView {
1013
1022
  if ((0, _element.isInput)(el)) {
1014
1023
  return true;
1015
1024
  }
1016
- const isChildOfTableBody = (0, _element.isChildOf)(el, this.instance.view._wt.wtTable.spreader);
1025
+ const isChildOfTableBody = (0, _element.isChildOf)(el, this.hot.view._wt.wtTable.spreader);
1017
1026
  if (this.settings.fragmentSelection === true && isChildOfTableBody) {
1018
1027
  return true;
1019
1028
  }
@@ -1033,7 +1042,7 @@ class TableView {
1033
1042
  * @returns {boolean}
1034
1043
  */
1035
1044
  isMouseDown() {
1036
- return privatePool.get(this).mouseDown;
1045
+ return _classPrivateFieldGet(this, _mouseDown);
1037
1046
  }
1038
1047
 
1039
1048
  /**
@@ -1043,8 +1052,8 @@ class TableView {
1043
1052
  * @returns {boolean}
1044
1053
  */
1045
1054
  isSelectedOnlyCell() {
1046
- var _this$instance$getSel, _this$instance$getSel2;
1047
- return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.isSingleCell()) !== null && _this$instance$getSel !== void 0 ? _this$instance$getSel : false;
1055
+ var _this$hot$getSelected, _this$hot$getSelected2;
1056
+ return (_this$hot$getSelected = (_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingleCell()) !== null && _this$hot$getSelected !== void 0 ? _this$hot$getSelected : false;
1048
1057
  }
1049
1058
 
1050
1059
  /**
@@ -1054,7 +1063,7 @@ class TableView {
1054
1063
  * @returns {boolean}
1055
1064
  */
1056
1065
  isCellEdited() {
1057
- const activeEditor = this.instance.getActiveEditor();
1066
+ const activeEditor = this.hot.getActiveEditor();
1058
1067
  return activeEditor && activeEditor.isOpened();
1059
1068
  }
1060
1069
 
@@ -1069,8 +1078,8 @@ class TableView {
1069
1078
  */
1070
1079
  beforeRender(force, skipRender) {
1071
1080
  if (force) {
1072
- // this.instance.forceFullRender = did Handsontable request full render?
1073
- this.instance.runHooks('beforeViewRender', this.instance.forceFullRender, skipRender);
1081
+ // this.hot.forceFullRender = did Handsontable request full render?
1082
+ this.hot.runHooks('beforeViewRender', this.hot.forceFullRender, skipRender);
1074
1083
  }
1075
1084
  }
1076
1085
 
@@ -1083,8 +1092,8 @@ class TableView {
1083
1092
  */
1084
1093
  afterRender(force) {
1085
1094
  if (force) {
1086
- // this.instance.forceFullRender = did Handsontable request full render?
1087
- this.instance.runHooks('afterViewRender', this.instance.forceFullRender);
1095
+ // this.hot.forceFullRender = did Handsontable request full render?
1096
+ this.hot.runHooks('afterViewRender', this.hot.forceFullRender);
1088
1097
  }
1089
1098
  }
1090
1099
 
@@ -1103,12 +1112,12 @@ class TableView {
1103
1112
  this.appendRowHeader(visualRowIndex, TH);
1104
1113
  return;
1105
1114
  }
1106
- this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.instance.getRowHeader);
1115
+ this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.hot.getRowHeader);
1107
1116
  } else {
1108
1117
  const {
1109
1118
  rootDocument,
1110
1119
  getRowHeader
1111
- } = this.instance;
1120
+ } = this.hot;
1112
1121
  const div = rootDocument.createElement('div');
1113
1122
  const span = rootDocument.createElement('span');
1114
1123
  div.className = 'relative';
@@ -1117,7 +1126,7 @@ class TableView {
1117
1126
  div.appendChild(span);
1118
1127
  TH.appendChild(div);
1119
1128
  }
1120
- this.instance.runHooks('afterGetRowHeader', visualRowIndex, TH);
1129
+ this.hot.runHooks('afterGetRowHeader', visualRowIndex, TH);
1121
1130
  }
1122
1131
 
1123
1132
  /**
@@ -1131,7 +1140,7 @@ class TableView {
1131
1140
  * values counting from 0 to N).
1132
1141
  */
1133
1142
  appendColHeader(visualColumnIndex, TH) {
1134
- let label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.instance.getColHeader;
1143
+ let label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hot.getColHeader;
1135
1144
  let headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1136
1145
  if (TH.firstChild) {
1137
1146
  const container = TH.firstChild;
@@ -1144,7 +1153,7 @@ class TableView {
1144
1153
  } else {
1145
1154
  const {
1146
1155
  rootDocument
1147
- } = this.instance;
1156
+ } = this.hot;
1148
1157
  const div = rootDocument.createElement('div');
1149
1158
  const span = rootDocument.createElement('span');
1150
1159
  div.className = 'relative';
@@ -1153,7 +1162,7 @@ class TableView {
1153
1162
  div.appendChild(span);
1154
1163
  TH.appendChild(div);
1155
1164
  }
1156
- this.instance.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);
1165
+ this.hot.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);
1157
1166
  }
1158
1167
 
1159
1168
  /**
@@ -1223,8 +1232,8 @@ class TableView {
1223
1232
  * @param {number} height The table height.
1224
1233
  */
1225
1234
  setLastSize(width, height) {
1226
- const priv = privatePool.get(this);
1227
- [priv.lastWidth, priv.lastHeight] = [width, height];
1235
+ _classPrivateFieldSet(this, _lastWidth, width);
1236
+ _classPrivateFieldSet(this, _lastHeight, height);
1228
1237
  }
1229
1238
 
1230
1239
  /**
@@ -1233,10 +1242,9 @@ class TableView {
1233
1242
  * @returns {object}
1234
1243
  */
1235
1244
  getLastSize() {
1236
- const priv = privatePool.get(this);
1237
1245
  return {
1238
- width: priv.lastWidth,
1239
- height: priv.lastHeight
1246
+ width: _classPrivateFieldGet(this, _lastWidth),
1247
+ height: _classPrivateFieldGet(this, _lastHeight)
1240
1248
  };
1241
1249
  }
1242
1250
 
@@ -1246,7 +1254,7 @@ class TableView {
1246
1254
  * @returns {number}
1247
1255
  */
1248
1256
  getFirstFullyVisibleRow() {
1249
- return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleRow());
1257
+ return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow());
1250
1258
  }
1251
1259
 
1252
1260
  /**
@@ -1255,7 +1263,7 @@ class TableView {
1255
1263
  * @returns {number}
1256
1264
  */
1257
1265
  getLastFullyVisibleRow() {
1258
- return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleRow());
1266
+ return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow());
1259
1267
  }
1260
1268
 
1261
1269
  /**
@@ -1264,7 +1272,7 @@ class TableView {
1264
1272
  * @returns {number}
1265
1273
  */
1266
1274
  getFirstFullyVisibleColumn() {
1267
- return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleColumn());
1275
+ return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn());
1268
1276
  }
1269
1277
 
1270
1278
  /**
@@ -1273,7 +1281,7 @@ class TableView {
1273
1281
  * @returns {number}
1274
1282
  */
1275
1283
  getLastFullyVisibleColumn() {
1276
- return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn());
1284
+ return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn());
1277
1285
  }
1278
1286
 
1279
1287
  /**