@esfaenza/core 15.2.315 → 15.2.317

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.
@@ -9,8 +9,9 @@ import * as i1$1 from '@angular/router';
9
9
  import { Router } from '@angular/router';
10
10
  import * as i1$2 from '@esfaenza/localizations';
11
11
  import { LocalizationService } from '@esfaenza/localizations';
12
- import * as i6 from '@esfaenza/extensions';
12
+ import * as i5 from '@esfaenza/extensions';
13
13
  import { InboundMessageTypes, MessageService, CallResult } from '@esfaenza/extensions';
14
+ import { HTTPService } from '@esfaenza/httpservice';
14
15
  import * as customParseFormat from 'dayjs/plugin/customParseFormat';
15
16
  import * as isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
16
17
  import * as isSameOrAfter from 'dayjs/plugin/isSameOrAfter';
@@ -18,12 +19,10 @@ import * as isBetween from 'dayjs/plugin/isBetween';
18
19
  import * as duration from 'dayjs/plugin/duration';
19
20
  import * as minMax from 'dayjs/plugin/minMax';
20
21
  import * as utc from 'dayjs/plugin/utc';
21
- import * as i3 from '@esfaenza/httpservice';
22
- import { HTTPService } from '@esfaenza/httpservice';
23
- import * as i5 from '@esfaenza/signalr-notifications';
22
+ import * as i4 from '@esfaenza/signalr-notifications';
24
23
  import * as i5$1 from '@esfaenza/access-control';
25
24
  import { AccessControlRouteGuard } from '@esfaenza/access-control';
26
- import * as i4 from '@esfaenza/preferences';
25
+ import * as i4$1 from '@esfaenza/preferences';
27
26
  import { CachePersistor, PreferencesPersistor } from '@esfaenza/preferences';
28
27
  import { catchError, map } from 'rxjs/operators';
29
28
  import { __awaiter } from 'tslib';
@@ -1170,10 +1169,10 @@ class AppState {
1170
1169
  this.notifyDataChanged("modules.Retrieved", this._modules);
1171
1170
  }
1172
1171
  get Modules() { return this._modules; }
1173
- constructor(router, lc, http, bts, notifications, MessageDef, intercom, emb, fakeToken) {
1172
+ constructor(router, lc, inj, bts, notifications, MessageDef, intercom, emb, fakeToken) {
1174
1173
  this.router = router;
1175
1174
  this.lc = lc;
1176
- this.http = http;
1175
+ this.inj = inj;
1177
1176
  this.bts = bts;
1178
1177
  this.notifications = notifications;
1179
1178
  this.MessageDef = MessageDef;
@@ -1210,14 +1209,20 @@ class AppState {
1210
1209
  this.intercom.inbounds.subscribe((t) => { this.handleInboundMessage(t); });
1211
1210
  }
1212
1211
  getActiveJaceModules() {
1213
- if (this.fakeToken) {
1214
- this.Modules = [new ActiveModuleView("Modulo Esempio 1"), new ActiveModuleView("Modulo Esempio 2"), new ActiveModuleView("Modulo Esempio 3")];
1215
- this.Modules = this.Modules;
1216
- return;
1217
- }
1218
- this.http.get(GET_Jace_GetActiveJaceModules).subscribe(res => {
1219
- this.Modules = res;
1220
- this.Modules = this.Modules;
1212
+ // Recupero i moduli dopo un frame. mi assicuro che l'injection tree sia stabile.
1213
+ // Altrimenti l'httpservice che prende l'httpserviceextensions providato da core quando anche l'appstate è providedin root
1214
+ // si incasina e va in loop
1215
+ requestAnimationFrame(() => {
1216
+ let http = this.inj.get(HTTPService);
1217
+ if (this.fakeToken) {
1218
+ this.Modules = [new ActiveModuleView("Modulo Esempio 1"), new ActiveModuleView("Modulo Esempio 2"), new ActiveModuleView("Modulo Esempio 3")];
1219
+ this.Modules = this.Modules;
1220
+ return;
1221
+ }
1222
+ http.get(GET_Jace_GetActiveJaceModules).subscribe(res => {
1223
+ this.Modules = res;
1224
+ this.Modules = this.Modules;
1225
+ });
1221
1226
  });
1222
1227
  }
1223
1228
  // Collego le informazioni dell'embedding che devono appoggiarsi all'app state in modo che possano comunicare col resto dell'applicazione
@@ -1375,13 +1380,13 @@ class AppState {
1375
1380
  this.headerHeight = height;
1376
1381
  }
1377
1382
  }
1378
- AppState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i1$2.LocalizationService }, { token: i3.HTTPService }, { token: TokenService }, { token: i5.NotificationsService }, { token: i5.BaseMessageService }, { token: i6.InterComService }, { token: i6.AppEmbeddingExtensions }, { token: USE_FAKE_ACCESS_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
1383
+ AppState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", 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 }], target: i0.ɵɵFactoryTarget.Injectable });
1379
1384
  AppState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppState, providedIn: "root" });
1380
1385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppState, decorators: [{
1381
1386
  type: Injectable,
1382
1387
  args: [{ providedIn: "root" }]
1383
1388
  }], ctorParameters: function () {
1384
- return [{ type: i1$1.Router }, { type: i1$2.LocalizationService }, { type: i3.HTTPService }, { type: TokenService }, { type: i5.NotificationsService }, { type: i5.BaseMessageService }, { type: i6.InterComService }, { type: i6.AppEmbeddingExtensions }, { type: undefined, decorators: [{
1389
+ return [{ 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: [{
1385
1390
  type: Inject,
1386
1391
  args: [USE_FAKE_ACCESS_TOKEN]
1387
1392
  }] }];
@@ -1467,11 +1472,11 @@ class HTTPServiceExtensions {
1467
1472
  }
1468
1473
  }
1469
1474
  }
1470
- HTTPServiceExtensions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HTTPServiceExtensions, deps: [{ token: i1$2.LocalizationService }, { token: TokenService }, { token: AppState }, { token: i1$1.Router }, { token: i5$1.AccessControlService }, { token: i6.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
1475
+ HTTPServiceExtensions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HTTPServiceExtensions, deps: [{ token: i1$2.LocalizationService }, { token: TokenService }, { token: AppState }, { token: i1$1.Router }, { token: i5$1.AccessControlService }, { token: i5.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
1471
1476
  HTTPServiceExtensions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HTTPServiceExtensions });
1472
1477
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HTTPServiceExtensions, decorators: [{
1473
1478
  type: Injectable
1474
- }], ctorParameters: function () { return [{ type: i1$2.LocalizationService }, { type: TokenService }, { type: AppState }, { type: i1$1.Router }, { type: i5$1.AccessControlService }, { type: i6.MessageService }]; } });
1479
+ }], ctorParameters: function () { return [{ type: i1$2.LocalizationService }, { type: TokenService }, { type: AppState }, { type: i1$1.Router }, { type: i5$1.AccessControlService }, { type: i5.MessageService }]; } });
1475
1480
 
