handsontable 0.0.0-next-7026906-20231107 → 0.0.0-next-7b93b7d-20231107

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (316) 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/core/clone.js +6 -0
  10. package/3rdparty/walkontable/src/core/clone.mjs +6 -0
  11. package/3rdparty/walkontable/src/event.js +125 -74
  12. package/3rdparty/walkontable/src/event.mjs +125 -74
  13. package/3rdparty/walkontable/src/filter/column.js +16 -0
  14. package/3rdparty/walkontable/src/filter/column.mjs +16 -0
  15. package/3rdparty/walkontable/src/filter/row.js +16 -0
  16. package/3rdparty/walkontable/src/filter/row.mjs +16 -0
  17. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  19. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  21. package/3rdparty/walkontable/src/renderer/_base.js +12 -5
  22. package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
  23. package/3rdparty/walkontable/src/renderer/cells.js +6 -2
  24. package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
  25. package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
  26. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
  27. package/3rdparty/walkontable/src/renderer/rows.js +5 -0
  28. package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
  29. package/3rdparty/walkontable/src/renderer/table.js +24 -17
  30. package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
  31. package/3rdparty/walkontable/src/scroll.js +2 -2
  32. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  33. package/3rdparty/walkontable/src/selection/border/border.js +1 -1
  34. package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
  35. package/3rdparty/walkontable/src/settings.js +10 -10
  36. package/3rdparty/walkontable/src/settings.mjs +10 -10
  37. package/3rdparty/walkontable/src/table.js +3 -3
  38. package/3rdparty/walkontable/src/table.mjs +3 -3
  39. package/3rdparty/walkontable/src/utils/column.js +19 -4
  40. package/3rdparty/walkontable/src/utils/column.mjs +19 -4
  41. package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
  42. package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
  43. package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
  44. package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
  45. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
  46. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
  47. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
  48. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
  49. package/3rdparty/walkontable/src/utils/row.js +14 -2
  50. package/3rdparty/walkontable/src/utils/row.mjs +14 -2
  51. package/3rdparty/walkontable/src/viewport.js +9 -9
  52. package/3rdparty/walkontable/src/viewport.mjs +9 -9
  53. package/base.js +2 -2
  54. package/base.mjs +2 -2
  55. package/core.js +25 -25
  56. package/core.mjs +25 -25
  57. package/dataMap/dataMap.js +99 -90
  58. package/dataMap/dataMap.mjs +99 -90
  59. package/dataMap/dataSource.js +14 -8
  60. package/dataMap/dataSource.mjs +14 -8
  61. package/dataMap/metaManager/lazyFactoryMap.js +19 -7
  62. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
  63. package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
  64. package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
  65. package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
  66. package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
  67. package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
  68. package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
  69. package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
  70. package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
  71. package/dataMap/metaManager/metaSchema.js +55 -55
  72. package/dataMap/metaManager/metaSchema.mjs +55 -55
  73. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
  74. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
  75. package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
  76. package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
  77. package/dataMap/metaManager/utils.js +2 -2
  78. package/dataMap/metaManager/utils.mjs +2 -2
  79. package/dist/handsontable.css +2 -2
  80. package/dist/handsontable.full.css +2 -2
  81. package/dist/handsontable.full.js +7244 -6347
  82. package/dist/handsontable.full.min.css +2 -2
  83. package/dist/handsontable.full.min.js +120 -120
  84. package/dist/handsontable.js +7243 -6346
  85. package/dist/handsontable.min.css +2 -2
  86. package/dist/handsontable.min.js +28 -28
  87. package/editorManager.js +105 -95
  88. package/editorManager.mjs +105 -95
  89. package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
  90. package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
  91. package/editors/baseEditor/baseEditor.js +23 -26
  92. package/editors/baseEditor/baseEditor.mjs +23 -26
  93. package/editors/dateEditor/dateEditor.js +24 -15
  94. package/editors/dateEditor/dateEditor.mjs +24 -15
  95. package/editors/dropdownEditor/dropdownEditor.js +1 -1
  96. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  97. package/editors/handsontableEditor/handsontableEditor.js +4 -4
  98. package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
  99. package/editors/textEditor/textEditor.js +23 -17
  100. package/editors/textEditor/textEditor.mjs +24 -18
  101. package/eventManager.js +8 -0
  102. package/eventManager.mjs +8 -0
  103. package/helpers/array.js +2 -2
  104. package/helpers/array.mjs +2 -2
  105. package/helpers/dom/element.js +7 -7
  106. package/helpers/dom/element.mjs +7 -7
  107. package/helpers/function.js +1 -1
  108. package/helpers/function.mjs +1 -1
  109. package/helpers/mixed.js +1 -1
  110. package/helpers/mixed.mjs +1 -1
  111. package/helpers/object.js +4 -4
  112. package/helpers/object.mjs +4 -4
  113. package/helpers/string.js +1 -1
  114. package/helpers/string.mjs +1 -1
  115. package/package.json +1 -1
  116. package/pluginHooks.d.ts +0 -2
  117. package/pluginHooks.js +12 -3
  118. package/pluginHooks.mjs +12 -3
  119. package/plugins/autoColumnSize/autoColumnSize.js +141 -130
  120. package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
  121. package/plugins/autoRowSize/autoRowSize.js +112 -125
  122. package/plugins/autoRowSize/autoRowSize.mjs +110 -123
  123. package/plugins/autofill/autofill.js +97 -102
  124. package/plugins/autofill/autofill.mjs +96 -101
  125. package/plugins/base/base.js +57 -22
  126. package/plugins/base/base.mjs +56 -22
  127. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
  128. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
  129. package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
  130. package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
  131. package/plugins/columnSorting/columnSorting.js +105 -98
  132. package/plugins/columnSorting/columnSorting.mjs +104 -97
  133. package/plugins/columnSorting/columnStatesManager.js +12 -6
  134. package/plugins/columnSorting/columnStatesManager.mjs +12 -6
  135. package/plugins/columnSummary/columnSummary.js +71 -58
  136. package/plugins/columnSummary/columnSummary.mjs +70 -57
  137. package/plugins/columnSummary/endpoints.js +20 -14
  138. package/plugins/columnSummary/endpoints.mjs +20 -14
  139. package/plugins/comments/commentEditor.js +30 -2
  140. package/plugins/comments/commentEditor.mjs +30 -2
  141. package/plugins/comments/comments.js +158 -169
  142. package/plugins/comments/comments.mjs +157 -168
  143. package/plugins/comments/displaySwitch.js +7 -3
  144. package/plugins/comments/displaySwitch.mjs +7 -3
  145. package/plugins/contextMenu/commandExecutor.js +15 -2
  146. package/plugins/contextMenu/commandExecutor.mjs +15 -2
  147. package/plugins/contextMenu/contextMenu.js +91 -101
  148. package/plugins/contextMenu/contextMenu.mjs +90 -100
  149. package/plugins/contextMenu/itemsFactory.js +19 -4
  150. package/plugins/contextMenu/itemsFactory.mjs +19 -4
  151. package/plugins/contextMenu/menu/cursor.js +36 -0
  152. package/plugins/contextMenu/menu/cursor.mjs +36 -0
  153. package/plugins/contextMenu/menu/menu.js +57 -5
  154. package/plugins/contextMenu/menu/menu.mjs +57 -5
  155. package/plugins/copyPaste/copyPaste.js +74 -75
  156. package/plugins/copyPaste/copyPaste.mjs +74 -75
  157. package/plugins/customBorders/customBorders.js +49 -48
  158. package/plugins/customBorders/customBorders.mjs +48 -47
  159. package/plugins/dragToScroll/dragToScroll.js +50 -54
  160. package/plugins/dragToScroll/dragToScroll.mjs +49 -52
  161. package/plugins/dropdownMenu/dropdownMenu.js +132 -129
  162. package/plugins/dropdownMenu/dropdownMenu.mjs +132 -129
  163. package/plugins/exportFile/dataProvider.js +7 -2
  164. package/plugins/exportFile/dataProvider.mjs +7 -2
  165. package/plugins/exportFile/exportFile.js +1 -1
  166. package/plugins/exportFile/exportFile.mjs +1 -1
  167. package/plugins/exportFile/types/_base.js +14 -6
  168. package/plugins/exportFile/types/_base.mjs +14 -6
  169. package/plugins/filters/component/actionBar.js +9 -0
  170. package/plugins/filters/component/actionBar.mjs +9 -0
  171. package/plugins/filters/component/condition.js +13 -0
  172. package/plugins/filters/component/condition.mjs +13 -0
  173. package/plugins/filters/component/operators.js +9 -0
  174. package/plugins/filters/component/operators.mjs +9 -0
  175. package/plugins/filters/component/value.js +9 -0
  176. package/plugins/filters/component/value.mjs +9 -0
  177. package/plugins/filters/conditionCollection.js +9 -4
  178. package/plugins/filters/conditionCollection.mjs +9 -4
  179. package/plugins/filters/conditionUpdateObserver.js +53 -42
  180. package/plugins/filters/conditionUpdateObserver.mjs +53 -42
  181. package/plugins/filters/dataFilter.js +9 -3
  182. package/plugins/filters/dataFilter.mjs +9 -3
  183. package/plugins/filters/filters.js +184 -189
  184. package/plugins/filters/filters.mjs +182 -187
  185. package/plugins/filters/ui/_base.js +1 -1
  186. package/plugins/filters/ui/_base.mjs +1 -1
  187. package/plugins/filters/utils.js +1 -1
  188. package/plugins/filters/utils.mjs +1 -1
  189. package/plugins/formulas/engine/settings.js +1 -1
  190. package/plugins/formulas/engine/settings.mjs +1 -1
  191. package/plugins/formulas/formulas.js +684 -602
  192. package/plugins/formulas/formulas.mjs +682 -600
  193. package/plugins/hiddenColumns/hiddenColumns.js +174 -169
  194. package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
  195. package/plugins/hiddenRows/hiddenRows.js +170 -165
  196. package/plugins/hiddenRows/hiddenRows.mjs +169 -164
  197. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  198. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  199. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  200. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  201. package/plugins/manualColumnFreeze/manualColumnFreeze.js +67 -54
  202. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
  203. package/plugins/manualColumnMove/manualColumnMove.js +287 -232
  204. package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
  205. package/plugins/manualColumnMove/ui/_base.js +9 -3
  206. package/plugins/manualColumnMove/ui/_base.mjs +9 -3
  207. package/plugins/manualColumnResize/manualColumnResize.js +291 -246
  208. package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
  209. package/plugins/manualRowMove/manualRowMove.js +223 -208
  210. package/plugins/manualRowMove/manualRowMove.mjs +222 -207
  211. package/plugins/manualRowMove/ui/_base.js +10 -5
  212. package/plugins/manualRowMove/ui/_base.mjs +10 -5
  213. package/plugins/manualRowResize/manualRowResize.js +254 -209
  214. package/plugins/manualRowResize/manualRowResize.mjs +253 -207
  215. package/plugins/mergeCells/calculations/autofill.js +9 -3
  216. package/plugins/mergeCells/calculations/autofill.mjs +9 -3
  217. package/plugins/mergeCells/calculations/selection.js +10 -4
  218. package/plugins/mergeCells/calculations/selection.mjs +10 -4
  219. package/plugins/mergeCells/cellCoords.js +16 -6
  220. package/plugins/mergeCells/cellCoords.mjs +16 -6
  221. package/plugins/mergeCells/cellsCollection.js +10 -4
  222. package/plugins/mergeCells/cellsCollection.mjs +10 -4
  223. package/plugins/mergeCells/mergeCells.js +582 -502
  224. package/plugins/mergeCells/mergeCells.mjs +580 -500
  225. package/plugins/multiColumnSorting/multiColumnSorting.js +13 -10
  226. package/plugins/multiColumnSorting/multiColumnSorting.mjs +13 -10
  227. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
  228. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
  229. package/plugins/nestedHeaders/nestedHeaders.js +542 -499
  230. package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
  231. package/plugins/nestedHeaders/stateManager/index.js +1 -1
  232. package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
  233. package/plugins/nestedRows/data/dataManager.js +21 -15
  234. package/plugins/nestedRows/data/dataManager.mjs +21 -15
  235. package/plugins/nestedRows/nestedRows.js +326 -278
  236. package/plugins/nestedRows/nestedRows.mjs +325 -277
  237. package/plugins/nestedRows/ui/_base.js +7 -1
  238. package/plugins/nestedRows/ui/_base.mjs +7 -1
  239. package/plugins/nestedRows/ui/collapsing.js +2 -2
  240. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  241. package/plugins/nestedRows/ui/contextMenu.js +28 -18
  242. package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
  243. package/plugins/nestedRows/utils/rowMoveController.js +12 -4
  244. package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
  245. package/plugins/persistentState/persistentState.js +14 -11
  246. package/plugins/persistentState/persistentState.mjs +14 -11
  247. package/plugins/persistentState/storage.js +11 -6
  248. package/plugins/persistentState/storage.mjs +11 -6
  249. package/plugins/registry.js +2 -2
  250. package/plugins/registry.mjs +2 -2
  251. package/plugins/search/search.js +57 -46
  252. package/plugins/search/search.mjs +56 -45
  253. package/plugins/touchScroll/touchScroll.js +102 -100
  254. package/plugins/touchScroll/touchScroll.mjs +100 -98
  255. package/plugins/trimRows/trimRows.js +33 -28
  256. package/plugins/trimRows/trimRows.mjs +32 -27
  257. package/plugins/undoRedo/undoRedo.js +2 -2
  258. package/plugins/undoRedo/undoRedo.mjs +2 -2
  259. package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
  260. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
  261. package/renderers/baseRenderer/baseRenderer.js +2 -2
  262. package/renderers/baseRenderer/baseRenderer.mjs +2 -2
  263. package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
  264. package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
  265. package/renderers/dateRenderer/dateRenderer.js +4 -4
  266. package/renderers/dateRenderer/dateRenderer.mjs +4 -4
  267. package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
  268. package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
  269. package/renderers/htmlRenderer/htmlRenderer.js +4 -4
  270. package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
  271. package/renderers/numericRenderer/numericRenderer.js +3 -3
  272. package/renderers/numericRenderer/numericRenderer.mjs +3 -3
  273. package/renderers/passwordRenderer/passwordRenderer.js +3 -3
  274. package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
  275. package/renderers/selectRenderer/selectRenderer.js +4 -4
  276. package/renderers/selectRenderer/selectRenderer.mjs +4 -4
  277. package/renderers/textRenderer/textRenderer.js +5 -5
  278. package/renderers/textRenderer/textRenderer.mjs +5 -5
  279. package/renderers/timeRenderer/timeRenderer.js +3 -3
  280. package/renderers/timeRenderer/timeRenderer.mjs +3 -3
  281. package/selection/range.js +12 -2
  282. package/selection/range.mjs +12 -2
  283. package/selection/selection.js +3 -3
  284. package/selection/selection.mjs +3 -3
  285. package/tableView.js +208 -200
  286. package/tableView.mjs +208 -200
  287. package/translations/changesObservable/utils.js +2 -2
  288. package/translations/changesObservable/utils.mjs +2 -2
  289. package/translations/indexMapper.js +25 -22
  290. package/translations/indexMapper.mjs +25 -22
  291. package/translations/mapCollections/aggregatedCollection.js +8 -2
  292. package/translations/mapCollections/aggregatedCollection.mjs +8 -2
  293. package/translations/mapCollections/mapCollection.js +5 -2
  294. package/translations/mapCollections/mapCollection.mjs +5 -2
  295. package/translations/maps/indexMap.js +6 -1
  296. package/translations/maps/indexMap.mjs +6 -1
  297. package/translations/maps/utils/physicallyIndexed.js +2 -2
  298. package/translations/maps/utils/physicallyIndexed.mjs +2 -2
  299. package/utils/dataStructures/linkedList.js +10 -6
  300. package/utils/dataStructures/linkedList.mjs +10 -6
  301. package/utils/dataStructures/queue.js +1 -1
  302. package/utils/dataStructures/queue.mjs +1 -1
  303. package/utils/dataStructures/stack.js +1 -1
  304. package/utils/dataStructures/stack.mjs +1 -1
  305. package/utils/ghostTable.js +2 -2
  306. package/utils/ghostTable.mjs +2 -2
  307. package/utils/interval.js +73 -36
  308. package/utils/interval.mjs +73 -36
  309. package/utils/parseTable.js +1 -1
  310. package/utils/parseTable.mjs +1 -1
  311. package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
  312. package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
  313. package/validators/dateValidator/dateValidator.js +1 -1
  314. package/validators/dateValidator/dateValidator.mjs +1 -1
  315. package/validators/numericValidator/numericValidator.js +1 -1
  316. package/validators/numericValidator/numericValidator.mjs +1 -1
