Skip to content

Commit 2d9ad8e

Browse files
committed
add missing imports of Angular lifecycle interfaces
1 parent 3cedeff commit 2d9ad8e

19 files changed

Lines changed: 52 additions & 23 deletions

File tree

src/app/admin/admin-registries/metadata-registry/metadata-registry.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import {
44
NgForOf,
55
NgIf,
66
} from '@angular/common';
7-
import { Component } from '@angular/core';
7+
import {
8+
Component,
9+
OnDestroy,
10+
} from '@angular/core';
811
import {
912
Router,
1013
RouterLink,
@@ -60,7 +63,7 @@ import { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-sch
6063
* A component used for managing all existing metadata schemas within the repository.
6164
* The admin can create, edit or delete metadata schemas here.
6265
*/
63-
export class MetadataRegistryComponent {
66+
export class MetadataRegistryComponent implements OnDestroy {
6467

6568
/**
6669
* A list of all the current metadata schemas within the repository

src/app/admin/admin-reports/filtered-collections/filtered-collections.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
} from '@angular/common';
55
import {
66
Component,
7+
OnInit,
78
ViewChild,
89
} from '@angular/core';
910
import {
@@ -40,7 +41,7 @@ import { FilteredCollections } from './filtered-collections.model';
4041
],
4142
standalone: true,
4243
})
43-
export class FilteredCollectionsComponent {
44+
export class FilteredCollectionsComponent implements OnInit {
4445

4546
queryForm: FormGroup;
4647
results: FilteredCollections = new FilteredCollections();

src/app/admin/admin-reports/filtered-items/filtered-items.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
} from '@angular/common';
66
import {
77
Component,
8+
OnInit,
89
ViewChild,
910
} from '@angular/core';
1011
import {
@@ -66,7 +67,7 @@ import { QueryPredicate } from './query-predicate.model';
6667
],
6768
standalone: true,
6869
})
69-
export class FilteredItemsComponent {
70+
export class FilteredItemsComponent implements OnInit {
7071

7172
collections: OptionVO[];
7273
presetQueries: PresetQuery[];
@@ -90,7 +91,7 @@ export class FilteredItemsComponent {
9091
private formBuilder: FormBuilder,
9192
private restService: DspaceRestService) {}
9293

93-
ngOnInit() {
94+
ngOnInit(): void {
9495
this.loadCollections();
9596
this.loadPresetQueries();
9697
this.loadMetadataFields();

src/app/core/submission/submission-duplicate-data.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* eslint-disable max-classes-per-file */
2-
import { Injectable } from '@angular/core';
2+
import {
3+
Injectable,
4+
OnDestroy,
5+
} from '@angular/core';
36
import { Observable } from 'rxjs';
47

58
import { Duplicate } from '../../shared/object-list/duplicate-data/duplicate.model';
@@ -33,7 +36,8 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
3336
*
3437
*/
3538
@Injectable({ providedIn: 'root' })
36-
export class SubmissionDuplicateDataService extends BaseDataService<Duplicate> implements SearchData<Duplicate> {
39+
export class SubmissionDuplicateDataService extends BaseDataService<Duplicate>
40+
implements SearchData<Duplicate>, OnDestroy {
3741

3842
/**
3943
* The ResponseParsingService constructor name

src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import {
88
Component,
99
Inject,
10+
OnInit,
1011
} from '@angular/core';
1112
import { RouterLink } from '@angular/router';
1213
import { TranslateModule } from '@ngx-translate/core';
@@ -36,7 +37,7 @@ import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbn
3637
/**
3738
* The component for displaying a list element for an item search result of the type Person
3839
*/
39-
export class PersonSearchResultListElementComponent extends ItemSearchResultListElementComponent {
40+
export class PersonSearchResultListElementComponent extends ItemSearchResultListElementComponent implements OnInit {
4041

4142
public constructor(
4243
protected truncatableService: TruncatableService,

src/app/home-page/recent-item-list/recent-item-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
Component,
1111
ElementRef,
1212
Inject,
13+
OnDestroy,
1314
OnInit,
1415
PLATFORM_ID,
1516
} from '@angular/core';
@@ -62,7 +63,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
6263
standalone: true,
6364
imports: [VarDirective, NgIf, NgClass, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
6465
})
65-
export class RecentItemListComponent implements OnInit {
66+
export class RecentItemListComponent implements OnInit, OnDestroy {
6667
itemRD$: Observable<RemoteData<PaginatedList<Item>>>;
6768
paginationConfig: PaginationComponentOptions;
6869
sortConfig: SortOptions;

src/app/item-page/edit-item-page/item-status/item-status.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import {
88
ChangeDetectionStrategy,
99
Component,
10+
OnDestroy,
1011
OnInit,
1112
} from '@angular/core';
1213
import {
@@ -79,7 +80,7 @@ import { ItemOperation } from '../item-operation/itemOperation.model';
7980
/**
8081
* Component for displaying an item's status
8182
*/
82-
export class ItemStatusComponent implements OnInit {
83+
export class ItemStatusComponent implements OnInit, OnDestroy {
8384

8485
/**
8586
* The item to display the status for

src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
22
import {
33
Component,
44
Input,
5+
OnChanges,
56
OnDestroy,
67
OnInit,
78
SimpleChanges,
@@ -56,7 +57,7 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
5657
],
5758
standalone: true,
5859
})
59-
export class OrcidQueueComponent implements OnInit, OnDestroy {
60+
export class OrcidQueueComponent implements OnInit, OnDestroy, OnChanges {
6061

6162
/**
6263
* The item for which showing the orcid settings

src/app/notifications/qa/project-entry-import-modal/project-entry-import-modal.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Component,
77
EventEmitter,
88
Input,
9+
OnDestroy,
910
OnInit,
1011
} from '@angular/core';
1112
import { FormsModule } from '@angular/forms';
@@ -110,7 +111,7 @@ export interface QualityAssuranceEventData {
110111
* Component to display a modal window for linking a project to an Quality Assurance event
111112
* Shows information about the selected project and a selectable list.
112113
*/
113-
export class ProjectEntryImportModalComponent implements OnInit {
114+
export class ProjectEntryImportModalComponent implements OnInit, OnDestroy {
114115
/**
115116
* The external source entry
116117
*/

src/app/notifications/qa/source/quality-assurance-source.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import {
55
NgIf,
66
} from '@angular/common';
77
import {
8+
AfterViewInit,
89
Component,
10+
OnDestroy,
911
OnInit,
1012
} from '@angular/core';
1113
import { RouterLink } from '@angular/router';
@@ -40,7 +42,7 @@ import { NotificationsStateService } from '../../notifications-state.service';
4042
standalone: true,
4143
imports: [AlertComponent, NgIf, ThemedLoadingComponent, PaginationComponent, NgFor, RouterLink, AsyncPipe, TranslateModule, DatePipe],
4244
})
43-
export class QualityAssuranceSourceComponent implements OnInit {
45+
export class QualityAssuranceSourceComponent implements OnDestroy, OnInit, AfterViewInit {
4446

4547
/**
4648
* The pagination system configuration for HTML listing.

0 commit comments

Comments
 (0)