handsontable 0.0.0-next-abfe462-20231207 → 0.0.0-next-3d099da-20231208

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 (120) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +6 -11
  2. package/3rdparty/walkontable/src/calculator/index.mjs +3 -5
  3. package/3rdparty/walkontable/src/calculator/viewportColumns.js +122 -1
  4. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +124 -2
  5. package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
  6. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -2
  7. package/3rdparty/walkontable/src/core/_base.js +12 -0
  8. package/3rdparty/walkontable/src/core/_base.mjs +12 -0
  9. package/3rdparty/walkontable/src/core/core.js +2 -0
  10. package/3rdparty/walkontable/src/core/core.mjs +2 -0
  11. package/3rdparty/walkontable/src/facade/core.js +9 -0
  12. package/3rdparty/walkontable/src/facade/core.mjs +9 -0
  13. package/3rdparty/walkontable/src/index.js +4 -3
  14. package/3rdparty/walkontable/src/index.mjs +2 -1
  15. package/3rdparty/walkontable/src/overlays.js +3 -0
  16. package/3rdparty/walkontable/src/overlays.mjs +4 -0
  17. package/3rdparty/walkontable/src/renderer/colGroup.js +0 -10
  18. package/3rdparty/walkontable/src/renderer/colGroup.mjs +0 -10
  19. package/3rdparty/walkontable/src/renderer/rows.js +3 -4
  20. package/3rdparty/walkontable/src/renderer/rows.mjs +3 -4
  21. package/3rdparty/walkontable/src/selection/manager.js +1 -0
  22. package/3rdparty/walkontable/src/selection/manager.mjs +1 -0
  23. package/3rdparty/walkontable/src/settings.js +0 -3
  24. package/3rdparty/walkontable/src/settings.mjs +0 -2
  25. package/3rdparty/walkontable/src/table.js +1 -0
  26. package/3rdparty/walkontable/src/table.mjs +1 -0
  27. package/3rdparty/walkontable/src/utils/column.js +12 -27
  28. package/3rdparty/walkontable/src/utils/column.mjs +12 -27
  29. package/3rdparty/walkontable/src/viewport.js +17 -22
  30. package/3rdparty/walkontable/src/viewport.mjs +18 -23
  31. package/base.js +2 -4
  32. package/base.mjs +2 -2
  33. package/core/focusCatcher/index.js +6 -44
  34. package/core/focusCatcher/index.mjs +6 -44
  35. package/core.js +11 -0
  36. package/core.mjs +11 -0
  37. package/dataMap/dataMap.js +0 -1
  38. package/dataMap/metaManager/metaSchema.js +2 -28
  39. package/dataMap/metaManager/metaSchema.mjs +2 -28
  40. package/dataMap/metaManager/mods/extendMetaProperties.js +0 -12
  41. package/dataMap/metaManager/mods/extendMetaProperties.mjs +0 -12
  42. package/dist/handsontable.css +2 -2
  43. package/dist/handsontable.full.css +2 -2
  44. package/dist/handsontable.full.js +3902 -2639
  45. package/dist/handsontable.full.min.css +2 -2
  46. package/dist/handsontable.full.min.js +70 -66
  47. package/dist/handsontable.js +3905 -2642
  48. package/dist/handsontable.min.css +2 -2
  49. package/dist/handsontable.min.js +39 -35
  50. package/editorManager.js +4 -3
  51. package/editorManager.mjs +4 -3
  52. package/editors/autocompleteEditor/autocompleteEditor.js +2 -0
  53. package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -0
  54. package/editors/handsontableEditor/handsontableEditor.js +1 -0
  55. package/editors/handsontableEditor/handsontableEditor.mjs +1 -0
  56. package/editors/textEditor/textEditor.js +4 -0
  57. package/editors/textEditor/textEditor.mjs +4 -0
  58. package/helpers/mixed.js +1 -1
  59. package/helpers/mixed.mjs +1 -1
  60. package/package.json +1 -1
  61. package/pluginHooks.d.ts +29 -6
  62. package/pluginHooks.js +123 -65
  63. package/pluginHooks.mjs +122 -62
  64. package/plugins/copyPaste/clipboardData/clipboardData.js +588 -0
  65. package/plugins/copyPaste/clipboardData/clipboardData.mjs +584 -0
  66. package/plugins/copyPaste/clipboardData/copyClipboardData.js +69 -0
  67. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +65 -0
  68. package/plugins/copyPaste/clipboardData/index.js +9 -0
  69. package/plugins/copyPaste/clipboardData/index.mjs +4 -0
  70. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +81 -0
  71. package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +77 -0
  72. package/plugins/copyPaste/copyPaste.js +51 -129
  73. package/plugins/copyPaste/copyPaste.mjs +54 -132
  74. package/plugins/copyPaste/copyableRanges.js +7 -43
  75. package/plugins/copyPaste/copyableRanges.mjs +7 -42
  76. package/plugins/copyPaste/pasteEvent.mjs +1 -1
  77. package/plugins/customBorders/customBorders.js +5 -0
  78. package/plugins/customBorders/customBorders.mjs +5 -0
  79. package/plugins/customBorders/utils.js +1 -0
  80. package/plugins/customBorders/utils.mjs +1 -0
  81. package/plugins/formulas/formulas.js +2 -0
  82. package/plugins/formulas/formulas.mjs +2 -0
  83. package/plugins/formulas/indexSyncer/axisSyncer.js +1 -0
  84. package/plugins/formulas/indexSyncer/axisSyncer.mjs +1 -0
  85. package/plugins/manualColumnResize/manualColumnResize.js +1 -0
  86. package/plugins/manualColumnResize/manualColumnResize.mjs +1 -0
  87. package/plugins/mergeCells/mergeCells.js +127 -1
  88. package/plugins/mergeCells/mergeCells.mjs +127 -1
  89. package/plugins/nestedHeaders/nestedHeaders.js +87 -41
  90. package/plugins/nestedHeaders/nestedHeaders.mjs +88 -42
  91. package/plugins/nestedHeaders/stateManager/headersTree.js +1 -0
  92. package/plugins/nestedHeaders/stateManager/headersTree.mjs +1 -0
  93. package/plugins/undoRedo/undoRedo.js +2 -0
  94. package/plugins/undoRedo/undoRedo.mjs +2 -0
  95. package/renderers/autocompleteRenderer/autocompleteRenderer.js +1 -0
  96. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -0
  97. package/renderers/checkboxRenderer/checkboxRenderer.js +2 -0
  98. package/renderers/checkboxRenderer/checkboxRenderer.mjs +2 -0
  99. package/selection/highlight/highlight.js +1 -0
  100. package/selection/highlight/highlight.mjs +1 -0
  101. package/selection/index.js +3 -1
  102. package/selection/index.mjs +2 -2
  103. package/selection/utils.js +34 -0
  104. package/selection/utils.mjs +33 -0
  105. package/settings.d.ts +0 -1
  106. package/tableView.js +2 -1
  107. package/tableView.mjs +2 -1
  108. package/translations/indexMapper.js +1 -2
  109. package/utils/parseTable.js +538 -84
  110. package/utils/parseTable.mjs +534 -83
  111. package/validators/timeValidator/timeValidator.js +1 -0
  112. package/validators/timeValidator/timeValidator.mjs +1 -0
  113. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +0 -50
  114. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +0 -46
  115. package/3rdparty/walkontable/src/calculator/renderAllRows.js +0 -50
  116. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +0 -46
  117. package/3rdparty/walkontable/src/utils/columnStretching.js +0 -219
  118. package/3rdparty/walkontable/src/utils/columnStretching.mjs +0 -215
  119. package/plugins/copyPaste/clipboardData.js +0 -18
  120. package/plugins/copyPaste/clipboardData.mjs +0 -14
