UNPKG

@silexlabs/grapesjs-notifications

Version:

This GrapesJs plugin is designed to enhance the user experience within the editor by providing a robust notification system. This plugin captures and displays various types of notifications including errors, warnings, and activities, thereby facilitating

48 lines 1.45 kB
import { Editor } from "grapesjs"; import { Notification, NotificationOptions } from "./Notification"; import { StyleInfo } from "lit/directives/style-map"; export declare const NOTIFICATION_CHANGED = "notifications:changed"; export declare const NOTIFICATION_ADDED = "notifications:added"; export declare const NOTIFICATION_REMOVED = "notifications:removed"; export declare const NOTIFICATION_CLEARED = "notifications:cleared"; export interface NotificationManagerOptions { style?: Readonly<StyleInfo>; container: HTMLElement; maxNotifications?: number; reverse?: boolean; timeout?: number; storeKey?: string; i18n?: any; icons?: { info?: string; warning?: string; error?: string; success?: string; }; } /** * GrapesJs plugin to manage notifications */ export declare class NotificationManager { protected editor: Editor; protected options: NotificationManagerOptions; private notifications; constructor(initialNotifications: any[], editor: Editor, options: NotificationManagerOptions); /** * Get all notifications */ getAll(): Notification[]; /** * Add a notification */ add(options: NotificationOptions): void; /** * Remove a notification */ remove(notification: Notification | any): void; /** * Clear all notifications */ reset(): void; } //# sourceMappingURL=NotificationManager.d.ts.map