UNPKG

@neocomplexx/ngx-neo-modal-mat

Version:
53 lines (52 loc) 1.79 kB
import { AlertResult, AlertButton } from './ngx-neo-modal-mat.component'; import { MatDialog } from '@angular/material/dialog'; import { TranslateService } from '@ngx-translate/core'; import * as i0 from "@angular/core"; export declare class NgxNeoModalMatService { dialog: MatDialog; private translate; template: any; originalAlert: any; constructor(dialog: MatDialog, translate: TranslateService); private openModal; /** * Show message. Can be use as window.alert */ alert(msg: string, autofocus?: boolean): Promise<void>; /** * * Show succsessfull message */ success(msg: string, autofocus?: boolean): Promise<AlertResult>; /** * * Warning message */ warning(msg: string, autofocus?: boolean): Promise<AlertResult>; /** * * Error message */ error(msg: string, autofocus?: boolean): Promise<AlertResult>; /** * * Information message */ info(msg: string, autofocus?: boolean): Promise<AlertResult>; /** * * Show decission modal with question and two options for accept or reject. */ decision(questionMsg: string, successMsg?: string, cancelMsg?: string, autofocus?: AlertButton): Promise<AlertResult>; /** * * Input text message */ input(title: string, placeholder: string, successMsg?: string, autofocus?: boolean, buttonAutofocus?: AlertButton): Promise<AlertResult>; yesNoCancel(title: string, message: string, buttonFocus: AlertButton): Promise<AlertResult>; private custom; private isObject; private mergeDeep; static ɵfac: i0.ɵɵFactoryDef<NgxNeoModalMatService, never>; static ɵprov: i0.ɵɵInjectableDef<NgxNeoModalMatService>; }