Skip to content

Commit

Permalink
Merge pull request #2984 from atmire/w2p-114732_CustomThemeNoLongerWorks
Browse files Browse the repository at this point in the history
Synced the imports of the custom theme with the imports of the base component so custom theme works again
  • Loading branch information
tdonohue authored Apr 26, 2024
2 parents 288a918 + a1fd59f commit 3568acc
Show file tree
Hide file tree
Showing 22 changed files with 72 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
NgIf,
} from '@angular/common';
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';

import { BrowseByTaxonomyComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component';
Expand Down Expand Up @@ -32,16 +32,16 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive';
ComcolPageHeaderComponent,
ComcolPageLogoComponent,
NgIf,
RouterModule,
ThemedComcolPageHandleComponent,
ComcolPageContentComponent,
DsoEditMenuComponent,
ThemedComcolPageBrowseByComponent,
VocabularyTreeviewComponent,
BrowseByComponent,
TranslateModule,
ThemedLoadingComponent,
ThemedBrowseByComponent,
VocabularyTreeviewComponent,
RouterLink,
],
})
export class BrowseByTaxonomyComponent extends BaseComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp
ComcolPageContentComponent,
ErrorComponent,
NgIf,
RouterOutlet,
ThemedLoadingComponent,
TranslateModule,
ViewTrackerComponent,
Expand All @@ -55,6 +54,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp
DsoEditMenuComponent,
ThemedComcolPageBrowseByComponent,
ObjectCollectionComponent,
RouterOutlet,
],
})
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ThemedDsoEditMetadataComponent } from '../../../../../app/dso-shared/ds
import { AlertComponent } from '../../../../../app/shared/alert/alert.component';
import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component';
import { VarDirective } from '../../../../../app/shared/utils/var.directive';
import { DsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/dso-edit-metadata.component';

@Component({
selector: 'ds-edit-item-template-page',
Expand All @@ -20,6 +21,7 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive';
standalone: true,
imports: [
ThemedDsoEditMetadataComponent,
DsoEditMetadataComponent,
RouterLink,
AsyncPipe,
VarDirective,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {
ChangeDetectionStrategy,
Component,
} from '@angular/core';
import { RouterModule } from '@angular/router';
import {
RouterModule,
RouterOutlet,
} from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';

import { CommunityPageComponent as BaseComponent } from '../../../../app/community-page/community-page.component';
Expand Down Expand Up @@ -50,6 +53,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp
AsyncPipe,
ViewTrackerComponent,
VarDirective,
RouterOutlet,
RouterModule,
],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
import {
AsyncPipe,
NgIf,
} from '@angular/common';
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';

import { CommunityPageSubCollectionListComponent as BaseComponent } from '../../../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component';
import { ErrorComponent } from '../../../../../../../app/shared/error/error.component';
import { ThemedLoadingComponent } from '../../../../../../../app/shared/loading/themed-loading.component';
import { ObjectCollectionComponent } from '../../../../../../../app/shared/object-collection/object-collection.component';
import { VarDirective } from '../../../../../../../app/shared/utils/var.directive';

@Component({
selector: 'ds-community-page-sub-collection-list',
// styleUrls: ['./community-page-sub-collection-list.component.scss'],
styleUrls: ['../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.scss'],
// templateUrl: './community-page-sub-collection-list.component.html',
templateUrl: '../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.html',
imports: [
ObjectCollectionComponent,
ErrorComponent,
ThemedLoadingComponent,
NgIf,
TranslateModule,
AsyncPipe,
VarDirective,
],
standalone: true,
})
export class CommunityPageSubCollectionListComponent extends BaseComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import { RegisterEmailFormComponent } from '../../../../../app/register-email-fo
templateUrl: '../../../../../app/forgot-password/forgot-password-email/forgot-email.component.html',
standalone: true,
imports: [
RegisterEmailFormComponent,
ThemedRegisterEmailFormComponent,
RegisterEmailFormComponent, ThemedRegisterEmailFormComponent,
],
})
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi
standalone: true,
imports: [
TranslateModule,
ProfilePageSecurityFormComponent,
BrowserOnlyPipe,
ProfilePageSecurityFormComponent,
AsyncPipe,
NgIf,
],
Expand Down
6 changes: 5 additions & 1 deletion src/themes/custom/app/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import {
AsyncPipe,
NgIf,
} from '@angular/common';
import { Component } from '@angular/core';
import { RouterLink } from '@angular/router';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
Expand All @@ -21,7 +25,7 @@ import { LangSwitchComponent } from '../../../../app/shared/lang-switch/lang-swi
// templateUrl: 'header.component.html',
templateUrl: '../../../../app/header/header.component.html',
standalone: true,
imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule],
imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule, AsyncPipe, NgIf],
})
export class HeaderComponent extends BaseComponent {
}
3 changes: 2 additions & 1 deletion src/themes/custom/app/home-page/home-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
AsyncPipe,
NgClass,
NgIf,
NgTemplateOutlet,
} from '@angular/common';
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
Expand All @@ -25,7 +26,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp
// templateUrl: './home-page.component.html'
templateUrl: '../../../../app/home-page/home-page.component.html',
standalone: true,
imports: [ThemedHomeNewsComponent, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent],
imports: [ThemedHomeNewsComponent, NgTemplateOutlet, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent],
})
export class HomePageComponent extends BaseComponent {

Expand Down
4 changes: 2 additions & 2 deletions src/themes/custom/app/item-page/simple/item-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ import { ViewTrackerComponent } from '../../../../../app/statistics/angulartics/
ItemVersionsComponent,
ErrorComponent,
ThemedLoadingComponent,
NotifyRequestsStatusComponent,
QaEventNotificationComponent,
TranslateModule,
AsyncPipe,
NgIf,
NotifyRequestsStatusComponent,
QaEventNotificationComponent,
],
})
export class ItemPageComponent extends BaseComponent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { CommonModule } from '@angular/common';
import {
AsyncPipe,
NgIf,
} from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
Expand Down Expand Up @@ -39,26 +42,7 @@ import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/the
templateUrl: '../../../../../../../app/item-page/simple/item-types/publication/publication.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [
CommonModule,
ThemedResultsBackButtonComponent,
MiradorViewerComponent,
ThemedItemPageTitleFieldComponent,
DsoEditMenuComponent,
MetadataFieldWrapperComponent,
ThemedThumbnailComponent,
ThemedMediaViewerComponent,
ThemedFileSectionComponent,
ItemPageDateFieldComponent,
ThemedMetadataRepresentationListComponent,
GenericItemPageFieldComponent,
RelatedItemsComponent,
ItemPageAbstractFieldComponent,
TranslateModule,
ItemPageUriFieldComponent,
CollectionsComponent,
RouterLink,
],
imports: [NgIf, ThemedResultsBackButtonComponent, MiradorViewerComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMediaViewerComponent, ThemedFileSectionComponent, ItemPageDateFieldComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, RelatedItemsComponent, ItemPageAbstractFieldComponent, ItemPageUriFieldComponent, CollectionsComponent, RouterLink, AsyncPipe, TranslateModule],
})
export class PublicationComponent extends BaseComponent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { CommonModule } from '@angular/common';
import {
AsyncPipe,
NgIf,
} from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
Expand Down Expand Up @@ -38,25 +41,7 @@ import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/the
templateUrl: '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [
CommonModule,
ThemedItemPageTitleFieldComponent,
DsoEditMenuComponent,
MetadataFieldWrapperComponent,
ThemedThumbnailComponent,
ThemedMediaViewerComponent,
ThemedFileSectionComponent,
ItemPageDateFieldComponent,
ThemedMetadataRepresentationListComponent,
GenericItemPageFieldComponent,
TranslateModule,
MiradorViewerComponent,
ThemedResultsBackButtonComponent,
CollectionsComponent,
RouterLink,
ItemPageUriFieldComponent,
ItemPageAbstractFieldComponent,
],
imports: [NgIf, ThemedResultsBackButtonComponent, MiradorViewerComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMediaViewerComponent, ThemedFileSectionComponent, ItemPageDateFieldComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, ItemPageAbstractFieldComponent, ItemPageUriFieldComponent, CollectionsComponent, RouterLink, AsyncPipe, TranslateModule],
})
export class UntypedItemComponent extends BaseComponent {
}
2 changes: 1 addition & 1 deletion src/themes/custom/app/login-page/login-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { LogInComponent } from '../../../../app/shared/log-in/log-in.component';
// templateUrl: './login-page.component.html'
templateUrl: '../../../../app/login-page/login-page.component.html',
standalone: true,
imports: [LogInComponent, ThemedLogInComponent ,TranslateModule],
imports: [LogInComponent, ThemedLogInComponent, TranslateModule],
})
export class LoginPageComponent extends BaseComponent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ import { ThemedSearchComponent } from '../../../../app/shared/search/themed-sear
imports: [
ThemedSearchComponent,
MyDSpaceNewSubmissionComponent,
MyDspaceQaEventsNotificationsComponent,
SuggestionsNotificationComponent,
AsyncPipe,
RoleDirective,
NgIf,
SuggestionsNotificationComponent,
MyDspaceQaEventsNotificationsComponent,
],
})
export class MyDSpacePageComponent extends BaseComponent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import {
AsyncPipe,
NgComponentOutlet,
NgFor,
NgIf,
} from '@angular/common';
import { Component } from '@angular/core';
import { RouterLinkActive } from '@angular/router';

