added missing interfaces

This commit is contained in:
Sascha Szott
2024-03-20 11:39:17 +01:00
parent f59510d27e
commit 96748b9bac
31 changed files with 126 additions and 67 deletions

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { getCollectionEditRoute } from '../../../../../collection-page/collection-page-routing-paths'; import { getCollectionEditRoute } from '../../../../../collection-page/collection-page-routing-paths';
@@ -21,10 +24,10 @@ import { SearchResultGridElementComponent } from '../../../../../shared/object-g
/** /**
* The component for displaying a list element for a collection search result on the admin search page * The component for displaying a list element for a collection search result on the admin search page
*/ */
export class CollectionAdminSearchResultGridElementComponent extends SearchResultGridElementComponent<CollectionSearchResult, Collection> { export class CollectionAdminSearchResultGridElementComponent extends SearchResultGridElementComponent<CollectionSearchResult, Collection> implements OnInit {
editPath: string; editPath: string;
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.editPath = getCollectionEditRoute(this.dso.uuid); this.editPath = getCollectionEditRoute(this.dso.uuid);
} }

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { getCommunityEditRoute } from '../../../../../community-page/community-page-routing-paths'; import { getCommunityEditRoute } from '../../../../../community-page/community-page-routing-paths';
@@ -21,10 +24,10 @@ import { SearchResultGridElementComponent } from '../../../../../shared/object-g
/** /**
* The component for displaying a list element for a community search result on the admin search page * The component for displaying a list element for a community search result on the admin search page
*/ */
export class CommunityAdminSearchResultGridElementComponent extends SearchResultGridElementComponent<CommunitySearchResult, Community> { export class CommunityAdminSearchResultGridElementComponent extends SearchResultGridElementComponent<CommunitySearchResult, Community> implements OnInit {
editPath: string; editPath: string;
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.editPath = getCommunityEditRoute(this.dso.uuid); this.editPath = getCommunityEditRoute(this.dso.uuid);
} }

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
@@ -22,10 +25,10 @@ import { SearchResultListElementComponent } from '../../../../../shared/object-l
/** /**
* The component for displaying a list element for a collection search result on the admin search page * The component for displaying a list element for a collection search result on the admin search page
*/ */
export class CollectionAdminSearchResultListElementComponent extends SearchResultListElementComponent<CollectionSearchResult, Collection> { export class CollectionAdminSearchResultListElementComponent extends SearchResultListElementComponent<CollectionSearchResult, Collection> implements OnInit {
editPath: string; editPath: string;
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.editPath = getCollectionEditRoute(this.dso.uuid); this.editPath = getCollectionEditRoute(this.dso.uuid);
} }

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
@@ -22,10 +25,10 @@ import { SearchResultListElementComponent } from '../../../../../shared/object-l
/** /**
* The component for displaying a list element for a community search result on the admin search page * The component for displaying a list element for a community search result on the admin search page
*/ */
export class CommunityAdminSearchResultListElementComponent extends SearchResultListElementComponent<CommunitySearchResult, Community> { export class CommunityAdminSearchResultListElementComponent extends SearchResultListElementComponent<CommunitySearchResult, Community> implements OnInit {
editPath: string; editPath: string;
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.editPath = getCommunityEditRoute(this.dso.uuid); this.editPath = getCommunityEditRoute(this.dso.uuid);
} }

View File

