handsontable 0.0.0-next-086cb13-20230613 → 0.0.0-next-ac97c93-20230617

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 (232) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
  4. package/3rdparty/walkontable/src/cell/coords.js +12 -61
  5. package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
  6. package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
  7. package/3rdparty/walkontable/src/cell/range.js +7 -44
  8. package/3rdparty/walkontable/src/cell/range.mjs +7 -44
  9. package/3rdparty/walkontable/src/core/_base.js +3 -9
  10. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  11. package/3rdparty/walkontable/src/core/clone.js +2 -2
  12. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  13. package/3rdparty/walkontable/src/core/core.js +2 -3
  14. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  15. package/3rdparty/walkontable/src/event.js +7 -7
  16. package/3rdparty/walkontable/src/event.mjs +7 -7
  17. package/3rdparty/walkontable/src/facade/core.js +2 -2
  18. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  19. package/3rdparty/walkontable/src/index.js +2 -10
  20. package/3rdparty/walkontable/src/index.mjs +2 -2
  21. package/3rdparty/walkontable/src/overlay/_base.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +4 -2
  26. package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
  27. package/3rdparty/walkontable/src/selection.js +355 -0
  28. package/3rdparty/walkontable/src/selection.mjs +349 -0
  29. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  30. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  31. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  32. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  33. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  34. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  35. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  36. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  37. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  38. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  39. package/3rdparty/walkontable/src/table.js +79 -7
  40. package/3rdparty/walkontable/src/table.mjs +80 -8
  41. package/base.js +2 -2
  42. package/base.mjs +2 -2
  43. package/common.d.ts +1 -1
  44. package/core.d.ts +6 -9
  45. package/core.js +390 -235
  46. package/core.mjs +395 -240
  47. package/dataMap/metaManager/metaSchema.js +0 -19
  48. package/dataMap/metaManager/metaSchema.mjs +0 -19
  49. package/dist/handsontable.css +3 -8
  50. package/dist/handsontable.full.css +3 -8
  51. package/dist/handsontable.full.js +10189 -12963
  52. package/dist/handsontable.full.min.css +3 -3
  53. package/dist/handsontable.full.min.js +112 -112
  54. package/dist/handsontable.js +13133 -15907
  55. package/dist/handsontable.min.css +3 -3
  56. package/dist/handsontable.min.js +4 -4
  57. package/editorManager.js +82 -21
  58. package/editorManager.mjs +86 -26
  59. package/editors/textEditor/textEditor.js +11 -3
  60. package/editors/textEditor/textEditor.mjs +12 -4
  61. package/helpers/mixed.js +1 -1
  62. package/helpers/mixed.mjs +1 -1
  63. package/helpers/number.d.ts +0 -1
  64. package/helpers/number.js +0 -18
  65. package/helpers/number.mjs +0 -17
  66. package/package.json +1 -1
  67. package/pluginHooks.d.ts +1 -6
  68. package/pluginHooks.js +1 -100
  69. package/pluginHooks.mjs +1 -100
  70. package/plugins/autofill/autofill.js +1 -2
  71. package/plugins/autofill/autofill.mjs +2 -3
  72. package/plugins/autofill/utils.js +1 -39
  73. package/plugins/autofill/utils.mjs +0 -37
  74. package/plugins/collapsibleColumns/collapsibleColumns.js +24 -81
  75. package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -81
  76. package/plugins/copyPaste/copyPaste.js +1 -5
  77. package/plugins/copyPaste/copyPaste.mjs +1 -5
  78. package/plugins/customBorders/customBorders.js +53 -18
  79. package/plugins/customBorders/customBorders.mjs +54 -19
  80. package/plugins/mergeCells/mergeCells.js +18 -5
  81. package/plugins/mergeCells/mergeCells.mjs +18 -5
  82. package/plugins/nestedHeaders/nestedHeaders.js +10 -132
  83. package/plugins/nestedHeaders/nestedHeaders.mjs +10 -132
  84. package/plugins/nestedHeaders/stateManager/index.js +0 -37
  85. package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
  86. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
  87. package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
  88. package/selection/highlight/constants.js +16 -0
  89. package/selection/highlight/constants.mjs +6 -0
  90. package/selection/highlight/highlight.js +89 -312
  91. package/selection/highlight/highlight.mjs +85 -302
  92. package/selection/highlight/types/activeHeader.js +9 -10
  93. package/selection/highlight/types/activeHeader.mjs +8 -10
  94. package/selection/highlight/types/area.js +27 -12
  95. package/selection/highlight/types/area.mjs +30 -16
  96. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  97. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  98. package/selection/highlight/types/customSelection.js +10 -7
  99. package/selection/highlight/types/customSelection.mjs +9 -7
  100. package/selection/highlight/types/fill.js +8 -5
  101. package/selection/highlight/types/fill.mjs +7 -5
  102. package/selection/highlight/types/header.js +20 -10
  103. package/selection/highlight/types/header.mjs +19 -10
  104. package/selection/highlight/types/{row.js → index.js} +31 -27
  105. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  106. package/selection/highlight/visualSelection.js +27 -31
  107. package/selection/highlight/visualSelection.mjs +27 -31
  108. package/selection/index.js +7 -4
  109. package/selection/index.mjs +3 -2
  110. package/selection/mouseEventHandler.js +1 -1
  111. package/selection/mouseEventHandler.mjs +1 -1
  112. package/selection/range.js +8 -8
  113. package/selection/range.mjs +8 -8
  114. package/selection/selection.js +181 -315
  115. package/selection/selection.mjs +180 -310
  116. package/selection/transformation.js +96 -233
  117. package/selection/transformation.mjs +93 -230
  118. package/selection/utils.js +36 -12
  119. package/selection/utils.mjs +36 -13
  120. package/settings.d.ts +0 -1
  121. package/shortcuts/manager.js +0 -2
  122. package/shortcuts/manager.mjs +0 -2
  123. package/tableView.js +9 -58
  124. package/tableView.mjs +9 -58
  125. package/translations/indexMapper.js +7 -56
  126. package/translations/indexMapper.mjs +8 -56
  127. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  128. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  129. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  130. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  131. package/3rdparty/walkontable/src/selection/index.js +0 -30
  132. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  133. package/3rdparty/walkontable/src/selection/manager.js +0 -329
  134. package/3rdparty/walkontable/src/selection/manager.mjs +0 -323
  135. package/3rdparty/walkontable/src/selection/scanner.js +0 -364
  136. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -360
  137. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  138. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  139. package/selection/highlight/types/areaLayered.js +0 -54
  140. package/selection/highlight/types/areaLayered.mjs +0 -49
  141. package/selection/highlight/types/column.js +0 -50
  142. package/selection/highlight/types/column.mjs +0 -45
  143. package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
  144. package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
  145. package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
  146. package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
  147. package/shortcutContexts/commands/editor/fastOpen.js +0 -16
  148. package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
  149. package/shortcutContexts/commands/editor/index.js +0 -16
  150. package/shortcutContexts/commands/editor/index.mjs +0 -12
  151. package/shortcutContexts/commands/editor/open.js +0 -29
  152. package/shortcutContexts/commands/editor/open.mjs +0 -24
  153. package/shortcutContexts/commands/emptySelectedCells.js +0 -12
  154. package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
  155. package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
  156. package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
  157. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
  158. package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
  159. package/shortcutContexts/commands/extendCellsSelection/index.js +0 -26
  160. package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -22
  161. package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
  162. package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
  163. package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
  164. package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
  165. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +0 -19
  166. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +0 -14
  167. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
  168. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
  169. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
  170. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
  171. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
  172. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
  173. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -40
  174. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -35
  175. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -40
  176. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -35
  177. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
  178. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
  179. package/shortcutContexts/commands/extendCellsSelection/toRows.js +0 -19
  180. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +0 -14
  181. package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
  182. package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
  183. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
  184. package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
  185. package/shortcutContexts/commands/index.js +0 -52
  186. package/shortcutContexts/commands/index.mjs +0 -48
  187. package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
  188. package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
  189. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -29
  190. package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -24
  191. package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
  192. package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
  193. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
  194. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
  195. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
  196. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
  197. package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
  198. package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
  199. package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
  200. package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
  201. package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
  202. package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
  203. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
  204. package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
  205. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
  206. package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
  207. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
  208. package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
  209. package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -36
  210. package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -31
  211. package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -36
  212. package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -31
  213. package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
  214. package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
  215. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
  216. package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
  217. package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
  218. package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
  219. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -29
  220. package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -24
  221. package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
  222. package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
  223. package/shortcutContexts/commands/selectAll.js +0 -11
  224. package/shortcutContexts/commands/selectAll.mjs +0 -6
  225. package/shortcutContexts/constants.js +0 -19
  226. package/shortcutContexts/constants.mjs +0 -12
  227. package/shortcutContexts/editor.js +0 -29
  228. package/shortcutContexts/editor.mjs +0 -25
  229. package/shortcutContexts/grid.js +0 -244
  230. package/shortcutContexts/grid.mjs +0 -240
  231. package/shortcutContexts/index.js +0 -29
  232. package/shortcutContexts/index.mjs +0 -15
