@openmfp/portal-ui-lib 0.191.4 → 0.192.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.
|
@@ -1712,6 +1712,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1712
1712
|
}]
|
|
1713
1713
|
}] });
|
|
1714
1714
|
|
|
1715
|
+
class NavHeaderService {
|
|
1716
|
+
constructor() {
|
|
1717
|
+
this.luigiCoreService = inject(LuigiCoreService);
|
|
1718
|
+
}
|
|
1719
|
+
setupNavigationHeader(entityNode) {
|
|
1720
|
+
if (entityNode.defineEntity) {
|
|
1721
|
+
this.setShowUpLink(entityNode);
|
|
1722
|
+
if (!entityNode.navHeader) {
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
entityNode.navHeader.renderer = (containerElement, nodeItem, clickHandler, navHeader) => {
|
|
1726
|
+
if (!containerElement || !navHeader?.label) {
|
|
1727
|
+
return;
|
|
1728
|
+
}
|
|
1729
|
+
const label = this.sanitizeString(navHeader.label);
|
|
1730
|
+
const type = this.sanitizeString(navHeader.type ??
|
|
1731
|
+
this.getSideNavigationHeaderType(navHeader.context, nodeItem));
|
|
1732
|
+
containerElement.classList.add('entity-nav-header');
|
|
1733
|
+
containerElement.innerHTML = `
|
|
1734
|
+
<ui5-text class="entity-nav-header-type">${type}</ui5-text>
|
|
1735
|
+
<ui5-title class="entity-nav-header-label" level="H6" size="H6">${label}</ui5-title>
|
|
1736
|
+
`;
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
setShowUpLink(entityNode) {
|
|
1741
|
+
const hasNavHeaderBeforeInit = !!entityNode.navHeader;
|
|
1742
|
+
if (entityNode.defineEntity?.useBack &&
|
|
1743
|
+
this.luigiCoreService.isFeatureToggleActive('navheader-up') &&
|
|
1744
|
+
hasNavHeaderBeforeInit &&
|
|
1745
|
+
typeof entityNode.navHeader === 'object') {
|
|
1746
|
+
entityNode.navHeader.showUpLink = true;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
getSideNavigationHeaderType(nodeContext = {}, nodeItem) {
|
|
1750
|
+
const dynamicFetchId = nodeItem.defineEntity?.dynamicFetchId || '';
|
|
1751
|
+
let type = (nodeContext.entityContext?.[dynamicFetchId] || {}).type;
|
|
1752
|
+
if (!type || typeof type !== 'string') {
|
|
1753
|
+
type =
|
|
1754
|
+
nodeItem.defineEntity?.label ||
|
|
1755
|
+
nodeItem.defineEntity?.type ||
|
|
1756
|
+
dynamicFetchId ||
|
|
1757
|
+
'Extension';
|
|
1758
|
+
}
|
|
1759
|
+
type = type.replace(/Id/i, '');
|
|
1760
|
+
return type.at(0).toUpperCase() + type.slice(1);
|
|
1761
|
+
}
|
|
1762
|
+
sanitizeString(inputString) {
|
|
1763
|
+
const tempSpan = document.createElement('span');
|
|
1764
|
+
tempSpan.textContent = inputString;
|
|
1765
|
+
return tempSpan.innerHTML;
|
|
1766
|
+
}
|
|
1767
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NavHeaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1768
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NavHeaderService, providedIn: 'root' }); }
|
|
1769
|
+
}
|
|
1770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NavHeaderService, decorators: [{
|
|
1771
|
+
type: Injectable,
|
|
1772
|
+
args: [{ providedIn: 'root' }]
|
|
1773
|
+
}] });
|
|
1774
|
+
|
|
1715
1775
|
class NodeContextProcessingServiceImpl {
|
|
1716
1776
|
constructor() {
|
|
1717
1777
|
this.customNodeContextProcessingService = inject(LUIGI_CUSTOM_NODE_CONTEXT_PROCESSING_SERVICE_INJECTION_TOKEN, { optional: true });
|
|
@@ -2199,19 +2259,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
2199
2259
|
|
|
2200
2260
|
class ChildrenNodesService {
|
|
2201
2261
|
constructor() {
|
|
2202
|
-
this.
|
|
2262
|
+
this.navHeaderService = inject(NavHeaderService);
|
|
2203
2263
|
this.configService = inject(ConfigService);
|
|
2204
2264
|
this.nodeUtilsService = inject(NodeUtilsService);
|
|
2205
2265
|
this.nodeSortingService = inject(NodeSortingService);
|
|
2206
2266
|
this.customNodeProcessingService = inject(LUIGI_CUSTOM_NODE_PROCESSING_SERVICE_INJECTION_TOKEN, { optional: true });
|
|
2207
2267
|
}
|
|
2208
2268
|
async processChildrenForEntity(entityNode, childrenNodes, ctx) {
|
|
2209
|
-
|
|
2210
|
-
this.luigiCoreService.isFeatureToggleActive('navheader-up') &&
|
|
2211
|
-
entityNode.navHeader) {
|
|
2212
|
-
entityNode.navHeader.showUpLink = true;
|
|
2213
|
-
}
|
|
2214
|
-
this.addNavigationHeader(entityNode);
|
|
2269
|
+
this.navHeaderService.setupNavigationHeader(entityNode);
|
|
2215
2270
|
if (!childrenNodes) {
|
|
2216
2271
|
return [];
|
|
2217
2272
|
}
|
|
@@ -2235,40 +2290,6 @@ class ChildrenNodesService {
|
|
|
2235
2290
|
.map((child) => this.customNodeProcessingService?.processNode(child.context, child) || child));
|
|
2236
2291
|
return this.nodeSortingService.sortNodes(nodes);
|
|
2237
2292
|
}
|
|
2238
|
-
addNavigationHeader(entityNode) {
|
|
2239
|
-
if (entityNode.defineEntity) {
|
|
2240
|
-
if (!entityNode.navHeader) {
|
|
2241
|
-
entityNode.navHeader = {};
|
|
2242
|
-
}
|
|
2243
|
-
entityNode.navHeader.renderer = (containerElement, nodeItem, clickHandler, navHeader) => {
|
|
2244
|
-
if (!containerElement || !navHeader?.label) {
|
|
2245
|
-
return;
|
|
2246
|
-
}
|
|
2247
|
-
const label = this.sanitizeString(navHeader.label);
|
|
2248
|
-
const type = this.getSideNavigationHeaderType(navHeader.context, nodeItem);
|
|
2249
|
-
containerElement.classList.add('entity-nav-header');
|
|
2250
|
-
containerElement.innerHTML = `
|
|
2251
|
-
<ui5-text class="entity-nav-header-type">${type}</ui5-text>
|
|
2252
|
-
<ui5-title class="entity-nav-header-label" level="H6" size="H6">${label}</ui5-title>
|
|
2253
|
-
`;
|
|
2254
|
-
};
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
getSideNavigationHeaderType(nodeContext = {}, nodeItem) {
|
|
2258
|
-
const dynamicFetchId = nodeItem.defineEntity?.dynamicFetchId || '';
|
|
2259
|
-
let type = (nodeContext.entityContext?.[dynamicFetchId] || {}).type;
|
|
2260
|
-
if (!type || typeof type !== 'string') {
|
|
2261
|
-
type = nodeItem.defineEntity?.label || dynamicFetchId || 'Extension';
|
|
2262
|
-
}
|
|
2263
|
-
type = type.replace(/Id/i, '');
|
|
2264
|
-
return type.at(0).toUpperCase() + type.slice(1);
|
|
2265
|
-
}
|
|
2266
|
-
sanitizeString(inputString) {
|
|
2267
|
-
// Prevent XSS attacks by removing any tags
|
|
2268
|
-
const tempSpan = document.createElement('span');
|
|
2269
|
-
tempSpan.textContent = inputString;
|
|
2270
|
-
return tempSpan.innerHTML;
|
|
2271
|
-
}
|
|
2272
2293
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ChildrenNodesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2273
2294
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ChildrenNodesService, providedIn: 'root' }); }
|
|
2274
2295
|
}
|
|
@@ -2617,11 +2638,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
2617
2638
|
document.body.classList.add('ui5-content-density-compact');
|
|
2618
2639
|
class PortalComponent {
|
|
2619
2640
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2620
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", 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-right:var(--fdNavigation_Padding_X);padding-bottom:1.25rem!important}.entity-nav-header-type{font-size:
|
|
2641
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", 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-right:var(--fdNavigation_Padding_X);padding-bottom:1.25rem!important;margin:10px 0 0 10px}.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}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2621
2642
|
}
|
|
2622
2643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PortalComponent, decorators: [{
|
|
2623
2644
|
type: Component,
|
|
2624
|
-
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-right:var(--fdNavigation_Padding_X);padding-bottom:1.25rem!important}.entity-nav-header-type{font-size:
|
|
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-right:var(--fdNavigation_Padding_X);padding-bottom:1.25rem!important;margin:10px 0 0 10px}.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}\n"] }]
|
|
2625
2646
|
}] });
|
|
2626
2647
|
|
|
2627
2648
|
const portalRouts = [
|
|
@@ -2773,5 +2794,5 @@ const addOptionalProviders = (options) => {
|
|
|
2773
2794
|
* Generated bundle index. Do not edit.
|
|
2774
2795
|
*/
|
|
2775
2796
|
|
|
2776
|
-
export { AppSwitcherConfigServiceImpl, AuthConfigService, AuthEvent, AuthService, ConfigService, CustomMessageListenersService, CustomReuseStrategy, DefaultNavigationRedirectStrategy, DefaultUserProfileConfigService, ERROR_COMPONENT_CONFIG, EntityType, EnvConfigService, GlobalContextConfigService, HEADER_BAR_CONFIG_SERVICE_INJECTION_TOKEN, HeaderBarService, I18nService, IframeService, LOCAL_CONFIGURATION_SERVICE_INJECTION_TOKEN, LUIGI_APP_SWITCHER_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_AUTH_EVENTS_CALLBACKS_SERVICE_INJECTION_TOKEN, LUIGI_BREADCRUMB_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_MESSAGE_LISTENERS_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_CONTEXT_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_EXTENDED_GLOBAL_CONTEXT_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_GLOBAL_SEARCH_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_NODES_CUSTOM_GLOBAL_SERVICE_INJECTION_TOKEN, LUIGI_NODE_CHANGE_HOOK_SERVICE_INJECTION_TOKEN, LUIGI_ROUTING_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_STATIC_SETTINGS_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_USER_PROFILE_CONFIG_SERVICE_INJECTION_TOKEN, LocalConfigurationServiceImpl, LocalNodesService, LocalStorageKeys, LoginEventService, LoginEventType, LuigiCoreService, LuigiNodesService, NAVIGATION_REDIRECT_STRATEGY_INJECTION_TOKEN, NetworkVisibility, NodeContextProcessingServiceImpl, NodeUtilsService, PortalComponent, RequestHeadersService, RoutingConfigServiceImpl, SessionRefreshService, StaticSettingsConfigServiceImpl, THEMING_SERVICE, UserSettingsConfigService, featureToggleLocalStorage, localDevelopmentSettingsLocalStorage, matchesJMESPath, providePortal, userSettingsLocalStorage };
|
|
2797
|
+
export { AppSwitcherConfigServiceImpl, AuthConfigService, AuthEvent, AuthService, ConfigService, CustomMessageListenersService, CustomReuseStrategy, DefaultNavigationRedirectStrategy, DefaultUserProfileConfigService, ERROR_COMPONENT_CONFIG, EntityType, EnvConfigService, GlobalContextConfigService, HEADER_BAR_CONFIG_SERVICE_INJECTION_TOKEN, HeaderBarService, I18nService, IframeService, LOCAL_CONFIGURATION_SERVICE_INJECTION_TOKEN, LUIGI_APP_SWITCHER_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_AUTH_EVENTS_CALLBACKS_SERVICE_INJECTION_TOKEN, LUIGI_BREADCRUMB_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_MESSAGE_LISTENERS_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_CONTEXT_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_CUSTOM_NODE_PROCESSING_SERVICE_INJECTION_TOKEN, LUIGI_EXTENDED_GLOBAL_CONTEXT_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_GLOBAL_SEARCH_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_NODES_CUSTOM_GLOBAL_SERVICE_INJECTION_TOKEN, LUIGI_NODE_CHANGE_HOOK_SERVICE_INJECTION_TOKEN, LUIGI_ROUTING_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_STATIC_SETTINGS_CONFIG_SERVICE_INJECTION_TOKEN, LUIGI_USER_PROFILE_CONFIG_SERVICE_INJECTION_TOKEN, LocalConfigurationServiceImpl, LocalNodesService, LocalStorageKeys, LoginEventService, LoginEventType, LuigiCoreService, LuigiNodesService, NAVIGATION_REDIRECT_STRATEGY_INJECTION_TOKEN, NavHeaderService, NetworkVisibility, NodeContextProcessingServiceImpl, NodeUtilsService, PortalComponent, RequestHeadersService, RoutingConfigServiceImpl, SessionRefreshService, StaticSettingsConfigServiceImpl, THEMING_SERVICE, UserSettingsConfigService, featureToggleLocalStorage, localDevelopmentSettingsLocalStorage, matchesJMESPath, providePortal, userSettingsLocalStorage };
|
|
2777
2798
|
//# sourceMappingURL=openmfp-portal-ui-lib.mjs.map
|