@esfaenza/core 19.2.76 → 19.2.78

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.
@@ -1054,7 +1054,7 @@ class BaseComponent extends ReactiveComponent {
1054
1054
  _activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.Parameters = t; });
1055
1055
  _activatedRoute.queryParams.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.QueryParameters = t; });
1056
1056
  combineLatest([_activatedRoute.url, _activatedRoute.data]).subscribe((t) => {
1057
- this.gatherRouteInformations(t[0], t[1]);
1057
+ this.gatherRouteInformations(null, t[1]);
1058
1058
  });
1059
1059
  // Per i componenti navigabili non embeddati è inutile mandare il messaggio di navigazione
1060
1060
  // Così come per quelli per cui non esiste un titolo (cioè compoennti verso cui non si è navigato direttamente)
@@ -1063,11 +1063,13 @@ class BaseComponent extends ReactiveComponent {
1063
1063
  this._emb.MainWindow.postMessage({ type: "navigation", url: this.CompletePath, internalNavigation: this.InternalNavigation, title: this.NavigationTitle }, "*");
1064
1064
  }
1065
1065
  gatherRouteInformations(segs, data) {
1066
- this.CompletePath = "/" + segs.map(t => t.path).join('/');
1067
- this.ComponentPath = "/" + segs.filter((t, i) => i != 0).map(t => t.path).join('/');
1068
- this.BasePath = "/" + segs[0].path;
1069
- this.InternalNavigation = data["internalNavigation"] || false;
1070
- this.NavigationTitle = data["title"] || "";
1066
+ if (segs == null)
1067
+ segs = this._router.rawUrlTree.root.children.primary.segments;
1068
+ this.CompletePath = "/" + segs?.map(t => t.path)?.join('/');
1069
+ this.ComponentPath = "/" + segs?.filter((t, i) => i != 0)?.map(t => t.path)?.join('/');
1070
+ this.BasePath = "/" + segs?.[0]?.path;
1071
+ this.InternalNavigation = data?.["internalNavigation"] || false;
1072
+ this.NavigationTitle = data?.["title"] || "";
1071
1073
  }
1072
1074
  navigate(command, extras) {
1073
1075
  let commands = command;