handsontable 14.2.0 → 14.3.0-next-13fe676-20240409

Sign up to get free protection for your applications and to get access to all the features.
Files changed (469) hide show
  1. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +1 -1
  2. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +1 -1
  3. package/3rdparty/walkontable/src/calculator/renderAllRows.js +1 -1
  4. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +1 -1
  5. package/3rdparty/walkontable/src/calculator/viewportColumns.js +13 -18
  6. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +13 -18
  7. package/3rdparty/walkontable/src/calculator/viewportRows.js +11 -16
  8. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +11 -16
  9. package/3rdparty/walkontable/src/cell/coords.js +13 -18
  10. package/3rdparty/walkontable/src/cell/coords.mjs +13 -18
  11. package/3rdparty/walkontable/src/cell/range.d.ts +2 -1
  12. package/3rdparty/walkontable/src/cell/range.js +42 -30
  13. package/3rdparty/walkontable/src/cell/range.mjs +42 -30
  14. package/3rdparty/walkontable/src/core/_base.js +2 -2
  15. package/3rdparty/walkontable/src/core/_base.mjs +2 -2
  16. package/3rdparty/walkontable/src/core/clone.js +1 -1
  17. package/3rdparty/walkontable/src/core/clone.mjs +1 -1
  18. package/3rdparty/walkontable/src/event.js +72 -104
  19. package/3rdparty/walkontable/src/event.mjs +72 -104
  20. package/3rdparty/walkontable/src/filter/column.js +1 -1
  21. package/3rdparty/walkontable/src/filter/column.mjs +1 -1
  22. package/3rdparty/walkontable/src/filter/row.js +1 -1
  23. package/3rdparty/walkontable/src/filter/row.mjs +1 -1
  24. package/3rdparty/walkontable/src/index.js +1 -1
  25. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  26. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  27. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  28. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  29. package/3rdparty/walkontable/src/overlay/inlineStart.js +15 -1
  30. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +16 -2
  31. package/3rdparty/walkontable/src/overlay/top.js +12 -1
  32. package/3rdparty/walkontable/src/overlay/top.mjs +13 -2
  33. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +1 -1
  34. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +1 -1
  35. package/3rdparty/walkontable/src/overlays.js +47 -5
  36. package/3rdparty/walkontable/src/overlays.mjs +47 -5
  37. package/3rdparty/walkontable/src/renderer/_base.js +1 -1
  38. package/3rdparty/walkontable/src/renderer/_base.mjs +1 -1
  39. package/3rdparty/walkontable/src/renderer/cells.js +1 -1
  40. package/3rdparty/walkontable/src/renderer/cells.mjs +1 -1
  41. package/3rdparty/walkontable/src/renderer/rowHeaders.js +1 -1
  42. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +1 -1
  43. package/3rdparty/walkontable/src/renderer/rows.js +1 -1
  44. package/3rdparty/walkontable/src/renderer/rows.mjs +1 -1
  45. package/3rdparty/walkontable/src/renderer/table.js +1 -1
  46. package/3rdparty/walkontable/src/renderer/table.mjs +1 -1
  47. package/3rdparty/walkontable/src/scroll.js +16 -18
  48. package/3rdparty/walkontable/src/scroll.mjs +16 -18
  49. package/3rdparty/walkontable/src/selection/manager.js +48 -69
  50. package/3rdparty/walkontable/src/selection/manager.mjs +48 -69
  51. package/3rdparty/walkontable/src/selection/scanner.js +33 -42
  52. package/3rdparty/walkontable/src/selection/scanner.mjs +33 -42
  53. package/3rdparty/walkontable/src/settings.js +1 -1
  54. package/3rdparty/walkontable/src/settings.mjs +1 -1
  55. package/3rdparty/walkontable/src/table.js +1 -1
  56. package/3rdparty/walkontable/src/table.mjs +1 -1
  57. package/3rdparty/walkontable/src/utils/column.js +1 -1
  58. package/3rdparty/walkontable/src/utils/column.mjs +1 -1
  59. package/3rdparty/walkontable/src/utils/columnStretching.js +28 -45
  60. package/3rdparty/walkontable/src/utils/columnStretching.mjs +28 -45
  61. package/3rdparty/walkontable/src/utils/nodesPool.js +1 -1
  62. package/3rdparty/walkontable/src/utils/nodesPool.mjs +1 -1
  63. package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
  64. package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
  65. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +1 -1
  66. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +1 -1
  67. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +1 -1
  68. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +1 -1
  69. package/3rdparty/walkontable/src/utils/row.js +1 -1
  70. package/3rdparty/walkontable/src/utils/row.mjs +1 -1
  71. package/CHANGELOG.md +20 -0
  72. package/base.js +2 -2
  73. package/base.mjs +2 -2
  74. package/core/viewportScroll/index.js +4 -1
  75. package/core/viewportScroll/index.mjs +4 -1
  76. package/core/viewportScroll/scrollStrategies/focusScroll.js +15 -0
  77. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +11 -0
  78. package/core.d.ts +4 -3
  79. package/core.js +98 -43
  80. package/core.mjs +98 -43
  81. package/dataMap/dataMap.js +1 -1
  82. package/dataMap/dataMap.mjs +1 -1
  83. package/dataMap/dataSource.js +2 -2
  84. package/dataMap/dataSource.mjs +2 -2
  85. package/dataMap/metaManager/lazyFactoryMap.js +3 -5
  86. package/dataMap/metaManager/lazyFactoryMap.mjs +2 -4
  87. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
  88. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
  89. package/dataMap/metaManager/metaLayers/columnMeta.js +1 -1
  90. package/dataMap/metaManager/metaLayers/columnMeta.mjs +1 -1
  91. package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
  92. package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
  93. package/dataMap/metaManager/metaLayers/tableMeta.js +1 -1
  94. package/dataMap/metaManager/metaLayers/tableMeta.mjs +1 -1
  95. package/dataMap/metaManager/metaSchema.js +272 -272
  96. package/dataMap/metaManager/metaSchema.mjs +272 -272
  97. package/dataMap/metaManager/mods/dynamicCellMeta.js +1 -1
  98. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +1 -1
  99. package/dataMap/metaManager/mods/extendMetaProperties.js +1 -1
  100. package/dataMap/metaManager/mods/extendMetaProperties.mjs +1 -1
  101. package/dataMap/replaceData.js +1 -1
  102. package/dataMap/replaceData.mjs +1 -1
  103. package/dist/handsontable.css +4 -4
  104. package/dist/handsontable.full.css +4 -4
  105. package/dist/handsontable.full.js +9800 -10020
  106. package/dist/handsontable.full.min.css +3 -3
  107. package/dist/handsontable.full.min.js +292 -292
  108. package/dist/handsontable.js +7470 -7056
  109. package/dist/handsontable.min.css +3 -3
  110. package/dist/handsontable.min.js +25 -25
  111. package/dist/languages/all.min.js +1 -1
  112. package/dist/languages/ar-AR.min.js +1 -1
  113. package/dist/languages/cs-CZ.min.js +1 -1
  114. package/dist/languages/de-CH.min.js +1 -1
  115. package/dist/languages/de-DE.min.js +1 -1
  116. package/dist/languages/en-US.min.js +1 -1
  117. package/dist/languages/es-MX.min.js +1 -1
  118. package/dist/languages/fr-FR.min.js +1 -1
  119. package/dist/languages/hr-HR.min.js +1 -1
  120. package/dist/languages/it-IT.min.js +1 -1
  121. package/dist/languages/ja-JP.min.js +1 -1
  122. package/dist/languages/ko-KR.min.js +1 -1
  123. package/dist/languages/lv-LV.min.js +1 -1
  124. package/dist/languages/nb-NO.min.js +1 -1
  125. package/dist/languages/nl-NL.min.js +1 -1
  126. package/dist/languages/pl-PL.min.js +1 -1
  127. package/dist/languages/pt-BR.min.js +1 -1
  128. package/dist/languages/ru-RU.min.js +1 -1
  129. package/dist/languages/sr-SP.min.js +1 -1
  130. package/dist/languages/zh-CN.min.js +1 -1
  131. package/dist/languages/zh-TW.min.js +1 -1
  132. package/editorManager.js +26 -24
  133. package/editorManager.mjs +26 -24
  134. package/editors/autocompleteEditor/autocompleteEditor.js +7 -11
  135. package/editors/autocompleteEditor/autocompleteEditor.mjs +7 -11
  136. package/editors/baseEditor/baseEditor.js +1 -1
  137. package/editors/baseEditor/baseEditor.mjs +1 -1
  138. package/editors/dateEditor/dateEditor.js +35 -11
  139. package/editors/dateEditor/dateEditor.mjs +35 -11
  140. package/editors/selectEditor/selectEditor.js +20 -19
  141. package/editors/selectEditor/selectEditor.mjs +20 -19
  142. package/editors/textEditor/textEditor.js +1 -1
  143. package/editors/textEditor/textEditor.mjs +1 -1
  144. package/eventManager.js +2 -2
  145. package/eventManager.mjs +2 -2
  146. package/focusManager.js +64 -82
  147. package/focusManager.mjs +64 -82
  148. package/helpers/dom/element.js +23 -1
  149. package/helpers/dom/element.mjs +21 -1
  150. package/helpers/mixed.js +2 -2
  151. package/helpers/mixed.mjs +2 -2
  152. package/helpers/object.js +2 -2
  153. package/helpers/object.mjs +2 -2
  154. package/i18n/languages/ar-AR.d.ts +5 -0
  155. package/i18n/languages/ar-AR.js +1 -1
  156. package/i18n/languages/cs-CZ.d.ts +5 -0
  157. package/i18n/languages/cs-CZ.js +1 -1
  158. package/i18n/languages/de-CH.js +1 -1
  159. package/i18n/languages/de-DE.js +1 -1
  160. package/i18n/languages/en-US.js +1 -1
  161. package/i18n/languages/es-MX.js +1 -1
  162. package/i18n/languages/fr-FR.js +1 -1
  163. package/i18n/languages/hr-HR.d.ts +5 -0
  164. package/i18n/languages/hr-HR.js +1 -1
  165. package/i18n/languages/it-IT.js +1 -1
  166. package/i18n/languages/ja-JP.js +1 -1
  167. package/i18n/languages/ko-KR.js +1 -1
  168. package/i18n/languages/lv-LV.js +1 -1
  169. package/i18n/languages/nb-NO.js +1 -1
  170. package/i18n/languages/nl-NL.js +1 -1
  171. package/i18n/languages/pl-PL.js +1 -1
  172. package/i18n/languages/pt-BR.js +1 -1
  173. package/i18n/languages/ru-RU.js +1 -1
  174. package/i18n/languages/sr-SP.d.ts +5 -0
  175. package/i18n/languages/sr-SP.js +1 -1
  176. package/i18n/languages/zh-CN.js +1 -1
  177. package/i18n/languages/zh-TW.js +1 -1
  178. package/i18n/registry.js +1 -1
  179. package/index.d.ts +10 -0
  180. package/index.js +1 -1
  181. package/package.json +14 -10
  182. package/pluginHooks.d.ts +4 -3
  183. package/pluginHooks.js +143 -82
  184. package/pluginHooks.mjs +143 -82
  185. package/plugins/autoColumnSize/autoColumnSize.js +50 -66
  186. package/plugins/autoColumnSize/autoColumnSize.mjs +50 -66
  187. package/plugins/autoRowSize/autoRowSize.js +29 -35
  188. package/plugins/autoRowSize/autoRowSize.mjs +29 -35
  189. package/plugins/autofill/autofill.js +31 -39
  190. package/plugins/autofill/autofill.mjs +31 -39
  191. package/plugins/base/base.js +13 -18
  192. package/plugins/base/base.mjs +13 -18
  193. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +6 -6
  194. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +6 -6
  195. package/plugins/collapsibleColumns/collapsibleColumns.js +60 -51
  196. package/plugins/collapsibleColumns/collapsibleColumns.mjs +60 -51
  197. package/plugins/columnSorting/columnSorting.js +50 -46
  198. package/plugins/columnSorting/columnSorting.mjs +50 -46
  199. package/plugins/columnSorting/columnStatesManager.js +1 -1
  200. package/plugins/columnSorting/columnStatesManager.mjs +1 -1
  201. package/plugins/columnSummary/columnSummary.js +36 -40
  202. package/plugins/columnSummary/columnSummary.mjs +36 -40
  203. package/plugins/columnSummary/endpoints.js +1 -1
  204. package/plugins/columnSummary/endpoints.mjs +1 -1
  205. package/plugins/comments/commentEditor.js +1 -1
  206. package/plugins/comments/commentEditor.mjs +1 -1
  207. package/plugins/comments/comments.js +117 -159
  208. package/plugins/comments/comments.mjs +117 -159
  209. package/plugins/comments/contextMenuItem/addEditComment.js +1 -1
  210. package/plugins/comments/contextMenuItem/readOnlyComment.js +1 -1
  211. package/plugins/comments/contextMenuItem/removeComment.js +1 -1
  212. package/plugins/comments/displaySwitch.js +1 -1
  213. package/plugins/comments/displaySwitch.mjs +1 -1
  214. package/plugins/contextMenu/commandExecutor.js +1 -1
  215. package/plugins/contextMenu/commandExecutor.mjs +1 -1
  216. package/plugins/contextMenu/contextMenu.js +24 -30
  217. package/plugins/contextMenu/contextMenu.mjs +24 -30
  218. package/plugins/contextMenu/itemsFactory.js +2 -2
  219. package/plugins/contextMenu/itemsFactory.mjs +2 -2
  220. package/plugins/contextMenu/menu/cursor.js +1 -1
  221. package/plugins/contextMenu/menu/cursor.mjs +1 -1
  222. package/plugins/contextMenu/menu/defaultShortcutsList.js +26 -10
  223. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +26 -10
  224. package/plugins/contextMenu/menu/menu.js +14 -22
  225. package/plugins/contextMenu/menu/menu.mjs +14 -22
  226. package/plugins/contextMenu/menu/positioner.js +41 -58
  227. package/plugins/contextMenu/menu/positioner.mjs +41 -58
  228. package/plugins/contextMenu/predefinedItems/alignment.js +1 -1
  229. package/plugins/contextMenu/predefinedItems/clearColumn.js +1 -1
  230. package/plugins/contextMenu/predefinedItems/columnLeft.js +1 -1
  231. package/plugins/contextMenu/predefinedItems/columnRight.js +1 -1
  232. package/plugins/contextMenu/predefinedItems/index.js +1 -1
  233. package/plugins/contextMenu/predefinedItems/readOnly.js +1 -1
  234. package/plugins/contextMenu/predefinedItems/redo.js +1 -1
  235. package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
  236. package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
  237. package/plugins/contextMenu/predefinedItems/rowAbove.js +1 -1
  238. package/plugins/contextMenu/predefinedItems/rowBelow.js +1 -1
  239. package/plugins/contextMenu/predefinedItems/undo.js +1 -1
  240. package/plugins/copyPaste/contextMenuItem/cut.js +1 -1
  241. package/plugins/copyPaste/copyPaste.js +120 -161
  242. package/plugins/copyPaste/copyPaste.mjs +120 -161
  243. package/plugins/copyPaste/copyableRanges.js +43 -66
  244. package/plugins/copyPaste/copyableRanges.mjs +43 -66
  245. package/plugins/customBorders/contextMenuItem/bottom.js +1 -1
  246. package/plugins/customBorders/contextMenuItem/left.js +1 -1
  247. package/plugins/customBorders/contextMenuItem/noBorders.js +1 -1
  248. package/plugins/customBorders/contextMenuItem/right.js +1 -1
  249. package/plugins/customBorders/contextMenuItem/top.js +1 -1
  250. package/plugins/customBorders/customBorders.js +14 -16
  251. package/plugins/customBorders/customBorders.mjs +13 -15
  252. package/plugins/dragToScroll/dragToScroll.js +7 -7
  253. package/plugins/dragToScroll/dragToScroll.mjs +7 -7
  254. package/plugins/dropdownMenu/dropdownMenu.js +84 -110
  255. package/plugins/dropdownMenu/dropdownMenu.mjs +84 -110
  256. package/plugins/exportFile/dataProvider.js +2 -2
  257. package/plugins/exportFile/dataProvider.mjs +2 -2
  258. package/plugins/exportFile/exportFile.js +2 -2
  259. package/plugins/exportFile/exportFile.mjs +1 -1
  260. package/plugins/exportFile/types/_base.js +1 -1
  261. package/plugins/exportFile/types/_base.mjs +1 -1
  262. package/plugins/filters/component/_base.js +1 -1
  263. package/plugins/filters/component/_base.mjs +1 -1
  264. package/plugins/filters/component/actionBar.js +11 -11
  265. package/plugins/filters/component/actionBar.mjs +9 -9
  266. package/plugins/filters/component/condition.js +15 -17
  267. package/plugins/filters/component/condition.mjs +14 -16
  268. package/plugins/filters/component/operators.js +7 -7
  269. package/plugins/filters/component/operators.mjs +7 -7
  270. package/plugins/filters/component/value.js +26 -30
  271. package/plugins/filters/component/value.mjs +25 -29
  272. package/plugins/filters/condition/beginsWith.js +1 -1
  273. package/plugins/filters/condition/between.js +1 -1
  274. package/plugins/filters/condition/contains.js +1 -1
  275. package/plugins/filters/condition/date/after.js +1 -1
  276. package/plugins/filters/condition/date/before.js +1 -1
  277. package/plugins/filters/condition/date/today.js +1 -1
  278. package/plugins/filters/condition/date/tomorrow.js +1 -1
  279. package/plugins/filters/condition/date/yesterday.js +1 -1
  280. package/plugins/filters/condition/empty.js +1 -1
  281. package/plugins/filters/condition/endsWith.js +1 -1
  282. package/plugins/filters/condition/equal.js +1 -1
  283. package/plugins/filters/condition/greaterThan.js +1 -1
  284. package/plugins/filters/condition/greaterThanOrEqual.js +1 -1
  285. package/plugins/filters/condition/lessThan.js +1 -1
  286. package/plugins/filters/condition/lessThanOrEqual.js +1 -1
  287. package/plugins/filters/condition/none.js +1 -1
  288. package/plugins/filters/condition/notBetween.js +1 -1
  289. package/plugins/filters/condition/notContains.js +1 -1
  290. package/plugins/filters/condition/notEmpty.js +1 -1
  291. package/plugins/filters/condition/notEqual.js +1 -1
  292. package/plugins/filters/conditionCollection.js +1 -1
  293. package/plugins/filters/conditionCollection.mjs +1 -1
  294. package/plugins/filters/conditionUpdateObserver.js +23 -25
  295. package/plugins/filters/conditionUpdateObserver.mjs +23 -25
  296. package/plugins/filters/dataFilter.js +2 -2
  297. package/plugins/filters/dataFilter.mjs +2 -2
  298. package/plugins/filters/filters.js +84 -98
  299. package/plugins/filters/filters.mjs +83 -97
  300. package/plugins/filters/logicalOperations/conjunction.js +1 -1
  301. package/plugins/filters/logicalOperations/disjunction.js +1 -1
  302. package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +1 -1
  303. package/plugins/filters/ui/_base.js +2 -2
  304. package/plugins/filters/ui/_base.mjs +1 -1
  305. package/plugins/filters/ui/input.js +13 -19
  306. package/plugins/filters/ui/input.mjs +13 -19
  307. package/plugins/filters/ui/link.js +8 -13
  308. package/plugins/filters/ui/link.mjs +8 -13
  309. package/plugins/filters/ui/multipleSelect.js +86 -113
  310. package/plugins/filters/ui/multipleSelect.mjs +85 -112
  311. package/plugins/filters/ui/radioInput.js +12 -20
  312. package/plugins/filters/ui/radioInput.mjs +12 -20
  313. package/plugins/filters/ui/select.js +51 -73
  314. package/plugins/filters/ui/select.mjs +49 -71
  315. package/plugins/formulas/formulas.js +270 -328
  316. package/plugins/formulas/formulas.mjs +271 -329
  317. package/plugins/formulas/indexSyncer/axisSyncer.js +38 -61
  318. package/plugins/formulas/indexSyncer/axisSyncer.mjs +38 -61
  319. package/plugins/formulas/indexSyncer/index.js +25 -48
  320. package/plugins/formulas/indexSyncer/index.mjs +25 -48
  321. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
  322. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +1 -1
  323. package/plugins/hiddenColumns/hiddenColumns.js +68 -87
  324. package/plugins/hiddenColumns/hiddenColumns.mjs +68 -87
  325. package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
  326. package/plugins/hiddenRows/contextMenuItem/showRow.js +1 -1
  327. package/plugins/hiddenRows/hiddenRows.js +67 -86
  328. package/plugins/hiddenRows/hiddenRows.mjs +67 -86
  329. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  330. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  331. package/plugins/manualColumnFreeze/manualColumnFreeze.js +24 -32
  332. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +25 -33
  333. package/plugins/manualColumnMove/manualColumnMove.js +133 -177
  334. package/plugins/manualColumnMove/manualColumnMove.mjs +133 -177
  335. package/plugins/manualColumnMove/ui/_base.js +1 -1
  336. package/plugins/manualColumnMove/ui/_base.mjs +1 -1
  337. package/plugins/manualColumnResize/manualColumnResize.js +169 -230
  338. package/plugins/manualColumnResize/manualColumnResize.mjs +169 -230
  339. package/plugins/manualRowMove/manualRowMove.js +106 -135
  340. package/plugins/manualRowMove/manualRowMove.mjs +106 -135
  341. package/plugins/manualRowMove/ui/_base.js +1 -1
  342. package/plugins/manualRowMove/ui/_base.mjs +1 -1
  343. package/plugins/manualRowResize/manualRowResize.js +150 -209
  344. package/plugins/manualRowResize/manualRowResize.mjs +150 -209
  345. package/plugins/mergeCells/calculations/autofill.js +1 -1
  346. package/plugins/mergeCells/calculations/autofill.mjs +1 -1
  347. package/plugins/mergeCells/calculations/selection.js +3 -72
  348. package/plugins/mergeCells/calculations/selection.mjs +3 -72
  349. package/plugins/mergeCells/cellCoords.js +1 -1
  350. package/plugins/mergeCells/cellCoords.mjs +1 -1
  351. package/plugins/mergeCells/cellsCollection.js +118 -2
  352. package/plugins/mergeCells/cellsCollection.mjs +118 -2
  353. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +12 -2
  354. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +11 -1
  355. package/plugins/mergeCells/focusOrder.js +305 -0
  356. package/plugins/mergeCells/focusOrder.mjs +300 -0
  357. package/plugins/mergeCells/mergeCells.js +500 -398
  358. package/plugins/mergeCells/mergeCells.mjs +500 -398
  359. package/plugins/multiColumnSorting/multiColumnSorting.js +9 -3
  360. package/plugins/multiColumnSorting/multiColumnSorting.mjs +9 -3
  361. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
  362. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
  363. package/plugins/nestedHeaders/nestedHeaders.js +206 -254
  364. package/plugins/nestedHeaders/nestedHeaders.mjs +207 -255
  365. package/plugins/nestedHeaders/stateManager/headersTree.js +21 -32
  366. package/plugins/nestedHeaders/stateManager/headersTree.mjs +21 -32
  367. package/plugins/nestedHeaders/stateManager/index.js +30 -41
  368. package/plugins/nestedHeaders/stateManager/index.mjs +30 -41
  369. package/plugins/nestedHeaders/stateManager/sourceSettings.js +19 -30
  370. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +19 -30
  371. package/plugins/nestedHeaders/utils/ghostTable.js +1 -1
  372. package/plugins/nestedHeaders/utils/ghostTable.mjs +1 -1
  373. package/plugins/nestedRows/data/dataManager.js +2 -2
  374. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  375. package/plugins/nestedRows/nestedRows.js +154 -185
  376. package/plugins/nestedRows/nestedRows.mjs +155 -186
  377. package/plugins/nestedRows/ui/_base.js +1 -1
  378. package/plugins/nestedRows/ui/_base.mjs +1 -1
  379. package/plugins/nestedRows/ui/contextMenu.js +13 -17
  380. package/plugins/nestedRows/ui/contextMenu.mjs +11 -15
  381. package/plugins/nestedRows/utils/rowMoveController.js +6 -6
  382. package/plugins/nestedRows/utils/rowMoveController.mjs +6 -6
  383. package/plugins/persistentState/persistentState.js +1 -1
  384. package/plugins/persistentState/persistentState.mjs +1 -1
  385. package/plugins/persistentState/storage.js +3 -3
  386. package/plugins/persistentState/storage.mjs +3 -3
  387. package/plugins/search/search.js +8 -8
  388. package/plugins/search/search.mjs +8 -8
  389. package/plugins/touchScroll/touchScroll.js +16 -20
  390. package/plugins/touchScroll/touchScroll.mjs +17 -21
  391. package/plugins/trimRows/trimRows.js +7 -7
  392. package/plugins/trimRows/trimRows.mjs +7 -7
  393. package/plugins/undoRedo/index.js +1 -1
  394. package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
  395. package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
  396. package/selection/highlight/highlight.js +16 -18
  397. package/selection/highlight/highlight.mjs +15 -17
  398. package/selection/highlight/visualSelection.js +3 -1
  399. package/selection/highlight/visualSelection.mjs +3 -1
  400. package/selection/range.js +3 -5
  401. package/selection/range.mjs +2 -4
  402. package/selection/selection.js +227 -69
  403. package/selection/selection.mjs +225 -67
  404. package/selection/transformation.js +149 -118
  405. package/selection/transformation.mjs +149 -118
  406. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  407. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  408. package/shortcutContexts/commands/editor/open.js +18 -3
  409. package/shortcutContexts/commands/editor/open.mjs +18 -3
  410. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  411. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  412. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  413. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  414. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  415. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  416. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  417. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  418. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +3 -1
  419. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +3 -1
  420. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +9 -3
  421. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +9 -3
  422. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +10 -3
  423. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +10 -3
  424. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +3 -1
  425. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +3 -1
  426. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +3 -1
  427. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +3 -1
  428. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +3 -1
  429. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +3 -1
  430. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  431. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  432. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  433. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  434. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +6 -1
  435. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +6 -1
  436. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +6 -1
  437. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +6 -1
  438. package/shortcutContexts/grid.js +9 -3
  439. package/shortcutContexts/grid.mjs +9 -3
  440. package/shortcuts/context.js +3 -2
  441. package/shortcuts/context.mjs +3 -2
  442. package/shortcuts/manager.js +2 -2
  443. package/shortcuts/manager.mjs +2 -2
  444. package/tableView.js +53 -79
  445. package/tableView.mjs +53 -79
  446. package/translations/changesObservable/observable.js +21 -38
  447. package/translations/changesObservable/observable.mjs +21 -38
  448. package/translations/changesObservable/observer.js +7 -12
  449. package/translations/changesObservable/observer.mjs +6 -11
  450. package/translations/indexMapper.js +1 -1
  451. package/translations/indexMapper.mjs +1 -1
  452. package/translations/mapCollections/aggregatedCollection.js +2 -2
  453. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  454. package/translations/mapCollections/mapCollection.js +1 -1
  455. package/translations/mapCollections/mapCollection.mjs +1 -1
  456. package/translations/maps/indexMap.js +2 -2
  457. package/translations/maps/indexMap.mjs +2 -2
  458. package/translations/maps/linkedPhysicalIndexToValueMap.js +1 -1
  459. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +1 -1
  460. package/utils/dataStructures/linkedList.js +7 -2
  461. package/utils/dataStructures/linkedList.mjs +7 -2
  462. package/utils/dataStructures/tree.js +2 -2
  463. package/utils/dataStructures/tree.mjs +2 -2
  464. package/utils/ghostTable.js +1 -1
  465. package/utils/ghostTable.mjs +1 -1
  466. package/utils/interval.js +27 -45
  467. package/utils/interval.mjs +27 -45
  468. package/utils/samplesGenerator.js +1 -1
  469. package/utils/samplesGenerator.mjs +1 -1
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- require("core-js/modules/es.json.stringify.js");
5
4
  require("core-js/modules/es.error.cause.js");
