handsontable 11.1.0 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (461) hide show
  1. package/3rdparty/walkontable/src/border.js +120 -98
  2. package/3rdparty/walkontable/src/border.mjs +120 -94
  3. package/3rdparty/walkontable/src/cell/coords.js +59 -17
  4. package/3rdparty/walkontable/src/cell/coords.mjs +55 -17
  5. package/3rdparty/walkontable/src/cell/range.d.ts +10 -2
  6. package/3rdparty/walkontable/src/cell/range.js +278 -99
  7. package/3rdparty/walkontable/src/cell/range.mjs +273 -99
  8. package/3rdparty/walkontable/src/core/_base.js +452 -0
  9. package/3rdparty/walkontable/src/core/_base.mjs +440 -0
  10. package/3rdparty/walkontable/src/core/clone.js +97 -0
  11. package/3rdparty/walkontable/src/core/clone.mjs +80 -0
  12. package/3rdparty/walkontable/src/core/core.js +183 -0
  13. package/3rdparty/walkontable/src/core/core.mjs +160 -0
  14. package/3rdparty/walkontable/src/event.js +99 -66
  15. package/3rdparty/walkontable/src/event.mjs +99 -63
  16. package/3rdparty/walkontable/src/facade/core.js +251 -0
  17. package/3rdparty/walkontable/src/facade/core.mjs +243 -0
  18. package/3rdparty/walkontable/src/index.js +2 -46
  19. package/3rdparty/walkontable/src/index.mjs +3 -13
  20. package/3rdparty/walkontable/src/overlay/_base.js +124 -57
  21. package/3rdparty/walkontable/src/overlay/_base.mjs +124 -57
  22. package/3rdparty/walkontable/src/overlay/bottom.js +96 -80
  23. package/3rdparty/walkontable/src/overlay/bottom.mjs +96 -80
  24. package/3rdparty/walkontable/src/overlay/{bottomLeftCorner.js → bottomInlineStartCorner.js} +45 -62
  25. package/3rdparty/walkontable/src/overlay/{bottomLeftCorner.mjs → bottomInlineStartCorner.mjs} +44 -61
  26. package/3rdparty/walkontable/src/overlay/constants.js +25 -9
  27. package/3rdparty/walkontable/src/overlay/constants.mjs +14 -4
  28. package/3rdparty/walkontable/src/overlay/index.js +10 -19
  29. package/3rdparty/walkontable/src/overlay/index.mjs +4 -5
  30. package/3rdparty/walkontable/src/overlay/{left.js → inlineStart.js} +113 -82
  31. package/3rdparty/walkontable/src/overlay/{left.mjs → inlineStart.mjs} +112 -81
  32. package/3rdparty/walkontable/src/overlay/top.js +93 -68
  33. package/3rdparty/walkontable/src/overlay/top.mjs +93 -68
  34. package/3rdparty/walkontable/src/overlay/{topLeftCorner.js → topInlineStartCorner.js} +56 -57
  35. package/3rdparty/walkontable/src/overlay/{topLeftCorner.mjs → topInlineStartCorner.mjs} +51 -52
  36. package/3rdparty/walkontable/src/overlays.js +225 -156
  37. package/3rdparty/walkontable/src/overlays.mjs +224 -154
  38. package/3rdparty/walkontable/src/renderer/cells.js +4 -3
  39. package/3rdparty/walkontable/src/renderer/cells.mjs +4 -3
  40. package/3rdparty/walkontable/src/renderer/colGroup.js +2 -2
  41. package/3rdparty/walkontable/src/renderer/colGroup.mjs +2 -2
  42. package/3rdparty/walkontable/src/renderer/columnHeaders.js +2 -2
  43. package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
  44. package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
  45. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
  46. package/3rdparty/walkontable/src/renderer/rows.js +2 -2
  47. package/3rdparty/walkontable/src/renderer/rows.mjs +2 -2
  48. package/3rdparty/walkontable/src/scroll.js +125 -104
  49. package/3rdparty/walkontable/src/scroll.mjs +124 -104
  50. package/3rdparty/walkontable/src/selection.js +10 -14
  51. package/3rdparty/walkontable/src/selection.mjs +10 -12
  52. package/3rdparty/walkontable/src/settings.js +235 -126
  53. package/3rdparty/walkontable/src/settings.mjs +235 -125
  54. package/3rdparty/walkontable/src/table/bottom.js +16 -5
  55. package/3rdparty/walkontable/src/table/bottom.mjs +15 -5
  56. package/3rdparty/walkontable/src/table/{bottomLeftCorner.js → bottomInlineStartCorner.js} +27 -15
  57. package/3rdparty/walkontable/src/table/{bottomLeftCorner.mjs → bottomInlineStartCorner.mjs} +26 -15
  58. package/3rdparty/walkontable/src/table/{left.js → inlineStart.js} +23 -15
  59. package/3rdparty/walkontable/src/table/{left.mjs → inlineStart.mjs} +22 -15
  60. package/3rdparty/walkontable/src/table/master.js +22 -12
  61. package/3rdparty/walkontable/src/table/master.mjs +22 -12
  62. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +12 -6
  63. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +12 -6
  64. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +12 -6
  65. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +12 -6
  66. package/3rdparty/walkontable/src/table/mixin/{stickyColumnsLeft.js → stickyColumnsStart.js} +13 -7
  67. package/3rdparty/walkontable/src/table/mixin/{stickyColumnsLeft.mjs → stickyColumnsStart.mjs} +13 -7
  68. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +11 -5
  69. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +11 -5
  70. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -3
  71. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -3
  72. package/3rdparty/walkontable/src/table/top.js +16 -5
  73. package/3rdparty/walkontable/src/table/top.mjs +15 -5
  74. package/3rdparty/walkontable/src/table/{topLeftCorner.js → topInlineStartCorner.js} +27 -15
  75. package/3rdparty/walkontable/src/table/{topLeftCorner.mjs → topInlineStartCorner.mjs} +26 -15
  76. package/3rdparty/walkontable/src/table.js +235 -140
  77. package/3rdparty/walkontable/src/table.mjs +231 -134
  78. package/3rdparty/walkontable/src/types.js +103 -0
  79. package/3rdparty/walkontable/src/types.mjs +102 -0
  80. package/3rdparty/walkontable/src/utils/column.js +22 -33
  81. package/3rdparty/walkontable/src/utils/column.mjs +22 -30
  82. package/3rdparty/walkontable/src/utils/orderView/sharedView.js +2 -2
  83. package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
  84. package/3rdparty/walkontable/src/utils/row.js +9 -4
  85. package/3rdparty/walkontable/src/utils/row.mjs +9 -4
  86. package/3rdparty/walkontable/src/viewport.js +89 -100
  87. package/3rdparty/walkontable/src/viewport.mjs +89 -97
  88. package/CHANGELOG.md +92 -0
  89. package/LICENSE.txt +1 -1
  90. package/README.md +0 -1
  91. package/base.js +2 -2
  92. package/base.mjs +2 -2
  93. package/cellTypes/timeType/timeType.d.ts +6 -6
  94. package/cellTypes/timeType/timeType.js +4 -5
  95. package/cellTypes/timeType/timeType.mjs +4 -5
  96. package/core.d.ts +6 -1
  97. package/core.js +508 -80
  98. package/core.mjs +517 -92
  99. package/dataMap/index.js +4 -0
  100. package/dataMap/index.mjs +2 -1
  101. package/dataMap/metaManager/index.js +2 -2
  102. package/dataMap/metaManager/index.mjs +2 -2
  103. package/dataMap/metaManager/metaLayers/globalMeta.js +4 -0
  104. package/dataMap/metaManager/metaLayers/globalMeta.mjs +4 -0
  105. package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
  106. package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
  107. package/dataMap/metaManager/metaSchema.js +282 -187
  108. package/dataMap/metaManager/metaSchema.mjs +282 -187
  109. package/dataMap/metaManager/mods/extendMetaProperties.js +126 -0
  110. package/dataMap/metaManager/mods/extendMetaProperties.mjs +113 -0
  111. package/dataMap/replaceData.js +3 -17
  112. package/dataMap/replaceData.mjs +3 -17
  113. package/dist/handsontable.css +268 -92
  114. package/dist/handsontable.full.css +269 -103
  115. package/dist/handsontable.full.js +41990 -35658
  116. package/dist/handsontable.full.min.css +9 -9
  117. package/dist/handsontable.full.min.js +144 -144
  118. package/dist/handsontable.js +29561 -25597
  119. package/dist/handsontable.min.css +8 -8
  120. package/dist/handsontable.min.js +4 -4
  121. package/dist/languages/all.js +131 -34
  122. package/dist/languages/all.min.js +1 -1
  123. package/dist/languages/ar-AR.js +167 -0
  124. package/dist/languages/ar-AR.min.js +1 -0
  125. package/dist/languages/cs-CZ.js +167 -0
  126. package/dist/languages/cs-CZ.min.js +1 -0
  127. package/dist/languages/de-CH.js +31 -29
  128. package/dist/languages/de-CH.min.js +1 -1
  129. package/dist/languages/de-DE.js +4 -2
  130. package/dist/languages/de-DE.min.js +1 -1
  131. package/dist/languages/en-US.js +4 -2
  132. package/dist/languages/en-US.min.js +1 -1
  133. package/dist/languages/es-MX.js +4 -2
  134. package/dist/languages/es-MX.min.js +1 -1
  135. package/dist/languages/fr-FR.js +4 -2
  136. package/dist/languages/fr-FR.min.js +1 -1
  137. package/dist/languages/it-IT.js +4 -2
  138. package/dist/languages/it-IT.min.js +1 -1
  139. package/dist/languages/ja-JP.js +36 -38
  140. package/dist/languages/ja-JP.min.js +1 -1
  141. package/dist/languages/ko-KR.js +36 -39
  142. package/dist/languages/ko-KR.min.js +1 -1
  143. package/dist/languages/lv-LV.js +2 -2
  144. package/dist/languages/lv-LV.min.js +1 -1
  145. package/dist/languages/nb-NO.js +2 -2
  146. package/dist/languages/nb-NO.min.js +1 -1
  147. package/dist/languages/nl-NL.js +2 -2
  148. package/dist/languages/nl-NL.min.js +1 -1
  149. package/dist/languages/pl-PL.js +2 -2
  150. package/dist/languages/pl-PL.min.js +1 -1
  151. package/dist/languages/pt-BR.js +2 -2
  152. package/dist/languages/pt-BR.min.js +1 -1
  153. package/dist/languages/ru-RU.js +2 -2
  154. package/dist/languages/ru-RU.min.js +1 -1
  155. package/dist/languages/sr-SP.js +171 -0
  156. package/dist/languages/sr-SP.min.js +1 -0
  157. package/dist/languages/zh-CN.js +24 -24
  158. package/dist/languages/zh-CN.min.js +1 -1
  159. package/dist/languages/zh-TW.js +24 -24
  160. package/dist/languages/zh-TW.min.js +1 -1
  161. package/editorManager.js +120 -267
  162. package/editorManager.mjs +128 -278
  163. package/editors/autocompleteEditor/autocompleteEditor.js +22 -25
  164. package/editors/autocompleteEditor/autocompleteEditor.mjs +22 -25
  165. package/editors/baseEditor/baseEditor.js +205 -34
  166. package/editors/baseEditor/baseEditor.mjs +200 -32
  167. package/editors/checkboxEditor/checkboxEditor.js +2 -2
  168. package/editors/checkboxEditor/checkboxEditor.mjs +2 -2
  169. package/editors/dateEditor/dateEditor.js +21 -8
  170. package/editors/dateEditor/dateEditor.mjs +22 -9
  171. package/editors/dropdownEditor/dropdownEditor.js +3 -3
  172. package/editors/dropdownEditor/dropdownEditor.mjs +3 -3
  173. package/editors/handsontableEditor/handsontableEditor.js +106 -55
  174. package/editors/handsontableEditor/handsontableEditor.mjs +106 -55
  175. package/editors/index.d.ts +3 -0
  176. package/editors/index.js +6 -0
  177. package/editors/index.mjs +3 -1
  178. package/editors/numericEditor/numericEditor.js +2 -2
  179. package/editors/numericEditor/numericEditor.mjs +2 -2
  180. package/editors/passwordEditor/passwordEditor.js +3 -3
  181. package/editors/passwordEditor/passwordEditor.mjs +3 -3
  182. package/editors/selectEditor/selectEditor.js +65 -110
  183. package/editors/selectEditor/selectEditor.mjs +66 -109
  184. package/editors/textEditor/caretPositioner.js +49 -0
  185. package/editors/textEditor/caretPositioner.mjs +42 -0
  186. package/editors/textEditor/textEditor.js +205 -181
  187. package/editors/textEditor/textEditor.mjs +199 -179
  188. package/editors/timeEditor/index.d.ts +1 -0
  189. package/editors/timeEditor/index.js +9 -0
  190. package/editors/timeEditor/index.mjs +1 -0
  191. package/editors/timeEditor/timeEditor.d.ts +7 -0
  192. package/editors/timeEditor/timeEditor.js +105 -0
  193. package/editors/timeEditor/timeEditor.mjs +84 -0
  194. package/eventManager.js +4 -2
  195. package/eventManager.mjs +4 -2
  196. package/helpers/mixed.js +2 -2
  197. package/helpers/mixed.mjs +2 -2
  198. package/i18n/languages/ar-AR.js +41 -0
  199. package/i18n/languages/ar-AR.mjs +17 -0
  200. package/i18n/languages/cs-CZ.js +40 -0
  201. package/i18n/languages/cs-CZ.mjs +16 -0
  202. package/i18n/languages/index.js +12 -0
  203. package/i18n/languages/index.mjs +4 -1
  204. package/i18n/languages/sr-SP.js +40 -0
  205. package/i18n/languages/sr-SP.mjs +16 -0
  206. package/index.d.ts +4 -0
  207. package/languages/all.js +131 -34
  208. package/languages/ar-AR.js +167 -0
  209. package/languages/ar-AR.mjs +19 -0
  210. package/languages/cs-CZ.js +167 -0
  211. package/languages/cs-CZ.mjs +18 -0
  212. package/languages/de-CH.js +31 -29
  213. package/languages/de-DE.js +4 -2
  214. package/languages/en-US.js +4 -2
  215. package/languages/es-MX.js +4 -2
  216. package/languages/fr-FR.js +4 -2
  217. package/languages/index.js +131 -34
  218. package/languages/index.mjs +4 -1
  219. package/languages/it-IT.js +4 -2
  220. package/languages/ja-JP.js +36 -38
  221. package/languages/ko-KR.js +36 -39
  222. package/languages/lv-LV.js +2 -2
  223. package/languages/nb-NO.js +2 -2
  224. package/languages/nl-NL.js +2 -2
  225. package/languages/pl-PL.js +2 -2
  226. package/languages/pt-BR.js +2 -2
  227. package/languages/ru-RU.js +2 -2
  228. package/languages/sr-SP.js +171 -0
  229. package/languages/sr-SP.mjs +18 -0
  230. package/languages/zh-CN.js +24 -24
  231. package/languages/zh-TW.js +24 -24
  232. package/package.json +44 -4
  233. package/pluginHooks.js +49 -13
  234. package/pluginHooks.mjs +49 -13
  235. package/plugins/autoColumnSize/autoColumnSize.js +15 -10
  236. package/plugins/autoColumnSize/autoColumnSize.mjs +15 -10
  237. package/plugins/autoRowSize/autoRowSize.js +14 -9
  238. package/plugins/autoRowSize/autoRowSize.mjs +14 -9
  239. package/plugins/autofill/autofill.js +49 -33
  240. package/plugins/autofill/autofill.mjs +49 -32
  241. package/plugins/autofill/utils.js +10 -11
  242. package/plugins/autofill/utils.mjs +10 -10
  243. package/plugins/base/base.d.ts +8 -2
  244. package/plugins/base/base.js +67 -4
  245. package/plugins/base/base.mjs +66 -4
  246. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +3 -3
  247. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +3 -3
  248. package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +3 -3
  249. package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +3 -3
  250. package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +3 -3
  251. package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +3 -3
  252. package/plugins/collapsibleColumns/collapsibleColumns.js +27 -9
  253. package/plugins/collapsibleColumns/collapsibleColumns.mjs +27 -9
  254. package/plugins/columnSorting/columnSorting.js +5 -7
  255. package/plugins/columnSorting/columnSorting.mjs +5 -6
  256. package/plugins/columnSummary/columnSummary.js +3 -3
  257. package/plugins/columnSummary/columnSummary.mjs +3 -3
  258. package/plugins/comments/commentEditor.js +18 -2
  259. package/plugins/comments/commentEditor.mjs +19 -3
  260. package/plugins/comments/comments.js +57 -46
  261. package/plugins/comments/comments.mjs +58 -46
  262. package/plugins/contextMenu/contextMenu.js +10 -6
  263. package/plugins/contextMenu/contextMenu.mjs +10 -6
  264. package/plugins/contextMenu/menu.js +222 -110
  265. package/plugins/contextMenu/menu.mjs +219 -111
  266. package/plugins/contextMenu/predefinedItems/columnLeft.js +12 -4
  267. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +11 -4
  268. package/plugins/contextMenu/predefinedItems/columnRight.js +9 -9
  269. package/plugins/contextMenu/predefinedItems/columnRight.mjs +9 -9
  270. package/plugins/contextMenu/utils.js +2 -2
  271. package/plugins/contextMenu/utils.mjs +2 -2
  272. package/plugins/copyPaste/copyPaste.js +31 -21
  273. package/plugins/copyPaste/copyPaste.mjs +30 -21
  274. package/plugins/customBorders/contextMenuItem/left.js +4 -3
  275. package/plugins/customBorders/contextMenuItem/left.mjs +4 -3
  276. package/plugins/customBorders/contextMenuItem/right.js +4 -3
  277. package/plugins/customBorders/contextMenuItem/right.mjs +4 -3
  278. package/plugins/customBorders/customBorders.js +144 -87
  279. package/plugins/customBorders/customBorders.mjs +143 -85
  280. package/plugins/customBorders/utils.js +131 -27
  281. package/plugins/customBorders/utils.mjs +115 -27
  282. package/plugins/dragToScroll/dragToScroll.js +10 -5
  283. package/plugins/dragToScroll/dragToScroll.mjs +10 -5
  284. package/plugins/dropdownMenu/dropdownMenu.js +9 -7
  285. package/plugins/dropdownMenu/dropdownMenu.mjs +9 -7
  286. package/plugins/exportFile/exportFile.js +2 -2
  287. package/plugins/exportFile/exportFile.mjs +2 -2
  288. package/plugins/exportFile/types/csv.js +2 -2
  289. package/plugins/exportFile/types/csv.mjs +2 -2
  290. package/plugins/filters/component/actionBar.js +2 -2
  291. package/plugins/filters/component/actionBar.mjs +2 -2
  292. package/plugins/filters/component/condition.js +3 -3
  293. package/plugins/filters/component/condition.mjs +3 -3
  294. package/plugins/filters/component/operators.js +2 -2
  295. package/plugins/filters/component/operators.mjs +2 -2
  296. package/plugins/filters/component/value.js +3 -3
  297. package/plugins/filters/component/value.mjs +3 -3
  298. package/plugins/filters/filters.js +11 -8
  299. package/plugins/filters/filters.mjs +11 -8
  300. package/plugins/filters/ui/input.js +3 -3
  301. package/plugins/filters/ui/input.mjs +3 -3
  302. package/plugins/filters/ui/link.js +3 -3
  303. package/plugins/filters/ui/link.mjs +3 -3
  304. package/plugins/filters/ui/multipleSelect.js +18 -31
  305. package/plugins/filters/ui/multipleSelect.mjs +18 -31
  306. package/plugins/filters/ui/radioInput.js +3 -3
  307. package/plugins/filters/ui/radioInput.mjs +3 -3
  308. package/plugins/filters/ui/select.js +4 -4
  309. package/plugins/filters/ui/select.mjs +4 -4
  310. package/plugins/formulas/formulas.js +14 -9
  311. package/plugins/formulas/formulas.mjs +14 -9
  312. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +2 -4
  313. package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +2 -4
  314. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +5 -5
  315. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +5 -5
  316. package/plugins/hiddenColumns/hiddenColumns.js +9 -4
  317. package/plugins/hiddenColumns/hiddenColumns.mjs +9 -4
  318. package/plugins/hiddenRows/contextMenuItem/hideRow.js +2 -4
  319. package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +2 -4
  320. package/plugins/hiddenRows/contextMenuItem/showRow.js +5 -5
  321. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +5 -5
  322. package/plugins/hiddenRows/hiddenRows.js +9 -4
  323. package/plugins/hiddenRows/hiddenRows.mjs +9 -4
  324. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  325. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  326. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  327. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  328. package/plugins/manualColumnFreeze/manualColumnFreeze.js +54 -15
  329. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +49 -15
  330. package/plugins/manualColumnMove/manualColumnMove.js +70 -70
  331. package/plugins/manualColumnMove/manualColumnMove.mjs +71 -71
  332. package/plugins/manualColumnMove/ui/_base.js +25 -12
  333. package/plugins/manualColumnMove/ui/_base.mjs +24 -12
  334. package/plugins/manualColumnMove/ui/backlight.js +3 -3
  335. package/plugins/manualColumnMove/ui/backlight.mjs +3 -3
  336. package/plugins/manualColumnMove/ui/guideline.js +3 -3
  337. package/plugins/manualColumnMove/ui/guideline.mjs +3 -3
  338. package/plugins/manualColumnResize/manualColumnResize.js +37 -21
  339. package/plugins/manualColumnResize/manualColumnResize.mjs +37 -21
  340. package/plugins/manualRowMove/manualRowMove.js +26 -34
  341. package/plugins/manualRowMove/manualRowMove.mjs +26 -34
  342. package/plugins/manualRowMove/ui/backlight.js +3 -3
  343. package/plugins/manualRowMove/ui/backlight.mjs +3 -3
  344. package/plugins/manualRowMove/ui/guideline.js +3 -3
  345. package/plugins/manualRowMove/ui/guideline.mjs +3 -3
  346. package/plugins/manualRowResize/manualRowResize.js +34 -19
  347. package/plugins/manualRowResize/manualRowResize.mjs +34 -19
  348. package/plugins/mergeCells/calculations/autofill.js +6 -5
  349. package/plugins/mergeCells/calculations/autofill.mjs +6 -4
  350. package/plugins/mergeCells/calculations/selection.js +9 -4
  351. package/plugins/mergeCells/calculations/selection.mjs +9 -4
  352. package/plugins/mergeCells/cellCoords.js +16 -4
  353. package/plugins/mergeCells/cellCoords.mjs +16 -3
  354. package/plugins/mergeCells/cellsCollection.js +30 -23
  355. package/plugins/mergeCells/cellsCollection.mjs +30 -22
  356. package/plugins/mergeCells/mergeCells.js +94 -61
  357. package/plugins/mergeCells/mergeCells.mjs +94 -59
  358. package/plugins/multiColumnSorting/multiColumnSorting.js +4 -6
  359. package/plugins/multiColumnSorting/multiColumnSorting.mjs +4 -5
  360. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +51 -57
  361. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +52 -57
  362. package/plugins/nestedHeaders/nestedHeaders.js +31 -20
  363. package/plugins/nestedHeaders/nestedHeaders.mjs +31 -20
  364. package/plugins/nestedHeaders/stateManager/utils.js +3 -4
  365. package/plugins/nestedHeaders/stateManager/utils.mjs +3 -4
  366. package/plugins/nestedHeaders/utils/ghostTable.js +114 -75
  367. package/plugins/nestedHeaders/utils/ghostTable.mjs +114 -74
  368. package/plugins/nestedRows/nestedRows.js +9 -4
  369. package/plugins/nestedRows/nestedRows.mjs +9 -4
  370. package/plugins/nestedRows/ui/collapsing.js +2 -2
  371. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  372. package/plugins/nestedRows/ui/contextMenu.js +2 -2
  373. package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
  374. package/plugins/nestedRows/ui/headers.js +2 -2
  375. package/plugins/nestedRows/ui/headers.mjs +2 -2
  376. package/plugins/nestedRows/utils/rowMoveController.js +2 -4
  377. package/plugins/nestedRows/utils/rowMoveController.mjs +2 -3
  378. package/plugins/persistentState/persistentState.js +9 -4
  379. package/plugins/persistentState/persistentState.mjs +9 -4
  380. package/plugins/search/search.js +9 -4
  381. package/plugins/search/search.mjs +9 -4
  382. package/plugins/touchScroll/touchScroll.js +27 -21
  383. package/plugins/touchScroll/touchScroll.mjs +27 -21
  384. package/plugins/trimRows/trimRows.js +9 -4
  385. package/plugins/trimRows/trimRows.mjs +9 -4
  386. package/plugins/undoRedo/undoRedo.js +53 -47
  387. package/plugins/undoRedo/undoRedo.mjs +53 -46
  388. package/renderers/autocompleteRenderer/autocompleteRenderer.js +1 -3
  389. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -2
  390. package/renderers/checkboxRenderer/checkboxRenderer.js +48 -43
  391. package/renderers/checkboxRenderer/checkboxRenderer.mjs +48 -41
  392. package/renderers/index.d.ts +4 -1
  393. package/renderers/index.js +6 -0
  394. package/renderers/index.mjs +3 -1
  395. package/renderers/numericRenderer/numericRenderer.js +1 -0
  396. package/renderers/numericRenderer/numericRenderer.mjs +1 -0
  397. package/renderers/timeRenderer/index.d.ts +1 -0
  398. package/renderers/timeRenderer/index.js +9 -0
  399. package/renderers/timeRenderer/index.mjs +1 -0
  400. package/renderers/timeRenderer/timeRenderer.d.ts +5 -0
  401. package/renderers/timeRenderer/timeRenderer.js +31 -0
  402. package/renderers/timeRenderer/timeRenderer.mjs +20 -0
  403. package/selection/highlight/visualSelection.js +94 -220
  404. package/selection/highlight/visualSelection.mjs +91 -213
  405. package/selection/mouseEventHandler.js +15 -10
  406. package/selection/mouseEventHandler.mjs +15 -9
  407. package/selection/range.js +4 -5
  408. package/selection/range.mjs +4 -5
  409. package/selection/selection.js +35 -22
  410. package/selection/selection.mjs +35 -20
  411. package/selection/transformation.js +4 -6
  412. package/selection/transformation.mjs +4 -5
  413. package/settings.d.ts +3 -1
  414. package/shortcuts/context.d.ts +20 -0
  415. package/shortcuts/context.js +296 -0
  416. package/shortcuts/context.mjs +268 -0
  417. package/shortcuts/index.d.ts +1 -0
  418. package/shortcuts/index.js +8 -0
  419. package/shortcuts/index.mjs +1 -0
  420. package/shortcuts/keyObserver.js +67 -0
  421. package/shortcuts/keyObserver.mjs +58 -0
  422. package/shortcuts/manager.d.ts +10 -0
  423. package/shortcuts/manager.js +185 -0
  424. package/shortcuts/manager.mjs +176 -0
  425. package/shortcuts/recorder.js +192 -0
  426. package/shortcuts/recorder.mjs +180 -0
  427. package/shortcuts/utils.js +77 -0
  428. package/shortcuts/utils.mjs +54 -0
  429. package/tableView.js +164 -84
  430. package/tableView.mjs +164 -74
  431. package/translations/changesObservable/observer.js +0 -1
  432. package/translations/changesObservable/observer.mjs +0 -1
  433. package/translations/indexMapper.d.ts +3 -1
  434. package/translations/indexMapper.js +89 -11
  435. package/translations/indexMapper.mjs +91 -20
  436. package/translations/mapCollections/aggregatedCollection.js +2 -2
  437. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  438. package/translations/maps/hidingMap.js +4 -2
  439. package/translations/maps/hidingMap.mjs +4 -2
  440. package/translations/maps/indexMap.js +2 -0
  441. package/translations/maps/indexMap.mjs +2 -0
  442. package/translations/maps/indexesSequence.js +5 -3
  443. package/translations/maps/indexesSequence.mjs +5 -3
  444. package/translations/maps/linkedPhysicalIndexToValueMap.js +5 -3
  445. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +5 -3
  446. package/translations/maps/physicalIndexToValueMap.js +5 -3
  447. package/translations/maps/physicalIndexToValueMap.mjs +5 -3
  448. package/translations/maps/trimmingMap.js +4 -2
  449. package/translations/maps/trimmingMap.mjs +4 -2
  450. package/utils/dataStructures/uniqueMap.js +14 -1
  451. package/utils/dataStructures/uniqueMap.mjs +14 -1
  452. package/utils/dataStructures/uniqueSet.js +9 -0
  453. package/utils/dataStructures/uniqueSet.mjs +9 -0
  454. package/utils/ghostTable.js +1 -1
  455. package/utils/ghostTable.mjs +1 -1
  456. package/3rdparty/walkontable/src/core.js +0 -309
  457. package/3rdparty/walkontable/src/core.mjs +0 -293
  458. package/3rdparty/walkontable/src/overlay/registerer.js +0 -70
  459. package/3rdparty/walkontable/src/overlay/registerer.mjs +0 -57
  460. package/utils/keyStateObserver.js +0 -121
  461. package/utils/keyStateObserver.mjs +0 -103
