ionic-logging-viewer 17.0.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/README.md +16 -14
  2. package/fesm2022/ionic-logging-viewer.mjs +140 -260
  3. package/fesm2022/ionic-logging-viewer.mjs.map +1 -1
  4. package/package.json +12 -11
  5. package/types/ionic-logging-viewer.d.ts +244 -0
  6. package/esm2022/ionic-logging-viewer.mjs +0 -5
  7. package/esm2022/lib/logging-viewer/logging-viewer.component.mjs +0 -119
  8. package/esm2022/lib/logging-viewer-filter.service.mjs +0 -64
  9. package/esm2022/lib/logging-viewer-levels/logging-viewer-levels.component.mjs +0 -71
  10. package/esm2022/lib/logging-viewer-modal/logging-viewer-modal-properties.model.mjs +0 -2
  11. package/esm2022/lib/logging-viewer-modal/logging-viewer-modal.component.mjs +0 -141
  12. package/esm2022/lib/logging-viewer-search/logging-viewer-search.component.mjs +0 -73
  13. package/esm2022/lib/logging-viewer-translation.model.mjs +0 -2
  14. package/esm2022/lib/logging-viewer.module.mjs +0 -53
  15. package/esm2022/public_api.mjs +0 -11
  16. package/index.d.ts +0 -5
  17. package/lib/logging-viewer/logging-viewer.component.d.ts +0 -73
  18. package/lib/logging-viewer-filter.service.d.ts +0 -47
  19. package/lib/logging-viewer-levels/logging-viewer-levels.component.d.ts +0 -44
  20. package/lib/logging-viewer-modal/logging-viewer-modal-properties.model.d.ts +0 -25
  21. package/lib/logging-viewer-modal/logging-viewer-modal.component.d.ts +0 -75
  22. package/lib/logging-viewer-search/logging-viewer-search.component.d.ts +0 -44
  23. package/lib/logging-viewer-translation.model.d.ts +0 -27
  24. package/lib/logging-viewer.module.d.ts +0 -13
  25. package/public_api.d.ts +0 -7
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # ionic-logging-viewer
2
2
 
3
- **The dependencies used by the latest version are the same as needed for [Ionic 6.1.9](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md). For older versions use:**
3
+ **The dependencies used by the latest version are the same as needed for [Ionic 8.0.0](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md). For older versions use:**
4
4
 
5
5
  | ionic-logging-viewer | Ionic | Angular
6
6
  | ------ | -------- | ------
7
+ | 21.0.0 | >= 8.0.0 | >=21.0.0
8
+ | 18.0.0 | >= 7.0.0 | >=17.0.0
7
9
  | 17.0.0 | >= 6.1.9 | ^16.0.0
8
10
  | 16.0.0 | >= 6.1.9 | ^15.0.0
9
11
  | 15.0.0 | >= 6.1.9 | ^14.0.0
@@ -50,18 +52,18 @@ npm install ionic-logging-viewer --save
50
52
 
51
53
  ### import module
52
54
 
