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
@@ -15,15 +15,15 @@ class Event {
15
15
  * @param {Settings} wtSettings The walkontable settings.
16
16
  * @param {EventManager} eventManager The walkontable event manager.
17
17
  * @param {Table} wtTable The table.
18
- * @param {Selections} selections Selections.
18
+ * @param {SelectionManager} selectionManager Selections.
19
19
  * @param {Event} [parent=null] The main Event instance.
20
20
  */
21
- constructor(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selections) {
21
+ constructor(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selectionManager) {
22
22
  let parent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
23
23
  this.wtSettings = wtSettings;
24
24
  this.domBindings = domBindings;
25
25
  this.wtTable = wtTable;
26
- this.selections = selections;
26
+ this.selectionManager = selectionManager;
27
27
  this.parent = parent;
28
28
 
29
29
  /**
@@ -131,11 +131,11 @@ class Event {
131
131
  cell.coords = this.wtTable.getCoords(TD);
132
132
  cell.TD = TD;
133
133
  } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'current')) {
134
- cell.coords = this.selections.getCell().cellRange.highlight;
134
+ cell.coords = this.selectionManager.getFocusSelection().cellRange.highlight;
135
135
  cell.TD = this.wtTable.getCell(cell.coords);
136
136
  } else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'area')) {
137
- if (this.selections.createOrGetArea().cellRange) {
138
- cell.coords = this.selections.createOrGetArea().cellRange.to;
137
+ if (this.selectionManager.getAreaSelection().cellRange) {
138
+ cell.coords = this.selectionManager.getAreaSelection().cellRange.to;
139
139
  cell.TD = this.wtTable.getCell(cell.coords);
140
140
  }
141
141
  }
@@ -273,7 +273,7 @@ class Event {
273
273
  */
274
274
  onTouchStart(event) {
275
275
  const priv = privatePool.get(this);
276
- priv.selectedCellBeforeTouchEnd = this.selections.getCell().cellRange;
276
+ priv.selectedCellBeforeTouchEnd = this.selectionManager.getFocusSelection().cellRange;
277
277
  this.touchApplied = true;
278
278
  this.onMouseDown(event);
279
279
  }
@@ -285,8 +285,9 @@ class Event {
285
285
  * @param {MouseEvent} event The mouse event object.
286
286
  */
287
287
  onTouchEnd(event) {
288
+ var _this$parentCell;
288
289
  const target = event.target;
289
- const parentCellCoords = this.parentCell(target)?.coords;
290
+ const parentCellCoords = (_this$parentCell = this.parentCell(target)) === null || _this$parentCell === void 0 ? void 0 : _this$parentCell.coords;
290
291
  const isCellsRange = isDefined(parentCellCoords) && parentCellCoords.row >= 0 && parentCellCoords.col >= 0;
291
292
  const isEventCancelable = event.cancelable && isCellsRange && this.wtSettings.getSetting('isDataViewInstance');
292
293
 
@@ -50,8 +50,8 @@ class WalkontableFacade {
50
50
  return this._wot.cloneOverlay; // todo create facade
51
51
  }
52
52
 
53
- get selections() {
54
- return this._wot.selections; // todo create facade
53
+ get selectionManager() {
54
+ return this._wot.selectionManager; // todo create facade
55
55
  }
56
56
 
57
57
  get wtViewport() {
@@ -46,8 +46,8 @@ export default class WalkontableFacade {
46
46
  return this._wot.cloneOverlay; // todo create facade
47
47
  }
48
48
 
49
- get selections() {
50
- return this._wot.selections; // todo create facade
49
+ get selectionManager() {
50
+ return this._wot.selectionManager; // todo create facade
51
51
  }
52
52
 
53
53
  get wtViewport() {
@@ -12,8 +12,16 @@ exports.CellRange = _range.default;
12
12
  var _core = _interopRequireDefault(require("./facade/core"));
13
13
  exports.default = _core.default;
14
14
  exports.Core = _core.default;
15
- var _selection = _interopRequireDefault(require("./selection"));
16
- exports.Selection = _selection.default;
15
+ var _selection = require("./selection");
16
+ exports.Selection = _selection.Selection;
17
+ exports.HIGHLIGHT_ACTIVE_HEADER_TYPE = _selection.ACTIVE_HEADER_TYPE;
18
+ exports.HIGHLIGHT_AREA_TYPE = _selection.AREA_TYPE;
19
+ exports.HIGHLIGHT_FOCUS_TYPE = _selection.FOCUS_TYPE;
20
+ exports.HIGHLIGHT_FILL_TYPE = _selection.FILL_TYPE;
21
+ exports.HIGHLIGHT_HEADER_TYPE = _selection.HEADER_TYPE;
22
+ exports.HIGHLIGHT_ROW_TYPE = _selection.ROW_TYPE;
23
+ exports.HIGHLIGHT_COLUMN_TYPE = _selection.COLUMN_TYPE;
24
+ exports.HIGHLIGHT_CUSTOM_SELECTION_TYPE = _selection.CUSTOM_SELECTION_TYPE;
17
25
  var Renderer = _interopRequireWildcard(require("./renderer"));
18
26
  exports.Renderer = Renderer;
19
27
  var _orderView = require("./utils/orderView");
@@ -3,8 +3,8 @@ import ViewportRowsCalculator from "./calculator/viewportRows.mjs";
3
3
  import CellCoords from "./cell/coords.mjs";
4
4
  import CellRange from "./cell/range.mjs";
5
5
  import Walkontable from "./facade/core.mjs";
6
- import Selection from "./selection.mjs";
6
+ import { Selection, ACTIVE_HEADER_TYPE, AREA_TYPE, FOCUS_TYPE, FILL_TYPE, HEADER_TYPE, ROW_TYPE, COLUMN_TYPE, CUSTOM_SELECTION_TYPE } from "./selection/index.mjs";
7
7
  import * as Renderer from "./renderer/index.mjs";
8
8
  import { OrderView, SharedOrderView } from "./utils/orderView/index.mjs";
9
9
  import { getListenersCounter } from "../../../eventManager.mjs";
10
- export { ViewportColumnsCalculator, ViewportRowsCalculator, CellCoords, CellRange, Walkontable as default, Walkontable as Core, Selection, Renderer, OrderView, SharedOrderView, getListenersCounter };
10
+ export { ViewportColumnsCalculator, ViewportRowsCalculator, CellCoords, CellRange, Walkontable as default, Walkontable as Core, Selection, ACTIVE_HEADER_TYPE as HIGHLIGHT_ACTIVE_HEADER_TYPE, AREA_TYPE as HIGHLIGHT_AREA_TYPE, FOCUS_TYPE as HIGHLIGHT_FOCUS_TYPE, FILL_TYPE as HIGHLIGHT_FILL_TYPE, HEADER_TYPE as HIGHLIGHT_HEADER_TYPE, ROW_TYPE as HIGHLIGHT_ROW_TYPE, COLUMN_TYPE as HIGHLIGHT_COLUMN_TYPE, CUSTOM_SELECTION_TYPE as HIGHLIGHT_CUSTOM_SELECTION_TYPE, Renderer, OrderView, SharedOrderView, getListenersCounter };
@@ -9,6 +9,9 @@ var _console = require("../../../../helpers/console");
9
9
  var _constants = require("./constants");
10
10
  var _clone = _interopRequireDefault(require("../core/clone"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
14
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
15
  /**
13
16
  * Creates an overlay over the original Walkontable instance. The overlay renders the clone of the original Walkontable
14
17
  * and (optionally) implements behavior needed for native horizontal and vertical scrolling.
@@ -18,14 +21,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
21
  * @property {Walkontable} wot The Walkontable instance.
19
22
  */
20
23
  class Overlay {
21
- /**
22
- * The Walkontable settings.
23
- *
24
- * @private
25
- * @type {Settings}
26
- */
27
- wtSettings = null;
28
-
29
24
  /**
30
25
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
31
26
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -34,6 +29,13 @@ class Overlay {
34
29
  * @param {DomBindings} domBindings Dom elements bound to the current instance.
35
30
  */
36
31
  constructor(wotInstance, facadeGetter, type, wtSettings, domBindings) {
32
+ /**
33
+ * The Walkontable settings.
34
+ *
35
+ * @private
36
+ * @type {Settings}
37
+ */
38
+ _defineProperty(this, "wtSettings", null);
37
39
  (0, _object.defineGetter)(this, 'wot', wotInstance, {
38
40
  writable: false
39
41
  });
@@ -279,7 +281,7 @@ class Overlay {
279
281
  // todo ioc , or factor func if used only here
280
282
  event: this.wot.wtEvent,
281
283
  // todo ioc , or factory func if used only here
282
- selections: this.wot.selections // todo ioc , or factory func if used only here
284
+ selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
283
285
  });
284
286
  }
285
287
 
@@ -1,4 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
5
  import { getScrollableElement, getTrimmingContainer, getScrollbarWidth } from "../../../../helpers/dom/element.mjs";
3
6
  import { defineGetter } from "../../../../helpers/object.mjs";
4
7
  import { arrayEach } from "../../../../helpers/array.mjs";
@@ -14,14 +17,6 @@ import Clone from "../core/clone.mjs";
14
17
  * @property {Walkontable} wot The Walkontable instance.
15
18
  */
16
19
  export class Overlay {
17
- /**
18
- * The Walkontable settings.
19
- *
20
- * @private
21
- * @type {Settings}
22
- */
23
- wtSettings = null;
24
-
25
20
  /**
26
21
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
27
22
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -30,6 +25,13 @@ export class Overlay {
30
25
  * @param {DomBindings} domBindings Dom elements bound to the current instance.
31
26
  */
32
27
  constructor(wotInstance, facadeGetter, type, wtSettings, domBindings) {
28
+ /**
29
+ * The Walkontable settings.
30
+ *
31
+ * @private
32
+ * @type {Settings}
33
+ */
34
+ _defineProperty(this, "wtSettings", null);
33
35
  defineGetter(this, 'wot', wotInstance, {
34
36
  writable: false
35
37
  });
@@ -275,7 +277,7 @@ export class Overlay {
275
277
  // todo ioc , or factor func if used only here
276
278
  event: this.wot.wtEvent,
277
279
  // todo ioc , or factory func if used only here
278
- selections: this.wot.selections // todo ioc , or factory func if used only here
280
+ selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
279
281
  });
280
282
  }
281
283
 
@@ -7,18 +7,13 @@ var _bottom = _interopRequireDefault(require("./../table/bottom"));
7
7
  var _base = require("./_base");
8
8
  var _constants = require("./constants");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
13
  /**
11
14
  * @class BottomOverlay
12
15
  */
13
16
  class BottomOverlay extends _base.Overlay {
14
- /**
15
- * Cached value which holds the previous value of the `fixedRowsBottom` option.
16
- * It is used as a comparison value that can be used to detect changes in that value.
17
- *
18
- * @type {number}
19
- */
20
- cachedFixedRowsBottom = -1;
21
-
22
17
  /**
23
18
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
24
19
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -27,6 +22,13 @@ class BottomOverlay extends _base.Overlay {
27
22
  */
28
23
  constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
29
24
  super(wotInstance, facadeGetter, _constants.CLONE_BOTTOM, wtSettings, domBindings);
25
+ /**
26
+ * Cached value which holds the previous value of the `fixedRowsBottom` option.
27
+ * It is used as a comparison value that can be used to detect changes in that value.
28
+ *
29
+ * @type {number}
30
+ */
31
+ _defineProperty(this, "cachedFixedRowsBottom", -1);
30
32
  this.cachedFixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
31
33
  }
32
34
 
@@ -1,4 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
5
  import { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass } from "../../../../helpers/dom/element.mjs";
3
6
  import BottomOverlayTable from "./../table/bottom.mjs";
4
7
  import { Overlay } from "./_base.mjs";
@@ -7,14 +10,6 @@ import { CLONE_BOTTOM } from "./constants.mjs";
7
10
  * @class BottomOverlay
8
11
  */
9
12
  export class BottomOverlay extends Overlay {
10
- /**
11
- * Cached value which holds the previous value of the `fixedRowsBottom` option.
12
- * It is used as a comparison value that can be used to detect changes in that value.
13
- *
14
- * @type {number}
15
- */
16
- cachedFixedRowsBottom = -1;
17
-
18
13
  /**
19
14
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
20
15
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -23,6 +18,13 @@ export class BottomOverlay extends Overlay {
23
18
  */
24
19
  constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
25
20
  super(wotInstance, facadeGetter, CLONE_BOTTOM, wtSettings, domBindings);
21
+ /**
22
+ * Cached value which holds the previous value of the `fixedRowsBottom` option.
23
+ * It is used as a comparison value that can be used to detect changes in that value.
24
+ *
25
+ * @type {number}
26
+ */
27
+ _defineProperty(this, "cachedFixedRowsBottom", -1);
26
28
  this.cachedFixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
27
29
  }
28
30
 
@@ -5,6 +5,7 @@ require("core-js/modules/es.error.cause.js");
5
5
  var _element = require("../../../../helpers/dom/element");
6
6
  var _inlineStart = _interopRequireDefault(require("../table/inlineStart"));
7
7
  var _base = require("./_base");
8
+ var _selection = require("../selection");
8
9
  var _constants = require("./constants");
9
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
11
  /**
@@ -172,15 +173,10 @@ class InlineStartOverlay extends _base.Overlay {
172
173
  * Adjust overlay root childs size.
173
174
  */
174
175
  adjustRootChildrenSize() {
175
- var _selections$getCell$g;
176
176
  const {
177
177
  holder
178
178
  } = this.clone.wtTable;
179
- const {
180
- selections
181
- } = this.wot;
182
- const facade = this.facadeGetter();
183
- const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
179
+ const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
184
180
  this.clone.wtTable.hider.style.height = this.hider.style.height;
185
181
  holder.style.height = holder.parentNode.style.height;
186
182
  // Add selection corner protruding part to the holder total width to make sure that
@@ -2,6 +2,7 @@ import "core-js/modules/es.error.cause.js";
2
2
  import { addClass, getScrollbarWidth, getScrollLeft, getWindowScrollTop, hasClass, outerWidth, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
3
3
  import InlineStartOverlayTable from "../table/inlineStart.mjs";
4
4
  import { Overlay } from "./_base.mjs";
5
+ import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
5
6
  import { CLONE_INLINE_START } from "./constants.mjs";
6
7
  /**
7
8
  * @class InlineStartOverlay
@@ -168,15 +169,10 @@ export class InlineStartOverlay extends Overlay {
168
169
  * Adjust overlay root childs size.
169
170
  */
170
171
  adjustRootChildrenSize() {
171
- var _selections$getCell$g;
172
172
  const {
173
173
  holder
174
174
  } = this.clone.wtTable;
175
- const {
176
- selections
177
- } = this.wot;
178
- const facade = this.facadeGetter();
179
- const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
175
+ const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
180
176
  this.clone.wtTable.hider.style.height = this.hider.style.height;
181
177
  holder.style.height = holder.parentNode.style.height;
182
178
  // Add selection corner protruding part to the holder total width to make sure that
@@ -5,20 +5,16 @@ require("core-js/modules/es.error.cause.js");
5
5
  var _element = require("../../../../helpers/dom/element");
6
6
  var _top = _interopRequireDefault(require("./../table/top"));
7
7
  var _base = require("./_base");
8
+ var _selection = require("../selection");
8
9
  var _constants = require("./constants");
9
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
14
  /**
11
15
  * @class TopOverlay
12
16
  */
13
17
  class TopOverlay extends _base.Overlay {
14
- /**
15
- * Cached value which holds the previous value of the `fixedRowsTop` option.
16
- * It is used as a comparison value that can be used to detect changes in this value.
17
- *
18
- * @type {number}
19
- */
20
- cachedFixedRowsTop = -1;
21
-
22
18
  /**
23
19
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
24
20
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -27,6 +23,13 @@ class TopOverlay extends _base.Overlay {
27
23
  */
28
24
  constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
29
25
  super(wotInstance, facadeGetter, _constants.CLONE_TOP, wtSettings, domBindings);
26
+ /**
27
+ * Cached value which holds the previous value of the `fixedRowsTop` option.
28
+ * It is used as a comparison value that can be used to detect changes in this value.
29
+ *
30
+ * @type {number}
31
+ */
32
+ _defineProperty(this, "cachedFixedRowsTop", -1);
30
33
  this.cachedFixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
31
34
  }
32
35
 
@@ -197,15 +200,10 @@ class TopOverlay extends _base.Overlay {
197
200
  * Adjust overlay root childs size.
198
201
  */
199
202
  adjustRootChildrenSize() {
200
- var _selections$getCell$g;
201
203
  const {
202
204
  holder
203
205
  } = this.clone.wtTable;
204
- const {
205
- selections
206
- } = this.wot;
207
- const facade = this.facadeGetter();
208
- const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
206
+ const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
209
207
  this.clone.wtTable.hider.style.width = this.hider.style.width;
210
208
  holder.style.width = holder.parentNode.style.width;
211
209
  // Add selection corner protruding part to the holder total height to make sure that
@@ -1,20 +1,16 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
5
  import { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
3
6
  import TopOverlayTable from "./../table/top.mjs";
4
7
  import { Overlay } from "./_base.mjs";
8
+ import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
5
9
  import { CLONE_TOP } from "./constants.mjs";
6
10
  /**
7
11
  * @class TopOverlay
8
12
  */
9
13
  export class TopOverlay extends Overlay {
10
- /**
11
- * Cached value which holds the previous value of the `fixedRowsTop` option.
12
- * It is used as a comparison value that can be used to detect changes in this value.
13
- *
14
- * @type {number}
15
- */
16
- cachedFixedRowsTop = -1;
17
-
18
14
  /**
19
15
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
20
16
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -23,6 +19,13 @@ export class TopOverlay extends Overlay {
23
19
  */
24
20
  constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
25
21
  super(wotInstance, facadeGetter, CLONE_TOP, wtSettings, domBindings);
22
+ /**
23
+ * Cached value which holds the previous value of the `fixedRowsTop` option.
24
+ * It is used as a comparison value that can be used to detect changes in this value.
25
+ *
26
+ * @type {number}
27
+ */
28
+ _defineProperty(this, "cachedFixedRowsTop", -1);
26
29
  this.cachedFixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
27
30
  }
28
31
 
@@ -193,15 +196,10 @@ export class TopOverlay extends Overlay {
193
196
  * Adjust overlay root childs size.
194
197
  */
195
198
  adjustRootChildrenSize() {
196
- var _selections$getCell$g;
197
199
  const {
198
200
  holder
199
201
  } = this.clone.wtTable;
200
- const {
201
- selections
202
- } = this.wot;
203
- const facade = this.facadeGetter();
204
- const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
202
+ const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
205
203
  this.clone.wtTable.hider.style.width = this.hider.style.width;
206
204
  holder.style.width = holder.parentNode.style.width;
207
205
  // Add selection corner protruding part to the holder total height to make sure that
@@ -1,28 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
4
5
  var _element = require("../../../../helpers/dom/element");
5
6
  var _topInlineStartCorner = _interopRequireDefault(require("../table/topInlineStartCorner"));
6
7
  var _base = require("./_base");
7
8
  var _constants = require("./constants");
8
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
13
  /**
10
14
  * @class TopInlineStartCornerOverlay
11
15
  */
12
16
  class TopInlineStartCornerOverlay extends _base.Overlay {
13
- /**
14
- * The instance of the Top overlay.
15
- *
16
- * @type {TopOverlay}
17
- */
18
- topOverlay;
19
- /**
20
- * The instance of the InlineStart overlay.
21
- *
22
- * @type {InlineStartOverlay}
23
- */
24
- inlineStartOverlay;
25
-
26
17
  /**
27
18
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
28
19
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -33,6 +24,18 @@ class TopInlineStartCornerOverlay extends _base.Overlay {
33
24
  */
34
25
  constructor(wotInstance, facadeGetter, wtSettings, domBindings, topOverlay, inlineStartOverlay) {
35
26
  super(wotInstance, facadeGetter, _constants.CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);
27
+ /**
28
+ * The instance of the Top overlay.
29
+ *
30
+ * @type {TopOverlay}
31
+ */
32
+ _defineProperty(this, "topOverlay", void 0);
33
+ /**
34
+ * The instance of the InlineStart overlay.
35
+ *
36
+ * @type {InlineStartOverlay}
37
+ */
38
+ _defineProperty(this, "inlineStartOverlay", void 0);
36
39
  this.topOverlay = topOverlay;
37
40
  this.inlineStartOverlay = inlineStartOverlay;
38
41
  }
@@ -1,3 +1,7 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
5
  import { outerHeight, outerWidth, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
2
6
  import TopInlineStartCornerOverlayTable from "../table/topInlineStartCorner.mjs";
3
7
  import { Overlay } from "./_base.mjs";
@@ -6,19 +10,6 @@ import { CLONE_TOP_INLINE_START_CORNER } from "./constants.mjs";
6
10
  * @class TopInlineStartCornerOverlay
7
11
  */
8
12
  export class TopInlineStartCornerOverlay extends Overlay {
9
- /**
10
- * The instance of the Top overlay.
11
- *
12
- * @type {TopOverlay}
13
- */
14
- topOverlay;
15
- /**
16
- * The instance of the InlineStart overlay.
17
- *
18
- * @type {InlineStartOverlay}
19
- */
20
- inlineStartOverlay;
21
-
22
13
  /**
23
14
  * @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
24
15
  * @param {FacadeGetter} facadeGetter Function which return proper facade.
@@ -29,6 +20,18 @@ export class TopInlineStartCornerOverlay extends Overlay {
29
20
  */
30
21
  constructor(wotInstance, facadeGetter, wtSettings, domBindings, topOverlay, inlineStartOverlay) {
31
22
  super(wotInstance, facadeGetter, CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);
23
+ /**
24
+ * The instance of the Top overlay.
25
+ *
26
+ * @type {TopOverlay}
27
+ */
28
+ _defineProperty(this, "topOverlay", void 0);
29
+ /**
30
+ * The instance of the InlineStart overlay.
31
+ *
32
+ * @type {InlineStartOverlay}
33
+ */
34
+ _defineProperty(this, "inlineStartOverlay", void 0);
32
35
  this.topOverlay = topOverlay;
33
36
  this.inlineStartOverlay = inlineStartOverlay;
34
37
  }