diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 171ac382b4..54790cf2db 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -55,7 +55,6 @@ import { import { ClientCookieService } from './core/services/client-cookie.service'; import { ListableModule } from './core/shared/listable.module'; import { XsrfInterceptor } from './core/xsrf/xsrf.interceptor'; -import { NavbarModule } from './navbar/navbar.module'; import { RootModule } from './root.module'; import { ThemedRootComponent } from './root/themed-root.component'; import { AUTH_METHOD_FOR_DECORATOR_MAP } from './shared/log-in/methods/log-in.methods-decorator'; @@ -83,7 +82,6 @@ export function getMetaReducers(appConfig: AppConfig): MetaReducer[] { const IMPORTS = [ CommonModule, - NavbarModule, HttpClientModule, AppRoutingModule, ScrollToModule.forRoot(), diff --git a/src/app/navbar/navbar.module.ts b/src/app/navbar/navbar.module.ts deleted file mode 100644 index d86d29891b..0000000000 --- a/src/app/navbar/navbar.module.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { EffectsModule } from '@ngrx/effects'; - -import { MenuModule } from '../shared/menu/menu.module'; -import { ExpandableNavbarSectionComponent } from './expandable-navbar-section/expandable-navbar-section.component'; -import { ThemedExpandableNavbarSectionComponent } from './expandable-navbar-section/themed-expandable-navbar-section.component'; -import { NavbarComponent } from './navbar.component'; -import { NavbarEffects } from './navbar.effects'; -import { NavbarSectionComponent } from './navbar-section/navbar-section.component'; -import { ThemedNavbarComponent } from './themed-navbar.component'; - -const effects = [ - NavbarEffects, -]; - -const ENTRY_COMPONENTS = [ - // put only entry components that use custom decorator - NavbarSectionComponent, - ExpandableNavbarSectionComponent, - ThemedExpandableNavbarSectionComponent, -]; - -@NgModule({ - imports: [ - CommonModule, - MenuModule, - FormsModule, - EffectsModule.forFeature(effects), - ...ENTRY_COMPONENTS, - NavbarComponent, - ThemedNavbarComponent, - ], - providers: [], - exports: [ - ThemedNavbarComponent, - NavbarSectionComponent, - ThemedExpandableNavbarSectionComponent, - ], -}) - -/** - * This module handles all components and pipes that are necessary for the horizontal navigation bar - */ -export class NavbarModule { - /** - * NOTE: this method allows to resolve issue with components that using a custom decorator - * which are not loaded during SSR otherwise - */ - static withEntryComponents() { - return { - ngModule: NavbarModule, - providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })), - }; - } - -} diff --git a/src/app/root.module.ts b/src/app/root.module.ts index a6308d72f2..a3e32489ef 100644 --- a/src/app/root.module.ts +++ b/src/app/root.module.ts @@ -17,7 +17,6 @@ import { HeaderComponent } from './header/header.component'; import { ThemedHeaderComponent } from './header/themed-header.component'; import { HeaderNavbarWrapperComponent } from './header-nav-wrapper/header-navbar-wrapper.component'; import { ThemedHeaderNavbarWrapperComponent } from './header-nav-wrapper/themed-header-navbar-wrapper.component'; -import { NavbarModule } from './navbar/navbar.module'; import { PageErrorComponent } from './page-error/page-error.component'; import { ThemedPageErrorComponent } from './page-error/themed-page-error.component'; import { PageInternalServerErrorComponent } from './page-internal-server-error/page-internal-server-error.component'; @@ -33,7 +32,6 @@ import { SystemWideAlertModule } from './system-wide-alert/system-wide-alert.mod const IMPORTS = [ CommonModule, - NavbarModule, SystemWideAlertModule, NgbModule, ]; diff --git a/src/themes/custom/eager-theme.module.ts b/src/themes/custom/eager-theme.module.ts index 57c0be0caf..d64793dcae 100644 --- a/src/themes/custom/eager-theme.module.ts +++ b/src/themes/custom/eager-theme.module.ts @@ -1,7 +1,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { NavbarModule } from '../../app/navbar/navbar.module'; import { RootModule } from '../../app/root.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module'; @@ -81,7 +80,6 @@ const DECLARATIONS = [ imports: [ CommonModule, RootModule, - NavbarModule, SharedBrowseByModule, DsoPageModule, ...DECLARATIONS, diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index 837f563337..0733f24920 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -13,7 +13,6 @@ import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to'; import { IdlePreloadModule } from 'angular-idle-preload'; import { AppModule } from '../../app/app.module'; -import { NavbarModule } from '../../app/navbar/navbar.module'; import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module'; import { RootModule } from '../../app/root.module'; import { SearchPageModule } from '../../app/search-page/search-page.module'; @@ -208,7 +207,6 @@ const DECLARATIONS = [ IdlePreloadModule, MenuModule, DsoPageModule, - NavbarModule, NgbModule, RegisterEmailFormModule, RouterModule, diff --git a/src/themes/dspace/eager-theme.module.ts b/src/themes/dspace/eager-theme.module.ts index 4f96c1a110..5000b1e0e0 100644 --- a/src/themes/dspace/eager-theme.module.ts +++ b/src/themes/dspace/eager-theme.module.ts @@ -1,7 +1,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { NavbarModule } from '../../app/navbar/navbar.module'; import { RootModule } from '../../app/root.module'; import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module'; import { HeaderComponent } from './app/header/header.component'; @@ -28,7 +27,6 @@ const DECLARATIONS = [ CommonModule, SharedBrowseByModule, RootModule, - NavbarModule, ...DECLARATIONS, ], providers: [ diff --git a/src/themes/dspace/lazy-theme.module.ts b/src/themes/dspace/lazy-theme.module.ts index 75c0ae8230..cdad8c5f01 100644 --- a/src/themes/dspace/lazy-theme.module.ts +++ b/src/themes/dspace/lazy-theme.module.ts @@ -12,7 +12,6 @@ import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to'; import { IdlePreloadModule } from 'angular-idle-preload'; import { AppModule } from '../../app/app.module'; -import { NavbarModule } from '../../app/navbar/navbar.module'; import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module'; import { RootModule } from '../../app/root.module'; import { SearchPageModule } from '../../app/search-page/search-page.module'; @@ -37,7 +36,6 @@ const DECLARATIONS = [ HttpClientModule, IdlePreloadModule, MenuModule, - NavbarModule, NgbModule, RegisterEmailFormModule, RouterModule,