handsontable 0.0.0-next-2b3d6d8-20230623 → 0.0.0-next-74a68c1-20230627

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 (279) hide show
  1. package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
  2. package/3rdparty/walkontable/src/cell/coords.js +61 -12
  3. package/3rdparty/walkontable/src/cell/coords.mjs +61 -12
  4. package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
  5. package/3rdparty/walkontable/src/cell/range.js +44 -7
  6. package/3rdparty/walkontable/src/cell/range.mjs +44 -7
  7. package/3rdparty/walkontable/src/core/_base.js +9 -3
  8. package/3rdparty/walkontable/src/core/_base.mjs +9 -3
  9. package/3rdparty/walkontable/src/core/clone.js +2 -2
  10. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  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 +7 -7
  14. package/3rdparty/walkontable/src/event.mjs +7 -7
  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 +1 -1
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  21. package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -4
  22. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
  23. package/3rdparty/walkontable/src/overlay/top.js +2 -4
  24. package/3rdparty/walkontable/src/overlay/top.mjs +2 -4
  25. package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
  26. package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
  27. package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
  28. package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
  29. package/3rdparty/walkontable/src/selection/constants.js +63 -0
  30. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  31. package/3rdparty/walkontable/src/selection/index.js +30 -0
  32. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  33. package/3rdparty/walkontable/src/selection/manager.js +329 -0
  34. package/3rdparty/walkontable/src/selection/manager.mjs +323 -0
  35. package/3rdparty/walkontable/src/selection/scanner.js +364 -0
  36. package/3rdparty/walkontable/src/selection/scanner.mjs +360 -0
  37. package/3rdparty/walkontable/src/selection/selection.js +133 -0
  38. package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
  49. package/3rdparty/walkontable/src/table.js +7 -79
  50. package/3rdparty/walkontable/src/table.mjs +8 -80
  51. package/base.js +2 -2
  52. package/base.mjs +2 -2
  53. package/core.d.ts +5 -3
  54. package/core.js +127 -309
  55. package/core.mjs +127 -309
  56. package/dataMap/metaManager/metaSchema.js +19 -0
  57. package/dataMap/metaManager/metaSchema.mjs +19 -0
  58. package/dist/handsontable.css +8 -3
  59. package/dist/handsontable.full.css +8 -3
  60. package/dist/handsontable.full.js +13762 -10716
  61. package/dist/handsontable.full.min.css +3 -3
  62. package/dist/handsontable.full.min.js +115 -115
  63. package/dist/handsontable.js +16626 -13580
  64. package/dist/handsontable.min.css +3 -3
  65. package/dist/handsontable.min.js +4 -4
  66. package/editorManager.js +21 -94
  67. package/editorManager.mjs +26 -98
  68. package/editors/textEditor/textEditor.js +3 -11
  69. package/editors/textEditor/textEditor.mjs +4 -12
  70. package/helpers/mixed.js +1 -1
  71. package/helpers/mixed.mjs +1 -1
  72. package/helpers/number.d.ts +1 -0
  73. package/helpers/number.js +18 -0
  74. package/helpers/number.mjs +17 -0
  75. package/package.json +1 -1
  76. package/pluginHooks.d.ts +5 -1
  77. package/pluginHooks.js +89 -1
  78. package/pluginHooks.mjs +89 -1
  79. package/plugins/collapsibleColumns/collapsibleColumns.js +81 -24
  80. package/plugins/collapsibleColumns/collapsibleColumns.mjs +81 -24
  81. package/plugins/columnSorting/columnSorting.js +50 -8
  82. package/plugins/columnSorting/columnSorting.mjs +49 -9
  83. package/plugins/columnSorting/index.js +4 -2
  84. package/plugins/columnSorting/index.mjs +1 -1
  85. package/plugins/comments/comments.js +11 -4
  86. package/plugins/comments/comments.mjs +11 -4
  87. package/plugins/contextMenu/contextMenu.d.ts +1 -1
  88. package/plugins/contextMenu/contextMenu.js +80 -29
  89. package/plugins/contextMenu/contextMenu.mjs +81 -30
  90. package/plugins/contextMenu/predefinedItems/alignment.js +7 -0
  91. package/plugins/contextMenu/predefinedItems/alignment.mjs +7 -0
  92. package/plugins/contextMenu/predefinedItems/clearColumn.js +5 -3
  93. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +5 -3
  94. package/plugins/contextMenu/predefinedItems/columnLeft.js +5 -3
  95. package/plugins/contextMenu/predefinedItems/columnLeft.mjs +5 -3
  96. package/plugins/contextMenu/predefinedItems/columnRight.js +5 -3
  97. package/plugins/contextMenu/predefinedItems/columnRight.mjs +5 -3
  98. package/plugins/contextMenu/predefinedItems/readOnly.js +7 -0
  99. package/plugins/contextMenu/predefinedItems/readOnly.mjs +7 -0
  100. package/plugins/contextMenu/predefinedItems/removeColumn.js +7 -5
  101. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +5 -3
  102. package/plugins/contextMenu/predefinedItems/removeRow.js +7 -5
  103. package/plugins/contextMenu/predefinedItems/removeRow.mjs +5 -3
  104. package/plugins/contextMenu/predefinedItems/rowAbove.js +5 -3
  105. package/plugins/contextMenu/predefinedItems/rowAbove.mjs +5 -3
  106. package/plugins/contextMenu/predefinedItems/rowBelow.js +5 -3
  107. package/plugins/contextMenu/predefinedItems/rowBelow.mjs +5 -3
  108. package/plugins/contextMenu/utils.js +25 -16
  109. package/plugins/contextMenu/utils.mjs +24 -15
  110. package/plugins/copyPaste/contextMenuItem/copy.js +7 -0
  111. package/plugins/copyPaste/contextMenuItem/copy.mjs +7 -0
  112. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +9 -1
  113. package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +9 -1
  114. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +9 -1
  115. package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +9 -1
  116. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +9 -1
  117. package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +9 -1
  118. package/plugins/copyPaste/contextMenuItem/cut.js +7 -0
  119. package/plugins/copyPaste/contextMenuItem/cut.mjs +7 -0
  120. package/plugins/copyPaste/copyPaste.js +5 -1
  121. package/plugins/copyPaste/copyPaste.mjs +5 -1
  122. package/plugins/customBorders/customBorders.js +25 -53
  123. package/plugins/customBorders/customBorders.mjs +26 -54
  124. package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
  125. package/plugins/dropdownMenu/dropdownMenu.js +94 -30
  126. package/plugins/dropdownMenu/dropdownMenu.mjs +94 -30
  127. package/plugins/filters/filters.js +62 -42
  128. package/plugins/filters/filters.mjs +61 -41
  129. package/plugins/mergeCells/mergeCells.js +5 -18
  130. package/plugins/mergeCells/mergeCells.mjs +5 -18
  131. package/plugins/multiColumnSorting/multiColumnSorting.js +42 -3
  132. package/plugins/multiColumnSorting/multiColumnSorting.mjs +42 -3
  133. package/plugins/nestedHeaders/nestedHeaders.js +132 -10
  134. package/plugins/nestedHeaders/nestedHeaders.mjs +132 -10
  135. package/plugins/nestedHeaders/stateManager/index.js +37 -0
  136. package/plugins/nestedHeaders/stateManager/index.mjs +37 -0
  137. package/plugins/nestedRows/nestedRows.js +52 -7
  138. package/plugins/nestedRows/nestedRows.mjs +52 -7
  139. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  140. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  141. package/selection/highlight/highlight.js +312 -89
  142. package/selection/highlight/highlight.mjs +302 -85
  143. package/selection/highlight/types/activeHeader.js +10 -9
  144. package/selection/highlight/types/activeHeader.mjs +10 -8
  145. package/selection/highlight/types/area.js +12 -27
  146. package/selection/highlight/types/area.mjs +16 -30
  147. package/selection/highlight/types/areaLayered.js +54 -0
  148. package/selection/highlight/types/areaLayered.mjs +49 -0
  149. package/selection/highlight/types/column.js +50 -0
  150. package/selection/highlight/types/column.mjs +45 -0
  151. package/selection/highlight/types/customSelection.js +7 -10
  152. package/selection/highlight/types/customSelection.mjs +7 -9
  153. package/selection/highlight/types/fill.js +5 -8
  154. package/selection/highlight/types/fill.mjs +5 -7
  155. package/selection/highlight/types/{cell.js → focus.js} +5 -8
  156. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  157. package/selection/highlight/types/header.js +10 -20
  158. package/selection/highlight/types/header.mjs +10 -19
  159. package/selection/highlight/types/{index.js → row.js} +27 -31
  160. package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
  161. package/selection/highlight/visualSelection.js +31 -27
  162. package/selection/highlight/visualSelection.mjs +31 -27
  163. package/selection/index.js +4 -7
  164. package/selection/index.mjs +2 -3
  165. package/selection/mouseEventHandler.js +1 -1
  166. package/selection/mouseEventHandler.mjs +1 -1
  167. package/selection/range.js +8 -8
  168. package/selection/range.mjs +8 -8
  169. package/selection/selection.js +315 -181
  170. package/selection/selection.mjs +310 -180
  171. package/selection/transformation.js +233 -96
  172. package/selection/transformation.mjs +230 -93
  173. package/selection/utils.js +12 -36
  174. package/selection/utils.mjs +13 -36
  175. package/settings.d.ts +1 -0
  176. package/shortcutContexts/commands/editor/closeAndSave.js +15 -0
  177. package/shortcutContexts/commands/editor/closeAndSave.mjs +10 -0
  178. package/shortcutContexts/commands/editor/closeWithoutSaving.js +13 -0
  179. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
  180. package/shortcutContexts/commands/editor/fastOpen.js +16 -0
  181. package/shortcutContexts/commands/editor/fastOpen.mjs +11 -0
  182. package/shortcutContexts/commands/editor/index.js +16 -0
  183. package/shortcutContexts/commands/editor/index.mjs +12 -0
  184. package/shortcutContexts/commands/editor/open.js +29 -0
  185. package/shortcutContexts/commands/editor/open.mjs +24 -0
  186. package/shortcutContexts/commands/emptySelectedCells.js +12 -0
  187. package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
  188. package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
  189. package/shortcutContexts/commands/extendCellsSelection/down.mjs +10 -0
  190. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
  191. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +16 -0
  192. package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
  193. package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
  194. package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
  195. package/shortcutContexts/commands/extendCellsSelection/left.mjs +10 -0
  196. package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
  197. package/shortcutContexts/commands/extendCellsSelection/right.mjs +10 -0
  198. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
  199. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +14 -0
  200. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +22 -0
  201. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +17 -0
  202. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +17 -0
  203. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +12 -0
  204. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +17 -0
  205. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +12 -0
  206. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +40 -0
  207. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +35 -0
  208. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +40 -0
  209. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +35 -0
  210. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +22 -0
  211. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +17 -0
  212. package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
  213. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +14 -0
  214. package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
  215. package/shortcutContexts/commands/extendCellsSelection/up.mjs +10 -0
  216. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
  217. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +16 -0
  218. package/shortcutContexts/commands/index.js +53 -0
  219. package/shortcutContexts/commands/index.mjs +49 -0
  220. package/shortcutContexts/commands/moveCellSelection/down.js +12 -0
  221. package/shortcutContexts/commands/moveCellSelection/down.mjs +7 -0
  222. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +29 -0
  223. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +24 -0
  224. package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
  225. package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
  226. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +13 -0
  227. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
  228. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +13 -0
  229. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
  230. package/shortcutContexts/commands/moveCellSelection/left.js +11 -0
  231. package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
  232. package/shortcutContexts/commands/moveCellSelection/right.js +11 -0
  233. package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
  234. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +16 -0
  235. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +11 -0
  236. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +17 -0
  237. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +12 -0
  238. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +13 -0
  239. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +8 -0
  240. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +16 -0
  241. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +11 -0
  242. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +36 -0
  243. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +31 -0
  244. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +36 -0
  245. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +31 -0
  246. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +16 -0
  247. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +11 -0
  248. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +18 -0
  249. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +13 -0
  250. package/shortcutContexts/commands/moveCellSelection/up.js +12 -0
  251. package/shortcutContexts/commands/moveCellSelection/up.mjs +7 -0
  252. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +29 -0
  253. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +24 -0
  254. package/shortcutContexts/commands/populateSelectedCellsData.js +35 -0
  255. package/shortcutContexts/commands/populateSelectedCellsData.mjs +30 -0
  256. package/shortcutContexts/commands/scrollToFocusedCell.js +38 -0
  257. package/shortcutContexts/commands/scrollToFocusedCell.mjs +33 -0
  258. package/shortcutContexts/commands/selectAll.js +11 -0
  259. package/shortcutContexts/commands/selectAll.mjs +6 -0
  260. package/shortcutContexts/constants.js +19 -0
  261. package/shortcutContexts/constants.mjs +12 -0
  262. package/shortcutContexts/editor.js +29 -0
  263. package/shortcutContexts/editor.mjs +25 -0
  264. package/shortcutContexts/grid.js +252 -0
  265. package/shortcutContexts/grid.mjs +248 -0
  266. package/shortcutContexts/index.js +29 -0
  267. package/shortcutContexts/index.mjs +15 -0
  268. package/shortcuts/manager.js +2 -0
  269. package/shortcuts/manager.mjs +2 -0
  270. package/shortcuts/recorder.js +2 -2
  271. package/shortcuts/recorder.mjs +2 -2
  272. package/shortcuts/utils.js +21 -5
  273. package/shortcuts/utils.mjs +20 -4
  274. package/tableView.js +58 -9
  275. package/tableView.mjs +58 -9
  276. package/3rdparty/walkontable/src/selection.js +0 -355
  277. package/3rdparty/walkontable/src/selection.mjs +0 -349
  278. package/selection/highlight/constants.js +0 -16
  279. package/selection/highlight/constants.mjs +0 -6
