@dbg-riskit/angular-error 9999.9999.9999-rc.63199 → 9999.9999.9999-rc.6693152

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.
@@ -1,463 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ErrorHandler, Injectable, Optional, Inject, Component, ChangeDetectionStrategy, Input, EventEmitter, ViewChildren, NgModule } from '@angular/core';
3
- import { AUTH_PROVIDER, DATE_FORMAT } from '@dbg-riskit/angular-common';
4
- import { toString, ErrorType } from '@dbg-riskit/common';
5
- import { ReplaySubject, EMPTY, Subject, merge, timer } from 'rxjs';
6
- import { trigger, state, style, transition, animate, keyframes } from '@angular/animations';
7
- import { BaseComponent, CommonViewModule } from '@dbg-riskit/angular-view';
8
- import { filter, takeUntil, map, catchError, defaultIfEmpty } from 'rxjs/operators';
9
- import * as i1 from '@angular/material/card';
10
- import * as i2 from '@angular/material/icon';
11
- import * as i3 from '@angular/common';
12
- import { CommonModule } from '@angular/common';
13
- import * as i2$1 from '@angular/material/button';
14
- import * as i4 from '@angular/material/menu';
15
-
16
- function toErrorMessage(err) {
17
- let errorMessage;
18
- if ('errorType' in err) {
19
- errorMessage = err;
20
- }
21
- else {
22
- if ('message' in err) {
23
- err = err.message || toString(err);
24
- }
25
- else {
26
- err = toString(err);
27
- }
28
- errorMessage = {
29
- message: err,
30
- status: 0,
31
- errorType: ErrorType.ERROR
32
- };
33
- }
34
- return errorMessage;
35
- }
36
- class ErrorCollectorService extends ErrorHandler {
37
- constructor(authProvider) {
38
- super();
39
- this._errorObservable = new ReplaySubject(10);
40
- if (authProvider) {
41
- authProvider.loggedInStream.subscribe((auth) => {
42
- this._errorObservable = new ReplaySubject(10);
43
- });
44
- }
45
- }
46
- error(err) {
47
- this._errorObservable.next(err);
48
- }
49
- get errorStream() {
50
- return this._errorObservable.asObservable();
51
- }
52
- handleError(err) {
53
- try {
54
- super.handleError(err);
55
- }
56
- finally {
57
- this.error(toErrorMessage(err));
58
- }
59
- }
60
- handleStreamError(err) {
61
- this.handleError(err);
62
- return EMPTY;
63
- }
64
- }
65
- ErrorCollectorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorCollectorService, deps: [{ token: AUTH_PROVIDER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
66
- ErrorCollectorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorCollectorService });
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorCollectorService, decorators: [{
68
- type: Injectable
69
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
70
- type: Optional
71
- }, {
72
- type: Inject,
73
- args: [AUTH_PROVIDER]
74
- }] }]; } });
75
-
76
- class ErrorMessageComponent {
77
- constructor(dateFormat, changeDetectorRef) {
78
- this.dateFormat = dateFormat;
79
- this.changeDetectorRef = changeDetectorRef;
80
- this.readState = null;
81
- this.isLast = false;
82
- }
83
- animate() {
84
- if (this.error != null && !this.error.read && this.readState !== 'read') {
85
- setTimeout(() => {
86
- this.readState = 'read';
87
- this.changeDetectorRef.markForCheck();
88
- });
89
- }
90
- }
91
- markRead(event) {
92
- if (this.error != null && event.toState === 'read') {
93
- this.error.markRead();
94
- this.changeDetectorRef.markForCheck();
95
- }
96
- }
97
- }
98
- ErrorMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorMessageComponent, deps: [{ token: DATE_FORMAT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
99
- ErrorMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: ErrorMessageComponent, selector: "risk-error-message", inputs: { error: "error", isLast: "isLast" }, host: { properties: { "class.risk-error-message": "true" } }, ngImport: i0, template: "<mat-card [class.risk-error-message-last]=\"isLast\" [@readState]=\"readState\" (@readState.done)=\"markRead($event)\">\n <mat-card-header>\n <mat-icon color=\"warn\" mat-card-avatar>error_outline</mat-icon>\n <mat-card-title *ngIf=\"error?.type.isNetworkError()\">Network error</mat-card-title>\n <mat-card-title *ngIf=\"error?.type.isRequestError()\">API error</mat-card-title>\n <mat-card-title *ngIf=\"error?.type.isAuthError()\">Authorization error</mat-card-title>\n <mat-card-title\n *ngIf=\"!error?.type.isNetworkError() && !error?.type.isRequestError() && !error?.type.isAuthError()\">\n General error\n </mat-card-title>\n <mat-card-subtitle>{{error?.date | date:dateFormat}}</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <p *ngIf=\"error?.statusCode\" class=\"risk-error-message-code\">Error code: {{error?.statusCode}}</p>\n <p>\n {{error?.message}}\n </p>\n </mat-card-content>\n</mat-card>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host .mat-card{margin:0 10px 7px}:host .mat-card.risk-error-message-last{margin-bottom:0}:host .mat-card .mat-card-subtitle{margin-bottom:5px}:host .mat-card p{margin:0}:host .mat-card p.risk-error-message-code{position:absolute;bottom:10px;right:10px}:host .mat-card p.risk-error-message-code+p:last-child{margin-bottom:3px}\n"], components: [{ type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i1.MatCardHeader, selector: "mat-card-header" }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { type: i1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }], pipes: { "date": i3.DatePipe }, animations: [
100
- trigger('readState', [
101
- state('read', style({ background: 'transparent' })),
102
- transition(':enter', [
103
- style({
104
- height: 0,
105
- transform: 'scale(0)'
106
- }),
107
- animate('200ms ease-in', style({
108
- height: '*',
109
- transform: 'scale(1)'
110
- }))
111
- ]),
112
- transition('* => read', [
113
- style({
114
- background: 'transparent'
115
- }),
116
- animate('1500ms', keyframes([
117
- style({
118
- background: 'rgba(204, 51, 51, .5)',
119
- offset: 0.25
120
- }),
121
- style({
122
- background: 'transparent',
123
- offset: 0.5
124
- }),
125
- style({
126
- background: 'rgba(204, 51, 51, .5)',
127
- offset: 0.75
128
- }),
129
- style({
130
- background: 'transparent',
131
- offset: 1
132
- })
133
- ]))
134
- ])
135
- ])
136
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorMessageComponent, decorators: [{
138
- type: Component,
139
- args: [{ selector: 'risk-error-message', animations: [
140
- trigger('readState', [
141
- state('read', style({ background: 'transparent' })),
142
- transition(':enter', [
143
- style({
144
- height: 0,
145
- transform: 'scale(0)'
146
- }),
147
- animate('200ms ease-in', style({
148
- height: '*',
149
- transform: 'scale(1)'
150
- }))
151
- ]),
152
- transition('* => read', [
153
- style({
154
- background: 'transparent'
155
- }),
156
- animate('1500ms', keyframes([
157
- style({
158
- background: 'rgba(204, 51, 51, .5)',
159
- offset: 0.25
160
- }),
161
- style({
162
- background: 'transparent',
163
- offset: 0.5
164
- }),
165
- style({
166
- background: 'rgba(204, 51, 51, .5)',
167
- offset: 0.75
168
- }),
169
- style({
170
- background: 'transparent',
171
- offset: 1
172
- })
173
- ]))
174
- ])
175
- ])
176
- ], host: {
177
- '[class.risk-error-message]': 'true'
178
- }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<mat-card [class.risk-error-message-last]=\"isLast\" [@readState]=\"readState\" (@readState.done)=\"markRead($event)\">\n <mat-card-header>\n <mat-icon color=\"warn\" mat-card-avatar>error_outline</mat-icon>\n <mat-card-title *ngIf=\"error?.type.isNetworkError()\">Network error</mat-card-title>\n <mat-card-title *ngIf=\"error?.type.isRequestError()\">API error</mat-card-title>\n <mat-card-title *ngIf=\"error?.type.isAuthError()\">Authorization error</mat-card-title>\n <mat-card-title\n *ngIf=\"!error?.type.isNetworkError() && !error?.type.isRequestError() && !error?.type.isAuthError()\">\n General error\n </mat-card-title>\n <mat-card-subtitle>{{error?.date | date:dateFormat}}</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <p *ngIf=\"error?.statusCode\" class=\"risk-error-message-code\">Error code: {{error?.statusCode}}</p>\n <p>\n {{error?.message}}\n </p>\n </mat-card-content>\n</mat-card>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", ":host .mat-card{margin:0 10px 7px}:host .mat-card.risk-error-message-last{margin-bottom:0}:host .mat-card .mat-card-subtitle{margin-bottom:5px}:host .mat-card p{margin:0}:host .mat-card p.risk-error-message-code{position:absolute;bottom:10px;right:10px}:host .mat-card p.risk-error-message-code+p:last-child{margin-bottom:3px}\n"] }]
179
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
180
- type: Inject,
181
- args: [DATE_FORMAT]
182
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { error: [{
183
- type: Input
184
- }], isLast: [{
185
- type: Input
186
- }] } });
187
-
188
- class ErrorMessageWrapper {
189
- constructor(error) {
190
- this._date = new Date();
191
- this._read = false;
192
- this.readStateChanged = new EventEmitter();
193
- this._error = error;
194
- }
195
- get message() {
196
- return this._error.message;
197
- }
198
- get type() {
199
- return this._error.errorType;
200
- }
201
- get statusCode() {
202
- return this._error.status;
203
- }
204
- get date() {
205
- return this._date;
206
- }
207
- get read() {
208
- return this._read;
209
- }
210
- markRead() {
211
- if (!this._read) {
212
- this._read = true;
213
- this.readStateChanged.emit(this._read);
214
- this.readStateChanged.complete();
215
- }
216
- }
217
- }
218
-
219
- const JIGGLE_ANIMATION = animate('1s ease-in', keyframes([
220
- style({
221
- transform: 'scale(0.8) translateX(-1px) rotate(0)',
222
- offset: 0.1
223
- }),
224
- style({
225
- transform: 'scale(1) translateX(2px) rotate(4deg)',
226
- offset: 0.2
227
- }),
228
- style({
229
- transform: 'scale(1.2) translateX(-4px) rotate(0)',
230
- offset: 0.3
231
- }),
232
- style({
233
- transform: 'scale(1.5) translateX(4px) rotate(0)',
234
- offset: 0.4
235
- }),
236
- style({
237
- transform: 'scale(1.5) translateX(-4px) rotate(-8deg)',
238
- offset: 0.5
239
- }),
240
- style({
241
- transform: 'scale(1.5) translateX(4px) rotate(0)',
242
- offset: 0.6
243
- }),
244
- style({
245
- transform: 'scale(1.2) translateX(-4px) rotate(0)',
246
- offset: 0.7
247
- }),
248
- style({
249
- transform: 'scale(1) translateX(2px) rotate(4deg)',
250
- offset: 0.8
251
- }),
252
- style({
253
- transform: 'scale(1) translateX(-1px) rotate(0)',
254
- offset: 0.9
255
- })
256
- ]));
257
- class ErrorComponent extends BaseComponent {
258
- constructor(errorCollector, authProvider, changeDetectorRef) {
259
- super();
260
- this.errorCollector = errorCollector;
261
- this.authProvider = authProvider;
262
- this.changeDetectorRef = changeDetectorRef;
263
- this.state = null;
264
- this._errors = [];
265
- this._menuState = new Subject();
266
- }
267
- ngOnInit() {
268
- // Init Jiggle animation loop
269
- this.initAnimation();
270
- // Subscribe to error stream
271
- this.subscribeToErrors();
272
- // Once opened animate messages and set as read after animation
273
- this._menuState.pipe(filter((opened) => opened), takeUntil(this.destroyed)).subscribe(() => this.animateOnMenuOpened());
274
- // Refresh on "logged-in" state changes
275
- if (this.authProvider) {
276
- this.authProvider.loggedInStream.pipe(takeUntil(this.destroyed)).subscribe((auth) => this.loggedInChanged(auth));
277
- }
278
- }
279
- animateOnMenuOpened() {
280
- const animateMessages = () => this.errorMessages.forEach((message) => message.animate());
281
- animateMessages();
282
- this.errorMessages.changes.pipe(takeUntil(merge(this.destroyed, this._menuState))).subscribe(() => animateMessages());
283
- }
284
- loggedInChanged(auth) {
285
- // Subscribe to errors once logged in again
286
- if (auth) {
287
- this.subscribeToErrors();
288
- }
289
- else {
290
- while (this._errors.length > 0) {
291
- this._errors.pop();
292
- }
293
- }
294
- this.changeDetectorRef.markForCheck();
295
- }
296
- subscribeToErrors() {
297
- let until = this.destroyed;
298
- // Stop receiving errors once user was logged out
299
- if (this.authProvider) {
300
- until = merge(until, this.authProvider.loggedInStream.pipe(filter((auth) => !auth), map(() => undefined)));
301
- }
302
- this.errorCollector.errorStream.pipe(takeUntil(until)).subscribe((error) => this.errorReceived(error, until));
303
- }
304
- errorReceived(error, until) {
305
- const errorMessageWrapper = new ErrorMessageWrapper(error);
306
- // Subscribe for state changes
307
- errorMessageWrapper.readStateChanged.pipe(takeUntil(until)).subscribe(() => this.changeDetectorRef.detectChanges());
308
- this._errors.unshift(errorMessageWrapper);
309
- while (this._errors.length > 10) {
310
- this._errors.pop();
311
- }
312
- this.changeDetectorRef.markForCheck();
313
- }
314
- get color() {
315
- if (this.errors.some((error) => !error.read)) {
316
- return 'warn';
317
- }
318
- return null;
319
- }
320
- menuOpened() {
321
- this._menuState.next(true);
322
- }
323
- menuClosed() {
324
- this._menuState.next(false);
325
- }
326
- get errors() {
327
- return this._errors;
328
- }
329
- // <editor-fold desc="Animation control" defaultstate="collapsed">
330
- animationDone(event) {
331
- if (event.toState === 'newError') {
332
- // Reset after annimation
333
- this.state = 'active';
334
- // Called from animation controller we need to re-check
335
- this.changeDetectorRef.markForCheck();
336
- }
337
- }
338
- initAnimation() {
339
- timer(100, 2000).pipe(
340
- // Run animation everytime we have non-read errors
341
- filter(() => this.errors.some((error) => !error.read)), takeUntil(this.destroyed)).subscribe(() => {
342
- switch (this.state) {
343
- case null:
344
- this.state = 'active';
345
- break;
346
- case 'active':
347
- this.state = 'newError';
348
- break;
349
- }
350
- this.changeDetectorRef.markForCheck();
351
- });
352
- }
353
- }
354
- ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorComponent, deps: [{ token: ErrorCollectorService }, { token: AUTH_PROVIDER, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
355
- ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: ErrorComponent, selector: "risk-error-menu", inputs: { keepVisibleOnClick: "keepVisibleOnClick" }, host: { properties: { "class.risk-error-menu": "true" } }, viewQueries: [{ propertyName: "errorMessages", predicate: ErrorMessageComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<button *ngIf=\"state != null\"\n mat-icon-button\n [color]=\"color\"\n type=\"button\"\n [@buttonState]=\"state\"\n (@buttonState.done)=\"animationDone($event)\"\n [matMenuTriggerFor]=\"errorMenu\"\n #errorMenuTrigger=\"matMenuTrigger\"\n (menuOpened)=\"menuOpened()\"\n (menuClosed)=\"menuClosed()\"\n [class.risk-menu-open]=\"errorMenuTrigger.menuOpen\">\n <mat-icon>error_outline</mat-icon>\n</button>\n\n<mat-menu #errorMenu=\"matMenu\"\n class=\"risk-error-menu-mat-menu\"\n [overlapTrigger]=\"false\">\n <risk-error-message *ngFor=\"let error of errors; last as isLast\"\n [error]=\"error\"\n (click)=\"keepVisibleOnClick ? $event.stopPropagation() : null\"\n [isLast]=\"isLast\"></risk-error-message>\n</mat-menu>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", "::ng-deep .risk-error-menu-mat-menu{max-width:600px!important}\n"], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: ErrorMessageComponent, selector: "risk-error-message", inputs: ["error", "isLast"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
356
- trigger('buttonState', [
357
- state('inactive', style({ transform: 'translateX(0) scale(0)' })),
358
- state('active', style({ transform: 'translateX(0) scale(1)' })),
359
- state('newError', style({ transform: 'translateX(0) scale(1)' })),
360
- transition('void => active', [
361
- style({ transform: 'scale(0) translateX(0) rotate(0)' }),
362
- JIGGLE_ANIMATION
363
- ]),
364
- transition('void => newError', [
365
- style({ transform: 'scale(0) translateX(0) rotate(0)' }),
366
- JIGGLE_ANIMATION
367
- ]),
368
- transition('active => newError', [
369
- style({ transform: 'scale(1) translateX(0) rotate(0)' }),
370
- JIGGLE_ANIMATION
371
- ])
372
- ])
373
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorComponent, decorators: [{
375
- type: Component,
376
- args: [{ selector: 'risk-error-menu', animations: [
377
- trigger('buttonState', [
378
- state('inactive', style({ transform: 'translateX(0) scale(0)' })),
379
- state('active', style({ transform: 'translateX(0) scale(1)' })),
380
- state('newError', style({ transform: 'translateX(0) scale(1)' })),
381
- transition('void => active', [
382
- style({ transform: 'scale(0) translateX(0) rotate(0)' }),
383
- JIGGLE_ANIMATION
384
- ]),
385
- transition('void => newError', [
386
- style({ transform: 'scale(0) translateX(0) rotate(0)' }),
387
- JIGGLE_ANIMATION
388
- ]),
389
- transition('active => newError', [
390
- style({ transform: 'scale(1) translateX(0) rotate(0)' }),
391
- JIGGLE_ANIMATION
392
- ])
393
- ])
394
- ], host: {
395
- '[class.risk-error-menu]': 'true'
396
- }, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<button *ngIf=\"state != null\"\n mat-icon-button\n [color]=\"color\"\n type=\"button\"\n [@buttonState]=\"state\"\n (@buttonState.done)=\"animationDone($event)\"\n [matMenuTriggerFor]=\"errorMenu\"\n #errorMenuTrigger=\"matMenuTrigger\"\n (menuOpened)=\"menuOpened()\"\n (menuClosed)=\"menuClosed()\"\n [class.risk-menu-open]=\"errorMenuTrigger.menuOpen\">\n <mat-icon>error_outline</mat-icon>\n</button>\n\n<mat-menu #errorMenu=\"matMenu\"\n class=\"risk-error-menu-mat-menu\"\n [overlapTrigger]=\"false\">\n <risk-error-message *ngFor=\"let error of errors; last as isLast\"\n [error]=\"error\"\n (click)=\"keepVisibleOnClick ? $event.stopPropagation() : null\"\n [isLast]=\"isLast\"></risk-error-message>\n</mat-menu>\n", styles: [":host{display:block;padding:0;margin:0}:host>*{vertical-align:bottom}\n", "::ng-deep .risk-error-menu-mat-menu{max-width:600px!important}\n"] }]
397
- }], ctorParameters: function () { return [{ type: ErrorCollectorService }, { type: undefined, decorators: [{
398
- type: Optional
399
- }, {
400
- type: Inject,
401
- args: [AUTH_PROVIDER]
402
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { keepVisibleOnClick: [{
403
- type: Input
404
- }], errorMessages: [{
405
- type: ViewChildren,
406
- args: [ErrorMessageComponent]
407
- }] } });
408
-
409
- class ErrorModule {
410
- }
411
- ErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
412
- ErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorModule, declarations: [ErrorComponent,
413
- ErrorMessageComponent], imports: [CommonModule,
414
- CommonViewModule], exports: [ErrorComponent] });
415
- ErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorModule, providers: [
416
- ErrorCollectorService,
417
- {
418
- provide: ErrorHandler,
419
- useExisting: ErrorCollectorService
420
- }
421
- ], imports: [[
422
- CommonModule,
423
- CommonViewModule
424
- ]] });
425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ErrorModule, decorators: [{
426
- type: NgModule,
427
- args: [{
428
- imports: [
429
- CommonModule,
430
- CommonViewModule
431
- ],
432
- exports: [
433
- ErrorComponent
434
- ],
435
- declarations: [
436
- ErrorComponent,
437
- ErrorMessageComponent
438
- ],
439
- providers: [
440
- ErrorCollectorService,
441
- {
442
- provide: ErrorHandler,
443
- useExisting: ErrorCollectorService
444
- }
445
- ]
446
- }]
447
- }] });
448
-
449
- /**
450
- * Collects all error using error collector and returns the "otherwise" error instead.
451
- * @param errorCollector Error collector service.
452
- * @param otherwise Value to be returned in case of error.
453
- */
454
- function collectErrors(errorCollector, otherwise) {
455
- return (source) => source.pipe(catchError((err) => errorCollector.handleStreamError(err)), defaultIfEmpty(otherwise));
456
- }
457
-
458
- /**
459
- * Generated bundle index. Do not edit.
460
- */
461
-
462
- export { ErrorCollectorService, ErrorComponent, ErrorModule, JIGGLE_ANIMATION, collectErrors, toErrorMessage };
463
- //# sourceMappingURL=dbg-riskit-angular-error.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dbg-riskit-angular-error.mjs","sources":["../../../../pkg/dbg-riskit/angular-error/src/lib/error.collector.ts","../../../../pkg/dbg-riskit/angular-error/src/lib/error.message.component.ts","../../../../pkg/dbg-riskit/angular-error/src/lib/error.message.component.html","../../../../pkg/dbg-riskit/angular-error/src/lib/error.message.wrapper.ts","../../../../pkg/dbg-riskit/angular-error/src/lib/error.menu.component.ts","../../../../pkg/dbg-riskit/angular-error/src/lib/error.menu.component.html","../../../../pkg/dbg-riskit/angular-error/src/lib/error.module.ts","../../../../pkg/dbg-riskit/angular-error/src/lib/rxjs.utils.ts","../../../../pkg/dbg-riskit/angular-error/src/dbg-riskit-angular-error.ts"],"sourcesContent":["import {ErrorHandler, Inject, Injectable, Optional} from '@angular/core';\nimport {AUTH_PROVIDER} from '@dbg-riskit/angular-common';\nimport {AuthProvider, ErrorMessage, ErrorType, toString} from '@dbg-riskit/common';\nimport {EMPTY, Observable, ReplaySubject} from 'rxjs';\n\nexport type ErrorTypes = ErrorMessage | Error | object | string;\n\nexport function toErrorMessage(err: ErrorTypes): ErrorMessage {\n let errorMessage: ErrorMessage;\n if ('errorType' in (err as ErrorMessage)) {\n errorMessage = err as ErrorMessage;\n } else {\n if ('message' in (err as Error)) {\n err = (err as Error).message || toString(err);\n } else {\n err = toString(err);\n }\n errorMessage = {\n message : err,\n status : 0,\n errorType: ErrorType.ERROR\n };\n }\n return errorMessage;\n}\n\n@Injectable()\nexport class ErrorCollectorService extends ErrorHandler {\n\n private _errorObservable: ReplaySubject<ErrorMessage> = new ReplaySubject(10);\n\n public constructor(@Optional() @Inject(AUTH_PROVIDER) authProvider: AuthProvider) {\n super();\n if (authProvider) {\n authProvider.loggedInStream.subscribe((auth: boolean) => {\n this._errorObservable = new ReplaySubject(10);\n });\n }\n }\n\n public error(err: ErrorMessage) {\n this._errorObservable.next(err);\n }\n\n public get errorStream(): Observable<ErrorMessage> {\n return this._errorObservable.asObservable();\n }\n\n public handleError(err: ErrorTypes): void {\n try {\n super.handleError(err);\n } finally {\n this.error(toErrorMessage(err));\n }\n }\n\n public handleStreamError<T>(err: ErrorTypes): Observable<T> {\n this.handleError(err);\n return EMPTY;\n }\n}\n","import {animate, AnimationEvent, keyframes, state, style, transition, trigger} from '@angular/animations';\nimport {ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Input} from '@angular/core';\nimport {DATE_FORMAT} from '@dbg-riskit/angular-common';\nimport {ErrorMessageWrapper} from './error.message.wrapper';\n\n@Component({\n selector : 'risk-error-message',\n templateUrl: 'error.message.component.html',\n styleUrls : [\n '../../../component.scss',\n 'error.message.component.scss'\n ],\n animations : [\n trigger('readState', [\n state('read', style({background: 'transparent'})),\n transition(':enter', [\n style({\n height : 0,\n transform: 'scale(0)'\n }),\n animate('200ms ease-in', style({\n height : '*',\n transform: 'scale(1)'\n }))\n ]),\n transition('* => read', [\n style({\n background: 'transparent'\n }),\n animate('1500ms', keyframes([\n style({\n background: 'rgba(204, 51, 51, .5)',\n offset : 0.25\n }),\n style({\n background: 'transparent',\n offset : 0.5\n }),\n style({\n background: 'rgba(204, 51, 51, .5)',\n offset : 0.75\n }),\n style({\n background: 'transparent',\n offset : 1\n })\n ]))\n ])\n ])\n ],\n host : {\n '[class.risk-error-message]': 'true'\n },\n changeDetection : ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false\n})\nexport class ErrorMessageComponent {\n\n public readState: 'read' | null = null;\n\n @Input()\n public error?: ErrorMessageWrapper;\n\n @Input()\n public isLast = false;\n\n public constructor(@Inject(DATE_FORMAT) public readonly dateFormat: string,\n private readonly changeDetectorRef: ChangeDetectorRef) {\n }\n\n public animate(): void {\n if (this.error != null && !this.error.read && this.readState !== 'read') {\n setTimeout(() => {\n this.readState = 'read';\n this.changeDetectorRef.markForCheck();\n });\n }\n }\n\n public markRead(event: AnimationEvent): void {\n if (this.error != null && event.toState === 'read') {\n this.error.markRead();\n this.changeDetectorRef.markForCheck();\n }\n }\n}\n","<mat-card [class.risk-error-message-last]=\"isLast\" [@readState]=\"readState\" (@readState.done)=\"markRead($event)\">\n <mat-card-header>\n <mat-icon color=\"warn\" mat-card-avatar>error_outline</mat-icon>\n <mat-card-title *ngIf=\"error?.type.isNetworkError()\">Network error</mat-card-title>\n <mat-card-title *ngIf=\"error?.type.isRequestError()\">API error</mat-card-title>\n <mat-card-title *ngIf=\"error?.type.isAuthError()\">Authorization error</mat-card-title>\n <mat-card-title\n *ngIf=\"!error?.type.isNetworkError() && !error?.type.isRequestError() && !error?.type.isAuthError()\">\n General error\n </mat-card-title>\n <mat-card-subtitle>{{error?.date | date:dateFormat}}</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <p *ngIf=\"error?.statusCode\" class=\"risk-error-message-code\">Error code: {{error?.statusCode}}</p>\n <p>\n {{error?.message}}\n </p>\n </mat-card-content>\n</mat-card>\n","import {EventEmitter} from '@angular/core';\n\nimport {ErrorMessage, ErrorType} from '@dbg-riskit/common';\n\nexport class ErrorMessageWrapper {\n private readonly _error: ErrorMessage;\n private readonly _date: Date = new Date();\n private _read = false;\n\n public readonly readStateChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n public constructor(error: ErrorMessage) {\n this._error = error;\n }\n\n public get message(): string {\n return this._error.message;\n }\n\n public get type(): ErrorType {\n return this._error.errorType;\n }\n\n public get statusCode(): number {\n return this._error.status;\n }\n\n public get date(): Date {\n return this._date;\n }\n\n public get read(): boolean {\n return this._read;\n }\n\n public markRead(): void {\n if (!this._read) {\n this._read = true;\n this.readStateChanged.emit(this._read);\n this.readStateChanged.complete();\n }\n }\n}\n","import {\n animate,\n AnimationAnimateMetadata,\n AnimationEvent,\n keyframes,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n Optional,\n QueryList,\n ViewChildren,\n Input\n} from '@angular/core';\nimport {AUTH_PROVIDER, MatColorTheme} from '@dbg-riskit/angular-common';\nimport {BaseComponent} from '@dbg-riskit/angular-view';\nimport {AuthProvider, ErrorMessage} from '@dbg-riskit/common';\nimport {merge, Observable, Subject, timer} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\nimport {ErrorCollectorService} from './error.collector';\nimport {ErrorMessageComponent} from './error.message.component';\nimport {ErrorMessageWrapper} from './error.message.wrapper';\n\nexport const JIGGLE_ANIMATION: AnimationAnimateMetadata = animate('1s ease-in', keyframes([\n style({\n transform: 'scale(0.8) translateX(-1px) rotate(0)',\n offset : 0.1\n }),\n style({\n transform: 'scale(1) translateX(2px) rotate(4deg)',\n offset : 0.2\n }),\n style({\n transform: 'scale(1.2) translateX(-4px) rotate(0)',\n offset : 0.3\n }),\n style({\n transform: 'scale(1.5) translateX(4px) rotate(0)',\n offset : 0.4\n }),\n style({\n transform: 'scale(1.5) translateX(-4px) rotate(-8deg)',\n offset : 0.5\n }),\n style({\n transform: 'scale(1.5) translateX(4px) rotate(0)',\n offset : 0.6\n }),\n style({\n transform: 'scale(1.2) translateX(-4px) rotate(0)',\n offset : 0.7\n }),\n style({\n transform: 'scale(1) translateX(2px) rotate(4deg)',\n offset : 0.8\n }),\n style({\n transform: 'scale(1) translateX(-1px) rotate(0)',\n offset : 0.9\n })\n]));\n\n@Component({\n selector : 'risk-error-menu',\n templateUrl : 'error.menu.component.html',\n styleUrls : [\n '../../../component.scss',\n 'error.menu.component.scss'\n ],\n animations : [\n trigger('buttonState', [\n state('inactive', style({transform: 'translateX(0) scale(0)'})),\n state('active', style({transform: 'translateX(0) scale(1)'})),\n state('newError', style({transform: 'translateX(0) scale(1)'})),\n transition('void => active', [\n style({transform: 'scale(0) translateX(0) rotate(0)'}),\n JIGGLE_ANIMATION\n ]),\n transition('void => newError', [\n style({transform: 'scale(0) translateX(0) rotate(0)'}),\n JIGGLE_ANIMATION\n ]),\n transition('active => newError', [\n style({transform: 'scale(1) translateX(0) rotate(0)'}),\n JIGGLE_ANIMATION\n ])\n ])\n ],\n host : {\n '[class.risk-error-menu]': 'true'\n },\n changeDetection : ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false\n})\nexport class ErrorComponent extends BaseComponent implements OnInit {\n\n public state: 'active' | 'newError' | null = null;\n\n @Input() public keepVisibleOnClick?: boolean;\n\n private readonly _errors: ErrorMessageWrapper[] = [];\n\n private readonly _menuState: Subject<boolean> = new Subject();\n\n @ViewChildren(ErrorMessageComponent)\n public errorMessages?: QueryList<ErrorMessageComponent>;\n\n public constructor(private readonly errorCollector: ErrorCollectorService,\n @Optional() @Inject(AUTH_PROVIDER) private readonly authProvider: AuthProvider,\n private readonly changeDetectorRef: ChangeDetectorRef) {\n super();\n }\n\n public ngOnInit(): void {\n // Init Jiggle animation loop\n this.initAnimation();\n\n // Subscribe to error stream\n this.subscribeToErrors();\n\n // Once opened animate messages and set as read after animation\n this._menuState.pipe(\n filter((opened: boolean) => opened),\n takeUntil(this.destroyed)\n ).subscribe(() => this.animateOnMenuOpened());\n\n // Refresh on \"logged-in\" state changes\n if (this.authProvider) {\n this.authProvider.loggedInStream.pipe(\n takeUntil(this.destroyed)\n ).subscribe((auth: boolean) => this.loggedInChanged(auth));\n }\n }\n\n private animateOnMenuOpened() {\n const animateMessages = () => this.errorMessages!.forEach(\n (message: ErrorMessageComponent) => message.animate());\n animateMessages();\n this.errorMessages!.changes.pipe(\n takeUntil(merge(this.destroyed, this._menuState))\n ).subscribe(() => animateMessages());\n }\n\n private loggedInChanged(auth: boolean) {\n // Subscribe to errors once logged in again\n if (auth) {\n this.subscribeToErrors();\n } else {\n while (this._errors.length > 0) {\n this._errors.pop();\n }\n }\n this.changeDetectorRef.markForCheck();\n }\n\n private subscribeToErrors() {\n let until: Observable<void> = this.destroyed;\n // Stop receiving errors once user was logged out\n if (this.authProvider) {\n until = merge(\n until,\n this.authProvider.loggedInStream.pipe(\n filter((auth: boolean) => !auth),\n map(() => undefined)\n )\n );\n }\n this.errorCollector.errorStream.pipe(\n takeUntil(until)\n ).subscribe((error: ErrorMessage) => this.errorReceived(error, until));\n }\n\n private errorReceived(error: ErrorMessage, until: Observable<unknown>) {\n const errorMessageWrapper = new ErrorMessageWrapper(error);\n\n // Subscribe for state changes\n errorMessageWrapper.readStateChanged.pipe(\n takeUntil(until)\n ).subscribe(() => this.changeDetectorRef.detectChanges());\n\n this._errors.unshift(errorMessageWrapper);\n while (this._errors.length > 10) {\n this._errors.pop();\n }\n\n this.changeDetectorRef.markForCheck();\n }\n\n public get color(): MatColorTheme {\n if (this.errors.some((error: ErrorMessageWrapper) => !error.read)) {\n return 'warn';\n }\n return null;\n }\n\n public menuOpened(): void {\n this._menuState.next(true);\n }\n\n public menuClosed(): void {\n this._menuState.next(false);\n }\n\n public get errors(): ErrorMessageWrapper[] {\n return this._errors;\n }\n\n // <editor-fold desc=\"Animation control\" defaultstate=\"collapsed\">\n public animationDone(event: AnimationEvent): void {\n if (event.toState === 'newError') {\n // Reset after annimation\n this.state = 'active';\n\n // Called from animation controller we need to re-check\n this.changeDetectorRef.markForCheck();\n }\n }\n\n private initAnimation(): void {\n timer(100, 2000).pipe(\n // Run animation everytime we have non-read errors\n filter(() => this.errors.some((error: ErrorMessageWrapper) => !error.read)),\n takeUntil(this.destroyed)\n ).subscribe(() => {\n switch (this.state) {\n case null:\n this.state = 'active';\n break;\n case 'active':\n this.state = 'newError';\n break;\n }\n this.changeDetectorRef.markForCheck();\n });\n }\n\n // </editor-fold>\n}\n","<button *ngIf=\"state != null\"\n mat-icon-button\n [color]=\"color\"\n type=\"button\"\n [@buttonState]=\"state\"\n (@buttonState.done)=\"animationDone($event)\"\n [matMenuTriggerFor]=\"errorMenu\"\n #errorMenuTrigger=\"matMenuTrigger\"\n (menuOpened)=\"menuOpened()\"\n (menuClosed)=\"menuClosed()\"\n [class.risk-menu-open]=\"errorMenuTrigger.menuOpen\">\n <mat-icon>error_outline</mat-icon>\n</button>\n\n<mat-menu #errorMenu=\"matMenu\"\n class=\"risk-error-menu-mat-menu\"\n [overlapTrigger]=\"false\">\n <risk-error-message *ngFor=\"let error of errors; last as isLast\"\n [error]=\"error\"\n (click)=\"keepVisibleOnClick ? $event.stopPropagation() : null\"\n [isLast]=\"isLast\"></risk-error-message>\n</mat-menu>\n","import {CommonModule} from '@angular/common';\nimport {ErrorHandler, NgModule} from '@angular/core';\nimport {CommonViewModule} from '@dbg-riskit/angular-view';\nimport {ErrorCollectorService} from './error.collector';\nimport {ErrorComponent} from './error.menu.component';\nimport {ErrorMessageComponent} from './error.message.component';\n\n@NgModule({\n imports : [\n CommonModule,\n CommonViewModule\n ],\n exports : [\n ErrorComponent\n ],\n declarations: [\n ErrorComponent,\n ErrorMessageComponent\n ],\n providers : [\n ErrorCollectorService,\n {\n provide : ErrorHandler,\n useExisting: ErrorCollectorService\n }\n ]\n})\nexport class ErrorModule {\n}\n","import {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {catchError, defaultIfEmpty} from 'rxjs/operators';\nimport {ErrorCollectorService} from './error.collector';\n\n/**\n * Collects all error using error collector and returns the \"otherwise\" error instead.\n * @param errorCollector Error collector service.\n * @param otherwise Value to be returned in case of error.\n */\nexport function collectErrors<T>(errorCollector: ErrorCollectorService, otherwise: T): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>) => source.pipe(\n catchError((err) => errorCollector.handleStreamError<T>(err)),\n defaultIfEmpty(otherwise)\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i2","i3","i5.ErrorMessageComponent","i6"],"mappings":";;;;;;;;;;;;;;;AAOM,SAAU,cAAc,CAAC,GAAe,EAAA;AAC1C,IAAA,IAAI,YAA0B,CAAC;IAC/B,IAAI,WAAW,IAAK,GAAoB,EAAE;QACtC,YAAY,GAAG,GAAmB,CAAC;AACtC,KAAA;AAAM,SAAA;QACH,IAAI,SAAS,IAAK,GAAa,EAAE;YAC7B,GAAG,GAAI,GAAa,CAAC,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjD,SAAA;AAAM,aAAA;AACH,YAAA,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvB,SAAA;AACD,QAAA,YAAY,GAAG;AACX,YAAA,OAAO,EAAI,GAAG;AACd,YAAA,MAAM,EAAK,CAAC;YACZ,SAAS,EAAE,SAAS,CAAC,KAAK;SAC7B,CAAC;AACL,KAAA;AACD,IAAA,OAAO,YAAY,CAAC;AACxB,CAAC;AAGK,MAAO,qBAAsB,SAAQ,YAAY,CAAA;AAInD,IAAA,WAAA,CAAsD,YAA0B,EAAA;AAC5E,QAAA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C,EAC7D,cAAc,CAAC,SAAS,CAAC,CAC5B,CAAC;AACN;;ACdA;;AAEG;;;;"}
@@ -1,16 +0,0 @@
1
- import { ErrorHandler } from '@angular/core';
2
- import { AuthProvider, ErrorMessage } from '@dbg-riskit/common';
3
- import { Observable } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare type ErrorTypes = ErrorMessage | Error | object | string;
6
- export declare function toErrorMessage(err: ErrorTypes): ErrorMessage;
7
- export declare class ErrorCollectorService extends ErrorHandler {
8
- private _errorObservable;
9
- constructor(authProvider: AuthProvider);
10
- error(err: ErrorMessage): void;
11
- get errorStream(): Observable<ErrorMessage>;
12
- handleError(err: ErrorTypes): void;
13
- handleStreamError<T>(err: ErrorTypes): Observable<T>;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorCollectorService, [{ optional: true; }]>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<ErrorCollectorService>;
16
- }
@@ -1,34 +0,0 @@
1
- import { AnimationAnimateMetadata, AnimationEvent } from '@angular/animations';
2
- import { ChangeDetectorRef, OnInit, QueryList } from '@angular/core';
3
- import { MatColorTheme } from '@dbg-riskit/angular-common';
4
- import { BaseComponent } from '@dbg-riskit/angular-view';
5
- import { AuthProvider } from '@dbg-riskit/common';
6
- import { ErrorCollectorService } from './error.collector';
7
- import { ErrorMessageComponent } from './error.message.component';
8
- import { ErrorMessageWrapper } from './error.message.wrapper';
9
- import * as i0 from "@angular/core";
10
- export declare const JIGGLE_ANIMATION: AnimationAnimateMetadata;
11
- export declare class ErrorComponent extends BaseComponent implements OnInit {
12
- private readonly errorCollector;
13
- private readonly authProvider;
14
- private readonly changeDetectorRef;
15
- state: 'active' | 'newError' | null;
16
- keepVisibleOnClick?: boolean;
17
- private readonly _errors;
18
- private readonly _menuState;
19
- errorMessages?: QueryList<ErrorMessageComponent>;
20
- constructor(errorCollector: ErrorCollectorService, authProvider: AuthProvider, changeDetectorRef: ChangeDetectorRef);
21
- ngOnInit(): void;
22
- private animateOnMenuOpened;
23
- private loggedInChanged;
24
- private subscribeToErrors;
25
- private errorReceived;
26
- get color(): MatColorTheme;
27
- menuOpened(): void;
28
- menuClosed(): void;
29
- get errors(): ErrorMessageWrapper[];
30
- animationDone(event: AnimationEvent): void;
31
- private initAnimation;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponent, [null, { optional: true; }, null]>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "risk-error-menu", never, { "keepVisibleOnClick": "keepVisibleOnClick"; }, {}, never, never>;
34
- }
@@ -1,16 +0,0 @@
1
- import { AnimationEvent } from '@angular/animations';
2
- import { ChangeDetectorRef } from '@angular/core';
3
- import { ErrorMessageWrapper } from './error.message.wrapper';
4
- import * as i0 from "@angular/core";
5
- export declare class ErrorMessageComponent {
6
- readonly dateFormat: string;
7
- private readonly changeDetectorRef;
8
- readState: 'read' | null;
9
- error?: ErrorMessageWrapper;
10
- isLast: boolean;
11
- constructor(dateFormat: string, changeDetectorRef: ChangeDetectorRef);
12
- animate(): void;
13
- markRead(event: AnimationEvent): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMessageComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorMessageComponent, "risk-error-message", never, { "error": "error"; "isLast": "isLast"; }, {}, never, never>;
16
- }
@@ -1,15 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { ErrorMessage, ErrorType } from '@dbg-riskit/common';
3
- export declare class ErrorMessageWrapper {
4
- private readonly _error;
5
- private readonly _date;
6
- private _read;
7
- readonly readStateChanged: EventEmitter<boolean>;
8
- constructor(error: ErrorMessage);
9
- get message(): string;
10
- get type(): ErrorType;
11
- get statusCode(): number;
12
- get date(): Date;
13
- get read(): boolean;
14
- markRead(): void;
15
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./error.menu.component";
3
- import * as i2 from "./error.message.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@dbg-riskit/angular-view";
6
- export declare class ErrorModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<ErrorModule, [typeof i1.ErrorComponent, typeof i2.ErrorMessageComponent], [typeof i3.CommonModule, typeof i4.CommonViewModule], [typeof i1.ErrorComponent]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<ErrorModule>;
10
- }