@omnia/foundation
Version:
Provide omnia foundation typings and tooling work on client side for omnia extension
30 lines (29 loc) • 1.4 kB
TypeScript
import { Type, ViewContainerRef, Injector } from '@angular/core';
import { DialogRef, ModalComponent, CloseGuard } from 'angular2-modal';
import { Modal, BSModalContext } from 'angular2-modal/plugins/bootstrap';
export interface IDialogButton {
name: string;
clickHandler: Function;
isPrimary: boolean;
}
export declare class BaseDialogModel<T> extends BSModalContext {
params: T;
size: any;
dialogClass: any;
constructor(params: T, size: any, dialogClass: any);
}
export declare class BaseDialogComponent<T> implements CloseGuard, ModalComponent<T> {
dialog: DialogRef<T>;
context: T;
constructor(dialog: DialogRef<T>);
close: () => void;
}
export declare class DialogService {
private modal;
constructor(modal: Modal);
onConfirmationDialog: (title: string, body: string, viewContainerRef: ViewContainerRef, okCallback?: () => void, cancelCallback?: () => void) => void;
onCustomDialog: (title: string, body: string, buttons: IDialogButton[], viewContainerRef: ViewContainerRef, dialogSize?: any) => void;
openDialog: (componentType: Type<any>, params: any, viewContainerRef: ViewContainerRef, dialogSize?: string, dialogClass?: string, injector?: Injector, okCallback?: (result: any) => void, cancelCallback?: () => void) => Promise<DialogRef<any>>;
blockUI: () => void;
unblockUI: () => void;
}