UNPKG

juvo-rafa-library

Version:

A comprehensive Angular component library featuring real-world components and validators extracted from the Juvo Rafa backoffice application. Now with improved select components and bug fixes.

87 lines (86 loc) 3.28 kB
import { EventEmitter } from '@angular/core'; import * as i0 from "@angular/core"; /** * Confirmation Dialog Component * * @description * A confirmation dialog component for user confirmations in enterprise applications. * Provides a modal dialog with customizable header, message, and icon. * Originally designed for critical actions that require user confirmation. * * @example * ```html * <!-- Basic confirmation dialog --> * <juvo-confirmation-dialog * *ngIf="showDialog" * header="Delete Item" * message="Are you sure you want to delete this item? This action cannot be undone." * icon="⚠️" * (actionAcceptTriggered)="onConfirm()" * (actionCancelTriggered)="onCancel()"> * </juvo-confirmation-dialog> * * <!-- Custom styled dialog --> * <juvo-confirmation-dialog * *ngIf="showWarning" * header="Warning" * message="This action will affect multiple records." * icon="🚨" * acceptText="Continue" * cancelText="Go Back" * (actionAcceptTriggered)="onProceed()" * (actionCancelTriggered)="onGoBack()"> * </juvo-confirmation-dialog> * ``` * * @selector juvo-confirmation-dialog * @since 2.1.0 * @author Juvo Rafa Team */ export declare class JuvoConfirmationDialogComponent { /** Dialog header text @default "Confirmation" */ header: string; /** Icon to display in the dialog @default "⚠️" */ icon: string; /** Main confirmation message @default "Are you sure you want to proceed?" */ message: string; /** Text for accept button @default "Yes" */ acceptText: string; /** Text for cancel button @default "No" */ cancelText: string; /** Whether to show the dialog @default true */ visible: boolean; /** Dialog width @default "400px" */ width: string; /** Emitted when user confirms the action */ actionAcceptTriggered: EventEmitter<void>; /** Emitted when user cancels the action */ actionCancelTriggered: EventEmitter<void>; /** Emitted when dialog is closed */ onClose: EventEmitter<void>; /** * Handles accept button click * @emits actionAcceptTriggered */ onAccept(): void; /** * Handles cancel button click * @emits actionCancelTriggered */ onCancel(): void; /** * Closes the dialog * @emits onClose */ close(): void; /** * Handles backdrop click */ onBackdropClick(): void; /** * Prevents dialog content click from closing dialog */ onContentClick(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration<JuvoConfirmationDialogComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<JuvoConfirmationDialogComponent, "juvo-confirmation-dialog", never, { "header": { "alias": "header"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "message": { "alias": "message"; "required": false; }; "acceptText": { "alias": "acceptText"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "actionAcceptTriggered": "actionAcceptTriggered"; "actionCancelTriggered": "actionCancelTriggered"; "onClose": "onClose"; }, never, never, true, never>; }