@@ -1,5 +1,8 @@
import { AsyncPipe } from '@angular/common'; import { AsyncPipe } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@@ -28,7 +31,7 @@ import { hasValue } from '../../../shared/empty.util';
], ],
standalone: true, standalone: true,
}) })
export class CollectionCurateComponent { export class CollectionCurateComponent implements OnInit {
dsoRD$: Observable<RemoteData<Collection>>; dsoRD$: Observable<RemoteData<Collection>>;
collectionName$: Observable<string>; collectionName$: Observable<string>;

View File

@@ -95,7 +95,7 @@ export class CollectionSourceControlsComponent implements OnInit, OnDestroy {
) { ) {
} }
ngOnInit() { ngOnInit(): void {
// ensure the contentSource gets updated after being set to stale // ensure the contentSource gets updated after being set to stale
this.contentSource$ = this.collectionService.findByHref(this.collection._links.self.href, false).pipe( this.contentSource$ = this.collectionService.findByHref(this.collection._links.self.href, false).pipe(
getAllSucceededRemoteDataPayload(), getAllSucceededRemoteDataPayload(),

View File

@@ -2,7 +2,10 @@ import {
AsyncPipe, AsyncPipe,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { import {
ActivatedRoute, ActivatedRoute,
Router, Router,
@@ -45,7 +48,7 @@ import { BrowserOnlyPipe } from '../../shared/utils/browser-only.pipe';
/** /**
* Component for a user to enter a new password for a forgot token. * Component for a user to enter a new password for a forgot token.
*/ */
export class ForgotPasswordFormComponent { export class ForgotPasswordFormComponent implements OnInit {
registration$: Observable<Registration>; registration$: Observable<Registration>;

View File

@@ -3,7 +3,10 @@ import {
NgForOf, NgForOf,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { import {
ActivatedRoute, ActivatedRoute,
Router, Router,
@@ -47,7 +50,7 @@ import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstrac
/** /**
* Component responsible for rendering the Item Register DOI page * Component responsible for rendering the Item Register DOI page
*/ */
export class ItemRegisterDoiComponent extends AbstractSimpleItemActionComponent { export class ItemRegisterDoiComponent extends AbstractSimpleItemActionComponent implements OnInit {
protected messageKey = 'register-doi'; protected messageKey = 'register-doi';
doiToUpdateMessage = 'item.edit.' + this.messageKey + '.to-update'; doiToUpdateMessage = 'item.edit.' + this.messageKey + '.to-update';

View File

@@ -2,7 +2,10 @@ import {
AsyncPipe, AsyncPipe,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@@ -28,7 +31,7 @@ import { ItemVersionsComponent } from '../../versions/item-versions.component';
/** /**
* Component for listing and managing an item's version history * Component for listing and managing an item's version history
*/ */
export class ItemVersionHistoryComponent { export class ItemVersionHistoryComponent implements OnInit {
/** /**
* The item to display the version history for * The item to display the version history for
*/ */

View File

@@ -10,6 +10,7 @@ import {
ElementRef, ElementRef,
Inject, Inject,
Input, Input,
OnInit,
PLATFORM_ID, PLATFORM_ID,
} from '@angular/core'; } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
@@ -43,7 +44,7 @@ import { AbstractIncrementalListComponent } from '../abstract-incremental-list/a
* This component is used for displaying relations between items * This component is used for displaying relations between items
* It expects a parent item and relationship type, as well as a label to display on top * It expects a parent item and relationship type, as well as a label to display on top
*/ */
export class RelatedItemsComponent extends AbstractIncrementalListComponent<Observable<RemoteData<PaginatedList<Item>>>> { export class RelatedItemsComponent extends AbstractIncrementalListComponent<Observable<RemoteData<PaginatedList<Item>>>> implements OnInit {
/** /**
* The parent of the list of related items to display * The parent of the list of related items to display

View File

@@ -2,6 +2,7 @@ import { NgIf } from '@angular/common';
import { import {
Component, Component,
Input, Input,
OnInit,
Optional, Optional,
} from '@angular/core'; } from '@angular/core';
import { import {
@@ -27,7 +28,7 @@ import { ValueInputComponent } from '../value-input.component';
standalone: true, standalone: true,
imports: [FormsModule, NgIf, TranslateModule], imports: [FormsModule, NgIf, TranslateModule],
}) })
export class DateValueInputComponent extends ValueInputComponent<string> { export class DateValueInputComponent extends ValueInputComponent<string> implements OnInit {
/** /**
* The current value of the date string * The current value of the date string
*/ */
@@ -38,7 +39,7 @@ export class DateValueInputComponent extends ValueInputComponent<string> {
*/ */
@Input() initialValue; @Input() initialValue;
ngOnInit() { ngOnInit(): void {
this.value = this.initialValue; this.value = this.initialValue;
} }

View File

@@ -2,6 +2,7 @@ import { NgIf } from '@angular/common';
import { import {
Component, Component,
Input, Input,
OnInit,
Optional, Optional,
} from '@angular/core'; } from '@angular/core';
import { import {
@@ -27,7 +28,7 @@ import { ValueInputComponent } from '../value-input.component';
standalone: true, standalone: true,
imports: [FormsModule, NgIf, TranslateModule], imports: [FormsModule, NgIf, TranslateModule],
}) })
export class StringValueInputComponent extends ValueInputComponent<string> { export class StringValueInputComponent extends ValueInputComponent<string> implements OnInit {
/** /**
* The current value of the string * The current value of the string
*/ */
@@ -38,7 +39,7 @@ export class StringValueInputComponent extends ValueInputComponent<string> {
*/ */
@Input() initialValue; @Input() initialValue;
ngOnInit() { ngOnInit(): void {
this.value = this.initialValue; this.value = this.initialValue;
} }

View File

@@ -7,6 +7,7 @@ import {
EventEmitter, EventEmitter,
Input, Input,
OnChanges, OnChanges,
OnInit,
Optional, Optional,
Output, Output,
SimpleChanges, SimpleChanges,
@@ -39,7 +40,7 @@ import { ParameterSelectComponent } from './parameter-select/parameter-select.co
standalone: true, standalone: true,
imports: [NgIf, NgFor, ParameterSelectComponent, TranslateModule], imports: [NgIf, NgFor, ParameterSelectComponent, TranslateModule],
}) })
export class ProcessParametersComponent implements OnChanges { export class ProcessParametersComponent implements OnChanges, OnInit {
/** /**
* The currently selected script * The currently selected script
*/ */
@@ -59,7 +60,7 @@ export class ProcessParametersComponent implements OnChanges {
*/ */
parameterValues: ProcessParameter[]; parameterValues: ProcessParameter[];
ngOnInit() { ngOnInit(): void {
if (hasValue(this.initialParams)) { if (hasValue(this.initialParams)) {
this.parameterValues = this.initialParams; this.parameterValues = this.initialParams;
} }

View File

@@ -8,6 +8,7 @@ import {
Component, Component,
Inject, Inject,
Injector, Injector,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { import {
@@ -34,7 +35,7 @@ import { MenuService } from '../../../menu/menu.service';
standalone: true, standalone: true,
imports: [NgbDropdownModule, NgbTooltipModule, NgFor, NgIf, NgComponentOutlet, TranslateModule, AsyncPipe], imports: [NgbDropdownModule, NgbTooltipModule, NgFor, NgIf, NgComponentOutlet, TranslateModule, AsyncPipe],
}) })
export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent { export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent implements OnInit {
menuID: MenuID = MenuID.DSO_EDIT; menuID: MenuID = MenuID.DSO_EDIT;
itemModel; itemModel;

View File

@@ -1,6 +1,8 @@
import { import {
Component, Component,
Input, Input,
OnDestroy,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
@@ -15,7 +17,7 @@ import { AlertType } from '../alert/alert-type';
standalone: true, standalone: true,
imports: [AlertComponent], imports: [AlertComponent],
}) })
export class ErrorComponent { export class ErrorComponent implements OnDestroy, OnInit {
@Input() message = 'Error...'; @Input() message = 'Error...';
@@ -31,7 +33,7 @@ export class ErrorComponent {
} }
ngOnInit() { ngOnInit(): void {
if (this.message === undefined) { if (this.message === undefined) {
this.subscription = this.translate.get('error.default').subscribe((message: string) => { this.subscription = this.translate.get('error.default').subscribe((message: string) => {
this.message = message; this.message = message;
@@ -39,7 +41,7 @@ export class ErrorComponent {
} }
} }
ngOnDestroy() { ngOnDestroy(): void {
if (this.subscription !== undefined) { if (this.subscription !== undefined) {
this.subscription.unsubscribe(); this.subscription.unsubscribe();
} }

View File

@@ -6,6 +6,7 @@ import {
Component, Component,
EventEmitter, EventEmitter,
Input, Input,
OnInit,
Output, Output,
} from '@angular/core'; } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@@ -57,7 +58,7 @@ import { PaginatedSearchOptions } from '../../../../../search/models/paginated-s
/** /**
* Tab for inside the lookup model that represents the currently selected relationships * Tab for inside the lookup model that represents the currently selected relationships
*/ */
export class DsDynamicLookupRelationSelectionTabComponent { export class DsDynamicLookupRelationSelectionTabComponent implements OnInit {
/** /**
* A string that describes the type of relationship * A string that describes the type of relationship
*/ */
@@ -120,7 +121,7 @@ export class DsDynamicLookupRelationSelectionTabComponent {
/** /**
* Set up the selection and pagination on load * Set up the selection and pagination on load
*/ */
ngOnInit() { ngOnInit(): void {
this.resetRoute(); this.resetRoute();
this.selectionRD$ = this.searchConfigService.paginatedSearchOptions this.selectionRD$ = this.searchConfigService.paginatedSearchOptions
.pipe( .pipe(

View File

@@ -5,6 +5,8 @@ import {
import { import {
Component, Component,
Input, Input,
OnDestroy,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { import {
@@ -35,7 +37,7 @@ import { AccessStatusObject } from './access-status.model';
/** /**
* Component rendering the access status of an item as a badge * Component rendering the access status of an item as a badge
*/ */
export class AccessStatusBadgeComponent { export class AccessStatusBadgeComponent implements OnDestroy, OnInit {
@Input() object: DSpaceObject; @Input() object: DSpaceObject;
accessStatus$: Observable<string>; accessStatus$: Observable<string>;

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { find } from 'rxjs/operators'; import { find } from 'rxjs/operators';
import { Context } from 'src/app/core/shared/context.model'; import { Context } from 'src/app/core/shared/context.model';
@@ -29,7 +32,7 @@ import { SearchResultDetailElementComponent } from '../search-result-detail-elem
}) })
@listableObjectComponent(WorkflowItemSearchResult, ViewMode.DetailedListElement) @listableObjectComponent(WorkflowItemSearchResult, ViewMode.DetailedListElement)
export class WorkflowItemSearchResultDetailElementComponent extends SearchResultDetailElementComponent<WorkflowItemSearchResult, WorkflowItem> { export class WorkflowItemSearchResultDetailElementComponent extends SearchResultDetailElementComponent<WorkflowItemSearchResult, WorkflowItem> implements OnInit {
/** /**
* The item object that belonging to the result object * The item object that belonging to the result object
@@ -51,7 +54,7 @@ export class WorkflowItemSearchResultDetailElementComponent extends SearchResult
/** /**
* Initialize all instance variables * Initialize all instance variables
*/ */
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.linkService.resolveLink(this.dso, followLink('item')); this.linkService.resolveLink(this.dso, followLink('item'));
this.initItem(this.dso.item as Observable<RemoteData<Item>>); this.initItem(this.dso.item as Observable<RemoteData<Item>>);

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { find } from 'rxjs/operators'; import { find } from 'rxjs/operators';
@@ -29,7 +32,7 @@ import { SearchResultDetailElementComponent } from '../search-result-detail-elem
}) })
@listableObjectComponent(WorkspaceItemSearchResult, ViewMode.DetailedListElement) @listableObjectComponent(WorkspaceItemSearchResult, ViewMode.DetailedListElement)
export class WorkspaceItemSearchResultDetailElementComponent extends SearchResultDetailElementComponent<WorkspaceItemSearchResult, WorkspaceItem> { export class WorkspaceItemSearchResultDetailElementComponent extends SearchResultDetailElementComponent<WorkspaceItemSearchResult, WorkspaceItem> implements OnInit {
/** /**
* The item object that belonging to the result object * The item object that belonging to the result object
@@ -51,7 +54,7 @@ export class WorkspaceItemSearchResultDetailElementComponent extends SearchResul
/** /**
* Initialize all instance variables * Initialize all instance variables
*/ */
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.linkService.resolveLink(this.dso, followLink('item')); this.linkService.resolveLink(this.dso, followLink('item'));
this.initItem(this.dso.item as Observable<RemoteData<Item>>); this.initItem(this.dso.item as Observable<RemoteData<Item>>);

View File

@@ -3,7 +3,10 @@ import {
NgFor, NgFor,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
@@ -35,7 +38,7 @@ import { SearchResultGridElementComponent } from '../../search-result-grid-eleme
/** /**
* The component for displaying a grid element for an item search result of the type Publication * The component for displaying a grid element for an item search result of the type Publication
*/ */
export class ItemSearchResultGridElementComponent extends SearchResultGridElementComponent<ItemSearchResult, Item> { export class ItemSearchResultGridElementComponent extends SearchResultGridElementComponent<ItemSearchResult, Item> implements OnInit {
/** /**
* Route to the item's page * Route to the item's page
*/ */

View File

@@ -5,6 +5,7 @@ import {
import { import {
Component, Component,
Input, Input,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@@ -28,7 +29,7 @@ import { IdentifierData } from './identifier-data.model';
/** /**
* Component rendering an identifier, eg. DOI or handle * Component rendering an identifier, eg. DOI or handle
*/ */
export class IdentifierDataComponent { export class IdentifierDataComponent implements OnInit {
@Input() item: Item; @Input() item: Item;
identifiers$: Observable<IdentifierData>; identifiers$: Observable<IdentifierData>;

View File

@@ -5,6 +5,7 @@ import {
import { import {
Component, Component,
Inject, Inject,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@@ -40,7 +41,7 @@ import { ThemedItemListPreviewComponent } from '../../item-list-preview/themed-i
imports: [NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule, VarDirective], imports: [NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule, VarDirective],
}) })
@listableObjectComponent(ClaimedApprovedTaskSearchResult, ViewMode.ListElement) @listableObjectComponent(ClaimedApprovedTaskSearchResult, ViewMode.ListElement)
export class ClaimedApprovedSearchResultListElementComponent extends SearchResultListElementComponent<ClaimedTaskSearchResult, ClaimedTask> { export class ClaimedApprovedSearchResultListElementComponent extends SearchResultListElementComponent<ClaimedTaskSearchResult, ClaimedTask> implements OnInit {
/** /**
* A boolean representing if to show submitter information * A boolean representing if to show submitter information
@@ -69,7 +70,7 @@ export class ClaimedApprovedSearchResultListElementComponent extends SearchResul
/** /**
* Initialize all instance variables * Initialize all instance variables
*/ */
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.linkService.resolveLinks(this.dso, this.linkService.resolveLinks(this.dso,
followLink('workflowitem', followLink('workflowitem',

View File

@@ -5,6 +5,7 @@ import {
import { import {
Component, Component,
Inject, Inject,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@@ -40,7 +41,7 @@ import { ThemedItemListPreviewComponent } from '../../item-list-preview/themed-i
imports: [NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule, VarDirective], imports: [NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule, VarDirective],
}) })
@listableObjectComponent(ClaimedDeclinedTaskSearchResult, ViewMode.ListElement) @listableObjectComponent(ClaimedDeclinedTaskSearchResult, ViewMode.ListElement)
export class ClaimedDeclinedSearchResultListElementComponent extends SearchResultListElementComponent<ClaimedTaskSearchResult, ClaimedTask> { export class ClaimedDeclinedSearchResultListElementComponent extends SearchResultListElementComponent<ClaimedTaskSearchResult, ClaimedTask> implements OnInit {
/** /**
* A boolean representing if to show submitter information * A boolean representing if to show submitter information
@@ -69,7 +70,7 @@ export class ClaimedDeclinedSearchResultListElementComponent extends SearchResul
/** /**
* Initialize all instance variables * Initialize all instance variables
*/ */
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.linkService.resolveLinks(this.dso, this.linkService.resolveLinks(this.dso,
followLink('workflowitem', followLink('workflowitem',

View File

@@ -6,6 +6,7 @@ import {
import { import {
Component, Component,
Inject, Inject,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
@@ -43,7 +44,7 @@ import { SearchResultListElementComponent } from '../../search-result-list-eleme
}) })
@listableObjectComponent(WorkflowItemSearchResult, ViewMode.ListElement) @listableObjectComponent(WorkflowItemSearchResult, ViewMode.ListElement)
export class WorkflowItemSearchResultListElementComponent extends SearchResultListElementComponent<WorkflowItemSearchResult, WorkflowItem> { export class WorkflowItemSearchResultListElementComponent extends SearchResultListElementComponent<WorkflowItemSearchResult, WorkflowItem> implements OnInit {
LinkTypes = CollectionElementLinkType; LinkTypes = CollectionElementLinkType;
ViewModes = ViewMode; ViewModes = ViewMode;
@@ -75,7 +76,7 @@ export class WorkflowItemSearchResultListElementComponent extends SearchResultLi
/** /**
* Initialize all instance variables * Initialize all instance variables
*/ */
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.deriveSearchResult(); this.deriveSearchResult();
this.showThumbnails = this.appConfig.browseBy.showThumbnails; this.showThumbnails = this.appConfig.browseBy.showThumbnails;

View File

@@ -6,6 +6,7 @@ import {
import { import {
Component, Component,
Inject, Inject,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
@@ -43,7 +44,7 @@ import { SearchResultListElementComponent } from '../../search-result-list-eleme
}) })
@listableObjectComponent(WorkspaceItemSearchResult, ViewMode.ListElement) @listableObjectComponent(WorkspaceItemSearchResult, ViewMode.ListElement)
export class WorkspaceItemSearchResultListElementComponent extends SearchResultListElementComponent<WorkspaceItemSearchResult, WorkspaceItem> { export class WorkspaceItemSearchResultListElementComponent extends SearchResultListElementComponent<WorkspaceItemSearchResult, WorkspaceItem> implements OnInit {
LinkTypes = CollectionElementLinkType; LinkTypes = CollectionElementLinkType;
ViewModes = ViewMode; ViewModes = ViewMode;
@@ -75,7 +76,7 @@ export class WorkspaceItemSearchResultListElementComponent extends SearchResult
/** /**
* Initialize all instance variables * Initialize all instance variables
*/ */
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.deriveSearchResult(); this.deriveSearchResult();
this.showThumbnails = this.appConfig.browseBy.showThumbnails; this.showThumbnails = this.appConfig.browseBy.showThumbnails;

View File

@@ -2,7 +2,10 @@ import {
NgClass, NgClass,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { Collection } from '../../../../core/shared/collection.model'; import { Collection } from '../../../../core/shared/collection.model';
@@ -23,7 +26,7 @@ import { SearchResultListElementComponent } from '../search-result-list-element.
* Component representing a collection search result in list view * Component representing a collection search result in list view
*/ */
@listableObjectComponent(CollectionSearchResult, ViewMode.ListElement) @listableObjectComponent(CollectionSearchResult, ViewMode.ListElement)
export class CollectionSearchResultListElementComponent extends SearchResultListElementComponent<CollectionSearchResult, Collection> { export class CollectionSearchResultListElementComponent extends SearchResultListElementComponent<CollectionSearchResult, Collection> implements OnInit {
/** /**
* Display thumbnails if required by configuration * Display thumbnails if required by configuration

View File

@@ -2,7 +2,10 @@ import {
NgClass, NgClass,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { RouterLink } from '@angular/router'; import { RouterLink } from '@angular/router';
import { Community } from '../../../../core/shared/community.model'; import { Community } from '../../../../core/shared/community.model';
@@ -23,13 +26,12 @@ import { SearchResultListElementComponent } from '../search-result-list-element.
* Component representing a community search result in list view * Component representing a community search result in list view
*/ */
@listableObjectComponent(CommunitySearchResult, ViewMode.ListElement) @listableObjectComponent(CommunitySearchResult, ViewMode.ListElement)
export class CommunitySearchResultListElementComponent extends SearchResultListElementComponent<CommunitySearchResult, Community> { export class CommunitySearchResultListElementComponent extends SearchResultListElementComponent<CommunitySearchResult, Community> implements OnInit {
/** /**
* Display thumbnails if required by configuration * Display thumbnails if required by configuration
*/ */
showThumbnails: boolean; showThumbnails: boolean;
ngOnInit(): void { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
this.showThumbnails = this.showThumbnails ?? this.appConfig.browseBy.showThumbnails; this.showThumbnails = this.showThumbnails ?? this.appConfig.browseBy.showThumbnails;

View File

@@ -3,7 +3,10 @@ import {
NgClass, NgClass,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { Component } from '@angular/core'; import {
Component,
OnInit,
} from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { import {
Observable, Observable,
@@ -41,7 +44,7 @@ import { SearchResultListElementComponent } from '../search-result-list-element/
* It displays the name of the parent, title and description of the object. All of which are customizable in the child * It displays the name of the parent, title and description of the object. All of which are customizable in the child
* component by overriding the relevant methods of this component * component by overriding the relevant methods of this component
*/ */
export class SidebarSearchListElementComponent<T extends SearchResult<K>, K extends DSpaceObject> extends SearchResultListElementComponent<T, K> { export class SidebarSearchListElementComponent<T extends SearchResult<K>, K extends DSpaceObject> extends SearchResultListElementComponent<T, K> implements OnInit {
/** /**
* Observable for the title of the parent object (displayed above the object's title) * Observable for the title of the parent object (displayed above the object's title)
*/ */

View File

@@ -7,6 +7,7 @@ import {
ElementRef, ElementRef,
EventEmitter, EventEmitter,
OnDestroy, OnDestroy,
OnInit,
Output, Output,
ViewChild, ViewChild,
} from '@angular/core'; } from '@angular/core';
@@ -65,7 +66,7 @@ export const compareArraysUsingFieldUuids = () =>
selector: 'ds-paginated-drag-drop-abstract', selector: 'ds-paginated-drag-drop-abstract',
template: '', template: '',
}) })
export abstract class AbstractPaginatedDragAndDropListComponent<T extends DSpaceObject> implements OnDestroy { export abstract class AbstractPaginatedDragAndDropListComponent<T extends DSpaceObject> implements OnInit, OnDestroy {
/** /**
* A view on the child pagination component * A view on the child pagination component
*/ */
@@ -142,7 +143,7 @@ export abstract class AbstractPaginatedDragAndDropListComponent<T extends DSpace
/** /**
* Initialize the observables * Initialize the observables
*/ */
ngOnInit() { ngOnInit(): void {
this.initializeObjectsRD(); this.initializeObjectsRD();
this.initializeURL(); this.initializeURL();
this.initializeUpdates(); this.initializeUpdates();

View File

@@ -1,12 +1,14 @@
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { HttpXsrfTokenExtractor } from '@angular/common/http'; import { HttpXsrfTokenExtractor } from '@angular/common/http';
import { import {
AfterViewInit,
ChangeDetectionStrategy, ChangeDetectionStrategy,
ChangeDetectorRef, ChangeDetectorRef,
Component, Component,
EventEmitter, EventEmitter,
HostListener, HostListener,
Input, Input,
OnInit,
Output, Output,
ViewEncapsulation, ViewEncapsulation,
} from '@angular/core'; } from '@angular/core';
@@ -42,7 +44,7 @@ import { UploaderProperties } from './uploader-properties.model';
standalone: true, standalone: true,
imports: [TranslateModule, FileUploadModule, CommonModule], imports: [TranslateModule, FileUploadModule, CommonModule],
}) })
export class UploaderComponent { export class UploaderComponent implements OnInit, AfterViewInit {
/** /**
* The message to show when drag files on the drop zone * The message to show when drag files on the drop zone
@@ -122,7 +124,7 @@ export class UploaderComponent {
/** /**
* Method provided by Angular. Invoked after the constructor. * Method provided by Angular. Invoked after the constructor.
*/ */
ngOnInit() { ngOnInit(): void {
this.uploaderId = 'ds-drag-and-drop-uploader' + uniqueId(); this.uploaderId = 'ds-drag-and-drop-uploader' + uniqueId();
this.checkConfig(this.uploadFilesOptions); this.checkConfig(this.uploadFilesOptions);
this.uploader = new FileUploader({ this.uploader = new FileUploader({
@@ -147,7 +149,7 @@ export class UploaderComponent {
} }
} }
ngAfterViewInit() { ngAfterViewInit(): void {
this.uploader.onAfterAddingAll = ((items) => { this.uploader.onAfterAddingAll = ((items) => {
this.onFileSelected.emit(items); this.onFileSelected.emit(items);
}); });

View File

@@ -7,6 +7,7 @@ import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
Inject, Inject,
OnInit,
} from '@angular/core'; } from '@angular/core';
import { import {
TranslateModule, TranslateModule,
@@ -47,7 +48,7 @@ import { SectionsService } from '../sections.service';
standalone: true, standalone: true,
}) })
export class SubmissionSectionIdentifiersComponent extends SectionModelComponent { export class SubmissionSectionIdentifiersComponent extends SectionModelComponent implements OnInit {
/** /**
* The Alert categories. * The Alert categories.
* @type {AlertType} * @type {AlertType}
@@ -76,7 +77,6 @@ export class SubmissionSectionIdentifiersComponent extends SectionModelComponent
/** /**
* Initialize instance variables. * Initialize instance variables.
* *
* @param {PaginationService} paginationService
* @param {TranslateService} translate * @param {TranslateService} translate
* @param {SectionsService} sectionService * @param {SectionsService} sectionService
* @param {SubmissionService} submissionService * @param {SubmissionService} submissionService
@@ -93,7 +93,7 @@ export class SubmissionSectionIdentifiersComponent extends SectionModelComponent
super(injectedCollectionId, injectedSectionData, injectedSubmissionId); super(injectedCollectionId, injectedSectionData, injectedSubmissionId);
} }
ngOnInit() { ngOnInit(): void {
super.ngOnInit(); super.ngOnInit();
} }