import * as i0 from '@angular/core'; import { ComponentRef, ViewRef, ComponentFactoryResolver, ApplicationRef, Injector, NgZone, RendererFactory2, Type, TemplateRef } from '@angular/core'; import { PositionState } from '@usitsdasdesign/dds-ng/shared'; import { Subject } from 'rxjs'; interface DirectionPositions { top?: number; left?: number; maxWidth?: number; } interface WindowLimits { topLimit: boolean; topHalfLimit: boolean; topCornerLimit: boolean; bottomLimit: boolean; bottomHalfLimit: boolean; bottomCornerLimit: boolean; leftLimit: boolean; leftHalfLimit: boolean; leftCornerLimit: boolean; rightLimit: boolean; rightHalfLimit: boolean; rightCornerLimit: boolean; } interface PopupLocationConfig { elRect: ClientRect; popupRect: ClientRect; beakRect?: ClientRect; indent: number; shift: number; isDynamic: boolean; } interface Coordinates { popupCoords: DirectionPositions; beakCoords: DirectionPositions; beakPosition: PositionState; } declare enum BeakClass { beak = "beak", top = "beak_top", bottom = "beak_bottom", left = "beak_left", right = "beak_right" } interface PopupList { component: ComponentRef; componentViewRef: ViewRef; backdrop?: HTMLElement; backdropListener?: () => void; } declare enum InvokeType { click = "click", hover = "hover" } declare function topPosCondition(config: PopupLocationConfig): Coordinates; declare function topLeftPosCondition(config: PopupLocationConfig): Coordinates; declare function topRightCondtion(config: PopupLocationConfig): Coordinates; declare function bottomPosCondition(config: PopupLocationConfig): Coordinates; declare function bottomLeftPosCondition(config: PopupLocationConfig): Coordinates; declare function bottomRightCondition(config: PopupLocationConfig): Coordinates; declare function leftPosCondtion(config: PopupLocationConfig): Coordinates; declare function leftTopPosCondition(config: PopupLocationConfig): Coordinates; declare function leftBottomPosCondition(config: PopupLocationConfig): Coordinates; declare function rightPosCondition(config: PopupLocationConfig): Coordinates; declare function rightTopPosCondition(config: PopupLocationConfig): Coordinates; declare function rightBottomPosCondition(config: PopupLocationConfig): Coordinates; declare const HALF_DIVIDER = 2; declare const WINDOW_TOP_LIMIT = 0; declare const INDENT = 8; declare const SHIFT = 0; declare const POPUP_ELEMENT_COUNT = 0; declare const POPUP_Z_INDEX = 1001; declare const BACKDROP_Z_INDEX = 1000; declare class DialogListService { dialogList: any[]; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare function top({ elRect, popupRect, beakRect, indent }: PopupLocationConfig): Coordinates; declare function topLeft({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function topRight({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function bottom({ elRect, popupRect, beakRect, indent }: PopupLocationConfig): Coordinates; declare function bottomLeft({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function bottomRight({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function left({ elRect, popupRect, beakRect, indent }: PopupLocationConfig): Coordinates; declare function leftTop({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function leftBottom({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function right({ elRect, popupRect, beakRect, indent }: PopupLocationConfig): Coordinates; declare function rightTop({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function rightBottom({ elRect, popupRect, beakRect, indent, shift }: PopupLocationConfig): Coordinates; declare function addPosition(el: HTMLElement, position: DirectionPositions, setMaxWidth?: boolean): void; declare class PopupService { private resolver; private appRef; private injector; private ngZone; private rendererFactory; private dialogListService; private document; closedPopup: Subject; private popupList; private render; private popupElementCount; constructor(resolver: ComponentFactoryResolver, appRef: ApplicationRef, injector: Injector, ngZone: NgZone, rendererFactory: RendererFactory2, dialogListService: DialogListService, document: Document); open(component: Type, content: TemplateRef, inputs?: unknown, invokeType?: InvokeType | string, hasBackdrop?: boolean, stickerBackdropClass?: string): HTMLElement; close(event: Event): void; private resolveNgContent; private incrementElementCount; private decrementElementCount; private documentKeydownListener; private setOrderPosition; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Function to check the position of the popup and return the corresponding coordinates. */ declare function checkPosition(position: string, config: PopupLocationConfig): Coordinates; declare function checkWindowLimits(config: PopupLocationConfig): WindowLimits; export { BACKDROP_Z_INDEX, BeakClass, DialogListService, HALF_DIVIDER, INDENT, InvokeType, POPUP_ELEMENT_COUNT, POPUP_Z_INDEX, PopupService, SHIFT, WINDOW_TOP_LIMIT, addPosition, bottom, bottomLeft, bottomLeftPosCondition, bottomPosCondition, bottomRight, bottomRightCondition, checkPosition, checkWindowLimits, left, leftBottom, leftBottomPosCondition, leftPosCondtion, leftTop, leftTopPosCondition, right, rightBottom, rightBottomPosCondition, rightPosCondition, rightTop, rightTopPosCondition, top, topLeft, topLeftPosCondition, topPosCondition, topRight, topRightCondtion }; export type { Coordinates, DirectionPositions, PopupList, PopupLocationConfig, WindowLimits };