import * as i0 from '@angular/core'; import { Injector, ViewContainerRef, InjectionToken, TemplateRef, ComponentRef, OnInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChanges, Type, Provider } from '@angular/core'; import { OverlayRef } from '@angular/cdk/overlay'; import { Observable, Subject } from 'rxjs'; import { CdkPortalOutlet } from '@angular/cdk/portal'; import * as _praxisui_dialog from '@praxisui/dialog'; import { ComponentDocMeta, ComponentAuthoringManifest } from '@praxisui/core'; type ActionsLayout = 'start' | 'center' | 'end' | 'stretched'; type DialogThemeColor = 'primary' | 'light' | 'dark'; type DialogAnimationType = 'translate' | 'slide' | 'fade' | 'expand' | 'zoom'; type AnimationDirection = 'up' | 'down' | 'right' | 'left'; interface DialogAnimation { type?: DialogAnimationType; direction?: AnimationDirection; duration?: number; easing?: string; } interface DialogAction { text: string; role?: 'primary' | 'secondary' | 'danger' | 'close' | 'custom'; close?: boolean; cssClass?: string | string[] | Record; icon?: string; svgIcon?: any; fillMode?: 'solid' | 'flat' | 'outline'; themeColor?: 'primary' | 'accent' | 'warn' | 'neutral'; id?: string; payload?: any; } interface PraxisDialogPosition { top?: string; bottom?: string; left?: string; right?: string; } interface PraxisDialogConfig { data?: D; title?: string; titleIcon?: string; actions?: DialogAction[]; actionsLayout?: ActionsLayout; animation?: boolean | DialogAnimation; width?: string | number; height?: string | number; minWidth?: string | number; maxWidth?: string | number; minHeight?: string | number; maxHeight?: string | number; themeColor?: DialogThemeColor; disableClose?: boolean; hasBackdrop?: boolean; closeOnBackdropClick?: boolean; backdropClass?: string | string[] | Record; panelClass?: string | string[] | Record; position?: PraxisDialogPosition; id?: string; autoFocus?: boolean; autoFocusedElement?: string; restoreFocus?: boolean; scrollStrategy?: 'block' | 'reposition' | 'noop'; ariaRole?: 'dialog' | 'alertdialog'; ariaLabel?: string; ariaLabelledBy?: string; ariaDescribedBy?: string; appendTo?: Element | any; /** * Runtime-only injector used to create the dialog container and its dynamic * content. It takes precedence over the injector derived from * viewContainerRef and must not be persisted or authored as JSON. */ injector?: Injector; viewContainerRef?: ViewContainerRef; closeOnNavigation?: boolean; zIndex?: number; styles?: PraxisDialogStyleConfig; } interface PraxisDialogStyleConfig { actionsAlignment?: 'start' | 'center' | 'end' | 'stretched'; actionsPadding?: string; containerElevationShadow?: string; containerMaxWidth?: string; containerMinWidth?: string; containerShape?: string; containerBorderColor?: string; containerSmallMaxWidth?: string; contentPadding?: string; headlinePadding?: string; withActionsContentPadding?: string; backdropColor?: string; actionButtonRadius?: string; actionButtonMinHeight?: string; actionButtonPadding?: string; containerColor?: string; subheadColor?: string; supportingTextColor?: string; subheadFont?: string; subheadLineHeight?: string; subheadSize?: string; subheadTracking?: string; subheadWeight?: string | number; supportingTextFont?: string; supportingTextLineHeight?: string; supportingTextSize?: string; supportingTextTracking?: string; supportingTextWeight?: string | number; } interface PraxisConfirmConfig extends Omit { message?: string; confirmLabel?: string; cancelLabel?: string; icon?: string; } interface PraxisAlertConfig extends Omit { message?: string; okLabel?: string; icon?: string; } interface PraxisPromptConfig extends Omit { message?: string; placeholder?: string; okLabel?: string; cancelLabel?: string; defaultValue?: string; } type DialogContentDescriptor = { type: 'component'; componentRef: string; data?: any; } | { type: 'template'; templateId: string; } | { type: 'html'; safeHtml: string; }; declare const PRAXIS_DIALOG_DATA: InjectionToken; declare const PRAXIS_DIALOG_I18N: InjectionToken>; declare const PRAXIS_DIALOG_DEFAULTS: InjectionToken>; type ComponentType = new (...args: any[]) => T; declare const PRAXIS_DIALOG_CONTENT_REGISTRY: InjectionToken>>; declare const PRAXIS_DIALOG_TEMPLATE_REGISTRY: InjectionToken>>; interface PraxisDialogGlobalPresets { confirm?: PraxisDialogConfig; alert?: PraxisDialogConfig; prompt?: PraxisDialogConfig; variants?: Record; } declare const PRAXIS_DIALOG_GLOBAL_PRESETS: InjectionToken; declare class PraxisDialogRef { private overlayRef; id?: string; private readonly _afterOpened; private readonly _beforeClosed; private readonly _afterClosed; private readonly _backdropClick; private readonly _keydownEvents; componentInstance?: T; componentRef?: ComponentRef; constructor(overlayRef: OverlayRef); private beforeCloseHandler?; private closePromise?; setBeforeClose(handler: (result?: R) => Promise | void): void; emitOpened(): void; backdropClick(): Observable; keydownEvents(): Observable; afterOpened(): Observable; beforeClosed(): Observable; afterClosed(): Observable; notifyBackdropClick(ev: MouseEvent): void; notifyKeydown(ev: KeyboardEvent): void; close(result?: R): Promise; private performClose; updateSize(width?: string | number, height?: string | number): this; updatePosition(position?: PraxisDialogPosition): this; } declare class PraxisDialogTitleDirective { templateRef: TemplateRef; constructor(templateRef: TemplateRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class PraxisDialogActionsDirective { templateRef: TemplateRef; constructor(templateRef: TemplateRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class PraxisDialogContentDirective { templateRef: TemplateRef; constructor(templateRef: TemplateRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class PraxisDialogComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy { title?: string; actions: DialogAction[]; actionsLayout: ActionsLayout; animation: boolean | DialogAnimation; open: boolean; width?: string | number; height?: string | number; minWidth?: string | number; maxWidth?: string | number; minHeight?: string | number; maxHeight?: string | number; themeColor: DialogThemeColor; disableClose: boolean; hasBackdrop: boolean; closeOnBackdropClick: boolean; overlayMode: boolean; zIndex?: number; panelClass?: string | string[] | Record; backdropClass?: string | string[] | Record; position?: { top?: string; bottom?: string; left?: string; right?: string; }; autoFocusedElement?: string; autoFocus?: boolean; restoreFocus: boolean; id?: string; ariaRole: 'dialog' | 'alertdialog'; ariaLabel?: string; ariaLabelledBy?: string; ariaDescribedBy?: string; styles?: PraxisDialogStyleConfig; titleIcon?: string; action: EventEmitter; close: EventEmitter; opened: EventEmitter; afterClosed: EventEmitter; contentHost: CdkPortalOutlet; panelEl: ElementRef; titleTpl?: PraxisDialogTitleDirective; actionsTpl?: PraxisDialogActionsDirective; contentTpl?: PraxisDialogContentDirective; hostClass: string; tabindex: string; readonly data: unknown; private readonly i18n; get titleId(): string; get displaysCloseButton(): boolean; get closeButtonLabel(): string; requestClose(): void; isDisplayed: boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; onKeydown(ev: KeyboardEvent): void; onActionClick(a: DialogAction): void; onBackdrop(ev: MouseEvent): void; focus(): void; /** * Moves focus into the currently materialized panel. Overlay hosts call this * after switching to the overlay template branch and attaching its content. */ focusInitialElement(): void; private scheduleInitialFocus; private captureFocusOrigin; private applyInitialFocus; private _previouslyFocused?; ngOnDestroy(): void; get animationClasses(): string[]; get panelNgClass(): Record | string[]; applyAnimationVars(): void; applyStyleVars(): void; beginOpenAnimation(): Promise; beginCloseAnimation(): Promise; private focusPrimaryAction; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const PraxisDialogDirectives: readonly []; declare class PraxisDialog { private readonly overlay; private readonly injector; private readonly layerScale; private readonly appRef; private readonly registry; private readonly i18n; private readonly templateRegistry; private readonly sanitizer; private readonly globalPresets; private readonly defaults; readonly afterAllClosed: Subject; readonly afterOpened: Subject>; private _openDialogs; get openDialogs(): PraxisDialogRef[]; private _seq; open(content: Type | TemplateRef, config?: PraxisDialogConfig): PraxisDialogRef; confirm(cfg: PraxisConfirmConfig, variant?: string): PraxisDialogRef; alert(cfg: PraxisAlertConfig): PraxisDialogRef; prompt(cfg: PraxisPromptConfig): PraxisDialogRef; openByRegistry(id: string, config?: PraxisDialogConfig): PraxisDialogRef; openTemplateById(templateId: string, config?: PraxisDialogConfig): PraxisDialogRef; openSafeHtml(html: string, config?: PraxisDialogConfig): PraxisDialogRef; private mergePresets; closeAll(): void; getDialogById(id: string): PraxisDialogRef | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class SimpleDialogContentComponent { message?: string; mode: 'confirm' | 'alert' | 'prompt'; placeholder?: string; value?: string | null; submit?: () => void; private readonly dialogData; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Provides PRAXIS_DIALOG_GLOBAL_PRESETS by transforming GlobalConfig.dialog * into the structure expected by @praxisui/dialog. */ declare function provideDialogGlobalPresetsFromGlobalConfig(): Provider; declare function providePraxisDialogGlobalActions(): Provider; declare function providePraxisSurfaceGlobalActions(): Provider; declare class LongContentDialogExampleComponent { readonly items: string[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const PRAXIS_DIALOG_EXAMPLE_LONG_CONTENT = "praxis.long-content-example"; declare function providePraxisDialogExamples(): { provide: i0.InjectionToken void)[]>; multi: boolean; useFactory: (registry: Record) => () => void; deps: i0.InjectionToken>>[]; }; declare const PRAXIS_DIALOG_COMPONENT_METADATA: ComponentDocMeta; declare function providePraxisDialogMetadata(): Provider; declare const PRAXIS_DIALOG_AUTHORING_MANIFEST: ComponentAuthoringManifest; export { LongContentDialogExampleComponent, PRAXIS_DIALOG_AUTHORING_MANIFEST, PRAXIS_DIALOG_COMPONENT_METADATA, PRAXIS_DIALOG_CONTENT_REGISTRY, PRAXIS_DIALOG_DATA, PRAXIS_DIALOG_DEFAULTS, PRAXIS_DIALOG_EXAMPLE_LONG_CONTENT, PRAXIS_DIALOG_GLOBAL_PRESETS, PRAXIS_DIALOG_I18N, PRAXIS_DIALOG_TEMPLATE_REGISTRY, PraxisDialog, PraxisDialogActionsDirective, PraxisDialogComponent, PraxisDialogContentDirective, PraxisDialogDirectives, PraxisDialogRef, PraxisDialogTitleDirective, provideDialogGlobalPresetsFromGlobalConfig, providePraxisDialogExamples, providePraxisDialogGlobalActions, providePraxisDialogMetadata, providePraxisSurfaceGlobalActions }; export type { ActionsLayout, AnimationDirection, ComponentType, DialogAction, DialogAnimation, DialogAnimationType, DialogContentDescriptor, DialogThemeColor, PraxisAlertConfig, PraxisConfirmConfig, PraxisDialogConfig, PraxisDialogGlobalPresets, PraxisDialogPosition, PraxisDialogStyleConfig, PraxisPromptConfig };