packages/core/src/lib/services/growl/eui-growl.service.ts
Centralized service for managing application-wide eui-growl notifications.
Provides methods to display success, error, warning, and info messages with configurable behavior.
Manages message lifecycle, positioning, and accessibility settings through reactive BehaviorSubjects.
Supports both temporary auto-dismissing messages and persistent sticky notifications.
Injected at root level, ensuring a single instance across the entire application.
Properties |
|
Methods |
| clearGrowl |
clearGrowl()
|
|
Removes all currently displayed growl messages from the notification queue. Clears both sticky and temporary messages immediately.
Returns :
void
|
| growl | ||||||||||||||||||||||||||||||||
growl(msg: EuiGrowlMessage, isSticky?: boolean, isMultiple?: boolean, life?: number, position?: string, callback?: () => void, ariaLive?: "off" | "polite" | "assertive")
|
||||||||||||||||||||||||||||||||
|
Displays a growl notification message with customizable behavior and appearance. Validates message severity and manages message lifecycle through reactive streams. Danger severity messages default to sticky behavior unless explicitly configured.
Parameters :
Returns :
void
|
| growlError | ||||||||||||
growlError(msg: string, position?: string)
|
||||||||||||
|
Displays an error growl notification with predefined styling and behavior. Message is non-sticky but can be configured to persist based on severity handling.
Parameters :
Returns :
void
|
| growlInfo | ||||||||||||
growlInfo(msg: string, position?: string)
|
||||||||||||
|
Displays an informational growl notification with predefined styling and behavior. Message is non-sticky and auto-dismisses after the default duration.
Parameters :
Returns :
void
|
| growlSuccess | ||||||||||||
growlSuccess(msg: string, position?: string)
|
||||||||||||
|
Displays a success growl notification with predefined styling and behavior. Message is non-sticky and auto-dismisses after the default duration.
Parameters :
Returns :
void
|
| growlWarning | ||||||||||||
growlWarning(msg: string, position?: string)
|
||||||||||||
|
Displays a warning growl notification with predefined styling and behavior. Message is non-sticky and auto-dismisses after the default duration.
Parameters :
Returns :
void
|
| Readonly ariaGrowlLive |
Type : unknown
|
Default value : new BehaviorSubject<'off' | 'polite' | 'assertive'>('polite')
|
| Readonly growlCallback |
Type : unknown
|
Default value : new BehaviorSubject<(() => void) | null>(null)
|
| Readonly growlLife |
Type : unknown
|
Default value : new BehaviorSubject(3000)
|
| Readonly growlMessages |
Type : unknown
|
Default value : new BehaviorSubject<EuiGrowlMessage[]>([])
|
| Readonly growlPosition |
Type : unknown
|
Default value : new BehaviorSubject('bottom-right')
|
| Readonly isCloseAllSticky |
Type : unknown
|
Default value : new BehaviorSubject(false)
|
| Readonly isGrowlSticky |
Type : unknown
|
Default value : new BehaviorSubject(false)
|