import * as i0 from '@angular/core'; import { DoCheck, OnDestroy, ElementRef, EventEmitter } from '@angular/core'; import { EuiGrowlMessage } from '@eui/core'; /** * Notification component that displays temporary or persistent messages to users. * Supports multiple message types (success, info, warning, error) with automatic dismissal or sticky behavior. * Messages can be positioned in different screen locations and include customizable lifecycle durations. * Implements ARIA live regions for accessibility, announcing messages to screen readers. * Commonly used for user feedback, system notifications, and operation status updates. * * @usageNotes * ### Basic growl notification * ```typescript * messages: EuiGrowlMessage[] = []; * * showSuccess() { * this.messages.push({ * severity: 'success', * summary: 'Success', * detail: 'Operation completed' * }); * } * ``` * ```html * * ``` * * ### Sticky notification * ```typescript * this.messages.push({ * severity: 'info', * summary: 'Info', * detail: 'This message stays until dismissed', * sticky: true * }); * ``` * * ### Accessibility * - Uses ARIA live regions (aria-live="polite") for screen reader announcements * - Messages are announced without interrupting user workflow * - Close buttons are keyboard accessible * * ### Notes * - Position options: top-right, top-left, bottom-right, bottom-left, top-center, bottom-center * - Non-sticky messages auto-dismiss after `life` milliseconds (default: 3000) * - Use `closeAllSticky` to show a clear-all button for multiple sticky messages */ declare class EuiGrowlComponent implements DoCheck, OnDestroy { el: ElementRef; titleId: string; contentId: string; get cssClasses(): string; /** * Data attribute used for end-to-end testing identification. * @default 'eui-growl' */ e2eAttr: string; protected role: string; /** * ARIA live region politeness level controlling how screen readers announce messages. * 'polite' waits for user to finish current activity, 'assertive' interrupts immediately, 'off' disables announcements. * @default 'polite' */ ariaLive: 'off' | 'polite' | 'assertive'; get ariaLabelledBy(): string; get ariaDescribedBy(): string; /** * Prevents automatic dismissal of messages, requiring manual user interaction to close. * When true, messages remain visible until explicitly closed by the user. * @default false */ sticky: boolean; /** * Duration in milliseconds before non-sticky messages automatically dismiss. * Individual messages can override this with their own life property. * @default 3000 */ life: number; /** * Array of message objects to display in the growl notification area. * Each message should conform to the EuiGrowlMessage interface with properties like severity, summary, and detail. * Messages are automatically managed with lifecycle timeouts based on sticky and life properties. * @default [] */ value: EuiGrowlMessage[]; /** * Enables display of a close-all button when multiple sticky messages are present. * Provides users with a quick way to dismiss all persistent notifications at once. * @default false */ closeAllSticky: boolean; /** * Screen position where growl messages appear. * Common values include 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'top-center', 'bottom-center'. * Affects the CSS positioning of the notification container. */ position: string; /** * Optional callback function executed when a growl message is clicked. * Allows custom behavior to be triggered on user interaction with notifications. * @default null */ callback: () => void; /** * Emitted when a growl message is clicked by the user. * No payload is provided. * Triggers in addition to the callback function if one is defined. */ growlClick: EventEmitter; /** * Emitted when a growl message is closed, either automatically or by user action. * No payload is provided. * Useful for tracking message dismissals or triggering cleanup operations. */ growlClose: EventEmitter; private differ; private readonly cdr; constructor(); ngDoCheck(): void; /** * @param msg The text message to appear in the container */ remove(msg: EuiGrowlMessage): void; /** * Removes all growl messages from the stack */ removeAll(): void; ngOnDestroy(): void; onClick(): void; /** * check whether sticky growls are greater than two */ isGrowlMoreThanTwo(): boolean; /** * Removes all growl messages from the stack * * @param value */ private createRemovalTimeout; /** * Finds UxMessage index of the array otherwise returns -1 * * @param msg UxMessage */ private findMessageIndex; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_sticky: unknown; } declare const EUI_GROWL: readonly [typeof EuiGrowlComponent]; export { EUI_GROWL, EuiGrowlComponent }; //# sourceMappingURL=eui-components-eui-growl.d.ts.map