package/pluginHooks.js CHANGED
@@ -680,94 +680,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
680
680
  * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
681
681
  */
682
682
  'afterSelectionEndByProp',
683
- /**
684
- * Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
685
- *
686
- * @since 13.0.0
687
- * @event Hooks#beforeSelectColumns
688
- * @param {CellCoords} from Selection start coords object.
689
- * @param {CellCoords} to Selection end coords object.
690
- * @param {CellCoords} highlight Selection cell focus coords object.
691
- * @example
692
- * ::: only-for javascript
693
- * ```js
694
- * new Handsontable(element, {
695
- * beforeSelectColumns: (from, to, highlight) => {
696
- * // Extend the column selection by one column left and one column right.
697
- * from.col = Math.max(from.col - 1, 0);
698
- * to.col = Math.min(to.col + 1, this.countCols() - 1);
699
- * }
700
- * })
701
- * ```
702
- * :::
703
- *
704
- * ::: only-for react
705
- * ```jsx
706
- * <HotTable
707
- * beforeSelectColumns={(from, to, highlight) => {
708
- * // Extend the column selection by one column left and one column right.
709
- * from.col = Math.max(from.col - 1, 0);
710
- * to.col = Math.min(to.col + 1, this.countCols() - 1);
711
- * }}
712
- * />
713
- * ```
714
- * :::
715
- */
716
- 'beforeSelectColumns',
717
- /**
718
- * Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
719
- *
720
- * @since 13.0.0
721
- * @event Hooks#afterSelectColumns
722
- * @param {CellCoords} from Selection start coords object.
723
- * @param {CellCoords} to Selection end coords object.
724
- * @param {CellCoords} highlight Selection cell focus coords object.
725
- */
726
- 'afterSelectColumns',
727
- /**
728
- * Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
729
- *
730
- * @since 13.0.0
731
- * @event Hooks#beforeSelectRows
732
- * @param {CellCoords} from Selection start coords object.
733
- * @param {CellCoords} to Selection end coords object.
734
- * @param {CellCoords} highlight Selection cell focus coords object.
735
- * @example
736
- * ::: only-for javascript
737
- * ```js
738
- * new Handsontable(element, {
739
- * beforeSelectRows: (from, to, highlight) => {
740
- * // Extend the row selection by one row up and one row bottom more.
741
- * from.row = Math.max(from.row - 1, 0);
742
- * to.row = Math.min(to.row + 1, this.countRows() - 1);
743
- * }
744
- * })
745
- * ```
746
- * :::
747
- *
748
- * ::: only-for react
749
- * ```jsx
750
- * <HotTable
751
- * beforeSelectRows={(from, to, highlight) => {
752
- * // Extend the row selection by one row up and one row bottom more.
753
- * from.row = Math.max(from.row - 1, 0);
754
- * to.row = Math.min(to.row + 1, this.countRows() - 1);
755
- * }}
756
- * />
757
- * ```
758
- * :::
759
- */
760
- 'beforeSelectRows',
761
- /**
762
- * Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
763
- *
764
- * @since 13.0.0
765
- * @event Hooks#afterSelectRows
766
- * @param {CellCoords} from Selection start coords object.
767
- * @param {CellCoords} to Selection end coords object.
768
- * @param {CellCoords} highlight Selection cell focus coords object.
769
- */
770
- 'afterSelectRows',
771
683
  /**
772
684
  * Fired after cell meta is changed.
773
685
  *
@@ -2071,17 +1983,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
2071
1983
  * @param {number} rowHeaderWidth Row header width.
2072
1984
  */
