@dotglitch/ngx-common
Version:
Angular components and utilities that are commonly used.
41 lines (40 loc) • 1.31 kB
TypeScript
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { LazyLoaderService } from '../components/lazy-loader/lazy-loader.service';
import * as i0 from "@angular/core";
export type DialogOptions = Partial<Omit<MatDialogConfig<any>, 'data'> & {
/**
* List of properties to be provided to @Input() injectors
*/
inputs: {
[key: string]: any;
};
/**
* List of properties to be provided to @Input() injectors
*/
outputs: {
[key: string]: Function;
};
/**
* Context in which to execute callbacks from the `outputs` property via
* @Output() event Emitters
*/
parent: any;
}>;
export declare class DialogService {
private dialog;
private lazyLoader;
private dialogs;
constructor(dialog: MatDialog, lazyLoader: LazyLoaderService);
open(name: string): any;
open(name: string, opts: DialogOptions): any;
open(name: string, group: string): any;
open(name: string, group: string, opts: DialogOptions): any;
close(name: string): void;
/**
* Method to close _all_ dialogs.
* Should be used sparingly.
*/
clearDialog(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
}