UNPKG

2.22 kBTypeScriptView Raw
1import { AfterViewInit, ComponentRef, ElementRef, EventEmitter, OnDestroy, Renderer, ViewContainerRef } from '@angular/core';
2import { ModalBackdropComponent } from './modal-backdrop.component';
3import { ModalOptions } from './modal-options.class';
4import { ComponentLoaderFactory } from '../component-loader/component-loader.factory';
5/** Mark any code with directive to show it's content in modal */
6export declare class ModalDirective implements AfterViewInit, OnDestroy {
7 /** allows to set modal configuration via element property */
8 config: ModalOptions;
9 /** This event fires immediately when the `show` instance method is called. */
10 onShow: EventEmitter<ModalDirective>;
11 /** This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete) */
12 onShown: EventEmitter<ModalDirective>;
13 /** This event is fired immediately when the hide instance method has been called. */
14 onHide: EventEmitter<ModalDirective>;
15 /** This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). */
16 onHidden: EventEmitter<ModalDirective>;
17 isAnimated: boolean;
18 readonly isShown: boolean;
19 protected _config: ModalOptions;
20 protected _isShown: boolean;
21 protected isBodyOverflowing: boolean;
22 protected originalBodyPadding: number;
23 protected scrollbarWidth: number;
24 protected timerHideModal: number;
25 protected timerRmBackDrop: number;
26 protected _element: ElementRef;
27 protected _renderer: Renderer;
28 protected backdrop: ComponentRef<ModalBackdropComponent>;
29 private _backdrop;
30 private _dialog;
31 onClick(event: any): void;
32 onEsc(): void;
33 constructor(_element: ElementRef, _viewContainerRef: ViewContainerRef, _renderer: Renderer, clf: ComponentLoaderFactory);
34 ngOnDestroy(): any;
35 ngAfterViewInit(): any;
36 /** Allows to manually toggle modal visibility */
37 toggle(): void;
38 /** Allows to manually open modal */
39 show(): void;
40 /** Allows to manually close modal */
41 hide(event?: Event): void;
42 protected setScrollbar(): void;
43 protected resetScrollbar(): void;
44 protected getScrollbarWidth(): number;
45}