6
5
  require("core-js/modules/es.array.push.js");
6
+ require("core-js/modules/es.json.stringify.js");
7
7
  var _base = require("../base");
8
8
  var _staticRegister = _interopRequireDefault(require("../../utils/staticRegister"));
9
9
  var _console = require("../../helpers/console");
@@ -19,16 +19,13 @@ var _indexSyncer = _interopRequireDefault(require("./indexSyncer"));
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
21
21
  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; }
22
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
23
23
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
24
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
25
25
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
26
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
27
- function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
28
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
29
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
30
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
31
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
26
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
27
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
28
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
32
29
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'formulas';
33
30
  const SETTING_KEYS = exports.SETTING_KEYS = ['maxRows', 'maxColumns', 'language'];
34
31
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 260;
@@ -50,7 +47,7 @@ const isBlockedSource = source => source === 'UndoRedo.undo' || source === 'Undo
50
47
  * integration with our other product, [HyperFormula](https://github.com/handsontable/hyperformula/), which is a
51
48
  * powerful calculation engine with an extensive number of features.
52
49
  *
53
- * To test out HyperFormula, see [this guide](@/guides/formulas/formula-calculation.md#available-functions).
50
+ * To test out HyperFormula, see [this guide](@/guides/formulas/formula-calculation/formula-calculation.md#available-functions).
54
51
  *
55
52
  * @plugin Formulas
56
53
  * @class Formulas
@@ -58,228 +55,12 @@ const isBlockedSource = source => source === 'UndoRedo.undo' || source === 'Undo
58
55
  var _internalOperationPending = /*#__PURE__*/new WeakMap();
59
56
  var _hotWasInitializedWithEmptyData = /*#__PURE__*/new WeakMap();
60
57
  var _engineListeners = /*#__PURE__*/new WeakMap();
61
- var _onBeforeValidate = /*#__PURE__*/new WeakSet();
62
- var _onBeforeAutofill = /*#__PURE__*/new WeakSet();
63
- var _onBeforeLoadData = /*#__PURE__*/new WeakSet();
64
- var _onAfterCellMetaReset = /*#__PURE__*/new WeakSet();
65
- var _onAfterLoadData = /*#__PURE__*/new WeakSet();
66
- var _onModifyData = /*#__PURE__*/new WeakSet();
67
- var _onModifySourceData = /*#__PURE__*/new WeakSet();
68
- var _onAfterSetDataAtCell = /*#__PURE__*/new WeakSet();
69
- var _onAfterSetSourceDataAtCell = /*#__PURE__*/new WeakSet();
70
- var _onBeforeCreateRow = /*#__PURE__*/new WeakSet();
71
- var _onBeforeCreateCol = /*#__PURE__*/new WeakSet();
72
- var _onBeforeRemoveRow = /*#__PURE__*/new WeakSet();
73
- var _onBeforeRemoveCol = /*#__PURE__*/new WeakSet();
74
- var _onAfterCreateRow = /*#__PURE__*/new WeakSet();
75
- var _onAfterCreateCol = /*#__PURE__*/new WeakSet();
76
- var _onAfterRemoveRow = /*#__PURE__*/new WeakSet();
77
- var _onAfterRemoveCol = /*#__PURE__*/new WeakSet();
78
- var _onAfterDetachChild = /*#__PURE__*/new WeakSet();
79
- var _onEngineValuesUpdated = /*#__PURE__*/new WeakSet();
80
- var _onEngineNamedExpressionsAdded = /*#__PURE__*/new WeakSet();
81
- var _onEngineNamedExpressionsRemoved = /*#__PURE__*/new WeakSet();
82
- var _onEngineSheetAdded = /*#__PURE__*/new WeakSet();
83
- var _onEngineSheetRenamed = /*#__PURE__*/new WeakSet();
84
- var _onEngineSheetRemoved = /*#__PURE__*/new WeakSet();
58
+ var _Formulas_brand = /*#__PURE__*/new WeakSet();
85
59
  class Formulas extends _base.BasePlugin {
86
60
  constructor() {
87
61
  var _this;
88
62
  super(...arguments);
89
63
  _this = this;
90
- /**
91
- * Called when a sheet is removed from the engine instance.
92
- *
93
- * @fires Hooks#afterSheetRemoved
94
- * @param {string} removedSheetDisplayName The removed sheet name.
95
- * @param {Array} changes The values and location of applied changes.
96
- */
97
- _classPrivateMethodInitSpec(this, _onEngineSheetRemoved);
98
- /**
99
- * Called when a sheet in the engine instance is renamed.
100
- *
101
- * @fires Hooks#afterSheetRenamed
102
- * @param {string} oldDisplayName The old name of the sheet.
103
- * @param {string} newDisplayName The new name of the sheet.
104
- */
105
- _classPrivateMethodInitSpec(this, _onEngineSheetRenamed);
106
- /**
107
- * Called when a new sheet is added to the engine instance.
108
- *
109
- * @fires Hooks#afterSheetAdded
110
- * @param {string} addedSheetDisplayName The name of the added sheet.
111
- */
112
- _classPrivateMethodInitSpec(this, _onEngineSheetAdded);
113
- /**
114
- * Called when a named expression is removed from the engine instance.
115
- *
116
- * @fires Hooks#afterNamedExpressionRemoved
117
- * @param {string} namedExpressionName The name of the removed expression.
118
- * @param {Array} changes The values and location of applied changes.
119
- */
120
- _classPrivateMethodInitSpec(this, _onEngineNamedExpressionsRemoved);
121
- /**
122
- * Called when a named expression is added to the engine instance.
123
- *
124
- * @fires Hooks#afterNamedExpressionAdded
125
- * @param {string} namedExpressionName The name of the added expression.
126
- * @param {Array} changes The values and location of applied changes.
127
- */
128
- _classPrivateMethodInitSpec(this, _onEngineNamedExpressionsAdded);
129
- /**
130
- * Called when a value is updated in the engine.
131
- *
132
- * @fires Hooks#afterFormulasValuesUpdate
133
- * @param {Array} changes The values and location of applied changes.
134
- */
135
- _classPrivateMethodInitSpec(this, _onEngineValuesUpdated);
136
- /**
137
- * `afterDetachChild` hook callback.
138
- * Used to sync the data of the rows detached in the Nested Rows plugin with the engine's dataset.
139
- *
140
- * @param {object} parent An object representing the parent from which the element was detached.
141
- * @param {object} element The detached element.
142
- * @param {number} finalElementRowIndex The final row index of the detached element.
143
- */
144
- _classPrivateMethodInitSpec(this, _onAfterDetachChild);
145
- /**
146
- * `afterRemoveCol` hook callback.
147
- *
148
- * @param {number} col Visual index of starter column.
149
- * @param {number} amount An amount of removed columns.
150
- * @param {number[]} physicalColumns An array of physical columns removed from the data source.
151
- * @param {string} [source] String that identifies source of hook call
152
- * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
153
- */
154
- _classPrivateMethodInitSpec(this, _onAfterRemoveCol);
155
- /**
156
- * `afterRemoveRow` hook callback.
157
- *
158
- * @param {number} row Visual index of starter row.
159
- * @param {number} amount An amount of removed rows.
160
- * @param {number[]} physicalRows An array of physical rows removed from the data source.
161
- * @param {string} [source] String that identifies source of hook call
162
- * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
163
- */
164
- _classPrivateMethodInitSpec(this, _onAfterRemoveRow);
165
- /**
166
- * `afterCreateCol` hook callback.
167
- *
168
- * @param {number} visualColumn Represents the visual index of first newly created column in the data source.
169
- * @param {number} amount Number of newly created columns in the data source.
170
- * @param {string} [source] String that identifies source of hook call
171
- * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
172
- */
173
- _classPrivateMethodInitSpec(this, _onAfterCreateCol);
174
- /**
175
- * `afterCreateRow` hook callback.
176
- *
177
- * @param {number} visualRow Represents the visual index of first newly created row in the data source array.
178
- * @param {number} amount Number of newly created rows in the data source array.
179
- * @param {string} [source] String that identifies source of hook call
180
- * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
181
- */
182
- _classPrivateMethodInitSpec(this, _onAfterCreateRow);
183
- /**
184
- * `beforeRemoveCol` hook callback.
185
- *
186
- * @param {number} col Visual index of starter column.
187
- * @param {number} amount Amount of columns to be removed.
188
- * @param {number[]} physicalColumns An array of physical columns removed from the data source.
189
- * @returns {*|boolean} If false is returned the action is canceled.
190
- */
191
- _classPrivateMethodInitSpec(this, _onBeforeRemoveCol);
192
- /**
193
- * `beforeRemoveRow` hook callback.
194
- *
195
- * @param {number} row Visual index of starter row.
196
- * @param {number} amount Amount of rows to be removed.
197
- * @param {number[]} physicalRows An array of physical rows removed from the data source.
198
- * @returns {*|boolean} If false is returned the action is canceled.
199
- */
200
- _classPrivateMethodInitSpec(this, _onBeforeRemoveRow);
201
- /**
202
- * `beforeCreateCol` hook callback.
203
- *
204
- * @param {number} visualColumn Represents the visual index of first newly created column in the data source.
205
- * @param {number} amount Number of newly created columns in the data source.
206
- * @returns {*|boolean} If false is returned the action is canceled.
207
- */
208
- _classPrivateMethodInitSpec(this, _onBeforeCreateCol);
209
- /**
210
- * `beforeCreateRow` hook callback.
211
- *
212
- * @param {number} visualRow Represents the visual index of first newly created row in the data source array.
213
- * @param {number} amount Number of newly created rows in the data source array.
214
- * @returns {*|boolean} If false is returned the action is canceled.
215
- */
216
- _classPrivateMethodInitSpec(this, _onBeforeCreateRow);
217
- /**
218
- * `onAfterSetSourceDataAtCell` hook callback.
219
- *
220
- * @param {Array[]} changes An array of changes in format [[row, column, oldValue, value], ...].
221
- * @param {string} [source] String that identifies source of hook call
222
- * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
223
- */
224
- _classPrivateMethodInitSpec(this, _onAfterSetSourceDataAtCell);
225
- /**
226
- * `onAfterSetDataAtCell` hook callback.
227
- *
228
- * @param {Array[]} changes An array of changes in format [[row, prop, oldValue, value], ...].
229
- * @param {string} [source] String that identifies source of hook call
230
- * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
231
- */
232
- _classPrivateMethodInitSpec(this, _onAfterSetDataAtCell);
233
- /**
234
- * `modifySourceData` hook callback.
235
- *
236
- * @param {number} row Physical row index.
237
- * @param {number|string} columnOrProp Physical column index or prop.
238
- * @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
239
- * property.
240
- * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
241
- */
242
- _classPrivateMethodInitSpec(this, _onModifySourceData);
243
- /**
244
- * `modifyData` hook callback.
245
- *
246
- * @param {number} physicalRow Physical row index.
247
- * @param {number} visualColumn Visual column index.
248
- * @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
249
- * property.
250
- * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
251
- */
252
- _classPrivateMethodInitSpec(this, _onModifyData);
253
- /**
254
- * `afterLoadData` hook callback.
255
- *
256
- * @param {Array} sourceData Array of arrays or array of objects containing data.
257
- * @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
258
- * @param {string} [source] Source of the call.
259
- */
260
- _classPrivateMethodInitSpec(this, _onAfterLoadData);
261
- /**
262
- * Callback to `afterCellMetaReset` hook which is triggered after setting cell meta.
263
- */
264
- _classPrivateMethodInitSpec(this, _onAfterCellMetaReset);
265
- /**
266
- * `beforeLoadData` hook callback.
267
- *
268
- * @param {Array} sourceData Array of arrays or array of objects containing data.
269
- * @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
270
- * @param {string} [source] Source of the call.
271
- */
272
- _classPrivateMethodInitSpec(this, _onBeforeLoadData);
273
- /**
274
- * `onBeforeAutofill` hook callback.
275
- *
276
- * @param {Array[]} fillData The data that was used to fill the `targetRange`. If `beforeAutofill` was used
277
- * and returned `[[]]`, this will be the same object that was returned from `beforeAutofill`.
278
- * @param {CellRange} sourceRange The range values will be filled from.
279
- * @param {CellRange} targetRange The range new values will be filled into.
280
- * @returns {boolean|*}
281
- */
282
- _classPrivateMethodInitSpec(this, _onBeforeAutofill);
283
64
  /**
284
65
  * The hook allows to translate the formula value to calculated value before it goes to the
285
66
  * validator function.
@@ -289,66 +70,57 @@ class Formulas extends _base.BasePlugin {
289
70
  * @param {number|string} prop The visual column index or property name of the column.
290
71
  * @returns {*} Returns value to validate.
291
72
  */
292
- _classPrivateMethodInitSpec(this, _onBeforeValidate);
73
+ _classPrivateMethodInitSpec(this, _Formulas_brand);
293
74
  /**
294
75
  * Flag used to bypass hooks in internal operations.
295
76
  *
296
77
  * @private
297
78
  * @type {boolean}
298
79
  */
299
- _classPrivateFieldInitSpec(this, _internalOperationPending, {
300
- writable: true,
301
- value: false
302
- });
80
+ _classPrivateFieldInitSpec(this, _internalOperationPending, false);
303
81
  /**
304
82
  * Flag needed to mark if Handsontable was initialized with no data.
305
83
  * (Required to work around the fact, that Handsontable auto-generates sample data, when no data is provided).
306
84
  *
307
85
  * @type {boolean}
308
86
  */
309
- _classPrivateFieldInitSpec(this, _hotWasInitializedWithEmptyData, {
310
- writable: true,
311
- value: false
312
- });
87
+ _classPrivateFieldInitSpec(this, _hotWasInitializedWithEmptyData, false);
313
88
  /**
314
89
  * The list of the HyperFormula listeners.
315
90
  *
316
91
  * @type {Array}
317
92
  */
318
- _classPrivateFieldInitSpec(this, _engineListeners, {
319
- writable: true,
320
- value: [['valuesUpdated', function () {
321
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
322
- args[_key] = arguments[_key];
323
- }
324
- return _classPrivateMethodGet(_this, _onEngineValuesUpdated, _onEngineValuesUpdated2).call(_this, ...args);
325
- }], ['namedExpressionAdded', function () {
326
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
327
- args[_key2] = arguments[_key2];
328
- }
329
- return _classPrivateMethodGet(_this, _onEngineNamedExpressionsAdded, _onEngineNamedExpressionsAdded2).call(_this, ...args);
330
- }], ['namedExpressionRemoved', function () {
331
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
332
- args[_key3] = arguments[_key3];
333
- }
334
- return _classPrivateMethodGet(_this, _onEngineNamedExpressionsRemoved, _onEngineNamedExpressionsRemoved2).call(_this, ...args);
335
- }], ['sheetAdded', function () {
336
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
337
- args[_key4] = arguments[_key4];
338
- }
339
- return _classPrivateMethodGet(_this, _onEngineSheetAdded, _onEngineSheetAdded2).call(_this, ...args);
340
- }], ['sheetRenamed', function () {
341
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
342
- args[_key5] = arguments[_key5];
343
- }
344
- return _classPrivateMethodGet(_this, _onEngineSheetRenamed, _onEngineSheetRenamed2).call(_this, ...args);
345
- }], ['sheetRemoved', function () {
346
- for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
347
- args[_key6] = arguments[_key6];
348
- }
349
- return _classPrivateMethodGet(_this, _onEngineSheetRemoved, _onEngineSheetRemoved2).call(_this, ...args);
350
- }]]
351
- });
93
+ _classPrivateFieldInitSpec(this, _engineListeners, [['valuesUpdated', function () {
94
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
95
+ args[_key] = arguments[_key];
96
+ }
97
+ return _assertClassBrand(_Formulas_brand, _this, _onEngineValuesUpdated).call(_this, ...args);
98
+ }], ['namedExpressionAdded', function () {
99
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
100
+ args[_key2] = arguments[_key2];
101
+ }
102
+ return _assertClassBrand(_Formulas_brand, _this, _onEngineNamedExpressionsAdded).call(_this, ...args);
103
+ }], ['namedExpressionRemoved', function () {
104
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
105
+ args[_key3] = arguments[_key3];
106
+ }
107
+ return _assertClassBrand(_Formulas_brand, _this, _onEngineNamedExpressionsRemoved).call(_this, ...args);
108
+ }], ['sheetAdded', function () {
109
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
110
+ args[_key4] = arguments[_key4];
111
+ }
112
+ return _assertClassBrand(_Formulas_brand, _this, _onEngineSheetAdded).call(_this, ...args);
113
+ }], ['sheetRenamed', function () {
114
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
115
+ args[_key5] = arguments[_key5];
116
+ }
117
+ return _assertClassBrand(_Formulas_brand, _this, _onEngineSheetRenamed).call(_this, ...args);
118
+ }], ['sheetRemoved', function () {
119
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
120
+ args[_key6] = arguments[_key6];
121
+ }
122
+ return _assertClassBrand(_Formulas_brand, _this, _onEngineSheetRemoved).call(_this, ...args);
123
+ }]]);
352
124
  /**
353
125
  * Static register used to set up one global HyperFormula instance.
354
126
  * TODO: currently used in tests, might be removed later.
@@ -443,13 +215,13 @@ class Formulas extends _base.BasePlugin {
443
215
  for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
444
216
  args[_key7] = arguments[_key7];
445
217
  }
446
- return _classPrivateMethodGet(_this2, _onBeforeLoadData, _onBeforeLoadData2).call(_this2, ...args);
218
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeLoadData).call(_this2, ...args);
447
219
  });
448
220
  this.addHook('afterLoadData', function () {
449
221
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
450
222
  args[_key8] = arguments[_key8];
451
223
  }
452
- return _classPrivateMethodGet(_this2, _onAfterLoadData, _onAfterLoadData2).call(_this2, ...args);
224
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterLoadData).call(_this2, ...args);
453
225
  });
454
226
 
455
227
  // The `updateData` hooks utilize the same logic as the `loadData` hooks.
@@ -457,97 +229,97 @@ class Formulas extends _base.BasePlugin {
457
229
  for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
458
230
  args[_key9] = arguments[_key9];
459
231
  }
460
- return _classPrivateMethodGet(_this2, _onBeforeLoadData, _onBeforeLoadData2).call(_this2, ...args);
232
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeLoadData).call(_this2, ...args);
461
233
  });
462
234
  this.addHook('afterUpdateData', function () {
463
235
  for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
464
236
  args[_key10] = arguments[_key10];
465
237
  }
466
- return _classPrivateMethodGet(_this2, _onAfterLoadData, _onAfterLoadData2).call(_this2, ...args);
238
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterLoadData).call(_this2, ...args);
467
239
  });
468
240
  this.addHook('modifyData', function () {
469
241
  for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
470
242
  args[_key11] = arguments[_key11];
471
243
  }
472
- return _classPrivateMethodGet(_this2, _onModifyData, _onModifyData2).call(_this2, ...args);
244
+ return _assertClassBrand(_Formulas_brand, _this2, _onModifyData).call(_this2, ...args);
473
245
  });
474
246
  this.addHook('modifySourceData', function () {
475
247
  for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
476
248
  args[_key12] = arguments[_key12];
477
249
  }
478
- return _classPrivateMethodGet(_this2, _onModifySourceData, _onModifySourceData2).call(_this2, ...args);
250
+ return _assertClassBrand(_Formulas_brand, _this2, _onModifySourceData).call(_this2, ...args);
479
251
  });
480
252
  this.addHook('beforeValidate', function () {
481
253
  for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
482
254
  args[_key13] = arguments[_key13];
483
255
  }
484
- return _classPrivateMethodGet(_this2, _onBeforeValidate, _onBeforeValidate2).call(_this2, ...args);
256
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeValidate).call(_this2, ...args);
485
257
  });
486
258
  this.addHook('afterSetSourceDataAtCell', function () {
487
259
  for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
488
260
  args[_key14] = arguments[_key14];
489
261
  }
490
- return _classPrivateMethodGet(_this2, _onAfterSetSourceDataAtCell, _onAfterSetSourceDataAtCell2).call(_this2, ...args);
262
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterSetSourceDataAtCell).call(_this2, ...args);
491
263
  });
492
264
  this.addHook('afterSetDataAtCell', function () {
493
265
  for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
494
266
  args[_key15] = arguments[_key15];
495
267
  }
496
- return _classPrivateMethodGet(_this2, _onAfterSetDataAtCell, _onAfterSetDataAtCell2).call(_this2, ...args);
268
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterSetDataAtCell).call(_this2, ...args);
497
269
  });
498
270
  this.addHook('afterSetDataAtRowProp', function () {
499
271
  for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
500
272
  args[_key16] = arguments[_key16];
501
273
  }
502
- return _classPrivateMethodGet(_this2, _onAfterSetDataAtCell, _onAfterSetDataAtCell2).call(_this2, ...args);
274
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterSetDataAtCell).call(_this2, ...args);
503
275
  });
504
276
  this.addHook('beforeCreateRow', function () {
505
277
  for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
506
278
  args[_key17] = arguments[_key17];
507
279
  }
508
- return _classPrivateMethodGet(_this2, _onBeforeCreateRow, _onBeforeCreateRow2).call(_this2, ...args);
280
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeCreateRow).call(_this2, ...args);
509
281
  });
510
282
  this.addHook('beforeCreateCol', function () {
511
283
  for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
512
284
  args[_key18] = arguments[_key18];
513
285
  }
514
- return _classPrivateMethodGet(_this2, _onBeforeCreateCol, _onBeforeCreateCol2).call(_this2, ...args);
286
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeCreateCol).call(_this2, ...args);
515
287
  });
516
288
  this.addHook('afterCreateRow', function () {
517
289
  for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
518
290
  args[_key19] = arguments[_key19];
519
291
  }
520
- return _classPrivateMethodGet(_this2, _onAfterCreateRow, _onAfterCreateRow2).call(_this2, ...args);
292
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterCreateRow).call(_this2, ...args);
521
293
  });
522
294
  this.addHook('afterCreateCol', function () {
523
295
  for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
524
296
  args[_key20] = arguments[_key20];
525
297
  }
526
- return _classPrivateMethodGet(_this2, _onAfterCreateCol, _onAfterCreateCol2).call(_this2, ...args);
298
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterCreateCol).call(_this2, ...args);
527
299
  });
528
300
  this.addHook('beforeRemoveRow', function () {
529
301
  for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
530
302
  args[_key21] = arguments[_key21];
531
303
  }
532
- return _classPrivateMethodGet(_this2, _onBeforeRemoveRow, _onBeforeRemoveRow2).call(_this2, ...args);
304
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeRemoveRow).call(_this2, ...args);
533
305
  });
534
306
  this.addHook('beforeRemoveCol', function () {
535
307
  for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
536
308
  args[_key22] = arguments[_key22];
537
309
  }
538
- return _classPrivateMethodGet(_this2, _onBeforeRemoveCol, _onBeforeRemoveCol2).call(_this2, ...args);
310
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeRemoveCol).call(_this2, ...args);
539
311
  });
540
312
  this.addHook('afterRemoveRow', function () {
541
313
  for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
542
314
  args[_key23] = arguments[_key23];
543
315
  }
544
- return _classPrivateMethodGet(_this2, _onAfterRemoveRow, _onAfterRemoveRow2).call(_this2, ...args);
316
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterRemoveRow).call(_this2, ...args);
545
317
  });
546
318
  this.addHook('afterRemoveCol', function () {
547
319
  for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
548
320
  args[_key24] = arguments[_key24];
549
321
  }
550
- return _classPrivateMethodGet(_this2, _onAfterRemoveCol, _onAfterRemoveCol2).call(_this2, ...args);
322
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterRemoveCol).call(_this2, ...args);
551
323
  });
552
324
  this.indexSyncer = new _indexSyncer.default(this.hot.rowIndexMapper, this.hot.columnIndexMapper, postponedAction => {
553
325
  this.hot.addHookOnce('init', () => {
@@ -592,7 +364,7 @@ class Formulas extends _base.BasePlugin {
592
364
  for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {
593
365
  args[_key25] = arguments[_key25];
594
366
  }
595
- return _classPrivateMethodGet(_this2, _onAfterCellMetaReset, _onAfterCellMetaReset2).call(_this2, ...args);
367
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterCellMetaReset).call(_this2, ...args);
596
368
  });
597
369
 
598
370
  // Handling undo actions on data just using HyperFormula's UndoRedo mechanism
@@ -616,15 +388,15 @@ class Formulas extends _base.BasePlugin {
616
388
  for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) {
617
389
  args[_key26] = arguments[_key26];
618
390
  }
619
- return _classPrivateMethodGet(_this2, _onAfterDetachChild, _onAfterDetachChild2).call(_this2, ...args);
391
+ return _assertClassBrand(_Formulas_brand, _this2, _onAfterDetachChild).call(_this2, ...args);
620
392
  });
621
393
  this.addHook('beforeAutofill', function () {
622
394
  for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) {
623
395
  args[_key27] = arguments[_key27];
624
396
  }
625
- return _classPrivateMethodGet(_this2, _onBeforeAutofill, _onBeforeAutofill2).call(_this2, ...args);
397
+ return _assertClassBrand(_Formulas_brand, _this2, _onBeforeAutofill).call(_this2, ...args);
626
398
  });
627
- _classPrivateFieldGet(this, _engineListeners).forEach(_ref => {
399
+ _classPrivateFieldGet(_engineListeners, this).forEach(_ref => {
628
400
  let [eventName, listener] = _ref;
629
401
  return this.engine.on(eventName, listener);
630
402
  });
@@ -635,7 +407,7 @@ class Formulas extends _base.BasePlugin {
635
407
  * Disables the plugin functionality for this Handsontable instance.
636
408
  */
