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,331 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
|
-
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
3
|
-
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
4
|
-
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
5
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
6
|
-
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
7
|
-
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
8
|
-
import { mixin, createObjectPropListener } from "../helpers/object.mjs";
|
9
|
-
import localHooks from "./../mixins/localHooks.mjs";
|
10
|
-
/**
|
11
|
-
* The Transformation class implements algorithms for transforming coordinates based on current settings
|
12
|
-
* passed to the Handsontable. The class performs the calculations based on the renderable indexes.
|
13
|
-
*
|
14
|
-
* Transformation is always applied relative to the current selection.
|
15
|
-
*
|
16
|
-
* The class operates on a table size defined by the renderable indexes. If the `navigableHeaders`
|
17
|
-
* option is enabled, the table size is increased by the number of row and/or column headers.
|
18
|
-
* Because the headers are treated as cells as part of the table size (indexes always go from 0 to N),
|
19
|
-
* the algorithm can be written as simply as possible (without new if's that distinguish the headers
|
20
|
-
* logic).
|
21
|
-
*
|
22
|
-
* @class Transformation
|
23
|
-
* @util
|
24
|
-
*/
|
25
|
-
var _range = /*#__PURE__*/new WeakMap();
|
26
|
-
var _options = /*#__PURE__*/new WeakMap();
|
27
|
-
var _offset = /*#__PURE__*/new WeakMap();
|
28
|
-
var _Transformation_brand = /*#__PURE__*/new WeakSet();
|
29
|
-
class Transformation {
|
30
|
-
constructor(range, options) {
|
31
|
-
/**
|
32
|
-
* Clamps the coords to make sure they points to the cell (or header) in the table range.
|
33
|
-
*
|
34
|
-
* @param {CellCoords} zeroBasedCoords The coords object to clamp.
|
35
|
-
* @returns {{rowDir: 1|0|-1, colDir: 1|0|-1}}
|
36
|
-
*/
|
37
|
-
_classPrivateMethodInitSpec(this, _Transformation_brand);
|
38
|
-
/**
|
39
|
-
* Instance of the SelectionRange, holder for visual coordinates applied to the table.
|
40
|
-
*
|
41
|
-
* @type {SelectionRange}
|
42
|
-
*/
|
43
|
-
_classPrivateFieldInitSpec(this, _range, void 0);
|
44
|
-
/**
|
45
|
-
* Additional options which define the state of the settings which can infer transformation and
|
46
|
-
* give the possibility to translate indexes.
|
47
|
-
*
|
48
|
-
* @type {object}
|
49
|
-
*/
|
50
|
-
_classPrivateFieldInitSpec(this, _options, void 0);
|
51
|
-
/**
|
52
|
-
* Increases the table size by applying the offsets. The option is used by the `navigableHeaders`
|
53
|
-
* option.
|
54
|
-
*
|
55
|
-
* @type {{ x: number, y: number }}
|
56
|
-
*/
|
57
|
-
_classPrivateFieldInitSpec(this, _offset, {
|
58
|
-
x: 0,
|
59
|
-
y: 0
|
60
|
-
});
|
61
|
-
_classPrivateFieldSet(_range, this, range);
|
62
|
-
_classPrivateFieldSet(_options, this, options);
|
63
|
-
}
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Selects cell relative to the current cell (if possible).
|
67
|
-
*
|
68
|
-
* @param {number} rowDelta Rows number to move, value can be passed as negative number.
|
69
|
-
* @param {number} colDelta Columns number to move, value can be passed as negative number.
|
70
|
-
* @param {boolean} [createMissingRecords=false] If `true` the new rows/columns will be created if necessary. Otherwise, row/column will
|
71
|
-
* be created according to `minSpareRows/minSpareCols` settings of Handsontable.
|
72
|
-
* @returns {CellCoords} Visual coordinates after transformation.
|
73
|
-
*/
|
74
|
-
transformStart(rowDelta, colDelta) {
|
75
|
-
let createMissingRecords = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
76
|
-
const delta = _classPrivateFieldGet(_options, this).createCellCoords(rowDelta, colDelta);
|
77
|
-
let visualCoords = _classPrivateFieldGet(_range, this).current().highlight;
|
78
|
-
const highlightRenderableCoords = _classPrivateFieldGet(_options, this).visualToRenderableCoords(visualCoords);
|
79
|
-
let rowTransformDir = 0;
|
80
|
-
let colTransformDir = 0;
|
81
|
-
this.runLocalHooks('beforeTransformStart', delta);
|
82
|
-
if (highlightRenderableCoords.row !== null && highlightRenderableCoords.col !== null) {
|
83
|
-
const {
|
84
|
-
width,
|
85
|
-
height
|
86
|
-
} = _assertClassBrand(_Transformation_brand, this, _getTableSize).call(this);
|
87
|
-
const {
|
88
|
-
row,
|
89
|
-
col
|
90
|
-
} = _assertClassBrand(_Transformation_brand, this, _visualToZeroBasedCoords).call(this, visualCoords);
|
91
|
-
const fixedRowsBottom = _classPrivateFieldGet(_options, this).fixedRowsBottom();
|
92
|
-
const minSpareRows = _classPrivateFieldGet(_options, this).minSpareRows();
|
93
|
-
const minSpareCols = _classPrivateFieldGet(_options, this).minSpareCols();
|
94
|
-
const autoWrapRow = _classPrivateFieldGet(_options, this).autoWrapRow();
|
95
|
-
const autoWrapCol = _classPrivateFieldGet(_options, this).autoWrapCol();
|
96
|
-
const zeroBasedCoords = _classPrivateFieldGet(_options, this).createCellCoords(row + delta.row, col + delta.col);
|
97
|
-
if (zeroBasedCoords.row >= height) {
|
98
|
-
const isActionInterrupted = createObjectPropListener(createMissingRecords && minSpareRows > 0 && fixedRowsBottom === 0);
|
99
|
-
const nextColumn = zeroBasedCoords.col + 1;
|
100
|
-
const newCoords = _classPrivateFieldGet(_options, this).createCellCoords(zeroBasedCoords.row - height, nextColumn >= width ? nextColumn - width : nextColumn);
|
101
|
-
this.runLocalHooks('beforeColumnWrap', isActionInterrupted, _assertClassBrand(_Transformation_brand, this, _zeroBasedToVisualCoords).call(this, newCoords), nextColumn >= width);
|
102
|
-
if (isActionInterrupted.value) {
|
103
|
-
this.runLocalHooks('insertRowRequire', _classPrivateFieldGet(_options, this).countRenderableRows());
|
104
|
-
} else if (autoWrapCol) {
|
105
|
-
zeroBasedCoords.assign(newCoords);
|
106
|
-
}
|
107
|
-
} else if (zeroBasedCoords.row < 0) {
|
108
|
-
const isActionInterrupted = createObjectPropListener(autoWrapCol);
|
109
|
-
const previousColumn = zeroBasedCoords.col - 1;
|
110
|
-
const newCoords = _classPrivateFieldGet(_options, this).createCellCoords(height + zeroBasedCoords.row, previousColumn < 0 ? width + previousColumn : previousColumn);
|
111
|
-
this.runLocalHooks('beforeColumnWrap', isActionInterrupted, _assertClassBrand(_Transformation_brand, this, _zeroBasedToVisualCoords).call(this, newCoords), previousColumn < 0);
|
112
|
-
if (autoWrapCol) {
|
113
|
-
zeroBasedCoords.assign(newCoords);
|
114
|
-
}
|
115
|
-
}
|
116
|
-
if (zeroBasedCoords.col >= width) {
|
117
|
-
const isActionInterrupted = createObjectPropListener(createMissingRecords && minSpareCols > 0);
|
118
|
-
const nextRow = zeroBasedCoords.row + 1;
|
119
|
-
const newCoords = _classPrivateFieldGet(_options, this).createCellCoords(nextRow >= height ? nextRow - height : nextRow, zeroBasedCoords.col - width);
|
120
|
-
this.runLocalHooks('beforeRowWrap', isActionInterrupted, _assertClassBrand(_Transformation_brand, this, _zeroBasedToVisualCoords).call(this, newCoords), nextRow >= height);
|
121
|
-
if (isActionInterrupted.value) {
|
122
|
-
this.runLocalHooks('insertColRequire', _classPrivateFieldGet(_options, this).countRenderableColumns());
|
123
|
-
} else if (autoWrapRow) {
|
124
|
-
zeroBasedCoords.assign(newCoords);
|
125
|
-
}
|
126
|
-
} else if (zeroBasedCoords.col < 0) {
|
127
|
-
const isActionInterrupted = createObjectPropListener(autoWrapRow);
|
128
|
-
const previousRow = zeroBasedCoords.row - 1;
|
129
|
-
const newCoords = _classPrivateFieldGet(_options, this).createCellCoords(previousRow < 0 ? height + previousRow : previousRow, width + zeroBasedCoords.col);
|
130
|
-
this.runLocalHooks('beforeRowWrap', isActionInterrupted, _assertClassBrand(_Transformation_brand, this, _zeroBasedToVisualCoords).call(this, newCoords), previousRow < 0);
|
131
|
-
if (autoWrapRow) {
|
132
|
-
zeroBasedCoords.assign(newCoords);
|
133
|
-
}
|
134
|
-
}
|
135
|
-
const {
|
136
|
-
rowDir,
|
137
|
-
colDir
|
138
|
-
} = _assertClassBrand(_Transformation_brand, this, _clampCoords).call(this, zeroBasedCoords);
|
139
|
-
rowTransformDir = rowDir;
|
140
|
-
colTransformDir = colDir;
|
141
|
-
visualCoords = _assertClassBrand(_Transformation_brand, this, _zeroBasedToVisualCoords).call(this, zeroBasedCoords);
|
142
|
-
}
|
143
|
-
this.runLocalHooks('afterTransformStart', visualCoords, rowTransformDir, colTransformDir);
|
144
|
-
return visualCoords;
|
145
|
-
}
|
146
|
-
|
147
|
-
/**
|
148
|
-
* Sets selection end cell relative to the current selection end cell (if possible).
|
149
|
-
*
|
150
|
-
* @param {number} rowDelta Rows number to move, value can be passed as negative number.
|
151
|
-
* @param {number} colDelta Columns number to move, value can be passed as negative number.
|
152
|
-
* @returns {CellCoords} Visual coordinates after transformation.
|
153
|
-
*/
|
154
|
-
transformEnd(rowDelta, colDelta) {
|
155
|
-
const delta = _classPrivateFieldGet(_options, this).createCellCoords(rowDelta, colDelta);
|
156
|
-
const cellRange = _classPrivateFieldGet(_range, this).current();
|
157
|
-
const highlightRenderableCoords = _classPrivateFieldGet(_options, this).visualToRenderableCoords(cellRange.highlight);
|
158
|
-
const toRow = _assertClassBrand(_Transformation_brand, this, _findFirstNonHiddenZeroBasedRow).call(this, cellRange.to.row, cellRange.from.row);
|
159
|
-
const toColumn = _assertClassBrand(_Transformation_brand, this, _findFirstNonHiddenZeroBasedColumn).call(this, cellRange.to.col, cellRange.from.col);
|
160
|
-
const visualCoords = cellRange.to.clone();
|
161
|
-
let rowTransformDir = 0;
|
162
|
-
let colTransformDir = 0;
|
163
|
-
this.runLocalHooks('beforeTransformEnd', delta);
|
164
|
-
if (highlightRenderableCoords.row !== null && highlightRenderableCoords.col !== null && toRow !== null && toColumn !== null) {
|
165
|
-
const {
|
166
|
-
row: highlightRow,
|
167
|
-
col: highlightColumn
|
168
|
-
} = _assertClassBrand(_Transformation_brand, this, _visualToZeroBasedCoords).call(this, cellRange.highlight);
|
169
|
-
const coords = _classPrivateFieldGet(_options, this).createCellCoords(toRow + delta.row, toColumn + delta.col);
|
170
|
-
const topStartCorner = cellRange.getTopStartCorner();
|
171
|
-
const topEndCorner = cellRange.getTopEndCorner();
|
172
|
-
const bottomEndCorner = cellRange.getBottomEndCorner();
|
173
|
-
if (delta.col < 0 && toColumn >= highlightColumn && coords.col < highlightColumn) {
|
174
|
-
const columnRestDelta = coords.col - highlightColumn;
|
175
|
-
coords.col = _assertClassBrand(_Transformation_brand, this, _findFirstNonHiddenZeroBasedColumn).call(this, topStartCorner.col, topEndCorner.col) + columnRestDelta;
|
176
|
-
} else if (delta.col > 0 && toColumn <= highlightColumn && coords.col > highlightColumn) {
|
177
|
-
const endColumnIndex = _assertClassBrand(_Transformation_brand, this, _findFirstNonHiddenZeroBasedColumn).call(this, topEndCorner.col, topStartCorner.col);
|
178
|
-
const columnRestDelta = Math.max(coords.col - endColumnIndex, 1);
|
179
|
-
coords.col = endColumnIndex + columnRestDelta;
|
180
|
-
}
|
181
|
-
if (delta.row < 0 && toRow >= highlightRow && coords.row < highlightRow) {
|
182
|
-
const rowRestDelta = coords.row - highlightRow;
|
183
|
-
coords.row = _assertClassBrand(_Transformation_brand, this, _findFirstNonHiddenZeroBasedRow).call(this, topStartCorner.row, bottomEndCorner.row) + rowRestDelta;
|
184
|
-
} else if (delta.row > 0 && toRow <= highlightRow && coords.row > highlightRow) {
|
185
|
-
const bottomRowIndex = _assertClassBrand(_Transformation_brand, this, _findFirstNonHiddenZeroBasedRow).call(this, bottomEndCorner.row, topStartCorner.row);
|
186
|
-
const rowRestDelta = Math.max(coords.row - bottomRowIndex, 1);
|
187
|
-
coords.row = bottomRowIndex + rowRestDelta;
|
188
|
-
}
|
189
|
-
const {
|
190
|
-
rowDir,
|
191
|
-
colDir
|
192
|
-
} = _assertClassBrand(_Transformation_brand, this, _clampCoords).call(this, coords);
|
193
|
-
rowTransformDir = rowDir;
|
194
|
-
colTransformDir = colDir;
|
195
|
-
const newVisualCoords = _assertClassBrand(_Transformation_brand, this, _zeroBasedToVisualCoords).call(this, coords);
|
196
|
-
if (delta.row === 0 && delta.col !== 0) {
|
197
|
-
visualCoords.col = newVisualCoords.col;
|
198
|
-
} else if (delta.row !== 0 && delta.col === 0) {
|
199
|
-
visualCoords.row = newVisualCoords.row;
|
200
|
-
} else {
|
201
|
-
visualCoords.row = newVisualCoords.row;
|
202
|
-
visualCoords.col = newVisualCoords.col;
|
203
|
-
}
|
204
|
-
}
|
205
|
-
this.runLocalHooks('afterTransformEnd', visualCoords, rowTransformDir, colTransformDir);
|
206
|
-
return visualCoords;
|
207
|
-
}
|
208
|
-
|
209
|
-
/**
|
210
|
-
* Sets the additional offset in table size that may occur when the `navigableHeaders` option
|
211
|
-
* is enabled.
|
212
|
-
*
|
213
|
-
* @param {{x: number, y: number}} offset Offset as x and y properties.
|
214
|
-
*/
|
215
|
-
setOffsetSize(_ref) {
|
216
|
-
let {
|
217
|
-
x,
|
218
|
-
y
|
219
|
-
} = _ref;
|
220
|
-
_classPrivateFieldSet(_offset, this, {
|
221
|
-
x,
|
222
|
-
y
|
223
|
-
});
|
224
|
-
}
|
225
|
-
|
226
|
-
/**
|
227
|
-
* Resets the offset size to the default values.
|
228
|
-
*/
|
229
|
-
resetOffsetSize() {
|
230
|
-
_classPrivateFieldSet(_offset, this, {
|
231
|
-
x: 0,
|
232
|
-
y: 0
|
233
|
-
});
|
234
|
-
}
|
235
|
-
}
|
236
|
-
function _clampCoords(zeroBasedCoords) {
|
237
|
-
const {
|
238
|
-
width,
|
239
|
-
height
|
240
|
-
} = _assertClassBrand(_Transformation_brand, this, _getTableSize).call(this);
|
241
|
-
let rowDir = 0;
|
242
|
-
let colDir = 0;
|
243
|
-
if (zeroBasedCoords.row < 0) {
|
244
|
-
rowDir = -1;
|
245
|
-
zeroBasedCoords.row = 0;
|
246
|
-
} else if (zeroBasedCoords.row > 0 && zeroBasedCoords.row >= height) {
|
247
|
-
rowDir = 1;
|
248
|
-
zeroBasedCoords.row = height - 1;
|
249
|
-
}
|
250
|
-
if (zeroBasedCoords.col < 0) {
|
251
|
-
colDir = -1;
|
252
|
-
zeroBasedCoords.col = 0;
|
253
|
-
} else if (zeroBasedCoords.col > 0 && zeroBasedCoords.col >= width) {
|
254
|
-
colDir = 1;
|
255
|
-
zeroBasedCoords.col = width - 1;
|
256
|
-
}
|
257
|
-
return {
|
258
|
-
rowDir,
|
259
|
-
colDir
|
260
|
-
};
|
261
|
-
}
|
262
|
-
/**
|
263
|
-
* Gets the table size in number of rows with headers as "height" and number of columns with
|
264
|
-
* headers as "width".
|
265
|
-
*
|
266
|
-
* @returns {{width: number, height: number}}
|
267
|
-
*/
|
268
|
-
function _getTableSize() {
|
269
|
-
return {
|
270
|
-
width: _classPrivateFieldGet(_offset, this).x + _classPrivateFieldGet(_options, this).countRenderableColumns(),
|
271
|
-
height: _classPrivateFieldGet(_offset, this).y + _classPrivateFieldGet(_options, this).countRenderableRows()
|
272
|
-
};
|
273
|
-
}
|
274
|
-
/**
|
275
|
-
* Finds the first non-hidden zero-based row in the table range.
|
276
|
-
*
|
277
|
-
* @param {number} visualRowFrom The visual row from which the search should start.
|
278
|
-
* @param {number} visualRowTo The visual row to which the search should end.
|
279
|
-
* @returns {number | null}
|
280
|
-
*/
|
281
|
-
function _findFirstNonHiddenZeroBasedRow(visualRowFrom, visualRowTo) {
|
282
|
-
const row = _classPrivateFieldGet(_options, this).findFirstNonHiddenRenderableRow(visualRowFrom, visualRowTo);
|
283
|
-
if (row === null) {
|
284
|
-
return null;
|
285
|
-
}
|
286
|
-
return _classPrivateFieldGet(_offset, this).y + row;
|
287
|
-
}
|
288
|
-
/**
|
289
|
-
* Finds the first non-hidden zero-based column in the table range.
|
290
|
-
*
|
291
|
-
* @param {number} visualColumnFrom The visual column from which the search should start.
|
292
|
-
* @param {number} visualColumnTo The visual column to which the search should end.
|
293
|
-
* @returns {number | null}
|
294
|
-
*/
|
295
|
-
function _findFirstNonHiddenZeroBasedColumn(visualColumnFrom, visualColumnTo) {
|
296
|
-
const column = _classPrivateFieldGet(_options, this).findFirstNonHiddenRenderableColumn(visualColumnFrom, visualColumnTo);
|
297
|
-
if (column === null) {
|
298
|
-
return null;
|
299
|
-
}
|
300
|
-
return _classPrivateFieldGet(_offset, this).x + column;
|
301
|
-
}
|
302
|
-
/**
|
303
|
-
* Translates the visual coordinates to zero-based ones.
|
304
|
-
*
|
305
|
-
* @param {CellCoords} visualCoords The visual coords to process.
|
306
|
-
* @returns {CellCoords}
|
307
|
-
*/
|
308
|
-
function _visualToZeroBasedCoords(visualCoords) {
|
309
|
-
const {
|
310
|
-
row,
|
311
|
-
col
|
312
|
-
} = _classPrivateFieldGet(_options, this).visualToRenderableCoords(visualCoords);
|
313
|
-
if (row === null || col === null) {
|
314
|
-
throw new Error('Renderable coords are not visible.');
|
315
|
-
}
|
316
|
-
return _classPrivateFieldGet(_options, this).createCellCoords(_classPrivateFieldGet(_offset, this).y + row, _classPrivateFieldGet(_offset, this).x + col);
|
317
|
-
}
|
318
|
-
/**
|
319
|
-
* Translates the zero-based coordinates to visual ones.
|
320
|
-
*
|
321
|
-
* @param {CellCoords} zeroBasedCoords The coordinates to process.
|
322
|
-
* @returns {CellCoords}
|
323
|
-
*/
|
324
|
-
function _zeroBasedToVisualCoords(zeroBasedCoords) {
|
325
|
-
const coords = zeroBasedCoords.clone();
|
326
|
-
coords.col = zeroBasedCoords.col - _classPrivateFieldGet(_offset, this).x;
|
327
|
-
coords.row = zeroBasedCoords.row - _classPrivateFieldGet(_offset, this).y;
|
328
|
-
return _classPrivateFieldGet(_options, this).renderableToVisualCoords(coords);
|
329
|
-
}
|
330
|
-
mixin(Transformation, localHooks);
|
331
|
-
export default Transformation;
|