import { FocusMonitor } from '@angular/cdk/a11y'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Renderer2, SimpleChanges, TemplateRef, Type, ViewContainerRef } from '@angular/core'; import { KbqComponentColors } from '@koobiq/components/core'; import { Observable } from 'rxjs'; import { KbqModalControlService } from './modal-control.service'; import { KbqModalRef } from './modal-ref.class'; import { IModalButtonOptions, ModalOptions, ModalSize, ModalType, OnClickCallback } from './modal.type'; import * as i0 from "@angular/core"; type AnimationState = 'enter' | 'leave' | null; export declare class KbqModalComponent extends KbqModalRef implements OnInit, OnChanges, AfterViewInit, OnDestroy, ModalOptions { private overlay; private renderer; private cfr; private elementRef; private viewContainer; private modalControl; private changeDetector; private focusMonitor; protected readonly document: Document; componentColors: typeof KbqComponentColors; kbqModalType: ModalType; kbqComponent: Type; kbqContent: string | TemplateRef<{}> | Type; kbqComponentParams: any; kbqFooter: string | TemplateRef<{}> | IModalButtonOptions[]; get kbqVisible(): boolean; set kbqVisible(value: boolean); private _kbqVisible; readonly kbqVisibleChange: EventEmitter; kbqWidth: number | string; kbqSize: ModalSize; kbqWrapClassName: string; kbqClassName: string; kbqStyle: object; kbqTitle: string | TemplateRef<{}>; kbqCloseByESC: boolean; get kbqClosable(): boolean; set kbqClosable(value: boolean); private _kbqClosable; get kbqMask(): boolean; set kbqMask(value: boolean); private _kbqMask; get kbqMaskClosable(): boolean; set kbqMaskClosable(value: boolean); private _kbqMaskClosable; kbqMaskStyle: object; kbqBodyStyle: object; readonly kbqAfterOpen: EventEmitter; readonly kbqAfterClose: EventEmitter; /** Emitted before the modal begins its closing animation. */ readonly kbqBeforeClose: EventEmitter; kbqOkText: string; kbqOkType: KbqComponentColors; kbqRestoreFocus: boolean; get kbqOkLoading(): boolean; set kbqOkLoading(value: boolean); private _kbqOkLoading; readonly kbqOnOk: EventEmitter | OnClickCallback; kbqCancelText: string; get kbqCancelLoading(): boolean; set kbqCancelLoading(value: boolean); private _kbqCancelLoading; readonly kbqOnCancel: EventEmitter | OnClickCallback; modalContainer: ElementRef; bodyContainer: ViewContainerRef; autoFocusedButtons: QueryList; modalBody: ElementRef; isTopOverflow: boolean; isBottomOverflow: boolean; maskAnimationClassMap: object | null; modalAnimationClassMap: object | null; transformOrigin: string; get afterOpen(): Observable; /** Observable alias for `kbqBeforeClose` */ get beforeClose(): Observable; get afterClose(): Observable; get okText(): string; get cancelText(): string; get hidden(): boolean; private focusedElementBeforeOpen; private previouslyFocusedElementOrigin; private contentComponentRef; private animationState; private container; constructor(overlay: Overlay, renderer: Renderer2, cfr: ComponentFactoryResolver, elementRef: ElementRef, viewContainer: ViewContainerRef, modalControl: KbqModalControlService, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor); kbqGetContainer: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef); ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; checkOverflow(): void; open(): void; close(result?: R): void; destroy(result?: R): void; markForCheck(): void; triggerOk(): void; triggerCancel(): void; getInstance(): KbqModalComponent; getContentComponentRef(): ComponentRef; getContentComponent(): T; getElement(): HTMLElement; getKbqFooter(): HTMLElement; onClickMask($event: MouseEvent): void; isModalType(type: ModalType): boolean; onKeyDown(event: KeyboardEvent): void; onClickCloseBtn(): void; onClickOkCancel(type: 'ok' | 'cancel'): void; handleCloseResult(triggerType: 'ok' | 'cancel', canClose: (doClose: boolean | void | {}) => boolean): void; isNonEmptyString(value: {}): boolean; isTemplateRef(value: {}): boolean; isComponent(value: {}): boolean; isModalButtons(value: {}): boolean; getButtonCallableProp(options: IModalButtonOptions, prop: string): {}; onButtonClick(button: IModalButtonOptions): void; /** * Sets mask animation classes for the given state, or clears them if state is null. * @docs-private */ animateMaskTo(state: AnimationState): void; private handleVisibleStateChange; private changeVisibleFromInside; private changeAnimationState; private animateTo; private formatModalButtons; /** * Create a component dynamically but not attach to any View * (this action will be executed when bodyContainer is ready) * @param component Component class */ private createDynamicComponent; private updateTransformOrigin; /** * Take care of the body's overflow to decide the existence of scrollbar * @param plusNum The number that the openModals.length will increase soon */ private changeBodyOverflow; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "kbq-modal", never, { "kbqModalType": { "alias": "kbqModalType"; "required": false; }; "kbqComponent": { "alias": "kbqComponent"; "required": false; }; "kbqContent": { "alias": "kbqContent"; "required": false; }; "kbqComponentParams": { "alias": "kbqComponentParams"; "required": false; }; "kbqFooter": { "alias": "kbqFooter"; "required": false; }; "kbqVisible": { "alias": "kbqVisible"; "required": false; }; "kbqWidth": { "alias": "kbqWidth"; "required": false; }; "kbqSize": { "alias": "kbqSize"; "required": false; }; "kbqWrapClassName": { "alias": "kbqWrapClassName"; "required": false; }; "kbqClassName": { "alias": "kbqClassName"; "required": false; }; "kbqStyle": { "alias": "kbqStyle"; "required": false; }; "kbqTitle": { "alias": "kbqTitle"; "required": false; }; "kbqCloseByESC": { "alias": "kbqCloseByESC"; "required": false; }; "kbqClosable": { "alias": "kbqClosable"; "required": false; }; "kbqMask": { "alias": "kbqMask"; "required": false; }; "kbqMaskClosable": { "alias": "kbqMaskClosable"; "required": false; }; "kbqMaskStyle": { "alias": "kbqMaskStyle"; "required": false; }; "kbqBodyStyle": { "alias": "kbqBodyStyle"; "required": false; }; "kbqOkText": { "alias": "kbqOkText"; "required": false; }; "kbqOkType": { "alias": "kbqOkType"; "required": false; }; "kbqRestoreFocus": { "alias": "kbqRestoreFocus"; "required": false; }; "kbqOkLoading": { "alias": "kbqOkLoading"; "required": false; }; "kbqOnOk": { "alias": "kbqOnOk"; "required": false; }; "kbqCancelText": { "alias": "kbqCancelText"; "required": false; }; "kbqCancelLoading": { "alias": "kbqCancelLoading"; "required": false; }; "kbqOnCancel": { "alias": "kbqOnCancel"; "required": false; }; "kbqGetContainer": { "alias": "kbqGetContainer"; "required": false; }; }, { "kbqVisibleChange": "kbqVisibleChange"; "kbqAfterOpen": "kbqAfterOpen"; "kbqAfterClose": "kbqAfterClose"; "kbqBeforeClose": "kbqBeforeClose"; "kbqOnOk": "kbqOnOk"; "kbqOnCancel": "kbqOnCancel"; }, never, ["*"], true, never>; } export {};