@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.
- package/esm2020/lib/modules/extensions.full.module.mjs +5 -5
- package/esm2020/lib/modules/extensions.module.mjs +5 -5
- package/esm2020/lib/services/extensions.clipboard.service.mjs +4 -4
- package/esm2020/lib/services/extensions.dates.service.mjs +4 -4
- package/esm2020/lib/services/extensions.exports.service.mjs +4 -4
- package/esm2020/lib/services/extensions.hashing.service.mjs +4 -4
- package/esm2020/lib/services/extensions.intercom.service.mjs +4 -4
- package/esm2020/lib/services/extensions.messages.service.mjs +19 -8
- package/esm2020/lib/services/extensions.utilities.service.mjs +4 -4
- package/fesm2015/esfaenza-extensions.mjs +43 -34
- package/fesm2015/esfaenza-extensions.mjs.map +1 -1
- package/fesm2020/esfaenza-extensions.mjs +43 -34
- package/fesm2020/esfaenza-extensions.mjs.map +1 -1
- package/lib/services/extensions.messages.service.d.ts +8 -0
- package/package.json +5 -5
|
@@ -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.
|
|
43
|
-
ExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
44
|
-
ExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
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
|
|
|
@@ -258,6 +259,15 @@ class MessageService {
|
|
|
258
259
|
onerror();
|
|
259
260
|
});
|
|
260
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Mostra un messaggio di avviso con richiesta di conferma e gestisce il risultato chiamato i callback **onsuccess** o **onerror**
|
|
264
|
+
*
|
|
265
|
+
* @param {string} title Titolo del messaggio
|
|
266
|
+
* @param {string} text Contenuto del messaggio
|
|
267
|
+
*/
|
|
268
|
+
observableSimpleWarningWithChoice(title, text) {
|
|
269
|
+
return of(this.warningSwalWithCancel.fire(title, text)).pipe(map(t => !!t.value));
|
|
270
|
+
}
|
|
261
271
|
/**
|
|
262
272
|
* Mostra un messaggio di avviso che la sessione corrente è scaduta e propone all'utente di navigare al login. Qualora l'utente decidesse di farlo
|
|
263
273
|
* verrà chiamata la funzione di callback **onnavigate
|
|
@@ -283,7 +293,9 @@ class MessageService {
|
|
|
283
293
|
*/
|
|
284
294
|
manageCallResultResponse(response, successMsg, errorMsg, postSuccess = null, postFailure = null) {
|
|
285
295
|
if (response.success) {
|
|
286
|
-
if (
|
|
296
|
+
if (response.haswarning)
|
|
297
|
+
this.simpleWarning(response.warning);
|
|
298
|
+
else if (successMsg)
|
|
287
299
|
this.simpleSuccess(successMsg);
|
|
288
300
|
if (postSuccess)
|
|
289
301
|
postSuccess();
|
|
@@ -293,9 +305,6 @@ class MessageService {
|
|
|
293
305
|
if (postFailure)
|
|
294
306
|
postFailure();
|
|
295
307
|
}
|
|
296
|
-
else if (response.haswarning) {
|
|
297
|
-
this.simpleWarning(response.warning);
|
|
298
|
-
}
|
|
299
308
|
}
|
|
300
309
|
/**
|
|
301
310
|
* Metodo helper per gestire in maniera standardizzata una risposta di tipo **string**, considerando che:
|
|
@@ -348,9 +357,9 @@ class MessageService {
|
|
|
348
357
|
}
|
|
349
358
|
}
|
|
350
359
|
}
|
|
351
|
-
MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
352
|
-
MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
360
|
+
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 });
|
|
361
|
+
MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageService });
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageService, decorators: [{
|
|
354
363
|
type: Injectable
|
|
355
364
|
}], ctorParameters: function () {
|
|
356
365
|
return [{ type: i1.ToastrService }, { type: undefined, decorators: [{
|
|
@@ -519,9 +528,9 @@ class ClipboardService {
|
|
|
519
528
|
document.body.removeChild(textArea);
|
|
520
529
|
}
|
|
521
530
|
}
|
|
522
|
-
ClipboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
523
|
-
ClipboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
531
|
+
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 });
|
|
532
|
+
ClipboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClipboardService });
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ClipboardService, decorators: [{
|
|
525
534
|
type: Injectable
|
|
526
535
|
}], ctorParameters: function () {
|
|
527
536
|
return [{ type: MessageService }, { type: undefined, decorators: [{
|
|
@@ -745,9 +754,9 @@ class DateService {
|
|
|
745
754
|
return date.format(small ? this.cfg.smallDate : seconds ? this.cfg.fulldateDisplay : this.cfg.fulldateDisplayNoSS);
|
|
746
755
|
}
|
|
747
756
|
}
|
|
748
|
-
DateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
749
|
-
DateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
757
|
+
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 });
|
|
758
|
+
DateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DateService });
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DateService, decorators: [{
|
|
751
760
|
type: Injectable
|
|
752
761
|
}], ctorParameters: function () {
|
|
753
762
|
return [{ type: undefined, decorators: [{
|
|
@@ -1245,9 +1254,9 @@ class ExportService {
|
|
|
1245
1254
|
return Deserialize(items, type);
|
|
1246
1255
|
}
|
|
1247
1256
|
}
|
|
1248
|
-
ExportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
1249
|
-
ExportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
1250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
1257
|
+
ExportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExportService, deps: [{ token: DateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1258
|
+
ExportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExportService });
|
|
1259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExportService, decorators: [{
|
|
1251
1260
|
type: Injectable
|
|
1252
1261
|
}], ctorParameters: function () { return [{ type: DateService }]; } });
|
|
1253
1262
|
|
|
@@ -1552,9 +1561,9 @@ class HashingService {
|
|
|
1552
1561
|
return (a + b) & 0xFFFFFFFF;
|
|
1553
1562
|
}
|
|
1554
1563
|
}
|
|
1555
|
-
HashingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
1556
|
-
HashingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
1557
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
1564
|
+
HashingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1565
|
+
HashingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashingService });
|
|
1566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashingService, decorators: [{
|
|
1558
1567
|
type: Injectable
|
|
1559
1568
|
}] });
|
|
1560
1569
|
|
|
@@ -1761,9 +1770,9 @@ class UtilityService {
|
|
|
1761
1770
|
}
|
|
1762
1771
|
}
|
|
1763
1772
|
}
|
|
1764
|
-
UtilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
1765
|
-
UtilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
1766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
1773
|
+
UtilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UtilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1774
|
+
UtilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UtilityService });
|
|
1775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UtilityService, decorators: [{
|
|
1767
1776
|
type: Injectable
|
|
1768
1777
|
}] });
|
|
1769
1778
|
|
|
@@ -1822,9 +1831,9 @@ class InterComService {
|
|
|
1822
1831
|
this.outbounds[key] = new Subject();
|
|
1823
1832
|
}
|
|
1824
1833
|
}
|
|
1825
|
-
InterComService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
1826
|
-
InterComService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.
|
|
1827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
1834
|
+
InterComService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InterComService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1835
|
+
InterComService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InterComService });
|
|
1836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InterComService, decorators: [{
|
|
1828
1837
|
type: Injectable
|
|
1829
1838
|
}] });
|
|
1830
1839
|
|
|
@@ -1861,10 +1870,10 @@ class FullExtensionsModule {
|
|
|
1861
1870
|
};
|
|
1862
1871
|
}
|
|
1863
1872
|
}
|
|
1864
|
-
FullExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
1865
|
-
FullExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
1866
|
-
FullExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
1867
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
1873
|
+
FullExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1874
|
+
FullExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule });
|
|
1875
|
+
FullExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule });
|
|
1876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FullExtensionsModule, decorators: [{
|
|
1868
1877
|
type: NgModule
|
|
1869
1878
|
}] });
|
|
1870
1879
|
|