import type { IgcDragMoveEventArguments, IgcDragResizeEventArguments } from '../drag-drop/drag.service.js'; import type { DockingIndicatorPosition, PaneActionBehavior, ResizerLocation, UnpinnedLocation } from './backfill-types-dockmanager.js'; import { type IgcContentPane, type IgcContextMenuItem, type IgcDockingIndicator, type IgcDockManagerComponentBase, type IgcDockManagerPane, type IgcDockManagerPoint, type IgcDocumentHost, type IgcSplitPane, type IgcTabGroupPane, type IgcTabRectsInfo } from './dockmanager.interfaces.js'; /** * @hidden */ export declare class IgcDockManagerService { dockManager: IgcDockManagerComponentBase; private paneParentMap; private initialFloatingPaneLocation; private initialFloatingPaneWidth; private initialFloatingPaneHeight; private initialTabHeaderClickOffset; private initialDragClientPoint; private draggedPanes; private draggedTab; private draggedPaneParent; private shiftLeftThreshold; private shiftRightThreshold; private documentsCache; private contentPanesCache; private isUpdatingLayout; private lastSwapCenter; private _splitterSize; private _previousLocationMap; visibleDocuments: IgcContentPane[]; visibleContentPanes: IgcContentPane[]; documentHosts: IgcDocumentHost[]; clientContentPanesMap: Map; dropTargetParentRect: DOMRect; dockManagerRect: DOMRect; dockingIndicator: IgcDockingIndicator | null; forceDragPane: IgcSplitPane | null; forceDragTabHeader: IgcContentPane | null; unpinnedLocationMap: Map; keyboardDockPane: IgcContentPane | null; proximityDockPosition: DockingIndicatorPosition; splitterDockTarget: { pane: any; index: number; }; isPinToggling: boolean; constructor(dockManager: IgcDockManagerComponentBase); getContent(contentId: string): IgcDockManagerPane; private generateUuid; private populatePaneParents; private populatePinLocations; private resolvePaneUnpinLocation; private addContentPanePinLocation; private findClosestDocumentHost; private findPaneUnpinLocation; removePane(pane: IgcDockManagerPane): void; private removeFloatingPaneIfEmpty; isFloatingPane(pane: IgcSplitPane): boolean; private addFloatingPane; getChildContentPanes(pane: IgcSplitPane | IgcTabGroupPane | null): IgcContentPane[]; private getChildContentPanesRecursive; getChildDocHostRecursive(pane: IgcSplitPane): IgcDocumentHost | null; getVisibleContentPanes(parent: IgcTabGroupPane): IgcContentPane[]; /** * Get the actual rendered size of a splitter element from the DOM. * The result is cached after the first successful measurement since splitter * size is consistent across the component and rarely changes at runtime. * @returns The splitter thickness in pixels, or IGC_DEFAULT_SPLITTER_SIZE if not found */ private getSplitterSize; /** * Get the actual rendered height of a floating pane header from the DOM. * This accounts for user customization via slots, CSS parts, or other styling. * @param pane The floating pane to check * @returns The header height in pixels, or default as a fallback if not found */ private getFloatingPaneHeaderHeight; /** * Calculate the minimum width and height constraints for a floating pane * based on all its child panes' minResizeWidth and minResizeHeight properties. * This properly handles split panes by summing constraints in the split direction. */ private getFloatingPaneMinConstraints; findPaneById(paneId: string | undefined): IgcDockManagerPane | null; private getPaneToDock; private removeDocumentHost; private dockToCenter; private dockToEdge; private dockToSplitter; /** * Calculates the pixel size that the dragged (floating) pane should have * after it is docked into the specified parent split pane. * * The method determines the appropriate dimension (width or height) * based on the parent pane's orientation: * - For a vertical split pane, it returns the height. * - For a horizontal split pane, it returns the width. * * The size is derived from the floating pane's stored floating dimensions * (`floatingWidth` / `floatingHeight`) if available. Otherwise, it falls back * to the current DOM bounding rectangle of the dragged pane element. * * @private * @param {boolean} isVertical - Indicates whether the target orientation is vertical. * @returns {number | undefined} The computed size in pixels to apply after docking, * or `undefined` if the size cannot be determined. */ private getDraggedPanePostDockingSizeInPixels; private getActualDraggedPaneSize; shouldUseFixedSize(pane: IgcDockManagerPane | undefined): boolean; private updateLayout; private hasMaximizedProp; getLastMaximizedPane(): IgcContentPane | IgcSplitPane | IgcTabGroupPane | null; processLayout(): void; getParent(pane: IgcDockManagerPane): IgcDockManagerPane; getRootParent(pane: IgcDockManagerPane): IgcSplitPane; getPanePath(pane: IgcDockManagerPane): IgcDockManagerPane[]; getDocHostParent(pane: IgcDockManagerPane): IgcDocumentHost; resizeFlyoutPane(delta: number): void; resizePane(pane: IgcDockManagerPane, deltaPercentage: number): void; togglePin(pane: IgcContentPane, unpinBehavior?: PaneActionBehavior): void; private checkUseFixedSizeParent; closePane(pane: IgcContentPane): void; closeFloatingPane(pane: IgcSplitPane): void; private emitPaneClose; private removeAllowedPanes; flyoutPane(pane: IgcContentPane): void; /** * Sets the flyout pane and emits paneFlyoutToggle event if needed. * @param newValue The new flyout pane value * @param oldValue The previous flyout pane value */ setFlyoutPane(newValue: IgcContentPane | null, oldValue: IgcContentPane | null): void; maximizePane(pane: IgcContentPane | IgcSplitPane | IgcTabGroupPane | null): void; moveFloatingPane(pane: IgcSplitPane, location: IgcDockManagerPoint): void; resizeFloatingPaneStart(pane: IgcSplitPane, resizerLocation: ResizerLocation): boolean; resizeFloatingPane(pane: IgcSplitPane, args: IgcDragResizeEventArguments): void; resizeFloatingPaneEnd(pane: IgcSplitPane, resizerLocation: ResizerLocation): void; floatPane(pane: IgcContentPane, x: number, y: number, width: number, height: number): void; floatTab(pane: IgcContentPane, x: number, y: number, width: number, height: number): void; hasFloatingPaneHeader(pane: IgcSplitPane): boolean; rootDockPane(position: DockingIndicatorPosition): void; dockPane(position: DockingIndicatorPosition): void; getActualIsPinned(pane: IgcContentPane): boolean; getActualAllowClose(pane: IgcContentPane): boolean; isContentPaneVisible(pane: IgcContentPane): boolean; getSplitPaneVisibleChildren(pane: IgcSplitPane): IgcDockManagerPane[]; closeTabPane(pane: IgcContentPane): void; bringFloatingPaneOnTop(pane: IgcSplitPane): void; createContextMenuItems(pane: IgcContentPane): IgcContextMenuItem[]; dragPaneStart(pane: IgcSplitPane | IgcContentPane, clientX: number, clientY: number, rect?: DOMRect, anyPaneIgnoringResizeConstraints?: boolean): boolean; private pointInBoundaries; dragPaneMove(clientX: number, clientY: number): boolean; dragPaneEnd(): boolean; private emitDragOverEvent; private dragOver; dragTabStart(pane: IgcContentPane): boolean; dragTabMove(pane: IgcContentPane, args: IgcDragMoveEventArguments, rects: IgcTabRectsInfo, anyPaneIgnoringResizeConstraints?: boolean): boolean; private floatTabHeader; private resolveChildPanesAllowMaximize; normalizeMaximizedPane(pane: IgcContentPane): void; resolveAllowMaximize(pane: IgcDockManagerPane): boolean; getDropShadowRect(dockingPosition?: DockingIndicatorPosition, dockingDirection?: string): DOMRect | undefined; getDropShadowRectRoot(): DOMRect; selectHiddenTab(tabGroup: IgcTabGroupPane, pane: IgcContentPane): void; shiftTabLeft(pane: IgcContentPane): void; shiftTabRight(pane: IgcContentPane): void; cacheDocumentsOrder(): void; cacheContentPanesOrder(): void; focusPrevContentPane(isInDocHost: boolean): void; focusNextContentPane(isInDocHost: boolean): void; isSplitPaneIgnoringResizeConstraints(pane: IgcDockManagerPane): boolean; isParentUseFixedSize(pane: IgcDockManagerPane): boolean; checkAndAddPlaceholderPane(pane: IgcDockManagerPane, ignoreNestedPanes?: boolean, _isRoot?: boolean): void; }