@arsedizioni/ars-utils 19.3.14 → 19.3.16

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.
@@ -2,6 +2,7 @@ export declare const ClipperMessages: {
2
2
  /**
3
3
  * Messages
4
4
  */
5
+ ERROR: string;
5
6
  LOGIN_CHANGED: string;
6
7
  LOGIN_COMPLETED: string;
7
8
  LOGOUT_COMPLETED: string;
@@ -41,6 +41,7 @@ export interface ErrorInfo {
41
41
  title?: string;
42
42
  message?: string;
43
43
  errorStatus?: number;
44
+ service?: string;
44
45
  }
45
46
  export interface NameValueItem<T> {
46
47
  name: string;
@@ -2,6 +2,5 @@ export declare const UtilsMessages: {
2
2
  /**
3
3
  * Messages
4
4
  */
5
- UTILS_ERROR_MESSAGE: string;
6
5
  UTILS_DIALOGS_SELECT_OPTIONS_CHANGED: string;
7
6
  };
@@ -1,4 +1,5 @@
1
1
  export declare const EvolutionMessages: {
2
+ ERROR: string;
2
3
  LOGIN_CHANGED: string;
3
4
  LOGIN_COMPLETED: string;
4
5
  LOGOUT_COMPLETED: string;
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { signal, computed, inject, Injectable, NgModule } from '@angular/core';
3
3
  import { HttpClient, HttpHeaders, HttpRequest, HttpErrorResponse } from '@angular/common/http';
4
- import { BroadcastService, SystemUtils, UtilsMessages } from '@arsedizioni/ars-utils/core';
4
+ import { BroadcastService, SystemUtils } from '@arsedizioni/ars-utils/core';
5
5
  import { EMPTY, throwError, of, catchError as catchError$1, switchMap } from 'rxjs';
6
6
  import { DialogService } from '@arsedizioni/ars-utils/ui';
7
7
  import { catchError, map, finalize } from 'rxjs/operators';
@@ -10,6 +10,8 @@ const ClipperMessages = {
10
10
  /**
11
11
  * Messages
12
12
  */
13
+ // Error
14
+ ERROR: '§clipper-error',
13
15
  // Login
14
16
  LOGIN_CHANGED: '§clipper-login-changed',
15
17
  LOGIN_COMPLETED: '§clipper-login-completed',
@@ -3217,11 +3219,12 @@ class ClipperAuthInterceptor {
3217
3219
  message = (error.error?.message ?? error.message ?? "Impossibile eseguire l'operazione richiesta.").replaceAll("\r\n", "</p><p>");
3218
3220
  break;
3219
3221
  }
3220
- this.broadcastService.sendMessage(UtilsMessages.UTILS_ERROR_MESSAGE, {
3222
+ this.broadcastService.sendMessage(ClipperMessages.ERROR, {
3221
3223
  invalidateSession: errorStatus === 405 || errorStatus === 410,
3222
3224
  message: message,
3223
3225
  title: "Errore in Clipper",
3224
- errorStatus: errorStatus
3226
+ errorStatus: errorStatus,
3227
+ service: this.clipperService.serviceUri
3225
3228
  });
3226
3229
  }
3227
3230
  }