@@ -1,9 +1,15 @@
1
1
  import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/es.error.cause.js";
3
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
7
+ 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); }
8
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
2
9
  import { BasePlugin } from "../base/index.mjs";
3
10
  import Hooks from "../../pluginHooks.mjs";
4
11
  import { offset, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
5
12
  import { arrayEach, arrayMap } from "../../helpers/array.mjs";
6
- import EventManager from "../../eventManager.mjs";
7
13
  import { getDragDirectionAndRange, DIRECTIONS, getMappedFillHandleSetting } from "./utils.mjs";
8
14
  Hooks.getSingleton().register('modifyAutofillRange');
9
15
  Hooks.getSingleton().register('beforeAutofill');
@@ -28,69 +34,91 @@ const INTERVAL_FOR_ADDING_ROW = 200;
28
34
  * @class Autofill
29
35
  * @plugin Autofill
30
36
  */
31
-
37
+ var _onCellCornerDblClick = /*#__PURE__*/new WeakSet();
38
+ var _onAfterCellCornerMouseDown = /*#__PURE__*/new WeakSet();
39
+ var _onBeforeCellMouseOver = /*#__PURE__*/new WeakSet();
40
+ var _onMouseUp = /*#__PURE__*/new WeakSet();
41
+ var _onMouseMove = /*#__PURE__*/new WeakSet();
32
42
  export class Autofill extends BasePlugin {
33
- static get PLUGIN_KEY() {
34
- return PLUGIN_KEY;
35
- }
36
- static get PLUGIN_PRIORITY() {
37
- return PLUGIN_PRIORITY;
38
- }
39
- static get SETTING_KEYS() {
40
- return [PLUGIN_KEY, ...SETTING_KEYS];
41
- }
42
- constructor(hotInstance) {
43
- super(hotInstance);
43
+ constructor() {
44
+ super(...arguments);
45
+ /**
46
+ * On mouse move listener.
47
+ *
48
+ * @param {MouseEvent} event `mousemove` event properties.
49
+ */
50
+ _classPrivateMethodInitSpec(this, _onMouseMove);
51
+ /**
52
+ * On mouse up listener.
53
+ */
54
+ _classPrivateMethodInitSpec(this, _onMouseUp);
44
55
  /**
45
- * Event manager instance.
56
+ * On before cell mouse over listener.
57
+ *
58
+ * @param {CellCoords} coords `CellCoords` coord object.
59
+ */
60
+ _classPrivateMethodInitSpec(this, _onBeforeCellMouseOver);
61
+ /**
62
+ * On after cell corner mouse down listener.
63
+ */
64
+ _classPrivateMethodInitSpec(this, _onAfterCellCornerMouseDown);
65
+ /**
66
+ * On cell corner double click callback.
46
67
  *
47
68
  * @private
48
- * @type {EventManager}
49
69
  */
50
- this.eventManager = new EventManager(this);
70
+ _classPrivateMethodInitSpec(this, _onCellCornerDblClick);
51
71
  /**
52
72
  * Specifies if adding new row started.
53
73
  *
54
74
  * @private
55
75
  * @type {boolean}
56
76
  */
57
- this.addingStarted = false;
77
+ _defineProperty(this, "addingStarted", false);
58
78
  /**
59
79
  * Specifies if there was mouse down on the cell corner.
60
80
  *
61
81
  * @private
62
82
  * @type {boolean}
63
83
  */
64
- this.mouseDownOnCellCorner = false;
84
+ _defineProperty(this, "mouseDownOnCellCorner", false);
65
85
  /**
66
86
  * Specifies if mouse was dragged outside Handsontable.
67
87
  *
68
88
  * @private
69
89
  * @type {boolean}
70
90
  */
71
- this.mouseDragOutside = false;
91
+ _defineProperty(this, "mouseDragOutside", false);
72
92
  /**
73
93
  * Specifies how many cell levels were dragged using the handle.
74
94
  *
75
95
  * @private
76
96
  * @type {boolean}
77
97
  */
78
- this.handleDraggedCells = 0;
98
+ _defineProperty(this, "handleDraggedCells", 0);
79
99
  /**
80
100
  * Specifies allowed directions of drag (`'horizontal'` or '`vertical`').
81
101
  *
82
102
  * @private
83
103
  * @type {string[]}
84
104
  */
85
- this.directions = [];
105
+ _defineProperty(this, "directions", []);
86
106
  /**
87
107
  * Specifies if can insert new rows if needed.
88
108
  *
89
109
  * @type {boolean}
90
110
  */
91
- this.autoInsertRow = false;
111
+ _defineProperty(this, "autoInsertRow", false);
112
+ }
113
+ static get PLUGIN_KEY() {
114
+ return PLUGIN_KEY;
115
+ }
116
+ static get PLUGIN_PRIORITY() {
117
+ return PLUGIN_PRIORITY;
118
+ }
119
+ static get SETTING_KEYS() {
120
+ return [PLUGIN_KEY, ...SETTING_KEYS];
92
121
  }
93
-
94
122
  /**
95
123
  * Checks if the plugin is enabled in the Handsontable settings.
96
124
  *
@@ -109,9 +137,9 @@ export class Autofill extends BasePlugin {
109
137
  }
110
138
  this.mapSettings();
111
139
  this.registerEvents();
112
- this.addHook('afterOnCellCornerMouseDown', event => this.onAfterCellCornerMouseDown(event));
113
- this.addHook('afterOnCellCornerDblClick', event => this.onCellCornerDblClick(event));
114
- this.addHook('beforeOnCellMouseOver', (_, coords) => this.onBeforeCellMouseOver(coords));
140
+ this.addHook('afterOnCellCornerMouseDown', event => _classPrivateMethodGet(this, _onAfterCellCornerMouseDown, _onAfterCellCornerMouseDown2).call(this, event));
141
+ this.addHook('afterOnCellCornerDblClick', event => _classPrivateMethodGet(this, _onCellCornerDblClick, _onCellCornerDblClick2).call(this, event));
142
+ this.addHook('beforeOnCellMouseOver', (_, coords) => _classPrivateMethodGet(this, _onBeforeCellMouseOver, _onBeforeCellMouseOver2).call(this, coords));
115
143
  super.enablePlugin();
116
144
  }
117
145
 
@@ -322,7 +350,7 @@ export class Autofill extends BasePlugin {
322
350
  */
323
351
  addRow() {
324
352
  this.hot._registerTimeout(() => {
325
- this.hot.alter(INSERT_ROW_ALTER_ACTION_NAME, void 0, 1, `${this.pluginName}.fill`);
353
+ this.hot.alter(INSERT_ROW_ALTER_ACTION_NAME, undefined, 1, `${this.pluginName}.fill`);
326
354
  this.addingStarted = false;
327
355
  }, INTERVAL_FOR_ADDING_ROW);
328
356
  }
@@ -402,7 +430,7 @@ export class Autofill extends BasePlugin {
402
430
  selectAdjacent() {
403
431
  const cornersOfSelectedCells = this.hot.getSelectedLast();
404
432
  const lastFilledInRowIndex = this.getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells);
405
- if (lastFilledInRowIndex === -1 || lastFilledInRowIndex === void 0) {
433
+ if (lastFilledInRowIndex === -1 || lastFilledInRowIndex === undefined) {
406
434
  return false;
407
435
  }
408
436
  this.addSelectionFromStartAreaToSpecificRowIndex(cornersOfSelectedCells, lastFilledInRowIndex);
@@ -455,80 +483,9 @@ export class Autofill extends BasePlugin {
455
483
  const {
456
484
  documentElement
457
485
  } = this.hot.rootDocument;
458
- this.eventManager.addEventListener(documentElement, 'mouseup', () => this.onMouseUp());
459
- this.eventManager.addEventListener(documentElement, 'mousemove', event => this.onMouseMove(event));
460
- }
461
-
462
- /**
463
- * On cell corner double click callback.
464
- *
465
- * @private
466
- */
467
- onCellCornerDblClick() {
468
- const selectionApplied = this.selectAdjacent();
469
- if (selectionApplied) {
470
- this.fillIn();
471
- }
486
+ this.eventManager.addEventListener(documentElement, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
487
+ this.eventManager.addEventListener(documentElement, 'mousemove', event => _classPrivateMethodGet(this, _onMouseMove, _onMouseMove2).call(this, event));
472
488
  }
473
-
474
- /**
475
- * On after cell corner mouse down listener.
476
- *
477
- * @private
478
- */
479
- onAfterCellCornerMouseDown() {
480
- this.handleDraggedCells = 1;
481
- this.mouseDownOnCellCorner = true;
482
- }
483
-
484
- /**
485
- * On before cell mouse over listener.
486
- *
487
- * @private
488
- * @param {CellCoords} coords `CellCoords` coord object.
489
- */
490
- onBeforeCellMouseOver(coords) {
491
- if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) {
492
- this.handleDraggedCells += 1;
493
- this.showBorder(coords);
494
- this.addNewRowIfNeeded();
495
- }
496
- }
497
-
498
- /**
499
- * On mouse up listener.
500
- *
501
- * @private
502
- */
503
- onMouseUp() {
504
- if (this.handleDraggedCells) {
505
- if (this.handleDraggedCells > 1) {
506
- this.fillIn();
507
- }
508
- this.handleDraggedCells = 0;
509
- this.mouseDownOnCellCorner = false;
510
- }
511
- }
512
-
513
- /**
514
- * On mouse move listener.
515
- *
516
- * @private
517
- * @param {MouseEvent} event `mousemove` event properties.
518
- */
519
- onMouseMove(event) {
520
- const mouseWasDraggedOutside = this.getIfMouseWasDraggedOutside(event);
521
- if (this.addingStarted === false && this.handleDraggedCells > 0 && mouseWasDraggedOutside) {
522
- this.mouseDragOutside = true;
523
- this.addingStarted = true;
524
- } else {
525
- this.mouseDragOutside = false;
526
- }
527
- if (this.mouseDragOutside && this.autoInsertRow) {
528
- this.addRow();
529
- }
530
- }
531
-
532
489
  /**
533
490
  * Clears mapped settings.
534
491
  *
@@ -556,4 +513,42 @@ export class Autofill extends BasePlugin {
556
513
  destroy() {
557
514
  super.destroy();
558
515
  }
516
+ }
517
+ function _onCellCornerDblClick2() {
518
+ const selectionApplied = this.selectAdjacent();
519
+ if (selectionApplied) {
520
+ this.fillIn();
521
+ }
522
+ }
523
+ function _onAfterCellCornerMouseDown2() {
524
+ this.handleDraggedCells = 1;
525
+ this.mouseDownOnCellCorner = true;
526
+ }
527
+ function _onBeforeCellMouseOver2(coords) {
528
+ if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) {
529
+ this.handleDraggedCells += 1;
530
+ this.showBorder(coords);
531
+ this.addNewRowIfNeeded();
532
+ }
533
+ }
534
+ function _onMouseUp2() {
535
+ if (this.handleDraggedCells) {
536
+ if (this.handleDraggedCells > 1) {
537
+ this.fillIn();
538
+ }
539
+ this.handleDraggedCells = 0;
540
+ this.mouseDownOnCellCorner = false;
541
+ }
542
+ }
543
+ function _onMouseMove2(event) {
544
+ const mouseWasDraggedOutside = this.getIfMouseWasDraggedOutside(event);
545
+ if (this.addingStarted === false && this.handleDraggedCells > 0 && mouseWasDraggedOutside) {
546
+ this.mouseDragOutside = true;
547
+ this.addingStarted = true;
548
+ } else {
549
+ this.mouseDragOutside = false;
550
+ }
551
+ if (this.mouseDragOutside && this.autoInsertRow) {
552
+ this.addRow();
553
+ }
559
554
  }
@@ -10,20 +10,29 @@ var _registry2 = require("../../cellTypes/registry");
10
10
  var _registry3 = require("../../editors/registry");
11
11
  var _registry4 = require("../../renderers/registry");
12
12
  var _registry5 = require("../../validators/registry");
13
+ var _eventManager = _interopRequireDefault(require("../../eventManager"));
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
16
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
14
17
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
+ 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); }
15
21
  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
22
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
23
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
24
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
16
25
  const DEPS_TYPE_CHECKERS = new Map([['plugin', _registry.hasPlugin], ['cell-type', _registry2.hasCellType], ['editor', _registry3.hasEditor], ['renderer', _registry4.hasRenderer], ['validator', _registry5.hasValidator]]);
17
26
  const PLUGIN_KEY = 'base';
18
27
  exports.PLUGIN_KEY = PLUGIN_KEY;
19
- const privatePool = new WeakMap();
20
- const missingDependeciesMsgs = [];
28
+ const missingDepsMsgs = [];
21
29
  let initializedPlugins = null;
22
30
 
23
31
  /**
24
32
  * @util
25
33
  * @property {Core} hot Handsontable instance.
26
34
  */
35
+ var _hooks = /*#__PURE__*/new WeakMap();
27
36
  var _isRelevantToSettings = /*#__PURE__*/new WeakSet();
28
37
  class BasePlugin {
29
38
  static get PLUGIN_KEY() {
@@ -43,6 +52,12 @@ class BasePlugin {
43
52
  return [this.PLUGIN_KEY];
44
53
  }
45
54
 
55
+ /**
56
+ * The instance of the {@link EventManager} class.
57
+ *
58
+ * @type {EventManager}
59
+ */
60
+
46
61
  /**
47
62
  * @param {object} hotInstance Handsontable instance.
48
63
  */
@@ -57,6 +72,34 @@ class BasePlugin {
57
72
  * @returns {boolean}
58
73
  */
59
74
  _classPrivateMethodInitSpec(this, _isRelevantToSettings);
75
+ _defineProperty(this, "eventManager", new _eventManager.default(this));
76
+ /**
77
+ * @type {string}
78
+ */
79
+ _defineProperty(this, "pluginName", null);
80
+ /**
81
+ * @type {Function[]}
82
+ */
83
+ _defineProperty(this, "pluginsInitializedCallbacks", []);
84
+ /**
85
+ * @type {boolean}
86
+ */
87
+ _defineProperty(this, "isPluginsReady", false);
88
+ /**
89
+ * @type {boolean}
90
+ */
91
+ _defineProperty(this, "enabled", false);
92
+ /**
93
+ * @type {boolean}
94
+ */
95
+ _defineProperty(this, "initialized", false);
96
+ /**
97
+ * Collection of the reference to the plugins hooks.
98
+ */
99
+ _classPrivateFieldInitSpec(this, _hooks, {
100
+ writable: true,
101
+ value: {}
102
+ });
60
103
  /**
61
104
  * Handsontable instance.
62
105
  *
@@ -65,15 +108,7 @@ class BasePlugin {
65
108
  (0, _object.defineGetter)(this, 'hot', hotInstance, {
66
109
  writable: false
67
110
  });
68
- privatePool.set(this, {
69
- hooks: {}
70
- });
71
111
  initializedPlugins = null;
72
- this.pluginName = null;
73
- this.pluginsInitializedCallbacks = [];
74
- this.isPluginsReady = false;
75
- this.enabled = false;
76
- this.initialized = false;
77
112
  this.hot.addHook('afterPluginsInitialized', () => this.onAfterPluginsInitialized());
78
113
  this.hot.addHook('afterUpdateSettings', newSettings => this.onUpdateSettings(newSettings));
79
114
  this.hot.addHook('beforeInit', () => this.init());
@@ -81,10 +116,10 @@ class BasePlugin {
81
116
  init() {
82
117
  this.pluginName = this.hot.getPluginName(this);
83
118
  const pluginDeps = this.constructor.PLUGIN_DEPS;
84
- const dependecies = Array.isArray(pluginDeps) ? pluginDeps : [];
85
- if (dependecies.length > 0) {
119
+ const deps = Array.isArray(pluginDeps) ? pluginDeps : [];
120
+ if (deps.length > 0) {
86
121
  const missingDependencies = [];
87
- dependecies.forEach(dependency => {
122
+ deps.forEach(dependency => {
88
123
  const [type, moduleName] = dependency.split(':');
89
124
  if (!DEPS_TYPE_CHECKERS.has(type)) {
90
125
  throw new Error(`Unknown plugin dependency type "${type}" was found.`);
@@ -95,7 +130,7 @@ class BasePlugin {
95
130
  });
96
131
  if (missingDependencies.length > 0) {
97
132
  const errorMsg = [`The ${this.pluginName} plugin requires the following modules:\n`, `${missingDependencies.join('\n')}\n`].join('');
98
- missingDependeciesMsgs.push(errorMsg);
133
+ missingDepsMsgs.push(errorMsg);
99
134
  }
100
135
  }
101
136
  if (!initializedPlugins) {
@@ -118,8 +153,8 @@ class BasePlugin {
118
153
  });
119
154
  const isAllPluginsAreInitialized = initializedPlugins.length === 0;
120
155
  if (isAllPluginsAreInitialized) {
121
- if (missingDependeciesMsgs.length > 0) {
122
- const errorMsg = [`${missingDependeciesMsgs.join('\n')}\n`, 'You have to import and register them manually.'].join('');
156
+ if (missingDepsMsgs.length > 0) {
157
+ const errorMsg = [`${missingDepsMsgs.join('\n')}\n`, 'You have to import and register them manually.'].join('');
123
158
  throw new Error(errorMsg);
124
159
  }
125
160
  this.hot.runHooks('afterPluginsInitialized');
@@ -152,11 +187,11 @@ class BasePlugin {
152
187
  * @param {Function} callback The listener function to add.
153
188
  */
154
189
  addHook(name, callback) {
155
- privatePool.get(this).hooks[name] = privatePool.get(this).hooks[name] || [];
156
- const hooks = privatePool.get(this).hooks[name];
190
+ _classPrivateFieldGet(this, _hooks)[name] = _classPrivateFieldGet(this, _hooks)[name] || [];
191
+ const hooks = _classPrivateFieldGet(this, _hooks)[name];
157
192
  this.hot.addHook(name, callback);
158
193
  hooks.push(callback);
159
- privatePool.get(this).hooks[name] = hooks;
194
+ _classPrivateFieldGet(this, _hooks)[name] = hooks;
160
195
  }
161
196
 
162
197
  /**
@@ -165,7 +200,7 @@ class BasePlugin {
165
200
  * @param {string} name The hook name.
166
201
  */
167
202
  removeHooks(name) {
168
- (0, _array.arrayEach)(privatePool.get(this).hooks[name] || [], callback => {
203
+ (0, _array.arrayEach)(_classPrivateFieldGet(this, _hooks)[name] || [], callback => {
169
204
  this.hot.removeHook(name, callback);
170
205
  });
171
206
  }
@@ -174,7 +209,7 @@ class BasePlugin {
174
209
  * Clear all hooks.
175
210
  */
176
211
  clearHooks() {
177
- const hooks = privatePool.get(this).hooks;
212
+ const hooks = _classPrivateFieldGet(this, _hooks);
178
213
  (0, _object.objectEach)(hooks, (callbacks, name) => this.removeHooks(name));
179
214
  hooks.length = 0;
180
215
  }
@@ -262,7 +297,7 @@ function _isRelevantToSettings2(settings) {
262
297
  return settingKeys;
263
298
  }
264
299
  for (let i = 0; i < settingKeys.length; i++) {
265
- if (settings[settingKeys[i]] !== void 0) {
300
+ if (settings[settingKeys[i]] !== undefined) {
266
301
  return true;
267
302
  }
268
303
  }
@@ -1,8 +1,15 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  import "core-js/modules/es.array.push.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
4
5
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
8
+ 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); }
5
9
  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
10
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
11
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
12
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
6
13
  import { defineGetter, objectEach } from "../../helpers/object.mjs";
7
14
  import { arrayEach } from "../../helpers/array.mjs";
8
15
  import { getPluginsNames, hasPlugin } from "../registry.mjs";
@@ -10,16 +17,17 @@ import { hasCellType } from "../../cellTypes/registry.mjs";
10
17
  import { hasEditor } from "../../editors/registry.mjs";
11
18
  import { hasRenderer } from "../../renderers/registry.mjs";
12
19
  import { hasValidator } from "../../validators/registry.mjs";
20
+ import EventManager from "../../eventManager.mjs";
13
21
  const DEPS_TYPE_CHECKERS = new Map([['plugin', hasPlugin], ['cell-type', hasCellType], ['editor', hasEditor], ['renderer', hasRenderer], ['validator', hasValidator]]);
14
22
  export const PLUGIN_KEY = 'base';
15
- const privatePool = new WeakMap();
16
- const missingDependeciesMsgs = [];
23
+ const missingDepsMsgs = [];
17
24
  let initializedPlugins = null;
18
25
 
19
26
  /**
20
27
  * @util
21
28
  * @property {Core} hot Handsontable instance.
22
29
  */
30
+ var _hooks = /*#__PURE__*/new WeakMap();
23
31
  var _isRelevantToSettings = /*#__PURE__*/new WeakSet();
24
32
  export class BasePlugin {
25
33
  static get PLUGIN_KEY() {
@@ -39,6 +47,12 @@ export class BasePlugin {
39
47
  return [this.PLUGIN_KEY];
40
48
  }
41
49
 
50
+ /**
51
+ * The instance of the {@link EventManager} class.
52
+ *
53
+ * @type {EventManager}
54
+ */
55
+
42
56
  /**
43
57
  * @param {object} hotInstance Handsontable instance.
44
58
  */
@@ -53,6 +67,34 @@ export class BasePlugin {
53
67
  * @returns {boolean}
54
68
  */
55
69
  _classPrivateMethodInitSpec(this, _isRelevantToSettings);
70
+ _defineProperty(this, "eventManager", new EventManager(this));
71
+ /**
72
+ * @type {string}
73
+ */
74
+ _defineProperty(this, "pluginName", null);
75
+ /**
76
+ * @type {Function[]}
77
+ */
78
+ _defineProperty(this, "pluginsInitializedCallbacks", []);
79
+ /**
80
+ * @type {boolean}
81
+ */
82
+ _defineProperty(this, "isPluginsReady", false);
83
+ /**
84
+ * @type {boolean}
85
+ */
86
+ _defineProperty(this, "enabled", false);
87
+ /**
88
+ * @type {boolean}
89
+ */
90
+ _defineProperty(this, "initialized", false);
91
+ /**
92
+ * Collection of the reference to the plugins hooks.
93
+ */
94
+ _classPrivateFieldInitSpec(this, _hooks, {
95
+ writable: true,
96
+ value: {}
97
+ });
56
98
  /**
57
99
  * Handsontable instance.
58
100
  *
@@ -61,15 +103,7 @@ export class BasePlugin {
61
103
  defineGetter(this, 'hot', hotInstance, {
62
104
  writable: false
63
105
  });
64
- privatePool.set(this, {
65
- hooks: {}
66
- });
67
106
  initializedPlugins = null;
68
- this.pluginName = null;
69
- this.pluginsInitializedCallbacks = [];
70
- this.isPluginsReady = false;
71
- this.enabled = false;
72
- this.initialized = false;
73
107
  this.hot.addHook('afterPluginsInitialized', () => this.onAfterPluginsInitialized());
74
108
  this.hot.addHook('afterUpdateSettings', newSettings => this.onUpdateSettings(newSettings));
75
109
  this.hot.addHook('beforeInit', () => this.init());
@@ -77,10 +111,10 @@ export class BasePlugin {
77
111
  init() {
78
112
  this.pluginName = this.hot.getPluginName(this);
79
113
  const pluginDeps = this.constructor.PLUGIN_DEPS;
80
- const dependecies = Array.isArray(pluginDeps) ? pluginDeps : [];
81
- if (dependecies.length > 0) {
114
+ const deps = Array.isArray(pluginDeps) ? pluginDeps : [];
115
+ if (deps.length > 0) {
82
116
  const missingDependencies = [];
83
- dependecies.forEach(dependency => {
117
+ deps.forEach(dependency => {
84
118
  const [type, moduleName] = dependency.split(':');
85
119
  if (!DEPS_TYPE_CHECKERS.has(type)) {
86
120
  throw new Error(`Unknown plugin dependency type "${type}" was found.`);
@@ -91,7 +125,7 @@ export class BasePlugin {
91
125
  });
92
126
  if (missingDependencies.length > 0) {
93
127
  const errorMsg = [`The ${this.pluginName} plugin requires the following modules:\n`, `${missingDependencies.join('\n')}\n`].join('');
94
- missingDependeciesMsgs.push(errorMsg);
128
+ missingDepsMsgs.push(errorMsg);
95
129
  }
96
130
  }
97
131
  if (!initializedPlugins) {
@@ -114,8 +148,8 @@ export class BasePlugin {
114
148
  });
115
149
  const isAllPluginsAreInitialized = initializedPlugins.length === 0;
116
150
  if (isAllPluginsAreInitialized) {
117
- if (missingDependeciesMsgs.length > 0) {
118
- const errorMsg = [`${missingDependeciesMsgs.join('\n')}\n`, 'You have to import and register them manually.'].join('');
151
+ if (missingDepsMsgs.length > 0) {
152
+ const errorMsg = [`${missingDepsMsgs.join('\n')}\n`, 'You have to import and register them manually.'].join('');
119
153
  throw new Error(errorMsg);
120
154
  }
121
155
  this.hot.runHooks('afterPluginsInitialized');
@@ -148,11 +182,11 @@ export class BasePlugin {
148
182
  * @param {Function} callback The listener function to add.
149
183
  */
150
184
  addHook(name, callback) {
151
- privatePool.get(this).hooks[name] = privatePool.get(this).hooks[name] || [];
152
- const hooks = privatePool.get(this).hooks[name];
185
+ _classPrivateFieldGet(this, _hooks)[name] = _classPrivateFieldGet(this, _hooks)[name] || [];
186
+ const hooks = _classPrivateFieldGet(this, _hooks)[name];
153
187
  this.hot.addHook(name, callback);
154
188
  hooks.push(callback);
155
- privatePool.get(this).hooks[name] = hooks;
189
+ _classPrivateFieldGet(this, _hooks)[name] = hooks;
156
190
  }
157
191
 
158
192
  /**
@@ -161,7 +195,7 @@ export class BasePlugin {
161
195
  * @param {string} name The hook name.
162
196
  */
163
197
  removeHooks(name) {
164
- arrayEach(privatePool.get(this).hooks[name] || [], callback => {
198
+ arrayEach(_classPrivateFieldGet(this, _hooks)[name] || [], callback => {
165
199
  this.hot.removeHook(name, callback);
166
200
  });
167
201
  }
@@ -170,7 +204,7 @@ export class BasePlugin {
170
204
  * Clear all hooks.
171
205
  */
172
206
  clearHooks() {
173
- const hooks = privatePool.get(this).hooks;
207
+ const hooks = _classPrivateFieldGet(this, _hooks);
174
208
  objectEach(hooks, (callbacks, name) => this.removeHooks(name));
175
209
  hooks.length = 0;
176
210
  }
@@ -257,7 +291,7 @@ function _isRelevantToSettings2(settings) {
257
291
  return settingKeys;
258
292
  }
259
293
  for (let i = 0; i < settingKeys.length; i++) {
260
- if (settings[settingKeys[i]] !== void 0) {
294
+ if (settings[settingKeys[i]] !== undefined) {
261
295
  return true;
262
296
  }
263
297
  }