handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-08765b9-20230714
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.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
- package/3rdparty/walkontable/src/cell/coords.js +87 -33
- package/3rdparty/walkontable/src/cell/coords.mjs +87 -33
- package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
- package/3rdparty/walkontable/src/cell/range.js +92 -46
- package/3rdparty/walkontable/src/cell/range.mjs +92 -46
- package/3rdparty/walkontable/src/core/_base.js +41 -33
- package/3rdparty/walkontable/src/core/_base.mjs +41 -33
- package/3rdparty/walkontable/src/core/clone.js +8 -5
- package/3rdparty/walkontable/src/core/clone.mjs +8 -5
- package/3rdparty/walkontable/src/core/core.js +3 -2
- package/3rdparty/walkontable/src/core/core.mjs +3 -2
- package/3rdparty/walkontable/src/event.js +9 -8
- package/3rdparty/walkontable/src/event.mjs +9 -8
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +10 -2
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +11 -9
- package/3rdparty/walkontable/src/overlay/_base.mjs +11 -9
- package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
- package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
- package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -6
- package/3rdparty/walkontable/src/overlay/top.js +12 -14
- package/3rdparty/walkontable/src/overlay/top.mjs +12 -14
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
- package/3rdparty/walkontable/src/overlays.js +75 -80
- package/3rdparty/walkontable/src/overlays.mjs +75 -80
- package/3rdparty/walkontable/src/scroll.js +27 -24
- package/3rdparty/walkontable/src/scroll.mjs +27 -24
- package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
- package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
- package/3rdparty/walkontable/src/selection/border/constants.js +16 -0
- package/3rdparty/walkontable/src/selection/border/constants.mjs +12 -0
- package/3rdparty/walkontable/src/selection/constants.js +62 -0
- package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
- package/3rdparty/walkontable/src/selection/index.js +26 -0
- package/3rdparty/walkontable/src/selection/index.mjs +5 -0
- package/3rdparty/walkontable/src/selection/manager.js +259 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +254 -0
- package/3rdparty/walkontable/src/selection/scanner.js +270 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +267 -0
- package/3rdparty/walkontable/src/selection/selection.js +101 -0
- package/3rdparty/walkontable/src/selection/selection.mjs +96 -0
- package/3rdparty/walkontable/src/settings.js +18 -17
- package/3rdparty/walkontable/src/settings.mjs +18 -17
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
- package/3rdparty/walkontable/src/table.js +48 -115
- package/3rdparty/walkontable/src/table.mjs +49 -116
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/focusDetector.js +58 -0
- package/core/focusCatcher/focusDetector.mjs +54 -0
- package/core/focusCatcher/index.js +142 -0
- package/core/focusCatcher/index.mjs +138 -0
- package/core/index.js +9 -0
- package/core/index.mjs +1 -0
- package/core.d.ts +6 -3
- package/core.js +181 -298
- package/core.mjs +181 -298
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +41 -0
- package/dataMap/metaManager/metaSchema.mjs +41 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
- package/dataMap/metaManager/utils.js +4 -2
- package/dataMap/metaManager/utils.mjs +4 -2
- package/dist/handsontable.css +19 -3
- package/dist/handsontable.full.css +19 -3
- package/dist/handsontable.full.js +10739 -7037
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +25 -25
- package/dist/handsontable.js +24884 -21182
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +19 -19
- package/editorManager.js +11 -75
- package/editorManager.mjs +11 -74
- package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
- package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -1
- package/editors/dateEditor/dateEditor.mjs +2 -1
- package/editors/textEditor/textEditor.js +3 -11
- package/editors/textEditor/textEditor.mjs +4 -12
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +1 -0
- package/helpers/number.js +18 -0
- package/helpers/number.mjs +17 -0
- package/helpers/object.js +1 -0
- package/helpers/object.mjs +1 -0
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/pluginHooks.d.ts +7 -1
- package/pluginHooks.js +106 -1
- package/pluginHooks.mjs +106 -1
- package/plugins/autoColumnSize/autoColumnSize.js +4 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +110 -40
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +110 -40
- package/plugins/columnSorting/columnSorting.js +40 -1
- package/plugins/columnSorting/columnSorting.mjs +40 -3
- package/plugins/columnSorting/columnStatesManager.js +2 -1
- package/plugins/columnSorting/columnStatesManager.mjs +2 -1
- package/plugins/columnSorting/index.js +3 -1
- package/plugins/columnSorting/index.mjs +1 -1
- package/plugins/comments/commentEditor.js +1 -0
- package/plugins/comments/commentEditor.mjs +1 -0
- package/plugins/comments/comments.js +253 -191
- package/plugins/comments/comments.mjs +252 -192
- package/plugins/comments/contextMenuItem/addEditComment.js +41 -0
- package/plugins/comments/contextMenuItem/addEditComment.mjs +35 -0
- package/plugins/comments/contextMenuItem/readOnlyComment.js +49 -0
- package/plugins/comments/contextMenuItem/readOnlyComment.mjs +43 -0
- package/plugins/comments/contextMenuItem/removeComment.js +38 -0
- package/plugins/comments/contextMenuItem/removeComment.mjs +32 -0
- package/plugins/contextMenu/contextMenu.d.ts +1 -1
- package/plugins/contextMenu/contextMenu.js +72 -30
- package/plugins/contextMenu/contextMenu.mjs +73 -31
- package/plugins/contextMenu/predefinedItems/alignment.js +7 -0
- package/plugins/contextMenu/predefinedItems/alignment.mjs +7 -0
- package/plugins/contextMenu/predefinedItems/clearColumn.js +5 -3
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/columnLeft.js +5 -3
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/columnRight.js +5 -3
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/readOnly.js +7 -0
- package/plugins/contextMenu/predefinedItems/readOnly.mjs +7 -0
- package/plugins/contextMenu/predefinedItems/removeColumn.js +7 -5
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/removeRow.js +7 -5
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/rowAbove.js +5 -3
- package/plugins/contextMenu/predefinedItems/rowAbove.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.js +5 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.mjs +5 -3
- package/plugins/contextMenu/utils.js +28 -16
- package/plugins/contextMenu/utils.mjs +27 -15
- package/plugins/copyPaste/contextMenuItem/copy.js +7 -0
- package/plugins/copyPaste/contextMenuItem/copy.mjs +7 -0
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +9 -1
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +9 -1
- package/plugins/copyPaste/contextMenuItem/cut.js +7 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +7 -0
- package/plugins/copyPaste/copyPaste.js +12 -6
- package/plugins/copyPaste/copyPaste.mjs +12 -6
- package/plugins/customBorders/customBorders.js +36 -29
- package/plugins/customBorders/customBorders.mjs +37 -30
- package/plugins/customBorders/utils.js +3 -3
- package/plugins/customBorders/utils.mjs +3 -3
- package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
- package/plugins/dropdownMenu/dropdownMenu.js +89 -32
- package/plugins/dropdownMenu/dropdownMenu.mjs +89 -32
- package/plugins/filters/conditionCollection.js +6 -5
- package/plugins/filters/conditionCollection.mjs +6 -5
- package/plugins/filters/filters.js +44 -21
- package/plugins/filters/filters.mjs +43 -20
- package/plugins/formulas/engine/register.js +3 -3
- package/plugins/formulas/engine/register.mjs +3 -3
- package/plugins/formulas/engine/settings.js +6 -3
- package/plugins/formulas/engine/settings.mjs +6 -3
- package/plugins/formulas/formulas.js +151 -143
- package/plugins/formulas/formulas.mjs +151 -143
- package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
- package/plugins/formulas/indexSyncer/index.js +100 -64
- package/plugins/formulas/indexSyncer/index.mjs +100 -64
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
- package/plugins/hiddenColumns/hiddenColumns.js +51 -34
- package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
- package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
- package/plugins/hiddenRows/hiddenRows.js +50 -33
- package/plugins/hiddenRows/hiddenRows.mjs +50 -33
- package/plugins/manualRowResize/manualRowResize.js +2 -1
- package/plugins/manualRowResize/manualRowResize.mjs +2 -1
- package/plugins/mergeCells/mergeCells.js +6 -17
- package/plugins/mergeCells/mergeCells.mjs +6 -17
- package/plugins/multiColumnSorting/multiColumnSorting.js +37 -2
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +37 -2
- package/plugins/nestedHeaders/nestedHeaders.js +209 -75
- package/plugins/nestedHeaders/nestedHeaders.mjs +208 -74
- package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
- package/plugins/nestedHeaders/stateManager/index.js +107 -49
- package/plugins/nestedHeaders/stateManager/index.mjs +105 -47
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
- package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
- package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
- package/plugins/nestedRows/data/dataManager.js +4 -2
- package/plugins/nestedRows/data/dataManager.mjs +4 -2
- package/plugins/nestedRows/nestedRows.js +41 -0
- package/plugins/nestedRows/nestedRows.mjs +41 -0
- package/plugins/persistentState/storage.js +1 -0
- package/plugins/persistentState/storage.mjs +1 -0
- package/plugins/undoRedo/undoRedo.js +2 -1
- package/plugins/undoRedo/undoRedo.mjs +2 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/highlight.js +256 -71
- package/selection/highlight/highlight.mjs +250 -71
- package/selection/highlight/types/activeHeader.js +10 -8
- package/selection/highlight/types/activeHeader.mjs +10 -8
- package/selection/highlight/types/area.js +6 -18
- package/selection/highlight/types/area.mjs +6 -18
- package/selection/highlight/types/areaLayered.js +31 -0
- package/selection/highlight/types/areaLayered.mjs +26 -0
- package/selection/highlight/types/column.js +27 -0
- package/selection/highlight/types/column.mjs +22 -0
- package/selection/highlight/types/customSelection.js +7 -9
- package/selection/highlight/types/customSelection.mjs +7 -9
- package/selection/highlight/types/fill.js +5 -7
- package/selection/highlight/types/fill.mjs +5 -7
- package/selection/highlight/types/{cell.js → focus.js} +5 -7
- package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
- package/selection/highlight/types/header.js +9 -18
- package/selection/highlight/types/header.mjs +9 -18
- package/selection/highlight/types/row.js +27 -0
- package/selection/highlight/types/row.mjs +22 -0
- package/selection/highlight/visualSelection.js +41 -33
- package/selection/highlight/visualSelection.mjs +41 -33
- package/selection/index.js +4 -7
- package/selection/index.mjs +2 -3
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +290 -154
- package/selection/selection.mjs +287 -153
- package/selection/transformation.js +232 -90
- package/selection/transformation.mjs +232 -90
- package/selection/utils.js +15 -21
- package/selection/utils.mjs +16 -21
- package/settings.d.ts +2 -0
- package/shortcutContexts/commands/editor/closeAndSave.js +12 -0
- package/shortcutContexts/commands/editor/closeAndSave.mjs +8 -0
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +12 -0
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
- package/shortcutContexts/commands/editor/fastOpen.js +16 -0
- package/shortcutContexts/commands/editor/fastOpen.mjs +12 -0
- package/shortcutContexts/commands/editor/index.js +16 -0
- package/shortcutContexts/commands/editor/index.mjs +12 -0
- package/shortcutContexts/commands/editor/open.js +27 -0
- package/shortcutContexts/commands/editor/open.mjs +23 -0
- package/shortcutContexts/commands/emptySelectedCells.js +11 -0
- package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
- package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +17 -0
- package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
- package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +17 -0
- package/shortcutContexts/commands/index.js +35 -0
- package/shortcutContexts/commands/index.mjs +31 -0
- package/shortcutContexts/commands/moveCellSelection/down.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/down.mjs +9 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +31 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +27 -0
- package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
- package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/left.js +10 -0
- package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/right.js +10 -0
- package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +18 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +14 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +14 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +10 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +19 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +15 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +21 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +19 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +15 -0
- package/shortcutContexts/commands/moveCellSelection/up.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/up.mjs +9 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +31 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +27 -0
- package/shortcutContexts/commands/populateSelectedCellsData.js +29 -0
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +25 -0
- package/shortcutContexts/commands/scrollToFocusedCell.js +36 -0
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +32 -0
- package/shortcutContexts/commands/selectAll.js +10 -0
- package/shortcutContexts/commands/selectAll.mjs +6 -0
- package/shortcutContexts/constants.js +13 -0
- package/shortcutContexts/constants.mjs +8 -0
- package/shortcutContexts/editor.js +25 -0
- package/shortcutContexts/editor.mjs +21 -0
- package/shortcutContexts/grid.js +163 -0
- package/shortcutContexts/grid.mjs +159 -0
- package/shortcutContexts/index.js +24 -0
- package/shortcutContexts/index.mjs +11 -0
- package/shortcuts/manager.js +2 -0
- package/shortcuts/manager.mjs +2 -0
- package/shortcuts/recorder.js +2 -2
- package/shortcuts/recorder.mjs +2 -2
- package/shortcuts/utils.js +19 -5
- package/shortcuts/utils.mjs +18 -4
- package/tableView.js +163 -91
- package/tableView.mjs +163 -91
- package/translations/changesObservable/observable.js +82 -54
- package/translations/changesObservable/observable.mjs +82 -54
- package/translations/changesObservable/observer.js +24 -11
- package/translations/changesObservable/observer.mjs +24 -11
- package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
- package/utils/dataStructures/tree.js +21 -18
- package/utils/dataStructures/tree.mjs +21 -18
- package/3rdparty/walkontable/src/selection.js +0 -295
- package/3rdparty/walkontable/src/selection.mjs +0 -290
- package/selection/highlight/constants.js +0 -15
- package/selection/highlight/constants.mjs +0 -6
- package/selection/highlight/types/index.js +0 -35
- package/selection/highlight/types/index.mjs +0 -31
@@ -6,7 +6,7 @@ import { rangeEach } from "../../helpers/number.mjs";
|
|
6
6
|
import { KEY_CODES } from "../../helpers/unicode.mjs";
|
7
7
|
import { autoResize } from "../../3rdparty/autoResize/index.mjs";
|
8
8
|
import { isDefined } from "../../helpers/mixed.mjs";
|
9
|
-
import { SHORTCUTS_GROUP_NAVIGATION
|
9
|
+
import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
|
10
10
|
import { SHORTCUTS_GROUP_EDITOR } from "../baseEditor/baseEditor.mjs";
|
11
11
|
import { updateCaretPosition } from "./caretPositioner.mjs";
|
12
12
|
const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
|
@@ -411,9 +411,7 @@ export class TextEditor extends BaseEditor {
|
|
411
411
|
runOnlyIf: event => !this.hot.selection.isMultiple() &&
|
412
412
|
// We trigger a data population for multiple selection.
|
413
413
|
// catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
|
414
|
-
!event.altKey
|
415
|
-
relativeToGroup: EDITOR_MANAGER_GROUP,
|
416
|
-
position: 'before'
|
414
|
+
!event.altKey
|
417
415
|
}, {
|
418
416
|
keys: [['Meta', 'Enter']],
|
419
417
|
callback: () => {
|
@@ -421,19 +419,13 @@ export class TextEditor extends BaseEditor {
|
|
421
419
|
return false; // Will block closing editor.
|
422
420
|
},
|
423
421
|
|
424
|
-
runOnlyIf: () => !this.hot.selection.isMultiple()
|
425
|
-
// We trigger a data population for multiple selection.
|
426
|
-
relativeToGroup: EDITOR_MANAGER_GROUP,
|
427
|
-
position: 'before'
|
422
|
+
runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
|
428
423
|
}, {
|
429
424
|
keys: [['Alt', 'Enter']],
|
430
425
|
callback: () => {
|
431
426
|
insertNewLine();
|
432
427
|
return false; // Will block closing editor.
|
433
|
-
}
|
434
|
-
|
435
|
-
relativeToGroup: EDITOR_MANAGER_GROUP,
|
436
|
-
position: 'before'
|
428
|
+
}
|
437
429
|
}, {
|
438
430
|
// TODO: Duplicated part of code (callback to shortcut)
|
439
431
|
keys: [['PageUp']],
|
package/helpers/mixed.js
CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
|
|
134
134
|
function _injectProductInfo(key, element) {
|
135
135
|
const hasValidType = !isEmpty(key);
|
136
136
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
137
|
-
const hotVersion = "0.0.0-next-
|
137
|
+
const hotVersion = "0.0.0-next-08765b9-20230714";
|
138
138
|
let keyValidityDate;
|
139
139
|
let consoleMessageState = 'invalid';
|
140
140
|
let domMessageState = 'invalid';
|
package/helpers/mixed.mjs
CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
|
|
124
124
|
export function _injectProductInfo(key, element) {
|
125
125
|
const hasValidType = !isEmpty(key);
|
126
126
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
127
|
-
const hotVersion = "0.0.0-next-
|
127
|
+
const hotVersion = "0.0.0-next-08765b9-20230714";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
package/helpers/number.d.ts
CHANGED
@@ -3,3 +3,4 @@ export function isNumericLike(value: any): boolean;
|
|
3
3
|
export function rangeEach(rangeFrom: number, rangeTo: number, iteratee: (index: number) => void): void;
|
4
4
|
export function rangeEachReverse(rangeFrom: number, rangeTo: number, iteratee: (index: number) => void): void;
|
5
5
|
export function valueAccordingPercent(value: number, percent: string | number): number;
|
6
|
+
export function clamp(value: number, minValue: number, maxValue: number): number;
|
package/helpers/number.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
exports.clamp = clamp;
|
4
5
|
exports.isNumeric = isNumeric;
|
5
6
|
exports.isNumericLike = isNumericLike;
|
6
7
|
exports.rangeEach = rangeEach;
|
@@ -111,4 +112,21 @@ function valueAccordingPercent(value, percent) {
|
|
111
112
|
percent = parseInt(percent.toString().replace('%', ''), 10);
|
112
113
|
percent = isNaN(percent) ? 0 : percent;
|
113
114
|
return parseInt(value * percent / 100, 10);
|
115
|
+
}
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Clamps the value between min and max.
|
119
|
+
*
|
120
|
+
* @param {number} value The base number value.
|
121
|
+
* @param {number} minValue The max number value.
|
122
|
+
* @param {number} maxValue The min number value.
|
123
|
+
* @returns {number}
|
124
|
+
*/
|
125
|
+
function clamp(value, minValue, maxValue) {
|
126
|
+
if (Math.min(value, minValue) === value) {
|
127
|
+
return minValue;
|
128
|
+
} else if (Math.max(value, maxValue) === value) {
|
129
|
+
return maxValue;
|
130
|
+
}
|
131
|
+
return value;
|
114
132
|
}
|
package/helpers/number.mjs
CHANGED
@@ -103,4 +103,21 @@ export function valueAccordingPercent(value, percent) {
|
|
103
103
|
percent = parseInt(percent.toString().replace('%', ''), 10);
|
104
104
|
percent = isNaN(percent) ? 0 : percent;
|
105
105
|
return parseInt(value * percent / 100, 10);
|
106
|
+
}
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Clamps the value between min and max.
|
110
|
+
*
|
111
|
+
* @param {number} value The base number value.
|
112
|
+
* @param {number} minValue The max number value.
|
113
|
+
* @param {number} maxValue The min number value.
|
114
|
+
* @returns {number}
|
115
|
+
*/
|
116
|
+
export function clamp(value, minValue, maxValue) {
|
117
|
+
if (Math.min(value, minValue) === value) {
|
118
|
+
return minValue;
|
119
|
+
} else if (Math.max(value, maxValue) === value) {
|
120
|
+
return maxValue;
|
121
|
+
}
|
122
|
+
return value;
|
106
123
|
}
|
package/helpers/object.js
CHANGED
@@ -17,6 +17,7 @@ exports.isObjectEqual = isObjectEqual;
|
|
17
17
|
exports.mixin = mixin;
|
18
18
|
exports.objectEach = objectEach;
|
19
19
|
exports.setProperty = setProperty;
|
20
|
+
require("core-js/modules/es.json.stringify.js");
|
20
21
|
require("core-js/modules/es.array.push.js");
|
21
22
|
require("core-js/modules/es.error.cause.js");
|
22
23
|
var _array = require("./array");
|
package/helpers/object.mjs
CHANGED
package/index.js
CHANGED
@@ -67,7 +67,7 @@ arrayHelpers.arrayEach(DOM, helper => {
|
|
67
67
|
});
|
68
68
|
|
69
69
|
// Export cell types.
|
70
|
-
_base.default.cellTypes = (_Handsontable$cellTyp = _base.default.cellTypes)
|
70
|
+
_base.default.cellTypes = (_Handsontable$cellTyp = _base.default.cellTypes) !== null && _Handsontable$cellTyp !== void 0 ? _Handsontable$cellTyp : {};
|
71
71
|
arrayHelpers.arrayEach((0, _registry5.getRegisteredCellTypeNames)(), cellTypeName => {
|
72
72
|
_base.default.cellTypes[cellTypeName] = (0, _registry5.getCellType)(cellTypeName);
|
73
73
|
});
|
@@ -75,7 +75,7 @@ _base.default.cellTypes.registerCellType = _registry5.registerCellType;
|
|
75
75
|
_base.default.cellTypes.getCellType = _registry5.getCellType;
|
76
76
|
|
77
77
|
// Export all registered editors from the Handsontable.
|
78
|
-
_base.default.editors = (_Handsontable$editors = _base.default.editors)
|
78
|
+
_base.default.editors = (_Handsontable$editors = _base.default.editors) !== null && _Handsontable$editors !== void 0 ? _Handsontable$editors : {};
|
79
79
|
arrayHelpers.arrayEach((0, _registry2.getRegisteredEditorNames)(), editorName => {
|
80
80
|
_base.default.editors[`${stringHelpers.toUpperCaseFirst(editorName)}Editor`] = (0, _registry2.getEditor)(editorName);
|
81
81
|
});
|
@@ -83,7 +83,7 @@ _base.default.editors.registerEditor = _registry2.registerEditor;
|
|
83
83
|
_base.default.editors.getEditor = _registry2.getEditor;
|
84
84
|
|
85
85
|
// Export all registered renderers from the Handsontable.
|
86
|
-
_base.default.renderers = (_Handsontable$rendere = _base.default.renderers)
|
86
|
+
_base.default.renderers = (_Handsontable$rendere = _base.default.renderers) !== null && _Handsontable$rendere !== void 0 ? _Handsontable$rendere : {};
|
87
87
|
arrayHelpers.arrayEach((0, _registry3.getRegisteredRendererNames)(), rendererName => {
|
88
88
|
const renderer = (0, _registry3.getRenderer)(rendererName);
|
89
89
|
if (rendererName === 'base') {
|
@@ -95,7 +95,7 @@ _base.default.renderers.registerRenderer = _registry3.registerRenderer;
|
|
95
95
|
_base.default.renderers.getRenderer = _registry3.getRenderer;
|
96
96
|
|
97
97
|
// Export all registered validators from the Handsontable.
|
98
|
-
_base.default.validators = (_Handsontable$validat = _base.default.validators)
|
98
|
+
_base.default.validators = (_Handsontable$validat = _base.default.validators) !== null && _Handsontable$validat !== void 0 ? _Handsontable$validat : {};
|
99
99
|
arrayHelpers.arrayEach((0, _registry4.getRegisteredValidatorNames)(), validatorName => {
|
100
100
|
_base.default.validators[`${stringHelpers.toUpperCaseFirst(validatorName)}Validator`] = (0, _registry4.getValidator)(validatorName);
|
101
101
|
});
|
@@ -109,7 +109,7 @@ _base.default.validators.getValidator = _registry4.getValidator;
|
|
109
109
|
// by the `./config/plugin/babel/add-import-extension` babel plugin. Thus, the distribution
|
110
110
|
// files will be broken. The reason is not known right now (probably it's caused by bug in
|
111
111
|
// the Babel or missing something in the plugin).
|
112
|
-
_base.default.plugins = (_Handsontable$plugins = _base.default.plugins)
|
112
|
+
_base.default.plugins = (_Handsontable$plugins = _base.default.plugins) !== null && _Handsontable$plugins !== void 0 ? _Handsontable$plugins : {};
|
113
113
|
arrayHelpers.arrayEach((0, _registry6.getPluginsNames)(), pluginName => {
|
114
114
|
_base.default.plugins[pluginName] = (0, _registry6.getPlugin)(pluginName);
|
115
115
|
});
|
package/index.mjs
CHANGED
@@ -59,7 +59,7 @@ arrayHelpers.arrayEach(DOM, helper => {
|
|
59
59
|
});
|
60
60
|
|
61
61
|
// Export cell types.
|
62
|
-
Handsontable.cellTypes = (_Handsontable$cellTyp = Handsontable.cellTypes)
|
62
|
+
Handsontable.cellTypes = (_Handsontable$cellTyp = Handsontable.cellTypes) !== null && _Handsontable$cellTyp !== void 0 ? _Handsontable$cellTyp : {};
|
63
63
|
arrayHelpers.arrayEach(getRegisteredCellTypeNames(), cellTypeName => {
|
64
64
|
Handsontable.cellTypes[cellTypeName] = getCellType(cellTypeName);
|
65
65
|
});
|
@@ -67,7 +67,7 @@ Handsontable.cellTypes.registerCellType = registerCellType;
|
|
67
67
|
Handsontable.cellTypes.getCellType = getCellType;
|
68
68
|
|
69
69
|
// Export all registered editors from the Handsontable.
|
70
|
-
Handsontable.editors = (_Handsontable$editors = Handsontable.editors)
|
70
|
+
Handsontable.editors = (_Handsontable$editors = Handsontable.editors) !== null && _Handsontable$editors !== void 0 ? _Handsontable$editors : {};
|
71
71
|
arrayHelpers.arrayEach(getRegisteredEditorNames(), editorName => {
|
72
72
|
Handsontable.editors[`${stringHelpers.toUpperCaseFirst(editorName)}Editor`] = getEditor(editorName);
|
73
73
|
});
|
@@ -75,7 +75,7 @@ Handsontable.editors.registerEditor = registerEditor;
|
|
75
75
|
Handsontable.editors.getEditor = getEditor;
|
76
76
|
|
77
77
|
// Export all registered renderers from the Handsontable.
|
78
|
-
Handsontable.renderers = (_Handsontable$rendere = Handsontable.renderers)
|
78
|
+
Handsontable.renderers = (_Handsontable$rendere = Handsontable.renderers) !== null && _Handsontable$rendere !== void 0 ? _Handsontable$rendere : {};
|
79
79
|
arrayHelpers.arrayEach(getRegisteredRendererNames(), rendererName => {
|
80
80
|
const renderer = getRenderer(rendererName);
|
81
81
|
if (rendererName === 'base') {
|
@@ -87,7 +87,7 @@ Handsontable.renderers.registerRenderer = registerRenderer;
|
|
87
87
|
Handsontable.renderers.getRenderer = getRenderer;
|
88
88
|
|
89
89
|
// Export all registered validators from the Handsontable.
|
90
|
-
Handsontable.validators = (_Handsontable$validat = Handsontable.validators)
|
90
|
+
Handsontable.validators = (_Handsontable$validat = Handsontable.validators) !== null && _Handsontable$validat !== void 0 ? _Handsontable$validat : {};
|
91
91
|
arrayHelpers.arrayEach(getRegisteredValidatorNames(), validatorName => {
|
92
92
|
Handsontable.validators[`${stringHelpers.toUpperCaseFirst(validatorName)}Validator`] = getValidator(validatorName);
|
93
93
|
});
|
@@ -101,7 +101,7 @@ Handsontable.validators.getValidator = getValidator;
|
|
101
101
|
// by the `./config/plugin/babel/add-import-extension` babel plugin. Thus, the distribution
|
102
102
|
// files will be broken. The reason is not known right now (probably it's caused by bug in
|
103
103
|
// the Babel or missing something in the plugin).
|
104
|
-
Handsontable.plugins = (_Handsontable$plugins = Handsontable.plugins)
|
104
|
+
Handsontable.plugins = (_Handsontable$plugins = Handsontable.plugins) !== null && _Handsontable$plugins !== void 0 ? _Handsontable$plugins : {};
|
105
105
|
arrayHelpers.arrayEach(getPluginsNames(), pluginName => {
|
106
106
|
Handsontable.plugins[pluginName] = getPlugin(pluginName);
|
107
107
|
});
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.0.0-next-
|
13
|
+
"version": "0.0.0-next-08765b9-20230714",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
package/pluginHooks.d.ts
CHANGED
@@ -110,8 +110,8 @@ export interface Events {
|
|
110
110
|
afterOnCellCornerDblClick?: (event: MouseEvent) => void;
|
111
111
|
afterOnCellCornerMouseDown?: (event: MouseEvent) => void;
|
112
112
|
afterOnCellMouseDown?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
113
|
-
afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
114
113
|
afterOnCellMouseOut?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
114
|
+
afterOnCellMouseOver?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
115
115
|
afterOnCellMouseUp?: (event: MouseEvent, coords: CellCoords, TD: HTMLTableCellElement) => void;
|
116
116
|
afterPaste?: (data: CellValue[][], coords: RangeType[]) => void;
|
117
117
|
afterPluginsInitialized?: () => void;
|
@@ -128,10 +128,13 @@ export interface Events {
|
|
128
128
|
afterRowSequenceChange?: (source: 'init' | 'move' | 'insert' | 'remove' | 'update') => void;
|
129
129
|
afterScrollHorizontally?: () => void;
|
130
130
|
afterScrollVertically?: () => void;
|
131
|
+
afterScroll?: () => void;
|
132
|
+
afterSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
|
131
133
|
afterSelection?: (row: number, column: number, row2: number, column2: number, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
|
132
134
|
afterSelectionByProp?: (row: number, prop: string, row2: number, prop2: string, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
|
133
135
|
afterSelectionEnd?: (row: number, column: number, row2: number, column2: number, selectionLayerLevel: number) => void;
|
134
136
|
afterSelectionEndByProp?: (row: number, prop: string, row2: number, prop2: string, selectionLayerLevel: number) => void;
|
137
|
+
afterSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
|
135
138
|
afterSetCellMeta?: (row: number, column: number, key: string, value: any) => void;
|
136
139
|
afterSetDataAtCell?: (changes: CellChange[], source?: ChangeSource) => void;
|
137
140
|
afterSetDataAtRowProp?: (changes: CellChange[], source?: ChangeSource) => void;
|
@@ -205,6 +208,8 @@ export interface Events {
|
|
205
208
|
beforeRenderer?: (TD: HTMLTableCellElement, row: number, column: number, prop: string | number, value: CellValue, cellProperties: CellProperties) => void;
|
206
209
|
beforeRowMove?: (movedRows: number[], finalIndex: number, dropIndex: number | undefined, movePossible: boolean) => void;
|
207
210
|
beforeRowResize?: (newSize: number, row: number, isDoubleClick: boolean) => number | void;
|
211
|
+
beforeSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
|
212
|
+
beforeSelectRows?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
|
208
213
|
beforeSetCellMeta?: (row: number, col: number, key: string, value: any) => boolean | void;
|
209
214
|
beforeSetRangeEnd?: (coords: CellCoords) => void;
|
210
215
|
beforeSetRangeStart?: (coords: CellCoords) => void;
|
@@ -232,6 +237,7 @@ export interface Events {
|
|
232
237
|
modifyColWidth?: (width: number, column: number) => void;
|
233
238
|
modifyCopyableRange?: (copyableRanges: RangeType[]) => void;
|
234
239
|
modifyData?: (row: number, column: number, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void;
|
240
|
+
modifyFocusOnTabNavigation?: (tabActivationDir: 'from_above' | 'from_below', visualCoords: CellCoords) => void;
|
235
241
|
modifyGetCellCoords?: (row: number, column: number, topmost: boolean) => void | [number, number] | [number, number, number, number];
|
236
242
|
modifyRowData?: (row: number) => void;
|
237
243
|
modifyRowHeader?: (row: number) => void;
|
package/pluginHooks.js
CHANGED
@@ -554,6 +554,13 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
554
554
|
* @event Hooks#afterScrollVertically
|
555
555
|
*/
|
556
556
|
'afterScrollVertically',
|
557
|
+
/**
|
558
|
+
* Fired after the vertical or horizontal scroll event.
|
559
|
+
*
|
560
|
+
* @since 14.0.0
|
561
|
+
* @event Hooks#afterScroll
|
562
|
+
*/
|
563
|
+
'afterScroll',
|
557
564
|
/**
|
558
565
|
* Fired after one or more cells are selected (e.g. During mouse move).
|
559
566
|
*
|
@@ -657,6 +664,94 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
657
664
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
658
665
|
*/
|
659
666
|
'afterSelectionEndByProp',
|
667
|
+
/**
|
668
|
+
* Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
669
|
+
*
|
670
|
+
* @since 14.0.0
|
671
|
+
* @event Hooks#beforeSelectColumns
|
672
|
+
* @param {CellCoords} from Selection start coords object.
|
673
|
+
* @param {CellCoords} to Selection end coords object.
|
674
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
675
|
+
* @example
|
676
|
+
* ::: only-for javascript
|
677
|
+
* ```js
|
678
|
+
* new Handsontable(element, {
|
679
|
+
* beforeSelectColumns: (from, to, highlight) => {
|
680
|
+
* // Extend the column selection by one column left and one column right.
|
681
|
+
* from.col = Math.max(from.col - 1, 0);
|
682
|
+
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
683
|
+
* }
|
684
|
+
* })
|
685
|
+
* ```
|
686
|
+
* :::
|
687
|
+
*
|
688
|
+
* ::: only-for react
|
689
|
+
* ```jsx
|
690
|
+
* <HotTable
|
691
|
+
* beforeSelectColumns={(from, to, highlight) => {
|
692
|
+
* // Extend the column selection by one column left and one column right.
|
693
|
+
* from.col = Math.max(from.col - 1, 0);
|
694
|
+
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
695
|
+
* }}
|
696
|
+
* />
|
697
|
+
* ```
|
698
|
+
* :::
|
699
|
+
*/
|
700
|
+
'beforeSelectColumns',
|
701
|
+
/**
|
702
|
+
* Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
703
|
+
*
|
704
|
+
* @since 14.0.0
|
705
|
+
* @event Hooks#afterSelectColumns
|
706
|
+
* @param {CellCoords} from Selection start coords object.
|
707
|
+
* @param {CellCoords} to Selection end coords object.
|
708
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
709
|
+
*/
|
710
|
+
'afterSelectColumns',
|
711
|
+
/**
|
712
|
+
* Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
713
|
+
*
|
714
|
+
* @since 14.0.0
|
715
|
+
* @event Hooks#beforeSelectRows
|
716
|
+
* @param {CellCoords} from Selection start coords object.
|
717
|
+
* @param {CellCoords} to Selection end coords object.
|
718
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
719
|
+
* @example
|
720
|
+
* ::: only-for javascript
|
721
|
+
* ```js
|
722
|
+
* new Handsontable(element, {
|
723
|
+
* beforeSelectRows: (from, to, highlight) => {
|
724
|
+
* // Extend the row selection by one row up and one row bottom more.
|
725
|
+
* from.row = Math.max(from.row - 1, 0);
|
726
|
+
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
727
|
+
* }
|
728
|
+
* })
|
729
|
+
* ```
|
730
|
+
* :::
|
731
|
+
*
|
732
|
+
* ::: only-for react
|
733
|
+
* ```jsx
|
734
|
+
* <HotTable
|
735
|
+
* beforeSelectRows={(from, to, highlight) => {
|
736
|
+
* // Extend the row selection by one row up and one row bottom more.
|
737
|
+
* from.row = Math.max(from.row - 1, 0);
|
738
|
+
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
739
|
+
* }}
|
740
|
+
* />
|
741
|
+
* ```
|
742
|
+
* :::
|
743
|
+
*/
|
744
|
+
'beforeSelectRows',
|
745
|
+
/**
|
746
|
+
* Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
747
|
+
*
|
748
|
+
* @since 14.0.0
|
749
|
+
* @event Hooks#afterSelectRows
|
750
|
+
* @param {CellCoords} from Selection start coords object.
|
751
|
+
* @param {CellCoords} to Selection end coords object.
|
752
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
753
|
+
*/
|
754
|
+
'afterSelectRows',
|
660
755
|
/**
|
661
756
|
* Fired after cell meta is changed.
|
662
757
|
*
|
@@ -1225,6 +1320,16 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1225
1320
|
* @returns {undefined|number[]}
|
1226
1321
|
*/
|
1227
1322
|
'modifyGetCellCoords',
|
1323
|
+
/**
|
1324
|
+
* Used to modify the cell coordinates when the table is activated (going into the listen mode).
|
1325
|
+
*
|
1326
|
+
* @event Hooks#modifyFocusOnTabNavigation
|
1327
|
+
* @since 14.0.0
|
1328
|
+
* @param {'from_above' | 'from_below'} tabActivationDir The browsers Tab navigation direction. Depending on
|
1329
|
+
* whether the user activated the table from the element above or below, another cell can be selected.
|
1330
|
+
* @param {CellCoords} visualCoords The coords that will be used to select a cell.
|
1331
|
+
*/
|
1332
|
+
'modifyFocusOnTabNavigation',
|
1228
1333
|
/**
|
1229
1334
|
* Allows modify the visual row index that is used to retrieve the row header element (TH) before it's
|
1230
1335
|
* highlighted (proper CSS class names are added). Modifying the visual row index allows building a custom
|
@@ -2382,7 +2487,7 @@ const REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], [
|
|
2382
2487
|
* @type {Map<string, string>}
|
2383
2488
|
*/
|
2384
2489
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
2385
|
-
const DEPRECATED_HOOKS = new Map([]);
|
2490
|
+
const DEPRECATED_HOOKS = new Map([['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
|
2386
2491
|
class Hooks {
|
2387
2492
|
static getSingleton() {
|
2388
2493
|
return getGlobalSingleton();
|
package/pluginHooks.mjs
CHANGED
@@ -552,6 +552,13 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
552
552
|
* @event Hooks#afterScrollVertically
|
553
553
|
*/
|
554
554
|
'afterScrollVertically',
|
555
|
+
/**
|
556
|
+
* Fired after the vertical or horizontal scroll event.
|
557
|
+
*
|
558
|
+
* @since 14.0.0
|
559
|
+
* @event Hooks#afterScroll
|
560
|
+
*/
|
561
|
+
'afterScroll',
|
555
562
|
/**
|
556
563
|
* Fired after one or more cells are selected (e.g. During mouse move).
|
557
564
|
*
|
@@ -655,6 +662,94 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
655
662
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
656
663
|
*/
|
657
664
|
'afterSelectionEndByProp',
|
665
|
+
/**
|
666
|
+
* Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
667
|
+
*
|
668
|
+
* @since 14.0.0
|
669
|
+
* @event Hooks#beforeSelectColumns
|
670
|
+
* @param {CellCoords} from Selection start coords object.
|
671
|
+
* @param {CellCoords} to Selection end coords object.
|
672
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
673
|
+
* @example
|
674
|
+
* ::: only-for javascript
|
675
|
+
* ```js
|
676
|
+
* new Handsontable(element, {
|
677
|
+
* beforeSelectColumns: (from, to, highlight) => {
|
678
|
+
* // Extend the column selection by one column left and one column right.
|
679
|
+
* from.col = Math.max(from.col - 1, 0);
|
680
|
+
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
681
|
+
* }
|
682
|
+
* })
|
683
|
+
* ```
|
684
|
+
* :::
|
685
|
+
*
|
686
|
+
* ::: only-for react
|
687
|
+
* ```jsx
|
688
|
+
* <HotTable
|
689
|
+
* beforeSelectColumns={(from, to, highlight) => {
|
690
|
+
* // Extend the column selection by one column left and one column right.
|
691
|
+
* from.col = Math.max(from.col - 1, 0);
|
692
|
+
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
693
|
+
* }}
|
694
|
+
* />
|
695
|
+
* ```
|
696
|
+
* :::
|
697
|
+
*/
|
698
|
+
'beforeSelectColumns',
|
699
|
+
/**
|
700
|
+
* Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
701
|
+
*
|
702
|
+
* @since 14.0.0
|
703
|
+
* @event Hooks#afterSelectColumns
|
704
|
+
* @param {CellCoords} from Selection start coords object.
|
705
|
+
* @param {CellCoords} to Selection end coords object.
|
706
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
707
|
+
*/
|
708
|
+
'afterSelectColumns',
|
709
|
+
/**
|
710
|
+
* Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
711
|
+
*
|
712
|
+
* @since 14.0.0
|
713
|
+
* @event Hooks#beforeSelectRows
|
714
|
+
* @param {CellCoords} from Selection start coords object.
|
715
|
+
* @param {CellCoords} to Selection end coords object.
|
716
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
717
|
+
* @example
|
718
|
+
* ::: only-for javascript
|
719
|
+
* ```js
|
720
|
+
* new Handsontable(element, {
|
721
|
+
* beforeSelectRows: (from, to, highlight) => {
|
722
|
+
* // Extend the row selection by one row up and one row bottom more.
|
723
|
+
* from.row = Math.max(from.row - 1, 0);
|
724
|
+
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
725
|
+
* }
|
726
|
+
* })
|
727
|
+
* ```
|
728
|
+
* :::
|
729
|
+
*
|
730
|
+
* ::: only-for react
|
731
|
+
* ```jsx
|
732
|
+
* <HotTable
|
733
|
+
* beforeSelectRows={(from, to, highlight) => {
|
734
|
+
* // Extend the row selection by one row up and one row bottom more.
|
735
|
+
* from.row = Math.max(from.row - 1, 0);
|
736
|
+
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
737
|
+
* }}
|
738
|
+
* />
|
739
|
+
* ```
|
740
|
+
* :::
|
741
|
+
*/
|
742
|
+
'beforeSelectRows',
|
743
|
+
/**
|
744
|
+
* Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
745
|
+
*
|
746
|
+
* @since 14.0.0
|
747
|
+
* @event Hooks#afterSelectRows
|
748
|
+
* @param {CellCoords} from Selection start coords object.
|
749
|
+
* @param {CellCoords} to Selection end coords object.
|
750
|
+
* @param {CellCoords} highlight Selection cell focus coords object.
|
751
|
+
*/
|
752
|
+
'afterSelectRows',
|
658
753
|
/**
|
659
754
|
* Fired after cell meta is changed.
|
660
755
|
*
|
@@ -1223,6 +1318,16 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1223
1318
|
* @returns {undefined|number[]}
|
1224
1319
|
*/
|
1225
1320
|
'modifyGetCellCoords',
|
1321
|
+
/**
|
1322
|
+
* Used to modify the cell coordinates when the table is activated (going into the listen mode).
|
1323
|
+
*
|
1324
|
+
* @event Hooks#modifyFocusOnTabNavigation
|
1325
|
+
* @since 14.0.0
|
1326
|
+
* @param {'from_above' | 'from_below'} tabActivationDir The browsers Tab navigation direction. Depending on
|
1327
|
+
* whether the user activated the table from the element above or below, another cell can be selected.
|
1328
|
+
* @param {CellCoords} visualCoords The coords that will be used to select a cell.
|
1329
|
+
*/
|
1330
|
+
'modifyFocusOnTabNavigation',
|
1226
1331
|
/**
|
1227
1332
|
* Allows modify the visual row index that is used to retrieve the row header element (TH) before it's
|
1228
1333
|
* highlighted (proper CSS class names are added). Modifying the visual row index allows building a custom
|
@@ -2380,7 +2485,7 @@ const REMOVED_HOOKS = new Map([['modifyRow', '8.0.0'], ['modifyCol', '8.0.0'], [
|
|
2380
2485
|
* @type {Map<string, string>}
|
2381
2486
|
*/
|
2382
2487
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
2383
|
-
const DEPRECATED_HOOKS = new Map([]);
|
2488
|
+
const DEPRECATED_HOOKS = new Map([['beforeRemoveCellClassNames', 'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);
|
2384
2489
|
class Hooks {
|
2385
2490
|
static getSingleton() {
|
2386
2491
|
return getGlobalSingleton();
|
@@ -650,7 +650,10 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
650
650
|
* @param {Array} changes An array of modified data.
|
651
651
|
*/
|
652
652
|
onAfterFormulasValuesUpdate(changes) {
|
653
|
-
const filteredChanges = (0, _array.arrayFilter)(changes, change =>
|
653
|
+
const filteredChanges = (0, _array.arrayFilter)(changes, change => {
|
654
|
+
var _change$address;
|
655
|
+
return (0, _mixed.isDefined)((_change$address = change.address) === null || _change$address === void 0 ? void 0 : _change$address.col);
|
656
|
+
});
|
654
657
|
const changedColumns = (0, _array.arrayMap)(filteredChanges, change => change.address.col);
|
655
658
|
this.clearCache(Array.from(new Set(changedColumns)));
|
656
659
|
}
|
@@ -644,7 +644,10 @@ export class AutoColumnSize extends BasePlugin {
|
|
644
644
|
* @param {Array} changes An array of modified data.
|
645
645
|
*/
|
646
646
|
onAfterFormulasValuesUpdate(changes) {
|
647
|
-
const filteredChanges = arrayFilter(changes, change =>
|
647
|
+
const filteredChanges = arrayFilter(changes, change => {
|
648
|
+
var _change$address;
|
649
|
+
return isDefined((_change$address = change.address) === null || _change$address === void 0 ? void 0 : _change$address.col);
|
650
|
+
});
|
648
651
|
const changedColumns = arrayMap(filteredChanges, change => change.address.col);
|
649
652
|
this.clearCache(Array.from(new Set(changedColumns)));
|
650
653
|
}
|