handsontable 12.2.0 → 12.3.0-next-9dc4f5d-20221209
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/border.js +13 -6
- package/3rdparty/walkontable/src/border.mjs +12 -5
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +10 -1
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -1
- package/3rdparty/walkontable/src/cell/coords.js +64 -26
- package/3rdparty/walkontable/src/cell/coords.mjs +64 -26
- package/3rdparty/walkontable/src/cell/range.d.ts +19 -16
- package/3rdparty/walkontable/src/cell/range.js +199 -104
- package/3rdparty/walkontable/src/cell/range.mjs +201 -106
- package/3rdparty/walkontable/src/core/_base.js +17 -3
- package/3rdparty/walkontable/src/core/_base.mjs +20 -6
- package/3rdparty/walkontable/src/core/clone.js +13 -7
- package/3rdparty/walkontable/src/core/clone.mjs +15 -9
- package/3rdparty/walkontable/src/core/core.js +8 -2
- package/3rdparty/walkontable/src/core/core.mjs +10 -4
- package/3rdparty/walkontable/src/event.js +10 -1
- package/3rdparty/walkontable/src/event.mjs +10 -1
- package/3rdparty/walkontable/src/facade/core.js +16 -2
- package/3rdparty/walkontable/src/facade/core.mjs +22 -8
- package/3rdparty/walkontable/src/filter/column.js +16 -2
- package/3rdparty/walkontable/src/filter/column.mjs +16 -2
- package/3rdparty/walkontable/src/filter/row.js +16 -2
- package/3rdparty/walkontable/src/filter/row.mjs +16 -2
- package/3rdparty/walkontable/src/overlay/_base.js +17 -3
- package/3rdparty/walkontable/src/overlay/_base.mjs +24 -10
- package/3rdparty/walkontable/src/overlay/bottom.js +13 -7
- package/3rdparty/walkontable/src/overlay/bottom.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/top.js +13 -7
- package/3rdparty/walkontable/src/overlay/top.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +13 -7
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +15 -9
- package/3rdparty/walkontable/src/overlays.js +69 -19
- package/3rdparty/walkontable/src/overlays.mjs +71 -21
- package/3rdparty/walkontable/src/renderer/_base.js +16 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/cells.js +8 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/colGroup.js +8 -2
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/index.js +16 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/rows.js +8 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +8 -3
- package/3rdparty/walkontable/src/renderer/table.js +16 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +16 -2
- package/3rdparty/walkontable/src/scroll.js +16 -3
- package/3rdparty/walkontable/src/scroll.mjs +18 -5
- package/3rdparty/walkontable/src/selection.js +11 -5
- package/3rdparty/walkontable/src/selection.mjs +11 -5
- package/3rdparty/walkontable/src/settings.js +16 -2
- package/3rdparty/walkontable/src/settings.mjs +16 -2
- package/3rdparty/walkontable/src/table/bottom.js +8 -2
- package/3rdparty/walkontable/src/table/bottom.mjs +13 -7
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/table/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/table/master.js +8 -2
- package/3rdparty/walkontable/src/table/master.mjs +13 -7
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +12 -6
- package/3rdparty/walkontable/src/table/top.js +8 -2
- package/3rdparty/walkontable/src/table/top.mjs +13 -7
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table.js +13 -6
- package/3rdparty/walkontable/src/table.mjs +21 -14
- package/3rdparty/walkontable/src/utils/column.js +12 -2
- package/3rdparty/walkontable/src/utils/column.mjs +16 -6
- package/3rdparty/walkontable/src/utils/nodesPool.js +16 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +8 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +12 -6
- package/3rdparty/walkontable/src/utils/orderView/view.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +23 -9
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +31 -17
- package/3rdparty/walkontable/src/utils/row.js +16 -2
- package/3rdparty/walkontable/src/utils/row.mjs +16 -2
- package/3rdparty/walkontable/src/viewport.js +16 -2
- package/3rdparty/walkontable/src/viewport.mjs +18 -4
- package/CHANGELOG.md +23 -0
- package/base.d.ts +1 -0
- package/base.js +7 -2
- package/base.mjs +9 -4
- package/cellTypes/index.mjs +4 -3
- package/core.d.ts +1 -1
- package/core.js +234 -122
- package/core.mjs +231 -119
- package/dataMap/dataMap.js +98 -28
- package/dataMap/dataMap.mjs +97 -27
- package/dataMap/dataSource.js +14 -2
- package/dataMap/dataSource.mjs +17 -5
- package/dataMap/metaManager/index.js +15 -2
- package/dataMap/metaManager/index.mjs +41 -28
- package/dataMap/metaManager/lazyFactoryMap.js +7 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +7 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +13 -8
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +12 -7
- package/dataMap/metaManager/metaLayers/columnMeta.js +15 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +23 -9
- package/dataMap/metaManager/metaLayers/globalMeta.js +26 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +27 -3
- package/dataMap/metaManager/metaLayers/tableMeta.js +17 -3
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +41 -27
- package/dataMap/metaManager/metaSchema.js +119 -66
- package/dataMap/metaManager/metaSchema.mjs +119 -66
- package/dataMap/metaManager/mods/dynamicCellMeta.js +12 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +26 -16
- package/dataMap/metaManager/mods/extendMetaProperties.js +12 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +10 -1
- package/dataMap/metaManager/utils.js +44 -14
- package/dataMap/metaManager/utils.mjs +51 -20
- package/dataMap/replaceData.js +2 -1
- package/dataMap/replaceData.mjs +24 -22
- package/dist/handsontable.css +9 -9
- package/dist/handsontable.full.css +9 -9
- package/dist/handsontable.full.js +7350 -10885
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +107 -113
- package/dist/handsontable.js +5800 -4499
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/dist/languages/all.js +111 -65
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +50 -4
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +52 -6
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +52 -6
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +53 -7
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +56 -10
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +56 -10
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +55 -9
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +55 -9
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +83 -33
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +84 -33
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +85 -33
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +86 -33
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +87 -33
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +88 -33
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +68 -19
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +68 -19
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +55 -6
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +55 -6
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +55 -6
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +18 -9
- package/editorManager.mjs +15 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -5
- package/editors/autocompleteEditor/autocompleteEditor.mjs +9 -4
- package/editors/baseEditor/baseEditor.js +11 -6
- package/editors/baseEditor/baseEditor.mjs +10 -5
- package/editors/checkboxEditor/checkboxEditor.js +6 -1
- package/editors/checkboxEditor/checkboxEditor.mjs +6 -1
- package/editors/dateEditor/dateEditor.js +6 -1
- package/editors/dateEditor/dateEditor.mjs +6 -1
- package/editors/dropdownEditor/dropdownEditor.js +6 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +6 -1
- package/editors/handsontableEditor/handsontableEditor.js +6 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +6 -1
- package/editors/index.mjs +4 -3
- package/editors/numericEditor/numericEditor.js +6 -1
- package/editors/numericEditor/numericEditor.mjs +6 -1
- package/editors/passwordEditor/passwordEditor.js +6 -1
- package/editors/passwordEditor/passwordEditor.mjs +6 -1
- package/editors/registry.js +3 -0
- package/editors/registry.mjs +5 -1
- package/editors/selectEditor/selectEditor.js +6 -1
- package/editors/selectEditor/selectEditor.mjs +6 -1
- package/editors/textEditor/caretPositioner.mjs +11 -10
- package/editors/textEditor/textEditor.js +7 -2
- package/editors/textEditor/textEditor.mjs +7 -2
- package/editors/timeEditor/timeEditor.js +6 -1
- package/editors/timeEditor/timeEditor.mjs +6 -1
- package/eventManager.js +24 -9
- package/eventManager.mjs +26 -11
- package/helpers/console.mjs +6 -5
- package/helpers/data.d.ts +0 -1
- package/helpers/data.js +0 -49
- package/helpers/data.mjs +1 -49
- package/helpers/dom/element.js +23 -0
- package/helpers/dom/element.mjs +30 -7
- package/helpers/feature.js +9 -36
- package/helpers/feature.mjs +3 -30
- package/helpers/function.mjs +7 -6
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +9 -8
- package/helpers/object.js +15 -9
- package/helpers/object.mjs +17 -10
- package/helpers/string.mjs +7 -6
- package/helpers/templateLiteralTag.mjs +8 -7
- package/i18n/constants.js +49 -42
- package/i18n/constants.mjs +45 -41
- package/i18n/languages/ar-AR.js +12 -7
- package/i18n/languages/ar-AR.mjs +16 -2
- package/i18n/languages/cs-CZ.js +12 -7
- package/i18n/languages/cs-CZ.mjs +16 -2
- package/i18n/languages/de-CH.js +12 -7
- package/i18n/languages/de-CH.mjs +16 -2
- package/i18n/languages/de-DE.js +12 -7
- package/i18n/languages/de-DE.mjs +16 -2
- package/i18n/languages/en-US.js +13 -8
- package/i18n/languages/en-US.mjs +17 -3
- package/i18n/languages/es-MX.js +13 -8
- package/i18n/languages/es-MX.mjs +19 -4
- package/i18n/languages/fr-FR.js +12 -7
- package/i18n/languages/fr-FR.mjs +16 -2
- package/i18n/languages/it-IT.js +12 -7
- package/i18n/languages/it-IT.mjs +16 -2
- package/i18n/languages/ja-JP.js +12 -7
- package/i18n/languages/ja-JP.mjs +16 -2
- package/i18n/languages/ko-KR.js +12 -7
- package/i18n/languages/ko-KR.mjs +16 -2
- package/i18n/languages/lv-LV.js +13 -8
- package/i18n/languages/lv-LV.mjs +19 -5
- package/i18n/languages/nb-NO.js +12 -7
- package/i18n/languages/nb-NO.mjs +16 -2
- package/i18n/languages/nl-NL.js +13 -8
- package/i18n/languages/nl-NL.mjs +19 -5
- package/i18n/languages/pl-PL.js +13 -8
- package/i18n/languages/pl-PL.mjs +18 -4
- package/i18n/languages/pt-BR.js +12 -7
- package/i18n/languages/pt-BR.mjs +16 -2
- package/i18n/languages/ru-RU.js +12 -7
- package/i18n/languages/ru-RU.mjs +16 -2
- package/i18n/languages/sr-SP.js +12 -7
- package/i18n/languages/sr-SP.mjs +16 -2
- package/i18n/languages/zh-CN.js +12 -7
- package/i18n/languages/zh-CN.mjs +16 -2
- package/i18n/languages/zh-TW.js +12 -7
- package/i18n/languages/zh-TW.mjs +16 -2
- package/i18n/phraseFormatters/substituteVariables.mjs +9 -8
- package/i18n/utils.mjs +10 -9
- package/index.d.ts +9 -0
- package/index.js +4 -2
- package/index.mjs +2 -1
- package/languages/all.js +111 -65
- package/languages/ar-AR.js +50 -4
- package/languages/ar-AR.mjs +16 -2
- package/languages/cs-CZ.js +52 -6
- package/languages/cs-CZ.mjs +16 -2
- package/languages/de-CH.js +52 -6
- package/languages/de-CH.mjs +16 -2
- package/languages/de-DE.js +53 -7
- package/languages/de-DE.mjs +16 -2
- package/languages/en-US.js +56 -10
- package/languages/en-US.mjs +17 -3
- package/languages/es-MX.js +56 -10
- package/languages/es-MX.mjs +19 -4
- package/languages/fr-FR.js +55 -9
- package/languages/fr-FR.mjs +16 -2
- package/languages/index.js +111 -65
- package/languages/it-IT.js +55 -9
- package/languages/it-IT.mjs +16 -2
- package/languages/ja-JP.js +83 -33
- package/languages/ja-JP.mjs +16 -2
- package/languages/ko-KR.js +84 -33
- package/languages/ko-KR.mjs +16 -2
- package/languages/lv-LV.js +85 -33
- package/languages/lv-LV.mjs +19 -5
- package/languages/nb-NO.js +86 -33
- package/languages/nb-NO.mjs +16 -2
- package/languages/nl-NL.js +87 -33
- package/languages/nl-NL.mjs +19 -5
- package/languages/pl-PL.js +88 -33
- package/languages/pl-PL.mjs +18 -4
- package/languages/pt-BR.js +68 -19
- package/languages/pt-BR.mjs +16 -2
- package/languages/ru-RU.js +68 -19
- package/languages/ru-RU.mjs +16 -2
- package/languages/sr-SP.js +55 -6
- package/languages/sr-SP.mjs +16 -2
- package/languages/zh-CN.js +55 -6
- package/languages/zh-CN.mjs +16 -2
- package/languages/zh-TW.js +55 -6
- package/languages/zh-TW.mjs +16 -2
- package/mixins/hooksRefRegisterer.js +6 -3
- package/mixins/hooksRefRegisterer.mjs +6 -3
- package/mixins/localHooks.js +6 -3
- package/mixins/localHooks.mjs +6 -3
- package/package.json +2 -2
- package/pluginHooks.d.ts +7 -2
- package/pluginHooks.js +109 -24
- package/pluginHooks.mjs +109 -24
- package/plugins/autoColumnSize/autoColumnSize.js +7 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +7 -2
- package/plugins/autoRowSize/autoRowSize.js +16 -7
- package/plugins/autoRowSize/autoRowSize.mjs +16 -7
- package/plugins/autofill/autofill.js +7 -2
- package/plugins/autofill/autofill.mjs +7 -2
- package/plugins/base/base.js +8 -2
- package/plugins/base/base.mjs +8 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +6 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +6 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +10 -5
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +9 -4
- package/plugins/columnSorting/columnSorting.js +8 -4
- package/plugins/columnSorting/columnSorting.mjs +8 -4
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +9 -3
- package/plugins/columnSorting/rootComparator.mjs +8 -7
- package/plugins/columnSorting/sortFunction/checkbox.mjs +9 -8
- package/plugins/columnSorting/sortFunction/date.mjs +9 -8
- package/plugins/columnSorting/sortFunction/default.mjs +9 -8
- package/plugins/columnSorting/sortFunction/numeric.mjs +9 -8
- package/plugins/columnSummary/columnSummary.js +13 -8
- package/plugins/columnSummary/columnSummary.mjs +13 -8
- package/plugins/columnSummary/endpoints.js +17 -16
- package/plugins/columnSummary/endpoints.mjs +22 -21
- package/plugins/comments/commentEditor.js +16 -2
- package/plugins/comments/commentEditor.mjs +21 -7
- package/plugins/comments/comments.js +15 -4
- package/plugins/comments/comments.mjs +15 -4
- package/plugins/comments/displaySwitch.js +14 -1
- package/plugins/comments/displaySwitch.mjs +14 -1
- package/plugins/contextMenu/commandExecutor.js +22 -7
- package/plugins/contextMenu/commandExecutor.mjs +27 -12
- package/plugins/contextMenu/contextMenu.d.ts +4 -3
- package/plugins/contextMenu/contextMenu.js +7 -17
- package/plugins/contextMenu/contextMenu.mjs +7 -17
- package/plugins/contextMenu/cursor.js +16 -2
- package/plugins/contextMenu/cursor.mjs +21 -7
- package/plugins/contextMenu/itemsFactory.js +23 -8
- package/plugins/contextMenu/itemsFactory.mjs +28 -13
- package/plugins/contextMenu/menu.js +14 -3
- package/plugins/contextMenu/menu.mjs +13 -2
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/contextMenu/predefinedItems.js +12 -7
- package/plugins/contextMenu/predefinedItems.mjs +14 -1
- package/plugins/contextMenu/utils.mjs +5 -4
- package/plugins/copyPaste/clipboardData.js +16 -2
- package/plugins/copyPaste/clipboardData.mjs +16 -2
- package/plugins/copyPaste/contextMenuItem/copy.js +4 -16
- package/plugins/copyPaste/contextMenuItem/copy.mjs +8 -7
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +5 -4
- package/plugins/copyPaste/copyPaste.d.ts +10 -2
- package/plugins/copyPaste/copyPaste.js +303 -202
- package/plugins/copyPaste/copyPaste.mjs +303 -202
- package/plugins/copyPaste/copyableRanges.js +269 -0
- package/plugins/copyPaste/copyableRanges.mjs +264 -0
- package/plugins/copyPaste/focusableElement.js +12 -2
- package/plugins/copyPaste/focusableElement.mjs +15 -5
- package/plugins/copyPaste/pasteEvent.js +16 -2
- package/plugins/copyPaste/pasteEvent.mjs +18 -4
- package/plugins/customBorders/contextMenuItem/bottom.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/left.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/noBorders.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/right.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/top.mjs +5 -4
- package/plugins/customBorders/customBorders.js +12 -7
- package/plugins/customBorders/customBorders.mjs +11 -6
- package/plugins/customBorders/utils.mjs +8 -7
- package/plugins/dragToScroll/dragToScroll.js +6 -1
- package/plugins/dragToScroll/dragToScroll.mjs +6 -1
- package/plugins/dropdownMenu/dropdownMenu.js +6 -1
- package/plugins/dropdownMenu/dropdownMenu.mjs +6 -1
- package/plugins/exportFile/dataProvider.js +13 -6
- package/plugins/exportFile/dataProvider.mjs +12 -5
- package/plugins/exportFile/exportFile.js +8 -3
- package/plugins/exportFile/exportFile.mjs +6 -1
- package/plugins/exportFile/typeFactory.js +14 -1
- package/plugins/exportFile/typeFactory.mjs +14 -1
- package/plugins/exportFile/types/_base.js +16 -2
- package/plugins/exportFile/types/_base.mjs +18 -4
- package/plugins/exportFile/types/csv.js +6 -1
- package/plugins/exportFile/types/csv.mjs +6 -1
- package/plugins/filters/component/_base.js +16 -2
- package/plugins/filters/component/_base.mjs +19 -5
- package/plugins/filters/component/actionBar.js +10 -4
- package/plugins/filters/component/actionBar.mjs +11 -5
- package/plugins/filters/component/condition.js +10 -4
- package/plugins/filters/component/condition.mjs +11 -5
- package/plugins/filters/component/operators.js +8 -3
- package/plugins/filters/component/operators.mjs +8 -3
- package/plugins/filters/component/value.js +9 -3
- package/plugins/filters/component/value.mjs +12 -6
- package/plugins/filters/condition/beginsWith.js +1 -1
- package/plugins/filters/condition/beginsWith.mjs +1 -1
- package/plugins/filters/condition/between.js +1 -1
- package/plugins/filters/condition/between.mjs +1 -1
- package/plugins/filters/condition/byValue.js +1 -1
- package/plugins/filters/condition/byValue.mjs +1 -1
- package/plugins/filters/condition/contains.js +1 -1
- package/plugins/filters/condition/contains.mjs +1 -1
- package/plugins/filters/condition/date/after.js +1 -1
- package/plugins/filters/condition/date/after.mjs +1 -1
- package/plugins/filters/condition/date/before.js +1 -1
- package/plugins/filters/condition/date/before.mjs +1 -1
- package/plugins/filters/condition/endsWith.js +1 -1
- package/plugins/filters/condition/endsWith.mjs +1 -1
- package/plugins/filters/condition/equal.js +1 -1
- package/plugins/filters/condition/equal.mjs +1 -1
- package/plugins/filters/condition/greaterThan.js +1 -1
- package/plugins/filters/condition/greaterThan.mjs +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.js +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.mjs +1 -1
- package/plugins/filters/condition/lessThan.js +1 -1
- package/plugins/filters/condition/lessThan.mjs +1 -1
- package/plugins/filters/condition/lessThanOrEqual.js +1 -1
- package/plugins/filters/condition/lessThanOrEqual.mjs +1 -1
- package/plugins/filters/conditionCollection.js +10 -4
- package/plugins/filters/conditionCollection.mjs +18 -12
- package/plugins/filters/conditionUpdateObserver.js +15 -2
- package/plugins/filters/conditionUpdateObserver.mjs +23 -10
- package/plugins/filters/constants.js +14 -1
- package/plugins/filters/constants.mjs +14 -1
- package/plugins/filters/dataFilter.js +16 -2
- package/plugins/filters/dataFilter.mjs +19 -5
- package/plugins/filters/filters.js +7 -2
- package/plugins/filters/filters.mjs +7 -2
- package/plugins/filters/ui/_base.js +12 -7
- package/plugins/filters/ui/_base.mjs +14 -1
- package/plugins/filters/ui/input.js +6 -1
- package/plugins/filters/ui/input.mjs +6 -1
- package/plugins/filters/ui/link.js +6 -1
- package/plugins/filters/ui/link.mjs +6 -1
- package/plugins/filters/ui/multipleSelect.js +14 -8
- package/plugins/filters/ui/multipleSelect.mjs +6 -1
- package/plugins/filters/ui/radioInput.js +6 -1
- package/plugins/filters/ui/radioInput.mjs +6 -1
- package/plugins/filters/ui/select.js +6 -1
- package/plugins/filters/ui/select.mjs +6 -1
- package/plugins/formulas/engine/register.mjs +6 -5
- package/plugins/formulas/engine/settings.js +12 -1
- package/plugins/formulas/engine/settings.mjs +12 -1
- package/plugins/formulas/formulas.js +24 -11
- package/plugins/formulas/formulas.mjs +24 -11
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +6 -5
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +5 -4
- package/plugins/hiddenColumns/hiddenColumns.js +5 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +5 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +6 -5
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +5 -4
- package/plugins/hiddenRows/hiddenRows.js +5 -1
- package/plugins/hiddenRows/hiddenRows.mjs +5 -1
- package/plugins/index.mjs +4 -3
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +6 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +6 -1
- package/plugins/manualColumnMove/manualColumnMove.js +6 -1
- package/plugins/manualColumnMove/manualColumnMove.mjs +6 -1
- package/plugins/manualColumnMove/ui/_base.js +14 -1
- package/plugins/manualColumnMove/ui/_base.mjs +14 -1
- package/plugins/manualColumnMove/ui/backlight.js +6 -1
- package/plugins/manualColumnMove/ui/backlight.mjs +6 -1
- package/plugins/manualColumnMove/ui/guideline.js +6 -1
- package/plugins/manualColumnMove/ui/guideline.mjs +6 -1
- package/plugins/manualColumnResize/manualColumnResize.js +6 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -1
- package/plugins/manualRowMove/manualRowMove.js +6 -1
- package/plugins/manualRowMove/manualRowMove.mjs +6 -1
- package/plugins/manualRowMove/ui/_base.js +14 -1
- package/plugins/manualRowMove/ui/_base.mjs +14 -1
- package/plugins/manualRowMove/ui/backlight.js +6 -1
- package/plugins/manualRowMove/ui/backlight.mjs +6 -1
- package/plugins/manualRowMove/ui/guideline.js +6 -1
- package/plugins/manualRowMove/ui/guideline.mjs +6 -1
- package/plugins/manualRowResize/manualRowResize.js +6 -1
- package/plugins/manualRowResize/manualRowResize.mjs +6 -1
- package/plugins/mergeCells/calculations/autofill.js +13 -6
- package/plugins/mergeCells/calculations/autofill.mjs +15 -8
- package/plugins/mergeCells/calculations/selection.js +16 -2
- package/plugins/mergeCells/calculations/selection.mjs +16 -2
- package/plugins/mergeCells/cellCoords.js +16 -2
- package/plugins/mergeCells/cellCoords.mjs +21 -7
- package/plugins/mergeCells/cellsCollection.js +12 -5
- package/plugins/mergeCells/cellsCollection.mjs +14 -7
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +5 -4
- package/plugins/mergeCells/mergeCells.js +7 -2
- package/plugins/mergeCells/mergeCells.mjs +7 -2
- package/plugins/multiColumnSorting/multiColumnSorting.js +6 -1
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -1
- package/plugins/multiColumnSorting/rootComparator.mjs +8 -7
- package/plugins/multiColumnSorting/utils.mjs +4 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +6 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +6 -1
- package/plugins/nestedHeaders/nestedHeaders.js +124 -16
- package/plugins/nestedHeaders/nestedHeaders.mjs +131 -23
- package/plugins/nestedHeaders/stateManager/headersTree.js +10 -3
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +10 -3
- package/plugins/nestedHeaders/stateManager/index.js +34 -14
- package/plugins/nestedHeaders/stateManager/index.mjs +67 -47
- package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +33 -31
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +18 -17
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +17 -16
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.mjs +2 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +41 -39
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +11 -3
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +23 -14
- package/plugins/nestedHeaders/utils/ghostTable.js +17 -3
- package/plugins/nestedHeaders/utils/ghostTable.mjs +24 -10
- package/plugins/nestedRows/data/dataManager.js +10 -4
- package/plugins/nestedRows/data/dataManager.mjs +12 -6
- package/plugins/nestedRows/nestedRows.js +6 -1
- package/plugins/nestedRows/nestedRows.mjs +6 -1
- package/plugins/nestedRows/ui/_base.js +16 -2
- package/plugins/nestedRows/ui/_base.mjs +16 -2
- package/plugins/nestedRows/ui/collapsing.js +8 -2
- package/plugins/nestedRows/ui/collapsing.mjs +14 -8
- package/plugins/nestedRows/ui/contextMenu.js +7 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +6 -1
- package/plugins/nestedRows/ui/headers.js +8 -2
- package/plugins/nestedRows/ui/headers.mjs +14 -8
- package/plugins/nestedRows/utils/rowMoveController.js +11 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +25 -18
- package/plugins/persistentState/persistentState.js +6 -1
- package/plugins/persistentState/persistentState.mjs +6 -1
- package/plugins/persistentState/storage.js +16 -2
- package/plugins/persistentState/storage.mjs +19 -5
- package/plugins/registry.js +1 -1
- package/plugins/registry.mjs +3 -2
- package/plugins/search/search.js +6 -1
- package/plugins/search/search.mjs +6 -1
- package/plugins/touchScroll/touchScroll.js +6 -1
- package/plugins/touchScroll/touchScroll.mjs +6 -1
- package/plugins/trimRows/trimRows.js +5 -1
- package/plugins/trimRows/trimRows.mjs +5 -1
- package/plugins/undoRedo/undoRedo.js +50 -32
- package/plugins/undoRedo/undoRedo.mjs +50 -32
- package/registry.mjs +2 -1
- package/renderers/baseRenderer/baseRenderer.mjs +2 -1
- package/renderers/index.mjs +4 -3
- package/selection/highlight/highlight.js +10 -3
- package/selection/highlight/highlight.mjs +24 -17
- package/selection/highlight/types/activeHeader.js +13 -2
- package/selection/highlight/types/activeHeader.mjs +19 -7
- package/selection/highlight/types/area.js +13 -2
- package/selection/highlight/types/area.mjs +22 -10
- package/selection/highlight/types/cell.js +13 -2
- package/selection/highlight/types/cell.mjs +22 -10
- package/selection/highlight/types/customSelection.js +13 -2
- package/selection/highlight/types/customSelection.mjs +23 -11
- package/selection/highlight/types/fill.js +14 -3
- package/selection/highlight/types/fill.mjs +22 -10
- package/selection/highlight/types/header.js +13 -2
- package/selection/highlight/types/header.mjs +24 -12
- package/selection/highlight/types/index.js +14 -3
- package/selection/highlight/types/index.mjs +14 -3
- package/selection/highlight/visualSelection.js +11 -6
- package/selection/highlight/visualSelection.mjs +11 -6
- package/selection/mouseEventHandler.mjs +14 -13
- package/selection/range.js +9 -2
- package/selection/range.mjs +9 -2
- package/selection/selection.js +13 -6
- package/selection/selection.mjs +21 -14
- package/selection/transformation.js +16 -2
- package/selection/transformation.mjs +24 -10
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +1 -1
- package/shortcuts/context.js +1 -1
- package/shortcuts/context.mjs +1 -1
- package/shortcuts/keyObserver.js +8 -4
- package/shortcuts/keyObserver.mjs +8 -4
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
- package/tableView.js +147 -68
- package/tableView.mjs +147 -68
- package/translations/changesObservable/observable.js +12 -2
- package/translations/changesObservable/observable.mjs +19 -9
- package/translations/changesObservable/observer.js +12 -2
- package/translations/changesObservable/observer.mjs +17 -7
- package/translations/indexMapper.js +12 -6
- package/translations/indexMapper.mjs +17 -11
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +11 -5
- package/translations/mapCollections/mapCollection.js +10 -1
- package/translations/mapCollections/mapCollection.mjs +10 -1
- package/translations/maps/hidingMap.js +8 -2
- package/translations/maps/hidingMap.mjs +13 -7
- package/translations/maps/indexMap.js +16 -2
- package/translations/maps/indexMap.mjs +20 -6
- package/translations/maps/indexesSequence.js +8 -2
- package/translations/maps/indexesSequence.mjs +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.js +12 -6
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +18 -12
- package/translations/maps/physicalIndexToValueMap.js +8 -2
- package/translations/maps/physicalIndexToValueMap.mjs +14 -8
- package/translations/maps/trimmingMap.js +8 -2
- package/translations/maps/trimmingMap.mjs +13 -7
- package/translations/maps/utils/actionsOnIndexes.mjs +9 -8
- package/translations/maps/utils/indexesSequence.mjs +10 -9
- package/translations/maps/utils/physicallyIndexed.mjs +11 -10
- package/utils/dataStructures/linkedList.js +21 -7
- package/utils/dataStructures/linkedList.mjs +21 -7
- package/utils/dataStructures/priorityMap.js +1 -1
- package/utils/dataStructures/priorityMap.mjs +1 -1
- package/utils/dataStructures/queue.js +16 -2
- package/utils/dataStructures/queue.mjs +16 -2
- package/utils/dataStructures/stack.js +16 -2
- package/utils/dataStructures/stack.mjs +16 -2
- package/utils/dataStructures/tree.js +8 -2
- package/utils/dataStructures/tree.mjs +8 -2
- package/utils/dataStructures/uniqueMap.js +1 -1
- package/utils/dataStructures/uniqueMap.mjs +1 -1
- package/utils/ghostTable.js +12 -5
- package/utils/ghostTable.mjs +12 -5
- package/utils/interval.js +23 -8
- package/utils/interval.mjs +18 -4
- package/utils/samplesGenerator.js +13 -3
- package/utils/samplesGenerator.mjs +15 -5
- package/validators/index.mjs +4 -3
package/mixins/localHooks.js
CHANGED
@@ -22,7 +22,8 @@ var localHooks = {
|
|
22
22
|
* @param {string} key The hook name.
|
23
23
|
* @param {Function} callback The hook callback.
|
24
24
|
* @returns {object}
|
25
|
-
*/
|
25
|
+
*/
|
26
|
+
addLocalHook: function addLocalHook(key, callback) {
|
26
27
|
if (!this._localHooks[key]) {
|
27
28
|
this._localHooks[key] = [];
|
28
29
|
}
|
@@ -39,7 +40,8 @@ var localHooks = {
|
|
39
40
|
* @param {*} [arg4] An additional parameter passed to the callback function.
|
40
41
|
* @param {*} [arg5] An additional parameter passed to the callback function.
|
41
42
|
* @param {*} [arg6] An additional parameter passed to the callback function.
|
42
|
-
*/
|
43
|
+
*/
|
44
|
+
runLocalHooks: function runLocalHooks(key, arg1, arg2, arg3, arg4, arg5, arg6) {
|
43
45
|
if (this._localHooks[key]) {
|
44
46
|
var length = this._localHooks[key].length;
|
45
47
|
|
@@ -55,7 +57,8 @@ var localHooks = {
|
|
55
57
|
* Clear all added hooks.
|
56
58
|
*
|
57
59
|
* @returns {object}
|
58
|
-
*/
|
60
|
+
*/
|
61
|
+
clearLocalHooks: function clearLocalHooks() {
|
59
62
|
this._localHooks = {};
|
60
63
|
return this;
|
61
64
|
}
|
package/mixins/localHooks.mjs
CHANGED
@@ -18,7 +18,8 @@ var localHooks = {
|
|
18
18
|
* @param {string} key The hook name.
|
19
19
|
* @param {Function} callback The hook callback.
|
20
20
|
* @returns {object}
|
21
|
-
*/
|
21
|
+
*/
|
22
|
+
addLocalHook: function addLocalHook(key, callback) {
|
22
23
|
if (!this._localHooks[key]) {
|
23
24
|
this._localHooks[key] = [];
|
24
25
|
}
|
@@ -35,7 +36,8 @@ var localHooks = {
|
|
35
36
|
* @param {*} [arg4] An additional parameter passed to the callback function.
|
36
37
|
* @param {*} [arg5] An additional parameter passed to the callback function.
|
37
38
|
* @param {*} [arg6] An additional parameter passed to the callback function.
|
38
|
-
*/
|
39
|
+
*/
|
40
|
+
runLocalHooks: function runLocalHooks(key, arg1, arg2, arg3, arg4, arg5, arg6) {
|
39
41
|
if (this._localHooks[key]) {
|
40
42
|
var length = this._localHooks[key].length;
|
41
43
|
|
@@ -51,7 +53,8 @@ var localHooks = {
|
|
51
53
|
* Clear all added hooks.
|
52
54
|
*
|
53
55
|
* @returns {object}
|
54
|
-
*/
|
56
|
+
*/
|
57
|
+
clearLocalHooks: function clearLocalHooks() {
|
55
58
|
this._localHooks = {};
|
56
59
|
return this;
|
57
60
|
}
|
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": "12.
|
13
|
+
"version": "12.3.0-next-9dc4f5d-20221209",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -93,7 +93,7 @@
|
|
93
93
|
"on-build-webpack": "^0.1.0",
|
94
94
|
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
95
95
|
"progress-bar-webpack-plugin": "^1.10.0",
|
96
|
-
"puppeteer": "^
|
96
|
+
"puppeteer": "^19.2.2",
|
97
97
|
"replace-in-file": "^6.1.0",
|
98
98
|
"rimraf": "^2.5.4",
|
99
99
|
"sass": "^1.3.0",
|
package/pluginHooks.d.ts
CHANGED
@@ -65,13 +65,15 @@ export interface Events {
|
|
65
65
|
afterChangesObserved?: () => void;
|
66
66
|
afterColumnCollapse?: (currentCollapsedColumns: number[], destinationCollapsedColumns: number[], collapsePossible: boolean, successfullyCollapsed: boolean) => void;
|
67
67
|
afterColumnExpand?: (currentCollapsedColumns: number[], destinationCollapsedColumns: number[], expandPossible: boolean, successfullyExpanded: boolean) => void;
|
68
|
+
afterColumnFreeze?: (columnIndex: number, isFreezingPerformed: boolean) => void;
|
68
69
|
afterColumnMove?: (movedColumns: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean, orderChanged: boolean) => void;
|
69
70
|
afterColumnResize?: (newSize: number, column: number, isDoubleClick: boolean) => void;
|
70
71
|
afterColumnSort?: (currentSortConfig: ColumnSortingConfig[], destinationSortConfigs: ColumnSortingConfig[]) => void;
|
72
|
+
afterColumnUnfreeze?: (columnIndex: number, isUnfreezingPerformed: boolean) => void;
|
71
73
|
afterContextMenuDefaultOptions?: (predefinedItems: Array<ContextMenuPredefinedMenuItemKey | ContextMenuMenuItemConfig>) => void;
|
72
74
|
afterContextMenuHide?: (context: ContextMenu) => void;
|
73
75
|
afterContextMenuShow?: (context: ContextMenu) => void;
|
74
|
-
afterCopy?: (data: CellValue[][], coords: RangeType[]) => void;
|
76
|
+
afterCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void;
|
75
77
|
afterCopyLimit?: (selectedRows: number, selectedColumns: number, copyRowsLimit: number, copyColumnsLimit: number) => void;
|
76
78
|
afterCreateCol?: (index: number, amount: number, source?: ChangeSource) => void;
|
77
79
|
afterCreateRow?: (index: number, amount: number, source?: ChangeSource) => void;
|
@@ -158,12 +160,14 @@ export interface Events {
|
|
158
160
|
beforeChangeRender?: (changes: CellChange[], source: ChangeSource) => void;
|
159
161
|
beforeColumnCollapse?: (currentCollapsedColumn: number[], destinationCollapsedColumns: number[], collapsePossible: boolean) => void | boolean;
|
160
162
|
beforeColumnExpand?: (currentCollapsedColumn: number[], destinationCollapsedColumns: number[], expandPossible: boolean) => void | boolean;
|
163
|
+
beforeColumnFreeze?: (columnIndex: number, isFreezingPerformed: boolean) => void | boolean;
|
161
164
|
beforeColumnMove?: (movedColumns: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean) => void | boolean;
|
162
165
|
beforeColumnResize?: (newSize: number, column: number, isDoubleClick: boolean) => void | number;
|
163
166
|
beforeColumnSort?: (currentSortConfig: ColumnSortingConfig[], destinationSortConfigs: ColumnSortingConfig[]) => void | boolean;
|
167
|
+
beforeColumnUnfreeze?: (columnIndex: number, isUnfreezingPerformed: boolean) => void | boolean;
|
164
168
|
beforeContextMenuSetItems?: (menuItems: ContextMenuMenuItemConfig[]) => void;
|
165
169
|
beforeContextMenuShow?: (context: ContextMenu) => void;
|
166
|
-
beforeCopy?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
|
170
|
+
beforeCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void | boolean;
|
167
171
|
beforeCreateCol?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
|
168
172
|
beforeCreateRow?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
|
169
173
|
beforeCut?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
|
@@ -223,6 +227,7 @@ export interface Events {
|
|
223
227
|
modifyAutofillRange?: (startArea: Array<[number, number, number, number]>, entireArea: Array<[number, number, number, number]>) => void;
|
224
228
|
modifyColHeader?: (column: number) => void;
|
225
229
|
modifyColumnHeaderHeight?: () => void;
|
230
|
+
modifyColumnHeaderValue?: (headerValue: string, visualColumnIndex: number, headerLevel: number) => void | string;
|
226
231
|
modifyColWidth?: (width: number, column: number) => void;
|
227
232
|
modifyCopyableRange?: (copyableRanges: RangeType[]) => void;
|
228
233
|
modifyData?: (row: number, column: number, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void;
|
package/pluginHooks.js
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
3
4
|
require("core-js/modules/es.array.slice.js");
|
4
5
|
require("core-js/modules/es.object.freeze.js");
|
6
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
7
|
+
require("core-js/modules/es.date.to-primitive.js");
|
8
|
+
require("core-js/modules/es.symbol.js");
|
9
|
+
require("core-js/modules/es.symbol.description.js");
|
10
|
+
require("core-js/modules/es.number.constructor.js");
|
11
|
+
require("core-js/modules/es.symbol.iterator.js");
|
5
12
|
exports.__esModule = true;
|
6
13
|
exports.default = void 0;
|
7
14
|
require("core-js/modules/es.array.iterator.js");
|
@@ -19,18 +26,30 @@ var _templateLiteralTag = require("./helpers/templateLiteralTag");
|
|
19
26
|
var _function = require("./helpers/function");
|
20
27
|
var _templateObject;
|
21
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
22
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
29
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
23
30
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
31
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
32
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
24
33
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
34
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
25
35
|
/**
|
26
36
|
* @description
|
37
|
+
*
|
38
|
+
* ::: only-for javascript
|
27
39
|
* Handsontable events are the common interface that function in 2 ways: as __callbacks__ and as __hooks__.
|
40
|
+
* :::
|
41
|
+
*
|
42
|
+
* ::: only-for react
|
43
|
+
* This page lists all the **Handsontable hooks** – callbacks that let you react before or after an action occurs.
|
44
|
+
*
|
45
|
+
* Read more on the [Events and hooks](@/guides/getting-started/events-and-hooks.md) page.
|
46
|
+
* :::
|
28
47
|
*
|
29
48
|
* @example
|
30
49
|
*
|
31
50
|
* ::: only-for javascript
|
32
51
|
* ```js
|
33
|
-
* //
|
52
|
+
* // using events as callbacks
|
34
53
|
* ...
|
35
54
|
* const hot1 = new Handsontable(document.getElementById('example1'), {
|
36
55
|
* afterChange: function(changes, source) {
|
@@ -62,7 +81,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
62
81
|
*
|
63
82
|
* ::: only-for javascript
|
64
83
|
* ```js
|
65
|
-
* //
|
84
|
+
* // using events as plugin hooks
|
66
85
|
* ...
|
67
86
|
* const hot1 = new Handsontable(document.getElementById('example1'), {
|
68
87
|
* myPlugin: true
|
@@ -352,13 +371,13 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
352
371
|
/**
|
353
372
|
* Fired after retrieving information about a column header and appending it to the table header.
|
354
373
|
*
|
355
|
-
* Since the 12.2 the hook is triggered with the 3rd `headerLevel` argument.
|
356
|
-
*
|
357
374
|
* @event Hooks#afterGetColHeader
|
358
375
|
* @param {number} column Visual column index.
|
359
376
|
* @param {HTMLTableCellElement} TH Header's TH element.
|
360
|
-
* @param {number} [headerLevel=0]
|
361
|
-
* values
|
377
|
+
* @param {number} [headerLevel=0] (Since 12.2.0) Header level index. Accepts positive (0 to n)
|
378
|
+
* and negative (-1 to -n) values. For positive values, 0 points to the
|
379
|
+
* topmost header. For negative values, -1 points to the bottom-most
|
380
|
+
* header (the header closest to the cells).
|
362
381
|
*/
|
363
382
|
'afterGetColHeader',
|
364
383
|
/**
|
@@ -1309,7 +1328,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1309
1328
|
*/
|
1310
1329
|
'modifyCopyableRange',
|
1311
1330
|
/**
|
1312
|
-
* Fired by {@link CopyPaste} plugin before copying the values
|
1331
|
+
* Fired by {@link CopyPaste} plugin before copying the values to the clipboard and before clearing values of
|
1313
1332
|
* the selected cells. This hook is fired when {@link Options#copyPaste} option is enabled.
|
1314
1333
|
*
|
1315
1334
|
* @event Hooks#beforeCut
|
@@ -1364,18 +1383,19 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1364
1383
|
* {@link Options#copyPaste} option is enabled.
|
1365
1384
|
*
|
1366
1385
|
* @event Hooks#afterCut
|
1367
|
-
* @param {Array[]} data An array of arrays
|
1386
|
+
* @param {Array[]} data An array of arrays with the cut data.
|
1368
1387
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1369
1388
|
* which was cut out.
|
1370
1389
|
*/
|
1371
1390
|
'afterCut',
|
1372
1391
|
/**
|
1373
|
-
* Fired before values are copied
|
1392
|
+
* Fired before values are copied to the clipboard.
|
1374
1393
|
*
|
1375
1394
|
* @event Hooks#beforeCopy
|
1376
1395
|
* @param {Array[]} data An array of arrays which contains data to copied.
|
1377
1396
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1378
1397
|
* which will copied.
|
1398
|
+
* @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.
|
1379
1399
|
* @returns {*} If returns `false` then copying is canceled.
|
1380
1400
|
*
|
1381
1401
|
* @example
|
@@ -1438,6 +1458,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1438
1458
|
* @param {Array[]} data An array of arrays which contains the copied data.
|
1439
1459
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1440
1460
|
* which was copied.
|
1461
|
+
* @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.
|
1441
1462
|
*/
|
1442
1463
|
'afterCopy',
|
1443
1464
|
/**
|
@@ -1496,7 +1517,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1496
1517
|
* {@link Options#copyPaste} option is enabled.
|
1497
1518
|
*
|
1498
1519
|
* @event Hooks#afterPaste
|
1499
|
-
* @param {Array[]} data An array of arrays
|
1520
|
+
* @param {Array[]} data An array of arrays with the pasted data.
|
1500
1521
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1501
1522
|
* that correspond to the previously selected area.
|
1502
1523
|
*/
|
@@ -1681,13 +1702,22 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1681
1702
|
*/
|
1682
1703
|
'beforeStretchingColumnWidth',
|
1683
1704
|
/**
|
1684
|
-
* Fired by
|
1685
|
-
*
|
1705
|
+
* Fired by the [`Filters`](@/api/filters.md) plugin,
|
1706
|
+
* before a [column filter](@/guides/columns/column-filter.md) gets applied.
|
1707
|
+
*
|
1708
|
+
* [`beforeFilter`](#beforefilter) takes one argument (`conditionsStack`), which is an array of objects.
|
1709
|
+
* Each object represents one of your [column filters](@/api/filters.md#addcondition),
|
1710
|
+
* and consists of the following properties:
|
1711
|
+
*
|
1712
|
+
* | Property | Possible values | Description |
|
1713
|
+
* | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
1714
|
+
* | `column` | Number | A visual index of the column to which the filter will be applied. |
|
1715
|
+
* | `conditions` | Array of objects | Each object represents one condition. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1716
|
+
* | `operation` | `'conjunction'` \| `'disjunction'` \| `'disjunctionWithExtraCondition'` | An operation to perform on your set of `conditions`. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1717
|
+
*
|
1718
|
+
* An example of the format of the `conditionsStack` argument:
|
1686
1719
|
*
|
1687
|
-
* @event Hooks#beforeFilter
|
1688
|
-
* @param {object[]} conditionsStack An array of objects with added formulas.
|
1689
1720
|
* ```js
|
1690
|
-
* // Example format of the conditionsStack argument:
|
1691
1721
|
* [
|
1692
1722
|
* {
|
1693
1723
|
* column: 2,
|
@@ -1705,17 +1735,47 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1705
1735
|
* },
|
1706
1736
|
* ]
|
1707
1737
|
* ```
|
1708
|
-
*
|
1738
|
+
*
|
1739
|
+
* To perform server-side filtering (i.e., to not apply filtering to Handsontable's UI),
|
1740
|
+
* set [`beforeFilter`](#beforefilter) to return `false`:
|
1741
|
+
*
|
1742
|
+
* ```js
|
1743
|
+
* new Handsontable(document.getElementById('example'), {
|
1744
|
+
* beforeFilter: (conditionsStack) => {
|
1745
|
+
* return false;
|
1746
|
+
* }
|
1747
|
+
* });
|
1748
|
+
*```
|
1749
|
+
*
|
1750
|
+
* Read more:
|
1751
|
+
* - [Guides: Column filter](@/guides/columns/column-filter.md)
|
1752
|
+
* - [Hooks: `afterFilter`](#afterfilter)
|
1753
|
+
* - [Options: `filters`](@/api/options.md#filters)
|
1754
|
+
* - [Plugins: `Filters`](@/api/filters.md)
|
1755
|
+
* – [Plugin methods: `addCondition()`](@/api/filters.md#addcondition)
|
1756
|
+
*
|
1757
|
+
* @event Hooks#beforeFilter
|
1758
|
+
* @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).
|
1759
|
+
* @returns {boolean} To perform server-side filtering (i.e., to not apply filtering to Handsontable's UI), return `false`.
|
1709
1760
|
*/
|
1710
1761
|
'beforeFilter',
|
1711
1762
|
/**
|
1712
|
-
* Fired by
|
1713
|
-
*
|
1763
|
+
* Fired by the [`Filters`](@/api/filters.md) plugin,
|
1764
|
+
* after a [column filter](@/guides/columns/column-filter.md) gets applied.
|
1765
|
+
*
|
1766
|
+
* [`afterFilter`](#afterfilter) takes one argument (`conditionsStack`), which is an array of objects.
|
1767
|
+
* Each object represents one of your [column filters](@/api/filters.md#addcondition),
|
1768
|
+
* and consists of the following properties:
|
1769
|
+
*
|
1770
|
+
* | Property | Possible values | Description |
|
1771
|
+
* | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
1772
|
+
* | `column` | Number | A visual index of the column to which the filter was applied. |
|
1773
|
+
* | `conditions` | Array of objects | Each object represents one condition. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1774
|
+
* | `operation` | `'conjunction'` \| `'disjunction'` \| `'disjunctionWithExtraCondition'` | An operation to perform on your set of `conditions`. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1775
|
+
*
|
1776
|
+
* An example of the format of the `conditionsStack` argument:
|
1714
1777
|
*
|
1715
|
-
* @event Hooks#afterFilter
|
1716
|
-
* @param {object[]} conditionsStack An array of objects with added conditions.
|
1717
1778
|
* ```js
|
1718
|
-
* // Example format of the conditionsStack argument:
|
1719
1779
|
* [
|
1720
1780
|
* {
|
1721
1781
|
* column: 2,
|
@@ -1733,6 +1793,16 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1733
1793
|
* },
|
1734
1794
|
* ]
|
1735
1795
|
* ```
|
1796
|
+
*
|
1797
|
+
* Read more:
|
1798
|
+
* - [Guides: Column filter](@/guides/columns/column-filter.md)
|
1799
|
+
* - [Hooks: `beforeFilter`](#beforefilter)
|
1800
|
+
* - [Options: `filters`](@/api/options.md#filters)
|
1801
|
+
* - [Plugins: `Filters`](@/api/filters.md)
|
1802
|
+
* – [Plugin methods: `addCondition()`](@/api/filters.md#addcondition)
|
1803
|
+
*
|
1804
|
+
* @event Hooks#afterFilter
|
1805
|
+
* @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).
|
1736
1806
|
*/
|
1737
1807
|
'afterFilter',
|
1738
1808
|
/**
|
@@ -1803,6 +1873,20 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1803
1873
|
* @event Hooks#modifyColumnHeaderHeight
|
1804
1874
|
*/
|
1805
1875
|
'modifyColumnHeaderHeight',
|
1876
|
+
/**
|
1877
|
+
* Fired while retrieving a column header's value.
|
1878
|
+
*
|
1879
|
+
* @since 12.3.0
|
1880
|
+
* @event Hooks#modifyColumnHeaderValue
|
1881
|
+
* @param {string} value A column header value.
|
1882
|
+
* @param {number} visualColumnIndex A visual column index.
|
1883
|
+
* @param {number} [headerLevel=0] Header level index. Accepts positive (0 to n)
|
1884
|
+
* and negative (-1 to -n) values. For positive values, 0 points to the
|
1885
|
+
* topmost header. For negative values, -1 points to the bottom-most
|
1886
|
+
* header (the header closest to the cells).
|
1887
|
+
* @returns {string} The column header value to be updated.
|
1888
|
+
*/
|
1889
|
+
'modifyColumnHeaderValue',
|
1806
1890
|
/**
|
1807
1891
|
* Fired by {@link UndoRedo} plugin before the undo action. Contains information about the action that is being undone.
|
1808
1892
|
* This hook is fired when {@link Options#undo} option is enabled.
|
@@ -2203,7 +2287,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
2203
2287
|
*/
|
2204
2288
|
'afterUnlisten',
|
2205
2289
|
/**
|
2206
|
-
* Fired after the window was resized.
|
2290
|
+
* Fired after the window was resized or the size of the Handsontable root element was changed.
|
2207
2291
|
*
|
2208
2292
|
* @event Hooks#afterRefreshDimensions
|
2209
2293
|
* @param {object} previousDimensions Previous dimensions of the container.
|
@@ -2212,7 +2296,8 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
2212
2296
|
*/
|
2213
2297
|
'afterRefreshDimensions',
|
2214
2298
|
/**
|
2215
|
-
* Cancellable hook, called after resizing a window
|
2299
|
+
* Cancellable hook, called after resizing a window or after detecting size change of the
|
2300
|
+
* Handsontable root element, but before redrawing a table.
|
2216
2301
|
*
|
2217
2302
|
* @event Hooks#beforeRefreshDimensions
|
2218
2303
|
* @param {object} previousDimensions Previous dimensions of the container.
|
package/pluginHooks.mjs
CHANGED
@@ -1,9 +1,18 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
1
2
|
import "core-js/modules/es.array.slice.js";
|
2
3
|
import "core-js/modules/es.object.freeze.js";
|
4
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
5
|
+
import "core-js/modules/es.date.to-primitive.js";
|
6
|
+
import "core-js/modules/es.symbol.js";
|
7
|
+
import "core-js/modules/es.symbol.description.js";
|
8
|
+
import "core-js/modules/es.number.constructor.js";
|
9
|
+
import "core-js/modules/es.symbol.iterator.js";
|
3
10
|
var _templateObject;
|
4
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
5
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
6
13
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
7
16
|
import "core-js/modules/es.array.iterator.js";
|
8
17
|
import "core-js/modules/es.map.js";
|
9
18
|
import "core-js/modules/es.object.to-string.js";
|
@@ -18,15 +27,25 @@ import { substitute } from "./helpers/string.mjs";
|
|
18
27
|
import { warn } from "./helpers/console.mjs";
|
19
28
|
import { toSingleLine } from "./helpers/templateLiteralTag.mjs";
|
20
29
|
import { fastCall } from "./helpers/function.mjs";
|
30
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
21
31
|
/**
|
22
32
|
* @description
|
33
|
+
*
|
34
|
+
* ::: only-for javascript
|
23
35
|
* Handsontable events are the common interface that function in 2 ways: as __callbacks__ and as __hooks__.
|
36
|
+
* :::
|
37
|
+
*
|
38
|
+
* ::: only-for react
|
39
|
+
* This page lists all the **Handsontable hooks** – callbacks that let you react before or after an action occurs.
|
40
|
+
*
|
41
|
+
* Read more on the [Events and hooks](@/guides/getting-started/events-and-hooks.md) page.
|
42
|
+
* :::
|
24
43
|
*
|
25
44
|
* @example
|
26
45
|
*
|
27
46
|
* ::: only-for javascript
|
28
47
|
* ```js
|
29
|
-
* //
|
48
|
+
* // using events as callbacks
|
30
49
|
* ...
|
31
50
|
* const hot1 = new Handsontable(document.getElementById('example1'), {
|
32
51
|
* afterChange: function(changes, source) {
|
@@ -58,7 +77,7 @@ import { fastCall } from "./helpers/function.mjs";
|
|
58
77
|
*
|
59
78
|
* ::: only-for javascript
|
60
79
|
* ```js
|
61
|
-
* //
|
80
|
+
* // using events as plugin hooks
|
62
81
|
* ...
|
63
82
|
* const hot1 = new Handsontable(document.getElementById('example1'), {
|
64
83
|
* myPlugin: true
|
@@ -347,13 +366,13 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
347
366
|
/**
|
348
367
|
* Fired after retrieving information about a column header and appending it to the table header.
|
349
368
|
*
|
350
|
-
* Since the 12.2 the hook is triggered with the 3rd `headerLevel` argument.
|
351
|
-
*
|
352
369
|
* @event Hooks#afterGetColHeader
|
353
370
|
* @param {number} column Visual column index.
|
354
371
|
* @param {HTMLTableCellElement} TH Header's TH element.
|
355
|
-
* @param {number} [headerLevel=0]
|
356
|
-
* values
|
372
|
+
* @param {number} [headerLevel=0] (Since 12.2.0) Header level index. Accepts positive (0 to n)
|
373
|
+
* and negative (-1 to -n) values. For positive values, 0 points to the
|
374
|
+
* topmost header. For negative values, -1 points to the bottom-most
|
375
|
+
* header (the header closest to the cells).
|
357
376
|
*/
|
358
377
|
'afterGetColHeader',
|
359
378
|
/**
|
@@ -1304,7 +1323,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1304
1323
|
*/
|
1305
1324
|
'modifyCopyableRange',
|
1306
1325
|
/**
|
1307
|
-
* Fired by {@link CopyPaste} plugin before copying the values
|
1326
|
+
* Fired by {@link CopyPaste} plugin before copying the values to the clipboard and before clearing values of
|
1308
1327
|
* the selected cells. This hook is fired when {@link Options#copyPaste} option is enabled.
|
1309
1328
|
*
|
1310
1329
|
* @event Hooks#beforeCut
|
@@ -1359,18 +1378,19 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1359
1378
|
* {@link Options#copyPaste} option is enabled.
|
1360
1379
|
*
|
1361
1380
|
* @event Hooks#afterCut
|
1362
|
-
* @param {Array[]} data An array of arrays
|
1381
|
+
* @param {Array[]} data An array of arrays with the cut data.
|
1363
1382
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1364
1383
|
* which was cut out.
|
1365
1384
|
*/
|
1366
1385
|
'afterCut',
|
1367
1386
|
/**
|
1368
|
-
* Fired before values are copied
|
1387
|
+
* Fired before values are copied to the clipboard.
|
1369
1388
|
*
|
1370
1389
|
* @event Hooks#beforeCopy
|
1371
1390
|
* @param {Array[]} data An array of arrays which contains data to copied.
|
1372
1391
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1373
1392
|
* which will copied.
|
1393
|
+
* @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.
|
1374
1394
|
* @returns {*} If returns `false` then copying is canceled.
|
1375
1395
|
*
|
1376
1396
|
* @example
|
@@ -1433,6 +1453,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1433
1453
|
* @param {Array[]} data An array of arrays which contains the copied data.
|
1434
1454
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1435
1455
|
* which was copied.
|
1456
|
+
* @param {{ columnHeadersCount: number }} copiedHeadersCount (Since 12.3.0) The number of copied column headers.
|
1436
1457
|
*/
|
1437
1458
|
'afterCopy',
|
1438
1459
|
/**
|
@@ -1491,7 +1512,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1491
1512
|
* {@link Options#copyPaste} option is enabled.
|
1492
1513
|
*
|
1493
1514
|
* @event Hooks#afterPaste
|
1494
|
-
* @param {Array[]} data An array of arrays
|
1515
|
+
* @param {Array[]} data An array of arrays with the pasted data.
|
1495
1516
|
* @param {object[]} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
1496
1517
|
* that correspond to the previously selected area.
|
1497
1518
|
*/
|
@@ -1676,13 +1697,22 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1676
1697
|
*/
|
1677
1698
|
'beforeStretchingColumnWidth',
|
1678
1699
|
/**
|
1679
|
-
* Fired by
|
1680
|
-
*
|
1700
|
+
* Fired by the [`Filters`](@/api/filters.md) plugin,
|
1701
|
+
* before a [column filter](@/guides/columns/column-filter.md) gets applied.
|
1702
|
+
*
|
1703
|
+
* [`beforeFilter`](#beforefilter) takes one argument (`conditionsStack`), which is an array of objects.
|
1704
|
+
* Each object represents one of your [column filters](@/api/filters.md#addcondition),
|
1705
|
+
* and consists of the following properties:
|
1706
|
+
*
|
1707
|
+
* | Property | Possible values | Description |
|
1708
|
+
* | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
1709
|
+
* | `column` | Number | A visual index of the column to which the filter will be applied. |
|
1710
|
+
* | `conditions` | Array of objects | Each object represents one condition. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1711
|
+
* | `operation` | `'conjunction'` \| `'disjunction'` \| `'disjunctionWithExtraCondition'` | An operation to perform on your set of `conditions`. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1712
|
+
*
|
1713
|
+
* An example of the format of the `conditionsStack` argument:
|
1681
1714
|
*
|
1682
|
-
* @event Hooks#beforeFilter
|
1683
|
-
* @param {object[]} conditionsStack An array of objects with added formulas.
|
1684
1715
|
* ```js
|
1685
|
-
* // Example format of the conditionsStack argument:
|
1686
1716
|
* [
|
1687
1717
|
* {
|
1688
1718
|
* column: 2,
|
@@ -1700,17 +1730,47 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1700
1730
|
* },
|
1701
1731
|
* ]
|
1702
1732
|
* ```
|
1703
|
-
*
|
1733
|
+
*
|
1734
|
+
* To perform server-side filtering (i.e., to not apply filtering to Handsontable's UI),
|
1735
|
+
* set [`beforeFilter`](#beforefilter) to return `false`:
|
1736
|
+
*
|
1737
|
+
* ```js
|
1738
|
+
* new Handsontable(document.getElementById('example'), {
|
1739
|
+
* beforeFilter: (conditionsStack) => {
|
1740
|
+
* return false;
|
1741
|
+
* }
|
1742
|
+
* });
|
1743
|
+
*```
|
1744
|
+
*
|
1745
|
+
* Read more:
|
1746
|
+
* - [Guides: Column filter](@/guides/columns/column-filter.md)
|
1747
|
+
* - [Hooks: `afterFilter`](#afterfilter)
|
1748
|
+
* - [Options: `filters`](@/api/options.md#filters)
|
1749
|
+
* - [Plugins: `Filters`](@/api/filters.md)
|
1750
|
+
* – [Plugin methods: `addCondition()`](@/api/filters.md#addcondition)
|
1751
|
+
*
|
1752
|
+
* @event Hooks#beforeFilter
|
1753
|
+
* @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).
|
1754
|
+
* @returns {boolean} To perform server-side filtering (i.e., to not apply filtering to Handsontable's UI), return `false`.
|
1704
1755
|
*/
|
1705
1756
|
'beforeFilter',
|
1706
1757
|
/**
|
1707
|
-
* Fired by
|
1708
|
-
*
|
1758
|
+
* Fired by the [`Filters`](@/api/filters.md) plugin,
|
1759
|
+
* after a [column filter](@/guides/columns/column-filter.md) gets applied.
|
1760
|
+
*
|
1761
|
+
* [`afterFilter`](#afterfilter) takes one argument (`conditionsStack`), which is an array of objects.
|
1762
|
+
* Each object represents one of your [column filters](@/api/filters.md#addcondition),
|
1763
|
+
* and consists of the following properties:
|
1764
|
+
*
|
1765
|
+
* | Property | Possible values | Description |
|
1766
|
+
* | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
1767
|
+
* | `column` | Number | A visual index of the column to which the filter was applied. |
|
1768
|
+
* | `conditions` | Array of objects | Each object represents one condition. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1769
|
+
* | `operation` | `'conjunction'` \| `'disjunction'` \| `'disjunctionWithExtraCondition'` | An operation to perform on your set of `conditions`. For details, see [`addCondition()`](@/api/filters.md#addcondition). |
|
1770
|
+
*
|
1771
|
+
* An example of the format of the `conditionsStack` argument:
|
1709
1772
|
*
|
1710
|
-
* @event Hooks#afterFilter
|
1711
|
-
* @param {object[]} conditionsStack An array of objects with added conditions.
|
1712
1773
|
* ```js
|
1713
|
-
* // Example format of the conditionsStack argument:
|
1714
1774
|
* [
|
1715
1775
|
* {
|
1716
1776
|
* column: 2,
|
@@ -1728,6 +1788,16 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1728
1788
|
* },
|
1729
1789
|
* ]
|
1730
1790
|
* ```
|
1791
|
+
*
|
1792
|
+
* Read more:
|
1793
|
+
* - [Guides: Column filter](@/guides/columns/column-filter.md)
|
1794
|
+
* - [Hooks: `beforeFilter`](#beforefilter)
|
1795
|
+
* - [Options: `filters`](@/api/options.md#filters)
|
1796
|
+
* - [Plugins: `Filters`](@/api/filters.md)
|
1797
|
+
* – [Plugin methods: `addCondition()`](@/api/filters.md#addcondition)
|
1798
|
+
*
|
1799
|
+
* @event Hooks#afterFilter
|
1800
|
+
* @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).
|
1731
1801
|
*/
|
1732
1802
|
'afterFilter',
|
1733
1803
|
/**
|
@@ -1798,6 +1868,20 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
1798
1868
|
* @event Hooks#modifyColumnHeaderHeight
|
1799
1869
|
*/
|
1800
1870
|
'modifyColumnHeaderHeight',
|
1871
|
+
/**
|
1872
|
+
* Fired while retrieving a column header's value.
|
1873
|
+
*
|
1874
|
+
* @since 12.3.0
|
1875
|
+
* @event Hooks#modifyColumnHeaderValue
|
1876
|
+
* @param {string} value A column header value.
|
1877
|
+
* @param {number} visualColumnIndex A visual column index.
|
1878
|
+
* @param {number} [headerLevel=0] Header level index. Accepts positive (0 to n)
|
1879
|
+
* and negative (-1 to -n) values. For positive values, 0 points to the
|
1880
|
+
* topmost header. For negative values, -1 points to the bottom-most
|
1881
|
+
* header (the header closest to the cells).
|
1882
|
+
* @returns {string} The column header value to be updated.
|
1883
|
+
*/
|
1884
|
+
'modifyColumnHeaderValue',
|
1801
1885
|
/**
|
1802
1886
|
* Fired by {@link UndoRedo} plugin before the undo action. Contains information about the action that is being undone.
|
1803
1887
|
* This hook is fired when {@link Options#undo} option is enabled.
|
@@ -2198,7 +2282,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
2198
2282
|
*/
|
2199
2283
|
'afterUnlisten',
|
2200
2284
|
/**
|
2201
|
-
* Fired after the window was resized.
|
2285
|
+
* Fired after the window was resized or the size of the Handsontable root element was changed.
|
2202
2286
|
*
|
2203
2287
|
* @event Hooks#afterRefreshDimensions
|
2204
2288
|
* @param {object} previousDimensions Previous dimensions of the container.
|
@@ -2207,7 +2291,8 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
|
|
2207
2291
|
*/
|
2208
2292
|
'afterRefreshDimensions',
|
2209
2293
|
/**
|
2210
|
-
* Cancellable hook, called after resizing a window
|
2294
|
+
* Cancellable hook, called after resizing a window or after detecting size change of the
|
2295
|
+
* Handsontable root element, but before redrawing a table.
|
2211
2296
|
*
|
2212
2297
|
* @event Hooks#beforeRefreshDimensions
|
2213
2298
|
* @param {object} previousDimensions Previous dimensions of the container.
|