@kephas/ui
Version:
Provides a common infrastructure for UI components.
63 lines (62 loc) • 1.71 kB
TypeScript
import { Logger, LogLevel } from '@kephas/core';
/**
* Notification service.
*
* @export
* @class NotificationService
*/
export declare class NotificationService {
/**
* Gets or sets the logger.
*
* @protected
* @type {Logger}
* @memberof NotificationService
*/
protected logger: Logger;
/**
* Creates an instance of Notification.
* @param {Logger} [logger] Optional. The logger.
* @memberof NotificationService
*/
constructor(logger?: Logger);
/**
* Notifies the message at error level.
*
* @param {*} data The information to be displayed.
* @memberof NotificationService
*/
notifyError(data: any): void;
/**
* Notifies the message at warning level.
*
* @param {*} data The information to be displayed.
* @memberof NotificationService
*/
notifyWarning(data: any): void;
/**
* Notifies the message at information level.
*
* @param {*} data The information to be displayed.
* @memberof NotificationService
*/
notifyInfo(data: any): void;
/**
* Shows the notification.
*
* @protected
* @param {*} formattedData The formatted data.
* @param {LogLevel} severity The severity.
* @memberof NotificationService
*/
protected show(formattedData: any, severity: LogLevel): void;
/**
* Formats the data. By default it returns a formatted string.
*
* @protected
* @param {*} data The information to be formatted.
* @returns {string}
* @memberof NotificationService
*/
protected formatData(data: any): any;
}