handsontable 0.0.0-next-b96fb9f-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.
- package/3rdparty/walkontable/src/calculator/index.js +6 -11
- package/3rdparty/walkontable/src/calculator/index.mjs +3 -5
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +122 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +124 -2
- package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -2
- package/3rdparty/walkontable/src/core/_base.js +12 -0
- package/3rdparty/walkontable/src/core/_base.mjs +12 -0
- package/3rdparty/walkontable/src/core/core.js +2 -0
- package/3rdparty/walkontable/src/core/core.mjs +2 -0
- package/3rdparty/walkontable/src/facade/core.js +9 -0
- package/3rdparty/walkontable/src/facade/core.mjs +9 -0
- package/3rdparty/walkontable/src/index.js +4 -3
- package/3rdparty/walkontable/src/index.mjs +2 -1
- package/3rdparty/walkontable/src/overlays.js +3 -0
- package/3rdparty/walkontable/src/overlays.mjs +4 -0
- package/3rdparty/walkontable/src/renderer/colGroup.js +0 -10
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +0 -10
- package/3rdparty/walkontable/src/renderer/rows.js +3 -4
- package/3rdparty/walkontable/src/renderer/rows.mjs +3 -4
- package/3rdparty/walkontable/src/selection/manager.js +1 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +1 -0
- package/3rdparty/walkontable/src/settings.js +0 -3
- package/3rdparty/walkontable/src/settings.mjs +0 -2
- package/3rdparty/walkontable/src/table.js +1 -0
- package/3rdparty/walkontable/src/table.mjs +1 -0
- package/3rdparty/walkontable/src/utils/column.js +12 -27
- package/3rdparty/walkontable/src/utils/column.mjs +12 -27
- package/3rdparty/walkontable/src/viewport.js +17 -22
- package/3rdparty/walkontable/src/viewport.mjs +18 -23
- package/base.js +2 -4
- package/base.mjs +2 -2
- package/core/focusCatcher/index.js +6 -44
- package/core/focusCatcher/index.mjs +6 -44
- package/core.js +11 -0
- package/core.mjs +11 -0
- package/dataMap/dataMap.js +0 -1
- package/dataMap/metaManager/metaSchema.js +2 -28
- package/dataMap/metaManager/metaSchema.mjs +2 -28
- package/dataMap/metaManager/mods/extendMetaProperties.js +0 -12
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +0 -12
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +3903 -2640
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +70 -66
- package/dist/handsontable.js +3906 -2643
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +39 -35
- package/editorManager.js +4 -3
- package/editorManager.mjs +4 -3
- package/editors/autocompleteEditor/autocompleteEditor.js +2 -0
- package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -0
- package/editors/handsontableEditor/handsontableEditor.js +1 -0
- package/editors/handsontableEditor/handsontableEditor.mjs +1 -0
- package/editors/textEditor/textEditor.js +4 -0
- package/editors/textEditor/textEditor.mjs +4 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.d.ts +29 -6
- package/pluginHooks.js +123 -65
- package/pluginHooks.mjs +122 -62
- package/plugins/copyPaste/clipboardData/clipboardData.js +588 -0
- package/plugins/copyPaste/clipboardData/clipboardData.mjs +584 -0
- package/plugins/copyPaste/clipboardData/copyClipboardData.js +69 -0
- package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +65 -0
- package/plugins/copyPaste/clipboardData/index.js +9 -0
- package/plugins/copyPaste/clipboardData/index.mjs +4 -0
- package/plugins/copyPaste/clipboardData/pasteClipboardData.js +81 -0
- package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +77 -0
- package/plugins/copyPaste/copyPaste.js +51 -129
- package/plugins/copyPaste/copyPaste.mjs +54 -132
- package/plugins/copyPaste/copyableRanges.js +7 -43
- package/plugins/copyPaste/copyableRanges.mjs +7 -42
- package/plugins/copyPaste/pasteEvent.mjs +1 -1
- package/plugins/customBorders/customBorders.js +5 -0
- package/plugins/customBorders/customBorders.mjs +5 -0
- package/plugins/customBorders/utils.js +1 -0
- package/plugins/customBorders/utils.mjs +1 -0
- package/plugins/filters/ui/radioInput.js +1 -1
- package/plugins/filters/ui/radioInput.mjs +1 -1
- package/plugins/formulas/formulas.js +2 -0
- package/plugins/formulas/formulas.mjs +2 -0
- package/plugins/formulas/indexSyncer/axisSyncer.js +1 -0
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +1 -0
- package/plugins/manualColumnResize/manualColumnResize.js +1 -0
- package/plugins/manualColumnResize/manualColumnResize.mjs +1 -0
- package/plugins/mergeCells/mergeCells.js +127 -1
- package/plugins/mergeCells/mergeCells.mjs +127 -1
- package/plugins/nestedHeaders/nestedHeaders.js +87 -41
- package/plugins/nestedHeaders/nestedHeaders.mjs +88 -42
- package/plugins/nestedHeaders/stateManager/headersTree.js +1 -0
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +1 -0
- package/plugins/undoRedo/undoRedo.js +2 -0
- package/plugins/undoRedo/undoRedo.mjs +2 -0
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +1 -0
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -0
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -0
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +2 -0
- package/selection/highlight/highlight.js +1 -0
- package/selection/highlight/highlight.mjs +1 -0
- package/selection/index.js +3 -1
- package/selection/index.mjs +2 -2
- package/selection/utils.js +34 -0
- package/selection/utils.mjs +33 -0
- package/settings.d.ts +0 -1
- package/tableView.js +2 -1
- package/tableView.mjs +2 -1
- package/translations/indexMapper.js +1 -2
- package/utils/parseTable.js +538 -84
- package/utils/parseTable.mjs +534 -83
- package/validators/timeValidator/timeValidator.js +1 -0
- package/validators/timeValidator/timeValidator.mjs +1 -0
- package/3rdparty/walkontable/src/calculator/renderAllColumns.js +0 -50
- package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +0 -46
- package/3rdparty/walkontable/src/calculator/renderAllRows.js +0 -50
- package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +0 -46
- package/3rdparty/walkontable/src/utils/columnStretching.js +0 -219
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +0 -215
- package/plugins/copyPaste/clipboardData.js +0 -18
- package/plugins/copyPaste/clipboardData.mjs +0 -14
package/pluginHooks.mjs
CHANGED
@@ -1509,26 +1509,36 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1509
1509
|
* Fired by {@link CopyPaste} plugin before copying the values to the clipboard and before clearing values of
|
1510
1510
|
* the selected cells. This hook is fired when {@link Options#copyPaste} option is enabled.
|
1511
1511
|
*
|
1512
|
+
* Note: Please keep in mind since @15.0.0 the method arguments has been changed.
|
1513
|
+
*
|
1512
1514
|
* @event Hooks#beforeCut
|
1513
|
-
* @param {
|
1514
|
-
* @param {
|
1515
|
-
*
|
1515
|
+
* @param {object} clipboardData Information about cut action which is going to happen.
|
1516
|
+
* @param {Function} clipboardData.removeRow Remove row from the copied dataset.
|
1517
|
+
* @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
|
1518
|
+
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
1519
|
+
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
1520
|
+
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
|
1521
|
+
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
|
1522
|
+
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
1523
|
+
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
1524
|
+
* @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
|
1525
|
+
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
1516
1526
|
* @returns {*} If returns `false` then operation of the cutting out is canceled.
|
1517
1527
|
* @example
|
1518
1528
|
* ::: only-for javascript
|
1519
1529
|
* ```js
|
1520
|
-
* // To disregard a single row, remove it from
|
1530
|
+
* // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
|
1521
1531
|
* new Handsontable(element, {
|
1522
|
-
* beforeCut: function(
|
1523
|
-
* //
|
1524
|
-
*
|
1525
|
-
*
|
1526
|
-
* //
|
1532
|
+
* beforeCut: function(clipboardData) {
|
1533
|
+
* // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
|
1534
|
+
* clipboardData.removeRows([0]);
|
1535
|
+
* clipboardData.removeColumns([0]);
|
1536
|
+
* // clipboardData.getData() -> [[5, 6]]
|
1527
1537
|
* }
|
1528
1538
|
* });
|
1529
1539
|
* // To cancel a cutting action, just return `false`.
|
1530
1540
|
* new Handsontable(element, {
|
1531
|
-
* beforeCut: function(
|
1541
|
+
* beforeCut: function(clipboardData) {
|
1532
1542
|
* return false;
|
1533
1543
|
* }
|
1534
1544
|
* });
|
@@ -1537,18 +1547,18 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1537
1547
|
*
|
1538
1548
|
* ::: only-for react
|
1539
1549
|
* ```jsx
|
1540
|
-
* // To disregard a single row, remove it from
|
1550
|
+
* // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
|
1541
1551
|
* <HotTable
|
1542
|
-
* beforeCut={(
|
1543
|
-
* //
|
1544
|
-
*
|
1545
|
-
*
|
1546
|
-
* //
|
1552
|
+
* beforeCut={(clipboardData) => {
|
1553
|
+
* // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
|
1554
|
+
* clipboardData.removeRows([0]);
|
1555
|
+
* clipboardData.removeColumns([0]);
|
1556
|
+
* // clipboardData.getData() -> [[5, 6]]
|
1547
1557
|
* }}
|
1548
1558
|
* />
|
1549
1559
|
* // To cancel a cutting action, just return `false`.
|
1550
1560
|
* <HotTable
|
1551
|
-
* beforeCut={(
|
1561
|
+
* beforeCut={(clipboardData) => {
|
1552
1562
|
* return false;
|
1553
1563
|
* }}
|
1554
1564
|
* />
|
@@ -1560,33 +1570,52 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1560
1570
|
* Fired by {@link CopyPaste} plugin after data was cut out from the table. This hook is fired when
|
1561
1571
|
* {@link Options#copyPaste} option is enabled.
|
1562
1572
|
*
|
1573
|
+
* Note: Please keep in mind since @15.0.0 the method arguments has been changed.
|
1574
|
+
*
|
1563
1575
|
* @event Hooks#afterCut
|
1564
|
-
* @param {
|
1565
|
-
* @param {
|
1566
|
-
*
|
1576
|
+
* @param {object} clipboardData Information about already performed cut action.
|
1577
|
+
* @param {Function} clipboardData.removeRow Remove row from the copied dataset.
|
1578
|
+
* @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
|
1579
|
+
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
1580
|
+
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
1581
|
+
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
|
1582
|
+
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
|
1583
|
+
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
1584
|
+
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
1585
|
+
* @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
|
1586
|
+
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
1567
1587
|
*/
|
1568
1588
|
'afterCut',
|
1569
1589
|
/**
|
1570
1590
|
* Fired before values are copied to the clipboard.
|
1571
1591
|
*
|
1592
|
+
* Note: Please keep in mind since @15.0.0 the method arguments has been changed.
|
1593
|
+
*
|
1572
1594
|
* @event Hooks#beforeCopy
|
1573
|
-
* @param {
|
1574
|
-
* @param {
|
1575
|
-
*
|
1576
|
-
* @param {
|
1595
|
+
* @param {object} clipboardData Information about copy action which is going to happen.
|
1596
|
+
* @param {Function} clipboardData.removeRow Remove row from the copied dataset.
|
1597
|
+
* @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
|
1598
|
+
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
1599
|
+
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
1600
|
+
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
|
1601
|
+
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
|
1602
|
+
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
1603
|
+
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
1604
|
+
* @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
|
1605
|
+
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
1577
1606
|
* @returns {*} If returns `false` then copying is canceled.
|
1578
1607
|
*
|
1579
1608
|
* @example
|
1580
1609
|
* ::: only-for javascript
|
1581
1610
|
* ```js
|
1582
|
-
* // To disregard a single row, remove it from
|
1611
|
+
* // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
|
1583
1612
|
* ...
|
1584
1613
|
* new Handsontable(document.getElementById('example'), {
|
1585
|
-
* beforeCopy: (
|
1586
|
-
* //
|
1587
|
-
*
|
1588
|
-
*
|
1589
|
-
* //
|
1614
|
+
* beforeCopy: (clipboardData) => {
|
1615
|
+
* // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
|
1616
|
+
* clipboardData.removeRows([0]);
|
1617
|
+
* clipboardData.removeColumns([0]);
|
1618
|
+
* // clipboardData.getData() -> [[5, 6]]
|
1590
1619
|
* }
|
1591
1620
|
* });
|
1592
1621
|
* ...
|
@@ -1594,7 +1623,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1594
1623
|
* // To cancel copying, return false from the callback.
|
1595
1624
|
* ...
|
1596
1625
|
* new Handsontable(document.getElementById('example'), {
|
1597
|
-
* beforeCopy: (
|
1626
|
+
* beforeCopy: (clipboardData) => {
|
1598
1627
|
* return false;
|
1599
1628
|
* }
|
1600
1629
|
* });
|
@@ -1604,14 +1633,14 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1604
1633
|
*
|
1605
1634
|
* ::: only-for react
|
1606
1635
|
* ```jsx
|
1607
|
-
* // To disregard a single row, remove it from
|
1636
|
+
* // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
|
1608
1637
|
* ...
|
1609
1638
|
* <HotTable
|
1610
|
-
* beforeCopy={(
|
1611
|
-
* //
|
1612
|
-
*
|
1613
|
-
*
|
1614
|
-
* //
|
1639
|
+
* beforeCopy={(clipboardData) => {
|
1640
|
+
* // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
|
1641
|
+
* clipboardData.removeRows([0]);
|
1642
|
+
* clipboardData.removeColumns([0]);
|
1643
|
+
* // clipboardData.getData() -> [[5, 6]]
|
1615
1644
|
* }}
|
1616
1645
|
* />
|
1617
1646
|
* ...
|
@@ -1619,7 +1648,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1619
1648
|
* // To cancel copying, return false from the callback.
|
1620
1649
|
* ...
|
1621
1650
|
* <HotTable
|
1622
|
-
* beforeCopy={(
|
1651
|
+
* beforeCopy={(clipboardData) => {
|
1623
1652
|
* return false;
|
1624
1653
|
* }}
|
1625
1654
|
* />
|
@@ -1632,37 +1661,57 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1632
1661
|
* Fired by {@link CopyPaste} plugin after data are pasted into table. This hook is fired when {@link Options#copyPaste}
|
1633
1662
|
* option is enabled.
|
1634
1663
|
*
|
1664
|
+
* Note: Please keep in mind since @15.0.0 the method arguments has been changed.
|
1665
|
+
*
|
1635
1666
|
* @event Hooks#afterCopy
|
1636
|
-
* @param {
|
1637
|
-
* @param {
|
1638
|
-
*
|
1639
|
-
* @param {
|
1667
|
+
* @param {object} clipboardData Information about already performed copy action.
|
1668
|
+
* @param {Function} clipboardData.removeRow Remove row from the copied dataset.
|
1669
|
+
* @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
|
1670
|
+
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
1671
|
+
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
1672
|
+
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
|
1673
|
+
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
|
1674
|
+
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
1675
|
+
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
1676
|
+
* @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
|
1677
|
+
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
1640
1678
|
*/
|
1641
1679
|
'afterCopy',
|
1642
1680
|
/**
|
1643
1681
|
* Fired by {@link CopyPaste} plugin before values are pasted into table. This hook is fired when
|
1644
1682
|
* {@link Options#copyPaste} option is enabled.
|
1645
1683
|
*
|
1684
|
+
* Note: Please keep in mind since @15.0.0 the method arguments has been changed.
|
1685
|
+
*
|
1646
1686
|
* @event Hooks#beforePaste
|
1647
|
-
* @param {
|
1648
|
-
* @param {
|
1649
|
-
*
|
1687
|
+
* @param {object} clipboardData Information about paste action which is going to happen.
|
1688
|
+
* @param {Function} clipboardData.removeRow Remove row from the pasted dataset.
|
1689
|
+
* @param {Function} clipboardData.removeColumn Remove column from the pasted dataset.
|
1690
|
+
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
1691
|
+
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
1692
|
+
* @param {Function} clipboardData.setCellAt Change headers or cells in the pasted dataset.
|
1693
|
+
* @param {Function} clipboardData.getCellAt Get headers or cells from the pasted dataset.
|
1694
|
+
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
1695
|
+
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
1696
|
+
* @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
|
1697
|
+
* @param {Function} clipboardData.getSource Gets information about source of the copied data
|
1698
|
+
* (Handsontable, table or string).
|
1650
1699
|
* @returns {*} If returns `false` then pasting is canceled.
|
1651
1700
|
* @example
|
1652
1701
|
* ```js
|
1653
1702
|
* ::: only-for javascript
|
1654
|
-
* // To disregard a single row, remove it from
|
1703
|
+
* // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
|
1655
1704
|
* new Handsontable(example, {
|
1656
|
-
* beforePaste: (
|
1657
|
-
* //
|
1658
|
-
*
|
1659
|
-
*
|
1660
|
-
* //
|
1705
|
+
* beforePaste: (clipboardData) => {
|
1706
|
+
* // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
|
1707
|
+
* clipboardData.removeRows([0]);
|
1708
|
+
* clipboardData.removeColumns([0]);
|
1709
|
+
* // clipboardData.getData() -> [[5, 6]]
|
1661
1710
|
* }
|
1662
1711
|
* });
|
1663
1712
|
* // To cancel pasting, return false from the callback.
|
1664
1713
|
* new Handsontable(example, {
|
1665
|
-
* beforePaste: (
|
1714
|
+
* beforePaste: (clipboardData) => {
|
1666
1715
|
* return false;
|
1667
1716
|
* }
|
1668
1717
|
* });
|
@@ -1671,18 +1720,18 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1671
1720
|
*
|
1672
1721
|
* ::: only-for react
|
1673
1722
|
* ```jsx
|
1674
|
-
* // To disregard a single row, remove it from
|
1723
|
+
* // To disregard a single row or column, remove it from copied dataset using `removeRows`/`removeColumns` method on the object from the first callback argument.
|
1675
1724
|
* <HotTable
|
1676
|
-
* beforePaste={(
|
1677
|
-
* //
|
1678
|
-
*
|
1679
|
-
*
|
1680
|
-
* //
|
1725
|
+
* beforePaste={(clipboardData) => {
|
1726
|
+
* // clipboardData.getData() -> [[1, 2, 3], [4, 5, 6]]
|
1727
|
+
* clipboardData.removeRows([0]);
|
1728
|
+
* clipboardData.removeColumns([0]);
|
1729
|
+
* // clipboardData.getData() -> [[5, 6]]
|
1681
1730
|
* }}
|
1682
1731
|
* />
|
1683
1732
|
* // To cancel pasting, return false from the callback.
|
1684
1733
|
* <HotTable
|
1685
|
-
* beforePaste={(
|
1734
|
+
* beforePaste={(clipboardData) => {
|
1686
1735
|
* return false;
|
1687
1736
|
* }}
|
1688
1737
|
* />
|
@@ -1694,10 +1743,21 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1694
1743
|
* Fired by {@link CopyPaste} plugin after values are pasted into table. This hook is fired when
|
1695
1744
|
* {@link Options#copyPaste} option is enabled.
|
1696
1745
|
*
|
1746
|
+
* Note: Please keep in mind since @15.0.0 the method arguments has been changed.
|
1747
|
+
*
|
1697
1748
|
* @event Hooks#afterPaste
|
1698
|
-
* @param {
|
1699
|
-
* @param {
|
1700
|
-
*
|
1749
|
+
* @param {object} clipboardData Information about already performed paste action.
|
1750
|
+
* @param {Function} clipboardData.removeRow Remove row from the pasted dataset.
|
1751
|
+
* @param {Function} clipboardData.removeColumn Remove column from the pasted dataset.
|
1752
|
+
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
1753
|
+
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
1754
|
+
* @param {Function} clipboardData.setCellAt Change headers or cells in the pasted dataset.
|
1755
|
+
* @param {Function} clipboardData.getCellAt Get headers or cells from the pasted dataset.
|
1756
|
+
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
1757
|
+
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
1758
|
+
* @param {Function} clipboardData.setMetaInfo Sets meta information for the copied data.
|
1759
|
+
* @param {Function} clipboardData.getSource Gets information about source of the copied data
|
1760
|
+
* (Handsontable, table or string).
|
1701
1761
|
*/
|
1702
1762
|
'afterPaste',
|
1703
1763
|
/**
|