@esfaenza/core 19.2.153 → 19.2.155

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,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Optional, Inject, Injectable, signal } from '@angular/core';
3
3
  import { JaceIdentity, USE_FAKE_ACCESS_TOKEN, ANONYMOUS_MODE, ActiveModuleView, UpdateProfilePictureDto, UpdateAccountRecoverySettingsDto, UpdatePasswordDto } from '@esfaenza/core/domain';
4
4
  import * as i1 from 'ngx-cookie-service';
5
- import { of, Subject, filter, firstValueFrom } from 'rxjs';
5
+ import { of, Subject, firstValueFrom, filter } from 'rxjs';
6
6
  import * as i2 from '@angular/common/http';
7
7
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
8
8
  import * as i1$1 from '@angular/router';
@@ -12,11 +12,11 @@ import { LocalizationService } from '@esfaenza/localizations';
12
12
  import * as i5 from '@esfaenza/extensions';
13
13
  import { InboundMessageTypes, MessageService, CallResult } from '@esfaenza/extensions';
14
14
  import { HTTPService } from '@esfaenza/httpservice';
15
- import * as i4 from '@esfaenza/signalr-notifications';
15
+ import * as i4 from '@esfaenza/preferences';
16
+ import { CachePersistor, PreferencesPersistor } from '@esfaenza/preferences';
17
+ import * as i4$1 from '@esfaenza/signalr-notifications';
16
18
  import * as i5$1 from '@esfaenza/access-control';
17
19
  import { AccessControlRouteGuard } from '@esfaenza/access-control';
18
- import * as i4$1 from '@esfaenza/preferences';
19
- import { CachePersistor, PreferencesPersistor } from '@esfaenza/preferences';
20
20
  import { catchError, map } from 'rxjs/operators';
21
21
  import { DomSanitizer } from '@angular/platform-browser';
22
22
 
@@ -1169,9 +1169,9 @@ class AppState {
1169
1169
  this.notifyDataChanged("modules.Retrieved", this._modules);
1170
1170
  }
1171
1171
  get Modules() { return this._modules; }
1172
- constructor(router, lc, inj, bts, notifications, MessageDef, intercom, emb, fakeToken, anonymousMode) {
1172
+ constructor(router, prefs, inj, bts, notifications, MessageDef, intercom, emb, fakeToken, anonymousMode) {
1173
1173
  this.router = router;
1174
- this.lc = lc;
1174
+ this.prefs = prefs;
1175
1175
  this.inj = inj;
1176
1176
  this.bts = bts;
1177
1177
  this.notifications = notifications;
@@ -1180,6 +1180,7 @@ class AppState {
1180
1180
  this.emb = emb;
1181
1181
  this.fakeToken = fakeToken;
1182
1182
  this.anonymousMode = anonymousMode;
1183
+ this.PREFS_DISABLE_EFFECTS = "PREFS_DISABLE_EFFECTS";
1183
1184
  this.graphicEffects = signal(true);
1184
1185
  this.redirectingToLogin = false;
1185
1186
  this.handlingError = false;
@@ -1193,6 +1194,7 @@ class AppState {
1193
1194
  this._subscriptions = new Map();
1194
1195
  this.ModulesLocalizations = {};
1195
1196
  this.hookEmbedding();
1197
+ this.hookPreferences();
1196
1198
  this.setupSignalRJobListening();
1197
1199
  this.getActiveJaceModules();
1198
1200
  this.JaceIdentity = null;
@@ -1209,6 +1211,10 @@ class AppState {
1209
1211
  this.halloweenTime.set(today > lowerBound && today < upperBound);
1210
1212
  this.intercom.inbounds.subscribe((t) => { this.handleInboundMessage(t); });
1211
1213
  }
1214
+ async hookPreferences() {
1215
+ let effectsOff = (await firstValueFrom(this.prefs.getItem(this.PREFS_DISABLE_EFFECTS))) || false;
1216
+ this.graphicEffects.set(!effectsOff);
1217
+ }
1212
1218
  getActiveJaceModules() {
1213
1219
  // Recupero i moduli dopo un frame. mi assicuro che l'injection tree sia stabile.
1214
1220
  // Altrimenti l'httpservice che prende l'httpserviceextensions providato da core quando anche l'appstate è providedin root
@@ -1372,13 +1378,13 @@ class AppState {
1372
1378
  setHeaderHeight(height) {
1373
1379
  this.headerHeight = height;
1374
1380
  }
1375
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i1$2.LocalizationService }, { token: i0.Injector }, { token: TokenService }, { token: i4.NotificationsService }, { token: i4.BaseMessageService }, { token: i5.InterComService }, { token: i5.AppEmbeddingExtensions }, { token: USE_FAKE_ACCESS_TOKEN }, { token: ANONYMOUS_MODE }], target: i0.ɵɵFactoryTarget.Injectable }); }
1381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i4.PreferencesService }, { token: i0.Injector }, { token: TokenService }, { token: i4$1.NotificationsService }, { token: i4$1.BaseMessageService }, { token: i5.InterComService }, { token: i5.AppEmbeddingExtensions }, { token: USE_FAKE_ACCESS_TOKEN }, { token: ANONYMOUS_MODE }], target: i0.ɵɵFactoryTarget.Injectable }); }
1376
1382
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppState, providedIn: "root" }); }
1377
1383
  }
