/** * Generated bundle index. Do not edit. */ import * as i0 from "@angular/core"; import { AfterViewInit, ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter, InjectionToken, Injector, NgZone, OnDestroy, TemplateRef } from "@angular/core"; import * as i1 from "@angular/common"; import * as i2 from "@allianz/ng-aquila/icon"; import { NxStatusIconSize, NxStatusIconType } from "@allianz/ng-aquila/icon"; import * as i3 from "@angular/cdk/overlay"; import { Overlay, OverlayContainer, OverlayRef } from "@angular/cdk/overlay"; import * as i4 from "@angular/cdk/portal"; import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, ComponentType, TemplatePortal } from "@angular/cdk/portal"; import { Observable, Subject } from "rxjs"; import { AriaLivePoliteness, LiveAnnouncer } from "@angular/cdk/a11y"; /** @deprecated Use a specific context ('info', 'critical', 'positive', 'warning') instead. */ type RegularContext = 'regular'; /** * The contextual type of a message. * * `'error'` and `'success'` are deprecated: use `'critical'` and `'positive'` instead. */ export type CONTEXT = 'regular' | 'info' | 'critical' | 'positive' | 'warning' | 'error' | 'success'; /** * A `CONTEXT` with the deprecated aliases resolved. Only the styling and the icon lookup work with * this; consumers set and read `CONTEXT`. * @docs-private */ export type ResolvedContext = RegularContext | 'info' | 'critical' | 'positive' | 'warning'; /** * State and behaviour shared by `nx-message` and `nx-message-banner`, including the host classes * the shared stylesheet keys off. Each of them brings its own template and additional styles. * @docs-private */ declare abstract class NxMessageBase implements AfterViewInit, OnDestroy { private readonly _idGenerator; private readonly _focusMonitor; protected readonly _allianzOneOptions: import("@allianz/ng-aquila/config/allianz-one/token").AllianzOneOptions | null; protected readonly _isA1: import("@angular/core").Signal; readonly id: import("@angular/core").InputSignal; protected readonly _effectiveContext: import("@angular/core").Signal; /** * Whether the context icon is shown. * * Default: `true` for `nx-message`. Subclasses may resolve an unset value differently — see the * concrete component for its default. */ readonly showContextIcon: import("@angular/core").InputSignalWithTransform; protected readonly _showContextIcon: import("@angular/core").Signal; _closeButton: ElementRef; /** * Sets the context of the message. * The message box will color accordingly. Default: 'regular'. */ set context(value: CONTEXT); get context(): CONTEXT; protected _context: import("@angular/core").WritableSignal; /** Whether a message should have a close icon in order to be dismissed. */ set closable(value: boolean); get closable(): boolean; _closable: import("@angular/core").WritableSignal; protected readonly _showCloseButton: import("@angular/core").Signal; /** Sets the label of the close button of the message. */ set closeButtonLabel(value: string); get closeButtonLabel(): string; private readonly _closeButtonLabel; /** Event emitted when the close icon of the message has been clicked. */ readonly closeEvent: EventEmitter; ngAfterViewInit(): void; ngOnDestroy(): void; _emitCloseEvent(): void; protected _updateContext(value: CONTEXT): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_closable: unknown; } export declare class NxMessageComponent extends NxMessageBase { /** Whether the message is rendered inside a filled, bordered surface (`true`, default) or as plain icon and text (`false`). */ readonly contained: import("@angular/core").InputSignalWithTransform; protected readonly _showCloseButton: import("@angular/core").Signal; readonly _iconName: import("@angular/core").Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * The contextual type of a message toast. * * `'success'` is deprecated: use `'positive'` instead. */ export type NxMessageToastContext = 'info' | 'warning' | 'critical' | 'positive' | 'success'; /** * Configuration used when opening a message toast. */ export declare class NxMessageToastConfig { /** * The politeness level for the LiveAnnouncer announcement. * * Default: `'polite'`. */ politeness?: AriaLivePoliteness; /** * Message to be announced by the LiveAnnouncer. When opening a toast message without a custom * component or template, the announcement message will default to the specified message. * * Default: `''`. */ announcementMessage?: string; /** * The length of time in milliseconds to wait before automatically dismissing the message toast. * * Default: `3000`. */ duration?: number; /** * Context of the message toast. * * Default: `'info'`. */ context?: NxMessageToastContext; /** * Whether the context icon is shown. * * Default: `true`. */ showContextIcon?: boolean; /** Data being injected into the child component. */ data?: D | null; /** * Id of the `aria-live` wrapper element that holds the message toasts. Set a unique value when * several Angular apps share a page. * * Only honored on the root (first-created) service: passing it to `open()` has no effect, * and a value set on a nested/component-level provider is ignored, since child services inherit the parent's region. * * Default: `'nx-toast-message-region'`. */ wrapperId?: string; } /** Default id of the `aria-live` wrapper element the toasts are rendered into. */ export declare const NX_MESSAGE_TOAST_DEFAULT_WRAPPER_ID = "nx-toast-message-region"; /** * Needed so that the user text data can be injected in the message toast component. * @docs-private */ export declare class NxMessageToastData { readonly data: string; constructor(data: string); } /** * Internal component that wraps user-provided message toast content. * @docs-private */ export declare class NxMessageToastComponent extends BasePortalOutlet implements OnDestroy { private readonly _ngZone; private readonly _cdr; private readonly _elementRef; /** The message toast configuration. */ config: NxMessageToastConfig; /** Injected data into the notifciation. */ readonly data?: NxMessageToastData | undefined; /** Whether the component has been destroyed. */ private _destroyed; /** The portal outlet inside of this container into which the message toast content will be loaded. */ _portalOutlet: CdkPortalOutlet; /** Subject for notifying that the message toast has exited from view. */ readonly _onExit: Subject; /** Subject for notifying that the message toast has finished entering the view. */ readonly _onEnter: Subject; /** The state of the message toast animations. */ _animationState: string; /** ARIA role for the message toast container. */ _role: 'alert' | 'status' | null; _context: NxMessageToastContext; _showContextIcon: boolean; private readonly _idGenerationService; _messageToastId: string; _messageId: string; constructor(_ngZone: NgZone, _cdr: ChangeDetectorRef, _elementRef: ElementRef, /** The message toast configuration. */ config: NxMessageToastConfig, /** Injected data into the notifciation. */ data?: NxMessageToastData | undefined); /** Attach a component portal as content to this message toast container. */ attachComponentPortal(portal: ComponentPortal): ComponentRef; /** Attach a template portal as content to this message toast container. */ attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; /** Notify subscribers that the message toast has finished entering the view. */ private _notifyEntered; /** Begin animation of message toast entrance into view. */ enter(): void; /** Begin animation of the message toast exiting from view. */ exit(): void; /** Makes sure the exit callbacks have been invoked when the element is destroyed. */ ngOnDestroy(): void; /** * Removes the element in a microtask. Helps prevent errors where we end up * removing an element which is in the middle of an animation. */ private _completeExit; /** Asserts that no content is already attached to the container. */ private _assertNotAttached; _setAriaLabels(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * The contextual type of a message banner. Banners take every message context but `'regular'`. * * `'error'` and `'success'` are deprecated: use `'critical'` and `'positive'` instead. */ export type BANNER_CONTEXT = 'info' | 'critical' | 'positive' | 'warning' | 'error' | 'success'; /** Where the projected actions of a message banner sit relative to its content. */ export type BANNER_ACTION_LAYOUT = 'horizontal' | 'vertical'; /** Container for the action buttons of a message banner. */ export declare class NxMessageBannerActions { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export declare class NxMessageBannerComponent extends NxMessageBase { /** * Where the projected actions sit: `'horizontal'` puts them on the same line as the content, * next to the close button, `'vertical'` on their own line below it. * * Default: `'horizontal'`. */ readonly actionLayout: import("@angular/core").InputSignal; protected readonly _statusIconType: import("@angular/core").Signal; protected readonly _contextIconSize: import("@angular/core").Signal; protected readonly _showContextIcon: import("@angular/core").Signal; /** * Sets the context of the message banner. The message box will color accordingly. * * Default: `'info'`. */ set context(value: BANNER_CONTEXT); get context(): BANNER_CONTEXT; protected _context: import("@angular/core").WritableSignal; _closable: import("@angular/core").WritableSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class NxMessageModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export declare class NxMessageToastRef { /** * The instance of the component making up the content of the message toast. * @docs-private */ toastInstance: NxMessageToastComponent; private readonly _overlayRef; private readonly _componentRef; /** Subject for notifying the user that the message toast has been dismissed. */ private readonly _afterDismissed; /** Subject for notifying the user that the message toast has opened and appeared. */ private readonly _afterOpened; /** * Timeout ID for the duration setTimeout call. Used to clear the timeout if the message toast is * dismissed before the duration passes. */ private _durationTimeoutId; constructor( /** * The instance of the component making up the content of the message toast. * @docs-private */ toastInstance: NxMessageToastComponent, _overlayRef: OverlayRef, _componentRef: ComponentRef); /** Dismisses the message toast. */ dismiss(): void; /** Dismisses the message toast after some duration */ _dismissAfter(duration: number): void; /** Marks the message toast as opened */ _open(): void; /** Cleans up the DOM after closing. */ private _finishDismiss; /** Gets an observable that is notified when the message toast is finished closing. */ afterDismissed(): Observable; /** Gets an observable that is notified when the message toast has opened and appeared. */ afterOpened(): Observable; } /** Injection token that can be used to specify default message toast. */ export declare const NX_MESSAGE_TOAST_DEFAULT_CONFIG: InjectionToken>; /** Injection token that can be used to access the data that was passed in to a message toast. */ export declare const NX_MESSAGE_TOAST_COMPONENT_DATA: InjectionToken; /** A service for dispatching and displaying toast messages. */ export declare class NxMessageToastService implements OnDestroy { private readonly _overlay; private readonly _overlayContainer; private readonly _injector; private readonly _live; private readonly _parentMessageToastService; private readonly _defaultConfig; /** * Reference to the current message toast in the view *at this level* (in the Angular injector tree). * If there is a parent message toast service, all operations should delegate to that parent * via `_oldToastMessageRef`. */ private _toastRefAtThisLevel; private _announcementToggle; private readonly _document; set _oldToastMessageRef(value: NxMessageToastRef | null); /** Reference to the currently opened message toast at *any* level. */ get _oldToastMessageRef(): NxMessageToastRef | null; /** * Id of the `aria-live` wrapper the toasts of this app are rendered into. Inherited from the * parent service so that a service provided on a component cannot fork off a second region. */ private readonly _wrapperId; constructor(_overlay: Overlay, _overlayContainer: OverlayContainer, _injector: Injector, _live: LiveAnnouncer, _parentMessageToastService: NxMessageToastService | null, _defaultConfig: NxMessageToastConfig | null); /** * Initializes the wrapper element for toast message in the overlay container. * Create a wrapper with ARIA attributes for accessibility */ private _initializeWrapper; private _getWrapper; /** * Creates and dispatches a message toast with a custom text. * @param text Text to be used for the message toast. * @param config Extra configuration for the message toast. */ open(text: string, config?: NxMessageToastConfig): NxMessageToastRef; /** * Creates and dispatches a message toast with a custom template for the content. * @param template Template to be used for the message toast. * @param config Extra configuration for the message toast. */ openFromTemplate(template: TemplateRef, config?: NxMessageToastConfig): NxMessageToastRef; /** * Creates and dispatches a message toast using a component for the content. * @param component Component to be used for the message toast. * @param config Extra configuration for the message toast. */ openFromComponent(component: ComponentType, config?: NxMessageToastConfig): NxMessageToastRef; private _attachToastComponent; private _createOverlay; /** Animates the old message toast out and the new one in. */ private _animateToast; private _createInjector; /** * Dismisses the currently visible message toast. */ dismiss(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export {};