From 243179e5cf11f7b4c6d5bcdc091d63a827100596 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 12 Dec 2023 23:52:54 +0100 Subject: [PATCH] 108588: Renamed components, because now these aren't page components anymore --- .../browse-by-date.component.spec.ts} | 14 +++++++------- .../browse-by-date.component.ts} | 12 ++++++------ .../browse-by-metadata.component.html} | 0 .../browse-by-metadata.component.scss} | 0 .../browse-by-metadata.component.spec.ts} | 14 +++++++------- .../browse-by-metadata.component.ts} | 8 ++++---- .../browse-by-taxonomy.component.html} | 0 .../browse-by-taxonomy.component.scss} | 0 .../browse-by-taxonomy.component.spec.ts} | 13 ++++++------- .../browse-by-taxonomy.component.ts} | 8 ++++---- .../browse-by-title.component.spec.ts} | 14 +++++++------- .../browse-by-title.component.ts} | 12 ++++++------ src/app/browse-by/browse-by.module.ts | 16 ++++++++-------- .../browse-entry-list-element.component.ts | 2 +- .../browse-by-date-page.component.ts | 16 ---------------- .../browse-by-date.component.html} | 0 .../browse-by-date.component.scss} | 0 .../browse-by-date/browse-by-date.component.ts | 16 ++++++++++++++++ .../browse-by-metadata-page.component.ts | 16 ---------------- .../browse-by-metadata.component.html} | 0 .../browse-by-metadata.component.scss} | 0 .../browse-by-metadata.component.ts | 16 ++++++++++++++++ .../browse-by-taxonomy-page.component.ts | 16 ---------------- .../browse-by-taxonomy.component.html} | 0 .../browse-by-taxonomy.component.scss} | 0 .../browse-by-taxonomy.component.ts | 16 ++++++++++++++++ .../browse-by-title-page.component.ts | 16 ---------------- .../browse-by-title.component.html} | 0 .../browse-by-title.component.scss} | 0 .../browse-by-title/browse-by-title.component.ts | 16 ++++++++++++++++ src/themes/custom/lazy-theme.module.ts | 16 ++++++++-------- 31 files changed, 128 insertions(+), 129 deletions(-) rename src/app/browse-by/{browse-by-date-page/browse-by-date-page.component.spec.ts => browse-by-date/browse-by-date.component.spec.ts} (91%) rename src/app/browse-by/{browse-by-date-page/browse-by-date-page.component.ts => browse-by-date/browse-by-date.component.ts} (94%) rename src/app/browse-by/{browse-by-metadata-page/browse-by-metadata-page.component.html => browse-by-metadata/browse-by-metadata.component.html} (100%) rename src/app/browse-by/{browse-by-metadata-page/browse-by-metadata-page.component.scss => browse-by-metadata/browse-by-metadata.component.scss} (100%) rename src/app/browse-by/{browse-by-metadata-page/browse-by-metadata-page.component.spec.ts => browse-by-metadata/browse-by-metadata.component.spec.ts} (94%) rename src/app/browse-by/{browse-by-metadata-page/browse-by-metadata-page.component.ts => browse-by-metadata/browse-by-metadata.component.ts} (97%) rename src/app/browse-by/{browse-by-taxonomy-page/browse-by-taxonomy-page.component.html => browse-by-taxonomy/browse-by-taxonomy.component.html} (100%) rename src/app/browse-by/{browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss => browse-by-taxonomy/browse-by-taxonomy.component.scss} (100%) rename src/app/browse-by/{browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts => browse-by-taxonomy/browse-by-taxonomy.component.spec.ts} (89%) rename src/app/browse-by/{browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts => browse-by-taxonomy/browse-by-taxonomy.component.ts} (92%) rename src/app/browse-by/{browse-by-title-page/browse-by-title-page.component.spec.ts => browse-by-title/browse-by-title.component.spec.ts} (87%) rename src/app/browse-by/{browse-by-title-page/browse-by-title-page.component.ts => browse-by-title/browse-by-title.component.ts} (83%) delete mode 100644 src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts rename src/themes/custom/app/browse-by/{browse-by-date-page/browse-by-date-page.component.html => browse-by-date/browse-by-date.component.html} (100%) rename src/themes/custom/app/browse-by/{browse-by-date-page/browse-by-date-page.component.scss => browse-by-date/browse-by-date.component.scss} (100%) create mode 100644 src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.ts delete mode 100644 src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts rename src/themes/custom/app/browse-by/{browse-by-metadata-page/browse-by-metadata-page.component.html => browse-by-metadata/browse-by-metadata.component.html} (100%) rename src/themes/custom/app/browse-by/{browse-by-metadata-page/browse-by-metadata-page.component.scss => browse-by-metadata/browse-by-metadata.component.scss} (100%) create mode 100644 src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts delete mode 100644 src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts rename src/themes/custom/app/browse-by/{browse-by-taxonomy-page/browse-by-taxonomy-page.component.html => browse-by-taxonomy/browse-by-taxonomy.component.html} (100%) rename src/themes/custom/app/browse-by/{browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss => browse-by-taxonomy/browse-by-taxonomy.component.scss} (100%) create mode 100644 src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts delete mode 100644 src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts rename src/themes/custom/app/browse-by/{browse-by-title-page/browse-by-title-page.component.html => browse-by-title/browse-by-title.component.html} (100%) rename src/themes/custom/app/browse-by/{browse-by-title-page/browse-by-title-page.component.scss => browse-by-title/browse-by-title.component.scss} (100%) create mode 100644 src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.ts diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts b/src/app/browse-by/browse-by-date/browse-by-date.component.spec.ts similarity index 91% rename from src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts rename to src/app/browse-by/browse-by-date/browse-by-date.component.spec.ts index e41d3a45b25..0064c599e4e 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts +++ b/src/app/browse-by/browse-by-date/browse-by-date.component.spec.ts @@ -1,4 +1,4 @@ -import { BrowseByDatePageComponent } from './browse-by-date-page.component'; +import { BrowseByDateComponent } from './browse-by-date.component'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CommonModule } from '@angular/common'; import { RouterTestingModule } from '@angular/router/testing'; @@ -15,7 +15,7 @@ import { ActivatedRouteStub } from '../../shared/testing/active-router.stub'; import { Community } from '../../core/shared/community.model'; import { Item } from '../../core/shared/item.model'; import { BrowseEntrySearchOptions } from '../../core/browse/browse-entry-search-options.model'; -import { toRemoteData } from '../browse-by-metadata-page/browse-by-metadata-page.component.spec'; +import { toRemoteData } from '../browse-by-metadata/browse-by-metadata.component.spec'; import { VarDirective } from '../../shared/utils/var.directive'; import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils'; import { PaginationService } from '../../core/pagination/pagination.service'; @@ -24,9 +24,9 @@ import { APP_CONFIG } from '../../../config/app-config.interface'; import { environment } from '../../../environments/environment'; import { SortDirection } from '../../core/cache/models/sort-options.model'; -describe('BrowseByDatePageComponent', () => { - let comp: BrowseByDatePageComponent; - let fixture: ComponentFixture; +describe('BrowseByDateComponent', () => { + let comp: BrowseByDateComponent; + let fixture: ComponentFixture; let route: ActivatedRoute; let paginationService; @@ -86,7 +86,7 @@ describe('BrowseByDatePageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BrowseByDatePageComponent, EnumKeysPipe, VarDirective], + declarations: [BrowseByDateComponent, EnumKeysPipe, VarDirective], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: BrowseService, useValue: mockBrowseService }, @@ -101,7 +101,7 @@ describe('BrowseByDatePageComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(BrowseByDatePageComponent); + fixture = TestBed.createComponent(BrowseByDateComponent); const browseService = fixture.debugElement.injector.get(BrowseService); spyOn(browseService, 'getFirstItemFor') // ok to expect the default browse as first param since we just need the mock items obtained via sort direction. diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts b/src/app/browse-by/browse-by-date/browse-by-date.component.ts similarity index 94% rename from src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts rename to src/app/browse-by/browse-by-date/browse-by-date.component.ts index 0323310c740..cd17bb6fe5e 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts +++ b/src/app/browse-by/browse-by-date/browse-by-date.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core'; import { - BrowseByMetadataPageComponent, + BrowseByMetadataComponent, browseParamsToOptions, getBrowseSearchOptions -} from '../browse-by-metadata-page/browse-by-metadata-page.component'; +} from '../browse-by-metadata/browse-by-metadata.component'; import { combineLatest as observableCombineLatest } from 'rxjs'; import { hasValue, isNotEmpty } from '../../shared/empty.util'; import { ActivatedRoute, Params, Router } from '@angular/router'; @@ -23,9 +23,9 @@ import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator'; import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type'; @Component({ - selector: 'ds-browse-by-date-page', - styleUrls: ['../browse-by-metadata-page/browse-by-metadata-page.component.scss'], - templateUrl: '../browse-by-metadata-page/browse-by-metadata-page.component.html' + selector: 'ds-browse-by-date', + styleUrls: ['../browse-by-metadata/browse-by-metadata.component.scss'], + templateUrl: '../browse-by-metadata/browse-by-metadata.component.html', }) /** * Component for browsing items by metadata definition of type 'date' @@ -33,7 +33,7 @@ import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type'; * An example would be 'dateissued' for 'dc.date.issued' */ @rendersBrowseBy(BrowseByDataType.Date) -export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent implements OnInit { +export class BrowseByDateComponent extends BrowseByMetadataComponent implements OnInit { /** * The default metadata keys to use for determining the lower limit of the StartsWith dropdown options diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html b/src/app/browse-by/browse-by-metadata/browse-by-metadata.component.html similarity index 100% rename from src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html rename to src/app/browse-by/browse-by-metadata/browse-by-metadata.component.html diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss b/src/app/browse-by/browse-by-metadata/browse-by-metadata.component.scss similarity index 100% rename from src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss rename to src/app/browse-by/browse-by-metadata/browse-by-metadata.component.scss diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts b/src/app/browse-by/browse-by-metadata/browse-by-metadata.component.spec.ts similarity index 94% rename from src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts rename to src/app/browse-by/browse-by-metadata/browse-by-metadata.component.spec.ts index b1662a9828a..f8cf5128254 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts +++ b/src/app/browse-by/browse-by-metadata/browse-by-metadata.component.spec.ts @@ -1,8 +1,8 @@ import { - BrowseByMetadataPageComponent, + BrowseByMetadataComponent, browseParamsToOptions, getBrowseSearchOptions -} from './browse-by-metadata-page.component'; +} from './browse-by-metadata.component'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { BrowseService } from '../../core/browse/browse.service'; import { CommonModule } from '@angular/common'; @@ -31,9 +31,9 @@ import { PaginationComponentOptions } from '../../shared/pagination/pagination-c import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; import { APP_CONFIG } from '../../../config/app-config.interface'; -describe('BrowseByMetadataPageComponent', () => { - let comp: BrowseByMetadataPageComponent; - let fixture: ComponentFixture; +describe('BrowseByMetadataComponent', () => { + let comp: BrowseByMetadataComponent; + let fixture: ComponentFixture; let browseService: BrowseService; let route: ActivatedRoute; let paginationService; @@ -103,7 +103,7 @@ describe('BrowseByMetadataPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BrowseByMetadataPageComponent, EnumKeysPipe, VarDirective], + declarations: [BrowseByMetadataComponent, EnumKeysPipe, VarDirective], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: BrowseService, useValue: mockBrowseService }, @@ -117,7 +117,7 @@ describe('BrowseByMetadataPageComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(BrowseByMetadataPageComponent); + fixture = TestBed.createComponent(BrowseByMetadataComponent); comp = fixture.componentInstance; fixture.detectChanges(); browseService = (comp as any).browseService; diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts b/src/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts similarity index 97% rename from src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts rename to src/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts index 9187cefab93..fc7b09eac87 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts +++ b/src/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts @@ -24,9 +24,9 @@ import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type'; export const BBM_PAGINATION_ID = 'bbm'; @Component({ - selector: 'ds-browse-by-metadata-page', - styleUrls: ['./browse-by-metadata-page.component.scss'], - templateUrl: './browse-by-metadata-page.component.html' + selector: 'ds-browse-by-metadata', + styleUrls: ['./browse-by-metadata.component.scss'], + templateUrl: './browse-by-metadata.component.html', }) /** * Component for browsing (items) by metadata definition. @@ -35,7 +35,7 @@ export const BBM_PAGINATION_ID = 'bbm'; * 'dc.contributor.*' */ @rendersBrowseBy(BrowseByDataType.Metadata) -export class BrowseByMetadataPageComponent extends AbstractBrowseByTypeComponent implements OnInit, OnDestroy { +export class BrowseByMetadataComponent extends AbstractBrowseByTypeComponent implements OnInit, OnDestroy { /** * The list of browse-entries to display diff --git a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.html b/src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.html similarity index 100% rename from src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.html rename to src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.html diff --git a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss b/src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.scss similarity index 100% rename from src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss rename to src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.scss diff --git a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts b/src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.spec.ts similarity index 89% rename from src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts rename to src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.spec.ts index c724017b1fd..6bb6580a763 100644 --- a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts +++ b/src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.spec.ts @@ -1,6 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BrowseByTaxonomyPageComponent } from './browse-by-taxonomy-page.component'; +import { BrowseByTaxonomyComponent } from './browse-by-taxonomy.component'; import { VocabularyEntryDetail } from '../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; import { TranslateModule } from '@ngx-translate/core'; import { NO_ERRORS_SCHEMA } from '@angular/core'; @@ -10,9 +9,9 @@ import { createDataWithBrowseDefinition } from '../browse-by-switcher/browse-by- import { HierarchicalBrowseDefinition } from '../../core/shared/hierarchical-browse-definition.model'; import { ThemeService } from '../../shared/theme-support/theme.service'; -describe('BrowseByTaxonomyPageComponent', () => { - let component: BrowseByTaxonomyPageComponent; - let fixture: ComponentFixture; +describe('BrowseByTaxonomyComponent', () => { + let component: BrowseByTaxonomyComponent; + let fixture: ComponentFixture; let themeService: ThemeService; let detail1: VocabularyEntryDetail; let detail2: VocabularyEntryDetail; @@ -29,7 +28,7 @@ describe('BrowseByTaxonomyPageComponent', () => { await TestBed.configureTestingModule({ imports: [ TranslateModule.forRoot() ], - declarations: [ BrowseByTaxonomyPageComponent ], + declarations: [ BrowseByTaxonomyComponent ], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: ThemeService, useValue: themeService }, @@ -40,7 +39,7 @@ describe('BrowseByTaxonomyPageComponent', () => { }); beforeEach(() => { - fixture = TestBed.createComponent(BrowseByTaxonomyPageComponent); + fixture = TestBed.createComponent(BrowseByTaxonomyComponent); component = fixture.componentInstance; fixture.detectChanges(); detail1 = new VocabularyEntryDetail(); diff --git a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts b/src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts similarity index 92% rename from src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts rename to src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts index f005c66c9e0..959f655b618 100644 --- a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts +++ b/src/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts @@ -11,15 +11,15 @@ import { AbstractBrowseByTypeComponent } from '../abstract-browse-by-type.compon import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type'; @Component({ - selector: 'ds-browse-by-taxonomy-page', - templateUrl: './browse-by-taxonomy-page.component.html', - styleUrls: ['./browse-by-taxonomy-page.component.scss'] + selector: 'ds-browse-by-taxonomy', + templateUrl: './browse-by-taxonomy.component.html', + styleUrls: ['./browse-by-taxonomy.component.scss'], }) /** * Component for browsing items by metadata in a hierarchical controlled vocabulary */ @rendersBrowseBy(BrowseByDataType.Hierarchy) -export class BrowseByTaxonomyPageComponent extends AbstractBrowseByTypeComponent implements OnInit, OnDestroy { +export class BrowseByTaxonomyComponent extends AbstractBrowseByTypeComponent implements OnInit, OnDestroy { /** * The {@link VocabularyOptions} object diff --git a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts b/src/app/browse-by/browse-by-title/browse-by-title.component.spec.ts similarity index 87% rename from src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts rename to src/app/browse-by/browse-by-title/browse-by-title.component.spec.ts index e32c0ac430d..54394087ec3 100644 --- a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts +++ b/src/app/browse-by/browse-by-title/browse-by-title.component.spec.ts @@ -9,8 +9,8 @@ import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { EnumKeysPipe } from '../../shared/utils/enum-keys-pipe'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { toRemoteData } from '../browse-by-metadata-page/browse-by-metadata-page.component.spec'; -import { BrowseByTitlePageComponent } from './browse-by-title-page.component'; +import { toRemoteData } from '../browse-by-metadata/browse-by-metadata.component.spec'; +import { BrowseByTitleComponent } from './browse-by-title.component'; import { ItemDataService } from '../../core/data/item-data.service'; import { Community } from '../../core/shared/community.model'; import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service'; @@ -24,9 +24,9 @@ import { APP_CONFIG } from '../../../config/app-config.interface'; import { environment } from '../../../environments/environment'; -describe('BrowseByTitlePageComponent', () => { - let comp: BrowseByTitlePageComponent; - let fixture: ComponentFixture; +describe('BrowseByTitleComponent', () => { + let comp: BrowseByTitleComponent; + let fixture: ComponentFixture; let itemDataService: ItemDataService; let route: ActivatedRoute; @@ -71,7 +71,7 @@ describe('BrowseByTitlePageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BrowseByTitlePageComponent, EnumKeysPipe, VarDirective], + declarations: [BrowseByTitleComponent, EnumKeysPipe, VarDirective], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: BrowseService, useValue: mockBrowseService }, @@ -85,7 +85,7 @@ describe('BrowseByTitlePageComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(BrowseByTitlePageComponent); + fixture = TestBed.createComponent(BrowseByTitleComponent); comp = fixture.componentInstance; fixture.detectChanges(); itemDataService = (comp as any).itemDataService; diff --git a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts b/src/app/browse-by/browse-by-title/browse-by-title.component.ts similarity index 83% rename from src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts rename to src/app/browse-by/browse-by-title/browse-by-title.component.ts index 469cbc36d57..bb37500bb42 100644 --- a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts +++ b/src/app/browse-by/browse-by-title/browse-by-title.component.ts @@ -2,9 +2,9 @@ import { combineLatest as observableCombineLatest } from 'rxjs'; import { Component, OnInit } from '@angular/core'; import { Params } from '@angular/router'; import { - BrowseByMetadataPageComponent, + BrowseByMetadataComponent, browseParamsToOptions, getBrowseSearchOptions -} from '../browse-by-metadata-page/browse-by-metadata-page.component'; +} from '../browse-by-metadata/browse-by-metadata.component'; import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; import { map } from 'rxjs/operators'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; @@ -12,15 +12,15 @@ import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator'; import { BrowseByDataType } from '../browse-by-switcher/browse-by-data-type'; @Component({ - selector: 'ds-browse-by-title-page', - styleUrls: ['../browse-by-metadata-page/browse-by-metadata-page.component.scss'], - templateUrl: '../browse-by-metadata-page/browse-by-metadata-page.component.html' + selector: 'ds-browse-by-title', + styleUrls: ['../browse-by-metadata/browse-by-metadata.component.scss'], + templateUrl: '../browse-by-metadata/browse-by-metadata.component.html' }) /** * Component for browsing items by title (dc.title) */ @rendersBrowseBy(BrowseByDataType.Title) -export class BrowseByTitlePageComponent extends BrowseByMetadataPageComponent implements OnInit { +export class BrowseByTitleComponent extends BrowseByMetadataComponent implements OnInit { ngOnInit(): void { const sortConfig = new SortOptions('dc.title', SortDirection.ASC); diff --git a/src/app/browse-by/browse-by.module.ts b/src/app/browse-by/browse-by.module.ts index ca6a56f9928..ede3d852881 100644 --- a/src/app/browse-by/browse-by.module.ts +++ b/src/app/browse-by/browse-by.module.ts @@ -1,10 +1,10 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { BrowseByTitlePageComponent } from './browse-by-title-page/browse-by-title-page.component'; -import { BrowseByMetadataPageComponent } from './browse-by-metadata-page/browse-by-metadata-page.component'; -import { BrowseByDatePageComponent } from './browse-by-date-page/browse-by-date-page.component'; +import { BrowseByTitleComponent } from './browse-by-title/browse-by-title.component'; +import { BrowseByMetadataComponent } from './browse-by-metadata/browse-by-metadata.component'; +import { BrowseByDateComponent } from './browse-by-date/browse-by-date.component'; import { BrowseBySwitcherComponent } from './browse-by-switcher/browse-by-switcher.component'; -import { BrowseByTaxonomyPageComponent } from './browse-by-taxonomy-page/browse-by-taxonomy-page.component'; +import { BrowseByTaxonomyComponent } from './browse-by-taxonomy/browse-by-taxonomy.component'; import { SharedBrowseByModule } from '../shared/browse-by/shared-browse-by.module'; import { DsoPageModule } from '../shared/dso-page/dso-page.module'; import { FormModule } from '../shared/form/form.module'; @@ -15,10 +15,10 @@ const DECLARATIONS = [ const ENTRY_COMPONENTS = [ // put only entry components that use custom decorator - BrowseByTitlePageComponent, - BrowseByMetadataPageComponent, - BrowseByDatePageComponent, - BrowseByTaxonomyPageComponent, + BrowseByTitleComponent, + BrowseByMetadataComponent, + BrowseByDateComponent, + BrowseByTaxonomyComponent, ]; @NgModule({ diff --git a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts index e67dd4489e7..a15fbcba50a 100644 --- a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts +++ b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts @@ -6,7 +6,7 @@ import { ViewMode } from '../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../object-collection/shared/listable-object/listable-object.decorator'; import { PaginationService } from '../../../core/pagination/pagination.service'; import { Params } from '@angular/router'; -import { BBM_PAGINATION_ID } from '../../../browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; +import { BBM_PAGINATION_ID } from '../../../browse-by/browse-by-metadata/browse-by-metadata.component'; import { RouteService } from 'src/app/core/services/route.service'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts b/src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts deleted file mode 100644 index 58a38c41e57..00000000000 --- a/src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { BrowseByDatePageComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-date-page/browse-by-date-page.component'; -import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; -import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; -import { Context } from '../../../../../app/core/shared/context.model'; - -@Component({ - selector: 'ds-browse-by-date-page', - // styleUrls: ['./browse-by-date-page.component.scss'], - styleUrls: ['../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss'], - // templateUrl: './browse-by-date-page.component.html' - templateUrl: '../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html' -}) -@rendersBrowseBy(BrowseByDataType.Date, Context.Any, 'custom') -export class BrowseByDatePageComponent extends BaseComponent { -} diff --git a/src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.html b/src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.html similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.html rename to src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.html diff --git a/src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.scss b/src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.scss similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-date-page/browse-by-date-page.component.scss rename to src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.scss diff --git a/src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.ts b/src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.ts new file mode 100644 index 00000000000..f37727769e4 --- /dev/null +++ b/src/themes/custom/app/browse-by/browse-by-date/browse-by-date.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { BrowseByDateComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-date/browse-by-date.component'; +import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; +import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; +import { Context } from '../../../../../app/core/shared/context.model'; + +@Component({ + selector: 'ds-browse-by-date', + // styleUrls: ['./browse-by-date.component.scss'], + styleUrls: ['../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component.scss'], + // templateUrl: './browse-by-date.component.html', + templateUrl: '../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component.html', +}) +@rendersBrowseBy(BrowseByDataType.Date, Context.Any, 'custom') +export class BrowseByDateComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts b/src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts deleted file mode 100644 index ef57478087d..00000000000 --- a/src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { BrowseByMetadataPageComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; -import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; -import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; -import { Context } from '../../../../../app/core/shared/context.model'; - -@Component({ - selector: 'ds-browse-by-metadata-page', - // styleUrls: ['./browse-by-metadata-page.component.scss'], - styleUrls: ['../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss'], - // templateUrl: './browse-by-metadata-page.component.html' - templateUrl: '../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html' -}) -@rendersBrowseBy(BrowseByDataType.Metadata, Context.Any, 'custom') -export class BrowseByMetadataPageComponent extends BaseComponent { -} diff --git a/src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html b/src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.html similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html rename to src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.html diff --git a/src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss b/src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.scss similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss rename to src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.scss diff --git a/src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts b/src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts new file mode 100644 index 00000000000..765167b5914 --- /dev/null +++ b/src/themes/custom/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { BrowseByMetadataComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component'; +import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; +import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; +import { Context } from '../../../../../app/core/shared/context.model'; + +@Component({ + selector: 'ds-browse-by-metadata', + // styleUrls: ['./browse-by-metadata.component.scss'], + styleUrls: ['../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component.scss'], + // templateUrl: './browse-by-metadata.component.html', + templateUrl: '../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component.html', +}) +@rendersBrowseBy(BrowseByDataType.Metadata, Context.Any, 'custom') +export class BrowseByMetadataComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts b/src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts deleted file mode 100644 index b8fb968c762..00000000000 --- a/src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { BrowseByTaxonomyPageComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component'; -import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; -import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; -import { Context } from '../../../../../app/core/shared/context.model'; - -@Component({ - selector: 'ds-browse-by-taxonomy-page', - // templateUrl: './browse-by-taxonomy-page.component.html', - templateUrl: '../../../../../app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.html', - // styleUrls: ['./browse-by-taxonomy-page.component.scss'], - styleUrls: ['../../../../../app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss'], -}) -@rendersBrowseBy(BrowseByDataType.Hierarchy, Context.Any, 'custom') -export class BrowseByTaxonomyPageComponent extends BaseComponent { -} diff --git a/src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.html b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.html similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.html rename to src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.html diff --git a/src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.scss similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.scss rename to src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.scss diff --git a/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts new file mode 100644 index 00000000000..800b23a8169 --- /dev/null +++ b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { BrowseByTaxonomyComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component'; +import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; +import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; +import { Context } from '../../../../../app/core/shared/context.model'; + +@Component({ + selector: 'ds-browse-by-taxonomy', + // templateUrl: './browse-by-taxonomy.component.html', + templateUrl: '../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.html', + // styleUrls: ['./browse-by-taxonomy.component.scss'], + styleUrls: ['../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.scss'], +}) +@rendersBrowseBy(BrowseByDataType.Hierarchy, Context.Any, 'custom') +export class BrowseByTaxonomyComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts b/src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts deleted file mode 100644 index 4f6a1a50207..00000000000 --- a/src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { BrowseByTitlePageComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-title-page/browse-by-title-page.component'; -import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; -import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; -import { Context } from '../../../../../app/core/shared/context.model'; - -@Component({ - selector: 'ds-browse-by-title-page', - // styleUrls: ['./browse-by-title-page.component.scss'], - styleUrls: ['../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.scss'], - // templateUrl: './browse-by-title-page.component.html' - templateUrl: '../../../../../app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html' -}) -@rendersBrowseBy(BrowseByDataType.Title, Context.Any, 'custom') -export class BrowseByTitlePageComponent extends BaseComponent { -} diff --git a/src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.html b/src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.html similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.html rename to src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.html diff --git a/src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.scss b/src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.scss similarity index 100% rename from src/themes/custom/app/browse-by/browse-by-title-page/browse-by-title-page.component.scss rename to src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.scss diff --git a/src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.ts b/src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.ts new file mode 100644 index 00000000000..9bb328670d7 --- /dev/null +++ b/src/themes/custom/app/browse-by/browse-by-title/browse-by-title.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { BrowseByTitleComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-title/browse-by-title.component'; +import { BrowseByDataType } from '../../../../../app/browse-by/browse-by-switcher/browse-by-data-type'; +import { rendersBrowseBy } from '../../../../../app/browse-by/browse-by-switcher/browse-by-decorator'; +import { Context } from '../../../../../app/core/shared/context.model'; + +@Component({ + selector: 'ds-browse-by-title', + // styleUrls: ['./browse-by-title.component.scss'], + styleUrls: ['../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component.scss'], + // templateUrl: './browse-by-title.component.html', + templateUrl: '../../../../../app/browse-by/browse-by-metadata/browse-by-metadata.component.html', +}) +@rendersBrowseBy(BrowseByDataType.Title, Context.Any, 'custom') +export class BrowseByTitleComponent extends BaseComponent { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index 3bef57cb182..adefb93edfa 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -97,10 +97,10 @@ import { CommunityPageSubCommunityListComponent } from './app/community-page/sec import { CommunityPageSubCollectionListComponent } from './app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component'; import { ObjectListComponent } from './app/shared/object-list/object-list.component'; -import { BrowseByMetadataPageComponent } from './app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; -import { BrowseByDatePageComponent } from './app/browse-by/browse-by-date-page/browse-by-date-page.component'; -import { BrowseByTitlePageComponent } from './app/browse-by/browse-by-title-page/browse-by-title-page.component'; -import { BrowseByTaxonomyPageComponent } from './app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component'; +import { BrowseByMetadataComponent } from './app/browse-by/browse-by-metadata/browse-by-metadata.component'; +import { BrowseByDateComponent } from './app/browse-by/browse-by-date/browse-by-date.component'; +import { BrowseByTitleComponent } from './app/browse-by/browse-by-title/browse-by-title.component'; +import { BrowseByTaxonomyComponent } from './app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component'; import { ExternalSourceEntryImportModalComponent } from './app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component'; @@ -206,10 +206,10 @@ const DECLARATIONS = [ SearchSettingsComponent, ComcolPageBrowseByComponent, ObjectListComponent, - BrowseByMetadataPageComponent, - BrowseByDatePageComponent, - BrowseByTitlePageComponent, - BrowseByTaxonomyPageComponent, + BrowseByMetadataComponent, + BrowseByDateComponent, + BrowseByTitleComponent, + BrowseByTaxonomyComponent, ExternalSourceEntryImportModalComponent, SearchFiltersComponent, SearchSidebarComponent,