package/core.mjs CHANGED
@@ -8,6 +8,19 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
8
8
 
9
9
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
10
 
11
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12
+
13
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
+
15
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
+
17
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
+
19
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
+
21
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
22
+
23
+ import "core-js/modules/es.array.includes.js";
11
24
  import "core-js/modules/es.array.sort.js";
12
25
  import "core-js/modules/es.array.splice.js";
13
26
  import "core-js/modules/es.number.is-integer.js";
@@ -26,25 +39,13 @@ import "core-js/modules/es.object.to-string.js";
26
39
  import "core-js/modules/web.dom-collections.for-each.js";
27
40
  import "core-js/modules/web.timers.js";
28
41
  import "core-js/modules/web.immediate.js";
42
+ import "core-js/modules/es.array.iterator.js";
43
+ import "core-js/modules/es.map.js";
44
+ import "core-js/modules/web.dom-collections.iterator.js";
29
45
  import "core-js/modules/es.symbol.js";
30
46
  import "core-js/modules/es.symbol.description.js";
31
47
  import "core-js/modules/es.symbol.iterator.js";
32
- import "core-js/modules/es.array.iterator.js";
33
- import "core-js/modules/web.dom-collections.iterator.js";
34
48
  import "core-js/modules/es.function.name.js";
35
-
36
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
37
-
38
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
39
-
40
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
41
-
42
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
43
-
44
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
45
-
46
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
47
-
48
49
  import { addClass, empty, removeClass } from "./helpers/dom/element.mjs";
