@rxap/ngx-error 21.0.1-dev.0 → 21.0.1
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 +46 -0
- package/compodoc/changelog.html +44 -0
- package/compodoc/components/AngularErrorComponent.html +16 -7
- package/compodoc/components/AnyHttpErrorComponent.html +18 -6
- package/compodoc/components/ErrorDialogComponent.html +67 -47
- package/compodoc/dependencies.html +5 -5
- package/compodoc/injectables/ErrorCaptureDialogService.html +7 -6
- package/compodoc/interfaces/IErrorCaptureDialogService.html +4 -3
- package/compodoc/interfaces/IErrorDialogComponent.html +10 -13
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +947 -983
- package/docs/html/assets/hierarchy.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 -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 -6
- 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 +13 -35
- 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 +12 -34
- 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 +20 -48
- package/fesm2022/rxap-ngx-error.mjs.map +1 -1
- package/package.json +25 -25
- package/types/rxap-ngx-error.d.ts +5 -5
|
@@ -201,19 +201,18 @@
|
|
|
201
201
|
} from '@angular/cdk/portal';
|
|
202
202
|
import { NgClass } from '@angular/common';
|
|
203
203
|
import {
|
|
204
|
-
|
|
204
|
+
afterNextRender,
|
|
205
205
|
ChangeDetectionStrategy,
|
|
206
206
|
Component,
|
|
207
207
|
computed,
|
|
208
208
|
ElementRef,
|
|
209
|
-
EventEmitter,
|
|
210
209
|
inject,
|
|
211
210
|
INJECTOR,
|
|
212
211
|
Injector,
|
|
213
|
-
|
|
212
|
+
output,
|
|
214
213
|
signal,
|
|
215
214
|
Signal,
|
|
216
|
-
|
|
215
|
+
viewChild
|
|
217
216
|
} from '@angular/core';
|
|
218
217
|
import {
|
|
219
218
|
RXAP_ERROR_DIALOG_COMPONENT,
|
|
@@ -229,16 +228,15 @@ export interface IErrorDialogComponent<Error = any> {
|
|
|
229
228
|
selector: 'rxap-error-dialog',
|
|
230
229
|
templateUrl: './error-dialog.component.html',
|
|
231
230
|
styleUrls: ['./error-dialog.component.scss'],
|
|
232
|
-
changeDetection: ChangeDetectionStrategy.
|
|
231
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
233
232
|
imports: [
|
|
234
233
|
NgClass,
|
|
235
234
|
PortalModule
|
|
236
235
|
]
|
|
237
236
|
})
|
|
238
|
-
export class ErrorDialogComponent
|
|
237
|
+
export class ErrorDialogComponent {
|
|
239
238
|
|
|
240
|
-
|
|
241
|
-
public dialog!: ElementRef<HTMLDialogElement>;
|
|
239
|
+
public readonly dialog = viewChild.required<ElementRef<HTMLDialogElement>>('dialog');
|
|
242
240
|
|
|
243
241
|
public readonly data: Signal<any[]> = inject(RXAP_ERROR_DIALOG_DATA);
|
|
244
242
|
|
|
@@ -248,8 +246,7 @@ export class ErrorDialogComponent implements AfterViewInit {
|
|
|
248
246
|
const end = Math.min(this.data().length, start + 5);
|
|
249
247
|
return Array.from({ length: end - start }, (_, i) => start + i);
|
|
250
248
|
});
|
|
251
|
-
|
|
252
|
-
public closeDialog = new EventEmitter<void>();
|
|
249
|
+
public readonly closeDialog = output<void>();
|
|
253
250
|
private readonly component = inject(RXAP_ERROR_DIALOG_COMPONENT);
|
|
254
251
|
private readonly injector = inject(INJECTOR);
|
|
255
252
|
public readonly componentPortal = computed(() => {
|
|
@@ -267,12 +264,12 @@ export class ErrorDialogComponent implements AfterViewInit {
|
|
|
267
264
|
return new ComponentPortal(this.component, null, injector);
|
|
268
265
|
});
|
|
269
266
|
|
|
270
|
-
|
|
271
|
-
this.dialog.nativeElement.showModal();
|
|
267
|
+
constructor() {
|
|
268
|
+
afterNextRender(() => this.dialog().nativeElement.showModal());
|
|
272
269
|
}
|
|
273
270
|
|
|
274
271
|
close() {
|
|
275
|
-
this.dialog.nativeElement.close();
|
|
272
|
+
this.dialog().nativeElement.close();
|
|
276
273
|
this.closeDialog.emit();
|
|
277
274
|
}
|
|
278
275
|
|