@esfaenza/core 15.2.11 → 15.2.13
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/base/base.component.d.ts +2 -0
- package/esm2020/components/base/base.component.mjs +13 -2
- package/esm2020/lib/app.component.mjs +2 -2
- package/fesm2015/esfaenza-core-components.mjs +12 -2
- package/fesm2015/esfaenza-core-components.mjs.map +1 -1
- package/fesm2015/esfaenza-core.mjs +2 -2
- package/fesm2015/esfaenza-core.mjs.map +1 -1
- package/fesm2020/esfaenza-core-components.mjs +12 -2
- package/fesm2020/esfaenza-core-components.mjs.map +1 -1
- package/fesm2020/esfaenza-core.mjs +2 -2
- package/fesm2020/esfaenza-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { Component, ViewEncapsulation, Input, ViewChild, HostListener, Injectabl
|
|
|
3
3
|
import * as i2 from '@esfaenza/core/services';
|
|
4
4
|
import { AppState } from '@esfaenza/core/services';
|
|
5
5
|
import * as i1 from '@angular/router';
|
|
6
|
-
import { NavigationEnd, ActivatedRoute, RouterModule } from '@angular/router';
|
|
6
|
+
import { NavigationEnd, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
7
7
|
import * as i3 from '@angular/platform-browser';
|
|
8
8
|
import * as i3$1 from '@angular/common';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
@@ -24,7 +24,7 @@ import * as i11 from '@angular/material/slide-toggle';
|
|
|
24
24
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
25
25
|
import * as i12 from 'ngx-bootstrap/dropdown';
|
|
26
26
|
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
|
|
27
|
-
import { CategoriesWithModules, MENU_LOCALIZATION, MENU, REDIRECT_MAP } from '@esfaenza/core/domain';
|
|
27
|
+
import { CategoriesWithModules, MENU_LOCALIZATION, MENU, REDIRECT_MAP, EMBEDDED_ROUTE, ROUTE } from '@esfaenza/core/domain';
|
|
28
28
|
import { __awaiter } from 'tslib';
|
|
29
29
|
import * as i5$1 from '@esfaenza/access-control';
|
|
30
30
|
import * as i7 from '@esfaenza/core/directives';
|
|
@@ -851,6 +851,7 @@ class BaseComponent extends ReactiveComponent {
|
|
|
851
851
|
this.NavigationParameters = null;
|
|
852
852
|
let _activatedRoute = injector.get(ActivatedRoute);
|
|
853
853
|
let _state = injector.get(AppState);
|
|
854
|
+
this._router = injector.get(Router);
|
|
854
855
|
_state.registerNavigationIfMeaningful(_activatedRoute.snapshot);
|
|
855
856
|
// Parametri in maniera "dinamica"
|
|
856
857
|
_activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.NavigationParameters = t; });
|
|
@@ -872,6 +873,15 @@ class BaseComponent extends ReactiveComponent {
|
|
|
872
873
|
tmpWindow = tmpWindow.parent;
|
|
873
874
|
tmpWindow.postMessage({ type: "navigation", url: this.CompletePath, internalNavigation: this.InternalNavigation, title: this.NavigationTitle }, "*");
|
|
874
875
|
}
|
|
876
|
+
navigate(command, extras) {
|
|
877
|
+
let commands = command;
|
|
878
|
+
// Fix della path esattamente come in esRouterLink
|
|
879
|
+
commands = Array.isArray(commands) ? commands : [commands];
|
|
880
|
+
let route = commands[0];
|
|
881
|
+
if (!route.startsWith("/" + EMBEDDED_ROUTE) && !route.startsWith("/" + ROUTE))
|
|
882
|
+
commands[0] = this.BasePath + commands[0];
|
|
883
|
+
this._router.navigate(command, extras);
|
|
884
|
+
}
|
|
875
885
|
}
|
|
876
886
|
BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
877
887
|
BaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: BaseComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|