From 40465a9056bc1fa504e995ed0bf32c73c39bb90d Mon Sep 17 00:00:00 2001 From: Tobias Kohr Date: Thu, 18 Jan 2024 16:08:07 +0100 Subject: [PATCH] chore(cleanup): remove unused files and code --- .../results-card-favorite.component.css | 0 .../results-card-favorite.component.spec.ts | 22 ------------------- .../results-card-favorite.component.ts | 5 +++-- .../results-card-last-created.component.css | 0 ...esults-card-last-created.component.spec.ts | 22 ------------------- .../results-card-last-created.component.ts | 5 +++-- .../results-card-search.component.css | 0 .../results-card-search.component.spec.ts | 22 ------------------- .../results-card-search.component.ts | 5 +++-- .../results-list-item.component.html | 21 ------------------ .../results-list-item.component.spec.ts | 22 ------------------- .../results-list-carousel.component.css | 0 .../results-list-carousel.component.spec.ts | 22 ------------------- .../results-list-carousel.component.ts | 5 +++-- .../results-list-grid.component.css | 0 .../results-list-grid.component.spec.ts | 22 ------------------- .../results-list-grid.component.ts | 5 +++-- .../results-list.component.spec.ts | 22 ------------------- .../results-list/results-list.component.ts | 1 + .../search-page/search-page.component.ts | 3 +-- .../search-results.component.ts | 16 ++------------ 21 files changed, 19 insertions(+), 201 deletions(-) delete mode 100644 apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.css delete mode 100644 apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.spec.ts delete mode 100644 apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.css delete mode 100644 apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.spec.ts delete mode 100644 apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.css delete mode 100644 apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.spec.ts delete mode 100644 apps/datahub/src/app/common/results-list-item/results-list-item.component.html delete mode 100644 apps/datahub/src/app/common/results-list-item/results-list-item.component.spec.ts delete mode 100644 apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.css delete mode 100644 apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.spec.ts delete mode 100644 apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.css delete mode 100644 apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.spec.ts delete mode 100644 apps/datahub/src/app/common/results-list/results-list.component.spec.ts diff --git a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.css b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.spec.ts b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.spec.ts deleted file mode 100644 index 9f954290..00000000 --- a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsCardFavoriteComponent } from './results-card-favorite.component' - -describe('ResultsCardFavoriteComponent', () => { - let component: ResultsCardFavoriteComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsCardFavoriteComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsCardFavoriteComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts index a6f50cad..a63bf346 100644 --- a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts +++ b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts @@ -1,9 +1,10 @@ -import { Component } from '@angular/core' +import { ChangeDetectionStrategy, Component } from '@angular/core' import { ResultsListItemComponent } from '../results-list-item.component' @Component({ selector: 'mel-datahub-results-card-favorite', templateUrl: './results-card-favorite.component.html', - styleUrl: './results-card-favorite.component.css', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, }) export class ResultsCardFavoriteComponent extends ResultsListItemComponent {} diff --git a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.css b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.spec.ts b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.spec.ts deleted file mode 100644 index f371062f..00000000 --- a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsCardLastCreatedComponent } from './results-card-last-created.component' - -describe('ResultsCardLastCreatedComponent', () => { - let component: ResultsCardLastCreatedComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsCardLastCreatedComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsCardLastCreatedComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts index 585f06af..e3833877 100644 --- a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts +++ b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts @@ -1,9 +1,10 @@ -import { Component } from '@angular/core' +import { ChangeDetectionStrategy, Component } from '@angular/core' import { ResultsListItemComponent } from '../results-list-item.component' @Component({ selector: 'mel-datahub-results-card-last-created', templateUrl: './results-card-last-created.component.html', - styleUrl: './results-card-last-created.component.css', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, }) export class ResultsCardLastCreatedComponent extends ResultsListItemComponent {} diff --git a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.css b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.spec.ts b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.spec.ts deleted file mode 100644 index a8a57f7a..00000000 --- a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsCardSearchComponent } from './results-card-search.component' - -describe('ResultsCardSearchComponent', () => { - let component: ResultsCardSearchComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsCardSearchComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsCardSearchComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts index 669139db..75503f05 100644 --- a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts +++ b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts @@ -1,9 +1,10 @@ -import { Component } from '@angular/core' +import { ChangeDetectionStrategy, Component } from '@angular/core' import { ResultsListItemComponent } from '../results-list-item.component' @Component({ selector: 'mel-datahub-results-card-search', templateUrl: './results-card-search.component.html', - styleUrl: './results-card-search.component.css', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, }) export class ResultsCardSearchComponent extends ResultsListItemComponent {} diff --git a/apps/datahub/src/app/common/results-list-item/results-list-item.component.html b/apps/datahub/src/app/common/results-list-item/results-list-item.component.html deleted file mode 100644 index d6aa55f3..00000000 --- a/apps/datahub/src/app/common/results-list-item/results-list-item.component.html +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/apps/datahub/src/app/common/results-list-item/results-list-item.component.spec.ts b/apps/datahub/src/app/common/results-list-item/results-list-item.component.spec.ts deleted file mode 100644 index c931e510..00000000 --- a/apps/datahub/src/app/common/results-list-item/results-list-item.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsListItemComponent } from './results-list-item.component' - -describe('ResultsListItemComponent', () => { - let component: ResultsListItemComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsListItemComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsListItemComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.css b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.spec.ts b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.spec.ts deleted file mode 100644 index df762997..00000000 --- a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsListCarouselComponent } from './results-list-carousel.component' - -describe('ResultsListCarouselComponent', () => { - let component: ResultsListCarouselComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsListCarouselComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsListCarouselComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts index f6f05f05..7f263b53 100644 --- a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts +++ b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts @@ -1,9 +1,10 @@ -import { Component } from '@angular/core' +import { ChangeDetectionStrategy, Component } from '@angular/core' import { ResultsListComponent } from '../results-list.component' @Component({ selector: 'mel-datahub-results-list-carousel', templateUrl: './results-list-carousel.component.html', - styleUrl: './results-list-carousel.component.css', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, }) export class ResultsListCarouselComponent extends ResultsListComponent {} diff --git a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.css b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.css deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.spec.ts b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.spec.ts deleted file mode 100644 index 05165cb2..00000000 --- a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsListGridComponent } from './results-list-grid.component' - -describe('ResultsListGridComponent', () => { - let component: ResultsListGridComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsListGridComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsListGridComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts index 3f5a25fb..3db97b6b 100644 --- a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts +++ b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts @@ -1,9 +1,10 @@ -import { Component } from '@angular/core' +import { ChangeDetectionStrategy, Component } from '@angular/core' import { ResultsListComponent } from '../results-list.component' @Component({ selector: 'mel-datahub-results-list-grid', templateUrl: './results-list-grid.component.html', - styleUrl: './results-list-grid.component.css', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, }) export class ResultsListGridComponent extends ResultsListComponent {} diff --git a/apps/datahub/src/app/common/results-list/results-list.component.spec.ts b/apps/datahub/src/app/common/results-list/results-list.component.spec.ts deleted file mode 100644 index 91157465..00000000 --- a/apps/datahub/src/app/common/results-list/results-list.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { ResultsListComponent } from './results-list.component' - -describe('ResultsListComponent', () => { - let component: ResultsListComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ResultsListComponent], - }).compileComponents() - - fixture = TestBed.createComponent(ResultsListComponent) - component = fixture.componentInstance - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) -}) diff --git a/apps/datahub/src/app/common/results-list/results-list.component.ts b/apps/datahub/src/app/common/results-list/results-list.component.ts index 41e036b7..6afa7c6c 100644 --- a/apps/datahub/src/app/common/results-list/results-list.component.ts +++ b/apps/datahub/src/app/common/results-list/results-list.component.ts @@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core' import { Store } from '@ngrx/store' import { FIELDS_BRIEF, + FavoritesService, RouterFacade, SearchFacade, SearchState, diff --git a/apps/datahub/src/app/search/search-page/search-page.component.ts b/apps/datahub/src/app/search/search-page/search-page.component.ts index aac21a51..1cf8e3a8 100644 --- a/apps/datahub/src/app/search/search-page/search-page.component.ts +++ b/apps/datahub/src/app/search/search-page/search-page.component.ts @@ -1,8 +1,7 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component } from '@angular/core' @Component({ selector: 'mel-datahub-search-page', - providers: [], templateUrl: './search-page.component.html', styles: ``, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/apps/datahub/src/app/search/search-results/search-results.component.ts b/apps/datahub/src/app/search/search-results/search-results.component.ts index 5eeea439..acff04a2 100644 --- a/apps/datahub/src/app/search/search-results/search-results.component.ts +++ b/apps/datahub/src/app/search/search-results/search-results.component.ts @@ -1,6 +1,4 @@ -import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core' -import { RouterFacade, SearchFacade } from 'geonetwork-ui' -import { CatalogRecord } from 'geonetwork-ui/libs/common/domain/src/lib/model/record' +import { ChangeDetectionStrategy, Component } from '@angular/core' @Component({ selector: 'mel-datahub-search-results', @@ -8,14 +6,4 @@ import { CatalogRecord } from 'geonetwork-ui/libs/common/domain/src/lib/model/re styles: ``, changeDetection: ChangeDetectionStrategy.OnPush, }) -export class SearchResultsComponent implements OnInit { - isQualitySortable = true - - constructor( - private searchRouter: RouterFacade, - private searchFacade: SearchFacade - ) {} - ngOnInit() { - this.searchFacade.setResultsLayout('CARD') - } -} +export class SearchResultsComponent {}