mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
rename ItemSearchResultComponent to prevent confusion with ItemSearchResultListElementComponent
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('JournalIssue', ElementViewMode.SetElement)
|
||||
@Component({
|
||||
@@ -12,5 +12,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Journal Issue
|
||||
*/
|
||||
export class JournalIssueListElementComponent extends ItemSearchResultComponent {
|
||||
export class JournalIssueListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('JournalVolume', ElementViewMode.SetElement)
|
||||
@Component({
|
||||
@@ -12,5 +12,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Journal Volume
|
||||
*/
|
||||
export class JournalVolumeListElementComponent extends ItemSearchResultComponent {
|
||||
export class JournalVolumeListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Journal', ElementViewMode.SetElement)
|
||||
@Component({
|
||||
@@ -12,5 +12,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Journal
|
||||
*/
|
||||
export class JournalListElementComponent extends ItemSearchResultComponent {
|
||||
export class JournalListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('OrgUnit', ElementViewMode.SetElement)
|
||||
@Component({
|
||||
@@ -12,5 +12,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Organisation Unit
|
||||
*/
|
||||
export class OrgUnitListElementComponent extends ItemSearchResultComponent {
|
||||
export class OrgUnitListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Person', ElementViewMode.SetElement)
|
||||
@Component({
|
||||
@@ -12,5 +12,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Person
|
||||
*/
|
||||
export class PersonListElementComponent extends ItemSearchResultComponent {
|
||||
export class PersonListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Project', ElementViewMode.SetElement)
|
||||
@Component({
|
||||
@@ -12,5 +12,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Project
|
||||
*/
|
||||
export class ProjectListElementComponent extends ItemSearchResultComponent {
|
||||
export class ProjectListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { DEFAULT_ITEM_TYPE, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { ElementViewMode } from '../../../../view-mode';
|
||||
import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Publication', ElementViewMode.SetElement)
|
||||
@rendersItemType(DEFAULT_ITEM_TYPE, ElementViewMode.SetElement)
|
||||
@@ -13,5 +13,5 @@ import { ItemSearchResultComponent } from '../item-search-result-component';
|
||||
/**
|
||||
* The component for displaying a list element for an item of the type Publication
|
||||
*/
|
||||
export class PublicationListElementComponent extends ItemSearchResultComponent {
|
||||
export class PublicationListElementComponent extends TypedItemSearchResultListElementComponent {
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TruncatePipe } from '../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ItemSearchResultComponent } from './item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from './typed-item-search-result-list-element.component';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../../core/data/paginated-list';
|
||||
@@ -23,26 +23,26 @@ const mockSearchResult = {
|
||||
} as ItemSearchResult;
|
||||
|
||||
describe('ItemSearchResultComponent', () => {
|
||||
let comp: ItemSearchResultComponent;
|
||||
let fixture: ComponentFixture<ItemSearchResultComponent>;
|
||||
let comp: TypedItemSearchResultListElementComponent;
|
||||
let fixture: ComponentFixture<TypedItemSearchResultListElementComponent>;
|
||||
|
||||
describe('when injecting an Item', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ItemSearchResultComponent, TruncatePipe],
|
||||
declarations: [TypedItemSearchResultListElementComponent, TruncatePipe],
|
||||
providers: [
|
||||
{provide: TruncatableService, useValue: {}},
|
||||
{provide: ITEM, useValue: mockItem}
|
||||
],
|
||||
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
}).overrideComponent(ItemSearchResultComponent, {
|
||||
}).overrideComponent(TypedItemSearchResultListElementComponent, {
|
||||
set: {changeDetection: ChangeDetectionStrategy.Default}
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(async(() => {
|
||||
fixture = TestBed.createComponent(ItemSearchResultComponent);
|
||||
fixture = TestBed.createComponent(TypedItemSearchResultListElementComponent);
|
||||
comp = fixture.componentInstance;
|
||||
}));
|
||||
|
||||
@@ -56,20 +56,20 @@ describe('ItemSearchResultComponent', () => {
|
||||
describe('when injecting an ItemSearchResult', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ItemSearchResultComponent, TruncatePipe],
|
||||
declarations: [TypedItemSearchResultListElementComponent, TruncatePipe],
|
||||
providers: [
|
||||
{provide: TruncatableService, useValue: {}},
|
||||
{provide: ITEM, useValue: mockSearchResult}
|
||||
],
|
||||
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
}).overrideComponent(ItemSearchResultComponent, {
|
||||
}).overrideComponent(TypedItemSearchResultListElementComponent, {
|
||||
set: {changeDetection: ChangeDetectionStrategy.Default}
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(async(() => {
|
||||
fixture = TestBed.createComponent(ItemSearchResultComponent);
|
||||
fixture = TestBed.createComponent(TypedItemSearchResultListElementComponent);
|
||||
comp = fixture.componentInstance;
|
||||
}));
|
||||
|
@@ -13,7 +13,7 @@ import { SearchResultListElementComponent } from '../../search-result-list-eleme
|
||||
selector: 'ds-item-search-result',
|
||||
template: ''
|
||||
})
|
||||
export class ItemSearchResultComponent extends SearchResultListElementComponent<ItemSearchResult, Item> {
|
||||
export class TypedItemSearchResultListElementComponent extends SearchResultListElementComponent<ItemSearchResult, Item> {
|
||||
item: Item;
|
||||
|
||||
constructor(
|
@@ -14,7 +14,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { NgxPaginationModule } from 'ngx-pagination';
|
||||
import { ItemTypeSwitcherComponent } from './items/switcher/item-type-switcher.component';
|
||||
import { ItemSearchResultComponent } from './object-list/item-list-element/item-types/item-search-result-component';
|
||||
import { TypedItemSearchResultListElementComponent } from './object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
import { PublicationListElementComponent } from './object-list/item-list-element/item-types/publication/publication-list-element.component';
|
||||
import { OrgUnitListElementComponent } from './object-list/item-list-element/item-types/orgunit/orgunit-list-element.component';
|
||||
import { PersonListElementComponent } from './object-list/item-list-element/item-types/person/person-list-element.component';
|
||||
@@ -167,7 +167,7 @@ const COMPONENTS = [
|
||||
TruncatableComponent,
|
||||
TruncatablePartComponent,
|
||||
InputSuggestionsComponent,
|
||||
ItemSearchResultComponent,
|
||||
TypedItemSearchResultListElementComponent,
|
||||
ItemTypeSwitcherComponent,
|
||||
BrowseByComponent
|
||||
];
|
||||
|
Reference in New Issue
Block a user