ngx-core-business
Version:
A comprehensive solution designed to streamline the development of enterprise-level Angular applications.
68 lines (67 loc) • 2.18 kB
TypeScript
import { OnInit } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import * as i0 from "@angular/core";
export declare enum ButtonType {
RAISED = "raised",
STROKED = "stroked",
NORMAL = "normal"
}
type buttonsType = 'yes_not' | 'confirm_cancel' | 'cancel_confirm' | 'ok';
export interface DialogOption {
text: string;
buttonType?: ButtonType;
buttonColor?: string;
option?: boolean | number | string;
closeButton?: boolean;
suggested?: boolean;
}
export interface DialogDataOptions {
title?: string;
message: string;
actionText?: string;
actionButtonColor?: string;
actionButtonType?: ButtonType;
cancelButtonColor?: string;
cancelButtonType?: ButtonType;
cancelText?: string;
buttonColor?: string;
maxWidth?: number;
options?: DialogOption[];
suggested?: 'confirm' | 'cancel' | 'yes' | 'no' | 'none';
buttons?: buttonsType;
}
export declare class DialogComponent implements OnInit {
dialogRef: MatDialogRef<DialogComponent>;
private inputData;
sanitizer: DomSanitizer;
title: string;
message: string;
safeMessage: SafeHtml;
actionText: string;
yesText: string;
noText: string;
actionButtonColor: string;
actionButtonType: ButtonType;
cancelText: string;
cancelButtonColor: string;
cancelButtonType: ButtonType;
maxWidth: number;
options: DialogOption[];
suggested: 'confirm' | 'cancel' | 'yes' | 'no' | 'none';
buttons: buttonsType;
constructor(dialogRef: MatDialogRef<DialogComponent>, inputData: DialogDataOptions, sanitizer: DomSanitizer);
ngOnInit(): void;
setPropsFromData(): void;
setDefaultButtons(): void;
getYesNotButtons(): {
text: string;
buttonColor: string;
buttonType: ButtonType;
option: boolean;
}[];
onOptionClick(option: DialogOption): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "app-dialog", never, {}, {}, never, never, false, never>;
}
export {};