2073
1985
  'modifyRowHeaderWidth',
2074
- /**
2075
- * Fired from the `populateFromArray` method during the `autofill` process. Fired for each "autofilled" cell individually.
2076
- *
2077
- * @deprecated
2078
- * @event Hooks#beforeAutofillInsidePopulate
2079
- * @param {object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.
2080
- * @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
2081
- * @param {Array[]} input Contains an array of rows with data being used in the autofill.
2082
- * @param {Array} deltas The deltas array passed to the `populateFromArray` method.
2083
- */
2084
- 'beforeAutofillInsidePopulate',
2085
1986
  /**
2086
1987
  * Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
2087
1988
  *
@@ -2502,7 +2403,7 @@ var REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['u
2502
2403
  * @type {Map<string, string>}
2503
2404
  */
2504
2405
  /* eslint-enable jsdoc/require-description-complete-sentence */
2505
- var DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.'], ['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
2406
+ var DEPRECATED_HOOKS = new Map([]);
2506
2407
  var Hooks = /*#__PURE__*/function () {
2507
2408
  /**
2508
2409
  *
package/pluginHooks.mjs CHANGED
@@ -677,94 +677,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
677
677
  * @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
678
678
  */
679
679
  'afterSelectionEndByProp',
680
- /**
681
- * Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
682
- *
683
- * @since 13.0.0
684
- * @event Hooks#beforeSelectColumns
685
- * @param {CellCoords} from Selection start coords object.
686
- * @param {CellCoords} to Selection end coords object.
687
- * @param {CellCoords} highlight Selection cell focus coords object.
688
- * @example
689
- * ::: only-for javascript
690
- * ```js
691
- * new Handsontable(element, {
692
- * beforeSelectColumns: (from, to, highlight) => {
693
- * // Extend the column selection by one column left and one column right.
694
- * from.col = Math.max(from.col - 1, 0);
695
- * to.col = Math.min(to.col + 1, this.countCols() - 1);
696
- * }
697
- * })
698
- * ```
699
- * :::
700
- *
701
- * ::: only-for react
702
- * ```jsx
703
- * <HotTable
704
- * beforeSelectColumns={(from, to, highlight) => {
705
- * // Extend the column selection by one column left and one column right.
706
- * from.col = Math.max(from.col - 1, 0);
707
- * to.col = Math.min(to.col + 1, this.countCols() - 1);
708
- * }}
709
- * />
710
- * ```
711
- * :::
712
- */
713
- 'beforeSelectColumns',
714
- /**
715
- * Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
716
- *
717
- * @since 13.0.0
718
- * @event Hooks#afterSelectColumns
719
- * @param {CellCoords} from Selection start coords object.
720
- * @param {CellCoords} to Selection end coords object.
721
- * @param {CellCoords} highlight Selection cell focus coords object.
722
- */
723
- 'afterSelectColumns',
724
- /**
725
- * Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
726
- *
727
- * @since 13.0.0
728
- * @event Hooks#beforeSelectRows
729
- * @param {CellCoords} from Selection start coords object.
730
- * @param {CellCoords} to Selection end coords object.
731
- * @param {CellCoords} highlight Selection cell focus coords object.
732
- * @example
733
- * ::: only-for javascript
734
- * ```js
735
- * new Handsontable(element, {
736
- * beforeSelectRows: (from, to, highlight) => {
737
- * // Extend the row selection by one row up and one row bottom more.
738
- * from.row = Math.max(from.row - 1, 0);
739
- * to.row = Math.min(to.row + 1, this.countRows() - 1);
740
- * }
741
- * })
742
- * ```
743
- * :::
744
- *
745
- * ::: only-for react
746
- * ```jsx
747
- * <HotTable
748
- * beforeSelectRows={(from, to, highlight) => {
749
- * // Extend the row selection by one row up and one row bottom more.
750
- * from.row = Math.max(from.row - 1, 0);
751
- * to.row = Math.min(to.row + 1, this.countRows() - 1);
752
- * }}
753
- * />
754
- * ```
755
- * :::
756
- */
757
- 'beforeSelectRows',
758
- /**
759
- * Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
760
- *
761
- * @since 13.0.0
762
- * @event Hooks#afterSelectRows
763
- * @param {CellCoords} from Selection start coords object.
764
- * @param {CellCoords} to Selection end coords object.
765
- * @param {CellCoords} highlight Selection cell focus coords object.
766
- */
767
- 'afterSelectRows',
768
680
  /**
769
681
  * Fired after cell meta is changed.
770
682
  *
@@ -2068,17 +1980,6 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
2068
1980
  * @param {number} rowHeaderWidth Row header width.
2069
1981
  */
2070
1982
  'modifyRowHeaderWidth',
2071
- /**
2072
- * Fired from the `populateFromArray` method during the `autofill` process. Fired for each "autofilled" cell individually.
2073
- *
2074
- * @deprecated
2075
- * @event Hooks#beforeAutofillInsidePopulate
2076
- * @param {object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.
2077
- * @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
2078
- * @param {Array[]} input Contains an array of rows with data being used in the autofill.
2079
- * @param {Array} deltas The deltas array passed to the `populateFromArray` method.
2080
- */
2081
- 'beforeAutofillInsidePopulate',
2082
1983
  /**
2083
1984
  * Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
2084
1985
  *
@@ -2499,7 +2400,7 @@ var REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], ['u
2499
2400
  * @type {Map<string, string>}
2500
2401
  */
2501
2402
  /* eslint-enable jsdoc/require-description-complete-sentence */
2502
- var DEPRECATED_HOOKS = new Map([['beforeAutofillInsidePopulate', 'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.'], ['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
2403
+ var DEPRECATED_HOOKS = new Map([]);
2503
2404
  var Hooks = /*#__PURE__*/function () {
2504
2405
  /**
2505
2406
  *
@@ -298,7 +298,6 @@ var Autofill = /*#__PURE__*/function (_BasePlugin) {
298
298
  this.hot.render();
299
299
  return false;
300
300
  }
301
- var deltas = (0, _utils.getDeltas)(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);
302
301
  var fillData = beforeAutofillHookResult;
303
302
  var res = beforeAutofillHookResult;
304
303
  if (['up', 'left'].indexOf(directionOfDrag) > -1 && !(res.length === 1 && res[0].length === 0)) {
@@ -320,7 +319,7 @@ var Autofill = /*#__PURE__*/function (_BasePlugin) {
320
319
  }
321
320
  }
322
321
  }
323
- this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null, directionOfDrag, deltas);
322
+ this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null);
324
323
  this.setSelection(cornersOfSelectionAndDragAreas);
325
324
  this.hot.runHooks('afterAutofill', fillData, sourceRange, targetRange, directionOfDrag);
326
325
  this.hot.render();
@@ -52,7 +52,7 @@ import Hooks from "../../pluginHooks.mjs";
52
52
  import { offset, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
53
53
  import { arrayEach, arrayMap } from "../../helpers/array.mjs";
54
54
  import EventManager from "../../eventManager.mjs";
55
- import { getDeltas, getDragDirectionAndRange, DIRECTIONS, getMappedFillHandleSetting } from "./utils.mjs";
55
+ import { getDragDirectionAndRange, DIRECTIONS, getMappedFillHandleSetting } from "./utils.mjs";
56
56
  Hooks.getSingleton().register('modifyAutofillRange');
57
57
  Hooks.getSingleton().register('beforeAutofill');
58
58
  Hooks.getSingleton().register('afterAutofill');
@@ -292,7 +292,6 @@ export var Autofill = /*#__PURE__*/function (_BasePlugin) {
292
292
  this.hot.render();
293
293
  return false;
294
294
  }
295
- var deltas = getDeltas(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);
296
295
  var fillData = beforeAutofillHookResult;
297
296
  var res = beforeAutofillHookResult;
298
297
  if (['up', 'left'].indexOf(directionOfDrag) > -1 && !(res.length === 1 && res[0].length === 0)) {
@@ -314,7 +313,7 @@ export var Autofill = /*#__PURE__*/function (_BasePlugin) {
314
313
  }
315
314
  }
316
315
  }
317
- this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null, directionOfDrag, deltas);
316
+ this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, "".concat(this.pluginName, ".fill"), null);
318
317
  this.setSelection(cornersOfSelectionAndDragAreas);