@@ -79,6 +79,15 @@ var calculatedRows = {
79
79
  */
80
80
  getVisibleRowsCount: function getVisibleRowsCount() {
81
81
  return this.dataAccessObject.countRowsVisible;
82
+ },
83
+ /**
84
+ * Get the number of rendered column headers.
85
+ *
86
+ * @returns {number}
87
+ * @this Table
88
+ */
89
+ getColumnHeadersCount: function getColumnHeadersCount() {
90
+ return this.dataAccessObject.columnHeaders.length;
82
91
  }
83
92
  };
84
93
  defineGetter(calculatedRows, 'MIXIN_NAME', MIXIN_NAME, {
@@ -75,6 +75,15 @@ var stickyColumnsStart = {
75
75
  */
76
76
  getVisibleColumnsCount: function getVisibleColumnsCount() {
77
77
  return this.getRenderedColumnsCount();
78
+ },
79
+ /**
80
+ * Get the number of rendered row headers.
81
+ *
82
+ * @returns {number}
83
+ * @this Table
84
+ */
85
+ getRowHeadersCount: function getRowHeadersCount() {
86
+ return this.dataAccessObject.rowHeaders.length;
78
87
  }
79
88
  };
80
89
  (0, _object.defineGetter)(stickyColumnsStart, 'MIXIN_NAME', MIXIN_NAME, {
@@ -71,6 +71,15 @@ var stickyColumnsStart = {
71
71
  */
72
72
  getVisibleColumnsCount: function getVisibleColumnsCount() {
73
73
  return this.getRenderedColumnsCount();
74
+ },
75
+ /**
76
+ * Get the number of rendered row headers.
77
+ *
78
+ * @returns {number}
79
+ * @this Table
80
+ */
81
+ getRowHeadersCount: function getRowHeadersCount() {
82
+ return this.dataAccessObject.rowHeaders.length;
74
83
  }
75
84
  };
76
85
  defineGetter(stickyColumnsStart, 'MIXIN_NAME', MIXIN_NAME, {
@@ -80,6 +80,15 @@ var stickyRowsBottom = {
80
80
  */
81
81
  getVisibleRowsCount: function getVisibleRowsCount() {
82
82
  return this.getRenderedRowsCount();
83
+ },
84
+ /**
85
+ * Get the number of rendered column headers.
86
+ *
87
+ * @returns {number}
88
+ * @this Table
89
+ */
90
+ getColumnHeadersCount: function getColumnHeadersCount() {
91
+ return 0;
83
92
  }
84
93
  };
85
94
  (0, _object.defineGetter)(stickyRowsBottom, 'MIXIN_NAME', MIXIN_NAME, {
@@ -76,6 +76,15 @@ var stickyRowsBottom = {
76
76
  */
77
77
  getVisibleRowsCount: function getVisibleRowsCount() {
78
78
  return this.getRenderedRowsCount();
79
+ },
80
+ /**
81
+ * Get the number of rendered column headers.
82
+ *
83
+ * @returns {number}
84
+ * @this Table
85
+ */
86
+ getColumnHeadersCount: function getColumnHeadersCount() {
87
+ return 0;
79
88
  }
80
89
  };
81
90
  defineGetter(stickyRowsBottom, 'MIXIN_NAME', MIXIN_NAME, {
@@ -75,6 +75,15 @@ var stickyRowsTop = {
75
75
  */
76
76
  getVisibleRowsCount: function getVisibleRowsCount() {
77
77
  return this.getRenderedRowsCount();
78
+ },
79
+ /**
80
+ * Get the number of rendered column headers.
81
+ *
82
+ * @returns {number}
83
+ * @this Table
84
+ */
85
+ getColumnHeadersCount: function getColumnHeadersCount() {
86
+ return this.dataAccessObject.columnHeaders.length;
78
87
  }
79
88
  };
80
89
  (0, _object.defineGetter)(stickyRowsTop, 'MIXIN_NAME', MIXIN_NAME, {
@@ -71,6 +71,15 @@ var stickyRowsTop = {
71
71
  */
72
72
  getVisibleRowsCount: function getVisibleRowsCount() {
73
73
  return this.getRenderedRowsCount();
74
+ },
75
+ /**
76
+ * Get the number of rendered column headers.
77
+ *
78
+ * @returns {number}
79
+ * @this Table
80
+ */
81
+ getColumnHeadersCount: function getColumnHeadersCount() {
82
+ return this.dataAccessObject.columnHeaders.length;
74
83
  }
75
84
  };
76
85
  defineGetter(stickyRowsTop, 'MIXIN_NAME', MIXIN_NAME, {
@@ -2,16 +2,15 @@
2
2
 
3
3
  require("core-js/modules/es.symbol.iterator.js");
4
4
  require("core-js/modules/es.array.iterator.js");
5
+ require("core-js/modules/es.string.iterator.js");
5
6
  require("core-js/modules/web.dom-collections.iterator.js");
6
7
  require("core-js/modules/es.array.slice.js");
7
8
  require("core-js/modules/es.regexp.to-string.js");
9
+ require("core-js/modules/es.array.from.js");
8
10
  require("core-js/modules/es.regexp.exec.js");
9
11
  exports.__esModule = true;
10
12
  exports.default = void 0;
11
13
  require("core-js/modules/es.function.name.js");
12
- require("core-js/modules/es.array.from.js");
13
- require("core-js/modules/es.string.iterator.js");
14
- require("core-js/modules/es.array.includes.js");
15
14
  require("core-js/modules/es.object.to-string.js");
16
15
  require("core-js/modules/web.dom-collections.for-each.js");
17
16
  require("core-js/modules/es.symbol.to-primitive.js");
@@ -388,7 +387,7 @@ var Table = /*#__PURE__*/function () {
388
387
  wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
389
388
  wtOverlays.adjustElementsSize();
390
389
  } else {
391
- this.refreshSelections(runFastDraw);
390
+ this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
392
391
  }
393
392
  if (syncScroll) {
394
393
  wtOverlays.syncScrollWithMaster();
@@ -480,74 +479,6 @@ var Table = /*#__PURE__*/function () {
480
479
  }
481
480
  }
482
481
 
483
- /**
484
- * @param {string} className The CSS class name to remove from the table cells.
485
- */
486
- }, {
487
- key: "removeClassFromCells",
488
- value: function removeClassFromCells(className) {
489
- var nodes = this.TABLE.querySelectorAll(".".concat(className));
490
- for (var i = 0, len = nodes.length; i < len; i++) {
491
- (0, _element.removeClass)(nodes[i], className);
492
- }
493
- }
494
-
495
- /**
496
- * Refresh the table selection by re-rendering Selection instances connected with that instance.
497
- *
498
- * @param {boolean} fastDraw If fast drawing is enabled than additionally className clearing is applied.
499
- */
500
- }, {
501
- key: "refreshSelections",
502
- value: function refreshSelections(fastDraw) {
503
- var wtSettings = this.wtSettings;
504
- var selections = this.dataAccessObject.selections;
505
- if (!selections) {
506
- return;
507
- }
508
- var highlights = Array.from(selections);
509
- var len = highlights.length;
510
- if (fastDraw) {
511
- var classesToRemove = [];
512
- for (var i = 0; i < len; i++) {
513
- var _highlights$i$setting = highlights[i].settings,
514
- highlightHeaderClassName = _highlights$i$setting.highlightHeaderClassName,
515
- highlightRowClassName = _highlights$i$setting.highlightRowClassName,
516
- highlightColumnClassName = _highlights$i$setting.highlightColumnClassName;
517
- var classNames = highlights[i].classNames;
518
- var classNamesLength = classNames.length;
519
- for (var j = 0; j < classNamesLength; j++) {
520
- if (!classesToRemove.includes(classNames[j])) {
521
- classesToRemove.push(classNames[j]);
522
- }
523
- }
524
- if (highlightHeaderClassName && !classesToRemove.includes(highlightHeaderClassName)) {
525
- classesToRemove.push(highlightHeaderClassName);
526
- }
527
- if (highlightRowClassName && !classesToRemove.includes(highlightRowClassName)) {
528
- classesToRemove.push(highlightRowClassName);
529
- }
530
- if (highlightColumnClassName && !classesToRemove.includes(highlightColumnClassName)) {
531
- classesToRemove.push(highlightColumnClassName);
532
- }
533
- }
534
- var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');
535
- if (Array.isArray(additionalClassesToRemove)) {
536
- for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {
537
- classesToRemove.push(additionalClassesToRemove[_i]);
538
- }
539
- }
540
- var classesToRemoveLength = classesToRemove.length;
541
- for (var _i2 = 0; _i2 < classesToRemoveLength; _i2++) {
542
- // there was no rerender, so we need to remove classNames by ourselves
543
- this.removeClassFromCells(classesToRemove[_i2]);
544
- }
545
- }
546
- for (var _i3 = 0; _i3 < len; _i3++) {
547
- highlights[_i3].draw(this.facadeGetter(), fastDraw);
548
- }
549
- }
550
-
551
482
  /**
552
483
  * Get cell element at coords.
553
484
  * Negative coords.row or coords.col are used to retrieve header cells. If there are multiple header levels, the
@@ -681,14 +612,14 @@ var Table = /*#__PURE__*/function () {
681
612
  key: "getRowHeader",
682
613
  value: function getRowHeader(row) {
683
614
  var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
684
- if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
685
- return;
686
- }
687
615
  var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
688
616
  if (level >= rowHeadersCount) {
689
617
  return;
690
618
  }
691
- var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
619
+ var renderedRow = this.rowFilter.sourceToRendered(row);
620
+ var visibleRow = renderedRow < 0 ? this.rowFilter.sourceRowToVisibleColHeadedRow(row) : renderedRow;
621
+ var parentElement = renderedRow < 0 ? this.THEAD : this.TBODY;
622
+ var TR = parentElement.childNodes[visibleRow];
692
623
  return TR === null || TR === void 0 ? void 0 : TR.childNodes[level];
693
624
  }
694
625
 
@@ -701,9 +632,6 @@ var Table = /*#__PURE__*/function () {
701
632
  }, {
702
633
  key: "getRowHeaders",
703
634
  value: function getRowHeaders(row) {
704
- if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
705
- return [];
706
- }
707
635
  var THs = [];
708
636
  var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
709
637
  for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {
@@ -10,9 +10,6 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
10
10
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  import "core-js/modules/es.function.name.js";
13
- import "core-js/modules/es.array.from.js";
14
- import "core-js/modules/es.string.iterator.js";
15
- import "core-js/modules/es.array.includes.js";
16
13
  import "core-js/modules/es.object.to-string.js";
17
14
  import "core-js/modules/web.dom-collections.for-each.js";
18
15
  import "core-js/modules/es.symbol.to-primitive.js";
@@ -22,9 +19,11 @@ import "core-js/modules/es.symbol.description.js";
22
19
  import "core-js/modules/es.number.constructor.js";
23
20
  import "core-js/modules/es.symbol.iterator.js";
24
21
  import "core-js/modules/es.array.iterator.js";
22
+ import "core-js/modules/es.string.iterator.js";
25
23
  import "core-js/modules/web.dom-collections.iterator.js";
26
24
  import "core-js/modules/es.array.slice.js";
27
25
  import "core-js/modules/es.regexp.to-string.js";
26
+ import "core-js/modules/es.array.from.js";
28
27
  import "core-js/modules/es.regexp.exec.js";
29
28
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
30
29
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
@@ -32,7 +31,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
32
31
  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; }
33
32
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
34
33
  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); }
35
- import { hasClass, index, offset, removeClass, removeTextNodes, overlayContainsElement, closest, outerHeight, outerWidth, innerHeight, isVisible as _isVisible } from "../../../helpers/dom/element.mjs";
34
+ import { hasClass, index, offset, removeTextNodes, overlayContainsElement, closest, outerHeight, outerWidth, innerHeight, isVisible as _isVisible } from "../../../helpers/dom/element.mjs";
36
35
  import { isFunction } from "../../../helpers/function.mjs";
37
36
  import ColumnFilter from "./filter/column.mjs";
38
37
  import RowFilter from "./filter/row.mjs";
@@ -383,7 +382,7 @@ var Table = /*#__PURE__*/function () {
383
382
  wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
384
383
  wtOverlays.adjustElementsSize();
385
384
  } else {
386
- this.refreshSelections(runFastDraw);
385
+ this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
387
386
  }
388
387
  if (syncScroll) {
389
388
  wtOverlays.syncScrollWithMaster();
@@ -475,74 +474,6 @@ var Table = /*#__PURE__*/function () {
475
474
  }
476
475
  }
477
476
 
478
- /**
479
- * @param {string} className The CSS class name to remove from the table cells.
480
- */
481
- }, {
482
- key: "removeClassFromCells",
483
- value: function removeClassFromCells(className) {
484
- var nodes = this.TABLE.querySelectorAll(".".concat(className));
485
- for (var i = 0, len = nodes.length; i < len; i++) {
486
- removeClass(nodes[i], className);
487
- }
488
- }
489
-
490
- /**
491
- * Refresh the table selection by re-rendering Selection instances connected with that instance.
492
- *
493
- * @param {boolean} fastDraw If fast drawing is enabled than additionally className clearing is applied.
494
- */
495
- }, {
496
- key: "refreshSelections",
497
- value: function refreshSelections(fastDraw) {
498
- var wtSettings = this.wtSettings;
499
- var selections = this.dataAccessObject.selections;
500
- if (!selections) {
501
- return;
502
- }
503
- var highlights = Array.from(selections);
504
- var len = highlights.length;
505
- if (fastDraw) {
506
- var classesToRemove = [];
507
- for (var i = 0; i < len; i++) {
508
- var _highlights$i$setting = highlights[i].settings,
509
- highlightHeaderClassName = _highlights$i$setting.highlightHeaderClassName,
510
- highlightRowClassName = _highlights$i$setting.highlightRowClassName,
511
- highlightColumnClassName = _highlights$i$setting.highlightColumnClassName;
512
- var classNames = highlights[i].classNames;
513
- var classNamesLength = classNames.length;
514
- for (var j = 0; j < classNamesLength; j++) {
515
- if (!classesToRemove.includes(classNames[j])) {
516
- classesToRemove.push(classNames[j]);
517
- }
518
- }
519
- if (highlightHeaderClassName && !classesToRemove.includes(highlightHeaderClassName)) {
520
- classesToRemove.push(highlightHeaderClassName);
521
- }
522
- if (highlightRowClassName && !classesToRemove.includes(highlightRowClassName)) {
523
- classesToRemove.push(highlightRowClassName);
524
- }
525
- if (highlightColumnClassName && !classesToRemove.includes(highlightColumnClassName)) {
526
- classesToRemove.push(highlightColumnClassName);
527
- }
528
- }
529
- var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');
530
- if (Array.isArray(additionalClassesToRemove)) {
531
- for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {
532
- classesToRemove.push(additionalClassesToRemove[_i]);
533
- }
534
- }
535
- var classesToRemoveLength = classesToRemove.length;
536
- for (var _i2 = 0; _i2 < classesToRemoveLength; _i2++) {
537
- // there was no rerender, so we need to remove classNames by ourselves
538
- this.removeClassFromCells(classesToRemove[_i2]);
539
- }
540
- }
541
- for (var _i3 = 0; _i3 < len; _i3++) {
542
- highlights[_i3].draw(this.facadeGetter(), fastDraw);
543
- }
544
- }
545
-
546
477
  /**
547
478
  * Get cell element at coords.
548
479
  * Negative coords.row or coords.col are used to retrieve header cells. If there are multiple header levels, the
@@ -676,14 +607,14 @@ var Table = /*#__PURE__*/function () {
676
607
  key: "getRowHeader",
677
608
  value: function getRowHeader(row) {
678
609
  var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
679
- if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
680
- return;
681
- }
682
610
  var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
683
611
  if (level >= rowHeadersCount) {
684
612
  return;
685
613
  }
686
- var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
614
+ var renderedRow = this.rowFilter.sourceToRendered(row);
615
+ var visibleRow = renderedRow < 0 ? this.rowFilter.sourceRowToVisibleColHeadedRow(row) : renderedRow;
616
+ var parentElement = renderedRow < 0 ? this.THEAD : this.TBODY;
617
+ var TR = parentElement.childNodes[visibleRow];
687
618
  return TR === null || TR === void 0 ? void 0 : TR.childNodes[level];
688
619
  }
689
620
 
@@ -696,9 +627,6 @@ var Table = /*#__PURE__*/function () {
696
627
  }, {
697
628
  key: "getRowHeaders",
698
629
  value: function getRowHeaders(row) {
699
- if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
700
- return [];
701
- }
702
630
  var THs = [];
703
631
  var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
704
632
  for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {
package/base.js CHANGED
@@ -44,8 +44,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
44
44
  Handsontable.CellCoords = _src.CellCoords;
45
45
  Handsontable.CellRange = _src.CellRange;
46
46
  Handsontable.packageName = 'handsontable';
47
- Handsontable.buildDate = "23/06/2023 08:00:57";
48
- Handsontable.version = "0.0.0-next-2b3d6d8-20230623";
47
+ Handsontable.buildDate = "27/06/2023 07:43:32";
48
+ Handsontable.version = "0.0.0-next-74a68c1-20230627";
49
49
  Handsontable.languages = {
50
50
  dictionaryKeys: _registry.dictionaryKeys,
51
51
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "23/06/2023 08:01:18";
39
- Handsontable.version = "0.0.0-next-2b3d6d8-20230623";
38
+ Handsontable.buildDate = "27/06/2023 07:43:47";
39
+ Handsontable.version = "0.0.0-next-74a68c1-20230627";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys: dictionaryKeys,
42
42
  getLanguageDictionary: getLanguageDictionary,
package/core.d.ts CHANGED
@@ -45,6 +45,8 @@ export default class Core {
45
45
  countSourceRows(): number;
46
46
  countVisibleCols(): number;
47
47
  countVisibleRows(): number;
48
+ countRowHeaders(): number;
49
+ countColHeaders(): number;
48
50
  deselectCell(): void;
49
51
  destroy(): void;
50
52
  destroyEditor(revertOriginal?: boolean, prepareEditorIfNeeded?: boolean): void;
@@ -129,12 +131,12 @@ export default class Core {
129
131
  rowIndexMapper: IndexMapper;
130
132
  runHooks(key: keyof Events, p1?: any, p2?: any, p3?: any, p4?: any, p5?: any, p6?: any): any;
131
133
  scrollViewportTo(row?: number, column?: number, snapToBottom?: boolean, snapToRight?: boolean, considerHiddenIndexes?: boolean): boolean;
132
- selectAll(): void;
134
+ selectAll(includeRowHeaders?: boolean, includeColumnHeaders?: boolean, focusPosition?: { row?: number, col?: number }): void;
133
135
  selectCell(row: number, col: number, endRow?: number, endCol?: number, scrollToCell?: boolean, changeListener?: boolean): boolean;
134
136
  selectCellByProp(row: number, prop: string, endRow?: number, endProp?: string, scrollToCell?: boolean): boolean;
135
137
  selectCells(coords: Array<[number, number | string, number, number | string]> | CellRange[], scrollToCell?: boolean, changeListener?: boolean): boolean;
136
- selectColumns(startColumn: number | string, endColumn?: number | string): boolean;
137
- selectRows(startRow: number, endRow?: number): boolean;
138
+ selectColumns(startColumn: number | string, endColumn?: number | string, focusPosition?: number): boolean;
139
+ selectRows(startRow: number, endRow?: number, focusPosition?: number): boolean;
138
140
  setCellMeta(row: number, col: number, key: string, val: any): void;
139
141
  setCellMeta<K extends keyof CellMeta>(row: number, col: number, key: K, val: CellMeta[K]): void;
140
142
  setCellMetaObject(row: number, col: number, prop: CellMeta): void;