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.mjs CHANGED
@@ -17,26 +17,29 @@ import Walkontable from "./3rdparty/walkontable/src/index.mjs";
17
17
  import { handleMouseEvent } from "./selection/mouseEventHandler.mjs";
18
18
  import { isRootInstance } from "./utils/rootInstance.mjs";
19
19
  import { A11Y_COLCOUNT, A11Y_MULTISELECTABLE, A11Y_PRESENTATION, A11Y_ROWCOUNT, A11Y_TREEGRID } from "./helpers/a11y.mjs";
20
- const privatePool = new WeakMap();
21
-
22
20
  /**
23
21
  * @class TableView
24
22
  * @private
25
23
  */
26
24
  var _columnHeadersCount = /*#__PURE__*/new WeakMap();
27
25
  var _rowHeadersCount = /*#__PURE__*/new WeakMap();
26
+ var _selectionMouseDown = /*#__PURE__*/new WeakMap();
27
+ var _mouseDown = /*#__PURE__*/new WeakMap();
28
+ var _table = /*#__PURE__*/new WeakMap();
29
+ var _lastWidth = /*#__PURE__*/new WeakMap();
30
+ var _lastHeight = /*#__PURE__*/new WeakMap();
28
31
  class TableView {
29
32
  /**
30
- * @param {Hanstontable} instance Instance of {@link Handsontable}.
33
+ * @param {Hanstontable} hotInstance Instance of {@link Handsontable}.
31
34
  */
32
- constructor(instance) {
35
+ constructor(hotInstance) {
33
36
  /**
34
37
  * Instance of {@link Handsontable}.
35
38
  *
36
39
  * @private
37
40
  * @type {Handsontable}
38
41
  */
39
- _defineProperty(this, "instance", void 0);
42
+ _defineProperty(this, "hot", void 0);
40
43
  /**
41
44
  * Instance of {@link EventManager}.
42
45
  *
@@ -75,7 +78,6 @@ class TableView {
75
78
  /**
76
79
  * Main Walkontable instance.
77
80
  *
78
- * @private
79
81
  * @type {Walkontable}
80
82
  */
81
83
  _defineProperty(this, "activeWt", void 0);
@@ -108,42 +110,52 @@ class TableView {
108
110
  * @type {boolean}
109
111
  */
110
112
  _defineProperty(this, "postponedAdjustElementsSize", false);
111
- this.instance = instance;
112
- this.eventManager = new EventManager(this.instance);
113
- this.settings = this.instance.getSettings();
114
- privatePool.set(this, {
115
- /**
116
- * Defines if the text should be selected during mousemove.
117
- *
118
- * @private
119
- * @type {boolean}
120
- */
121
- selectionMouseDown: false,
122
- /**
123
- * @private
124
- * @type {boolean}
125
- */
126
- mouseDown: void 0,
127
- /**
128
- * Main <TABLE> element.
129
- *
130
- * @private
131
- * @type {HTMLTableElement}
132
- */
133
- table: void 0,
134
- /**
135
- * Cached width of the rootElement.
136
- *
137
- * @type {number}
138
- */
139
- lastWidth: 0,
140
- /**
141
- * Cached height of the rootElement.
142
- *
143
- * @type {number}
144
- */
145
- lastHeight: 0
113
+ /**
114
+ * Defines if the text should be selected during mousemove.
115
+ *
116
+ * @type {boolean}
117
+ */
118
+ _classPrivateFieldInitSpec(this, _selectionMouseDown, {
119
+ writable: true,
120
+ value: false
121
+ });
122
+ /**
123
+ * @type {boolean}
124
+ */
125
+ _classPrivateFieldInitSpec(this, _mouseDown, {
126
+ writable: true,
127
+ value: void 0
128
+ });
129
+ /**
130
+ * Main <TABLE> element.
131
+ *
132
+ * @type {HTMLTableElement}
133
+ */
134
+ _classPrivateFieldInitSpec(this, _table, {
135
+ writable: true,
136
+ value: void 0
137
+ });
138
+ /**
139
+ * Cached width of the rootElement.
140
+ *
141
+ * @type {number}
142
+ */
143
+ _classPrivateFieldInitSpec(this, _lastWidth, {
144
+ writable: true,
145
+ value: 0
146
+ });
147
+ /**
148
+ * Cached height of the rootElement.
149
+ *
150
+ * @type {number}
151
+ */
152
+ _classPrivateFieldInitSpec(this, _lastHeight, {
153
+ writable: true,
154
+ value: 0
146
155
  });
156
+ this.hot = hotInstance;
157
+ this.eventManager = new EventManager(this.hot);
158
+ this.settings = this.hot.getSettings();
147
159
  this.createElements();
148
160
  this.registerEvents();
149
161
  this.initializeWalkontable();
@@ -153,16 +165,16 @@ class TableView {
153
165
  * Renders WalkontableUI.
154
166
  */
155
167
  render() {
156
- if (!this.instance.isRenderSuspended()) {
157
- this.instance.runHooks('beforeRender', this.instance.forceFullRender);
168
+ if (!this.hot.isRenderSuspended()) {
169
+ this.hot.runHooks('beforeRender', this.hot.forceFullRender);
158
170
  if (this.postponedAdjustElementsSize) {
159
171
  this.postponedAdjustElementsSize = false;
160
172
  this.adjustElementsSize(true);
161
173
  }
162
- this._wt.draw(!this.instance.forceFullRender);
163
- this.instance.runHooks('afterRender', this.instance.forceFullRender);
164
- this.instance.forceFullRender = false;
165
- this.instance.renderCall = false;
174
+ this._wt.draw(!this.hot.forceFullRender);
175
+ this.hot.runHooks('afterRender', this.hot.forceFullRender);
176
+ this.hot.forceFullRender = false;
177
+ this.hot.renderCall = false;
166
178
  }
167
179
  }
168
180
 
@@ -173,7 +185,7 @@ class TableView {
173
185
  */
174
186
  adjustElementsSize() {
175
187
  let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
176
- if (this.instance.isRenderSuspended()) {
188
+ if (this.hot.isRenderSuspended()) {
177
189
  this.postponedAdjustElementsSize = true;
178
190
  } else {
179
191
  this._wt.wtOverlays.adjustElementsSize(force);
@@ -240,32 +252,31 @@ class TableView {
240
252
  * @private
241
253
  */
242
254
  createElements() {
243
- const priv = privatePool.get(this);
244
255
  const {
245
256
  rootElement,
246
257
  rootDocument
247
- } = this.instance;
258
+ } = this.hot;
248
259
  const originalStyle = rootElement.getAttribute('style');
249
260
  if (originalStyle) {
250
261
  rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
251
262
  }
252
263
 
253
264
  addClass(rootElement, 'handsontable');
254
- priv.table = rootDocument.createElement('TABLE');
255
- addClass(priv.table, 'htCore');
256
- if (this.instance.getSettings().tableClassName) {
257
- addClass(priv.table, this.instance.getSettings().tableClassName);
265
+ _classPrivateFieldSet(this, _table, rootDocument.createElement('TABLE'));
266
+ addClass(_classPrivateFieldGet(this, _table), 'htCore');
267
+ if (this.hot.getSettings().tableClassName) {
268
+ addClass(_classPrivateFieldGet(this, _table), this.hot.getSettings().tableClassName);
258
269
  }
259
270
  if (this.settings.ariaTags) {
260
- setAttribute(priv.table, [A11Y_PRESENTATION()]);
261
- setAttribute(rootElement, [A11Y_TREEGRID(), A11Y_ROWCOUNT(this.instance.countRows()), A11Y_COLCOUNT(this.instance.countCols()), A11Y_MULTISELECTABLE()]);
271
+ setAttribute(_classPrivateFieldGet(this, _table), [A11Y_PRESENTATION()]);
272
+ setAttribute(rootElement, [A11Y_TREEGRID(), A11Y_ROWCOUNT(this.hot.countRows()), A11Y_COLCOUNT(this.hot.countCols()), A11Y_MULTISELECTABLE()]);
262
273
  }
263
274
  this.THEAD = rootDocument.createElement('THEAD');
264
- priv.table.appendChild(this.THEAD);
275
+ _classPrivateFieldGet(this, _table).appendChild(this.THEAD);
265
276
  this.TBODY = rootDocument.createElement('TBODY');
266
- priv.table.appendChild(this.TBODY);
267
- this.instance.table = priv.table;
268
- this.instance.container.insertBefore(priv.table, this.instance.container.firstChild);
277
+ _classPrivateFieldGet(this, _table).appendChild(this.TBODY);
278
+ this.hot.table = _classPrivateFieldGet(this, _table);
279
+ this.hot.container.insertBefore(_classPrivateFieldGet(this, _table), this.hot.container.firstChild);
269
280
  }
270
281
 
271
282
  /**
@@ -274,19 +285,18 @@ class TableView {
274
285
  * @private
275
286
  */
276
287
  registerEvents() {
277
- const priv = privatePool.get(this);
278
288
  const {
279
289
  rootElement,
280
290
  rootDocument,
281
291
  selection
282
- } = this.instance;
292
+ } = this.hot;
283
293
  const documentElement = rootDocument.documentElement;
284
294
  this.eventManager.addEventListener(rootElement, 'mousedown', event => {
285
- priv.selectionMouseDown = true;
295
+ _classPrivateFieldSet(this, _selectionMouseDown, true);
286
296
  if (!this.isTextSelectionAllowed(event.target)) {
287
297
  const {
288
298
  rootWindow
289
- } = this.instance;
299
+ } = this.hot;
290
300
  clearTextSelection(rootWindow);
291
301
  event.preventDefault();
292
302
  rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
@@ -294,13 +304,13 @@ class TableView {
294
304
  });
295
305
 
296
306
  this.eventManager.addEventListener(rootElement, 'mouseup', () => {
297
- priv.selectionMouseDown = false;
307
+ _classPrivateFieldSet(this, _selectionMouseDown, false);
298
308
  });
299
309
  this.eventManager.addEventListener(rootElement, 'mousemove', event => {
300
- if (priv.selectionMouseDown && !this.isTextSelectionAllowed(event.target)) {
310
+ if (_classPrivateFieldGet(this, _selectionMouseDown) && !this.isTextSelectionAllowed(event.target)) {
301
311
  // Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.
302
312
  if (this.settings.fragmentSelection) {
303
- clearTextSelection(this.instance.rootWindow);
313
+ clearTextSelection(this.hot.rootWindow);
304
314
  }
305
315
  event.preventDefault();
306
316
  }
@@ -315,40 +325,40 @@ class TableView {
315
325
  if (selection.isInProgress() && isLeftClick(event)) {
316
326
  selection.finish();
317
327
  }
318
- priv.mouseDown = false;
328
+ _classPrivateFieldSet(this, _mouseDown, false);
319
329
  const isOutsideInputElement = isOutsideInput(rootDocument.activeElement);
320
330
  if (!isOutsideInputElement) {
321
331
  return;
322
332
  }
323
333
  if (isOutsideInputElement || !selection.isSelected() && !selection.isSelectedByAnyHeader() && !rootElement.contains(event.target) && !isRightClick(event)) {
324
- this.instance.unlisten();
334
+ this.hot.unlisten();
325
335
  }
326
336
  });
327
337
  this.eventManager.addEventListener(documentElement, 'contextmenu', event => {
328
338
  if (selection.isInProgress() && isRightClick(event)) {
329
339
  selection.finish();
330
- priv.mouseDown = false;
340
+ _classPrivateFieldSet(this, _mouseDown, false);
331
341
  }
332
342
  });
333
343
  this.eventManager.addEventListener(documentElement, 'touchend', () => {
334
344
  if (selection.isInProgress()) {
335
345
  selection.finish();
336
346
  }
337
- priv.mouseDown = false;
347
+ _classPrivateFieldSet(this, _mouseDown, false);
338
348
  });
339
349
  this.eventManager.addEventListener(documentElement, 'mousedown', event => {
340
350
  const originalTarget = event.target;
341
351
  const eventX = event.x || event.clientX;
342
352
  const eventY = event.y || event.clientY;
343
353
  let next = event.target;
344
- if (priv.mouseDown || !rootElement || !this.instance.view) {
354
+ if (_classPrivateFieldGet(this, _mouseDown) || !rootElement || !this.hot.view) {
345
355
  return; // it must have been started in a cell
346
356
  }
347
357
 
348
358
  // immediate click on "holder" means click on the right side of vertical scrollbar
349
359
  const {
350
360
  holder
351
- } = this.instance.view._wt.wtTable;
361
+ } = this.hot.view._wt.wtTable;
352
362
  if (next === holder) {
353
363
  const scrollbarWidth = getScrollbarWidth(rootDocument);
354
364
  if (rootDocument.elementFromPoint(eventX + scrollbarWidth, eventY) !== holder || rootDocument.elementFromPoint(eventX, eventY + scrollbarWidth) !== holder) {
@@ -375,12 +385,12 @@ class TableView {
375
385
  // function did not return until here, we have an outside click!
376
386
  const outsideClickDeselects = typeof this.settings.outsideClickDeselects === 'function' ? this.settings.outsideClickDeselects(originalTarget) : this.settings.outsideClickDeselects;
377
387
  if (outsideClickDeselects) {
378
- this.instance.deselectCell();
388
+ this.hot.deselectCell();
379
389
  } else {
380
- this.instance.destroyEditor(false, false);
390
+ this.hot.destroyEditor(false, false);
381
391
  }
382
392
  });
383
- this.eventManager.addEventListener(priv.table, 'selectstart', event => {
393
+ this.eventManager.addEventListener(_classPrivateFieldGet(this, _table), 'selectstart', event => {
384
394
  if (this.settings.fragmentSelection || isInput(event.target)) {
385
395
  return;
386
396
  }
@@ -402,7 +412,7 @@ class TableView {
402
412
  col
403
413
  } = _ref;
404
414
  // TODO: To consider an idea to reusing the CellCoords instance instead creating new one.
405
- return this.instance._createCellCoords(...this.translateFromRenderableToVisualIndex(row, col));
415
+ return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(row, col));
406
416
  }
407
417
 
408
418
  /**
@@ -415,8 +425,8 @@ class TableView {
415
425
  translateFromRenderableToVisualIndex(renderableRow, renderableColumn) {
416
426
  // TODO: Some helper may be needed.
417
427
  // We perform translation for indexes (without headers).
418
- let visualRow = renderableRow >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;
419
- let visualColumn = renderableColumn >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;
428
+ let visualRow = renderableRow >= 0 ? this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;
429
+ let visualColumn = renderableColumn >= 0 ? this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;
420
430
  if (visualRow === null) {
421
431
  visualRow = renderableRow;
422
432
  }
@@ -453,7 +463,7 @@ class TableView {
453
463
  * @returns {number}
454
464
  */
455
465
  countRenderableColumns() {
456
- return this.countRenderableIndexes(this.instance.columnIndexMapper, this.settings.maxCols);
466
+ return this.countRenderableIndexes(this.hot.columnIndexMapper, this.settings.maxCols);
457
467
  }
458
468
 
459
469
  /**
@@ -462,7 +472,7 @@ class TableView {
462
472
  * @returns {number}
463
473
  */
464
474
  countRenderableRows() {
465
- return this.countRenderableIndexes(this.instance.rowIndexMapper, this.settings.maxRows);
475
+ return this.countRenderableIndexes(this.hot.rowIndexMapper, this.settings.maxRows);
466
476
  }
467
477
 
468
478
  /**
@@ -474,7 +484,7 @@ class TableView {
474
484
  * @returns {number}
475
485
  */
476
486
  countNotHiddenRowIndexes(visualIndex, incrementBy) {
477
- return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.rowIndexMapper, this.countRenderableRows());
487
+ return this.countNotHiddenIndexes(visualIndex, incrementBy, this.hot.rowIndexMapper, this.countRenderableRows());
478
488
  }
479
489
 
480
490
  /**
@@ -486,7 +496,7 @@ class TableView {
486
496
  * @returns {number}
487
497
  */
488
498
  countNotHiddenColumnIndexes(visualIndex, incrementBy) {
489
- return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.columnIndexMapper, this.countRenderableColumns());
499
+ return this.countNotHiddenIndexes(visualIndex, incrementBy, this.hot.columnIndexMapper, this.countRenderableColumns());
490
500
  }
491
501
 
492
502
  /**
@@ -525,7 +535,7 @@ class TableView {
525
535
  * @returns {number}
526
536
  */
527
537
  countNotHiddenFixedColumnsStart() {
528
- const countCols = this.instance.countCols();
538
+ const countCols = this.hot.countCols();
529
539
  const visualFixedColumnsStart = Math.min(parseInt(this.settings.fixedColumnsStart, 10), countCols) - 1;
530
540
  return this.countNotHiddenColumnIndexes(visualFixedColumnsStart, -1);
531
541
  }
@@ -537,7 +547,7 @@ class TableView {
537
547
  * @returns {number}
538
548
  */
539
549
  countNotHiddenFixedRowsTop() {
540
- const countRows = this.instance.countRows();
550
+ const countRows = this.hot.countRows();
541
551
  const visualFixedRowsTop = Math.min(parseInt(this.settings.fixedRowsTop, 10), countRows) - 1;
542
552
  return this.countNotHiddenRowIndexes(visualFixedRowsTop, -1);
543
553
  }
@@ -549,7 +559,7 @@ class TableView {
549
559
  * @returns {number}
550
560
  */
551
561
  countNotHiddenFixedRowsBottom() {
552
- const countRows = this.instance.countRows();
562
+ const countRows = this.hot.countRows();
553
563
  const visualFixedRowsBottom = Math.max(countRows - parseInt(this.settings.fixedRowsBottom, 10), 0);
554
564
  return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);
555
565
  }
@@ -564,7 +574,7 @@ class TableView {
564
574
  countRenderableColumnsInRange(columnStart, columnEnd) {
565
575
  let count = 0;
566
576
  for (let column = columnStart; column <= columnEnd; column++) {
567
- if (this.instance.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
577
+ if (this.hot.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
568
578
  count += 1;
569
579
  }
570
580
  }
@@ -581,7 +591,7 @@ class TableView {
581
591
  countRenderableRowsInRange(rowStart, rowEnd) {
582
592
  let count = 0;
583
593
  for (let row = rowStart; row <= rowEnd; row++) {
584
- if (this.instance.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
594
+ if (this.hot.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
585
595
  count += 1;
586
596
  }
587
597
  }
@@ -597,7 +607,7 @@ class TableView {
597
607
  isMainTableNotFullyCoveredByOverlays() {
598
608
  const fixedAllRows = this.countNotHiddenFixedRowsTop() + this.countNotHiddenFixedRowsBottom();
599
609
  const fixedAllColumns = this.countNotHiddenFixedColumnsStart();
600
- return this.instance.countRenderedRows() > fixedAllRows && this.instance.countRenderedCols() > fixedAllColumns;
610
+ return this.hot.countRenderedRows() > fixedAllRows && this.hot.countRenderedCols() > fixedAllColumns;
601
611
  }
602
612
 
603
613
  /**
@@ -606,18 +616,17 @@ class TableView {
606
616
  * @private
607
617
  */
608
618
  initializeWalkontable() {
609
- const priv = privatePool.get(this);
610
619
  const walkontableConfig = {
611
620
  ariaTags: this.settings.ariaTags,
612
- rtlMode: this.instance.isRtl(),
613
- externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),
614
- table: priv.table,
615
- isDataViewInstance: () => isRootInstance(this.instance),
621
+ rtlMode: this.hot.isRtl(),
622
+ externalRowCalculator: this.hot.getPlugin('autoRowSize') && this.hot.getPlugin('autoRowSize').isEnabled(),
623
+ table: _classPrivateFieldGet(this, _table),
624
+ isDataViewInstance: () => isRootInstance(this.hot),
616
625
  preventOverflow: () => this.settings.preventOverflow,
617
626
  preventWheel: () => this.settings.preventWheel,
618
627
  stretchH: () => this.settings.stretchH,
619
628
  data: (renderableRow, renderableColumn) => {
620
- return this.instance.getDataAtCell(...this.translateFromRenderableToVisualIndex(renderableRow, renderableColumn));
629
+ return this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(renderableRow, renderableColumn));
621
630
  },
622
631
  totalRows: () => this.countRenderableRows(),
623
632
  totalColumns: () => this.countRenderableColumns(),
@@ -643,74 +652,74 @@ class TableView {
643
652
  renderAllRows: this.settings.renderAllRows,
644
653
  rowHeaders: () => {
645
654
  const headerRenderers = [];
646
- if (this.instance.hasRowHeaders()) {
655
+ if (this.hot.hasRowHeaders()) {
647
656
  headerRenderers.push((renderableRowIndex, TH) => {
648
657
  // TODO: Some helper may be needed.
649
658
  // We perform translation for row indexes (without row headers).
650
- const visualRowIndex = renderableRowIndex >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
659
+ const visualRowIndex = renderableRowIndex >= 0 ? this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
651
660
  this.appendRowHeader(visualRowIndex, TH);
652
661
  });
653
662
  }
654
- this.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);
663
+ this.hot.runHooks('afterGetRowHeaderRenderers', headerRenderers);
655
664
  _classPrivateFieldSet(this, _rowHeadersCount, headerRenderers.length);
656
665
  return headerRenderers;
657
666
  },
658
667
  columnHeaders: () => {
659
668
  const headerRenderers = [];
660
- if (this.instance.hasColHeaders()) {
669
+ if (this.hot.hasColHeaders()) {
661
670
  headerRenderers.push((renderedColumnIndex, TH) => {
662
671
  // TODO: Some helper may be needed.
663
672
  // We perform translation for columns indexes (without column headers).
664
- const visualColumnsIndex = renderedColumnIndex >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;
673
+ const visualColumnsIndex = renderedColumnIndex >= 0 ? this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;
665
674
  this.appendColHeader(visualColumnsIndex, TH);
666
675
  });
667
676
  }
668
- this.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
677
+ this.hot.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
669
678
  _classPrivateFieldSet(this, _columnHeadersCount, headerRenderers.length);
670
679
  return headerRenderers;
671
680
  },
672
681
  columnWidth: renderedColumnIndex => {
673
- const visualIndex = this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
682
+ const visualIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
674
683
 
675
684
  // It's not a bug that we can't find visual index for some handled by method indexes. The function is called also
676
685
  // for indexes that are not displayed (indexes that are beyond the grid's boundaries), i.e. when `fixedColumnsStart` > `startCols` (wrong config?) or
677
686
  // scrolling and dataset is empty (scroll should handle that?).
678
- return this.instance.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);
687
+ return this.hot.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);
679
688
  },
680
689
  rowHeight: renderedRowIndex => {
681
- const visualIndex = this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);
682
- return this.instance.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);
690
+ const visualIndex = this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);
691
+ return this.hot.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);
683
692
  },
684
693
  cellRenderer: (renderedRowIndex, renderedColumnIndex, TD) => {
685
694
  const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex);
686
695
 
687
696
  // Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.
688
- const modifiedCellCoords = this.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
697
+ const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
689
698
  let visualRowToCheck = visualRowIndex;
690
699
  let visualColumnToCheck = visualColumnIndex;
691
700
  if (Array.isArray(modifiedCellCoords)) {
692
701
  [visualRowToCheck, visualColumnToCheck] = modifiedCellCoords;
693
702
  }
694
- const cellProperties = this.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);
695
- const prop = this.instance.colToProp(visualColumnToCheck);
696
- let value = this.instance.getDataAtRowProp(visualRowToCheck, prop);
697
- if (this.instance.hasHook('beforeValueRender')) {
698
- value = this.instance.runHooks('beforeValueRender', value, cellProperties);
703
+ const cellProperties = this.hot.getCellMeta(visualRowToCheck, visualColumnToCheck);
704
+ const prop = this.hot.colToProp(visualColumnToCheck);
705
+ let value = this.hot.getDataAtRowProp(visualRowToCheck, prop);
706
+ if (this.hot.hasHook('beforeValueRender')) {
707
+ value = this.hot.runHooks('beforeValueRender', value, cellProperties);
699
708
  }
700
- this.instance.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
701
- this.instance.getCellRenderer(cellProperties)(this.instance, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
702
- this.instance.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
709
+ this.hot.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
710
+ this.hot.getCellRenderer(cellProperties)(this.hot, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
711
+ this.hot.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
703
712
  },
704
- selections: this.instance.selection.highlight,
713
+ selections: this.hot.selection.highlight,
705
714
  hideBorderOnMouseDownOver: () => this.settings.fragmentSelection,
706
715
  onWindowResize: () => {
707
- if (this.instance && !this.instance.isDestroyed) {
708
- this.instance.refreshDimensions();
716
+ if (this.hot && !this.hot.isDestroyed) {
717
+ this.hot.refreshDimensions();
709
718
  }
710
719
  },
711
720
  onContainerElementResize: () => {
712
- if (this.instance && !this.instance.isDestroyed && isVisible(this.instance.rootElement)) {
713
- this.instance.refreshDimensions();
721
+ if (this.hot && !this.hot.isDestroyed && isVisible(this.hot.rootElement)) {
722
+ this.hot.refreshDimensions();
714
723
  }
715
724
  },
716
725
  onCellMouseDown: (event, coords, TD, wt) => {
@@ -720,44 +729,44 @@ class TableView {
720
729
  column: false,
721
730
  cell: false
722
731
  };
723
- this.instance.listen();
732
+ this.hot.listen();
724
733
  this.activeWt = wt;
725
- priv.mouseDown = true;
726
- this.instance.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
734
+ _classPrivateFieldSet(this, _mouseDown, true);
735
+ this.hot.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
727
736
  if (isImmediatePropagationStopped(event)) {
728
737
  return;
729
738
  }
730
739
  handleMouseEvent(event, {
731
740
  coords: visualCoords,
732
- selection: this.instance.selection,
741
+ selection: this.hot.selection,
733
742
  controller,
734
- cellCoordsFactory: (row, column) => this.instance._createCellCoords(row, column)
743
+ cellCoordsFactory: (row, column) => this.hot._createCellCoords(row, column)
735
744
  });
736
- this.instance.runHooks('afterOnCellMouseDown', event, visualCoords, TD);
745
+ this.hot.runHooks('afterOnCellMouseDown', event, visualCoords, TD);
737
746
  this.activeWt = this._wt;
738
747
  },
739
748
  onCellContextMenu: (event, coords, TD, wt) => {
740
749
  const visualCoords = this.translateFromRenderableToVisualCoords(coords);
741
750
  this.activeWt = wt;
742
- priv.mouseDown = false;
743
- if (this.instance.selection.isInProgress()) {
744
- this.instance.selection.finish();
751
+ _classPrivateFieldSet(this, _mouseDown, false);
752
+ if (this.hot.selection.isInProgress()) {
753
+ this.hot.selection.finish();
745
754
  }
746
- this.instance.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);
755
+ this.hot.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);
747
756
  if (isImmediatePropagationStopped(event)) {
748
757
  return;
749
758
  }
750
- this.instance.runHooks('afterOnCellContextMenu', event, visualCoords, TD);
759
+ this.hot.runHooks('afterOnCellContextMenu', event, visualCoords, TD);
751
760
  this.activeWt = this._wt;
752
761
  },
753
762
  onCellMouseOut: (event, coords, TD, wt) => {
754
763
  const visualCoords = this.translateFromRenderableToVisualCoords(coords);
755
764
  this.activeWt = wt;
756
- this.instance.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);
765
+ this.hot.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);
757
766
  if (isImmediatePropagationStopped(event)) {
758
767
  return;
759
768
  }
760
- this.instance.runHooks('afterOnCellMouseOut', event, visualCoords, TD);
769
+ this.hot.runHooks('afterOnCellMouseOut', event, visualCoords, TD);
761
770
  this.activeWt = this._wt;
762
771
  },
763
772
  onCellMouseOver: (event, coords, TD, wt) => {
@@ -768,48 +777,48 @@ class TableView {
768
777
  cell: false
769
778
  };
770
779
  this.activeWt = wt;
771
- this.instance.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);
780
+ this.hot.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);
772
781
  if (isImmediatePropagationStopped(event)) {
773
782
  return;
774
783
  }
775
- if (priv.mouseDown) {
784
+ if (_classPrivateFieldGet(this, _mouseDown)) {
776
785
  handleMouseEvent(event, {
777
786
  coords: visualCoords,
778
- selection: this.instance.selection,
787
+ selection: this.hot.selection,
779
788
  controller,
780
- cellCoordsFactory: (row, column) => this.instance._createCellCoords(row, column)
789
+ cellCoordsFactory: (row, column) => this.hot._createCellCoords(row, column)
781
790
  });
782
791
  }
783
- this.instance.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
792
+ this.hot.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
784
793
  this.activeWt = this._wt;
785
794
  },
786
795
  onCellMouseUp: (event, coords, TD, wt) => {
787
796
  const visualCoords = this.translateFromRenderableToVisualCoords(coords);
788
797
  this.activeWt = wt;
789
- this.instance.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);
798
+ this.hot.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);
790
799
 
791
800
  // TODO: The second condition check is a workaround. Callback corresponding the method `updateSettings`
792
801
  // disable plugin and enable it again. Disabling plugin closes the menu. Thus, calling the
793
802
  // `updateSettings` in a body of any callback executed right after some context-menu action
794
803
  // breaks the table (#7231).
795
- if (isImmediatePropagationStopped(event) || this.instance.isDestroyed) {
804
+ if (isImmediatePropagationStopped(event) || this.hot.isDestroyed) {
796
805
  return;
797
806
  }
798
- this.instance.runHooks('afterOnCellMouseUp', event, visualCoords, TD);
807
+ this.hot.runHooks('afterOnCellMouseUp', event, visualCoords, TD);
799
808
  this.activeWt = this._wt;
800
809
  },
801
810
  onCellCornerMouseDown: event => {
802
811
  event.preventDefault();
803
- this.instance.runHooks('afterOnCellCornerMouseDown', event);
812
+ this.hot.runHooks('afterOnCellCornerMouseDown', event);
804
813
  },
805
814
  onCellCornerDblClick: event => {
806
815
  event.preventDefault();
807
- this.instance.runHooks('afterOnCellCornerDblClick', event);
816
+ this.hot.runHooks('afterOnCellCornerDblClick', event);
808
817
  },
809
818
  beforeDraw: (force, skipRender) => this.beforeRender(force, skipRender),
810
819
  onDraw: force => this.afterRender(force),
811
820
  onBeforeViewportScrollVertically: renderableRow => {
812
- const rowMapper = this.instance.rowIndexMapper;
821
+ const rowMapper = this.hot.rowIndexMapper;
813
822
  const areColumnHeadersSelected = renderableRow < 0;
814
823
  let visualRow = renderableRow;
815
824
  if (!areColumnHeadersSelected) {
@@ -820,15 +829,15 @@ class TableView {
820
829
  return renderableRow;
821
830
  }
822
831
  }
823
- visualRow = this.instance.runHooks('beforeViewportScrollVertically', visualRow);
824
- this.instance.runHooks('beforeViewportScroll');
832
+ visualRow = this.hot.runHooks('beforeViewportScrollVertically', visualRow);
833
+ this.hot.runHooks('beforeViewportScroll');
825
834
  if (!areColumnHeadersSelected) {
826
835
  return rowMapper.getRenderableFromVisualIndex(visualRow);
827
836
  }
828
837
  return visualRow;
829
838
  },
830
839
  onBeforeViewportScrollHorizontally: renderableColumn => {
831
- const columnMapper = this.instance.columnIndexMapper;
840
+ const columnMapper = this.hot.columnIndexMapper;
832
841
  const areRowHeadersSelected = renderableColumn < 0;
833
842
  let visualColumn = renderableColumn;
834
843
  if (!areRowHeadersSelected) {
@@ -839,43 +848,43 @@ class TableView {
839
848
  return renderableColumn;
840
849
  }
841
850
  }
842
- visualColumn = this.instance.runHooks('beforeViewportScrollHorizontally', visualColumn);
843
- this.instance.runHooks('beforeViewportScroll');
851
+ visualColumn = this.hot.runHooks('beforeViewportScrollHorizontally', visualColumn);
852
+ this.hot.runHooks('beforeViewportScroll');
844
853
  if (!areRowHeadersSelected) {
845
854
  return columnMapper.getRenderableFromVisualIndex(visualColumn);
846
855
  }
847
856
  return visualColumn;
848
857
  },
849
858
  onScrollVertically: () => {
850
- this.instance.runHooks('afterScrollVertically');
851
- this.instance.runHooks('afterScroll');
859
+ this.hot.runHooks('afterScrollVertically');
860
+ this.hot.runHooks('afterScroll');
852
861
  },
853
862
  onScrollHorizontally: () => {
854
- this.instance.runHooks('afterScrollHorizontally');
855
- this.instance.runHooks('afterScroll');
863
+ this.hot.runHooks('afterScrollHorizontally');
864
+ this.hot.runHooks('afterScroll');
856
865
  },
857
- onBeforeRemoveCellClassNames: () => this.instance.runHooks('beforeRemoveCellClassNames'),
866
+ onBeforeRemoveCellClassNames: () => this.hot.runHooks('beforeRemoveCellClassNames'),
858
867
  onBeforeHighlightingRowHeader: (renderableRow, headerLevel, highlightMeta) => {
859
- const rowMapper = this.instance.rowIndexMapper;
868
+ const rowMapper = this.hot.rowIndexMapper;
860
869
  const areColumnHeadersSelected = renderableRow < 0;
861
870
  let visualRow = renderableRow;
862
871
  if (!areColumnHeadersSelected) {
863
872
  visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
864
873
  }
865
- const newVisualRow = this.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
874
+ const newVisualRow = this.hot.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
866
875
  if (!areColumnHeadersSelected) {
867
876
  return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
868
877
  }
869
878
  return newVisualRow;
870
879
  },
871
880
  onBeforeHighlightingColumnHeader: (renderableColumn, headerLevel, highlightMeta) => {
872
- const columnMapper = this.instance.columnIndexMapper;
881
+ const columnMapper = this.hot.columnIndexMapper;
873
882
  const areRowHeadersSelected = renderableColumn < 0;
874
883
  let visualColumn = renderableColumn;
875
884
  if (!areRowHeadersSelected) {
876
885
  visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
877
886
  }
878
- const newVisualColumn = this.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
887
+ const newVisualColumn = this.hot.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
879
888
  if (!areRowHeadersSelected) {
880
889
  return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
881
890
  }
@@ -884,34 +893,34 @@ class TableView {
884
893
  onAfterDrawSelection: (currentRow, currentColumn, layerLevel) => {
885
894
  let cornersOfSelection;
886
895
  const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(currentRow, currentColumn);
887
- const selectedRange = this.instance.selection.getSelectedRange();
896
+ const selectedRange = this.hot.selection.getSelectedRange();
888
897
  const selectionRangeSize = selectedRange.size();
889
898
  if (selectionRangeSize > 0) {
890
899
  const selectionForLayer = selectedRange.peekByIndex(layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0);
891
900
  cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];
892
901
  }
893
- return this.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
902
+ return this.hot.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
894
903
  },
895
904
  onBeforeDrawBorders: (corners, borderClassName) => {
896
905
  const [startRenderableRow, startRenderableColumn, endRenderableRow, endRenderableColumn] = corners;
897
- const visualCorners = [this.instance.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), this.instance.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), this.instance.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), this.instance.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];
898
- return this.instance.runHooks('beforeDrawBorders', visualCorners, borderClassName);
906
+ const visualCorners = [this.hot.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), this.hot.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), this.hot.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), this.hot.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];
907
+ return this.hot.runHooks('beforeDrawBorders', visualCorners, borderClassName);
899
908
  },
900
- onBeforeTouchScroll: () => this.instance.runHooks('beforeTouchScroll'),
901
- onAfterMomentumScroll: () => this.instance.runHooks('afterMomentumScroll'),
909
+ onBeforeTouchScroll: () => this.hot.runHooks('beforeTouchScroll'),
910
+ onAfterMomentumScroll: () => this.hot.runHooks('afterMomentumScroll'),
902
911
  onBeforeStretchingColumnWidth: (stretchedWidth, renderedColumnIndex) => {
903
- const visualColumnIndex = this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
904
- return this.instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
912
+ const visualColumnIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
913
+ return this.hot.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
905
914
  },
906
- onModifyRowHeaderWidth: rowHeaderWidth => this.instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth),
915
+ onModifyRowHeaderWidth: rowHeaderWidth => this.hot.runHooks('modifyRowHeaderWidth', rowHeaderWidth),
907
916
  onModifyGetCellCoords: (renderableRowIndex, renderableColumnIndex, topmost) => {
908
- const rowMapper = this.instance.rowIndexMapper;
909
- const columnMapper = this.instance.columnIndexMapper;
917
+ const rowMapper = this.hot.rowIndexMapper;
918
+ const columnMapper = this.hot.columnIndexMapper;
910
919
 
911
920
  // Callback handle also headers. We shouldn't translate them.
912
921
  const visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;
913
922
  const visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
914
- const visualIndexes = this.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
923
+ const visualIndexes = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
915
924
  if (Array.isArray(visualIndexes)) {
916
925
  const [visualRowFrom, visualColumnFrom, visualRowTo, visualColumnTo] = visualIndexes;
917
926
 
@@ -937,7 +946,7 @@ class TableView {
937
946
  calc.endRow = Math.min(lastRenderedRow + offset, renderableRows - 1);
938
947
  }
939
948
  }
940
- this.instance.runHooks('afterViewportRowCalculatorOverride', calc);
949
+ this.hot.runHooks('afterViewportRowCalculatorOverride', calc);
941
950
  },
942
951
  viewportColumnCalculatorOverride: calc => {
943
952
  let viewportOffset = this.settings.viewportColumnRenderingOffset;
@@ -958,15 +967,15 @@ class TableView {
958
967
  calc.endColumn = Math.min(lastRenderedColumn + offset, renderableColumns - 1);
959
968
  }
960
969
  }
961
- this.instance.runHooks('afterViewportColumnCalculatorOverride', calc);
970
+ this.hot.runHooks('afterViewportColumnCalculatorOverride', calc);
962
971
  },
963
972
  rowHeaderWidth: () => this.settings.rowHeaderWidth,
964
973
  columnHeaderHeight: () => {
965
- const columnHeaderHeight = this.instance.runHooks('modifyColumnHeaderHeight');
974
+ const columnHeaderHeight = this.hot.runHooks('modifyColumnHeaderHeight');
966
975
  return this.settings.columnHeaderHeight || columnHeaderHeight;
967
976
  }
968
977
  };
969
- this.instance.runHooks('beforeInitWalkontable', walkontableConfig);
978
+ this.hot.runHooks('beforeInitWalkontable', walkontableConfig);
970
979
  this._wt = new Walkontable(walkontableConfig);
971
980
  this.activeWt = this._wt;
972
981
  const spreader = this._wt.wtTable.spreader;
@@ -974,7 +983,7 @@ class TableView {
974
983
  const {
975
984
  width,
976
985
  height
977
- } = this.instance.rootElement.getBoundingClientRect();
986
+ } = this.hot.rootElement.getBoundingClientRect();
978
987
  this.setLastSize(width, height);
979
988
  this.eventManager.addEventListener(spreader, 'mousedown', event => {
980
989
  // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
@@ -988,10 +997,10 @@ class TableView {
988
997
  event.stopPropagation();
989
998
  }
990
999
  });
991
- this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'click', () => {
1000
+ this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'click', () => {
992
1001
  if (this.settings.observeDOMVisibility) {
993
1002
  if (this._wt.drawInterrupted) {
994
- this.instance.forceFullRender = true;
1003
+ this.hot.forceFullRender = true;
995
1004
  this.render();
996
1005
  }
997
1006
  }
@@ -1009,7 +1018,7 @@ class TableView {
1009
1018
  if (isInput(el)) {
1010
1019
  return true;
1011
1020
  }
1012
- const isChildOfTableBody = isChildOf(el, this.instance.view._wt.wtTable.spreader);
1021
+ const isChildOfTableBody = isChildOf(el, this.hot.view._wt.wtTable.spreader);
1013
1022
  if (this.settings.fragmentSelection === true && isChildOfTableBody) {
1014
1023
  return true;
1015
1024
  }
@@ -1029,7 +1038,7 @@ class TableView {
1029
1038
  * @returns {boolean}
1030
1039
  */
1031
1040
  isMouseDown() {
1032
- return privatePool.get(this).mouseDown;
1041
+ return _classPrivateFieldGet(this, _mouseDown);
1033
1042
  }
1034
1043
 
1035
1044
  /**
@@ -1039,8 +1048,8 @@ class TableView {
1039
1048
  * @returns {boolean}
1040
1049
  */
1041
1050
  isSelectedOnlyCell() {
1042
- var _this$instance$getSel, _this$instance$getSel2;
1043
- 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;
1051
+ var _this$hot$getSelected, _this$hot$getSelected2;
1052
+ 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;
1044
1053
  }
1045
1054
 
1046
1055
  /**
@@ -1050,7 +1059,7 @@ class TableView {
1050
1059
  * @returns {boolean}
1051
1060
  */
1052
1061
  isCellEdited() {
1053
- const activeEditor = this.instance.getActiveEditor();
1062
+ const activeEditor = this.hot.getActiveEditor();
1054
1063
  return activeEditor && activeEditor.isOpened();
1055
1064
  }
1056
1065
 
@@ -1065,8 +1074,8 @@ class TableView {
1065
1074
  */
1066
1075
  beforeRender(force, skipRender) {
1067
1076
  if (force) {
1068
- // this.instance.forceFullRender = did Handsontable request full render?
1069
- this.instance.runHooks('beforeViewRender', this.instance.forceFullRender, skipRender);
1077
+ // this.hot.forceFullRender = did Handsontable request full render?
1078
+ this.hot.runHooks('beforeViewRender', this.hot.forceFullRender, skipRender);
1070
1079
  }
1071
1080
  }
1072
1081
 
@@ -1079,8 +1088,8 @@ class TableView {
1079
1088
  */
1080
1089
  afterRender(force) {
1081
1090
  if (force) {
1082
- // this.instance.forceFullRender = did Handsontable request full render?
1083
- this.instance.runHooks('afterViewRender', this.instance.forceFullRender);
1091
+ // this.hot.forceFullRender = did Handsontable request full render?
1092
+ this.hot.runHooks('afterViewRender', this.hot.forceFullRender);
1084
1093
  }
1085
1094
  }
1086
1095
 
@@ -1099,12 +1108,12 @@ class TableView {
1099
1108
  this.appendRowHeader(visualRowIndex, TH);
1100
1109
  return;
1101
1110
  }
1102
- this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.instance.getRowHeader);
1111
+ this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.hot.getRowHeader);
1103
1112
  } else {
1104
1113
  const {
1105
1114
  rootDocument,
1106
1115
  getRowHeader
1107
- } = this.instance;
1116
+ } = this.hot;
1108
1117
  const div = rootDocument.createElement('div');
1109
1118
  const span = rootDocument.createElement('span');
1110
1119
  div.className = 'relative';
@@ -1113,7 +1122,7 @@ class TableView {
1113
1122
  div.appendChild(span);
1114
1123
  TH.appendChild(div);
1115
1124
  }
1116
- this.instance.runHooks('afterGetRowHeader', visualRowIndex, TH);
1125
+ this.hot.runHooks('afterGetRowHeader', visualRowIndex, TH);
1117
1126
  }
1118
1127
 
1119
1128
  /**
@@ -1127,7 +1136,7 @@ class TableView {
1127
1136
  * values counting from 0 to N).
1128
1137
  */
1129
1138
  appendColHeader(visualColumnIndex, TH) {
1130
- let label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.instance.getColHeader;
1139
+ let label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hot.getColHeader;
1131
1140
  let headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1132
1141
  if (TH.firstChild) {
1133
1142
  const container = TH.firstChild;
@@ -1140,7 +1149,7 @@ class TableView {
1140
1149
  } else {
1141
1150
  const {
1142
1151
  rootDocument
1143
- } = this.instance;
1152
+ } = this.hot;
1144
1153
  const div = rootDocument.createElement('div');
1145
1154
  const span = rootDocument.createElement('span');
1146
1155
  div.className = 'relative';
@@ -1149,7 +1158,7 @@ class TableView {
1149
1158
  div.appendChild(span);
1150
1159
  TH.appendChild(div);
1151
1160
  }
1152
- this.instance.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);
1161
+ this.hot.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);
1153
1162
  }
1154
1163
 
1155
1164
  /**
@@ -1219,8 +1228,8 @@ class TableView {
1219
1228
  * @param {number} height The table height.
1220
1229
  */
1221
1230
  setLastSize(width, height) {
1222
- const priv = privatePool.get(this);
1223
- [priv.lastWidth, priv.lastHeight] = [width, height];
1231
+ _classPrivateFieldSet(this, _lastWidth, width);
1232
+ _classPrivateFieldSet(this, _lastHeight, height);
1224
1233
  }
1225
1234
 
1226
1235
  /**
@@ -1229,10 +1238,9 @@ class TableView {
1229
1238
  * @returns {object}
1230
1239
  */
1231
1240
  getLastSize() {
1232
- const priv = privatePool.get(this);
1233
1241
  return {
1234
- width: priv.lastWidth,
1235
- height: priv.lastHeight
1242
+ width: _classPrivateFieldGet(this, _lastWidth),
1243
+ height: _classPrivateFieldGet(this, _lastHeight)
1236
1244
  };
1237
1245
  }
1238
1246
 
@@ -1242,7 +1250,7 @@ class TableView {
1242
1250
  * @returns {number}
1243
1251
  */
1244
1252
  getFirstFullyVisibleRow() {
1245
- return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleRow());
1253
+ return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow());
1246
1254
  }
1247
1255
 
1248
1256
  /**
@@ -1251,7 +1259,7 @@ class TableView {
1251
1259
  * @returns {number}
1252
1260
  */
1253
1261
  getLastFullyVisibleRow() {
1254
- return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleRow());
1262
+ return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow());
1255
1263
  }
1256
1264
 
1257
1265
  /**
@@ -1260,7 +1268,7 @@ class TableView {
1260
1268
  * @returns {number}
1261
1269
  */
1262
1270
  getFirstFullyVisibleColumn() {
1263
- return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleColumn());
1271
+ return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn());
1264
1272
  }
1265
1273
 
1266
1274
  /**
@@ -1269,7 +1277,7 @@ class TableView {
1269
1277
  * @returns {number}
1270
1278
  */
1271
1279
  getLastFullyVisibleColumn() {
1272
- return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn());
1280
+ return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn());
1273
1281
  }
1274
1282
 
1275
1283
  /**