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
@@ -1,5 +1,7 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
4
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
3
5
|
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
4
6
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
5
7
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -31,11 +33,13 @@ export class FocusOrder {
|
|
31
33
|
/**
|
32
34
|
* Pushes a new node to the provided list order.
|
33
35
|
*
|
34
|
-
* @param {
|
35
|
-
* @param {
|
36
|
-
* @param {
|
37
|
-
* @param {
|
38
|
-
* @param {
|
36
|
+
* @param {object} options The options object.
|
37
|
+
* @param {CellRange} options.selectedRange The selected range to build the focus order for.
|
38
|
+
* @param {number} options.selectionLayer The selection layer index.
|
39
|
+
* @param {LinkedList} options.listOrder The list order to push the node to.
|
40
|
+
* @param {WeakSet} options.mergeCellsVisitor The set of visited cells.
|
41
|
+
* @param {number} options.row The visual row index.
|
42
|
+
* @param {number} options.column The visual column index.
|
39
43
|
* @returns {NodeStructure | null}
|
40
44
|
*/
|
41
45
|
_classPrivateMethodInitSpec(this, _FocusOrder_brand);
|
@@ -179,53 +183,73 @@ export class FocusOrder {
|
|
179
183
|
/**
|
180
184
|
* Rebuilds the focus order list based on the provided selection.
|
181
185
|
*
|
182
|
-
* @param {CellRange}
|
186
|
+
* @param {CellRange[]} selectedRanges The selected ranges to build the focus order for.
|
183
187
|
*/
|
184
|
-
buildFocusOrder(
|
185
|
-
const topStart = selectedRange.getTopStartCorner();
|
186
|
-
const bottomEnd = selectedRange.getBottomEndCorner();
|
187
|
-
const visitedHorizontalCells = new WeakSet();
|
188
|
+
buildFocusOrder(selectedRanges) {
|
188
189
|
_classPrivateFieldSet(_cellsHorizontalOrder, this, new LinkedList());
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
if (_classPrivateFieldGet(_columnIndexMapper, this).isHidden(c)) {
|
190
|
+
selectedRanges.forEach((range, selectionLayer) => {
|
191
|
+
const visitedHorizontalCells = new WeakSet();
|
192
|
+
const topStart = range.getTopStartCorner();
|
193
|
+
const bottomEnd = range.getBottomEndCorner();
|
194
|
+
for (let r = topStart.row; r <= bottomEnd.row; r++) {
|
195
|
+
if (_classPrivateFieldGet(_rowIndexMapper, this).isHidden(r)) {
|
196
196
|
// eslint-disable-next-line no-continue
|
197
197
|
continue;
|
198
198
|
}
|
199
|
-
|
200
|
-
|
201
|
-
|
199
|
+
for (let c = topStart.col; c <= bottomEnd.col; c++) {
|
200
|
+
if (_classPrivateFieldGet(_columnIndexMapper, this).isHidden(c)) {
|
201
|
+
// eslint-disable-next-line no-continue
|
202
|
+
continue;
|
203
|
+
}
|
204
|
+
const node = _assertClassBrand(_FocusOrder_brand, this, _pushOrderNode).call(this, {
|
205
|
+
selectedRange: range,
|
206
|
+
selectionLayer,
|
207
|
+
listOrder: _classPrivateFieldGet(_cellsHorizontalOrder, this),
|
208
|
+
mergeCellsVisitor: visitedHorizontalCells,
|
209
|
+
row: r,
|
210
|
+
column: c
|
211
|
+
});
|
212
|
+
if (node) {
|
213
|
+
_classPrivateFieldSet(_currentHorizontalLinkedNode, this, node);
|
214
|
+
}
|
202
215
|
}
|
203
216
|
}
|
204
|
-
}
|
217
|
+
});
|
205
218
|
|
206
219
|
// create circular linked list
|
207
220
|
if (_classPrivateFieldGet(_cellsHorizontalOrder, this).first) {
|
208
221
|
_classPrivateFieldGet(_cellsHorizontalOrder, this).first.prev = _classPrivateFieldGet(_cellsHorizontalOrder, this).last;
|
209
222
|
_classPrivateFieldGet(_cellsHorizontalOrder, this).last.next = _classPrivateFieldGet(_cellsHorizontalOrder, this).first;
|
210
223
|
}
|
211
|
-
const visitedVerticalCells = new WeakSet();
|
212
224
|
_classPrivateFieldSet(_cellsVerticalOrder, this, new LinkedList());
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
if (_classPrivateFieldGet(_rowIndexMapper, this).isHidden(r)) {
|
225
|
+
selectedRanges.forEach((range, selectionLayer) => {
|
226
|
+
const visitedVerticalCells = new WeakSet();
|
227
|
+
const topStart = range.getTopStartCorner();
|
228
|
+
const bottomEnd = range.getBottomEndCorner();
|
229
|
+
for (let c = topStart.col; c <= bottomEnd.col; c++) {
|
230
|
+
if (_classPrivateFieldGet(_columnIndexMapper, this).isHidden(c)) {
|
220
231
|
// eslint-disable-next-line no-continue
|
221
232
|
continue;
|
222
233
|
}
|
223
|
-
|
224
|
-
|
225
|
-
|
234
|
+
for (let r = topStart.row; r <= bottomEnd.row; r++) {
|
235
|
+
if (_classPrivateFieldGet(_rowIndexMapper, this).isHidden(r)) {
|
236
|
+
// eslint-disable-next-line no-continue
|
237
|
+
continue;
|
238
|
+
}
|
239
|
+
const node = _assertClassBrand(_FocusOrder_brand, this, _pushOrderNode).call(this, {
|
240
|
+
selectedRange: range,
|
241
|
+
selectionLayer,
|
242
|
+
listOrder: _classPrivateFieldGet(_cellsVerticalOrder, this),
|
243
|
+
mergeCellsVisitor: visitedVerticalCells,
|
244
|
+
row: r,
|
245
|
+
column: c
|
246
|
+
});
|
247
|
+
if (node) {
|
248
|
+
_classPrivateFieldSet(_currentVerticalLinkedNode, this, node);
|
249
|
+
}
|
226
250
|
}
|
227
251
|
}
|
228
|
-
}
|
252
|
+
});
|
229
253
|
|
230
254
|
// create circular linked list
|
231
255
|
if (_classPrivateFieldGet(_cellsVerticalOrder, this).first) {
|
@@ -238,37 +262,48 @@ export class FocusOrder {
|
|
238
262
|
*
|
239
263
|
* @param {number} row The visual row index.
|
240
264
|
* @param {number} column The visual column index.
|
265
|
+
* @param {number} selectionLayerIndex The index of the selection layer to which the focus should be marked as active.
|
241
266
|
* @returns {FocusOrder}
|
242
267
|
*/
|
243
|
-
setActiveNode(row, column) {
|
268
|
+
setActiveNode(row, column, selectionLayerIndex) {
|
244
269
|
_classPrivateFieldGet(_cellsHorizontalOrder, this).inorder(node => {
|
245
270
|
const {
|
271
|
+
selectionLayer,
|
246
272
|
rowStart,
|
247
273
|
rowEnd,
|
248
274
|
colStart,
|
249
275
|
colEnd
|
250
276
|
} = node.data;
|
251
|
-
if (row >= rowStart && row <= rowEnd && column >= colStart && column <= colEnd) {
|
277
|
+
if (selectionLayer === selectionLayerIndex && row >= rowStart && row <= rowEnd && column >= colStart && column <= colEnd) {
|
252
278
|
_classPrivateFieldSet(_currentHorizontalLinkedNode, this, node);
|
253
|
-
return
|
279
|
+
return true;
|
254
280
|
}
|
255
281
|
});
|
256
282
|
_classPrivateFieldGet(_cellsVerticalOrder, this).inorder(node => {
|
257
283
|
const {
|
284
|
+
selectionLayer,
|
258
285
|
rowStart,
|
259
286
|
rowEnd,
|
260
287
|
colStart,
|
261
288
|
colEnd
|
262
289
|
} = node.data;
|
263
|
-
if (row >= rowStart && row <= rowEnd && column >= colStart && column <= colEnd) {
|
290
|
+
if (selectionLayer === selectionLayerIndex && row >= rowStart && row <= rowEnd && column >= colStart && column <= colEnd) {
|
264
291
|
_classPrivateFieldSet(_currentVerticalLinkedNode, this, node);
|
265
|
-
return
|
292
|
+
return true;
|
266
293
|
}
|
267
294
|
});
|
268
295
|
return this;
|
269
296
|
}
|
270
297
|
}
|
271
|
-
function _pushOrderNode(
|
298
|
+
function _pushOrderNode(_ref2) {
|
299
|
+
let {
|
300
|
+
selectedRange,
|
301
|
+
selectionLayer,
|
302
|
+
listOrder,
|
303
|
+
mergeCellsVisitor,
|
304
|
+
row,
|
305
|
+
column
|
306
|
+
} = _ref2;
|
272
307
|
const topStart = selectedRange.getTopStartCorner();
|
273
308
|
const bottomEnd = selectedRange.getBottomEndCorner();
|
274
309
|
const highlight = selectedRange.highlight.clone().normalize();
|
@@ -277,6 +312,7 @@ function _pushOrderNode(selectedRange, listOrder, mergeCellsVisitor, row, column
|
|
277
312
|
return null;
|
278
313
|
}
|
279
314
|
const node = {
|
315
|
+
selectionLayer,
|
280
316
|
colStart: column,
|
281
317
|
colEnd: column,
|
282
318
|
rowStart: row,
|
@@ -554,7 +554,7 @@ class MergeCells extends _base.BasePlugin {
|
|
554
554
|
* @param {CellRange} [cellRange] Selection cell range.
|
555
555
|
*/
|
556
556
|
mergeSelection() {
|
557
|
-
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.
|
557
|
+
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.getSelectedRangeActive();
|
558
558
|
if (!cellRange) {
|
559
559
|
return;
|
560
560
|
}
|
@@ -574,7 +574,7 @@ class MergeCells extends _base.BasePlugin {
|
|
574
574
|
* @param {CellRange} [cellRange] Selection cell range.
|
575
575
|
*/
|
576
576
|
unmergeSelection() {
|
577
|
-
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.
|
577
|
+
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.getSelectedRangeActive();
|
578
578
|
if (!cellRange) {
|
579
579
|
return;
|
580
580
|
}
|
@@ -741,7 +741,7 @@ class MergeCells extends _base.BasePlugin {
|
|
741
741
|
gridContext.addShortcut({
|
742
742
|
keys: [['Control', 'm']],
|
743
743
|
callback: () => {
|
744
|
-
const range = this.hot.
|
744
|
+
const range = this.hot.getSelectedRangeActive();
|
745
745
|
if (range && !range.isSingleHeader()) {
|
746
746
|
this.toggleMerge(range);
|
747
747
|
this.hot.render();
|
@@ -946,7 +946,7 @@ function _onAfterInit() {
|
|
946
946
|
function _onAfterIsMultipleSelection(isMultiple) {
|
947
947
|
if (isMultiple) {
|
948
948
|
const mergedCells = this.mergedCellsCollection.mergedCells;
|
949
|
-
const selectionRange = this.hot.
|
949
|
+
const selectionRange = this.hot.getSelectedRangeActive();
|
950
950
|
const topStartCoords = selectionRange.getTopStartCorner();
|
951
951
|
const bottomEndCoords = selectionRange.getBottomEndCorner();
|
952
952
|
for (let group = 0; group < mergedCells.length; group += 1) {
|
@@ -972,7 +972,7 @@ function _onModifyTransformFocus(delta) {
|
|
972
972
|
* @param {object} delta The transformation delta.
|
973
973
|
*/
|
974
974
|
function _onModifyTransformStart(delta) {
|
975
|
-
const selectedRange = this.hot.
|
975
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
976
976
|
const {
|
977
977
|
highlight
|
978
978
|
} = selectedRange;
|
@@ -1047,7 +1047,7 @@ function _onModifyTransformStart(delta) {
|
|
1047
1047
|
* @param {{ row: number, col: number }} delta The transformation delta.
|
1048
1048
|
*/
|
1049
1049
|
function _onModifyTransformEnd(delta) {
|
1050
|
-
const selectedRange = this.hot.
|
1050
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1051
1051
|
const cloneRange = selectedRange.clone();
|
1052
1052
|
const {
|
1053
1053
|
to
|
@@ -1193,7 +1193,7 @@ function _onBeforeSelectionFocusSet() {
|
|
1193
1193
|
if (_classPrivateFieldGet(_lastSelectedFocus, this).isCell()) {
|
1194
1194
|
return;
|
1195
1195
|
}
|
1196
|
-
const selectedRange = this.hot.
|
1196
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1197
1197
|
const verticalDir = selectedRange.getVerticalDirection();
|
1198
1198
|
const horizontalDir = selectedRange.getHorizontalDirection();
|
1199
1199
|
const focusCoords = _classPrivateFieldGet(_lastSelectedFocus, this).clone().normalize();
|
@@ -1211,43 +1211,53 @@ function _onBeforeSelectionFocusSet() {
|
|
1211
1211
|
* @param {number} column The visual column index.
|
1212
1212
|
*/
|
1213
1213
|
function _onAfterSelectionFocusSet(row, column) {
|
1214
|
-
const selectedRange = this.hot.getSelectedRangeLast();
|
1215
1214
|
const {
|
1216
1215
|
columnIndexMapper,
|
1217
1216
|
rowIndexMapper
|
1218
1217
|
} = this.hot;
|
1218
|
+
let activeSelectionLayerIndex = this.hot.getActiveSelectionLayerIndex();
|
1219
1219
|
let notHiddenRowIndex = null;
|
1220
1220
|
let notHiddenColumnIndex = null;
|
1221
1221
|
if (_classPrivateFieldGet(_lastFocusDelta, this).col < 0) {
|
1222
1222
|
const {
|
1223
1223
|
rowEnd,
|
1224
|
-
colEnd
|
1224
|
+
colEnd,
|
1225
|
+
selectionLayer
|
1225
1226
|
} = _classPrivateFieldGet(_focusOrder, this).getPrevHorizontalNode();
|
1226
1227
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colEnd, -1);
|
1227
1228
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowEnd, -1);
|
1229
|
+
activeSelectionLayerIndex = selectionLayer;
|
1228
1230
|
} else if (_classPrivateFieldGet(_lastFocusDelta, this).col > 0) {
|
1229
1231
|
const {
|
1230
1232
|
rowStart,
|
1231
|
-
colStart
|
1233
|
+
colStart,
|
1234
|
+
selectionLayer
|
1232
1235
|
} = _classPrivateFieldGet(_focusOrder, this).getNextHorizontalNode();
|
1233
1236
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colStart, 1);
|
1234
1237
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowStart, 1);
|
1238
|
+
activeSelectionLayerIndex = selectionLayer;
|
1235
1239
|
} else if (_classPrivateFieldGet(_lastFocusDelta, this).row < 0) {
|
1236
1240
|
const {
|
1237
1241
|
rowEnd,
|
1238
|
-
colEnd
|
1242
|
+
colEnd,
|
1243
|
+
selectionLayer
|
1239
1244
|
} = _classPrivateFieldGet(_focusOrder, this).getPrevVerticalNode();
|
1240
1245
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colEnd, -1);
|
1241
1246
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowEnd, -1);
|
1247
|
+
activeSelectionLayerIndex = selectionLayer;
|
1242
1248
|
} else if (_classPrivateFieldGet(_lastFocusDelta, this).row > 0) {
|
1243
1249
|
const {
|
1244
1250
|
rowStart,
|
1245
|
-
colStart
|
1251
|
+
colStart,
|
1252
|
+
selectionLayer
|
1246
1253
|
} = _classPrivateFieldGet(_focusOrder, this).getNextVerticalNode();
|
1247
1254
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colStart, 1);
|
1248
1255
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowStart, 1);
|
1256
|
+
activeSelectionLayerIndex = selectionLayer;
|
1249
1257
|
}
|
1250
1258
|
if (notHiddenRowIndex !== null || notHiddenColumnIndex !== null) {
|
1259
|
+
this.hot.selection.setActiveSelectionLayerIndex(activeSelectionLayerIndex);
|
1260
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1251
1261
|
const coords = this.hot._createCellCoords(notHiddenRowIndex, notHiddenColumnIndex);
|
1252
1262
|
const mergeParent = this.mergedCellsCollection.get(coords.row, coords.col);
|
1253
1263
|
const focusHighlight = this.hot.selection.highlight.getFocus();
|
@@ -1264,7 +1274,7 @@ function _onAfterSelectionFocusSet(row, column) {
|
|
1264
1274
|
focusHighlight.clear();
|
1265
1275
|
focusHighlight.add(coords).commit();
|
1266
1276
|
}
|
1267
|
-
_classPrivateFieldGet(_focusOrder, this).setActiveNode(row, column);
|
1277
|
+
_classPrivateFieldGet(_focusOrder, this).setActiveNode(row, column, activeSelectionLayerIndex);
|
1268
1278
|
_classPrivateFieldSet(_lastFocusDelta, this, {
|
1269
1279
|
row: 0,
|
1270
1280
|
col: 0
|
@@ -1274,10 +1284,7 @@ function _onAfterSelectionFocusSet(row, column) {
|
|
1274
1284
|
* Creates the horizontal and vertical cells order matrix (linked lists) for focused cell.
|
1275
1285
|
*/
|
1276
1286
|
function _onAfterSelectionEnd() {
|
1277
|
-
|
1278
|
-
if (!selection.isHeader()) {
|
1279
|
-
_classPrivateFieldGet(_focusOrder, this).buildFocusOrder(this.hot.getSelectedRangeLast());
|
1280
|
-
}
|
1287
|
+
_classPrivateFieldGet(_focusOrder, this).buildFocusOrder(this.hot.getSelectedRange());
|
1281
1288
|
}
|
1282
1289
|
/**
|
1283
1290
|
* The `afterGetCellMeta` hook callback.
|
@@ -1392,7 +1399,7 @@ function _onAfterChange(changes, source) {
|
|
1392
1399
|
*/
|
1393
1400
|
function _onBeforeDrawAreaBorders(corners, className) {
|
1394
1401
|
if (className && className === 'area') {
|
1395
|
-
const selectedRange = this.hot.
|
1402
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1396
1403
|
const mergedCellsWithinRange = this.mergedCellsCollection.getWithinRange(selectedRange);
|
1397
1404
|
(0, _array.arrayEach)(mergedCellsWithinRange, mergedCell => {
|
1398
1405
|
if (selectedRange.getBottomEndCorner().row === mergedCell.getLastRow() && selectedRange.getBottomEndCorner().col === mergedCell.getLastColumn()) {
|
@@ -1442,7 +1449,7 @@ function _onBeforeBeginEditing(row, column, initialValue, event) {
|
|
1442
1449
|
if (!(event instanceof MouseEvent)) {
|
1443
1450
|
return;
|
1444
1451
|
}
|
1445
|
-
const selection = this.hot.
|
1452
|
+
const selection = this.hot.getSelectedRangeActive();
|
1446
1453
|
const mergeCell = this.mergedCellsCollection.getByRange(selection);
|
1447
1454
|
if (!mergeCell) {
|
1448
1455
|
return;
|
@@ -550,7 +550,7 @@ export class MergeCells extends BasePlugin {
|
|
550
550
|
* @param {CellRange} [cellRange] Selection cell range.
|
551
551
|
*/
|
552
552
|
mergeSelection() {
|
553
|
-
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.
|
553
|
+
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.getSelectedRangeActive();
|
554
554
|
if (!cellRange) {
|
555
555
|
return;
|
556
556
|
}
|
@@ -570,7 +570,7 @@ export class MergeCells extends BasePlugin {
|
|
570
570
|
* @param {CellRange} [cellRange] Selection cell range.
|
571
571
|
*/
|
572
572
|
unmergeSelection() {
|
573
|
-
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.
|
573
|
+
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.getSelectedRangeActive();
|
574
574
|
if (!cellRange) {
|
575
575
|
return;
|
576
576
|
}
|
@@ -737,7 +737,7 @@ export class MergeCells extends BasePlugin {
|
|
737
737
|
gridContext.addShortcut({
|
738
738
|
keys: [['Control', 'm']],
|
739
739
|
callback: () => {
|
740
|
-
const range = this.hot.
|
740
|
+
const range = this.hot.getSelectedRangeActive();
|
741
741
|
if (range && !range.isSingleHeader()) {
|
742
742
|
this.toggleMerge(range);
|
743
743
|
this.hot.render();
|
@@ -941,7 +941,7 @@ function _onAfterInit() {
|
|
941
941
|
function _onAfterIsMultipleSelection(isMultiple) {
|
942
942
|
if (isMultiple) {
|
943
943
|
const mergedCells = this.mergedCellsCollection.mergedCells;
|
944
|
-
const selectionRange = this.hot.
|
944
|
+
const selectionRange = this.hot.getSelectedRangeActive();
|
945
945
|
const topStartCoords = selectionRange.getTopStartCorner();
|
946
946
|
const bottomEndCoords = selectionRange.getBottomEndCorner();
|
947
947
|
for (let group = 0; group < mergedCells.length; group += 1) {
|
@@ -967,7 +967,7 @@ function _onModifyTransformFocus(delta) {
|
|
967
967
|
* @param {object} delta The transformation delta.
|
968
968
|
*/
|
969
969
|
function _onModifyTransformStart(delta) {
|
970
|
-
const selectedRange = this.hot.
|
970
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
971
971
|
const {
|
972
972
|
highlight
|
973
973
|
} = selectedRange;
|
@@ -1042,7 +1042,7 @@ function _onModifyTransformStart(delta) {
|
|
1042
1042
|
* @param {{ row: number, col: number }} delta The transformation delta.
|
1043
1043
|
*/
|
1044
1044
|
function _onModifyTransformEnd(delta) {
|
1045
|
-
const selectedRange = this.hot.
|
1045
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1046
1046
|
const cloneRange = selectedRange.clone();
|
1047
1047
|
const {
|
1048
1048
|
to
|
@@ -1188,7 +1188,7 @@ function _onBeforeSelectionFocusSet() {
|
|
1188
1188
|
if (_classPrivateFieldGet(_lastSelectedFocus, this).isCell()) {
|
1189
1189
|
return;
|
1190
1190
|
}
|
1191
|
-
const selectedRange = this.hot.
|
1191
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1192
1192
|
const verticalDir = selectedRange.getVerticalDirection();
|
1193
1193
|
const horizontalDir = selectedRange.getHorizontalDirection();
|
1194
1194
|
const focusCoords = _classPrivateFieldGet(_lastSelectedFocus, this).clone().normalize();
|
@@ -1206,43 +1206,53 @@ function _onBeforeSelectionFocusSet() {
|
|
1206
1206
|
* @param {number} column The visual column index.
|
1207
1207
|
*/
|
1208
1208
|
function _onAfterSelectionFocusSet(row, column) {
|
1209
|
-
const selectedRange = this.hot.getSelectedRangeLast();
|
1210
1209
|
const {
|
1211
1210
|
columnIndexMapper,
|
1212
1211
|
rowIndexMapper
|
1213
1212
|
} = this.hot;
|
1213
|
+
let activeSelectionLayerIndex = this.hot.getActiveSelectionLayerIndex();
|
1214
1214
|
let notHiddenRowIndex = null;
|
1215
1215
|
let notHiddenColumnIndex = null;
|
1216
1216
|
if (_classPrivateFieldGet(_lastFocusDelta, this).col < 0) {
|
1217
1217
|
const {
|
1218
1218
|
rowEnd,
|
1219
|
-
colEnd
|
1219
|
+
colEnd,
|
1220
|
+
selectionLayer
|
1220
1221
|
} = _classPrivateFieldGet(_focusOrder, this).getPrevHorizontalNode();
|
1221
1222
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colEnd, -1);
|
1222
1223
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowEnd, -1);
|
1224
|
+
activeSelectionLayerIndex = selectionLayer;
|
1223
1225
|
} else if (_classPrivateFieldGet(_lastFocusDelta, this).col > 0) {
|
1224
1226
|
const {
|
1225
1227
|
rowStart,
|
1226
|
-
colStart
|
1228
|
+
colStart,
|
1229
|
+
selectionLayer
|
1227
1230
|
} = _classPrivateFieldGet(_focusOrder, this).getNextHorizontalNode();
|
1228
1231
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colStart, 1);
|
1229
1232
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowStart, 1);
|
1233
|
+
activeSelectionLayerIndex = selectionLayer;
|
1230
1234
|
} else if (_classPrivateFieldGet(_lastFocusDelta, this).row < 0) {
|
1231
1235
|
const {
|
1232
1236
|
rowEnd,
|
1233
|
-
colEnd
|
1237
|
+
colEnd,
|
1238
|
+
selectionLayer
|
1234
1239
|
} = _classPrivateFieldGet(_focusOrder, this).getPrevVerticalNode();
|
1235
1240
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colEnd, -1);
|
1236
1241
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowEnd, -1);
|
1242
|
+
activeSelectionLayerIndex = selectionLayer;
|
1237
1243
|
} else if (_classPrivateFieldGet(_lastFocusDelta, this).row > 0) {
|
1238
1244
|
const {
|
1239
1245
|
rowStart,
|
1240
|
-
colStart
|
1246
|
+
colStart,
|
1247
|
+
selectionLayer
|
1241
1248
|
} = _classPrivateFieldGet(_focusOrder, this).getNextVerticalNode();
|
1242
1249
|
notHiddenColumnIndex = columnIndexMapper.getNearestNotHiddenIndex(colStart, 1);
|
1243
1250
|
notHiddenRowIndex = rowIndexMapper.getNearestNotHiddenIndex(rowStart, 1);
|
1251
|
+
activeSelectionLayerIndex = selectionLayer;
|
1244
1252
|
}
|
1245
1253
|
if (notHiddenRowIndex !== null || notHiddenColumnIndex !== null) {
|
1254
|
+
this.hot.selection.setActiveSelectionLayerIndex(activeSelectionLayerIndex);
|
1255
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1246
1256
|
const coords = this.hot._createCellCoords(notHiddenRowIndex, notHiddenColumnIndex);
|
1247
1257
|
const mergeParent = this.mergedCellsCollection.get(coords.row, coords.col);
|
1248
1258
|
const focusHighlight = this.hot.selection.highlight.getFocus();
|
@@ -1259,7 +1269,7 @@ function _onAfterSelectionFocusSet(row, column) {
|
|
1259
1269
|
focusHighlight.clear();
|
1260
1270
|
focusHighlight.add(coords).commit();
|
1261
1271
|
}
|
1262
|
-
_classPrivateFieldGet(_focusOrder, this).setActiveNode(row, column);
|
1272
|
+
_classPrivateFieldGet(_focusOrder, this).setActiveNode(row, column, activeSelectionLayerIndex);
|
1263
1273
|
_classPrivateFieldSet(_lastFocusDelta, this, {
|
1264
1274
|
row: 0,
|
1265
1275
|
col: 0
|
@@ -1269,10 +1279,7 @@ function _onAfterSelectionFocusSet(row, column) {
|
|
1269
1279
|
* Creates the horizontal and vertical cells order matrix (linked lists) for focused cell.
|
1270
1280
|
*/
|
1271
1281
|
function _onAfterSelectionEnd() {
|
1272
|
-
|
1273
|
-
if (!selection.isHeader()) {
|
1274
|
-
_classPrivateFieldGet(_focusOrder, this).buildFocusOrder(this.hot.getSelectedRangeLast());
|
1275
|
-
}
|
1282
|
+
_classPrivateFieldGet(_focusOrder, this).buildFocusOrder(this.hot.getSelectedRange());
|
1276
1283
|
}
|
1277
1284
|
/**
|
1278
1285
|
* The `afterGetCellMeta` hook callback.
|
@@ -1387,7 +1394,7 @@ function _onAfterChange(changes, source) {
|
|
1387
1394
|
*/
|
1388
1395
|
function _onBeforeDrawAreaBorders(corners, className) {
|
1389
1396
|
if (className && className === 'area') {
|
1390
|
-
const selectedRange = this.hot.
|
1397
|
+
const selectedRange = this.hot.getSelectedRangeActive();
|
1391
1398
|
const mergedCellsWithinRange = this.mergedCellsCollection.getWithinRange(selectedRange);
|
1392
1399
|
arrayEach(mergedCellsWithinRange, mergedCell => {
|
1393
1400
|
if (selectedRange.getBottomEndCorner().row === mergedCell.getLastRow() && selectedRange.getBottomEndCorner().col === mergedCell.getLastColumn()) {
|
@@ -1437,7 +1444,7 @@ function _onBeforeBeginEditing(row, column, initialValue, event) {
|
|
1437
1444
|
if (!(event instanceof MouseEvent)) {
|
1438
1445
|
return;
|
1439
1446
|
}
|
1440
|
-
const selection = this.hot.
|
1447
|
+
const selection = this.hot.getSelectedRangeActive();
|
1441
1448
|
const mergeCell = this.mergedCellsCollection.getByRange(selection);
|
1442
1449
|
if (!mergeCell) {
|
1443
1450
|
return;
|
@@ -42,7 +42,7 @@ function createMergeCellRenderer(plugin) {
|
|
42
42
|
if (!(0, _object.isObject)(mergedCell)) {
|
43
43
|
TD.removeAttribute('rowspan');
|
44
44
|
TD.removeAttribute('colspan');
|
45
|
-
if (
|
45
|
+
if (updateNextCellsHeight.has(row) && !hot.getSettings().rowHeaders) {
|
46
46
|
TD.style.height = `${updateNextCellsHeight.get(row)}px`;
|
47
47
|
updateNextCellsHeight.delete(row);
|
48
48
|
}
|
@@ -57,13 +57,19 @@ function createMergeCellRenderer(plugin) {
|
|
57
57
|
} = mergedCell;
|
58
58
|
const [lastMergedRowIndex, lastMergedColumnIndex] = plugin.translateMergedCellToRenderable(origRow, origRowspan, origColumn, origColspan);
|
59
59
|
const isVirtualRenderingEnabled = plugin.getSetting('virtualized');
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
if (origColumn === 0 && !hot.getSettings().rowHeaders) {
|
61
|
+
const rowHeights = hot._getRowHeightFromSettings(row);
|
62
|
+
if (rowHeights !== undefined) {
|
63
|
+
const borderBoxSizing = hot.stylesHandler.areCellsBorderBox();
|
64
|
+
const borderCompensation = borderBoxSizing ? 0 : 1;
|
65
|
+
updateNextCellsHeight.set(row, rowHeights - borderCompensation);
|
66
|
+
} else if ((0, _browser.isSafari)()) {
|
67
|
+
// Safari bug fix - the height of the cells next to the merged cell must be defined
|
68
|
+
// so that their height is proportional to the height of the merged cell
|
69
|
+
// (this emulates default behavior in Chrome, FF etc.)
|
70
|
+
const height = (0, _utils.sumCellsHeights)(hot, origRow, origRowspan);
|
71
|
+
updateNextCellsHeight.set(row, height / origRowspan);
|
72
|
+
}
|
67
73
|
}
|
68
74
|
const renderedRowIndex = rowMapper.getRenderableFromVisualIndex(row);
|
69
75
|
const renderedColumnIndex = columnMapper.getRenderableFromVisualIndex(col);
|
@@ -38,7 +38,7 @@ export function createMergeCellRenderer(plugin) {
|
|
38
38
|
if (!isObject(mergedCell)) {
|
39
39
|
TD.removeAttribute('rowspan');
|
40
40
|
TD.removeAttribute('colspan');
|
41
|
-
if (
|
41
|
+
if (updateNextCellsHeight.has(row) && !hot.getSettings().rowHeaders) {
|
42
42
|
TD.style.height = `${updateNextCellsHeight.get(row)}px`;
|
43
43
|
updateNextCellsHeight.delete(row);
|
44
44
|
}
|
@@ -53,13 +53,19 @@ export function createMergeCellRenderer(plugin) {
|
|
53
53
|
} = mergedCell;
|
54
54
|
const [lastMergedRowIndex, lastMergedColumnIndex] = plugin.translateMergedCellToRenderable(origRow, origRowspan, origColumn, origColspan);
|
55
55
|
const isVirtualRenderingEnabled = plugin.getSetting('virtualized');
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
if (origColumn === 0 && !hot.getSettings().rowHeaders) {
|
57
|
+
const rowHeights = hot._getRowHeightFromSettings(row);
|
58
|
+
if (rowHeights !== undefined) {
|
59
|
+
const borderBoxSizing = hot.stylesHandler.areCellsBorderBox();
|
60
|
+
const borderCompensation = borderBoxSizing ? 0 : 1;
|
61
|
+
updateNextCellsHeight.set(row, rowHeights - borderCompensation);
|
62
|
+
} else if (isSafari()) {
|
63
|
+
// Safari bug fix - the height of the cells next to the merged cell must be defined
|
64
|
+
// so that their height is proportional to the height of the merged cell
|
65
|
+
// (this emulates default behavior in Chrome, FF etc.)
|
66
|
+
const height = sumCellsHeights(hot, origRow, origRowspan);
|
67
|
+
updateNextCellsHeight.set(row, height / origRowspan);
|
68
|
+
}
|
63
69
|
}
|
64
70
|
const renderedRowIndex = rowMapper.getRenderableFromVisualIndex(row);
|
65
71
|
const renderedColumnIndex = columnMapper.getRenderableFromVisualIndex(col);
|
@@ -122,7 +122,7 @@ class MultiColumnSorting extends _columnSorting.ColumnSorting {
|
|
122
122
|
callback: () => {
|
123
123
|
const {
|
124
124
|
highlight
|
125
|
-
} = this.hot.
|
125
|
+
} = this.hot.getSelectedRangeActive();
|
126
126
|
if (highlight.row === -1 && highlight.col >= 0) {
|
127
127
|
this.sort(this.getNextSortConfig(highlight.col, _columnSorting.APPEND_COLUMN_CONFIG_STRATEGY));
|
128
128
|
}
|
@@ -132,8 +132,8 @@ class MultiColumnSorting extends _columnSorting.ColumnSorting {
|
|
132
132
|
},
|
133
133
|
runOnlyIf: () => {
|
134
134
|
var _this$hot$getSelected, _this$hot$getSelected2;
|
135
|
-
const highlight = (_this$hot$getSelected = this.hot.
|
136
|
-
return highlight && ((_this$hot$getSelected2 = this.hot.
|
135
|
+
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeActive()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
136
|
+
return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeActive()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
137
137
|
},
|
138
138
|
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
139
139
|
position: 'before',
|
@@ -119,7 +119,7 @@ export class MultiColumnSorting extends ColumnSorting {
|
|
119
119
|
callback: () => {
|
120
120
|
const {
|
121
121
|
highlight
|
122
|
-
} = this.hot.
|
122
|
+
} = this.hot.getSelectedRangeActive();
|
123
123
|
if (highlight.row === -1 && highlight.col >= 0) {
|
124
124
|
this.sort(this.getNextSortConfig(highlight.col, APPEND_COLUMN_CONFIG_STRATEGY));
|
125
125
|
}
|
@@ -129,8 +129,8 @@ export class MultiColumnSorting extends ColumnSorting {
|
|
129
129
|
},
|
130
130
|
runOnlyIf: () => {
|
131
131
|
var _this$hot$getSelected, _this$hot$getSelected2;
|
132
|
-
const highlight = (_this$hot$getSelected = this.hot.
|
133
|
-
return highlight && ((_this$hot$getSelected2 = this.hot.
|
132
|
+
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeActive()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
133
|
+
return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeActive()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
|
134
134
|
},
|
135
135
|
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
136
136
|
position: 'before',
|
@@ -89,7 +89,7 @@ class MultipleSelectionHandles extends _base.BasePlugin {
|
|
89
89
|
this.eventManager.addEventListener(rootElement, 'touchstart', event => {
|
90
90
|
let selectedRange;
|
91
91
|
if ((0, _element.hasClass)(event.target, 'topSelectionHandle-HitArea')) {
|
92
|
-
selectedRange = _this.hot.
|
92
|
+
selectedRange = _this.hot.getSelectedRangeActive();
|
93
93
|
_this.dragged.push('top');
|
94
94
|
_this.touchStartRange = {
|
95
95
|
width: selectedRange.getWidth(),
|
@@ -99,7 +99,7 @@ class MultipleSelectionHandles extends _base.BasePlugin {
|
|
99
99
|
event.preventDefault();
|
100
100
|
return false;
|
101
101
|
} else if ((0, _element.hasClass)(event.target, 'bottomSelectionHandle-HitArea')) {
|
102
|
-
selectedRange = _this.hot.
|
102
|
+
selectedRange = _this.hot.getSelectedRangeActive();
|
103
103
|
_this.dragged.push('bottom');
|
104
104
|
_this.touchStartRange = {
|
105
105
|
width: selectedRange.getWidth(),
|
@@ -145,7 +145,7 @@ class MultipleSelectionHandles extends _base.BasePlugin {
|
|
145
145
|
if (targetCoords.col === -1) {
|
146
146
|
targetCoords.col = 0;
|
147
147
|
}
|
148
|
-
selectedRange = _this.hot.
|
148
|
+
selectedRange = _this.hot.getSelectedRangeActive();
|
149
149
|
rangeWidth = selectedRange.getWidth();
|
150
150
|
rangeHeight = selectedRange.getHeight();
|
151
151
|
rangeDirection = selectedRange.getDirection();
|