mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
fixed issues after merge
This commit is contained in:
@@ -1,29 +1,23 @@
|
|||||||
import { CollectionItemMapperComponent } from './collection-item-mapper.component';
|
import { CollectionItemMapperComponent } from './collection-item-mapper.component';
|
||||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||||
import { SearchFormComponent } from '../../shared/search-form/search-form.component';
|
import { SearchFormComponent } from '../../shared/search-form/search-form.component';
|
||||||
import { SearchPageModule } from '../../+search-page/search-page.module';
|
|
||||||
import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component';
|
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { ActivatedRouteStub } from '../../shared/testing/active-router-stub';
|
import { ActivatedRouteStub } from '../../shared/testing/active-router-stub';
|
||||||
import { RouterStub } from '../../shared/testing/router-stub';
|
import { RouterStub } from '../../shared/testing/router-stub';
|
||||||
import { SearchConfigurationService } from '../../+search-page/search-service/search-configuration.service';
|
|
||||||
import { SearchService } from '../../+search-page/search-service/search.service';
|
|
||||||
import { SearchServiceStub } from '../../shared/testing/search-service-stub';
|
import { SearchServiceStub } from '../../shared/testing/search-service-stub';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { NotificationsServiceStub } from '../../shared/testing/notifications-service-stub';
|
import { NotificationsServiceStub } from '../../shared/testing/notifications-service-stub';
|
||||||
import { ItemDataService } from '../../core/data/item-data.service';
|
import { ItemDataService } from '../../core/data/item-data.service';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { SharedModule } from '../../shared/shared.module';
|
|
||||||
import { Collection } from '../../core/shared/collection.model';
|
import { Collection } from '../../core/shared/collection.model';
|
||||||
import { RemoteData } from '../../core/data/remote-data';
|
import { RemoteData } from '../../core/data/remote-data';
|
||||||
import { PaginatedSearchOptions } from '../../+search-page/paginated-search-options.model';
|
|
||||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||||
import { EventEmitter, NgModule } from '@angular/core';
|
import { EventEmitter } from '@angular/core';
|
||||||
import { HostWindowService } from '../../shared/host-window.service';
|
import { HostWindowService } from '../../shared/host-window.service';
|
||||||
import { HostWindowServiceStub } from '../../shared/testing/host-window-service-stub';
|
import { HostWindowServiceStub } from '../../shared/testing/host-window-service-stub';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
@@ -36,13 +30,14 @@ import { ItemSelectComponent } from '../../shared/object-select/item-select/item
|
|||||||
import { ObjectSelectService } from '../../shared/object-select/object-select.service';
|
import { ObjectSelectService } from '../../shared/object-select/object-select.service';
|
||||||
import { ObjectSelectServiceStub } from '../../shared/testing/object-select-service-stub';
|
import { ObjectSelectServiceStub } from '../../shared/testing/object-select-service-stub';
|
||||||
import { VarDirective } from '../../shared/utils/var.directive';
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
|
||||||
import { of as observableOf, of } from 'rxjs/internal/observable/of';
|
import { of as observableOf, of } from 'rxjs/internal/observable/of';
|
||||||
import { RestResponse } from '../../core/cache/response.models';
|
import { RestResponse } from '../../core/cache/response.models';
|
||||||
import { SearchFixedFilterService } from '../../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
|
||||||
import { RouteService } from '../../core/services/route.service';
|
import { RouteService } from '../../core/services/route.service';
|
||||||
import { ErrorComponent } from '../../shared/error/error.component';
|
import { ErrorComponent } from '../../shared/error/error.component';
|
||||||
import { LoadingComponent } from '../../shared/loading/loading.component';
|
import { LoadingComponent } from '../../shared/loading/loading.component';
|
||||||
|
import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service';
|
||||||
|
import { SearchService } from '../../core/shared/search/search.service';
|
||||||
|
import { PaginatedSearchOptions } from '../../shared/search/paginated-search-options.model';
|
||||||
|
|
||||||
describe('CollectionItemMapperComponent', () => {
|
describe('CollectionItemMapperComponent', () => {
|
||||||
let comp: CollectionItemMapperComponent;
|
let comp: CollectionItemMapperComponent;
|
||||||
@@ -135,7 +130,6 @@ describe('CollectionItemMapperComponent', () => {
|
|||||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||||
{ provide: ObjectSelectService, useValue: new ObjectSelectServiceStub() },
|
{ provide: ObjectSelectService, useValue: new ObjectSelectServiceStub() },
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: SearchFixedFilterService, useValue: fixedFilterServiceStub }
|
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
@@ -5,12 +5,9 @@ import { fadeIn, fadeInOut } from '../../shared/animations/fade';
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { RemoteData } from '../../core/data/remote-data';
|
import { RemoteData } from '../../core/data/remote-data';
|
||||||
import { Collection } from '../../core/shared/collection.model';
|
import { Collection } from '../../core/shared/collection.model';
|
||||||
import { SearchConfigurationService } from '../../+search-page/search-service/search-configuration.service';
|
|
||||||
import { PaginatedSearchOptions } from '../../+search-page/paginated-search-options.model';
|
|
||||||
import { PaginatedList } from '../../core/data/paginated-list';
|
import { PaginatedList } from '../../core/data/paginated-list';
|
||||||
import { map, startWith, switchMap, take, tap } from 'rxjs/operators';
|
import { map, startWith, switchMap, take } from 'rxjs/operators';
|
||||||
import { getRemoteDataPayload, getSucceededRemoteData, toDSpaceObjectListRD } from '../../core/shared/operators';
|
import { getRemoteDataPayload, getSucceededRemoteData, toDSpaceObjectListRD } from '../../core/shared/operators';
|
||||||
import { SearchService } from '../../+search-page/search-service/search.service';
|
|
||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model';
|
import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model';
|
||||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||||
@@ -22,6 +19,9 @@ import { isNotEmpty } from '../../shared/empty.util';
|
|||||||
import { RestResponse } from '../../core/cache/response.models';
|
import { RestResponse } from '../../core/cache/response.models';
|
||||||
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../+my-dspace-page/my-dspace-page.component';
|
||||||
|
import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service';
|
||||||
|
import { PaginatedSearchOptions } from '../../shared/search/paginated-search-options.model';
|
||||||
|
import { SearchService } from '../../core/shared/search/search.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-collection-item-mapper',
|
selector: 'ds-collection-item-mapper',
|
||||||
|
@@ -10,7 +10,6 @@ import { CollectionFormComponent } from './collection-form/collection-form.compo
|
|||||||
import { EditCollectionPageComponent } from './edit-collection-page/edit-collection-page.component';
|
import { EditCollectionPageComponent } from './edit-collection-page/edit-collection-page.component';
|
||||||
import { DeleteCollectionPageComponent } from './delete-collection-page/delete-collection-page.component';
|
import { DeleteCollectionPageComponent } from './delete-collection-page/delete-collection-page.component';
|
||||||
import { CollectionItemMapperComponent } from './collection-item-mapper/collection-item-mapper.component';
|
import { CollectionItemMapperComponent } from './collection-item-mapper/collection-item-mapper.component';
|
||||||
import { SearchFixedFilterService } from '../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
|
||||||
import { SearchService } from '../core/shared/search/search.service';
|
import { SearchService } from '../core/shared/search/search.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -29,7 +28,6 @@ import { SearchService } from '../core/shared/search/search.service';
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
SearchService,
|
SearchService,
|
||||||
SearchFixedFilterService
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class CollectionPageModule {
|
export class CollectionPageModule {
|
||||||
|
@@ -1,15 +1,12 @@
|
|||||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ItemCollectionMapperComponent } from './item-collection-mapper.component';
|
import { ItemCollectionMapperComponent } from './item-collection-mapper.component';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { SearchConfigurationService } from '../../../+search-page/search-service/search-configuration.service';
|
|
||||||
import { SearchService } from '../../../+search-page/search-service/search.service';
|
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { ItemDataService } from '../../../core/data/item-data.service';
|
import { ItemDataService } from '../../../core/data/item-data.service';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { PaginatedSearchOptions } from '../../../+search-page/paginated-search-options.model';
|
|
||||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||||
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
|
||||||
import { RouterStub } from '../../../shared/testing/router-stub';
|
import { RouterStub } from '../../../shared/testing/router-stub';
|
||||||
@@ -19,7 +16,6 @@ import { SearchServiceStub } from '../../../shared/testing/search-service-stub';
|
|||||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||||
import { PageInfo } from '../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../core/shared/page-info.model';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { SharedModule } from '../../../shared/shared.module';
|
|
||||||
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
||||||
import { HostWindowService } from '../../../shared/host-window.service';
|
import { HostWindowService } from '../../../shared/host-window.service';
|
||||||
@@ -28,7 +24,6 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { Item } from '../../../core/shared/item.model';
|
import { Item } from '../../../core/shared/item.model';
|
||||||
import { ObjectSelectService } from '../../../shared/object-select/object-select.service';
|
import { ObjectSelectService } from '../../../shared/object-select/object-select.service';
|
||||||
import { ObjectSelectServiceStub } from '../../../shared/testing/object-select-service-stub';
|
import { ObjectSelectServiceStub } from '../../../shared/testing/object-select-service-stub';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
|
||||||
import { of } from 'rxjs/internal/observable/of';
|
import { of } from 'rxjs/internal/observable/of';
|
||||||
import { RestResponse } from '../../../core/cache/response.models';
|
import { RestResponse } from '../../../core/cache/response.models';
|
||||||
import { CollectionSelectComponent } from '../../../shared/object-select/collection-select/collection-select.component';
|
import { CollectionSelectComponent } from '../../../shared/object-select/collection-select/collection-select.component';
|
||||||
@@ -39,6 +34,9 @@ import { SearchFormComponent } from '../../../shared/search-form/search-form.com
|
|||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
import { ErrorComponent } from '../../../shared/error/error.component';
|
import { ErrorComponent } from '../../../shared/error/error.component';
|
||||||
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
import { LoadingComponent } from '../../../shared/loading/loading.component';
|
||||||
|
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
|
||||||
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
|
import { PaginatedSearchOptions } from '../../../shared/search/paginated-search-options.model';
|
||||||
|
|
||||||
describe('ItemCollectionMapperComponent', () => {
|
describe('ItemCollectionMapperComponent', () => {
|
||||||
let comp: ItemCollectionMapperComponent;
|
let comp: ItemCollectionMapperComponent;
|
||||||
|
@@ -2,15 +2,12 @@ import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
|||||||
|
|
||||||
import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { fadeIn, fadeInOut } from '../../../shared/animations/fade';
|
import { fadeIn, fadeInOut } from '../../../shared/animations/fade';
|
||||||
import { PaginatedSearchOptions } from '../../../+search-page/paginated-search-options.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';
|
||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
import { Item } from '../../../core/shared/item.model';
|
import { Item } from '../../../core/shared/item.model';
|
||||||
import { getRemoteDataPayload, getSucceededRemoteData, toDSpaceObjectListRD } from '../../../core/shared/operators';
|
import { getRemoteDataPayload, getSucceededRemoteData, toDSpaceObjectListRD } from '../../../core/shared/operators';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { SearchService } from '../../../+search-page/search-service/search.service';
|
|
||||||
import { SearchConfigurationService } from '../../../+search-page/search-service/search-configuration.service';
|
|
||||||
import { map, startWith, switchMap, take } from 'rxjs/operators';
|
import { map, startWith, switchMap, take } from 'rxjs/operators';
|
||||||
import { ItemDataService } from '../../../core/data/item-data.service';
|
import { ItemDataService } from '../../../core/data/item-data.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
@@ -19,6 +16,9 @@ import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'
|
|||||||
import { isNotEmpty } from '../../../shared/empty.util';
|
import { isNotEmpty } from '../../../shared/empty.util';
|
||||||
import { RestResponse } from '../../../core/cache/response.models';
|
import { RestResponse } from '../../../core/cache/response.models';
|
||||||
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
||||||
|
import { PaginatedSearchOptions } from '../../../shared/search/paginated-search-options.model';
|
||||||
|
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
|
||||||
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-item-collection-mapper',
|
selector: 'ds-item-collection-mapper',
|
||||||
|
@@ -9,7 +9,6 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
import { ItemMoveComponent } from './item-move.component';
|
import { ItemMoveComponent } from './item-move.component';
|
||||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { SearchService } from '../../../+search-page/search-service/search.service';
|
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { ItemDataService } from '../../../core/data/item-data.service';
|
import { ItemDataService } from '../../../core/data/item-data.service';
|
||||||
@@ -18,6 +17,7 @@ import { PaginatedList } from '../../../core/data/paginated-list';
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { RestResponse } from '../../../core/cache/response.models';
|
import { RestResponse } from '../../../core/cache/response.models';
|
||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
|
|
||||||
describe('ItemMoveComponent', () => {
|
describe('ItemMoveComponent', () => {
|
||||||
let comp: ItemMoveComponent;
|
let comp: ItemMoveComponent;
|
||||||
|
@@ -1,12 +1,9 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { SearchService } from '../../../+search-page/search-service/search.service';
|
|
||||||
import { first, map } from 'rxjs/operators';
|
import { first, map } from 'rxjs/operators';
|
||||||
import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model';
|
import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model';
|
||||||
import { SearchOptions } from '../../../+search-page/search-options.model';
|
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||||
import { PaginatedList } from '../../../core/data/paginated-list';
|
import { PaginatedList } from '../../../core/data/paginated-list';
|
||||||
import { SearchResult } from '../../../+search-page/search-result.model';
|
|
||||||
import { Item } from '../../../core/shared/item.model';
|
import { Item } from '../../../core/shared/item.model';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
@@ -17,9 +14,10 @@ import { getItemEditPath } from '../../item-page-routing.module';
|
|||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
import { RestResponse } from '../../../core/cache/response.models';
|
import { RestResponse } from '../../../core/cache/response.models';
|
||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
import { tap } from 'rxjs/internal/operators/tap';
|
|
||||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||||
import { PaginatedSearchOptions } from '../../../+search-page/paginated-search-options.model';
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
|
import { PaginatedSearchOptions } from '../../../shared/search/paginated-search-options.model';
|
||||||
|
import { SearchResult } from '../../../shared/search/search-result.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-item-move',
|
selector: 'ds-item-move',
|
||||||
|
@@ -28,23 +28,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-metadata-representation-list
|
<ds-metadata-representation-list
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[itemType]="'Person'"
|
[itemType]="'Person'"
|
||||||
[metadataField]="'dc.contributor.author'"
|
[metadataField]="'dc.contributor.author'"
|
||||||
[label]="'relationships.isAuthorOf' | translate">
|
[label]="'relationships.isAuthorOf' | translate">
|
||||||
</ds-metadata-representation-list>
|
</ds-metadata-representation-list>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isProjectOfPublication'"
|
[relationType]="'isProjectOfPublication'"
|
||||||
[label]="'relationships.isProjectOf' | translate">
|
[label]="'relationships.isProjectOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isOrgUnitOfPublication'"
|
[relationType]="'isOrgUnitOfPublication'"
|
||||||
[label]="'relationships.isOrgUnitOf' | translate">
|
[label]="'relationships.isOrgUnitOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isJournalIssueOfPublication'"
|
[relationType]="'isJournalIssueOfPublication'"
|
||||||
[label]="'relationships.isJournalIssueOf' | translate">
|
[label]="'relationships.isJournalIssueOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -14,7 +14,7 @@ import { UploaderOptions } from '../../shared/uploader/uploader-options.model';
|
|||||||
import { HALEndpointService } from '../../core/shared/hal-endpoint.service';
|
import { HALEndpointService } from '../../core/shared/hal-endpoint.service';
|
||||||
import { NotificationType } from '../../shared/notifications/models/notification-type';
|
import { NotificationType } from '../../shared/notifications/models/notification-type';
|
||||||
import { hasValue } from '../../shared/empty.util';
|
import { hasValue } from '../../shared/empty.util';
|
||||||
import { SearchResult } from '../../+search-page/search-result.model';
|
import { SearchResult } from '../../shared/search/search-result.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component represents the whole mydspace page header
|
* This component represents the whole mydspace page header
|
||||||
|
@@ -27,7 +27,7 @@ import { SearchConfigurationService } from '../core/shared/search/search-configu
|
|||||||
import { MyDSpaceConfigurationService } from './my-dspace-configuration.service';
|
import { MyDSpaceConfigurationService } from './my-dspace-configuration.service';
|
||||||
import { ViewMode } from '../core/shared/view-mode.model';
|
import { ViewMode } from '../core/shared/view-mode.model';
|
||||||
import { MyDSpaceRequest } from '../core/data/request.models';
|
import { MyDSpaceRequest } from '../core/data/request.models';
|
||||||
import { SearchResult } from '../+search-page/search-result.model';
|
import { SearchResult } from '../shared/search/search-result.model';
|
||||||
|
|
||||||
export const MYDSPACE_ROUTE = '/mydspace';
|
export const MYDSPACE_ROUTE = '/mydspace';
|
||||||
export const SEARCH_CONFIG_SERVICE: InjectionToken<SearchConfigurationService> = new InjectionToken<SearchConfigurationService>('searchConfigurationService');
|
export const SEARCH_CONFIG_SERVICE: InjectionToken<SearchConfigurationService> = new InjectionToken<SearchConfigurationService>('searchConfigurationService');
|
||||||
|
@@ -6,8 +6,8 @@ import { SearchOptions } from '../../shared/search/search-options.model';
|
|||||||
import { PaginatedList } from '../../core/data/paginated-list';
|
import { PaginatedList } from '../../core/data/paginated-list';
|
||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
import { isEmpty } from '../../shared/empty.util';
|
import { isEmpty } from '../../shared/empty.util';
|
||||||
import { SearchResult } from '../../+search-page/search-result.model';
|
|
||||||
import { Context } from '../../core/shared/context.model';
|
import { Context } from '../../core/shared/context.model';
|
||||||
|
import { SearchResult } from '../../shared/search/search-result.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component that represents all results for mydspace page
|
* Component that represents all results for mydspace page
|
||||||
|
@@ -25,8 +25,8 @@ import { ResponseParsingService } from './parsing.service';
|
|||||||
import { GenericConstructor } from '../shared/generic-constructor';
|
import { GenericConstructor } from '../shared/generic-constructor';
|
||||||
import { hasValue, isNotEmptyOperator } from '../../shared/empty.util';
|
import { hasValue, isNotEmptyOperator } from '../../shared/empty.util';
|
||||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||||
import { PaginatedSearchOptions } from '../../+search-page/paginated-search-options.model';
|
|
||||||
import { SearchParam } from '../cache/models/search-param.model';
|
import { SearchParam } from '../cache/models/search-param.model';
|
||||||
|
import { PaginatedSearchOptions } from '../../shared/search/paginated-search-options.model';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CollectionDataService extends ComColDataService<Collection> {
|
export class CollectionDataService extends ComColDataService<Collection> {
|
||||||
|
@@ -56,8 +56,8 @@ export class RelationshipTypeService {
|
|||||||
/* Flatten the page so we can treat it like an observable */
|
/* Flatten the page so we can treat it like an observable */
|
||||||
switchMap((typeListRD: RemoteData<PaginatedList<RelationshipType>>) => typeListRD.payload.page),
|
switchMap((typeListRD: RemoteData<PaginatedList<RelationshipType>>) => typeListRD.payload.page),
|
||||||
switchMap((type: RelationshipType) => {
|
switchMap((type: RelationshipType) => {
|
||||||
if (type.leftLabel === label) return this.checkType(type, firstType, secondType);
|
if (type.leftwardType === label) return this.checkType(type, firstType, secondType);
|
||||||
else if (type.rightLabel === label) return this.checkType(type, secondType, firstType);
|
else if (type.rightwardType === label) return this.checkType(type, secondType, firstType);
|
||||||
else return [];
|
else return [];
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@@ -29,13 +29,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isJournalVolumeOfIssue'"
|
[relationType]="'isJournalVolumeOfIssue'"
|
||||||
[label]="'relationships.isSingleVolumeOf' | translate">
|
[label]="'relationships.isSingleVolumeOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
class="mb-1 mt-1"
|
class="mb-1 mt-1"
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isPublicationOfJournalIssue'"
|
[relationType]="'isPublicationOfJournalIssue'"
|
||||||
[label]="'relationships.isPublicationOfJournalIssue' | translate">
|
[label]="'relationships.isPublicationOfJournalIssue' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -17,12 +17,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isJournalOfVolume'"
|
[relationType]="'isJournalOfVolume'"
|
||||||
[label]="'relationships.isSingleJournalOf' | translate">
|
[label]="'relationships.isSingleJournalOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isIssueOfJournalVolume'"
|
[relationType]="'isIssueOfJournalVolume'"
|
||||||
[label]="'relationships.isIssueOf' | translate">
|
[label]="'relationships.isIssueOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isVolumeOfJournal'"
|
[relationType]="'isVolumeOfJournal'"
|
||||||
[label]="'relationships.isVolumeOf' | translate">
|
[label]="'relationships.isVolumeOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -25,17 +25,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isPersonOfOrgUnit'"
|
[relationType]="'isPersonOfOrgUnit'"
|
||||||
[label]="'relationships.isPersonOf' | translate">
|
[label]="'relationships.isPersonOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isProjectOfOrgUnit'"
|
[relationType]="'isProjectOfOrgUnit'"
|
||||||
[label]="'relationships.isProjectOf' | translate">
|
[label]="'relationships.isProjectOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isPublicationOfOrgUnit'"
|
[relationType]="'isPublicationOfOrgUnit'"
|
||||||
[label]="'relationships.isPublicationOf' | translate">
|
[label]="'relationships.isPublicationOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -18,19 +18,19 @@
|
|||||||
[fields]="['person.birthDate']"
|
[fields]="['person.birthDate']"
|
||||||
[label]="'person.page.birthdate'">
|
[label]="'person.page.birthdate'">
|
||||||
</ds-generic-item-page-field>
|
</ds-generic-item-page-field>
|
||||||
<!--<ds-generic-item-page-field [item]="item"-->
|
<!--<ds-generic-item-page-field [item]="object"-->
|
||||||
<!--[fields]="['person.identifier.staffid']"-->
|
<!--[fields]="['person.identifier.staffid']"-->
|
||||||
<!--[label]="'person.page.staffid'">-->
|
<!--[label]="'person.page.staffid'">-->
|
||||||
<!--</ds-generic-item-page-field>-->
|
<!--</ds-generic-item-page-field>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isProjectOfPerson'"
|
[relationType]="'isProjectOfPerson'"
|
||||||
[label]="'relationships.isProjectOf' | translate">
|
[label]="'relationships.isProjectOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isOrgUnitOfPerson'"
|
[relationType]="'isOrgUnitOfPerson'"
|
||||||
[label]="'relationships.isOrgUnitOf' | translate">
|
[label]="'relationships.isOrgUnitOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -6,12 +6,12 @@
|
|||||||
<ds-metadata-field-wrapper>
|
<ds-metadata-field-wrapper>
|
||||||
<ds-thumbnail [thumbnail]="object.getThumbnail() | async" [defaultImage]="'assets/images/project-placeholder.svg'"></ds-thumbnail>
|
<ds-thumbnail [thumbnail]="object.getThumbnail() | async" [defaultImage]="'assets/images/project-placeholder.svg'"></ds-thumbnail>
|
||||||
</ds-metadata-field-wrapper>
|
</ds-metadata-field-wrapper>
|
||||||
<!--<ds-generic-item-page-field [item]="item"-->
|
<!--<ds-generic-item-page-field [item]="object"-->
|
||||||
<!--[fields]="['project.identifier.status']"-->
|
<!--[fields]="['project.identifier.status']"-->
|
||||||
<!--[label]="'project.page.status'">-->
|
<!--[label]="'project.page.status'">-->
|
||||||
<!--</ds-generic-item-page-field>-->
|
<!--</ds-generic-item-page-field>-->
|
||||||
<ds-metadata-representation-list
|
<ds-metadata-representation-list
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[itemType]="'OrgUnit'"
|
[itemType]="'OrgUnit'"
|
||||||
[metadataField]="'project.contributor.other'"
|
[metadataField]="'project.contributor.other'"
|
||||||
[label]="'project.page.contributor' | translate">
|
[label]="'project.page.contributor' | translate">
|
||||||
@@ -31,17 +31,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isPersonOfProject'"
|
[relationType]="'isPersonOfProject'"
|
||||||
[label]="'relationships.isPersonOf' | translate">
|
[label]="'relationships.isPersonOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isPublicationOfProject'"
|
[relationType]="'isPublicationOfProject'"
|
||||||
[label]="'relationships.isPublicationOf' | translate">
|
[label]="'relationships.isPublicationOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isOrgUnitOfProject'"
|
[relationType]="'isOrgUnitOfProject'"
|
||||||
[label]="'relationships.isOrgUnitOf' | translate">
|
[label]="'relationships.isOrgUnitOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<span class="d-inline-block align-middle ml-1">
|
<span class="d-inline-block align-middle ml-1">
|
||||||
<ds-item-type-switcher [object]="(modelValueMDRepresentation | async)[i]" [viewMode]="itemViewMode.Metadata"></ds-item-type-switcher>
|
<ds-metadata-representation-loader [mdRepresentation]="(modelValueMDRepresentation | async)[i]"></ds-metadata-representation-loader>
|
||||||
</span>
|
</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</li>
|
</li>
|
||||||
|
@@ -81,16 +81,15 @@ import { SelectableListService } from '../../../object-list/selectable-list/sele
|
|||||||
import { DsDynamicDisabledComponent } from './models/disabled/dynamic-disabled.component';
|
import { DsDynamicDisabledComponent } from './models/disabled/dynamic-disabled.component';
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_DISABLED } from './models/disabled/dynamic-disabled.model';
|
import { DYNAMIC_FORM_CONTROL_TYPE_DISABLED } from './models/disabled/dynamic-disabled.model';
|
||||||
import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/dynamic-lookup-relation-modal.component';
|
import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/dynamic-lookup-relation-modal.component';
|
||||||
import { ItemViewMode } from '../../../items/item-type-decorator';
|
|
||||||
import { ItemMetadataRepresentation } from '../../../../core/shared/metadata-representation/item/item-metadata-representation.model';
|
import { ItemMetadataRepresentation } from '../../../../core/shared/metadata-representation/item/item-metadata-representation.model';
|
||||||
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
||||||
import { RemoteData } from '../../../../core/data/remote-data';
|
import { RemoteData } from '../../../../core/data/remote-data';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { Relationship } from '../../../../core/shared/item-relationships/relationship.model';
|
|
||||||
import { ItemDataService } from '../../../../core/data/item-data.service';
|
import { ItemDataService } from '../../../../core/data/item-data.service';
|
||||||
import { RemoveRelationshipAction } from './relation-lookup-modal/relationship.actions';
|
import { RemoveRelationshipAction } from './relation-lookup-modal/relationship.actions';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { AppState } from '../../../../app.reducer';
|
import { AppState } from '../../../../app.reducer';
|
||||||
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
|
|
||||||
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
||||||
switch (model.type) {
|
switch (model.type) {
|
||||||
@@ -162,7 +161,6 @@ export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<
|
|||||||
changeDetection: ChangeDetectionStrategy.Default
|
changeDetection: ChangeDetectionStrategy.Default
|
||||||
})
|
})
|
||||||
export class DsDynamicFormControlContainerComponent extends DynamicFormControlContainerComponent implements OnInit, OnChanges {
|
export class DsDynamicFormControlContainerComponent extends DynamicFormControlContainerComponent implements OnInit, OnChanges {
|
||||||
itemViewMode = ItemViewMode;
|
|
||||||
@ContentChildren(DynamicTemplateDirective) contentTemplateList: QueryList<DynamicTemplateDirective>;
|
@ContentChildren(DynamicTemplateDirective) contentTemplateList: QueryList<DynamicTemplateDirective>;
|
||||||
// tslint:disable-next-line:no-input-rename
|
// tslint:disable-next-line:no-input-rename
|
||||||
@Input('templates') inputTemplateList: QueryList<DynamicTemplateDirective>;
|
@Input('templates') inputTemplateList: QueryList<DynamicTemplateDirective>;
|
||||||
|
@@ -79,7 +79,7 @@ export class RelationshipEffects {
|
|||||||
return this.relationshipTypeService.getRelationshipTypeByLabelAndTypes(relationshipType, type1, type2)
|
return this.relationshipTypeService.getRelationshipTypeByLabelAndTypes(relationshipType, type1, type2)
|
||||||
.pipe(
|
.pipe(
|
||||||
mergeMap((type: RelationshipType) => {
|
mergeMap((type: RelationshipType) => {
|
||||||
const isSwitched = type.rightLabel === relationshipType;
|
const isSwitched = type.rightwardType === relationshipType;
|
||||||
if (isSwitched) {
|
if (isSwitched) {
|
||||||
return this.relationshipService.addRelationship(type.id, item2, item1);
|
return this.relationshipService.addRelationship(type.id, item2, item1);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -13,12 +13,11 @@ import { ListableObject } from '../../../../../object-collection/shared/listable
|
|||||||
import { SearchService } from '../../../../../../core/shared/search/search.service';
|
import { SearchService } from '../../../../../../core/shared/search/search.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { SelectableListService } from '../../../../../object-list/selectable-list/selectable-list.service';
|
import { SelectableListService } from '../../../../../object-list/selectable-list/selectable-list.service';
|
||||||
import { RouteService } from '../../../../../services/route.service';
|
|
||||||
import { SelectableListState } from '../../../../../object-list/selectable-list/selectable-list.reducer';
|
|
||||||
import { hasValue, isNotEmpty } from '../../../../../empty.util';
|
import { hasValue, isNotEmpty } from '../../../../../empty.util';
|
||||||
import { concat, map, multicast, switchMap, take, takeWhile, tap } from 'rxjs/operators';
|
import { concat, map, multicast, switchMap, take, takeWhile, tap } from 'rxjs/operators';
|
||||||
import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model';
|
||||||
import { getSucceededRemoteData } from '../../../../../../core/shared/operators';
|
import { getSucceededRemoteData } from '../../../../../../core/shared/operators';
|
||||||
|
import { RouteService } from '../../../../../../core/services/route.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-dynamic-lookup-relation-search-tab',
|
selector: 'ds-dynamic-lookup-relation-search-tab',
|
||||||
|
@@ -2,7 +2,6 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { RelationshipOptions } from '../../../models/relationship-options.model';
|
|
||||||
import { ListableObject } from '../../../../../object-collection/shared/listable-object.model';
|
import { ListableObject } from '../../../../../object-collection/shared/listable-object.model';
|
||||||
import { RemoteData } from '../../../../../../core/data/remote-data';
|
import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||||
import { map, switchMap, take } from 'rxjs/operators';
|
import { map, switchMap, take } from 'rxjs/operators';
|
||||||
@@ -10,10 +9,7 @@ import { createSuccessfulRemoteDataObject } from '../../../../../testing/utils';
|
|||||||
import { PaginationComponentOptions } from '../../../../../pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../../../../pagination/pagination-component-options.model';
|
||||||
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { SelectableListService } from '../../../../../object-list/selectable-list/selectable-list.service';
|
|
||||||
import { RouteService } from '../../../../../services/route.service';
|
|
||||||
import { PaginatedSearchOptions } from '../../../../../search/paginated-search-options.model';
|
import { PaginatedSearchOptions } from '../../../../../search/paginated-search-options.model';
|
||||||
import { size } from 'memory-cache';
|
|
||||||
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { ClaimedTask } from '../../../core/tasks/models/claimed-task-object.model';
|
import { ClaimedTask } from '../../../core/tasks/models/claimed-task-object.model';
|
||||||
import { SearchResult } from '../../../+search-page/search-result.model';
|
import { SearchResult } from '../../search/search-result.model';
|
||||||
import { searchResultFor } from '../../../+search-page/search-service/search-result-element-decorator';
|
import { searchResultFor } from '../../search/search-result-element-decorator';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a search result object of a ClaimedTask object
|
* Represents a search result object of a ClaimedTask object
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import { SearchResult } from '../../search/search-result.model';
|
import { SearchResult } from '../../search/search-result.model';
|
||||||
import { Item } from '../../../core/shared/item.model';
|
import { Item } from '../../../core/shared/item.model';
|
||||||
import { inheritEquatable } from '../../../core/utilities/equals.decorators';
|
import { inheritEquatable } from '../../../core/utilities/equals.decorators';
|
||||||
import { searchResultFor } from '../../../+search-page/search-service/search-result-element-decorator';
|
|
||||||
import { GenericConstructor } from '../../../core/shared/generic-constructor';
|
import { GenericConstructor } from '../../../core/shared/generic-constructor';
|
||||||
import { ListableObject } from './listable-object.model';
|
import { ListableObject } from './listable-object.model';
|
||||||
|
import { searchResultFor } from '../../search/search-result-element-decorator';
|
||||||
|
|
||||||
@searchResultFor(Item)
|
@searchResultFor(Item)
|
||||||
@inheritEquatable(SearchResult)
|
@inheritEquatable(SearchResult)
|
||||||
|
@@ -14,7 +14,7 @@ const testType = 'TestType';
|
|||||||
const testContext = Context.Search;
|
const testContext = Context.Search;
|
||||||
const testViewMode = ViewMode.StandalonePage;
|
const testViewMode = ViewMode.StandalonePage;
|
||||||
|
|
||||||
class TestType implements ListableObject {
|
class TestType extends ListableObject {
|
||||||
getRenderTypes(): Array<string | GenericConstructor<ListableObject>> {
|
getRenderTypes(): Array<string | GenericConstructor<ListableObject>> {
|
||||||
return [testType];
|
return [testType];
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@ import { Component, Input } from '@angular/core';
|
|||||||
|
|
||||||
import { Metadata } from '../../../../../core/shared/metadata.utils';
|
import { Metadata } from '../../../../../core/shared/metadata.utils';
|
||||||
import { Item } from '../../../../../core/shared/item.model';
|
import { Item } from '../../../../../core/shared/item.model';
|
||||||
import { SearchResult } from '../../../../../+search-page/search-result.model';
|
import { SearchResult } from '../../../../search/search-result.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component show values for the given item metadata
|
* This component show values for the given item metadata
|
||||||
|
@@ -7,9 +7,9 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
||||||
import { fadeInOut } from '../../../animations/fade';
|
import { fadeInOut } from '../../../animations/fade';
|
||||||
import { Bitstream } from '../../../../core/shared/bitstream.model';
|
import { Bitstream } from '../../../../core/shared/bitstream.model';
|
||||||
import { SearchResult } from '../../../../+search-page/search-result.model';
|
|
||||||
import { FileService } from '../../../../core/shared/file.service';
|
import { FileService } from '../../../../core/shared/file.service';
|
||||||
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
|
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
|
||||||
|
import { SearchResult } from '../../../search/search-result.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component show metadata for the given item object in the detail view.
|
* This component show metadata for the given item object in the detail view.
|
||||||
|
@@ -3,8 +3,8 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { AbstractListableElementComponent } from '../../object-collection/shared/object-collection-element/abstract-listable-element.component';
|
import { AbstractListableElementComponent } from '../../object-collection/shared/object-collection-element/abstract-listable-element.component';
|
||||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||||
import { Metadata } from '../../../core/shared/metadata.utils';
|
import { Metadata } from '../../../core/shared/metadata.utils';
|
||||||
import { SearchResult } from '../../../+search-page/search-result.model';
|
|
||||||
import { hasValue } from '../../empty.util';
|
import { hasValue } from '../../empty.util';
|
||||||
|
import { SearchResult } from '../../search/search-result.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component representing Search Results with ViewMode.DetailedElement
|
* Component representing Search Results with ViewMode.DetailedElement
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { ListableObject } from '../../object-collection/shared/listable-object.model';
|
|
||||||
import { SearchResult } from '../../../+search-page/search-result.model';
|
|
||||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -11,7 +11,6 @@ import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspa
|
|||||||
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../testing/utils';
|
import { createSuccessfulRemoteDataObject } from '../../../testing/utils';
|
||||||
import { ClaimedTaskSearchResult } from '../../../object-collection/shared/claimed-task-search-result.model';
|
import { ClaimedTaskSearchResult } from '../../../object-collection/shared/claimed-task-search-result.model';
|
||||||
import { TruncatableAction } from '../../../truncatable/truncatable.actions';
|
|
||||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||||
|
|
||||||
let component: ClaimedSearchResultListElementComponent;
|
let component: ClaimedSearchResultListElementComponent;
|
||||||
|
@@ -3,7 +3,7 @@ import { Component, Input } from '@angular/core';
|
|||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { fadeInOut } from '../../../animations/fade';
|
import { fadeInOut } from '../../../animations/fade';
|
||||||
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
||||||
import { SearchResult } from '../../../../+search-page/search-result.model';
|
import { SearchResult } from '../../../search/search-result.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component show metadata for the given item object in the list view.
|
* This component show metadata for the given item object in the list view.
|
||||||
|
@@ -11,11 +11,10 @@ import { FILTER_CONFIG, IN_PLACE_SEARCH, SearchFilterService } from '../../../..
|
|||||||
import { SearchService } from '../../../../../core/shared/search/search.service';
|
import { SearchService } from '../../../../../core/shared/search/search.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
|
import { SEARCH_CONFIG_SERVICE } from '../../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||||
import { RouteService } from '../../../../core/services/route.service';
|
import { RouteService } from '../../../../../core/services/route.service';
|
||||||
import { hasValue } from '../../../../shared/empty.util';
|
import { hasValue } from '../../../../empty.util';
|
||||||
import { SearchConfigurationService } from '../../../search-service/search-configuration.service';
|
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The suffix for a range filters' minimum in the frontend URL
|
* The suffix for a range filters' minimum in the frontend URL
|
||||||
|
@@ -6,11 +6,11 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
import { SearchLabelComponent } from './search-label.component';
|
import { SearchLabelComponent } from './search-label.component';
|
||||||
import { ObjectKeysPipe } from '../../../shared/utils/object-keys-pipe';
|
import { ObjectKeysPipe } from '../../../utils/object-keys-pipe';
|
||||||
import { SearchService } from '../../search-service/search.service';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../+my-dspace-page/my-dspace-page.component';
|
import { SearchServiceStub } from '../../../testing/search-service-stub';
|
||||||
import { SearchServiceStub } from '../../../shared/testing/search-service-stub';
|
import { SearchConfigurationServiceStub } from '../../../testing/search-configuration-service-stub';
|
||||||
import { SearchConfigurationServiceStub } from '../../../shared/testing/search-configuration-service-stub';
|
import { SearchService } from '../../../../core/shared/search/search.service';
|
||||||
|
|
||||||
describe('SearchLabelComponent', () => {
|
describe('SearchLabelComponent', () => {
|
||||||
let comp: SearchLabelComponent;
|
let comp: SearchLabelComponent;
|
@@ -1,9 +1,9 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
import { SearchService } from '../../search-service/search.service';
|
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { hasValue, isNotEmpty } from '../../../shared/empty.util';
|
import { hasValue, isNotEmpty } from '../../../empty.util';
|
||||||
|
import { SearchService } from '../../../../core/shared/search/search.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-label',
|
selector: 'ds-search-label',
|
@@ -1,5 +1,8 @@
|
|||||||
import { Component, Inject, Input } from '@angular/core';
|
import { Component, Inject, Input } from '@angular/core';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../+my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../+my-dspace-page/my-dspace-page.component';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { Params, Router } from '@angular/router';
|
||||||
|
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-labels',
|
selector: 'ds-search-labels',
|
||||||
|
@@ -2,6 +2,7 @@ import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
|||||||
import { MetadataMap } from '../../core/shared/metadata.models';
|
import { MetadataMap } from '../../core/shared/metadata.models';
|
||||||
import { ListableObject } from '../object-collection/shared/listable-object.model';
|
import { ListableObject } from '../object-collection/shared/listable-object.model';
|
||||||
import { excludeFromEquals, fieldsForEquals } from '../../core/utilities/equals.decorators';
|
import { excludeFromEquals, fieldsForEquals } from '../../core/utilities/equals.decorators';
|
||||||
|
import { GenericConstructor } from '../../core/shared/generic-constructor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a search result object of a certain (<T>) DSpaceObject
|
* Represents a search result object of a certain (<T>) DSpaceObject
|
||||||
@@ -18,4 +19,11 @@ export class SearchResult<T extends DSpaceObject> extends ListableObject {
|
|||||||
*/
|
*/
|
||||||
@excludeFromEquals
|
@excludeFromEquals
|
||||||
hitHighlights: MetadataMap;
|
hitHighlights: MetadataMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method that returns as which type of object this object should be rendered
|
||||||
|
*/
|
||||||
|
getRenderTypes(): Array<string | GenericConstructor<ListableObject>> {
|
||||||
|
return [this.constructor as GenericConstructor<ListableObject>];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -133,7 +133,6 @@ import { DsDynamicLookupRelationModalComponent } from './form/builder/ds-dynamic
|
|||||||
import { SearchResultsComponent } from './search/search-results/search-results.component';
|
import { SearchResultsComponent } from './search/search-results/search-results.component';
|
||||||
import { SearchSidebarComponent } from './search/search-sidebar/search-sidebar.component';
|
import { SearchSidebarComponent } from './search/search-sidebar/search-sidebar.component';
|
||||||
import { SearchSettingsComponent } from './search/search-settings/search-settings.component';
|
import { SearchSettingsComponent } from './search/search-settings/search-settings.component';
|
||||||
import { ItemSearchResultGridElementComponent } from './object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component';
|
|
||||||
import { CollectionSearchResultGridElementComponent } from './object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component';
|
import { CollectionSearchResultGridElementComponent } from './object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component';
|
||||||
import { CommunitySearchResultGridElementComponent } from './object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component';
|
import { CommunitySearchResultGridElementComponent } from './object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component';
|
||||||
import { SearchFiltersComponent } from './search/search-filters/search-filters.component';
|
import { SearchFiltersComponent } from './search/search-filters/search-filters.component';
|
||||||
@@ -166,9 +165,7 @@ import { ListableObjectComponentLoaderComponent } from './object-collection/shar
|
|||||||
import { PublicationSearchResultListElementComponent } from './object-list/search-result-list-element/item-search-result/item-types/publication/publication-search-result-list-element.component';
|
import { PublicationSearchResultListElementComponent } from './object-list/search-result-list-element/item-search-result/item-types/publication/publication-search-result-list-element.component';
|
||||||
import { PublicationSearchResultGridElementComponent } from './object-grid/search-result-grid-element/item-search-result/publication/publication-search-result-grid-element.component';
|
import { PublicationSearchResultGridElementComponent } from './object-grid/search-result-grid-element/item-search-result/publication/publication-search-result-grid-element.component';
|
||||||
import { ListableObjectDirective } from './object-collection/shared/listable-object/listable-object.directive';
|
import { ListableObjectDirective } from './object-collection/shared/listable-object/listable-object.directive';
|
||||||
import { ItemSearchResultListElementComponent } from './object-list/search-result-list-element/item-search-result/item-search-result-list-element.component';
|
import { SearchLabelComponent } from './search/search-labels/search-label/search-label.component';
|
||||||
import { TypedItemSearchResultListElementComponent } from './object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
|
||||||
import { ItemTypeSwitcherComponent } from './items/switcher/item-type-switcher.component';
|
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
||||||
@@ -285,20 +282,17 @@ const COMPONENTS = [
|
|||||||
EditItemSelectorComponent,
|
EditItemSelectorComponent,
|
||||||
CommunitySearchResultListElementComponent,
|
CommunitySearchResultListElementComponent,
|
||||||
CollectionSearchResultListElementComponent,
|
CollectionSearchResultListElementComponent,
|
||||||
ItemSearchResultListElementComponent,
|
|
||||||
TypedItemSearchResultListElementComponent,
|
|
||||||
ItemTypeSwitcherComponent,
|
|
||||||
BrowseByComponent,
|
BrowseByComponent,
|
||||||
SearchResultsComponent,
|
SearchResultsComponent,
|
||||||
SearchSidebarComponent,
|
SearchSidebarComponent,
|
||||||
SearchSettingsComponent,
|
SearchSettingsComponent,
|
||||||
ItemSearchResultGridElementComponent,
|
|
||||||
CollectionSearchResultGridElementComponent,
|
CollectionSearchResultGridElementComponent,
|
||||||
CommunitySearchResultGridElementComponent,
|
CommunitySearchResultGridElementComponent,
|
||||||
SearchFiltersComponent,
|
SearchFiltersComponent,
|
||||||
SearchFilterComponent,
|
SearchFilterComponent,
|
||||||
SearchFacetFilterComponent,
|
SearchFacetFilterComponent,
|
||||||
SearchLabelsComponent,
|
SearchLabelsComponent,
|
||||||
|
SearchLabelComponent,
|
||||||
SearchFacetFilterComponent,
|
SearchFacetFilterComponent,
|
||||||
SearchFacetFilterWrapperComponent,
|
SearchFacetFilterWrapperComponent,
|
||||||
SearchRangeFilterComponent,
|
SearchRangeFilterComponent,
|
||||||
@@ -370,7 +364,6 @@ const ENTRY_COMPONENTS = [
|
|||||||
ItemMetadataListElementComponent,
|
ItemMetadataListElementComponent,
|
||||||
MetadataRepresentationListElementComponent,
|
MetadataRepresentationListElementComponent,
|
||||||
SearchResultsComponent,
|
SearchResultsComponent,
|
||||||
ItemSearchResultGridElementComponent,
|
|
||||||
CollectionSearchResultGridElementComponent,
|
CollectionSearchResultGridElementComponent,
|
||||||
CommunitySearchResultGridElementComponent,
|
CommunitySearchResultGridElementComponent,
|
||||||
SearchFacetFilterComponent,
|
SearchFacetFilterComponent,
|
||||||
|
@@ -6,7 +6,6 @@ import { SearchService } from '../../core/shared/search/search.service';
|
|||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
import { isEmpty } from '../empty.util';
|
import { isEmpty } from '../empty.util';
|
||||||
import { currentPath } from '../utils/route.utils';
|
import { currentPath } from '../utils/route.utils';
|
||||||
import { RouteService } from '../services/route.service';
|
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<ds-metadata-representation-list
|
<ds-metadata-representation-list
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[itemType]="'Person'"
|
[itemType]="'Person'"
|
||||||
[metadataField]="'dc.contributor.author'"
|
[metadataField]="'dc.contributor.author'"
|
||||||
[label]="'relationships.isAuthorOf' | translate">
|
[label]="'relationships.isAuthorOf' | translate">
|
||||||
@@ -63,21 +63,21 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isProjectOfPublication'"
|
[relationType]="'isProjectOfPublication'"
|
||||||
[label]="'relationships.isProjectOf' | translate">
|
[label]="'relationships.isProjectOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isOrgUnitOfPublication'"
|
[relationType]="'isOrgUnitOfPublication'"
|
||||||
[label]="'relationships.isOrgUnitOf' | translate">
|
[label]="'relationships.isOrgUnitOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<ds-related-items
|
<ds-related-items
|
||||||
[parentItem]="item"
|
[parentItem]="object"
|
||||||
[relationType]="'isJournalIssueOfPublication'"
|
[relationType]="'isJournalIssueOfPublication'"
|
||||||
[label]="'relationships.isJournalIssueOf' | translate">
|
[label]="'relationships.isJournalIssueOf' | translate">
|
||||||
</ds-related-items>
|
</ds-related-items>
|
||||||
|
Reference in New Issue
Block a user