handsontable 14.6.1-next-689aaa6-20241016 → 15.0.0-next-4472a60-20241203
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/calculator/calculationType/renderedColumns.js +23 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.mjs +23 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.js +23 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.mjs +23 -0
- package/3rdparty/walkontable/src/calculator/index.js +1 -2
- package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportBase.js +2 -0
- package/3rdparty/walkontable/src/calculator/viewportBase.mjs +2 -0
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
- package/3rdparty/walkontable/src/core/_base.js +29 -23
- package/3rdparty/walkontable/src/core/_base.mjs +29 -23
- package/3rdparty/walkontable/src/core/clone.js +1 -0
- package/3rdparty/walkontable/src/core/clone.mjs +1 -0
- package/3rdparty/walkontable/src/core/core.js +2 -0
- package/3rdparty/walkontable/src/core/core.mjs +2 -0
- package/3rdparty/walkontable/src/facade/core.js +12 -6
- package/3rdparty/walkontable/src/facade/core.mjs +12 -6
- package/3rdparty/walkontable/src/index.js +0 -1
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +8 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +8 -1
- package/3rdparty/walkontable/src/overlay/bottom.js +5 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +5 -6
- package/3rdparty/walkontable/src/overlay/index.js +2 -0
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -7
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +9 -8
- package/3rdparty/walkontable/src/overlay/top.js +9 -8
- package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
- package/3rdparty/walkontable/src/overlays.js +10 -26
- package/3rdparty/walkontable/src/overlays.mjs +10 -26
- package/3rdparty/walkontable/src/renderer/colGroup.js +1 -1
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/index.js +4 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +4 -2
- package/3rdparty/walkontable/src/renderer/table.js +13 -4
- package/3rdparty/walkontable/src/renderer/table.mjs +13 -4
- package/3rdparty/walkontable/src/scroll.js +46 -37
- package/3rdparty/walkontable/src/scroll.mjs +46 -37
- package/3rdparty/walkontable/src/selection/border/border.js +52 -58
- package/3rdparty/walkontable/src/selection/border/border.mjs +53 -59
- package/3rdparty/walkontable/src/selection/border/utils.js +26 -0
- package/3rdparty/walkontable/src/selection/border/utils.mjs +22 -0
- package/3rdparty/walkontable/src/selection/index.js +6 -4
- package/3rdparty/walkontable/src/selection/index.mjs +1 -1
- package/3rdparty/walkontable/src/selection/manager.js +3 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +3 -0
- package/3rdparty/walkontable/src/selection/scanner.js +46 -11
- package/3rdparty/walkontable/src/selection/scanner.mjs +46 -11
- package/3rdparty/walkontable/src/settings.js +8 -9
- package/3rdparty/walkontable/src/settings.mjs +8 -9
- package/3rdparty/walkontable/src/table/master.js +1 -1
- package/3rdparty/walkontable/src/table/master.mjs +2 -2
- package/3rdparty/walkontable/src/table.js +25 -36
- package/3rdparty/walkontable/src/table.mjs +25 -36
- package/3rdparty/walkontable/src/types.js +1 -0
- package/3rdparty/walkontable/src/types.mjs +1 -0
- package/3rdparty/walkontable/src/utils/column.js +1 -43
- package/3rdparty/walkontable/src/utils/column.mjs +1 -43
- package/3rdparty/walkontable/src/utils/stylesHandler.js +295 -0
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +291 -0
- package/3rdparty/walkontable/src/viewport.js +94 -91
- package/3rdparty/walkontable/src/viewport.mjs +95 -92
- package/CHANGELOG.md +36 -0
- package/README.md +1 -1
- package/base.js +4 -4
- package/base.mjs +3 -3
- package/core/focusCatcher/focusDetector.js +1 -0
- package/core/focusCatcher/focusDetector.mjs +1 -0
- package/core/hooks/bucket.js +184 -0
- package/core/hooks/bucket.mjs +180 -0
- package/{pluginHooks.mjs → core/hooks/constants.js} +38 -486
- package/{pluginHooks.js → core/hooks/constants.mjs} +34 -489
- package/{pluginHooks.d.ts → core/hooks/index.d.ts} +22 -25
- package/core/hooks/index.js +385 -0
- package/core/hooks/index.mjs +381 -0
- package/core/index.js +2 -0
- package/core.d.ts +5 -3
- package/core.js +77 -35
- package/core.mjs +69 -27
- package/dataMap/dataMap.js +3 -0
- package/dataMap/dataMap.mjs +3 -0
- package/dataMap/dataSource.js +2 -0
- package/dataMap/dataSource.mjs +2 -0
- package/dataMap/metaManager/index.js +2 -0
- package/dataMap/metaManager/index.mjs +2 -0
- package/dataMap/metaManager/metaSchema.js +91 -5
- package/dataMap/metaManager/metaSchema.mjs +91 -5
- package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -3
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +1 -1
- package/dataMap/metaManager/mods/extendMetaProperties.js +2 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +2 -0
- package/dist/handsontable.css +84 -72
- package/dist/handsontable.full.css +317 -304
- package/dist/handsontable.full.js +14826 -7294
- package/dist/handsontable.full.min.css +15 -10
- package/dist/handsontable.full.min.js +262 -69
- package/dist/handsontable.js +7826 -5552
- package/dist/handsontable.min.css +10 -6
- package/dist/handsontable.min.js +33 -33
- package/dist/languages/all.js +1 -1
- package/dist/languages/ar-AR.js +1 -1
- package/dist/languages/cs-CZ.js +1 -1
- package/dist/languages/de-CH.js +1 -1
- package/dist/languages/de-DE.js +1 -1
- package/dist/languages/en-US.js +1 -1
- package/dist/languages/es-MX.js +1 -1
- package/dist/languages/fr-FR.js +1 -1
- package/dist/languages/hr-HR.js +1 -1
- package/dist/languages/it-IT.js +1 -1
- package/dist/languages/ja-JP.js +1 -1
- package/dist/languages/ko-KR.js +1 -1
- package/dist/languages/lv-LV.js +1 -1
- package/dist/languages/nb-NO.js +1 -1
- package/dist/languages/nl-NL.js +1 -1
- package/dist/languages/pl-PL.js +1 -1
- package/dist/languages/pt-BR.js +1 -1
- package/dist/languages/ru-RU.js +1 -1
- package/dist/languages/sr-SP.js +1 -1
- package/dist/languages/zh-CN.js +1 -1
- package/dist/languages/zh-TW.js +1 -1
- package/editorManager.js +2 -2
- package/editorManager.mjs +2 -2
- package/editors/autocompleteEditor/autocompleteEditor.js +34 -16
- package/editors/autocompleteEditor/autocompleteEditor.mjs +34 -16
- package/editors/baseEditor/baseEditor.js +25 -18
- package/editors/baseEditor/baseEditor.mjs +26 -19
- package/editors/dateEditor/dateEditor.js +9 -0
- package/editors/dateEditor/dateEditor.mjs +10 -1
- package/editors/dropdownEditor/dropdownEditor.js +4 -3
- package/editors/dropdownEditor/dropdownEditor.mjs +3 -1
- package/editors/handsontableEditor/handsontableEditor.js +36 -2
- package/editors/handsontableEditor/handsontableEditor.mjs +36 -2
- package/editors/passwordEditor/passwordEditor.js +18 -0
- package/editors/passwordEditor/passwordEditor.mjs +18 -0
- package/editors/registry.js +2 -2
- package/editors/registry.mjs +1 -1
- package/editors/selectEditor/selectEditor.js +20 -9
- package/editors/selectEditor/selectEditor.mjs +20 -9
- package/editors/textEditor/textEditor.js +5 -12
- package/editors/textEditor/textEditor.mjs +6 -13
- package/focusManager.js +5 -7
- package/focusManager.mjs +5 -7
- package/helpers/array.js +2 -0
- package/helpers/array.mjs +2 -0
- package/helpers/data.js +3 -0
- package/helpers/data.mjs +3 -0
- package/helpers/dom/element.js +39 -18
- package/helpers/dom/element.mjs +38 -17
- package/helpers/mixed.js +3 -3
- package/helpers/mixed.mjs +3 -3
- package/helpers/moves.js +3 -0
- package/helpers/moves.mjs +3 -0
- package/helpers/number.js +1 -0
- package/helpers/number.mjs +1 -0
- package/helpers/object.js +2 -0
- package/helpers/object.mjs +2 -0
- package/helpers/themes.js +17 -0
- package/helpers/themes.mjs +13 -0
- package/i18n/index.js +2 -0
- package/i18n/languages/index.d.ts +8 -0
- package/i18n/languages/ja-JP.d.ts +1 -1
- package/i18n/phraseFormatters/substituteVariables.js +1 -0
- package/i18n/phraseFormatters/substituteVariables.mjs +1 -0
- package/index.d.ts +9 -1
- package/languages/all.js +1 -1
- package/languages/ar-AR.js +1 -1
- package/languages/cs-CZ.js +1 -1
- package/languages/de-CH.js +1 -1
- package/languages/de-DE.js +1 -1
- package/languages/en-US.js +1 -1
- package/languages/es-MX.js +1 -1
- package/languages/fr-FR.js +1 -1
- package/languages/hr-HR.js +1 -1
- package/languages/index.js +1 -1
- package/languages/it-IT.js +1 -1
- package/languages/ja-JP.js +1 -1
- package/languages/ko-KR.js +1 -1
- package/languages/lv-LV.js +1 -1
- package/languages/nb-NO.js +1 -1
- package/languages/nl-NL.js +1 -1
- package/languages/pl-PL.js +1 -1
- package/languages/pt-BR.js +1 -1
- package/languages/ru-RU.js +1 -1
- package/languages/sr-SP.js +1 -1
- package/languages/zh-CN.js +1 -1
- package/languages/zh-TW.js +1 -1
- package/package.json +22 -7
- package/plugins/autoColumnSize/autoColumnSize.js +22 -27
- package/plugins/autoColumnSize/autoColumnSize.mjs +22 -27
- package/plugins/autoRowSize/autoRowSize.js +20 -22
- package/plugins/autoRowSize/autoRowSize.mjs +21 -23
- package/plugins/autofill/autofill.js +4 -5
- package/plugins/autofill/autofill.mjs +1 -1
- package/plugins/base/base.d.ts +1 -1
- package/plugins/base/base.js +41 -0
- package/plugins/base/base.mjs +42 -1
- package/plugins/base/index.js +2 -1
- package/plugins/base/index.mjs +1 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -5
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -5
- package/plugins/columnSorting/columnSorting.js +5 -4
- package/plugins/columnSorting/columnSorting.mjs +3 -1
- package/plugins/columnSorting/columnStatesManager.js +1 -0
- package/plugins/columnSorting/columnStatesManager.mjs +1 -0
- package/plugins/columnSorting/utils.js +3 -0
- package/plugins/columnSorting/utils.mjs +3 -0
- package/plugins/columnSummary/endpoints.js +3 -0
- package/plugins/columnSummary/endpoints.mjs +3 -0
- package/plugins/comments/commentEditor.js +9 -0
- package/plugins/comments/commentEditor.mjs +9 -0
- package/plugins/comments/comments.js +24 -18
- package/plugins/comments/comments.mjs +26 -20
- package/plugins/comments/editorResizeObserver.js +2 -0
- package/plugins/comments/editorResizeObserver.mjs +2 -0
- package/plugins/contextMenu/contextMenu.d.ts +2 -1
- package/plugins/contextMenu/contextMenu.js +6 -7
- package/plugins/contextMenu/contextMenu.mjs +1 -1
- package/plugins/contextMenu/menu/index.js +2 -0
- package/plugins/contextMenu/menu/menu.js +10 -5
- package/plugins/contextMenu/menu/menu.mjs +11 -6
- package/plugins/contextMenu/menu/positioner.js +4 -2
- package/plugins/contextMenu/menu/positioner.mjs +4 -2
- package/plugins/contextMenu/menu/shortcuts.js +3 -1
- package/plugins/contextMenu/menu/shortcuts.mjs +3 -1
- package/plugins/contextMenu/predefinedItems/alignment.js +7 -84
- package/plugins/contextMenu/predefinedItems/alignment.mjs +8 -85
- package/plugins/contextMenu/utils.js +0 -10
- package/plugins/contextMenu/utils.mjs +0 -9
- package/plugins/copyPaste/copyPaste.d.ts +1 -0
- package/plugins/copyPaste/copyPaste.js +32 -23
- package/plugins/copyPaste/copyPaste.mjs +24 -15
- package/plugins/customBorders/utils.js +2 -0
- package/plugins/customBorders/utils.mjs +2 -0
- package/plugins/dropdownMenu/dropdownMenu.d.ts +2 -1
- package/plugins/dropdownMenu/dropdownMenu.js +6 -7
- package/plugins/dropdownMenu/dropdownMenu.mjs +1 -1
- package/plugins/exportFile/types/csv.js +1 -0
- package/plugins/exportFile/types/csv.mjs +1 -0
- package/plugins/filters/component/condition.js +2 -0
- package/plugins/filters/component/condition.mjs +2 -0
- package/plugins/filters/component/operators.js +2 -0
- package/plugins/filters/component/operators.mjs +2 -0
- package/plugins/filters/component/value.js +3 -0
- package/plugins/filters/component/value.mjs +3 -0
- package/plugins/filters/conditionCollection.js +3 -0
- package/plugins/filters/conditionCollection.mjs +3 -0
- package/plugins/filters/conditionUpdateObserver.js +2 -0
- package/plugins/filters/conditionUpdateObserver.mjs +2 -0
- package/plugins/filters/filters.js +43 -13
- package/plugins/filters/filters.mjs +43 -13
- package/plugins/filters/logicalOperations/conjunction.js +2 -0
- package/plugins/filters/logicalOperations/conjunction.mjs +2 -0
- package/plugins/filters/logicalOperations/disjunction.js +2 -0
- package/plugins/filters/logicalOperations/disjunction.mjs +2 -0
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +2 -0
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.mjs +2 -0
- package/plugins/filters/menu/focusController.js +38 -14
- package/plugins/filters/menu/focusController.mjs +38 -14
- package/plugins/filters/ui/multipleSelect.js +10 -0
- package/plugins/filters/ui/multipleSelect.mjs +10 -0
- package/plugins/formulas/engine/register.js +3 -0
- package/plugins/formulas/engine/register.mjs +3 -0
- package/plugins/formulas/engine/settings.js +3 -0
- package/plugins/formulas/engine/settings.mjs +3 -0
- package/plugins/formulas/formulas.js +12 -7
- package/plugins/formulas/formulas.mjs +6 -1
- package/plugins/formulas/indexSyncer/axisSyncer.js +3 -0
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +3 -0
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -0
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -0
- package/plugins/hiddenColumns/hiddenColumns.js +22 -30
- package/plugins/hiddenColumns/hiddenColumns.mjs +18 -26
- package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -0
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -0
- package/plugins/hiddenRows/hiddenRows.js +21 -29
- package/plugins/hiddenRows/hiddenRows.mjs +17 -25
- package/plugins/index.d.ts +3 -0
- package/plugins/index.js +3 -0
- package/plugins/index.mjs +3 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +7 -5
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +3 -1
- package/plugins/manualColumnMove/manualColumnMove.js +6 -6
- package/plugins/manualColumnMove/manualColumnMove.mjs +4 -4
- package/plugins/manualColumnResize/manualColumnResize.js +26 -12
- package/plugins/manualColumnResize/manualColumnResize.mjs +26 -12
- package/plugins/manualRowMove/manualRowMove.js +8 -6
- package/plugins/manualRowMove/manualRowMove.mjs +6 -4
- package/plugins/manualRowResize/manualRowResize.js +3 -2
- package/plugins/manualRowResize/manualRowResize.mjs +4 -3
- package/plugins/mergeCells/cellsCollection.js +19 -3
- package/plugins/mergeCells/cellsCollection.mjs +20 -4
- package/plugins/mergeCells/mergeCells.d.ts +6 -2
- package/plugins/mergeCells/mergeCells.js +84 -56
- package/plugins/mergeCells/mergeCells.mjs +82 -54
- package/plugins/mergeCells/renderer.js +13 -3
- package/plugins/mergeCells/renderer.mjs +13 -3
- package/plugins/multiColumnSorting/domHelpers.js +2 -0
- package/plugins/multiColumnSorting/domHelpers.mjs +2 -0
- package/plugins/nestedHeaders/nestedHeaders.js +63 -16
- package/plugins/nestedHeaders/nestedHeaders.mjs +63 -16
- package/plugins/nestedHeaders/stateManager/index.js +1 -0
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -0
- package/plugins/nestedRows/nestedRows.js +3 -0
- package/plugins/nestedRows/nestedRows.mjs +3 -0
- package/plugins/nestedRows/ui/headers.js +7 -1
- package/plugins/nestedRows/ui/headers.mjs +7 -1
- package/plugins/nestedRows/utils/rowMoveController.js +4 -0
- package/plugins/nestedRows/utils/rowMoveController.mjs +4 -0
- package/plugins/persistentState/persistentState.js +4 -4
- package/plugins/persistentState/persistentState.mjs +1 -1
- package/plugins/stretchColumns/calculator.js +162 -0
- package/plugins/stretchColumns/calculator.mjs +158 -0
- package/plugins/stretchColumns/index.d.ts +1 -0
- package/plugins/stretchColumns/index.js +7 -0
- package/plugins/stretchColumns/index.mjs +1 -0
- package/plugins/stretchColumns/strategies/_base.js +85 -0
- package/plugins/stretchColumns/strategies/_base.mjs +81 -0
- package/plugins/stretchColumns/strategies/all.js +71 -0
- package/plugins/stretchColumns/strategies/all.mjs +67 -0
- package/plugins/stretchColumns/strategies/last.js +79 -0
- package/plugins/stretchColumns/strategies/last.mjs +75 -0
- package/plugins/stretchColumns/stretchColumns.d.ts +11 -0
- package/plugins/stretchColumns/stretchColumns.js +222 -0
- package/plugins/stretchColumns/stretchColumns.mjs +218 -0
- package/plugins/trimRows/trimRows.js +2 -0
- package/plugins/trimRows/trimRows.mjs +2 -0
- package/plugins/undoRedo/undoRedo.js +9 -5
- package/plugins/undoRedo/undoRedo.mjs +8 -3
- package/renderers/checkboxRenderer/checkboxRenderer.js +19 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +18 -7
- package/selection/index.js +2 -0
- package/selection/range.js +2 -0
- package/selection/range.mjs +2 -0
- package/selection/selection.js +7 -2
- package/selection/selection.mjs +7 -2
- package/selection/utils.js +2 -0
- package/selection/utils.mjs +2 -0
- package/settings.d.ts +4 -1
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +1 -1
- package/shortcutContexts/commands/index.js +2 -0
- package/shortcutContexts/commands/index.mjs +2 -0
- package/shortcutContexts/commands/scrollToFocusedCell.js +4 -4
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +4 -4
- package/shortcutContexts/index.js +2 -0
- package/shortcutContexts/index.mjs +2 -0
- package/shortcuts/context.js +3 -0
- package/shortcuts/context.mjs +3 -0
- package/shortcuts/recorder.js +3 -3
- package/shortcuts/recorder.mjs +3 -3
- package/shortcuts/utils.js +1 -0
- package/shortcuts/utils.mjs +1 -0
- package/styles/handsontable.css +2307 -0
- package/styles/handsontable.min.css +30 -0
- package/styles/ht-theme-horizon.css +607 -0
- package/styles/ht-theme-horizon.min.css +30 -0
- package/styles/ht-theme-main.css +613 -0
- package/styles/ht-theme-main.min.css +30 -0
- package/tableView.js +205 -33
- package/tableView.mjs +206 -34
- package/translations/changesObservable/observable.js +2 -0
- package/translations/changesObservable/observable.mjs +2 -0
- package/translations/index.js +2 -0
- package/translations/indexMapper.js +4 -0
- package/translations/indexMapper.mjs +4 -0
- package/translations/mapCollections/index.js +2 -0
- package/translations/mapCollections/mapCollection.js +2 -0
- package/translations/mapCollections/mapCollection.mjs +2 -0
- package/translations/maps/index.js +2 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.js +1 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +1 -0
- package/translations/maps/utils/actionsOnIndexes.js +2 -0
- package/translations/maps/utils/actionsOnIndexes.mjs +2 -0
- package/translations/maps/utils/physicallyIndexed.js +1 -0
- package/translations/maps/utils/physicallyIndexed.mjs +1 -0
- package/utils/autoResize.js +11 -3
- package/utils/autoResize.mjs +11 -3
- package/utils/dataStructures/priorityMap.js +1 -0
- package/utils/dataStructures/priorityMap.mjs +1 -0
- package/utils/dataStructures/uniqueMap.js +2 -0
- package/utils/dataStructures/uniqueMap.mjs +2 -0
- package/utils/ghostTable.js +7 -3
- package/utils/ghostTable.mjs +7 -3
- package/utils/parseTable.js +4 -0
- package/utils/parseTable.mjs +4 -0
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -15
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -12
- package/3rdparty/walkontable/src/utils/columnStretching.js +0 -197
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +0 -193
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/esnext.iterator.map.js");
|
4
5
|
var _element = require("../../../helpers/dom/element");
|
5
6
|
var _object = require("../../../helpers/object");
|
6
7
|
var _calculator = require("./calculator");
|
@@ -27,7 +28,6 @@ class Viewport {
|
|
27
28
|
this.oversizedColumnHeaders = [];
|
28
29
|
this.hasOversizedColumnHeadersMarked = {};
|
29
30
|
this.clientHeight = 0;
|
30
|
-
this.containerWidth = NaN;
|
31
31
|
this.rowHeaderWidth = NaN;
|
32
32
|
this.rowsVisibleCalculator = null;
|
33
33
|
this.columnsVisibleCalculator = null;
|
@@ -56,55 +56,65 @@ class Viewport {
|
|
56
56
|
}
|
57
57
|
return height;
|
58
58
|
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* @returns {number}
|
62
|
+
*/
|
63
|
+
getViewportHeight() {
|
64
|
+
let containerHeight = this.getWorkspaceHeight();
|
65
|
+
if (containerHeight === Infinity) {
|
66
|
+
return containerHeight;
|
67
|
+
}
|
68
|
+
const columnHeaderHeight = this.getColumnHeaderHeight();
|
69
|
+
if (columnHeaderHeight > 0) {
|
70
|
+
containerHeight -= columnHeaderHeight;
|
71
|
+
}
|
72
|
+
return containerHeight;
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Gets the width of the table workspace (in pixels). The workspace size in the current
|
77
|
+
* implementation returns the width of the table holder element including scrollbar width when
|
78
|
+
* the table has defined size and the width of the window excluding scrollbar width when
|
79
|
+
* the table has no defined size (the window is a scrollable container).
|
80
|
+
*
|
81
|
+
* This is a bug, as the method should always return stable values, always without scrollbar width.
|
82
|
+
* Changing this behavior would break the column calculators, which would also need to be adjusted.
|
83
|
+
*
|
84
|
+
* @returns {number}
|
85
|
+
*/
|
59
86
|
getWorkspaceWidth() {
|
60
|
-
const {
|
61
|
-
wtSettings
|
62
|
-
} = this;
|
63
87
|
const {
|
64
88
|
rootDocument,
|
65
89
|
rootWindow
|
66
90
|
} = this.domBindings;
|
67
91
|
const trimmingContainer = this.dataAccessObject.inlineStartOverlayTrimmingContainer;
|
68
|
-
const docOffsetWidth = rootDocument.documentElement.offsetWidth;
|
69
|
-
const totalColumns = wtSettings.getSetting('totalColumns');
|
70
|
-
const preventOverflow = wtSettings.getSetting('preventOverflow');
|
71
|
-
const isRtl = wtSettings.getSetting('rtlMode');
|
72
|
-
const tableRect = this.wtTable.TABLE.getBoundingClientRect();
|
73
|
-
const inlineStart = isRtl ? tableRect.right - docOffsetWidth : tableRect.left;
|
74
|
-
const tableOffset = docOffsetWidth - inlineStart;
|
75
92
|
let width;
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
93
|
+
if (trimmingContainer === rootWindow) {
|
94
|
+
const totalColumns = this.wtSettings.getSetting('totalColumns');
|
95
|
+
width = this.wtTable.holder.offsetWidth;
|
96
|
+
if (this.getRowHeaderWidth() + this.sumColumnWidths(0, totalColumns) > width) {
|
97
|
+
width = rootDocument.documentElement.clientWidth;
|
98
|
+
}
|
82
99
|
} else {
|
83
|
-
width =
|
84
|
-
}
|
85
|
-
if (trimmingContainer === rootWindow && totalColumns > 0 && this.sumColumnWidths(0, totalColumns - 1) > width) {
|
86
|
-
// in case sum of column widths is higher than available stylesheet width, let's assume using the whole window
|
87
|
-
// otherwise continue below, which will allow stretching
|
88
|
-
// this is used in `scroll_window.html`
|
89
|
-
// TODO test me
|
90
|
-
return rootDocument.documentElement.clientWidth;
|
100
|
+
width = trimmingContainer.clientWidth;
|
91
101
|
}
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
102
|
+
return width;
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
* @returns {number}
|
107
|
+
*/
|
108
|
+
getViewportWidth() {
|
109
|
+
const containerWidth = this.getWorkspaceWidth();
|
110
|
+
if (containerWidth === Infinity) {
|
111
|
+
return containerWidth;
|
99
112
|
}
|
100
|
-
const
|
101
|
-
if (
|
102
|
-
|
103
|
-
return Math.max(width, (0, _element.outerWidth)(this.wtTable.TABLE));
|
113
|
+
const rowHeaderWidth = this.getRowHeaderWidth();
|
114
|
+
if (rowHeaderWidth > 0) {
|
115
|
+
return containerWidth - rowHeaderWidth;
|
104
116
|
}
|
105
|
-
|
106
|
-
// if stretching is used, return the actual container width, so the columns can fit inside it
|
107
|
-
return width;
|
117
|
+
return containerWidth;
|
108
118
|
}
|
109
119
|
|
110
120
|
/**
|
@@ -125,6 +135,24 @@ class Viewport {
|
|
125
135
|
return this.wtTable.hider.offsetWidth > this.getWorkspaceWidth();
|
126
136
|
}
|
127
137
|
|
138
|
+
/**
|
139
|
+
* Checks if the table uses the window as a viewport and if there is a vertical scrollbar.
|
140
|
+
*
|
141
|
+
* @returns {boolean}
|
142
|
+
*/
|
143
|
+
isVerticallyScrollableByWindow() {
|
144
|
+
return this.dataAccessObject.topOverlayTrimmingContainer === this.domBindings.rootWindow;
|
145
|
+
}
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Checks if the table uses the window as a viewport and if there is a horizontal scrollbar.
|
149
|
+
*
|
150
|
+
* @returns {boolean}
|
151
|
+
*/
|
152
|
+
isHorizontallyScrollableByWindow() {
|
153
|
+
return this.dataAccessObject.inlineStartOverlayTrimmingContainer === this.domBindings.rootWindow;
|
154
|
+
}
|
155
|
+
|
128
156
|
/**
|
129
157
|
* @param {number} from The visual column index from the width sum is start calculated.
|
130
158
|
* @param {number} length The length of the column to traverse.
|
@@ -140,24 +168,6 @@ class Viewport {
|
|
140
168
|
return sum;
|
141
169
|
}
|
142
170
|
|
143
|
-
/**
|
144
|
-
* @returns {number}
|
145
|
-
*/
|
146
|
-
getContainerFillWidth() {
|
147
|
-
if (this.containerWidth) {
|
148
|
-
return this.containerWidth;
|
149
|
-
}
|
150
|
-
const mainContainer = this.wtTable.holder;
|
151
|
-
const dummyElement = this.domBindings.rootDocument.createElement('div');
|
152
|
-
dummyElement.style.width = '100%';
|
153
|
-
dummyElement.style.height = '1px';
|
154
|
-
mainContainer.appendChild(dummyElement);
|
155
|
-
const fillWidth = dummyElement.offsetWidth;
|
156
|
-
this.containerWidth = fillWidth;
|
157
|
-
mainContainer.removeChild(dummyElement);
|
158
|
-
return fillWidth;
|
159
|
-
}
|
160
|
-
|
161
171
|
/**
|
162
172
|
* @returns {number}
|
163
173
|
*/
|
@@ -178,21 +188,6 @@ class Viewport {
|
|
178
188
|
return this.columnHeaderHeight;
|
179
189
|
}
|
180
190
|
|
181
|
-
/**
|
182
|
-
* @returns {number}
|
183
|
-
*/
|
184
|
-
getViewportHeight() {
|
185
|
-
let containerHeight = this.getWorkspaceHeight();
|
186
|
-
if (containerHeight === Infinity) {
|
187
|
-
return containerHeight;
|
188
|
-
}
|
189
|
-
const columnHeaderHeight = this.getColumnHeaderHeight();
|
190
|
-
if (columnHeaderHeight > 0) {
|
191
|
-
containerHeight -= columnHeaderHeight;
|
192
|
-
}
|
193
|
-
return containerHeight;
|
194
|
-
}
|
195
|
-
|
196
191
|
/**
|
197
192
|
* @returns {number}
|
198
193
|
*/
|
@@ -227,21 +222,6 @@ class Viewport {
|
|
227
222
|
return this.rowHeaderWidth;
|
228
223
|
}
|
229
224
|
|
230
|
-
/**
|
231
|
-
* @returns {number}
|
232
|
-
*/
|
233
|
-
getViewportWidth() {
|
234
|
-
const containerWidth = this.getWorkspaceWidth();
|
235
|
-
if (containerWidth === Infinity) {
|
236
|
-
return containerWidth;
|
237
|
-
}
|
238
|
-
const rowHeaderWidth = this.getRowHeaderWidth();
|
239
|
-
if (rowHeaderWidth > 0) {
|
240
|
-
return containerWidth - rowHeaderWidth;
|
241
|
-
}
|
242
|
-
return containerWidth;
|
243
|
-
}
|
244
|
-
|
245
225
|
/**
|
246
226
|
* Creates rows calculators. The type of the calculations can be chosen from the list:
|
247
227
|
* - 'rendered' Calculates rows that should be rendered within the current table's viewport;
|
@@ -284,6 +264,7 @@ class Viewport {
|
|
284
264
|
viewportHeight: height,
|
285
265
|
scrollOffset: pos,
|
286
266
|
totalRows: wtSettings.getSetting('totalRows'),
|
267
|
+
defaultRowHeight: this.instance.stylesHandler.getDefaultRowHeight(),
|
287
268
|
rowHeightFn: sourceRow => wtTable.getRowHeight(sourceRow),
|
288
269
|
overrideFn: wtSettings.getSettingPure('viewportRowCalculatorOverride'),
|
289
270
|
horizontalScrollbarHeight: scrollbarHeight
|
@@ -403,11 +384,22 @@ class Viewport {
|
|
403
384
|
}
|
404
385
|
const {
|
405
386
|
startRow: renderedStartRow,
|
406
|
-
endRow: renderedEndRow
|
387
|
+
endRow: renderedEndRow,
|
388
|
+
rowStartOffset,
|
389
|
+
rowEndOffset
|
407
390
|
} = this.rowsRenderCalculator;
|
391
|
+
const totalRows = this.wtSettings.getSetting('totalRows') - 1;
|
392
|
+
const renderingThreshold = this.wtSettings.getSetting('viewportRowRenderingThreshold');
|
393
|
+
if (Number.isInteger(renderingThreshold) && renderingThreshold > 0) {
|
394
|
+
startRow = Math.max(0, startRow - Math.min(rowStartOffset, renderingThreshold));
|
395
|
+
endRow = Math.min(totalRows, endRow + Math.min(rowEndOffset, renderingThreshold));
|
396
|
+
} else if (renderingThreshold === 'auto') {
|
397
|
+
startRow = Math.max(0, startRow - Math.ceil(rowStartOffset / 2));
|
398
|
+
endRow = Math.min(totalRows, endRow + Math.ceil(rowEndOffset / 2));
|
399
|
+
}
|
408
400
|
if (startRow < renderedStartRow || startRow === renderedStartRow && startRow > 0) {
|
409
401
|
return false;
|
410
|
-
} else if (endRow > renderedEndRow || endRow === renderedEndRow && endRow <
|
402
|
+
} else if (endRow > renderedEndRow || endRow === renderedEndRow && endRow < totalRows) {
|
411
403
|
return false;
|
412
404
|
}
|
413
405
|
return true;
|
@@ -441,11 +433,22 @@ class Viewport {
|
|
441
433
|
}
|
442
434
|
const {
|
443
435
|
startColumn: renderedStartColumn,
|
444
|
-
endColumn: renderedEndColumn
|
436
|
+
endColumn: renderedEndColumn,
|
437
|
+
columnStartOffset,
|
438
|
+
columnEndOffset
|
445
439
|
} = this.columnsRenderCalculator;
|
440
|
+
const totalColumns = this.wtSettings.getSetting('totalColumns') - 1;
|
441
|
+
const renderingThreshold = this.wtSettings.getSetting('viewportColumnRenderingThreshold');
|
442
|
+
if (Number.isInteger(renderingThreshold) && renderingThreshold > 0) {
|
443
|
+
startColumn = Math.max(0, startColumn - Math.min(columnStartOffset, renderingThreshold));
|
444
|
+
endColumn = Math.min(totalColumns, endColumn + Math.min(columnEndOffset, renderingThreshold));
|
445
|
+
} else if (renderingThreshold === 'auto') {
|
446
|
+
startColumn = Math.max(0, startColumn - Math.ceil(columnStartOffset / 2));
|
447
|
+
endColumn = Math.min(totalColumns, endColumn + Math.ceil(columnEndOffset / 2));
|
448
|
+
}
|
446
449
|
if (startColumn < renderedStartColumn || startColumn === renderedStartColumn && startColumn > 0) {
|
447
450
|
return false;
|
448
|
-
} else if (endColumn > renderedEndColumn || endColumn === renderedEndColumn && endColumn <
|
451
|
+
} else if (endColumn > renderedEndColumn || endColumn === renderedEndColumn && endColumn < totalColumns) {
|
449
452
|
return false;
|
450
453
|
}
|
451
454
|
return true;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import
|
1
|
+
import "core-js/modules/esnext.iterator.map.js";
|
2
|
+
import { getScrollbarWidth, offset, outerHeight, outerWidth } from "../../../helpers/dom/element.mjs";
|
2
3
|
import { objectEach } from "../../../helpers/object.mjs";
|
3
4
|
import { FullyVisibleColumnsCalculationType, FullyVisibleRowsCalculationType, PartiallyVisibleColumnsCalculationType, PartiallyVisibleRowsCalculationType, RenderedAllColumnsCalculationType, RenderedAllRowsCalculationType, RenderedColumnsCalculationType, RenderedRowsCalculationType, ViewportColumnsCalculator, ViewportRowsCalculator } from "./calculator/index.mjs";
|
4
5
|
/**
|
@@ -24,7 +25,6 @@ class Viewport {
|
|
24
25
|
this.oversizedColumnHeaders = [];
|
25
26
|
this.hasOversizedColumnHeadersMarked = {};
|
26
27
|
this.clientHeight = 0;
|
27
|
-
this.containerWidth = NaN;
|
28
28
|
this.rowHeaderWidth = NaN;
|
29
29
|
this.rowsVisibleCalculator = null;
|
30
30
|
this.columnsVisibleCalculator = null;
|
@@ -53,55 +53,65 @@ class Viewport {
|
|
53
53
|
}
|
54
54
|
return height;
|
55
55
|
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* @returns {number}
|
59
|
+
*/
|
60
|
+
getViewportHeight() {
|
61
|
+
let containerHeight = this.getWorkspaceHeight();
|
62
|
+
if (containerHeight === Infinity) {
|
63
|
+
return containerHeight;
|
64
|
+
}
|
65
|
+
const columnHeaderHeight = this.getColumnHeaderHeight();
|
66
|
+
if (columnHeaderHeight > 0) {
|
67
|
+
containerHeight -= columnHeaderHeight;
|
68
|
+
}
|
69
|
+
return containerHeight;
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Gets the width of the table workspace (in pixels). The workspace size in the current
|
74
|
+
* implementation returns the width of the table holder element including scrollbar width when
|
75
|
+
* the table has defined size and the width of the window excluding scrollbar width when
|
76
|
+
* the table has no defined size (the window is a scrollable container).
|
77
|
+
*
|
78
|
+
* This is a bug, as the method should always return stable values, always without scrollbar width.
|
79
|
+
* Changing this behavior would break the column calculators, which would also need to be adjusted.
|
80
|
+
*
|
81
|
+
* @returns {number}
|
82
|
+
*/
|
56
83
|
getWorkspaceWidth() {
|
57
|
-
const {
|
58
|
-
wtSettings
|
59
|
-
} = this;
|
60
84
|
const {
|
61
85
|
rootDocument,
|
62
86
|
rootWindow
|
63
87
|
} = this.domBindings;
|
64
88
|
const trimmingContainer = this.dataAccessObject.inlineStartOverlayTrimmingContainer;
|
65
|
-
const docOffsetWidth = rootDocument.documentElement.offsetWidth;
|
66
|
-
const totalColumns = wtSettings.getSetting('totalColumns');
|
67
|
-
const preventOverflow = wtSettings.getSetting('preventOverflow');
|
68
|
-
const isRtl = wtSettings.getSetting('rtlMode');
|
69
|
-
const tableRect = this.wtTable.TABLE.getBoundingClientRect();
|
70
|
-
const inlineStart = isRtl ? tableRect.right - docOffsetWidth : tableRect.left;
|
71
|
-
const tableOffset = docOffsetWidth - inlineStart;
|
72
89
|
let width;
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
90
|
+
if (trimmingContainer === rootWindow) {
|
91
|
+
const totalColumns = this.wtSettings.getSetting('totalColumns');
|
92
|
+
width = this.wtTable.holder.offsetWidth;
|
93
|
+
if (this.getRowHeaderWidth() + this.sumColumnWidths(0, totalColumns) > width) {
|
94
|
+
width = rootDocument.documentElement.clientWidth;
|
95
|
+
}
|
79
96
|
} else {
|
80
|
-
width =
|
81
|
-
}
|
82
|
-
if (trimmingContainer === rootWindow && totalColumns > 0 && this.sumColumnWidths(0, totalColumns - 1) > width) {
|
83
|
-
// in case sum of column widths is higher than available stylesheet width, let's assume using the whole window
|
84
|
-
// otherwise continue below, which will allow stretching
|
85
|
-
// this is used in `scroll_window.html`
|
86
|
-
// TODO test me
|
87
|
-
return rootDocument.documentElement.clientWidth;
|
97
|
+
width = trimmingContainer.clientWidth;
|
88
98
|
}
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
99
|
+
return width;
|
100
|
+
}
|
101
|
+
|
102
|
+
/**
|
103
|
+
* @returns {number}
|
104
|
+
*/
|
105
|
+
getViewportWidth() {
|
106
|
+
const containerWidth = this.getWorkspaceWidth();
|
107
|
+
if (containerWidth === Infinity) {
|
108
|
+
return containerWidth;
|
96
109
|
}
|
97
|
-
const
|
98
|
-
if (
|
99
|
-
|
100
|
-
return Math.max(width, outerWidth(this.wtTable.TABLE));
|
110
|
+
const rowHeaderWidth = this.getRowHeaderWidth();
|
111
|
+
if (rowHeaderWidth > 0) {
|
112
|
+
return containerWidth - rowHeaderWidth;
|
101
113
|
}
|
102
|
-
|
103
|
-
// if stretching is used, return the actual container width, so the columns can fit inside it
|
104
|
-
return width;
|
114
|
+
return containerWidth;
|
105
115
|
}
|
106
116
|
|
107
117
|
/**
|
@@ -122,6 +132,24 @@ class Viewport {
|
|
122
132
|
return this.wtTable.hider.offsetWidth > this.getWorkspaceWidth();
|
123
133
|
}
|
124
134
|
|
135
|
+
/**
|
136
|
+
* Checks if the table uses the window as a viewport and if there is a vertical scrollbar.
|
137
|
+
*
|
138
|
+
* @returns {boolean}
|
139
|
+
*/
|
140
|
+
isVerticallyScrollableByWindow() {
|
141
|
+
return this.dataAccessObject.topOverlayTrimmingContainer === this.domBindings.rootWindow;
|
142
|
+
}
|
143
|
+
|
144
|
+
/**
|
145
|
+
* Checks if the table uses the window as a viewport and if there is a horizontal scrollbar.
|
146
|
+
*
|
147
|
+
* @returns {boolean}
|
148
|
+
*/
|
149
|
+
isHorizontallyScrollableByWindow() {
|
150
|
+
return this.dataAccessObject.inlineStartOverlayTrimmingContainer === this.domBindings.rootWindow;
|
151
|
+
}
|
152
|
+
|
125
153
|
/**
|
126
154
|
* @param {number} from The visual column index from the width sum is start calculated.
|
127
155
|
* @param {number} length The length of the column to traverse.
|
@@ -137,24 +165,6 @@ class Viewport {
|
|
137
165
|
return sum;
|
138
166
|
}
|
139
167
|
|
140
|
-
/**
|
141
|
-
* @returns {number}
|
142
|
-
*/
|
143
|
-
getContainerFillWidth() {
|
144
|
-
if (this.containerWidth) {
|
145
|
-
return this.containerWidth;
|
146
|
-
}
|
147
|
-
const mainContainer = this.wtTable.holder;
|
148
|
-
const dummyElement = this.domBindings.rootDocument.createElement('div');
|
149
|
-
dummyElement.style.width = '100%';
|
150
|
-
dummyElement.style.height = '1px';
|
151
|
-
mainContainer.appendChild(dummyElement);
|
152
|
-
const fillWidth = dummyElement.offsetWidth;
|
153
|
-
this.containerWidth = fillWidth;
|
154
|
-
mainContainer.removeChild(dummyElement);
|
155
|
-
return fillWidth;
|
156
|
-
}
|
157
|
-
|
158
168
|
/**
|
159
169
|
* @returns {number}
|
160
170
|
*/
|
@@ -175,21 +185,6 @@ class Viewport {
|
|
175
185
|
return this.columnHeaderHeight;
|
176
186
|
}
|
177
187
|
|
178
|
-
/**
|
179
|
-
* @returns {number}
|
180
|
-
*/
|
181
|
-
getViewportHeight() {
|
182
|
-
let containerHeight = this.getWorkspaceHeight();
|
183
|
-
if (containerHeight === Infinity) {
|
184
|
-
return containerHeight;
|
185
|
-
}
|
186
|
-
const columnHeaderHeight = this.getColumnHeaderHeight();
|
187
|
-
if (columnHeaderHeight > 0) {
|
188
|
-
containerHeight -= columnHeaderHeight;
|
189
|
-
}
|
190
|
-
return containerHeight;
|
191
|
-
}
|
192
|
-
|
193
188
|
/**
|
194
189
|
* @returns {number}
|
195
190
|
*/
|
@@ -224,21 +219,6 @@ class Viewport {
|
|
224
219
|
return this.rowHeaderWidth;
|
225
220
|
}
|
226
221
|
|
227
|
-
/**
|
228
|
-
* @returns {number}
|
229
|
-
*/
|
230
|
-
getViewportWidth() {
|
231
|
-
const containerWidth = this.getWorkspaceWidth();
|
232
|
-
if (containerWidth === Infinity) {
|
233
|
-
return containerWidth;
|
234
|
-
}
|
235
|
-
const rowHeaderWidth = this.getRowHeaderWidth();
|
236
|
-
if (rowHeaderWidth > 0) {
|
237
|
-
return containerWidth - rowHeaderWidth;
|
238
|
-
}
|
239
|
-
return containerWidth;
|
240
|
-
}
|
241
|
-
|
242
222
|
/**
|
243
223
|
* Creates rows calculators. The type of the calculations can be chosen from the list:
|
244
224
|
* - 'rendered' Calculates rows that should be rendered within the current table's viewport;
|
@@ -281,6 +261,7 @@ class Viewport {
|
|
281
261
|
viewportHeight: height,
|
282
262
|
scrollOffset: pos,
|
283
263
|
totalRows: wtSettings.getSetting('totalRows'),
|
264
|
+
defaultRowHeight: this.instance.stylesHandler.getDefaultRowHeight(),
|
284
265
|
rowHeightFn: sourceRow => wtTable.getRowHeight(sourceRow),
|
285
266
|
overrideFn: wtSettings.getSettingPure('viewportRowCalculatorOverride'),
|
286
267
|
horizontalScrollbarHeight: scrollbarHeight
|
@@ -400,11 +381,22 @@ class Viewport {
|
|
400
381
|
}
|
401
382
|
const {
|
402
383
|
startRow: renderedStartRow,
|
403
|
-
endRow: renderedEndRow
|
384
|
+
endRow: renderedEndRow,
|
385
|
+
rowStartOffset,
|
386
|
+
rowEndOffset
|
404
387
|
} = this.rowsRenderCalculator;
|
388
|
+
const totalRows = this.wtSettings.getSetting('totalRows') - 1;
|
389
|
+
const renderingThreshold = this.wtSettings.getSetting('viewportRowRenderingThreshold');
|
390
|
+
if (Number.isInteger(renderingThreshold) && renderingThreshold > 0) {
|
391
|
+
startRow = Math.max(0, startRow - Math.min(rowStartOffset, renderingThreshold));
|
392
|
+
endRow = Math.min(totalRows, endRow + Math.min(rowEndOffset, renderingThreshold));
|
393
|
+
} else if (renderingThreshold === 'auto') {
|
394
|
+
startRow = Math.max(0, startRow - Math.ceil(rowStartOffset / 2));
|
395
|
+
endRow = Math.min(totalRows, endRow + Math.ceil(rowEndOffset / 2));
|
396
|
+
}
|
405
397
|
if (startRow < renderedStartRow || startRow === renderedStartRow && startRow > 0) {
|
406
398
|
return false;
|
407
|
-
} else if (endRow > renderedEndRow || endRow === renderedEndRow && endRow <
|
399
|
+
} else if (endRow > renderedEndRow || endRow === renderedEndRow && endRow < totalRows) {
|
408
400
|
return false;
|
409
401
|
}
|
410
402
|
return true;
|
@@ -438,11 +430,22 @@ class Viewport {
|
|
438
430
|
}
|
439
431
|
const {
|
440
432
|
startColumn: renderedStartColumn,
|
441
|
-
endColumn: renderedEndColumn
|
433
|
+
endColumn: renderedEndColumn,
|
434
|
+
columnStartOffset,
|
435
|
+
columnEndOffset
|
442
436
|
} = this.columnsRenderCalculator;
|
437
|
+
const totalColumns = this.wtSettings.getSetting('totalColumns') - 1;
|
438
|
+
const renderingThreshold = this.wtSettings.getSetting('viewportColumnRenderingThreshold');
|
439
|
+
if (Number.isInteger(renderingThreshold) && renderingThreshold > 0) {
|
440
|
+
startColumn = Math.max(0, startColumn - Math.min(columnStartOffset, renderingThreshold));
|
441
|
+
endColumn = Math.min(totalColumns, endColumn + Math.min(columnEndOffset, renderingThreshold));
|
442
|
+
} else if (renderingThreshold === 'auto') {
|
443
|
+
startColumn = Math.max(0, startColumn - Math.ceil(columnStartOffset / 2));
|
444
|
+
endColumn = Math.min(totalColumns, endColumn + Math.ceil(columnEndOffset / 2));
|
445
|
+
}
|
443
446
|
if (startColumn < renderedStartColumn || startColumn === renderedStartColumn && startColumn > 0) {
|
444
447
|
return false;
|
445
|
-
} else if (endColumn > renderedEndColumn || endColumn === renderedEndColumn && endColumn <
|
448
|
+
} else if (endColumn > renderedEndColumn || endColumn === renderedEndColumn && endColumn < totalColumns) {
|
446
449
|
return false;
|
447
450
|
}
|
448
451
|
return true;
|
package/CHANGELOG.md
CHANGED
@@ -9,6 +9,42 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
10
10
|
<!-- UNVERSIONED -->
|
11
11
|
|
12
|
+
## [15.0.0] - 2024-12-11
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- Added support for rows/columns virtualization of the merged cells. [#11162](https://github.com/handsontable/handsontable/pull/11162)
|
16
|
+
- Added missing typings for language files [#11236](https://github.com/handsontable/handsontable/pull/11236)
|
17
|
+
- Added ability to cache renderers [#11264](https://github.com/handsontable/handsontable/pull/11264)
|
18
|
+
- React: Added `@handsontable/react-wrapper` to the monorepo. [#11212](https://github.com/handsontable/handsontable/pull/11212)
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
- **Breaking change**: Updated production dependencies (remove `pikaday` - using `@handsontable/pikaday` instead, bump `numbro`, and `dompurify`) [#10929](https://github.com/handsontable/handsontable/pull/10929)
|
22
|
+
- Refactor the column stretching logic, move to the separate plugin and fix bugs related to the columns widths misalignments. [#11210](https://github.com/handsontable/handsontable/pull/11210)
|
23
|
+
- Updated typings for dropdown and context menu options [#11237](https://github.com/handsontable/handsontable/pull/11237)
|
24
|
+
- Use node 22 [#11265](https://github.com/handsontable/handsontable/pull/11265)
|
25
|
+
|
26
|
+
### Removed
|
27
|
+
- **Breaking change**: Removed check marks from alignment submenu. [#11278](https://github.com/handsontable/handsontable/pull/11278)
|
28
|
+
- Removed `aria-hidden` from the TextEditor and PasswordEditor's `TEXTAREA` elements. [#11218](https://github.com/handsontable/handsontable/pull/11218)
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
- Fixed the Autocomplete and Dropdown editor's container size counting [#11201](https://github.com/handsontable/handsontable/pull/11201)
|
32
|
+
- Fixed focus management for dropdown menu after `updateSettings` call [#11205](https://github.com/handsontable/handsontable/pull/11205)
|
33
|
+
- Fixed columns selection while the column is moving when the _NestedHeaders_ plugin is enabled. [#11206](https://github.com/handsontable/handsontable/pull/11206)
|
34
|
+
- Fixed copying values when fast IME edit was enabled [#11243](https://github.com/handsontable/handsontable/pull/11243)
|
35
|
+
- Fixed an issue with export of common lib in package.json [#11247](https://github.com/handsontable/handsontable/pull/11247)
|
36
|
+
- Fixed checkbox switching in merged cells [#11252](https://github.com/handsontable/handsontable/pull/11252)
|
37
|
+
- Added missing "name" attribute to the focus catcher [#11256](https://github.com/handsontable/handsontable/pull/11256)
|
38
|
+
- Fixed data deletion for checkbox cell types [#11263](https://github.com/handsontable/handsontable/pull/11263)
|
39
|
+
- Fixed horizontal scrolling for nested headers [#11269](https://github.com/handsontable/handsontable/pull/11269)
|
40
|
+
- Fixed a problem where the Filters' dropdown container did not match the dropdown content size. [#11273](https://github.com/handsontable/handsontable/pull/11273)
|
41
|
+
- Fixed an error that thrown on hiding already selected columns [#11277](https://github.com/handsontable/handsontable/pull/11277)
|
42
|
+
- Fixed cell fast edit mode when a comment is shown. [#11280](https://github.com/handsontable/handsontable/pull/11280)
|
43
|
+
- Fixed an error for cases where the keyboard event was triggered with `key` as `undefined`. [#11281](https://github.com/handsontable/handsontable/pull/11281)
|
44
|
+
- Fixed input width calculation for password cell type [#11283](https://github.com/handsontable/handsontable/pull/11283)
|
45
|
+
- Fixed missing `source` argument for `setDataAtCell` method [#11287](https://github.com/handsontable/handsontable/pull/11287)
|
46
|
+
- Fixed top overlay misalignment after vertical scrollbar disappears [#11289](https://github.com/handsontable/handsontable/pull/11289)
|
47
|
+
|
12
48
|
## [14.6.1] - 2024-10-17
|
13
49
|
|
14
50
|
### Removed
|
package/README.md
CHANGED
@@ -18,7 +18,7 @@ It provides data binding, data validation, filtering, sorting, and CRUD operatio
|
|
18
18
|
<tr>
|
19
19
|
<td>
|
20
20
|
<img src="https://raw.githubusercontent.com/handsontable/handsontable/develop/resources/icons/react-icon.svg" width="14" height="14">
|
21
|
-
<a href="https://github.com/handsontable/handsontable/tree/master/wrappers/react"> <strong>React</strong></a>
|
21
|
+
<a href="https://github.com/handsontable/handsontable/tree/master/wrappers/react-wrapper"> <strong>React</strong></a>
|
22
22
|
</td>
|
23
23
|
<td>
|
24
24
|
<img src="https://raw.githubusercontent.com/handsontable/handsontable/develop/resources/icons/angular-icon.svg" width="14" height="14">
|
package/base.js
CHANGED
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
4
4
|
var _core = _interopRequireDefault(require("./core"));
|
5
5
|
var _rootInstance = require("./utils/rootInstance");
|
6
6
|
var _dataMap = require("./dataMap");
|
7
|
-
var
|
7
|
+
var _hooks = require("./core/hooks");
|
8
8
|
var _registry = require("./i18n/registry");
|
9
9
|
var _registry2 = require("./cellTypes/registry");
|
10
10
|
var _textType = require("./cellTypes/textType");
|
@@ -41,12 +41,12 @@ Handsontable.Core = function (rootElement) {
|
|
41
41
|
return new _core.default(rootElement, userSettings, _rootInstance.rootInstanceSymbol);
|
42
42
|
};
|
43
43
|
Handsontable.DefaultSettings = (0, _dataMap.metaSchemaFactory)();
|
44
|
-
Handsontable.hooks =
|
44
|
+
Handsontable.hooks = _hooks.Hooks.getSingleton();
|
45
45
|
Handsontable.CellCoords = _src.CellCoords;
|
46
46
|
Handsontable.CellRange = _src.CellRange;
|
47
47
|
Handsontable.packageName = 'handsontable';
|
48
|
-
Handsontable.buildDate = "
|
49
|
-
Handsontable.version = "
|
48
|
+
Handsontable.buildDate = "03/12/2024 15:05:57";
|
49
|
+
Handsontable.version = "15.0.0-next-4472a60-20241203";
|
50
50
|
Handsontable.languages = {
|
51
51
|
dictionaryKeys: _registry.dictionaryKeys,
|
52
52
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import Core from "./core.mjs";
|
2
2
|
import { rootInstanceSymbol } from "./utils/rootInstance.mjs";
|
3
3
|
import { metaSchemaFactory } from "./dataMap/index.mjs";
|
4
|
-
import Hooks from "./
|
4
|
+
import { Hooks } from "./core/hooks/index.mjs"; // FIXME: Bug in eslint-plugin-import: https://github.com/benmosher/eslint-plugin-import/issues/1883
|
5
5
|
/* eslint-disable import/named */
|
6
6
|
import { dictionaryKeys, getTranslatedPhrase, registerLanguageDictionary, getLanguagesDictionaries, getLanguageDictionary } from "./i18n/registry.mjs";
|
7
7
|
/* eslint-enable import/named */
|
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
|
|
35
35
|
Handsontable.CellCoords = CellCoords;
|
36
36
|
Handsontable.CellRange = CellRange;
|
37
37
|
Handsontable.packageName = 'handsontable';
|
38
|
-
Handsontable.buildDate = "
|
39
|
-
Handsontable.version = "
|
38
|
+
Handsontable.buildDate = "03/12/2024 15:06:03";
|
39
|
+
Handsontable.version = "15.0.0-next-4472a60-20241203";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys,
|
42
42
|
getLanguageDictionary,
|
@@ -55,6 +55,7 @@ function createInputElement(hot) {
|
|
55
55
|
const rootDocument = hot.rootDocument;
|
56
56
|
const input = rootDocument.createElement('input');
|
57
57
|
input.type = 'text';
|
58
|
+
input.name = '__htFocusCatcher';
|
58
59
|
input.classList.add('htFocusCatcher');
|
59
60
|
if (hot.getSettings().ariaTags) {
|
60
61
|
(0, _element.setAttribute)(input, [(0, _a11y.A11Y_PRESENTATION)(), (0, _a11y.A11Y_HIDDEN)()]);
|
@@ -51,6 +51,7 @@ function createInputElement(hot) {
|
|
51
51
|
const rootDocument = hot.rootDocument;
|
52
52
|
const input = rootDocument.createElement('input');
|
53
53
|
input.type = 'text';
|
54
|
+
input.name = '__htFocusCatcher';
|
54
55
|
input.classList.add('htFocusCatcher');
|
55
56
|
if (hot.getSettings().ariaTags) {
|
56
57
|
setAttribute(input, [A11Y_PRESENTATION(), A11Y_HIDDEN()]);
|