@esfaenza/extensions 11.2.26 → 11.2.27
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/bundles/esfaenza-extensions.umd.js +13 -9
- package/bundles/esfaenza-extensions.umd.js.map +1 -1
- package/bundles/esfaenza-extensions.umd.min.js +1 -1
- package/bundles/esfaenza-extensions.umd.min.js.map +1 -1
- package/esm2015/lib/services/extensions.dates.service.js +2 -2
- package/esm2015/lib/services/extensions.messages.service.js +9 -9
- package/fesm2015/esfaenza-extensions.js +9 -9
- package/fesm2015/esfaenza-extensions.js.map +1 -1
- package/lib/services/extensions.messages.service.d.ts +4 -4
- package/package.json +1 -1
|
@@ -160,13 +160,14 @@
|
|
|
160
160
|
* @param {string} text Testo da mostrare
|
|
161
161
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
162
162
|
*/
|
|
163
|
-
MessageService.prototype.simpleSuccess = function (text, secondaryNotificationType) {
|
|
163
|
+
MessageService.prototype.simpleSuccess = function (text, secondaryNotificationType, secondaryNotificationTimeout) {
|
|
164
164
|
if (secondaryNotificationType === void 0) { secondaryNotificationType = null; }
|
|
165
|
+
if (secondaryNotificationTimeout === void 0) { secondaryNotificationTimeout = null; }
|
|
165
166
|
var tos = this.toastrOrSwal(secondaryNotificationType);
|
|
166
167
|
if (tos == "swal")
|
|
167
168
|
this.successSwal.fire("", text);
|
|
168
169
|
else
|
|
169
|
-
this.toastr.success(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: tos == "toastr" ? 0 : 5000, extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
170
|
+
this.toastr.success(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: secondaryNotificationTimeout || (tos == "toastr" ? 0 : 5000), extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
170
171
|
};
|
|
171
172
|
/**
|
|
172
173
|
* Presentazione di un semplice messaggio di informazione
|
|
@@ -177,13 +178,14 @@
|
|
|
177
178
|
* @param {string} text Testo da mostrare
|
|
178
179
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
179
180
|
*/
|
|
180
|
-
MessageService.prototype.simpleInfo = function (text, secondaryNotificationType) {
|
|
181
|
+
MessageService.prototype.simpleInfo = function (text, secondaryNotificationType, secondaryNotificationTimeout) {
|
|
181
182
|
if (secondaryNotificationType === void 0) { secondaryNotificationType = null; }
|
|
183
|
+
if (secondaryNotificationTimeout === void 0) { secondaryNotificationTimeout = null; }
|
|
182
184
|
var tos = this.toastrOrSwal(secondaryNotificationType);
|
|
183
185
|
if (tos == "swal")
|
|
184
186
|
this.infoSwal.fire("", text);
|
|
185
187
|
else
|
|
186
|
-
this.toastr.info(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: tos == "toastr" ? 0 : 5000, extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
188
|
+
this.toastr.info(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: secondaryNotificationTimeout || (tos == "toastr" ? 0 : 5000), extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
187
189
|
};
|
|
188
190
|
/**
|
|
189
191
|
* Presentazione di un semplice messaggio di errore
|
|
@@ -194,13 +196,14 @@
|
|
|
194
196
|
* @param {string} text Testo da mostrare
|
|
195
197
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
196
198
|
*/
|
|
197
|
-
MessageService.prototype.simpleError = function (text, secondaryNotificationType) {
|
|
199
|
+
MessageService.prototype.simpleError = function (text, secondaryNotificationType, secondaryNotificationTimeout) {
|
|
198
200
|
if (secondaryNotificationType === void 0) { secondaryNotificationType = null; }
|
|
201
|
+
if (secondaryNotificationTimeout === void 0) { secondaryNotificationTimeout = null; }
|
|
199
202
|
var tos = this.toastrOrSwal(secondaryNotificationType);
|
|
200
203
|
if (tos == "swal")
|
|
201
204
|
this.errorSwal.fire("", text);
|
|
202
205
|
else
|
|
203
|
-
this.toastr.error(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: tos == "toastr" ? 0 : 5000, extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
206
|
+
this.toastr.error(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: secondaryNotificationTimeout || (tos == "toastr" ? 0 : 5000), extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
204
207
|
};
|
|
205
208
|
/**
|
|
206
209
|
* Presentazione di un semplice messaggio di avviso
|
|
@@ -211,13 +214,14 @@
|
|
|
211
214
|
* @param {string} text Testo da mostrare
|
|
212
215
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
213
216
|
*/
|
|
214
|
-
MessageService.prototype.simpleWarning = function (text, secondaryNotificationType) {
|
|
217
|
+
MessageService.prototype.simpleWarning = function (text, secondaryNotificationType, secondaryNotificationTimeout) {
|
|
215
218
|
if (secondaryNotificationType === void 0) { secondaryNotificationType = null; }
|
|
219
|
+
if (secondaryNotificationTimeout === void 0) { secondaryNotificationTimeout = null; }
|
|
216
220
|
var tos = this.toastrOrSwal(secondaryNotificationType);
|
|
217
221
|
if (tos == "swal")
|
|
218
222
|
this.warningSwal.fire("", text);
|
|
219
223
|
else
|
|
220
|
-
this.toastr.warning(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: tos == "toastr" ? 0 : 5000, extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
224
|
+
this.toastr.warning(text, null, { positionClass: tos == "toastr" ? "toast-top-right" : "toast-top-center", timeOut: secondaryNotificationTimeout || (tos == "toastr" ? 0 : 5000), extendedTimeOut: tos == "toastr" ? 0 : 1000 });
|
|
221
225
|
};
|
|
222
226
|
/**
|
|
223
227
|
* Ripulisce tutti i messaggi presenti in un dato momento sullo schermo
|
|
@@ -718,7 +722,7 @@
|
|
|
718
722
|
tryThis = toCall(date, this.cfg.smallDate);
|
|
719
723
|
else if (length == this.cfg.fulldateNoSS.length)
|
|
720
724
|
tryThis = toCall(date, this.cfg.fulldateNoSS);
|
|
721
|
-
if (tryThis && tryThis.isValid())
|
|
725
|
+
if (tryThis && tryThis.isValid && tryThis.isValid())
|
|
722
726
|
return tryThis;
|
|
723
727
|
// Se niente funziona, null.
|
|
724
728
|
// Ricondurre l'Input ad una data non è possibile.
|