@esfaenza/core 19.2.56 → 19.2.58
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.
|
@@ -6,7 +6,7 @@ export declare abstract class BaseComponent extends ReactiveComponent {
|
|
|
6
6
|
protected CompletePath: string;
|
|
7
7
|
protected ComponentPath: string;
|
|
8
8
|
protected BasePath: string;
|
|
9
|
-
protected
|
|
9
|
+
protected Parameters: {
|
|
10
10
|
[name: string]: string;
|
|
11
11
|
};
|
|
12
12
|
protected QueryParameters: {
|
|
@@ -1024,7 +1024,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1024
1024
|
class BaseComponent extends ReactiveComponent {
|
|
1025
1025
|
constructor(injector) {
|
|
1026
1026
|
super();
|
|
1027
|
-
this.
|
|
1027
|
+
this.Parameters = null;
|
|
1028
1028
|
this.QueryParameters = null;
|
|
1029
1029
|
let _activatedRoute = injector.get(ActivatedRoute);
|
|
1030
1030
|
let _state = injector.get(AppState);
|
|
@@ -1033,7 +1033,7 @@ class BaseComponent extends ReactiveComponent {
|
|
|
1033
1033
|
this._router = injector.get(Router);
|
|
1034
1034
|
_state.registerNavigationIfMeaningful(_activatedRoute.snapshot);
|
|
1035
1035
|
// Parametri in maniera "dinamica"
|
|
1036
|
-
_activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.
|
|
1036
|
+
_activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.Parameters = t; });
|
|
1037
1037
|
_activatedRoute.queryParams.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.QueryParameters = t; });
|
|
1038
1038
|
this.gatherRouteInformations(_activatedRoute);
|
|
1039
1039
|
// Per i componenti navigabili non embeddati è inutile mandare il messaggio di navigazione
|
|
@@ -1043,8 +1043,8 @@ class BaseComponent extends ReactiveComponent {
|
|
|
1043
1043
|
this._emb.MainWindow.postMessage({ type: "navigation", url: this.CompletePath, internalNavigation: this.InternalNavigation, title: this.NavigationTitle }, "*");
|
|
1044
1044
|
}
|
|
1045
1045
|
gatherRouteInformations(_activatedRoute) {
|
|
1046
|
-
// Angular 15 -> 16: non si lavora più coi segmenti. Tiro fuori l'url del router e li rigenero
|
|
1047
|
-
let segs = _activatedRoute.snapshot._routerState.url.split('/').filter((t, i) => i != 0).map(t => { return { path: t }; });
|
|
1046
|
+
// Angular 15 -> 16: non si lavora più coi segmenti. Tiro fuori l'url del router (escludendo parametri e queryparams) e li rigenero
|
|
1047
|
+
let segs = _activatedRoute.snapshot._routerState.url.split('?')[0].split(';')[0].split('/').filter((t, i) => i != 0).map(t => { return { path: t }; });
|
|
1048
1048
|
this.CompletePath = "/" + segs.map(t => t.path).join('/');
|
|
1049
1049
|
this.ComponentPath = "/" + segs.filter((t, i) => i != 0).map(t => t.path).join('/');
|
|
1050
1050
|
this.BasePath = "/" + segs[0].path;
|
|
@@ -1400,8 +1400,8 @@ class EmbeddingComponent extends BaseComponent {
|
|
|
1400
1400
|
requestAnimationFrame(() => {
|
|
1401
1401
|
this.Page = this.CompletePath.split("/").slice(4).join("/");
|
|
1402
1402
|
console.log("Page: " + this.Page);
|
|
1403
|
-
let navParKeys = Object.keys(this.
|
|
1404
|
-
this.Pars = (navParKeys?.length || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.
|
|
1403
|
+
let navParKeys = Object.keys(this.Parameters)?.filter(p => p != "module");
|
|
1404
|
+
this.Pars = (navParKeys?.length || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.Parameters[t]}`).join(";");
|
|
1405
1405
|
console.log("Pars: " + this.Pars);
|
|
1406
1406
|
let queryParKeys = Object.keys(this.QueryParameters);
|
|
1407
1407
|
this.QueryPars = (queryParKeys?.length || 0) == 0 ? "" : "?" + queryParKeys.map(t => `${t}=${this.QueryParameters[t]}`).join(";");
|