;
+
+ constructor(private shoppingFacade: ShoppingFacade) {}
+
+ ngOnChanges(): void {
+ if (this.pagelet?.hasParam('NavigationCategory')) {
+ this.category$ = this.shoppingFacade.navigationCategory$(
+ this.pagelet.stringParam('NavigationCategory'),
+ this.pagelet.numberParam('SubNavigationDepth')
+ );
+ }
+ }
+
+ showSubMenu() {
+ return this.pagelet?.hasParam('SubNavigationDepth') && this.pagelet.numberParam('SubNavigationDepth') === 0
+ ? false
+ : true;
+ }
+
+ subMenuShow(subMenu: HTMLElement) {
+ subMenu.classList.add('hover');
+ }
+ subMenuHide(subMenu: HTMLElement) {
+ subMenu.classList.remove('hover');
+ }
+}
diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts
index d04fa50ad2..ad1137fa0f 100644
--- a/src/app/shared/shared.module.ts
+++ b/src/app/shared/shared.module.ts
@@ -21,6 +21,7 @@ import { IconModule } from 'ish-core/icon.module';
import { PipesModule } from 'ish-core/pipes.module';
import { RoleToggleModule } from 'ish-core/role-toggle.module';
import { ModuleLoaderService } from 'ish-core/utils/module-loader/module-loader.service';
+import { ShellModule } from 'ish-shell/shell.module';
import { CaptchaExportsModule } from '../extensions/captcha/exports/captcha-exports.module';
import { CompareExportsModule } from '../extensions/compare/exports/compare-exports.module';
@@ -42,6 +43,7 @@ import { CMSDialogComponent } from './cms/components/cms-dialog/cms-dialog.compo
import { CMSFreestyleComponent } from './cms/components/cms-freestyle/cms-freestyle.component';
import { CMSImageEnhancedComponent } from './cms/components/cms-image-enhanced/cms-image-enhanced.component';
import { CMSImageComponent } from './cms/components/cms-image/cms-image.component';
+import { CMSNavigationCategoryComponent } from './cms/components/cms-navigation-category/cms-navigation-category.component';
import { CMSNavigationLinkComponent } from './cms/components/cms-navigation-link/cms-navigation-link.component';
import { CMSNavigationPageComponent } from './cms/components/cms-navigation-page/cms-navigation-page.component';
import { CMSProductListCategoryComponent } from './cms/components/cms-product-list-category/cms-product-list-category.component';
@@ -171,6 +173,7 @@ const importExportModules = [
RecentlyExportsModule,
RoleToggleModule,
RouterModule,
+ ShellModule,
StoreLocatorExportsModule,
SwiperModule,
TactonExportsModule,
@@ -290,7 +293,7 @@ const exportedComponents = [
@NgModule({
imports: [...importExportModules],
- declarations: [...declaredComponents, ...exportedComponents],
+ declarations: [...declaredComponents, ...exportedComponents, CMSNavigationCategoryComponent],
exports: [...exportedComponents, ...importExportModules],
})
export class SharedModule {
diff --git a/src/app/shell/shell.module.ts b/src/app/shell/shell.module.ts
index d97bdfb6c7..91a84de05f 100644
--- a/src/app/shell/shell.module.ts
+++ b/src/app/shell/shell.module.ts
@@ -37,7 +37,7 @@ import { LazyContentIncludeComponent } from './shared/lazy-content-include/lazy-
import { LazyMiniBasketContentComponent } from './shared/lazy-mini-basket-content/lazy-mini-basket-content.component';
import { LazySearchBoxComponent } from './shared/lazy-search-box/lazy-search-box.component';
-const exportedComponents = [CookiesBannerComponent, FooterComponent, HeaderComponent];
+const exportedComponents = [CookiesBannerComponent, FooterComponent, HeaderComponent, SubCategoryNavigationComponent];
@NgModule({
imports: [
@@ -74,7 +74,6 @@ const exportedComponents = [CookiesBannerComponent, FooterComponent, HeaderCompo
LazySearchBoxComponent,
LoginStatusComponent,
MiniBasketComponent,
- SubCategoryNavigationComponent,
UserInformationMobileComponent,
],
exports: [...exportedComponents],
diff --git a/src/assets/mock-data/cms/includes/include.header.navigation.pagelet2-Include/get.json b/src/assets/mock-data/cms/includes/include.header.navigation.pagelet2-Include/get.json
index 22293bb4e0..c4b27f9edd 100644
--- a/src/assets/mock-data/cms/includes/include.header.navigation.pagelet2-Include/get.json
+++ b/src/assets/mock-data/cms/includes/include.header.navigation.pagelet2-Include/get.json
@@ -84,6 +84,47 @@
}
},
"customAttributes": {}
+ },
+ {
+ "type": "PageletRO",
+ "definitionQualifiedName": "app_sf_base_cm:component.navigation.category.pagelet2-Component",
+ "link": {
+ "type": "Link",
+ "uri": "/inSPIRED-inTRONICS_Business-Site/rest/cms/pagelets/cmp_NAVIGATION_CATEGORY",
+ "title": "NAVIGATION CATEGORY",
+ "itemId": "cmp_NAVIGATION_CATEGORY"
+ },
+ "displayName": "NAVIGATION CATEGORY",
+ "id": "cmp_20220912_152120",
+ "domain": "inSPIRED-inTRONICS_Business-rest",
+ "configurationParameters": {
+ "NavigationCategory": {
+ "value": "Computers@inSPIRED-Computers",
+ "type": "bc_catalog:types.pagelet2-CategoryBO",
+ "definitionQualifiedName": "app_sf_base_cm:component.navigation.category.pagelet2-Component-NavigationCategory"
+ },
+ "DisplayName": {
+ "value": "Category",
+ "type": "bc_pmc:types.pagelet2-Text",
+ "definitionQualifiedName": "app_sf_base_cm:component.navigation.category.pagelet2-Component-AlternateNavigationTitle"
+ },
+ "SubNavigationDepth": {
+ "value": "3",
+ "type": "bc_pmc:types.pagelet2-Integer",
+ "definitionQualifiedName": "app_sf_base_cm:component.navigation.category.pagelet2-Component-SubNavigationDepth"
+ },
+ "CSSClass": {
+ "value": "testing",
+ "type": "bc_pmc:types.pagelet2-Text",
+ "definitionQualifiedName": "app_sf_base_cm:component.navigation.category.pagelet2-Component-CSSClass"
+ },
+ "SubNavigationHTML": {
+ "value": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
",
+ "type": "bc_pmc:types.pagelet2-Html",
+ "definitionQualifiedName": "app_sf_base_cm:component.navigation.link.pagelet2-Component-SubNavigationHTML"
+ }
+ },
+ "customAttributes": {}
}
],
"displayName": "Header - Navigation",