handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-08765b9-20230714
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/cell/coords.d.ts +6 -1
- package/3rdparty/walkontable/src/cell/coords.js +87 -33
- package/3rdparty/walkontable/src/cell/coords.mjs +87 -33
- package/3rdparty/walkontable/src/cell/range.d.ts +9 -2
- package/3rdparty/walkontable/src/cell/range.js +92 -46
- package/3rdparty/walkontable/src/cell/range.mjs +92 -46
- package/3rdparty/walkontable/src/core/_base.js +41 -33
- package/3rdparty/walkontable/src/core/_base.mjs +41 -33
- package/3rdparty/walkontable/src/core/clone.js +8 -5
- package/3rdparty/walkontable/src/core/clone.mjs +8 -5
- package/3rdparty/walkontable/src/core/core.js +3 -2
- package/3rdparty/walkontable/src/core/core.mjs +3 -2
- package/3rdparty/walkontable/src/event.js +9 -8
- package/3rdparty/walkontable/src/event.mjs +9 -8
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +10 -2
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +11 -9
- package/3rdparty/walkontable/src/overlay/_base.mjs +11 -9
- package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
- package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
- package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -6
- package/3rdparty/walkontable/src/overlay/top.js +12 -14
- package/3rdparty/walkontable/src/overlay/top.mjs +12 -14
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
- package/3rdparty/walkontable/src/overlays.js +75 -80
- package/3rdparty/walkontable/src/overlays.mjs +75 -80
- package/3rdparty/walkontable/src/scroll.js +27 -24
- package/3rdparty/walkontable/src/scroll.mjs +27 -24
- package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
- package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
- package/3rdparty/walkontable/src/selection/border/constants.js +16 -0
- package/3rdparty/walkontable/src/selection/border/constants.mjs +12 -0
- package/3rdparty/walkontable/src/selection/constants.js +62 -0
- package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
- package/3rdparty/walkontable/src/selection/index.js +26 -0
- package/3rdparty/walkontable/src/selection/index.mjs +5 -0
- package/3rdparty/walkontable/src/selection/manager.js +259 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +254 -0
- package/3rdparty/walkontable/src/selection/scanner.js +270 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +267 -0
- package/3rdparty/walkontable/src/selection/selection.js +101 -0
- package/3rdparty/walkontable/src/selection/selection.mjs +96 -0
- package/3rdparty/walkontable/src/settings.js +18 -17
- package/3rdparty/walkontable/src/settings.mjs +18 -17
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
- package/3rdparty/walkontable/src/table.js +48 -115
- package/3rdparty/walkontable/src/table.mjs +49 -116
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/focusDetector.js +58 -0
- package/core/focusCatcher/focusDetector.mjs +54 -0
- package/core/focusCatcher/index.js +142 -0
- package/core/focusCatcher/index.mjs +138 -0
- package/core/index.js +9 -0
- package/core/index.mjs +1 -0
- package/core.d.ts +6 -3
- package/core.js +181 -298
- package/core.mjs +181 -298
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +41 -0
- package/dataMap/metaManager/metaSchema.mjs +41 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
- package/dataMap/metaManager/utils.js +4 -2
- package/dataMap/metaManager/utils.mjs +4 -2
- package/dist/handsontable.css +19 -3
- package/dist/handsontable.full.css +19 -3
- package/dist/handsontable.full.js +10739 -7037
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +25 -25
- package/dist/handsontable.js +24884 -21182
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +19 -19
- package/editorManager.js +11 -75
- package/editorManager.mjs +11 -74
- package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
- package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -1
- package/editors/dateEditor/dateEditor.mjs +2 -1
- package/editors/textEditor/textEditor.js +3 -11
- package/editors/textEditor/textEditor.mjs +4 -12
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +1 -0
- package/helpers/number.js +18 -0
- package/helpers/number.mjs +17 -0
- package/helpers/object.js +1 -0
- package/helpers/object.mjs +1 -0
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/pluginHooks.d.ts +7 -1
- package/pluginHooks.js +106 -1
- package/pluginHooks.mjs +106 -1
- package/plugins/autoColumnSize/autoColumnSize.js +4 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +110 -40
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +110 -40
- package/plugins/columnSorting/columnSorting.js +40 -1
- package/plugins/columnSorting/columnSorting.mjs +40 -3
- package/plugins/columnSorting/columnStatesManager.js +2 -1
- package/plugins/columnSorting/columnStatesManager.mjs +2 -1
- package/plugins/columnSorting/index.js +3 -1
- package/plugins/columnSorting/index.mjs +1 -1
- package/plugins/comments/commentEditor.js +1 -0
- package/plugins/comments/commentEditor.mjs +1 -0
- package/plugins/comments/comments.js +253 -191
- package/plugins/comments/comments.mjs +252 -192
- package/plugins/comments/contextMenuItem/addEditComment.js +41 -0
- package/plugins/comments/contextMenuItem/addEditComment.mjs +35 -0
- package/plugins/comments/contextMenuItem/readOnlyComment.js +49 -0
- package/plugins/comments/contextMenuItem/readOnlyComment.mjs +43 -0
- package/plugins/comments/contextMenuItem/removeComment.js +38 -0
- package/plugins/comments/contextMenuItem/removeComment.mjs +32 -0
- package/plugins/contextMenu/contextMenu.d.ts +1 -1
- package/plugins/contextMenu/contextMenu.js +72 -30
- package/plugins/contextMenu/contextMenu.mjs +73 -31
- package/plugins/contextMenu/predefinedItems/alignment.js +7 -0
- package/plugins/contextMenu/predefinedItems/alignment.mjs +7 -0
- package/plugins/contextMenu/predefinedItems/clearColumn.js +5 -3
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/columnLeft.js +5 -3
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/columnRight.js +5 -3
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/readOnly.js +7 -0
- package/plugins/contextMenu/predefinedItems/readOnly.mjs +7 -0
- package/plugins/contextMenu/predefinedItems/removeColumn.js +7 -5
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/removeRow.js +7 -5
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/rowAbove.js +5 -3
- package/plugins/contextMenu/predefinedItems/rowAbove.mjs +5 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.js +5 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.mjs +5 -3
- package/plugins/contextMenu/utils.js +28 -16
- package/plugins/contextMenu/utils.mjs +27 -15
- package/plugins/copyPaste/contextMenuItem/copy.js +7 -0
- package/plugins/copyPaste/contextMenuItem/copy.mjs +7 -0
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +9 -1
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +9 -1
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +9 -1
- package/plugins/copyPaste/contextMenuItem/cut.js +7 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +7 -0
- package/plugins/copyPaste/copyPaste.js +12 -6
- package/plugins/copyPaste/copyPaste.mjs +12 -6
- package/plugins/customBorders/customBorders.js +36 -29
- package/plugins/customBorders/customBorders.mjs +37 -30
- package/plugins/customBorders/utils.js +3 -3
- package/plugins/customBorders/utils.mjs +3 -3
- package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
- package/plugins/dropdownMenu/dropdownMenu.js +89 -32
- package/plugins/dropdownMenu/dropdownMenu.mjs +89 -32
- package/plugins/filters/conditionCollection.js +6 -5
- package/plugins/filters/conditionCollection.mjs +6 -5
- package/plugins/filters/filters.js +44 -21
- package/plugins/filters/filters.mjs +43 -20
- package/plugins/formulas/engine/register.js +3 -3
- package/plugins/formulas/engine/register.mjs +3 -3
- package/plugins/formulas/engine/settings.js +6 -3
- package/plugins/formulas/engine/settings.mjs +6 -3
- package/plugins/formulas/formulas.js +151 -143
- package/plugins/formulas/formulas.mjs +151 -143
- package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
- package/plugins/formulas/indexSyncer/index.js +100 -64
- package/plugins/formulas/indexSyncer/index.mjs +100 -64
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
- package/plugins/hiddenColumns/hiddenColumns.js +51 -34
- package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
- package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
- package/plugins/hiddenRows/hiddenRows.js +50 -33
- package/plugins/hiddenRows/hiddenRows.mjs +50 -33
- package/plugins/manualRowResize/manualRowResize.js +2 -1
- package/plugins/manualRowResize/manualRowResize.mjs +2 -1
- package/plugins/mergeCells/mergeCells.js +6 -17
- package/plugins/mergeCells/mergeCells.mjs +6 -17
- package/plugins/multiColumnSorting/multiColumnSorting.js +37 -2
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +37 -2
- package/plugins/nestedHeaders/nestedHeaders.js +209 -75
- package/plugins/nestedHeaders/nestedHeaders.mjs +208 -74
- package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
- package/plugins/nestedHeaders/stateManager/index.js +107 -49
- package/plugins/nestedHeaders/stateManager/index.mjs +105 -47
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
- package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
- package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
- package/plugins/nestedRows/data/dataManager.js +4 -2
- package/plugins/nestedRows/data/dataManager.mjs +4 -2
- package/plugins/nestedRows/nestedRows.js +41 -0
- package/plugins/nestedRows/nestedRows.mjs +41 -0
- package/plugins/persistentState/storage.js +1 -0
- package/plugins/persistentState/storage.mjs +1 -0
- package/plugins/undoRedo/undoRedo.js +2 -1
- package/plugins/undoRedo/undoRedo.mjs +2 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/highlight.js +256 -71
- package/selection/highlight/highlight.mjs +250 -71
- package/selection/highlight/types/activeHeader.js +10 -8
- package/selection/highlight/types/activeHeader.mjs +10 -8
- package/selection/highlight/types/area.js +6 -18
- package/selection/highlight/types/area.mjs +6 -18
- package/selection/highlight/types/areaLayered.js +31 -0
- package/selection/highlight/types/areaLayered.mjs +26 -0
- package/selection/highlight/types/column.js +27 -0
- package/selection/highlight/types/column.mjs +22 -0
- package/selection/highlight/types/customSelection.js +7 -9
- package/selection/highlight/types/customSelection.mjs +7 -9
- package/selection/highlight/types/fill.js +5 -7
- package/selection/highlight/types/fill.mjs +5 -7
- package/selection/highlight/types/{cell.js → focus.js} +5 -7
- package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
- package/selection/highlight/types/header.js +9 -18
- package/selection/highlight/types/header.mjs +9 -18
- package/selection/highlight/types/row.js +27 -0
- package/selection/highlight/types/row.mjs +22 -0
- package/selection/highlight/visualSelection.js +41 -33
- package/selection/highlight/visualSelection.mjs +41 -33
- package/selection/index.js +4 -7
- package/selection/index.mjs +2 -3
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +290 -154
- package/selection/selection.mjs +287 -153
- package/selection/transformation.js +232 -90
- package/selection/transformation.mjs +232 -90
- package/selection/utils.js +15 -21
- package/selection/utils.mjs +16 -21
- package/settings.d.ts +2 -0
- package/shortcutContexts/commands/editor/closeAndSave.js +12 -0
- package/shortcutContexts/commands/editor/closeAndSave.mjs +8 -0
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +12 -0
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +8 -0
- package/shortcutContexts/commands/editor/fastOpen.js +16 -0
- package/shortcutContexts/commands/editor/fastOpen.mjs +12 -0
- package/shortcutContexts/commands/editor/index.js +16 -0
- package/shortcutContexts/commands/editor/index.mjs +12 -0
- package/shortcutContexts/commands/editor/open.js +27 -0
- package/shortcutContexts/commands/editor/open.mjs +23 -0
- package/shortcutContexts/commands/emptySelectedCells.js +11 -0
- package/shortcutContexts/commands/emptySelectedCells.mjs +7 -0
- package/shortcutContexts/commands/extendCellsSelection/down.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +21 -0
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +17 -0
- package/shortcutContexts/commands/extendCellsSelection/index.js +26 -0
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +22 -0
- package/shortcutContexts/commands/extendCellsSelection/left.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/right.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +29 -0
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +25 -0
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +19 -0
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +15 -0
- package/shortcutContexts/commands/extendCellsSelection/up.js +15 -0
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +11 -0
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +21 -0
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +17 -0
- package/shortcutContexts/commands/index.js +35 -0
- package/shortcutContexts/commands/index.mjs +31 -0
- package/shortcutContexts/commands/moveCellSelection/down.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/down.mjs +9 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +31 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +27 -0
- package/shortcutContexts/commands/moveCellSelection/index.js +28 -0
- package/shortcutContexts/commands/moveCellSelection/index.mjs +24 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +12 -0
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +8 -0
- package/shortcutContexts/commands/moveCellSelection/left.js +10 -0
- package/shortcutContexts/commands/moveCellSelection/left.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/right.js +10 -0
- package/shortcutContexts/commands/moveCellSelection/right.mjs +6 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +18 -0
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +14 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +14 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +10 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +19 -0
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +15 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +21 -0
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +17 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +13 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +19 -0
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +15 -0
- package/shortcutContexts/commands/moveCellSelection/up.js +13 -0
- package/shortcutContexts/commands/moveCellSelection/up.mjs +9 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +31 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +27 -0
- package/shortcutContexts/commands/populateSelectedCellsData.js +29 -0
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +25 -0
- package/shortcutContexts/commands/scrollToFocusedCell.js +36 -0
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +32 -0
- package/shortcutContexts/commands/selectAll.js +10 -0
- package/shortcutContexts/commands/selectAll.mjs +6 -0
- package/shortcutContexts/constants.js +13 -0
- package/shortcutContexts/constants.mjs +8 -0
- package/shortcutContexts/editor.js +25 -0
- package/shortcutContexts/editor.mjs +21 -0
- package/shortcutContexts/grid.js +163 -0
- package/shortcutContexts/grid.mjs +159 -0
- package/shortcutContexts/index.js +24 -0
- package/shortcutContexts/index.mjs +11 -0
- package/shortcuts/manager.js +2 -0
- package/shortcuts/manager.mjs +2 -0
- package/shortcuts/recorder.js +2 -2
- package/shortcuts/recorder.mjs +2 -2
- package/shortcuts/utils.js +19 -5
- package/shortcuts/utils.mjs +18 -4
- package/tableView.js +163 -91
- package/tableView.mjs +163 -91
- package/translations/changesObservable/observable.js +82 -54
- package/translations/changesObservable/observable.mjs +82 -54
- package/translations/changesObservable/observer.js +24 -11
- package/translations/changesObservable/observer.mjs +24 -11
- package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
- package/utils/dataStructures/tree.js +21 -18
- package/utils/dataStructures/tree.mjs +21 -18
- package/3rdparty/walkontable/src/selection.js +0 -295
- package/3rdparty/walkontable/src/selection.mjs +0 -290
- package/selection/highlight/constants.js +0 -15
- package/selection/highlight/constants.mjs +0 -6
- package/selection/highlight/types/index.js +0 -35
- package/selection/highlight/types/index.mjs +0 -31
@@ -1,3 +1,11 @@
|
|
1
|
+
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
3
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
4
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
5
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
6
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
7
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
8
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
1
9
|
import { arrayEach } from "../../../helpers/array.mjs";
|
2
10
|
import TreeNode from "../../../utils/dataStructures/tree.mjs";
|
3
11
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
@@ -36,32 +44,44 @@ import TreeNode from "../../../utils/dataStructures/tree.mjs";
|
|
36
44
|
*
|
37
45
|
*/
|
38
46
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
47
|
+
var _rootNodes = /*#__PURE__*/new WeakMap();
|
48
|
+
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
49
|
+
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
39
50
|
export default class HeadersTree {
|
40
|
-
/**
|
41
|
-
* The collection of nested headers settings structured into trees. The root trees are stored
|
42
|
-
* under the visual column index.
|
43
|
-
*
|
44
|
-
* @private
|
45
|
-
* @type {Map<number, TreeNode>}
|
46
|
-
*/
|
47
|
-
#rootNodes = new Map();
|
48
|
-
/**
|
49
|
-
* A map that translates the visual column indexes that intersect the range
|
50
|
-
* defined by the header colspan width to the root index.
|
51
|
-
*
|
52
|
-
* @private
|
53
|
-
* @type {Map<number, number>}
|
54
|
-
*/
|
55
|
-
#rootsIndex = new Map();
|
56
|
-
/**
|
57
|
-
* The instance of the SourceSettings class.
|
58
|
-
*
|
59
|
-
* @private
|
60
|
-
* @type {SourceSettings}
|
61
|
-
*/
|
62
|
-
#sourceSettings = null;
|
63
51
|
constructor(sourceSettings) {
|
64
|
-
|
52
|
+
/**
|
53
|
+
* The collection of nested headers settings structured into trees. The root trees are stored
|
54
|
+
* under the visual column index.
|
55
|
+
*
|
56
|
+
* @private
|
57
|
+
* @type {Map<number, TreeNode>}
|
58
|
+
*/
|
59
|
+
_classPrivateFieldInitSpec(this, _rootNodes, {
|
60
|
+
writable: true,
|
61
|
+
value: new Map()
|
62
|
+
});
|
63
|
+
/**
|
64
|
+
* A map that translates the visual column indexes that intersect the range
|
65
|
+
* defined by the header colspan width to the root index.
|
66
|
+
*
|
67
|
+
* @private
|
68
|
+
* @type {Map<number, number>}
|
69
|
+
*/
|
70
|
+
_classPrivateFieldInitSpec(this, _rootsIndex, {
|
71
|
+
writable: true,
|
72
|
+
value: new Map()
|
73
|
+
});
|
74
|
+
/**
|
75
|
+
* The instance of the SourceSettings class.
|
76
|
+
*
|
77
|
+
* @private
|
78
|
+
* @type {SourceSettings}
|
79
|
+
*/
|
80
|
+
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
81
|
+
writable: true,
|
82
|
+
value: null
|
83
|
+
});
|
84
|
+
_classPrivateFieldSet(this, _sourceSettings, sourceSettings);
|
65
85
|
}
|
66
86
|
|
67
87
|
/**
|
@@ -70,7 +90,7 @@ export default class HeadersTree {
|
|
70
90
|
* @returns {TreeNode[]}
|
71
91
|
*/
|
72
92
|
getRoots() {
|
73
|
-
return Array.from(this
|
93
|
+
return Array.from(_classPrivateFieldGet(this, _rootNodes).values());
|
74
94
|
}
|
75
95
|
|
76
96
|
/**
|
@@ -81,8 +101,8 @@ export default class HeadersTree {
|
|
81
101
|
*/
|
82
102
|
getRootByColumn(columnIndex) {
|
83
103
|
let node;
|
84
|
-
if (this
|
85
|
-
node = this
|
104
|
+
if (_classPrivateFieldGet(this, _rootsIndex).has(columnIndex)) {
|
105
|
+
node = _classPrivateFieldGet(this, _rootNodes).get(_classPrivateFieldGet(this, _rootsIndex).get(columnIndex));
|
86
106
|
}
|
87
107
|
return node;
|
88
108
|
}
|
@@ -102,7 +122,7 @@ export default class HeadersTree {
|
|
102
122
|
|
103
123
|
// Normalize the visual column index to a 0-based system for a specific "box" defined
|
104
124
|
// by root node colspan width.
|
105
|
-
const normColumnIndex = columnIndex - this
|
125
|
+
const normColumnIndex = columnIndex - _classPrivateFieldGet(this, _rootsIndex).get(columnIndex);
|
106
126
|
let columnCursor = 0;
|
107
127
|
let treeNode;
|
108
128
|
|
@@ -132,8 +152,8 @@ export default class HeadersTree {
|
|
132
152
|
*/
|
133
153
|
rebuildTreeIndex() {
|
134
154
|
let columnIndex = 0;
|
135
|
-
this
|
136
|
-
arrayEach(this
|
155
|
+
_classPrivateFieldGet(this, _rootsIndex).clear();
|
156
|
+
arrayEach(_classPrivateFieldGet(this, _rootNodes), _ref => {
|
137
157
|
let [, {
|
138
158
|
data: {
|
139
159
|
colspan
|
@@ -141,7 +161,7 @@ export default class HeadersTree {
|
|
141
161
|
}] = _ref;
|
142
162
|
// Map tree range (colspan range/width) into visual column index of the root node.
|
143
163
|
for (let i = columnIndex; i < columnIndex + colspan; i++) {
|
144
|
-
this
|
164
|
+
_classPrivateFieldGet(this, _rootsIndex).set(i, columnIndex);
|
145
165
|
}
|
146
166
|
columnIndex += colspan;
|
147
167
|
});
|
@@ -153,12 +173,12 @@ export default class HeadersTree {
|
|
153
173
|
*/
|
154
174
|
buildTree() {
|
155
175
|
this.clear();
|
156
|
-
const columnsCount = this
|
176
|
+
const columnsCount = _classPrivateFieldGet(this, _sourceSettings).getColumnsCount();
|
157
177
|
let columnIndex = 0;
|
158
178
|
while (columnIndex < columnsCount) {
|
159
|
-
const columnSettings = this
|
179
|
+
const columnSettings = _classPrivateFieldGet(this, _sourceSettings).getHeaderSettings(0, columnIndex);
|
160
180
|
const rootNode = new TreeNode();
|
161
|
-
this
|
181
|
+
_classPrivateFieldGet(this, _rootNodes).set(columnIndex, rootNode);
|
162
182
|
this.buildLeaves(rootNode, columnIndex, 0, columnSettings.origColspan);
|
163
183
|
columnIndex += columnSettings.origColspan;
|
164
184
|
}
|
@@ -175,7 +195,7 @@ export default class HeadersTree {
|
|
175
195
|
*/
|
176
196
|
buildLeaves(parentNode, columnIndex, headerLevel) {
|
177
197
|
let extractionLength = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
178
|
-
const columnsSettings = this
|
198
|
+
const columnsSettings = _classPrivateFieldGet(this, _sourceSettings).getHeadersSettings(headerLevel, columnIndex, extractionLength);
|
179
199
|
headerLevel += 1;
|
180
200
|
arrayEach(columnsSettings, columnSettings => {
|
181
201
|
const nodeData = {
|
@@ -202,7 +222,7 @@ export default class HeadersTree {
|
|
202
222
|
node = new TreeNode(nodeData);
|
203
223
|
parentNode.addChild(node);
|
204
224
|
}
|
205
|
-
if (headerLevel < this
|
225
|
+
if (headerLevel < _classPrivateFieldGet(this, _sourceSettings).getLayersCount()) {
|
206
226
|
this.buildLeaves(node, columnIndex, headerLevel, columnSettings.origColspan);
|
207
227
|
}
|
208
228
|
columnIndex += columnSettings.origColspan;
|
@@ -213,7 +233,7 @@ export default class HeadersTree {
|
|
213
233
|
* Clears the tree to the initial state.
|
214
234
|
*/
|
215
235
|
clear() {
|
216
|
-
this
|
217
|
-
this
|
236
|
+
_classPrivateFieldGet(this, _rootNodes).clear();
|
237
|
+
_classPrivateFieldGet(this, _rootsIndex).clear();
|
218
238
|
}
|
219
239
|
}
|
@@ -1,13 +1,21 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/es.error.cause.js");
|
3
4
|
exports.__esModule = true;
|
4
5
|
require("core-js/modules/es.array.push.js");
|
5
6
|
var _array = require("../../../helpers/array");
|
6
|
-
var
|
7
|
-
var
|
7
|
+
var _sourceSettings2 = _interopRequireDefault(require("./sourceSettings"));
|
8
|
+
var _headersTree2 = _interopRequireDefault(require("./headersTree"));
|
8
9
|
var _nodeModifiers = require("./nodeModifiers");
|
9
10
|
var _matrixGenerator = require("./matrixGenerator");
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
13
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
14
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
15
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
16
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
17
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
18
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
11
19
|
/**
|
12
20
|
* The state manager is a source of truth for nested headers configuration.
|
13
21
|
* The state generation process is divided into three stages.
|
@@ -36,29 +44,42 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
36
44
|
*
|
37
45
|
* @class StateManager
|
38
46
|
*/
|
47
|
+
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
48
|
+
var _headersTree = /*#__PURE__*/new WeakMap();
|
49
|
+
var _stateMatrix = /*#__PURE__*/new WeakMap();
|
39
50
|
class StateManager {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
51
|
+
constructor() {
|
52
|
+
/**
|
53
|
+
* The instance of the source settings class.
|
54
|
+
*
|
55
|
+
* @private
|
56
|
+
* @type {SourceSettings}
|
57
|
+
*/
|
58
|
+
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
59
|
+
writable: true,
|
60
|
+
value: new _sourceSettings2.default()
|
61
|
+
});
|
62
|
+
/**
|
63
|
+
* The instance of the headers tree. The tree is generated after setting new configuration data.
|
64
|
+
*
|
65
|
+
* @private
|
66
|
+
* @type {HeadersTree}
|
67
|
+
*/
|
68
|
+
_classPrivateFieldInitSpec(this, _headersTree, {
|
69
|
+
writable: true,
|
70
|
+
value: new _headersTree2.default(_classPrivateFieldGet(this, _sourceSettings))
|
71
|
+
});
|
72
|
+
/**
|
73
|
+
* Cached matrix which is generated from the tree structure.
|
74
|
+
*
|
75
|
+
* @private
|
76
|
+
* @type {Array[]}
|
77
|
+
*/
|
78
|
+
_classPrivateFieldInitSpec(this, _stateMatrix, {
|
79
|
+
writable: true,
|
80
|
+
value: [[]]
|
81
|
+
});
|
82
|
+
}
|
62
83
|
/**
|
63
84
|
* Sets a new state for the nested headers plugin based on settings passed
|
64
85
|
* directly to the plugin.
|
@@ -67,16 +88,16 @@ class StateManager {
|
|
67
88
|
* @returns {boolean} Returns `true` if the settings are processed correctly, `false` otherwise.
|
68
89
|
*/
|
69
90
|
setState(nestedHeadersSettings) {
|
70
|
-
this
|
91
|
+
_classPrivateFieldGet(this, _sourceSettings).setData(nestedHeadersSettings);
|
71
92
|
let hasError = false;
|
72
93
|
try {
|
73
|
-
this
|
94
|
+
_classPrivateFieldGet(this, _headersTree).buildTree();
|
74
95
|
} catch (ex) {
|
75
|
-
this
|
76
|
-
this
|
96
|
+
_classPrivateFieldGet(this, _headersTree).clear();
|
97
|
+
_classPrivateFieldGet(this, _sourceSettings).clear();
|
77
98
|
hasError = true;
|
78
99
|
}
|
79
|
-
this
|
100
|
+
_classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
|
80
101
|
return hasError;
|
81
102
|
}
|
82
103
|
|
@@ -87,7 +108,7 @@ class StateManager {
|
|
87
108
|
* @param {number} columnsCount The number of columns to limit to.
|
88
109
|
*/
|
89
110
|
setColumnsLimit(columnsCount) {
|
90
|
-
this
|
111
|
+
_classPrivateFieldGet(this, _sourceSettings).setColumnsLimit(columnsCount);
|
91
112
|
}
|
92
113
|
|
93
114
|
/**
|
@@ -111,9 +132,9 @@ class StateManager {
|
|
111
132
|
...rest
|
112
133
|
};
|
113
134
|
});
|
114
|
-
this
|
115
|
-
this
|
116
|
-
this
|
135
|
+
_classPrivateFieldGet(this, _sourceSettings).mergeWith(transformedSettings);
|
136
|
+
_classPrivateFieldGet(this, _headersTree).buildTree();
|
137
|
+
_classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
|
117
138
|
}
|
118
139
|
|
119
140
|
/**
|
@@ -128,9 +149,9 @@ class StateManager {
|
|
128
149
|
* header settings.
|
129
150
|
*/
|
130
151
|
mapState(callback) {
|
131
|
-
this
|
132
|
-
this
|
133
|
-
this
|
152
|
+
_classPrivateFieldGet(this, _sourceSettings).map(callback);
|
153
|
+
_classPrivateFieldGet(this, _headersTree).buildTree();
|
154
|
+
_classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
|
134
155
|
}
|
135
156
|
|
136
157
|
/**
|
@@ -143,7 +164,7 @@ class StateManager {
|
|
143
164
|
* @returns {Array}
|
144
165
|
*/
|
145
166
|
mapNodes(callback) {
|
146
|
-
return (0, _array.arrayReduce)(this
|
167
|
+
return (0, _array.arrayReduce)(_classPrivateFieldGet(this, _headersTree).getRoots(), (acc, rootNode) => {
|
147
168
|
rootNode.walkDown(node => {
|
148
169
|
const result = callback(node.data);
|
149
170
|
if (result !== void 0) {
|
@@ -168,13 +189,13 @@ class StateManager {
|
|
168
189
|
if (headerLevel < 0) {
|
169
190
|
headerLevel = this.rowCoordsToLevel(headerLevel);
|
170
191
|
}
|
171
|
-
const nodeToProcess = this
|
192
|
+
const nodeToProcess = _classPrivateFieldGet(this, _headersTree).getNode(headerLevel, columnIndex);
|
172
193
|
let actionResult;
|
173
194
|
if (nodeToProcess) {
|
174
195
|
actionResult = (0, _nodeModifiers.triggerNodeModification)(action, nodeToProcess, columnIndex);
|
175
196
|
|
176
197
|
// TODO (perf-tip): Trigger matrix generation once after multiple node modifications.
|
177
|
-
this
|
198
|
+
_classPrivateFieldSet(this, _stateMatrix, (0, _matrixGenerator.generateMatrix)(_classPrivateFieldGet(this, _headersTree).getRoots()));
|
178
199
|
}
|
179
200
|
return actionResult;
|
180
201
|
}
|
@@ -276,14 +297,14 @@ class StateManager {
|
|
276
297
|
* @returns {object|null}
|
277
298
|
*/
|
278
299
|
getHeaderSettings(headerLevel, columnIndex) {
|
279
|
-
var
|
300
|
+
var _classPrivateFieldGet2, _classPrivateFieldGet3;
|
280
301
|
if (headerLevel < 0) {
|
281
302
|
headerLevel = this.rowCoordsToLevel(headerLevel);
|
282
303
|
}
|
283
304
|
if (headerLevel === null || headerLevel >= this.getLayersCount()) {
|
284
305
|
return null;
|
285
306
|
}
|
286
|
-
return (
|
307
|
+
return (_classPrivateFieldGet2 = (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _stateMatrix)[headerLevel]) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3[columnIndex]) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : null;
|
287
308
|
}
|
288
309
|
|
289
310
|
/**
|
@@ -302,7 +323,7 @@ class StateManager {
|
|
302
323
|
if (headerLevel === null || headerLevel >= this.getLayersCount()) {
|
303
324
|
return null;
|
304
325
|
}
|
305
|
-
const node = this
|
326
|
+
const node = _classPrivateFieldGet(this, _headersTree).getNode(headerLevel, columnIndex);
|
306
327
|
if (!node) {
|
307
328
|
return null;
|
308
329
|
}
|
@@ -324,7 +345,7 @@ class StateManager {
|
|
324
345
|
var _this$getHeaderSettin;
|
325
346
|
const {
|
326
347
|
isRoot
|
327
|
-
} = (_this$getHeaderSettin = this.getHeaderSettings(headerLevel, columnIndex))
|
348
|
+
} = (_this$getHeaderSettin = this.getHeaderSettings(headerLevel, columnIndex)) !== null && _this$getHeaderSettin !== void 0 ? _this$getHeaderSettin : {
|
328
349
|
isRoot: true
|
329
350
|
};
|
330
351
|
if (isRoot) {
|
@@ -335,7 +356,7 @@ class StateManager {
|
|
335
356
|
var _this$getHeaderSettin2;
|
336
357
|
const {
|
337
358
|
isRoot: isRootNode
|
338
|
-
} = (_this$getHeaderSettin2 = this.getHeaderSettings(headerLevel, stepBackColumn))
|
359
|
+
} = (_this$getHeaderSettin2 = this.getHeaderSettings(headerLevel, stepBackColumn)) !== null && _this$getHeaderSettin2 !== void 0 ? _this$getHeaderSettin2 : {
|
339
360
|
isRoot: true
|
340
361
|
};
|
341
362
|
if (isRootNode) {
|
@@ -346,13 +367,50 @@ class StateManager {
|
|
346
367
|
return stepBackColumn;
|
347
368
|
}
|
348
369
|
|
370
|
+
/**
|
371
|
+
* The method is helpful in cases where the column index targets in-between currently
|
372
|
+
* collapsed column. In that case, the method returns the right-most column index
|
373
|
+
* where the nested header ends.
|
374
|
+
*
|
375
|
+
* @param {number} headerLevel Header level (there is support for negative and positive values).
|
376
|
+
* @param {number} columnIndex A visual column index.
|
377
|
+
* @returns {number}
|
378
|
+
*/
|
379
|
+
findRightMostColumnIndex(headerLevel, columnIndex) {
|
380
|
+
var _this$getHeaderSettin3;
|
381
|
+
const {
|
382
|
+
isRoot,
|
383
|
+
origColspan
|
384
|
+
} = (_this$getHeaderSettin3 = this.getHeaderSettings(headerLevel, columnIndex)) !== null && _this$getHeaderSettin3 !== void 0 ? _this$getHeaderSettin3 : {
|
385
|
+
isRoot: true,
|
386
|
+
origColspan: 1
|
387
|
+
};
|
388
|
+
if (isRoot) {
|
389
|
+
return columnIndex + origColspan - 1;
|
390
|
+
}
|
391
|
+
let stepForthColumn = columnIndex + 1;
|
392
|
+
while (stepForthColumn < this.getColumnsCount()) {
|
393
|
+
var _this$getHeaderSettin4;
|
394
|
+
const {
|
395
|
+
isRoot: isRootNode
|
396
|
+
} = (_this$getHeaderSettin4 = this.getHeaderSettings(headerLevel, stepForthColumn)) !== null && _this$getHeaderSettin4 !== void 0 ? _this$getHeaderSettin4 : {
|
397
|
+
isRoot: true
|
398
|
+
};
|
399
|
+
if (isRootNode) {
|
400
|
+
break;
|
401
|
+
}
|
402
|
+
stepForthColumn += 1;
|
403
|
+
}
|
404
|
+
return stepForthColumn - 1;
|
405
|
+
}
|
406
|
+
|
349
407
|
/**
|
350
408
|
* Gets a total number of headers levels.
|
351
409
|
*
|
352
410
|
* @returns {number}
|
353
411
|
*/
|
354
412
|
getLayersCount() {
|
355
|
-
return this
|
413
|
+
return _classPrivateFieldGet(this, _sourceSettings).getLayersCount();
|
356
414
|
}
|
357
415
|
|
358
416
|
/**
|
@@ -361,16 +419,16 @@ class StateManager {
|
|
361
419
|
* @returns {number}
|
362
420
|
*/
|
363
421
|
getColumnsCount() {
|
364
|
-
return this
|
422
|
+
return _classPrivateFieldGet(this, _sourceSettings).getColumnsCount();
|
365
423
|
}
|
366
424
|
|
367
425
|
/**
|
368
426
|
* Clears the column state manager to the initial state.
|
369
427
|
*/
|
370
428
|
clear() {
|
371
|
-
this
|
372
|
-
this
|
373
|
-
this
|
429
|
+
_classPrivateFieldSet(this, _stateMatrix, []);
|
430
|
+
_classPrivateFieldGet(this, _sourceSettings).clear();
|
431
|
+
_classPrivateFieldGet(this, _headersTree).clear();
|
374
432
|
}
|
375
433
|
}
|
376
434
|
exports.default = StateManager;
|