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
@@ -15,15 +15,15 @@ class Event {
|
|
15
15
|
* @param {Settings} wtSettings The walkontable settings.
|
16
16
|
* @param {EventManager} eventManager The walkontable event manager.
|
17
17
|
* @param {Table} wtTable The table.
|
18
|
-
* @param {
|
18
|
+
* @param {SelectionManager} selectionManager Selections.
|
19
19
|
* @param {Event} [parent=null] The main Event instance.
|
20
20
|
*/
|
21
|
-
constructor(facadeGetter, domBindings, wtSettings, eventManager, wtTable,
|
21
|
+
constructor(facadeGetter, domBindings, wtSettings, eventManager, wtTable, selectionManager) {
|
22
22
|
let parent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
23
23
|
this.wtSettings = wtSettings;
|
24
24
|
this.domBindings = domBindings;
|
25
25
|
this.wtTable = wtTable;
|
26
|
-
this.
|
26
|
+
this.selectionManager = selectionManager;
|
27
27
|
this.parent = parent;
|
28
28
|
|
29
29
|
/**
|
@@ -131,11 +131,11 @@ class Event {
|
|
131
131
|
cell.coords = this.wtTable.getCoords(TD);
|
132
132
|
cell.TD = TD;
|
133
133
|
} else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'current')) {
|
134
|
-
cell.coords = this.
|
134
|
+
cell.coords = this.selectionManager.getFocusSelection().cellRange.highlight;
|
135
135
|
cell.TD = this.wtTable.getCell(cell.coords);
|
136
136
|
} else if (hasClass(elem, 'wtBorder') && hasClass(elem, 'area')) {
|
137
|
-
if (this.
|
138
|
-
cell.coords = this.
|
137
|
+
if (this.selectionManager.getAreaSelection().cellRange) {
|
138
|
+
cell.coords = this.selectionManager.getAreaSelection().cellRange.to;
|
139
139
|
cell.TD = this.wtTable.getCell(cell.coords);
|
140
140
|
}
|
141
141
|
}
|
@@ -273,7 +273,7 @@ class Event {
|
|
273
273
|
*/
|
274
274
|
onTouchStart(event) {
|
275
275
|
const priv = privatePool.get(this);
|
276
|
-
priv.selectedCellBeforeTouchEnd = this.
|
276
|
+
priv.selectedCellBeforeTouchEnd = this.selectionManager.getFocusSelection().cellRange;
|
277
277
|
this.touchApplied = true;
|
278
278
|
this.onMouseDown(event);
|
279
279
|
}
|
@@ -285,8 +285,9 @@ class Event {
|
|
285
285
|
* @param {MouseEvent} event The mouse event object.
|
286
286
|
*/
|
287
287
|
onTouchEnd(event) {
|
288
|
+
var _this$parentCell;
|
288
289
|
const target = event.target;
|
289
|
-
const parentCellCoords = this.parentCell(target)
|
290
|
+
const parentCellCoords = (_this$parentCell = this.parentCell(target)) === null || _this$parentCell === void 0 ? void 0 : _this$parentCell.coords;
|
290
291
|
const isCellsRange = isDefined(parentCellCoords) && parentCellCoords.row >= 0 && parentCellCoords.col >= 0;
|
291
292
|
const isEventCancelable = event.cancelable && isCellsRange && this.wtSettings.getSetting('isDataViewInstance');
|
292
293
|
|
@@ -50,8 +50,8 @@ class WalkontableFacade {
|
|
50
50
|
return this._wot.cloneOverlay; // todo create facade
|
51
51
|
}
|
52
52
|
|
53
|
-
get
|
54
|
-
return this._wot.
|
53
|
+
get selectionManager() {
|
54
|
+
return this._wot.selectionManager; // todo create facade
|
55
55
|
}
|
56
56
|
|
57
57
|
get wtViewport() {
|
@@ -46,8 +46,8 @@ export default class WalkontableFacade {
|
|
46
46
|
return this._wot.cloneOverlay; // todo create facade
|
47
47
|
}
|
48
48
|
|
49
|
-
get
|
50
|
-
return this._wot.
|
49
|
+
get selectionManager() {
|
50
|
+
return this._wot.selectionManager; // todo create facade
|
51
51
|
}
|
52
52
|
|
53
53
|
get wtViewport() {
|
@@ -12,8 +12,16 @@ exports.CellRange = _range.default;
|
|
12
12
|
var _core = _interopRequireDefault(require("./facade/core"));
|
13
13
|
exports.default = _core.default;
|
14
14
|
exports.Core = _core.default;
|
15
|
-
var _selection =
|
16
|
-
exports.Selection = _selection.
|
15
|
+
var _selection = require("./selection");
|
16
|
+
exports.Selection = _selection.Selection;
|
17
|
+
exports.HIGHLIGHT_ACTIVE_HEADER_TYPE = _selection.ACTIVE_HEADER_TYPE;
|
18
|
+
exports.HIGHLIGHT_AREA_TYPE = _selection.AREA_TYPE;
|
19
|
+
exports.HIGHLIGHT_FOCUS_TYPE = _selection.FOCUS_TYPE;
|
20
|
+
exports.HIGHLIGHT_FILL_TYPE = _selection.FILL_TYPE;
|
21
|
+
exports.HIGHLIGHT_HEADER_TYPE = _selection.HEADER_TYPE;
|
22
|
+
exports.HIGHLIGHT_ROW_TYPE = _selection.ROW_TYPE;
|
23
|
+
exports.HIGHLIGHT_COLUMN_TYPE = _selection.COLUMN_TYPE;
|
24
|
+
exports.HIGHLIGHT_CUSTOM_SELECTION_TYPE = _selection.CUSTOM_SELECTION_TYPE;
|
17
25
|
var Renderer = _interopRequireWildcard(require("./renderer"));
|
18
26
|
exports.Renderer = Renderer;
|
19
27
|
var _orderView = require("./utils/orderView");
|
@@ -3,8 +3,8 @@ import ViewportRowsCalculator from "./calculator/viewportRows.mjs";
|
|
3
3
|
import CellCoords from "./cell/coords.mjs";
|
4
4
|
import CellRange from "./cell/range.mjs";
|
5
5
|
import Walkontable from "./facade/core.mjs";
|
6
|
-
import Selection from "./selection.mjs";
|
6
|
+
import { Selection, ACTIVE_HEADER_TYPE, AREA_TYPE, FOCUS_TYPE, FILL_TYPE, HEADER_TYPE, ROW_TYPE, COLUMN_TYPE, CUSTOM_SELECTION_TYPE } from "./selection/index.mjs";
|
7
7
|
import * as Renderer from "./renderer/index.mjs";
|
8
8
|
import { OrderView, SharedOrderView } from "./utils/orderView/index.mjs";
|
9
9
|
import { getListenersCounter } from "../../../eventManager.mjs";
|
10
|
-
export { ViewportColumnsCalculator, ViewportRowsCalculator, CellCoords, CellRange, Walkontable as default, Walkontable as Core, Selection, Renderer, OrderView, SharedOrderView, getListenersCounter };
|
10
|
+
export { ViewportColumnsCalculator, ViewportRowsCalculator, CellCoords, CellRange, Walkontable as default, Walkontable as Core, Selection, ACTIVE_HEADER_TYPE as HIGHLIGHT_ACTIVE_HEADER_TYPE, AREA_TYPE as HIGHLIGHT_AREA_TYPE, FOCUS_TYPE as HIGHLIGHT_FOCUS_TYPE, FILL_TYPE as HIGHLIGHT_FILL_TYPE, HEADER_TYPE as HIGHLIGHT_HEADER_TYPE, ROW_TYPE as HIGHLIGHT_ROW_TYPE, COLUMN_TYPE as HIGHLIGHT_COLUMN_TYPE, CUSTOM_SELECTION_TYPE as HIGHLIGHT_CUSTOM_SELECTION_TYPE, Renderer, OrderView, SharedOrderView, getListenersCounter };
|
@@ -9,6 +9,9 @@ var _console = require("../../../../helpers/console");
|
|
9
9
|
var _constants = require("./constants");
|
10
10
|
var _clone = _interopRequireDefault(require("../core/clone"));
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
14
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
12
15
|
/**
|
13
16
|
* Creates an overlay over the original Walkontable instance. The overlay renders the clone of the original Walkontable
|
14
17
|
* and (optionally) implements behavior needed for native horizontal and vertical scrolling.
|
@@ -18,14 +21,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
18
21
|
* @property {Walkontable} wot The Walkontable instance.
|
19
22
|
*/
|
20
23
|
class Overlay {
|
21
|
-
/**
|
22
|
-
* The Walkontable settings.
|
23
|
-
*
|
24
|
-
* @private
|
25
|
-
* @type {Settings}
|
26
|
-
*/
|
27
|
-
wtSettings = null;
|
28
|
-
|
29
24
|
/**
|
30
25
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
31
26
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -34,6 +29,13 @@ class Overlay {
|
|
34
29
|
* @param {DomBindings} domBindings Dom elements bound to the current instance.
|
35
30
|
*/
|
36
31
|
constructor(wotInstance, facadeGetter, type, wtSettings, domBindings) {
|
32
|
+
/**
|
33
|
+
* The Walkontable settings.
|
34
|
+
*
|
35
|
+
* @private
|
36
|
+
* @type {Settings}
|
37
|
+
*/
|
38
|
+
_defineProperty(this, "wtSettings", null);
|
37
39
|
(0, _object.defineGetter)(this, 'wot', wotInstance, {
|
38
40
|
writable: false
|
39
41
|
});
|
@@ -279,7 +281,7 @@ class Overlay {
|
|
279
281
|
// todo ioc , or factor func if used only here
|
280
282
|
event: this.wot.wtEvent,
|
281
283
|
// todo ioc , or factory func if used only here
|
282
|
-
|
284
|
+
selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
|
283
285
|
});
|
284
286
|
}
|
285
287
|
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
2
5
|
import { getScrollableElement, getTrimmingContainer, getScrollbarWidth } from "../../../../helpers/dom/element.mjs";
|
3
6
|
import { defineGetter } from "../../../../helpers/object.mjs";
|
4
7
|
import { arrayEach } from "../../../../helpers/array.mjs";
|
@@ -14,14 +17,6 @@ import Clone from "../core/clone.mjs";
|
|
14
17
|
* @property {Walkontable} wot The Walkontable instance.
|
15
18
|
*/
|
16
19
|
export class Overlay {
|
17
|
-
/**
|
18
|
-
* The Walkontable settings.
|
19
|
-
*
|
20
|
-
* @private
|
21
|
-
* @type {Settings}
|
22
|
-
*/
|
23
|
-
wtSettings = null;
|
24
|
-
|
25
20
|
/**
|
26
21
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
27
22
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -30,6 +25,13 @@ export class Overlay {
|
|
30
25
|
* @param {DomBindings} domBindings Dom elements bound to the current instance.
|
31
26
|
*/
|
32
27
|
constructor(wotInstance, facadeGetter, type, wtSettings, domBindings) {
|
28
|
+
/**
|
29
|
+
* The Walkontable settings.
|
30
|
+
*
|
31
|
+
* @private
|
32
|
+
* @type {Settings}
|
33
|
+
*/
|
34
|
+
_defineProperty(this, "wtSettings", null);
|
33
35
|
defineGetter(this, 'wot', wotInstance, {
|
34
36
|
writable: false
|
35
37
|
});
|
@@ -275,7 +277,7 @@ export class Overlay {
|
|
275
277
|
// todo ioc , or factor func if used only here
|
276
278
|
event: this.wot.wtEvent,
|
277
279
|
// todo ioc , or factory func if used only here
|
278
|
-
|
280
|
+
selectionManager: this.wot.selectionManager // todo ioc , or factory func if used only here
|
279
281
|
});
|
280
282
|
}
|
281
283
|
|
@@ -7,18 +7,13 @@ var _bottom = _interopRequireDefault(require("./../table/bottom"));
|
|
7
7
|
var _base = require("./_base");
|
8
8
|
var _constants = require("./constants");
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
10
13
|
/**
|
11
14
|
* @class BottomOverlay
|
12
15
|
*/
|
13
16
|
class BottomOverlay extends _base.Overlay {
|
14
|
-
/**
|
15
|
-
* Cached value which holds the previous value of the `fixedRowsBottom` option.
|
16
|
-
* It is used as a comparison value that can be used to detect changes in that value.
|
17
|
-
*
|
18
|
-
* @type {number}
|
19
|
-
*/
|
20
|
-
cachedFixedRowsBottom = -1;
|
21
|
-
|
22
17
|
/**
|
23
18
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
24
19
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -27,6 +22,13 @@ class BottomOverlay extends _base.Overlay {
|
|
27
22
|
*/
|
28
23
|
constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
|
29
24
|
super(wotInstance, facadeGetter, _constants.CLONE_BOTTOM, wtSettings, domBindings);
|
25
|
+
/**
|
26
|
+
* Cached value which holds the previous value of the `fixedRowsBottom` option.
|
27
|
+
* It is used as a comparison value that can be used to detect changes in that value.
|
28
|
+
*
|
29
|
+
* @type {number}
|
30
|
+
*/
|
31
|
+
_defineProperty(this, "cachedFixedRowsBottom", -1);
|
30
32
|
this.cachedFixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
|
31
33
|
}
|
32
34
|
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
2
5
|
import { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass } from "../../../../helpers/dom/element.mjs";
|
3
6
|
import BottomOverlayTable from "./../table/bottom.mjs";
|
4
7
|
import { Overlay } from "./_base.mjs";
|
@@ -7,14 +10,6 @@ import { CLONE_BOTTOM } from "./constants.mjs";
|
|
7
10
|
* @class BottomOverlay
|
8
11
|
*/
|
9
12
|
export class BottomOverlay extends Overlay {
|
10
|
-
/**
|
11
|
-
* Cached value which holds the previous value of the `fixedRowsBottom` option.
|
12
|
-
* It is used as a comparison value that can be used to detect changes in that value.
|
13
|
-
*
|
14
|
-
* @type {number}
|
15
|
-
*/
|
16
|
-
cachedFixedRowsBottom = -1;
|
17
|
-
|
18
13
|
/**
|
19
14
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
20
15
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -23,6 +18,13 @@ export class BottomOverlay extends Overlay {
|
|
23
18
|
*/
|
24
19
|
constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
|
25
20
|
super(wotInstance, facadeGetter, CLONE_BOTTOM, wtSettings, domBindings);
|
21
|
+
/**
|
22
|
+
* Cached value which holds the previous value of the `fixedRowsBottom` option.
|
23
|
+
* It is used as a comparison value that can be used to detect changes in that value.
|
24
|
+
*
|
25
|
+
* @type {number}
|
26
|
+
*/
|
27
|
+
_defineProperty(this, "cachedFixedRowsBottom", -1);
|
26
28
|
this.cachedFixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
|
27
29
|
}
|
28
30
|
|
@@ -5,6 +5,7 @@ require("core-js/modules/es.error.cause.js");
|
|
5
5
|
var _element = require("../../../../helpers/dom/element");
|
6
6
|
var _inlineStart = _interopRequireDefault(require("../table/inlineStart"));
|
7
7
|
var _base = require("./_base");
|
8
|
+
var _selection = require("../selection");
|
8
9
|
var _constants = require("./constants");
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10
11
|
/**
|
@@ -172,15 +173,10 @@ class InlineStartOverlay extends _base.Overlay {
|
|
172
173
|
* Adjust overlay root childs size.
|
173
174
|
*/
|
174
175
|
adjustRootChildrenSize() {
|
175
|
-
var _selections$getCell$g;
|
176
176
|
const {
|
177
177
|
holder
|
178
178
|
} = this.clone.wtTable;
|
179
|
-
const
|
180
|
-
selections
|
181
|
-
} = this.wot;
|
182
|
-
const facade = this.facadeGetter();
|
183
|
-
const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
|
179
|
+
const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
|
184
180
|
this.clone.wtTable.hider.style.height = this.hider.style.height;
|
185
181
|
holder.style.height = holder.parentNode.style.height;
|
186
182
|
// Add selection corner protruding part to the holder total width to make sure that
|
@@ -2,6 +2,7 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
import { addClass, getScrollbarWidth, getScrollLeft, getWindowScrollTop, hasClass, outerWidth, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
|
3
3
|
import InlineStartOverlayTable from "../table/inlineStart.mjs";
|
4
4
|
import { Overlay } from "./_base.mjs";
|
5
|
+
import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
|
5
6
|
import { CLONE_INLINE_START } from "./constants.mjs";
|
6
7
|
/**
|
7
8
|
* @class InlineStartOverlay
|
@@ -168,15 +169,10 @@ export class InlineStartOverlay extends Overlay {
|
|
168
169
|
* Adjust overlay root childs size.
|
169
170
|
*/
|
170
171
|
adjustRootChildrenSize() {
|
171
|
-
var _selections$getCell$g;
|
172
172
|
const {
|
173
173
|
holder
|
174
174
|
} = this.clone.wtTable;
|
175
|
-
const
|
176
|
-
selections
|
177
|
-
} = this.wot;
|
178
|
-
const facade = this.facadeGetter();
|
179
|
-
const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
|
175
|
+
const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.width, 10) / 2 : 0;
|
180
176
|
this.clone.wtTable.hider.style.height = this.hider.style.height;
|
181
177
|
holder.style.height = holder.parentNode.style.height;
|
182
178
|
// Add selection corner protruding part to the holder total width to make sure that
|
@@ -5,20 +5,16 @@ require("core-js/modules/es.error.cause.js");
|
|
5
5
|
var _element = require("../../../../helpers/dom/element");
|
6
6
|
var _top = _interopRequireDefault(require("./../table/top"));
|
7
7
|
var _base = require("./_base");
|
8
|
+
var _selection = require("../selection");
|
8
9
|
var _constants = require("./constants");
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
13
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
10
14
|
/**
|
11
15
|
* @class TopOverlay
|
12
16
|
*/
|
13
17
|
class TopOverlay extends _base.Overlay {
|
14
|
-
/**
|
15
|
-
* Cached value which holds the previous value of the `fixedRowsTop` option.
|
16
|
-
* It is used as a comparison value that can be used to detect changes in this value.
|
17
|
-
*
|
18
|
-
* @type {number}
|
19
|
-
*/
|
20
|
-
cachedFixedRowsTop = -1;
|
21
|
-
|
22
18
|
/**
|
23
19
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
24
20
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -27,6 +23,13 @@ class TopOverlay extends _base.Overlay {
|
|
27
23
|
*/
|
28
24
|
constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
|
29
25
|
super(wotInstance, facadeGetter, _constants.CLONE_TOP, wtSettings, domBindings);
|
26
|
+
/**
|
27
|
+
* Cached value which holds the previous value of the `fixedRowsTop` option.
|
28
|
+
* It is used as a comparison value that can be used to detect changes in this value.
|
29
|
+
*
|
30
|
+
* @type {number}
|
31
|
+
*/
|
32
|
+
_defineProperty(this, "cachedFixedRowsTop", -1);
|
30
33
|
this.cachedFixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
|
31
34
|
}
|
32
35
|
|
@@ -197,15 +200,10 @@ class TopOverlay extends _base.Overlay {
|
|
197
200
|
* Adjust overlay root childs size.
|
198
201
|
*/
|
199
202
|
adjustRootChildrenSize() {
|
200
|
-
var _selections$getCell$g;
|
201
203
|
const {
|
202
204
|
holder
|
203
205
|
} = this.clone.wtTable;
|
204
|
-
const
|
205
|
-
selections
|
206
|
-
} = this.wot;
|
207
|
-
const facade = this.facadeGetter();
|
208
|
-
const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
|
206
|
+
const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(_selection.CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
|
209
207
|
this.clone.wtTable.hider.style.width = this.hider.style.width;
|
210
208
|
holder.style.width = holder.parentNode.style.width;
|
211
209
|
// Add selection corner protruding part to the holder total height to make sure that
|
@@ -1,20 +1,16 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
2
5
|
import { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
|
3
6
|
import TopOverlayTable from "./../table/top.mjs";
|
4
7
|
import { Overlay } from "./_base.mjs";
|
8
|
+
import { CORNER_DEFAULT_STYLE } from "../selection/index.mjs";
|
5
9
|
import { CLONE_TOP } from "./constants.mjs";
|
6
10
|
/**
|
7
11
|
* @class TopOverlay
|
8
12
|
*/
|
9
13
|
export class TopOverlay extends Overlay {
|
10
|
-
/**
|
11
|
-
* Cached value which holds the previous value of the `fixedRowsTop` option.
|
12
|
-
* It is used as a comparison value that can be used to detect changes in this value.
|
13
|
-
*
|
14
|
-
* @type {number}
|
15
|
-
*/
|
16
|
-
cachedFixedRowsTop = -1;
|
17
|
-
|
18
14
|
/**
|
19
15
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
20
16
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -23,6 +19,13 @@ export class TopOverlay extends Overlay {
|
|
23
19
|
*/
|
24
20
|
constructor(wotInstance, facadeGetter, wtSettings, domBindings) {
|
25
21
|
super(wotInstance, facadeGetter, CLONE_TOP, wtSettings, domBindings);
|
22
|
+
/**
|
23
|
+
* Cached value which holds the previous value of the `fixedRowsTop` option.
|
24
|
+
* It is used as a comparison value that can be used to detect changes in this value.
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
*/
|
28
|
+
_defineProperty(this, "cachedFixedRowsTop", -1);
|
26
29
|
this.cachedFixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
|
27
30
|
}
|
28
31
|
|
@@ -193,15 +196,10 @@ export class TopOverlay extends Overlay {
|
|
193
196
|
* Adjust overlay root childs size.
|
194
197
|
*/
|
195
198
|
adjustRootChildrenSize() {
|
196
|
-
var _selections$getCell$g;
|
197
199
|
const {
|
198
200
|
holder
|
199
201
|
} = this.clone.wtTable;
|
200
|
-
const
|
201
|
-
selections
|
202
|
-
} = this.wot;
|
203
|
-
const facade = this.facadeGetter();
|
204
|
-
const selectionCornerOffset = Math.abs((_selections$getCell$g = selections?.getCell().getBorder(facade).cornerCenterPointOffset) != null ? _selections$getCell$g : 0);
|
202
|
+
const selectionCornerOffset = this.wot.selectionManager.getFocusSelection() ? parseInt(CORNER_DEFAULT_STYLE.height, 10) / 2 : 0;
|
205
203
|
this.clone.wtTable.hider.style.width = this.hider.style.width;
|
206
204
|
holder.style.width = holder.parentNode.style.width;
|
207
205
|
// Add selection corner protruding part to the holder total height to make sure that
|
@@ -1,28 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/es.error.cause.js");
|
4
5
|
var _element = require("../../../../helpers/dom/element");
|
5
6
|
var _topInlineStartCorner = _interopRequireDefault(require("../table/topInlineStartCorner"));
|
6
7
|
var _base = require("./_base");
|
7
8
|
var _constants = require("./constants");
|
8
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
9
13
|
/**
|
10
14
|
* @class TopInlineStartCornerOverlay
|
11
15
|
*/
|
12
16
|
class TopInlineStartCornerOverlay extends _base.Overlay {
|
13
|
-
/**
|
14
|
-
* The instance of the Top overlay.
|
15
|
-
*
|
16
|
-
* @type {TopOverlay}
|
17
|
-
*/
|
18
|
-
topOverlay;
|
19
|
-
/**
|
20
|
-
* The instance of the InlineStart overlay.
|
21
|
-
*
|
22
|
-
* @type {InlineStartOverlay}
|
23
|
-
*/
|
24
|
-
inlineStartOverlay;
|
25
|
-
|
26
17
|
/**
|
27
18
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
28
19
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -33,6 +24,18 @@ class TopInlineStartCornerOverlay extends _base.Overlay {
|
|
33
24
|
*/
|
34
25
|
constructor(wotInstance, facadeGetter, wtSettings, domBindings, topOverlay, inlineStartOverlay) {
|
35
26
|
super(wotInstance, facadeGetter, _constants.CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);
|
27
|
+
/**
|
28
|
+
* The instance of the Top overlay.
|
29
|
+
*
|
30
|
+
* @type {TopOverlay}
|
31
|
+
*/
|
32
|
+
_defineProperty(this, "topOverlay", void 0);
|
33
|
+
/**
|
34
|
+
* The instance of the InlineStart overlay.
|
35
|
+
*
|
36
|
+
* @type {InlineStartOverlay}
|
37
|
+
*/
|
38
|
+
_defineProperty(this, "inlineStartOverlay", void 0);
|
36
39
|
this.topOverlay = topOverlay;
|
37
40
|
this.inlineStartOverlay = inlineStartOverlay;
|
38
41
|
}
|
@@ -1,3 +1,7 @@
|
|
1
|
+
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
1
5
|
import { outerHeight, outerWidth, setOverlayPosition, resetCssTransform } from "../../../../helpers/dom/element.mjs";
|
2
6
|
import TopInlineStartCornerOverlayTable from "../table/topInlineStartCorner.mjs";
|
3
7
|
import { Overlay } from "./_base.mjs";
|
@@ -6,19 +10,6 @@ import { CLONE_TOP_INLINE_START_CORNER } from "./constants.mjs";
|
|
6
10
|
* @class TopInlineStartCornerOverlay
|
7
11
|
*/
|
8
12
|
export class TopInlineStartCornerOverlay extends Overlay {
|
9
|
-
/**
|
10
|
-
* The instance of the Top overlay.
|
11
|
-
*
|
12
|
-
* @type {TopOverlay}
|
13
|
-
*/
|
14
|
-
topOverlay;
|
15
|
-
/**
|
16
|
-
* The instance of the InlineStart overlay.
|
17
|
-
*
|
18
|
-
* @type {InlineStartOverlay}
|
19
|
-
*/
|
20
|
-
inlineStartOverlay;
|
21
|
-
|
22
13
|
/**
|
23
14
|
* @param {Walkontable} wotInstance The Walkontable instance. @TODO refactoring: check if can be deleted.
|
24
15
|
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
@@ -29,6 +20,18 @@ export class TopInlineStartCornerOverlay extends Overlay {
|
|
29
20
|
*/
|
30
21
|
constructor(wotInstance, facadeGetter, wtSettings, domBindings, topOverlay, inlineStartOverlay) {
|
31
22
|
super(wotInstance, facadeGetter, CLONE_TOP_INLINE_START_CORNER, wtSettings, domBindings);
|
23
|
+
/**
|
24
|
+
* The instance of the Top overlay.
|
25
|
+
*
|
26
|
+
* @type {TopOverlay}
|
27
|
+
*/
|
28
|
+
_defineProperty(this, "topOverlay", void 0);
|
29
|
+
/**
|
30
|
+
* The instance of the InlineStart overlay.
|
31
|
+
*
|
32
|
+
* @type {InlineStartOverlay}
|
33
|
+
*/
|
34
|
+
_defineProperty(this, "inlineStartOverlay", void 0);
|
32
35
|
this.topOverlay = topOverlay;
|
33
36
|
this.inlineStartOverlay = inlineStartOverlay;
|
34
37
|
}
|