Documentation - v20.0.0-dev
    Preparing search index...

    The Notification Center keeps track of notifications sent to the viewer.

    Index

    Properties

    signals: {
        onNotificationAdded: Signal<
            (notification: Notification, oldId?: string) => void,
        >;
        onNotificationDeleted: Signal<(ids: string | string[]) => void>;
        onNotificationDeletedAll: Signal<() => void>;
        onNotificationReadStatusUpdated: Signal<(unreadCount: number) => void>;
    } = ...

    Type Declaration

    • onNotificationAdded: Signal<(notification: Notification, oldId?: string) => void>
    • onNotificationDeleted: Signal<(ids: string | string[]) => void>
    • onNotificationDeletedAll: Signal<() => void>

      Signal emitted when all notifications are deleted

    • onNotificationReadStatusUpdated: Signal<(unreadCount: number) => void>

    Accessors

    • get count(): number

      Number of notifications in the center

      Returns number

    • get isLoading(): boolean

      Returns boolean

    • get types(): Set<string>

      Returns a set of all unique notification types.

      Returns Set<string>

    • get unreadCount(): number

      Number of unread notification in the center that are of types warning or error

      Returns number

    Methods

    • Returns void

    • Mark the notification as closed. It will not open again if the status of notification changes

      Parameters

      Returns void

    • Returns a generator of notifications

      Returns Generator<Notification>

    • Returns a generator of unread notifications

      Returns Generator<Notification>

    • Add a notification and return its index If you push a notification with the same id, it will replace the previous one.

      Parameters

      Returns string

    • Remove notifications with ids

      Parameters

      • ids: string | string[]

        A notification id, or an array of notification ids

      Returns void

    • Marks notifications as read or unread

      Parameters

      Returns void