@esfaenza/extensions 13.3.3 → 13.3.6

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,9 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, NgModule, Injectable, Optional, Inject } from '@angular/core';
3
3
  import swal from 'sweetalert2';
4
+ import { of, Subject } from 'rxjs';
5
+ import { map } from 'rxjs/operators';
4
6
  import * as i1 from 'ngx-toastr';
5
7
  import { Deserialize } from 'cerialize';
6
- import { Subject } from 'rxjs';
7
8
 
8
9
  /**
9
10
  * Token che identifica il locale da utilizzare per questa libreria, sono supportati i locali 'it-IT' ed 'en-US'
@@ -39,10 +40,10 @@ class ExtensionsModule {
39
40
  };
40
41
  }
41
42
  }
42
- ExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
43
- ExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExtensionsModule });
44
- ExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExtensionsModule });
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExtensionsModule, decorators: [{
43
+ ExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
44
+ ExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExtensionsModule });
45
+ ExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExtensionsModule });
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExtensionsModule, decorators: [{
46
47
  type: NgModule
47
48
  }] });
48
49
 
@@ -257,6 +258,15 @@ class MessageService {
257
258
  onerror();
258
259
  });
259
260
  }
261
+ /**
262
+ * Mostra un messaggio di avviso con richiesta di conferma e gestisce il risultato chiamato i callback **onsuccess** o **onerror**
263
+ *
264
+ * @param {string} title Titolo del messaggio
265
+ * @param {string} text Contenuto del messaggio
266
+ */
267
+ observableSimpleWarningWithChoice(title, text) {
268
+ return of(this.warningSwalWithCancel.fire(title, text)).pipe(map(t => !!t.value));
269
+ }
260
270
  /**
261
271
  * Mostra un messaggio di avviso che la sessione corrente è scaduta e propone all'utente di navigare al login. Qualora l'utente decidesse di farlo
262
272
  * verrà chiamata la funzione di callback **onnavigate
@@ -282,7 +292,9 @@ class MessageService {
282
292
  */
283
293
  manageCallResultResponse(response, successMsg, errorMsg, postSuccess = null, postFailure = null) {
284
294
  if (response.success) {
285
- if (successMsg)
295
+ if (response.haswarning)
296
+ this.simpleWarning(response.warning);
297
+ else if (successMsg)
286
298
  this.simpleSuccess(successMsg);
287
299
  if (postSuccess)
288
300
  postSuccess();
@@ -292,9 +304,6 @@ class MessageService {
292
304
  if (postFailure)
293
305
  postFailure();
294
306
  }
295
- else if (response.haswarning) {
296
- this.simpleWarning(response.warning);
297
- }
298
307
  }
299
308
  /**
300
309
  * Metodo helper per gestire in maniera standardizzata una risposta di tipo **string**, considerando che:
@@ -347,9 +356,9 @@ class MessageService {
347
356
  }
348
357
  }
349
358
  }
350
- MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: MessageService, deps: [{ token: i1.ToastrService }, { token: EXT_FANCY_ALERTS, optional: true }, { token: EXT_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
351
- MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: MessageService });
352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: MessageService, decorators: [{
359
+ MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageService, deps: [{ token: i1.ToastrService }, { token: EXT_FANCY_ALERTS, optional: true }, { token: EXT_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
360
+ MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageService });
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageService, decorators: [{
353
362
  type: Injectable
354
363
  }], ctorParameters: function () { return [{ type: i1.ToastrService }, { type: undefined, decorators: [{
355
364
  type: Optional
@@ -513,9 +522,9 @@ class ClipboardService {
513
522
  document.body.removeChild(textArea);
514
523
  }
515
524
  }
516
- ClipboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ClipboardService, deps: [{ token: MessageService }, { token: EXT_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
517
- ClipboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ClipboardService });
518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ClipboardService, decorators: [{
525
+ ClipboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClipboardService, deps: [{ token: MessageService }, { token: EXT_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
526
+ ClipboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClipboardService });
527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClipboardService, decorators: [{
519
528
  type: Injectable
520
529
  }], ctorParameters: function () { return [{ type: MessageService }, { type: undefined, decorators: [{
521
530
  type: Optional
@@ -736,9 +745,9 @@ class DateService {
736
745
  return date.format(small ? this.cfg.smallDate : seconds ? this.cfg.fulldateDisplay : this.cfg.fulldateDisplayNoSS);
737
746
  }
738
747
  }
739
- DateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DateService, deps: [{ token: EXT_LOCALE, optional: true }, { token: EXT_ALLOW_UTC, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
740
- DateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DateService });
741
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DateService, decorators: [{
748
+ DateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DateService, deps: [{ token: EXT_LOCALE, optional: true }, { token: EXT_ALLOW_UTC, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
749
+ DateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DateService });
750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DateService, decorators: [{
742
751
  type: Injectable
743
752
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
744
753
  type: Optional
@@ -1234,9 +1243,9 @@ class ExportService {
1234
1243
  return Deserialize(items, type);
1235
1244
  }
1236
1245
  }
1237
- ExportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExportService, deps: [{ token: DateService }], target: i0.ɵɵFactoryTarget.Injectable });
1238
- ExportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExportService });
1239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ExportService, decorators: [{
1246
+ ExportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExportService, deps: [{ token: DateService }], target: i0.ɵɵFactoryTarget.Injectable });
1247
+ ExportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExportService });
1248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExportService, decorators: [{
1240
1249
  type: Injectable
1241
1250
  }], ctorParameters: function () { return [{ type: DateService }]; } });
1242
1251
 
@@ -1541,9 +1550,9 @@ class HashingService {
1541
1550
  return (a + b) & 0xFFFFFFFF;
1542
1551
  }
1543
1552
  }
1544
- HashingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: HashingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1545
- HashingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: HashingService });
1546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: HashingService, decorators: [{
1553
+ HashingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1554
+ HashingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashingService });
1555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashingService, decorators: [{
1547
1556
  type: Injectable
1548
1557
  }] });
1549
1558
 
@@ -1750,9 +1759,9 @@ class UtilityService {
1750
1759
  }
1751
1760
  }
1752
1761
  }
1753
- UtilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: UtilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1754
- UtilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: UtilityService });
1755
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: UtilityService, decorators: [{
1762
+ UtilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UtilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1763
+ UtilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UtilityService });
1764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UtilityService, decorators: [{
1756
1765
  type: Injectable
1757
1766
  }] });
1758
1767
 
@@ -1811,9 +1820,9 @@ class InterComService {
1811
1820
  this.outbounds[key] = new Subject();
1812
1821
  }
1813
1822
  }
1814
- InterComService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: InterComService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1815
- InterComService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: InterComService });
1816
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: InterComService, decorators: [{
1823
+ InterComService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InterComService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1824
+ InterComService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InterComService });
1825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InterComService, decorators: [{
1817
1826
  type: Injectable
1818
1827
  }] });
1819
1828
 
@@ -1850,10 +1859,10 @@ class FullExtensionsModule {
1850
1859
  };
1851
1860
  }
1852
1861
  }
1853
- FullExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FullExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1854
- FullExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FullExtensionsModule });
1855
- FullExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FullExtensionsModule });
1856
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FullExtensionsModule, decorators: [{
1862
+ FullExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1863
+ FullExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule });
1864
+ FullExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule });
1865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule, decorators: [{
1857
1866
  type: NgModule
1858
1867
  }] });
1859
1868