@esfaenza/extensions 11.2.53 → 11.2.55
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 +12 -5
- 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/esfaenza-extensions.metadata.json +1 -1
- package/esm2015/lib/services/extensions.exports.service.js +3 -3
- package/esm2015/lib/services/extensions.messages.service.js +8 -5
- package/fesm2015/esfaenza-extensions.js +9 -6
- package/fesm2015/esfaenza-extensions.js.map +1 -1
- package/lib/services/extensions.exports.service.d.ts +1 -1
- package/lib/services/extensions.messages.service.d.ts +4 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InjectionToken, NgModule, Injectable,
|
|
1
|
+
import { InjectionToken, NgModule, Injectable, Injector, Inject, Optional } from '@angular/core';
|
|
2
2
|
import { ToastrService } from 'ngx-toastr';
|
|
3
3
|
import swal from 'sweetalert2';
|
|
4
4
|
import { of, Subject } from 'rxjs';
|
|
@@ -53,9 +53,9 @@ class MessageService {
|
|
|
53
53
|
*
|
|
54
54
|
* @ignore
|
|
55
55
|
*/
|
|
56
|
-
constructor(
|
|
56
|
+
constructor(injector, FANCY_ALERTS, LOCALE) {
|
|
57
57
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
58
|
-
this.
|
|
58
|
+
this.injector = injector;
|
|
59
59
|
this.FANCY_ALERTS = FANCY_ALERTS;
|
|
60
60
|
this.LOCALE = LOCALE;
|
|
61
61
|
/**
|
|
@@ -159,6 +159,9 @@ class MessageService {
|
|
|
159
159
|
icon: "info"
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
get toastr() {
|
|
163
|
+
return this.injector.get(ToastrService);
|
|
164
|
+
}
|
|
162
165
|
/**
|
|
163
166
|
* Presentazione di un semplice messaggio di successo
|
|
164
167
|
*
|
|
@@ -397,7 +400,7 @@ MessageService.decorators = [
|
|
|
397
400
|
{ type: Injectable }
|
|
398
401
|
];
|
|
399
402
|
MessageService.ctorParameters = () => [
|
|
400
|
-
{ type:
|
|
403
|
+
{ type: Injector, decorators: [{ type: Inject, args: [Injector,] }] },
|
|
401
404
|
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [EXT_FANCY_ALERTS,] }] },
|
|
402
405
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EXT_LOCALE,] }] }
|
|
403
406
|
];
|
|
@@ -959,7 +962,7 @@ const Export = (order, header, format = null, tableid = null) => (target, proper
|
|
|
959
962
|
* @param {number} order Ordine di esportazione. Più piccolo è, prima appare il valore
|
|
960
963
|
* @param {any} type Tipo da esportare
|
|
961
964
|
*/
|
|
962
|
-
const ExportAs = (order, type) => (target, propertyKey) => {
|
|
965
|
+
const ExportAs = (order, type, prefix) => (target, propertyKey) => {
|
|
963
966
|
var t = new type();
|
|
964
967
|
var props = t[exportList];
|
|
965
968
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -975,7 +978,7 @@ const ExportAs = (order, type) => (target, propertyKey) => {
|
|
|
975
978
|
Object.defineProperty(target, propertyKey + prop, { value: null, writable: true, enumerable: true });
|
|
976
979
|
Object.defineProperty(target, propertyKey + prop + csvValueNavigator, { value: propertyKey + "." + prop, writable: false });
|
|
977
980
|
Object.defineProperty(target, propertyKey + prop + csvVisPrefix, { value: toEmit, writable: false });
|
|
978
|
-
Object.defineProperty(target, propertyKey + prop + csvHdrPrefix, { value: lbl, writable: false });
|
|
981
|
+
Object.defineProperty(target, propertyKey + prop + csvHdrPrefix, { value: prefix + " " + lbl, writable: false });
|
|
979
982
|
if (target[exportList])
|
|
980
983
|
target[exportList].push(propertyKey + prop + csvVisPrefix);
|
|
981
984
|
else
|