handsontable 16.0.1-next-eee5f08-20250710 → 16.1.0-next-abd8f2e-20250904

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. package/3rdparty/walkontable/src/overlays.js +12 -2
  2. package/3rdparty/walkontable/src/overlays.mjs +12 -2
  3. package/3rdparty/walkontable/src/viewport.js +2 -6
  4. package/3rdparty/walkontable/src/viewport.mjs +2 -6
  5. package/CHANGELOG.md +32 -0
  6. package/base.js +2 -2
  7. package/base.mjs +2 -2
  8. package/cellTypes/autocompleteType/accessors/index.js +7 -0
  9. package/cellTypes/autocompleteType/accessors/index.mjs +2 -0
  10. package/cellTypes/autocompleteType/accessors/valueGetter.js +14 -0
  11. package/cellTypes/autocompleteType/accessors/valueGetter.mjs +10 -0
  12. package/cellTypes/autocompleteType/accessors/valueSetter.js +25 -0
  13. package/cellTypes/autocompleteType/accessors/valueSetter.mjs +21 -0
  14. package/cellTypes/autocompleteType/autocompleteType.js +4 -1
  15. package/cellTypes/autocompleteType/autocompleteType.mjs +4 -1
  16. package/cellTypes/checkboxType/accessors/index.js +5 -0
  17. package/cellTypes/checkboxType/accessors/index.mjs +1 -0
  18. package/cellTypes/checkboxType/accessors/valueSetter.js +26 -0
  19. package/cellTypes/checkboxType/accessors/valueSetter.mjs +22 -0
  20. package/cellTypes/checkboxType/checkboxType.js +3 -1
  21. package/cellTypes/checkboxType/checkboxType.mjs +3 -1
  22. package/cellTypes/dropdownType/accessors/index.js +7 -0
  23. package/cellTypes/dropdownType/accessors/index.mjs +2 -0
  24. package/cellTypes/dropdownType/accessors/valueGetter.js +14 -0
  25. package/cellTypes/dropdownType/accessors/valueGetter.mjs +10 -0
  26. package/cellTypes/dropdownType/accessors/valueSetter.js +17 -0
  27. package/cellTypes/dropdownType/accessors/valueSetter.mjs +13 -0
  28. package/cellTypes/dropdownType/dropdownType.js +4 -1
  29. package/cellTypes/dropdownType/dropdownType.mjs +4 -1
  30. package/cellTypes/numericType/accessors/index.js +5 -0
  31. package/cellTypes/numericType/accessors/index.mjs +1 -0
  32. package/cellTypes/numericType/accessors/valueSetter.js +19 -0
  33. package/cellTypes/numericType/accessors/valueSetter.mjs +15 -0
  34. package/cellTypes/numericType/numericType.js +3 -1
  35. package/cellTypes/numericType/numericType.mjs +3 -1
  36. package/core/focusCatcher/index.js +37 -112
  37. package/core/focusCatcher/index.mjs +35 -110
  38. package/core/focusCatcher/utils.js +31 -0
  39. package/core/focusCatcher/utils.mjs +27 -0
  40. package/core/hooks/constants.js +242 -0
  41. package/core/hooks/constants.mjs +242 -0
  42. package/core/hooks/index.d.ts +22 -0
  43. package/core/viewportScroll/scrollStrategies/focusScroll.js +5 -1
  44. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +5 -1
  45. package/core/viewportScroll/utils.js +1 -1
  46. package/core/viewportScroll/utils.mjs +1 -1
  47. package/core.d.ts +4 -0
  48. package/core.js +237 -139
  49. package/core.mjs +240 -142
  50. package/dataMap/dataMap.js +13 -3
  51. package/dataMap/dataMap.mjs +14 -4
  52. package/dataMap/dataSource.js +16 -0
  53. package/dataMap/dataSource.mjs +16 -0
  54. package/dataMap/metaManager/lazyFactoryMap.js +4 -3
  55. package/dataMap/metaManager/lazyFactoryMap.mjs +2 -1
  56. package/dataMap/metaManager/metaLayers/cellMeta.js +3 -2
  57. package/dataMap/metaManager/metaLayers/cellMeta.mjs +3 -2
  58. package/dataMap/metaManager/metaSchema.js +289 -4
  59. package/dataMap/metaManager/metaSchema.mjs +289 -4
  60. package/dataMap/metaManager/utils.js +0 -11
  61. package/dataMap/metaManager/utils.mjs +0 -10
  62. package/dataMap/replaceData.js +1 -0
  63. package/dataMap/replaceData.mjs +1 -0
  64. package/dist/handsontable.css +281 -4
  65. package/dist/handsontable.full.css +281 -4
  66. package/dist/handsontable.full.js +7844 -2990
  67. package/dist/handsontable.full.min.css +4 -5
  68. package/dist/handsontable.full.min.js +167 -165
  69. package/dist/handsontable.js +9639 -4806
  70. package/dist/handsontable.min.css +4 -4
  71. package/dist/handsontable.min.js +52 -50
  72. package/dist/languages/all.js +231 -21
  73. package/dist/languages/all.min.js +1 -1
  74. package/dist/languages/ar-AR.js +11 -1
  75. package/dist/languages/ar-AR.min.js +1 -1
  76. package/dist/languages/cs-CZ.js +11 -1
  77. package/dist/languages/cs-CZ.min.js +1 -1
  78. package/dist/languages/de-CH.js +11 -1
  79. package/dist/languages/de-CH.min.js +1 -1
  80. package/dist/languages/de-DE.js +11 -1
  81. package/dist/languages/de-DE.min.js +1 -1
  82. package/dist/languages/en-US.js +11 -1
  83. package/dist/languages/en-US.min.js +1 -1
  84. package/dist/languages/es-MX.js +11 -1
  85. package/dist/languages/es-MX.min.js +1 -1
  86. package/dist/languages/fa-IR.js +11 -1
  87. package/dist/languages/fa-IR.min.js +1 -1
  88. package/dist/languages/fr-FR.js +11 -1
  89. package/dist/languages/fr-FR.min.js +1 -1
  90. package/dist/languages/hr-HR.js +11 -1
  91. package/dist/languages/hr-HR.min.js +1 -1
  92. package/dist/languages/it-IT.js +11 -1
  93. package/dist/languages/it-IT.min.js +1 -1
  94. package/dist/languages/ja-JP.js +11 -1
  95. package/dist/languages/ja-JP.min.js +1 -1
  96. package/dist/languages/ko-KR.js +11 -1
  97. package/dist/languages/ko-KR.min.js +1 -1
  98. package/dist/languages/lv-LV.js +11 -1
  99. package/dist/languages/lv-LV.min.js +1 -1
  100. package/dist/languages/nb-NO.js +11 -1
  101. package/dist/languages/nb-NO.min.js +1 -1
  102. package/dist/languages/nl-NL.js +11 -1
  103. package/dist/languages/nl-NL.min.js +1 -1
  104. package/dist/languages/pl-PL.js +11 -1
  105. package/dist/languages/pl-PL.min.js +1 -1
  106. package/dist/languages/pt-BR.js +11 -1
  107. package/dist/languages/pt-BR.min.js +1 -1
  108. package/dist/languages/ru-RU.js +11 -1
  109. package/dist/languages/ru-RU.min.js +1 -1
  110. package/dist/languages/sr-SP.js +11 -1
  111. package/dist/languages/sr-SP.min.js +1 -1
  112. package/dist/languages/zh-CN.js +11 -1
  113. package/dist/languages/zh-CN.min.js +1 -1
  114. package/dist/languages/zh-TW.js +11 -1
  115. package/dist/languages/zh-TW.min.js +1 -1
  116. package/editorManager.js +4 -4
  117. package/editorManager.mjs +4 -4
  118. package/editors/autocompleteEditor/autocompleteEditor.js +50 -112
  119. package/editors/autocompleteEditor/autocompleteEditor.mjs +51 -113
  120. package/editors/baseEditor/baseEditor.js +10 -6
  121. package/editors/baseEditor/baseEditor.mjs +10 -6
  122. package/editors/handsontableEditor/handsontableEditor.js +9 -9
  123. package/editors/handsontableEditor/handsontableEditor.mjs +9 -9
  124. package/editors/textEditor/textEditor.js +0 -7
  125. package/editors/textEditor/textEditor.mjs +0 -7
  126. package/focusManager.js +2 -2
  127. package/focusManager.mjs +2 -2
  128. package/helpers/a11y.js +15 -2
  129. package/helpers/a11y.mjs +10 -2
  130. package/helpers/console.js +12 -0
  131. package/helpers/console.mjs +11 -0
  132. package/helpers/dom/element.js +4 -4
  133. package/helpers/dom/element.mjs +4 -4
  134. package/helpers/mixed.js +65 -2
  135. package/helpers/mixed.mjs +63 -2
  136. package/helpers/number.js +28 -0
  137. package/helpers/number.mjs +26 -0
  138. package/helpers/object.js +35 -0
  139. package/helpers/object.mjs +34 -0
  140. package/helpers/string.js +19 -0
  141. package/helpers/string.mjs +18 -0
  142. package/helpers/templateLiteralTag.js +57 -1
  143. package/helpers/templateLiteralTag.mjs +56 -1
  144. package/i18n/constants.js +13 -1
  145. package/i18n/constants.mjs +13 -1
  146. package/i18n/languages/ar-AR.js +11 -1
  147. package/i18n/languages/ar-AR.mjs +11 -1
  148. package/i18n/languages/cs-CZ.js +11 -1
  149. package/i18n/languages/cs-CZ.mjs +11 -1
  150. package/i18n/languages/de-CH.js +11 -1
  151. package/i18n/languages/de-CH.mjs +11 -1
  152. package/i18n/languages/de-DE.js +11 -1
  153. package/i18n/languages/de-DE.mjs +11 -1
  154. package/i18n/languages/en-US.js +11 -1
  155. package/i18n/languages/en-US.mjs +11 -1
  156. package/i18n/languages/es-MX.js +11 -1
  157. package/i18n/languages/es-MX.mjs +11 -1
  158. package/i18n/languages/fa-IR.js +11 -1
  159. package/i18n/languages/fa-IR.mjs +11 -1
  160. package/i18n/languages/fr-FR.js +11 -1
  161. package/i18n/languages/fr-FR.mjs +11 -1
  162. package/i18n/languages/hr-HR.js +11 -1
  163. package/i18n/languages/hr-HR.mjs +11 -1
  164. package/i18n/languages/it-IT.js +11 -1
  165. package/i18n/languages/it-IT.mjs +11 -1
  166. package/i18n/languages/ja-JP.js +11 -1
  167. package/i18n/languages/ja-JP.mjs +11 -1
  168. package/i18n/languages/ko-KR.js +11 -1
  169. package/i18n/languages/ko-KR.mjs +11 -1
  170. package/i18n/languages/lv-LV.js +11 -1
  171. package/i18n/languages/lv-LV.mjs +11 -1
  172. package/i18n/languages/nb-NO.js +11 -1
  173. package/i18n/languages/nb-NO.mjs +11 -1
  174. package/i18n/languages/nl-NL.js +11 -1
  175. package/i18n/languages/nl-NL.mjs +11 -1
  176. package/i18n/languages/pl-PL.js +11 -1
  177. package/i18n/languages/pl-PL.mjs +11 -1
  178. package/i18n/languages/pt-BR.js +11 -1
  179. package/i18n/languages/pt-BR.mjs +11 -1
  180. package/i18n/languages/ru-RU.js +11 -1
  181. package/i18n/languages/ru-RU.mjs +11 -1
  182. package/i18n/languages/sr-SP.js +11 -1
  183. package/i18n/languages/sr-SP.mjs +11 -1
  184. package/i18n/languages/zh-CN.js +11 -1
  185. package/i18n/languages/zh-CN.mjs +11 -1
  186. package/i18n/languages/zh-TW.js +11 -1
  187. package/i18n/languages/zh-TW.mjs +11 -1
  188. package/i18n/phraseFormatters/index.js +3 -1
  189. package/i18n/phraseFormatters/index.mjs +3 -1
  190. package/i18n/registry.js +5 -6
  191. package/i18n/registry.mjs +5 -6
  192. package/index.d.ts +27 -0
  193. package/languages/all.js +231 -21
  194. package/languages/ar-AR.js +11 -1
  195. package/languages/ar-AR.mjs +11 -1
  196. package/languages/cs-CZ.js +11 -1
  197. package/languages/cs-CZ.mjs +11 -1
  198. package/languages/de-CH.js +11 -1
  199. package/languages/de-CH.mjs +11 -1
  200. package/languages/de-DE.js +11 -1
  201. package/languages/de-DE.mjs +11 -1
  202. package/languages/en-US.js +11 -1
  203. package/languages/en-US.mjs +11 -1
  204. package/languages/es-MX.js +11 -1
  205. package/languages/es-MX.mjs +11 -1
  206. package/languages/fa-IR.js +11 -1
  207. package/languages/fa-IR.mjs +11 -1
  208. package/languages/fr-FR.js +11 -1
  209. package/languages/fr-FR.mjs +11 -1
  210. package/languages/hr-HR.js +11 -1
  211. package/languages/hr-HR.mjs +11 -1
  212. package/languages/index.js +231 -21
  213. package/languages/it-IT.js +11 -1
  214. package/languages/it-IT.mjs +11 -1
  215. package/languages/ja-JP.js +11 -1
  216. package/languages/ja-JP.mjs +11 -1
  217. package/languages/ko-KR.js +11 -1
  218. package/languages/ko-KR.mjs +11 -1
  219. package/languages/lv-LV.js +11 -1
  220. package/languages/lv-LV.mjs +11 -1
  221. package/languages/nb-NO.js +11 -1
  222. package/languages/nb-NO.mjs +11 -1
  223. package/languages/nl-NL.js +11 -1
  224. package/languages/nl-NL.mjs +11 -1
  225. package/languages/pl-PL.js +11 -1
  226. package/languages/pl-PL.mjs +11 -1
  227. package/languages/pt-BR.js +11 -1
  228. package/languages/pt-BR.mjs +11 -1
  229. package/languages/ru-RU.js +11 -1
  230. package/languages/ru-RU.mjs +11 -1
  231. package/languages/sr-SP.js +11 -1
  232. package/languages/sr-SP.mjs +11 -1
  233. package/languages/zh-CN.js +11 -1
  234. package/languages/zh-CN.mjs +11 -1
  235. package/languages/zh-TW.js +11 -1
  236. package/languages/zh-TW.mjs +11 -1
  237. package/mixins/localHooks.js +16 -0
  238. package/mixins/localHooks.mjs +16 -0
  239. package/package.json +19 -1
  240. package/plugins/autoRowSize/autoRowSize.js +43 -6
  241. package/plugins/autoRowSize/autoRowSize.mjs +43 -6
  242. package/plugins/autofill/autofill.js +50 -3
  243. package/plugins/autofill/autofill.mjs +50 -3
  244. package/plugins/base/base.js +86 -15
  245. package/plugins/base/base.mjs +87 -16
  246. package/plugins/collapsibleColumns/collapsibleColumns.js +4 -4
  247. package/plugins/collapsibleColumns/collapsibleColumns.mjs +4 -4
  248. package/plugins/columnSorting/columnSorting.js +3 -3
  249. package/plugins/columnSorting/columnSorting.mjs +3 -3
  250. package/plugins/comments/comments.js +52 -22
  251. package/plugins/comments/comments.mjs +52 -22
  252. package/plugins/comments/contextMenuItem/addEditComment.js +3 -3
  253. package/plugins/comments/contextMenuItem/addEditComment.mjs +3 -3
  254. package/plugins/comments/contextMenuItem/readOnlyComment.js +2 -2
  255. package/plugins/comments/contextMenuItem/readOnlyComment.mjs +2 -2
  256. package/plugins/comments/contextMenuItem/removeComment.js +2 -2
  257. package/plugins/comments/contextMenuItem/removeComment.mjs +2 -2
  258. package/plugins/contextMenu/contextMenu.js +4 -5
  259. package/plugins/contextMenu/contextMenu.mjs +4 -5
  260. package/plugins/contextMenu/menu/cursor.js +1 -1
  261. package/plugins/contextMenu/menu/cursor.mjs +1 -1
  262. package/plugins/contextMenu/menu/defaultShortcutsList.js +5 -5
  263. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +5 -5
  264. package/plugins/contextMenu/menu/menu.js +3 -3
  265. package/plugins/contextMenu/menu/menu.mjs +3 -3
  266. package/plugins/contextMenu/menu/positioner.js +1 -1
  267. package/plugins/contextMenu/menu/positioner.mjs +1 -1
  268. package/plugins/contextMenu/predefinedItems/alignment.js +1 -1
  269. package/plugins/contextMenu/predefinedItems/alignment.mjs +1 -1
  270. package/plugins/contextMenu/predefinedItems/clearColumn.js +1 -1
  271. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +1 -1
  272. package/plugins/contextMenu/predefinedItems/columnLeft.js +3 -3
  273. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +3 -3
  274. package/plugins/contextMenu/predefinedItems/columnRight.js +3 -3
  275. package/plugins/contextMenu/predefinedItems/columnRight.mjs +3 -3
  276. package/plugins/contextMenu/predefinedItems/readOnly.js +1 -1
  277. package/plugins/contextMenu/predefinedItems/readOnly.mjs +1 -1
  278. package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
  279. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
  280. package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
  281. package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
  282. package/plugins/contextMenu/predefinedItems/rowAbove.js +3 -3
  283. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +3 -3
  284. package/plugins/contextMenu/predefinedItems/rowBelow.js +3 -3
  285. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +3 -3
  286. package/plugins/copyPaste/contextMenuItem/copy.js +1 -1
  287. package/plugins/copyPaste/contextMenuItem/copy.mjs +1 -1
  288. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +3 -3
  289. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +3 -3
  290. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +3 -3
  291. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +3 -3
  292. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +3 -3
  293. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +3 -3
  294. package/plugins/copyPaste/contextMenuItem/cut.js +1 -1
  295. package/plugins/copyPaste/contextMenuItem/cut.mjs +1 -1
  296. package/plugins/copyPaste/copyPaste.js +75 -40
  297. package/plugins/copyPaste/copyPaste.mjs +76 -41
  298. package/plugins/customBorders/customBorders.js +1 -1
  299. package/plugins/customBorders/customBorders.mjs +1 -1
  300. package/plugins/dialog/dialog.d.ts +23 -0
  301. package/plugins/dialog/dialog.js +489 -0
  302. package/plugins/dialog/dialog.mjs +485 -0
  303. package/plugins/dialog/index.d.ts +1 -0
  304. package/plugins/dialog/index.js +7 -0
  305. package/plugins/dialog/index.mjs +1 -0
  306. package/plugins/dialog/ui.js +264 -0
  307. package/plugins/dialog/ui.mjs +259 -0
  308. package/plugins/dropdownMenu/dropdownMenu.js +5 -4
  309. package/plugins/dropdownMenu/dropdownMenu.mjs +5 -4
  310. package/plugins/filters/filters.js +2 -2
  311. package/plugins/filters/filters.mjs +2 -2
  312. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +3 -3
  313. package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +3 -3
  314. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +4 -4
  315. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +4 -4
  316. package/plugins/hiddenRows/contextMenuItem/hideRow.js +3 -3
  317. package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +3 -3
  318. package/plugins/hiddenRows/contextMenuItem/showRow.js +4 -4
  319. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +4 -4
  320. package/plugins/index.d.ts +9 -0
  321. package/plugins/index.js +9 -0
  322. package/plugins/index.mjs +7 -1
  323. package/plugins/loading/content.js +36 -0
  324. package/plugins/loading/content.mjs +31 -0
  325. package/plugins/loading/index.d.ts +1 -0
  326. package/plugins/loading/index.js +7 -0
  327. package/plugins/loading/index.mjs +1 -0
  328. package/plugins/loading/loading.d.ts +19 -0
  329. package/plugins/loading/loading.js +292 -0
  330. package/plugins/loading/loading.mjs +287 -0
  331. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  332. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  333. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  334. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  335. package/plugins/manualColumnMove/manualColumnMove.js +3 -3
  336. package/plugins/manualColumnMove/manualColumnMove.mjs +3 -3
  337. package/plugins/manualColumnResize/manualColumnResize.js +3 -3
  338. package/plugins/manualColumnResize/manualColumnResize.mjs +3 -3
  339. package/plugins/manualRowMove/manualRowMove.js +4 -4
  340. package/plugins/manualRowMove/manualRowMove.mjs +4 -4
  341. package/plugins/manualRowResize/manualRowResize.js +5 -2
  342. package/plugins/manualRowResize/manualRowResize.mjs +5 -2
  343. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +15 -15
  344. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +15 -15
  345. package/plugins/mergeCells/focusOrder.js +75 -39
  346. package/plugins/mergeCells/focusOrder.mjs +75 -39
  347. package/plugins/mergeCells/mergeCells.js +26 -19
  348. package/plugins/mergeCells/mergeCells.mjs +26 -19
  349. package/plugins/mergeCells/renderer.js +14 -8
  350. package/plugins/mergeCells/renderer.mjs +14 -8
  351. package/plugins/multiColumnSorting/multiColumnSorting.js +3 -3
  352. package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -3
  353. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +3 -3
  354. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +3 -3
  355. package/plugins/nestedHeaders/nestedHeaders.js +47 -41
  356. package/plugins/nestedHeaders/nestedHeaders.mjs +47 -41
  357. package/plugins/nestedRows/nestedRows.js +3 -3
  358. package/plugins/nestedRows/nestedRows.mjs +3 -3
  359. package/plugins/nestedRows/ui/collapsing.js +1 -2
  360. package/plugins/nestedRows/ui/collapsing.mjs +1 -2
  361. package/plugins/nestedRows/ui/contextMenu.js +4 -4
  362. package/plugins/nestedRows/ui/contextMenu.mjs +4 -4
  363. package/plugins/nestedRows/ui/headers.js +4 -1
  364. package/plugins/nestedRows/ui/headers.mjs +4 -1
  365. package/plugins/pagination/focusController.js +27 -0
  366. package/plugins/pagination/focusController.mjs +23 -0
  367. package/plugins/pagination/index.d.ts +1 -0
  368. package/plugins/pagination/index.js +7 -0
  369. package/plugins/pagination/index.mjs +1 -0
  370. package/plugins/pagination/pagination.d.ts +52 -0
  371. package/plugins/pagination/pagination.js +1034 -0
  372. package/plugins/pagination/pagination.mjs +1030 -0
  373. package/plugins/pagination/strategies/autoPageSize.js +96 -0
  374. package/plugins/pagination/strategies/autoPageSize.mjs +92 -0
  375. package/plugins/pagination/strategies/fixedPageSize.js +88 -0
  376. package/plugins/pagination/strategies/fixedPageSize.mjs +84 -0
  377. package/plugins/pagination/strategies/index.js +22 -0
  378. package/plugins/pagination/strategies/index.mjs +18 -0
  379. package/plugins/pagination/ui.js +449 -0
  380. package/plugins/pagination/ui.mjs +443 -0
  381. package/plugins/pagination/utils.js +28 -0
  382. package/plugins/pagination/utils.mjs +24 -0
  383. package/plugins/stretchColumns/calculator.js +4 -0
  384. package/plugins/stretchColumns/calculator.mjs +4 -0
  385. package/plugins/stretchColumns/stretchColumns.js +1 -1
  386. package/plugins/stretchColumns/stretchColumns.mjs +1 -1
  387. package/plugins/undoRedo/actions/dataChange.js +17 -15
  388. package/plugins/undoRedo/actions/dataChange.mjs +17 -15
  389. package/renderers/checkboxRenderer/checkboxRenderer.js +3 -3
  390. package/renderers/checkboxRenderer/checkboxRenderer.mjs +3 -3
  391. package/selection/range.js +11 -0
  392. package/selection/range.mjs +11 -0
  393. package/selection/selection.js +163 -124
  394. package/selection/selection.mjs +163 -124
  395. package/selection/transformation/_base.js +448 -0
  396. package/selection/transformation/_base.mjs +443 -0
  397. package/selection/transformation/extender.js +55 -0
  398. package/selection/transformation/extender.mjs +51 -0
  399. package/selection/transformation/focus.js +77 -0
  400. package/selection/transformation/focus.mjs +73 -0
  401. package/selection/transformation/index.js +7 -0
  402. package/selection/transformation/index.mjs +2 -0
  403. package/selection/utils.js +2 -1
  404. package/selection/utils.mjs +2 -1
  405. package/settings.d.ts +10 -1
  406. package/shortcutContexts/commands/editor/fastOpen.js +1 -1
  407. package/shortcutContexts/commands/editor/fastOpen.mjs +1 -1
  408. package/shortcutContexts/commands/editor/open.js +10 -4
  409. package/shortcutContexts/commands/editor/open.mjs +10 -4
  410. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  411. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  412. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +2 -2
  413. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +2 -2
  414. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  415. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  416. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  417. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  418. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  419. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  420. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -1
  421. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -1
  422. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +1 -1
  423. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +1 -1
  424. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +1 -1
  425. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +1 -1
  426. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -1
  427. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -1
  428. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -1
  429. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -1
  430. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -1
  431. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -1
  432. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  433. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  434. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  435. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  436. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +2 -2
  437. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +2 -2
  438. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +2 -2
  439. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +2 -2
  440. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +5 -2
  441. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +5 -2
  442. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +5 -2
  443. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +5 -2
  444. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +1 -1
  445. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +1 -1
  446. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +1 -1
  447. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +1 -1
  448. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +1 -1
  449. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +1 -1
  450. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +1 -1
  451. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +1 -1
  452. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +1 -1
  453. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +1 -1
  454. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +1 -1
  455. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +1 -1
  456. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +2 -2
  457. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +2 -2
  458. package/shortcutContexts/commands/scrollToFocusedCell.js +1 -1
  459. package/shortcutContexts/commands/scrollToFocusedCell.mjs +1 -1
  460. package/shortcutContexts/grid.js +3 -3
  461. package/shortcutContexts/grid.mjs +3 -3
  462. package/shortcuts/context.js +4 -1
  463. package/shortcuts/context.mjs +4 -1
  464. package/shortcuts/manager.js +17 -3
  465. package/shortcuts/manager.mjs +17 -3
  466. package/styles/handsontable.css +288 -22
  467. package/styles/handsontable.min.css +3 -3
  468. package/styles/ht-theme-classic.css +828 -0
  469. package/styles/ht-theme-classic.min.css +30 -0
  470. package/styles/ht-theme-horizon.css +122 -26
  471. package/styles/ht-theme-horizon.min.css +3 -3
  472. package/styles/ht-theme-main.css +124 -28
  473. package/styles/ht-theme-main.min.css +3 -3
  474. package/tableView.js +61 -25
  475. package/tableView.mjs +61 -25
  476. package/utils/a11yAnnouncer.js +70 -0
  477. package/utils/a11yAnnouncer.mjs +64 -0
  478. package/{core/focusCatcher → utils}/focusDetector.js +30 -12
  479. package/{core/focusCatcher → utils}/focusDetector.mjs +30 -12
  480. package/utils/samplesGenerator.js +17 -1
  481. package/utils/samplesGenerator.mjs +17 -1
  482. package/utils/stylesHandler.js +23 -8
  483. package/utils/stylesHandler.mjs +23 -8
  484. package/utils/valueAccessors.js +45 -0
  485. package/utils/valueAccessors.mjs +40 -0
  486. package/validators/autocompleteValidator/autocompleteValidator.js +2 -1
  487. package/validators/autocompleteValidator/autocompleteValidator.mjs +2 -1
  488. package/selection/transformation.js +0 -335
  489. package/selection/transformation.mjs +0 -331
