ionic-logging-viewer
Version:
Viewer component for logs written by ionic-logging-service
494 lines (484 loc) • 28.6 kB
JavaScript
import * as i0 from '@angular/core';
import { EventEmitter, Injectable, Component, Input, NgModule } from '@angular/core';
import * as i3 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i4 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import * as i1$1 from '@ionic/angular';
import { IonicModule } from '@ionic/angular';
import * as i1 from 'ionic-logging-service';
import { LogLevelConverter } from 'ionic-logging-service';
/**
* Service for storing filter settings for logging viewer.
*/
class LoggingViewerFilterService {
/**
* Creates a new instance of the service.
*
* @param loggingService needed for internal logging.
*/
constructor(loggingService) {
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Filter.Service");
const methodName = "ctor";
this.logger.entry(methodName);
this.levelValue = "DEBUG";
this.searchValue = "";
this.filterChanged = new EventEmitter();
this.logger.exit(methodName);
}
/**
* Gets the current log level.
*
* @return log level
*/
get level() {
return this.levelValue;
}
/**
* Sets the new log level and emits a filterChanged event.
*
* @param value new slog level
*/
set level(value) {
this.levelValue = value;
this.filterChanged.emit();
}
/**
* Gets the current search value.
*
* @return search value
*/
// eslint-disable-next-line @typescript-eslint/member-ordering
get search() {
return this.searchValue;
}
/**
* Sets the new search value and emits a filterChanged event.
*
* @param value new search value
*/
set search(value) {
this.searchValue = value;
this.filterChanged.emit();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerFilterService, deps: [{ token: i1.LoggingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerFilterService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerFilterService, decorators: [{
type: Injectable
}], ctorParameters: () => [{ type: i1.LoggingService }] });
/**
* Component for displaying the current logs.
*
* The component can be embedded in any web page using:
*
* <ionic-logging-viewer></ionic-logging-viewer>
*/
class LoggingViewerComponent {
/**
* Creates a new instance of the component.
*/
constructor(loggingService, loggingViewerFilterService) {
this.loggingService = loggingService;
this.loggingViewerFilterService = loggingViewerFilterService;
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Component");
const methodName = "ctor";
this.logger.entry(methodName);
this.logger.exit(methodName);
}
/**
* Initialize the component.
*
* This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html)
* and the log messages from [LoggingService](../../../ionic-logging-service/typedoc/index.html).
* If the localStorageKeys property is set, the messages are read from local storage.
*/
ngOnInit() {
const methodName = "ngOnInit";
this.logger.entry(methodName);
this.loadLogMessages();
this.filterLogMessages();
// subscribe to loggingService.logMessagesChanged event, to refresh, when new message is logged
this.logMessagesChangedSubscription = this.loggingService.logMessagesChanged.subscribe(async () => {
this.loadLogMessages();
this.filterLogMessages();
});
// subscribe to loggingViewerFilterService.filterChanged event, to refresh, when filter is modified
this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
this.filterLogMessages();
});
this.logger.exit(methodName);
}
/**
* Clean up.
*/
ngOnDestroy() {
const methodName = "ngOnDestroy";
this.logger.entry(methodName);
this.logMessagesChangedSubscription.unsubscribe();
this.filterChangedSubscription.unsubscribe();
this.logger.exit(methodName);
}
/**
* Filter the log messages.
*/
filterLogMessages() {
this.logMessagesForDisplay = this.logMessages.filter((message) => this.filterLogMessagesByLevel(message) && this.filterLogMessagesBySearch(message));
}
/**
* Check if the log message's level fulfills the level condition.
*
* @param message the log message to check
* @returns true if check was successful
*/
filterLogMessagesByLevel(message) {
const levelValue = this.loggingViewerFilterService.level;
return LogLevelConverter.levelFromString(message.level) >= LogLevelConverter.levelFromString(levelValue);
}
/**
* Check if the log message fulfills the search condition.
*
* The search value gets searched in:
* - logger name
* - method name
* - message
*
* @param message the log message to check
* @returns true if check was successful
*/
filterLogMessagesBySearch(message) {
const searchValue = new RegExp(this.loggingViewerFilterService.search, "i");
return message.logger.search(searchValue) >= 0 ||
message.methodName.search(searchValue) >= 0 ||
message.message.join("|").search(searchValue) >= 0;
}
/**
* Load the current log messages.
* For unit test purposes mainly.
*/
loadLogMessages() {
if (this.localStorageKeys) {
this.logMessages = [];
for (const localStorageKey of this.localStorageKeys.split(",")) {
this.logMessages = this.logMessages.concat(this.loggingService.getLogMessagesFromLocalStorage(localStorageKey));
}
this.logMessages = this.logMessages.sort((a, b) => a.timeStamp.getTime() - b.timeStamp.getTime());
}
else {
this.logMessages = this.loggingService.getLogMessages();
}
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: LoggingViewerComponent, selector: "ionic-logging-viewer", inputs: { localStorageKeys: "localStorageKeys" }, ngImport: i0, template: "<ion-list>\n\t<ion-item *ngFor=\"let logMessage of logMessagesForDisplay\">\n\t\t<ion-label>\n\t\t\t<p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n\t\t\t<p>{{ logMessage.logger }}</p>\n\t\t\t<p>\n\t\t\t\t{{ logMessage.methodName }}\n\t\t\t\t<span *ngFor=\"let messagePart of logMessage.message\"> {{ messagePart }} </span>\n\t\t\t</p>\n\t\t</ion-label>\n\t</ion-item>\n</ion-list>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i1$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1$1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerComponent, decorators: [{
type: Component,
args: [{ selector: "ionic-logging-viewer", template: "<ion-list>\n\t<ion-item *ngFor=\"let logMessage of logMessagesForDisplay\">\n\t\t<ion-label>\n\t\t\t<p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n\t\t\t<p>{{ logMessage.logger }}</p>\n\t\t\t<p>\n\t\t\t\t{{ logMessage.methodName }}\n\t\t\t\t<span *ngFor=\"let messagePart of logMessage.message\"> {{ messagePart }} </span>\n\t\t\t</p>\n\t\t</ion-label>\n\t</ion-item>\n</ion-list>" }]
}], ctorParameters: () => [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }], propDecorators: { localStorageKeys: [{
type: Input
}] } });
/**
* Component for displaying the log levels for filtering the current logs.
*
* The component can be embedded in any web page using:
*
* <ionic-logging-viewer-levels></ionic-logging-viewer-levels>
*/
class LoggingViewerLevelsComponent {
/**
* Creates a new instance of the component.
*/
constructor(loggingService, loggingViewerFilterService) {
this.loggingViewerFilterService = loggingViewerFilterService;
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Levels.Component");
const methodName = "ctor";
this.logger.entry(methodName);
this.logLevels = [];
this.logLevels.push("DEBUG", "INFO", "WARN", "ERROR");
this.logger.exit(methodName);
}
/**
* Initialize the component.
*
* This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).
*/
ngOnInit() {
const methodName = "ngOnInit";
this.logger.entry(methodName);
this.selectedLevel = this.loggingViewerFilterService.level;
// subscribe to loggingViewerFilterService.filterChanged event, to refresh,
// when someone else modifies the level
this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
this.selectedLevel = this.loggingViewerFilterService.level;
});
this.logger.exit(methodName);
}
/**
* Clean up.
*/
ngOnDestroy() {
const methodName = "ngOnDestroy";
this.logger.entry(methodName);
this.filterChangedSubscription.unsubscribe();
this.logger.exit(methodName);
}
/**
* Callback when the level was changed in the UI.
*/
onLevelChanged() {
const methodName = "onLevelChanged";
this.logger.entry(methodName, this.selectedLevel);
this.loggingViewerFilterService.level = this.selectedLevel;
this.logger.exit(methodName);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerLevelsComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: LoggingViewerLevelsComponent, selector: "ionic-logging-viewer-levels", ngImport: i0, template: "<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n\t<ion-segment-button *ngFor=\"let logLevel of logLevels\" [value]=\"logLevel\">\n\t\t<ion-label>{{ logLevel }}</ion-label>\n\t</ion-segment-button>\n</ion-segment>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1$1.IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: i1$1.IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }, { kind: "directive", type: i1$1.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerLevelsComponent, decorators: [{
type: Component,
args: [{ selector: "ionic-logging-viewer-levels", template: "<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n\t<ion-segment-button *ngFor=\"let logLevel of logLevels\" [value]=\"logLevel\">\n\t\t<ion-label>{{ logLevel }}</ion-label>\n\t</ion-segment-button>\n</ion-segment>" }]
}], ctorParameters: () => [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }] });
/**
* Component for displaying the search bar for filtering the current logs.
*
* The component can be embedded in any web page using:
*
* <ionic-logging-viewer-search placeholder="Search"></ionic-logging-viewer-search>
*/
class LoggingViewerSearchComponent {
/**
* Creates a new instance of the component.
*/
constructor(loggingService, loggingViewerFilterService) {
this.loggingViewerFilterService = loggingViewerFilterService;
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Search.Component");
const methodName = "ctor";
this.logger.entry(methodName);
this.logger.exit(methodName);
}
/**
* Initialize the component.
*
* This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).
*/
ngOnInit() {
const methodName = "ngOnInit";
this.logger.entry(methodName);
if (!this.placeholder) {
this.placeholder = "Search";
}
this.search = this.loggingViewerFilterService.search;
// subscribe to loggingViewerFilterService.filterChanged event, to refresh,
// when someone else modifies the search value
this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
this.search = this.loggingViewerFilterService.search;
});
this.logger.exit(methodName);
}
/**
* Clean up.
*/
ngOnDestroy() {
const methodName = "ngOnDestroy";
this.logger.entry(methodName);
this.filterChangedSubscription.unsubscribe();
this.logger.exit(methodName);
}
/**
* Callback when the search value was changed in the UI.
*/
onSearchChanged() {
const methodName = "onSearchChanged";
this.logger.entry(methodName, this.search);
this.loggingViewerFilterService.search = this.search;
this.logger.exit(methodName);
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerSearchComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: LoggingViewerSearchComponent, selector: "ionic-logging-viewer-search", inputs: { placeholder: "placeholder" }, ngImport: i0, template: "<ion-searchbar placeholder=\"{{placeholder}}\" [(ngModel)]=\"search\" (ionChange)=\"onSearchChanged()\"></ion-searchbar>", styles: ["ion-searchbar{padding-top:3px;padding-bottom:0}\n"], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "directive", type: i1$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar,ion-range" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerSearchComponent, decorators: [{
type: Component,
args: [{ selector: "ionic-logging-viewer-search", template: "<ion-searchbar placeholder=\"{{placeholder}}\" [(ngModel)]=\"search\" (ionChange)=\"onSearchChanged()\"></ion-searchbar>", styles: ["ion-searchbar{padding-top:3px;padding-bottom:0}\n"] }]
}], ctorParameters: () => [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }], propDecorators: { placeholder: [{
type: Input
}] } });
/**
* Ionic modal containing [LoggingViewerComponent](LoggingViewerComponent.html),
* [LoggingViewerLevelsComponent](LoggingViewerLevelsComponent.html) and
* [LoggingViewerSearchComponent](LoggingViewerSearchComponent.html).
*/
class LoggingViewerModalComponent {
static { this.languageEn = "en"; }
static { this.languageDe = "de"; }
/**
* Creates a new instance of the component.
*/
constructor(platform, alertController, modalController, loggingService) {
this.alertController = alertController;
this.modalController = modalController;
this.loggingService = loggingService;
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Modal.Component");
const methodName = "ctor";
this.logger.entry(methodName);
this.isAndroid = platform.is("android");
this.logger.exit(methodName);
}
/**
* Initializes the LoggingViewerModalComponent.
* It configures the supported translations.
*/
ngOnInit() {
// prepare translations
this.translations = {};
this.translations[LoggingViewerModalComponent.languageEn] = {
cancel: "Cancel",
confirmDelete: "Delete all log messages?",
ok: "Ok",
searchPlaceholder: "Search",
title: "Logging",
};
this.translations[LoggingViewerModalComponent.languageDe] = {
cancel: "Abbrechen",
confirmDelete: "Alle Logs löschen?",
ok: "Ok",
searchPlaceholder: "Suchen",
title: "Logging",
};
}
/**
* Eventhandler called by Ionic when the modal is opened.
*/
ionViewDidEnter() {
const methodName = "ionViewDidEnter";
this.logger.entry(methodName);
this.logger.exit(methodName);
}
/**
* Eventhandler called when the cancel button is clicked.
*/
async onClose() {
const methodName = "onClose";
this.logger.entry(methodName);
await this.modalController.dismiss();
this.logger.exit(methodName);
}
/**
* Eventhandler called when the clear button is clicked.
*/
async onClearLogs() {
const methodName = "onClearLogs";
this.logger.entry(methodName);
const alert = await this.alertController.create({
header: this.getTranslation().confirmDelete,
buttons: [
{
text: this.getTranslation().cancel,
role: "cancel",
cssClass: "secondary"
},
{
text: this.getTranslation().ok,
handler: () => {
this.clearLogs();
}
},
]
});
await alert.present();
this.logger.exit(methodName);
}
/**
* Clear logs.
*/
clearLogs() {
if (this.localStorageKeys) {
for (const localStorageKey of this.localStorageKeys.split(",")) {
this.loggingService.removeLogMessagesFromLocalStorage(localStorageKey);
}
}
else {
this.loggingService.removeLogMessages();
}
}
/**
* Helper method returning the current translation:
* - the property translation if defined
* - the translation according property language if valid
* - English translation, otherwise
*/
getTranslation() {
if (typeof this.translation !== "undefined") {
return this.translation;
}
else if (typeof this.language !== "undefined" && typeof this.translations[this.language] === "object") {
return this.translations[this.language];
}
else {
return this.translations[LoggingViewerModalComponent.languageEn];
}
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerModalComponent, deps: [{ token: i1$1.Platform }, { token: i1$1.AlertController }, { token: i1$1.ModalController }, { token: i1.LoggingService }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: LoggingViewerModalComponent, selector: "ionic-logging-viewer-modal", inputs: { language: "language", translation: "translation", localStorageKeys: "localStorageKeys", allowClearLogs: "allowClearLogs" }, ngImport: i0, template: "<ion-header>\n\t<ion-toolbar color=primary>\n\t\t<ion-title>{{ getTranslation().title }}</ion-title>\n\t\t<ion-buttons slot=\"start\">\n\t\t\t<ion-button *ngIf=\"!isAndroid\" (click)=\"onClose()\">\n\t\t\t\t{{ getTranslation().cancel }}\n\t\t\t</ion-button>\n\t\t\t<ion-button *ngIf=\"isAndroid\" icon-only (click)=\"onClose()\">\n\t\t\t\t<ion-icon name=\"md-close\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n\t\t<ion-buttons slot=\"end\" *ngIf=\"allowClearLogs !== false\" class=\"clearLogs\">\n\t\t\t<ion-button (click)=\"onClearLogs()\">\n\t\t\t\t<ion-icon name=\"trash-outline\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n\t</ion-toolbar>\n</ion-header>\n<ion-content>\n\t<ionic-logging-viewer [localStorageKeys]=\"localStorageKeys\"></ionic-logging-viewer>\n</ion-content>", styles: ["ionic-logging-viewer-levels{width:100%;padding-left:12px;padding-right:12px}.clearLogs{padding-top:3px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1$1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1$1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1$1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: LoggingViewerComponent, selector: "ionic-logging-viewer", inputs: ["localStorageKeys"] }, { kind: "component", type: LoggingViewerSearchComponent, selector: "ionic-logging-viewer-search", inputs: ["placeholder"] }, { kind: "component", type: LoggingViewerLevelsComponent, selector: "ionic-logging-viewer-levels" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerModalComponent, decorators: [{
type: Component,
args: [{ selector: "ionic-logging-viewer-modal", template: "<ion-header>\n\t<ion-toolbar color=primary>\n\t\t<ion-title>{{ getTranslation().title }}</ion-title>\n\t\t<ion-buttons slot=\"start\">\n\t\t\t<ion-button *ngIf=\"!isAndroid\" (click)=\"onClose()\">\n\t\t\t\t{{ getTranslation().cancel }}\n\t\t\t</ion-button>\n\t\t\t<ion-button *ngIf=\"isAndroid\" icon-only (click)=\"onClose()\">\n\t\t\t\t<ion-icon name=\"md-close\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n\t\t<ion-buttons slot=\"end\" *ngIf=\"allowClearLogs !== false\" class=\"clearLogs\">\n\t\t\t<ion-button (click)=\"onClearLogs()\">\n\t\t\t\t<ion-icon name=\"trash-outline\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n\t</ion-toolbar>\n</ion-header>\n<ion-content>\n\t<ionic-logging-viewer [localStorageKeys]=\"localStorageKeys\"></ionic-logging-viewer>\n</ion-content>", styles: ["ionic-logging-viewer-levels{width:100%;padding-left:12px;padding-right:12px}.clearLogs{padding-top:3px}\n"] }]
}], ctorParameters: () => [{ type: i1$1.Platform }, { type: i1$1.AlertController }, { type: i1$1.ModalController }, { type: i1.LoggingService }], propDecorators: { language: [{
type: Input
}], translation: [{
type: Input
}], localStorageKeys: [{
type: Input
}], allowClearLogs: [{
type: Input
}] } });
class LoggingViewerModule {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerModule, declarations: [LoggingViewerComponent,
LoggingViewerSearchComponent,
LoggingViewerLevelsComponent,
LoggingViewerModalComponent], imports: [CommonModule,
FormsModule,
IonicModule], exports: [LoggingViewerComponent,
LoggingViewerSearchComponent,
LoggingViewerLevelsComponent,
LoggingViewerModalComponent] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerModule, providers: [
LoggingViewerFilterService
], imports: [CommonModule,
FormsModule,
IonicModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingViewerModule, decorators: [{
type: NgModule,
args: [{
imports: [
CommonModule,
FormsModule,
IonicModule
],
declarations: [
LoggingViewerComponent,
LoggingViewerSearchComponent,
LoggingViewerLevelsComponent,
LoggingViewerModalComponent
],
exports: [
LoggingViewerComponent,
LoggingViewerSearchComponent,
LoggingViewerLevelsComponent,
LoggingViewerModalComponent
],
providers: [
LoggingViewerFilterService
]
}]
}] });
/*
* Public API Surface of ionic-logging-viewer
*/
/**
* Generated bundle index. Do not edit.
*/
export { LoggingViewerComponent, LoggingViewerLevelsComponent, LoggingViewerModalComponent, LoggingViewerModule, LoggingViewerSearchComponent };
//# sourceMappingURL=ionic-logging-viewer.mjs.map