319
318
  this.hot.runHooks('afterAutofill', fillData, sourceRange, targetRange, directionOfDrag);
320
319
  this.hot.render();
@@ -2,10 +2,8 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.DIRECTIONS = void 0;
5
- exports.getDeltas = getDeltas;
6
5
  exports.getDragDirectionAndRange = getDragDirectionAndRange;
7
6
  exports.getMappedFillHandleSetting = getMappedFillHandleSetting;
8
- require("core-js/modules/es.array.index-of.js");
9
7
  require("core-js/modules/es.object.keys.js");
10
8
  var _object = require("../../helpers/object");
11
9
  var _mixed = require("../../helpers/mixed");
@@ -14,43 +12,6 @@ var DIRECTIONS = {
14
12
  vertical: 'vertical'
15
13
  };
16
14
 
17
- /**
18
- * Get deltas array.
19
- *
20
- * @param {CellCoords} start The point in the grid where the selection starts.
21
- * @param {CellCoords} end The point in the grid where the selection ends.
22
- * @param {Array} data The chunk of the data which belongs to the selected box.
23
- * @param {string} direction The selection direction.
24
- * @returns {Array}
25
- */
26
- exports.DIRECTIONS = DIRECTIONS;
27
- function getDeltas(start, end, data, direction) {
28
- var rowsLength = data.length;
29
- var columnsLength = data ? data[0].length : 0;
30
- var deltas = [];
31
- var diffRow = end.row - start.row;
32
- var diffCol = end.col - start.col;
33
- if (['down', 'up'].indexOf(direction) !== -1) {
34
- var arr = [];
35
- for (var col = 0; col < diffCol; col++) {
36
- var startValue = parseInt(data[0][col], 10);
37
- var endValue = parseInt(data[rowsLength - 1][col], 10);
38
- var delta = (direction === 'down' ? endValue - startValue : startValue - endValue) / (rowsLength - 1) || 0;
39
- arr.push(delta);
40
- }
41
- deltas.push(arr);
42
- }
43
- if (['right', 'left'].indexOf(direction) !== -1) {
44
- for (var row = 0; row < diffRow; row++) {
45
- var _startValue = parseInt(data[row][0], 10);
46
- var _endValue = parseInt(data[row][columnsLength - 1], 10);
47
- var _delta = (direction === 'right' ? _endValue - _startValue : _startValue - _endValue) / (columnsLength - 1) || 0;
48
- deltas.push([_delta]);
49
- }
50
- }
51
- return deltas;
52
- }
53
-
54
15
  /**
55
16
  * Get direction between positions and cords of selections difference (drag area).
56
17
  *
@@ -59,6 +20,7 @@ function getDeltas(start, end, data, direction) {
59
20
  * @param {Function} cellCoordsFactory The function factory for CellCoords objects.
60
21
  * @returns {{direction: string, start: CellCoords, end: CellCoords}}
61
22
  */