package/core.js CHANGED
@@ -53,6 +53,8 @@ var _themes = require("./helpers/themes");
53
53
  var _stylesHandler = require("./utils/stylesHandler");
54
54
  var _console = require("./helpers/console");
55
55
  var _rangeToRenderableMapper = require("./core/coordsMapper/rangeToRenderableMapper");
56
+ var _a11yAnnouncer = require("./utils/a11yAnnouncer");
57
+ var _valueAccessors = require("./utils/valueAccessors");
56
58
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
57
59
  let activeGuid = null;
58
60
 
@@ -163,7 +165,8 @@ const deprecationWarns = new Set();
163
165
  * @param {boolean} [rootInstanceSymbol=false] Indicates if the instance is root of all later instances created.
164
166
  */
165
167
  function Core(rootContainer, userSettings) {
166
- var _userSettings$layoutD,
168
+ var _mergedUserSettings$l,
169
+ _this$rootWrapperElem,
167
170
  _this = this;
168
171
  let rootInstanceSymbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
169
172
  let instance = this;
@@ -175,6 +178,10 @@ function Core(rootContainer, userSettings) {
175
178
  let focusManager;
176
179
  let viewportScroller;
177
180
  let firstRun = true;
181
+ const mergedUserSettings = {
182
+ ...userSettings.initialState,
183
+ ...userSettings
184
+ };
178
185
  if ((0, _rootInstance.hasValidParameter)(rootInstanceSymbol)) {
179
186
  (0, _rootInstance.registerAsRootInstance)(this);
180
187
  }
@@ -195,6 +202,14 @@ function Core(rootContainer, userSettings) {
195
202
  */
196
203
  this.rootWrapperElement = undefined;
197
204
 
205
+ /**
206
+ * Reference to the grid element.
207
+ *
208
+ * @private
209
+ * @type {HTMLElement}
210
+ */
211
+ this.rootGridElement = undefined;
212
+
198
213
  /**
199
214
  * Reference to the portal element.
200
215
  *
@@ -229,10 +244,13 @@ function Core(rootContainer, userSettings) {
229
244
  this.rootWindow = this.rootDocument.defaultView;
230
245
  if ((0, _rootInstance.isRootInstance)(this)) {
231
246
  this.rootWrapperElement = this.rootDocument.createElement('div');
247
+ this.rootGridElement = this.rootDocument.createElement('div');
232
248
  this.rootPortalElement = this.rootDocument.createElement('div');
233
- (0, _element.addClass)(this.rootElement, 'ht-wrapper');
249
+ (0, _element.addClass)(this.rootElement, ['ht-wrapper', 'handsontable']);
234
250
  (0, _element.addClass)(this.rootWrapperElement, 'ht-root-wrapper');
235
- this.rootWrapperElement.appendChild(this.rootElement);
251
+ (0, _element.addClass)(this.rootGridElement, 'ht-grid');
252
+ this.rootGridElement.appendChild(this.rootElement);
253
+ this.rootWrapperElement.appendChild(this.rootGridElement);
236
254
  this.rootContainer.appendChild(this.rootWrapperElement);
237
255
  (0, _element.addClass)(this.rootPortalElement, 'ht-portal');
238
256
  this.rootDocument.body.appendChild(this.rootPortalElement);
@@ -269,9 +287,10 @@ function Core(rootContainer, userSettings) {
269
287
  * @type {number}
270
288
  */
271
289
  this.executionSuspendedCounter = 0;
272
- const layoutDirection = (_userSettings$layoutD = userSettings === null || userSettings === void 0 ? void 0 : userSettings.layoutDirection) !== null && _userSettings$layoutD !== void 0 ? _userSettings$layoutD : 'inherit';
290
+ const layoutDirection = (_mergedUserSettings$l = mergedUserSettings === null || mergedUserSettings === void 0 ? void 0 : mergedUserSettings.layoutDirection) !== null && _mergedUserSettings$l !== void 0 ? _mergedUserSettings$l : 'inherit';
273
291
  const rootElementDirection = ['rtl', 'ltr'].includes(layoutDirection) ? layoutDirection : this.rootWindow.getComputedStyle(this.rootElement).direction;
274
292
  this.rootElement.setAttribute('dir', rootElementDirection);
293
+ (_this$rootWrapperElem = this.rootWrapperElement) === null || _this$rootWrapperElem === void 0 || _this$rootWrapperElem.setAttribute('dir', rootElementDirection);
275
294
 
276
295
  /**
277
296
  * Checks if the grid is rendered using the right-to-left layout direction.
@@ -315,9 +334,26 @@ function Core(rootContainer, userSettings) {
315
334
  * @private
316
335
  * @type {StylesHandler}
317
336
  */
318
- this.stylesHandler = new _stylesHandler.StylesHandler(instance.rootElement, instance.rootDocument);
319
- userSettings.language = (0, _registry5.getValidLanguageCode)(userSettings.language);
320
- const settingsWithoutHooks = Object.fromEntries(Object.entries(userSettings).filter(_ref => {
337
+ this.stylesHandler = new _stylesHandler.StylesHandler({
338
+ rootElement: instance.rootElement,
339
+ rootDocument: instance.rootDocument,
340
+ onThemeChange: validThemeName => {
341
+ if ((0, _rootInstance.isRootInstance)(this)) {
342
+ (0, _element.removeClass)(this.rootWrapperElement, /ht-theme-.*/g);
343
+ (0, _element.removeClass)(this.rootPortalElement, /ht-theme-.*/g);
344
+ if (validThemeName) {
345
+ (0, _element.addClass)(this.rootWrapperElement, validThemeName);
346
+ (0, _element.addClass)(this.rootPortalElement, validThemeName);
347
+ if (!getComputedStyle(this.rootWrapperElement).getPropertyValue('--ht-line-height')) {
348
+ (0, _console.warn)(`The "${validThemeName}" theme is enabled, but its stylesheets are missing or not imported correctly. \
349
+ Import the correct CSS files in order to use that theme.`);
350
+ }
351
+ }
352
+ }
353
+ }
354
+ });
355
+ mergedUserSettings.language = (0, _registry5.getValidLanguageCode)(mergedUserSettings.language);
356
+ const settingsWithoutHooks = Object.fromEntries(Object.entries(mergedUserSettings).filter(_ref => {
321
357
  let [key] = _ref;
322
358
  return !(_hooks.Hooks.getSingleton().isRegistered(key) || _hooks.Hooks.getSingleton().isDeprecated(key));
323
359
  }));
@@ -327,9 +363,6 @@ function Core(rootContainer, userSettings) {
327
363
  const pluginsRegistry = (0, _uniqueMap.createUniqueMap)();
328
364
  this.container = this.rootDocument.createElement('div');
329
365
  this.rootElement.insertBefore(this.container, this.rootElement.firstChild);
330
- if ((0, _rootInstance.isRootInstance)(this)) {
331
- (0, _mixed._injectProductInfo)(userSettings.licenseKey, this.rootWrapperElement);
332
- }
333
366
  this.guid = `ht_${(0, _string.randomString)()}`; // this is the namespace for global events
334
367
 
335
368
  foreignHotInstances.set(this.guid, this);
@@ -562,45 +595,55 @@ function Core(rootContainer, userSettings) {
562
595
  args[_key7] = arguments[_key7];
563
596
  }
564
597
  return _this.runHooks('afterSelectRows', ...args);
565
- }).addLocalHook('beforeModifyTransformStart', function () {
598
+ }).addLocalHook('beforeSelectAll', function () {
566
599
  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
567
600
  args[_key8] = arguments[_key8];
568
601
  }
569
- return _this.runHooks('modifyTransformStart', ...args);
570
- }).addLocalHook('afterModifyTransformStart', function () {
602
+ return _this.runHooks('beforeSelectAll', ...args);
603
+ }).addLocalHook('afterSelectAll', function () {
571
604
  for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
572
605
  args[_key9] = arguments[_key9];
573
606
  }
574
- return _this.runHooks('afterModifyTransformStart', ...args);
575
- }).addLocalHook('beforeModifyTransformFocus', function () {
607
+ return _this.runHooks('afterSelectAll', ...args);
608
+ }).addLocalHook('beforeModifyTransformStart', function () {
576
609
  for (var _len0 = arguments.length, args = new Array(_len0), _key0 = 0; _key0 < _len0; _key0++) {
577
610
  args[_key0] = arguments[_key0];
578
611
  }
579
- return _this.runHooks('modifyTransformFocus', ...args);
580
- }).addLocalHook('afterModifyTransformFocus', function () {
612
+ return _this.runHooks('modifyTransformStart', ...args);
613
+ }).addLocalHook('afterModifyTransformStart', function () {
581
614
  for (var _len1 = arguments.length, args = new Array(_len1), _key1 = 0; _key1 < _len1; _key1++) {
582
615
  args[_key1] = arguments[_key1];
583
616
  }
584
- return _this.runHooks('afterModifyTransformFocus', ...args);
585
- }).addLocalHook('beforeModifyTransformEnd', function () {
617
+ return _this.runHooks('afterModifyTransformStart', ...args);
618
+ }).addLocalHook('beforeModifyTransformFocus', function () {
586
619
  for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
587
620
  args[_key10] = arguments[_key10];
588
621
  }
589
- return _this.runHooks('modifyTransformEnd', ...args);
590
- }).addLocalHook('afterModifyTransformEnd', function () {
622
+ return _this.runHooks('modifyTransformFocus', ...args);
623
+ }).addLocalHook('afterModifyTransformFocus', function () {
591
624
  for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
592
625
  args[_key11] = arguments[_key11];
593
626
  }
594
- return _this.runHooks('afterModifyTransformEnd', ...args);
595
- }).addLocalHook('beforeRowWrap', function () {
627
+ return _this.runHooks('afterModifyTransformFocus', ...args);
628
+ }).addLocalHook('beforeModifyTransformEnd', function () {
596
629
  for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
597
630
  args[_key12] = arguments[_key12];
598
631
  }
599
- return _this.runHooks('beforeRowWrap', ...args);
600
- }).addLocalHook('beforeColumnWrap', function () {
632
+ return _this.runHooks('modifyTransformEnd', ...args);
633
+ }).addLocalHook('afterModifyTransformEnd', function () {
601
634
  for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
602
635
  args[_key13] = arguments[_key13];
603
636
  }
637
+ return _this.runHooks('afterModifyTransformEnd', ...args);
638
+ }).addLocalHook('beforeRowWrap', function () {
639
+ for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
640
+ args[_key14] = arguments[_key14];
641
+ }
642
+ return _this.runHooks('beforeRowWrap', ...args);
643
+ }).addLocalHook('beforeColumnWrap', function () {
644
+ for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
645
+ args[_key15] = arguments[_key15];
646
+ }
604
647
  return _this.runHooks('beforeColumnWrap', ...args);
605
648
  }).addLocalHook('insertRowRequire', totalRows => this.alter('insert_row_above', totalRows, 1, 'auto')).addLocalHook('insertColRequire', totalCols => this.alter('insert_col_start', totalCols, 1, 'auto'));
