@flusys/ng-shared 6.1.2 → 6.2.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.
@@ -3,7 +3,7 @@ import { inject, PLATFORM_ID, Injectable, DOCUMENT, REQUEST, signal, computed, E
3
3
  import * as i1 from '@angular/common';
4
4
  import { isPlatformServer, DOCUMENT as DOCUMENT$1, isPlatformBrowser, CommonModule, NgOptimizedImage, NgComponentOutlet, DatePipe } from '@angular/common';
5
5
  import { HttpClient, HttpContextToken, HttpHeaders, HttpParams } from '@angular/common/http';
6
- import { APP_CONFIG, getServiceUrl, LOCALIZATION_STATE_SERVICE, FALLBACK_MESSAGES_REGISTRY, LOCALIZATION_API_SERVICE } from '@flusys/ng-core';
6
+ import { APP_CONFIG, getServiceUrl, LOCALIZATION_STATE_SERVICE, FALLBACK_MESSAGES_REGISTRY, LOCALIZATION_API_SERVICE, isServiceEnabled } from '@flusys/ng-core';
7
7
  import { of, catchError as catchError$1, throwError, firstValueFrom, map as map$1 } from 'rxjs';
8
8
  import { map, tap, catchError } from 'rxjs/operators';
9
9
  import * as i2 from '@angular/forms';
@@ -1755,6 +1755,7 @@ class BaseListComponent {
1755
1755
  });
1756
1756
  router = inject(Router, { optional: true });
1757
1757
  messageService = inject(MessageService, { optional: true });
1758
+ appConfig = inject(APP_CONFIG);
1758
1759
  confirmationService = inject(ConfirmationService, {
1759
1760
  optional: true,
1760
1761
  });
@@ -1911,8 +1912,8 @@ class BaseListComponent {
1911
1912
  this.messageService?.add({
1912
1913
  severity: 'success',
1913
1914
  summary: this.t('shared.success'),
1914
- detail: response?.messageKey
1915
- ? this.t(response.messageKey, response.messageVariables)
1915
+ detail: response && isServiceEnabled(this.appConfig, 'localization')
1916
+ ? this.t(response?.messageKey || '', response.messageVariables)
1916
1917
  : (response?.message ?? ''),
1917
1918
  });
1918
1919
  this.service()?.reload();