1378
1384
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppState, decorators: [{
1379
1385
  type: Injectable,
1380
1386
  args: [{ providedIn: "root" }]
1381
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: i1$2.LocalizationService }, { type: i0.Injector }, { type: TokenService }, { type: i4.NotificationsService }, { type: i4.BaseMessageService }, { type: i5.InterComService }, { type: i5.AppEmbeddingExtensions }, { type: undefined, decorators: [{
1387
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: i4.PreferencesService }, { type: i0.Injector }, { type: TokenService }, { type: i4$1.NotificationsService }, { type: i4$1.BaseMessageService }, { type: i5.InterComService }, { type: i5.AppEmbeddingExtensions }, { type: undefined, decorators: [{
1382
1388
  type: Inject,
1383
1389
  args: [USE_FAKE_ACCESS_TOKEN]
1384
1390
  }] }, { type: undefined, decorators: [{
@@ -1615,12 +1621,12 @@ class ApplicationCachePersistor extends CachePersistor {
1615
1621
  getItemUrl(sessionKey, itemKey) {
1616
1622
  return `${this.getItemsUrl(sessionKey)}/${itemKey}`;
1617
1623
  }
1618
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationCachePersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4$1.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable }); }
1624
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationCachePersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable }); }
1619
1625
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationCachePersistor }); }
1620
1626
  }
1621
1627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationCachePersistor, decorators: [{
1622
1628
  type: Injectable
1623
- }], ctorParameters: () => [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4$1.BaseSessionRetriever }] });
1629
+ }], ctorParameters: () => [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4.BaseSessionRetriever }] });
1624
1630
 
1625
1631
  // Angular
1626
1632
  // Chiamate ai Repository
@@ -1697,12 +1703,12 @@ class ApplicationPreferencesPersistor extends PreferencesPersistor {
1697
1703
  getItemUrl(sessionKey, itemKey) {
1698
1704
  return `${this.getItemsUrl(sessionKey)}/${itemKey}`;
1699
1705
  }
1700
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationPreferencesPersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4$1.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable }); }
1706
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationPreferencesPersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable }); }
1701
1707
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationPreferencesPersistor }); }
1702
1708
  }
1703
1709
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ApplicationPreferencesPersistor, decorators: [{
1704
1710
  type: Injectable
1705
- }], ctorParameters: () => [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4$1.BaseSessionRetriever }] });
1711
+ }], ctorParameters: () => [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4.BaseSessionRetriever }] });
1706
1712
 
1707
1713
  // Angular
1708
1714
  // Chiamate ai Repository