ngx-core-business
Version:
A comprehensive solution designed to streamline the development of enterprise-level Angular applications.
40 lines (39 loc) • 1.53 kB
TypeScript
import { Observable } from 'rxjs';
import { MatDialog } from '@angular/material/dialog';
import { DialogOption } from '../dialog/dialog.component';
import { ComponentType } from '@angular/cdk/portal';
import * as i0 from "@angular/core";
export declare class DialogService {
private matDialog;
constructor(matDialog: MatDialog);
/**
* Botones ACEPTAR/CANCELAR
*/
confirm(title: string, message: string, suggested?: 'confirm' | 'cancel' | 'none', actionText?: string, options?: any): Observable<any>;
/**
* Botones SÍ/NO
*/
yesOrNot(title: string, message: string, suggested?: 'yes' | 'no'): Observable<any>;
/**
* Botones ELIMINAR/CANCELAR
*/
confirmDelete(title: string, message: string, actionText?: string): Observable<any>;
/**
* Botones ACEPTAR
*/
alert(title: string, message: string, options?: any): Observable<any>;
decide(title: string, message: string, options: DialogOption[]): Observable<any>;
open<T>(component: ComponentType<T>, data: any, options?: any): Observable<any>;
/**
* Abrir editor
*
* @param editorCmp Dialog component
* @param model Model
* @param parent Parent Model
* @param data Aditional data
*/
openEditor<T>(editorCmp: ComponentType<T>, model: any, parent?: any, data?: any): Observable<any>;
private openDialog;
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
}