637
409
  disablePlugin() {
638
- _classPrivateFieldGet(this, _engineListeners).forEach(_ref2 => {
410
+ _classPrivateFieldGet(_engineListeners, this).forEach(_ref2 => {
639
411
  let [eventName, listener] = _ref2;
640
412
  return this.engine.off(eventName, listener);
641
413
  });
@@ -677,12 +449,12 @@ class Formulas extends _base.BasePlugin {
677
449
  * Destroys the plugin instance.
678
450
  */
679
451
  destroy() {
680
- _classPrivateFieldGet(this, _engineListeners).forEach(_ref3 => {
452
+ _classPrivateFieldGet(_engineListeners, this).forEach(_ref3 => {
681
453
  var _this$engine;
682
454
  let [eventName, listener] = _ref3;
683
455
  return (_this$engine = this.engine) === null || _this$engine === void 0 ? void 0 : _this$engine.off(eventName, listener);
684
456
  });
685
- _classPrivateFieldSet(this, _engineListeners, null);
457
+ _classPrivateFieldSet(_engineListeners, this, null);
686
458
  (0, _register.unregisterEngine)(this.engine, this.hot);
687
459
  this.engine = null;
688
460
  super.destroy();
@@ -892,7 +664,7 @@ class Formulas extends _base.BasePlugin {
892
664
  }
893
665
  }
894
666
  exports.Formulas = Formulas;
895
- function _onBeforeValidate2(value, visualRow, prop) {
667
+ function _onBeforeValidate(value, visualRow, prop) {
896
668
  const visualColumn = this.hot.propToCol(prop);
897
669
  if (this.isFormulaCellType(visualRow, visualColumn)) {
898
670
  const address = {
@@ -912,7 +684,16 @@ function _onBeforeValidate2(value, visualRow, prop) {
912
684
  }
913
685
  return value;
914
686
  }
915
- function _onBeforeAutofill2(fillData, sourceRange, targetRange) {
687
+ /**
688
+ * `onBeforeAutofill` hook callback.
689
+ *
690
+ * @param {Array[]} fillData The data that was used to fill the `targetRange`. If `beforeAutofill` was used
691
+ * and returned `[[]]`, this will be the same object that was returned from `beforeAutofill`.
692
+ * @param {CellRange} sourceRange The range values will be filled from.
693
+ * @param {CellRange} targetRange The range new values will be filled into.
694
+ * @returns {boolean|*}
695
+ */
696
+ function _onBeforeAutofill(fillData, sourceRange, targetRange) {
916
697
  const {
917
698
  row: sourceTopStartRow,
918
699
  col: sourceTopStartColumn
@@ -989,7 +770,14 @@ function _onBeforeAutofill2(fillData, sourceRange, targetRange) {
989
770
  }
990
771
  return fillRangeData;
991
772
  }
992
- function _onBeforeLoadData2(sourceData, initialLoad) {
773
+ /**
774
+ * `beforeLoadData` hook callback.
775
+ *
776
+ * @param {Array} sourceData Array of arrays or array of objects containing data.
777
+ * @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
778
+ * @param {string} [source] Source of the call.
779
+ */
780
+ function _onBeforeLoadData(sourceData, initialLoad) {
993
781
  let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
994
782
  if (source.includes((0, _string.toUpperCaseFirst)(PLUGIN_KEY))) {
995
783
  return;
@@ -997,9 +785,12 @@ function _onBeforeLoadData2(sourceData, initialLoad) {
997
785
 
998
786
  // This flag needs to be defined, because not passing data to HOT results in HOT auto-generating a `null`-filled
999
787
  // initial dataset.
1000
- _classPrivateFieldSet(this, _hotWasInitializedWithEmptyData, (0, _mixed.isUndefined)(this.hot.getSettings().data));
788
+ _classPrivateFieldSet(_hotWasInitializedWithEmptyData, this, (0, _mixed.isUndefined)(this.hot.getSettings().data));
1001
789
  }
1002
- function _onAfterCellMetaReset2() {
790
+ /**
791
+ * Callback to `afterCellMetaReset` hook which is triggered after setting cell meta.
792
+ */
793
+ function _onAfterCellMetaReset() {
1003
794
  const sourceDataArray = this.hot.getSourceDataArray();
1004
795
  let valueChanged = false;
1005
796
  sourceDataArray.forEach((rowData, rowIndex) => {
@@ -1019,32 +810,48 @@ function _onAfterCellMetaReset2() {
1019
810
  });
1020
811
  });
1021
812
  if (valueChanged === true) {
1022
- _classPrivateFieldSet(this, _internalOperationPending, true);
813
+ _classPrivateFieldSet(_internalOperationPending, this, true);
1023
814
  this.engine.setSheetContent(this.sheetId, sourceDataArray);
1024
- _classPrivateFieldSet(this, _internalOperationPending, false);
815
+ _classPrivateFieldSet(_internalOperationPending, this, false);
1025
816
  }
1026
817
  }
1027
- function _onAfterLoadData2(sourceData, initialLoad) {
818
+ /**
819
+ * `afterLoadData` hook callback.
820
+ *
821
+ * @param {Array} sourceData Array of arrays or array of objects containing data.
822
+ * @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
823
+ * @param {string} [source] Source of the call.
824
+ */
825
+ function _onAfterLoadData(sourceData, initialLoad) {
1028
826
  let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1029
827
  if (source.includes((0, _string.toUpperCaseFirst)(PLUGIN_KEY))) {
1030
828
  return;
1031
829
  }
1032
830
  this.sheetName = (0, _register.setupSheet)(this.engine, this.hot.getSettings()[PLUGIN_KEY].sheetName);
1033
- if (!_classPrivateFieldGet(this, _hotWasInitializedWithEmptyData)) {
831
+ if (!_classPrivateFieldGet(_hotWasInitializedWithEmptyData, this)) {
1034
832
  const sourceDataArray = this.hot.getSourceDataArray();
1035
833
  if (this.engine.isItPossibleToReplaceSheetContent(this.sheetId, sourceDataArray)) {
1036
- _classPrivateFieldSet(this, _internalOperationPending, true);
834
+ _classPrivateFieldSet(_internalOperationPending, this, true);
1037
835
  const dependentCells = this.engine.setSheetContent(this.sheetId, sourceDataArray);
1038
836
  this.indexSyncer.setupSyncEndpoint(this.engine, this.sheetId);
1039
837
  this.renderDependentSheets(dependentCells);
1040
- _classPrivateFieldSet(this, _internalOperationPending, false);
838
+ _classPrivateFieldSet(_internalOperationPending, this, false);
1041
839
  }
1042
840
  } else {
1043
841
  this.switchSheet(this.sheetName);
1044
842
  }
1045
843
  }
1046
- function _onModifyData2(physicalRow, visualColumn, valueHolder, ioMode) {
1047
- if (ioMode !== 'get' || _classPrivateFieldGet(this, _internalOperationPending) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
844
+ /**
845
+ * `modifyData` hook callback.
846
+ *
847
+ * @param {number} physicalRow Physical row index.
848
+ * @param {number} visualColumn Visual column index.
849
+ * @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
850
+ * property.
851
+ * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
852
+ */
853
+ function _onModifyData(physicalRow, visualColumn, valueHolder, ioMode) {
854
+ if (ioMode !== 'get' || _classPrivateFieldGet(_internalOperationPending, this) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
1048
855
  return;
1049
856
  }
1050
857
  const visualRow = this.hot.toVisualRow(physicalRow);
@@ -1086,8 +893,17 @@ function _onModifyData2(physicalRow, visualColumn, valueHolder, ioMode) {
1086
893
  const value = typeof cellValue === 'object' && cellValue !== null ? cellValue.value : cellValue;
1087
894
  valueHolder.value = value;
1088
895
  }
1089
- function _onModifySourceData2(row, columnOrProp, valueHolder, ioMode) {
1090
- if (ioMode !== 'get' || _classPrivateFieldGet(this, _internalOperationPending) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
896
+ /**
897
+ * `modifySourceData` hook callback.
898
+ *
899
+ * @param {number} row Physical row index.
900
+ * @param {number|string} columnOrProp Physical column index or prop.
901
+ * @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
902
+ * property.
903
+ * @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
904
+ */
905
+ function _onModifySourceData(row, columnOrProp, valueHolder, ioMode) {
906
+ if (ioMode !== 'get' || _classPrivateFieldGet(_internalOperationPending, this) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
1091
907
  return;
1092
908
  }
1093
909
  const visualRow = this.hot.toVisualRow(row);
@@ -1120,7 +936,14 @@ function _onModifySourceData2(row, columnOrProp, valueHolder, ioMode) {
1120
936
  };
1121
937
  valueHolder.value = this.engine.getCellSerialized(address);
1122
938
  }
1123
- function _onAfterSetDataAtCell2(changes, source) {
939
+ /**
940
+ * `onAfterSetDataAtCell` hook callback.
941
+ *
942
+ * @param {Array[]} changes An array of changes in format [[row, prop, oldValue, value], ...].
943
+ * @param {string} [source] String that identifies source of hook call
944
+ * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
945
+ */
946
+ function _onAfterSetDataAtCell(changes, source) {
1124
947
  if (isBlockedSource(source)) {
1125
948
  return;
1126
949
  }
@@ -1163,7 +986,14 @@ function _onAfterSetDataAtCell2(changes, source) {
1163
986
  this.renderDependentSheets(dependentCells);
1164
987
  this.validateDependentCells(dependentCells, changedCells);
1165
988
  }
1166
- function _onAfterSetSourceDataAtCell2(changes, source) {
989
+ /**
990
+ * `onAfterSetSourceDataAtCell` hook callback.
991
+ *
992
+ * @param {Array[]} changes An array of changes in format [[row, column, oldValue, value], ...].
993
+ * @param {string} [source] String that identifies source of hook call
994
+ * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
995
+ */
996
+ function _onAfterSetSourceDataAtCell(changes, source) {
1167
997
  if (isBlockedSource(source)) {
1168
998
  return;
1169
999
  }
@@ -1192,7 +1022,14 @@ function _onAfterSetSourceDataAtCell2(changes, source) {
1192
1022
  this.renderDependentSheets(dependentCells);
1193
1023
  this.validateDependentCells(dependentCells, changedCells);
1194
1024
  }
1195
- function _onBeforeCreateRow2(visualRow, amount) {
1025
+ /**
1026
+ * `beforeCreateRow` hook callback.
1027
+ *
1028
+ * @param {number} visualRow Represents the visual index of first newly created row in the data source array.
1029
+ * @param {number} amount Number of newly created rows in the data source array.
1030
+ * @returns {*|boolean} If false is returned the action is canceled.
1031
+ */
1032
+ function _onBeforeCreateRow(visualRow, amount) {
1196
1033
  let hfRowIndex = this.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow);
1197
1034
  if (visualRow >= this.hot.countRows()) {
1198
1035
  hfRowIndex = visualRow; // Row beyond the table boundaries.
@@ -1201,7 +1038,14 @@ function _onBeforeCreateRow2(visualRow, amount) {
1201
1038
  return false;
1202
1039
  }
1203
1040
  }
1204
- function _onBeforeCreateCol2(visualColumn, amount) {
1041
+ /**
1042
+ * `beforeCreateCol` hook callback.
1043
+ *
1044
+ * @param {number} visualColumn Represents the visual index of first newly created column in the data source.
1045
+ * @param {number} amount Number of newly created columns in the data source.
1046
+ * @returns {*|boolean} If false is returned the action is canceled.
1047
+ */
1048
+ function _onBeforeCreateCol(visualColumn, amount) {
1205
1049
  let hfColumnIndex = this.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn);
1206
1050
  if (visualColumn >= this.hot.countCols()) {
1207
1051
  hfColumnIndex = visualColumn; // Column beyond the table boundaries.
@@ -1210,35 +1054,76 @@ function _onBeforeCreateCol2(visualColumn, amount) {
1210
1054
  return false;
1211
1055
  }
1212
1056
  }
1213
- function _onBeforeRemoveRow2(row, amount, physicalRows) {
1057
+ /**
1058
+ * `beforeRemoveRow` hook callback.
1059
+ *
1060
+ * @param {number} row Visual index of starter row.
1061
+ * @param {number} amount Amount of rows to be removed.
1062
+ * @param {number[]} physicalRows An array of physical rows removed from the data source.
1063
+ * @returns {*|boolean} If false is returned the action is canceled.
1064
+ */
1065
+ function _onBeforeRemoveRow(row, amount, physicalRows) {
1214
1066
  const hfRows = this.rowAxisSyncer.setRemovedHfIndexes(physicalRows);
1215
1067
  const possible = hfRows.every(hfRow => {
1216
1068
  return this.engine.isItPossibleToRemoveRows(this.sheetId, [hfRow, 1]);
1217
1069
  });
1218
1070
  return possible === false ? false : undefined;
1219
1071
  }
1220
- function _onBeforeRemoveCol2(col, amount, physicalColumns) {
1072
+ /**
1073
+ * `beforeRemoveCol` hook callback.
1074
+ *
1075
+ * @param {number} col Visual index of starter column.
1076
+ * @param {number} amount Amount of columns to be removed.
1077
+ * @param {number[]} physicalColumns An array of physical columns removed from the data source.
1078
+ * @returns {*|boolean} If false is returned the action is canceled.
1079
+ */
1080
+ function _onBeforeRemoveCol(col, amount, physicalColumns) {
1221
1081
  const hfColumns = this.columnAxisSyncer.setRemovedHfIndexes(physicalColumns);
1222
1082
  const possible = hfColumns.every(hfColumn => {
1223
1083
  return this.engine.isItPossibleToRemoveColumns(this.sheetId, [hfColumn, 1]);
1224
1084
  });
1225
1085
  return possible === false ? false : undefined;
1226
1086
  }
1227
- function _onAfterCreateRow2(visualRow, amount, source) {
1087
+ /**
1088
+ * `afterCreateRow` hook callback.
1089
+ *
1090
+ * @param {number} visualRow Represents the visual index of first newly created row in the data source array.
1091
+ * @param {number} amount Number of newly created rows in the data source array.
1092
+ * @param {string} [source] String that identifies source of hook call
1093
+ * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
1094
+ */
1095
+ function _onAfterCreateRow(visualRow, amount, source) {
1228
1096
  if (isBlockedSource(source)) {
1229
1097
  return;
1230
1098
  }
1231
1099
  const changes = this.engine.addRows(this.sheetId, [this.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow), amount]);
1232
1100
  this.renderDependentSheets(changes);
1233
1101
  }
1234
- function _onAfterCreateCol2(visualColumn, amount, source) {
1102
+ /**
1103
+ * `afterCreateCol` hook callback.
1104
+ *
1105
+ * @param {number} visualColumn Represents the visual index of first newly created column in the data source.
1106
+ * @param {number} amount Number of newly created columns in the data source.
1107
+ * @param {string} [source] String that identifies source of hook call
1108
+ * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
1109
+ */
1110
+ function _onAfterCreateCol(visualColumn, amount, source) {
1235
1111
  if (isBlockedSource(source)) {
1236
1112
  return;
1237
1113
  }
1238
1114
  const changes = this.engine.addColumns(this.sheetId, [this.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn), amount]);
1239
1115
  this.renderDependentSheets(changes);
1240
1116
  }
1241
- function _onAfterRemoveRow2(row, amount, physicalRows, source) {
1117
+ /**
1118
+ * `afterRemoveRow` hook callback.
1119
+ *
1120
+ * @param {number} row Visual index of starter row.
1121
+ * @param {number} amount An amount of removed rows.
1122
+ * @param {number[]} physicalRows An array of physical rows removed from the data source.
1123
+ * @param {string} [source] String that identifies source of hook call
1124
+ * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
1125
+ */
1126
+ function _onAfterRemoveRow(row, amount, physicalRows, source) {
1242
1127
  if (isBlockedSource(source)) {
1243
1128
  return;
1244
1129
  }
@@ -1250,7 +1135,16 @@ function _onAfterRemoveRow2(row, amount, physicalRows, source) {
1250
1135
  });
1251
1136
  this.renderDependentSheets(changes);
1252
1137
  }
1253
- function _onAfterRemoveCol2(col, amount, physicalColumns, source) {
1138
+ /**
1139
+ * `afterRemoveCol` hook callback.
1140
+ *
1141
+ * @param {number} col Visual index of starter column.
1142
+ * @param {number} amount An amount of removed columns.
1143
+ * @param {number[]} physicalColumns An array of physical columns removed from the data source.
1144
+ * @param {string} [source] String that identifies source of hook call
1145
+ * ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
1146
+ */
1147
+ function _onAfterRemoveCol(col, amount, physicalColumns, source) {
1254
1148
  if (isBlockedSource(source)) {
1255
1149
  return;
1256
1150
  }
@@ -1262,11 +1156,19 @@ function _onAfterRemoveCol2(col, amount, physicalColumns, source) {
1262
1156
  });
1263
1157
  this.renderDependentSheets(changes);
1264
1158
  }
1265
- function _onAfterDetachChild2(parent, element, finalElementRowIndex) {
1159
+ /**
1160
+ * `afterDetachChild` hook callback.
1161
+ * Used to sync the data of the rows detached in the Nested Rows plugin with the engine's dataset.
1162
+ *
1163
+ * @param {object} parent An object representing the parent from which the element was detached.
1164
+ * @param {object} element The detached element.
1165
+ * @param {number} finalElementRowIndex The final row index of the detached element.
1166
+ */
1167
+ function _onAfterDetachChild(parent, element, finalElementRowIndex) {
1266
1168
  var _element$__children;
1267
- _classPrivateFieldSet(this, _internalOperationPending, true);
1169
+ _classPrivateFieldSet(_internalOperationPending, this, true);
1268
1170
  const rowsData = this.hot.getSourceDataArray(finalElementRowIndex, 0, finalElementRowIndex + (((_element$__children = element.__children) === null || _element$__children === void 0 ? void 0 : _element$__children.length) || 0), this.hot.countSourceCols());
1269
- _classPrivateFieldSet(this, _internalOperationPending, false);
1171
+ _classPrivateFieldSet(_internalOperationPending, this, false);
1270
1172
  rowsData.forEach((row, relativeRowIndex) => {
1271
1173
  row.forEach((value, colIndex) => {
1272
1174
  this.engine.setCellContents({
@@ -1277,22 +1179,62 @@ function _onAfterDetachChild2(parent, element, finalElementRowIndex) {
1277
1179
  });
1278
1180
  });
1279
1181
  }
1280
- function _onEngineValuesUpdated2(changes) {
1182
+ /**
1183
+ * Called when a value is updated in the engine.
1184
+ *
1185
+ * @fires Hooks#afterFormulasValuesUpdate
1186
+ * @param {Array} changes The values and location of applied changes.
1187
+ */
1188
+ function _onEngineValuesUpdated(changes) {
1281
1189
  this.hot.runHooks('afterFormulasValuesUpdate', changes);
1282
1190
  }
1283
- function _onEngineNamedExpressionsAdded2(namedExpressionName, changes) {
1191
+ /**
1192
+ * Called when a named expression is added to the engine instance.
1193
+ *
1194
+ * @fires Hooks#afterNamedExpressionAdded
1195
+ * @param {string} namedExpressionName The name of the added expression.
1196
+ * @param {Array} changes The values and location of applied changes.
1197
+ */
1198
+ function _onEngineNamedExpressionsAdded(namedExpressionName, changes) {
1284
1199
  this.hot.runHooks('afterNamedExpressionAdded', namedExpressionName, changes);
1285
1200
  }
1286
- function _onEngineNamedExpressionsRemoved2(namedExpressionName, changes) {
1201
+ /**
1202
+ * Called when a named expression is removed from the engine instance.
1203
+ *
1204
+ * @fires Hooks#afterNamedExpressionRemoved
1205
+ * @param {string} namedExpressionName The name of the removed expression.
1206
+ * @param {Array} changes The values and location of applied changes.
1207
+ */
1208
+ function _onEngineNamedExpressionsRemoved(namedExpressionName, changes) {
1287
1209
  this.hot.runHooks('afterNamedExpressionRemoved', namedExpressionName, changes);
1288
1210
  }
1289
- function _onEngineSheetAdded2(addedSheetDisplayName) {
1211
+ /**
1212
+ * Called when a new sheet is added to the engine instance.
1213
+ *
1214
+ * @fires Hooks#afterSheetAdded
1215
+ * @param {string} addedSheetDisplayName The name of the added sheet.
1216
+ */
1217
+ function _onEngineSheetAdded(addedSheetDisplayName) {
1290
1218
  this.hot.runHooks('afterSheetAdded', addedSheetDisplayName);
1291
1219
  }
1292
- function _onEngineSheetRenamed2(oldDisplayName, newDisplayName) {
1220
+ /**
1221
+ * Called when a sheet in the engine instance is renamed.
1222
+ *
1223
+ * @fires Hooks#afterSheetRenamed
1224
+ * @param {string} oldDisplayName The old name of the sheet.
1225
+ * @param {string} newDisplayName The new name of the sheet.
1226
+ */
1227
+ function _onEngineSheetRenamed(oldDisplayName, newDisplayName) {
1293
1228
  this.sheetName = newDisplayName;
1294
1229
  this.hot.runHooks('afterSheetRenamed', oldDisplayName, newDisplayName);
1295
1230
  }
1296
- function _onEngineSheetRemoved2(removedSheetDisplayName, changes) {
1231
+ /**
1232
+ * Called when a sheet is removed from the engine instance.
1233
+ *
1234
+ * @fires Hooks#afterSheetRemoved
1235
+ * @param {string} removedSheetDisplayName The removed sheet name.
1236
+ * @param {Array} changes The values and location of applied changes.
1237
+ */
1238
+ function _onEngineSheetRemoved(removedSheetDisplayName, changes) {
1297
1239
  this.hot.runHooks('afterSheetRemoved', removedSheetDisplayName, changes);
1298
1240
  }