diff --git a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.html b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.html index c716aedb8b..df43878192 100644 --- a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.html +++ b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.html @@ -36,7 +36,6 @@ diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html index 228449a8a5..9297edb016 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html @@ -47,7 +47,6 @@ @@ -103,7 +102,6 @@ diff --git a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.html b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.html index d009f0283e..a4b5f4c680 100644 --- a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.html +++ b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.html @@ -35,7 +35,6 @@ @@ -94,7 +93,6 @@ diff --git a/src/app/access-control/group-registry/groups-registry.component.html b/src/app/access-control/group-registry/groups-registry.component.html index 828aadc95a..401b50fe9d 100644 --- a/src/app/access-control/group-registry/groups-registry.component.html +++ b/src/app/access-control/group-registry/groups-registry.component.html @@ -37,7 +37,6 @@ diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.html b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.html index 0a2e9f0f92..0dae271dbb 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.html +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.html @@ -11,7 +11,6 @@ diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html index 557741df80..35fffec5fc 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html +++ b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html @@ -16,7 +16,6 @@ diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html index f54aa73597..a31ab95348 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html @@ -3,7 +3,6 @@ [hidePagerWhenSinglePage]="true" [hidePaginationDetail]="true" [paginationOptions]="options" - [pageInfoState]="(objectsRD$ | async)?.payload" [collectionSize]="(objectsRD$ | async)?.payload?.totalElements">
diff --git a/src/app/item-page/full/field-components/file-section/full-file-section.component.html b/src/app/item-page/full/field-components/file-section/full-file-section.component.html index 8b8603011d..88fc68f876 100644 --- a/src/app/item-page/full/field-components/file-section/full-file-section.component.html +++ b/src/app/item-page/full/field-components/file-section/full-file-section.component.html @@ -6,7 +6,6 @@ [hideGear]="true" [hidePagerWhenSinglePage]="true" [paginationOptions]="originalOptions" - [pageInfoState]="originals" [collectionSize]="originals?.totalElements" [retainScrollPosition]="true"> @@ -49,7 +48,6 @@ [hideGear]="true" [hidePagerWhenSinglePage]="true" [paginationOptions]="licenseOptions" - [pageInfoState]="licenses" [collectionSize]="licenses?.totalElements" [retainScrollPosition]="true"> diff --git a/src/app/item-page/versions/item-versions.component.html b/src/app/item-page/versions/item-versions.component.html index 176c1f0cde..f9e354a498 100644 --- a/src/app/item-page/versions/item-versions.component.html +++ b/src/app/item-page/versions/item-versions.component.html @@ -10,7 +10,6 @@ [hideGear]="true" [hidePagerWhenSinglePage]="true" [paginationOptions]="options" - [pageInfoState]="versions" [collectionSize]="versions?.totalElements" [retainScrollPosition]="true"> diff --git a/src/app/process-page/overview/process-overview.component.html b/src/app/process-page/overview/process-overview.component.html index 5bf5fee79f..e17ac51892 100644 --- a/src/app/process-page/overview/process-overview.component.html +++ b/src/app/process-page/overview/process-overview.component.html @@ -17,7 +17,6 @@ diff --git a/src/app/shared/object-detail/object-detail.component.html b/src/app/shared/object-detail/object-detail.component.html index d077e2fd2b..98034ca621 100644 --- a/src/app/shared/object-detail/object-detail.component.html +++ b/src/app/shared/object-detail/object-detail.component.html @@ -1,6 +1,5 @@ diff --git a/src/app/shared/object-select/item-select/item-select.component.html b/src/app/shared/object-select/item-select/item-select.component.html index 7f8ff943a3..110434969a 100644 --- a/src/app/shared/object-select/item-select/item-select.component.html +++ b/src/app/shared/object-select/item-select/item-select.component.html @@ -3,7 +3,6 @@ *ngIf="itemsRD?.payload?.totalElements > 0" [paginationOptions]="paginationOptions" [sortOptions]="sortOptions" - [pageInfoState]="itemsRD?.payload" [collectionSize]="itemsRD?.payload?.totalElements" [hidePagerWhenSinglePage]="true" [hideGear]="true"> diff --git a/src/app/shared/pagination/pagination.component.ts b/src/app/shared/pagination/pagination.component.ts index 6da813cbc7..7aa55458b0 100644 --- a/src/app/shared/pagination/pagination.component.ts +++ b/src/app/shared/pagination/pagination.component.ts @@ -13,11 +13,9 @@ import { import { Observable, of as observableOf, Subscription } from 'rxjs'; import { HostWindowService } from '../host-window.service'; -import { HostWindowState } from '../search/host-window.reducer'; import { PaginationComponentOptions } from './pagination-component-options.model'; import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; import { hasValue } from '../empty.util'; -import { PageInfo } from '../../core/shared/page-info.model'; import { PaginationService } from '../../core/pagination/pagination.service'; import { map, take } from 'rxjs/operators'; import { RemoteData } from '../../core/data/remote-data'; @@ -47,11 +45,6 @@ export class PaginationComponent implements OnDestroy, OnInit { */ @Input() collectionSize: number; - /** - * Page state of a Remote paginated objects. - */ - @Input() pageInfoState: Observable = undefined; - /** * Configuration for the NgbPagination component. */ @@ -136,18 +129,13 @@ export class PaginationComponent implements OnDestroy, OnInit { /** * Current page. */ - public currentPage$; + public currentPage$: Observable; /** * Current page in the state of a Remote paginated objects. */ public currentPageState: number = undefined; - /** - * An observable of HostWindowState type - */ - public hostWindow: Observable; - /** * ID for the pagination instance. This ID is used in the routing to retrieve the pagination options. * This ID needs to be unique between different pagination components when more than one will be displayed on the same page. @@ -162,7 +150,7 @@ export class PaginationComponent implements OnDestroy, OnInit { /** * Number of items per page. */ - public pageSize$; + public pageSize$: Observable; /** * Declare SortDirection enumeration to use it in the template @@ -183,7 +171,7 @@ export class PaginationComponent implements OnDestroy, OnInit { /** * Name of the field that's used to sort by */ - public sortField$; + public sortField$: Observable; public defaultSortField = 'name'; /** @@ -237,7 +225,7 @@ export class PaginationComponent implements OnDestroy, OnInit { map((currentPagination) => currentPagination.pageSize) ); - let sortOptions; + let sortOptions: SortOptions; if (this.sortOptions) { sortOptions = this.sortOptions; } else { @@ -251,16 +239,6 @@ export class PaginationComponent implements OnDestroy, OnInit { ); } - /** - * @param cdRef - * ChangeDetectorRef is a singleton service provided by Angular. - * @param route - * Route is a singleton service provided by Angular. - * @param router - * Router is a singleton service provided by Angular. - * @param hostWindowService - * the HostWindowService singleton. - */ constructor(private cdRef: ChangeDetectorRef, private paginationService: PaginationService, public hostWindowService: HostWindowService) { @@ -299,17 +277,6 @@ export class PaginationComponent implements OnDestroy, OnInit { this.emitPaginationChange(); } - /** - * Method to change the route to the given sort field - * - * @param sortField - * The sort field being navigated to. - */ - public doSortFieldChange(field: string) { - this.updateParams({ pageId: this.id, page: 1, sortField: field }); - this.emitPaginationChange(); - } - /** * Method to emit a general pagination change event */ @@ -333,8 +300,8 @@ export class PaginationComponent implements OnDestroy, OnInit { if (collectionSize) { showingDetails = this.paginationService.getCurrentPagination(this.id, this.paginationOptions).pipe( map((currentPaginationOptions) => { - let firstItem; - let lastItem; + let firstItem: number; + let lastItem: number; const pageMax = currentPaginationOptions.pageSize * currentPaginationOptions.currentPage; firstItem = currentPaginationOptions.pageSize * (currentPaginationOptions.currentPage - 1) + 1;