handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-08765b9-20230714

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

Potentially problematic release.


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

Files changed (373) hide show
  1. package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
  2. package/3rdparty/walkontable/src/cell/coords.js +87 -33
  3. package/3rdparty/walkontable/src/cell/coords.mjs +87 -33
  4. package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
  5. package/3rdparty/walkontable/src/cell/range.js +92 -46
  6. package/3rdparty/walkontable/src/cell/range.mjs +92 -46
  7. package/3rdparty/walkontable/src/core/_base.js +41 -33
  8. package/3rdparty/walkontable/src/core/_base.mjs +41 -33
  9. package/3rdparty/walkontable/src/core/clone.js +8 -5
  10. package/3rdparty/walkontable/src/core/clone.mjs +8 -5
  11. package/3rdparty/walkontable/src/core/core.js +3 -2
  12. package/3rdparty/walkontable/src/core/core.mjs +3 -2
  13. package/3rdparty/walkontable/src/event.js +9 -8
  14. package/3rdparty/walkontable/src/event.mjs +9 -8
  15. package/3rdparty/walkontable/src/facade/core.js +2 -2
  16. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  17. package/3rdparty/walkontable/src/index.js +10 -2
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +11 -9
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +11 -9
  21. package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
  22. package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -6
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -6
  25. package/3rdparty/walkontable/src/overlay/top.js +12 -14
  26. package/3rdparty/walkontable/src/overlay/top.mjs +12 -14
  27. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
  28. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
  29. package/3rdparty/walkontable/src/overlays.js +75 -80
  30. package/3rdparty/walkontable/src/overlays.mjs +75 -80
  31. package/3rdparty/walkontable/src/scroll.js +27 -24
  32. package/3rdparty/walkontable/src/scroll.mjs +27 -24
  33. package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
  34. package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
  35. package/3rdparty/walkontable/src/selection/border/constants.js +16 -0
  36. package/3rdparty/walkontable/src/selection/border/constants.mjs +12 -0
  37. package/3rdparty/walkontable/src/selection/constants.js +62 -0
  38. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  39. package/3rdparty/walkontable/src/selection/index.js +26 -0
  40. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  41. package/3rdparty/walkontable/src/selection/manager.js +259 -0
  42. package/3rdparty/walkontable/src/selection/manager.mjs +254 -0
  43. package/3rdparty/walkontable/src/selection/scanner.js +270 -0
  44. package/3rdparty/walkontable/src/selection/scanner.mjs +267 -0
  45. package/3rdparty/walkontable/src/selection/selection.js +101 -0
  46. package/3rdparty/walkontable/src/selection/selection.mjs +96 -0
  47. package/3rdparty/walkontable/src/settings.js +18 -17
  48. package/3rdparty/walkontable/src/settings.mjs +18 -17
  49. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
  50. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
  51. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
  52. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
  53. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
  54. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
  55. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
  56. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
  57. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
  58. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
  59. package/3rdparty/walkontable/src/table.js +48 -115
  60. package/3rdparty/walkontable/src/table.mjs +49 -116
  61. package/base.js +2 -2
  62. package/base.mjs +2 -2
  63. package/core/focusCatcher/focusDetector.js +58 -0
  64. package/core/focusCatcher/focusDetector.mjs +54 -0
  65. package/core/focusCatcher/index.js +142 -0
  66. package/core/focusCatcher/index.mjs +138 -0
  67. package/core/index.js +9 -0
  68. package/core/index.mjs +1 -0
  69. package/core.d.ts +6 -3
  70. package/core.js +181 -298
  71. package/core.mjs +181 -298
  72. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
  73. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
  74. package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
  75. package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
  76. package/dataMap/metaManager/metaSchema.js +41 -0
  77. package/dataMap/metaManager/metaSchema.mjs +41 -0
  78. package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
  79. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
  80. package/dataMap/metaManager/utils.js +4 -2
  81. package/dataMap/metaManager/utils.mjs +4 -2
  82. package/dist/handsontable.css +19 -3
  83. package/dist/handsontable.full.css +19 -3
  84. package/dist/handsontable.full.js +10739 -7037
  85. package/dist/handsontable.full.min.css +3 -3
  86. package/dist/handsontable.full.min.js +25 -25
  87. package/dist/handsontable.js +24884 -21182
  88. package/dist/handsontable.min.css +3 -3
  89. package/dist/handsontable.min.js +19 -19
  90. package/editorManager.js +11 -75
  91. package/editorManager.mjs +11 -74
  92. package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
  93. package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
  94. package/editors/baseEditor/baseEditor.js +1 -1
  95. package/editors/baseEditor/baseEditor.mjs +1 -1
  96. package/editors/dateEditor/dateEditor.js +2 -1
  97. package/editors/dateEditor/dateEditor.mjs +2 -1
  98. package/editors/textEditor/textEditor.js +3 -11
  99. package/editors/textEditor/textEditor.mjs +4 -12
  100. package/helpers/mixed.js +1 -1
  101. package/helpers/mixed.mjs +1 -1
  102. package/helpers/number.d.ts +1 -0
  103. package/helpers/number.js +18 -0
  104. package/helpers/number.mjs +17 -0
  105. package/helpers/object.js +1 -0
  106. package/helpers/object.mjs +1 -0
  107. package/index.js +5 -5
  108. package/index.mjs +5 -5
  109. package/package.json +1 -1
  110. package/pluginHooks.d.ts +7 -1
  111. package/pluginHooks.js +106 -1
  112. package/pluginHooks.mjs +106 -1
  113. package/plugins/autoColumnSize/autoColumnSize.js +4 -1
  114. package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
  115. package/plugins/collapsibleColumns/collapsibleColumns.js +110 -40
  116. package/plugins/collapsibleColumns/collapsibleColumns.mjs +110 -40
  117. package/plugins/columnSorting/columnSorting.js +40 -1
  118. package/plugins/columnSorting/columnSorting.mjs +40 -3
  119. package/plugins/columnSorting/columnStatesManager.js +2 -1
  120. package/plugins/columnSorting/columnStatesManager.mjs +2 -1
  121. package/plugins/columnSorting/index.js +3 -1
  122. package/plugins/columnSorting/index.mjs +1 -1
  123. package/plugins/comments/commentEditor.js +1 -0
  124. package/plugins/comments/commentEditor.mjs +1 -0
  125. package/plugins/comments/comments.js +253 -191
  126. package/plugins/comments/comments.mjs +252 -192
  127. package/plugins/comments/contextMenuItem/addEditComment.js +41 -0
  128. package/plugins/comments/contextMenuItem/addEditComment.mjs +35 -0
  129. package/plugins/comments/contextMenuItem/readOnlyComment.js +49 -0
  130. package/plugins/comments/contextMenuItem/readOnlyComment.mjs +43 -0
  131. package/plugins/comments/contextMenuItem/removeComment.js +38 -0
  132. package/plugins/comments/contextMenuItem/removeComment.mjs +32 -0
  133. package/plugins/contextMenu/contextMenu.d.ts +1 -1
  134. package/plugins/contextMenu/contextMenu.js +72 -30
  135. package/plugins/contextMenu/contextMenu.mjs +73 -31
  136. package/plugins/contextMenu/predefinedItems/alignment.js +7 -0
  137. package/plugins/contextMenu/predefinedItems/alignment.mjs +7 -0
  138. package/plugins/contextMenu/predefinedItems/clearColumn.js +5 -3
  139. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +5 -3
  140. package/plugins/contextMenu/predefinedItems/columnLeft.js +5 -3
  141. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +5 -3
  142. package/plugins/contextMenu/predefinedItems/columnRight.js +5 -3
  143. package/plugins/contextMenu/predefinedItems/columnRight.mjs +5 -3
  144. package/plugins/contextMenu/predefinedItems/readOnly.js +7 -0
  145. package/plugins/contextMenu/predefinedItems/readOnly.mjs +7 -0
  146. package/plugins/contextMenu/predefinedItems/removeColumn.js +7 -5
  147. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +5 -3
  148. package/plugins/contextMenu/predefinedItems/removeRow.js +7 -5
  149. package/plugins/contextMenu/predefinedItems/removeRow.mjs +5 -3
  150. package/plugins/contextMenu/predefinedItems/rowAbove.js +5 -3
  151. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +5 -3
  152. package/plugins/contextMenu/predefinedItems/rowBelow.js +5 -3
  153. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +5 -3
  154. package/plugins/contextMenu/utils.js +28 -16
  155. package/plugins/contextMenu/utils.mjs +27 -15
  156. package/plugins/copyPaste/contextMenuItem/copy.js +7 -0
  157. package/plugins/copyPaste/contextMenuItem/copy.mjs +7 -0
  158. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +9 -1
  159. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +9 -1
  160. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +9 -1
  161. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +9 -1
  162. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +9 -1
  163. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +9 -1
  164. package/plugins/copyPaste/contextMenuItem/cut.js +7 -0
  165. package/plugins/copyPaste/contextMenuItem/cut.mjs +7 -0
  166. package/plugins/copyPaste/copyPaste.js +12 -6
  167. package/plugins/copyPaste/copyPaste.mjs +12 -6
  168. package/plugins/customBorders/customBorders.js +36 -29
  169. package/plugins/customBorders/customBorders.mjs +37 -30
  170. package/plugins/customBorders/utils.js +3 -3
  171. package/plugins/customBorders/utils.mjs +3 -3
  172. package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
  173. package/plugins/dropdownMenu/dropdownMenu.js +89 -32
  174. package/plugins/dropdownMenu/dropdownMenu.mjs +89 -32
  175. package/plugins/filters/conditionCollection.js +6 -5
  176. package/plugins/filters/conditionCollection.mjs +6 -5
  177. package/plugins/filters/filters.js +44 -21
  178. package/plugins/filters/filters.mjs +43 -20
  179. package/plugins/formulas/engine/register.js +3 -3
  180. package/plugins/formulas/engine/register.mjs +3 -3
  181. package/plugins/formulas/engine/settings.js +6 -3
  182. package/plugins/formulas/engine/settings.mjs +6 -3
  183. package/plugins/formulas/formulas.js +151 -143
  184. package/plugins/formulas/formulas.mjs +151 -143
  185. package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
  186. package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
  187. package/plugins/formulas/indexSyncer/index.js +100 -64
  188. package/plugins/formulas/indexSyncer/index.mjs +100 -64
  189. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
  190. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
  191. package/plugins/hiddenColumns/hiddenColumns.js +51 -34
  192. package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
  193. package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
  194. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
  195. package/plugins/hiddenRows/hiddenRows.js +50 -33
  196. package/plugins/hiddenRows/hiddenRows.mjs +50 -33
  197. package/plugins/manualRowResize/manualRowResize.js +2 -1
  198. package/plugins/manualRowResize/manualRowResize.mjs +2 -1
  199. package/plugins/mergeCells/mergeCells.js +6 -17
  200. package/plugins/mergeCells/mergeCells.mjs +6 -17
  201. package/plugins/multiColumnSorting/multiColumnSorting.js +37 -2
  202. package/plugins/multiColumnSorting/multiColumnSorting.mjs +37 -2
  203. package/plugins/nestedHeaders/nestedHeaders.js +209 -75
  204. package/plugins/nestedHeaders/nestedHeaders.mjs +208 -74
  205. package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
  206. package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
  207. package/plugins/nestedHeaders/stateManager/index.js +107 -49
  208. package/plugins/nestedHeaders/stateManager/index.mjs +105 -47
  209. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
  210. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
  211. package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
  212. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
  213. package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
  214. package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
  215. package/plugins/nestedRows/data/dataManager.js +4 -2
  216. package/plugins/nestedRows/data/dataManager.mjs +4 -2
  217. package/plugins/nestedRows/nestedRows.js +41 -0
  218. package/plugins/nestedRows/nestedRows.mjs +41 -0
  219. package/plugins/persistentState/storage.js +1 -0
  220. package/plugins/persistentState/storage.mjs +1 -0
  221. package/plugins/undoRedo/undoRedo.js +2 -1
  222. package/plugins/undoRedo/undoRedo.mjs +2 -1
  223. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  224. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  225. package/selection/highlight/highlight.js +256 -71
  226. package/selection/highlight/highlight.mjs +250 -71
  227. package/selection/highlight/types/activeHeader.js +10 -8
  228. package/selection/highlight/types/activeHeader.mjs +10 -8
  229. package/selection/highlight/types/area.js +6 -18
  230. package/selection/highlight/types/area.mjs +6 -18
  231. package/selection/highlight/types/areaLayered.js +31 -0
  232. package/selection/highlight/types/areaLayered.mjs +26 -0
  233. package/selection/highlight/types/column.js +27 -0
  234. package/selection/highlight/types/column.mjs +22 -0
  235. package/selection/highlight/types/customSelection.js +7 -9
  236. package/selection/highlight/types/customSelection.mjs +7 -9
  237. package/selection/highlight/types/fill.js +5 -7
  238. package/selection/highlight/types/fill.mjs +5 -7
  239. package/selection/highlight/types/{cell.js → focus.js} +5 -7
  240. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  241. package/selection/highlight/types/header.js +9 -18
  242. package/selection/highlight/types/header.mjs +9 -18
  243. package/selection/highlight/types/row.js +27 -0
  244. package/selection/highlight/types/row.mjs +22 -0
  245. package/selection/highlight/visualSelection.js +41 -33
  246. package/selection/highlight/visualSelection.mjs +41 -33
  247. package/selection/index.js +4 -7
  248. package/selection/index.mjs +2 -3
  249. package/selection/mouseEventHandler.js +1 -1
  250. package/selection/mouseEventHandler.mjs +1 -1
  251. package/selection/range.js +8 -8
  252. package/selection/range.mjs +8 -8
  253. package/selection/selection.js +290 -154
  254. package/selection/selection.mjs +287 -153
  255. package/selection/transformation.js +232 -90
  256. package/selection/transformation.mjs +232 -90
  257. package/selection/utils.js +15 -21
  258. package/selection/utils.mjs +16 -21
  259. package/settings.d.ts +2 -0
  260. package/shortcutContexts/commands/editor/closeAndSave.js +12 -0
  261. package/shortcutContexts/commands/editor/closeAndSave.mjs +8 -0
  262. package/shortcutContexts/commands/editor/closeWithoutSaving.js +12 -0
  263. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
  264. package/shortcutContexts/commands/editor/fastOpen.js +16 -0
  265. package/shortcutContexts/commands/editor/fastOpen.mjs +12 -0
  266. package/shortcutContexts/commands/editor/index.js +16 -0
  267. package/shortcutContexts/commands/editor/index.mjs +12 -0
  268. package/shortcutContexts/commands/editor/open.js +27 -0
  269. package/shortcutContexts/commands/editor/open.mjs +23 -0
  270. package/shortcutContexts/commands/emptySelectedCells.js +11 -0
  271. package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
  272. package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
  273. package/shortcutContexts/commands/extendCellsSelection/down.mjs +11 -0
  274. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
  275. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +17 -0
  276. package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
  277. package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
  278. package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
  279. package/shortcutContexts/commands/extendCellsSelection/left.mjs +11 -0
  280. package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
  281. package/shortcutContexts/commands/extendCellsSelection/right.mjs +11 -0
  282. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
  283. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +15 -0
  284. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +29 -0
  285. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +25 -0
  286. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +19 -0
  287. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +15 -0
  288. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +19 -0
  289. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +15 -0
  290. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +29 -0
  291. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +25 -0
  292. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +29 -0
  293. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +25 -0
  294. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +29 -0
  295. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +25 -0
  296. package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
  297. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +15 -0
  298. package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
  299. package/shortcutContexts/commands/extendCellsSelection/up.mjs +11 -0
  300. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
  301. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +17 -0
  302. package/shortcutContexts/commands/index.js +35 -0
  303. package/shortcutContexts/commands/index.mjs +31 -0
  304. package/shortcutContexts/commands/moveCellSelection/down.js +13 -0
  305. package/shortcutContexts/commands/moveCellSelection/down.mjs +9 -0
  306. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +31 -0
  307. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +27 -0
  308. package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
  309. package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
  310. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +12 -0
  311. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
  312. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +12 -0
  313. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
  314. package/shortcutContexts/commands/moveCellSelection/left.js +10 -0
  315. package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
  316. package/shortcutContexts/commands/moveCellSelection/right.js +10 -0
  317. package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
  318. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +17 -0
  319. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +13 -0
  320. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +18 -0
  321. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +14 -0
  322. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +14 -0
  323. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +10 -0
  324. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +17 -0
  325. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +13 -0
  326. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +19 -0
  327. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +15 -0
  328. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +21 -0
  329. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +17 -0
  330. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +17 -0
  331. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +13 -0
  332. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +19 -0
  333. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +15 -0
  334. package/shortcutContexts/commands/moveCellSelection/up.js +13 -0
  335. package/shortcutContexts/commands/moveCellSelection/up.mjs +9 -0
  336. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +31 -0
  337. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +27 -0
  338. package/shortcutContexts/commands/populateSelectedCellsData.js +29 -0
  339. package/shortcutContexts/commands/populateSelectedCellsData.mjs +25 -0
  340. package/shortcutContexts/commands/scrollToFocusedCell.js +36 -0
  341. package/shortcutContexts/commands/scrollToFocusedCell.mjs +32 -0
  342. package/shortcutContexts/commands/selectAll.js +10 -0
  343. package/shortcutContexts/commands/selectAll.mjs +6 -0
  344. package/shortcutContexts/constants.js +13 -0
  345. package/shortcutContexts/constants.mjs +8 -0
  346. package/shortcutContexts/editor.js +25 -0
  347. package/shortcutContexts/editor.mjs +21 -0
  348. package/shortcutContexts/grid.js +163 -0
  349. package/shortcutContexts/grid.mjs +159 -0
  350. package/shortcutContexts/index.js +24 -0
  351. package/shortcutContexts/index.mjs +11 -0
  352. package/shortcuts/manager.js +2 -0
  353. package/shortcuts/manager.mjs +2 -0
  354. package/shortcuts/recorder.js +2 -2
  355. package/shortcuts/recorder.mjs +2 -2
  356. package/shortcuts/utils.js +19 -5
  357. package/shortcuts/utils.mjs +18 -4
  358. package/tableView.js +163 -91
  359. package/tableView.mjs +163 -91
  360. package/translations/changesObservable/observable.js +82 -54
  361. package/translations/changesObservable/observable.mjs +82 -54
  362. package/translations/changesObservable/observer.js +24 -11
  363. package/translations/changesObservable/observer.mjs +24 -11
  364. package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
  365. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
  366. package/utils/dataStructures/tree.js +21 -18
  367. package/utils/dataStructures/tree.mjs +21 -18
  368. package/3rdparty/walkontable/src/selection.js +0 -295
  369. package/3rdparty/walkontable/src/selection.mjs +0 -290
  370. package/selection/highlight/constants.js +0 -15
  371. package/selection/highlight/constants.mjs +0 -6
  372. package/selection/highlight/types/index.js +0 -35
  373. package/selection/highlight/types/index.mjs +0 -31
