# Notification Center
A comprehensive notification display component that provides a dropdown interface for viewing and interacting with user notifications.
# Usage
# Basic Usage
# Dynamic loading
# Empty State
# Props
Prop | Type | Default | Description |
---|---|---|---|
notifications | NotificationSingleItem[] | [] | Array of notification objects to display |
hasMoreEarlierNotifications | Boolean | false | Boolean that determines to show Show More or not |
loadMoreCallback | Function | {} | Load more callback that is called when Show More is clicked |
newNotificationBadgeIsShown | Boolean | false | Shows a red dot badge on the notification icon when true |
# Events
Event | Payload | Description |
---|---|---|
notification:click | string | Emitted when a notification is clicked, provides the notification ID |
close | - | Emitted when the notification center popover is closed |
# Data Structure
# NotificationSingleItem
interface NotificationSingleItem {
id: string // Unique notification identifier
hintMessageTemplate: string // Template string with placeholders
locationList: NotificationLocation[] // Read status for different locations
relatedList: NotificationRelated[] // Related entities referenced in the message
avatar: NotificationAvatar // Avatar information for the notification
action: NotificationClickAction // Click action configuration
hasIncompleteRelatedNextItem: boolean // Whether there are more related items
createdAt: string // ISO timestamp of notification creation
}
# NotificationAvatar
interface NotificationAvatar {
id: string // Avatar entity ID
displayText: string // Display text for the avatar
imageUrl: string // URL for avatar image (optional)
type: NotificationAvatarType // Type of avatar (Person, Company, CiSystem)
}
# NotificationRelated
interface NotificationRelated {
id: string // Related entity ID
displayText: string // Display text for the entity
type: NotificationRelatedType // Type of related entity
}
# NotificationLocation
interface NotificationLocation {
locationType: NotificationLocationType // Where the notification appears
readAt?: string | null // ISO timestamp when read (null if unread)
}
# Message Template Format
The hintMessageTemplate
supports dynamic content using placeholders in the format {Type.ID}
:
{Person.123321}
- References a person with ID "123321"{Company.123}
- References a company with ID "123"{CiSystem.123}
- References a system entity with ID "123"
These placeholders are automatically replaced with the corresponding displayText
from the relatedList
and styled with bold formatting.