@rxap/ngx-error 21.0.1 → 22.0.0-dev.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.
- package/CHANGELOG.md +10 -0
- package/compodoc/changelog.html +9 -0
- package/compodoc/dependencies.html +10 -10
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +226 -226
- package/docs/html/classes/AngularErrorComponent.html +2 -2
- package/docs/html/classes/AngularErrorService.html +2 -2
- package/docs/html/classes/AnyHttpErrorComponent.html +2 -2
- package/docs/html/classes/AnyHttpErrorService.html +2 -2
- package/docs/html/classes/CodeHttpErrorComponent.html +2 -2
- package/docs/html/classes/CodeHttpErrorService.html +2 -2
- package/docs/html/classes/ErrorCaptureDialogService.html +2 -2
- package/docs/html/classes/ErrorCaptureService.html +2 -2
- package/docs/html/classes/ErrorDialogComponent.html +2 -2
- package/docs/html/classes/MessageHttpErrorComponent.html +2 -2
- package/docs/html/classes/MessageHttpErrorService.html +2 -2
- package/docs/html/classes/OpenApiHttpResponseErrorComponent.html +2 -2
- package/docs/html/classes/OpenApiHttpResponseErrorService.html +2 -2
- package/docs/html/classes/RxapErrorHandler.html +3 -3
- package/docs/html/functions/DefaultErrorCodeExtractor.html +1 -1
- package/docs/html/functions/DefaultErrorFilter.html +1 -1
- package/docs/html/functions/ExtractContextFromError.html +1 -1
- package/docs/html/functions/ExtractError.html +1 -1
- package/docs/html/functions/ExtractExtraFromError.html +1 -1
- package/docs/html/functions/ExtractTagsFromError.html +1 -1
- package/docs/html/functions/HttpErrorInterceptor.html +1 -1
- package/docs/html/functions/PrintError.html +1 -1
- package/docs/html/functions/ProvideErrorHandler.html +2 -2
- package/docs/html/functions/SimplifyHttpErrorResponse.html +1 -1
- package/docs/html/functions/provideAutoErrorInterception.html +1 -1
- package/docs/html/functions/withErrorCaptureDialogDisabledIf.html +1 -1
- package/docs/html/functions/withErrorCaptureDialogService.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AngularErrorDialogData.html +2 -2
- package/docs/html/interfaces/AnyHttpErrorDialogData.html +8 -8
- package/docs/html/interfaces/CodeHttpErrorDialogData.html +8 -8
- package/docs/html/interfaces/ErrorHandlerOptions.html +2 -2
- package/docs/html/interfaces/ErrorInterceptorOptions.html +2 -2
- package/docs/html/interfaces/IErrorCaptureDialogService.html +2 -2
- package/docs/html/interfaces/IErrorDialogComponent.html +2 -2
- package/docs/html/interfaces/MessageHttpErrorDialogData.html +8 -8
- package/docs/html/interfaces/OpenApiHttpResponseErrorDialogData.html +8 -8
- package/docs/html/interfaces/SimplifiedHttpErrorResponse.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/RXAP_ERROR_CAPTURE_DIALOG_SERVICE.html +1 -1
- package/docs/html/variables/RXAP_ERROR_DIALOG_COMPONENT.html +1 -1
- package/docs/html/variables/RXAP_ERROR_DIALOG_DATA.html +1 -1
- package/docs/html/variables/RXAP_ERROR_DIALOG_DISABLED.html +1 -1
- package/docs/html/variables/RXAP_ERROR_DIALOG_ERROR.html +1 -1
- package/docs/html/variables/RXAP_ERROR_HANDLER_OPTIONS.html +1 -1
- package/docs/html/variables/RXAP_ERROR_INTERCEPTOR_OPTIONS.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AngularErrorComponent.md +6 -6
- package/docs/markdown/classes/AngularErrorService.md +5 -5
- package/docs/markdown/classes/AnyHttpErrorComponent.md +4 -4
- package/docs/markdown/classes/AnyHttpErrorService.md +5 -5
- package/docs/markdown/classes/CodeHttpErrorComponent.md +5 -5
- package/docs/markdown/classes/CodeHttpErrorService.md +5 -5
- package/docs/markdown/classes/ErrorCaptureDialogService.md +6 -6
- package/docs/markdown/classes/ErrorCaptureService.md +5 -5
- package/docs/markdown/classes/ErrorDialogComponent.md +10 -10
- package/docs/markdown/classes/MessageHttpErrorComponent.md +5 -5
- package/docs/markdown/classes/MessageHttpErrorService.md +5 -5
- package/docs/markdown/classes/OpenApiHttpResponseErrorComponent.md +4 -4
- package/docs/markdown/classes/OpenApiHttpResponseErrorService.md +5 -5
- package/docs/markdown/classes/RxapErrorHandler.md +7 -7
- package/docs/markdown/functions/DefaultErrorCodeExtractor.md +2 -2
- package/docs/markdown/functions/DefaultErrorFilter.md +2 -2
- package/docs/markdown/functions/ExtractContextFromError.md +2 -2
- package/docs/markdown/functions/ExtractError.md +2 -2
- package/docs/markdown/functions/ExtractExtraFromError.md +2 -2
- package/docs/markdown/functions/ExtractTagsFromError.md +2 -2
- package/docs/markdown/functions/HttpErrorInterceptor.md +2 -2
- package/docs/markdown/functions/PrintError.md +2 -2
- package/docs/markdown/functions/ProvideErrorHandler.md +2 -2
- package/docs/markdown/functions/SimplifyHttpErrorResponse.md +2 -2
- package/docs/markdown/functions/provideAutoErrorInterception.md +2 -2
- package/docs/markdown/functions/withErrorCaptureDialogDisabledIf.md +2 -2
- package/docs/markdown/functions/withErrorCaptureDialogService.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/AngularErrorDialogData.md +8 -8
- package/docs/markdown/interfaces/AnyHttpErrorDialogData.md +15 -15
- package/docs/markdown/interfaces/CodeHttpErrorDialogData.md +16 -16
- package/docs/markdown/interfaces/ErrorHandlerOptions.md +5 -5
- package/docs/markdown/interfaces/ErrorInterceptorOptions.md +4 -4
- package/docs/markdown/interfaces/IErrorCaptureDialogService.md +3 -3
- package/docs/markdown/interfaces/IErrorDialogComponent.md +3 -3
- package/docs/markdown/interfaces/MessageHttpErrorDialogData.md +15 -15
- package/docs/markdown/interfaces/OpenApiHttpResponseErrorDialogData.md +18 -18
- package/docs/markdown/interfaces/SimplifiedHttpErrorResponse.md +12 -12
- package/docs/markdown/variables/RXAP_ERROR_CAPTURE_DIALOG_SERVICE.md +2 -2
- package/docs/markdown/variables/RXAP_ERROR_DIALOG_COMPONENT.md +2 -2
- package/docs/markdown/variables/RXAP_ERROR_DIALOG_DATA.md +2 -2
- package/docs/markdown/variables/RXAP_ERROR_DIALOG_DISABLED.md +2 -2
- package/docs/markdown/variables/RXAP_ERROR_DIALOG_ERROR.md +2 -2
- package/docs/markdown/variables/RXAP_ERROR_HANDLER_OPTIONS.md +2 -2
- package/docs/markdown/variables/RXAP_ERROR_INTERCEPTOR_OPTIONS.md +2 -2
- package/docs/wiki/Class.AngularErrorComponent.md +5 -5
- package/docs/wiki/Class.AngularErrorService.md +4 -4
- package/docs/wiki/Class.AnyHttpErrorComponent.md +3 -3
- package/docs/wiki/Class.AnyHttpErrorService.md +4 -4
- package/docs/wiki/Class.CodeHttpErrorComponent.md +4 -4
- package/docs/wiki/Class.CodeHttpErrorService.md +4 -4
- package/docs/wiki/Class.ErrorCaptureDialogService.md +5 -5
- package/docs/wiki/Class.ErrorCaptureService.md +4 -4
- package/docs/wiki/Class.ErrorDialogComponent.md +9 -9
- package/docs/wiki/Class.MessageHttpErrorComponent.md +4 -4
- package/docs/wiki/Class.MessageHttpErrorService.md +4 -4
- package/docs/wiki/Class.OpenApiHttpResponseErrorComponent.md +3 -3
- package/docs/wiki/Class.OpenApiHttpResponseErrorService.md +4 -4
- package/docs/wiki/Class.RxapErrorHandler.md +6 -6
- package/docs/wiki/Function.DefaultErrorCodeExtractor.md +1 -1
- package/docs/wiki/Function.DefaultErrorFilter.md +1 -1
- package/docs/wiki/Function.ExtractContextFromError.md +1 -1
- package/docs/wiki/Function.ExtractError.md +1 -1
- package/docs/wiki/Function.ExtractExtraFromError.md +1 -1
- package/docs/wiki/Function.ExtractTagsFromError.md +1 -1
- package/docs/wiki/Function.HttpErrorInterceptor.md +1 -1
- package/docs/wiki/Function.PrintError.md +1 -1
- package/docs/wiki/Function.ProvideErrorHandler.md +1 -1
- package/docs/wiki/Function.SimplifyHttpErrorResponse.md +1 -1
- package/docs/wiki/Function.provideAutoErrorInterception.md +1 -1
- package/docs/wiki/Function.withErrorCaptureDialogDisabledIf.md +1 -1
- package/docs/wiki/Function.withErrorCaptureDialogService.md +1 -1
- package/docs/wiki/Interface.AngularErrorDialogData.md +7 -7
- package/docs/wiki/Interface.AnyHttpErrorDialogData.md +14 -14
- package/docs/wiki/Interface.CodeHttpErrorDialogData.md +15 -15
- package/docs/wiki/Interface.ErrorHandlerOptions.md +4 -4
- package/docs/wiki/Interface.ErrorInterceptorOptions.md +3 -3
- package/docs/wiki/Interface.IErrorCaptureDialogService.md +2 -2
- package/docs/wiki/Interface.IErrorDialogComponent.md +2 -2
- package/docs/wiki/Interface.MessageHttpErrorDialogData.md +14 -14
- package/docs/wiki/Interface.OpenApiHttpResponseErrorDialogData.md +17 -17
- package/docs/wiki/Interface.SimplifiedHttpErrorResponse.md +11 -11
- package/docs/wiki/Variable.RXAP_ERROR_CAPTURE_DIALOG_SERVICE.md +1 -1
- package/docs/wiki/Variable.RXAP_ERROR_DIALOG_COMPONENT.md +1 -1
- package/docs/wiki/Variable.RXAP_ERROR_DIALOG_DATA.md +1 -1
- package/docs/wiki/Variable.RXAP_ERROR_DIALOG_DISABLED.md +1 -1
- package/docs/wiki/Variable.RXAP_ERROR_DIALOG_ERROR.md +1 -1
- package/docs/wiki/Variable.RXAP_ERROR_HANDLER_OPTIONS.md +1 -1
- package/docs/wiki/Variable.RXAP_ERROR_INTERCEPTOR_OPTIONS.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-ngx-error.mjs +821 -285
- package/fesm2022/rxap-ngx-error.mjs.map +1 -1
- package/package.json +31 -31
- package/types/rxap-ngx-error.d.ts +229 -251
|
@@ -1,54 +1,159 @@
|
|
|
1
|
-
import * as i1 from
|
|
2
|
-
import { CommonModule,
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import { CopyToClipboardComponent, JsonViewerComponent } from
|
|
6
|
-
import { DataGridCellDefDirective, DataGridComponent,
|
|
7
|
-
import {
|
|
8
|
-
import { outputToObservable } from
|
|
9
|
-
import { EMPTY, Observable,
|
|
10
|
-
import { tap } from
|
|
11
|
-
import * as i1
|
|
12
|
-
import { ComponentPortal, PortalModule } from
|
|
13
|
-
import { __decorate } from
|
|
14
|
-
import { HttpErrorResponse } from
|
|
15
|
-
import { ConfigService } from
|
|
16
|
-
import { OpenApiHttpResponseError } from
|
|
17
|
-
import * as Sentry from
|
|
18
|
-
const RXAP_ERROR_DIALOG_DATA = new InjectionToken(
|
|
19
|
-
const RXAP_ERROR_DIALOG_ERROR = new InjectionToken(
|
|
20
|
-
const RXAP_ERROR_DIALOG_COMPONENT = new InjectionToken(
|
|
21
|
-
const RXAP_ERROR_INTERCEPTOR_OPTIONS = new InjectionToken(
|
|
22
|
-
const RXAP_ERROR_CAPTURE_DIALOG_SERVICE = new InjectionToken(
|
|
23
|
-
const RXAP_ERROR_DIALOG_DISABLED = new InjectionToken(
|
|
24
|
-
providedIn:
|
|
25
|
-
factory: () => false
|
|
1
|
+
import * as i1$1 from "@angular/common";
|
|
2
|
+
import { CommonModule, DatePipe, JsonPipe, KeyValuePipe, NgClass } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ApplicationRef, ChangeDetectionStrategy, Component, DOCUMENT, ErrorHandler, INJECTOR, Injectable, InjectionToken, Injector, afterNextRender, computed, createComponent, inject, isDevMode, output, runInInjectionContext, signal, viewChild } from "@angular/core";
|
|
5
|
+
import { CopyToClipboardComponent, JsonViewerComponent } from "@rxap/components";
|
|
6
|
+
import { DataGridCellDefDirective, DataGridComponent, DataGridHeaderCellDefDirective, DataGridRowDefDirective } from "@rxap/data-grid";
|
|
7
|
+
import { IsNotReleaseVersion, RXAP_ENVIRONMENT } from "@rxap/environment";
|
|
8
|
+
import { outputToObservable } from "@angular/core/rxjs-interop";
|
|
9
|
+
import { EMPTY, Observable, finalize, take } from "rxjs";
|
|
10
|
+
import { tap } from "rxjs/operators";
|
|
11
|
+
import * as i1 from "@angular/cdk/portal";
|
|
12
|
+
import { ComponentPortal, PortalModule } from "@angular/cdk/portal";
|
|
13
|
+
import { __decorate } from "tslib";
|
|
14
|
+
import { HttpErrorResponse } from "@angular/common/http";
|
|
15
|
+
import { ConfigService } from "@rxap/config";
|
|
16
|
+
import { OpenApiHttpResponseError } from "@rxap/open-api";
|
|
17
|
+
import * as Sentry from "@sentry/angular";
|
|
18
|
+
const RXAP_ERROR_DIALOG_DATA = new InjectionToken("rxap/error/dialog-data");
|
|
19
|
+
const RXAP_ERROR_DIALOG_ERROR = new InjectionToken("rxap/error/dialog-error");
|
|
20
|
+
const RXAP_ERROR_DIALOG_COMPONENT = new InjectionToken("rxap/error/dialog-component");
|
|
21
|
+
const RXAP_ERROR_INTERCEPTOR_OPTIONS = new InjectionToken("rxap/error/interceptor-options");
|
|
22
|
+
const RXAP_ERROR_CAPTURE_DIALOG_SERVICE = new InjectionToken("rxap/error/capture-dialog-service");
|
|
23
|
+
const RXAP_ERROR_DIALOG_DISABLED = new InjectionToken("rxap/error/dialog-disabled", {
|
|
24
|
+
providedIn: "root",
|
|
25
|
+
factory: () => false
|
|
26
26
|
});
|
|
27
|
-
class OpenApiHttpResponseErrorComponent {
|
|
27
|
+
var OpenApiHttpResponseErrorComponent = class OpenApiHttpResponseErrorComponent {
|
|
28
28
|
constructor() {
|
|
29
29
|
this.isProduction = inject(RXAP_ENVIRONMENT, { optional: true })?.production ?? false;
|
|
30
30
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
31
31
|
}
|
|
32
|
-
static {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
static {
|
|
33
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
34
|
+
minVersion: "12.0.0",
|
|
35
|
+
version: "22.3.0",
|
|
36
|
+
ngImport: i0,
|
|
37
|
+
type: OpenApiHttpResponseErrorComponent,
|
|
38
|
+
deps: [],
|
|
39
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
static {
|
|
43
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
44
|
+
minVersion: "17.0.0",
|
|
45
|
+
version: "22.3.0",
|
|
46
|
+
type: OpenApiHttpResponseErrorComponent,
|
|
47
|
+
isStandalone: true,
|
|
48
|
+
selector: "rxap-open-api-http-response-error",
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
template: "<rxap-data-grid [data]=\"error\">\n <ng-container rxapDataGridRowDef=\"name\"></ng-container>\n <ng-container rxapDataGridRowDef=\"timestamp\">\n <td *rxapDataGridCellDef=\"let value\">{{ value | date:'HH:mm:ss' }}</td>\n </ng-container>\n <ng-container rxapDataGridRowDef=\"method\"></ng-container>\n <ng-container rxapDataGridRowDef=\"url\"></ng-container>\n <ng-container rxapDataGridRowDef=\"status\"></ng-container>\n <ng-container rxapDataGridRowDef=\"statusText\"></ng-container>\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n <ng-container rxapDataGridRowDef=\"headers\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\">\n @for (entry of value | keyvalue; track entry) {\n <ng-container [rxapDataGridRowDef]=\"$any(entry.key)\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value.length > 1) {\n <ul>\n @for (item of value; track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n @if (value.length === 1) {\n {{ value[0] }}\n }\n @if (value.length === 0) {\n NONE\n }\n </td>\n </ng-container>\n }\n </rxap-data-grid>\n </td>\n </ng-container>\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"error\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Response Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"body\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Request Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n</rxap-data-grid>\n",
|
|
51
|
+
styles: [""],
|
|
52
|
+
dependencies: [
|
|
53
|
+
{
|
|
54
|
+
kind: "ngmodule",
|
|
55
|
+
type: CommonModule
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
kind: "component",
|
|
59
|
+
type: CopyToClipboardComponent,
|
|
60
|
+
selector: "rxap-copy-to-clipboard",
|
|
61
|
+
inputs: [
|
|
62
|
+
"active",
|
|
63
|
+
"disabled",
|
|
64
|
+
"value",
|
|
65
|
+
"containerClass",
|
|
66
|
+
"position"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "directive",
|
|
71
|
+
type: DataGridCellDefDirective,
|
|
72
|
+
selector: "[rxapDataGridCellDef]"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "component",
|
|
76
|
+
type: DataGridComponent,
|
|
77
|
+
selector: "rxap-data-grid",
|
|
78
|
+
inputs: [
|
|
79
|
+
"header",
|
|
80
|
+
"dataSource",
|
|
81
|
+
"viewer",
|
|
82
|
+
"data",
|
|
83
|
+
"displayProperties",
|
|
84
|
+
"hideEmptyProperties",
|
|
85
|
+
"mode"
|
|
86
|
+
],
|
|
87
|
+
outputs: ["editModeChange"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
kind: "directive",
|
|
91
|
+
type: DataGridRowDefDirective,
|
|
92
|
+
selector: "[rxapDataGridRowDef]",
|
|
93
|
+
inputs: [
|
|
94
|
+
"data",
|
|
95
|
+
"rxapDataGridRowDef",
|
|
96
|
+
"flip"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
kind: "component",
|
|
101
|
+
type: JsonViewerComponent,
|
|
102
|
+
selector: "rxap-json-viewer",
|
|
103
|
+
inputs: ["json", "expanded"]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
kind: "pipe",
|
|
107
|
+
type: i1$1.JsonPipe,
|
|
108
|
+
name: "json"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
kind: "pipe",
|
|
112
|
+
type: i1$1.DatePipe,
|
|
113
|
+
name: "date"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
kind: "pipe",
|
|
117
|
+
type: i1$1.KeyValuePipe,
|
|
118
|
+
name: "keyvalue"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
126
|
+
minVersion: "12.0.0",
|
|
127
|
+
version: "22.3.0",
|
|
128
|
+
ngImport: i0,
|
|
129
|
+
type: OpenApiHttpResponseErrorComponent,
|
|
130
|
+
decorators: [{
|
|
36
131
|
type: Component,
|
|
37
|
-
args: [{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
132
|
+
args: [{
|
|
133
|
+
selector: "rxap-open-api-http-response-error",
|
|
134
|
+
imports: [
|
|
135
|
+
CommonModule,
|
|
136
|
+
CopyToClipboardComponent,
|
|
137
|
+
DataGridCellDefDirective,
|
|
138
|
+
DataGridComponent,
|
|
139
|
+
DataGridRowDefDirective,
|
|
140
|
+
JsonViewerComponent
|
|
141
|
+
],
|
|
142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
143
|
+
template: "<rxap-data-grid [data]=\"error\">\n <ng-container rxapDataGridRowDef=\"name\"></ng-container>\n <ng-container rxapDataGridRowDef=\"timestamp\">\n <td *rxapDataGridCellDef=\"let value\">{{ value | date:'HH:mm:ss' }}</td>\n </ng-container>\n <ng-container rxapDataGridRowDef=\"method\"></ng-container>\n <ng-container rxapDataGridRowDef=\"url\"></ng-container>\n <ng-container rxapDataGridRowDef=\"status\"></ng-container>\n <ng-container rxapDataGridRowDef=\"statusText\"></ng-container>\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n <ng-container rxapDataGridRowDef=\"headers\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\">\n @for (entry of value | keyvalue; track entry) {\n <ng-container [rxapDataGridRowDef]=\"$any(entry.key)\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value.length > 1) {\n <ul>\n @for (item of value; track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n @if (value.length === 1) {\n {{ value[0] }}\n }\n @if (value.length === 0) {\n NONE\n }\n </td>\n </ng-container>\n }\n </rxap-data-grid>\n </td>\n </ng-container>\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"error\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Response Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"body\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Request Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n</rxap-data-grid>\n"
|
|
144
|
+
}]
|
|
145
|
+
}]
|
|
146
|
+
});
|
|
147
|
+
var ErrorDialogComponent = class ErrorDialogComponent {
|
|
43
148
|
constructor() {
|
|
44
|
-
this.dialog = viewChild.required(
|
|
149
|
+
this.dialog = viewChild.required("dialog", ...ngDevMode ? [{ debugName: "dialog" }] : /* istanbul ignore next */ []);
|
|
45
150
|
this.data = inject(RXAP_ERROR_DIALOG_DATA);
|
|
46
|
-
this.activeIndex = signal(0, ...
|
|
151
|
+
this.activeIndex = signal(0, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
47
152
|
this.displayedButtons = computed(() => {
|
|
48
153
|
const start = Math.max(0, this.activeIndex() - 2);
|
|
49
154
|
const end = Math.min(this.data().length, start + 5);
|
|
50
155
|
return Array.from({ length: end - start }, (_, i) => start + i);
|
|
51
|
-
}, ...
|
|
156
|
+
}, ...ngDevMode ? [{ debugName: "displayedButtons" }] : /* istanbul ignore next */ []);
|
|
52
157
|
this.closeDialog = output();
|
|
53
158
|
this.component = inject(RXAP_ERROR_DIALOG_COMPONENT);
|
|
54
159
|
this.injector = inject(INJECTOR);
|
|
@@ -57,32 +162,99 @@ class ErrorDialogComponent {
|
|
|
57
162
|
const data = this.data();
|
|
58
163
|
const injector = Injector.create({
|
|
59
164
|
parent: this.injector,
|
|
60
|
-
providers: [
|
|
61
|
-
{
|
|
165
|
+
providers: [{
|
|
62
166
|
provide: RXAP_ERROR_DIALOG_ERROR,
|
|
63
|
-
useValue: data[index]
|
|
64
|
-
}
|
|
65
|
-
],
|
|
167
|
+
useValue: data[index]
|
|
168
|
+
}]
|
|
66
169
|
});
|
|
67
170
|
return new ComponentPortal(this.component, null, injector);
|
|
68
|
-
}, ...
|
|
171
|
+
}, ...ngDevMode ? [{ debugName: "componentPortal" }] : /* istanbul ignore next */ []);
|
|
69
172
|
afterNextRender(() => this.dialog().nativeElement.showModal());
|
|
70
173
|
}
|
|
71
174
|
close() {
|
|
72
175
|
this.dialog().nativeElement.close();
|
|
73
176
|
this.closeDialog.emit();
|
|
74
177
|
}
|
|
75
|
-
static {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
178
|
+
static {
|
|
179
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
180
|
+
minVersion: "12.0.0",
|
|
181
|
+
version: "22.3.0",
|
|
182
|
+
ngImport: i0,
|
|
183
|
+
type: ErrorDialogComponent,
|
|
184
|
+
deps: [],
|
|
185
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
static {
|
|
189
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
190
|
+
minVersion: "17.0.0",
|
|
191
|
+
version: "22.3.0",
|
|
192
|
+
type: ErrorDialogComponent,
|
|
193
|
+
isStandalone: true,
|
|
194
|
+
selector: "rxap-error-dialog",
|
|
195
|
+
outputs: { closeDialog: "closeDialog" },
|
|
196
|
+
viewQueries: [{
|
|
197
|
+
propertyName: "dialog",
|
|
198
|
+
first: true,
|
|
199
|
+
predicate: ["dialog"],
|
|
200
|
+
descendants: true,
|
|
201
|
+
isSignal: true
|
|
202
|
+
}],
|
|
203
|
+
ngImport: i0,
|
|
204
|
+
template: "<dialog #dialog\n class=\"rounded overflow-auto drop-shadow-2xl bg-white text-black dark:bg-black dark:text-white flex flex-col gap-3 p-6\"\n style=\"max-width: 80vw; max-height: 80vh\">\n @if (data().length > 1) {\n <div class=\"controls flex justify-center space-x-2 mt-4\">\n @if (activeIndex() > 0) {\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150 rounded\">\n Previous\n </button>\n }\n @for (item of displayedButtons(); track item) {\n <button (click)=\"activeIndex.set(item)\"\n [ngClass]=\"{\n 'bg-primary-500': item === activeIndex(),\n 'bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150': item !== activeIndex()\n }\"\n class=\"px-4 py-2 rounded\">\n {{ item + 1 }}\n </button>\n }\n @if (activeIndex() < data().length - 1) {\n <button\n (click)=\"activeIndex.set(activeIndex() + 1)\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150 rounded\">\n Next\n </button>\n }\n </div>\n }\n <div class=\"flex flex-col overflow-auto\">\n <ng-template [cdkPortalOutlet]=\"componentPortal()\"></ng-template>\n </div>\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>close</button>\n</dialog>\n",
|
|
205
|
+
styles: ["dialog::backdrop{background:#000000b3}\n"],
|
|
206
|
+
dependencies: [
|
|
207
|
+
{
|
|
208
|
+
kind: "directive",
|
|
209
|
+
type: NgClass,
|
|
210
|
+
selector: "[ngClass]",
|
|
211
|
+
inputs: ["class", "ngClass"]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
kind: "ngmodule",
|
|
215
|
+
type: PortalModule
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
kind: "directive",
|
|
219
|
+
type: i1.CdkPortalOutlet,
|
|
220
|
+
selector: "[cdkPortalOutlet]",
|
|
221
|
+
inputs: ["cdkPortalOutlet"],
|
|
222
|
+
outputs: ["attached"],
|
|
223
|
+
exportAs: ["cdkPortalOutlet"]
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
231
|
+
minVersion: "12.0.0",
|
|
232
|
+
version: "22.3.0",
|
|
233
|
+
ngImport: i0,
|
|
234
|
+
type: ErrorDialogComponent,
|
|
235
|
+
decorators: [{
|
|
79
236
|
type: Component,
|
|
80
|
-
args: [{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
237
|
+
args: [{
|
|
238
|
+
selector: "rxap-error-dialog",
|
|
239
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
240
|
+
imports: [NgClass, PortalModule],
|
|
241
|
+
template: "<dialog #dialog\n class=\"rounded overflow-auto drop-shadow-2xl bg-white text-black dark:bg-black dark:text-white flex flex-col gap-3 p-6\"\n style=\"max-width: 80vw; max-height: 80vh\">\n @if (data().length > 1) {\n <div class=\"controls flex justify-center space-x-2 mt-4\">\n @if (activeIndex() > 0) {\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150 rounded\">\n Previous\n </button>\n }\n @for (item of displayedButtons(); track item) {\n <button (click)=\"activeIndex.set(item)\"\n [ngClass]=\"{\n 'bg-primary-500': item === activeIndex(),\n 'bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150': item !== activeIndex()\n }\"\n class=\"px-4 py-2 rounded\">\n {{ item + 1 }}\n </button>\n }\n @if (activeIndex() < data().length - 1) {\n <button\n (click)=\"activeIndex.set(activeIndex() + 1)\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150 rounded\">\n Next\n </button>\n }\n </div>\n }\n <div class=\"flex flex-col overflow-auto\">\n <ng-template [cdkPortalOutlet]=\"componentPortal()\"></ng-template>\n </div>\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>close</button>\n</dialog>\n",
|
|
242
|
+
styles: ["dialog::backdrop{background:#000000b3}\n"]
|
|
243
|
+
}]
|
|
244
|
+
}],
|
|
245
|
+
ctorParameters: () => [],
|
|
246
|
+
propDecorators: {
|
|
247
|
+
dialog: [{
|
|
248
|
+
type: i0.ViewChild,
|
|
249
|
+
args: ["dialog", { isSignal: true }]
|
|
250
|
+
}],
|
|
251
|
+
closeDialog: [{
|
|
252
|
+
type: i0.Output,
|
|
253
|
+
args: ["closeDialog"]
|
|
254
|
+
}]
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
var ErrorCaptureDialogService = class ErrorCaptureDialogService {
|
|
86
258
|
constructor() {
|
|
87
259
|
this.applicationRef = inject(ApplicationRef);
|
|
88
260
|
this.document = inject(DOCUMENT);
|
|
@@ -93,27 +265,22 @@ class ErrorCaptureDialogService {
|
|
|
93
265
|
console.debug(`ErrorCaptureDialogService is disabled.`, { errorList: errorList() });
|
|
94
266
|
return EMPTY;
|
|
95
267
|
}
|
|
96
|
-
const body = this.document.getElementsByTagName(
|
|
97
|
-
const div = this.document.createElement(
|
|
268
|
+
const body = this.document.getElementsByTagName("body")[0];
|
|
269
|
+
const div = this.document.createElement("div");
|
|
98
270
|
body.appendChild(div);
|
|
99
271
|
const componentRef = createComponent(ErrorDialogComponent, {
|
|
100
272
|
hostElement: div,
|
|
101
273
|
environmentInjector: this.applicationRef.injector,
|
|
102
|
-
elementInjector: Injector.create({
|
|
103
|
-
providers: [
|
|
104
|
-
{
|
|
274
|
+
elementInjector: Injector.create({ providers: [{
|
|
105
275
|
provide: RXAP_ERROR_DIALOG_DATA,
|
|
106
|
-
useValue: errorList
|
|
107
|
-
},
|
|
108
|
-
{
|
|
276
|
+
useValue: errorList
|
|
277
|
+
}, {
|
|
109
278
|
provide: RXAP_ERROR_DIALOG_COMPONENT,
|
|
110
|
-
useValue: component
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
}),
|
|
279
|
+
useValue: component
|
|
280
|
+
}] })
|
|
114
281
|
});
|
|
115
282
|
this.applicationRef.attachView(componentRef.hostView);
|
|
116
|
-
return new Observable(subscriber => {
|
|
283
|
+
return new Observable((subscriber) => {
|
|
117
284
|
const subscription = outputToObservable(componentRef.instance.closeDialog).pipe(take(1), tap(() => {
|
|
118
285
|
subscriber.next();
|
|
119
286
|
subscriber.complete();
|
|
@@ -127,14 +294,37 @@ class ErrorCaptureDialogService {
|
|
|
127
294
|
};
|
|
128
295
|
});
|
|
129
296
|
}
|
|
130
|
-
static {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
297
|
+
static {
|
|
298
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
299
|
+
minVersion: "12.0.0",
|
|
300
|
+
version: "22.3.0",
|
|
301
|
+
ngImport: i0,
|
|
302
|
+
type: ErrorCaptureDialogService,
|
|
303
|
+
deps: [],
|
|
304
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
static {
|
|
308
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
309
|
+
minVersion: "12.0.0",
|
|
310
|
+
version: "22.3.0",
|
|
311
|
+
ngImport: i0,
|
|
312
|
+
type: ErrorCaptureDialogService,
|
|
313
|
+
providedIn: "root"
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
318
|
+
minVersion: "12.0.0",
|
|
319
|
+
version: "22.3.0",
|
|
320
|
+
ngImport: i0,
|
|
321
|
+
type: ErrorCaptureDialogService,
|
|
322
|
+
decorators: [{
|
|
134
323
|
type: Injectable,
|
|
135
|
-
args: [{ providedIn:
|
|
136
|
-
}]
|
|
137
|
-
|
|
324
|
+
args: [{ providedIn: "root" }]
|
|
325
|
+
}]
|
|
326
|
+
});
|
|
327
|
+
var ErrorCaptureService = class ErrorCaptureService {
|
|
138
328
|
constructor() {
|
|
139
329
|
this.errorCaptureDialogService = inject(RXAP_ERROR_CAPTURE_DIALOG_SERVICE, { optional: true }) ?? inject(ErrorCaptureDialogService);
|
|
140
330
|
this.errorList = [];
|
|
@@ -142,45 +332,163 @@ class ErrorCaptureService {
|
|
|
142
332
|
push(error) {
|
|
143
333
|
if (this.errorList.length) {
|
|
144
334
|
const last = this.errorList[this.errorList.length - 1];
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
last.update(value => {
|
|
335
|
+
if (last().some((e) => this.compare(e, error))) {
|
|
336
|
+
last.update((value) => {
|
|
148
337
|
value.push(error);
|
|
149
338
|
return value.slice();
|
|
150
339
|
});
|
|
151
340
|
return;
|
|
152
341
|
}
|
|
153
342
|
}
|
|
154
|
-
const newList = signal([error], ...
|
|
343
|
+
const newList = signal([error], ...ngDevMode ? [{ debugName: "newList" }] : /* istanbul ignore next */ []);
|
|
155
344
|
this.errorList.push(newList);
|
|
156
345
|
this.errorCaptureDialogService.open(this.component, newList);
|
|
157
346
|
}
|
|
158
|
-
static {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
347
|
+
static {
|
|
348
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
349
|
+
minVersion: "12.0.0",
|
|
350
|
+
version: "22.3.0",
|
|
351
|
+
ngImport: i0,
|
|
352
|
+
type: ErrorCaptureService,
|
|
353
|
+
deps: [],
|
|
354
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
static {
|
|
358
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
359
|
+
minVersion: "12.0.0",
|
|
360
|
+
version: "22.3.0",
|
|
361
|
+
ngImport: i0,
|
|
362
|
+
type: ErrorCaptureService
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
367
|
+
minVersion: "12.0.0",
|
|
368
|
+
version: "22.3.0",
|
|
369
|
+
ngImport: i0,
|
|
370
|
+
type: ErrorCaptureService,
|
|
371
|
+
decorators: [{ type: Injectable }]
|
|
372
|
+
});
|
|
164
373
|
let AnyHttpErrorComponent = class AnyHttpErrorComponent {
|
|
165
374
|
constructor() {
|
|
166
375
|
this.isProduction = inject(RXAP_ENVIRONMENT, { optional: true })?.production ?? false;
|
|
167
376
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
168
377
|
}
|
|
169
|
-
static {
|
|
170
|
-
|
|
378
|
+
static {
|
|
379
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
380
|
+
minVersion: "12.0.0",
|
|
381
|
+
version: "22.3.0",
|
|
382
|
+
ngImport: i0,
|
|
383
|
+
type: AnyHttpErrorComponent,
|
|
384
|
+
deps: [],
|
|
385
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
static {
|
|
389
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
390
|
+
minVersion: "17.0.0",
|
|
391
|
+
version: "22.3.0",
|
|
392
|
+
type: AnyHttpErrorComponent,
|
|
393
|
+
isStandalone: true,
|
|
394
|
+
selector: "rxap-any-http-error",
|
|
395
|
+
ngImport: i0,
|
|
396
|
+
template: "<rxap-data-grid [data]=\"error\">\n <ng-container rxapDataGridRowDef=\"name\"></ng-container>\n <ng-container rxapDataGridRowDef=\"timestamp\">\n <td *rxapDataGridCellDef=\"let value\">{{ value | date:'HH:mm:ss' }}</td>\n </ng-container>\n <ng-container rxapDataGridRowDef=\"method\"></ng-container>\n <ng-container rxapDataGridRowDef=\"url\"></ng-container>\n <ng-container rxapDataGridRowDef=\"status\"></ng-container>\n <ng-container rxapDataGridRowDef=\"statusText\"></ng-container>\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n <ng-container rxapDataGridRowDef=\"headers\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\">\n @for (entry of value | keyvalue; track entry) {\n <ng-container [rxapDataGridRowDef]=\"$any(entry.key)\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value.length > 1) {\n <ul>\n @for (item of value; track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n @if (value.length === 1) {\n {{ value[0] }}\n }\n @if (value.length === 0) {\n NONE\n }\n </td>\n </ng-container>\n }\n </rxap-data-grid>\n </td>\n </ng-container>\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"error\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Response Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"body\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Request Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n</rxap-data-grid>\n",
|
|
397
|
+
styles: [""],
|
|
398
|
+
dependencies: [
|
|
399
|
+
{
|
|
400
|
+
kind: "component",
|
|
401
|
+
type: DataGridComponent,
|
|
402
|
+
selector: "rxap-data-grid",
|
|
403
|
+
inputs: [
|
|
404
|
+
"header",
|
|
405
|
+
"dataSource",
|
|
406
|
+
"viewer",
|
|
407
|
+
"data",
|
|
408
|
+
"displayProperties",
|
|
409
|
+
"hideEmptyProperties",
|
|
410
|
+
"mode"
|
|
411
|
+
],
|
|
412
|
+
outputs: ["editModeChange"]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
kind: "directive",
|
|
416
|
+
type: DataGridRowDefDirective,
|
|
417
|
+
selector: "[rxapDataGridRowDef]",
|
|
418
|
+
inputs: [
|
|
419
|
+
"data",
|
|
420
|
+
"rxapDataGridRowDef",
|
|
421
|
+
"flip"
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
kind: "directive",
|
|
426
|
+
type: DataGridCellDefDirective,
|
|
427
|
+
selector: "[rxapDataGridCellDef]"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
kind: "component",
|
|
431
|
+
type: CopyToClipboardComponent,
|
|
432
|
+
selector: "rxap-copy-to-clipboard",
|
|
433
|
+
inputs: [
|
|
434
|
+
"active",
|
|
435
|
+
"disabled",
|
|
436
|
+
"value",
|
|
437
|
+
"containerClass",
|
|
438
|
+
"position"
|
|
439
|
+
]
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
kind: "component",
|
|
443
|
+
type: JsonViewerComponent,
|
|
444
|
+
selector: "rxap-json-viewer",
|
|
445
|
+
inputs: ["json", "expanded"]
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
kind: "pipe",
|
|
449
|
+
type: DatePipe,
|
|
450
|
+
name: "date"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
kind: "pipe",
|
|
454
|
+
type: KeyValuePipe,
|
|
455
|
+
name: "keyvalue"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
kind: "pipe",
|
|
459
|
+
type: JsonPipe,
|
|
460
|
+
name: "json"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
464
|
+
});
|
|
465
|
+
}
|
|
171
466
|
};
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
468
|
+
minVersion: "12.0.0",
|
|
469
|
+
version: "22.3.0",
|
|
470
|
+
ngImport: i0,
|
|
471
|
+
type: AnyHttpErrorComponent,
|
|
472
|
+
decorators: [{
|
|
173
473
|
type: Component,
|
|
174
|
-
args: [{
|
|
175
|
-
|
|
474
|
+
args: [{
|
|
475
|
+
selector: "rxap-any-http-error",
|
|
476
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
477
|
+
imports: [
|
|
478
|
+
DataGridComponent,
|
|
479
|
+
DataGridRowDefDirective,
|
|
480
|
+
DataGridCellDefDirective,
|
|
176
481
|
DatePipe,
|
|
177
482
|
KeyValuePipe,
|
|
178
483
|
CopyToClipboardComponent,
|
|
179
484
|
JsonPipe,
|
|
180
485
|
JsonViewerComponent
|
|
181
|
-
],
|
|
182
|
-
}] })
|
|
183
|
-
|
|
486
|
+
],
|
|
487
|
+
template: "<rxap-data-grid [data]=\"error\">\n <ng-container rxapDataGridRowDef=\"name\"></ng-container>\n <ng-container rxapDataGridRowDef=\"timestamp\">\n <td *rxapDataGridCellDef=\"let value\">{{ value | date:'HH:mm:ss' }}</td>\n </ng-container>\n <ng-container rxapDataGridRowDef=\"method\"></ng-container>\n <ng-container rxapDataGridRowDef=\"url\"></ng-container>\n <ng-container rxapDataGridRowDef=\"status\"></ng-container>\n <ng-container rxapDataGridRowDef=\"statusText\"></ng-container>\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n <ng-container rxapDataGridRowDef=\"headers\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\">\n @for (entry of value | keyvalue; track entry) {\n <ng-container [rxapDataGridRowDef]=\"$any(entry.key)\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value.length > 1) {\n <ul>\n @for (item of value; track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n @if (value.length === 1) {\n {{ value[0] }}\n }\n @if (value.length === 0) {\n NONE\n }\n </td>\n </ng-container>\n }\n </rxap-data-grid>\n </td>\n </ng-container>\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"error\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Response Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n @if (!isProduction) {\n <ng-container rxapDataGridRowDef=\"body\">\n <td *rxapDataGridCellDef=\"let value\">\n @if (value) {\n <rxap-copy-to-clipboard [value]=\"value | json\">Copy Request Body</rxap-copy-to-clipboard>\n <div class=\"body\">\n <rxap-json-viewer [expanded]=\"false\" [json]=\"value\"></rxap-json-viewer>\n </div>\n }\n @if (!value) {\n NONE\n }\n </td>\n </ng-container>\n }\n</rxap-data-grid>\n"
|
|
488
|
+
}]
|
|
489
|
+
}]
|
|
490
|
+
});
|
|
491
|
+
var AnyHttpErrorService = class AnyHttpErrorService extends ErrorCaptureService {
|
|
184
492
|
constructor() {
|
|
185
493
|
super(...arguments);
|
|
186
494
|
this.component = AnyHttpErrorComponent;
|
|
@@ -188,14 +496,37 @@ class AnyHttpErrorService extends ErrorCaptureService {
|
|
|
188
496
|
compare(a, b) {
|
|
189
497
|
return a.url === b.url && a.method === b.method && a.status === b.status && a.message === b.message;
|
|
190
498
|
}
|
|
191
|
-
static {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
499
|
+
static {
|
|
500
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
501
|
+
minVersion: "12.0.0",
|
|
502
|
+
version: "22.3.0",
|
|
503
|
+
ngImport: i0,
|
|
504
|
+
type: AnyHttpErrorService,
|
|
505
|
+
deps: null,
|
|
506
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
static {
|
|
510
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
511
|
+
minVersion: "12.0.0",
|
|
512
|
+
version: "22.3.0",
|
|
513
|
+
ngImport: i0,
|
|
514
|
+
type: AnyHttpErrorService,
|
|
515
|
+
providedIn: "root"
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
520
|
+
minVersion: "12.0.0",
|
|
521
|
+
version: "22.3.0",
|
|
522
|
+
ngImport: i0,
|
|
523
|
+
type: AnyHttpErrorService,
|
|
524
|
+
decorators: [{
|
|
195
525
|
type: Injectable,
|
|
196
|
-
args: [{ providedIn:
|
|
197
|
-
}]
|
|
198
|
-
|
|
526
|
+
args: [{ providedIn: "root" }]
|
|
527
|
+
}]
|
|
528
|
+
});
|
|
529
|
+
var OpenApiHttpResponseErrorService = class OpenApiHttpResponseErrorService extends AnyHttpErrorService {
|
|
199
530
|
constructor() {
|
|
200
531
|
super(...arguments);
|
|
201
532
|
this.component = OpenApiHttpResponseErrorComponent;
|
|
@@ -203,29 +534,87 @@ class OpenApiHttpResponseErrorService extends AnyHttpErrorService {
|
|
|
203
534
|
compare(a, b) {
|
|
204
535
|
return true;
|
|
205
536
|
}
|
|
206
|
-
static {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
537
|
+
static {
|
|
538
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
539
|
+
minVersion: "12.0.0",
|
|
540
|
+
version: "22.3.0",
|
|
541
|
+
ngImport: i0,
|
|
542
|
+
type: OpenApiHttpResponseErrorService,
|
|
543
|
+
deps: null,
|
|
544
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
static {
|
|
548
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
549
|
+
minVersion: "12.0.0",
|
|
550
|
+
version: "22.3.0",
|
|
551
|
+
ngImport: i0,
|
|
552
|
+
type: OpenApiHttpResponseErrorService,
|
|
553
|
+
providedIn: "root"
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
558
|
+
minVersion: "12.0.0",
|
|
559
|
+
version: "22.3.0",
|
|
560
|
+
ngImport: i0,
|
|
561
|
+
type: OpenApiHttpResponseErrorService,
|
|
562
|
+
decorators: [{
|
|
210
563
|
type: Injectable,
|
|
211
|
-
args: [{ providedIn:
|
|
212
|
-
}]
|
|
213
|
-
|
|
564
|
+
args: [{ providedIn: "root" }]
|
|
565
|
+
}]
|
|
566
|
+
});
|
|
567
|
+
var MessageHttpErrorComponent = class MessageHttpErrorComponent {
|
|
214
568
|
constructor() {
|
|
215
569
|
this.isProduction = inject(RXAP_ENVIRONMENT, { optional: true })?.production ?? false;
|
|
216
570
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
217
|
-
this.showMore = signal(false, ...
|
|
571
|
+
this.showMore = signal(false, ...ngDevMode ? [{ debugName: "showMore" }] : /* istanbul ignore next */ []);
|
|
218
572
|
}
|
|
219
|
-
static {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
573
|
+
static {
|
|
574
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
575
|
+
minVersion: "12.0.0",
|
|
576
|
+
version: "22.3.0",
|
|
577
|
+
ngImport: i0,
|
|
578
|
+
type: MessageHttpErrorComponent,
|
|
579
|
+
deps: [],
|
|
580
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
static {
|
|
584
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
585
|
+
minVersion: "17.0.0",
|
|
586
|
+
version: "22.3.0",
|
|
587
|
+
type: MessageHttpErrorComponent,
|
|
588
|
+
isStandalone: true,
|
|
589
|
+
selector: "rxap-http-error-message",
|
|
590
|
+
ngImport: i0,
|
|
591
|
+
template: "<div class=\"flex flex-col gap-2\">\n <p class=\"text-xl\">Http Error Message:</p>\n <p>{{ error.error.message }}</p>\n @if (!isProduction) {\n <hr>\n @if (!showMore()) {\n <button (click)=\"showMore.set(true)\"\n class=\"px-4 py-2 rounded bg-accent-500\">\n <ng-container i18n>Show more details</ng-container>\n </button>\n }\n @if (showMore()) {\n <rxap-any-http-error></rxap-any-http-error>\n }\n }\n </div>\n",
|
|
592
|
+
styles: [""],
|
|
593
|
+
dependencies: [{
|
|
594
|
+
kind: "component",
|
|
595
|
+
type: AnyHttpErrorComponent,
|
|
596
|
+
selector: "rxap-any-http-error"
|
|
597
|
+
}],
|
|
598
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
603
|
+
minVersion: "12.0.0",
|
|
604
|
+
version: "22.3.0",
|
|
605
|
+
ngImport: i0,
|
|
606
|
+
type: MessageHttpErrorComponent,
|
|
607
|
+
decorators: [{
|
|
223
608
|
type: Component,
|
|
224
|
-
args: [{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
class
|
|
609
|
+
args: [{
|
|
610
|
+
selector: "rxap-http-error-message",
|
|
611
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
612
|
+
imports: [AnyHttpErrorComponent],
|
|
613
|
+
template: "<div class=\"flex flex-col gap-2\">\n <p class=\"text-xl\">Http Error Message:</p>\n <p>{{ error.error.message }}</p>\n @if (!isProduction) {\n <hr>\n @if (!showMore()) {\n <button (click)=\"showMore.set(true)\"\n class=\"px-4 py-2 rounded bg-accent-500\">\n <ng-container i18n>Show more details</ng-container>\n </button>\n }\n @if (showMore()) {\n <rxap-any-http-error></rxap-any-http-error>\n }\n }\n </div>\n"
|
|
614
|
+
}]
|
|
615
|
+
}]
|
|
616
|
+
});
|
|
617
|
+
var MessageHttpErrorService = class MessageHttpErrorService extends AnyHttpErrorService {
|
|
229
618
|
constructor() {
|
|
230
619
|
super(...arguments);
|
|
231
620
|
this.component = MessageHttpErrorComponent;
|
|
@@ -233,14 +622,37 @@ class MessageHttpErrorService extends AnyHttpErrorService {
|
|
|
233
622
|
compare(a, b) {
|
|
234
623
|
return super.compare(a, b) && a.error.message === b.error.message;
|
|
235
624
|
}
|
|
236
|
-
static {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
625
|
+
static {
|
|
626
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
627
|
+
minVersion: "12.0.0",
|
|
628
|
+
version: "22.3.0",
|
|
629
|
+
ngImport: i0,
|
|
630
|
+
type: MessageHttpErrorService,
|
|
631
|
+
deps: null,
|
|
632
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
static {
|
|
636
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
637
|
+
minVersion: "12.0.0",
|
|
638
|
+
version: "22.3.0",
|
|
639
|
+
ngImport: i0,
|
|
640
|
+
type: MessageHttpErrorService,
|
|
641
|
+
providedIn: "root"
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
646
|
+
minVersion: "12.0.0",
|
|
647
|
+
version: "22.3.0",
|
|
648
|
+
ngImport: i0,
|
|
649
|
+
type: MessageHttpErrorService,
|
|
650
|
+
decorators: [{
|
|
240
651
|
type: Injectable,
|
|
241
|
-
args: [{ providedIn:
|
|
242
|
-
}]
|
|
243
|
-
|
|
652
|
+
args: [{ providedIn: "root" }]
|
|
653
|
+
}]
|
|
654
|
+
});
|
|
655
|
+
var AngularErrorComponent = class AngularErrorComponent {
|
|
244
656
|
constructor() {
|
|
245
657
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
246
658
|
}
|
|
@@ -253,14 +665,89 @@ class AngularErrorComponent {
|
|
|
253
665
|
get hasExtra() {
|
|
254
666
|
return Object.keys(this.error.extra).length > 0;
|
|
255
667
|
}
|
|
256
|
-
static {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
668
|
+
static {
|
|
669
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
670
|
+
minVersion: "12.0.0",
|
|
671
|
+
version: "22.3.0",
|
|
672
|
+
ngImport: i0,
|
|
673
|
+
type: AngularErrorComponent,
|
|
674
|
+
deps: [],
|
|
675
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
static {
|
|
679
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
680
|
+
minVersion: "17.0.0",
|
|
681
|
+
version: "22.3.0",
|
|
682
|
+
type: AngularErrorComponent,
|
|
683
|
+
isStandalone: true,
|
|
684
|
+
selector: "rxap-angular-error",
|
|
685
|
+
ngImport: i0,
|
|
686
|
+
template: "<rxap-data-grid [data]=\"error\">\n @if (error.name) {\n <ng-container rxapDataGridRowDef=\"name\"></ng-container>\n }\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n @if (hasExtra || hasTags || hasContexts || error.stack) {\n <ng-container rxapDataGridRowDef>\n <th *rxapDataGridHeaderCellDef>\n <span i18n>Details</span>\n </th>\n </ng-container>\n }\n @if (error.stack) {\n <ng-container rxapDataGridRowDef=\"stack\">\n <td *rxapDataGridCellDef=\"let value\">\n <pre>{{ value }}</pre>\n </td>\n </ng-container>\n }\n @if (hasTags) {\n <ng-container rxapDataGridRowDef=\"tags\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n }\n @if (hasExtra) {\n <ng-container rxapDataGridRowDef=\"extra\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n }\n @if (hasContexts) {\n <ng-container rxapDataGridRowDef=\"contexts\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n }\n</rxap-data-grid>\n",
|
|
687
|
+
styles: [""],
|
|
688
|
+
dependencies: [
|
|
689
|
+
{
|
|
690
|
+
kind: "component",
|
|
691
|
+
type: DataGridComponent,
|
|
692
|
+
selector: "rxap-data-grid",
|
|
693
|
+
inputs: [
|
|
694
|
+
"header",
|
|
695
|
+
"dataSource",
|
|
696
|
+
"viewer",
|
|
697
|
+
"data",
|
|
698
|
+
"displayProperties",
|
|
699
|
+
"hideEmptyProperties",
|
|
700
|
+
"mode"
|
|
701
|
+
],
|
|
702
|
+
outputs: ["editModeChange"]
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
kind: "directive",
|
|
706
|
+
type: DataGridRowDefDirective,
|
|
707
|
+
selector: "[rxapDataGridRowDef]",
|
|
708
|
+
inputs: [
|
|
709
|
+
"data",
|
|
710
|
+
"rxapDataGridRowDef",
|
|
711
|
+
"flip"
|
|
712
|
+
]
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
kind: "directive",
|
|
716
|
+
type: DataGridHeaderCellDefDirective,
|
|
717
|
+
selector: "[rxapDataGridHeaderCellDef]"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
kind: "directive",
|
|
721
|
+
type: DataGridCellDefDirective,
|
|
722
|
+
selector: "[rxapDataGridCellDef]"
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
730
|
+
minVersion: "12.0.0",
|
|
731
|
+
version: "22.3.0",
|
|
732
|
+
ngImport: i0,
|
|
733
|
+
type: AngularErrorComponent,
|
|
734
|
+
decorators: [{
|
|
260
735
|
type: Component,
|
|
261
|
-
args: [{
|
|
262
|
-
|
|
263
|
-
|
|
736
|
+
args: [{
|
|
737
|
+
selector: "rxap-angular-error",
|
|
738
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
739
|
+
imports: [
|
|
740
|
+
DataGridComponent,
|
|
741
|
+
DataGridRowDefDirective,
|
|
742
|
+
DataGridHeaderCellDefDirective,
|
|
743
|
+
DataGridCellDefDirective,
|
|
744
|
+
KeyValuePipe
|
|
745
|
+
],
|
|
746
|
+
template: "<rxap-data-grid [data]=\"error\">\n @if (error.name) {\n <ng-container rxapDataGridRowDef=\"name\"></ng-container>\n }\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n @if (hasExtra || hasTags || hasContexts || error.stack) {\n <ng-container rxapDataGridRowDef>\n <th *rxapDataGridHeaderCellDef>\n <span i18n>Details</span>\n </th>\n </ng-container>\n }\n @if (error.stack) {\n <ng-container rxapDataGridRowDef=\"stack\">\n <td *rxapDataGridCellDef=\"let value\">\n <pre>{{ value }}</pre>\n </td>\n </ng-container>\n }\n @if (hasTags) {\n <ng-container rxapDataGridRowDef=\"tags\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n }\n @if (hasExtra) {\n <ng-container rxapDataGridRowDef=\"extra\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n }\n @if (hasContexts) {\n <ng-container rxapDataGridRowDef=\"contexts\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n }\n</rxap-data-grid>\n"
|
|
747
|
+
}]
|
|
748
|
+
}]
|
|
749
|
+
});
|
|
750
|
+
var AngularErrorService = class AngularErrorService extends ErrorCaptureService {
|
|
264
751
|
constructor() {
|
|
265
752
|
super(...arguments);
|
|
266
753
|
this.component = AngularErrorComponent;
|
|
@@ -268,29 +755,87 @@ class AngularErrorService extends ErrorCaptureService {
|
|
|
268
755
|
compare(a, b) {
|
|
269
756
|
return true;
|
|
270
757
|
}
|
|
271
|
-
static {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
758
|
+
static {
|
|
759
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
760
|
+
minVersion: "12.0.0",
|
|
761
|
+
version: "22.3.0",
|
|
762
|
+
ngImport: i0,
|
|
763
|
+
type: AngularErrorService,
|
|
764
|
+
deps: null,
|
|
765
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
static {
|
|
769
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
770
|
+
minVersion: "12.0.0",
|
|
771
|
+
version: "22.3.0",
|
|
772
|
+
ngImport: i0,
|
|
773
|
+
type: AngularErrorService,
|
|
774
|
+
providedIn: "root"
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
779
|
+
minVersion: "12.0.0",
|
|
780
|
+
version: "22.3.0",
|
|
781
|
+
ngImport: i0,
|
|
782
|
+
type: AngularErrorService,
|
|
783
|
+
decorators: [{
|
|
275
784
|
type: Injectable,
|
|
276
|
-
args: [{ providedIn:
|
|
277
|
-
}]
|
|
278
|
-
|
|
785
|
+
args: [{ providedIn: "root" }]
|
|
786
|
+
}]
|
|
787
|
+
});
|
|
788
|
+
var CodeHttpErrorComponent = class CodeHttpErrorComponent {
|
|
279
789
|
constructor() {
|
|
280
790
|
this.isProduction = inject(RXAP_ENVIRONMENT, { optional: true })?.production ?? false;
|
|
281
791
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
282
|
-
this.showMore = signal(false, ...
|
|
792
|
+
this.showMore = signal(false, ...ngDevMode ? [{ debugName: "showMore" }] : /* istanbul ignore next */ []);
|
|
283
793
|
}
|
|
284
|
-
static {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
794
|
+
static {
|
|
795
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
796
|
+
minVersion: "12.0.0",
|
|
797
|
+
version: "22.3.0",
|
|
798
|
+
ngImport: i0,
|
|
799
|
+
type: CodeHttpErrorComponent,
|
|
800
|
+
deps: [],
|
|
801
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
static {
|
|
805
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
806
|
+
minVersion: "17.0.0",
|
|
807
|
+
version: "22.3.0",
|
|
808
|
+
type: CodeHttpErrorComponent,
|
|
809
|
+
isStandalone: true,
|
|
810
|
+
selector: "rxap-http-error-message",
|
|
811
|
+
ngImport: i0,
|
|
812
|
+
template: "<div class=\"flex flex-col gap-2\">\n <p class=\"text-xl\">Http Error Code: <span class=\"font-bold text-red-800\">{{ error.errorCode }}</span></p>\n <p>{{ error.error.message ?? error.message }}</p>\n @if (!isProduction) {\n <hr>\n @if (!showMore()) {\n <button (click)=\"showMore.set(true)\"\n class=\"px-4 py-2 rounded bg-accent-500\">\n <ng-container i18n>Show more details</ng-container>\n </button>\n }\n @if (showMore()) {\n <rxap-any-http-error></rxap-any-http-error>\n }\n }\n </div>\n",
|
|
813
|
+
styles: [""],
|
|
814
|
+
dependencies: [{
|
|
815
|
+
kind: "component",
|
|
816
|
+
type: AnyHttpErrorComponent,
|
|
817
|
+
selector: "rxap-any-http-error"
|
|
818
|
+
}],
|
|
819
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
824
|
+
minVersion: "12.0.0",
|
|
825
|
+
version: "22.3.0",
|
|
826
|
+
ngImport: i0,
|
|
827
|
+
type: CodeHttpErrorComponent,
|
|
828
|
+
decorators: [{
|
|
288
829
|
type: Component,
|
|
289
|
-
args: [{
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
class
|
|
830
|
+
args: [{
|
|
831
|
+
selector: "rxap-http-error-message",
|
|
832
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
833
|
+
imports: [AnyHttpErrorComponent],
|
|
834
|
+
template: "<div class=\"flex flex-col gap-2\">\n <p class=\"text-xl\">Http Error Code: <span class=\"font-bold text-red-800\">{{ error.errorCode }}</span></p>\n <p>{{ error.error.message ?? error.message }}</p>\n @if (!isProduction) {\n <hr>\n @if (!showMore()) {\n <button (click)=\"showMore.set(true)\"\n class=\"px-4 py-2 rounded bg-accent-500\">\n <ng-container i18n>Show more details</ng-container>\n </button>\n }\n @if (showMore()) {\n <rxap-any-http-error></rxap-any-http-error>\n }\n }\n </div>\n"
|
|
835
|
+
}]
|
|
836
|
+
}]
|
|
837
|
+
});
|
|
838
|
+
var CodeHttpErrorService = class CodeHttpErrorService extends AnyHttpErrorService {
|
|
294
839
|
constructor() {
|
|
295
840
|
super(...arguments);
|
|
296
841
|
this.component = CodeHttpErrorComponent;
|
|
@@ -298,32 +843,54 @@ class CodeHttpErrorService extends AnyHttpErrorService {
|
|
|
298
843
|
compare(a, b) {
|
|
299
844
|
return super.compare(a, b) && a.errorCode === b.errorCode;
|
|
300
845
|
}
|
|
301
|
-
static {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
846
|
+
static {
|
|
847
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
848
|
+
minVersion: "12.0.0",
|
|
849
|
+
version: "22.3.0",
|
|
850
|
+
ngImport: i0,
|
|
851
|
+
type: CodeHttpErrorService,
|
|
852
|
+
deps: null,
|
|
853
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
static {
|
|
857
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
858
|
+
minVersion: "12.0.0",
|
|
859
|
+
version: "22.3.0",
|
|
860
|
+
ngImport: i0,
|
|
861
|
+
type: CodeHttpErrorService,
|
|
862
|
+
providedIn: "root"
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
867
|
+
minVersion: "12.0.0",
|
|
868
|
+
version: "22.3.0",
|
|
869
|
+
ngImport: i0,
|
|
870
|
+
type: CodeHttpErrorService,
|
|
871
|
+
decorators: [{
|
|
305
872
|
type: Injectable,
|
|
306
|
-
args: [{ providedIn:
|
|
307
|
-
}]
|
|
873
|
+
args: [{ providedIn: "root" }]
|
|
874
|
+
}]
|
|
875
|
+
});
|
|
308
876
|
function SimplifyHttpErrorResponse(event) {
|
|
309
877
|
let error = event.error;
|
|
310
|
-
if (typeof error !==
|
|
878
|
+
if (typeof error !== "object") {
|
|
311
879
|
if (error instanceof Blob) {
|
|
312
|
-
console.warn(
|
|
313
|
-
error =
|
|
880
|
+
console.warn("error response object is a blob");
|
|
881
|
+
error = "[BLOB]";
|
|
314
882
|
}
|
|
315
|
-
else
|
|
883
|
+
else
|
|
316
884
|
try {
|
|
317
885
|
error = JSON.parse(error);
|
|
318
886
|
}
|
|
319
887
|
catch (e) {
|
|
320
|
-
console.warn(
|
|
888
|
+
console.warn("error response object is not a json");
|
|
321
889
|
}
|
|
322
|
-
}
|
|
323
890
|
}
|
|
324
891
|
return {
|
|
325
|
-
errorMessage: (typeof error ===
|
|
326
|
-
error
|
|
892
|
+
errorMessage: (typeof error === "object" ? error?.message : void 0) ?? event.message,
|
|
893
|
+
error,
|
|
327
894
|
message: event.message,
|
|
328
895
|
name: event.name,
|
|
329
896
|
status: event.status,
|
|
@@ -331,18 +898,16 @@ function SimplifyHttpErrorResponse(event) {
|
|
|
331
898
|
url: event.url,
|
|
332
899
|
ok: event.ok,
|
|
333
900
|
type: event.type,
|
|
334
|
-
headers: event.headers.keys()
|
|
335
|
-
.reduce((map, key) => ({
|
|
901
|
+
headers: event.headers.keys().reduce((map, key) => ({
|
|
336
902
|
...map,
|
|
337
|
-
[key]: event.headers.getAll(key)
|
|
338
|
-
}), {})
|
|
903
|
+
[key]: event.headers.getAll(key)
|
|
904
|
+
}), {})
|
|
339
905
|
};
|
|
340
906
|
}
|
|
341
907
|
function ExtractContextFromError(error) {
|
|
342
908
|
const context = {};
|
|
343
|
-
if (error instanceof HttpErrorResponse)
|
|
344
|
-
context[
|
|
345
|
-
}
|
|
909
|
+
if (error instanceof HttpErrorResponse)
|
|
910
|
+
context["response"] = SimplifyHttpErrorResponse(error);
|
|
346
911
|
return context;
|
|
347
912
|
}
|
|
348
913
|
function ExtractExtraFromError(error) {
|
|
@@ -352,43 +917,37 @@ function ExtractTagsFromError(error) {
|
|
|
352
917
|
return {};
|
|
353
918
|
}
|
|
354
919
|
function ExtractError(error) {
|
|
355
|
-
if (error instanceof HttpErrorResponse)
|
|
920
|
+
if (error instanceof HttpErrorResponse)
|
|
356
921
|
return error;
|
|
357
|
-
|
|
358
|
-
if (error instanceof Error) {
|
|
922
|
+
if (error instanceof Error)
|
|
359
923
|
return error;
|
|
360
|
-
|
|
361
|
-
if (typeof error === 'string') {
|
|
924
|
+
if (typeof error === "string")
|
|
362
925
|
return error;
|
|
363
|
-
|
|
364
|
-
return 'Handled unknown error';
|
|
926
|
+
return "Handled unknown error";
|
|
365
927
|
}
|
|
366
928
|
function PrintError(errorCandidate) {
|
|
367
929
|
if (errorCandidate instanceof HttpErrorResponse) {
|
|
368
930
|
console.groupCollapsed(errorCandidate.message);
|
|
369
931
|
const { headers, error, ...map } = SimplifyHttpErrorResponse(errorCandidate);
|
|
370
|
-
if (typeof error ===
|
|
932
|
+
if (typeof error === "object" && error?.message)
|
|
371
933
|
console.log(error?.message);
|
|
372
|
-
}
|
|
373
934
|
console.log(error);
|
|
374
935
|
console.table(map);
|
|
375
|
-
console.groupCollapsed(
|
|
936
|
+
console.groupCollapsed("Headers");
|
|
376
937
|
console.table(headers);
|
|
377
938
|
console.groupEnd();
|
|
378
939
|
console.groupEnd();
|
|
379
940
|
}
|
|
380
|
-
else if (errorCandidate instanceof Error)
|
|
941
|
+
else if (errorCandidate instanceof Error)
|
|
381
942
|
console.error(errorCandidate);
|
|
382
|
-
|
|
383
|
-
else if (typeof errorCandidate === 'string') {
|
|
943
|
+
else if (typeof errorCandidate === "string")
|
|
384
944
|
console.error(errorCandidate);
|
|
385
|
-
}
|
|
386
945
|
}
|
|
387
|
-
const RXAP_ERROR_HANDLER_OPTIONS = new InjectionToken(
|
|
388
|
-
providedIn:
|
|
389
|
-
factory: () => ({ logErrors: true })
|
|
946
|
+
const RXAP_ERROR_HANDLER_OPTIONS = new InjectionToken("rxap-error-handler-options", {
|
|
947
|
+
providedIn: "root",
|
|
948
|
+
factory: () => ({ logErrors: true })
|
|
390
949
|
});
|
|
391
|
-
class RxapErrorHandler {
|
|
950
|
+
var RxapErrorHandler = class RxapErrorHandler {
|
|
392
951
|
constructor() {
|
|
393
952
|
this.options = (() => {
|
|
394
953
|
const options = inject(RXAP_ERROR_HANDLER_OPTIONS);
|
|
@@ -396,115 +955,92 @@ class RxapErrorHandler {
|
|
|
396
955
|
const config = inject(ConfigService);
|
|
397
956
|
options.logErrors ??= true;
|
|
398
957
|
options.sentry ??= {};
|
|
399
|
-
options.sentry.showDialog ??= config.get(
|
|
400
|
-
// enforce sentry showDialog to false in dev mode
|
|
958
|
+
options.sentry.showDialog ??= config.get("sentry.showDialog", false);
|
|
401
959
|
options.sentry.showDialog = !isDevMode() && options.sentry.showDialog;
|
|
402
960
|
options.showDialog ??= IsNotReleaseVersion(environment);
|
|
403
|
-
options.sentry.dialogOptions ??= config.get(
|
|
961
|
+
options.sentry.dialogOptions ??= config.get("sentry.dialogOptions", {});
|
|
404
962
|
options.sentry.dialogOptions.user ??= {};
|
|
405
963
|
return options;
|
|
406
964
|
})();
|
|
407
965
|
this.injector = inject(INJECTOR);
|
|
408
966
|
}
|
|
409
967
|
isLoadChunkError(error) {
|
|
410
|
-
if (!error)
|
|
968
|
+
if (!error)
|
|
411
969
|
return false;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
if (typeof error === 'string') {
|
|
970
|
+
let message = "";
|
|
971
|
+
if (typeof error === "string")
|
|
415
972
|
message = error;
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
if ('name' in error && typeof error.name === 'string' && /ChunkLoadError/i.test(error.name)) {
|
|
973
|
+
else if (typeof error === "object") {
|
|
974
|
+
if ("name" in error && typeof error.name === "string" && /ChunkLoadError/i.test(error.name))
|
|
419
975
|
return true;
|
|
420
|
-
|
|
421
|
-
else if ('message' in error && typeof error.message === 'string') {
|
|
976
|
+
else if ("message" in error && typeof error.message === "string")
|
|
422
977
|
message = error.message;
|
|
423
|
-
}
|
|
424
978
|
}
|
|
425
|
-
return [
|
|
426
|
-
/Loading chunk [\d]+ failed/i,
|
|
427
|
-
].some((regex) => regex.test(message));
|
|
979
|
+
return [/Loading chunk [\d]+ failed/i].some((regex) => regex.test(message));
|
|
428
980
|
}
|
|
429
|
-
/**
|
|
430
|
-
* Method called for every value captured through the ErrorHandler
|
|
431
|
-
*/
|
|
432
981
|
handleError(errorCandidate) {
|
|
433
982
|
let error = errorCandidate;
|
|
434
983
|
if (this.isLoadChunkError(error)) {
|
|
435
|
-
console.warn(
|
|
984
|
+
console.warn("Old application version detected. Reloading the page to update the application.");
|
|
436
985
|
window.location.reload();
|
|
437
986
|
}
|
|
438
|
-
|
|
439
|
-
// https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts
|
|
440
|
-
if (error && error.ngOriginalError) {
|
|
987
|
+
if (error && error.ngOriginalError)
|
|
441
988
|
error = error.ngOriginalError;
|
|
442
|
-
}
|
|
443
989
|
const extractedError = ExtractError(error);
|
|
444
990
|
const contexts = ExtractContextFromError(error);
|
|
445
991
|
const extra = ExtractExtraFromError(error);
|
|
446
992
|
const tags = ExtractTagsFromError(error);
|
|
447
993
|
let eventId;
|
|
448
|
-
|
|
449
|
-
if (typeof extractedError === 'string') {
|
|
994
|
+
if (typeof extractedError === "string")
|
|
450
995
|
eventId = Sentry.captureMessage(extractedError, {
|
|
451
|
-
level:
|
|
996
|
+
level: "error",
|
|
452
997
|
contexts,
|
|
453
998
|
extra,
|
|
454
|
-
tags
|
|
999
|
+
tags
|
|
455
1000
|
});
|
|
456
|
-
|
|
457
|
-
else {
|
|
1001
|
+
else
|
|
458
1002
|
eventId = Sentry.captureException(extractedError, {
|
|
459
|
-
level:
|
|
1003
|
+
level: "error",
|
|
460
1004
|
contexts,
|
|
461
1005
|
extra,
|
|
462
|
-
tags
|
|
1006
|
+
tags
|
|
463
1007
|
});
|
|
464
|
-
|
|
465
|
-
if (this.options.logErrors) {
|
|
1008
|
+
if (this.options.logErrors)
|
|
466
1009
|
PrintError(error);
|
|
467
|
-
}
|
|
468
1010
|
if (this.options.sentry?.showDialog) {
|
|
469
|
-
if (!(error instanceof HttpErrorResponse))
|
|
1011
|
+
if (!(error instanceof HttpErrorResponse))
|
|
470
1012
|
Sentry.showReportDialog({
|
|
471
|
-
...
|
|
472
|
-
eventId
|
|
1013
|
+
...this.options.sentry.dialogOptions ?? {},
|
|
1014
|
+
eventId
|
|
473
1015
|
});
|
|
474
|
-
}
|
|
475
1016
|
}
|
|
476
1017
|
else if (this.options.showDialog) {
|
|
477
|
-
const nonMessage =
|
|
1018
|
+
const nonMessage = "unsupported error type for angular error dialog";
|
|
478
1019
|
const data = {
|
|
479
1020
|
message: nonMessage,
|
|
480
1021
|
contexts,
|
|
481
1022
|
extra,
|
|
482
|
-
tags
|
|
1023
|
+
tags
|
|
483
1024
|
};
|
|
484
|
-
if (typeof extractedError ===
|
|
1025
|
+
if (typeof extractedError === "string")
|
|
485
1026
|
data.message = extractedError;
|
|
486
|
-
}
|
|
487
1027
|
else if (!(extractedError instanceof HttpErrorResponse)) {
|
|
488
1028
|
data.message = extractedError.message;
|
|
489
1029
|
data.stack = extractedError.stack;
|
|
490
1030
|
data.name = extractedError.name;
|
|
491
1031
|
}
|
|
492
|
-
if (extractedError instanceof OpenApiHttpResponseError)
|
|
1032
|
+
if (extractedError instanceof OpenApiHttpResponseError)
|
|
493
1033
|
this.showOpenApiHttpResponseErrorDialog({
|
|
494
1034
|
...data,
|
|
495
1035
|
...SimplifyHttpErrorResponse(extractedError.httpErrorResponse),
|
|
496
1036
|
timestamp: Date.now(),
|
|
497
1037
|
metadata: extractedError.metadata,
|
|
498
|
-
method: !extractedError.metadata.operation || typeof extractedError.metadata.operation ===
|
|
1038
|
+
method: !extractedError.metadata.operation || typeof extractedError.metadata.operation === "string" ? "unknown" : extractedError.metadata.operation.method,
|
|
499
1039
|
operationId: extractedError.operationId,
|
|
500
1040
|
serverId: extractedError.serverId
|
|
501
1041
|
});
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
if (data.message !== nonMessage) {
|
|
505
|
-
this.showAngularErrorDialog(data);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
1042
|
+
else if (data.message !== nonMessage)
|
|
1043
|
+
this.showAngularErrorDialog(data);
|
|
508
1044
|
}
|
|
509
1045
|
}
|
|
510
1046
|
showOpenApiHttpResponseErrorDialog(data) {
|
|
@@ -517,12 +1053,32 @@ class RxapErrorHandler {
|
|
|
517
1053
|
inject(AngularErrorService).push(data);
|
|
518
1054
|
});
|
|
519
1055
|
}
|
|
520
|
-
static {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
1056
|
+
static {
|
|
1057
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1058
|
+
minVersion: "12.0.0",
|
|
1059
|
+
version: "22.3.0",
|
|
1060
|
+
ngImport: i0,
|
|
1061
|
+
type: RxapErrorHandler,
|
|
1062
|
+
deps: [],
|
|
1063
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
static {
|
|
1067
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1068
|
+
minVersion: "12.0.0",
|
|
1069
|
+
version: "22.3.0",
|
|
1070
|
+
ngImport: i0,
|
|
1071
|
+
type: RxapErrorHandler
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1075
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1076
|
+
minVersion: "12.0.0",
|
|
1077
|
+
version: "22.3.0",
|
|
1078
|
+
ngImport: i0,
|
|
1079
|
+
type: RxapErrorHandler,
|
|
1080
|
+
decorators: [{ type: Injectable }]
|
|
1081
|
+
});
|
|
526
1082
|
function DefaultErrorCodeExtractor(error) {
|
|
527
1083
|
return error.error?.code ?? null;
|
|
528
1084
|
}
|
|
@@ -536,15 +1092,12 @@ function HttpErrorInterceptor(req, next) {
|
|
|
536
1092
|
const options = inject(RXAP_ERROR_INTERCEPTOR_OPTIONS, { optional: true }) ?? {};
|
|
537
1093
|
options.extractErrorCode ??= DefaultErrorCodeExtractor;
|
|
538
1094
|
options.filter ??= [];
|
|
539
|
-
if (!options.filter.length)
|
|
1095
|
+
if (!options.filter.length)
|
|
540
1096
|
options.filter.push(DefaultErrorFilter);
|
|
541
|
-
|
|
542
|
-
return next(req).pipe(tap({
|
|
543
|
-
error: async (event) => {
|
|
1097
|
+
return next(req).pipe(tap({ error: async (event) => {
|
|
544
1098
|
if (event instanceof HttpErrorResponse) {
|
|
545
|
-
if (!options.filter?.some((filter) => filter(event)))
|
|
1099
|
+
if (!options.filter?.some((filter) => filter(event)))
|
|
546
1100
|
return;
|
|
547
|
-
}
|
|
548
1101
|
let error = event.error;
|
|
549
1102
|
if (event.error instanceof Blob) {
|
|
550
1103
|
error = await event.error.text();
|
|
@@ -552,78 +1105,61 @@ function HttpErrorInterceptor(req, next) {
|
|
|
552
1105
|
error = JSON.parse(error);
|
|
553
1106
|
}
|
|
554
1107
|
catch (e) {
|
|
555
|
-
console.warn(
|
|
1108
|
+
console.warn("error response object is not a json");
|
|
556
1109
|
}
|
|
557
1110
|
}
|
|
558
1111
|
const data = {
|
|
559
1112
|
...SimplifyHttpErrorResponse(event),
|
|
560
1113
|
method: req.method,
|
|
561
1114
|
body: req.body,
|
|
562
|
-
timestamp: Date.now()
|
|
1115
|
+
timestamp: Date.now()
|
|
563
1116
|
};
|
|
564
|
-
if (error && typeof error ===
|
|
1117
|
+
if (error && typeof error === "object") {
|
|
565
1118
|
const errorCode = options.extractErrorCode(event);
|
|
566
1119
|
if (errorCode) {
|
|
567
1120
|
Sentry.captureMessage(`Error Code ${errorCode}`, {
|
|
568
|
-
level:
|
|
1121
|
+
level: "warning",
|
|
569
1122
|
contexts: ExtractContextFromError(error),
|
|
570
1123
|
extra: ExtractExtraFromError(error),
|
|
571
|
-
tags: ExtractTagsFromError(error)
|
|
1124
|
+
tags: ExtractTagsFromError(error)
|
|
572
1125
|
});
|
|
573
1126
|
codeHttpErrorService.push({
|
|
574
1127
|
...data,
|
|
575
|
-
errorCode
|
|
1128
|
+
errorCode
|
|
576
1129
|
});
|
|
577
1130
|
}
|
|
578
|
-
else if (error.message)
|
|
1131
|
+
else if (error.message)
|
|
579
1132
|
messageHttpErrorService.push(data);
|
|
580
|
-
|
|
581
|
-
else {
|
|
1133
|
+
else
|
|
582
1134
|
anyHttpErrorService.push(data);
|
|
583
|
-
}
|
|
584
1135
|
}
|
|
585
|
-
else
|
|
1136
|
+
else
|
|
586
1137
|
anyHttpErrorService.push(data);
|
|
587
|
-
}
|
|
588
1138
|
}
|
|
589
|
-
}
|
|
590
|
-
}));
|
|
1139
|
+
} }));
|
|
591
1140
|
}
|
|
592
1141
|
function provideAutoErrorInterception(...providers) {
|
|
593
|
-
return [
|
|
594
|
-
{
|
|
1142
|
+
return [{
|
|
595
1143
|
provide: ErrorHandler,
|
|
596
|
-
useClass: RxapErrorHandler
|
|
597
|
-
},
|
|
598
|
-
...providers,
|
|
599
|
-
];
|
|
1144
|
+
useClass: RxapErrorHandler
|
|
1145
|
+
}, ...providers];
|
|
600
1146
|
}
|
|
601
1147
|
function withErrorCaptureDialogService(service) {
|
|
602
1148
|
return {
|
|
603
1149
|
provide: RXAP_ERROR_CAPTURE_DIALOG_SERVICE,
|
|
604
|
-
useClass: service
|
|
1150
|
+
useClass: service
|
|
605
1151
|
};
|
|
606
1152
|
}
|
|
607
1153
|
function withErrorCaptureDialogDisabledIf(condition) {
|
|
608
1154
|
return {
|
|
609
1155
|
provide: RXAP_ERROR_DIALOG_DISABLED,
|
|
610
|
-
useValue: typeof condition ===
|
|
1156
|
+
useValue: typeof condition === "function" ? condition() : condition
|
|
611
1157
|
};
|
|
612
1158
|
}
|
|
613
|
-
/**
|
|
614
|
-
* @deprecated Use `provideAutoErrorInterception` instead.
|
|
615
|
-
*/
|
|
616
1159
|
function ProvideErrorHandler() {
|
|
617
|
-
return [
|
|
618
|
-
{
|
|
1160
|
+
return [{
|
|
619
1161
|
provide: ErrorHandler,
|
|
620
|
-
useClass: RxapErrorHandler
|
|
621
|
-
}
|
|
622
|
-
];
|
|
1162
|
+
useClass: RxapErrorHandler
|
|
1163
|
+
}];
|
|
623
1164
|
}
|
|
624
|
-
// region open-api-http-response-error
|
|
625
|
-
// endregion
|
|
626
|
-
/**
|
|
627
|
-
* Generated bundle index. Do not edit.
|
|
628
|
-
*/
|
|
629
1165
|
export { AngularErrorComponent, AngularErrorService, AnyHttpErrorComponent, AnyHttpErrorService, CodeHttpErrorComponent, CodeHttpErrorService, DefaultErrorCodeExtractor, DefaultErrorFilter, ErrorCaptureDialogService, ErrorCaptureService, ErrorDialogComponent, ExtractContextFromError, ExtractError, ExtractExtraFromError, ExtractTagsFromError, HttpErrorInterceptor, MessageHttpErrorComponent, MessageHttpErrorService, OpenApiHttpResponseErrorComponent, OpenApiHttpResponseErrorService, PrintError, ProvideErrorHandler, RXAP_ERROR_CAPTURE_DIALOG_SERVICE, RXAP_ERROR_DIALOG_COMPONENT, RXAP_ERROR_DIALOG_DATA, RXAP_ERROR_DIALOG_DISABLED, RXAP_ERROR_DIALOG_ERROR, RXAP_ERROR_HANDLER_OPTIONS, RXAP_ERROR_INTERCEPTOR_OPTIONS, RxapErrorHandler, SimplifyHttpErrorResponse, provideAutoErrorInterception, withErrorCaptureDialogDisabledIf, withErrorCaptureDialogService };
|