@esfaenza/extensions 13.3.3 → 13.3.4
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/services/extensions.messages.service.mjs +13 -1
- package/fesm2015/esfaenza-extensions.mjs +11 -1
- package/fesm2015/esfaenza-extensions.mjs.map +1 -1
- package/fesm2020/esfaenza-extensions.mjs +11 -1
- package/fesm2020/esfaenza-extensions.mjs.map +1 -1
- package/lib/services/extensions.messages.service.d.ts +8 -0
- package/package.json +1 -1
|
@@ -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'
|
|
@@ -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
|