package/editorManager.js CHANGED
@@ -149,7 +149,6 @@ class EditorManager {
149
149
  * Prepare text input to be displayed at given grid cell.
150
150
  */
151
151
  prepareEditor() {
152
- var _this$hot$getSelected;
153
152
  if (this.lock) {
154
153
  return;
155
154
  }
@@ -161,8 +160,10 @@ class EditorManager {
161
160
  });
162
161
  return;
163
162
  }
164
- const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
165
- if (!highlight || highlight.isHeader()) {
163
+ const {
164
+ highlight
165
+ } = this.hot.getSelectedRangeLast();
166
+ if (highlight.isHeader()) {
166
167
  return;
167
168
  }
168
169
  const {
package/editorManager.mjs CHANGED
@@ -145,7 +145,6 @@ class EditorManager {
145
145
  * Prepare text input to be displayed at given grid cell.
146
146
  */
147
147
  prepareEditor() {
148
- var _this$hot$getSelected;
149
148
  if (this.lock) {
150
149
  return;
151
150
  }
@@ -157,8 +156,10 @@ class EditorManager {
157
156
  });
158
157
  return;
159
158
  }
160
- const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
161
- if (!highlight || highlight.isHeader()) {
159
+ const {
160
+ highlight
161
+ } = this.hot.getSelectedRangeLast();
162
+ if (highlight.isHeader()) {
162
163
  return;
163
164
  }
164
165
  const {
@@ -191,6 +191,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
191
191
  if (scrollbarWidth === 0 && (0, _browser.isMacOS)()) {
192
192
  scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
193
193
  }
194
+
194
195
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
195
196
  this.htEditor.updateSettings({
196
197
  colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
@@ -390,6 +391,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
390
391
  if (this.htEditor.flipped) {
391
392
  this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`; // eslint-disable-line max-len
392
393
  }
394
+
393
395
  this.setDropdownHeight(tempHeight - lastRowHeight);
394
396
  }
395
397
  }
@@ -188,6 +188,7 @@ export class AutocompleteEditor extends HandsontableEditor {
188
188
  if (scrollbarWidth === 0 && isMacOS()) {
189
189
  scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
190
190
  }
191
+
191
192
  this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
192
193
  this.htEditor.updateSettings({
193
194
  colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : undefined,
@@ -387,6 +388,7 @@ export class AutocompleteEditor extends HandsontableEditor {
387
388
  if (this.htEditor.flipped) {
388
389
  this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`; // eslint-disable-line max-len
389
390
  }
391
+
390
392
  this.setDropdownHeight(tempHeight - lastRowHeight);
391
393
  }
392
394
  }
@@ -137,6 +137,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
137
137
  // if focus is still in the HOT editor
138
138
  this.hot.listen(); // return the focus to the parent HOT instance
139
139
  }
140
+
140
141
  if (this.htEditor && this.htEditor.getSelectedLast()) {
141
142
  const value = this.htEditor.getValue();
142
143
  if (value !== undefined) {
@@ -134,6 +134,7 @@ export class HandsontableEditor extends TextEditor {
134
134
  // if focus is still in the HOT editor
135
135
  this.hot.listen(); // return the focus to the parent HOT instance
136
136
  }
137
+
137
138
  if (this.htEditor && this.htEditor.getSelectedLast()) {
138
139
  const value = this.htEditor.getValue();
139
140
  if (value !== undefined) {
@@ -128,6 +128,7 @@ class TextEditor extends _baseEditor.BaseEditor {
128
128
  if ((0, _element.isThisHotChild)(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
129
129
  this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
130
130
  }
131
+
131
132
  this.hideEditableElement();
132
133
  this.unregisterShortcuts();
133
134
  }
@@ -298,6 +299,7 @@ class TextEditor extends _baseEditor.BaseEditor {
298
299
  if (!force) {
299
300
  this.close(); // TODO shouldn't it be this.finishEditing() ?
300
301
  }
302
+
301
303
  return;
302
304
  }
303
305
  const {
@@ -400,6 +402,7 @@ class TextEditor extends _baseEditor.BaseEditor {
400
402
  insertNewLine();
401
403
  return false; // Will block closing editor.
402
404
  },
405
+
403
406
  runOnlyIf: event => !this.hot.selection.isMultiple() &&
404
407
  // We trigger a data population for multiple selection.
405
408
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
@@ -410,6 +413,7 @@ class TextEditor extends _baseEditor.BaseEditor {
410
413
  insertNewLine();
411
414
  return false; // Will block closing editor.
412
415
  },
416
+
413
417
  runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
414
418
  }, {
415
419
  keys: [['Alt', 'Enter']],
@@ -124,6 +124,7 @@ export class TextEditor extends BaseEditor {
124
124
  if (isThisHotChild(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
125
125
  this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
126
126
  }
127
+
127
128
  this.hideEditableElement();
128
129
  this.unregisterShortcuts();
129
130
  }
@@ -294,6 +295,7 @@ export class TextEditor extends BaseEditor {
294
295
  if (!force) {
295
296
  this.close(); // TODO shouldn't it be this.finishEditing() ?
296
297
  }
298
+
297
299
  return;
298
300
  }
299
301
  const {
@@ -396,6 +398,7 @@ export class TextEditor extends BaseEditor {
396
398
  insertNewLine();
397
399
  return false; // Will block closing editor.
398
400
  },
401
+
399
402
  runOnlyIf: event => !this.hot.selection.isMultiple() &&
400
403
  // We trigger a data population for multiple selection.
401
404
  // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
@@ -406,6 +409,7 @@ export class TextEditor extends BaseEditor {
406
409
  insertNewLine();
407
410
  return false; // Will block closing editor.
408
411
  },
412
+
409
413
  runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
410
414
  }, {
411
415
  keys: [['Alt', 'Enter']],
package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-abfe462-20231207";
137
+ const hotVersion = "0.0.0-next-3d099da-20231208";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-abfe462-20231207";
127
+ const hotVersion = "0.0.0-next-3d099da-20231208";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-abfe462-20231207",
13
+ "version": "0.0.0-next-3d099da-20231208",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.d.ts CHANGED
@@ -48,12 +48,35 @@ interface HookHighlightRowHeaderMeta {
48
48
  rowCursor: number;
49
49
  selectionHeight: number;
50
50
  }
51
+
51
52
  interface HookHighlightColumnHeaderMeta {
52
53
  selectionType: string;
53
54
  columnCursor: number;
54
55
  selectionWidth: number;
55
56
  }
56
57
 
58
+ interface ClipboardData {
59
+ removeRows: (rows: number[]) => void;
60
+ removeColumns: (columns: number[]) => void;
61
+ insertAtRow: (rowIndex: number, values: any[]) => void;
62
+ insertAtColumn: (columnIndex: number, values: any[]) => void;
63
+ getCellAt: (row: number, col: number) => string;
64
+ setCellAt: (row: number, column: number, value: any) => void;
65
+ getData: () => any[][];
66
+ getMetaInfo: () => GridSettings;
67
+ setMetaInfo: (property: 'colHeaders' | 'nestedHeaders' | 'mergeCells' | 'data', value: any) => void;
68
+ getType: () => 'handsontable' | 'table' | 'unrecognizable';
69
+ }
70
+
71
+ interface PasteClipboardData extends ClipboardData {
72
+ getType: () => 'handsontable' | 'table' | 'unrecognizable';
73
+ }
74
+
75
+ interface CopyClipboardData extends ClipboardData {
76
+ getRanges: () => RangeType[];
77
+ getType: () => 'handsontable';
78
+ }
79
+
57
80
  export interface Events {
58
81
  afterAddChild?: (parent: RowObject, element: RowObject | undefined, index: number | undefined) => void;
59
82
  afterAutofill?: (fillData: CellValue[][], sourceRange: CellRange, targetRange: CellRange, direction: 'up' | 'down' | 'left' | 'right') => void;
@@ -72,11 +95,11 @@ export interface Events {
72
95
  afterContextMenuDefaultOptions?: (predefinedItems: Array<ContextMenuPredefinedMenuItemKey | ContextMenuMenuItemConfig>) => void;
73
96
  afterContextMenuHide?: (context: ContextMenu) => void;
74
97
  afterContextMenuShow?: (context: ContextMenu) => void;
75
- afterCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void;
98
+ afterCopy?: (clipboardData: CopyClipboardData) => void;
76
99
  afterCopyLimit?: (selectedRows: number, selectedColumns: number, copyRowsLimit: number, copyColumnsLimit: number) => void;
77
100
  afterCreateCol?: (index: number, amount: number, source?: ChangeSource) => void;
78
101
  afterCreateRow?: (index: number, amount: number, source?: ChangeSource) => void;
79
- afterCut?: (data: CellValue[][], coords: RangeType[]) => void;
102
+ afterCut?: (clipboardData: CopyClipboardData) => void;
80
103
  afterDeselect?: () => void;
81
104
  afterDestroy?: () => void;
82
105
  afterDetachChild?: (parent: RowObject, element: RowObject) => void;
@@ -111,7 +134,7 @@ export interface Events {
111
134
  afterOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
112
135
  afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
113
136
  afterOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
114
- afterPaste?: (data: CellValue[][], coords: RangeType[]) => void;
137
+ afterPaste?: (clipboardData: PasteClipboardData) => void;
115
138
  afterPluginsInitialized?: () => void;
116
139
  afterRedo?: (action: UndoRedoAction) => void;
117
140
  afterRedoStackChange?: (undoneActionsBefore: UndoRedoAction[], undoneActionsAfter: UndoRedoAction[]) => void;
@@ -170,10 +193,10 @@ export interface Events {
170
193
  beforeColumnUnfreeze?: (columnIndex: number, isUnfreezingPerformed: boolean) => void | boolean;
171
194
  beforeContextMenuSetItems?: (menuItems: ContextMenuMenuItemConfig[]) => void;
172
195
  beforeContextMenuShow?: (context: ContextMenu) => void;
173
- beforeCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void | boolean;
196
+ beforeCopy?: (clipboardData: CopyClipboardData) => void | boolean;
174
197
  beforeCreateCol?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
175
198
  beforeCreateRow?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
176
- beforeCut?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
199
+ beforeCut?: (clipboardData: CopyClipboardData) => void | boolean;
177
200
  beforeDetachChild?: (parent: RowObject, element: RowObject) => void;
178
201
  beforeDrawBorders?: (corners: number[], borderClassName: 'current' | 'area' | 'highlight' | undefined) => void;
179
202
  beforeDropdownMenuSetItems?: (menuItems: ContextMenuMenuItemConfig[]) => void;
@@ -195,7 +218,7 @@ export interface Events {
195
218
  beforeOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
196
219
  beforeOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement, controller: SelectionController) => void;
197
220
  beforeOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
198
- beforePaste?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
221
+ beforePaste?: (clipboardData: PasteClipboardData) => boolean | void;
199
222
  beforeRedo?: (action: UndoRedoAction) => void;
200
223
  beforeRedoStackChange?: (undoneActions: UndoRedoAction[]) => void;
201
224
  beforeRefreshDimensions?: (previousDimensions: object, currentDimensions: object, actionPossible: boolean) => boolean | void;
package/pluginHooks.js CHANGED
@@ -122,9 +122,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
122
122
  * });
123
123
  * :::
124
124
  * ...
125
- */
126
-
127
- // @TODO: Move plugin description hooks to plugin?
125
+ */ // @TODO: Move plugin description hooks to plugin?
128
126
  const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sentence */
129
127
  /**
130
128
  * Fired after resetting a cell's meta. This happens when the {@link Core#updateSettings} method is called.
@@ -1513,26 +1511,36 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1513
1511
  * Fired by {@link CopyPaste} plugin before copying the values to the clipboard and before clearing values of
1514
1512
  * the selected cells. This hook is fired when {@link Options#copyPaste} option is enabled.
1515
1513
  *
1514
+ * Note: Please keep in mind since @15.0.0 the method arguments has been changed.
1515
+ *
1516
1516
  * @event Hooks#beforeCut
1517
- * @param {Array[]} data An array of arrays which contains data to cut.
1518
- * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
1519
- * which will be cut out.
1517
+ * @param {object} clipboardData Information about cut action which is going to happen.
1518
+ * @param {Function} clipboardData.removeRow Remove row from the copied dataset.
1519
+ * @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
1520
+ * @param {Function} clipboardData.insertAtRow Insert values at row index.
1521
+ * @param {Function} clipboardData.insertAtColumn Insert values at column index.
1522
+ * @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
1523
+ * @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
1524
+ * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
1525
+ * @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
1526
+ * @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
1527
+ * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
1520
1528
  * @returns {*} If returns `false` then operation of the cutting out is canceled.
1521
1529
  * @example
1522
1530
  * ::: only-for javascript
1523
1531
  * ```js
1524
- * // To disregard a single row, remove it from the array using data.splice(i, 1).
1532
+ * // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
1525
1533
  * new Handsontable(element, {
1526
- * beforeCut: function(data, coords) {
1527
- * // data -> [[1, 2, 3], [4, 5, 6]]
1528
- * data.splice(0, 1);
1529
- * // data -> [[4, 5, 6]]
1530
- * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
1534
+ * beforeCut: function(clipboardData) {
1535
+ * // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
1536
+ * clipboardData.removeRows([0]);
1537
+ * clipboardData.removeColumns([0]);
1538
+ * // clipboardData.getData() -> [[5, 6]]
1531
1539
  * }
1532
1540
  * });
1533
1541
  * // To cancel a cutting action, just return `false`.
1534
1542
  * new Handsontable(element, {
1535
- * beforeCut: function(data, coords) {
1543
+ * beforeCut: function(clipboardData) {
1536
1544
  * return false;
1537
1545
  * }
1538
1546
  * });
@@ -1541,18 +1549,18 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1541
1549
  *
1542
1550
  * ::: only-for react
1543
1551
  * ```jsx
1544
- * // To disregard a single row, remove it from the array using data.splice(i, 1).
1552
+ * // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
1545
1553
  * <HotTable
1546
- * beforeCut={(data, coords) => {
1547
- * // data -> [[1, 2, 3], [4, 5, 6]]
1548
- * data.splice(0, 1);
1549
- * // data -> [[4, 5, 6]]
1550
- * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
1554
+ * beforeCut={(clipboardData) => {
1555
+ * // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
1556
+ * clipboardData.removeRows([0]);
1557
+ * clipboardData.removeColumns([0]);
1558
+ * // clipboardData.getData() -> [[5, 6]]
1551
1559
  * }}
1552
1560
  * />
1553
1561
  * // To cancel a cutting action, just return `false`.
1554
1562
  * <HotTable
1555
- * beforeCut={(data, coords) => {
1563
+ * beforeCut={(clipboardData) => {
1556
1564
  * return false;
1557
1565
  * }}
1558
1566
  * />
@@ -1564,33 +1572,52 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1564
1572
  * Fired by {@link CopyPaste} plugin after data was cut out from the table. This hook is fired when
1565
1573
  * {@link Options#copyPaste} option is enabled.
1566
1574
  *
1575
+ * Note: Please keep in mind since @15.0.0 the method arguments has been changed.
1576
+ *
1567
1577
  * @event Hooks#afterCut
1568
- * @param {Array[]} data An array of arrays with the cut data.
1569
- * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
1570
- * which was cut out.
1578
+ * @param {object} clipboardData Information about already performed cut action.
1579
+ * @param {Function} clipboardData.removeRow Remove row from the copied dataset.
1580
+ * @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
1581
+ * @param {Function} clipboardData.insertAtRow Insert values at row index.
1582
+ * @param {Function} clipboardData.insertAtColumn Insert values at column index.
1583
+ * @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
1584
+ * @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
1585
+ * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
1586
+ * @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
1587
+ * @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
1588
+ * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
1571
1589
  */
1572
1590
  'afterCut',
1573
1591
  /**
1574
1592
  * Fired before values are copied to the clipboard.
1575
1593
  *
1594
+ * Note: Please keep in mind since @15.0.0 the method arguments has been changed.
1595
+ *
1576
1596
  * @event Hooks#beforeCopy
1577
- * @param {Array[]} data An array of arrays which contains data to copied.
1578
- * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
1579
- * which will copied.
1580
- * @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.
1597
+ * @param {object} clipboardData Information about copy action which is going to happen.
1598
+ * @param {Function} clipboardData.removeRow Remove row from the copied dataset.
1599
+ * @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
1600
+ * @param {Function} clipboardData.insertAtRow Insert values at row index.
1601
+ * @param {Function} clipboardData.insertAtColumn Insert values at column index.
1602
+ * @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
1603
+ * @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
1604
+ * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
1605
+ * @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
1606
+ * @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
1607
+ * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
1581
1608
  * @returns {*} If returns `false` then copying is canceled.
1582
1609
  *
1583
1610
  * @example
1584
1611
  * ::: only-for javascript
1585
1612
  * ```js
1586
- * // To disregard a single row, remove it from array using data.splice(i, 1).
1613
+ * // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
1587
1614
  * ...
1588
1615
  * new Handsontable(document.getElementById('example'), {
1589
- * beforeCopy: (data, coords) => {
1590
- * // data -> [[1, 2, 3], [4, 5, 6]]
1591
- * data.splice(0, 1);
1592
- * // data -> [[4, 5, 6]]
1593
- * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
1616
+ * beforeCopy: (clipboardData) => {
1617
+ * // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
1618
+ * clipboardData.removeRows([0]);
1619
+ * clipboardData.removeColumns([0]);
1620
+ * // clipboardData.getData() -> [[5, 6]]
1594
1621
  * }
1595
1622
  * });
1596
1623
  * ...
@@ -1598,7 +1625,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1598
1625
  * // To cancel copying, return false from the callback.
1599
1626
  * ...
1600
1627
  * new Handsontable(document.getElementById('example'), {
1601
- * beforeCopy: (data, coords) => {
1628
+ * beforeCopy: (clipboardData) => {
1602
1629
  * return false;
1603
1630
  * }
1604
1631
  * });
@@ -1608,14 +1635,14 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1608
1635
  *
1609
1636
  * ::: only-for react
1610
1637
  * ```jsx
1611
- * // To disregard a single row, remove it from array using data.splice(i, 1).
1638
+ * // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
1612
1639
  * ...
1613
1640
  * <HotTable
1614
- * beforeCopy={(data, coords) => {
1615
- * // data -> [[1, 2, 3], [4, 5, 6]]
1616
- * data.splice(0, 1);
1617
- * // data -> [[4, 5, 6]]
1618
- * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
1641
+ * beforeCopy={(clipboardData) => {
1642
+ * // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
1643
+ * clipboardData.removeRows([0]);
1644
+ * clipboardData.removeColumns([0]);
1645
+ * // clipboardData.getData() -> [[5, 6]]
1619
1646
  * }}
1620
1647
  * />
1621
1648
  * ...
@@ -1623,7 +1650,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1623
1650
  * // To cancel copying, return false from the callback.
1624
1651
  * ...
1625
1652
  * <HotTable
1626
- * beforeCopy={(data, coords) => {
1653
+ * beforeCopy={(clipboardData) => {
1627
1654
  * return false;
1628
1655
  * }}
1629
1656
  * />
@@ -1636,37 +1663,57 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1636
1663
  * Fired by {@link CopyPaste} plugin after data are pasted into table. This hook is fired when {@link Options#copyPaste}
1637
1664
  * option is enabled.
1638
1665
  *
1666
+ * Note: Please keep in mind since @15.0.0 the method arguments has been changed.
1667
+ *
1639
1668
  * @event Hooks#afterCopy
1640
- * @param {Array[]} data An array of arrays which contains the copied data.
1641
- * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
1642
- * which was copied.
1643
- * @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.
1669
+ * @param {object} clipboardData Information about already performed copy action.
1670
+ * @param {Function} clipboardData.removeRow Remove row from the copied dataset.
1671
+ * @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
1672
+ * @param {Function} clipboardData.insertAtRow Insert values at row index.
1673
+ * @param {Function} clipboardData.insertAtColumn Insert values at column index.
1674
+ * @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
1675
+ * @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
1676
+ * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
1677
+ * @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
1678
+ * @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
1679
+ * @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
1644
1680
  */
1645
1681
  'afterCopy',
1646
1682
  /**
1647
1683
  * Fired by {@link CopyPaste} plugin before values are pasted into table. This hook is fired when
1648
1684
  * {@link Options#copyPaste} option is enabled.
1649
1685
  *
1686
+ * Note: Please keep in mind since @15.0.0 the method arguments has been changed.
1687
+ *
1650
1688
  * @event Hooks#beforePaste
1651
- * @param {Array[]} data An array of arrays which contains data to paste.
1652
- * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
1653
- * that correspond to the previously selected area.
1689
+ * @param {object} clipboardData Information about paste action which is going to happen.
1690
+ * @param {Function} clipboardData.removeRow Remove row from the pasted dataset.
1691
+ * @param {Function} clipboardData.removeColumn Remove column from the pasted dataset.
1692
+ * @param {Function} clipboardData.insertAtRow Insert values at row index.
1693
+ * @param {Function} clipboardData.insertAtColumn Insert values at column index.
1694
+ * @param {Function} clipboardData.setCellAt Change headers or cells in the pasted dataset.
1695
+ * @param {Function} clipboardData.getCellAt Get headers or cells from the pasted dataset.
1696
+ * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
1697
+ * @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
1698
+ * @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
1699
+ * @param {Function} clipboardData.getSource Gets information about source of the copied data
1700
+ * (Handsontable, table or string).
1654
1701
  * @returns {*} If returns `false` then pasting is canceled.
1655
1702
  * @example
1656
1703
  * ```js
1657
1704
  * ::: only-for javascript
1658
- * // To disregard a single row, remove it from array using data.splice(i, 1).
1705
+ * // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
1659
1706
  * new Handsontable(example, {
1660
- * beforePaste: (data, coords) => {
1661
- * // data -> [[1, 2, 3], [4, 5, 6]]
1662
- * data.splice(0, 1);
1663
- * // data -> [[4, 5, 6]]
1664
- * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
1707
+ * beforePaste: (clipboardData) => {
1708
+ * // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
1709
+ * clipboardData.removeRows([0]);
1710
+ * clipboardData.removeColumns([0]);
1711
+ * // clipboardData.getData() -> [[5, 6]]
1665
1712
  * }
1666
1713
  * });
1667
1714
  * // To cancel pasting, return false from the callback.
1668
1715
  * new Handsontable(example, {
1669
- * beforePaste: (data, coords) => {
1716
+ * beforePaste: (clipboardData) => {
1670
1717
  * return false;
1671
1718
  * }
1672
1719
  * });
@@ -1675,18 +1722,18 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1675
1722
  *
1676
1723
  * ::: only-for react
1677
1724
  * ```jsx
1678
- * // To disregard a single row, remove it from array using data.splice(i, 1).
1725
+ * // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
1679
1726
  * <HotTable
1680
- * beforePaste={(data, coords) => {
1681
- * // data -> [[1, 2, 3], [4, 5, 6]]
1682
- * data.splice(0, 1);
1683
- * // data -> [[4, 5, 6]]
1684
- * // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
1727
+ * beforePaste={(clipboardData) => {
1728
+ * // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
1729
+ * clipboardData.removeRows([0]);
1730
+ * clipboardData.removeColumns([0]);
1731
+ * // clipboardData.getData() -> [[5, 6]]
1685
1732
  * }}
1686
1733
  * />
1687
1734
  * // To cancel pasting, return false from the callback.
1688
1735
  * <HotTable
1689
- * beforePaste={(data, coords) => {
1736
+ * beforePaste={(clipboardData) => {
1690
1737
  * return false;
1691
1738
  * }}
1692
1739
  * />
@@ -1698,10 +1745,21 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
1698
1745
  * Fired by {@link CopyPaste} plugin after values are pasted into table. This hook is fired when
1699
1746
  * {@link Options#copyPaste} option is enabled.
1700
1747
  *
1748
+ * Note: Please keep in mind since @15.0.0 the method arguments has been changed.
1749
+ *
1701
1750
  * @event Hooks#afterPaste
1702
- * @param {Array[]} data An array of arrays with the pasted data.
1703
- * @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
1704
- * that correspond to the previously selected area.
1751
+ * @param {object} clipboardData Information about already performed paste action.
1752
+ * @param {Function} clipboardData.removeRow Remove row from the pasted dataset.
1753
+ * @param {Function} clipboardData.removeColumn Remove column from the pasted dataset.
1754
+ * @param {Function} clipboardData.insertAtRow Insert values at row index.
1755
+ * @param {Function} clipboardData.insertAtColumn Insert values at column index.
1756
+ * @param {Function} clipboardData.setCellAt Change headers or cells in the pasted dataset.
1757
+ * @param {Function} clipboardData.getCellAt Get headers or cells from the pasted dataset.
1758
+ * @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
1759
+ * @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
1760
+ * @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
1761
+ * @param {Function} clipboardData.getSource Gets information about source of the copied data
1762
+ * (Handsontable, table or string).
1705
1763
  */
1706
1764
  'afterPaste',
1707
1765
  /**