mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
add missing imports of Angular lifecycle interfaces
This commit is contained in:
@@ -4,7 +4,10 @@ import {
|
||||
NgForOf,
|
||||
NgIf,
|
||||
} from '@angular/common';
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnDestroy,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
Router,
|
||||
RouterLink,
|
||||
@@ -60,7 +63,7 @@ import { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-sch
|
||||
* A component used for managing all existing metadata schemas within the repository.
|
||||
* The admin can create, edit or delete metadata schemas here.
|
||||
*/
|
||||
export class MetadataRegistryComponent {
|
||||
export class MetadataRegistryComponent implements OnDestroy {
|
||||
|
||||
/**
|
||||
* A list of all the current metadata schemas within the repository
|
||||
|
@@ -4,6 +4,7 @@ import {
|
||||
} from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
@@ -40,7 +41,7 @@ import { FilteredCollections } from './filtered-collections.model';
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class FilteredCollectionsComponent {
|
||||
export class FilteredCollectionsComponent implements OnInit {
|
||||
|
||||
queryForm: FormGroup;
|
||||
results: FilteredCollections = new FilteredCollections();
|
||||
|
@@ -5,6 +5,7 @@ import {
|
||||
} from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
@@ -66,7 +67,7 @@ import { QueryPredicate } from './query-predicate.model';
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class FilteredItemsComponent {
|
||||
export class FilteredItemsComponent implements OnInit {
|
||||
|
||||
collections: OptionVO[];
|
||||
presetQueries: PresetQuery[];
|
||||
@@ -90,7 +91,7 @@ export class FilteredItemsComponent {
|
||||
private formBuilder: FormBuilder,
|
||||
private restService: DspaceRestService) {}
|
||||
|
||||
ngOnInit() {
|
||||
ngOnInit(): void {
|
||||
this.loadCollections();
|
||||
this.loadPresetQueries();
|
||||
this.loadMetadataFields();
|
||||
|
@@ -1,5 +1,8 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Injectable,
|
||||
OnDestroy,
|
||||
} from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Duplicate } from '../../shared/object-list/duplicate-data/duplicate.model';
|
||||
@@ -33,7 +36,8 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
*
|
||||
*/
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SubmissionDuplicateDataService extends BaseDataService<Duplicate> implements SearchData<Duplicate> {
|
||||
export class SubmissionDuplicateDataService extends BaseDataService<Duplicate>
|
||||
implements SearchData<Duplicate>, OnDestroy {
|
||||
|
||||
/**
|
||||
* The ResponseParsingService constructor name
|
||||
|
@@ -7,6 +7,7 @@ import {
|
||||
import {
|
||||
Component,
|
||||
Inject,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -36,7 +37,7 @@ import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbn
|
||||
/**
|
||||
* The component for displaying a list element for an item search result of the type Person
|
||||
*/
|
||||
export class PersonSearchResultListElementComponent extends ItemSearchResultListElementComponent {
|
||||
export class PersonSearchResultListElementComponent extends ItemSearchResultListElementComponent implements OnInit {
|
||||
|
||||
public constructor(
|
||||
protected truncatableService: TruncatableService,
|
||||
|
@@ -10,6 +10,7 @@ import {
|
||||
Component,
|
||||
ElementRef,
|
||||
Inject,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
PLATFORM_ID,
|
||||
} from '@angular/core';
|
||||
@@ -62,7 +63,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
|
||||
standalone: true,
|
||||
imports: [VarDirective, NgIf, NgClass, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
|
||||
})
|
||||
export class RecentItemListComponent implements OnInit {
|
||||
export class RecentItemListComponent implements OnInit, OnDestroy {
|
||||
itemRD$: Observable<RemoteData<PaginatedList<Item>>>;
|
||||
paginationConfig: PaginationComponentOptions;
|
||||
sortConfig: SortOptions;
|
||||
|
@@ -7,6 +7,7 @@ import {
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
@@ -79,7 +80,7 @@ import { ItemOperation } from '../item-operation/itemOperation.model';
|
||||
/**
|
||||
* Component for displaying an item's status
|
||||
*/
|
||||
export class ItemStatusComponent implements OnInit {
|
||||
export class ItemStatusComponent implements OnInit, OnDestroy {
|
||||
|
||||
/**
|
||||
* The item to display the status for
|
||||
|
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
SimpleChanges,
|
||||
@@ -56,7 +57,7 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class OrcidQueueComponent implements OnInit, OnDestroy {
|
||||
export class OrcidQueueComponent implements OnInit, OnDestroy, OnChanges {
|
||||
|
||||
/**
|
||||
* The item for which showing the orcid settings
|
||||
|
@@ -6,6 +6,7 @@ import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
@@ -110,7 +111,7 @@ export interface QualityAssuranceEventData {
|
||||
* Component to display a modal window for linking a project to an Quality Assurance event
|
||||
* Shows information about the selected project and a selectable list.
|
||||
*/
|
||||
export class ProjectEntryImportModalComponent implements OnInit {
|
||||
export class ProjectEntryImportModalComponent implements OnInit, OnDestroy {
|
||||
/**
|
||||
* The external source entry
|
||||
*/
|
||||
|
@@ -5,7 +5,9 @@ import {
|
||||
NgIf,
|
||||
} from '@angular/common';
|
||||
import {
|
||||
AfterViewInit,
|
||||
Component,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
@@ -40,7 +42,7 @@ import { NotificationsStateService } from '../../notifications-state.service';
|
||||
standalone: true,
|
||||
imports: [AlertComponent, NgIf, ThemedLoadingComponent, PaginationComponent, NgFor, RouterLink, AsyncPipe, TranslateModule, DatePipe],
|
||||
})
|
||||
export class QualityAssuranceSourceComponent implements OnInit {
|
||||
export class QualityAssuranceSourceComponent implements OnDestroy, OnInit, AfterViewInit {
|
||||
|
||||
/**
|
||||
* The pagination system configuration for HTML listing.
|
||||
|
@@ -6,6 +6,7 @@ import {
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
@@ -50,7 +51,7 @@ import { SuggestionTargetsStateService } from '../suggestion-targets.state.servi
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class PublicationClaimComponent implements OnInit {
|
||||
export class PublicationClaimComponent implements OnDestroy, OnInit {
|
||||
|
||||
/**
|
||||
* The source for which to list targets
|
||||
|
@@ -3,6 +3,7 @@ import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
@@ -44,7 +45,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
|
||||
* Component for a user to edit their security information
|
||||
* Displays a form containing a password field and a confirmation of the password
|
||||
*/
|
||||
export class ProfilePageSecurityFormComponent implements OnInit {
|
||||
export class ProfilePageSecurityFormComponent implements OnDestroy, OnInit {
|
||||
|
||||
/**
|
||||
* Emits the validity of the password
|
||||
|
@@ -6,11 +6,13 @@ import {
|
||||
NgTemplateOutlet,
|
||||
} from '@angular/common';
|
||||
import {
|
||||
AfterViewInit,
|
||||
ChangeDetectionStrategy,
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
ComponentFactoryResolver,
|
||||
ContentChildren,
|
||||
DoCheck,
|
||||
EventEmitter,
|
||||
Inject,
|
||||
Input,
|
||||
@@ -143,7 +145,8 @@ import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/d
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class DsDynamicFormControlContainerComponent extends DynamicFormControlContainerComponent implements OnInit, OnChanges, OnDestroy {
|
||||
export class DsDynamicFormControlContainerComponent extends DynamicFormControlContainerComponent
|
||||
implements OnInit, OnChanges, OnDestroy, AfterViewInit, DoCheck {
|
||||
@ContentChildren(DynamicTemplateDirective) contentTemplateList: QueryList<DynamicTemplateDirective>;
|
||||
// eslint-disable-next-line @angular-eslint/no-input-rename
|
||||
@Input('templates') inputTemplateList: QueryList<DynamicTemplateDirective>;
|
||||
|
@@ -9,6 +9,7 @@ import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
ViewChild,
|
||||
@@ -92,7 +93,7 @@ import { DynamicOneboxModel } from './dynamic-onebox.model';
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class DsDynamicOneboxComponent extends DsDynamicVocabularyComponent implements OnInit {
|
||||
export class DsDynamicOneboxComponent extends DsDynamicVocabularyComponent implements OnDestroy, OnInit {
|
||||
|
||||
@Input() group: UntypedFormGroup;
|
||||
@Input() model: DynamicOneboxModel;
|
||||
|
@@ -4,6 +4,7 @@ import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnInit,
|
||||
Output,
|
||||
SimpleChanges,
|
||||
@@ -36,7 +37,7 @@ import { isEmpty } from '../../empty.util';
|
||||
standalone: true,
|
||||
})
|
||||
|
||||
export class NumberPickerComponent implements OnInit, ControlValueAccessor {
|
||||
export class NumberPickerComponent implements OnChanges, OnInit, ControlValueAccessor {
|
||||
@Input() id: string;
|
||||
@Input() step: number;
|
||||
@Input() min: number;
|
||||
|
@@ -4,7 +4,10 @@ import {
|
||||
NgFor,
|
||||
NgIf,
|
||||
} from '@angular/common';
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
|
||||
import { Item } from '../../../../../../core/shared/item.model';
|
||||
@@ -30,7 +33,7 @@ import { SearchResultListElementComponent } from '../../../search-result-list-el
|
||||
/**
|
||||
* The component for displaying a list element for an item search result of the type Publication
|
||||
*/
|
||||
export class ItemSearchResultListElementComponent extends SearchResultListElementComponent<ItemSearchResult, Item> {
|
||||
export class ItemSearchResultListElementComponent extends SearchResultListElementComponent<ItemSearchResult, Item> implements OnInit {
|
||||
/**
|
||||
* Route to the item's page
|
||||
*/
|
||||
|
@@ -5,6 +5,7 @@ import {
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
SimpleChanges,
|
||||
@@ -58,7 +59,7 @@ import { SubmissionService } from '../../submission.service';
|
||||
ThemedCollectionDropdownComponent,
|
||||
],
|
||||
})
|
||||
export class SubmissionFormCollectionComponent implements OnChanges, OnInit {
|
||||
export class SubmissionFormCollectionComponent implements OnDestroy, OnChanges, OnInit {
|
||||
|
||||
/**
|
||||
* The current collection id this submission belonging to
|
||||
|
@@ -3,6 +3,7 @@ import {
|
||||
Component,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnDestroy,
|
||||
} from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
@@ -43,7 +44,7 @@ import parseSectionErrors from '../../utils/parseSectionErrors';
|
||||
],
|
||||
standalone: true,
|
||||
})
|
||||
export class SubmissionUploadFilesComponent implements OnChanges {
|
||||
export class SubmissionUploadFilesComponent implements OnChanges, OnDestroy {
|
||||
|
||||
/**
|
||||
* The collection id this submission belonging to
|
||||
|
@@ -7,6 +7,7 @@ import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Inject,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
TranslateModule,
|
||||
@@ -48,7 +49,7 @@ import { SectionsService } from '../sections.service';
|
||||
standalone: true,
|
||||
})
|
||||
|
||||
export class SubmissionSectionDuplicatesComponent extends SectionModelComponent {
|
||||
export class SubmissionSectionDuplicatesComponent extends SectionModelComponent implements OnInit {
|
||||
protected readonly Metadata = Metadata;
|
||||
/**
|
||||
* The Alert categories.
|
||||
|
Reference in New Issue
Block a user