@openmfp/portal-ui-lib 0.192.52 → 0.193.0
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.
|
@@ -871,10 +871,21 @@ class StaticSettingsConfigServiceImpl {
|
|
|
871
871
|
});
|
|
872
872
|
this.i18nService = inject(I18nService);
|
|
873
873
|
this.iframeService = inject(IframeService);
|
|
874
|
+
this.luigiCoreService = inject(LuigiCoreService);
|
|
874
875
|
}
|
|
875
876
|
async getStaticSettingsConfig() {
|
|
876
877
|
const logo = 'assets/images/logo.png';
|
|
877
878
|
const favicon = 'assets/images/favicon.ico';
|
|
879
|
+
let designConfig = {
|
|
880
|
+
btpToolLayout: true,
|
|
881
|
+
};
|
|
882
|
+
if (this.luigiCoreService.isFeatureToggleActive('vega-design')) {
|
|
883
|
+
designConfig = {
|
|
884
|
+
btpToolLayout: false,
|
|
885
|
+
profileType: 'vega',
|
|
886
|
+
sideNav: { style: 'vega' },
|
|
887
|
+
};
|
|
888
|
+
}
|
|
878
889
|
return {
|
|
879
890
|
header: {
|
|
880
891
|
title: 'OpenMFP Portal',
|
|
@@ -886,7 +897,6 @@ class StaticSettingsConfigServiceImpl {
|
|
|
886
897
|
btpToolLayout: true,
|
|
887
898
|
globalNav: true,
|
|
888
899
|
},
|
|
889
|
-
btpToolLayout: true,
|
|
890
900
|
responsiveNavigation: 'Fiori3',
|
|
891
901
|
featureToggles: {
|
|
892
902
|
queryStringParam: 'ft',
|
|
@@ -896,6 +906,7 @@ class StaticSettingsConfigServiceImpl {
|
|
|
896
906
|
},
|
|
897
907
|
iframeCreationInterceptor: this.iframeService.iFrameCreationInterceptor(),
|
|
898
908
|
customTranslationImplementation: this.i18nService,
|
|
909
|
+
...designConfig,
|
|
899
910
|
...(await this.customStaticSettingsConfigService?.getStaticSettingsConfig()),
|
|
900
911
|
};
|
|
901
912
|
}
|
|
@@ -1349,8 +1360,8 @@ class HeaderBarService {
|
|
|
1349
1360
|
return {
|
|
1350
1361
|
...rest,
|
|
1351
1362
|
renderer: (containerElement, nodeItems, clickHandler) => {
|
|
1363
|
+
containerElement.style['padding-left'] = '0.25rem';
|
|
1352
1364
|
containerElement.style.display = 'flex';
|
|
1353
|
-
containerElement.style.position = 'static';
|
|
1354
1365
|
containerElement.style.height = 'min-content';
|
|
1355
1366
|
const parrent = containerElement.parentElement;
|
|
1356
1367
|
if (parrent) {
|
|
@@ -1359,13 +1370,18 @@ class HeaderBarService {
|
|
|
1359
1370
|
const { rightContainer, leftContainer } = this.createRendererContainers();
|
|
1360
1371
|
containerElement.appendChild(leftContainer);
|
|
1361
1372
|
containerElement.appendChild(rightContainer);
|
|
1362
|
-
this.executeRenderes(leftContainer, leftRenderers, [
|
|
1363
|
-
|
|
1373
|
+
this.executeRenderes(leftContainer, leftRenderers, [
|
|
1374
|
+
nodeItems,
|
|
1375
|
+
clickHandler,
|
|
1376
|
+
]);
|
|
1377
|
+
this.executeRenderes(rightContainer, rightRenderers, [
|
|
1378
|
+
nodeItems,
|
|
1379
|
+
clickHandler,
|
|
1380
|
+
]);
|
|
1364
1381
|
return containerElement;
|
|
1365
1382
|
},
|
|
1366
1383
|
};
|
|
1367
1384
|
}
|
|
1368
|
-
;
|
|
1369
1385
|
setParrentStyles(parrent) {
|
|
1370
1386
|
parrent.style.display = 'flex';
|
|
1371
1387
|
parrent.style.flexDirection = 'column';
|
|
@@ -1984,22 +2000,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1984
2000
|
class FeatureTogglesService {
|
|
1985
2001
|
constructor() {
|
|
1986
2002
|
this.configService = inject(ConfigService);
|
|
2003
|
+
this.authService = inject(AuthService);
|
|
1987
2004
|
this.envConfigService = inject(EnvConfigService);
|
|
1988
2005
|
this.luigiCoreService = inject(LuigiCoreService);
|
|
1989
2006
|
}
|
|
1990
2007
|
async initFeatureToggles() {
|
|
1991
2008
|
try {
|
|
1992
2009
|
const { uiOptions } = await this.envConfigService.getEnvConfig();
|
|
1993
|
-
|
|
2010
|
+
let ft = {};
|
|
2011
|
+
if (this.authService.getAuthData()) {
|
|
2012
|
+
const { featureToggles } = await this.configService.getPortalConfig();
|
|
2013
|
+
ft = featureToggles;
|
|
2014
|
+
}
|
|
1994
2015
|
if (uiOptions?.includes('enableFeatureToggleSetting')) {
|
|
1995
2016
|
const featureToggleSettings = featureToggleLocalStorage.read();
|
|
1996
2017
|
this.luigiCoreService.setFeatureToggles({
|
|
1997
|
-
...
|
|
2018
|
+
...ft,
|
|
1998
2019
|
...featureToggleSettings,
|
|
1999
2020
|
});
|
|
2000
2021
|
return;
|
|
2001
2022
|
}
|
|
2002
|
-
this.luigiCoreService.setFeatureToggles(
|
|
2023
|
+
this.luigiCoreService.setFeatureToggles(ft);
|
|
2003
2024
|
}
|
|
2004
2025
|
catch (e) {
|
|
2005
2026
|
console.error('Failed to initialize feature toggles', e);
|
|
@@ -2609,8 +2630,10 @@ class LuigiComponent {
|
|
|
2609
2630
|
this.routingConfigService = inject(RoutingConfigServiceImpl);
|
|
2610
2631
|
this.authConfigService = inject(AuthConfigService);
|
|
2611
2632
|
this.staticSettingsConfigService = inject(StaticSettingsConfigServiceImpl);
|
|
2633
|
+
this.featureTogglesService = inject(FeatureTogglesService);
|
|
2612
2634
|
}
|
|
2613
2635
|
async ngOnInit() {
|
|
2636
|
+
await this.featureTogglesService.initFeatureToggles();
|
|
2614
2637
|
try {
|
|
2615
2638
|
this.luigiCoreService.setConfig({
|
|
2616
2639
|
auth: await this.authConfigService.getAuthConfig(),
|
|
@@ -2638,11 +2661,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
2638
2661
|
document.body.classList.add('ui5-content-density-compact');
|
|
2639
2662
|
class PortalComponent {
|
|
2640
2663
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2641
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: PortalComponent, isStandalone: true, selector: "app-portal", ngImport: i0, template: "<div class=\"fd-page__content\">\n <router-outlet></router-outlet>\n</div>\n", styles: [".fd-page__header{padding-left:1.5rem}.settings-icon-active{color:#0064d9!important}.local-development-settings-indication{position:absolute;top:-4px;right:-4px;width:12px;height:12px;font-size:12px}.entity-nav-header{padding-left:var(--fdNavigation_Padding_X);padding-
|
|
2664
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: PortalComponent, isStandalone: true, selector: "app-portal", ngImport: i0, template: "<div class=\"fd-page__content\">\n <router-outlet></router-outlet>\n</div>\n", styles: [".fd-page__header{padding-left:1.5rem}.settings-icon-active{color:#0064d9!important}.local-development-settings-indication{position:absolute;top:-4px;right:-4px;width:12px;height:12px;font-size:12px}.entity-nav-header{padding-left:1rem;padding-right:var(--fdNavigation_Padding_X);padding-top:var(--fdNavigation_Padding_X)!important;padding-bottom:1.25rem!important}.entity-nav-header-type{font-size:14px}.entity-nav-header-label{color:var(--sapAccentColor6);padding-top:8px}.fd-container.fd-form-layout-grid-container .fd-row .fd-col{white-space:inherit!important}#app:not(.vega) .lui-breadcrumb-container{position:static!important}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2642
2665
|
}
|
|
2643
2666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PortalComponent, decorators: [{
|
|
2644
2667
|
type: Component,
|
|
2645
|
-
args: [{ selector: 'app-portal', standalone: true, imports: [RouterOutlet], encapsulation: ViewEncapsulation.None, template: "<div class=\"fd-page__content\">\n <router-outlet></router-outlet>\n</div>\n", styles: [".fd-page__header{padding-left:1.5rem}.settings-icon-active{color:#0064d9!important}.local-development-settings-indication{position:absolute;top:-4px;right:-4px;width:12px;height:12px;font-size:12px}.entity-nav-header{padding-left:var(--fdNavigation_Padding_X);padding-
|
|
2668
|
+
args: [{ selector: 'app-portal', standalone: true, imports: [RouterOutlet], encapsulation: ViewEncapsulation.None, template: "<div class=\"fd-page__content\">\n <router-outlet></router-outlet>\n</div>\n", styles: [".fd-page__header{padding-left:1.5rem}.settings-icon-active{color:#0064d9!important}.local-development-settings-indication{position:absolute;top:-4px;right:-4px;width:12px;height:12px;font-size:12px}.entity-nav-header{padding-left:1rem;padding-right:var(--fdNavigation_Padding_X);padding-top:var(--fdNavigation_Padding_X)!important;padding-bottom:1.25rem!important}.entity-nav-header-type{font-size:14px}.entity-nav-header-label{color:var(--sapAccentColor6);padding-top:8px}.fd-container.fd-form-layout-grid-container .fd-row .fd-col{white-space:inherit!important}#app:not(.vega) .lui-breadcrumb-container{position:static!important}\n"] }]
|
|
2646
2669
|
}] });
|
|
2647
2670
|
|
|
2648
2671
|
const portalRouts = [
|