@esfaenza/extensions 15.2.24 → 15.2.25
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.base.mjs +29 -0
- package/esm2020/lib/services/extensions.utilities.service.mjs +19 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/esfaenza-extensions.mjs +66 -22
- package/fesm2015/esfaenza-extensions.mjs.map +1 -1
- package/fesm2020/esfaenza-extensions.mjs +66 -22
- package/fesm2020/esfaenza-extensions.mjs.map +1 -1
- package/lib/services/extensions.base.d.ts +22 -0
- package/lib/services/extensions.utilities.service.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -312,6 +312,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
312
312
|
}]
|
|
313
313
|
}] });
|
|
314
314
|
|
|
315
|
+
// Angular
|
|
316
|
+
/* Classe che contiene tutte le informazioni sull'embedding in un unico contenitore per semplicità */
|
|
317
|
+
class AppEmbeddingExtensions {
|
|
318
|
+
constructor() {
|
|
319
|
+
this.Embedded = false;
|
|
320
|
+
this.EmbeddingLevel = 0;
|
|
321
|
+
this.MainWindow = window;
|
|
322
|
+
while (this.MainWindow.parent != this.MainWindow) {
|
|
323
|
+
this.MainWindow = this.MainWindow.parent;
|
|
324
|
+
this.EmbeddingLevel++;
|
|
325
|
+
this.Embedded = true;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
AppEmbeddingExtensions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppEmbeddingExtensions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
330
|
+
AppEmbeddingExtensions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppEmbeddingExtensions, providedIn: "root" });
|
|
331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppEmbeddingExtensions, decorators: [{
|
|
332
|
+
type: Injectable,
|
|
333
|
+
args: [{ providedIn: "root" }]
|
|
334
|
+
}], ctorParameters: function () { return []; } });
|
|
335
|
+
|
|
336
|
+
// Angular
|
|
337
|
+
/**
|
|
338
|
+
* Service che fornisce un accesso base in lettura/scrittura sulla clipboard
|
|
339
|
+
*/
|
|
340
|
+
class BaseExtensionsService {
|
|
341
|
+
constructor(emb) {
|
|
342
|
+
this.emb = emb;
|
|
343
|
+
this.RedirectMap = {};
|
|
344
|
+
this.RoutesMap = {};
|
|
345
|
+
for (let prop in this.RedirectMap) {
|
|
346
|
+
this.RoutesMap[prop] = { route: null };
|
|
347
|
+
this.RoutesMap[prop].route = (param) => {
|
|
348
|
+
let obj = {};
|
|
349
|
+
obj[this.RedirectMap[prop].params[0]] = param;
|
|
350
|
+
return [(this.emb.Embedded ? "pages_ext/" : "pages/") + this.RedirectMap[prop].url, obj];
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
BaseExtensionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseExtensionsService, deps: [{ token: AppEmbeddingExtensions }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
356
|
+
BaseExtensionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseExtensionsService, providedIn: "root" });
|
|
357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseExtensionsService, decorators: [{
|
|
358
|
+
type: Injectable,
|
|
359
|
+
args: [{ providedIn: "root" }]
|
|
360
|
+
}], ctorParameters: function () { return [{ type: AppEmbeddingExtensions }]; } });
|
|
361
|
+
|
|
315
362
|
/**
|
|
316
363
|
* Suffisso della proprietà da generare in cui salvare il navigatore
|
|
317
364
|
* utilizzato dal servizio di esportazione per prendere il valore delle proprietà di un oggetto
|
|
@@ -374,6 +421,12 @@ var TypeCode;
|
|
|
374
421
|
* Service che fornisce metodi di pubblica utilità
|
|
375
422
|
*/
|
|
376
423
|
class UtilityService {
|
|
424
|
+
constructor() {
|
|
425
|
+
// Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
426
|
+
//TODO: spostarla in un metodo di utilit� (esfaenza/extensions)
|
|
427
|
+
/** @ignore */
|
|
428
|
+
this.executionTimers = {};
|
|
429
|
+
}
|
|
377
430
|
/**
|
|
378
431
|
* Deseleziona il testo eventualmente selezionato
|
|
379
432
|
*/
|
|
@@ -591,6 +644,18 @@ class UtilityService {
|
|
|
591
644
|
}
|
|
592
645
|
return destination;
|
|
593
646
|
}
|
|
647
|
+
cast(object, clss) {
|
|
648
|
+
let ret = Object.assign(Object.create(clss.prototype), object);
|
|
649
|
+
return ret;
|
|
650
|
+
}
|
|
651
|
+
/** @ignore */
|
|
652
|
+
throttla(id, func, throttleTime) {
|
|
653
|
+
//Se ho la funzione che vuole eseguire ripulisco quel timeout
|
|
654
|
+
if (this.executionTimers[id])
|
|
655
|
+
clearTimeout(this.executionTimers[id]);
|
|
656
|
+
//Ricreo il timeout per eseguire quella funzione dopo throttleTime millisecondi
|
|
657
|
+
this.executionTimers[id] = setTimeout(() => { func(); this.executionTimers[id] = null; }, throttleTime);
|
|
658
|
+
}
|
|
594
659
|
}
|
|
595
660
|
UtilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UtilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
596
661
|
UtilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UtilityService, providedIn: "root" });
|
|
@@ -1220,27 +1285,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1220
1285
|
args: [{ providedIn: "root" }]
|
|
1221
1286
|
}], ctorParameters: function () { return [{ type: DateService }, { type: UtilityService }, { type: i1.LocalizationService }]; } });
|
|
1222
1287
|
|
|
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
|
-
|
|
1244
1288
|
// Angular
|
|
1245
1289
|
/**
|
|
1246
1290
|
* Service che fornisce funzionalità di alert nei tipi fondamentali: success, info, warning e danger
|
|
@@ -2240,5 +2284,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2240
2284
|
* Generated bundle index. Do not edit.
|
|
2241
2285
|
*/
|
|
2242
2286
|
|
|
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 };
|
|
2287
|
+
export { APPSEARCH_PREFIX, AppEmbeddingExtensions, BaseExtensionsService, 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 };
|
|
2244
2288
|
//# sourceMappingURL=esfaenza-extensions.mjs.map
|