Member Junction
    Preparing search index...

    mj-confirm-dialog — Canonical confirmation prompt. The shared replacement for native window.confirm() and the many hand-rolled "Are you sure?" modals (@if (showDeleteConfirm) { … backdrop + centered dialog }) scattered across the app, plus the duplicate local mj-confirm-dialog / mj-ev-confirm-dialog components.

    Built on <mj-dialog> (so it inherits the backdrop, animations, mobile full-screen behavior, and Esc/backdrop handling) and uses role="alertdialog" for screen readers. Buttons follow the MJ convention: the affirmative action is leftmost, Cancel on the right.

    Visibility is two-way bindable. Cancelling (Cancel button, backdrop, Esc, or the ✕) auto-closes and emits Cancelled. Confirming emits Confirmed and leaves the dialog open so the handler can run async work — set Visible to false (or update your bound property) when done. Bind [Processing] to a loading flag during that async work to show a spinner, disable both buttons, and block dismissal until it completes.

    Usage:

    <!-- Simple destructive confirm -->
    <mj-confirm-dialog
    [(Visible)]="showDeleteConfirm"
    Type="danger"
    Title="Delete view"
    Message="Are you sure you want to delete this view?"
    DetailMessage="This action cannot be undone."
    ConfirmText="Delete"
    (Confirmed)="onDeleteConfirmed()">
    </mj-confirm-dialog>

    <!-- Async confirm with a spinner while the work runs -->
    <mj-confirm-dialog
    [(Visible)]="confirmOpen"
    [Processing]="isDeleting"
    Type="danger" Title="Delete user" Message="Remove this user permanently?"
    ConfirmText="Delete" (Confirmed)="deleteUser()">
    </mj-confirm-dialog>
    Index

    Constructors

    Properties

    Cancelled: EventEmitter<void> = ...

    Fired when the user cancels (button, backdrop, Esc, or ✕). The dialog auto-closes.

    CancelText: string = 'Cancel'

    Dismiss button label.

    Confirmed: EventEmitter<void> = ...

    Fired when the user confirms. The dialog stays open; close it when ready.

    ConfirmText: string = 'Confirm'

    Affirmative button label.

    DetailMessage: string = ''

    Optional secondary line, rendered smaller/muted beneath the message.

    Icon: string | null = null

    Font Awesome icon class (e.g. "fa-solid fa-trash") for the header. When omitted, a sensible default is chosen from Type. Set to '' for no icon.

    Message: string = 'Are you sure?'

    Primary prompt text. For rich content, project default <ng-content> instead.

    Processing: boolean = false

    When true, shows a spinner on the confirm button, disables both buttons, and blocks dismissal (Esc / backdrop / ✕) — bind this to your loading flag while the Confirmed handler runs async work.

    Title: string = 'Confirm'

    Heading shown in the dialog title bar.

    Type: MJConfirmDialogType = 'default'

    Visual intent — drives the header icon + confirm button color. Defaults to 'default'.

    Visible: boolean = false

    Whether the dialog is shown. Two-way bindable: [(Visible)].

    VisibleChange: EventEmitter<boolean> = ...

    Two-way Visible change channel — fires when the dialog auto-closes on cancel.

    Accessors

    Methods