49
50
  import { isFunction } from "./helpers/function.mjs";
50
51
  import { isDefined, isUndefined, isRegExp, _injectProductInfo, isEmpty } from "./helpers/mixed.mjs";
@@ -64,14 +65,15 @@ import DataSource from "./dataSource.mjs";
64
65
  import { cellMethodLookupFactory, spreadsheetColumnLabel } from "./helpers/data.mjs";
65
66
  import { IndexMapper } from "./translations/index.mjs";
66
67
  import { registerAsRootInstance, hasValidParameter, isRootInstance } from "./utils/rootInstance.mjs";
67
- import { CellCoords, ViewportColumnsCalculator } from "./3rdparty/walkontable/src/index.mjs";
68
+ import { ViewportColumnsCalculator } from "./3rdparty/walkontable/src/index.mjs";
68
69
  import Hooks from "./pluginHooks.mjs";
69
70
  import { hasLanguageDictionary, getValidLanguageCode, getTranslatedPhrase } from "./i18n/registry.mjs";
70
71
  import { warnUserAboutLanguageRegistration, normalizeLanguageCode } from "./i18n/utils.mjs";
71
- import { startObserving as keyStateStartObserving, stopObserving as keyStateStopObserving } from "./utils/keyStateObserver.mjs";
72
72
  import { Selection } from "./selection/index.mjs";
