From 933126692ccbebb8eaac6f11c34c5415ec4dcf46 Mon Sep 17 00:00:00 2001 From: Romuald Caplier Date: Tue, 28 May 2024 09:24:46 +0200 Subject: [PATCH] refactor(geocat): removed the metadata-catalog component --- .../record-metadata.component.html | 2 -- libs/ui/elements/src/index.ts | 1 - .../metadata-catalog.component.css | 0 .../metadata-catalog.component.html | 8 ----- .../metadata-catalog.component.spec.ts | 36 ------------------- .../metadata-catalog.component.ts | 11 ------ .../ui/elements/src/lib/ui-elements.module.ts | 3 -- 7 files changed, 61 deletions(-) delete mode 100644 libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.css delete mode 100644 libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html delete mode 100644 libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts delete mode 100644 libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts diff --git a/apps/datahub/src/app/record/record-metadata/record-metadata.component.html b/apps/datahub/src/app/record/record-metadata/record-metadata.component.html index 51ecee9de..b26009bd5 100644 --- a/apps/datahub/src/app/record/record-metadata/record-metadata.component.html +++ b/apps/datahub/src/app/record/record-metadata/record-metadata.component.html @@ -44,8 +44,6 @@ [metadataQualityDisplay]="metadataQualityDisplay" > - - diff --git a/libs/ui/elements/src/index.ts b/libs/ui/elements/src/index.ts index 460ed5f89..bb14a17ed 100644 --- a/libs/ui/elements/src/index.ts +++ b/libs/ui/elements/src/index.ts @@ -1,7 +1,6 @@ export * from './lib/ui-elements.module' export * from './lib/metadata-info/metadata-info.component' export * from './lib/metadata-contact/metadata-contact.component' -export * from './lib/metadata-catalog/metadata-catalog.component' export * from './lib/metadata-quality/metadata-quality.component' export * from './lib/metadata-quality-item/metadata-quality-item.component' export * from './lib/search-results-error/search-results-error.component' diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.css b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html deleted file mode 100644 index 66596e01d..000000000 --- a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

- record.metadata.catalog -

-

- {{ sourceLabel }} -

-
diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts deleted file mode 100644 index 975d690f3..000000000 --- a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' -import { By } from '@angular/platform-browser' - -import { MetadataCatalogComponent } from './metadata-catalog.component' - -describe('MetadataCatalogComponent', () => { - let component: MetadataCatalogComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [MetadataCatalogComponent], - }).compileComponents() - }) - - beforeEach(() => { - fixture = TestBed.createComponent(MetadataCatalogComponent) - component = fixture.componentInstance - component.sourceLabel = 'source label' - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) - - describe('content', () => { - let ps - beforeEach(() => { - ps = fixture.debugElement.queryAll(By.css('p')) - }) - it('displays the source label', () => { - expect(ps[1].nativeElement.innerHTML).toBe(' source label ') - }) - }) -}) diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts deleted file mode 100644 index b3e3ffdc3..000000000 --- a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, ChangeDetectionStrategy, Input } from '@angular/core' - -@Component({ - selector: 'gn-ui-metadata-catalog', - templateUrl: './metadata-catalog.component.html', - styleUrls: ['./metadata-catalog.component.css'], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class MetadataCatalogComponent { - @Input() sourceLabel: string -} diff --git a/libs/ui/elements/src/lib/ui-elements.module.ts b/libs/ui/elements/src/lib/ui-elements.module.ts index 7a6feab03..5f8897a86 100644 --- a/libs/ui/elements/src/lib/ui-elements.module.ts +++ b/libs/ui/elements/src/lib/ui-elements.module.ts @@ -15,7 +15,6 @@ import { TranslateModule } from '@ngx-translate/core' import { LinkCardComponent } from './link-card/link-card.component' import { RelatedRecordCardComponent } from './related-record-card/related-record-card.component' import { MetadataContactComponent } from './metadata-contact/metadata-contact.component' -import { MetadataCatalogComponent } from './metadata-catalog/metadata-catalog.component' import { MetadataQualityComponent } from './metadata-quality/metadata-quality.component' import { MetadataQualityItemComponent } from './metadata-quality-item/metadata-quality-item.component' import { SearchResultsErrorComponent } from './search-results-error/search-results-error.component' @@ -56,7 +55,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over LinkCardComponent, RelatedRecordCardComponent, MetadataContactComponent, - MetadataCatalogComponent, MetadataQualityComponent, MetadataQualityItemComponent, SearchResultsErrorComponent, @@ -79,7 +77,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over LinkCardComponent, RelatedRecordCardComponent, MetadataContactComponent, - MetadataCatalogComponent, MetadataQualityComponent, MetadataQualityItemComponent, SearchResultsErrorComponent,