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
@@ -9,6 +9,9 @@ var _object = require("../helpers/object");
9
9
  var _array = require("../helpers/array");
10
10
  var _number = require("../helpers/number");
11
11
  var _mixed = require("../helpers/mixed");
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
15
  /*
13
16
  This class contains open-source contributions covered by the MIT license.
14
17
 
@@ -55,56 +58,62 @@ class DataMap {
55
58
  }
56
59
 
57
60
  /**
58
- * @param {object} instance Instance of Handsontable.
61
+ * Instance of {@link Handsontable}.
62
+ *
63
+ * @private
64
+ * @type {Handsontable}
65
+ */
66
+
67
+ /**
68
+ * @param {object} hotInstance Instance of Handsontable.
59
69
  * @param {Array} data Array of arrays or array of objects containing data.
60
70
  * @param {MetaManager} metaManager The meta manager instance.
61
71
  */
62
- constructor(instance, data, metaManager) {
63
- /**
64
- * Instance of {@link Handsontable}.
65
- *
66
- * @private
67
- * @type {Handsontable}
68
- */
69
- this.instance = instance;
72
+ constructor(hotInstance, data, metaManager) {
73
+ _defineProperty(this, "hot", void 0);
70
74
  /**
71
75
  * Instance of {@link MetaManager}.
72
76
  *
73
77
  * @private
74
78
  * @type {MetaManager}
75
79
  */
76
- this.metaManager = metaManager;
80
+ _defineProperty(this, "metaManager", void 0);
77
81
  /**
78
82
  * Instance of {@link TableMeta}.
79
83
  *
80
84
  * @private
81
85
  * @type {TableMeta}
82
86
  */
83
- this.tableMeta = metaManager.getTableMeta();
87
+ _defineProperty(this, "tableMeta", void 0);
84
88
  /**
85
89
  * Reference to the original dataset.
86
90
  *
87
91
  * @type {*}
88
92
  */
89
- this.dataSource = data;
93
+ _defineProperty(this, "dataSource", void 0);
90
94
  /**
91
95
  * Generated schema based on the first row from the source data.
92
96
  *
93
97
  * @type {object}
94
98
  */
95
- this.duckSchema = this.createDuckSchema();
99
+ _defineProperty(this, "duckSchema", void 0);
96
100
  /**
97
101
  * Cached array of properties to columns.
98
102
  *
99
103
  * @type {Array}
100
104
  */
101
- this.colToPropCache = void 0;
105
+ _defineProperty(this, "colToPropCache", void 0);
102
106
  /**
103
107
  * Cached map of properties to columns.
104
108
  *
105
109
  * @type {Map}
106
110
  */
107
- this.propToColCache = void 0;
111
+ _defineProperty(this, "propToColCache", void 0);
112
+ this.hot = hotInstance;
113
+ this.metaManager = metaManager;
114
+ this.tableMeta = metaManager.getTableMeta();
115
+ this.dataSource = data;
116
+ this.duckSchema = this.createDuckSchema();
108
117
  this.createMap();
109
118
  }
110
119
 
@@ -200,7 +209,7 @@ class DataMap {
200
209
  if (Number.isInteger(column) === false) {
201
210
  return column;
202
211
  }
203
- const physicalColumn = this.instance.toPhysicalColumn(column);
212
+ const physicalColumn = this.hot.toPhysicalColumn(column);
204
213
 
205
214
  // Out of range, not visible column index.
206
215
  if (physicalColumn === null) {
@@ -223,11 +232,11 @@ class DataMap {
223
232
  propToCol(prop) {
224
233
  const cachedPhysicalIndex = this.propToColCache.get(prop);
225
234
  if ((0, _mixed.isDefined)(cachedPhysicalIndex)) {
226
- return this.instance.toVisualColumn(cachedPhysicalIndex);
235
+ return this.hot.toVisualColumn(cachedPhysicalIndex);
227
236
  }
228
237
 
229
238
  // Property may be a physical column index.
230
- const visualColumn = this.instance.toVisualColumn(prop);
239
+ const visualColumn = this.hot.toVisualColumn(prop);
231
240
  if (visualColumn === null) {
232
241
  return prop;
233
242
  }
@@ -283,17 +292,17 @@ class DataMap {
283
292
  source,
284
293
  mode = 'above'
285
294
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
286
- const sourceRowsCount = this.instance.countSourceRows();
295
+ const sourceRowsCount = this.hot.countSourceRows();
287
296
  let physicalRowIndex = sourceRowsCount;
288
297
  let numberOfCreatedRows = 0;
289
298
  let rowIndex = index;
290
299
  if (typeof rowIndex !== 'number' || rowIndex >= sourceRowsCount) {
291
300
  rowIndex = sourceRowsCount;
292
301
  }
293
- if (rowIndex < this.instance.countRows()) {
294
- physicalRowIndex = this.instance.toPhysicalRow(rowIndex);
302
+ if (rowIndex < this.hot.countRows()) {
303
+ physicalRowIndex = this.hot.toPhysicalRow(rowIndex);
295
304
  }
296
- const continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source);
305
+ const continueProcess = this.hot.runHooks('beforeCreateRow', rowIndex, amount, source);
297
306
  if (continueProcess === false || physicalRowIndex === null) {
298
307
  return {
299
308
  delta: 0
@@ -304,7 +313,7 @@ class DataMap {
304
313
  const rowsToAdd = [];
305
314
  while (numberOfCreatedRows < amount && sourceRowsCount + numberOfCreatedRows < maxRows) {
306
315
  let row = null;
307
- if (this.instance.dataType === 'array') {
316
+ if (this.hot.dataType === 'array') {
308
317
  if (this.tableMeta.dataSchema) {
309
318
  // Clone template array
310
319
  row = (0, _object.deepClone)(this.getSchema());
@@ -313,7 +322,7 @@ class DataMap {
313
322
  /* eslint-disable no-loop-func */
314
323
  (0, _number.rangeEach)(columnCount - 1, () => row.push(null));
315
324
  }
316
- } else if (this.instance.dataType === 'function') {
325
+ } else if (this.hot.dataType === 'function') {
317
326
  row = this.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);
318
327
  } else {
319
328
  row = {};
@@ -322,20 +331,20 @@ class DataMap {
322
331
  rowsToAdd.push(row);
323
332
  numberOfCreatedRows += 1;
324
333
  }
325
- this.instance.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);
334
+ this.hot.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);
326
335
  if (mode === 'below') {
327
336
  physicalRowIndex = Math.min(physicalRowIndex + 1, sourceRowsCount);
328
337
  }
329
338
  this.spliceData(physicalRowIndex, 0, rowsToAdd);
330
- const newVisualRowIndex = this.instance.toVisualRow(physicalRowIndex);
339
+ const newVisualRowIndex = this.hot.toVisualRow(physicalRowIndex);
331
340
 
332
341
  // In case the created rows are the only ones in the table, the column index mappers need to be rebuilt based on
333
342
  // the number of columns created in the row or the schema.
334
- if (this.instance.countSourceRows() === rowsToAdd.length) {
335
- this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount());
343
+ if (this.hot.countSourceRows() === rowsToAdd.length) {
344
+ this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount());
336
345
  }
337
346
  if (numberOfCreatedRows > 0) {
338
- if (index === void 0 || index === null) {
347
+ if (index === undefined || index === null) {
339
348
  // Creates the meta rows at the end of the rows collection without shifting the cells
340
349
  // that were defined out of the range of the dataset.
341
350
  this.metaManager.createRow(null, numberOfCreatedRows);
@@ -343,8 +352,8 @@ class DataMap {
343
352
  this.metaManager.createRow(physicalRowIndex, amount);
344
353
  }
345
354
  }
346
- this.instance.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
347
- this.instance.forceFullRender = true; // used when data was changed
355
+ this.hot.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
356
+ this.hot.forceFullRender = true; // used when data was changed
348
357
 
349
358
  return {
350
359
  delta: numberOfCreatedRows,
@@ -370,28 +379,28 @@ class DataMap {
370
379
  source,
371
380
  mode = 'start'
372
381
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
373
- if (!this.instance.isColumnModificationAllowed()) {
382
+ if (!this.hot.isColumnModificationAllowed()) {
374
383
  throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \'columns\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.');
375
384
  }
376
385
  const dataSource = this.dataSource;
377
386
  const maxCols = this.tableMeta.maxCols;
378
- const countSourceCols = this.instance.countSourceCols();
387
+ const countSourceCols = this.hot.countSourceCols();
379
388
  let columnIndex = index;
380
389
  if (typeof columnIndex !== 'number' || columnIndex >= countSourceCols) {
381
390
  columnIndex = countSourceCols;
382
391
  }
383
- const continueProcess = this.instance.runHooks('beforeCreateCol', columnIndex, amount, source);
392
+ const continueProcess = this.hot.runHooks('beforeCreateCol', columnIndex, amount, source);
384
393
  if (continueProcess === false) {
385
394
  return {
386
395
  delta: 0
387
396
  };
388
397
  }
389
398
  let physicalColumnIndex = countSourceCols;
390
- if (columnIndex < this.instance.countCols()) {
391
- physicalColumnIndex = this.instance.toPhysicalColumn(columnIndex);
399
+ if (columnIndex < this.hot.countCols()) {
400
+ physicalColumnIndex = this.hot.toPhysicalColumn(columnIndex);
392
401
  }
393
- const numberOfSourceRows = this.instance.countSourceRows();
394
- let nrOfColumns = this.instance.countCols();
402
+ const numberOfSourceRows = this.hot.countSourceRows();
403
+ let nrOfColumns = this.hot.countCols();
395
404
  let numberOfCreatedCols = 0;
396
405
  let currentIndex = physicalColumnIndex;
397
406
  if (mode === 'end') {
@@ -419,9 +428,9 @@ class DataMap {
419
428
  currentIndex += 1;
420
429
  nrOfColumns += 1;
421
430
  }
422
- this.instance.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);
431
+ this.hot.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);
423
432
  if (numberOfCreatedCols > 0) {
424
- if (index === void 0 || index === null) {
433
+ if (index === undefined || index === null) {
425
434
  // Creates the meta columns at the end of the columns collection without shifting the cells
426
435
  // that were defined out of the range of the dataset.
427
436
  this.metaManager.createColumn(null, numberOfCreatedCols);
@@ -429,9 +438,9 @@ class DataMap {
429
438
  this.metaManager.createColumn(startPhysicalIndex, amount);
430
439
  }
431
440
  }
432
- const newVisualColumnIndex = this.instance.toVisualColumn(startPhysicalIndex);
433
- this.instance.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
434
- this.instance.forceFullRender = true; // used when data was changed
441
+ const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
442
+ this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
443
+ this.hot.forceFullRender = true; // used when data was changed
435
444
 
436
445
  this.refreshDuckSchema();
437
446
  return {
@@ -455,11 +464,11 @@ class DataMap {
455
464
  let source = arguments.length > 2 ? arguments[2] : undefined;
456
465
  let rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.
457
466
  const removedPhysicalIndexes = this.visualRowsToPhysical(rowIndex, amount);
458
- const sourceRowsLength = this.instance.countSourceRows();
467
+ const sourceRowsLength = this.hot.countSourceRows();
459
468
  rowIndex = (sourceRowsLength + rowIndex) % sourceRowsLength;
460
469
 
461
470
  // It handle also callback from the `NestedRows` plugin. Removing parent node has effect in removing children nodes.
462
- const actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', rowIndex, removedPhysicalIndexes.length, removedPhysicalIndexes, source);
471
+ const actionWasNotCancelled = this.hot.runHooks('beforeRemoveRow', rowIndex, removedPhysicalIndexes.length, removedPhysicalIndexes, source);
463
472
  if (actionWasNotCancelled === false) {
464
473
  return false;
465
474
  }
@@ -469,21 +478,21 @@ class DataMap {
469
478
  this.filterData(rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes);
470
479
 
471
480
  // TODO: Function `removeRow` should validate fully, probably above.
472
- if (rowIndex < this.instance.countRows()) {
473
- this.instance.rowIndexMapper.removeIndexes(removedPhysicalIndexes);
481
+ if (rowIndex < this.hot.countRows()) {
482
+ this.hot.rowIndexMapper.removeIndexes(removedPhysicalIndexes);
474
483
  const customDefinedColumns = (0, _mixed.isDefined)(this.tableMeta.columns) || (0, _mixed.isDefined)(this.tableMeta.dataSchema);
475
484
 
476
485
  // All rows have been removed. There shouldn't be any columns.
477
- if (this.instance.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {
478
- this.instance.columnIndexMapper.setIndexesSequence([]);
486
+ if (this.hot.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {
487
+ this.hot.columnIndexMapper.setIndexesSequence([]);
479
488
  }
480
489
  }
481
490
  const descendingPhysicalRows = removedPhysicalIndexes.slice(0).sort((a, b) => b - a);
482
491
  descendingPhysicalRows.forEach(rowPhysicalIndex => {
483
492
  this.metaManager.removeRow(rowPhysicalIndex, 1);
484
493
  });
485
- this.instance.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
486
- this.instance.forceFullRender = true; // used when data was changed
494
+ this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
495
+ this.hot.forceFullRender = true; // used when data was changed
487
496
 
488
497
  return true;
489
498
  }
@@ -501,14 +510,14 @@ class DataMap {
501
510
  removeCol(index) {
502
511
  let amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
503
512
  let source = arguments.length > 2 ? arguments[2] : undefined;
504
- if (this.instance.dataType === 'object' || this.tableMeta.columns) {
513
+ if (this.hot.dataType === 'object' || this.tableMeta.columns) {
505
514
  throw new Error('cannot remove column with object data source or columns option specified');
506
515
  }
507
516
  let columnIndex = typeof index !== 'number' ? -amount : index;
508
- columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols();
517
+ columnIndex = (this.hot.countCols() + columnIndex) % this.hot.countCols();
509
518
  const removedPhysicalIndexes = this.visualColumnsToPhysical(columnIndex, amount);
510
519
  const descendingPhysicalColumns = removedPhysicalIndexes.slice(0).sort((a, b) => b - a);
511
- const actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
520
+ const actionWasNotCancelled = this.hot.runHooks('beforeRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
512
521
  if (actionWasNotCancelled === false) {
513
522
  return false;
514
523
  }
@@ -521,14 +530,14 @@ class DataMap {
521
530
  }
522
531
  }
523
532
  if (isTableUniform) {
524
- for (let r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {
533
+ for (let r = 0, rlen = this.hot.countSourceRows(); r < rlen; r++) {
525
534
  data[r].splice(removedPhysicalIndexes[0], amount);
526
535
  if (r === 0) {
527
536
  this.metaManager.removeColumn(removedPhysicalIndexes[0], amount);
528
537
  }
529
538
  }
530
539
  } else {
531
- for (let r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {
540
+ for (let r = 0, rlen = this.hot.countSourceRows(); r < rlen; r++) {
532
541
  for (let c = 0; c < removedColumnsCount; c++) {
533
542
  data[r].splice(descendingPhysicalColumns[c], 1);
534
543
  if (r === 0) {
@@ -539,16 +548,16 @@ class DataMap {
539
548
  }
540
549
 
541
550
  // TODO: Function `removeCol` should validate fully, probably above.
542
- if (columnIndex < this.instance.countCols()) {
543
- this.instance.columnIndexMapper.removeIndexes(removedPhysicalIndexes);
551
+ if (columnIndex < this.hot.countCols()) {
552
+ this.hot.columnIndexMapper.removeIndexes(removedPhysicalIndexes);
544
553
 
545
554
  // All columns have been removed. There shouldn't be any rows.
546
- if (this.instance.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {
547
- this.instance.rowIndexMapper.setIndexesSequence([]);
555
+ if (this.hot.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {
556
+ this.hot.rowIndexMapper.setIndexesSequence([]);
548
557
  }
549
558
  }
550
- this.instance.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
551
- this.instance.forceFullRender = true; // used when data was changed
559
+ this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
560
+ this.hot.forceFullRender = true; // used when data was changed
552
561
  this.refreshDuckSchema();
553
562
  return true;
554
563
  }
@@ -563,7 +572,7 @@ class DataMap {
563
572
  * @returns {Array} Returns removed portion of columns.
564
573
  */
565
574
  spliceCol(col, index, amount) {
566
- const colData = this.instance.getDataAtCol(col);
575
+ const colData = this.hot.getDataAtCol(col);
567
576
  const removed = colData.slice(index, index + amount);
568
577
  const after = colData.slice(index + amount);
569
578
  for (var _len = arguments.length, elements = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
@@ -576,7 +585,7 @@ class DataMap {
576
585
  i += 1;
577
586
  }
578
587
  (0, _array.to2dArray)(elements);
579
- this.instance.populateFromArray(index, col, elements, null, null, 'spliceCol');
588
+ this.hot.populateFromArray(index, col, elements, null, null, 'spliceCol');
580
589
  return removed;
581
590
  }
582
591
 
@@ -590,7 +599,7 @@ class DataMap {
590
599
  * @returns {Array} Returns removed portion of rows.
591
600
  */
592
601
  spliceRow(row, index, amount) {
593
- const rowData = this.instance.getSourceDataAtRow(row);
602
+ const rowData = this.hot.getSourceDataAtRow(row);
594
603
  const removed = rowData.slice(index, index + amount);
595
604
  const after = rowData.slice(index + amount);
596
605
  for (var _len2 = arguments.length, elements = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {
@@ -602,7 +611,7 @@ class DataMap {
602
611
  elements.push(null); // add null in place of removed elements
603
612
  i += 1;
604
613
  }
605
- this.instance.populateFromArray(row, index, [elements], null, null, 'spliceRow');
614
+ this.hot.populateFromArray(row, index, [elements], null, null, 'spliceRow');
606
615
  return removed;
607
616
  }
608
617
 
@@ -614,7 +623,7 @@ class DataMap {
614
623
  * @param {Array<object>} elements Row elements to be added.
615
624
  */
616
625
  spliceData(index, deleteCount, elements) {
617
- const continueSplicing = this.instance.runHooks('beforeDataSplice', index, deleteCount, elements);
626
+ const continueSplicing = this.hot.runHooks('beforeDataSplice', index, deleteCount, elements);
618
627
  if (continueSplicing !== false) {
619
628
  const newData = [...this.dataSource.slice(0, index), ...elements, ...this.dataSource.slice(index)];
620
629
 
@@ -636,7 +645,7 @@ class DataMap {
636
645
  */
637
646
  filterData(index, amount, physicalRows) {
638
647
  // Custom data filtering (run as a consequence of calling the below hook) provide an array containing new data.
639
- let data = this.instance.runHooks('filterData', index, amount, physicalRows);
648
+ let data = this.hot.runHooks('filterData', index, amount, physicalRows);
640
649
 
641
650
  // Hooks by default returns first argument (when there is no callback changing execution result).
642
651
  if (Array.isArray(data) === false) {
@@ -654,10 +663,10 @@ class DataMap {
654
663
  * @returns {*}
655
664
  */
656
665
  get(row, prop) {
657
- const physicalRow = this.instance.toPhysicalRow(row);
666
+ const physicalRow = this.hot.toPhysicalRow(row);
658
667
  let dataRow = this.dataSource[physicalRow];
659
668
  // TODO: To remove, use 'modifyData' hook instead (see below)
660
- const modifiedRowData = this.instance.runHooks('modifyRowData', physicalRow);
669
+ const modifiedRowData = this.hot.runHooks('modifyRowData', physicalRow);
661
670
  dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;
662
671
  //
663
672
 
@@ -682,9 +691,9 @@ class DataMap {
682
691
  } else if (typeof prop === 'function') {
683
692
  value = prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0]);
684
693
  }
685
- if (this.instance.hasHook('modifyData')) {
694
+ if (this.hot.hasHook('modifyData')) {
686
695
  const valueHolder = (0, _object.createObjectPropListener)(value);
687
- this.instance.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'get');
696
+ this.hot.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'get');
688
697
  if (valueHolder.isTouched()) {
689
698
  value = valueHolder.value;
690
699
  }
@@ -700,7 +709,7 @@ class DataMap {
700
709
  * @returns {string}
701
710
  */
702
711
  getCopyable(row, prop) {
703
- if (this.instance.getCellMeta(row, this.propToCol(prop)).copyable) {
712
+ if (this.hot.getCellMeta(row, this.propToCol(prop)).copyable) {
704
713
  return this.get(row, prop);
705
714
  }
706
715
  return '';
@@ -714,17 +723,17 @@ class DataMap {
714
723
  * @param {string} value The value to set.
715
724
  */
716
725
  set(row, prop, value) {
717
- const physicalRow = this.instance.toPhysicalRow(row);
726
+ const physicalRow = this.hot.toPhysicalRow(row);
718
727
  let newValue = value;
719
728
  let dataRow = this.dataSource[physicalRow];
720
729
  // TODO: To remove, use 'modifyData' hook instead (see below)
721
- const modifiedRowData = this.instance.runHooks('modifyRowData', physicalRow);
730
+ const modifiedRowData = this.hot.runHooks('modifyRowData', physicalRow);
722
731
  dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;
723
732
  //
724
733
 
725
- if (this.instance.hasHook('modifyData')) {
734
+ if (this.hot.hasHook('modifyData')) {
726
735
  const valueHolder = (0, _object.createObjectPropListener)(newValue);
727
- this.instance.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'set');
736
+ this.hot.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'set');
728
737
  if (valueHolder.isTouched()) {
729
738
  newValue = valueHolder.value;
730
739
  }
@@ -762,13 +771,13 @@ class DataMap {
762
771
  * @returns {number}
763
772
  */
764
773
  visualRowsToPhysical(index, amount) {
765
- const totalRows = this.instance.countSourceRows();
774
+ const totalRows = this.hot.countSourceRows();
766
775
  const logicRows = [];
767
776
  let physicRow = (totalRows + index) % totalRows;
768
777
  let rowsToRemove = amount;
769
778
  let row;
770
779
  while (physicRow < totalRows && rowsToRemove) {
771
- row = this.instance.toPhysicalRow(physicRow);
780
+ row = this.hot.toPhysicalRow(physicRow);
772
781
  logicRows.push(row);
773
782
  rowsToRemove -= 1;
774
783
  physicRow += 1;
@@ -783,12 +792,12 @@ class DataMap {
783
792
  * @returns {Array}
784
793
  */
785
794
  visualColumnsToPhysical(index, amount) {
786
- const totalCols = this.instance.countCols();
795
+ const totalCols = this.hot.countCols();
787
796
  const visualCols = [];
788
797
  let physicalCol = (totalCols + index) % totalCols;
789
798
  let colsToRemove = amount;
790
799
  while (physicalCol < totalCols && colsToRemove) {
791
- const col = this.instance.toPhysicalColumn(physicalCol);
800
+ const col = this.hot.toPhysicalColumn(physicalCol);
792
801
  visualCols.push(col);
793
802
  colsToRemove -= 1;
794
803
  physicalCol += 1;
@@ -800,8 +809,8 @@ class DataMap {
800
809
  * Clears the data array.
801
810
  */
802
811
  clear() {
803
- for (let r = 0; r < this.instance.countSourceRows(); r++) {
804
- for (let c = 0; c < this.instance.countCols(); c++) {
812
+ for (let r = 0; r < this.hot.countSourceRows(); r++) {
813
+ for (let c = 0; c < this.hot.countCols(); c++) {
805
814
  this.set(r, this.colToProp(c), '');
806
815
  }
807
816
  }
@@ -820,7 +829,7 @@ class DataMap {
820
829
  } else {
821
830
  maxRows = maxRowsFromSettings || Infinity;
822
831
  }
823
- const length = this.instance.rowIndexMapper.getNotTrimmedIndexesLength();
832
+ const length = this.hot.rowIndexMapper.getNotTrimmedIndexesLength();
824
833
  return Math.min(length, maxRows);
825
834
  }
826
835
 
@@ -835,10 +844,10 @@ class DataMap {
835
844
  col: 0
836
845
  };
837
846
  const end = {
838
- row: Math.max(this.instance.countRows() - 1, 0),
839
- col: Math.max(this.instance.countCols() - 1, 0)
847
+ row: Math.max(this.hot.countRows() - 1, 0),
848
+ col: Math.max(this.hot.countCols() - 1, 0)
840
849
  };
841
- if (start.row - end.row === 0 && !this.instance.countSourceRows()) {
850
+ if (start.row - end.row === 0 && !this.hot.countSourceRows()) {
842
851
  return [];
843
852
  }
844
853
  return this.getRange(start, end, DataMap.DESTINATION_RENDERER);
@@ -877,7 +886,7 @@ class DataMap {
877
886
  for (r = Math.min(start.row, end.row); r <= rlen; r++) {
878
887
  row = [];
879
888
  // We just store indexes for rows without headers.
880
- const physicalRow = r >= 0 ? this.instance.toPhysicalRow(r) : r;
889
+ const physicalRow = r >= 0 ? this.hot.toPhysicalRow(r) : r;
881
890
  for (c = Math.min(start.col, end.col); c <= clen; c++) {
882
891
  if (physicalRow === null) {
883
892
  break;
@@ -917,13 +926,13 @@ class DataMap {
917
926
  * Destroy instance.
918
927
  */
919
928
  destroy() {
920
- this.instance = null;
929
+ this.hot = null;
921
930
  this.metaManager = null;
922
931
  this.dataSource = null;
923
932
  this.duckSchema = null;
924
933
  this.colToPropCache.length = 0;
925
934
  this.propToColCache.clear();
926
- this.propToColCache = void 0;
935
+ this.propToColCache = undefined;
927
936
  }
928
937
  }
929
938
  var _default = exports.default = DataMap;