@esfaenza/admin-module 11.2.4-beta2 → 11.2.4-beta3

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.
@@ -1,6 +1,6 @@
1
1
  import { Location, CommonModule } from '@angular/common';
2
2
  import { FormsModule } from '@angular/forms';
3
- import { InjectionToken, Injectable, Inject, Component, ViewChild, NgModule, APP_INITIALIZER } from '@angular/core';
3
+ import { InjectionToken, Injectable, Inject, Component, ViewChild, NgModule } from '@angular/core';
4
4
  import { ActivatedRoute, RouterModule } from '@angular/router';
5
5
  import { MatIconModule } from '@angular/material/icon';
6
6
  import { MatDatepickerModule } from '@angular/material/datepicker';
@@ -11,8 +11,6 @@ import { ModalModule } from 'ngx-bootstrap/modal';
11
11
  import { CsvModule } from '@ctrl/ngx-csv';
12
12
  import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
13
13
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
14
- import { of } from 'rxjs';
15
- import { map, tap } from 'rxjs/operators';
16
14
  import { AppSearch, EsTableOperationDefinition, EsTableModule } from '@esfaenza/es-table';
17
15
  import { FormsAndValidationsModule } from '@esfaenza/forms-and-validations';
18
16
  import { LineSerie, DateValue, LineChartData, Limit, EsChartsModule } from '@esfaenza/es-charts';
@@ -25,6 +23,7 @@ import { HTTPService } from '@esfaenza/httpservice';
25
23
  import { InboundMessageTypes, InterComService, UtilityService, MessageService, Export, ExportService, DateService } from '@esfaenza/extensions';
26
24
  import { HttpParams } from '@angular/common/http';
27
25
  import { autoserialize } from 'cerialize';
26
+ import { map } from 'rxjs/operators';
28
27
 
29
28
  class AuditsView extends AppSearch {
30
29
  constructor() {
@@ -1129,9 +1128,12 @@ var AdmMessageTypes;
1129
1128
  AdmMessageTypes[AdmMessageTypes["Message"] = 0] = "Message";
1130
1129
  })(AdmMessageTypes || (AdmMessageTypes = {}));
1131
1130
 
1131
+ // Angular
1132
1132
  class AdminModuleCommService {
1133
1133
  constructor(intercom) {
1134
1134
  this.intercom = intercom;
1135
+ }
1136
+ register() {
1135
1137
  this.intercom.register(MK_ADM);
1136
1138
  this.intercom.outbounds[MK_ADM].subscribe((t) => { this.handleOutbound(t.type, t.message); });
1137
1139
  }
@@ -1201,18 +1203,13 @@ const COMPONENTS = [
1201
1203
  AdmEnqComponent,
1202
1204
  AdmMetricsComponent
1203
1205
  ];
1204
- /**
1205
- * Funzione di inizializzazione che prende il servizio **AdminModuleCommService** e costringe Angular ad inizializzarlo. Dato che nel costruttore del servizio
1206
- * c'è il collegamento al sistema di intercomunicazione questa funzione fisicamente causa la registrazione del modulo
1207
- */
1208
- function initializeIntercomService(_) {
1209
- // Mantenere almeno una riga di codice qui prima del return, altrimenti typescript prova a risolvere l'intera funzione ad una lamba che non è supportato dal compiler
1210
- // Per info aggiuntive vedere: https://stackoverflow.com/questions/51976671/app-initializer-in-library-causes-lambda-not-supported-error
1211
- var bootstrapMessage = "@esfaenza/admin-module: BOOTSTRAP";
1212
- return () => of().pipe(tap(() => { console.log(bootstrapMessage); }));
1213
- }
1214
1206
  const ɵ7 = myconfig.LOCALE, ɵ8 = myconfig.BACKEND_URL;
1215
1207
  class AdmModule {
1208
+ constructor(commService) {
1209
+ this.commService = commService;
1210
+ console.log("@esfaenza/admin-module: BOOTSTRAP");
1211
+ this.commService.register();
1212
+ }
1216
1213
  }
1217
1214
  AdmModule.decorators = [
1218
1215
  { type: NgModule, args: [{
@@ -1222,14 +1219,16 @@ AdmModule.decorators = [
1222
1219
  AdminModuleCommService,
1223
1220
  { provide: ADM_LOCALE, useValue: ɵ7 },
1224
1221
  { provide: ADM_BACKEND_URL, useValue: ɵ8 },
1225
- { provide: APP_INITIALIZER, useFactory: initializeIntercomService, deps: [AdminModuleCommService], multi: true }
1226
1222
  ]
1227
1223
  },] }
1224
+ ];
1225
+ AdmModule.ctorParameters = () => [
1226
+ { type: AdminModuleCommService }
1228
1227
  ];
1229
1228
 
1230
1229
  /**
1231
1230
  * Generated bundle index. Do not edit.
1232
1231
  */
1233
1232
 
1234
- export { ADM_BACKEND_URL, ADM_LOCALE, ADM_MODULE_PATH, AdmMessageTypes, AdmModule, MK_ADM, initializeIntercomService, routeConfig, ɵ0, ɵ1, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, AdmWrkComponent as ɵa, AdmWrkLoc as ɵb, AdmProfilerComponent as ɵc, AdmProfilerComponentLoc as ɵd, AdmTopActivitiesComponent as ɵe, AdmTopActivitieLoc as ɵf, AdmMetricsComponent as ɵg, AdmMetricsLoc as ɵh, AdmLogsComponent as ɵi, AdmAuditsComponent as ɵj, AdmAuditLoc as ɵk, AdmEnqComponent as ɵl, AdmEnqLoc as ɵm, AdminModuleCommService as ɵn };
1233
+ export { ADM_BACKEND_URL, ADM_LOCALE, ADM_MODULE_PATH, AdmMessageTypes, AdmModule, MK_ADM, routeConfig, ɵ0, ɵ1, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, AdmWrkComponent as ɵa, AdmWrkLoc as ɵb, AdmProfilerComponent as ɵc, AdmProfilerComponentLoc as ɵd, AdmTopActivitiesComponent as ɵe, AdmTopActivitieLoc as ɵf, AdmMetricsComponent as ɵg, AdmMetricsLoc as ɵh, AdmLogsComponent as ɵi, AdmAuditsComponent as ɵj, AdmAuditLoc as ɵk, AdmEnqComponent as ɵl, AdmEnqLoc as ɵm, AdminModuleCommService as ɵn };
1235
1234
  //# sourceMappingURL=esfaenza-admin-module.js.map