@esfaenza/extensions 15.2.22 → 15.2.24
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.embedding.service.mjs +23 -0
- package/esm2020/lib/services/extensions.exports.service.mjs +4 -3
- package/esm2020/lib/services/extensions.messages.service.mjs +22 -4
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/esfaenza-extensions.mjs +45 -6
- package/fesm2015/esfaenza-extensions.mjs.map +1 -1
- package/fesm2020/esfaenza-extensions.mjs +45 -6
- package/fesm2020/esfaenza-extensions.mjs.map +1 -1
- package/lib/services/extensions.embedding.service.d.ts +9 -0
- package/lib/services/extensions.messages.service.d.ts +4 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1042,10 +1042,11 @@ class ExportService {
|
|
|
1042
1042
|
jumps = pr.split(".");
|
|
1043
1043
|
tmpRes = JSON.parse(JSON.stringify(listitem));
|
|
1044
1044
|
jumps.forEach(pp => { tmpRes = tmpRes[pp]; });
|
|
1045
|
+
let localized = !!loc ? loc.loc(tmpRes) : tmpRes;
|
|
1045
1046
|
if (!label)
|
|
1046
|
-
label =
|
|
1047
|
+
label = localized;
|
|
1047
1048
|
else
|
|
1048
|
-
label += " " +
|
|
1049
|
+
label += " " + localized;
|
|
1049
1050
|
});
|
|
1050
1051
|
jumps = valuenavigator.split(".");
|
|
1051
1052
|
tmpRes = JSON.parse(JSON.stringify(listitem));
|
|
@@ -1219,6 +1220,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1219
1220
|
args: [{ providedIn: "root" }]
|
|
1220
1221
|
}], ctorParameters: function () { return [{ type: DateService }, { type: UtilityService }, { type: i1.LocalizationService }]; } });
|
|
1221
1222
|
|
|
1223
|
+
// Angular
|
|
1224
|
+
/* Classe che contiene tutte le informazioni sull'embedding in un unico contenitore per semplicità */
|
|
1225
|
+
class AppEmbeddingExtensions {
|
|
1226
|
+
constructor() {
|
|
1227
|
+
this.Embedded = false;
|
|
1228
|
+
this.EmbeddingLevel = 0;
|
|
1229
|
+
this.MainWindow = window;
|
|
1230
|
+
while (this.MainWindow.parent != this.MainWindow) {
|
|
1231
|
+
this.MainWindow = this.MainWindow.parent;
|
|
1232
|
+
this.EmbeddingLevel++;
|
|
1233
|
+
this.Embedded = true;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
AppEmbeddingExtensions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppEmbeddingExtensions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1238
|
+
AppEmbeddingExtensions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppEmbeddingExtensions, providedIn: "root" });
|
|
1239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppEmbeddingExtensions, decorators: [{
|
|
1240
|
+
type: Injectable,
|
|
1241
|
+
args: [{ providedIn: "root" }]
|
|
1242
|
+
}], ctorParameters: function () { return []; } });
|
|
1243
|
+
|
|
1222
1244
|
// Angular
|
|
1223
1245
|
/**
|
|
1224
1246
|
* Service che fornisce funzionalità di alert nei tipi fondamentali: success, info, warning e danger
|
|
@@ -1229,9 +1251,10 @@ class MessageService {
|
|
|
1229
1251
|
*
|
|
1230
1252
|
* @ignore
|
|
1231
1253
|
*/
|
|
1232
|
-
constructor(injector, locProvider) {
|
|
1254
|
+
constructor(injector, locProvider, emb) {
|
|
1233
1255
|
this.injector = injector;
|
|
1234
1256
|
this.locProvider = locProvider;
|
|
1257
|
+
this.emb = emb;
|
|
1235
1258
|
/**
|
|
1236
1259
|
* Oggetto statico in supporto alla localizzazione
|
|
1237
1260
|
*/
|
|
@@ -1350,6 +1373,10 @@ class MessageService {
|
|
|
1350
1373
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
1351
1374
|
*/
|
|
1352
1375
|
simpleSuccess(text, secondaryNotificationType = null, secondaryNotificationTimeout = null) {
|
|
1376
|
+
if (this.emb.Embedded) {
|
|
1377
|
+
this.emb.MainWindow.postMessage({ type: "alert", level: 'success', msg: text }, "*");
|
|
1378
|
+
return;
|
|
1379
|
+
}
|
|
1353
1380
|
let tos = this.toastrOrSwal(secondaryNotificationType);
|
|
1354
1381
|
if (tos == "swal")
|
|
1355
1382
|
this.successSwal.fire("", text);
|
|
@@ -1366,6 +1393,10 @@ class MessageService {
|
|
|
1366
1393
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
1367
1394
|
*/
|
|
1368
1395
|
simpleInfo(text, secondaryNotificationType = null, secondaryNotificationTimeout = null) {
|
|
1396
|
+
if (this.emb.Embedded) {
|
|
1397
|
+
this.emb.MainWindow.postMessage({ type: "alert", level: 'info', msg: text }, "*");
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1369
1400
|
let tos = this.toastrOrSwal(secondaryNotificationType);
|
|
1370
1401
|
if (tos == "swal")
|
|
1371
1402
|
this.infoSwal.fire("", text);
|
|
@@ -1382,6 +1413,10 @@ class MessageService {
|
|
|
1382
1413
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
1383
1414
|
*/
|
|
1384
1415
|
simpleError(text, secondaryNotificationType = null, secondaryNotificationTimeout = null) {
|
|
1416
|
+
if (this.emb.Embedded) {
|
|
1417
|
+
this.emb.MainWindow.postMessage({ type: "alert", level: 'error', msg: text }, "*");
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1385
1420
|
let tos = this.toastrOrSwal(secondaryNotificationType);
|
|
1386
1421
|
if (tos == "swal")
|
|
1387
1422
|
this.errorSwal.fire("", text);
|
|
@@ -1398,6 +1433,10 @@ class MessageService {
|
|
|
1398
1433
|
* @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
|
|
1399
1434
|
*/
|
|
1400
1435
|
simpleWarning(text, secondaryNotificationType = null, secondaryNotificationTimeout = null) {
|
|
1436
|
+
if (this.emb.Embedded) {
|
|
1437
|
+
this.emb.MainWindow.postMessage({ type: "alert", level: 'warning', msg: text }, "*");
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1401
1440
|
let tos = this.toastrOrSwal(secondaryNotificationType);
|
|
1402
1441
|
if (tos == "swal")
|
|
1403
1442
|
this.warningSwal.fire("", text);
|
|
@@ -1574,7 +1613,7 @@ class MessageService {
|
|
|
1574
1613
|
}
|
|
1575
1614
|
}
|
|
1576
1615
|
}
|
|
1577
|
-
MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MessageService, deps: [{ token: Injector }, { token: i1.BaseLocalization, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1616
|
+
MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MessageService, deps: [{ token: Injector }, { token: i1.BaseLocalization, optional: true }, { token: AppEmbeddingExtensions }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1578
1617
|
MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MessageService, providedIn: "root" });
|
|
1579
1618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MessageService, decorators: [{
|
|
1580
1619
|
type: Injectable,
|
|
@@ -1584,7 +1623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1584
1623
|
args: [Injector]
|
|
1585
1624
|
}] }, { type: i1.BaseLocalization, decorators: [{
|
|
1586
1625
|
type: Optional
|
|
1587
|
-
}] }]; } });
|
|
1626
|
+
}] }, { type: AppEmbeddingExtensions }]; } });
|
|
1588
1627
|
|
|
1589
1628
|
// Angular
|
|
1590
1629
|
/**
|
|
@@ -2201,5 +2240,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2201
2240
|
* Generated bundle index. Do not edit.
|
|
2202
2241
|
*/
|
|
2203
2242
|
|
|
2204
|
-
export { APPSEARCH_PREFIX, CallResult, ClipboardService, CsvHeaders, DateService, EXT_ALLOW_UTC, EXT_DEBUG_MODE, Export, ExportAs, ExportDictionary, ExportList, ExportLocalization, ExportService, ExtensionsModule, GenericItem, HashingService, InboundMessageTypes, InterComMessage, InterComService, LocDatePipe, MessageService, UtilityService };
|
|
2243
|
+
export { APPSEARCH_PREFIX, AppEmbeddingExtensions, CallResult, ClipboardService, CsvHeaders, DateService, EXT_ALLOW_UTC, EXT_DEBUG_MODE, Export, ExportAs, ExportDictionary, ExportList, ExportLocalization, ExportService, ExtensionsModule, GenericItem, HashingService, InboundMessageTypes, InterComMessage, InterComService, LocDatePipe, MessageService, UtilityService };
|
|
2205
2244
|
//# sourceMappingURL=esfaenza-extensions.mjs.map
|