/** * A message to display by the ngeo notification service. */ export type Message = { /** * The delay in milliseconds the message is shown */ delay?: number; /** * Whether the message should be displayed inside a popup window or not. */ popup?: boolean; /** * The message text to display. */ msg: string; /** * The target element (or selector to get the element) in which * to display the message. If not defined, then the default target of the notification service is used. */ target?: Element; /** * The type of message. */ type?: string; }; export declare enum MessageType { ERROR = "error", INFORMATION = "information", SUCCESS = "success", WARNING = "warning" } /** * Abstract class for services that display messages. * @class * @abstract */ export default class { /** * Show the message. * @abstract * @param message Message. * @protected */ showMessage(message: Message): void; /** * Show disclaimer message string or object or list of disclame message * strings or objects. * @param object A message or list of messages as text or configuration objects. */ show(object: string | Message | (string | Message)[]): void; /** * Display the given error message or list of error messages. * @param message Message or list of messages. */ error(message: string | string[]): void; /** * Display the given info message or list of info messages. * @param message Message or list of messages. */ info(message: string | string[]): void; /** * Display the given success message or list of success messages. * @param message Message or list of messages. */ success(message: string | string[]): void; /** * Display the given warning message or list of warning messages. * @param message Message or list of messages. */ warn(message: string | string[]): void; /** * Returns an array of message object from any given message string, list of * message strings, message object or list message objects. The type can be * overridden here as well OR defined (if the message(s) is/are string(s), * defaults to 'information'). * @param object * A message or list of messages as text or configuration objects. * @param opt_type The type of message to override the messages with. * @returns List of message objects. * @protected */ getMessageObjects(object: string | Message | (string | Message)[], opt_type?: string): Message[]; }