53
- Import the `LoggingViewerModule` in to your `app.module.ts`:
54
-
55
- ```typescript
56
- import { LoggingViewerModule } from "ionic-logging-viewer";
57
- ...
58
- @NgModule({
59
- imports: [
60
- IonicModule.forRoot(AppComponent),
61
- LoggingViewerModule
62
- ],
63
- ...
64
- })
55
+ Call `configure()` in your `app.config.ts`:
56
+
57
+ ```TypeScript
58
+ export const appConfig: ApplicationConfig = {
59
+ providers: [
60
+ ...
61
+ provideAppInitializer(() => {
62
+ const loggingService = inject(LoggingService);
63
+ loggingService.configure(environment.logging);
64
+ }),
65
+ ]
66
+ };
65
67
  ```
66
68
 
67
69
  ### LoggingViewerComponent directive
@@ -116,4 +118,4 @@ Just fill the `LoggingViewerTranslation` object.
116
118
 
117
119
  ## API
118
120
 
119
- see [API documentation](https://ritzlgrmft.github.io/ionic-logging-service//viewer/index.html).
121
+ see [API documentation](https://ritzlgrmft.github.io/ionic-logging-service/viewer/index.html).
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Injectable, Component, Input, NgModule } from '@angular/core';
3
- import * as i3 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i4 from '@angular/forms';
2
+ import { inject, signal, Injectable, input, computed, effect, Component } from '@angular/core';
3
+ import { LoggingService, LogLevelConverter } from 'ionic-logging-service';
4
+ import * as i1 from '@ionic/angular';
5
+ import { IonicModule, Platform, AlertController, ModalController } from '@ionic/angular';
6
+ import { DatePipe } from '@angular/common';
7
+ import * as i2 from '@angular/forms';
6
8
  import { FormsModule } from '@angular/forms';
7
- import * as i1$1 from '@ionic/angular';
8
- import { IonicModule } from '@ionic/angular';
9
- import * as i1 from 'ionic-logging-service';
10
- import { LogLevelConverter } from 'ionic-logging-service';
9
+ import { addIcons } from 'ionicons';
10
+ import { trashOutline, closeCircle } from 'ionicons/icons';
11
11
 
12
12
  /**
13
13
  * Service for storing filter settings for logging viewer.
@@ -18,56 +18,30 @@ class LoggingViewerFilterService {
18
18
  *
19
19
  * @param loggingService needed for internal logging.
20
20
  */
21
- constructor(loggingService) {
22
- this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Filter.Service");
21
+ constructor() {
22
+ this.loggingService = inject(LoggingService);
23
+ /**
24
+ * Signal for the current log level.
25
+ */
26
+ this.level = signal("DEBUG", ...(ngDevMode ? [{ debugName: "level" }] : []));
27
+ /**
28
+ * Signal for the current search value.
29
+ */
30
+ this.search = signal("", ...(ngDevMode ? [{ debugName: "search" }] : []));
31
+ this.logger = this.loggingService.getLogger("Ionic.Logging.Viewer.Filter.Service");
23
32
  const methodName = "ctor";
24
33
  this.logger.entry(methodName);
25
- this.levelValue = "DEBUG";
26
- this.searchValue = "";
27
- this.filterChanged = new EventEmitter();
28
34
  this.logger.exit(methodName);
29
35
  }
30
- /**
31
- * Gets the current log level.
32
- *
33
- * @return log level
34
- */
35
- get level() {
36
- return this.levelValue;
37
- }
38
- /**
39
- * Sets the new log level and emits a filterChanged event.
40
- *
41
- * @param value new slog level
42
- */
43
- set level(value) {
44
- this.levelValue = value;
45
- this.filterChanged.emit();
46
- }
47
- /**
48
- * Gets the current search value.
49
- *
50
- * @return search value
51
- */
52
- // eslint-disable-next-line @typescript-eslint/member-ordering
53
- get search() {
54
- return this.searchValue;
55
- }
56
- /**
57
- * Sets the new search value and emits a filterChanged event.
58
- *
59
- * @param value new search value
60
- */
61
- set search(value) {
62
- this.searchValue = value;
63
- this.filterChanged.emit();
64
- }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerFilterService, deps: [{ token: i1.LoggingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
66
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerFilterService }); }
36
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
37
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerFilterService, providedIn: 'root' }); }
67
38
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerFilterService, decorators: [{
69
- type: Injectable
70
- }], ctorParameters: function () { return [{ type: i1.LoggingService }]; } });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerFilterService, decorators: [{
40
+ type: Injectable,
41
+ args: [{
42
+ providedIn: 'root'
43
+ }]
44
+ }], ctorParameters: () => [] });
71
45
 
72
46
  /**
73
47
  * Component for displaying the current logs.
@@ -80,52 +54,42 @@ class LoggingViewerComponent {
80
54
  /**
81
55
  * Creates a new instance of the component.
82
56
  */
83
- constructor(loggingService, loggingViewerFilterService) {
84
- this.loggingService = loggingService;
85
- this.loggingViewerFilterService = loggingViewerFilterService;
86
- this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Component");
57
+ constructor() {
58
+ this.loggingService = inject(LoggingService);
59
+ this.loggingViewerFilterService = inject(LoggingViewerFilterService);
60
+ /**
61
+ * Comma-separated list of localStorageKeys. If set, the logs get loaded from localStorage instead of memory.
62
+ */
63
+ this.localStorageKeys = input(undefined, ...(ngDevMode ? [{ debugName: "localStorageKeys" }] : []));
64
+ this.logMessages = computed(() => {
65
+ if (this.localStorageKeys()) {
66
+ let messages = [];
67
+ for (const localStorageKey of this.localStorageKeys().split(",")) {
68
+ messages = messages.concat(this.loggingService.getLogMessagesFromLocalStorage(localStorageKey));
69
+ }
70
+ return messages.sort((a, b) => a.timeStamp.getTime() - b.timeStamp.getTime());
71
+ }
72
+ else {
73
+ return this.loggingService.getLogMessages()();
74
+ }
75
+ }, ...(ngDevMode ? [{ debugName: "logMessages" }] : []));
76
+ this.logger = this.loggingService.getLogger("Ionic.Logging.Viewer.Component");
87
77
  const methodName = "ctor";
88
78
  this.logger.entry(methodName);
89
- this.logger.exit(methodName);
90
- }
91
- /**
92
- * Initialize the component.
93
- *
94
- * This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html)
95
- * and the log messages from [LoggingService](../../../ionic-logging-service/typedoc/index.html).
96
- * If the localStorageKeys property is set, the messages are read from local storage.
97
- */
98
- ngOnInit() {
99
- const methodName = "ngOnInit";
100
- this.logger.entry(methodName);
101
- this.loadLogMessages();
102
- this.filterLogMessages();
103
- // subscribe to loggingService.logMessagesChanged event, to refresh, when new message is logged
104
- this.logMessagesChangedSubscription = this.loggingService.logMessagesChanged.subscribe(async () => {
105
- this.loadLogMessages();
106
- this.filterLogMessages();
79
+ // refresh the messages, when messages or filter are modified
80
+ effect(() => {
81
+ const logMessages = this.logMessages();
82
+ const level = this.loggingViewerFilterService.level();
83
+ const search = this.loggingViewerFilterService.search();
84
+ this.filterLogMessages(logMessages, level, search);
107
85
  });
108
- // subscribe to loggingViewerFilterService.filterChanged event, to refresh, when filter is modified
109
- this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
110
- this.filterLogMessages();
111
- });
112
- this.logger.exit(methodName);
113
- }
114
- /**
115
- * Clean up.
116
- */
117
- ngOnDestroy() {
118
- const methodName = "ngOnDestroy";
119
- this.logger.entry(methodName);
120
- this.logMessagesChangedSubscription.unsubscribe();
121
- this.filterChangedSubscription.unsubscribe();
122
86
  this.logger.exit(methodName);
123
87
  }
124
88
  /**
125
89
  * Filter the log messages.
126
90
  */
127
- filterLogMessages() {
128
- this.logMessagesForDisplay = this.logMessages.filter((message) => this.filterLogMessagesByLevel(message) && this.filterLogMessagesBySearch(message));
91
+ filterLogMessages(logMessages, level, search) {
92
+ this.logMessagesForDisplay = logMessages.filter((message) => this.filterLogMessagesByLevel(message, level) && this.filterLogMessagesBySearch(message, search));
129
93
  }
130
94
  /**
131
95
  * Check if the log message's level fulfills the level condition.
@@ -133,9 +97,8 @@ class LoggingViewerComponent {
133
97
  * @param message the log message to check
134
98
  * @returns true if check was successful
135
99
  */
136
- filterLogMessagesByLevel(message) {
137
- const levelValue = this.loggingViewerFilterService.level;
138
- return LogLevelConverter.levelFromString(message.level) >= LogLevelConverter.levelFromString(levelValue);
100
+ filterLogMessagesByLevel(message, level) {
101
+ return LogLevelConverter.levelFromString(message.level) >= LogLevelConverter.levelFromString(level);
139
102
  }
140
103
  /**
141
104
  * Check if the log message fulfills the search condition.
@@ -148,37 +111,19 @@ class LoggingViewerComponent {
148
111
  * @param message the log message to check
149
112
  * @returns true if check was successful
150
113
  */
151
- filterLogMessagesBySearch(message) {
152
- const searchValue = new RegExp(this.loggingViewerFilterService.search, "i");
153
- return message.logger.search(searchValue) >= 0 ||
154
- message.methodName.search(searchValue) >= 0 ||
155
- message.message.join("|").search(searchValue) >= 0;
114
+ filterLogMessagesBySearch(message, search) {
115
+ const searchRegex = new RegExp(search, "i");
116
+ return message.logger.search(searchRegex) >= 0 ||
117
+ message.methodName.search(searchRegex) >= 0 ||
118
+ message.message.join("|").search(searchRegex) >= 0;
156
119
  }
157
- /**
158
- * Load the current log messages.
159
- * For unit test purposes mainly.
160
- */
161
- loadLogMessages() {
162
- if (this.localStorageKeys) {
163
- this.logMessages = [];
164
- for (const localStorageKey of this.localStorageKeys.split(",")) {
165
- this.logMessages = this.logMessages.concat(this.loggingService.getLogMessagesFromLocalStorage(localStorageKey));
166
- }
167
- this.logMessages = this.logMessages.sort((a, b) => a.timeStamp.getTime() - b.timeStamp.getTime());
168
- }
169
- else {
170
- this.logMessages = this.loggingService.getLogMessages();
171
- }
172
- }
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component }); }
174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", 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" }] }); }
120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
121
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: LoggingViewerComponent, isStandalone: true, selector: "ionic-logging-viewer", inputs: { localStorageKeys: { classPropertyName: "localStorageKeys", publicName: "localStorageKeys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ion-list>\n @for (logMessage of logMessagesForDisplay; track logMessage) {\n <ion-item>\n <ion-label>\n <p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n <p>{{ logMessage.logger }}</p>\n <p>\n {{ logMessage.methodName }}\n @for (messagePart of logMessage.message; track messagePart) {\n <span> {{ messagePart }} </span>\n }\n </p>\n </ion-label>\n </ion-item>\n }\n</ion-list>", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "pipe", type: DatePipe, name: "date" }] }); }
175
122
  }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerComponent, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerComponent, decorators: [{
177
124
  type: Component,
178
- 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>" }]
179
- }], ctorParameters: function () { return [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }]; }, propDecorators: { localStorageKeys: [{
180
- type: Input
181
- }] } });
125
+ args: [{ selector: "ionic-logging-viewer", imports: [IonicModule, DatePipe], template: "<ion-list>\n @for (logMessage of logMessagesForDisplay; track logMessage) {\n <ion-item>\n <ion-label>\n <p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n <p>{{ logMessage.logger }}</p>\n <p>\n {{ logMessage.methodName }}\n @for (messagePart of logMessage.message; track messagePart) {\n <span> {{ messagePart }} </span>\n }\n </p>\n </ion-label>\n </ion-item>\n }\n</ion-list>" }]
126
+ }], ctorParameters: () => [], propDecorators: { localStorageKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "localStorageKeys", required: false }] }] } });
182
127
 
183
128
  /**
184
129
  * Component for displaying the log levels for filtering the current logs.
@@ -191,56 +136,38 @@ class LoggingViewerLevelsComponent {
191
136
  /**
192
137
  * Creates a new instance of the component.
193
138
  */
194
- constructor(loggingService, loggingViewerFilterService) {
195
- this.loggingViewerFilterService = loggingViewerFilterService;
196
- this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Levels.Component");
139
+ constructor() {
140
+ this.loggingService = inject(LoggingService);
141
+ this.loggingViewerFilterService = inject(LoggingViewerFilterService);
142
+ this.logger = this.loggingService.getLogger("Ionic.Logging.Viewer.Levels.Component");
197
143
  const methodName = "ctor";
198
144
  this.logger.entry(methodName);
199
145
  this.logLevels = [];
200
146
  this.logLevels.push("DEBUG", "INFO", "WARN", "ERROR");
201
- this.logger.exit(methodName);
202
- }
203
- /**
204
- * Initialize the component.
205
- *
206
- * This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).
207
- */
208
- ngOnInit() {
209
- const methodName = "ngOnInit";
210
- this.logger.entry(methodName);
211
- this.selectedLevel = this.loggingViewerFilterService.level;
212
- // subscribe to loggingViewerFilterService.filterChanged event, to refresh,
147
+ // handle signals of loggingViewerFilterService, to refresh,
213
148
  // when someone else modifies the level
214
- this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
215
- this.selectedLevel = this.loggingViewerFilterService.level;
149
+ effect(() => {
150
+ const level = this.loggingViewerFilterService.level();
151
+ this.selectedLevel = level;
216
152
  });
217
153
  this.logger.exit(methodName);
218
154
  }
219
- /**
220
- * Clean up.
221
- */
222
- ngOnDestroy() {
223
- const methodName = "ngOnDestroy";
224
- this.logger.entry(methodName);
225
- this.filterChangedSubscription.unsubscribe();
226
- this.logger.exit(methodName);
227
- }
228
155
  /**
229
156
  * Callback when the level was changed in the UI.
230
157
  */
231
158
  onLevelChanged() {
232
159
  const methodName = "onLevelChanged";
233
160
  this.logger.entry(methodName, this.selectedLevel);
234
- this.loggingViewerFilterService.level = this.selectedLevel;
161
+ this.loggingViewerFilterService.level.set(this.selectedLevel);
235
162
  this.logger.exit(methodName);
236
163
  }
237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerLevelsComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component }); }
238
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", 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-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }] }); }
164
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerLevelsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
165
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: LoggingViewerLevelsComponent, isStandalone: true, selector: "ionic-logging-viewer-levels", ngImport: i0, template: "<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n @for (logLevel of logLevels; track logLevel) {\n <ion-segment-button [value]=\"logLevel\">\n <ion-label>{{ logLevel }}</ion-label>\n </ion-segment-button>\n }\n</ion-segment>", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: i1.IonSegmentButton, selector: "ion-segment-button", inputs: ["contentId", "disabled", "layout", "mode", "type", "value"] }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
239
166
  }
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerLevelsComponent, decorators: [{
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerLevelsComponent, decorators: [{
241
168
  type: Component,
242
- 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>" }]
243
- }], ctorParameters: function () { return [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }]; } });
169
+ args: [{ selector: "ionic-logging-viewer-levels", imports: [IonicModule, FormsModule], template: "<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n @for (logLevel of logLevels; track logLevel) {\n <ion-segment-button [value]=\"logLevel\">\n <ion-label>{{ logLevel }}</ion-label>\n </ion-segment-button>\n }\n</ion-segment>" }]
170
+ }], ctorParameters: () => [] });
244
171
 
245
172
  /**
246
173
  * Component for displaying the search bar for filtering the current logs.
@@ -253,59 +180,40 @@ class LoggingViewerSearchComponent {
253
180
  /**
254
181
  * Creates a new instance of the component.
255
182
  */
256
- constructor(loggingService, loggingViewerFilterService) {
257
- this.loggingViewerFilterService = loggingViewerFilterService;
258
- this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Search.Component");
183
+ constructor() {
184
+ this.loggingService = inject(LoggingService);
185
+ this.loggingViewerFilterService = inject(LoggingViewerFilterService);
186
+ /**
187
+ * Placeholder to be shown in the empty search bar.
188
+ */
189
+ this.placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
190
+ this.logger = this.loggingService.getLogger("Ionic.Logging.Viewer.Search.Component");
259
191
  const methodName = "ctor";
260
192
  this.logger.entry(methodName);
261
- this.logger.exit(methodName);
262
- }
263
- /**
264
- * Initialize the component.
265
- *
266
- * This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).
267
- */
268
- ngOnInit() {
269
- const methodName = "ngOnInit";
270
- this.logger.entry(methodName);
271
- if (!this.placeholder) {
272
- this.placeholder = "Search";
273
- }
274
- this.search = this.loggingViewerFilterService.search;
275
- // subscribe to loggingViewerFilterService.filterChanged event, to refresh,
193
+ // handle signals of loggingViewerFilterService, to refresh,
276
194
  // when someone else modifies the search value
277
- this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
278
- this.search = this.loggingViewerFilterService.search;
195
+ effect(() => {
196
+ const search = this.loggingViewerFilterService.search();
197
+ this.search = search;
279
198
  });
280
199
  this.logger.exit(methodName);
281
200
  }
282
- /**
283
- * Clean up.
284
- */
285
- ngOnDestroy() {
286
- const methodName = "ngOnDestroy";
287
- this.logger.entry(methodName);
288
- this.filterChangedSubscription.unsubscribe();
289
- this.logger.exit(methodName);
290
- }
291
201
  /**
292
202
  * Callback when the search value was changed in the UI.
293
203
  */
294
204
  onSearchChanged() {
295
205
  const methodName = "onSearchChanged";
296
206
  this.logger.entry(methodName, this.search);
297
- this.loggingViewerFilterService.search = this.search;
207
+ this.loggingViewerFilterService.search.set(this.search);
298
208
  this.logger.exit(methodName);
299
209
  }
300
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerSearchComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component }); }
301
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", 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", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "directive", type: i1$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }] }); }
210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
211
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: LoggingViewerSearchComponent, isStandalone: true, selector: "ionic-logging-viewer-search", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ion-searchbar placeholder=\"{{placeholder() || 'Search'}}\" [(ngModel)]=\"search\" [debounce]=\"1000\"\n (ionInput)=\"onSearchChanged()\"></ion-searchbar>", styles: ["ion-searchbar{padding-top:3px;padding-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocapitalize", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-input-otp[type=text],ion-textarea,ion-searchbar" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
302
212
  }
303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerSearchComponent, decorators: [{
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerSearchComponent, decorators: [{
304
214
  type: Component,
305
- 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"] }]
306
- }], ctorParameters: function () { return [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }]; }, propDecorators: { placeholder: [{
307
- type: Input
308
- }] } });
215
+ args: [{ selector: "ionic-logging-viewer-search", imports: [IonicModule, FormsModule], template: "<ion-searchbar placeholder=\"{{placeholder() || 'Search'}}\" [(ngModel)]=\"search\" [debounce]=\"1000\"\n (ionInput)=\"onSearchChanged()\"></ion-searchbar>", styles: ["ion-searchbar{padding-top:3px;padding-bottom:0}\n"] }]
216
+ }], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
309
217
 
310
218
  /**
311
219
  * Ionic modal containing [LoggingViewerComponent](LoggingViewerComponent.html),
@@ -318,14 +226,35 @@ class LoggingViewerModalComponent {
318
226
  /**
319
227
  * Creates a new instance of the component.
320
228
  */
321
- constructor(platform, alertController, modalController, loggingService) {
322
- this.alertController = alertController;
323
- this.modalController = modalController;
324
- this.loggingService = loggingService;
325
- this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Modal.Component");
229
+ constructor() {
230
+ this.platform = inject(Platform);
231
+ this.alertController = inject(AlertController);
232
+ this.modalController = inject(ModalController);
233
+ this.loggingService = inject(LoggingService);
234
+ /**
235
+ * Language to be used for the modal.
236
+ * Currently supported: en, de
237
+ */
238
+ this.language = input(undefined, ...(ngDevMode ? [{ debugName: "language" }] : []));
239
+ /**
240
+ * Translation to be used for the modal.
241
+ * If specified, the language is ignored.
242
+ */
243
+ this.translation = input(undefined, ...(ngDevMode ? [{ debugName: "translation" }] : []));
244
+ /**
245
+ * Comma-separated list of localStorageKeys. If set, the logs get loaded from localStorage instead of memory.
246
+ */
247
+ this.localStorageKeys = input(undefined, ...(ngDevMode ? [{ debugName: "localStorageKeys" }] : []));
248
+ /**
249
+ * Flag showing a delete button, which removes all existing log messages.
250
+ */
251
+ this.allowClearLogs = input(true, ...(ngDevMode ? [{ debugName: "allowClearLogs" }] : []));
252
+ this.logger = this.
253
+ loggingService.getLogger("Ionic.Logging.Viewer.Modal.Component");
326
254
  const methodName = "ctor";
327
255
  this.logger.entry(methodName);
328
- this.isAndroid = platform.is("android");
256
+ this.isAndroid = this.platform.is("android");
257
+ addIcons({ closeCircle, trashOutline });
329
258
  this.logger.exit(methodName);
330
259
  }
331
260
  /**
@@ -396,8 +325,8 @@ class LoggingViewerModalComponent {
396
325
  * Clear logs.
397
326
  */
398
327
  clearLogs() {
399
- if (this.localStorageKeys) {
400
- for (const localStorageKey of this.localStorageKeys.split(",")) {
328
+ if (this.localStorageKeys()) {
329
+ for (const localStorageKey of this.localStorageKeys().split(",")) {
401
330
  this.loggingService.removeLogMessagesFromLocalStorage(localStorageKey);
402
331
  }
403
332
  }
@@ -412,74 +341,25 @@ class LoggingViewerModalComponent {
412
341
  * - English translation, otherwise
413
342
  */
414
343
  getTranslation() {
415
- if (typeof this.translation !== "undefined") {
416
- return this.translation;
344
+ const language = this.language();
345
+ const translation = this.translation();
346
+ if (typeof translation !== "undefined") {
347
+ return translation;
417
348
  }
418
- else if (typeof this.language !== "undefined" && typeof this.translations[this.language] === "object") {
419
- return this.translations[this.language];
349
+ else if (typeof language !== "undefined" && typeof this.translations[language] === "object") {
350
+ return this.translations[language];
420
351
  }
421
352
  else {
422
353
  return this.translations[LoggingViewerModalComponent.languageEn];
423
354
  }
424
355
  }
425
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerModalComponent, deps: [{ token: i1$1.Platform }, { token: i1$1.AlertController }, { token: i1$1.ModalController }, { token: i1.LoggingService }], target: i0.ɵɵFactoryTarget.Component }); }
426
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", 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", "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.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: i1$1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { 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" }] }); }
356
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
357
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: LoggingViewerModalComponent, isStandalone: true, selector: "ionic-logging-viewer-modal", inputs: { language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, translation: { classPropertyName: "translation", publicName: "translation", isSignal: true, isRequired: false, transformFunction: null }, localStorageKeys: { classPropertyName: "localStorageKeys", publicName: "localStorageKeys", isSignal: true, isRequired: false, transformFunction: null }, allowClearLogs: { classPropertyName: "allowClearLogs", publicName: "allowClearLogs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ion-header>\n <ion-toolbar color=primary>\n <ion-title>{{ getTranslation().title }}</ion-title>\n <ion-buttons slot=\"start\">\n @if (!isAndroid) {\n <ion-button (click)=\"onClose()\">\n {{ getTranslation().cancel }}\n </ion-button>\n } @else {\n <ion-button icon-only (click)=\"onClose()\">\n <ion-icon name=\"close-circle\"></ion-icon>\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n <ion-toolbar>\n <ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n @if (allowClearLogs() !== false) {\n <ion-buttons slot=\"end\" class=\"clearLogs\">\n <ion-button (click)=\"onClearLogs()\">\n <ion-icon name=\"trash-outline\"></ion-icon>\n </ion-button>\n </ion-buttons>\n }\n </ion-toolbar>\n <ion-toolbar>\n <ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <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: "ngmodule", type: IonicModule }, { kind: "component", type: i1.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.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: LoggingViewerSearchComponent, selector: "ionic-logging-viewer-search", inputs: ["placeholder"] }, { kind: "component", type: LoggingViewerLevelsComponent, selector: "ionic-logging-viewer-levels" }, { kind: "component", type: LoggingViewerComponent, selector: "ionic-logging-viewer", inputs: ["localStorageKeys"] }] }); }
427
358
  }
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerModalComponent, decorators: [{
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingViewerModalComponent, decorators: [{
429
360
  type: Component,
430
- 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"] }]
431
- }], ctorParameters: function () { return [{ type: i1$1.Platform }, { type: i1$1.AlertController }, { type: i1$1.ModalController }, { type: i1.LoggingService }]; }, propDecorators: { language: [{
432
- type: Input
433
- }], translation: [{
434
- type: Input
435
- }], localStorageKeys: [{
436
- type: Input
437
- }], allowClearLogs: [{
438
- type: Input
439
- }] } });
440
-
441
- class LoggingViewerModule {
442
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
443
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerModule, declarations: [LoggingViewerComponent,
444
- LoggingViewerSearchComponent,
445
- LoggingViewerLevelsComponent,
446
- LoggingViewerModalComponent], imports: [CommonModule,
447
- FormsModule,
448
- IonicModule], exports: [LoggingViewerComponent,
449
- LoggingViewerSearchComponent,
450
- LoggingViewerLevelsComponent,
451
- LoggingViewerModalComponent] }); }
452
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerModule, providers: [
453
- LoggingViewerFilterService
454
- ], imports: [CommonModule,
455
- FormsModule,
456
- IonicModule] }); }
457
- }
458
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingViewerModule, decorators: [{
459
- type: NgModule,
460
- args: [{
461
- imports: [
462
- CommonModule,
463
- FormsModule,
464
- IonicModule
465
- ],
466
- declarations: [
467
- LoggingViewerComponent,
468
- LoggingViewerSearchComponent,
469
- LoggingViewerLevelsComponent,
470
- LoggingViewerModalComponent
471
- ],
472
- exports: [
473
- LoggingViewerComponent,
474
- LoggingViewerSearchComponent,
475
- LoggingViewerLevelsComponent,
476
- LoggingViewerModalComponent
477
- ],
478
- providers: [
479
- LoggingViewerFilterService
480
- ]
481
- }]
482
- }] });
361
+ args: [{ selector: "ionic-logging-viewer-modal", imports: [IonicModule, LoggingViewerSearchComponent, LoggingViewerLevelsComponent, LoggingViewerComponent], template: "<ion-header>\n <ion-toolbar color=primary>\n <ion-title>{{ getTranslation().title }}</ion-title>\n <ion-buttons slot=\"start\">\n @if (!isAndroid) {\n <ion-button (click)=\"onClose()\">\n {{ getTranslation().cancel }}\n </ion-button>\n } @else {\n <ion-button icon-only (click)=\"onClose()\">\n <ion-icon name=\"close-circle\"></ion-icon>\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n <ion-toolbar>\n <ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n @if (allowClearLogs() !== false) {\n <ion-buttons slot=\"end\" class=\"clearLogs\">\n <ion-button (click)=\"onClearLogs()\">\n <ion-icon name=\"trash-outline\"></ion-icon>\n </ion-button>\n </ion-buttons>\n }\n </ion-toolbar>\n <ion-toolbar>\n <ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <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"] }]
362
+ }], ctorParameters: () => [], propDecorators: { language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], translation: [{ type: i0.Input, args: [{ isSignal: true, alias: "translation", required: false }] }], localStorageKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "localStorageKeys", required: false }] }], allowClearLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClearLogs", required: false }] }] } });
483
363
 
484
364
  /*
485
365
  * Public API Surface of ionic-logging-viewer
@@ -489,5 +369,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
489
369
  * Generated bundle index. Do not edit.
490
370
  */
491
371
 
492
- export { LoggingViewerComponent, LoggingViewerLevelsComponent, LoggingViewerModalComponent, LoggingViewerModule, LoggingViewerSearchComponent };
372
+ export { LoggingViewerComponent, LoggingViewerLevelsComponent, LoggingViewerModalComponent, LoggingViewerSearchComponent };
493
373
  //# sourceMappingURL=ionic-logging-viewer.mjs.map