@softheon/armature 15.23.7 → 15.23.8
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/core/components/app-template/app-template.component.mjs +20 -13
- package/fesm2015/softheon-armature.mjs +38 -33
- package/fesm2015/softheon-armature.mjs.map +1 -1
- package/fesm2020/softheon-armature.mjs +38 -33
- package/fesm2020/softheon-armature.mjs.map +1 -1
- package/lib/core/components/app-template/app-template.component.d.ts +5 -1
- package/package.json +1 -1
|
@@ -14,11 +14,11 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
|
14
14
|
import * as i3 from '@angular/flex-layout/flex';
|
|
15
15
|
import * as i4 from '@angular/flex-layout/extended';
|
|
16
16
|
import { BehaviorSubject, of, Subscription, lastValueFrom, throwError, ReplaySubject } from 'rxjs';
|
|
17
|
+
import * as i1$1 from 'angular-oauth2-oidc';
|
|
18
|
+
import { AuthConfig } from 'angular-oauth2-oidc';
|
|
17
19
|
import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';
|
|
18
20
|
import { map, catchError, filter, switchMap, take, share, first } from 'rxjs/operators';
|
|
19
21
|
import * as i1$2 from '@angular/cdk/layout';
|
|
20
|
-
import * as i1$1 from 'angular-oauth2-oidc';
|
|
21
|
-
import { AuthConfig } from 'angular-oauth2-oidc';
|
|
22
22
|
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
|
|
23
23
|
import * as i9 from '@angular/material/sidenav';
|
|
24
24
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
@@ -532,6 +532,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
532
532
|
type: Optional
|
|
533
533
|
}] }]; } });
|
|
534
534
|
|
|
535
|
+
// Injection tokens
|
|
536
|
+
/** The session configs */
|
|
537
|
+
const SESSION_CONFIG = new InjectionToken('SessionConfig');
|
|
538
|
+
/** The window interface */
|
|
539
|
+
const WINDOW = new InjectionToken('Window');
|
|
540
|
+
/** The user entity service configs */
|
|
541
|
+
const USER_ENTITY_SERVICE_CONFIG = new InjectionToken('UserEntityServiceConfig');
|
|
542
|
+
/** The pre sign in route storage key */
|
|
543
|
+
const preSignInRouteStorageKey = 'preSignInRoute';
|
|
544
|
+
/** The language storage key */
|
|
545
|
+
const languageStorageKey = 'language';
|
|
546
|
+
/** The federated module configuration storage key */
|
|
547
|
+
const federatedModuleConfigStorageKey = 'sofAr-federatedModule-config';
|
|
548
|
+
/** The federated module id of the application, this should be set when the application is allowed to run as a federated module */
|
|
549
|
+
const FEDERATED_MODULE_ID = new InjectionToken('FederatedModuleId');
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Routes to the pre login in route
|
|
553
|
+
* @param router The router
|
|
554
|
+
*/
|
|
555
|
+
const routeToPreLoginRoute = (router) => {
|
|
556
|
+
const preservedRoute = window.sessionStorage.getItem(preSignInRouteStorageKey);
|
|
557
|
+
if (preservedRoute) {
|
|
558
|
+
router.navigateByUrl(preservedRoute);
|
|
559
|
+
window.sessionStorage.removeItem(preSignInRouteStorageKey);
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
|
|
535
563
|
/** The base config service */
|
|
536
564
|
class BaseConfigService {
|
|
537
565
|
/** Gets the configurations */
|
|
@@ -561,22 +589,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
561
589
|
}]
|
|
562
590
|
}], ctorParameters: function () { return []; } });
|
|
563
591
|
|
|
564
|
-
// Injection tokens
|
|
565
|
-
/** The session configs */
|
|
566
|
-
const SESSION_CONFIG = new InjectionToken('SessionConfig');
|
|
567
|
-
/** The window interface */
|
|
568
|
-
const WINDOW = new InjectionToken('Window');
|
|
569
|
-
/** The user entity service configs */
|
|
570
|
-
const USER_ENTITY_SERVICE_CONFIG = new InjectionToken('UserEntityServiceConfig');
|
|
571
|
-
/** The pre sign in route storage key */
|
|
572
|
-
const preSignInRouteStorageKey = 'preSignInRoute';
|
|
573
|
-
/** The language storage key */
|
|
574
|
-
const languageStorageKey = 'language';
|
|
575
|
-
/** The federated module configuration storage key */
|
|
576
|
-
const federatedModuleConfigStorageKey = 'sofAr-federatedModule-config';
|
|
577
|
-
/** The federated module id of the application, this should be set when the application is allowed to run as a federated module */
|
|
578
|
-
const FEDERATED_MODULE_ID = new InjectionToken('FederatedModuleId');
|
|
579
|
-
|
|
580
592
|
/** The federated module service */
|
|
581
593
|
class FederatedModuleService {
|
|
582
594
|
/** The federated module configuration */
|
|
@@ -1967,10 +1979,12 @@ class AppTemplateComponent {
|
|
|
1967
1979
|
* @param translateService The translate service
|
|
1968
1980
|
* @param federatedModuleService The federated module service
|
|
1969
1981
|
*/
|
|
1970
|
-
constructor(configService, translateService, federatedModuleService) {
|
|
1982
|
+
constructor(configService, translateService, federatedModuleService, router, oauthService) {
|
|
1971
1983
|
this.configService = configService;
|
|
1972
1984
|
this.translateService = translateService;
|
|
1973
1985
|
this.federatedModuleService = federatedModuleService;
|
|
1986
|
+
this.router = router;
|
|
1987
|
+
this.oauthService = oauthService;
|
|
1974
1988
|
/** The header settings */
|
|
1975
1989
|
this.headerSettings = {};
|
|
1976
1990
|
/** The header theme settings */
|
|
@@ -1996,6 +2010,9 @@ class AppTemplateComponent {
|
|
|
1996
2010
|
this.config$ = this.configService.config$;
|
|
1997
2011
|
this.setDefaults();
|
|
1998
2012
|
this.configService.config$.subscribe(config => {
|
|
2013
|
+
if (config.oAuthSettings.preserveRequestedRoute && this.oauthService.hasValidAccessToken()) {
|
|
2014
|
+
routeToPreLoginRoute(this.router);
|
|
2015
|
+
}
|
|
1999
2016
|
// object assign is used here so the header doesn't have to re render with the new object reference
|
|
2000
2017
|
// header
|
|
2001
2018
|
Object.assign(this.headerSettings, config?.header?.settings);
|
|
@@ -2189,12 +2206,12 @@ class AppTemplateComponent {
|
|
|
2189
2206
|
Object.assign(this.navigationTheme, defaultNavTheme);
|
|
2190
2207
|
}
|
|
2191
2208
|
}
|
|
2192
|
-
AppTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AppTemplateComponent, deps: [{ token: BaseConfigService }, { token: i2.TranslateService }, { token: FederatedModuleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2209
|
+
AppTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AppTemplateComponent, deps: [{ token: BaseConfigService }, { token: i2.TranslateService }, { token: FederatedModuleService }, { token: i1$3.Router }, { token: i1$1.OAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2193
2210
|
AppTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: AppTemplateComponent, selector: "sof-ar-app-template", ngImport: i0, template: "<header *ngIf=\"!isFederatedModule\">\r\n <sof-ar-header [settings]=\"headerSettings\" [themeSettings]=\"headerThemeSettings\" [authSettings]=\"headerAuthSettings\"\r\n (setLanguage$)=\"applyLanguage()\" [currentLang]=\"currentLang\">\r\n <ng-container sof-ar-header-left>\r\n <ng-content select=\"[sof-ar-header-left]\"></ng-content>\r\n </ng-container>\r\n <ng-container sof-ar-header-center>\r\n <ng-content select=\"[sof-ar-header-center]\"></ng-content>\r\n </ng-container>\r\n <ng-container sof-ar-header-right>\r\n <ng-content select=\"[sof-ar-header-right]\"></ng-content>\r\n </ng-container>\r\n <ng-container sof-header-user-menu>\r\n <ng-content select=\"[sof-header-user-menu]\"></ng-content>\r\n </ng-container>\r\n </sof-ar-header>\r\n</header>\r\n<ng-content select=\"[sof-ar-template-content]\"> </ng-content>\r\n<ng-container *ngIf=\"isFederatedModule\">\r\n <router-outlet></router-outlet>\r\n</ng-container>\r\n<sof-ar-navigation *ngIf=\"!isFederatedModule\" [navigationData]=\"navigationNodes\" [settings]=\"navigationSettings\"\r\n [advancedSettings]=\"navigationAdvancedSettings\" [themeSettings]=\"navigationTheme\"\r\n [languageSettings]=\"languageSettings\" [currentLang]=\"currentLang\" (setLanguage$)=\"applyLanguage()\"\r\n [logOutText]=\"logOutText\">\r\n <ng-container sof-ar-nav-content>\r\n <sof-ar-alert-banner class=\"sof-ar-alert-banner-container\"></sof-ar-alert-banner>\r\n <div class=\"sof-ar-nav-container\" fxLayout=\"column\" fxLayout=\"start stretch\" style=\"height: 100%;\">\r\n <ng-content select=\"[sof-ar-nav-content-header]\"></ng-content>\r\n <div class=\"sof-ar-nav-content-container\" fxFlex=\"1 0 100%\">\r\n <main [ngStyle.lt-md]=\"{'max-width':navigationSettings?.maxContentWidthMobile+'%'}\"\r\n [ngStyle.gt-sm]=\"{'max-width':navigationSettings?.maxContentWidthDesktop+'%'}\" class=\"main-content\">\r\n <router-outlet></router-outlet>\r\n </main>\r\n </div>\r\n <div fxFlex=\"auto\" fxLayoutAlign=\"end end\">\r\n <sof-ar-footer style=\"width: 100%;\" [footerConfig]=\"{ showPreContent1: false, showPreContent2: false }\">\r\n <ng-container sof-ar-footer-content>\r\n <ng-content select=\"[sof-ar-footer-content]\"></ng-content>\r\n </ng-container>\r\n </sof-ar-footer>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container sof-ar-nav-mobile-footer>\r\n <ng-content select=\"[sof-ar-nav-mobile-footer]\"></ng-content>\r\n </ng-container>\r\n</sof-ar-navigation>\r\n", styles: [".nav-content-container{display:flex;flex-direction:column;height:100%}.sof-ar-nav-container{overflow:overlay}.sof-ar-nav-content-container{width:100%}.main-content{margin:auto}\n"], dependencies: [{ kind: "component", type: ArmatureNavigationComponent, selector: "sof-ar-navigation", inputs: ["navigationData", "settings", "advancedSettings", "themeSettings", "languageSettings", "currentLang", "logOutText"], outputs: ["setLanguage$"] }, { kind: "component", type: ArmatureHeaderComponent, selector: "sof-ar-header", inputs: ["settings", "themeSettings", "authSettings", "currentLang"], outputs: ["setLanguage$", "isLoggedInEE"] }, { kind: "component", type: ArmatureFooterComponent, selector: "sof-ar-footer", inputs: ["footerConfig"] }, { kind: "component", type: AlertBannerComponent, selector: "sof-ar-alert-banner", inputs: ["context"] }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }] });
|
|
2194
2211
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AppTemplateComponent, decorators: [{
|
|
2195
2212
|
type: Component,
|
|
2196
2213
|
args: [{ selector: 'sof-ar-app-template', template: "<header *ngIf=\"!isFederatedModule\">\r\n <sof-ar-header [settings]=\"headerSettings\" [themeSettings]=\"headerThemeSettings\" [authSettings]=\"headerAuthSettings\"\r\n (setLanguage$)=\"applyLanguage()\" [currentLang]=\"currentLang\">\r\n <ng-container sof-ar-header-left>\r\n <ng-content select=\"[sof-ar-header-left]\"></ng-content>\r\n </ng-container>\r\n <ng-container sof-ar-header-center>\r\n <ng-content select=\"[sof-ar-header-center]\"></ng-content>\r\n </ng-container>\r\n <ng-container sof-ar-header-right>\r\n <ng-content select=\"[sof-ar-header-right]\"></ng-content>\r\n </ng-container>\r\n <ng-container sof-header-user-menu>\r\n <ng-content select=\"[sof-header-user-menu]\"></ng-content>\r\n </ng-container>\r\n </sof-ar-header>\r\n</header>\r\n<ng-content select=\"[sof-ar-template-content]\"> </ng-content>\r\n<ng-container *ngIf=\"isFederatedModule\">\r\n <router-outlet></router-outlet>\r\n</ng-container>\r\n<sof-ar-navigation *ngIf=\"!isFederatedModule\" [navigationData]=\"navigationNodes\" [settings]=\"navigationSettings\"\r\n [advancedSettings]=\"navigationAdvancedSettings\" [themeSettings]=\"navigationTheme\"\r\n [languageSettings]=\"languageSettings\" [currentLang]=\"currentLang\" (setLanguage$)=\"applyLanguage()\"\r\n [logOutText]=\"logOutText\">\r\n <ng-container sof-ar-nav-content>\r\n <sof-ar-alert-banner class=\"sof-ar-alert-banner-container\"></sof-ar-alert-banner>\r\n <div class=\"sof-ar-nav-container\" fxLayout=\"column\" fxLayout=\"start stretch\" style=\"height: 100%;\">\r\n <ng-content select=\"[sof-ar-nav-content-header]\"></ng-content>\r\n <div class=\"sof-ar-nav-content-container\" fxFlex=\"1 0 100%\">\r\n <main [ngStyle.lt-md]=\"{'max-width':navigationSettings?.maxContentWidthMobile+'%'}\"\r\n [ngStyle.gt-sm]=\"{'max-width':navigationSettings?.maxContentWidthDesktop+'%'}\" class=\"main-content\">\r\n <router-outlet></router-outlet>\r\n </main>\r\n </div>\r\n <div fxFlex=\"auto\" fxLayoutAlign=\"end end\">\r\n <sof-ar-footer style=\"width: 100%;\" [footerConfig]=\"{ showPreContent1: false, showPreContent2: false }\">\r\n <ng-container sof-ar-footer-content>\r\n <ng-content select=\"[sof-ar-footer-content]\"></ng-content>\r\n </ng-container>\r\n </sof-ar-footer>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container sof-ar-nav-mobile-footer>\r\n <ng-content select=\"[sof-ar-nav-mobile-footer]\"></ng-content>\r\n </ng-container>\r\n</sof-ar-navigation>\r\n", styles: [".nav-content-container{display:flex;flex-direction:column;height:100%}.sof-ar-nav-container{overflow:overlay}.sof-ar-nav-content-container{width:100%}.main-content{margin:auto}\n"] }]
|
|
2197
|
-
}], ctorParameters: function () { return [{ type: BaseConfigService }, { type: i2.TranslateService }, { type: FederatedModuleService }]; } });
|
|
2214
|
+
}], ctorParameters: function () { return [{ type: BaseConfigService }, { type: i2.TranslateService }, { type: FederatedModuleService }, { type: i1$3.Router }, { type: i1$1.OAuthService }]; } });
|
|
2198
2215
|
|
|
2199
2216
|
/** The start up abstract class */
|
|
2200
2217
|
class AbstractStartupService {
|
|
@@ -5506,18 +5523,6 @@ var ApplicationUserModel;
|
|
|
5506
5523
|
* Do not edit the class manually.
|
|
5507
5524
|
*/
|
|
5508
5525
|
|
|
5509
|
-
/**
|
|
5510
|
-
* Routes to the pre login in route
|
|
5511
|
-
* @param router The router
|
|
5512
|
-
*/
|
|
5513
|
-
const routeToPreLoginRoute = (router) => {
|
|
5514
|
-
const preservedRoute = window.sessionStorage.getItem(preSignInRouteStorageKey);
|
|
5515
|
-
if (preservedRoute) {
|
|
5516
|
-
router.navigateByUrl(preservedRoute);
|
|
5517
|
-
window.sessionStorage.removeItem(preSignInRouteStorageKey);
|
|
5518
|
-
}
|
|
5519
|
-
};
|
|
5520
|
-
|
|
5521
5526
|
const BASE_PATH = new InjectionToken('basePath');
|
|
5522
5527
|
const COLLECTION_FORMATS = {
|
|
5523
5528
|
'csv': ',',
|