@nova-ui/bits
Version:
SolarWinds Nova Framework
24 lines (23 loc) • 1.16 kB
TypeScript
import { ConnectedPosition } from "@angular/cdk/overlay";
import { PopoverOverlayPosition, PopoverPlacement } from "./public-api";
import * as i0 from "@angular/core";
export declare class PopoverPositionService {
private readonly popoverPositions;
constructor();
setPopoverOffset(panelClass: string | string[], elRefHeight: number, overlayRefElement: HTMLElement): void;
possiblePositionsForPlacement(placement: PopoverPlacement): ConnectedPosition[];
getConnectedPositions(positions: PopoverOverlayPosition[]): ConnectedPosition[];
/**
* Returns all possible positions for a placement
* Eg: left => [OVERLAY_POSITIONS[centerLeft], OVERLAY_POSITIONS[topLeft], OVERLAY_POSITIONS[bottomLeft]]
*
* @param placement
* @returns ConnectedPosition[]
*/
private getPositionsForPlacement;
private getPopoverPositionPanelClass;
private calculateOffsetY;
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverPositionService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<PopoverPositionService>;
}
export declare function getPopoverPositions(): Record<PopoverOverlayPosition, ConnectedPosition>;