UNPKG

bitfront-library

Version:

Angular CLI project with components and classes used by other Angular projects of the BIT foundation.

35 lines (34 loc) 1.54 kB
import { BitMessage } from "../data/bitmessage"; import { Error } from "../data/error"; import * as i0 from "@angular/core"; /** * * TODO: better modal implementation that doesn't use window.confirm */ export declare class MessageService { private observableMessagesSource; private observableNotificationsSource; private observableErrorsSource; private observableNotificacionsErrorsSource; observableMessages: any; observableNotifications: any; observableErrors: any; observableNotificationsErrors: any; constructor(); /** * Ask user to confirm an action. `message` explains the action and choices. * Returns promise resolving to `true`=confirm or `false`=cancel */ confirm(message?: string): Promise<boolean>; /** Enviamos un mensaje. Como mínimo el componente DialogComponent lo recibirá y lo mostrará al usuario */ sendMessage(message: BitMessage): void; /** * Enviamos un error. Si el objeto es de tipo notificación se mostrará como una ventana arriba a la derecha con un close para * cerrarlo. Si no es de tipo notificación el componente DialogComponent lo recibirá y lo mostrará al usuario en el centro del usuario **/ sendError(error: Error): void; /** Enviamos una notificación. El componente NotificationComponent lo recibirá y la mostrará en pantalla */ sendNotification(message: BitMessage): void; static ɵfac: i0.ɵɵFactoryDef<MessageService, never>; static ɵprov: i0.ɵɵInjectableDef<MessageService>; }