73
- import { MetaManager, DynamicCellMetaMod, replaceData } from "./dataMap/index.mjs";
73
+ import { MetaManager, DynamicCellMetaMod, ExtendMetaPropertiesMod, replaceData } from "./dataMap/index.mjs";
74
74
  import { createUniqueMap } from "./utils/dataStructures/uniqueMap.mjs";
75
+ import { createShortcutManager } from "./shortcuts/index.mjs";
76
+ var SHORTCUTS_GROUP = 'gridDefault';
75
77
  var activeGuid = null;
76
78
  /* eslint-disable jsdoc/require-description-complete-sentence */
77
79
 
@@ -100,7 +102,8 @@ var activeGuid = null;
100
102
  */
101
103
 
102
104
  export default function Core(rootElement, userSettings) {
103
- var _this = this;
105
+ var _userSettings$layoutD,
106
+ _this = this;
104
107
 
105
108
  var rootInstanceSymbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
106
109
  var preventScrollingToCell = false;
@@ -111,11 +114,6 @@ export default function Core(rootElement, userSettings) {
111
114
  var grid;
112
115
  var editorManager;
113
116
  var firstRun = true;
114
- userSettings.language = getValidLanguageCode(userSettings.language);
115
- var metaManager = new MetaManager(instance, userSettings, [DynamicCellMetaMod]);
116
- var tableMeta = metaManager.getTableMeta();
117
- var globalMeta = metaManager.getGlobalMeta();
118
- var pluginsRegistry = createUniqueMap();
119
117
 
120
118
  if (hasValidParameter(rootInstanceSymbol)) {
121
119
  registerAsRootInstance(this);
@@ -178,7 +176,53 @@ export default function Core(rootElement, userSettings) {
178
176
  */
179
177
 
180
178
  this.executionSuspendedCounter = 0;
181
- keyStateStartObserving(this.rootDocument);
179
+ var layoutDirection = (_userSettings$layoutD = userSettings === null || userSettings === void 0 ? void 0 : userSettings.layoutDirection) !== null && _userSettings$layoutD !== void 0 ? _userSettings$layoutD : 'inherit';
180
+ var rootElementDirection = ['rtl', 'ltr'].includes(layoutDirection) ? layoutDirection : this.rootWindow.getComputedStyle(this.rootElement).direction;
181
+ this.rootElement.setAttribute('dir', rootElementDirection);
182
+ /**
183
+ * Checks if the grid is rendered using the right-to-left layout direction.
184
+ *
185
+ * @since 12.0.0
186
+ * @memberof Core#
187
+ * @function isRtl
188
+ * @returns {boolean} True if RTL.
189
+ */
190
+
191
+ this.isRtl = function () {
192
+ return rootElementDirection === 'rtl';
193
+ };
194
+ /**
195
+ * Checks if the grid is rendered using the left-to-right layout direction.
196
+ *
197
+ * @since 12.0.0
198
+ * @memberof Core#
199
+ * @function isLtr
200
+ * @returns {boolean} True if LTR.
201
+ */
202
+
203
+
204
+ this.isLtr = function () {
205
+ return !instance.isRtl();
206
+ };
207
+ /**
208
+ * Returns 1 for LTR; -1 for RTL. Useful for calculations.
209
+ *
210
+ * @since 12.0.0
211
+ * @memberof Core#
212
+ * @function getDirectionFactor
213
+ * @returns {number} Returns 1 for LTR; -1 for RTL.
214
+ */
215
+
216
+
217
+ this.getDirectionFactor = function () {
218
+ return instance.isLtr() ? 1 : -1;
219
+ };
220
+
221
+ userSettings.language = getValidLanguageCode(userSettings.language);
222
+ var metaManager = new MetaManager(instance, userSettings, [DynamicCellMetaMod, ExtendMetaPropertiesMod]);
223
+ var tableMeta = metaManager.getTableMeta();
224
+ var globalMeta = metaManager.getGlobalMeta();
225
+ var pluginsRegistry = createUniqueMap();
182
226
  this.container = this.rootDocument.createElement('div');
183
227
  this.renderCall = false;
184
228
  rootElement.insertBefore(this.container, rootElement.firstChild);
@@ -216,19 +260,25 @@ export default function Core(rootElement, userSettings) {
216
260
  var visualToRenderableCoords = function visualToRenderableCoords(coords) {
217
261
  var visualRow = coords.row,
218
262
  visualColumn = coords.col;
219
- return new CellCoords( // We just store indexes for rows and columns without headers.
263
+ return instance._createCellCoords( // We just store indexes for rows and columns without headers.
220
264
  visualRow >= 0 ? instance.rowIndexMapper.getRenderableFromVisualIndex(visualRow) : visualRow, visualColumn >= 0 ? instance.columnIndexMapper.getRenderableFromVisualIndex(visualColumn) : visualColumn);
221
265
  };
222
266
 
223
267
  var renderableToVisualCoords = function renderableToVisualCoords(coords) {
224
268
  var renderableRow = coords.row,
225
269
  renderableColumn = coords.col;
226
- return new CellCoords( // We just store indexes for rows and columns without headers.
270
+ return instance._createCellCoords( // We just store indexes for rows and columns without headers.
227
271
  renderableRow >= 0 ? instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow, renderableColumn >= 0 ? instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn // eslint-disable-line max-len
228
272
  );
229
273
  };
230
274
 
231
275
  var selection = new Selection(tableMeta, {
276
+ rowIndexMapper: function rowIndexMapper() {
277
+ return instance.rowIndexMapper;
278
+ },
279
+ columnIndexMapper: function columnIndexMapper() {
280
+ return instance.columnIndexMapper;
281
+ },
232
282
  countCols: function countCols() {
233
283
  return instance.countCols();
234
284
  },
@@ -247,6 +297,15 @@ export default function Core(rootElement, userSettings) {
247
297
  countRowsTranslated: function countRowsTranslated() {
248
298
  return _this.view.countRenderableRows();
249
299
  },
300
+ getShortcutManager: function getShortcutManager() {
301
+ return instance.getShortcutManager();
302
+ },
303
+ createCellCoords: function createCellCoords(row, column) {
304
+ return instance._createCellCoords(row, column);
305
+ },
306
+ createCellRange: function createCellRange(highlight, from, to) {
307
+ return instance._createCellRange(highlight, from, to);
308
+ },
250
309
  visualToRenderableCoords: visualToRenderableCoords,
251
310
  renderableToVisualCoords: renderableToVisualCoords,
252
311
  isDisabledCellSelection: function isDisabledCellSelection(visualRow, visualColumn) {
@@ -275,11 +334,11 @@ export default function Core(rootElement, userSettings) {
275
334
  _this.runHooks('beforeSetRangeEnd', cellCoords);
276
335
 
277
336
  if (cellCoords.row < 0) {
278
- cellCoords.row = _this.view.wt.wtTable.getFirstVisibleRow();
337
+ cellCoords.row = _this.view._wt.wtTable.getFirstVisibleRow();
279
338
  }
280
339
 
281
340
  if (cellCoords.col < 0) {
282
- cellCoords.col = _this.view.wt.wtTable.getFirstVisibleColumn();
341
+ cellCoords.col = _this.view._wt.wtTable.getFirstVisibleColumn();
283
342
  }
284
343
  });
285
344
  this.selection.addLocalHook('afterSetRangeEnd', function (cellCoords) {
@@ -493,8 +552,8 @@ export default function Core(rootElement, userSettings) {
493
552
 
494
553
  selection.getSelectedRange().pop(); // I can't use transforms as they don't work in negative indexes.
495
554
 
496
- selection.setRangeStartOnly(new CellCoords(currentFromRow + delta, currentFromColumn), true);
497
- selection.setRangeEnd(new CellCoords(currentToRow + delta, currentToColumn)); // will call render() internally
555
+ selection.setRangeStartOnly(instance._createCellCoords(currentFromRow + delta, currentFromColumn), true);
556
+ selection.setRangeEnd(instance._createCellCoords(currentToRow + delta, currentToColumn)); // will call render() internally
498
557
  } else {
499
558
  instance._refreshBorders(); // it will call render and prepare methods
500
559
 
@@ -538,8 +597,8 @@ export default function Core(rootElement, userSettings) {
538
597
 
539
598
  selection.getSelectedRange().pop(); // I can't use transforms as they don't work in negative indexes.
540
599
 
541
- selection.setRangeStartOnly(new CellCoords(_currentFromRow, _currentFromColumn + delta), true);
542
- selection.setRangeEnd(new CellCoords(_currentToRow, _currentToColumn + delta)); // will call render() internally
600
+ selection.setRangeStartOnly(instance._createCellCoords(_currentFromRow, _currentFromColumn + delta), true);
601
+ selection.setRangeEnd(instance._createCellCoords(_currentToRow, _currentToColumn + delta)); // will call render() internally
543
602
  } else {
544
603
  instance._refreshBorders(); // it will call render and prepare methods
545
604
 
@@ -631,10 +690,10 @@ export default function Core(rootElement, userSettings) {
631
690
  }
632
691
 
633
692
  metaManager.removeColumn(physicalColumnIndex, groupAmount);
634
- var fixedColumnsLeft = tableMeta.fixedColumnsLeft;
693
+ var fixedColumnsStart = tableMeta.fixedColumnsStart;
635
694
 
636
- if (fixedColumnsLeft >= calcIndex + 1) {
637
- tableMeta.fixedColumnsLeft -= Math.min(groupAmount, fixedColumnsLeft - calcIndex);
695
+ if (fixedColumnsStart >= calcIndex + 1) {
696
+ tableMeta.fixedColumnsStart -= Math.min(groupAmount, fixedColumnsStart - calcIndex);
638
697
  }
639
698
 
640
699
  if (Array.isArray(tableMeta.colHeaders)) {
@@ -1342,6 +1401,38 @@ export default function Core(rootElement, userSettings) {
1342
1401
  activeEditor.refreshValue();
1343
1402
  }
1344
1403
  }
1404
+ /**
1405
+ * Creates and returns the CellCoords object.
1406
+ *
1407
+ * @private
1408
+ * @memberof Core#
1409
+ * @function _createCellCoords
1410
+ * @param {number} row The row index.
1411
+ * @param {number} column The column index.
1412
+ * @returns {CellCoords}
1413
+ */
1414
+
1415
+
1416
+ this._createCellCoords = function (row, column) {
1417
+ return instance.view._wt.createCellCoords(row, column);
1418
+ };
1419
+ /**
1420
+ * Creates and returns the CellRange object.
1421
+ *
1422
+ * @private
1423
+ * @memberof Core#
1424
+ * @function _createCellRange
1425
+ * @param {CellCoords} highlight Defines the border around a cell where selection was started and to edit the cell
1426
+ * when you press Enter. The highlight cannot point to headers (negative values).
1427
+ * @param {CellCoords} from Initial coordinates.
1428
+ * @param {CellCoords} to Final coordinates.
1429
+ * @returns {CellRange}
1430
+ */
1431
+
1432
+
1433
+ this._createCellRange = function (highlight, from, to) {
1434
+ return instance.view._wt.createCellRange(highlight, from, to);
1435
+ };
1345
1436
  /**
1346
1437
  * Validate a single cell.
1347
1438
  *
@@ -1380,7 +1471,8 @@ export default function Core(rootElement, userSettings) {
1380
1471
  if (td && td.nodeName !== 'TH') {
1381
1472
  var renderableRow = instance.rowIndexMapper.getRenderableFromVisualIndex(row);
1382
1473
  var renderableColumn = instance.columnIndexMapper.getRenderableFromVisualIndex(col);
1383
- instance.view.wt.wtSettings.settings.cellRenderer(renderableRow, renderableColumn, td);
1474
+
1475
+ instance.view._wt.getSetting('cellRenderer', renderableRow, renderableColumn, td);
1384
1476
  }
1385
1477
 
1386
1478
  callback(valid);
@@ -1605,8 +1697,8 @@ export default function Core(rootElement, userSettings) {
1605
1697
  throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly
1606
1698
  }
1607
1699
 
1608
- var c = typeof endRow === 'number' ? new CellCoords(endRow, endCol) : null;
1609
- return grid.populateFromArray(new CellCoords(row, column), input, c, source, method, direction, deltas);
1700
+ var c = typeof endRow === 'number' ? instance._createCellCoords(endRow, endCol) : null;
1701
+ return grid.populateFromArray(instance._createCellCoords(row, column), input, c, source, method, direction, deltas);
1610
1702
  };
1611
1703
  /**
1612
1704
  * Adds/removes data from the column. This method works the same as Array.splice for arrays.
@@ -1755,10 +1847,10 @@ export default function Core(rootElement, userSettings) {
1755
1847
 
1756
1848
  var changes = [];
1757
1849
  arrayEach(selection.getSelectedRange(), function (cellRange) {
1758
- var topLeft = cellRange.getTopLeftCorner();
1759
- var bottomRight = cellRange.getBottomRightCorner();
1760
- rangeEach(topLeft.row, bottomRight.row, function (row) {
1761
- rangeEach(topLeft.col, bottomRight.col, function (column) {
1850
+ var topStart = cellRange.getTopStartCorner();
1851
+ var bottomEnd = cellRange.getBottomEndCorner();
1852
+ rangeEach(topStart.row, bottomEnd.row, function (row) {
1853
+ rangeEach(topStart.col, bottomEnd.col, function (column) {
1762
1854
  if (!_this2.getCellMeta(row, column).readOnly) {
1763
1855
  changes.push([row, column, null]);
1764
1856
  }
@@ -2116,7 +2208,7 @@ export default function Core(rootElement, userSettings) {
2116
2208
  return;
2117
2209
  }
2118
2210
 
2119
- if (isSizeChanged || instance.view.wt.wtOverlays.scrollableElement === instance.rootWindow) {
2211
+ if (isSizeChanged || instance.view._wt.wtOverlays.scrollableElement === instance.rootWindow) {
2120
2212
  instance.view.setLastSize(width, height);
2121
2213
  instance.render();
2122
2214
  }
@@ -2140,8 +2232,8 @@ export default function Core(rootElement, userSettings) {
2140
2232
  * To replace Handsontable's [`data`](@/api/options.md#data) and reset states, use the [`loadData()`](#loaddata) method.
2141
2233
  *
2142
2234
  * Read more:
2143
- * - [Binding to data &#8594;](@/guides/getting-started/binding-to-data.md)
2144
- * - [Saving data &#8594;](@/guides/getting-started/saving-data.md)
2235
+ * - [Binding to data](@/guides/getting-started/binding-to-data.md)
2236
+ * - [Saving data](@/guides/getting-started/saving-data.md)
2145
2237
  *
2146
2238
  * @memberof Core#
2147
2239
  * @function updateData
@@ -2184,8 +2276,8 @@ export default function Core(rootElement, userSettings) {
2184
2276
  * To replace Handsontable's [`data`](@/api/options.md#data) without resetting states, use the [`updateData()`](#updatedata) method.
2185
2277
  *
2186
2278
  * Read more:
2187
- * - [Binding to data &#8594;](@/guides/getting-started/binding-to-data.md)
2188
- * - [Saving data &#8594;](@/guides/getting-started/saving-data.md)
2279
+ * - [Binding to data](@/guides/getting-started/binding-to-data.md)
2280
+ * - [Saving data](@/guides/getting-started/saving-data.md)
2189
2281
  *
2190
2282
  * @memberof Core#
2191
2283
  * @function loadData
@@ -2299,7 +2391,7 @@ export default function Core(rootElement, userSettings) {
2299
2391
  return datamap.getAll();
2300
2392
  }
2301
2393
 
2302
- return datamap.getRange(new CellCoords(row, column), new CellCoords(row2, column2), datamap.DESTINATION_RENDERER);
2394
+ return datamap.getRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2), datamap.DESTINATION_RENDERER);
2303
2395
  };
2304
2396
  /**
2305
2397
  * Returns a string value of the selected range. Each column is separated by tab, each row is separated by a new
@@ -2316,7 +2408,7 @@ export default function Core(rootElement, userSettings) {
2316
2408
 
2317
2409
 
2318
2410
  this.getCopyableText = function (startRow, startCol, endRow, endCol) {
2319
- return datamap.getCopyableText(new CellCoords(startRow, startCol), new CellCoords(endRow, endCol));
2411
+ return datamap.getCopyableText(instance._createCellCoords(startRow, startCol), instance._createCellCoords(endRow, endCol));
2320
2412
  };
2321
2413
  /**
2322
2414
  * Returns the data's copyable value at specified `row` and `column` index.
@@ -2346,7 +2438,7 @@ export default function Core(rootElement, userSettings) {
2346
2438
  return datamap.getSchema();
2347
2439
  };
2348
2440
  /**
2349
- * Use it if you need to change configuration after initialization. The `settings` argument is an object containing the new
2441
+ * Use it if you need to change configuration after initialization. The `settings` argument is an object containing the changed
2350
2442
  * settings, declared the same way as in the initial settings object.
2351
2443
  *
2352
2444
  * __Note__, that although the `updateSettings` method doesn't overwrite the previously declared settings, it might reset
@@ -2355,9 +2447,12 @@ export default function Core(rootElement, userSettings) {
2355
2447
  * Since 8.0.0 passing `columns` or `data` inside `settings` objects will result in resetting states corresponding to rows and columns
2356
2448
  * (for example, row/column sequence, column width, row height, frozen columns etc.).
2357
2449
  *
2450
+ * Since 12.0.0 passing `data` inside `settings` objects no longer results in resetting states corresponding to rows and columns
2451
+ * (for example, row/column sequence, column width, row height, frozen columns etc.).
2452
+ *
2358
2453
  * @memberof Core#
2359
2454
  * @function updateSettings
2360
- * @param {object} settings New settings object (see {@link Options}).
2455
+ * @param {object} settings A settings object (see {@link Options}). Only provide the settings that are changed, not the whole settings object that was used for initialization.
2361
2456
  * @param {boolean} [init=false] Internally used for in initialization mode.
2362
2457
  * @example
2363
2458
  * ```js
@@ -2374,12 +2469,7 @@ export default function Core(rootElement, userSettings) {
2374
2469
 
2375
2470
  this.updateSettings = function (settings) {
2376
2471
  var init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2377
- // TODO: uncomment the next line with the next major version update
2378
- // Do not forget to re-enable the pending tests that cover the change:
2379
- // * https://github.com/handsontable/handsontable/blob/9f62c282a1c951b27cd8406aa27105bd32b05bb6/handsontable/test/e2e/core/toPhysicalColumn.spec.js#L70
2380
- // * https://github.com/handsontable/handsontable/blob/9f62c282a1c951b27cd8406aa27105bd32b05bb6/handsontable/test/e2e/core/toVisualColumn.spec.js#L70
2381
- // const dataUpdateFunction = (firstRun ? instance.loadData : instance.updateData).bind(this);
2382
- var dataUpdateFunction = instance.loadData.bind(this);
2472
+ var dataUpdateFunction = (firstRun ? instance.loadData : instance.updateData).bind(this);
2383
2473
  var columnsAsFunc = false;
2384
2474
  var i;
2385
2475
  var j;
@@ -2398,19 +2488,15 @@ export default function Core(rootElement, userSettings) {
2398
2488
 
2399
2489
 
2400
2490
  for (i in settings) {
2401
- if (i === 'data') {
2402
- /* eslint-disable-next-line no-continue */
2403
- continue; // loadData will be triggered later
2491
+ if (i === 'data') {// Do nothing. loadData will be triggered later
2404
2492
  } else if (i === 'language') {
2405
2493
  setLanguage(settings.language);
2406
- /* eslint-disable-next-line no-continue */
2407
-
2408
- continue;
2409
2494
  } else if (i === 'className') {
2410
2495
  setClassName('className', settings.className);
2411
2496
  } else if (i === 'tableClassName' && instance.table) {
2412
2497
  setClassName('tableClassName', settings.tableClassName);
2413
- instance.view.wt.wtOverlays.syncOverlayTableClassNames();
2498
+
2499
+ instance.view._wt.wtOverlays.syncOverlayTableClassNames();
2414
2500
  } else if (Hooks.getSingleton().isRegistered(i) || Hooks.getSingleton().isDeprecated(i)) {
2415
2501
  if (isFunction(settings[i]) || Array.isArray(settings[i])) {
2416
2502
  settings[i].initialHook = true;
@@ -2513,8 +2599,9 @@ export default function Core(rootElement, userSettings) {
2513
2599
 
2514
2600
  if (!init) {
2515
2601
  if (instance.view) {
2516
- instance.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked();
2517
- instance.view.wt.exportSettingsAsClassNames();
2602
+ instance.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked();
2603
+
2604
+ instance.view._wt.exportSettingsAsClassNames();
2518
2605
  }
2519
2606
 
2520
2607
  instance.runHooks('afterUpdateSettings', settings);
@@ -2529,12 +2616,13 @@ export default function Core(rootElement, userSettings) {
2529
2616
 
2530
2617
  instance._refreshBorders(null);
2531
2618
 
2532
- instance.view.wt.wtOverlays.adjustElementsSize();
2619
+ instance.view._wt.wtOverlays.adjustElementsSize();
2620
+
2533
2621
  editorManager.unlockEditor();
2534
2622
  }
2535
2623
 
2536
2624
  if (!init && instance.view && (currentHeight === '' || height === '' || height === void 0) && currentHeight !== height) {
2537
- instance.view.wt.wtOverlays.updateMainScrollableElements();
2625
+ instance.view._wt.wtOverlays.updateMainScrollableElements();
2538
2626
  }
2539
2627
  };
2540
2628
  /**
@@ -2564,7 +2652,7 @@ export default function Core(rootElement, userSettings) {
2564
2652
  *
2565
2653
  * @memberof Core#
2566
2654
  * @function getSettings
2567
- * @returns {object} Object containing the current table settings.
2655
+ * @returns {TableMeta} Object containing the current table settings.
2568
2656
  */
2569
2657
 
2570
2658
 
@@ -2658,7 +2746,7 @@ export default function Core(rootElement, userSettings) {
2658
2746
  return null;
2659
2747
  }
2660
2748
 
2661
- return instance.view.getCellAtCoords(new CellCoords(renderableRowIndex, renderableColumnIndex), topmost);
2749
+ return instance.view.getCellAtCoords(instance._createCellCoords(renderableRowIndex, renderableColumnIndex), topmost);
2662
2750
  };
2663
2751
  /**
2664
2752
  * Returns the coordinates of the cell, provided as a HTML table cell element.
@@ -2676,7 +2764,7 @@ export default function Core(rootElement, userSettings) {
2676
2764
 
2677
2765
 
2678
2766
  this.getCoords = function (element) {
2679
- var renderableCoords = this.view.wt.wtTable.getCoords(element);
2767
+ var renderableCoords = this.view._wt.wtTable.getCoords(element);
2680
2768
 
2681
2769
  if (renderableCoords === null) {
2682
2770
  return null;
@@ -2695,7 +2783,7 @@ export default function Core(rootElement, userSettings) {
2695
2783
  visualColumn = this.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn);
2696
2784
  }
2697
2785
 
2698
- return new CellCoords(visualRow, visualColumn);
2786
+ return instance._createCellCoords(visualRow, visualColumn);
2699
2787
  };
2700
2788
  /**
2701
2789
  * Returns the property name that corresponds with the given column index.
@@ -2837,7 +2925,7 @@ export default function Core(rootElement, userSettings) {
2837
2925
  this.getDataAtCol = function (column) {
2838
2926
  var _ref13;
2839
2927
 
2840
- return (_ref13 = []).concat.apply(_ref13, _toConsumableArray(datamap.getRange(new CellCoords(0, column), new CellCoords(tableMeta.data.length - 1, column), datamap.DESTINATION_RENDERER)));
2928
+ return (_ref13 = []).concat.apply(_ref13, _toConsumableArray(datamap.getRange(instance._createCellCoords(0, column), instance._createCellCoords(tableMeta.data.length - 1, column), datamap.DESTINATION_RENDERER)));
2841
2929
  };
2842
2930
  /**
2843
2931
  * Given the object property name (e.g. `'first.name'` or `'0'`), returns an array of column's values from the table data.
@@ -2854,7 +2942,7 @@ export default function Core(rootElement, userSettings) {
2854
2942
  this.getDataAtProp = function (prop) {
2855
2943
  var _ref14;
2856
2944
 
2857
- var range = datamap.getRange(new CellCoords(0, datamap.propToCol(prop)), new CellCoords(tableMeta.data.length - 1, datamap.propToCol(prop)), datamap.DESTINATION_RENDERER);
2945
+ var range = datamap.getRange(instance._createCellCoords(0, datamap.propToCol(prop)), instance._createCellCoords(tableMeta.data.length - 1, datamap.propToCol(prop)), datamap.DESTINATION_RENDERER);
2858
2946
  return (_ref14 = []).concat.apply(_ref14, _toConsumableArray(range));
2859
2947
  };
2860
2948
  /**
@@ -2881,7 +2969,7 @@ export default function Core(rootElement, userSettings) {
2881
2969
  if (row === void 0) {
2882
2970
  data = dataSource.getData();
2883
2971
  } else {
2884
- data = dataSource.getByRange(new CellCoords(row, column), new CellCoords(row2, column2));
2972
+ data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2));
2885
2973
  }
2886
2974
 
2887
2975
  return data;
@@ -2910,7 +2998,7 @@ export default function Core(rootElement, userSettings) {
2910
2998
  if (row === void 0) {
2911
2999
  data = dataSource.getData(true);
2912
3000
  } else {
2913
- data = dataSource.getByRange(new CellCoords(row, column), new CellCoords(row2, column2), true);
3001
+ data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2), true);
2914
3002
  }
2915
3003
 
2916
3004
  return data;
@@ -3027,7 +3115,7 @@ export default function Core(rootElement, userSettings) {
3027
3115
 
3028
3116
 
3029
3117
  this.getDataAtRow = function (row) {
3030
- var data = datamap.getRange(new CellCoords(row, 0), new CellCoords(row, this.countCols() - 1), datamap.DESTINATION_RENDERER);
3118
+ var data = datamap.getRange(instance._createCellCoords(row, 0), instance._createCellCoords(row, this.countCols() - 1), datamap.DESTINATION_RENDERER);
3031
3119
  return data[0] || [];
3032
3120
  };
3033
3121
  /**
@@ -3790,7 +3878,8 @@ export default function Core(rootElement, userSettings) {
3790
3878
  return Math.min(maxCols, dataLen);
3791
3879
  };
3792
3880
  /**
3793
- * Returns the number of rendered rows (including rows partially or fully rendered outside viewport).
3881
+ * Returns the number of rendered rows including rows that are partially or fully rendered
3882
+ * outside the table viewport.
3794
3883
  *
3795
3884
  * @memberof Core#
3796
3885
  * @function countRenderedRows
@@ -3799,10 +3888,11 @@ export default function Core(rootElement, userSettings) {
3799
3888
 
3800
3889
 
3801
3890
  this.countRenderedRows = function () {
3802
- return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedRowsCount() : -1;
3891
+ return instance.view._wt.drawn ? instance.view._wt.wtTable.getRenderedRowsCount() : -1;
3803
3892
  };
3804
3893
  /**
3805
- * Returns the number of visible rows (rendered rows that fully fit inside viewport).
3894
+ * Returns the number of rendered rows that are only visible in the table viewport.
3895
+ * The rows that are partially visible are not counted.
3806
3896
  *
3807
3897
  * @memberof Core#
3808
3898
  * @function countVisibleRows
@@ -3811,10 +3901,11 @@ export default function Core(rootElement, userSettings) {
3811
3901
 
3812
3902
 
3813
3903
  this.countVisibleRows = function () {
3814
- return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleRowsCount() : -1;
3904
+ return instance.view._wt.drawn ? instance.view._wt.wtTable.getVisibleRowsCount() : -1;
3815
3905
  };
3816
3906
  /**
3817
- * Returns the number of rendered columns (including columns partially or fully rendered outside viewport).
3907
+ * Returns the number of rendered rows including columns that are partially or fully rendered
3908
+ * outside the table viewport.
3818
3909
  *
3819
3910
  * @memberof Core#
3820
3911
  * @function countRenderedCols
@@ -3823,10 +3914,11 @@ export default function Core(rootElement, userSettings) {
3823
3914
 
3824
3915
 
3825
3916
  this.countRenderedCols = function () {
3826
- return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedColumnsCount() : -1;
3917
+ return instance.view._wt.drawn ? instance.view._wt.wtTable.getRenderedColumnsCount() : -1;
3827
3918
  };
3828
3919
  /**
3829
- * Returns the number of visible columns. Returns -1 if table is not visible.
3920
+ * Returns the number of rendered columns that are only visible in the table viewport.
3921
+ * The columns that are partially visible are not counted.
3830
3922
  *
3831
3923
  * @memberof Core#
3832
3924
  * @function countVisibleCols
@@ -3835,7 +3927,7 @@ export default function Core(rootElement, userSettings) {
3835
3927
 
3836
3928
 
3837
3929
  this.countVisibleCols = function () {
3838
- return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleColumnsCount() : -1;
3930
+ return instance.view._wt.drawn ? instance.view._wt.wtTable.getVisibleColumnsCount() : -1;
3839
3931
  };
3840
3932
  /**
3841
3933
  * Returns the number of empty rows. If the optional ending parameter is `true`, returns the
@@ -4097,7 +4189,7 @@ export default function Core(rootElement, userSettings) {
4097
4189
 
4098
4190
  var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
4099
4191
  // Looking for a visual index on the right and then (when not found) on the left.
4100
- return indexMapper.getFirstNotHiddenIndex(visualIndex, 1, true);
4192
+ return indexMapper.getNearestNotHiddenIndex(visualIndex, 1, true);
4101
4193
  };
4102
4194
  /**
4103
4195
  * Scroll viewport to coordinates specified by the `row` and `column` arguments.
@@ -4108,8 +4200,10 @@ export default function Core(rootElement, userSettings) {
4108
4200
  * we are using the index for numbering only this rows which may be rendered (we don't consider hidden rows).
4109
4201
  * @param {number} [column] Column index. If the last argument isn't defined we treat the index as a visual column index.
4110
4202
  * Otherwise, we are using the index for numbering only this columns which may be rendered (we don't consider hidden columns).
4111
- * @param {boolean} [snapToBottom=false] If `true`, viewport is scrolled to show the cell on the bottom of the table.
4112
- * @param {boolean} [snapToRight=false] If `true`, viewport is scrolled to show the cell on the right side of the table.
4203
+ * @param {boolean} [snapToBottom=false] If `true`, the viewport is scrolled to show the cell at the bottom of the table.
4204
+ * However, if the cell's height is greater than the table's viewport height, the cell is snapped to the top edge.
4205
+ * @param {boolean} [snapToRight=false] If `true`, the viewport is scrolled to show the cell at the right side of the table.
4206
+ * However, if the cell is wider than the table's viewport width, the cell is snapped to the left edge (or to the right edge, if the layout direction is set to `rtl`).
4113
4207
  * @param {boolean} [considerHiddenIndexes=true] If `true`, we handle visual indexes, otherwise we handle only indexes which
4114
4208
  * may be rendered when they are in the viewport (we don't consider hidden indexes as they aren't rendered).
4115
4209
  * @returns {boolean} `true` if scroll was successful, `false` otherwise.
@@ -4145,7 +4239,7 @@ export default function Core(rootElement, userSettings) {
4145
4239
  var isColumnInteger = Number.isInteger(renderableColumn);
4146
4240
 
4147
4241
  if (isRowInteger && isColumnInteger) {
4148
- return instance.view.scrollViewport(new CellCoords(renderableRow, renderableColumn), snapToTop, snapToRight, snapToBottom, snapToLeft);
4242
+ return instance.view.scrollViewport(instance._createCellCoords(renderableRow, renderableColumn), snapToTop, snapToRight, snapToBottom, snapToLeft);
4149
4243
  }
4150
4244
 
4151
4245
  if (isRowInteger && isColumnInteger === false) {
@@ -4182,8 +4276,8 @@ export default function Core(rootElement, userSettings) {
4182
4276
  }
4183
4277
 
4184
4278
  dataSource = null;
4279
+ this.getShortcutManager().destroy();
4185
4280
  metaManager.clearCache();
4186
- keyStateStopObserving();
4187
4281
 
4188
4282
  if (isRootInstance(instance)) {
4189
4283
  var licenseInfo = this.rootDocument.querySelector('#hot-display-license-info');
@@ -4351,7 +4445,7 @@ export default function Core(rootElement, userSettings) {
4351
4445
 
4352
4446
 
4353
4447
  this.hasHook = function (key) {
4354
- return Hooks.getSingleton().has(key, instance);
4448
+ return Hooks.getSingleton().has(key, instance) || Hooks.getSingleton().has(key);
4355
4449
  };
4356
4450
  /**
4357
4451
  * Adds listener to specified hook name (only for this Handsontable instance). After the listener is triggered,
@@ -4579,6 +4673,337 @@ export default function Core(rootElement, userSettings) {
4579
4673
  return instance.isLtr() ? 1 : -1;
4580
4674
  };
4581
4675
 
4676
+ var shortcutManager = createShortcutManager({
4677
+ handleEvent: function handleEvent(event) {
4678
+ var isListening = instance.isListening();
4679
+ var isKeyboardEventWithKey = (event === null || event === void 0 ? void 0 : event.key) !== void 0;
4680
+ return isListening && isKeyboardEventWithKey;
4681
+ },
4682
+ beforeKeyDown: function beforeKeyDown(event) {
4683
+ return _this.runHooks('beforeKeyDown', event);
4684
+ },
4685
+ afterKeyDown: function afterKeyDown(event) {
4686
+ if (_this.isDestroyed) {
4687
+ // Handsontable could be destroyed after performing action (executing a callback).
4688
+ return;
4689
+ }
4690
+
4691
+ instance.runHooks('afterDocumentKeyDown', event);
4692
+ },
4693
+ ownerWindow: this.rootWindow
4694
+ });
4695
+ /**
4696
+ * Returns instance of a manager responsible for handling shortcuts stored in some contexts. It run actions after
4697
+ * pressing key combination in active Handsontable instance.
4698
+ *
4699
+ * @memberof Core#
4700
+ * @since 12.0.0
4701
+ * @function getShortcutManager
4702
+ * @returns {ShortcutManager} Instance of {@link ShortcutManager}
4703
+ */
4704
+
4705
+ this.getShortcutManager = function () {
4706
+ return shortcutManager;
4707
+ };
4708
+
4709
+ var gridContext = shortcutManager.addContext('grid');
4710
+ var gridConfig = {
4711
+ runOnlyIf: function runOnlyIf() {
4712
+ return isDefined(instance.getSelected()) && instance.countRenderedRows() > 0 && instance.countRenderedCols() > 0;
4713
+ },
4714
+ group: SHORTCUTS_GROUP
4715
+ };
4716
+ shortcutManager.setActiveContextName('grid');
4717
+ gridContext.addShortcuts([{
4718
+ keys: [['Control/Meta', 'A']],
4719
+ callback: function callback() {
4720
+ instance.selectAll();
4721
+ }
4722
+ }, {
4723
+ keys: [['Control/Meta', 'Enter']],
4724
+ callback: function callback() {
4725
+ var selectedRange = instance.getSelectedRange();
4726
+ var _selectedRange$highli = selectedRange[selectedRange.length - 1].highlight,
4727
+ highlightRow = _selectedRange$highli.row,
4728
+ highlightColumn = _selectedRange$highli.col;
4729
+ var valueToPopulate = instance.getDataAtCell(highlightRow, highlightColumn);
4730
+ var cellValues = new Map();
4731
+
4732
+ for (var i = 0; i < selectedRange.length; i++) {
4733
+ selectedRange[i].forAll(function (row, column) {
4734
+ if (row >= 0 && column >= 0 && (row !== highlightRow || column !== highlightColumn)) {
4735
+ var _instance$getCellMeta = instance.getCellMeta(row, column),
4736
+ readOnly = _instance$getCellMeta.readOnly;
4737
+
4738
+ if (!readOnly) {
4739
+ cellValues.set("".concat(row, "x").concat(column), [row, column, valueToPopulate]);
4740
+ }
4741
+ }
4742
+ });
4743
+ }
4744
+
4745
+ instance.setDataAtCell(Array.from(cellValues.values()));
4746
+ },
4747
+ runOnlyIf: function runOnlyIf() {
4748
+ return instance.getSelectedRangeLast().getCellsCount() > 1;
4749
+ }
4750
+ }, {
4751
+ keys: [['ArrowUp']],
4752
+ callback: function callback() {
4753
+ selection.transformStart(-1, 0);
4754
+ }
4755
+ }, {
4756
+ keys: [['ArrowUp', 'Control/Meta']],
4757
+ captureCtrl: true,
4758
+ callback: function callback() {
4759
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
4760
+ }
4761
+ }, {
4762
+ keys: [['ArrowUp', 'Shift']],
4763
+ callback: function callback() {
4764
+ selection.transformEnd(-1, 0);
4765
+ }
4766
+ }, {
4767
+ keys: [['ArrowUp', 'Shift', 'Control/Meta']],
4768
+ captureCtrl: true,
4769
+ callback: function callback() {
4770
+ var _instance$getSelected = instance.getSelectedRangeLast(),
4771
+ from = _instance$getSelected.from,
4772
+ to = _instance$getSelected.to;
4773
+
4774
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
4775
+ selection.setRangeStart(from.clone());
4776
+ selection.setRangeEnd(instance._createCellCoords(row, to.col));
4777
+ },
4778
+ runOnlyIf: function runOnlyIf() {
4779
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByColumnHeader());
4780
+ }
4781
+ }, {
4782
+ keys: [['ArrowDown']],
4783
+ callback: function callback() {
4784
+ selection.transformStart(1, 0);
4785
+ }
4786
+ }, {
4787
+ keys: [['ArrowDown', 'Control/Meta']],
4788
+ captureCtrl: true,
4789
+ callback: function callback() {
4790
+ selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
4791
+ }
4792
+ }, {
4793
+ keys: [['ArrowDown', 'Shift']],
4794
+ callback: function callback() {
4795
+ selection.transformEnd(1, 0);
4796
+ }
4797
+ }, {
4798
+ keys: [['ArrowDown', 'Shift', 'Control/Meta']],
4799
+ captureCtrl: true,
4800
+ callback: function callback() {
4801
+ var _instance$getSelected2 = instance.getSelectedRangeLast(),
4802
+ from = _instance$getSelected2.from,
4803
+ to = _instance$getSelected2.to;
4804
+
4805
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
4806
+ selection.setRangeStart(from.clone());
4807
+ selection.setRangeEnd(instance._createCellCoords(row, to.col));
4808
+ },
4809
+ runOnlyIf: function runOnlyIf() {
4810
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByColumnHeader());
4811
+ }
4812
+ }, {
4813
+ keys: [['ArrowLeft']],
4814
+ callback: function callback() {
4815
+ selection.transformStart(0, -1 * instance.getDirectionFactor());
4816
+ }
4817
+ }, {
4818
+ keys: [['ArrowLeft', 'Control/Meta']],
4819
+ captureCtrl: true,
4820
+ callback: function callback() {
4821
+ var _instance$columnIndex;
4822
+
4823
+ var row = instance.getSelectedRangeLast().highlight.row;
4824
+
4825
+ var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4826
+
4827
+ selection.setRangeStart(instance._createCellCoords(row, column));
4828
+ }
4829
+ }, {
4830
+ keys: [['ArrowLeft', 'Shift']],
4831
+ callback: function callback() {
4832
+ selection.transformEnd(0, -1 * instance.getDirectionFactor());
4833
+ }
4834
+ }, {
4835
+ keys: [['ArrowLeft', 'Shift', 'Control/Meta']],
4836
+ captureCtrl: true,
4837
+ callback: function callback() {
4838
+ var _instance$columnIndex2;
4839
+
4840
+ var _instance$getSelected3 = instance.getSelectedRangeLast(),
4841
+ from = _instance$getSelected3.from,
4842
+ to = _instance$getSelected3.to;
4843
+
4844
+ var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
4845
+
4846
+ selection.setRangeStart(from.clone());
4847
+ selection.setRangeEnd(instance._createCellCoords(to.row, column));
4848
+ },
4849
+ runOnlyIf: function runOnlyIf() {
4850
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByRowHeader());
4851
+ }
4852
+ }, {
4853
+ keys: [['ArrowRight']],
4854
+ callback: function callback() {
4855
+ selection.transformStart(0, instance.getDirectionFactor());
4856
+ }
4857
+ }, {
4858
+ keys: [['ArrowRight', 'Control/Meta']],
4859
+ captureCtrl: true,
4860
+ callback: function callback() {
4861
+ var _instance$columnIndex3;
4862
+
4863
+ var row = instance.getSelectedRangeLast().highlight.row;
4864
+
4865
+ var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4866
+
4867
+ selection.setRangeStart(instance._createCellCoords(row, column));
4868
+ }
4869
+ }, {
4870
+ keys: [['ArrowRight', 'Shift']],
4871
+ callback: function callback() {
4872
+ selection.transformEnd(0, instance.getDirectionFactor());
4873
+ }
4874
+ }, {
4875
+ keys: [['ArrowRight', 'Shift', 'Control/Meta']],
4876
+ captureCtrl: true,
4877
+ callback: function callback() {
4878
+ var _instance$columnIndex4;
4879
+
4880
+ var _instance$getSelected4 = instance.getSelectedRangeLast(),
4881
+ from = _instance$getSelected4.from,
4882
+ to = _instance$getSelected4.to;
4883
+
4884
+ var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
4885
+
4886
+ selection.setRangeStart(from.clone());
4887
+ selection.setRangeEnd(instance._createCellCoords(to.row, column));
4888
+ },
4889
+ runOnlyIf: function runOnlyIf() {
4890
+ return !(instance.selection.isSelectedByCorner() || instance.selection.isSelectedByRowHeader());
4891
+ }
4892
+ }, {
4893
+ keys: [['Home']],
4894
+ captureCtrl: true,
4895
+ callback: function callback() {
4896
+ var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4897
+ var row = instance.getSelectedRangeLast().highlight.row;
4898
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4899
+ selection.setRangeStart(instance._createCellCoords(row, column));
4900
+ },
4901
+ runOnlyIf: function runOnlyIf() {
4902
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4903
+ }
4904
+ }, {
4905
+ keys: [['Home', 'Shift']],
4906
+ callback: function callback() {
4907
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
4908
+ }
4909
+ }, {
4910
+ keys: [['Home', 'Control/Meta']],
4911
+ captureCtrl: true,
4912
+ callback: function callback() {
4913
+ var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
4914
+ var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
4915
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
4916
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
4917
+ selection.setRangeStart(instance._createCellCoords(row, column));
4918
+ },
4919
+ runOnlyIf: function runOnlyIf() {
4920
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4921
+ }
4922
+ }, {
4923
+ keys: [['End']],
4924
+ captureCtrl: true,
4925
+ callback: function callback() {
4926
+ selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4927
+ },
4928
+ runOnlyIf: function runOnlyIf() {
4929
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4930
+ }
4931
+ }, {
4932
+ keys: [['End', 'Shift']],
4933
+ callback: function callback() {
4934
+ selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
4935
+ }
4936
+ }, {
4937
+ keys: [['End', 'Control/Meta']],
4938
+ captureCtrl: true,
4939
+ callback: function callback() {
4940
+ var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
4941
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
4942
+ var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
4943
+ selection.setRangeStart(instance._createCellCoords(row, column));
4944
+ },
4945
+ runOnlyIf: function runOnlyIf() {
4946
+ return instance.view.isMainTableNotFullyCoveredByOverlays();
4947
+ }
4948
+ }, {
4949
+ keys: [['PageUp']],
4950
+ callback: function callback() {
4951
+ selection.transformStart(-instance.countVisibleRows(), 0);
4952
+ }
4953
+ }, {
4954
+ keys: [['PageUp', 'Shift']],
4955
+ callback: function callback() {
4956
+ var _instance$getSelected5 = instance.getSelectedRangeLast(),
4957
+ to = _instance$getSelected5.to;
4958
+
4959
+ var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
4960
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
4961
+
4962
+ if (row !== null) {
4963
+ var coords = instance._createCellCoords(row, to.col);
4964
+
4965
+ var scrollPadding = to.row - instance.view.getFirstFullyVisibleRow();
4966
+ var nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
4967
+ selection.setRangeEnd(coords);
4968
+ instance.scrollViewportTo(nextVerticalScroll);
4969
+ }
4970
+ }
4971
+ }, {
4972
+ keys: [['PageDown']],
4973
+ callback: function callback() {
4974
+ selection.transformStart(instance.countVisibleRows(), 0);
4975
+ }
4976
+ }, {
4977
+ keys: [['PageDown', 'Shift']],
4978
+ callback: function callback() {
4979
+ var _instance$getSelected6 = instance.getSelectedRangeLast(),
4980
+ to = _instance$getSelected6.to;
4981
+
4982
+ var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
4983
+ var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
4984
+
4985
+ if (row !== null) {
4986
+ var coords = instance._createCellCoords(row, to.col);
4987
+
4988
+ var scrollPadding = to.row - instance.view.getFirstFullyVisibleRow();
4989
+ var nextVerticalScroll = Math.min(coords.row - scrollPadding, instance.countRows() - 1);
4990
+ selection.setRangeEnd(coords);
4991
+ instance.scrollViewportTo(nextVerticalScroll);
4992
+ }
4993
+ }
4994
+ }, {
4995
+ keys: [['Tab']],
4996
+ callback: function callback(event) {
4997
+ var tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
4998
+ selection.transformStart(tabMoves.row, tabMoves.col, true);
4999
+ }
5000
+ }, {
5001
+ keys: [['Shift', 'Tab']],
5002
+ callback: function callback(event) {
5003
+ var tabMoves = typeof tableMeta.tabMoves === 'function' ? tableMeta.tabMoves(event) : tableMeta.tabMoves;
5004
+ selection.transformStart(-tabMoves.row, -tabMoves.col);
5005
+ }
5006
+ }], gridConfig);
4582
5007
  getPluginsNames().forEach(function (pluginName) {
4583
5008
  var PluginClass = getPlugin(pluginName);
4584
5009
  pluginsRegistry.addItem(pluginName, new PluginClass(_this));