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