@@ -1,3 +1,11 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
5
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
6
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
7
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
8
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
1
9
  import { arrayEach } from "../../../helpers/array.mjs";
2
10
  import TreeNode from "../../../utils/dataStructures/tree.mjs";
3
11
  /* eslint-disable jsdoc/require-description-complete-sentence */
@@ -36,32 +44,44 @@ import TreeNode from "../../../utils/dataStructures/tree.mjs";
36
44
  *
37
45
  */
38
46
  /* eslint-enable jsdoc/require-description-complete-sentence */
47
+ var _rootNodes = /*#__PURE__*/new WeakMap();
48
+ var _rootsIndex = /*#__PURE__*/new WeakMap();
49
+ var _sourceSettings = /*#__PURE__*/new WeakMap();
39
50
  export default class HeadersTree {
40
- /**
41
- * The collection of nested headers settings structured into trees. The root trees are stored
42
- * under the visual column index.
43
- *
44
- * @private
45
- * @type {Map<number, TreeNode>}
46
- */
47
- #rootNodes = new Map();
48
- /**
49
- * A map that translates the visual column indexes that intersect the range
50
- * defined by the header colspan width to the root index.
51
- *
52
- * @private
53
- * @type {Map<number, number>}
54
- */
55
- #rootsIndex = new Map();
56
- /**
57
- * The instance of the SourceSettings class.
58
- *
59
- * @private
60
- * @type {SourceSettings}
61
- */
62
- #sourceSettings = null;
63
51
  constructor(sourceSettings) {
64
- this.#sourceSettings = sourceSettings;
52
+ /**
53
+ * The collection of nested headers settings structured into trees. The root trees are stored
54
+ * under the visual column index.
55
+ *
56
+ * @private
57
+ * @type {Map<number, TreeNode>}
58
+ */
59
+ _classPrivateFieldInitSpec(this, _rootNodes, {
60
+ writable: true,
61
+ value: new Map()
62
+ });
63
+ /**
64
+ * A map that translates the visual column indexes that intersect the range
65
+ * defined by the header colspan width to the root index.
66
+ *
67
+ * @private
68
+ * @type {Map<number, number>}
69
+ */
70
+ _classPrivateFieldInitSpec(this, _rootsIndex, {
71
+ writable: true,
72
+ value: new Map()
73
+ });
74
+ /**
75
+ * The instance of the SourceSettings class.
76
+ *
77
+ * @private
78
+ * @type {SourceSettings}
79
+ */
80
+ _classPrivateFieldInitSpec(this, _sourceSettings, {
81
+ writable: true,
82
+ value: null
83
+ });
84
+ _classPrivateFieldSet(this, _sourceSettings, sourceSettings);
65
85
  }
66
86
 
67
87
  /**
@@ -70,7 +90,7 @@ export default class HeadersTree {
70
90
  * @returns {TreeNode[]}
71
91
  */
72
92
  getRoots() {
73
- return Array.from(this.#rootNodes.values());
93
+ return Array.from(_classPrivateFieldGet(this, _rootNodes).values());
74
94
  }
75
95
 
76
96
  /**
@@ -81,8 +101,8 @@ export default class HeadersTree {
81
101
  */
82
102
  getRootByColumn(columnIndex) {
83
103
  let node;
84
- if (this.#rootsIndex.has(columnIndex)) {
85
- node = this.#rootNodes.get(this.#rootsIndex.get(columnIndex));
104
+ if (_classPrivateFieldGet(this, _rootsIndex).has(columnIndex)) {
105
+ node = _classPrivateFieldGet(this, _rootNodes).get(_classPrivateFieldGet(this, _rootsIndex).get(columnIndex));
86
106
  }
87
107
  return node;
88
108
  }
@@ -102,7 +122,7 @@ export default class HeadersTree {
102
122
 
103
123
  // Normalize the visual column index to a 0-based system for a specific "box" defined
104
124
  // by root node colspan width.
105
- const normColumnIndex = columnIndex - this.#rootsIndex.get(columnIndex);
125
+ const normColumnIndex = columnIndex - _classPrivateFieldGet(this, _rootsIndex).get(columnIndex);
106
126
  let columnCursor = 0;
107
127
  let treeNode;
108
128
 
@@ -132,8 +152,8 @@ export default class HeadersTree {
132
152
  */
133
153
  rebuildTreeIndex() {
134
154
  let columnIndex = 0;
135
- this.#rootsIndex.clear();
136
- arrayEach(this.#rootNodes, _ref => {
155
+ _classPrivateFieldGet(this, _rootsIndex).clear();
156
+ arrayEach(_classPrivateFieldGet(this, _rootNodes), _ref => {
137
157
  let [, {
138
158
  data: {
139
159
  colspan
@@ -141,7 +161,7 @@ export default class HeadersTree {
141
161
  }] = _ref;
142
162
  // Map tree range (colspan range/width) into visual column index of the root node.
143
163
  for (let i = columnIndex; i < columnIndex + colspan; i++) {
144
- this.#rootsIndex.set(i, columnIndex);
164
+ _classPrivateFieldGet(this, _rootsIndex).set(i, columnIndex);
145
165
  }
146
166
  columnIndex += colspan;
147
167
  });
@@ -153,12 +173,12 @@ export default class HeadersTree {
153
173
  */
154
174
  buildTree() {
155
175
  this.clear();
156
- const columnsCount = this.#sourceSettings.getColumnsCount();
176
+ const columnsCount = _classPrivateFieldGet(this, _sourceSettings).getColumnsCount();
157
177
  let columnIndex = 0;
158
178
  while (columnIndex < columnsCount) {
159
- const columnSettings = this.#sourceSettings.getHeaderSettings(0, columnIndex);
179
+ const columnSettings = _classPrivateFieldGet(this, _sourceSettings).getHeaderSettings(0, columnIndex);
160
180
  const rootNode = new TreeNode();
161
- this.#rootNodes.set(columnIndex, rootNode);
181
+ _classPrivateFieldGet(this, _rootNodes).set(columnIndex, rootNode);
162
182
  this.buildLeaves(rootNode, columnIndex, 0, columnSettings.origColspan);
163
183
  columnIndex += columnSettings.origColspan;
164
184
  }
@@ -175,7 +195,7 @@ export default class HeadersTree {
175
195
  */
176
196
  buildLeaves(parentNode, columnIndex, headerLevel) {
177
197
  let extractionLength = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
178
- const columnsSettings = this.#sourceSettings.getHeadersSettings(headerLevel, columnIndex, extractionLength);
198
+ const columnsSettings = _classPrivateFieldGet(this, _sourceSettings).getHeadersSettings(headerLevel, columnIndex, extractionLength);
179
199
  headerLevel += 1;
180
200
  arrayEach(columnsSettings, columnSettings => {
181
201
  const nodeData = {
@@ -202,7 +222,7 @@ export default class HeadersTree {
202
222
  node = new TreeNode(nodeData);
203
223
  parentNode.addChild(node);
204
224
  }
205
- if (headerLevel < this.#sourceSettings.getLayersCount()) {
225
+ if (headerLevel < _classPrivateFieldGet(this, _sourceSettings).getLayersCount()) {
206
226
  this.buildLeaves(node, columnIndex, headerLevel, columnSettings.origColspan);
207
227
  }
208
228
  columnIndex += columnSettings.origColspan;
@@ -213,7 +233,7 @@ export default class HeadersTree {
213
233
  * Clears the tree to the initial state.
214
234
  */
215
235
  clear() {
216
- this.#rootNodes.clear();
217
- this.#rootsIndex.clear();
236
+ _classPrivateFieldGet(this, _rootNodes).clear();
237
+ _classPrivateFieldGet(this, _rootsIndex).clear();
218
238
  }
219
239
  }
@@ -1,13 +1,21 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.error.cause.js");
3
4
  exports.__esModule = true;
4
5
  require("core-js/modules/es.array.push.js");
5
6
  var _array = require("../../../helpers/array");
6
- var _sourceSettings = _interopRequireDefault(require("./sourceSettings"));
7
- var _headersTree = _interopRequireDefault(require("./headersTree"));
7
+ var _sourceSettings2 = _interopRequireDefault(require("./sourceSettings"));
8
+ var _headersTree2 = _interopRequireDefault(require("./headersTree"));
8
9
  var _nodeModifiers = require("./nodeModifiers");
9
10
  var _matrixGenerator = require("./matrixGenerator");
10
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
13
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
14
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
15
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
16
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
17
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
18
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
11
19
  /**
12
20
  * The state manager is a source of truth for nested headers configuration.
13
21
  * The state generation process is divided into three stages.
@@ -36,29 +44,42 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
36
44
  *
37
45
  * @class StateManager
38
46
  */
47
+ var _sourceSettings = /*#__PURE__*/new WeakMap();
48
+ var _headersTree = /*#__PURE__*/new WeakMap();
49
+ var _stateMatrix = /*#__PURE__*/new WeakMap();
39
50
  class StateManager {
40
- /**
41
- * The instance of the source settings class.
42
- *
43
- * @private
44
- * @type {SourceSettings}
45
- */
46
- #sourceSettings = new _sourceSettings.default();
47
- /**
48
- * The instance of the headers tree. The tree is generated after setting new configuration data.
49
- *
50
- * @private
51
- * @type {HeadersTree}
52
- */
53
- #headersTree = new _headersTree.default(this.#sourceSettings);
54
- /**
55
- * Cached matrix which is generated from the tree structure.
56
- *
57
- * @private
58
- * @type {Array[]}
59
- */
60
- #stateMatrix = [[]];
61
-
51
+ constructor() {
52
+ /**
53
+ * The instance of the source settings class.
54
+ *
55
+ * @private
56
+ * @type {SourceSettings}
57
+ */
58
+ _classPrivateFieldInitSpec(this, _sourceSettings, {
59
+ writable: true,
60
+ value: new _sourceSettings2.default()
61
+ });
62
+ /**
63
+ * The instance of the headers tree. The tree is generated after setting new configuration data.
64
+ *
65
+ * @private
66
+ * @type {HeadersTree}
67
+ */
68
+ _classPrivateFieldInitSpec(this, _headersTree, {
69
+ writable: true,
70
+ value: new _headersTree2.default(_classPrivateFieldGet(this, _sourceSettings))
71
+ });
72
+ /**
73
+ * Cached matrix which is generated from the tree structure.
74
+ *
75
+ * @private
76
+ * @type {Array[]}
77
+ */
78
+ _classPrivateFieldInitSpec(this, _stateMatrix, {
79
+ writable: true,
80
+ value: [[]]
81
+ });
82
+ }
62
83
  /**
63
84
  * Sets a new state for the nested headers plugin based on settings passed
64
85
  * directly to the plugin.
@@ -67,16 +88,16 @@ class StateManager {
67
88
  * @returns {boolean} Returns `true` if the settings are processed correctly, `false` otherwise.
68
89
  */
69
90
  setState(nestedHeadersSettings) {
70
- this.#sourceSettings.setData(nestedHeadersSettings);
91
+ _classPrivateFieldGet(this, _sourceSettings).setData(nestedHeadersSettings);
71
92
  let hasError = false;
72
93
  try {
73
- this.#headersTree.buildTree();
94
+ _classPrivateFieldGet(this, _headersTree).buildTree();
74
95
  } catch (ex) {
75
- this.#headersTree.clear();
76
- this.#sourceSettings.clear();
96
+ _classPrivateFieldGet(this, _headersTree).clear();
97
+ _classPrivateFieldGet(this, _sourceSettings).clear();
77
98
  hasError = true;
78
99
  }
79
- this.#stateMatrix = (0, _matrixGenerator.generateMatrix)(this.#headersTree.getRoots());
100
+ _classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
80
101
  return hasError;
81
102
  }
82
103
 
@@ -87,7 +108,7 @@ class StateManager {
87
108
  * @param {number} columnsCount The number of columns to limit to.
88
109
  */
89
110
  setColumnsLimit(columnsCount) {
90
- this.#sourceSettings.setColumnsLimit(columnsCount);
111
+ _classPrivateFieldGet(this, _sourceSettings).setColumnsLimit(columnsCount);
91
112
  }
92
113
 
93
114
  /**
@@ -111,9 +132,9 @@ class StateManager {
111
132
  ...rest
112
133
  };
113
134
  });
114
- this.#sourceSettings.mergeWith(transformedSettings);
115
- this.#headersTree.buildTree();
116
- this.#stateMatrix = (0, _matrixGenerator.generateMatrix)(this.#headersTree.getRoots());
135
+ _classPrivateFieldGet(this, _sourceSettings).mergeWith(transformedSettings);
136
+ _classPrivateFieldGet(this, _headersTree).buildTree();
137
+ _classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
117
138
  }
118
139
 
119
140
  /**
@@ -128,9 +149,9 @@ class StateManager {
128
149
  * header settings.
129
150
  */
130
151
  mapState(callback) {
131
- this.#sourceSettings.map(callback);
132
- this.#headersTree.buildTree();
133
- this.#stateMatrix = (0, _matrixGenerator.generateMatrix)(this.#headersTree.getRoots());
152
+ _classPrivateFieldGet(this, _sourceSettings).map(callback);
153
+ _classPrivateFieldGet(this, _headersTree).buildTree();
154
+ _classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
134
155
  }
135
156
 
136
157
  /**
@@ -143,7 +164,7 @@ class StateManager {
143
164
  * @returns {Array}
144
165
  */
145
166
  mapNodes(callback) {
146
- return (0, _array.arrayReduce)(this.#headersTree.getRoots(), (acc, rootNode) => {
167
+ return (0, _array.arrayReduce)(_classPrivateFieldGet(this, _headersTree).getRoots(), (acc, rootNode) => {
147
168
  rootNode.walkDown(node => {
148
169
  const result = callback(node.data);
149
170
  if (result !== void 0) {
@@ -168,13 +189,13 @@ class StateManager {
168
189
  if (headerLevel < 0) {
169
190
  headerLevel = this.rowCoordsToLevel(headerLevel);
170
191
  }
171
- const nodeToProcess = this.#headersTree.getNode(headerLevel, columnIndex);
192
+ const nodeToProcess = _classPrivateFieldGet(this, _headersTree).getNode(headerLevel, columnIndex);
172
193
  let actionResult;
173
194
  if (nodeToProcess) {
174
195
  actionResult = (0, _nodeModifiers.triggerNodeModification)(action, nodeToProcess, columnIndex);
175
196
 
176
197
  // TODO (perf-tip): Trigger matrix generation once after multiple node modifications.
177
- this.#stateMatrix = (0, _matrixGenerator.generateMatrix)(this.#headersTree.getRoots());
198
+ _classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
178
199
  }
179
200
  return actionResult;
180
201
  }
@@ -276,14 +297,14 @@ class StateManager {
276
297
  * @returns {object|null}
277
298
  */
278
299
  getHeaderSettings(headerLevel, columnIndex) {
279
- var _this$stateMatrix$hea;
300
+ var _classPrivateFieldGet2, _classPrivateFieldGet3;
280
301
  if (headerLevel < 0) {
281
302
  headerLevel = this.rowCoordsToLevel(headerLevel);
282
303
  }
283
304
  if (headerLevel === null || headerLevel >= this.getLayersCount()) {
284
305
  return null;
285
306
  }
286
- return (_this$stateMatrix$hea = this.#stateMatrix[headerLevel]?.[columnIndex]) != null ? _this$stateMatrix$hea : null;
307
+ return (_classPrivateFieldGet2 = (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _stateMatrix)[headerLevel]) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3[columnIndex]) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : null;
287
308
  }
288
309
 
289
310
  /**
@@ -302,7 +323,7 @@ class StateManager {
302
323
  if (headerLevel === null || headerLevel >= this.getLayersCount()) {
303
324
  return null;
304
325
  }
305
- const node = this.#headersTree.getNode(headerLevel, columnIndex);
326
+ const node = _classPrivateFieldGet(this, _headersTree).getNode(headerLevel, columnIndex);
306
327
  if (!node) {
307
328
  return null;
308
329
  }
@@ -324,7 +345,7 @@ class StateManager {
324
345
  var _this$getHeaderSettin;
325
346
  const {
326
347
  isRoot
327
- } = (_this$getHeaderSettin = this.getHeaderSettings(headerLevel, columnIndex)) != null ? _this$getHeaderSettin : {
348
+ } = (_this$getHeaderSettin = this.getHeaderSettings(headerLevel, columnIndex)) !== null && _this$getHeaderSettin !== void 0 ? _this$getHeaderSettin : {
328
349
  isRoot: true
329
350
  };
330
351
  if (isRoot) {
@@ -335,7 +356,7 @@ class StateManager {
335
356
  var _this$getHeaderSettin2;
336
357
  const {
337
358
  isRoot: isRootNode
338
- } = (_this$getHeaderSettin2 = this.getHeaderSettings(headerLevel, stepBackColumn)) != null ? _this$getHeaderSettin2 : {
359
+ } = (_this$getHeaderSettin2 = this.getHeaderSettings(headerLevel, stepBackColumn)) !== null && _this$getHeaderSettin2 !== void 0 ? _this$getHeaderSettin2 : {
339
360
  isRoot: true
340
361
  };
341
362
  if (isRootNode) {
@@ -346,13 +367,50 @@ class StateManager {
346
367
  return stepBackColumn;
347
368
  }
348
369
 
370
+ /**
371
+ * The method is helpful in cases where the column index targets in-between currently
372
+ * collapsed column. In that case, the method returns the right-most column index
373
+ * where the nested header ends.
374
+ *
375
+ * @param {number} headerLevel Header level (there is support for negative and positive values).
376
+ * @param {number} columnIndex A visual column index.
377
+ * @returns {number}
378
+ */
379
+ findRightMostColumnIndex(headerLevel, columnIndex) {
380
+ var _this$getHeaderSettin3;
381
+ const {
382
+ isRoot,
383
+ origColspan
384
+ } = (_this$getHeaderSettin3 = this.getHeaderSettings(headerLevel, columnIndex)) !== null && _this$getHeaderSettin3 !== void 0 ? _this$getHeaderSettin3 : {
385
+ isRoot: true,
386
+ origColspan: 1
387
+ };
388
+ if (isRoot) {
389
+ return columnIndex + origColspan - 1;
390
+ }
391
+ let stepForthColumn = columnIndex + 1;
392
+ while (stepForthColumn < this.getColumnsCount()) {
393
+ var _this$getHeaderSettin4;
394
+ const {
395
+ isRoot: isRootNode
396
+ } = (_this$getHeaderSettin4 = this.getHeaderSettings(headerLevel, stepForthColumn)) !== null && _this$getHeaderSettin4 !== void 0 ? _this$getHeaderSettin4 : {
397
+ isRoot: true
398
+ };
399
+ if (isRootNode) {
400
+ break;
401
+ }
402
+ stepForthColumn += 1;
403
+ }
404
+ return stepForthColumn - 1;
405
+ }
406
+
349
407
  /**
350
408
  * Gets a total number of headers levels.
351
409
  *
352
410
  * @returns {number}
353
411
  */
354
412
  getLayersCount() {
355
- return this.#sourceSettings.getLayersCount();
413
+ return _classPrivateFieldGet(this, _sourceSettings).getLayersCount();
356
414
  }
357
415
 
358
416
  /**
@@ -361,16 +419,16 @@ class StateManager {
361
419
  * @returns {number}
362
420
  */
363
421
  getColumnsCount() {
364
- return this.#sourceSettings.getColumnsCount();
422
+ return _classPrivateFieldGet(this, _sourceSettings).getColumnsCount();
365
423
  }
366
424
 
367
425
  /**
368
426
  * Clears the column state manager to the initial state.
369
427
  */
370
428
  clear() {
371
- this.#stateMatrix = [];
372
- this.#sourceSettings.clear();
373
- this.#headersTree.clear();
429
+ _classPrivateFieldSet(this, _stateMatrix, []);
430
+ _classPrivateFieldGet(this, _sourceSettings).clear();
431
+ _classPrivateFieldGet(this, _headersTree).clear();
374
432
  }
375
433
  }
376
434
  exports.default = StateManager;