@evan.network/ui-angular-core
Version:
The angular-core operates as an global and central library for the evan.network Angular 5 frontend development. Using this project you will be able to to the following things:
101 lines (100 loc) • 3.35 kB
TypeScript
import { Platform } from 'angular-libs';
import { SingletonService } from '../singleton-service';
import { EvanUtilService } from '../utils';
import { EvanQueue } from '../bcc/queue';
import { EvanAddressBookService } from '../bcc/address-book';
import { EvanCoreService } from '../bcc/core';
import { EvanToastService } from '../ui/toast';
import { EvanAlertService } from '../ui/alert';
import { EvanRoutingService } from '../ui/routing';
/**
* Helper to handle logging reports.
*
* @class Injectable EvanLoggingService
*/
export declare class EvanLoggingService {
private addressBookService;
private alertService;
private core;
private coreService;
private platform;
private queue;
private singleton;
private toastService;
private utils;
private routingService;
/**
* make it singletone and bind input focus events
*/
constructor(addressBookService: EvanAddressBookService, alertService: EvanAlertService, core: EvanCoreService, coreService: EvanCoreService, platform: Platform, queue: EvanQueue, singleton: SingletonService, toastService: EvanToastService, utils: EvanUtilService, routingService: EvanRoutingService);
/**
* Using BCC log function to handle a generalized logging mechanism.
*
* @param {string} message message to log
* @param {string} level level to log the message with
*/
log(message: string, level: string): void;
/**
* Return all logs including the queue logs
*
* @return {Array<any>} logs including queue
*
* Sample:
* { "timestamp": 1529064180496, "level": "notice", "message": "cool message" }
*/
getLogsIncludingQueue(): any[];
/**
* enchance log message with user information
*
* @param {Array<any>} logs logs to use
* @return {Array<any>} log object
*/
buildLogObject(logs: Array<any>): Promise<{
logs: any[];
timestamp: number;
user: {
alias: string;
accountId: string;
provider: string;
};
browser: {
browser: any;
userAgent: string;
isMobile: boolean;
isNativeMobile: boolean;
isMobileIOS: boolean;
isMobileAndroid: boolean;
};
window: {
height: number;
width: number;
location: string;
};
}>;
/**
* Choose type all for current filtered log. Choose errors for only errors.
*
* @param {string} type all | errors
* @return {Array<any>} specific logs for type
*/
getReportLogs(types?: Array<string>): any[];
/**
* Opens an alert to ask the user to log only errors with on click or with loggin dapp.
*
* @return {Promise<any>} resolved when clicked
*/
logQuestionAlert(): Promise<any>;
/**
* Send log object to loggly.
*
* @param {string} type nothing, 'all' | 'errors'
*/
sendLogs(types?: Array<string>): Promise<void>;
/**
* Start copying of the error log. Choose type all for current filtered log. Choose errors for only
* errors.
*
* @param {string} type nothing, 'all' | 'errors'
*/
copy(types?: Array<string>): Promise<void>;
}