Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pagination issues on item mapper #2642

Prev Previous commit
Merge remote-tracking branch 'upstream/main' into fix-broken-item-map…
…per-pagination_contribute-main

# Conflicts:
#	src/app/shared/object-list/object-list.component.html
#	src/app/shared/object-select/collection-select/collection-select.component.ts
#	src/app/shared/object-select/item-select/item-select.component.ts
#	src/app/shared/pagination/pagination.component.ts
alexandrevryghem committed Apr 18, 2024
commit a5f49babace347e07bae435145e5726041761dbf
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@ import {
SortDirection,
SortOptions,
} from '../../core/cache/models/sort-options.model';
import { CollectionDataService } from '../../core/data/collection-data.service';
import { ConfigurationDataService } from '../../core/data/configuration-data.service';
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
import { ItemDataService } from '../../core/data/item-data.service';
@@ -39,6 +38,7 @@ import { SEARCH_CONFIG_SERVICE } from '../../my-dspace-page/my-dspace-configurat
import { ErrorComponent } from '../../shared/error/error.component';
import { HostWindowService } from '../../shared/host-window.service';
import { LoadingComponent } from '../../shared/loading/loading.component';
import { getMockThemeService } from '../../shared/mocks/theme-service.mock';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { ItemSelectComponent } from '../../shared/object-select/item-select/item-select.component';
import { ObjectSelectService } from '../../shared/object-select/object-select.service';
@@ -58,6 +58,7 @@ import { RouterStub } from '../../shared/testing/router.stub';
import { SearchConfigurationServiceStub } from '../../shared/testing/search-configuration-service.stub';
import { SearchServiceStub } from '../../shared/testing/search-service.stub';
import { createPaginatedList } from '../../shared/testing/utils.test';
import { ThemeService } from '../../shared/theme-support/theme.service';
import { EnumKeysPipe } from '../../shared/utils/enum-keys-pipe';
import { VarDirective } from '../../shared/utils/var.directive';
import { CollectionItemMapperComponent } from './collection-item-mapper.component';
@@ -190,7 +191,6 @@ describe('CollectionItemMapperComponent', () => {
{ provide: SearchService, useValue: searchServiceStub },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
{ provide: ItemDataService, useValue: itemDataServiceStub },
{ provide: CollectionDataService, useValue: collectionDataServiceStub },
{ provide: TranslateService, useValue: translateServiceStub },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: ObjectSelectService, useValue: new ObjectSelectServiceStub() },
@@ -199,6 +199,7 @@ describe('CollectionItemMapperComponent', () => {
{ provide: GroupDataService, useValue: groupDataService },
{ provide: LinkHeadService, useValue: linkHeadService },
{ provide: ConfigurationDataService, useValue: configurationDataService },
{ provide: ThemeService, useValue: getMockThemeService() },
],
}).overrideComponent(CollectionItemMapperComponent, {
set: {
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ import {
SortDirection,
SortOptions,
} from '../../core/cache/models/sort-options.model';
import { CollectionDataService } from '../../core/data/collection-data.service';
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
import { ItemDataService } from '../../core/data/item-data.service';
import { PaginatedList } from '../../core/data/paginated-list.model';
@@ -150,7 +149,6 @@ export class CollectionItemMapperComponent implements OnInit {
private searchService: SearchService,
private notificationsService: NotificationsService,
private itemDataService: ItemDataService,
private collectionDataService: CollectionDataService,
private translateService: TranslateService,
private dsoNameService: DSONameService) {
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import {
AsyncPipe,
NgClass,
NgFor,
NgIf,
} from '@angular/common';
import {
Component,
OnInit,
} from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { FormsModule } from '@angular/forms';
import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import {
map,
Observable,
} from 'rxjs';

import { getCollectionPageRoute } from '../../../collection-page/collection-page-routing-paths';
import { PaginatedList } from '../../../core/data/paginated-list.model';
@@ -13,6 +24,10 @@ import {
hasValueOperator,
isNotEmpty,
} from '../../empty.util';
import { ErrorComponent } from '../../error/error.component';
import { ThemedLoadingComponent } from '../../loading/themed-loading.component';
import { PaginationComponent } from '../../pagination/pagination.component';
import { VarDirective } from '../../utils/var.directive';
import { DSpaceObjectSelect } from '../object-select.model';
import { ObjectSelectComponent } from '../object-select/object-select.component';

Original file line number Diff line number Diff line change
@@ -23,6 +23,10 @@ import {
hasValueOperator,
isNotEmpty,
} from '../../empty.util';
import { ErrorComponent } from '../../error/error.component';
import { ThemedLoadingComponent } from '../../loading/themed-loading.component';
import { PaginationComponent } from '../../pagination/pagination.component';
import { VarDirective } from '../../utils/var.directive';
import { DSpaceObjectSelect } from '../object-select.model';
import { ObjectSelectComponent } from '../object-select/object-select.component';

2 changes: 2 additions & 0 deletions src/app/shared/pagination/pagination.component.ts
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ import { ViewMode } from '../../core/shared/view-mode.model';
import { hasValue } from '../empty.util';
import { HostWindowService } from '../host-window.service';
import { ListableObject } from '../object-collection/shared/listable-object.model';
import { RSSComponent } from '../rss-feed/rss.component';
import { EnumKeysPipe } from '../utils/enum-keys-pipe';
import { PaginationComponentOptions } from './pagination-component-options.model';

/**
You are viewing a condensed version of this merge commit. You can view the full changes here.