handsontable 16.0.1 → 16.1.0-next-abd8f2e-20250904
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdparty/walkontable/src/overlays.js +12 -2
- package/3rdparty/walkontable/src/overlays.mjs +12 -2
- package/3rdparty/walkontable/src/viewport.js +2 -6
- package/3rdparty/walkontable/src/viewport.mjs +2 -6
- package/CHANGELOG.md +37 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/cellTypes/autocompleteType/accessors/index.js +7 -0
- package/cellTypes/autocompleteType/accessors/index.mjs +2 -0
- package/cellTypes/autocompleteType/accessors/valueGetter.js +14 -0
- package/cellTypes/autocompleteType/accessors/valueGetter.mjs +10 -0
- package/cellTypes/autocompleteType/accessors/valueSetter.js +25 -0
- package/cellTypes/autocompleteType/accessors/valueSetter.mjs +21 -0
- package/cellTypes/autocompleteType/autocompleteType.js +4 -1
- package/cellTypes/autocompleteType/autocompleteType.mjs +4 -1
- package/cellTypes/checkboxType/accessors/index.js +5 -0
- package/cellTypes/checkboxType/accessors/index.mjs +1 -0
- package/cellTypes/checkboxType/accessors/valueSetter.js +26 -0
- package/cellTypes/checkboxType/accessors/valueSetter.mjs +22 -0
- package/cellTypes/checkboxType/checkboxType.js +3 -1
- package/cellTypes/checkboxType/checkboxType.mjs +3 -1
- package/cellTypes/dropdownType/accessors/index.js +7 -0
- package/cellTypes/dropdownType/accessors/index.mjs +2 -0
- package/cellTypes/dropdownType/accessors/valueGetter.js +14 -0
- package/cellTypes/dropdownType/accessors/valueGetter.mjs +10 -0
- package/cellTypes/dropdownType/accessors/valueSetter.js +17 -0
- package/cellTypes/dropdownType/accessors/valueSetter.mjs +13 -0
- package/cellTypes/dropdownType/dropdownType.js +4 -1
- package/cellTypes/dropdownType/dropdownType.mjs +4 -1
- package/cellTypes/numericType/accessors/index.js +5 -0
- package/cellTypes/numericType/accessors/index.mjs +1 -0
- package/cellTypes/numericType/accessors/valueSetter.js +19 -0
- package/cellTypes/numericType/accessors/valueSetter.mjs +15 -0
- package/cellTypes/numericType/numericType.js +3 -1
- package/cellTypes/numericType/numericType.mjs +3 -1
- package/core/focusCatcher/index.js +37 -112
- package/core/focusCatcher/index.mjs +35 -110
- package/core/focusCatcher/utils.js +31 -0
- package/core/focusCatcher/utils.mjs +27 -0
- package/core/hooks/constants.js +242 -0
- package/core/hooks/constants.mjs +242 -0
- package/core/hooks/index.d.ts +22 -0
- package/core/viewportScroll/scrollStrategies/focusScroll.js +5 -1
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +5 -1
- package/core/viewportScroll/utils.js +1 -1
- package/core/viewportScroll/utils.mjs +1 -1
- package/core.d.ts +4 -0
- package/core.js +237 -139
- package/core.mjs +240 -142
- package/dataMap/dataMap.js +13 -3
- package/dataMap/dataMap.mjs +14 -4
- package/dataMap/dataSource.js +16 -0
- package/dataMap/dataSource.mjs +16 -0
- package/dataMap/metaManager/lazyFactoryMap.js +4 -3
- package/dataMap/metaManager/lazyFactoryMap.mjs +2 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +3 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +3 -2
- package/dataMap/metaManager/metaSchema.js +289 -4
- package/dataMap/metaManager/metaSchema.mjs +289 -4
- package/dataMap/metaManager/utils.js +0 -11
- package/dataMap/metaManager/utils.mjs +0 -10
- package/dataMap/replaceData.js +1 -0
- package/dataMap/replaceData.mjs +1 -0
- package/dist/handsontable.css +281 -4
- package/dist/handsontable.full.css +281 -4
- package/dist/handsontable.full.js +7844 -2990
- package/dist/handsontable.full.min.css +4 -5
- package/dist/handsontable.full.min.js +167 -165
- package/dist/handsontable.js +9639 -4806
- package/dist/handsontable.min.css +4 -4
- package/dist/handsontable.min.js +52 -50
- package/dist/languages/all.js +231 -21
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +11 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +11 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +11 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +11 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +11 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +11 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fa-IR.js +11 -1
- package/dist/languages/fa-IR.min.js +1 -1
- package/dist/languages/fr-FR.js +11 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.js +11 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.js +11 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +11 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +11 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +11 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +11 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +11 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +11 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +11 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +11 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +11 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +11 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +11 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +4 -4
- package/editorManager.mjs +4 -4
- package/editors/autocompleteEditor/autocompleteEditor.js +50 -112
- package/editors/autocompleteEditor/autocompleteEditor.mjs +51 -113
- package/editors/baseEditor/baseEditor.js +10 -6
- package/editors/baseEditor/baseEditor.mjs +10 -6
- package/editors/handsontableEditor/handsontableEditor.js +9 -9
- package/editors/handsontableEditor/handsontableEditor.mjs +9 -9
- package/editors/textEditor/textEditor.js +0 -7
- package/editors/textEditor/textEditor.mjs +0 -7
- package/focusManager.js +2 -2
- package/focusManager.mjs +2 -2
- package/helpers/a11y.js +15 -2
- package/helpers/a11y.mjs +10 -2
- package/helpers/console.js +12 -0
- package/helpers/console.mjs +11 -0
- package/helpers/dom/element.js +4 -4
- package/helpers/dom/element.mjs +4 -4
- package/helpers/mixed.js +65 -2
- package/helpers/mixed.mjs +63 -2
- package/helpers/number.js +28 -0
- package/helpers/number.mjs +26 -0
- package/helpers/object.js +35 -0
- package/helpers/object.mjs +34 -0
- package/helpers/string.js +19 -0
- package/helpers/string.mjs +18 -0
- package/helpers/templateLiteralTag.js +57 -1
- package/helpers/templateLiteralTag.mjs +56 -1
- package/i18n/constants.js +13 -1
- package/i18n/constants.mjs +13 -1
- package/i18n/languages/ar-AR.js +11 -1
- package/i18n/languages/ar-AR.mjs +11 -1
- package/i18n/languages/cs-CZ.js +11 -1
- package/i18n/languages/cs-CZ.mjs +11 -1
- package/i18n/languages/de-CH.js +11 -1
- package/i18n/languages/de-CH.mjs +11 -1
- package/i18n/languages/de-DE.js +11 -1
- package/i18n/languages/de-DE.mjs +11 -1
- package/i18n/languages/en-US.js +11 -1
- package/i18n/languages/en-US.mjs +11 -1
- package/i18n/languages/es-MX.js +11 -1
- package/i18n/languages/es-MX.mjs +11 -1
- package/i18n/languages/fa-IR.js +11 -1
- package/i18n/languages/fa-IR.mjs +11 -1
- package/i18n/languages/fr-FR.js +11 -1
- package/i18n/languages/fr-FR.mjs +11 -1
- package/i18n/languages/hr-HR.js +11 -1
- package/i18n/languages/hr-HR.mjs +11 -1
- package/i18n/languages/it-IT.js +11 -1
- package/i18n/languages/it-IT.mjs +11 -1
- package/i18n/languages/ja-JP.js +11 -1
- package/i18n/languages/ja-JP.mjs +11 -1
- package/i18n/languages/ko-KR.js +11 -1
- package/i18n/languages/ko-KR.mjs +11 -1
- package/i18n/languages/lv-LV.js +11 -1
- package/i18n/languages/lv-LV.mjs +11 -1
- package/i18n/languages/nb-NO.js +11 -1
- package/i18n/languages/nb-NO.mjs +11 -1
- package/i18n/languages/nl-NL.js +11 -1
- package/i18n/languages/nl-NL.mjs +11 -1
- package/i18n/languages/pl-PL.js +11 -1
- package/i18n/languages/pl-PL.mjs +11 -1
- package/i18n/languages/pt-BR.js +11 -1
- package/i18n/languages/pt-BR.mjs +11 -1
- package/i18n/languages/ru-RU.js +11 -1
- package/i18n/languages/ru-RU.mjs +11 -1
- package/i18n/languages/sr-SP.js +11 -1
- package/i18n/languages/sr-SP.mjs +11 -1
- package/i18n/languages/zh-CN.js +11 -1
- package/i18n/languages/zh-CN.mjs +11 -1
- package/i18n/languages/zh-TW.js +11 -1
- package/i18n/languages/zh-TW.mjs +11 -1
- package/i18n/phraseFormatters/index.js +3 -1
- package/i18n/phraseFormatters/index.mjs +3 -1
- package/i18n/registry.js +5 -6
- package/i18n/registry.mjs +5 -6
- package/index.d.ts +27 -0
- package/languages/all.js +231 -21
- package/languages/ar-AR.js +11 -1
- package/languages/ar-AR.mjs +11 -1
- package/languages/cs-CZ.js +11 -1
- package/languages/cs-CZ.mjs +11 -1
- package/languages/de-CH.js +11 -1
- package/languages/de-CH.mjs +11 -1
- package/languages/de-DE.js +11 -1
- package/languages/de-DE.mjs +11 -1
- package/languages/en-US.js +11 -1
- package/languages/en-US.mjs +11 -1
- package/languages/es-MX.js +11 -1
- package/languages/es-MX.mjs +11 -1
- package/languages/fa-IR.js +11 -1
- package/languages/fa-IR.mjs +11 -1
- package/languages/fr-FR.js +11 -1
- package/languages/fr-FR.mjs +11 -1
- package/languages/hr-HR.js +11 -1
- package/languages/hr-HR.mjs +11 -1
- package/languages/index.js +231 -21
- package/languages/it-IT.js +11 -1
- package/languages/it-IT.mjs +11 -1
- package/languages/ja-JP.js +11 -1
- package/languages/ja-JP.mjs +11 -1
- package/languages/ko-KR.js +11 -1
- package/languages/ko-KR.mjs +11 -1
- package/languages/lv-LV.js +11 -1
- package/languages/lv-LV.mjs +11 -1
- package/languages/nb-NO.js +11 -1
- package/languages/nb-NO.mjs +11 -1
- package/languages/nl-NL.js +11 -1
- package/languages/nl-NL.mjs +11 -1
- package/languages/pl-PL.js +11 -1
- package/languages/pl-PL.mjs +11 -1
- package/languages/pt-BR.js +11 -1
- package/languages/pt-BR.mjs +11 -1
- package/languages/ru-RU.js +11 -1
- package/languages/ru-RU.mjs +11 -1
- package/languages/sr-SP.js +11 -1
- package/languages/sr-SP.mjs +11 -1
- package/languages/zh-CN.js +11 -1
- package/languages/zh-CN.mjs +11 -1
- package/languages/zh-TW.js +11 -1
- package/languages/zh-TW.mjs +11 -1
- package/mixins/localHooks.js +16 -0
- package/mixins/localHooks.mjs +16 -0
- package/package.json +19 -1
- package/plugins/autoRowSize/autoRowSize.js +43 -6
- package/plugins/autoRowSize/autoRowSize.mjs +43 -6
- package/plugins/autofill/autofill.js +50 -3
- package/plugins/autofill/autofill.mjs +50 -3
- package/plugins/base/base.js +86 -15
- package/plugins/base/base.mjs +87 -16
- package/plugins/collapsibleColumns/collapsibleColumns.js +4 -4
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +4 -4
- package/plugins/columnSorting/columnSorting.js +3 -3
- package/plugins/columnSorting/columnSorting.mjs +3 -3
- package/plugins/comments/comments.js +52 -22
- package/plugins/comments/comments.mjs +52 -22
- package/plugins/comments/contextMenuItem/addEditComment.js +3 -3
- package/plugins/comments/contextMenuItem/addEditComment.mjs +3 -3
- package/plugins/comments/contextMenuItem/readOnlyComment.js +2 -2
- package/plugins/comments/contextMenuItem/readOnlyComment.mjs +2 -2
- package/plugins/comments/contextMenuItem/removeComment.js +2 -2
- package/plugins/comments/contextMenuItem/removeComment.mjs +2 -2
- package/plugins/contextMenu/contextMenu.js +4 -5
- package/plugins/contextMenu/contextMenu.mjs +4 -5
- package/plugins/contextMenu/menu/cursor.js +1 -1
- package/plugins/contextMenu/menu/cursor.mjs +1 -1
- package/plugins/contextMenu/menu/defaultShortcutsList.js +5 -5
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +5 -5
- package/plugins/contextMenu/menu/menu.js +3 -3
- package/plugins/contextMenu/menu/menu.mjs +3 -3
- package/plugins/contextMenu/menu/positioner.js +1 -1
- package/plugins/contextMenu/menu/positioner.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/alignment.js +1 -1
- package/plugins/contextMenu/predefinedItems/alignment.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/clearColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/columnLeft.js +3 -3
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/columnRight.js +3 -3
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/readOnly.js +1 -1
- package/plugins/contextMenu/predefinedItems/readOnly.mjs +1 -1
- 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/rowAbove.js +3 -3
- package/plugins/contextMenu/predefinedItems/rowAbove.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.js +3 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/copy.js +1 -1
- package/plugins/copyPaste/contextMenuItem/copy.mjs +1 -1
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +3 -3
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/cut.js +1 -1
- package/plugins/copyPaste/contextMenuItem/cut.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +75 -40
- package/plugins/copyPaste/copyPaste.mjs +76 -41
- package/plugins/customBorders/customBorders.js +1 -1
- package/plugins/customBorders/customBorders.mjs +1 -1
- package/plugins/dialog/dialog.d.ts +23 -0
- package/plugins/dialog/dialog.js +489 -0
- package/plugins/dialog/dialog.mjs +485 -0
- package/plugins/dialog/index.d.ts +1 -0
- package/plugins/dialog/index.js +7 -0
- package/plugins/dialog/index.mjs +1 -0
- package/plugins/dialog/ui.js +264 -0
- package/plugins/dialog/ui.mjs +259 -0
- package/plugins/dropdownMenu/dropdownMenu.js +5 -4
- package/plugins/dropdownMenu/dropdownMenu.mjs +5 -4
- package/plugins/filters/filters.js +2 -2
- package/plugins/filters/filters.mjs +2 -2
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +3 -3
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +3 -3
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +4 -4
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +4 -4
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +3 -3
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +3 -3
- package/plugins/hiddenRows/contextMenuItem/showRow.js +4 -4
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +4 -4
- package/plugins/index.d.ts +9 -0
- package/plugins/index.js +9 -0
- package/plugins/index.mjs +7 -1
- package/plugins/loading/content.js +36 -0
- package/plugins/loading/content.mjs +31 -0
- package/plugins/loading/index.d.ts +1 -0
- package/plugins/loading/index.js +7 -0
- package/plugins/loading/index.mjs +1 -0
- package/plugins/loading/loading.d.ts +19 -0
- package/plugins/loading/loading.js +292 -0
- package/plugins/loading/loading.mjs +287 -0
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnMove/manualColumnMove.js +3 -3
- package/plugins/manualColumnMove/manualColumnMove.mjs +3 -3
- package/plugins/manualColumnResize/manualColumnResize.js +3 -3
- package/plugins/manualColumnResize/manualColumnResize.mjs +3 -3
- package/plugins/manualRowMove/manualRowMove.js +4 -4
- package/plugins/manualRowMove/manualRowMove.mjs +4 -4
- package/plugins/manualRowResize/manualRowResize.js +5 -2
- package/plugins/manualRowResize/manualRowResize.mjs +5 -2
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +15 -15
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +15 -15
- package/plugins/mergeCells/focusOrder.js +75 -39
- package/plugins/mergeCells/focusOrder.mjs +75 -39
- package/plugins/mergeCells/mergeCells.js +26 -19
- package/plugins/mergeCells/mergeCells.mjs +26 -19
- package/plugins/mergeCells/renderer.js +14 -8
- package/plugins/mergeCells/renderer.mjs +14 -8
- package/plugins/multiColumnSorting/multiColumnSorting.js +3 -3
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +3 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +3 -3
- package/plugins/nestedHeaders/nestedHeaders.js +47 -41
- package/plugins/nestedHeaders/nestedHeaders.mjs +47 -41
- package/plugins/nestedRows/nestedRows.js +3 -3
- package/plugins/nestedRows/nestedRows.mjs +3 -3
- package/plugins/nestedRows/ui/collapsing.js +1 -2
- package/plugins/nestedRows/ui/collapsing.mjs +1 -2
- package/plugins/nestedRows/ui/contextMenu.js +4 -4
- package/plugins/nestedRows/ui/contextMenu.mjs +4 -4
- package/plugins/nestedRows/ui/headers.js +4 -1
- package/plugins/nestedRows/ui/headers.mjs +4 -1
- package/plugins/pagination/focusController.js +27 -0
- package/plugins/pagination/focusController.mjs +23 -0
- package/plugins/pagination/index.d.ts +1 -0
- package/plugins/pagination/index.js +7 -0
- package/plugins/pagination/index.mjs +1 -0
- package/plugins/pagination/pagination.d.ts +52 -0
- package/plugins/pagination/pagination.js +1034 -0
- package/plugins/pagination/pagination.mjs +1030 -0
- package/plugins/pagination/strategies/autoPageSize.js +96 -0
- package/plugins/pagination/strategies/autoPageSize.mjs +92 -0
- package/plugins/pagination/strategies/fixedPageSize.js +88 -0
- package/plugins/pagination/strategies/fixedPageSize.mjs +84 -0
- package/plugins/pagination/strategies/index.js +22 -0
- package/plugins/pagination/strategies/index.mjs +18 -0
- package/plugins/pagination/ui.js +449 -0
- package/plugins/pagination/ui.mjs +443 -0
- package/plugins/pagination/utils.js +28 -0
- package/plugins/pagination/utils.mjs +24 -0
- package/plugins/stretchColumns/calculator.js +4 -0
- package/plugins/stretchColumns/calculator.mjs +4 -0
- package/plugins/stretchColumns/stretchColumns.js +1 -1
- package/plugins/stretchColumns/stretchColumns.mjs +1 -1
- package/plugins/undoRedo/actions/dataChange.js +17 -15
- package/plugins/undoRedo/actions/dataChange.mjs +17 -15
- package/renderers/checkboxRenderer/checkboxRenderer.js +3 -3
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +3 -3
- package/selection/range.js +11 -0
- package/selection/range.mjs +11 -0
- package/selection/selection.js +163 -124
- package/selection/selection.mjs +163 -124
- package/selection/transformation/_base.js +448 -0
- package/selection/transformation/_base.mjs +443 -0
- package/selection/transformation/extender.js +55 -0
- package/selection/transformation/extender.mjs +51 -0
- package/selection/transformation/focus.js +77 -0
- package/selection/transformation/focus.mjs +73 -0
- package/selection/transformation/index.js +7 -0
- package/selection/transformation/index.mjs +2 -0
- package/selection/utils.js +2 -1
- package/selection/utils.mjs +2 -1
- package/settings.d.ts +10 -1
- package/shortcutContexts/commands/editor/fastOpen.js +1 -1
- package/shortcutContexts/commands/editor/fastOpen.mjs +1 -1
- package/shortcutContexts/commands/editor/open.js +10 -4
- package/shortcutContexts/commands/editor/open.mjs +10 -4
- package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +2 -2
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +2 -2
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +2 -2
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +5 -2
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +5 -2
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +5 -2
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +5 -2
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +2 -2
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/scrollToFocusedCell.js +1 -1
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +1 -1
- package/shortcutContexts/grid.js +3 -3
- package/shortcutContexts/grid.mjs +3 -3
- package/shortcuts/context.js +4 -1
- package/shortcuts/context.mjs +4 -1
- package/shortcuts/manager.js +17 -3
- package/shortcuts/manager.mjs +17 -3
- package/styles/handsontable.css +288 -22
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-classic.css +828 -0
- package/styles/ht-theme-classic.min.css +30 -0
- package/styles/ht-theme-horizon.css +122 -26
- package/styles/ht-theme-horizon.min.css +3 -3
- package/styles/ht-theme-main.css +124 -28
- package/styles/ht-theme-main.min.css +3 -3
- package/tableView.js +61 -25
- package/tableView.mjs +61 -25
- package/utils/a11yAnnouncer.js +70 -0
- package/utils/a11yAnnouncer.mjs +64 -0
- package/{core/focusCatcher → utils}/focusDetector.js +30 -12
- package/{core/focusCatcher → utils}/focusDetector.mjs +30 -12
- package/utils/samplesGenerator.js +17 -1
- package/utils/samplesGenerator.mjs +17 -1
- package/utils/stylesHandler.js +23 -8
- package/utils/stylesHandler.mjs +23 -8
- package/utils/valueAccessors.js +45 -0
- package/utils/valueAccessors.mjs +40 -0
- package/validators/autocompleteValidator/autocompleteValidator.js +2 -1
- package/validators/autocompleteValidator/autocompleteValidator.mjs +2 -1
- package/selection/transformation.js +0 -335
- package/selection/transformation.mjs +0 -331
package/core/hooks/constants.js
CHANGED
@@ -976,6 +976,68 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
976
976
|
* @param {CellCoords} highlight Selection cell focus coords object.
|
977
977
|
*/
|
978
978
|
'afterSelectRows',
|
979
|
+
/**
|
980
|
+
* Fired before all cells are selected (e.g. during mouse corner click or {@link Core#selectAll} API call).
|
981
|
+
*
|
982
|
+
* @since 16.1.0
|
983
|
+
* @event Hooks#beforeSelectAll
|
984
|
+
* @param {CellCoords} from Selection start coords object.
|
985
|
+
* @param {CellCoords} to Selection end coords object.
|
986
|
+
* @param {CellCoords} [highlight] Selection cell focus coords object.
|
987
|
+
* @example
|
988
|
+
* ::: only-for javascript
|
989
|
+
* ```js
|
990
|
+
* new Handsontable(element, {
|
991
|
+
* beforeSelectAll: (from, to, highlight) => {
|
992
|
+
* // moves the focus to a new position
|
993
|
+
* if (highlight) {
|
994
|
+
* highlight.row = 3;
|
995
|
+
* highlight.col = 3;
|
996
|
+
* }
|
997
|
+
* }
|
998
|
+
* })
|
999
|
+
* ```
|
1000
|
+
* :::
|
1001
|
+
*
|
1002
|
+
* ::: only-for react
|
1003
|
+
* ```jsx
|
1004
|
+
* <HotTable
|
1005
|
+
* beforeSelectAll={(from, to, highlight) => {
|
1006
|
+
* // moves the focus to a new position
|
1007
|
+
* if (highlight) {
|
1008
|
+
* highlight.row = 3;
|
1009
|
+
* highlight.col = 3;
|
1010
|
+
* }
|
1011
|
+
* }}
|
1012
|
+
* />
|
1013
|
+
* ```
|
1014
|
+
* :::
|
1015
|
+
*
|
1016
|
+
* ::: only-for angular
|
1017
|
+
*```ts
|
1018
|
+
* settings = {
|
1019
|
+
* beforeSelectAll: (from, to, highlight) => {
|
1020
|
+
* // moves the focus to a new position
|
1021
|
+
* if (highlight) {
|
1022
|
+
* highlight.row = 3;
|
1023
|
+
* highlight.col = 3;
|
1024
|
+
* }
|
1025
|
+
* },
|
1026
|
+
* };
|
1027
|
+
* ```
|
1028
|
+
* :::
|
1029
|
+
*/
|
1030
|
+
'beforeSelectAll',
|
1031
|
+
/**
|
1032
|
+
* Fired after all cells are selected (e.g. during mouse corner click or {@link Core#selectAll} API call).
|
1033
|
+
*
|
1034
|
+
* @since 16.1.0
|
1035
|
+
* @event Hooks#afterSelectAll
|
1036
|
+
* @param {CellCoords} from Selection start coords object.
|
1037
|
+
* @param {CellCoords} to Selection end coords object.
|
1038
|
+
* @param {CellCoords} [highlight] Selection cell focus coords object.
|
1039
|
+
*/
|
1040
|
+
'afterSelectAll',
|
979
1041
|
/**
|
980
1042
|
* Fired after cell meta is changed.
|
981
1043
|
*
|
@@ -1184,6 +1246,7 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
1184
1246
|
* />
|
1185
1247
|
* ```
|
1186
1248
|
* :::
|
1249
|
+
*
|
1187
1250
|
* ::: only-for angular
|
1188
1251
|
*```ts
|
1189
1252
|
* // To alter a single change, overwrite the desired value with `changes[i][3]`
|
@@ -1231,6 +1294,24 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
1231
1294
|
* ([list of all available sources](@/guides/getting-started/events-and-hooks/events-and-hooks.md#definition-for-source-argument)).
|
1232
1295
|
*/
|
1233
1296
|
'beforeChangeRender',
|
1297
|
+
/**
|
1298
|
+
* Fired before the height of the table is changed.
|
1299
|
+
*
|
1300
|
+
* @since 16.1.0
|
1301
|
+
* @event Hooks#beforeHeightChange
|
1302
|
+
* @param {number | string} height Table height.
|
1303
|
+
* @returns {number | string} Modified table height.
|
1304
|
+
*/
|
1305
|
+
'beforeHeightChange',
|
1306
|
+
/**
|
1307
|
+
* Fired before the width of the table is changed.
|
1308
|
+
*
|
1309
|
+
* @since 16.1.0
|
1310
|
+
* @event Hooks#beforeWidthChange
|
1311
|
+
* @param {number | string} width Table width.
|
1312
|
+
* @returns {number | string} Modified table width.
|
1313
|
+
*/
|
1314
|
+
'beforeWidthChange',
|
1234
1315
|
/**
|
1235
1316
|
* Fired before drawing the borders.
|
1236
1317
|
*
|
@@ -1686,6 +1767,7 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
1686
1767
|
* @param {'from_above' | 'from_below'} tabActivationDir The browsers Tab navigation direction. Depending on
|
1687
1768
|
* whether the user activated the table from the element above or below, another cell can be selected.
|
1688
1769
|
* @param {CellCoords} visualCoords The coords that will be used to select a cell.
|
1770
|
+
* @returns {undefined|boolean} If `false` is returned, the table will not be focused.
|
1689
1771
|
*/
|
1690
1772
|
'modifyFocusOnTabNavigation',
|
1691
1773
|
/**
|
@@ -2340,6 +2422,75 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
2340
2422
|
* @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).
|
2341
2423
|
*/
|
2342
2424
|
'afterFilter',
|
2425
|
+
/**
|
2426
|
+
* Fired by {@link Pagination} plugin before changing the page. This hook is fired when
|
2427
|
+
* {@link Options#pagination} option is enabled.
|
2428
|
+
*
|
2429
|
+
* @since 16.1.0
|
2430
|
+
* @event Hooks#beforePageChange
|
2431
|
+
* @param {number} oldPage The old page number.
|
2432
|
+
* @param {number} newPage The new page number.
|
2433
|
+
* @returns {*|boolean} If `false` is returned the action is canceled.
|
2434
|
+
*/
|
2435
|
+
'beforePageChange',
|
2436
|
+
/**
|
2437
|
+
* Fired by {@link Pagination} plugin after changing the page. This hook is fired when
|
2438
|
+
* {@link Options#pagination} option is enabled.
|
2439
|
+
*
|
2440
|
+
* @since 16.1.0
|
2441
|
+
* @event Hooks#afterPageChange
|
2442
|
+
* @param {number} oldPage The old page number.
|
2443
|
+
* @param {number} newPage The new page number.
|
2444
|
+
*/
|
2445
|
+
'afterPageChange',
|
2446
|
+
/**
|
2447
|
+
* Fired by {@link Pagination} plugin before changing the page size. This hook is fired when
|
2448
|
+
* {@link Options#pagination} option is enabled.
|
2449
|
+
*
|
2450
|
+
* @since 16.1.0
|
2451
|
+
* @event Hooks#beforePageSizeChange
|
2452
|
+
* @param {number | 'auto'} oldPageSize The old page size.
|
2453
|
+
* @param {number | 'auto'} newPageSize The new page size.
|
2454
|
+
* @returns {*|boolean} If `false` is returned the action is canceled.
|
2455
|
+
*/
|
2456
|
+
'beforePageSizeChange',
|
2457
|
+
/**
|
2458
|
+
* Fired by {@link Pagination} plugin after changing the page size. This hook is fired when
|
2459
|
+
* {@link Options#pagination} option is enabled.
|
2460
|
+
*
|
2461
|
+
* @since 16.1.0
|
2462
|
+
* @event Hooks#afterPageSizeChange
|
2463
|
+
* @param {number | 'auto'} oldPageSize The old page size.
|
2464
|
+
* @param {number | 'auto'} newPageSize The new page size.
|
2465
|
+
*/
|
2466
|
+
'afterPageSizeChange',
|
2467
|
+
/**
|
2468
|
+
* Fired by {@link Pagination} plugin after changing the visibility state of the page size section.
|
2469
|
+
* This hook is fired when {@link Options#pagination} option is enabled.
|
2470
|
+
*
|
2471
|
+
* @since 16.1.0
|
2472
|
+
* @event Hooks#afterPageSizeVisibilityChange
|
2473
|
+
* @param {boolean} isVisible The visibility state of the page size section.
|
2474
|
+
*/
|
2475
|
+
'afterPageSizeVisibilityChange',
|
2476
|
+
/**
|
2477
|
+
* Fired by {@link Pagination} plugin after changing the visibility state of the page counter section.
|
2478
|
+
* This hook is fired when {@link Options#pagination} option is enabled.
|
2479
|
+
*
|
2480
|
+
* @since 16.1.0
|
2481
|
+
* @event Hooks#afterPageCounterVisibilityChange
|
2482
|
+
* @param {boolean} isVisible The visibility state of the page size section.
|
2483
|
+
*/
|
2484
|
+
'afterPageCounterVisibilityChange',
|
2485
|
+
/**
|
2486
|
+
* Fired by {@link Pagination} plugin after changing the visibility state of the page navigation section.
|
2487
|
+
* This hook is fired when {@link Options#pagination} option is enabled.
|
2488
|
+
*
|
2489
|
+
* @since 16.1.0
|
2490
|
+
* @event Hooks#afterPageNavigationVisibilityChange
|
2491
|
+
* @param {boolean} isVisible The visibility state of the page size section.
|
2492
|
+
*/
|
2493
|
+
'afterPageNavigationVisibilityChange',
|
2343
2494
|
/**
|
2344
2495
|
* Fired by the {@link Formulas} plugin, when any cell value changes.
|
2345
2496
|
*
|
@@ -2787,6 +2938,97 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
2787
2938
|
* Returning `true` removes those restrictions.
|
2788
2939
|
*/
|
2789
2940
|
'beforeBeginEditing',
|
2941
|
+
/**
|
2942
|
+
* Fired by {@link Dialog} plugin after hiding the dialog. This hook is fired when {@link Options#dialog}
|
2943
|
+
* option is enabled.
|
2944
|
+
*
|
2945
|
+
* @since 16.1.0
|
2946
|
+
* @event Hooks#afterDialogHide
|
2947
|
+
*/
|
2948
|
+
'afterDialogHide',
|
2949
|
+
/**
|
2950
|
+
* Fired by {@link Dialog} plugin after showing the dialog. This hook is fired when {@link Options#dialog}
|
2951
|
+
* option is enabled.
|
2952
|
+
*
|
2953
|
+
* @since 16.1.0
|
2954
|
+
* @event Hooks#afterDialogShow
|
2955
|
+
*/
|
2956
|
+
'afterDialogShow',
|
2957
|
+
/**
|
2958
|
+
* Fired by {@link Dialog} plugin before hiding the dialog. This hook is fired when {@link Options#dialog}
|
2959
|
+
* option is enabled.
|
2960
|
+
*
|
2961
|
+
* @since 16.1.0
|
2962
|
+
* @event Hooks#beforeDialogHide
|
2963
|
+
*/
|
2964
|
+
'beforeDialogHide',
|
2965
|
+
/**
|
2966
|
+
* Fired by {@link Dialog} plugin before showing the dialog. This hook is fired when {@link Options#dialog}
|
2967
|
+
* option is enabled.
|
2968
|
+
*
|
2969
|
+
* @since 16.1.0
|
2970
|
+
* @event Hooks#beforeDialogShow
|
2971
|
+
*/
|
2972
|
+
'beforeDialogShow',
|
2973
|
+
/**
|
2974
|
+
* Fired by {@link Dialog} plugin before focusing the previous element. This hook is fired when {@link Options#dialog}
|
2975
|
+
* option is enabled.
|
2976
|
+
*
|
2977
|
+
* @since 16.1.0
|
2978
|
+
* @event Hooks#dialogFocusPreviousElement
|
2979
|
+
*/
|
2980
|
+
'dialogFocusPreviousElement',
|
2981
|
+
/**
|
2982
|
+
* Fired by {@link Dialog} plugin before focusing the next element. This hook is fired when {@link Options#dialog}
|
2983
|
+
* option is enabled.
|
2984
|
+
*
|
2985
|
+
* @since 16.1.0
|
2986
|
+
* @event Hooks#dialogFocusNextElement
|
2987
|
+
*/
|
2988
|
+
'dialogFocusNextElement',
|
2989
|
+
/**
|
2990
|
+
* Fired by {@link Dialog} plugin when the focus is set. This hook is fired when {@link Options#dialog}
|
2991
|
+
* option is enabled.
|
2992
|
+
*
|
2993
|
+
* @since 16.1.0
|
2994
|
+
* @event Hooks#afterDialogFocus
|
2995
|
+
* @param {'tab_from_above' | 'tab_from_below' | 'click' | 'show'} focusSource The source of the focus.
|
2996
|
+
*/
|
2997
|
+
'afterDialogFocus',
|
2998
|
+
/**
|
2999
|
+
* Fired by {@link Loading} plugin before showing the loading indicator. This hook is fired when {@link Options#loading}
|
3000
|
+
* option is enabled. The callback can return `false` to prevent the loading indicator from being shown.
|
3001
|
+
*
|
3002
|
+
* @since 16.1.0
|
3003
|
+
* @event Hooks#beforeLoadingShow
|
3004
|
+
* @returns {boolean | undefined} If returns `false`, the action will be skipped.
|
3005
|
+
*/
|
3006
|
+
'beforeLoadingShow',
|
3007
|
+
/**
|
3008
|
+
* Fired by {@link Loading} plugin after showing the loading indicator. This hook is fired when {@link Options#loading}
|
3009
|
+
* option is enabled.
|
3010
|
+
*
|
3011
|
+
* @since 16.1.0
|
3012
|
+
* @event Hooks#afterLoadingShow
|
3013
|
+
*/
|
3014
|
+
'afterLoadingShow',
|
3015
|
+
/**
|
3016
|
+
* Fired by {@link Loading} plugin before hiding the loading indicator. This hook is fired when {@link Options#loading}
|
3017
|
+
* option is enabled.
|
3018
|
+
*
|
3019
|
+
* @since 16.1.0
|
3020
|
+
* @event Hooks#beforeLoadingHide
|
3021
|
+
* @returns {boolean | undefined} If returns `false`, the action will be skipped.
|
3022
|
+
*/
|
3023
|
+
'beforeLoadingHide',
|
3024
|
+
/**
|
3025
|
+
* Fired by {@link Loading} plugin after hiding the loading indicator. This hook is fired when {@link Options#loading}
|
3026
|
+
* option is enabled.
|
3027
|
+
*
|
3028
|
+
* @since 16.1.0
|
3029
|
+
* @event Hooks#afterLoadingHide
|
3030
|
+
*/
|
3031
|
+
'afterLoadingHide',
|
2790
3032
|
/**
|
2791
3033
|
* Fired after the editor is opened and rendered.
|
2792
3034
|
*
|
package/core/hooks/constants.mjs
CHANGED
@@ -973,6 +973,68 @@ export const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-com
|
|
973
973
|
* @param {CellCoords} highlight Selection cell focus coords object.
|
974
974
|
*/
|
975
975
|
'afterSelectRows',
|
976
|
+
/**
|
977
|
+
* Fired before all cells are selected (e.g. during mouse corner click or {@link Core#selectAll} API call).
|
978
|
+
*
|
979
|
+
* @since 16.1.0
|
980
|
+
* @event Hooks#beforeSelectAll
|
981
|
+
* @param {CellCoords} from Selection start coords object.
|
982
|
+
* @param {CellCoords} to Selection end coords object.
|
983
|
+
* @param {CellCoords} [highlight] Selection cell focus coords object.
|
984
|
+
* @example
|
985
|
+
* ::: only-for javascript
|
986
|
+
* ```js
|
987
|
+
* new Handsontable(element, {
|
988
|
+
* beforeSelectAll: (from, to, highlight) => {
|
989
|
+
* // moves the focus to a new position
|
990
|
+
* if (highlight) {
|
991
|
+
* highlight.row = 3;
|
992
|
+
* highlight.col = 3;
|
993
|
+
* }
|
994
|
+
* }
|
995
|
+
* })
|
996
|
+
* ```
|
997
|
+
* :::
|
998
|
+
*
|
999
|
+
* ::: only-for react
|
1000
|
+
* ```jsx
|
1001
|
+
* <HotTable
|
1002
|
+
* beforeSelectAll={(from, to, highlight) => {
|
1003
|
+
* // moves the focus to a new position
|
1004
|
+
* if (highlight) {
|
1005
|
+
* highlight.row = 3;
|
1006
|
+
* highlight.col = 3;
|
1007
|
+
* }
|
1008
|
+
* }}
|
1009
|
+
* />
|
1010
|
+
* ```
|
1011
|
+
* :::
|
1012
|
+
*
|
1013
|
+
* ::: only-for angular
|
1014
|
+
*```ts
|
1015
|
+
* settings = {
|
1016
|
+
* beforeSelectAll: (from, to, highlight) => {
|
1017
|
+
* // moves the focus to a new position
|
1018
|
+
* if (highlight) {
|
1019
|
+
* highlight.row = 3;
|
1020
|
+
* highlight.col = 3;
|
1021
|
+
* }
|
1022
|
+
* },
|
1023
|
+
* };
|
1024
|
+
* ```
|
1025
|
+
* :::
|
1026
|
+
*/
|
1027
|
+
'beforeSelectAll',
|
1028
|
+
/**
|
1029
|
+
* Fired after all cells are selected (e.g. during mouse corner click or {@link Core#selectAll} API call).
|
1030
|
+
*
|
1031
|
+
* @since 16.1.0
|
1032
|
+
* @event Hooks#afterSelectAll
|
1033
|
+
* @param {CellCoords} from Selection start coords object.
|
1034
|
+
* @param {CellCoords} to Selection end coords object.
|
1035
|
+
* @param {CellCoords} [highlight] Selection cell focus coords object.
|
1036
|
+
*/
|
1037
|
+
'afterSelectAll',
|
976
1038
|
/**
|
977
1039
|
* Fired after cell meta is changed.
|
978
1040
|
*
|
@@ -1181,6 +1243,7 @@ export const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-com
|
|
1181
1243
|
* />
|
1182
1244
|
* ```
|
1183
1245
|
* :::
|
1246
|
+
*
|
1184
1247
|
* ::: only-for angular
|
1185
1248
|
*```ts
|
1186
1249
|
* // To alter a single change, overwrite the desired value with `changes[i][3]`
|
@@ -1228,6 +1291,24 @@ export const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-com
|
|
1228
1291
|
* ([list of all available sources](@/guides/getting-started/events-and-hooks/events-and-hooks.md#definition-for-source-argument)).
|
1229
1292
|
*/
|
1230
1293
|
'beforeChangeRender',
|
1294
|
+
/**
|
1295
|
+
* Fired before the height of the table is changed.
|
1296
|
+
*
|
1297
|
+
* @since 16.1.0
|
1298
|
+
* @event Hooks#beforeHeightChange
|
1299
|
+
* @param {number | string} height Table height.
|
1300
|
+
* @returns {number | string} Modified table height.
|
1301
|
+
*/
|
1302
|
+
'beforeHeightChange',
|
1303
|
+
/**
|
1304
|
+
* Fired before the width of the table is changed.
|
1305
|
+
*
|
1306
|
+
* @since 16.1.0
|
1307
|
+
* @event Hooks#beforeWidthChange
|
1308
|
+
* @param {number | string} width Table width.
|
1309
|
+
* @returns {number | string} Modified table width.
|
1310
|
+
*/
|
1311
|
+
'beforeWidthChange',
|
1231
1312
|
/**
|
1232
1313
|
* Fired before drawing the borders.
|
1233
1314
|
*
|
@@ -1683,6 +1764,7 @@ export const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-com
|
|
1683
1764
|
* @param {'from_above' | 'from_below'} tabActivationDir The browsers Tab navigation direction. Depending on
|
1684
1765
|
* whether the user activated the table from the element above or below, another cell can be selected.
|
1685
1766
|
* @param {CellCoords} visualCoords The coords that will be used to select a cell.
|
1767
|
+
* @returns {undefined|boolean} If `false` is returned, the table will not be focused.
|
1686
1768
|
*/
|
1687
1769
|
'modifyFocusOnTabNavigation',
|
1688
1770
|
/**
|
@@ -2337,6 +2419,75 @@ export const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-com
|
|
2337
2419
|
* @param {object[]} conditionsStack An array of objects with your [column filters](@/api/filters.md#addcondition).
|
2338
2420
|
*/
|
2339
2421
|
'afterFilter',
|
2422
|
+
/**
|
2423
|
+
* Fired by {@link Pagination} plugin before changing the page. This hook is fired when
|
2424
|
+
* {@link Options#pagination} option is enabled.
|
2425
|
+
*
|
2426
|
+
* @since 16.1.0
|
2427
|
+
* @event Hooks#beforePageChange
|
2428
|
+
* @param {number} oldPage The old page number.
|
2429
|
+
* @param {number} newPage The new page number.
|
2430
|
+
* @returns {*|boolean} If `false` is returned the action is canceled.
|
2431
|
+
*/
|
2432
|
+
'beforePageChange',
|
2433
|
+
/**
|
2434
|
+
* Fired by {@link Pagination} plugin after changing the page. This hook is fired when
|
2435
|
+
* {@link Options#pagination} option is enabled.
|
2436
|
+
*
|
2437
|
+
* @since 16.1.0
|
2438
|
+
* @event Hooks#afterPageChange
|
2439
|
+
* @param {number} oldPage The old page number.
|
2440
|
+
* @param {number} newPage The new page number.
|
2441
|
+
*/
|
2442
|
+
'afterPageChange',
|
2443
|
+
/**
|
2444
|
+
* Fired by {@link Pagination} plugin before changing the page size. This hook is fired when
|
2445
|
+
* {@link Options#pagination} option is enabled.
|
2446
|
+
*
|
2447
|
+
* @since 16.1.0
|
2448
|
+
* @event Hooks#beforePageSizeChange
|
2449
|
+
* @param {number | 'auto'} oldPageSize The old page size.
|
2450
|
+
* @param {number | 'auto'} newPageSize The new page size.
|
2451
|
+
* @returns {*|boolean} If `false` is returned the action is canceled.
|
2452
|
+
*/
|
2453
|
+
'beforePageSizeChange',
|
2454
|
+
/**
|
2455
|
+
* Fired by {@link Pagination} plugin after changing the page size. This hook is fired when
|
2456
|
+
* {@link Options#pagination} option is enabled.
|
2457
|
+
*
|
2458
|
+
* @since 16.1.0
|
2459
|
+
* @event Hooks#afterPageSizeChange
|
2460
|
+
* @param {number | 'auto'} oldPageSize The old page size.
|
2461
|
+
* @param {number | 'auto'} newPageSize The new page size.
|
2462
|
+
*/
|
2463
|
+
'afterPageSizeChange',
|
2464
|
+
/**
|
2465
|
+
* Fired by {@link Pagination} plugin after changing the visibility state of the page size section.
|
2466
|
+
* This hook is fired when {@link Options#pagination} option is enabled.
|
2467
|
+
*
|
2468
|
+
* @since 16.1.0
|
2469
|
+
* @event Hooks#afterPageSizeVisibilityChange
|
2470
|
+
* @param {boolean} isVisible The visibility state of the page size section.
|
2471
|
+
*/
|
2472
|
+
'afterPageSizeVisibilityChange',
|
2473
|
+
/**
|
2474
|
+
* Fired by {@link Pagination} plugin after changing the visibility state of the page counter section.
|
2475
|
+
* This hook is fired when {@link Options#pagination} option is enabled.
|
2476
|
+
*
|
2477
|
+
* @since 16.1.0
|
2478
|
+
* @event Hooks#afterPageCounterVisibilityChange
|
2479
|
+
* @param {boolean} isVisible The visibility state of the page size section.
|
2480
|
+
*/
|
2481
|
+
'afterPageCounterVisibilityChange',
|
2482
|
+
/**
|
2483
|
+
* Fired by {@link Pagination} plugin after changing the visibility state of the page navigation section.
|
2484
|
+
* This hook is fired when {@link Options#pagination} option is enabled.
|
2485
|
+
*
|
2486
|
+
* @since 16.1.0
|
2487
|
+
* @event Hooks#afterPageNavigationVisibilityChange
|
2488
|
+
* @param {boolean} isVisible The visibility state of the page size section.
|
2489
|
+
*/
|
2490
|
+
'afterPageNavigationVisibilityChange',
|
2340
2491
|
/**
|
2341
2492
|
* Fired by the {@link Formulas} plugin, when any cell value changes.
|
2342
2493
|
*
|
@@ -2784,6 +2935,97 @@ export const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-com
|
|
2784
2935
|
* Returning `true` removes those restrictions.
|
2785
2936
|
*/
|
2786
2937
|
'beforeBeginEditing',
|
2938
|
+
/**
|
2939
|
+
* Fired by {@link Dialog} plugin after hiding the dialog. This hook is fired when {@link Options#dialog}
|
2940
|
+
* option is enabled.
|
2941
|
+
*
|
2942
|
+
* @since 16.1.0
|
2943
|
+
* @event Hooks#afterDialogHide
|
2944
|
+
*/
|
2945
|
+
'afterDialogHide',
|
2946
|
+
/**
|
2947
|
+
* Fired by {@link Dialog} plugin after showing the dialog. This hook is fired when {@link Options#dialog}
|
2948
|
+
* option is enabled.
|
2949
|
+
*
|
2950
|
+
* @since 16.1.0
|
2951
|
+
* @event Hooks#afterDialogShow
|
2952
|
+
*/
|
2953
|
+
'afterDialogShow',
|
2954
|
+
/**
|
2955
|
+
* Fired by {@link Dialog} plugin before hiding the dialog. This hook is fired when {@link Options#dialog}
|
2956
|
+
* option is enabled.
|
2957
|
+
*
|
2958
|
+
* @since 16.1.0
|
2959
|
+
* @event Hooks#beforeDialogHide
|
2960
|
+
*/
|
2961
|
+
'beforeDialogHide',
|
2962
|
+
/**
|
2963
|
+
* Fired by {@link Dialog} plugin before showing the dialog. This hook is fired when {@link Options#dialog}
|
2964
|
+
* option is enabled.
|
2965
|
+
*
|
2966
|
+
* @since 16.1.0
|
2967
|
+
* @event Hooks#beforeDialogShow
|
2968
|
+
*/
|
2969
|
+
'beforeDialogShow',
|
2970
|
+
/**
|
2971
|
+
* Fired by {@link Dialog} plugin before focusing the previous element. This hook is fired when {@link Options#dialog}
|
2972
|
+
* option is enabled.
|
2973
|
+
*
|
2974
|
+
* @since 16.1.0
|
2975
|
+
* @event Hooks#dialogFocusPreviousElement
|
2976
|
+
*/
|
2977
|
+
'dialogFocusPreviousElement',
|
2978
|
+
/**
|
2979
|
+
* Fired by {@link Dialog} plugin before focusing the next element. This hook is fired when {@link Options#dialog}
|
2980
|
+
* option is enabled.
|
2981
|
+
*
|
2982
|
+
* @since 16.1.0
|
2983
|
+
* @event Hooks#dialogFocusNextElement
|
2984
|
+
*/
|
2985
|
+
'dialogFocusNextElement',
|
2986
|
+
/**
|
2987
|
+
* Fired by {@link Dialog} plugin when the focus is set. This hook is fired when {@link Options#dialog}
|
2988
|
+
* option is enabled.
|
2989
|
+
*
|
2990
|
+
* @since 16.1.0
|
2991
|
+
* @event Hooks#afterDialogFocus
|
2992
|
+
* @param {'tab_from_above' | 'tab_from_below' | 'click' | 'show'} focusSource The source of the focus.
|
2993
|
+
*/
|
2994
|
+
'afterDialogFocus',
|
2995
|
+
/**
|
2996
|
+
* Fired by {@link Loading} plugin before showing the loading indicator. This hook is fired when {@link Options#loading}
|
2997
|
+
* option is enabled. The callback can return `false` to prevent the loading indicator from being shown.
|
2998
|
+
*
|
2999
|
+
* @since 16.1.0
|
3000
|
+
* @event Hooks#beforeLoadingShow
|
3001
|
+
* @returns {boolean | undefined} If returns `false`, the action will be skipped.
|
3002
|
+
*/
|
3003
|
+
'beforeLoadingShow',
|
3004
|
+
/**
|
3005
|
+
* Fired by {@link Loading} plugin after showing the loading indicator. This hook is fired when {@link Options#loading}
|
3006
|
+
* option is enabled.
|
3007
|
+
*
|
3008
|
+
* @since 16.1.0
|
3009
|
+
* @event Hooks#afterLoadingShow
|
3010
|
+
*/
|
3011
|
+
'afterLoadingShow',
|
3012
|
+
/**
|
3013
|
+
* Fired by {@link Loading} plugin before hiding the loading indicator. This hook is fired when {@link Options#loading}
|
3014
|
+
* option is enabled.
|
3015
|
+
*
|
3016
|
+
* @since 16.1.0
|
3017
|
+
* @event Hooks#beforeLoadingHide
|
3018
|
+
* @returns {boolean | undefined} If returns `false`, the action will be skipped.
|
3019
|
+
*/
|
3020
|
+
'beforeLoadingHide',
|
3021
|
+
/**
|
3022
|
+
* Fired by {@link Loading} plugin after hiding the loading indicator. This hook is fired when {@link Options#loading}
|
3023
|
+
* option is enabled.
|
3024
|
+
*
|
3025
|
+
* @since 16.1.0
|
3026
|
+
* @event Hooks#afterLoadingHide
|
3027
|
+
*/
|
3028
|
+
'afterLoadingHide',
|
2787
3029
|
/**
|
2788
3030
|
* Fired after the editor is opened and rendered.
|
2789
3031
|
*
|
package/core/hooks/index.d.ts
CHANGED
@@ -68,6 +68,13 @@ export interface Events {
|
|
68
68
|
afterContextMenuHide?: (context: ContextMenu) => void;
|
69
69
|
afterContextMenuShow?: (context: ContextMenu) => void;
|
70
70
|
afterCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void;
|
71
|
+
afterDialogFocus?: (focusSource: 'tab_from_above' | 'tab_from_below' | 'click' | 'show') => void;
|
72
|
+
afterDialogHide?: () => void;
|
73
|
+
afterDialogShow?: () => void;
|
74
|
+
beforeLoadingShow?: () => boolean | void;
|
75
|
+
afterLoadingShow?: () => void;
|
76
|
+
beforeLoadingHide?: () => boolean | void;
|
77
|
+
afterLoadingHide?: () => void;
|
71
78
|
afterCopyLimit?: (selectedRows: number, selectedColumns: number, copyRowsLimit: number, copyColumnsLimit: number) => void;
|
72
79
|
afterCreateCol?: (index: number, amount: number, source?: ChangeSource) => void;
|
73
80
|
afterCreateRow?: (index: number, amount: number, source?: ChangeSource) => void;
|
@@ -107,6 +114,11 @@ export interface Events {
|
|
107
114
|
afterOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
108
115
|
afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
109
116
|
afterOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
117
|
+
afterPageChange?: (oldPage: number, newPage: number) => void;
|
118
|
+
afterPageCounterVisibilityChange?: (isVisible: boolean) => void;
|
119
|
+
afterPageNavigationVisibilityChange?: (isVisible: boolean) => void;
|
120
|
+
afterPageSizeChange?: (oldPageSize: number | 'auto', newPageSize: number | 'auto') => void;
|
121
|
+
afterPageSizeVisibilityChange?: (isVisible: boolean) => void;
|
110
122
|
afterPaste?: (data: CellValue[][], coords: RangeType[]) => void;
|
111
123
|
afterPluginsInitialized?: () => void;
|
112
124
|
afterRedo?: (action: UndoRedoAction) => void;
|
@@ -123,6 +135,7 @@ export interface Events {
|
|
123
135
|
afterScrollHorizontally?: () => void;
|
124
136
|
afterScrollVertically?: () => void;
|
125
137
|
afterScroll?: () => void;
|
138
|
+
afterSelectAll?: (from: CellCoords, to: CellCoords, highlight?: CellCoords) => void;
|
126
139
|
afterSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
|
127
140
|
afterSelection?: (row: number, column: number, row2: number, column2: number, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
|
128
141
|
afterSelectionByProp?: (row: number, prop: string, row2: number, prop2: string, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
|
@@ -172,6 +185,8 @@ export interface Events {
|
|
172
185
|
beforeContextMenuShow?: (context: ContextMenu) => void;
|
173
186
|
beforeCopy?: (data: CellValue[][], coords: RangeType[], copiedHeadersCount: { columnHeadersCount: number }) => void | boolean;
|
174
187
|
beforeCreateCol?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
|
188
|
+
beforeDialogHide?: () => void;
|
189
|
+
beforeDialogShow?: () => void;
|
175
190
|
beforeCreateRow?: (index: number, amount: number, source?: ChangeSource) => void | boolean;
|
176
191
|
beforeCut?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
|
177
192
|
beforeDetachChild?: (parent: RowObject, element: RowObject) => void;
|
@@ -180,6 +195,7 @@ export interface Events {
|
|
180
195
|
beforeDropdownMenuShow?: (instance: DropdownMenu) => void;
|
181
196
|
beforeFilter?: (conditionsStack: FiltersColumnConditions[], previousConditionsStack: FiltersColumnConditions[]) => void | boolean;
|
182
197
|
beforeGetCellMeta?: (row: number, column: number, cellProperties: CellProperties) => void;
|
198
|
+
beforeHeightChange?: (height: number | string) => number | string;
|
183
199
|
beforeHideColumns?: (currentHideConfig: number[], destinationHideConfig: number[], actionPossible: boolean) => void | boolean;
|
184
200
|
beforeHideRows?: (currentHideConfig: number[], destinationHideConfig: number[], actionPossible: boolean) => void | boolean;
|
185
201
|
beforeHighlightingColumnHeader?: (column: number, headerLevel: number, highlightMeta: HookHighlightColumnHeaderMeta) => number | void;
|
@@ -195,6 +211,8 @@ export interface Events {
|
|
195
211
|
beforeOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
196
212
|
beforeOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement, controller: SelectionController) => void;
|
197
213
|
beforeOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
214
|
+
beforePageChange?: (oldPage: number, newPage: number) => void | boolean;
|
215
|
+
beforePageSizeChange?: (oldPageSize: number | 'auto', newPageSize: number | 'auto') => void | boolean;
|
198
216
|
beforePaste?: (data: CellValue[][], coords: RangeType[]) => void | boolean;
|
199
217
|
beforeRedo?: (action: UndoRedoAction) => void;
|
200
218
|
beforeRedoStackChange?: (undoneActions: UndoRedoAction[]) => void;
|
@@ -208,6 +226,7 @@ export interface Events {
|
|
208
226
|
beforeRowMove?: (movedRows: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean) => void;
|
209
227
|
beforeRowResize?: (newSize: number, row: number, isDoubleClick: boolean) => number | void;
|
210
228
|
beforeRowWrap?: (isActionInterrupted: { value: boolean }, newCoords: CellCoords, isRowFlipped: boolean) => void;
|
229
|
+
beforeSelectAll?: (from: CellCoords, to: CellCoords, highlight?: CellCoords) => void;
|
211
230
|
beforeSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
|
212
231
|
beforeSelectionFocusSet?: (coords: CellCoords) => void;
|
213
232
|
beforeSelectionHighlightSet?: () => void;
|
@@ -232,7 +251,10 @@ export interface Events {
|
|
232
251
|
beforeViewportScrollHorizontally?: (visualColumn: number, snapping: 'auto' | 'start' | 'end') => number | boolean | null;
|
233
252
|
beforeViewportScroll?: () => void;
|
234
253
|
beforeViewRender?: (isForced: boolean, skipRender: { skipRender?: boolean }) => void;
|
254
|
+
beforeWidthChange?: (width: number | string) => number | string;
|
235
255
|
construct?: () => void;
|
256
|
+
dialogFocusNextElement?: () => void;
|
257
|
+
dialogFocusPreviousElement?: () => void;
|
236
258
|
init?: () => void;
|
237
259
|
modifyAutoColumnSizeSeed?: (seed: string, cellProperties: CellProperties, cellValue: CellValue) => string | void;
|
238
260
|
modifyAutofillRange?: (startArea: Array<[number, number, number, number]>, entireArea: Array<[number, number, number, number]>) => void;
|
@@ -12,10 +12,14 @@ var _utils = require("../utils");
|
|
12
12
|
function focusScrollStrategy(hot) {
|
13
13
|
return cellCoords => {
|
14
14
|
hot.scrollViewportTo(cellCoords.toObject(), () => {
|
15
|
+
const activeRange = hot.getSelectedRangeActive();
|
16
|
+
if (!activeRange) {
|
17
|
+
return;
|
18
|
+
}
|
15
19
|
const {
|
16
20
|
row,
|
17
21
|
col
|
18
|
-
} =
|
22
|
+
} = activeRange.highlight;
|
19
23
|
(0, _utils.scrollWindowToCell)(hot.getCell(row, col, true));
|
20
24
|
});
|
21
25
|
};
|
@@ -8,10 +8,14 @@ import { scrollWindowToCell } from "../utils.mjs";
|
|
8
8
|
export function focusScrollStrategy(hot) {
|
9
9
|
return cellCoords => {
|
10
10
|
hot.scrollViewportTo(cellCoords.toObject(), () => {
|
11
|
+
const activeRange = hot.getSelectedRangeActive();
|
12
|
+
if (!activeRange) {
|
13
|
+
return;
|
14
|
+
}
|
11
15
|
const {
|
12
16
|
row,
|
13
17
|
col
|
14
|
-
} =
|
18
|
+
} = activeRange.highlight;
|
15
19
|
scrollWindowToCell(hot.getCell(row, col, true));
|
16
20
|
});
|
17
21
|
};
|
@@ -30,7 +30,7 @@ function createScrollTargetCalculator(hotInstance) {
|
|
30
30
|
selection,
|
31
31
|
view
|
32
32
|
} = hotInstance;
|
33
|
-
const cellRange = hotInstance.
|
33
|
+
const cellRange = hotInstance.getSelectedRangeActive();
|
34
34
|
const source = selection.getSelectionSource();
|
35
35
|
const firstVisibleColumn = view.getFirstFullyVisibleColumn();
|
36
36
|
const lastVisibleColumn = view.getLastFullyVisibleColumn();
|
@@ -25,7 +25,7 @@ export function createScrollTargetCalculator(hotInstance) {
|
|
25
25
|
selection,
|
26
26
|
view
|
27
27
|
} = hotInstance;
|
28
|
-
const cellRange = hotInstance.
|
28
|
+
const cellRange = hotInstance.getSelectedRangeActive();
|
29
29
|
const source = selection.getSelectionSource();
|
30
30
|
const firstVisibleColumn = view.getFirstFullyVisibleColumn();
|
31
31
|
const lastVisibleColumn = view.getLastFullyVisibleColumn();
|