pivotick / Notifiant
Interface: Notifier
Défini dans : ui/Notifier.ts:197
Gère et affiche les messages de notification dans l'interface utilisateur graphique.
Utilisez ce composant pour afficher des messages de réussite, d'avertissement, d'erreur ou d'information à l'utilisateur.
Exemples
graph.notifier.warning('This is a warning', 'Content of the message goes here.')Une notification peut également effectuer une action et durer plus de quatre secondes par défaut, c'est ainsi qu'un résultat propose de s'annuler :
const toast = graph.notifier.success('Ingested 12 nodes', undefined, {
action: { label: 'Undo', onClick: (t) => { undo(); t.update({ title: 'Undone' }) } },
})Méthodes
error()
error(
title,message?,options?):NotificationHandle|undefined
Défini dans : ui/Notifier.ts:234
Paramètres
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Renvoie
NotificationHandle | undefined
info()
info(
title,message?,options?):NotificationHandle|undefined
Défini dans : ui/Notifier.ts:238
Paramètres
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Renvoie
NotificationHandle | undefined
notify()
notify(
level,title,message?,options?):NotificationHandle|undefined
Défini dans : ui/Notifier.ts:216
Envoyez une notification à UIManager.
Paramètres
level
Le niveau de gravité de la notification.
title
string
Le titre à afficher dans la notification.
message?
string
Message détaillé facultatif pour la notification.
options?
Pick<Notification, "action" | "duration">
Une action à proposer, et combien de temps rester.
Renvoie
NotificationHandle | undefined
Une poignée sur le toast, ou undefined là où il n'y a nulle part où en afficher une (un mode UI sans emplacement de notification).
success()
success(
title,message?,options?):NotificationHandle|undefined
Défini dans : ui/Notifier.ts:226
Paramètres
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Renvoie
NotificationHandle | undefined
warning()
warning(
title,message?,options?):NotificationHandle|undefined
Défini dans : ui/Notifier.ts:230
Paramètres
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Renvoie
NotificationHandle | undefined