pivotick - v2.0.1
    Preparing search index...

    Interface Notifier

    Manages and displays notification messages in the graph UI.

    Use this component to show success, warning, error, or info messages to the user.

    graph.notifier.warning('This is a warning', 'Content of the message goes here.')
    

    A notification can also carry one action and outlive the default four seconds, which is how an outcome offers to undo itself:

    const toast = graph.notifier.success('Ingested 12 nodes', undefined, {
    action: { label: 'Undo', onClick: (t) => { undo(); t.update({ title: 'Undone' }) } },
    })
    interface Notifier {
        error(
            title: string,
            message?: string,
            options?: Pick<Notification, "action" | "duration">,
        ): NotificationHandle | undefined;
        info(
            title: string,
            message?: string,
            options?: Pick<Notification, "action" | "duration">,
        ): NotificationHandle | undefined;
        notify(
            level: NotificationLevel,
            title: string,
            message?: string,
            options?: Pick<Notification, "action" | "duration">,
        ): NotificationHandle | undefined;
        success(
            title: string,
            message?: string,
            options?: Pick<Notification, "action" | "duration">,
        ): NotificationHandle | undefined;
        warning(
            title: string,
            message?: string,
            options?: Pick<Notification, "action" | "duration">,
        ): NotificationHandle | undefined;
    }
    Index

    Methods

    • Parameters

      • title: string
      • Optionalmessage: string
      • Optionaloptions: Pick<Notification, "action" | "duration">

      Returns NotificationHandle | undefined

    • Parameters

      • title: string
      • Optionalmessage: string
      • Optionaloptions: Pick<Notification, "action" | "duration">

      Returns NotificationHandle | undefined

    • Dispatch a notification to the UIManager.

      Parameters

      • level: NotificationLevel

        The severity level of the notification.

      • title: string

        The title to display in the notification.

      • Optionalmessage: string

        Optional detailed message for the notification.

      • Optionaloptions: Pick<Notification, "action" | "duration">

        An action to offer, and how long to stay.

      Returns NotificationHandle | undefined

      A handle onto the toast, or undefined where there is nowhere to show one (a UI mode with no notification slot).

    • Parameters

      • title: string
      • Optionalmessage: string
      • Optionaloptions: Pick<Notification, "action" | "duration">

      Returns NotificationHandle | undefined

    • Parameters

      • title: string
      • Optionalmessage: string
      • Optionaloptions: Pick<Notification, "action" | "duration">

      Returns NotificationHandle | undefined