UNPKG

com.phloxui

Version:

PhloxUI Ng2+ Framework

60 lines (59 loc) 2.63 kB
import { PhloxApp } from '../component/PhloxApp.component'; import { ComponentDialogModel } from '../component/model/ComponentDialogModel'; /** * <p style="text-indent: 2em;"> * A <code>ng</code> service used for displaying <code>application</code> modal dialog on the screen. This service class only delegates * method calls to [[PhloxApp]] component allowing you to control the dialog anywhere entire the <code>application</code>. For example, * from the component loaded by <code>router</code> where the [[PhloxApp]] component instance could not be referred directly, * <code>this</code> service will be helpful in allowing you to control the dialog via <code>this</code> service. * </p> * * @author shiorin, tee4cute * @see [[PhloxDialog]] * @see [[PhloxApp]] */ export declare class DialogService { private phloxApp; /** * <p style="text-indent: 1em;"> * Initialize <code>this</code> service and bind it with the given <code><b>phloxApp</b></code> instance. All method calls of <code>this</code> * service will be delegate to the given <code>application</code> instance. Please note that this method is intended to be used internally by * <code>PhloxUI</code> framework. So, <b>you should NOT use this method</b> in normal situations. * </p> * * @see [[PhloxApp]] */ init(phloxApp: PhloxApp): void; /** * <p style="text-indent: 1em;"> * Hide the showing <code>application</code> dialog. This method only delegates method call to [[PhloxDialog.hideDialog]]. * </p> * * @see [[PhloxDialog.hideDialog]] */ hideDialog(): void; /** * <p style="text-indent: 1em;"> * Show the confirmation dialog. This method only delegates method call to [[PhloxDialog.showConfirmDialog]]. * </p> * * @see [[PhloxDialog.showConfirmDialog]] */ showConfirmDialog(title: string, message: string, showCancelBtn: boolean, width?: string, height?: string): Promise<any>; /** * <p style="text-indent: 1em;"> * Show the message dialog. This method only delegates method call to [[PhloxDialog.showMessageDialog]]. * </p> * * @see [[PhloxDialog.showMessageDialog]] */ showMessageDialog(title: string, message: string, width?: string, height?: string): Promise<any>; /** * <p style="text-indent: 1em;"> * Show the component dialog. This method only delegates method call to [[PhloxDialog.showComponentDialog]]. * </p> * * @see [[PhloxDialog.showComponentDialog]] */ showComponentDialog(componentDialogModel: ComponentDialogModel): Promise<any>; }