@esfaenza/core 19.2.44 → 19.2.46
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/components/external-page/external_pages.component.d.ts +10 -2
- package/components/jace-resource/jace-resource.component.d.ts +1 -1
- package/components/navbar/navbar.component.d.ts +2 -5
- package/directives/es-routerLink/es-routerLink.directive.d.ts +1 -0
- package/fesm2022/esfaenza-core-components.mjs +49 -28
- package/fesm2022/esfaenza-core-components.mjs.map +1 -1
- package/fesm2022/esfaenza-core-directives.mjs +20 -14
- package/fesm2022/esfaenza-core-directives.mjs.map +1 -1
- package/fesm2022/esfaenza-core-services.mjs +30 -5
- package/fesm2022/esfaenza-core-services.mjs.map +1 -1
- package/fesm2022/esfaenza-core.mjs +9 -5
- package/fesm2022/esfaenza-core.mjs.map +1 -1
- package/package.json +7 -7
- package/services/classes/app.state.d.ts +5 -1
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import { ActivatedRoute } from "@angular/router";
|
|
1
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
2
2
|
import { AccessControlService } from "@esfaenza/access-control";
|
|
3
3
|
import { LocalizationService } from "@esfaenza/localizations";
|
|
4
|
+
import { AppEmbeddingExtensions } from "@esfaenza/extensions";
|
|
4
5
|
import { HTTPService } from "@esfaenza/httpservice";
|
|
5
6
|
import { AppState, TokenService } from "@esfaenza/core/services";
|
|
7
|
+
import { ActiveModuleView } from "@esfaenza/core/domain";
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
9
|
export declare class ExternalPagesComponent {
|
|
8
10
|
private aac;
|
|
9
11
|
lc: LocalizationService;
|
|
10
12
|
private http;
|
|
13
|
+
private emb;
|
|
11
14
|
private _state;
|
|
12
15
|
private route;
|
|
16
|
+
private router;
|
|
13
17
|
private bts;
|
|
14
18
|
private Username;
|
|
15
19
|
private Password;
|
|
16
20
|
private Tenant;
|
|
17
|
-
|
|
21
|
+
private EmbeddingSource;
|
|
22
|
+
private LocalhostModuleMap;
|
|
23
|
+
private Localhost;
|
|
24
|
+
constructor(aac: AccessControlService, lc: LocalizationService, http: HTTPService, emb: AppEmbeddingExtensions, _state: AppState, route: ActivatedRoute, router: Router, bts: TokenService);
|
|
18
25
|
ngOnInit(): void;
|
|
26
|
+
afterModulesRetrieve(modules: ActiveModuleView[]): void;
|
|
19
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ExternalPagesComponent, never>;
|
|
20
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<ExternalPagesComponent, "external-pages", never, {}, {}, never, never, true, never>;
|
|
21
29
|
}
|
|
@@ -19,7 +19,7 @@ export declare class JaceResourceComponent {
|
|
|
19
19
|
constructor(cdr: ChangeDetectorRef, _state: AppState, sanitizer: DomSanitizer);
|
|
20
20
|
ngOnInit(): void;
|
|
21
21
|
ngAfterViewInit(): void;
|
|
22
|
-
afterModulesRetrieve(modules: ActiveModuleView[]): void
|
|
22
|
+
afterModulesRetrieve(modules: ActiveModuleView[]): Promise<void>;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<JaceResourceComponent, never>;
|
|
24
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<JaceResourceComponent, "jace-resource", never, { "Module": { "alias": "Module"; "required": false; }; "ModuleKeyType": { "alias": "ModuleKeyType"; "required": false; }; "Page": { "alias": "Page"; "required": false; }; "Localhost": { "alias": "Localhost"; "required": false; }; "Params": { "alias": "Params"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
25
|
}
|
|
@@ -5,7 +5,7 @@ import { CacheService, PreferencesService } from "@esfaenza/preferences";
|
|
|
5
5
|
import { LocalizationService } from "@esfaenza/localizations";
|
|
6
6
|
import { MessageService } from "@esfaenza/extensions";
|
|
7
7
|
import { HTTPService } from "@esfaenza/httpservice";
|
|
8
|
-
import { JaceIdentity,
|
|
8
|
+
import { JaceIdentity, ApplicationJob } from "@esfaenza/core/domain";
|
|
9
9
|
import { AppState, CompletedJobRedirectionService, TokenService } from "@esfaenza/core/services";
|
|
10
10
|
import { ReactiveComponent } from "../base/reactive.component";
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
@@ -24,7 +24,6 @@ export declare class Navbar extends ReactiveComponent {
|
|
|
24
24
|
private cjrService;
|
|
25
25
|
extensionComponents: Type<any>[];
|
|
26
26
|
loginUrlLegacy: boolean;
|
|
27
|
-
private fakeToken;
|
|
28
27
|
ANONYMOUS_MODE: boolean;
|
|
29
28
|
applicationVersion: string;
|
|
30
29
|
applicationEnvironment: string;
|
|
@@ -33,12 +32,10 @@ export declare class Navbar extends ReactiveComponent {
|
|
|
33
32
|
CurrentIdentity: JaceIdentity;
|
|
34
33
|
private newVersionWarned;
|
|
35
34
|
navbar: ElementRef;
|
|
36
|
-
|
|
37
|
-
constructor(prefsService: PreferencesService, cacheService: CacheService, MessageDef: BaseMessageService, notifications: NotificationsService, msgExts: MessageService, lc: LocalizationService, http: HTTPService, cdr: ChangeDetectorRef, _state: AppState, sr: TokenService, router: Router, cjrService: CompletedJobRedirectionService, extensionComponents: Type<any>[], loginUrlLegacy: boolean, fakeToken: boolean, ANONYMOUS_MODE: boolean);
|
|
35
|
+
constructor(prefsService: PreferencesService, cacheService: CacheService, MessageDef: BaseMessageService, notifications: NotificationsService, msgExts: MessageService, lc: LocalizationService, http: HTTPService, cdr: ChangeDetectorRef, _state: AppState, sr: TokenService, router: Router, cjrService: CompletedJobRedirectionService, extensionComponents: Type<any>[], loginUrlLegacy: boolean, ANONYMOUS_MODE: boolean);
|
|
38
36
|
ngOnDestroy(): void;
|
|
39
37
|
private handleBaseNotifications;
|
|
40
38
|
private checkIdentity;
|
|
41
|
-
getActiveJaceModules(): void;
|
|
42
39
|
private checkSessionTimeout;
|
|
43
40
|
ngAfterViewInit(): void;
|
|
44
41
|
goToDashboard(): void;
|
|
@@ -5,6 +5,7 @@ import { AppEmbeddingExtensions } from "@esfaenza/extensions";
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class esRouterLinkWithHref extends RouterLinkWithHref {
|
|
7
7
|
private emb;
|
|
8
|
+
private EmbeddingSource;
|
|
8
9
|
constructor(emb: AppEmbeddingExtensions, router: Router, route: ActivatedRoute, tabIndexAttribute: string | null | undefined, renderer: Renderer2, el: ElementRef, locationStrategy?: LocationStrategy);
|
|
9
10
|
set esRouterLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined);
|
|
10
11
|
onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
|
|
@@ -11,7 +11,7 @@ import { AppState } from '@esfaenza/core/services';
|
|
|
11
11
|
import * as i3 from '@angular/platform-browser';
|
|
12
12
|
import * as i4 from '@esfaenza/extensions';
|
|
13
13
|
import { AppEmbeddingExtensions, ExtensionsModule } from '@esfaenza/extensions';
|
|
14
|
-
import { ANONYMOUS_MODE, MENU_LOCALIZATION, MENU,
|
|
14
|
+
import { ANONYMOUS_MODE, MENU_LOCALIZATION, MENU, NAVBAR_EXTENSIONS, LOGIN_URL_LEGACY, REDIRECT_MAP, EMBEDDED_ROUTE, ROUTE, UpdatePasswordDto } from '@esfaenza/core/domain';
|
|
15
15
|
import * as i2$1 from '@esfaenza/httpservice';
|
|
16
16
|
import * as i1$2 from '@esfaenza/localizations';
|
|
17
17
|
import { LocalizationService, LocalizationModule } from '@esfaenza/localizations';
|
|
@@ -637,13 +637,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
637
637
|
}] });
|
|
638
638
|
|
|
639
639
|
// Angular
|
|
640
|
-
// Chiamate ai Repository
|
|
641
|
-
const GET_Jace_GetActiveJaceModules = "/api/Jace/GetActiveJaceModules";
|
|
642
640
|
const GET_Cache_ClearAllCaches = "/api/Cache/ClearAllCaches";
|
|
643
641
|
const GET_Cache_ClearAllClientsCaches = "/api/Cache/ClearAllClientsCaches";
|
|
644
642
|
const GET_Cache_ClearAllClientsPreferences = "/api/Cache/ClearAllClientsPreferences";
|
|
645
643
|
class Navbar extends ReactiveComponent {
|
|
646
|
-
constructor(prefsService, cacheService, MessageDef, notifications, msgExts, lc, http, cdr, _state, sr, router, cjrService, extensionComponents, loginUrlLegacy,
|
|
644
|
+
constructor(prefsService, cacheService, MessageDef, notifications, msgExts, lc, http, cdr, _state, sr, router, cjrService, extensionComponents, loginUrlLegacy, ANONYMOUS_MODE) {
|
|
647
645
|
super();
|
|
648
646
|
this.prefsService = prefsService;
|
|
649
647
|
this.cacheService = cacheService;
|
|
@@ -659,7 +657,6 @@ class Navbar extends ReactiveComponent {
|
|
|
659
657
|
this.cjrService = cjrService;
|
|
660
658
|
this.extensionComponents = extensionComponents;
|
|
661
659
|
this.loginUrlLegacy = loginUrlLegacy;
|
|
662
|
-
this.fakeToken = fakeToken;
|
|
663
660
|
this.ANONYMOUS_MODE = ANONYMOUS_MODE;
|
|
664
661
|
this.applicationVersion = myconfig.AppData.ComponentVersion;
|
|
665
662
|
this.applicationEnvironment = myconfig.AppData.ComponentEnvironment;
|
|
@@ -674,7 +671,6 @@ class Navbar extends ReactiveComponent {
|
|
|
674
671
|
this._state.subscribe("app.startedJob", (_) => { this.cdr.markForCheck(); });
|
|
675
672
|
this._state.subscribe("app.progressJob", (_) => { this.cdr.markForCheck(); });
|
|
676
673
|
this.handleBaseNotifications();
|
|
677
|
-
this.getActiveJaceModules();
|
|
678
674
|
// Appena la pagina parte, poi ogni secondo, controllo l'identity per verificare se rimane la stessa
|
|
679
675
|
interval(1000).pipe(startWith(0), takeUntil(this.destroyed$), takeWhile(_ => !myconfig.redirectInProgress)).subscribe(t => {
|
|
680
676
|
this.checkIdentity();
|
|
@@ -712,17 +708,6 @@ class Navbar extends ReactiveComponent {
|
|
|
712
708
|
}
|
|
713
709
|
this.CurrentIdentity = id;
|
|
714
710
|
}
|
|
715
|
-
getActiveJaceModules() {
|
|
716
|
-
if (this.fakeToken) {
|
|
717
|
-
this.Modules = [new ActiveModuleView("Modulo Esempio 1"), new ActiveModuleView("Modulo Esempio 2"), new ActiveModuleView("Modulo Esempio 3")];
|
|
718
|
-
this._state.Modules = this.Modules;
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
this.http.get(GET_Jace_GetActiveJaceModules).subscribe(res => {
|
|
722
|
-
this.Modules = res;
|
|
723
|
-
this._state.Modules = this.Modules;
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
711
|
checkSessionTimeout(identity) {
|
|
727
712
|
if (dayjs() >= dayjs(identity.ExpirationTime).subtract(10, 'minutes') && !myconfig.redirectInProgress) {
|
|
728
713
|
myconfig.redirectInProgress = true;
|
|
@@ -805,7 +790,7 @@ class Navbar extends ReactiveComponent {
|
|
|
805
790
|
completedJobClicked(job) {
|
|
806
791
|
this.cjrService.redirect(job);
|
|
807
792
|
}
|
|
808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: Navbar, deps: [{ token: i1$3.PreferencesService }, { token: i1$3.CacheService }, { token: i2$2.BaseMessageService }, { token: i2$2.NotificationsService }, { token: i4.MessageService }, { token: i1$2.LocalizationService }, { token: i2$1.HTTPService }, { token: i0.ChangeDetectorRef }, { token: i1.AppState }, { token: i1.TokenService }, { token: i1$1.Router }, { token: i1.CompletedJobRedirectionService }, { token: NAVBAR_EXTENSIONS }, { token: LOGIN_URL_LEGACY }, { token:
|
|
793
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: Navbar, deps: [{ token: i1$3.PreferencesService }, { token: i1$3.CacheService }, { token: i2$2.BaseMessageService }, { token: i2$2.NotificationsService }, { token: i4.MessageService }, { token: i1$2.LocalizationService }, { token: i2$1.HTTPService }, { token: i0.ChangeDetectorRef }, { token: i1.AppState }, { token: i1.TokenService }, { token: i1$1.Router }, { token: i1.CompletedJobRedirectionService }, { token: NAVBAR_EXTENSIONS }, { token: LOGIN_URL_LEGACY }, { token: ANONYMOUS_MODE }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
809
794
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: Navbar, isStandalone: true, selector: "navbar", viewQueries: [{ propertyName: "navbar", first: true, predicate: ["navbar"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<nav #navbar class=\"nav enuma-navbar\">\r\n <div class=\"d-flex\" style=\"width: 100%;\">\r\n <!-- Collapse men\u00F9 a sinistra -->\r\n <div><a (click)=\"toggleMenu()\" class=\"far fa-bars nav-icon app-padding-left-15\" style=\"padding-top: 8px;\"></a></div>\r\n\r\n <!-- Breadcrumb -->\r\n <div class=\"app-padding-left-15\" style=\"padding-top: 8px;\"><ng-content></ng-content></div>\r\n\r\n <div style=\"margin-left: auto; display: flex;\">\r\n <!--Notifications (Jobs)-->\r\n <div class=\"user-menu app-no-selection app-margin-right-15\" dropdown container=\"body\" placement=\"bottom right\">\r\n <div *ngIf=\"_state.jobsInProgress > 0\" class=\"fa-beat-fade nav-jobs-icon-notification\"></div>\r\n <a [class.fa-shake]=\"_state.jobsInProgress > 0\" class=\"far fa-bell module-nav-menu-link dropdown-toggle app-pointer\" style=\"--fa-animation-duration: 3s; --fa-animation-iteration-count: 1;\" dropdownToggle></a>\r\n <ul *dropdownMenu class=\"nav-jobs-menu\" role=\"menu\">\r\n <div class=\"nav-jobs-menu-header\">\r\n <span style=\"margin-right: auto;\">{{'Job Applicativi' | localize : lc}}</span>\r\n <span class=\"app-margin-right-5\">{{'Notifiche' | localize : lc}}:</span>\r\n <span class=\"m-b-min-5\">\r\n <p-toggleswitch [(ngModel)]=\"_state.notifyOnCompletedJobs\" (click)=\"clearMessages(); $event.stopPropagation();\"/>\r\n </span>\r\n </div>\r\n <div class=\"nav-jobs-menu-list\">\r\n <div *ngIf=\"_state.allJobs.length == 0\" class=\"nav-jobs-menu-list-empty\">\r\n <div>{{\"Al momento non c'\u00E8 nulla in esecuzione\" | localize : lc}}</div>\r\n </div>\r\n <div *ngFor=\"let job of _state.allJobs; let last = last\" [class.app-margin-bottom-5]=\"!last\">\r\n <span class=\"nav-jobs-menu-list-description\">\r\n <span *ngIf=\"!job.completed\" title=\"{{job.description}}\">{{job.smalldescription}}</span>\r\n <span *ngIf=\"job.completed\" title=\"{{job.description}}\" class=\"app-link app-no-selection app-inline app-pointer\" (click)=\"completedJobClicked(job); $event.stopPropagation();\">{{job.smalldescription}}</span>\r\n <strong class=\"pull-right\" *ngIf=\"!job.completed\">{{job.percentage}}%</strong>\r\n <strong class=\"pull-right\" *ngIf=\"job.completed\">{{'Completed' | localize : lc}}</strong>\r\n </span>\r\n <div class=\"progress progress-sm\">\r\n <progressbar *ngIf=\"!job.completed\" [max]=\"100\" [value]=\"job.percentage\" [striped]=\"true\" [animate]=\"true\"></progressbar>\r\n <progressbar *ngIf=\"job.completed\" type=\"success\" [max]=\"100\" [value]=\"100\" [striped]=\"false\" [animate]=\"false\"></progressbar>\r\n </div>\r\n </div>\r\n </div>\r\n </ul>\r\n </div>\r\n \r\n <!--Other Modules-->\r\n <div *ngIf=\"!ANONYMOUS_MODE\" class=\"user-menu app-no-selection app-margin-right-15\" dropdown container=\"body\" placement=\"bottom right\">\r\n <a class=\"far fa-cubes module-nav-menu-link dropdown-toggle app-pointer\" (click)=\"goToDashboard()\"></a>\r\n </div>\r\n\r\n <!--Quick Actions-->\r\n <div class=\"user-menu app-no-selection app-margin-right-15\" dropdown container=\"body\" placement=\"bottom right\">\r\n <a class=\"far fa-folder-gear module-nav-menu-link dropdown-toggle app-pointer\" dropdownToggle></a>\r\n <ul *dropdownMenu class=\"dropdown-menu dropdown-menu-right-user app-no-padding\" role=\"menu\">\r\n <li class=\"d-flex dropdown-title-bg\">\r\n <div class=\"dropdown-title\">Gestisci Cache Utente</div>\r\n </li>\r\n <li class=\"dropdown-top\"></li>\r\n <li class=\"dropdown-item app-pointer\" (click)=\"clearUserPreferences()\">\r\n <i class=\"far fa-user-times app-margin-right-10\"></i>{{'Ripulisci le Preferenze Utente' | localize : lc}}\r\n </li>\r\n <li class=\"dropdown-item app-pointer\" (click)=\"clearAll()\">\r\n <i class=\"far fa-broom-wide app-margin-right-10\"></i>{{'Ripulisci la Cache' | localize : lc}}\r\n </li>\r\n <li *ac=\"'R:Jace Admin'\" class=\"dropdown-item app-pointer\" (click)=\"forceClearConnectedClientAssets('cache')\">\r\n <i class=\"far fa-broom-wide app-margin-right-10\"></i>{{'Ripulisci la Cache di tutti' | localize : lc}}\r\n </li>\r\n <li *ac=\"'R:Jace Admin'\" class=\"dropdown-item app-pointer\" (click)=\"forceClearConnectedClientAssets('preferences')\">\r\n <i class=\"far fa-broom-wide app-margin-right-10\"></i>{{'Ripulisci le Preferenze di tutti' | localize : lc}}\r\n </li>\r\n <li class=\"dropdown-bot\"></li>\r\n </ul>\r\n </div>\r\n \r\n <!--Punti di estensione per Calendar, Chatroom e chi pi\u00F9 ne ha pi\u00F9 ne metta...-->\r\n <div class=\"user-menu app-no-selection app-margin-right-15\" *ngFor=\"let comp of extensionComponents\">\r\n <ng-template [componentHost]=\"comp\"></ng-template>\r\n </div>\r\n </div>\r\n\r\n <!--Ambiente-->\r\n <div>\r\n <div class=\"nav-environment app-no-selection\">\r\n <ng-container *ngIf=\"['Dev', 2].includes(applicationEnvironment)\">{{'Ambiente di Sviluppo' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['DevA', 3].includes(applicationEnvironment)\">{{'Ambiente di Sviluppo A' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['DevB', 4].includes(applicationEnvironment)\">{{'Ambiente di Sviluppo B' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['Stage', 5].includes(applicationEnvironment)\">{{'Ambiente di Staging' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['StageA', 6].includes(applicationEnvironment)\">{{'Ambiente di Staging A' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['Prod', 1].includes(applicationEnvironment)\">{{'Ambiente di Produzione' | localize : lc}}</ng-container>\r\n </div>\r\n </div>\r\n\r\n <!--Debugging ruoli e permessi-->\r\n <div [hidden]=\"true\">\r\n <div>Permissions:</div>\r\n <div *ngFor=\"let p of CurrentIdentity?.Permissions\">{{p}}</div>\r\n <div>Roles:</div>\r\n <div *ngFor=\"let r of CurrentIdentity?.Roles\">{{r}}</div>\r\n </div>\r\n </div>\r\n</nav>\r\n\r\n<!-- Template per l'icona dell'utente -->\r\n<ng-template #userIcon let-context>\r\n <img src='../assets/img/users/user.jpg' alt=\"user-img\" class=\"img-circle user-img\">\r\n <img src='../assets/img/events/christmas.png' alt=\"user-img\" class=\"img-circle user-img app-absolute app-right-0\" [style.right.px]=\"context?.right || undefined\" *ngIf=\"_state.christmasTime\">\r\n <img src='../assets/img/events/halloween.png' alt=\"user-img\" class=\"img-circle user-img app-absolute app-right-0\" [style.right.px]=\"context?.right || undefined\" *ngIf=\"_state.halloweenTime\">\r\n</ng-template>\r\n\r\n<!-- Template per le informaizoni di debug: Ambiente, ruoli, permessi ecc -->\r\n<ng-template #debugInfos>\r\n <div>{{CurrentIdentity?.FullName}} - ({{CurrentIdentity?.TenantName}})</div>\r\n <div hidden>{{applicationEnvironment}}</div>\r\n <div class=\"text-sm-center\">\r\n <ng-container *ngIf=\"['Dev', 2].includes(applicationEnvironment)\">{{'Ambiente di Sviluppo' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['DevA', 3].includes(applicationEnvironment)\">{{'Ambiente di Sviluppo A' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['DevB', 4].includes(applicationEnvironment)\">{{'Ambiente di Sviluppo B' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['Stage', 5].includes(applicationEnvironment)\">{{'Ambiente di Staging' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['StageA', 6].includes(applicationEnvironment)\">{{'Ambiente di Staging A' | localize : lc}}</ng-container>\r\n <ng-container *ngIf=\"['Prod', 1].includes(applicationEnvironment)\">{{'Ambiente di Produzione' | localize : lc}}</ng-container>\r\n </div>\r\n <div [hidden]=\"true\">\r\n <div>Permissions:</div>\r\n <div *ngFor=\"let p of CurrentIdentity?.Permissions\">{{p}}</div>\r\n <div>Roles:</div>\r\n <div *ngFor=\"let r of CurrentIdentity?.Roles\">{{r}}</div>\r\n </div>\r\n</ng-template>", styles: [".nav-jobs-icon{position:absolute;left:-20px;margin:0;padding:0;top:10px;color:#fff!important;font-size:20px}.nav-jobs-icon-notification{top:7px;left:-7px;position:absolute;background-color:#0056b3;border-radius:50%;height:8px;width:8px}.nav-jobs-menu{width:350px;height:250px;background:#fff;margin:2px 0 0;padding:5px;border:1px solid rgb(61.75,77.1875,99.75)}.nav-jobs-menu-header{background-color:#344154;padding:8px;font-size:14px;margin-top:-5px;margin-left:-5px;margin-right:-5px;display:flex;align-items:center}.nav-jobs-menu-header span{color:#fffc}.nav-jobs-menu-list{position:relative;overflow:auto;width:auto;height:203px;padding:5px}.nav-jobs-menu-list-description{font-size:13px;color:#666}.nav-jobs-menu-list-empty{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:15px;text-align:center}.user-menu{font-size:14px}.user-menu .dropdown-toggle:after{display:none}.user-menu .dropdown-menu{right:0;top:auto!important;left:auto!important;margin-top:10px;padding-top:0;overflow:hidden;border-radius:0;font-size:14px;box-shadow:0 6px 12px #0003;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important}.user-menu .dropdown-menu a{color:#024a88}.user-menu .dropdown-menu a:hover{color:#fff8a9;background-color:red}.user-menu .dropdown-menu a i{margin-right:8px}.navbar-help{font-size:20px!important;color:#ffffff80!important;border:1px solid rgba(255,255,255,.1);margin-left:5px!important;padding:5px 10px 2px 11px!important;border-radius:50%;background-color:#ffffff0d;cursor:pointer;width:31px;height:31px}.navbar-fill{margin-top:-5px;margin-bottom:-5px;margin-left:10px;width:calc(100% - 530px)}.navbar-fillable{width:calc(100% - 231px)}.navbar-floating-label{position:absolute;top:-9px;left:-5px;background:#242d3a;padding-left:5px;padding-right:5px;color:#ffffffe6!important}.module-nav-menu-link{color:#fff!important;font-size:20px;padding-top:8px;padding-right:5px;cursor:pointer}.module-board-menu{position:relative;top:1px;background-color:#1f1f1f;padding:15px}.dropdown-title-bg{background-color:#344154;border:1px solid rgb(61.75,77.1875,99.75);border-bottom:0px}.dropdown-title{color:#fff;margin:auto;padding:8px 0;font-size:18px}.dropdown-menu{background-color:#fff;border:none}.dropdown-divider{border-top:1px solid #eeeeee}.dropdown-item{background-color:#fff;color:#0056b3}.dropdown-item:hover{color:#004a9a!important;background-color:#eee}.dropdown-top{background-color:#fff;height:0;margin-bottom:.5rem;overflow:hidden;border-top:1px solid #eeeeee}.dropdown-bot{background-color:#fff;height:0;margin-top:.5rem;overflow:hidden;border-top:1px solid #eeeeee}.enuma-navbar{height:60px;align-items:center;background-color:#2a3544;box-shadow:0 8px 6px -6px #1313130a,0 12px 16px -16px #1313130d;margin-bottom:-1px;border-bottom:1px solid #191E29}.nav-environment{color:#fff;background-color:#3e4d64;text-align:center;padding:5px 10px;margin:2px 10px 0 0}.nav-icon{color:#fff!important;font-size:20px;cursor:pointer}.nav-right-section{position:absolute;right:10px;top:10px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i9.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i9.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i9.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: ProgressbarModule }, { kind: "component", type: i10.ProgressbarComponent, selector: "progressbar", inputs: ["max", "animate", "striped", "type", "value"] }, { kind: "directive", type: ComponentHostDirective, selector: "[componentHost]", inputs: ["componentHost", "Inputs"] }, { kind: "ngmodule", type: EsTableModule }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i1$2.LocalizePipe, name: "localize" }, { kind: "ngmodule", type: AccessControlModule }, { kind: "directive", type: i5.AccessControlDirective, selector: "[ac]", inputs: ["ac", "acAbsolute"] }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i12.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }], viewProviders: [{ provide: LocalizationService, useClass: NavBarLoc }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
810
795
|
}
|
|
811
796
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: Navbar, decorators: [{
|
|
@@ -817,9 +802,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
817
802
|
}] }, { type: undefined, decorators: [{
|
|
818
803
|
type: Inject,
|
|
819
804
|
args: [LOGIN_URL_LEGACY]
|
|
820
|
-
}] }, { type: undefined, decorators: [{
|
|
821
|
-
type: Inject,
|
|
822
|
-
args: [USE_FAKE_ACCESS_TOKEN]
|
|
823
805
|
}] }, { type: undefined, decorators: [{
|
|
824
806
|
type: Inject,
|
|
825
807
|
args: [ANONYMOUS_MODE]
|
|
@@ -877,21 +859,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
877
859
|
|
|
878
860
|
// Angular
|
|
879
861
|
class ExternalPagesComponent {
|
|
880
|
-
constructor(aac, lc, http, _state, route, bts) {
|
|
862
|
+
constructor(aac, lc, http, emb, _state, route, router, bts) {
|
|
881
863
|
this.aac = aac;
|
|
882
864
|
this.lc = lc;
|
|
883
865
|
this.http = http;
|
|
866
|
+
this.emb = emb;
|
|
884
867
|
this._state = _state;
|
|
885
868
|
this.route = route;
|
|
869
|
+
this.router = router;
|
|
886
870
|
this.bts = bts;
|
|
887
871
|
this.Username = "";
|
|
888
872
|
this.Password = "";
|
|
889
873
|
this.Tenant = "";
|
|
874
|
+
this.EmbeddingSource = "";
|
|
875
|
+
// TODO: Automatizzare
|
|
876
|
+
this.LocalhostModuleMap = {
|
|
877
|
+
"crm": "31813",
|
|
878
|
+
"sii": "21645",
|
|
879
|
+
"pp": "1616"
|
|
880
|
+
};
|
|
881
|
+
this.Localhost = "";
|
|
890
882
|
this.Username = this.route.snapshot.params["user"];
|
|
891
883
|
this.Password = this.route.snapshot.params["pswd"];
|
|
892
884
|
this.Tenant = this.route.snapshot.params["tnt"];
|
|
885
|
+
this.EmbeddingSource = this.route.snapshot.params["source"];
|
|
893
886
|
}
|
|
894
887
|
ngOnInit() {
|
|
888
|
+
if (!this.emb.Embedded) {
|
|
889
|
+
console.log("Pagina ext richiamata in ambiente non embeddato. Sono in una nuova scheda!!");
|
|
890
|
+
console.log("L'embedder originale doveva essere: " + this.EmbeddingSource);
|
|
891
|
+
console.log("Dato che sono in una nuova scheda devo in realtà navigare a lui, con link su emb/ecc in modo da aprire una scheda embeddata su questa pagina. Se funziona già fino a qui sono a cavallo");
|
|
892
|
+
this.Localhost = this.LocalhostModuleMap[this.EmbeddingSource];
|
|
893
|
+
if (this._state.Modules?.length > 0)
|
|
894
|
+
this.afterModulesRetrieve(this._state.Modules);
|
|
895
|
+
else {
|
|
896
|
+
this._state.subscribe("modules.Retrieved", (modules) => {
|
|
897
|
+
this.afterModulesRetrieve(modules);
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
895
902
|
console.log("Caricamento pagina nell'IFRAME completato!");
|
|
896
903
|
console.log("[" + this.Tenant + "]" + this.Username + " - " + this.Password);
|
|
897
904
|
// Le info di login che ho passato sono le stesse delle info di login salvate nel token --> È un redirect da un sito esterno ma il token c'è già. Esco
|
|
@@ -907,13 +914,26 @@ class ExternalPagesComponent {
|
|
|
907
914
|
this.http.post(`${myconfig.AuthUrl}/api/login/dologin`, LoginDTO).subscribe(t => {
|
|
908
915
|
});
|
|
909
916
|
}
|
|
910
|
-
|
|
911
|
-
|
|
917
|
+
afterModulesRetrieve(modules) {
|
|
918
|
+
// Sto navigando a {sito}/#/pages_ext/{origine}/etc...
|
|
919
|
+
// Devo ridirezionare a {sorgente}/#/pages/embed/{thisModule}/etc...
|
|
920
|
+
let module = modules.find(t => t.altname == this.EmbeddingSource);
|
|
921
|
+
if (!module) {
|
|
922
|
+
console.error(`Impossibile trovare il modulo con altname uguale a ${this.EmbeddingSource}`);
|
|
923
|
+
}
|
|
924
|
+
let afterPagesExt = this.router.url.split("pages_ext")[1].substring(1).split("/").slice(1).join("/");
|
|
925
|
+
let sourceModuleUrl = myconfig.AuthUrl.includes("localhost") ? `http://localhost:${this.Localhost}` : module.uiurl;
|
|
926
|
+
let finalUrl = `${sourceModuleUrl}/#/pages/embed/${myconfig.AppData.ModuleId}/${afterPagesExt}`;
|
|
927
|
+
console.log("@esfaenza/core: navigating to " + finalUrl);
|
|
928
|
+
location.replace(finalUrl);
|
|
929
|
+
}
|
|
930
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternalPagesComponent, deps: [{ token: i5.AccessControlService }, { token: i1$2.LocalizationService }, { token: i2$1.HTTPService }, { token: i4.AppEmbeddingExtensions }, { token: i1.AppState }, { token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i1.TokenService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
931
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ExternalPagesComponent, isStandalone: true, selector: "external-pages", ngImport: i0, template: "<!-- Creo il router outlet solo se sono una pagina embeddata, altrimenti vuol dire che avr\u00F2 un redirect al parent embeddato a dovere -->\r\n<router-outlet *ngIf=\"this.emb.Embedded\"></router-outlet>", dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
912
932
|
}
|
|
913
933
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternalPagesComponent, decorators: [{
|
|
914
934
|
type: Component,
|
|
915
|
-
args: [{ selector: "external-pages", imports: [RouterOutlet], template: "<router-outlet></router-outlet>" }]
|
|
916
|
-
}], ctorParameters: () => [{ type: i5.AccessControlService }, { type: i1$2.LocalizationService }, { type: i2$1.HTTPService }, { type: i1.AppState }, { type: i1$1.ActivatedRoute }, { type: i1.TokenService }] });
|
|
935
|
+
args: [{ selector: "external-pages", imports: [RouterOutlet], template: "<!-- Creo il router outlet solo se sono una pagina embeddata, altrimenti vuol dire che avr\u00F2 un redirect al parent embeddato a dovere -->\r\n<router-outlet *ngIf=\"this.emb.Embedded\"></router-outlet>" }]
|
|
936
|
+
}], ctorParameters: () => [{ type: i5.AccessControlService }, { type: i1$2.LocalizationService }, { type: i2$1.HTTPService }, { type: i4.AppEmbeddingExtensions }, { type: i1.AppState }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i1.TokenService }] });
|
|
917
937
|
|
|
918
938
|
// Angular
|
|
919
939
|
class JaceLoginComponent {
|
|
@@ -1088,7 +1108,7 @@ class JaceResourceComponent {
|
|
|
1088
1108
|
this.cdr.markForCheck();
|
|
1089
1109
|
});
|
|
1090
1110
|
}
|
|
1091
|
-
afterModulesRetrieve(modules) {
|
|
1111
|
+
async afterModulesRetrieve(modules) {
|
|
1092
1112
|
let module = modules.find(t => (this.ModuleKeyType == 'id' ? t.idmodule : this.ModuleKeyType == 'altid' ? t.altname : "") == this.Module);
|
|
1093
1113
|
if (!module) {
|
|
1094
1114
|
console.error(`Impossibile trovare il modulo con ${this.ModuleKeyType} uguale a ${this.Module}`);
|
|
@@ -1100,7 +1120,8 @@ class JaceResourceComponent {
|
|
|
1100
1120
|
}
|
|
1101
1121
|
let moduleUrl = myconfig.AuthUrl.includes("localhost") ? `http://localhost:${this.Localhost}` : module.uiurl;
|
|
1102
1122
|
let parameters = this.Params ? Object.keys(this.Params).map(k => `${k}=${this.Params[k]}`).join(';') : '';
|
|
1103
|
-
|
|
1123
|
+
// ATTENZIONE: L'embedding a due livelli si potrebbe rompere qui, ma chi cazzo embedda a due livelli....
|
|
1124
|
+
let finalUrl = `${moduleUrl}/#/pages_ext/${myconfig.AppData.ModuleId}/${this.Page}${(parameters ? (';' + parameters) : '')}`;
|
|
1104
1125
|
console.log("@esfaenza/core: Jace-resource navigating to " + finalUrl);
|
|
1105
1126
|
this.sanitizedSourceResource = this.sanitizer.bypassSecurityTrustResourceUrl(finalUrl);
|
|
1106
1127
|
}
|