/** Core */ import { CoreComponent } from "cmf.core/src/core"; import { ModuleLoaderComponent } from 'cmf.core/src/domain/extensions/module.loader'; /** Angular2 */ import * as ng from "@angular/core"; import { PageBag } from "../page/pageBag"; import "node_modules/jquery-ui/ui/widgets/dialog"; import { NavigationGuard } from "./navigationGuard"; export declare type ModalViewBeforeCloseHandler = () => Promise; export declare type ModalViewAfterCloseHandler = () => void; export declare type ModalViewBeforeCancelHandler = ModalViewBeforeCloseHandler; /** * Token to provide. * Used in the base widget to hide the bottom border. * This was made to hide the border of base widget on modalView and show border when not in modal view. */ export declare const BASE_WIDGET_HIDE_BORDER_TOKEN: ng.InjectionToken; export declare class ModalViewInstance { instance: ModalView; beforeClose: ModalViewBeforeCloseHandler; afterClose: ModalViewAfterCloseHandler; beforeCancel: ModalViewBeforeCancelHandler; afterCancel: ModalViewAfterCloseHandler; close(avoidRefresh?: boolean): void; cancel(): void; } /** * @whatItDoes * Modal View component. * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `PageBag` : **bag** - The bag of this component ; * `PageBag` : **sibling-bag** - The sibling-bag of this component . * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * */ export declare class ModalView extends CoreComponent implements ng.OnInit, ng.OnDestroy { private _elementRef; private _modalViewInstance; private _modalPageBag; private _compiler; private _navigationGuard; bag: PageBag; _siblingBag: PageBag; private _id; private _instance; private _forceClose; private _forceCancel; private _isScrollDisabled; private _currentScrollPosition; _moduleLoaderComponent: ModuleLoaderComponent; constructor(_elementRef: ng.ElementRef, _modalViewInstance: ModalViewInstance, _modalPageBag: PageBag, _compiler: ng.Compiler, _navigationGuard: NavigationGuard); /** * Set if the modal will call "berforeCancel" before the application performs any internal navigation * @param cancelBeforeNavigation "true" to activate and "false" to deactivate this behavior */ setCancelBeforeNavigation(cancelBeforeNavigation: boolean): void; close(avoidRefresh?: boolean): void; cancel(event?: Event): void; beforeClose(avoidRefresh?: boolean): boolean; beforeCancel(event: Event, onCancel?: (result: boolean) => void): boolean; onModelComponentInstantiationError(error: Error): void; /** * On init */ ngOnInit(): void; /** * On destroy */ ngOnDestroy(): void; } export declare class ModalViewModule { }