@rxap/ngx-error 19.0.3 → 19.1.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 +7 -0
- package/compodoc/components/ErrorDialogComponent.html +5 -3
- package/compodoc/dependencies.html +8 -8
- package/compodoc/injectables/AngularErrorService.html +1 -77
- package/compodoc/injectables/AnyHttpErrorService.html +1 -77
- package/compodoc/injectables/CodeHttpErrorService.html +1 -77
- package/compodoc/injectables/ErrorCaptureDialogService.html +490 -0
- package/compodoc/injectables/ErrorCaptureService.html +13 -121
- package/compodoc/injectables/MessageHttpErrorService.html +1 -77
- package/compodoc/injectables/OpenApiHttpResponseErrorService.html +1 -77
- package/compodoc/injectables/RxapErrorHandler.html +10 -15
- package/compodoc/interfaces/ErrorHandlerOptions.html +2 -7
- package/compodoc/interfaces/IErrorCaptureDialogService.html +405 -0
- package/compodoc/js/menu-wc.js +6 -0
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/functions.html +130 -4
- package/compodoc/miscellaneous/variables.html +23 -0
- package/compodoc/overview.html +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +1809 -1569
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AngularErrorComponent.html +2 -2
- package/docs/html/classes/AngularErrorService.html +2 -3
- package/docs/html/classes/AnyHttpErrorComponent.html +2 -2
- package/docs/html/classes/AnyHttpErrorService.html +2 -3
- package/docs/html/classes/CodeHttpErrorComponent.html +2 -2
- package/docs/html/classes/CodeHttpErrorService.html +2 -3
- package/docs/html/classes/ErrorCaptureDialogService.html +5 -0
- package/docs/html/classes/ErrorCaptureService.html +2 -3
- package/docs/html/classes/ErrorDialogComponent.html +3 -3
- package/docs/html/classes/MessageHttpErrorComponent.html +2 -2
- package/docs/html/classes/MessageHttpErrorService.html +2 -3
- package/docs/html/classes/OpenApiHttpResponseErrorComponent.html +2 -2
- package/docs/html/classes/OpenApiHttpResponseErrorService.html +2 -3
- 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 -1
- package/docs/html/functions/SimplifyHttpErrorResponse.html +1 -1
- package/docs/html/functions/provideAutoErrorInterception.html +1 -0
- package/docs/html/functions/withErrorCaptureDialogService.html +1 -0
- 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 -0
- 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 -0
- 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_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 -27
- package/docs/markdown/classes/AnyHttpErrorComponent.md +4 -4
- package/docs/markdown/classes/AnyHttpErrorService.md +5 -27
- package/docs/markdown/classes/CodeHttpErrorComponent.md +5 -5
- package/docs/markdown/classes/CodeHttpErrorService.md +5 -27
- package/docs/markdown/classes/ErrorCaptureDialogService.md +69 -0
- package/docs/markdown/classes/ErrorCaptureService.md +5 -23
- package/docs/markdown/classes/ErrorDialogComponent.md +10 -10
- package/docs/markdown/classes/MessageHttpErrorComponent.md +5 -5
- package/docs/markdown/classes/MessageHttpErrorService.md +5 -27
- package/docs/markdown/classes/OpenApiHttpResponseErrorComponent.md +4 -4
- package/docs/markdown/classes/OpenApiHttpResponseErrorService.md +5 -27
- 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 +9 -5
- package/docs/markdown/functions/SimplifyHttpErrorResponse.md +2 -2
- package/docs/markdown/functions/provideAutoErrorInterception.md +21 -0
- package/docs/markdown/functions/withErrorCaptureDialogService.md +21 -0
- package/docs/markdown/globals.md +8 -3
- 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 +35 -0
- 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 +11 -0
- 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_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 -26
- package/docs/wiki/Class.AnyHttpErrorComponent.md +3 -3
- package/docs/wiki/Class.AnyHttpErrorService.md +4 -26
- package/docs/wiki/Class.CodeHttpErrorComponent.md +4 -4
- package/docs/wiki/Class.CodeHttpErrorService.md +4 -26
- package/docs/wiki/Class.ErrorCaptureDialogService.md +65 -0
- package/docs/wiki/Class.ErrorCaptureService.md +4 -22
- package/docs/wiki/Class.ErrorDialogComponent.md +9 -9
- package/docs/wiki/Class.MessageHttpErrorComponent.md +4 -4
- package/docs/wiki/Class.MessageHttpErrorService.md +4 -26
- package/docs/wiki/Class.OpenApiHttpResponseErrorComponent.md +3 -3
- package/docs/wiki/Class.OpenApiHttpResponseErrorService.md +4 -26
- 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 +8 -4
- package/docs/wiki/Function.SimplifyHttpErrorResponse.md +1 -1
- package/docs/wiki/Function.provideAutoErrorInterception.md +17 -0
- package/docs/wiki/Function.withErrorCaptureDialogService.md +17 -0
- 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 +31 -0
- 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 +7 -0
- 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_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/_Sidebar.md +5 -0
- package/docs/wiki/globals.md +7 -2
- package/fesm2022/rxap-ngx-error.mjs +120 -78
- package/fesm2022/rxap-ngx-error.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/error-capture-dialog.service.d.ts +15 -0
- package/lib/error-capture.service.d.ts +1 -3
- package/lib/error-handler.d.ts +1 -2
- package/lib/provide.d.ts +9 -0
- package/lib/tokens.d.ts +2 -0
- package/package.json +36 -40
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule, NgIf, NgClass, NgForOf, DatePipe, KeyValuePipe, JsonPipe } from '@angular/common';
|
|
2
|
+
import { CommonModule, NgIf, NgClass, NgForOf, DOCUMENT, DatePipe, KeyValuePipe, JsonPipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, inject, Component, ChangeDetectionStrategy, signal, computed, EventEmitter, INJECTOR, Injector, ViewChild, Output, ApplicationRef, createComponent, Injectable, isDevMode, runInInjectionContext, ErrorHandler } from '@angular/core';
|
|
5
5
|
import { CopyToClipboardComponent, JsonViewerComponent } from '@rxap/components';
|
|
6
6
|
import * as i1$2 from '@rxap/data-grid';
|
|
7
7
|
import { DataGridCellDefDirective, DataGridComponent, DataGridRowDefDirective, DataGridModule } from '@rxap/data-grid';
|
|
8
8
|
import { RXAP_ENVIRONMENT, IsNotReleaseVersion } from '@rxap/environment';
|
|
9
|
-
import { take } from 'rxjs';
|
|
9
|
+
import { Observable, take, finalize } from 'rxjs';
|
|
10
10
|
import { tap } from 'rxjs/operators';
|
|
11
11
|
import * as i1$1 from '@angular/cdk/portal';
|
|
12
12
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
@@ -19,16 +19,17 @@ const RXAP_ERROR_DIALOG_DATA = new InjectionToken('rxap/error/dialog-data');
|
|
|
19
19
|
const RXAP_ERROR_DIALOG_ERROR = new InjectionToken('rxap/error/dialog-error');
|
|
20
20
|
const RXAP_ERROR_DIALOG_COMPONENT = new InjectionToken('rxap/error/dialog-component');
|
|
21
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');
|
|
22
23
|
|
|
23
24
|
class OpenApiHttpResponseErrorComponent {
|
|
24
25
|
constructor() {
|
|
25
26
|
this.isProduction = inject(RXAP_ENVIRONMENT, { optional: true })?.production ?? false;
|
|
26
27
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
27
28
|
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiHttpResponseErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: OpenApiHttpResponseErrorComponent, isStandalone: true, selector: "rxap-open-api-http-response-error", ngImport: i0, 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 <ng-container *ngFor=\"let entry of value | keyvalue\" [rxapDataGridRowDef]=\"$any(entry.key)\">\n <td *rxapDataGridCellDef=\"let value\">\n <ng-container *ngIf=\"value.length > 1\">\n <ul>\n <li *ngFor=\"let item of value\">{{ item }}</li>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"value.length === 1\">{{ value[0] }}</ng-container>\n <ng-container *ngIf=\"value.length === 0\">NONE</ng-container>\n </td>\n </ng-container>\n </rxap-data-grid>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isProduction\" rxapDataGridRowDef=\"error\">\n <td *rxapDataGridCellDef=\"let value\">\n <ng-container *ngIf=\"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 </ng-container>\n <ng-container *ngIf=\"!value\">NONE</ng-container>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isProduction\" rxapDataGridRowDef=\"body\">\n <td *rxapDataGridCellDef=\"let value\">\n <ng-container *ngIf=\"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 </ng-container>\n <ng-container *ngIf=\"!value\">NONE</ng-container>\n </td>\n </ng-container>\n</rxap-data-grid>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.JsonPipe, name: "json" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "component", type: CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: ["active", "disabled", "value"] }, { kind: "directive", type: DataGridCellDefDirective, selector: "[rxapDataGridCellDef]" }, { kind: "component", type: DataGridComponent, selector: "rxap-data-grid", inputs: ["header", "dataSource", "viewer", "data", "displayProperties", "hideEmptyProperties", "mode"], outputs: ["editModeChange"] }, { kind: "directive", type: DataGridRowDefDirective, selector: "[rxapDataGridRowDef]", inputs: ["data", "rxapDataGridRowDef", "flip"] }, { kind: "component", type: JsonViewerComponent, selector: "rxap-json-viewer", inputs: ["json", "expanded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
30
31
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiHttpResponseErrorComponent, decorators: [{
|
|
32
33
|
type: Component,
|
|
33
34
|
args: [{ selector: 'rxap-open-api-http-response-error', imports: [
|
|
34
35
|
CommonModule, CopyToClipboardComponent, DataGridCellDefDirective, DataGridComponent,
|
|
@@ -70,17 +71,17 @@ class ErrorDialogComponent {
|
|
|
70
71
|
this.dialog.nativeElement.close();
|
|
71
72
|
this.closeDialog.emit();
|
|
72
73
|
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1
|
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
75
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: ErrorDialogComponent, isStandalone: true, selector: "rxap-error-dialog", outputs: { closeDialog: "closeDialog" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, static: true }], ngImport: i0, 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 <div *ngIf=\"data().length > 1\" class=\"controls flex justify-center space-x-2 mt-4\">\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n *ngIf=\"activeIndex() > 0\" 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 <button (click)=\"activeIndex.set(item)\"\n *ngFor=\"let item of displayedButtons()\"\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 <button\n (click)=\"activeIndex.set(activeIndex() + 1)\"\n *ngIf=\"activeIndex() < data().length - 1\" 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 </div>\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", styles: ["dialog::backdrop{background:#000000b3}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
75
76
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorDialogComponent, decorators: [{
|
|
77
78
|
type: Component,
|
|
78
79
|
args: [{ selector: 'rxap-error-dialog', changeDetection: ChangeDetectionStrategy.Default, imports: [
|
|
79
80
|
NgIf,
|
|
80
81
|
NgClass,
|
|
81
82
|
NgForOf,
|
|
82
83
|
PortalModule,
|
|
83
|
-
], 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 <div *ngIf=\"data().length > 1\" class=\"controls flex justify-center space-x-2 mt-4\">\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n *ngIf=\"activeIndex() > 0\" 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\"
|
|
84
|
+
], 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 <div *ngIf=\"data().length > 1\" class=\"controls flex justify-center space-x-2 mt-4\">\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n *ngIf=\"activeIndex() > 0\" 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 <button (click)=\"activeIndex.set(item)\"\n *ngFor=\"let item of displayedButtons()\"\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 <button\n (click)=\"activeIndex.set(activeIndex() + 1)\"\n *ngIf=\"activeIndex() < data().length - 1\" 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 </div>\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", styles: ["dialog::backdrop{background:#000000b3}\n"] }]
|
|
84
85
|
}], propDecorators: { dialog: [{
|
|
85
86
|
type: ViewChild,
|
|
86
87
|
args: ['dialog', { static: true }]
|
|
@@ -88,30 +89,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
88
89
|
type: Output
|
|
89
90
|
}] } });
|
|
90
91
|
|
|
91
|
-
class
|
|
92
|
+
class ErrorCaptureDialogService {
|
|
92
93
|
constructor() {
|
|
93
94
|
this.applicationRef = inject(ApplicationRef);
|
|
94
|
-
this.
|
|
95
|
-
}
|
|
96
|
-
push(error) {
|
|
97
|
-
if (this.errorList.length) {
|
|
98
|
-
const last = this.errorList[this.errorList.length - 1];
|
|
99
|
-
const value = last();
|
|
100
|
-
if (value.some(e => this.compare(e, error))) {
|
|
101
|
-
last.update(value => {
|
|
102
|
-
value.push(error);
|
|
103
|
-
return value.slice();
|
|
104
|
-
});
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
const newList = signal([error]);
|
|
109
|
-
this.errorList.push(newList);
|
|
110
|
-
this.openDialog(newList);
|
|
95
|
+
this.document = inject(DOCUMENT);
|
|
111
96
|
}
|
|
112
|
-
|
|
113
|
-
const body = document.getElementsByTagName('body')[0];
|
|
114
|
-
const div = document.createElement('div');
|
|
97
|
+
open(component, errorList) {
|
|
98
|
+
const body = this.document.getElementsByTagName('body')[0];
|
|
99
|
+
const div = this.document.createElement('div');
|
|
115
100
|
body.appendChild(div);
|
|
116
101
|
const componentRef = createComponent(ErrorDialogComponent, {
|
|
117
102
|
hostElement: div,
|
|
@@ -124,23 +109,59 @@ class ErrorCaptureService {
|
|
|
124
109
|
},
|
|
125
110
|
{
|
|
126
111
|
provide: RXAP_ERROR_DIALOG_COMPONENT,
|
|
127
|
-
useValue:
|
|
112
|
+
useValue: component,
|
|
128
113
|
},
|
|
129
114
|
],
|
|
130
115
|
}),
|
|
131
116
|
});
|
|
132
117
|
this.applicationRef.attachView(componentRef.hostView);
|
|
133
|
-
|
|
134
|
-
componentRef.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
118
|
+
return new Observable(subscriber => {
|
|
119
|
+
const subscription = componentRef.instance.closeDialog.pipe(take(1), tap(() => {
|
|
120
|
+
subscriber.next();
|
|
121
|
+
subscriber.complete();
|
|
122
|
+
}), finalize(() => {
|
|
123
|
+
componentRef.destroy();
|
|
124
|
+
body.removeChild(div);
|
|
125
|
+
div.remove();
|
|
126
|
+
})).subscribe();
|
|
127
|
+
return () => {
|
|
128
|
+
subscription.unsubscribe();
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorCaptureDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
133
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorCaptureDialogService, providedIn: 'root' }); }
|
|
142
134
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorCaptureDialogService, decorators: [{
|
|
136
|
+
type: Injectable,
|
|
137
|
+
args: [{ providedIn: 'root' }]
|
|
138
|
+
}] });
|
|
139
|
+
|
|
140
|
+
class ErrorCaptureService {
|
|
141
|
+
constructor() {
|
|
142
|
+
this.errorCaptureDialogService = inject(RXAP_ERROR_CAPTURE_DIALOG_SERVICE, { optional: true }) ?? inject(ErrorCaptureDialogService);
|
|
143
|
+
this.errorList = [];
|
|
144
|
+
}
|
|
145
|
+
push(error) {
|
|
146
|
+
if (this.errorList.length) {
|
|
147
|
+
const last = this.errorList[this.errorList.length - 1];
|
|
148
|
+
const value = last();
|
|
149
|
+
if (value.some(e => this.compare(e, error))) {
|
|
150
|
+
last.update(value => {
|
|
151
|
+
value.push(error);
|
|
152
|
+
return value.slice();
|
|
153
|
+
});
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const newList = signal([error]);
|
|
158
|
+
this.errorList.push(newList);
|
|
159
|
+
this.errorCaptureDialogService.open(this.component, newList);
|
|
160
|
+
}
|
|
161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorCaptureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
162
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorCaptureService }); }
|
|
163
|
+
}
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ErrorCaptureService, decorators: [{
|
|
144
165
|
type: Injectable
|
|
145
166
|
}] });
|
|
146
167
|
|
|
@@ -149,10 +170,10 @@ class AnyHttpErrorComponent {
|
|
|
149
170
|
this.isProduction = inject(RXAP_ENVIRONMENT, { optional: true })?.production ?? false;
|
|
150
171
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
151
172
|
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1
|
|
173
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AnyHttpErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
174
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: AnyHttpErrorComponent, isStandalone: true, selector: "rxap-any-http-error", ngImport: i0, 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 <ng-container *ngFor=\"let entry of value | keyvalue\" [rxapDataGridRowDef]=\"$any(entry.key)\">\n <td *rxapDataGridCellDef=\"let value\">\n <ng-container *ngIf=\"value.length > 1\">\n <ul>\n <li *ngFor=\"let item of value\">{{ item }}</li>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"value.length === 1\">{{ value[0] }}</ng-container>\n <ng-container *ngIf=\"value.length === 0\">NONE</ng-container>\n </td>\n </ng-container>\n </rxap-data-grid>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isProduction\" rxapDataGridRowDef=\"error\">\n <td *rxapDataGridCellDef=\"let value\">\n <ng-container *ngIf=\"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 </ng-container>\n <ng-container *ngIf=\"!value\">NONE</ng-container>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isProduction\" rxapDataGridRowDef=\"body\">\n <td *rxapDataGridCellDef=\"let value\">\n <ng-container *ngIf=\"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 </ng-container>\n <ng-container *ngIf=\"!value\">NONE</ng-container>\n </td>\n </ng-container>\n</rxap-data-grid>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DataGridModule }, { kind: "component", type: i1$2.DataGridComponent, selector: "rxap-data-grid", inputs: ["header", "dataSource", "viewer", "data", "displayProperties", "hideEmptyProperties", "mode"], outputs: ["editModeChange"] }, { kind: "directive", type: i1$2.DataGridRowDefDirective, selector: "[rxapDataGridRowDef]", inputs: ["data", "rxapDataGridRowDef", "flip"] }, { kind: "directive", type: i1$2.DataGridCellDefDirective, selector: "[rxapDataGridCellDef]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: ["active", "disabled", "value"] }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "component", type: JsonViewerComponent, selector: "rxap-json-viewer", inputs: ["json", "expanded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
154
175
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AnyHttpErrorComponent, decorators: [{
|
|
156
177
|
type: Component,
|
|
157
178
|
args: [{ selector: 'rxap-any-http-error', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
158
179
|
DataGridModule,
|
|
@@ -174,10 +195,10 @@ class AnyHttpErrorService extends ErrorCaptureService {
|
|
|
174
195
|
compare(a, b) {
|
|
175
196
|
return a.url === b.url && a.method === b.method && a.status === b.status && a.message === b.message;
|
|
176
197
|
}
|
|
177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
178
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AnyHttpErrorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
199
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AnyHttpErrorService, providedIn: 'root' }); }
|
|
179
200
|
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AnyHttpErrorService, decorators: [{
|
|
181
202
|
type: Injectable,
|
|
182
203
|
args: [{ providedIn: 'root' }]
|
|
183
204
|
}] });
|
|
@@ -190,10 +211,10 @@ class OpenApiHttpResponseErrorService extends AnyHttpErrorService {
|
|
|
190
211
|
compare(a, b) {
|
|
191
212
|
return true;
|
|
192
213
|
}
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
194
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
214
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiHttpResponseErrorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
215
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiHttpResponseErrorService, providedIn: 'root' }); }
|
|
195
216
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiHttpResponseErrorService, decorators: [{
|
|
197
218
|
type: Injectable,
|
|
198
219
|
args: [{ providedIn: 'root' }]
|
|
199
220
|
}] });
|
|
@@ -204,10 +225,10 @@ class MessageHttpErrorComponent {
|
|
|
204
225
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
205
226
|
this.showMore = signal(false);
|
|
206
227
|
}
|
|
207
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
208
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1
|
|
228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MessageHttpErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
229
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: MessageHttpErrorComponent, isStandalone: true, selector: "rxap-http-error-message", ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <p class=\"text-xl\">Http Error Message:</p>\n <p>{{ error.error.message }}</p>\n <ng-container *ngIf=\"!isProduction\">\n <hr>\n <button (click)=\"showMore.set(true)\"\n *ngIf=\"!showMore()\"\n class=\"px-4 py-2 rounded bg-accent-500\">\n <ng-container i18n>Show more details</ng-container>\n </button>\n <rxap-any-http-error *ngIf=\"showMore()\"></rxap-any-http-error>\n </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AnyHttpErrorComponent, selector: "rxap-any-http-error" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
209
230
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MessageHttpErrorComponent, decorators: [{
|
|
211
232
|
type: Component,
|
|
212
233
|
args: [{ selector: 'rxap-http-error-message', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
213
234
|
NgIf,
|
|
@@ -223,10 +244,10 @@ class MessageHttpErrorService extends AnyHttpErrorService {
|
|
|
223
244
|
compare(a, b) {
|
|
224
245
|
return super.compare(a, b) && a.error.message === b.error.message;
|
|
225
246
|
}
|
|
226
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
227
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MessageHttpErrorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
248
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MessageHttpErrorService, providedIn: 'root' }); }
|
|
228
249
|
}
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MessageHttpErrorService, decorators: [{
|
|
230
251
|
type: Injectable,
|
|
231
252
|
args: [{ providedIn: 'root' }]
|
|
232
253
|
}] });
|
|
@@ -244,10 +265,10 @@ class AngularErrorComponent {
|
|
|
244
265
|
get hasExtra() {
|
|
245
266
|
return Object.keys(this.error.extra).length > 0;
|
|
246
267
|
}
|
|
247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
248
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1
|
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AngularErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
269
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: AngularErrorComponent, isStandalone: true, selector: "rxap-angular-error", ngImport: i0, template: "<rxap-data-grid [data]=\"error\">\n <ng-container *ngIf=\"error.name\" rxapDataGridRowDef=\"name\"></ng-container>\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n <ng-container *ngIf=\"hasExtra || hasTags || hasContexts || error.stack\" rxapDataGridRowDef>\n <th *rxapDataGridHeaderCellDef>\n <span i18n>Details</span>\n </th>\n </ng-container>\n <ng-container *ngIf=\"error.stack\" rxapDataGridRowDef=\"stack\">\n <td *rxapDataGridCellDef=\"let value\">\n <pre>{{ value }}</pre>\n </td>\n </ng-container>\n <ng-container *ngIf=\"hasTags\" rxapDataGridRowDef=\"tags\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n <ng-container *ngIf=\"hasExtra\" rxapDataGridRowDef=\"extra\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n <ng-container *ngIf=\"hasContexts\" rxapDataGridRowDef=\"contexts\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n</rxap-data-grid>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DataGridModule }, { kind: "component", type: i1$2.DataGridComponent, selector: "rxap-data-grid", inputs: ["header", "dataSource", "viewer", "data", "displayProperties", "hideEmptyProperties", "mode"], outputs: ["editModeChange"] }, { kind: "directive", type: i1$2.DataGridRowDefDirective, selector: "[rxapDataGridRowDef]", inputs: ["data", "rxapDataGridRowDef", "flip"] }, { kind: "directive", type: i1$2.DataGridHeaderCellDefDirective, selector: "[rxapDataGridHeaderCellDef]" }, { kind: "directive", type: i1$2.DataGridCellDefDirective, selector: "[rxapDataGridCellDef]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
249
270
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AngularErrorComponent, decorators: [{
|
|
251
272
|
type: Component,
|
|
252
273
|
args: [{ selector: 'rxap-angular-error', imports: [DataGridModule, KeyValuePipe, NgForOf, NgIf], template: "<rxap-data-grid [data]=\"error\">\n <ng-container *ngIf=\"error.name\" rxapDataGridRowDef=\"name\"></ng-container>\n <ng-container rxapDataGridRowDef=\"message\"></ng-container>\n <ng-container *ngIf=\"hasExtra || hasTags || hasContexts || error.stack\" rxapDataGridRowDef>\n <th *rxapDataGridHeaderCellDef>\n <span i18n>Details</span>\n </th>\n </ng-container>\n <ng-container *ngIf=\"error.stack\" rxapDataGridRowDef=\"stack\">\n <td *rxapDataGridCellDef=\"let value\">\n <pre>{{ value }}</pre>\n </td>\n </ng-container>\n <ng-container *ngIf=\"hasTags\" rxapDataGridRowDef=\"tags\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n <ng-container *ngIf=\"hasExtra\" rxapDataGridRowDef=\"extra\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n <ng-container *ngIf=\"hasContexts\" rxapDataGridRowDef=\"contexts\">\n <td *rxapDataGridCellDef=\"let value\">\n <rxap-data-grid [data]=\"value\" auto></rxap-data-grid>\n </td>\n </ng-container>\n</rxap-data-grid>\n" }]
|
|
253
274
|
}] });
|
|
@@ -260,10 +281,10 @@ class AngularErrorService extends ErrorCaptureService {
|
|
|
260
281
|
compare(a, b) {
|
|
261
282
|
return true;
|
|
262
283
|
}
|
|
263
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
264
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AngularErrorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
285
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AngularErrorService, providedIn: 'root' }); }
|
|
265
286
|
}
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AngularErrorService, decorators: [{
|
|
267
288
|
type: Injectable,
|
|
268
289
|
args: [{ providedIn: 'root' }]
|
|
269
290
|
}] });
|
|
@@ -274,10 +295,10 @@ class CodeHttpErrorComponent {
|
|
|
274
295
|
this.error = inject(RXAP_ERROR_DIALOG_ERROR);
|
|
275
296
|
this.showMore = signal(false);
|
|
276
297
|
}
|
|
277
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1
|
|
298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CodeHttpErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
299
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: CodeHttpErrorComponent, isStandalone: true, selector: "rxap-http-error-message", ngImport: i0, 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 <ng-container *ngIf=\"!isProduction\">\n <hr>\n <button (click)=\"showMore.set(true)\"\n *ngIf=\"!showMore()\"\n class=\"px-4 py-2 rounded bg-accent-500\">\n <ng-container i18n>Show more details</ng-container>\n </button>\n <rxap-any-http-error *ngIf=\"showMore()\"></rxap-any-http-error>\n </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AnyHttpErrorComponent, selector: "rxap-any-http-error" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
279
300
|
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CodeHttpErrorComponent, decorators: [{
|
|
281
302
|
type: Component,
|
|
282
303
|
args: [{ selector: 'rxap-http-error-message', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
283
304
|
NgIf,
|
|
@@ -293,10 +314,10 @@ class CodeHttpErrorService extends AnyHttpErrorService {
|
|
|
293
314
|
compare(a, b) {
|
|
294
315
|
return super.compare(a, b) && a.errorCode === b.errorCode;
|
|
295
316
|
}
|
|
296
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
297
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CodeHttpErrorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
318
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CodeHttpErrorService, providedIn: 'root' }); }
|
|
298
319
|
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CodeHttpErrorService, decorators: [{
|
|
300
321
|
type: Injectable,
|
|
301
322
|
args: [{ providedIn: 'root' }]
|
|
302
323
|
}] });
|
|
@@ -490,18 +511,12 @@ class RxapErrorHandler {
|
|
|
490
511
|
inject(AngularErrorService).push(data);
|
|
491
512
|
});
|
|
492
513
|
}
|
|
493
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
494
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RxapErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
515
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RxapErrorHandler }); }
|
|
495
516
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RxapErrorHandler, decorators: [{
|
|
497
518
|
type: Injectable
|
|
498
519
|
}] });
|
|
499
|
-
function ProvideErrorHandler() {
|
|
500
|
-
return {
|
|
501
|
-
provide: ErrorHandler,
|
|
502
|
-
useClass: RxapErrorHandler,
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
520
|
|
|
506
521
|
function DefaultErrorCodeExtractor(error) {
|
|
507
522
|
return error.error?.code ?? null;
|
|
@@ -571,6 +586,33 @@ function HttpErrorInterceptor(req, next) {
|
|
|
571
586
|
}));
|
|
572
587
|
}
|
|
573
588
|
|
|
589
|
+
function provideAutoErrorInterception(...providers) {
|
|
590
|
+
return [
|
|
591
|
+
{
|
|
592
|
+
provide: ErrorHandler,
|
|
593
|
+
useClass: RxapErrorHandler,
|
|
594
|
+
},
|
|
595
|
+
...providers,
|
|
596
|
+
];
|
|
597
|
+
}
|
|
598
|
+
function withErrorCaptureDialogService(service) {
|
|
599
|
+
return {
|
|
600
|
+
provide: RXAP_ERROR_CAPTURE_DIALOG_SERVICE,
|
|
601
|
+
useClass: service,
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* @deprecated Use `provideAutoErrorInterception` instead.
|
|
606
|
+
*/
|
|
607
|
+
function ProvideErrorHandler() {
|
|
608
|
+
return [
|
|
609
|
+
{
|
|
610
|
+
provide: ErrorHandler,
|
|
611
|
+
useClass: RxapErrorHandler,
|
|
612
|
+
}
|
|
613
|
+
];
|
|
614
|
+
}
|
|
615
|
+
|
|
574
616
|
// region open-api-http-response-error
|
|
575
617
|
// endregion
|
|
576
618
|
|
|
@@ -578,5 +620,5 @@ function HttpErrorInterceptor(req, next) {
|
|
|
578
620
|
* Generated bundle index. Do not edit.
|
|
579
621
|
*/
|
|
580
622
|
|
|
581
|
-
export { AngularErrorComponent, AngularErrorService, AnyHttpErrorComponent, AnyHttpErrorService, CodeHttpErrorComponent, CodeHttpErrorService, DefaultErrorCodeExtractor, DefaultErrorFilter, ErrorCaptureService, ErrorDialogComponent, ExtractContextFromError, ExtractError, ExtractExtraFromError, ExtractTagsFromError, HttpErrorInterceptor, MessageHttpErrorComponent, MessageHttpErrorService, OpenApiHttpResponseErrorComponent, OpenApiHttpResponseErrorService, PrintError, ProvideErrorHandler, RXAP_ERROR_DIALOG_COMPONENT, RXAP_ERROR_DIALOG_DATA, RXAP_ERROR_DIALOG_ERROR, RXAP_ERROR_HANDLER_OPTIONS, RXAP_ERROR_INTERCEPTOR_OPTIONS, RxapErrorHandler, SimplifyHttpErrorResponse };
|
|
623
|
+
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_ERROR, RXAP_ERROR_HANDLER_OPTIONS, RXAP_ERROR_INTERCEPTOR_OPTIONS, RxapErrorHandler, SimplifyHttpErrorResponse, provideAutoErrorInterception, withErrorCaptureDialogService };
|
|
582
624
|
//# sourceMappingURL=rxap-ngx-error.mjs.map
|