import { ExpandableNavbarSectionComponent as BaseComponent } from '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component';
import { slide } from '../../../../../app/shared/animations/slide';
import { VarDirective } from '../../../../../app/shared/utils/var.directive';

/**
* Represents an expandable section in the navbar
Expand All @@ -14,6 +22,7 @@ import { slide } from '../../../../../app/shared/animations/slide';
styleUrls: ['../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.scss'],
animations: [slide],
standalone: true,
imports: [VarDirective, RouterLinkActive, NgComponentOutlet, NgIf, NgFor, AsyncPipe],
})
export class ExpandableNavbarSectionComponent extends BaseComponent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import { VarDirective } from '../../../../app/shared/utils/var.directive';
imports: [
ProfilePageMetadataFormComponent,
ProfilePageSecurityFormComponent,
SuggestionsNotificationComponent,
AsyncPipe,
TranslateModule,
ProfilePageResearcherFormComponent,
VarDirective,
NgIf,
NgForOf,
SuggestionsNotificationComponent,
],
})
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import { RegisterEmailComponent as BaseComponent } from '../../../../../app/regi
templateUrl: '../../../../../app/register-page/register-email/register-email.component.html',
standalone: true,
imports: [
RegisterEmailFormComponent,
ThemedRegisterEmailFormComponent,
RegisterEmailFormComponent, ThemedRegisterEmailFormComponent,
],
})
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ import { StartsWithLoaderComponent } from '../../../../../app/shared/starts-with
fadeInOut,
],
standalone: true,
imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent,
ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule, StartsWithLoaderComponent],
imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent, ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule, StartsWithLoaderComponent],
})
export class BrowseByComponent extends BaseComponent {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
AsyncPipe,
NgForOf,
NgIf,
} from '@angular/common';
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
Expand Down Expand Up @@ -30,6 +31,7 @@ import { ComcolPageBrowseByComponent as BaseComponent } from '../../../../../app
RouterLinkActive,
TranslateModule,
AsyncPipe,
NgIf,
],
})
export class ComcolPageBrowseByComponent extends BaseComponent {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
NgForOf,
NgFor,
NgIf,
} from '@angular/common';
import { Component } from '@angular/core';
Expand All @@ -15,7 +15,7 @@ import { LangSwitchComponent as BaseComponent } from '../../../../../app/shared/
// templateUrl: './lang-switch.component.html',
templateUrl: '../../../../../app/shared/lang-switch/lang-switch.component.html',
standalone: true,
imports: [NgIf, NgbDropdownModule, NgForOf, TranslateModule],
imports: [NgIf, NgbDropdownModule, NgFor, TranslateModule],
})
export class LangSwitchComponent extends BaseComponent {
}
2 changes: 2 additions & 0 deletions src/themes/custom/app/shared/loading/loading.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';

import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loading/loading.component';
Expand All @@ -9,6 +10,7 @@ import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loa
templateUrl: '../../../../../app/shared/loading/loading.component.html',
// templateUrl: './loading.component.html'
standalone: true,
imports: [NgIf],
})
export class LoadingComponent extends BaseComponent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi
styleUrls: ['../../../../../app/shared/object-list/object-list.component.scss'],
// templateUrl: './object-list.component.html'
templateUrl: '../../../../../app/shared/object-list/object-list.component.html',
imports: [
PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent,
ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe,
],
imports: [PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent, ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe],
standalone: true,
})

Expand Down

0 comments on commit 3568acc

Please sign in to comment.