23
+ exports.DIRECTIONS = DIRECTIONS;
62
24
  function getDragDirectionAndRange(startSelection, endSelection, cellCoordsFactory) {
63
25
  var startOfDragCoords;
64
26
  var endOfDragCoords;
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.array.index-of.js";
2
1
  import "core-js/modules/es.object.keys.js";
3
2
  import { isObject } from "../../helpers/object.mjs";
4
3
  import { isDefined } from "../../helpers/mixed.mjs";
@@ -7,42 +6,6 @@ export var DIRECTIONS = {
7
6
  vertical: 'vertical'
8
7
  };
9
8
 
10
- /**
11
- * Get deltas array.
12
- *
13
- * @param {CellCoords} start The point in the grid where the selection starts.
14
- * @param {CellCoords} end The point in the grid where the selection ends.
15
- * @param {Array} data The chunk of the data which belongs to the selected box.
16
- * @param {string} direction The selection direction.
17
- * @returns {Array}
18
- */
19
- export function getDeltas(start, end, data, direction) {
20
- var rowsLength = data.length;
21
- var columnsLength = data ? data[0].length : 0;
22
- var deltas = [];
23
- var diffRow = end.row - start.row;
24
- var diffCol = end.col - start.col;
25
- if (['down', 'up'].indexOf(direction) !== -1) {
26
- var arr = [];
27
- for (var col = 0; col < diffCol; col++) {
28
- var startValue = parseInt(data[0][col], 10);
29
- var endValue = parseInt(data[rowsLength - 1][col], 10);
30
- var delta = (direction === 'down' ? endValue - startValue : startValue - endValue) / (rowsLength - 1) || 0;
31
- arr.push(delta);
32
- }
33
- deltas.push(arr);
34
- }
35
- if (['right', 'left'].indexOf(direction) !== -1) {
36
- for (var row = 0; row < diffRow; row++) {
37
- var _startValue = parseInt(data[row][0], 10);
38
- var _endValue = parseInt(data[row][columnsLength - 1], 10);
39
- var _delta = (direction === 'right' ? _endValue - _startValue : _startValue - _endValue) / (columnsLength - 1) || 0;
40
- deltas.push([_delta]);
41
- }
42
- }
43
- return deltas;
44
- }
45
-
46
9
  /**
47
10
  * Get direction between positions and cords of selections difference (drag area).
48
11
  *
@@ -69,7 +69,6 @@ var PLUGIN_PRIORITY = 290;
69
69
  exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
70
70
  var SETTING_KEYS = ['nestedHeaders'];
71
71
  var COLLAPSIBLE_ELEMENT_CLASS = 'collapsibleIndicator';
72
- var SHORTCUTS_GROUP = PLUGIN_KEY;
73
72
  var actionDictionary = new Map([['collapse', {
74
73
  hideColumn: true,
75
74
  beforeHook: 'beforeColumnCollapse',
@@ -238,7 +237,6 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
238
237
  this.addHook('beforeOnCellMouseDown', function (event, coords, TD) {
239
238
  return _this2.onBeforeOnCellMouseDown(event, coords, TD);
240
239
  });
241
- this.registerShortcuts();
242
240
  _get(_getPrototypeOf(CollapsibleColumns.prototype), "enablePlugin", this).call(this);
243
241
  // @TODO: Workaround for broken plugin initialization abstraction (#6806).
244
242
  this.updatePlugin();
@@ -289,65 +287,10 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
289
287
  this.hot.columnIndexMapper.unregisterMap(this.pluginName);
290
288
  _classPrivateFieldSet(this, _collapsedColumnsMap, null);
291
289
  this.nestedHeadersPlugin = null;
292
- this.unregisterShortcuts();
293
290
  this.clearButtons();
294
291
  _get(_getPrototypeOf(CollapsibleColumns.prototype), "disablePlugin", this).call(this);
295
292
  }
296
293
 
297
- /**
298
- * Register shortcuts responsible for toggling collapsible columns.
299
- *
300
- * @private
301
- */
302
- }, {
303
- key: "registerShortcuts",
304
- value: function registerShortcuts() {
305
- var _this3 = this;
306
- this.hot.getShortcutManager().getContext('grid').addShortcut({
307
- keys: [['Enter']],
308
- callback: function callback() {
309
- var _this3$headerStateMan;
310
- var _this3$hot$getSelecte = _this3.hot.getSelectedRangeLast().highlight,
311
- row = _this3$hot$getSelecte.row,
312
- col = _this3$hot$getSelecte.col;
313
- var _ref = (_this3$headerStateMan = _this3.headerStateManager.getHeaderTreeNodeData(row, col)) !== null && _this3$headerStateMan !== void 0 ? _this3$headerStateMan : {},
314
- collapsible = _ref.collapsible,
315
- isCollapsed = _ref.isCollapsed,
316
- columnIndex = _ref.columnIndex;
317
- if (!collapsible) {
318
- return;
319
- }
320
- if (isCollapsed) {
321
- _this3.expandSection({
322
- row: row,
323
- col: columnIndex
324
- });
325
- } else {
326
- _this3.collapseSection({
327
- row: row,
328
- col: columnIndex
329
- });
330
- }
331
- },
332
- runOnlyIf: function runOnlyIf() {
333
- var _this3$hot$getSelecte2;
334
- return (_this3$hot$getSelecte2 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte2 === void 0 ? void 0 : _this3$hot$getSelecte2.highlight.isHeader();
335
- },
336
- group: SHORTCUTS_GROUP
337
- });
338
- }
339
-
340
- /**
341
- * Unregister shortcuts responsible for toggling collapsible columns.
342
- *
343
- * @private
344
- */
345
- }, {
346
- key: "unregisterShortcuts",
347
- value: function unregisterShortcuts() {
348
- this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
349
- }
350
-
351
294
  /**
352
295
  * Clears the expand/collapse buttons.
353
296
  *
@@ -417,7 +360,7 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
417
360
  }, {
418
361
  key: "toggleAllCollapsibleSections",
419
362
  value: function toggleAllCollapsibleSections(action) {
420
- var _this4 = this;
363
+ var _this3 = this;
421
364
  var coords = this.headerStateManager.mapNodes(function (headerSettings) {
422
365
  var collapsible = headerSettings.collapsible,
423
366
  origColspan = headerSettings.origColspan,
@@ -426,7 +369,7 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
426
369
  isCollapsed = headerSettings.isCollapsed;
427
370
  if (collapsible === true && origColspan > 1 && (isCollapsed && action === 'expand' || !isCollapsed && action === 'collapse')) {
428
371
  return {
429
- row: _this4.headerStateManager.levelToRowCoords(headerLevel),
372
+ row: _this3.headerStateManager.levelToRowCoords(headerLevel),
430
373
  col: columnIndex
431
374
  };
432
375
  }
@@ -465,7 +408,7 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
465
408
  }, {
466
409
  key: "toggleCollapsibleSection",
467
410
  value: function toggleCollapsibleSection(coords, action) {
468
- var _this5 = this;
411
+ var _this4 = this;
469
412
  if (!actionDictionary.has(action)) {
470
413
  throw new Error("Unsupported action is passed (".concat(action, ")."));
471
414
  }
@@ -474,18 +417,18 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
474
417
  }
475
418
 
476
419
  // Ignore coordinates which points to the cells range.
477
- var filteredCoords = (0, _array.arrayFilter)(coords, function (_ref2) {
478
- var row = _ref2.row;
420
+ var filteredCoords = (0, _array.arrayFilter)(coords, function (_ref) {
421
+ var row = _ref.row;
479
422
  return row < 0;
480
423
  });
481
424
  var isActionPossible = filteredCoords.length > 0;
482
- (0, _array.arrayEach)(filteredCoords, function (_ref3) {
483
- var _this5$headerStateMan;
484
- var row = _ref3.row,
485
- column = _ref3.col;
486
- var _ref4 = (_this5$headerStateMan = _this5.headerStateManager.getHeaderSettings(row, column)) !== null && _this5$headerStateMan !== void 0 ? _this5$headerStateMan : {},
487
- collapsible = _ref4.collapsible,
488
- isCollapsed = _ref4.isCollapsed;
425
+ (0, _array.arrayEach)(filteredCoords, function (_ref2) {
426
+ var _this4$headerStateMan;
427
+ var row = _ref2.row,
428
+ column = _ref2.col;
429
+ var _ref3 = (_this4$headerStateMan = _this4.headerStateManager.getHeaderSettings(row, column)) !== null && _this4$headerStateMan !== void 0 ? _this4$headerStateMan : {},
430
+ collapsible = _ref3.collapsible,
431
+ isCollapsed = _ref3.isCollapsed;
489
432
  if (!collapsible || isCollapsed && action === 'collapse' || !isCollapsed && action === 'expand') {
490
433
  isActionPossible = false;
491
434
  return false;
@@ -494,13 +437,13 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
494
437
  var nodeModRollbacks = [];
495
438
  var affectedColumnsIndexes = [];
496
439
  if (isActionPossible) {
497
- (0, _array.arrayEach)(filteredCoords, function (_ref5) {
498
- var row = _ref5.row,
499
- column = _ref5.col;
500
- var _this5$headerStateMan2 = _this5.headerStateManager.triggerNodeModification(action, row, column),
501
- colspanCompensation = _this5$headerStateMan2.colspanCompensation,
502
- affectedColumns = _this5$headerStateMan2.affectedColumns,
503
- rollbackModification = _this5$headerStateMan2.rollbackModification;
440
+ (0, _array.arrayEach)(filteredCoords, function (_ref4) {
441
+ var row = _ref4.row,
442
+ column = _ref4.col;
443
+ var _this4$headerStateMan2 = _this4.headerStateManager.triggerNodeModification(action, row, column),
444
+ colspanCompensation = _this4$headerStateMan2.colspanCompensation,
445
+ affectedColumns = _this4$headerStateMan2.affectedColumns,
446
+ rollbackModification = _this4$headerStateMan2.rollbackModification;
504
447
  if (colspanCompensation > 0) {
505
448
  affectedColumnsIndexes.push.apply(affectedColumnsIndexes, _toConsumableArray(affectedColumns));
506
449
  nodeModRollbacks.push(rollbackModification);
@@ -527,7 +470,7 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
527
470
  }
528
471
  this.hot.batchExecution(function () {
529
472
  (0, _array.arrayEach)(affectedColumnsIndexes, function (visualColumn) {
530
- _classPrivateFieldGet(_this5, _collapsedColumnsMap).setValueAtIndex(_this5.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);
473
+ _classPrivateFieldGet(_this4, _collapsedColumnsMap).setValueAtIndex(_this4.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);
531
474
  });
532
475
  }, true);
533
476
  var isActionPerformed = this.getCollapsedColumns().length !== currentCollapsedColumns.length;
@@ -561,10 +504,10 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
561
504
  key: "onAfterGetColHeader",
562
505
  value: function onAfterGetColHeader(column, TH, headerLevel) {
563
506
  var _this$headerStateMana;
564
- var _ref6 = (_this$headerStateMana = this.headerStateManager.getHeaderSettings(headerLevel, column)) !== null && _this$headerStateMana !== void 0 ? _this$headerStateMana : {},
565
- collapsible = _ref6.collapsible,
566
- origColspan = _ref6.origColspan,
567
- isCollapsed = _ref6.isCollapsed;
507
+ var _ref5 = (_this$headerStateMana = this.headerStateManager.getHeaderSettings(headerLevel, column)) !== null && _this$headerStateMana !== void 0 ? _this$headerStateMana : {},
508
+ collapsible = _ref5.collapsible,
509
+ origColspan = _ref5.origColspan,
510
+ isCollapsed = _ref5.isCollapsed;
568
511
  var isNodeCollapsible = collapsible && origColspan > 1 && column >= this.hot.getSettings().fixedColumnsStart;
569
512
  var collapsibleElement = TH.querySelector(".".concat(COLLAPSIBLE_ELEMENT_CLASS));
570
513
  if (isNodeCollapsible) {