ionic-logging-viewer
Version:
Viewer component for logs written by ionic-logging-service
76 lines (75 loc) • 2.92 kB
TypeScript
import { OnInit } from "@angular/core";
import { ModalController, Platform, AlertController } from "@ionic/angular";
import { LoggingService } from "ionic-logging-service";
import { LoggingViewerTranslation } from "../logging-viewer-translation.model";
import * as i0 from "@angular/core";
/**
* Ionic modal containing [LoggingViewerComponent](LoggingViewerComponent.html),
* [LoggingViewerLevelsComponent](LoggingViewerLevelsComponent.html) and
* [LoggingViewerSearchComponent](LoggingViewerSearchComponent.html).
*/
export declare class LoggingViewerModalComponent implements OnInit {
private alertController;
private modalController;
private loggingService;
private static languageEn;
private static languageDe;
/**
* Language to be used for the modal.
* Currently supported: en, de
*/
language: string;
/**
* Translation to be used for the modal.
* If specified, the language is ignored.
*/
translation: LoggingViewerTranslation;
/**
* Comma-separated list of localStorageKeys. If set, the logs get loaded from localStorage instead of memory.
*/
localStorageKeys: string;
/**
* Flag showing a delete button, which removes all existing log messages.
*/
allowClearLogs: boolean;
/**
* Flag controlling which close button will be shown.
*/
isAndroid: boolean;
private logger;
private translations;
/**
* Creates a new instance of the component.
*/
constructor(platform: Platform, alertController: AlertController, modalController: ModalController, loggingService: LoggingService);
/**
* Initializes the LoggingViewerModalComponent.
* It configures the supported translations.
*/
ngOnInit(): void;
/**
* Eventhandler called by Ionic when the modal is opened.
*/
ionViewDidEnter(): void;
/**
* Eventhandler called when the cancel button is clicked.
*/
onClose(): Promise<void>;
/**
* Eventhandler called when the clear button is clicked.
*/
onClearLogs(): Promise<void>;
/**
* Clear logs.
*/
clearLogs(): void;
/**
* Helper method returning the current translation:
* - the property translation if defined
* - the translation according property language if valid
* - English translation, otherwise
*/
getTranslation(): LoggingViewerTranslation;
static ɵfac: i0.ɵɵFactoryDeclaration<LoggingViewerModalComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LoggingViewerModalComponent, "ionic-logging-viewer-modal", never, { "language": { "alias": "language"; "required": false; }; "translation": { "alias": "translation"; "required": false; }; "localStorageKeys": { "alias": "localStorageKeys"; "required": false; }; "allowClearLogs": { "alias": "allowClearLogs"; "required": false; }; }, {}, never, never, false, never>;
}