606
649
  grid = {
@@ -728,7 +771,7 @@ function Core(rootContainer, userSettings) {
728
771
  if (selection.isSelected()) {
729
772
  const {
730
773
  row
731
- } = instance.getSelectedRangeLast().highlight;
774
+ } = instance.getSelectedRangeActive().highlight;
732
775
  if (row >= groupIndex && row <= groupIndex + groupAmount - 1) {
733
776
  editorManager.closeEditor(true);
734
777
  }
@@ -787,7 +830,7 @@ function Core(rootContainer, userSettings) {
787
830
  if (selection.isSelected()) {
788
831
  const {
789
832
  col
790
- } = instance.getSelectedRangeLast().highlight;
833
+ } = instance.getSelectedRangeActive().highlight;
791
834
  if (col >= groupIndex && col <= groupIndex + groupAmount - 1) {
792
835
  editorManager.closeEditor(true);
793
836
  }
@@ -828,8 +871,8 @@ function Core(rootContainer, userSettings) {
828
871
  if (!keepEmptyRows) {
829
872
  grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
830
873
  }
831
- instance.view.render();
832
874
  instance.view.adjustElementsSize();
875
+ instance.view.render();
833
876
  },
834
877
  /**
835
878
  * Makes sure there are empty rows at the bottom of the table.
@@ -1038,6 +1081,7 @@ function Core(rootContainer, userSettings) {
1038
1081
  }
1039
1082
  skippedColumn = 0;
1040
1083
  for (c = 0; c < clen; c++) {
1084
+ var _instance$getSourceDa;
1041
1085
  if (end && current.col > end.col && colSelectionLength > colInputLength || !tableMeta.allowInsertColumn && current.col > instance.countCols() - 1 || current.col >= tableMeta.maxCols) {
1042
1086
  break;
1043
1087
  }
@@ -1054,8 +1098,9 @@ function Core(rootContainer, userSettings) {
1054
1098
  continue;
1055
1099
  }
1056
1100
  const visualColumn = c - skippedColumn;
1101
+ const hasValueSetter = !!cellMeta.valueSetter;
1057
1102
  let value = getInputValue(visualRow, visualColumn);
1058
- let orgValue = instance.getDataAtCell(current.row, current.col);
1103
+ let orgValue = (_instance$getSourceDa = instance.getSourceDataAtCell(current.row, current.col)) !== null && _instance$getSourceDa !== void 0 ? _instance$getSourceDa : null;
1059
1104
  if (value !== null && typeof value === 'object') {
1060
1105
  // when 'value' is array and 'orgValue' is null, set 'orgValue' to
1061
1106
  // an empty array so that the null value can be compared to 'value'
@@ -1063,20 +1108,23 @@ function Core(rootContainer, userSettings) {
1063
1108
  if (Array.isArray(value) && orgValue === null) {
1064
1109
  orgValue = [];
1065
1110
  }
1066
- if (orgValue === null || typeof orgValue !== 'object') {
1111
+ if (!hasValueSetter && (typeof orgValue !== 'object' || orgValue === null)) {
1067
1112
  pushData = false;
1068
- } else {
1113
+ } else if (orgValue !== null) {
1069
1114
  const orgValueSchema = (0, _object.duckSchema)(Array.isArray(orgValue) ? orgValue : orgValue[0] || orgValue);
1070
1115
  const valueSchema = (0, _object.duckSchema)(Array.isArray(value) ? value : value[0] || value);
1071
1116
 
1072
1117
  // Allow overwriting values with the same object-based schema or any array-based schema.
1073
- if ((0, _object.isObjectEqual)(orgValueSchema, valueSchema) || Array.isArray(orgValueSchema) && Array.isArray(valueSchema)) {
1118
+ if (hasValueSetter ||
1119
+ // If the cell has a value setter, we don't know the value schema (it's dynamic)
1120
+
1121
+ (0, _object.isObjectEqual)(orgValueSchema, valueSchema) || Array.isArray(orgValueSchema) && Array.isArray(valueSchema)) {
1074
1122
  value = (0, _object.deepClone)(value);
1075
1123
  } else {
1076
1124
  pushData = false;
1077
1125
  }
1078
1126
  }
1079
- } else if (orgValue !== null && typeof orgValue === 'object') {
1127
+ } else if (!hasValueSetter && orgValue !== null && typeof orgValue === 'object') {
1080
1128
  pushData = false;
1081
1129
  }
1082
1130
  if (pushData) {
@@ -1148,17 +1196,15 @@ function Core(rootContainer, userSettings) {
1148
1196
  if ((0, _browser.isMobileBrowser)() || (0, _browser.isIpadOS)()) {
1149
1197
  (0, _element.addClass)(instance.rootElement, 'mobile');
1150
1198
  }
1151
- this.updateSettings(userSettings, true);
1199
+ this.updateSettings(mergedUserSettings, true);
1152
1200
  this.view = new _tableView.default(this);
1153
- const themeName = tableMeta.themeName || (0, _themes.getThemeClassName)(instance.rootContainer);
1154
-
1155
- // Use the theme defined in the settings object or set as a root container class name (in that order).
1156
- instance.useTheme(themeName);
1157
1201
  editorManager = _editorManager.default.getInstance(instance, tableMeta, selection);
1158
1202
  viewportScroller = (0, _index.createViewportScroller)(instance);
1159
1203
  focusManager = new _focusManager.FocusManager(instance);
1160
1204
  if ((0, _rootInstance.isRootInstance)(this)) {
1161
1205
  (0, _index.installFocusCatcher)(instance);
1206
+ (0, _a11yAnnouncer.install)(instance.rootPortalElement);
1207
+ (0, _mixed._injectProductInfo)(mergedUserSettings.licenseKey, this.rootWrapperElement);
1162
1208
  }
1163
1209
  instance.runHooks('init');
1164
1210
  this.render();
@@ -1168,8 +1214,8 @@ function Core(rootContainer, userSettings) {
1168
1214
  (0, _element.observeVisibilityChangeOnce)(instance.rootElement, () => {
1169
1215
  // Update the spreader size cache before rendering.
1170
1216
  instance.view._wt.wtOverlays.updateLastSpreaderSize();
1171
- instance.render();
1172
1217
  instance.view.adjustElementsSize();
1218
+ instance.render();
1173
1219
  });
1174
1220
  }
1175
1221
  if (typeof firstRun === 'object') {
@@ -1207,23 +1253,6 @@ function Core(rootContainer, userSettings) {
1207
1253
  };
1208
1254
  }
1209
1255
 
1210
- /**
1211
- * Get parsed number from numeric string.
1212
- *
1213
- * @private
1214
- * @param {string} numericData Float (separated by a dot or a comma) or integer.
1215
- * @returns {number} Number if we get data in parsable format, not changed value otherwise.
1216
- */
1217
- function getParsedNumber(numericData) {
1218
- // Unifying "float like" string. Change from value with comma determiner to value with dot determiner,
1219
- // for example from `450,65` to `450.65`.
1220
- const unifiedNumericData = numericData.replace(',', '.');
1221
- if (isNaN(parseFloat(unifiedNumericData)) === false) {
1222
- return parseFloat(unifiedNumericData);
1223
- }
1224
- return numericData;
1225
- }
1226
-
1227
1256
  /**
1228
1257
  * @ignore
1229
1258
  * @param {Array} changes The 2D array containing information about each of the edited cells.
@@ -1245,7 +1274,7 @@ function Core(rootContainer, userSettings) {
1245
1274
  callback(); // called when async validators are resolved and beforeChange was not async
1246
1275
  };
1247
1276
  for (let i = changes.length - 1; i >= 0; i--) {
1248
- const [row, prop] = changes[i];
1277
+ const [row, prop,, newValue] = changes[i];
1249
1278
  const visualCol = datamap.propToCol(prop);
1250
1279
  let cellProperties;
1251
1280
  if (Number.isInteger(visualCol)) {
@@ -1258,19 +1287,20 @@ function Core(rootContainer, userSettings) {
1258
1287
  ...tableMeta
1259
1288
  };
1260
1289
  }
1261
-
1262
- /* eslint-disable no-loop-func */
1263
1290
  if (instance.getCellValidator(cellProperties)) {
1291
+ /* eslint-disable no-loop-func */
1264
1292
  waitingForValidator.addValidatorToQueue();
1265
- instance.validateCell(changes[i][3], cellProperties, function (index, cellPropertiesReference) {
1293
+ instance.validateCell(newValue, cellProperties, function (index, cellPropertiesReference) {
1266
1294
  return function (result) {
1267
1295
  if (typeof result !== 'boolean') {
1268
1296
  throw new Error('Validation error: result is not boolean');
1269
1297
  }
1270
1298
  if (result === false && cellPropertiesReference.allowInvalid === false) {
1271
1299
  shouldBeCanceled = false;
1272
- changes.splice(index, 1); // cancel the change
1273
- cellPropertiesReference.valid = true; // we cancelled the change, so cell value is still valid
1300
+ // cancel the change
1301
+ changes.splice(index, 1);
1302
+ // we cancelled the change, so cell value is still valid
1303
+ cellPropertiesReference.valid = true;
1274
1304
  }
1275
1305
  waitingForValidator.removeValidatorFormQueue();
1276
1306
  };
@@ -1338,9 +1368,9 @@ function Core(rootContainer, userSettings) {
1338
1368
  grid.adjustRowsAndCols();
1339
1369
  instance.runHooks('beforeChangeRender', changes, source);
1340
1370
  editorManager.closeEditor();
1371
+ instance.view.adjustElementsSize();
1341
1372
  instance.render();
1342
1373
  editorManager.prepareEditor();
1343
- instance.view.adjustElementsSize();
1344
1374
  instance.runHooks('afterChange', changes, source || 'edit');
1345
1375
  const activeEditor = instance.getActiveEditor();
1346
1376
  if (activeEditor && (0, _mixed.isDefined)(activeEditor.refreshValue)) {
@@ -1429,7 +1459,7 @@ function Core(rootContainer, userSettings) {
1429
1459
  // eslint-disable-next-line no-param-reassign
1430
1460
  value = instance.runHooks('beforeValidate', value, cellProperties.visualRow, cellProperties.prop, source);
1431
1461
 
1432
- // To provide consistent behaviour, validation should be always asynchronous
1462
+ // To provide consistent behavior, validation should be always asynchronous
1433
1463
  instance._registerImmediate(() => {
1434
1464
  validator.call(cellProperties, value, valid => {
1435
1465
  if (!instance) {
@@ -1497,22 +1527,7 @@ function Core(rootContainer, userSettings) {
1497
1527
  ...tableMeta
1498
1528
  };
1499
1529
  }
1500
- const {
1501
- type,
1502
- checkedTemplate,
1503
- uncheckedTemplate
1504
- } = cellProperties;
1505
- if (type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
1506
- filteredChanges[i][3] = getParsedNumber(newValue);
1507
- }
1508
- if (type === 'checkbox') {
1509
- const stringifiedValue = (0, _mixed.stringify)(newValue);
1510
- const isChecked = stringifiedValue === (0, _mixed.stringify)(checkedTemplate);
1511
- const isUnchecked = stringifiedValue === (0, _mixed.stringify)(uncheckedTemplate);
1512
- if (isChecked || isUnchecked) {
1513
- filteredChanges[i][3] = isChecked ? checkedTemplate : uncheckedTemplate;
1514
- }
1515
- }
1530
+ filteredChanges[i][3] = (0, _valueAccessors.getValueSetterValue)(newValue, cellProperties);
1516
1531
  }
1517
1532
  return filteredChanges;
1518
1533
  }
@@ -1537,18 +1552,19 @@ function Core(rootContainer, userSettings) {
1537
1552
  let ilen;
1538
1553
  let prop;
1539
1554
  for (i = 0, ilen = input.length; i < ilen; i++) {
1555
+ const [visualRow, visualColumn, newValue] = input[i];
1540
1556
  if (typeof input[i] !== 'object') {
1541
1557
  throw new Error('Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter');
1542
1558
  }
1543
- if (typeof input[i][1] !== 'number') {
1559
+ if (typeof visualColumn !== 'number') {
1544
1560
  throw new Error('Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`'); // eslint-disable-line max-len
1545
1561
  }
1546
- if (input[i][1] >= this.countCols()) {
1547
- prop = input[i][1];
1562
+ if (visualColumn >= this.countCols()) {
1563
+ prop = visualColumn;
1548
1564
  } else {
1549
- prop = datamap.colToProp(input[i][1]);
1565
+ prop = datamap.colToProp(visualColumn);
1550
1566
  }
1551
- changes.push([input[i][0], prop, dataSource.getAtCell(this.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);
1567
+ changes.push([visualRow, prop, dataSource.getAtCell(this.toPhysicalRow(visualRow), visualColumn), newValue]);
1552
1568
  }
1553
1569
  if (!changeSource && typeof row === 'object') {
1554
1570
  changeSource = column;
@@ -1579,7 +1595,8 @@ function Core(rootContainer, userSettings) {
1579
1595
  let i;
1580
1596
  let ilen;
1581
1597
  for (i = 0, ilen = input.length; i < ilen; i++) {
1582
- changes.push([input[i][0], input[i][1], dataSource.getAtCell(this.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);
1598
+ const [visualRow, inputProp, newValue] = input[i];
1599
+ changes.push([visualRow, inputProp, dataSource.getAtCell(this.toPhysicalRow(visualRow), inputProp), newValue]);
1583
1600
  }
1584
1601
 
1585
1602
  // TODO: I don't think `prop` should be used as `changeSource` here, but removing it would be a breaking change.
@@ -1696,8 +1713,8 @@ function Core(rootContainer, userSettings) {
1696
1713
  * @returns {Array} Returns removed portion of columns.
1697
1714
  */
1698
1715
  this.spliceCol = function (column, index, amount) {
1699
- for (var _len14 = arguments.length, elements = new Array(_len14 > 3 ? _len14 - 3 : 0), _key14 = 3; _key14 < _len14; _key14++) {
1700
- elements[_key14 - 3] = arguments[_key14];
1716
+ for (var _len16 = arguments.length, elements = new Array(_len16 > 3 ? _len16 - 3 : 0), _key16 = 3; _key16 < _len16; _key16++) {
1717
+ elements[_key16 - 3] = arguments[_key16];
1701
1718
  }
1702
1719
  return datamap.spliceCol(column, index, amount, ...elements);
1703
1720
  };
@@ -1714,8 +1731,8 @@ function Core(rootContainer, userSettings) {
1714
1731
  * @returns {Array} Returns removed portion of rows.
1715
1732
  */
1716
1733
  this.spliceRow = function (row, index, amount) {
1717
- for (var _len15 = arguments.length, elements = new Array(_len15 > 3 ? _len15 - 3 : 0), _key15 = 3; _key15 < _len15; _key15++) {
1718
- elements[_key15 - 3] = arguments[_key15];
1734
+ for (var _len17 = arguments.length, elements = new Array(_len17 > 3 ? _len17 - 3 : 0), _key17 = 3; _key17 < _len17; _key17++) {
1735
+ elements[_key17 - 3] = arguments[_key17];
1719
1736
  }
1720
1737
  return datamap.spliceRow(row, index, amount, ...elements);
1721
1738
  };
@@ -1763,16 +1780,37 @@ function Core(rootContainer, userSettings) {
1763
1780
  return result;
1764
1781
  };
1765
1782
 
1783
+ /**
1784
+ * Returns the range coordinates of the active selection layer as an array. Active selection layer is the layer that
1785
+ * has visible focus highlight.
1786
+ *
1787
+ * @memberof Core#
1788
+ * @function getSelectedRangeActive
1789
+ * @since 16.1.0
1790
+ * @returns {number[]|undefined} Selected range as an array of coordinates or `undefined` if there is no selection.
1791
+ */
1792
+ this.getSelectedActive = function () {
1793
+ const activeRange = this.getSelectedRangeActive();
1794
+ if (!activeRange) {
1795
+ return;
1796
+ }
1797
+ const {
1798
+ from,
1799
+ to
1800
+ } = activeRange;
1801
+ return [from.row, from.col, to.row, to.col];
1802
+ };
1803
+
1766
1804
  /**
1767
1805
  * Returns the current selection as an array of CellRange objects.
1768
1806
  *
1769
1807
  * The version 0.36.0 adds a non-consecutive selection feature. Since this version, the method returns an array of arrays.
1770
- * Additionally to collect the coordinates of the currently selected area (as it was previously done by the method)
1771
- * you need to use `getSelectedRangeLast` method.
1808
+ * Additionally to collect the coordinates of the active selected area (as it was previously done by the method)
1809
+ * you need to use `getSelectedRangeActive()` method.
1772
1810
  *
1773
1811
  * @memberof Core#
1774
1812
  * @function getSelectedRange
1775
- * @returns {CellRange[]|undefined} Selected range object or undefined if there is no selection.
1813
+ * @returns {CellRange[]|undefined} Selected range object or `undefined` if there is no selection.
1776
1814
  */
1777
1815
  this.getSelectedRange = function () {
1778
1816
  // https://github.com/handsontable/handsontable/issues/44 //cjl
@@ -1787,7 +1825,7 @@ function Core(rootContainer, userSettings) {
1787
1825
  * @memberof Core#
1788
1826
  * @function getSelectedRangeLast
1789
1827
  * @since 0.36.0
1790
- * @returns {CellRange|undefined} Selected range object or undefined` if there is no selection.
1828
+ * @returns {CellRange|undefined} Selected range object or `undefined` if there is no selection.
1791
1829
  */
1792
1830
  this.getSelectedRangeLast = function () {
1793
1831
  const selectedRange = this.getSelectedRange();
@@ -1798,6 +1836,32 @@ function Core(rootContainer, userSettings) {
1798
1836
  return result;
1799
1837
  };
1800
1838
 
1839
+ /**
1840
+ * Returns the range coordinates of the active selection layer. Active selection layer is the layer that
1841
+ * has visible focus highlight.
1842
+ *
1843
+ * @memberof Core#
1844
+ * @function getSelectedRangeActive
1845
+ * @since 16.1.0
1846
+ * @returns {CellRange|undefined} Selected range object or `undefined` if there is no selection.
1847
+ */
1848
+ this.getSelectedRangeActive = function () {
1849
+ return selection.getActiveSelectedRange();
1850
+ };
1851
+
1852
+ /**
1853
+ * Returns the index of the active selection layer. Active selection layer is the layer that
1854
+ * has visible focus highlight.
1855
+ *
1856
+ * @memberof Core#
1857
+ * @function getActiveSelectionLayerIndex
1858
+ * @since 16.1.0
1859
+ * @returns {number} The index of the active selection layer. `0` to `N` where `0` is the last (oldest) layer and `N` is the first (newest) layer.
1860
+ */
1861
+ this.getActiveSelectionLayerIndex = function () {
1862
+ return selection.getActiveSelectionLayerIndex();
1863
+ };
1864
+
1801
1865
  /**
1802
1866
  * Erases content from cells that have been selected in the table.
1803
1867
  *
@@ -2159,8 +2223,8 @@ function Core(rootContainer, userSettings) {
2159
2223
  }
2160
2224
  if (isSizeChanged || view._wt.wtOverlays.scrollableElement === instance.rootWindow) {
2161
2225
  view.setLastSize(width, height);
2162
- instance.render();
2163
2226
  view.adjustElementsSize();
2227
+ instance.render();
2164
2228
  }
2165
2229
  instance.runHooks('afterRefreshDimensions', {
2166
2230
  width: lastWidth,
@@ -2369,6 +2433,20 @@ function Core(rootContainer, userSettings) {
2369
2433
  return datamap.getCopyable(row, datamap.colToProp(column));
2370
2434
  };
2371
2435
 
2436
+ /**
2437
+ * Returns the source data's copyable value at specified `row` and `column` index.
2438
+ *
2439
+ * @memberof Core#
2440
+ * @function getCopyableSourceData
2441
+ * @param {number} row Visual row index.
2442
+ * @param {number} column Visual column index.
2443
+ * @since 16.1.0
2444
+ * @returns {string}
2445
+ */
2446
+ this.getCopyableSourceData = function (row, column) {
2447
+ return dataSource.getCopyable(row, datamap.colToProp(column));
2448
+ };
2449
+
2372
2450
  /**
2373
2451
  * Returns schema provided by constructor settings. If it doesn't exist then it returns the schema based on the data
2374
2452
  * structure in the first row.
@@ -2424,9 +2502,6 @@ function Core(rootContainer, userSettings) {
2424
2502
  if ((0, _mixed.isDefined)(settings.ganttChart)) {
2425
2503
  throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');
2426
2504
  }
2427
- if (settings.language) {
2428
- setLanguage(settings.language);
2429
- }
2430
2505
 
2431
2506
  // eslint-disable-next-line no-restricted-syntax
2432
2507
  for (i in settings) {
@@ -2451,6 +2526,20 @@ function Core(rootContainer, userSettings) {
2451
2526
  globalMeta[i] = settings[i];
2452
2527
  }
2453
2528
  }
2529
+ if (init) {
2530
+ // Use the theme defined in the settings object or set as a root container class name (in that order).
2531
+ instance.useTheme(tableMeta.themeName || (0, _themes.getThemeClassName)(instance.rootContainer));
2532
+ } else {
2533
+ const currentThemeName = instance.getCurrentThemeName();
2534
+ const themeNameOptionExists = (0, _object.hasOwnProperty)(settings, 'themeName');
2535
+ if (themeNameOptionExists && currentThemeName !== settings.themeName) {
2536
+ instance.useTheme(settings.themeName);
2537
+ }
2538
+ }
2539
+ if (instance.stylesHandler.isClassicTheme()) {
2540
+ // eslint-disable-next-line max-len
2541
+ (0, _console.deprecatedWarn)('Handsontable classic theme is a legacy theme and will be removed in version 17.0. Please update your theme settings to ensure compatibility with future versions.');
2542
+ }
2454
2543
 
2455
2544
  // Load data or create data map
2456
2545
  if (settings.data === undefined && tableMeta.data === undefined) {
@@ -2463,6 +2552,9 @@ function Core(rootContainer, userSettings) {
2463
2552
  // The `column` property has changed - dataset may be expanded or narrowed down. The `loadData` do the same.
2464
2553
  instance.initIndexMappers();
2465
2554
  }
2555
+ if (!firstRun && settings.language) {
2556
+ setLanguage(settings.language);
2557
+ }
2466
2558
  const clen = instance.countCols();
2467
2559
  const columnSetting = tableMeta.columns;
2468
2560
 
@@ -2497,44 +2589,43 @@ function Core(rootContainer, userSettings) {
2497
2589
  if (currentHeight !== '') {
2498
2590
  currentHeight = parseInt(instance.rootElement.style.height, 10);
2499
2591
  }
2500
- let height = settings.height;
2501
- if ((0, _function.isFunction)(height)) {
2502
- height = height();
2503
- }
2504
2592
  if (init) {
2505
2593
  const initialStyle = instance.rootElement.getAttribute('style');
2506
2594
  if (initialStyle) {
2507
2595
  instance.rootElement.setAttribute('data-initialstyle', instance.rootElement.getAttribute('style'));
2508
2596
  }
2509
2597
  }
2510
- if (height === null) {
2511
- const initialStyle = instance.rootElement.getAttribute('data-initialstyle');
2512
- if (initialStyle && (initialStyle.indexOf('height') > -1 || initialStyle.indexOf('overflow') > -1)) {
2513
- instance.rootElement.setAttribute('style', initialStyle);
2514
- } else {
2515
- instance.rootElement.style.height = '';
2516
- instance.rootElement.style.overflow = '';
2598
+ let height = settings.height;
2599
+ if (typeof settings.height !== 'undefined') {
2600
+ if ((0, _function.isFunction)(height)) {
2601
+ height = height();
2602
+ }
2603
+ height = instance.runHooks('beforeHeightChange', height);
2604
+ if (height === null) {
2605
+ const initialStyle = instance.rootElement.getAttribute('data-initialstyle');
2606
+ if (initialStyle && (initialStyle.indexOf('height') > -1 || initialStyle.indexOf('overflow') > -1)) {
2607
+ instance.rootElement.setAttribute('style', initialStyle);
2608
+ } else {
2609
+ instance.rootElement.style.height = '';
2610
+ instance.rootElement.style.overflow = '';
2611
+ }
2612
+ } else if (height !== undefined) {
2613
+ instance.rootElement.style.height = isNaN(height) ? `${height}` : `${height}px`;
2614
+ instance.rootElement.style.overflow = 'hidden';
2517
2615
  }
2518
- } else if (height !== undefined) {
2519
- instance.rootElement.style.height = isNaN(height) ? `${height}` : `${height}px`;
2520
- instance.rootElement.style.overflow = 'hidden';
2521
2616
  }
2522
2617
  if (typeof settings.width !== 'undefined') {
2523
2618
  let width = settings.width;
2524
2619
  if ((0, _function.isFunction)(width)) {
2525
2620
  width = width();
2526
2621
  }
2622
+ width = instance.runHooks('beforeWidthChange', width);
2527
2623
  instance.rootElement.style.width = isNaN(width) ? `${width}` : `${width}px`;
2528
2624
  }
2529
2625
  if (!init) {
2530
2626
  if (instance.view) {
2531
2627
  instance.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked();
2532
2628
  instance.view._wt.exportSettingsAsClassNames();
2533
- const currentThemeName = instance.getCurrentThemeName();
2534
- const themeNameOptionExists = (0, _object.hasOwnProperty)(settings, 'themeName');
2535
- if (themeNameOptionExists && currentThemeName !== settings.themeName) {
2536
- instance.useTheme(settings.themeName);
2537
- }
2538
2629
  }
2539
2630
  instance.runHooks('afterUpdateSettings', settings);
2540
2631
  }
@@ -2558,16 +2649,17 @@ function Core(rootContainer, userSettings) {
2558
2649
  * @returns {*} The value of the focused cell.
2559
2650
  */
2560
2651
  this.getValue = function () {
2561
- const sel = instance.getSelectedLast();
2652
+ const activeSelection = instance.getSelectedRangeActive();
2562
2653
  if (tableMeta.getValue) {
2563
2654
  if ((0, _function.isFunction)(tableMeta.getValue)) {
2564
2655
  return tableMeta.getValue.call(instance);
2565
- } else if (sel) {
2566
- return instance.getData()[sel[0][0]][tableMeta.getValue];
2656
+ } else if (activeSelection) {
2657
+ return instance.getData()[activeSelection.highlight.row][tableMeta.getValue];
2567
2658
  }
2568
- } else if (sel) {
2569
- return instance.getDataAtCell(sel[0], sel[1]);
2659
+ } else if (activeSelection) {
2660
+ return instance.getDataAtCell(activeSelection.highlight.row, activeSelection.highlight.col);
2570
2661
  }
2662
+ return null;
2571
2663
  };
2572
2664
 
2573
2665
  /**
@@ -2968,17 +3060,32 @@ function Core(rootContainer, userSettings) {
2968
3060
  const input = setDataInputToArray(row, column, value);
2969
3061
  const isThereAnySetSourceListener = this.hasHook('afterSetSourceDataAtCell');
2970
3062
  const changesForHook = [];
3063
+ const getCellProperties = (changeRow, changeProp) => {
3064
+ const visualRow = this.toVisualRow(changeRow);
3065
+ const visualColumn = this.toVisualColumn(changeProp);
3066
+ if (Number.isInteger(visualColumn)) {
3067
+ return this.getCellMeta(visualRow, visualColumn);
3068
+ }
3069
+
3070
+ // If there's no requested visual column, we can use the table meta as the cell properties
3071
+ return {
3072
+ ...Object.getPrototypeOf(tableMeta),
3073
+ ...tableMeta
3074
+ };
3075
+ };
2971
3076
  if (isThereAnySetSourceListener) {
2972
3077
  (0, _array.arrayEach)(input, _ref9 => {
2973
3078
  let [changeRow, changeProp, changeValue] = _ref9;
3079
+ const newValue = (0, _valueAccessors.getValueSetterValue)(changeValue, getCellProperties(changeRow, changeProp));
2974
3080
  changesForHook.push([changeRow, changeProp, dataSource.getAtCell(changeRow, changeProp),
2975
3081
  // The previous value.
2976
- changeValue]);
3082
+ newValue]);
2977
3083
  });
2978
3084
  }
2979
3085
  (0, _array.arrayEach)(input, _ref0 => {
2980
3086
  let [changeRow, changeProp, changeValue] = _ref0;
2981
- dataSource.setAtCell(changeRow, changeProp, changeValue);
3087
+ const newValue = (0, _valueAccessors.getValueSetterValue)(changeValue, getCellProperties(changeRow, changeProp));
3088
+ dataSource.setAtCell(changeRow, changeProp, newValue);
2982
3089
  });
2983
3090
  if (isThereAnySetSourceListener) {
2984
3091
  this.runHooks('afterSetSourceDataAtCell', changesForHook, source);
@@ -3115,8 +3222,8 @@ function Core(rootContainer, userSettings) {
3115
3222
  */
3116
3223
  this.spliceCellsMeta = function (visualIndex) {
3117
3224
  let deleteAmount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3118
- for (var _len16 = arguments.length, cellMetaRows = new Array(_len16 > 2 ? _len16 - 2 : 0), _key16 = 2; _key16 < _len16; _key16++) {
3119
- cellMetaRows[_key16 - 2] = arguments[_key16];
3225
+ for (var _len18 = arguments.length, cellMetaRows = new Array(_len18 > 2 ? _len18 - 2 : 0), _key18 = 2; _key18 < _len18; _key18++) {
3226
+ cellMetaRows[_key18 - 2] = arguments[_key18];
3120
3227
  }
3121
3228
  if (cellMetaRows.length > 0 && !Array.isArray(cellMetaRows[0])) {
3122
3229
  throw new Error('The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.');
@@ -4298,7 +4405,7 @@ function Core(rootContainer, userSettings) {
4298
4405
  }
4299
4406
  const {
4300
4407
  highlight
4301
- } = this.getSelectedRangeLast();
4408
+ } = this.getSelectedRangeActive();
4302
4409
  const isScrolled = this.scrollViewportTo(highlight.toObject());
4303
4410
  if (isScrolled) {
4304
4411
  // fast render triggers `afterScroll` hook
@@ -4328,6 +4435,9 @@ function Core(rootContainer, userSettings) {
4328
4435
  dataSource.destroy();
4329
4436
  }
4330
4437
  dataSource = null;
4438
+ if ((0, _rootInstance.isRootInstance)(this)) {
4439
+ (0, _a11yAnnouncer.uninstall)();
4440
+ }
4331
4441
  this.getShortcutManager().destroy();
4332
4442
  moduleRegisterer.clear();
4333
4443
  metaManager.clearCache();
@@ -4753,18 +4863,6 @@ function Core(rootContainer, userSettings) {
4753
4863
  const isFirstRun = !!firstRun;
4754
4864
  this.stylesHandler.useTheme(themeName);
4755
4865
  const validThemeName = this.stylesHandler.getThemeName();
4756
- if ((0, _rootInstance.isRootInstance)(this)) {
4757
- (0, _element.removeClass)(this.rootWrapperElement, /ht-theme-.*/g);
4758
- (0, _element.removeClass)(this.rootPortalElement, /ht-theme-.*/g);
4759
- if (validThemeName) {
4760
- (0, _element.addClass)(this.rootWrapperElement, validThemeName);
4761
- (0, _element.addClass)(this.rootPortalElement, validThemeName);
4762
- if (!getComputedStyle(this.rootWrapperElement).getPropertyValue('--ht-line-height')) {
4763
- (0, _console.warn)(`The "${validThemeName}" theme is enabled, but its stylesheets are missing or not imported correctly. \
4764
- Import the correct CSS files in order to use that theme.`);
4765
- }
4766
- }
4767
- }
4768
4866
  if (!isFirstRun) {
4769
4867
  instance.render();
4770
4868
  instance.scrollViewportTo(0, 0);