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
@@ -138,6 +138,7 @@ class ContextMenu extends _base.BasePlugin {
|
|
138
138
|
return _this.executeCommand.call(_this, ...params);
|
139
139
|
});
|
140
140
|
this.addHook('afterOnCellContextMenu', event => _assertClassBrand(_ContextMenu_brand, this, _onAfterOnCellContextMenu).call(this, event));
|
141
|
+
this.addHook('beforeDialogShow', () => this.close());
|
141
142
|
this.registerShortcuts();
|
142
143
|
super.enablePlugin();
|
143
144
|
}
|
@@ -178,7 +179,7 @@ class ContextMenu extends _base.BasePlugin {
|
|
178
179
|
callback: () => {
|
179
180
|
const {
|
180
181
|
highlight
|
181
|
-
} = this.hot.
|
182
|
+
} = this.hot.getSelectedRangeActive();
|
182
183
|
this.hot.scrollToFocusedCell();
|
183
184
|
const rect = this.hot.getCell(highlight.row, highlight.col, true).getBoundingClientRect();
|
184
185
|
const offset = (0, _utils.getDocumentOffsetByElement)(this.menu.container, this.hot.rootDocument);
|
@@ -195,7 +196,7 @@ class ContextMenu extends _base.BasePlugin {
|
|
195
196
|
},
|
196
197
|
runOnlyIf: () => {
|
197
198
|
var _this$hot$getSelected;
|
198
|
-
const highlight = (_this$hot$getSelected = this.hot.
|
199
|
+
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeActive()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
199
200
|
return highlight && this.hot.selection.isCellVisible(highlight) && !this.menu.isOpened();
|
200
201
|
},
|
201
202
|
group: SHORTCUTS_GROUP
|
@@ -236,10 +237,8 @@ class ContextMenu extends _base.BasePlugin {
|
|
236
237
|
}
|
237
238
|
this.prepareMenuItems();
|
238
239
|
this.menu.open();
|
239
|
-
const themeHasTableBorder = this.menu.tableBorderWidth > 0;
|
240
240
|
(0, _object.objectEach)(offset, (value, key) => {
|
241
|
-
|
242
|
-
this.menu.setOffset(key, themeHasTableBorder ? value : valueWithoutBorder);
|
241
|
+
this.menu.setOffset(key, value);
|
243
242
|
});
|
244
243
|
this.menu.setPosition(position);
|
245
244
|
}
|
@@ -135,6 +135,7 @@ export class ContextMenu extends BasePlugin {
|
|
135
135
|
return _this.executeCommand.call(_this, ...params);
|
136
136
|
});
|
137
137
|
this.addHook('afterOnCellContextMenu', event => _assertClassBrand(_ContextMenu_brand, this, _onAfterOnCellContextMenu).call(this, event));
|
138
|
+
this.addHook('beforeDialogShow', () => this.close());
|
138
139
|
this.registerShortcuts();
|
139
140
|
super.enablePlugin();
|
140
141
|
}
|
@@ -175,7 +176,7 @@ export class ContextMenu extends BasePlugin {
|
|
175
176
|
callback: () => {
|
176
177
|
const {
|
177
178
|
highlight
|
178
|
-
} = this.hot.
|
179
|
+
} = this.hot.getSelectedRangeActive();
|
179
180
|
this.hot.scrollToFocusedCell();
|
180
181
|
const rect = this.hot.getCell(highlight.row, highlight.col, true).getBoundingClientRect();
|
181
182
|
const offset = getDocumentOffsetByElement(this.menu.container, this.hot.rootDocument);
|
@@ -192,7 +193,7 @@ export class ContextMenu extends BasePlugin {
|
|
192
193
|
},
|
193
194
|
runOnlyIf: () => {
|
194
195
|
var _this$hot$getSelected;
|
195
|
-
const highlight = (_this$hot$getSelected = this.hot.
|
196
|
+
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeActive()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
196
197
|
return highlight && this.hot.selection.isCellVisible(highlight) && !this.menu.isOpened();
|
197
198
|
},
|
198
199
|
group: SHORTCUTS_GROUP
|
@@ -233,10 +234,8 @@ export class ContextMenu extends BasePlugin {
|
|
233
234
|
}
|
234
235
|
this.prepareMenuItems();
|
235
236
|
this.menu.open();
|
236
|
-
const themeHasTableBorder = this.menu.tableBorderWidth > 0;
|
237
237
|
objectEach(offset, (value, key) => {
|
238
|
-
|
239
|
-
this.menu.setOffset(key, themeHasTableBorder ? value : valueWithoutBorder);
|
238
|
+
this.menu.setOffset(key, value);
|
240
239
|
});
|
241
240
|
this.menu.setPosition(position);
|
242
241
|
}
|
@@ -126,7 +126,7 @@ class Cursor {
|
|
126
126
|
* @returns {boolean}
|
127
127
|
*/
|
128
128
|
fitsOnRight(element) {
|
129
|
-
let viewportWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rootWindow.
|
129
|
+
let viewportWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rootWindow.document.documentElement.clientWidth;
|
130
130
|
return this.leftRelative + this.cellWidth + element.offsetWidth <= viewportWidth;
|
131
131
|
}
|
132
132
|
|
@@ -123,7 +123,7 @@ export class Cursor {
|
|
123
123
|
* @returns {boolean}
|
124
124
|
*/
|
125
125
|
fitsOnRight(element) {
|
126
|
-
let viewportWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rootWindow.
|
126
|
+
let viewportWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rootWindow.document.documentElement.clientWidth;
|
127
127
|
return this.leftRelative + this.cellWidth + element.offsetWidth <= viewportWidth;
|
128
128
|
}
|
129
129
|
|
@@ -41,7 +41,7 @@ function createDefaultShortcutsList(menu) {
|
|
41
41
|
}, {
|
42
42
|
keys: [[hot.isRtl() ? 'ArrowLeft' : 'ArrowRight']],
|
43
43
|
callback: () => {
|
44
|
-
const selection = hotMenu.
|
44
|
+
const selection = hotMenu.getSelectedActive();
|
45
45
|
if (selection) {
|
46
46
|
const subMenu = menu.openSubMenu(selection[0]);
|
47
47
|
if (subMenu) {
|
@@ -52,7 +52,7 @@ function createDefaultShortcutsList(menu) {
|
|
52
52
|
}, {
|
53
53
|
keys: [[hot.isRtl() ? 'ArrowRight' : 'ArrowLeft']],
|
54
54
|
callback: () => {
|
55
|
-
const selection = hotMenu.
|
55
|
+
const selection = hotMenu.getSelectedActive();
|
56
56
|
if (selection && menu.isSubMenu()) {
|
57
57
|
menu.close();
|
58
58
|
if (menu.isSubMenu()) {
|
@@ -69,7 +69,7 @@ function createDefaultShortcutsList(menu) {
|
|
69
69
|
}, {
|
70
70
|
keys: [['Enter'], ['Space']],
|
71
71
|
callback: event => {
|
72
|
-
const selection = hotMenu.
|
72
|
+
const selection = hotMenu.getSelectedActive();
|
73
73
|
if (!selection) {
|
74
74
|
return;
|
75
75
|
}
|
@@ -83,7 +83,7 @@ function createDefaultShortcutsList(menu) {
|
|
83
83
|
}, {
|
84
84
|
keys: [['PageUp']],
|
85
85
|
callback: () => {
|
86
|
-
const selection = hotMenu.
|
86
|
+
const selection = hotMenu.getSelectedActive();
|
87
87
|
if (selection) {
|
88
88
|
hotMenu.selection.transformStart(-hotMenu.countVisibleRows(), 0);
|
89
89
|
} else {
|
@@ -93,7 +93,7 @@ function createDefaultShortcutsList(menu) {
|
|
93
93
|
}, {
|
94
94
|
keys: [['PageDown']],
|
95
95
|
callback: () => {
|
96
|
-
const selection = hotMenu.
|
96
|
+
const selection = hotMenu.getSelectedActive();
|
97
97
|
if (selection) {
|
98
98
|
hotMenu.selection.transformStart(hotMenu.countVisibleRows(), 0);
|
99
99
|
} else {
|
@@ -37,7 +37,7 @@ export function createDefaultShortcutsList(menu) {
|
|
37
37
|
}, {
|
38
38
|
keys: [[hot.isRtl() ? 'ArrowLeft' : 'ArrowRight']],
|
39
39
|
callback: () => {
|
40
|
-
const selection = hotMenu.
|
40
|
+
const selection = hotMenu.getSelectedActive();
|
41
41
|
if (selection) {
|
42
42
|
const subMenu = menu.openSubMenu(selection[0]);
|
43
43
|
if (subMenu) {
|
@@ -48,7 +48,7 @@ export function createDefaultShortcutsList(menu) {
|
|
48
48
|
}, {
|
49
49
|
keys: [[hot.isRtl() ? 'ArrowRight' : 'ArrowLeft']],
|
50
50
|
callback: () => {
|
51
|
-
const selection = hotMenu.
|
51
|
+
const selection = hotMenu.getSelectedActive();
|
52
52
|
if (selection && menu.isSubMenu()) {
|
53
53
|
menu.close();
|
54
54
|
if (menu.isSubMenu()) {
|
@@ -65,7 +65,7 @@ export function createDefaultShortcutsList(menu) {
|
|
65
65
|
}, {
|
66
66
|
keys: [['Enter'], ['Space']],
|
67
67
|
callback: event => {
|
68
|
-
const selection = hotMenu.
|
68
|
+
const selection = hotMenu.getSelectedActive();
|
69
69
|
if (!selection) {
|
70
70
|
return;
|
71
71
|
}
|
@@ -79,7 +79,7 @@ export function createDefaultShortcutsList(menu) {
|
|
79
79
|
}, {
|
80
80
|
keys: [['PageUp']],
|
81
81
|
callback: () => {
|
82
|
-
const selection = hotMenu.
|
82
|
+
const selection = hotMenu.getSelectedActive();
|
83
83
|
if (selection) {
|
84
84
|
hotMenu.selection.transformStart(-hotMenu.countVisibleRows(), 0);
|
85
85
|
} else {
|
@@ -89,7 +89,7 @@ export function createDefaultShortcutsList(menu) {
|
|
89
89
|
}, {
|
90
90
|
keys: [['PageDown']],
|
91
91
|
callback: () => {
|
92
|
-
const selection = hotMenu.
|
92
|
+
const selection = hotMenu.getSelectedActive();
|
93
93
|
if (selection) {
|
94
94
|
hotMenu.selection.transformStart(hotMenu.countVisibleRows(), 0);
|
95
95
|
} else {
|
@@ -221,7 +221,7 @@ class Menu {
|
|
221
221
|
* @returns {object|null}
|
222
222
|
*/
|
223
223
|
getSelectedItem() {
|
224
|
-
return this.hasSelectedItem() ? this.hotMenu.getSourceDataAtRow(this.hotMenu.
|
224
|
+
return this.hasSelectedItem() ? this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedActive()[0]) : null;
|
225
225
|
}
|
226
226
|
|
227
227
|
/**
|
@@ -230,7 +230,7 @@ class Menu {
|
|
230
230
|
* @returns {boolean}
|
231
231
|
*/
|
232
232
|
hasSelectedItem() {
|
233
|
-
return Array.isArray(this.hotMenu.
|
233
|
+
return Array.isArray(this.hotMenu.getSelectedActive());
|
234
234
|
}
|
235
235
|
|
236
236
|
/**
|
@@ -395,7 +395,7 @@ class Menu {
|
|
395
395
|
this.runLocalHooks('afterClose');
|
396
396
|
if (this.isSubMenu()) {
|
397
397
|
if (this.hot.getSettings().ariaTags) {
|
398
|
-
const selection = this.parentMenu.hotMenu.
|
398
|
+
const selection = this.parentMenu.hotMenu.getSelectedActive();
|
399
399
|
if (selection) {
|
400
400
|
const cell = this.parentMenu.hotMenu.getCell(selection[0], 0);
|
401
401
|
(0, _element.setAttribute)(cell, [(0, _a11y.A11Y_EXPANDED)(false)]);
|
@@ -217,7 +217,7 @@ export class Menu {
|
|
217
217
|
* @returns {object|null}
|
218
218
|
*/
|
219
219
|
getSelectedItem() {
|
220
|
-
return this.hasSelectedItem() ? this.hotMenu.getSourceDataAtRow(this.hotMenu.
|
220
|
+
return this.hasSelectedItem() ? this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedActive()[0]) : null;
|
221
221
|
}
|
222
222
|
|
223
223
|
/**
|
@@ -226,7 +226,7 @@ export class Menu {
|
|
226
226
|
* @returns {boolean}
|
227
227
|
*/
|
228
228
|
hasSelectedItem() {
|
229
|
-
return Array.isArray(this.hotMenu.
|
229
|
+
return Array.isArray(this.hotMenu.getSelectedActive());
|
230
230
|
}
|
231
231
|
|
232
232
|
/**
|
@@ -391,7 +391,7 @@ export class Menu {
|
|
391
391
|
this.runLocalHooks('afterClose');
|
392
392
|
if (this.isSubMenu()) {
|
393
393
|
if (this.hot.getSettings().ariaTags) {
|
394
|
-
const selection = this.parentMenu.hotMenu.
|
394
|
+
const selection = this.parentMenu.hotMenu.getSelectedActive();
|
395
395
|
if (selection) {
|
396
396
|
const cell = this.parentMenu.hotMenu.getCell(selection[0], 0);
|
397
397
|
setAttribute(cell, [A11Y_EXPANDED(false)]);
|
@@ -162,7 +162,7 @@ class Positioner {
|
|
162
162
|
const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
|
163
163
|
const paddingTop = Number.parseInt(style.paddingTop, 10);
|
164
164
|
const borderTop = Number.parseInt(style.borderTop, 10);
|
165
|
-
top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop
|
165
|
+
top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop;
|
166
166
|
}
|
167
167
|
_classPrivateFieldGet(_container, this).style.top = `${top}px`;
|
168
168
|
}
|
@@ -159,7 +159,7 @@ export class Positioner {
|
|
159
159
|
const style = rootWindow.getComputedStyle(_classPrivateFieldGet(_parentContainer, this).querySelector('.ht_master'));
|
160
160
|
const paddingTop = Number.parseInt(style.paddingTop, 10);
|
161
161
|
const borderTop = Number.parseInt(style.borderTop, 10);
|
162
|
-
top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop
|
162
|
+
top = _classPrivateFieldGet(_cursor, this).top - paddingTop - borderTop;
|
163
163
|
}
|
164
164
|
_classPrivateFieldGet(_container, this).style.top = `${top}px`;
|
165
165
|
}
|
@@ -23,7 +23,7 @@ function clearColumnItem() {
|
|
23
23
|
}
|
24
24
|
},
|
25
25
|
disabled() {
|
26
|
-
const range = this.
|
26
|
+
const range = this.getSelectedRangeActive();
|
27
27
|
if (!range || range.isSingleHeader() && range.highlight.col < 0 || !this.selection.isSelectedByColumnHeader()) {
|
28
28
|
return true;
|
29
29
|
}
|
@@ -18,7 +18,7 @@ export default function clearColumnItem() {
|
|
18
18
|
}
|
19
19
|
},
|
20
20
|
disabled() {
|
21
|
-
const range = this.
|
21
|
+
const range = this.getSelectedRangeActive();
|
22
22
|
if (!range || range.isSingleHeader() && range.highlight.col < 0 || !this.selection.isSelectedByColumnHeader()) {
|
23
23
|
return true;
|
24
24
|
}
|
@@ -16,15 +16,15 @@ function columnLeftItem() {
|
|
16
16
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_LEFT);
|
17
17
|
},
|
18
18
|
callback() {
|
19
|
-
const
|
19
|
+
const activeSelection = this.getSelectedRangeActive().getTopLeftCorner();
|
20
20
|
const alterAction = this.isRtl() ? 'insert_col_end' : 'insert_col_start';
|
21
|
-
this.alter(alterAction,
|
21
|
+
this.alter(alterAction, activeSelection.col, 1, 'ContextMenu.columnLeft');
|
22
22
|
},
|
23
23
|
disabled() {
|
24
24
|
if (!this.isColumnModificationAllowed()) {
|
25
25
|
return true;
|
26
26
|
}
|
27
|
-
const range = this.
|
27
|
+
const range = this.getSelectedRangeActive();
|
28
28
|
if (!range || this.selection.isSelectedByRowHeader() || range.isSingleHeader() && range.highlight.col < 0 || this.countSourceCols() >= this.getSettings().maxCols) {
|
29
29
|
return true;
|
30
30
|
}
|
@@ -11,15 +11,15 @@ export default function columnLeftItem() {
|
|
11
11
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_LEFT);
|
12
12
|
},
|
13
13
|
callback() {
|
14
|
-
const
|
14
|
+
const activeSelection = this.getSelectedRangeActive().getTopLeftCorner();
|
15
15
|
const alterAction = this.isRtl() ? 'insert_col_end' : 'insert_col_start';
|
16
|
-
this.alter(alterAction,
|
16
|
+
this.alter(alterAction, activeSelection.col, 1, 'ContextMenu.columnLeft');
|
17
17
|
},
|
18
18
|
disabled() {
|
19
19
|
if (!this.isColumnModificationAllowed()) {
|
20
20
|
return true;
|
21
21
|
}
|
22
|
-
const range = this.
|
22
|
+
const range = this.getSelectedRangeActive();
|
23
23
|
if (!range || this.selection.isSelectedByRowHeader() || range.isSingleHeader() && range.highlight.col < 0 || this.countSourceCols() >= this.getSettings().maxCols) {
|
24
24
|
return true;
|
25
25
|
}
|
@@ -16,15 +16,15 @@ function columnRightItem() {
|
|
16
16
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_RIGHT);
|
17
17
|
},
|
18
18
|
callback() {
|
19
|
-
const
|
19
|
+
const activeSelection = this.getSelectedRangeActive().getTopRightCorner();
|
20
20
|
const alterAction = this.isRtl() ? 'insert_col_start' : 'insert_col_end';
|
21
|
-
this.alter(alterAction,
|
21
|
+
this.alter(alterAction, activeSelection.col, 1, 'ContextMenu.columnRight');
|
22
22
|
},
|
23
23
|
disabled() {
|
24
24
|
if (!this.isColumnModificationAllowed()) {
|
25
25
|
return true;
|
26
26
|
}
|
27
|
-
const range = this.
|
27
|
+
const range = this.getSelectedRangeActive();
|
28
28
|
if (!range || this.selection.isSelectedByRowHeader() || range.isSingleHeader() && range.highlight.col < 0 || this.countSourceCols() >= this.getSettings().maxCols) {
|
29
29
|
return true;
|
30
30
|
}
|
@@ -11,15 +11,15 @@ export default function columnRightItem() {
|
|
11
11
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_RIGHT);
|
12
12
|
},
|
13
13
|
callback() {
|
14
|
-
const
|
14
|
+
const activeSelection = this.getSelectedRangeActive().getTopRightCorner();
|
15
15
|
const alterAction = this.isRtl() ? 'insert_col_start' : 'insert_col_end';
|
16
|
-
this.alter(alterAction,
|
16
|
+
this.alter(alterAction, activeSelection.col, 1, 'ContextMenu.columnRight');
|
17
17
|
},
|
18
18
|
disabled() {
|
19
19
|
if (!this.isColumnModificationAllowed()) {
|
20
20
|
return true;
|
21
21
|
}
|
22
|
-
const range = this.
|
22
|
+
const range = this.getSelectedRangeActive();
|
23
23
|
if (!range || this.selection.isSelectedByRowHeader() || range.isSingleHeader() && range.highlight.col < 0 || this.countSourceCols() >= this.getSettings().maxCols) {
|
24
24
|
return true;
|
25
25
|
}
|
@@ -34,7 +34,7 @@ function removeRowItem() {
|
|
34
34
|
this.alter('remove_row', (0, _utils.transformSelectionToRowDistance)(this), 1, 'ContextMenu.removeRow');
|
35
35
|
},
|
36
36
|
disabled() {
|
37
|
-
const range = this.
|
37
|
+
const range = this.getSelectedRangeActive();
|
38
38
|
if (!range) {
|
39
39
|
return true;
|
40
40
|
}
|
@@ -29,7 +29,7 @@ export default function removeRowItem() {
|
|
29
29
|
this.alter('remove_row', transformSelectionToRowDistance(this), 1, 'ContextMenu.removeRow');
|
30
30
|
},
|
31
31
|
disabled() {
|
32
|
-
const range = this.
|
32
|
+
const range = this.getSelectedRangeActive();
|
33
33
|
if (!range) {
|
34
34
|
return true;
|
35
35
|
}
|
@@ -16,11 +16,11 @@ function rowAboveItem() {
|
|
16
16
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_ABOVE);
|
17
17
|
},
|
18
18
|
callback() {
|
19
|
-
const
|
20
|
-
this.alter('insert_row_above',
|
19
|
+
const activeSelection = this.getSelectedRangeActive().getTopLeftCorner();
|
20
|
+
this.alter('insert_row_above', activeSelection.row, 1, 'ContextMenu.rowAbove');
|
21
21
|
},
|
22
22
|
disabled() {
|
23
|
-
const range = this.
|
23
|
+
const range = this.getSelectedRangeActive();
|
24
24
|
if (!range || this.selection.isSelectedByColumnHeader() || range.isSingleHeader() && range.highlight.row < 0 || this.countSourceRows() >= this.getSettings().maxRows) {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -11,11 +11,11 @@ export default function rowAboveItem() {
|
|
11
11
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_ABOVE);
|
12
12
|
},
|
13
13
|
callback() {
|
14
|
-
const
|
15
|
-
this.alter('insert_row_above',
|
14
|
+
const activeSelection = this.getSelectedRangeActive().getTopLeftCorner();
|
15
|
+
this.alter('insert_row_above', activeSelection.row, 1, 'ContextMenu.rowAbove');
|
16
16
|
},
|
17
17
|
disabled() {
|
18
|
-
const range = this.
|
18
|
+
const range = this.getSelectedRangeActive();
|
19
19
|
if (!range || this.selection.isSelectedByColumnHeader() || range.isSingleHeader() && range.highlight.row < 0 || this.countSourceRows() >= this.getSettings().maxRows) {
|
20
20
|
return true;
|
21
21
|
}
|
@@ -16,11 +16,11 @@ function rowBelowItem() {
|
|
16
16
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_BELOW);
|
17
17
|
},
|
18
18
|
callback() {
|
19
|
-
const
|
20
|
-
this.alter('insert_row_below',
|
19
|
+
const activeSelection = this.getSelectedRangeActive().getBottomRightCorner();
|
20
|
+
this.alter('insert_row_below', activeSelection.row, 1, 'ContextMenu.rowBelow');
|
21
21
|
},
|
22
22
|
disabled() {
|
23
|
-
const range = this.
|
23
|
+
const range = this.getSelectedRangeActive();
|
24
24
|
if (!range || this.selection.isSelectedByColumnHeader() || range.isSingleHeader() && range.highlight.row < 0 || this.countSourceRows() >= this.getSettings().maxRows) {
|
25
25
|
return true;
|
26
26
|
}
|
@@ -11,11 +11,11 @@ export default function rowBelowItem() {
|
|
11
11
|
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_BELOW);
|
12
12
|
},
|
13
13
|
callback() {
|
14
|
-
const
|
15
|
-
this.alter('insert_row_below',
|
14
|
+
const activeSelection = this.getSelectedRangeActive().getBottomRightCorner();
|
15
|
+
this.alter('insert_row_below', activeSelection.row, 1, 'ContextMenu.rowBelow');
|
16
16
|
},
|
17
17
|
disabled() {
|
18
|
-
const range = this.
|
18
|
+
const range = this.getSelectedRangeActive();
|
19
19
|
if (!range || this.selection.isSelectedByColumnHeader() || range.isSingleHeader() && range.highlight.row < 0 || this.countSourceRows() >= this.getSettings().maxRows) {
|
20
20
|
return true;
|
21
21
|
}
|
@@ -16,7 +16,7 @@ export default function copyItem(copyPastePlugin) {
|
|
16
16
|
if (this.countRows() === 0 || this.countCols() === 0) {
|
17
17
|
return true;
|
18
18
|
}
|
19
|
-
const range = this.
|
19
|
+
const range = this.getSelectedRangeActive();
|
20
20
|
if (!range) {
|
21
21
|
return true;
|
22
22
|
}
|
@@ -12,8 +12,8 @@ function copyColumnHeadersOnlyItem(copyPastePlugin) {
|
|
12
12
|
return {
|
13
13
|
key: 'copy_column_headers_only',
|
14
14
|
name() {
|
15
|
-
const
|
16
|
-
const nounForm =
|
15
|
+
const activeSelectedRange = this.getSelectedRangeActive();
|
16
|
+
const nounForm = activeSelectedRange ? (0, _number.clamp)(activeSelectedRange.getWidth() - 1, 0, 1) : 0;
|
17
17
|
return this.getTranslatedPhrase(_constants.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY, nounForm);
|
18
18
|
},
|
19
19
|
callback() {
|
@@ -23,7 +23,7 @@ function copyColumnHeadersOnlyItem(copyPastePlugin) {
|
|
23
23
|
if (!this.hasColHeaders()) {
|
24
24
|
return true;
|
25
25
|
}
|
26
|
-
const range = this.
|
26
|
+
const range = this.getSelectedRangeActive();
|
27
27
|
if (!range) {
|
28
28
|
return true;
|
29
29
|
}
|
@@ -8,8 +8,8 @@ export default function copyColumnHeadersOnlyItem(copyPastePlugin) {
|
|
8
8
|
return {
|
9
9
|
key: 'copy_column_headers_only',
|
10
10
|
name() {
|
11
|
-
const
|
12
|
-
const nounForm =
|
11
|
+
const activeSelectedRange = this.getSelectedRangeActive();
|
12
|
+
const nounForm = activeSelectedRange ? clamp(activeSelectedRange.getWidth() - 1, 0, 1) : 0;
|
13
13
|
return this.getTranslatedPhrase(CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY, nounForm);
|
14
14
|
},
|
15
15
|
callback() {
|
@@ -19,7 +19,7 @@ export default function copyColumnHeadersOnlyItem(copyPastePlugin) {
|
|
19
19
|
if (!this.hasColHeaders()) {
|
20
20
|
return true;
|
21
21
|
}
|
22
|
-
const range = this.
|
22
|
+
const range = this.getSelectedRangeActive();
|
23
23
|
if (!range) {
|
24
24
|
return true;
|
25
25
|
}
|
@@ -12,8 +12,8 @@ function copyWithColumnGroupHeadersItem(copyPastePlugin) {
|
|
12
12
|
return {
|
13
13
|
key: 'copy_with_column_group_headers',
|
14
14
|
name() {
|
15
|
-
const
|
16
|
-
const nounForm =
|
15
|
+
const activeSelectedRange = this.getSelectedRangeActive();
|
16
|
+
const nounForm = activeSelectedRange ? (0, _number.clamp)(activeSelectedRange.getWidth() - 1, 0, 1) : 0;
|
17
17
|
return this.getTranslatedPhrase(_constants.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS, nounForm);
|
18
18
|
},
|
19
19
|
callback() {
|
@@ -23,7 +23,7 @@ function copyWithColumnGroupHeadersItem(copyPastePlugin) {
|
|
23
23
|
if (!this.hasColHeaders() || !this.getSettings().nestedHeaders) {
|
24
24
|
return true;
|
25
25
|
}
|
26
|
-
const range = this.
|
26
|
+
const range = this.getSelectedRangeActive();
|
27
27
|
if (!range) {
|
28
28
|
return true;
|
29
29
|
}
|
@@ -8,8 +8,8 @@ export default function copyWithColumnGroupHeadersItem(copyPastePlugin) {
|
|
8
8
|
return {
|
9
9
|
key: 'copy_with_column_group_headers',
|
10
10
|
name() {
|
11
|
-
const
|
12
|
-
const nounForm =
|
11
|
+
const activeSelectedRange = this.getSelectedRangeActive();
|
12
|
+
const nounForm = activeSelectedRange ? clamp(activeSelectedRange.getWidth() - 1, 0, 1) : 0;
|
13
13
|
return this.getTranslatedPhrase(CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS, nounForm);
|
14
14
|
},
|
15
15
|
callback() {
|
@@ -19,7 +19,7 @@ export default function copyWithColumnGroupHeadersItem(copyPastePlugin) {
|
|
19
19
|
if (!this.hasColHeaders() || !this.getSettings().nestedHeaders) {
|
20
20
|
return true;
|
21
21
|
}
|
22
|
-
const range = this.
|
22
|
+
const range = this.getSelectedRangeActive();
|
23
23
|
if (!range) {
|
24
24
|
return true;
|
25
25
|
}
|
@@ -12,8 +12,8 @@ function copyWithColumnHeadersItem(copyPastePlugin) {
|
|
12
12
|
return {
|
13
13
|
key: 'copy_with_column_headers',
|
14
14
|
name() {
|
15
|
-
const
|
16
|
-
const nounForm =
|
15
|
+
const activeSelectedRange = this.getSelectedRangeActive();
|
16
|
+
const nounForm = activeSelectedRange ? (0, _number.clamp)(activeSelectedRange.getWidth() - 1, 0, 1) : 0;
|
17
17
|
return this.getTranslatedPhrase(_constants.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS, nounForm);
|
18
18
|
},
|
19
19
|
callback() {
|
@@ -23,7 +23,7 @@ function copyWithColumnHeadersItem(copyPastePlugin) {
|
|
23
23
|
if (!this.hasColHeaders()) {
|
24
24
|
return true;
|
25
25
|
}
|
26
|
-
const range = this.
|
26
|
+
const range = this.getSelectedRangeActive();
|
27
27
|
if (!range) {
|
28
28
|
return true;
|
29
29
|
}
|