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
@@ -0,0 +1,73 @@
|
|
1
|
+
import "core-js/modules/es.error.cause.js";
|
2
|
+
import { BaseTransformation } from "./_base.mjs";
|
3
|
+
/**
|
4
|
+
* The FocusTransformation class implements algorithms for transforming coordinates while the
|
5
|
+
* focus is being moved. The currently selection layer range defines the bounds for the focus movement.
|
6
|
+
*
|
7
|
+
* @class FocusTransformation
|
8
|
+
* @private
|
9
|
+
*/
|
10
|
+
export class FocusTransformation extends BaseTransformation {
|
11
|
+
/**
|
12
|
+
* Calculates offset coordinates for focus selection based on the current selection state.
|
13
|
+
* For header focus selection, calculates offset including headers.
|
14
|
+
* For cell focus selection, calculates offset only for selected cells.
|
15
|
+
*
|
16
|
+
* @returns {{x: number, y: number}}
|
17
|
+
*/
|
18
|
+
calculateOffset() {
|
19
|
+
const range = this.getCurrentSelection();
|
20
|
+
const {
|
21
|
+
row,
|
22
|
+
col
|
23
|
+
} = range.getOuterTopStartCorner();
|
24
|
+
const columnsInRange = this.tableApi.countRenderableColumnsInRange(0, col - 1);
|
25
|
+
const rowsInRange = this.tableApi.countRenderableRowsInRange(0, row - 1);
|
26
|
+
const isHeaderSelection = range.highlight.isHeader();
|
27
|
+
const headerX = isHeaderSelection ? Math.abs(col) : 0;
|
28
|
+
const headerY = isHeaderSelection ? Math.abs(row) : 0;
|
29
|
+
return {
|
30
|
+
x: col < 0 ? headerX : -columnsInRange,
|
31
|
+
y: row < 0 ? headerY : -rowsInRange
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Gets the count of renderable rows for focus transformation.
|
37
|
+
* Focus transformation operates on the current selection range.
|
38
|
+
*
|
39
|
+
* @returns {number}
|
40
|
+
*/
|
41
|
+
countRenderableRows() {
|
42
|
+
const range = this.getCurrentSelection();
|
43
|
+
return this.tableApi.countRenderableRowsInRange(0, range.getOuterBottomEndCorner().row);
|
44
|
+
}
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Gets the count of renderable columns for focus transformation.
|
48
|
+
* Focus transformation operates on the current selection range.
|
49
|
+
*
|
50
|
+
* @returns {number}
|
51
|
+
*/
|
52
|
+
countRenderableColumns() {
|
53
|
+
const range = this.getCurrentSelection();
|
54
|
+
return this.tableApi.countRenderableColumnsInRange(0, range.getOuterBottomEndCorner().col);
|
55
|
+
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Throws an error because focus transformation doesn't support `transformEnd`.
|
59
|
+
*/
|
60
|
+
transformEnd() {
|
61
|
+
throw new Error('`transformEnd` is not valid for focus selection use `transformStart` instead');
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Changes the behavior of the transformation logic by switching the selection layer
|
66
|
+
* when the selection is out of range.
|
67
|
+
*
|
68
|
+
* @returns {boolean}
|
69
|
+
*/
|
70
|
+
shouldSwitchSelectionLayer() {
|
71
|
+
return true;
|
72
|
+
}
|
73
|
+
}
|
package/selection/utils.js
CHANGED
@@ -118,9 +118,10 @@ function normalizeSelectionFactory(type) {
|
|
118
118
|
rowEnd = Math.max(origRowStart, origRowEnd);
|
119
119
|
columnEnd = Math.max(origColumnStart, origColumnEnd);
|
120
120
|
}
|
121
|
+
const highlight = isObjectType ? selection.highlight.clone() : createCellCoords(rowStart, columnStart);
|
121
122
|
const from = createCellCoords(rowStart, columnStart);
|
122
123
|
const to = createCellCoords(rowEnd, columnEnd);
|
123
|
-
return createCellRange(
|
124
|
+
return createCellRange(highlight, from, to);
|
124
125
|
};
|
125
126
|
}
|
126
127
|
|
package/selection/utils.mjs
CHANGED
@@ -111,9 +111,10 @@ export function normalizeSelectionFactory(type) {
|
|
111
111
|
rowEnd = Math.max(origRowStart, origRowEnd);
|
112
112
|
columnEnd = Math.max(origColumnStart, origColumnEnd);
|
113
113
|
}
|
114
|
+
const highlight = isObjectType ? selection.highlight.clone() : createCellCoords(rowStart, columnStart);
|
114
115
|
const from = createCellCoords(rowStart, columnStart);
|
115
116
|
const to = createCellCoords(rowEnd, columnEnd);
|
116
|
-
return createCellRange(
|
117
|
+
return createCellRange(highlight, from, to);
|
117
118
|
};
|
118
119
|
}
|
119
120
|
|
package/settings.d.ts
CHANGED
@@ -37,9 +37,12 @@ import { Settings as MergeCellsSettings } from './plugins/mergeCells';
|
|
37
37
|
import { Settings as MultiColumnSortingSettings } from './plugins/multiColumnSorting';
|
38
38
|
import { Settings as NestedHeadersSettings } from './plugins/nestedHeaders';
|
39
39
|
import { Settings as NestedRowsSettings } from './plugins/nestedRows';
|
40
|
+
import { Settings as PaginationSettings } from './plugins/pagination';
|
40
41
|
import { Settings as PersistentStateSettings } from './plugins/persistentState';
|
41
42
|
import { Settings as SearchSettings } from './plugins/search';
|
42
43
|
import { Settings as TrimRowsSettings } from './plugins/trimRows';
|
44
|
+
import { Settings as DialogSettings } from './plugins/dialog';
|
45
|
+
import { Settings as LoadingSettings } from './plugins/loading';
|
43
46
|
import { Settings as UndoRedoSettings } from './plugins/undoRedo';
|
44
47
|
import { EditorType, BaseEditor } from './editors';
|
45
48
|
import { RendererType } from './renderers';
|
@@ -159,6 +162,7 @@ export interface GridSettings extends Events {
|
|
159
162
|
height?: number | string | (() => number | string);
|
160
163
|
hiddenColumns?: HiddenColumnsSettings;
|
161
164
|
hiddenRows?: HiddenRowsSettings;
|
165
|
+
initialState?: Partial<GridSettings>;
|
162
166
|
invalidCellClassName?: string;
|
163
167
|
imeFastEdit?: boolean;
|
164
168
|
isEmptyCol?: (this: Core, column: number) => boolean;
|
@@ -188,6 +192,7 @@ export interface GridSettings extends Events {
|
|
188
192
|
numericFormat?: NumericFormatOptions;
|
189
193
|
observeDOMVisibility?: boolean;
|
190
194
|
outsideClickDeselects?: boolean | ((target: HTMLElement) => boolean);
|
195
|
+
pagination?: PaginationSettings;
|
191
196
|
persistentState?: PersistentStateSettings;
|
192
197
|
placeholder?: string;
|
193
198
|
placeholderCellClassName?: string;
|
@@ -207,7 +212,7 @@ export interface GridSettings extends Events {
|
|
207
212
|
skipColumnOnPaste?: boolean;
|
208
213
|
skipRowOnPaste?: boolean;
|
209
214
|
sortByRelevance?: boolean;
|
210
|
-
source?: string[] | number[] | ((this: CellProperties, query: string, callback: (items: string[]) => void) => void);
|
215
|
+
source?: string[] | number[] | { key: any, value: any }[] | ((this: CellProperties, query: string, callback: (items: string[]) => void) => void);
|
211
216
|
startCols?: number;
|
212
217
|
startRows?: number;
|
213
218
|
stretchH?: 'none' | 'all' | 'last';
|
@@ -222,8 +227,12 @@ export interface GridSettings extends Events {
|
|
222
227
|
trimWhitespace?: boolean;
|
223
228
|
type?: CellType | string;
|
224
229
|
uncheckedTemplate?: boolean | string | number;
|
230
|
+
dialog?: DialogSettings;
|
231
|
+
loading?: LoadingSettings;
|
225
232
|
undo?: UndoRedoSettings;
|
226
233
|
validator?: BaseValidator | RegExp | ValidatorType | string;
|
234
|
+
valueGetter?: (this: Core, value: CellValue, row: number, column: number, cellProperties: CellProperties) => CellValue;
|
235
|
+
valueSetter?: (this: Core, value: CellValue, row: number, column: number, cellProperties: CellProperties) => CellValue;
|
227
236
|
viewportColumnRenderingOffset?: number | 'auto';
|
228
237
|
viewportRowRenderingOffset?: number | 'auto';
|
229
238
|
viewportColumnRenderingThreshold?: number | 'auto';
|
@@ -1,24 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
5
|
+
require("core-js/modules/esnext.iterator.some.js");
|
4
6
|
var _event = require("../../../helpers/dom/event");
|
5
7
|
const command = exports.command = {
|
6
8
|
name: 'editorOpen',
|
7
9
|
callback(hot, event, keys) {
|
10
|
+
const {
|
11
|
+
selection
|
12
|
+
} = hot;
|
8
13
|
const editorManager = hot._getEditorManager();
|
9
|
-
const
|
14
|
+
const selectedRanges = hot.getSelectedRange();
|
15
|
+
const selectedRange = hot.getSelectedRangeActive();
|
10
16
|
const {
|
11
17
|
highlight
|
12
18
|
} = selectedRange;
|
13
19
|
|
14
20
|
// supports for navigating with enter key when multiple cells are selected
|
15
|
-
if (
|
21
|
+
if ((selectedRanges.some(range => selection.isMultiple(range)) || selectedRanges.length > 1) && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
16
22
|
const settings = hot.getSettings();
|
17
23
|
const enterMoves = typeof settings.enterMoves === 'function' ? settings.enterMoves(event) : settings.enterMoves;
|
18
24
|
if (keys.includes('shift')) {
|
19
|
-
|
25
|
+
selection.transformFocus(-enterMoves.row, -enterMoves.col);
|
20
26
|
} else {
|
21
|
-
|
27
|
+
selection.transformFocus(enterMoves.row, enterMoves.col);
|
22
28
|
}
|
23
29
|
return;
|
24
30
|
}
|
@@ -1,21 +1,27 @@
|
|
1
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
2
|
+
import "core-js/modules/esnext.iterator.some.js";
|
1
3
|
import { stopImmediatePropagation } from "../../../helpers/dom/event.mjs";
|
2
4
|
export const command = {
|
3
5
|
name: 'editorOpen',
|
4
6
|
callback(hot, event, keys) {
|
7
|
+
const {
|
8
|
+
selection
|
9
|
+
} = hot;
|
5
10
|
const editorManager = hot._getEditorManager();
|
6
|
-
const
|
11
|
+
const selectedRanges = hot.getSelectedRange();
|
12
|
+
const selectedRange = hot.getSelectedRangeActive();
|
7
13
|
const {
|
8
14
|
highlight
|
9
15
|
} = selectedRange;
|
10
16
|
|
11
17
|
// supports for navigating with enter key when multiple cells are selected
|
12
|
-
if (
|
18
|
+
if ((selectedRanges.some(range => selection.isMultiple(range)) || selectedRanges.length > 1) && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
13
19
|
const settings = hot.getSettings();
|
14
20
|
const enterMoves = typeof settings.enterMoves === 'function' ? settings.enterMoves(event) : settings.enterMoves;
|
15
21
|
if (keys.includes('shift')) {
|
16
|
-
|
22
|
+
selection.transformFocus(-enterMoves.row, -enterMoves.col);
|
17
23
|
} else {
|
18
|
-
|
24
|
+
selection.transformFocus(enterMoves.row, enterMoves.col);
|
19
25
|
}
|
20
26
|
return;
|
21
27
|
}
|
@@ -9,7 +9,7 @@ const command = exports.command = {
|
|
9
9
|
} = hot;
|
10
10
|
const {
|
11
11
|
highlight
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
if (!selection.isSelectedByColumnHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByRowHeader())) {
|
14
14
|
selection.markSource('keyboard');
|
15
15
|
selection.transformEnd(1, 0);
|
@@ -6,7 +6,7 @@ export const command = {
|
|
6
6
|
} = hot;
|
7
7
|
const {
|
8
8
|
highlight
|
9
|
-
} = hot.
|
9
|
+
} = hot.getSelectedRangeActive();
|
10
10
|
if (!selection.isSelectedByColumnHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByRowHeader())) {
|
11
11
|
selection.markSource('keyboard');
|
12
12
|
selection.transformEnd(1, 0);
|
@@ -10,7 +10,7 @@ const command = exports.command = {
|
|
10
10
|
} = hot;
|
11
11
|
const {
|
12
12
|
to
|
13
|
-
} = hot.
|
13
|
+
} = hot.getSelectedRangeActive();
|
14
14
|
const nextRowIndexToSelect = Math.min(to.row + hot.countVisibleRows(), hot.countRows() - 1);
|
15
15
|
const row = rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
|
16
16
|
if (row !== null) {
|
@@ -18,7 +18,7 @@ const command = exports.command = {
|
|
18
18
|
const scrollPadding = to.row - hot.getFirstFullyVisibleRow();
|
19
19
|
const nextVerticalScroll = Math.min(coords.row - scrollPadding, hot.countRows() - 1);
|
20
20
|
selection.markSource('keyboard');
|
21
|
-
selection.setRangeEnd(coords);
|
21
|
+
selection.setRangeEnd(coords, hot.getActiveSelectionLayerIndex());
|
22
22
|
selection.markEndSource();
|
23
23
|
hot.scrollViewportTo({
|
24
24
|
row: nextVerticalScroll,
|
@@ -7,7 +7,7 @@ export const command = {
|
|
7
7
|
} = hot;
|
8
8
|
const {
|
9
9
|
to
|
10
|
-
} = hot.
|
10
|
+
} = hot.getSelectedRangeActive();
|
11
11
|
const nextRowIndexToSelect = Math.min(to.row + hot.countVisibleRows(), hot.countRows() - 1);
|
12
12
|
const row = rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
|
13
13
|
if (row !== null) {
|
@@ -15,7 +15,7 @@ export const command = {
|
|
15
15
|
const scrollPadding = to.row - hot.getFirstFullyVisibleRow();
|
16
16
|
const nextVerticalScroll = Math.min(coords.row - scrollPadding, hot.countRows() - 1);
|
17
17
|
selection.markSource('keyboard');
|
18
|
-
selection.setRangeEnd(coords);
|
18
|
+
selection.setRangeEnd(coords, hot.getActiveSelectionLayerIndex());
|
19
19
|
selection.markEndSource();
|
20
20
|
hot.scrollViewportTo({
|
21
21
|
row: nextVerticalScroll,
|
@@ -9,7 +9,7 @@ const command = exports.command = {
|
|
9
9
|
} = hot;
|
10
10
|
const {
|
11
11
|
highlight
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByColumnHeader())) {
|
14
14
|
selection.markSource('keyboard');
|
15
15
|
selection.transformEnd(0, -1 * hot.getDirectionFactor());
|
@@ -6,7 +6,7 @@ export const command = {
|
|
6
6
|
} = hot;
|
7
7
|
const {
|
8
8
|
highlight
|
9
|
-
} = hot.
|
9
|
+
} = hot.getSelectedRangeActive();
|
10
10
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByColumnHeader())) {
|
11
11
|
selection.markSource('keyboard');
|
12
12
|
selection.transformEnd(0, -1 * hot.getDirectionFactor());
|
@@ -9,7 +9,7 @@ const command = exports.command = {
|
|
9
9
|
} = hot;
|
10
10
|
const {
|
11
11
|
highlight
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByColumnHeader())) {
|
14
14
|
selection.markSource('keyboard');
|
15
15
|
selection.transformEnd(0, hot.getDirectionFactor());
|
@@ -6,7 +6,7 @@ export const command = {
|
|
6
6
|
} = hot;
|
7
7
|
const {
|
8
8
|
highlight
|
9
|
-
} = hot.
|
9
|
+
} = hot.getSelectedRangeActive();
|
10
10
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByColumnHeader())) {
|
11
11
|
selection.markSource('keyboard');
|
12
12
|
selection.transformEnd(0, hot.getDirectionFactor());
|
@@ -12,7 +12,7 @@ const command = exports.command = {
|
|
12
12
|
highlight,
|
13
13
|
from,
|
14
14
|
to
|
15
|
-
} = hot.
|
15
|
+
} = hot.getSelectedRangeActive();
|
16
16
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const row = rowIndexMapper.getNearestNotHiddenIndex(hot.countRows() - 1, -1);
|
@@ -9,7 +9,7 @@ export const command = {
|
|
9
9
|
highlight,
|
10
10
|
from,
|
11
11
|
to
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const row = rowIndexMapper.getNearestNotHiddenIndex(hot.countRows() - 1, -1);
|
@@ -12,7 +12,7 @@ const command = exports.command = {
|
|
12
12
|
highlight,
|
13
13
|
from,
|
14
14
|
to
|
15
|
-
} = hot.
|
15
|
+
} = hot.getSelectedRangeActive();
|
16
16
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
17
17
|
const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
|
18
18
|
const newFrom = from.clone();
|
@@ -9,7 +9,7 @@ export const command = {
|
|
9
9
|
highlight,
|
10
10
|
from,
|
11
11
|
to
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
14
14
|
const column = columnIndexMapper.getNearestNotHiddenIndex(hot.countCols() - 1, -1);
|
15
15
|
const newFrom = from.clone();
|
@@ -12,7 +12,7 @@ const command = exports.command = {
|
|
12
12
|
highlight,
|
13
13
|
from,
|
14
14
|
to
|
15
|
-
} = hot.
|
15
|
+
} = hot.getSelectedRangeActive();
|
16
16
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
17
17
|
const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
|
18
18
|
const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
@@ -9,7 +9,7 @@ export const command = {
|
|
9
9
|
highlight,
|
10
10
|
from,
|
11
11
|
to
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
if (!selection.isSelectedByRowHeader() && !selection.isSelectedByCorner() && highlight.isCell()) {
|
14
14
|
const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
|
15
15
|
const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
@@ -12,7 +12,7 @@ const command = exports.command = {
|
|
12
12
|
highlight,
|
13
13
|
from,
|
14
14
|
to
|
15
|
-
} = hot.
|
15
|
+
} = hot.getSelectedRangeActive();
|
16
16
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1]));
|
@@ -9,7 +9,7 @@ export const command = {
|
|
9
9
|
highlight,
|
10
10
|
from,
|
11
11
|
to
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1]));
|
@@ -12,7 +12,7 @@ const command = exports.command = {
|
|
12
12
|
highlight,
|
13
13
|
from,
|
14
14
|
to
|
15
|
-
} = hot.
|
15
|
+
} = hot.getSelectedRangeActive();
|
16
16
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [0, 1] : [hot.countCols() - 1, -1]));
|
@@ -9,7 +9,7 @@ export const command = {
|
|
9
9
|
highlight,
|
10
10
|
from,
|
11
11
|
to
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByColumnHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [0, 1] : [hot.countCols() - 1, -1]));
|
@@ -12,7 +12,7 @@ const command = exports.command = {
|
|
12
12
|
highlight,
|
13
13
|
from,
|
14
14
|
to
|
15
|
-
} = hot.
|
15
|
+
} = hot.getSelectedRangeActive();
|
16
16
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
17
17
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
18
18
|
const row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
|
@@ -9,7 +9,7 @@ export const command = {
|
|
9
9
|
highlight,
|
10
10
|
from,
|
11
11
|
to
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
const isFocusHighlightedByHeader = highlight.isHeader() && selection.isSelectedByRowHeader();
|
14
14
|
if (highlight.isCell() || isFocusHighlightedByHeader) {
|
15
15
|
const row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
|
@@ -9,7 +9,7 @@ const command = exports.command = {
|
|
9
9
|
} = hot;
|
10
10
|
const {
|
11
11
|
highlight
|
12
|
-
} = hot.
|
12
|
+
} = hot.getSelectedRangeActive();
|
13
13
|
if (!selection.isSelectedByColumnHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByRowHeader())) {
|
14
14
|
selection.markSource('keyboard');
|
15
15
|
selection.transformEnd(-1, 0);
|
@@ -6,7 +6,7 @@ export const command = {
|
|
6
6
|
} = hot;
|
7
7
|
const {
|
8
8
|
highlight
|
9
|
-
} = hot.
|
9
|
+
} = hot.getSelectedRangeActive();
|
10
10
|
if (!selection.isSelectedByColumnHeader() && !selection.isSelectedByCorner() && (highlight.isCell() || highlight.isHeader() && selection.isSelectedByRowHeader())) {
|
11
11
|
selection.markSource('keyboard');
|
12
12
|
selection.transformEnd(-1, 0);
|
@@ -10,7 +10,7 @@ const command = exports.command = {
|
|
10
10
|
} = hot;
|
11
11
|
const {
|
12
12
|
to
|
13
|
-
} = hot.
|
13
|
+
} = hot.getSelectedRangeActive();
|
14
14
|
const nextRowIndexToSelect = Math.max(to.row - hot.countVisibleRows(), 0);
|
15
15
|
const row = rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
|
16
16
|
if (row !== null) {
|
@@ -18,7 +18,7 @@ const command = exports.command = {
|
|
18
18
|
const scrollPadding = to.row - hot.getFirstFullyVisibleRow();
|
19
19
|
const nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
|
20
20
|
selection.markSource('keyboard');
|
21
|
-
selection.setRangeEnd(coords);
|
21
|
+
selection.setRangeEnd(coords, hot.getActiveSelectionLayerIndex());
|
22
22
|
selection.markEndSource();
|
23
23
|
hot.scrollViewportTo({
|
24
24
|
row: nextVerticalScroll,
|
@@ -7,7 +7,7 @@ export const command = {
|
|
7
7
|
} = hot;
|
8
8
|
const {
|
9
9
|
to
|
10
|
-
} = hot.
|
10
|
+
} = hot.getSelectedRangeActive();
|
11
11
|
const nextRowIndexToSelect = Math.max(to.row - hot.countVisibleRows(), 0);
|
12
12
|
const row = rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
|
13
13
|
if (row !== null) {
|
@@ -15,7 +15,7 @@ export const command = {
|
|
15
15
|
const scrollPadding = to.row - hot.getFirstFullyVisibleRow();
|
16
16
|
const nextVerticalScroll = Math.max(coords.row - scrollPadding, 0);
|
17
17
|
selection.markSource('keyboard');
|
18
|
-
selection.setRangeEnd(coords);
|
18
|
+
selection.setRangeEnd(coords, hot.getActiveSelectionLayerIndex());
|
19
19
|
selection.markEndSource();
|
20
20
|
hot.scrollViewportTo({
|
21
21
|
row: nextVerticalScroll,
|
@@ -13,7 +13,7 @@ const command = exports.command = {
|
|
13
13
|
const columnHeadersCount = navigableHeaders ? hot.countColHeaders() : 0;
|
14
14
|
const {
|
15
15
|
row
|
16
|
-
} = hot.
|
16
|
+
} = hot.getSelectedRangeActive().highlight;
|
17
17
|
let rowsStep = hot.countVisibleRows() + columnHeadersCount;
|
18
18
|
rowsStep = rowsStep === 0 ? 1 : rowsStep;
|
19
19
|
|
@@ -29,7 +29,7 @@ const command = exports.command = {
|
|
29
29
|
selection.markSource('keyboard');
|
30
30
|
selection.transformStart(rowsStep, 0);
|
31
31
|
selection.markEndSource();
|
32
|
-
if (hot.
|
32
|
+
if (hot.getSelectedRangeActive().highlight.row < 0) {
|
33
33
|
hot.scrollViewportTo({
|
34
34
|
row: 0
|
35
35
|
});
|
@@ -10,7 +10,7 @@ export const command = {
|
|
10
10
|
const columnHeadersCount = navigableHeaders ? hot.countColHeaders() : 0;
|
11
11
|
const {
|
12
12
|
row
|
13
|
-
} = hot.
|
13
|
+
} = hot.getSelectedRangeActive().highlight;
|
14
14
|
let rowsStep = hot.countVisibleRows() + columnHeadersCount;
|
15
15
|
rowsStep = rowsStep === 0 ? 1 : rowsStep;
|
16
16
|
|
@@ -26,7 +26,7 @@ export const command = {
|
|
26
26
|
selection.markSource('keyboard');
|
27
27
|
selection.transformStart(rowsStep, 0);
|
28
28
|
selection.markEndSource();
|
29
|
-
if (hot.
|
29
|
+
if (hot.getSelectedRangeActive().highlight.row < 0) {
|
30
30
|
hot.scrollViewportTo({
|
31
31
|
row: 0
|
32
32
|
});
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
5
|
+
require("core-js/modules/esnext.iterator.some.js");
|
4
6
|
const command = exports.command = {
|
5
7
|
name: 'moveCellSelectionInlineEnd',
|
6
8
|
callback(hot, event) {
|
@@ -8,10 +10,11 @@ const command = exports.command = {
|
|
8
10
|
selection
|
9
11
|
} = hot;
|
10
12
|
const settings = hot.getSettings();
|
11
|
-
const
|
13
|
+
const selectedRanges = hot.getSelectedRange();
|
14
|
+
const selectedRange = hot.getSelectedRangeActive();
|
12
15
|
const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
|
13
16
|
selection.markSource('keyboard');
|
14
|
-
if (selection.isMultiple() && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
17
|
+
if ((selectedRanges.some(range => selection.isMultiple(range)) || selectedRanges.length > 1) && !selectedRange.isHeader() && hot.countRenderedCols() > 0 && hot.countRenderedRows() > 0) {
|
15
18
|
selection.transformFocus(-tabMoves.row, -tabMoves.col);
|
16
19
|
} else {
|
17
20
|
selection.transformStart(-tabMoves.row, -tabMoves.col);
|