ngx-slice-kit
Version:
[](https://badge.fury.io/js/ngx-slice-kit)
55 lines (54 loc) • 1.93 kB
TypeScript
import { ComponentFactoryResolver, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
import { OverlayModel, OverlayOptions } from './overlay.model';
import { Router } from '@angular/router';
import { Subscription } from 'rxjs';
import { OverlayDirective } from './overlay.directive';
import * as i0 from "@angular/core";
export declare class OverlayComponent implements OnInit, OnDestroy, OverlayModel {
private document;
private cfResolver;
private router;
private renderer;
sub: Subscription;
className: string;
br: string;
rects: {
top: any;
bottom: any;
right: any;
left: any;
width: any;
height: any;
x: any;
y: any;
};
options: OverlayOptions;
modalDirective: OverlayDirective;
overlayElem: ElementRef;
state: 'opened' | 'closed';
resultEvent: EventEmitter<any>;
constructor(document: any, cfResolver: ComponentFactoryResolver, router: Router, renderer: Renderer2);
loadComponent(): void;
onResult(res?: any): void;
onBackdrop(): void;
/**
* - if `fitWidth` config options is true
* there are width declared depending on its parent element
* - if `rects.top` calculated there is enough place to drop it down,
* if it hits `rects.bottom` – show it above the element
*/
setDropdownPosition(): void;
hideOnRouterEvents(): void;
/**
* detect window resize and scroll to prevent failed dropdown position
*/
initClosingSubscriptions(): void;
/**
* keyboard events
*/
initKeydownSubscription(): void;
ngOnInit(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<OverlayComponent, "sdk-overlay", never, { "options": "options"; }, { "resultEvent": "resultEvent"; }, never, never, false>;
}