1476
1481
  // Angular
1477
1482
  class MenuFilteringService {
@@ -1612,11 +1617,11 @@ class ApplicationCachePersistor extends CachePersistor {
1612
1617
  return `${this.getItemsUrl(sessionKey)}/${itemKey}`;
1613
1618
  }
1614
1619
  }
1615
- ApplicationCachePersistor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationCachePersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable });
1620
+ ApplicationCachePersistor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationCachePersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4$1.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable });
1616
1621
  ApplicationCachePersistor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationCachePersistor });
1617
1622
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationCachePersistor, decorators: [{
1618
1623
  type: Injectable
1619
- }], ctorParameters: function () { return [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4.BaseSessionRetriever }]; } });
1624
+ }], ctorParameters: function () { return [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4$1.BaseSessionRetriever }]; } });
1620
1625
 
1621
1626
  // Angular
1622
1627
  // Chiamate ai Repository
@@ -1694,11 +1699,11 @@ class ApplicationPreferencesPersistor extends PreferencesPersistor {
1694
1699
  return `${this.getItemsUrl(sessionKey)}/${itemKey}`;
1695
1700
  }
1696
1701
  }
1697
- ApplicationPreferencesPersistor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationPreferencesPersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable });
1702
+ ApplicationPreferencesPersistor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationPreferencesPersistor, deps: [{ token: i1$2.LocalizationService }, { token: i2.HttpClient }, { token: TokenService }, { token: i4$1.BaseSessionRetriever }], target: i0.ɵɵFactoryTarget.Injectable });
1698
1703
  ApplicationPreferencesPersistor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationPreferencesPersistor });
1699
1704
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApplicationPreferencesPersistor, decorators: [{
1700
1705
  type: Injectable
1701
- }], ctorParameters: function () { return [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4.BaseSessionRetriever }]; } });
1706
+ }], ctorParameters: function () { return [{ type: i1$2.LocalizationService }, { type: i2.HttpClient }, { type: TokenService }, { type: i4$1.BaseSessionRetriever }]; } });
1702
1707
 
1703
1708
  // Chiamate ai Repository
1704
1709
  const GET_UserProfile_GetAccountPicture = "/api/UserProfile/GetAccountPicture";
@@ -1808,11 +1813,11 @@ class BaseRouterGuard extends AccessControlRouteGuard {
1808
1813
  acc.initializeIdentity(ts.getJaceIdentity());
1809
1814
  }
1810
1815
  }
1811
- BaseRouterGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseRouterGuard, deps: [{ token: i6.MessageService }, { token: i5$1.AccessControlService }, { token: i1$1.Router }, { token: TokenService }], target: i0.ɵɵFactoryTarget.Injectable });
1816
+ BaseRouterGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseRouterGuard, deps: [{ token: i5.MessageService }, { token: i5$1.AccessControlService }, { token: i1$1.Router }, { token: TokenService }], target: i0.ɵɵFactoryTarget.Injectable });
1812
1817
  BaseRouterGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseRouterGuard });
1813
1818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseRouterGuard, decorators: [{
1814
1819
  type: Injectable
1815
- }], ctorParameters: function () { return [{ type: i6.MessageService }, { type: i5$1.AccessControlService }, { type: i1$1.Router }, { type: TokenService }]; } });
1820
+ }], ctorParameters: function () { return [{ type: i5.MessageService }, { type: i5$1.AccessControlService }, { type: i1$1.Router }, { type: TokenService }]; } });
1816
1821
 
1817
1822
  /**
1818
1823
  * Generated bundle index. Do not edit.