mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Merge branch 'w2p-89741_Add-themeable-components_conntribute-7.2' into w2p-91272_Add-themed-components-to-upstream-branch
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||||
|
import { ExpandableNavbarSectionComponent } from './expandable-navbar-section.component';
|
||||||
|
import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator';
|
||||||
|
import { MenuID } from '../../shared/menu/initial-menus-state';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Themed wrapper for ExpandableNavbarSectionComponent
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
/* tslint:disable:component-selector */
|
||||||
|
selector: 'li[ds-themed-expandable-navbar-section]',
|
||||||
|
styleUrls: [],
|
||||||
|
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||||
|
})
|
||||||
|
@rendersSectionForMenu(MenuID.PUBLIC, true)
|
||||||
|
export class ThemedExpandableNavbarSectionComponent extends ThemedComponent<ExpandableNavbarSectionComponent> {
|
||||||
|
protected getComponentName(): string {
|
||||||
|
return 'ExpandableNavbarSectionComponent';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importThemedComponent(themeName: string): Promise<any> {
|
||||||
|
return import(`../../../themes/${themeName}/app/navbar/expandable-navbar-section/expandable-navbar-section.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import(`./expandable-navbar-section.component`);
|
||||||
|
}
|
||||||
|
}
|
@@ -7,6 +7,7 @@ import { CoreModule } from '../core/core.module';
|
|||||||
import { NavbarEffects } from './navbar.effects';
|
import { NavbarEffects } from './navbar.effects';
|
||||||
import { NavbarSectionComponent } from './navbar-section/navbar-section.component';
|
import { NavbarSectionComponent } from './navbar-section/navbar-section.component';
|
||||||
import { ExpandableNavbarSectionComponent } from './expandable-navbar-section/expandable-navbar-section.component';
|
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 { NavbarComponent } from './navbar.component';
|
||||||
import { MenuModule } from '../shared/menu/menu.module';
|
import { MenuModule } from '../shared/menu/menu.module';
|
||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
@@ -20,7 +21,7 @@ const effects = [
|
|||||||
const ENTRY_COMPONENTS = [
|
const ENTRY_COMPONENTS = [
|
||||||
// put only entry components that use custom decorator
|
// put only entry components that use custom decorator
|
||||||
NavbarSectionComponent,
|
NavbarSectionComponent,
|
||||||
ExpandableNavbarSectionComponent,
|
ThemedExpandableNavbarSectionComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -36,13 +37,14 @@ const ENTRY_COMPONENTS = [
|
|||||||
NavbarComponent,
|
NavbarComponent,
|
||||||
ThemedNavbarComponent,
|
ThemedNavbarComponent,
|
||||||
NavbarSectionComponent,
|
NavbarSectionComponent,
|
||||||
ExpandableNavbarSectionComponent
|
ExpandableNavbarSectionComponent,
|
||||||
|
ThemedExpandableNavbarSectionComponent,
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
exports: [
|
exports: [
|
||||||
ThemedNavbarComponent,
|
ThemedNavbarComponent,
|
||||||
NavbarSectionComponent,
|
NavbarSectionComponent,
|
||||||
ExpandableNavbarSectionComponent
|
ThemedExpandableNavbarSectionComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -0,0 +1,23 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import {
|
||||||
|
ExpandableNavbarSectionComponent as BaseComponent
|
||||||
|
} from '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component';
|
||||||
|
import { slide } from '../../../../../app/shared/animations/slide';
|
||||||
|
import { rendersSectionForMenu } from '../../../../../app/shared/menu/menu-section.decorator';
|
||||||
|
import { MenuID } from '../../../../../app/shared/menu/initial-menus-state';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an expandable section in the navbar
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
/* tslint:disable:component-selector */
|
||||||
|
selector: 'li[ds-expandable-navbar-section]',
|
||||||
|
// templateUrl: './expandable-navbar-section.component.html',
|
||||||
|
templateUrl: '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.html',
|
||||||
|
// styleUrls: ['./expandable-navbar-section.component.scss'],
|
||||||
|
styleUrls: ['../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.scss'],
|
||||||
|
animations: [slide]
|
||||||
|
})
|
||||||
|
@rendersSectionForMenu(MenuID.PUBLIC, true)
|
||||||
|
export class ExpandableNavbarSectionComponent extends BaseComponent {
|
||||||
|
}
|
@@ -86,6 +86,9 @@ import { ComcolModule } from '../../app/shared/comcol/comcol.module';
|
|||||||
import { FeedbackComponent } from './app/info/feedback/feedback.component';
|
import { FeedbackComponent } from './app/info/feedback/feedback.component';
|
||||||
import { CommunityListComponent } from './app/community-list-page/community-list/community-list.component';
|
import { CommunityListComponent } from './app/community-list-page/community-list/community-list.component';
|
||||||
import { AuthNavMenuComponent } from './app/shared/auth-nav-menu/auth-nav-menu.component';
|
import { AuthNavMenuComponent } from './app/shared/auth-nav-menu/auth-nav-menu.component';
|
||||||
|
import {
|
||||||
|
ExpandableNavbarSectionComponent
|
||||||
|
} from './app/navbar/expandable-navbar-section/expandable-navbar-section.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
FileSectionComponent,
|
FileSectionComponent,
|
||||||
@@ -131,6 +134,7 @@ const DECLARATIONS = [
|
|||||||
FeedbackComponent,
|
FeedbackComponent,
|
||||||
CommunityListComponent,
|
CommunityListComponent,
|
||||||
AuthNavMenuComponent,
|
AuthNavMenuComponent,
|
||||||
|
ExpandableNavbarSectionComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Reference in New Issue
Block a user