libs/core/dynamic-form/notification/src/notification.model.ts
Omit
Properties |
| closable (Optional) | |
| Type |
boolean
|
|
Description
|
Whether the notification can be closed by the user. Defaults to true if not specified. |
| closeButtonLabel (Optional) | |
| Type |
string
|
|
Description
|
Custom label for the close button. If not provided, a default label based on the context will be used. |
| context | |
| Type |
"info" | "error" | "success" | "warning"
|
|
Description
|
The styling context of the notification (e.g., info, success, warning, error). |
| message | |
| Type |
string
|
|
Description
|
The message of the notification. It can be fully static or a string containing a jsonPath expression. The static content will be translatable. Use Markdown for formatting:
|
| title (Optional) | |
| Type |
string
|
|
Description
|
The title of the notification. It can be fully static or a string containing a jsonPath expression. The static content will be translatable. |
| type | |
|
Description
|
Specifies the type of the field as |
| visibleIf (Optional) | |
| Type |
string
|
|
Description
|
An optional jsonPath expression or PFE_EXPRESSION condition that dictates whether this notification will be visible |
import { DfBaseConfig } from '@allianz/taly-core/dynamic-form';
/**
* The value to use for the `type` attribute of notification
* formfield configs.
*/
export const DfNotificationTypeName = 'NOTIFICATION';
export interface DfNotificationConfig extends Omit<DfBaseConfig, 'infoIcon' | 'columnSpan'> {
/**
* Specifies the type of the field as `NOTIFICATION`.
*/
type: typeof DfNotificationTypeName;
/**
* The title of the notification. It can be fully static or a string containing a jsonPath expression. The static content will be translatable.
* @examples ["My Title", "Note about postal addresses in {$.country}"]
*/
title?: string;
/**
* The message of the notification. It can be fully static or a string containing a jsonPath expression. The static content will be translatable. Use Markdown for formatting:
* - Italic: `*text*` or `_text_`
* - Bold: `**text**`
* - Bold Italic: `***text***`
* - Strikethrough: `~~text~~`
* - Underline: `:u[text]`
* - Links: `[text](url)`
*
* @examples [
* "My Message",
* "Text with *italic*, **bold**, ~~strikethrough~~, :u[underline]",
* "First name: {$['bb-pgr-simple'].person.firstName}. Full name: {$['bb-pgr-simple'].person.firstName} {$['bb-pgr-simple'].person.lastName}.",
* "text with [link](http://example.com) and list\n- item 1\n- [list link](http://example.com). Also supports dynamic data like: {$['bb-pgr-simple'].person.firstName}",
* "You can also link to internal pages by using the 'page://' prefix and the `pageId` inside a Markdown link, e.g. `[internal link](page://second-page)`"
* ]
*/
message: string;
/**
* The styling context of the notification (e.g., info, success, warning, error).
*/
context: 'info' | 'error' | 'success' | 'warning';
/**
* Whether the notification can be closed by the user.
* Defaults to true if not specified.
*/
closable?: boolean;
/**
* Custom label for the close button.
* If not provided, a default label based on the context will be used.
*/
closeButtonLabel?: string;
/**
* An optional jsonPath expression or PFE_EXPRESSION condition that dictates whether this notification will be visible
* @examples ["$.section1.visible", "{$.bb1.person.firstName} == {$.bb2.person.firstName}"]
*/
visibleIf?: string;
}