diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts index b3773533820..05efde7cf7d 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts @@ -1,6 +1,7 @@ import { AsyncPipe, NgClass, + NgFor, NgIf, } from '@angular/common'; import { @@ -83,6 +84,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator'; imports: [ FormComponent, NgIf, + NgFor, AsyncPipe, TranslateModule, NgClass, diff --git a/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.ts b/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.ts index 35a80f8e1e6..cc2cba4704c 100644 --- a/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.ts +++ b/src/app/admin/admin-ldn-services/ldn-services-directory/ldn-services-directory.component.ts @@ -1,6 +1,7 @@ import { AsyncPipe, NgClass, + NgFor, NgIf, } from '@angular/common'; import { @@ -54,6 +55,7 @@ import { LdnService } from '../ldn-services-model/ldn-services.model'; changeDetection: ChangeDetectionStrategy.Default, imports: [ NgIf, + NgFor, TranslateModule, AsyncPipe, PaginationComponent, diff --git a/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts b/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts index 559a74ded95..9fd4643573e 100644 --- a/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts +++ b/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts @@ -1,6 +1,7 @@ import { AsyncPipe, NgForOf, + NgIf, } from '@angular/common'; import { Component, @@ -59,6 +60,7 @@ import { QueryPredicate } from './query-predicate.model'; NgbAccordionModule, TranslateModule, AsyncPipe, + NgIf, NgForOf, FiltersComponent, ], diff --git a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts index 831b46887eb..b45c18a5873 100644 --- a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts +++ b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts @@ -24,6 +24,7 @@ import { AuthenticateAction } from '../../core/auth/auth.actions'; import { CoreState } from '../../core/core-state.model'; import { EPersonDataService } from '../../core/eperson/eperson-data.service'; import { Registration } from '../../core/shared/registration.model'; +import { ProfilePageSecurityFormComponent } from '../../profile-page/profile-page-security-form/profile-page-security-form.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { createFailedRemoteDataObject$, @@ -84,6 +85,8 @@ describe('ForgotPasswordFormComponent', () => { { provide: NotificationsService, useValue: notificationsService }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA], + }).overrideComponent(ForgotPasswordFormComponent, { + remove: { imports: [ ProfilePageSecurityFormComponent ] }, }).compileComponents(); })); beforeEach(() => { diff --git a/src/app/notifications/suggestion-list-element/suggestion-evidences/suggestion-evidences.component.ts b/src/app/notifications/suggestion-list-element/suggestion-evidences/suggestion-evidences.component.ts index 265ab1d5a26..7fe10fc6c56 100644 --- a/src/app/notifications/suggestion-list-element/suggestion-evidences/suggestion-evidences.component.ts +++ b/src/app/notifications/suggestion-list-element/suggestion-evidences/suggestion-evidences.component.ts @@ -1,4 +1,7 @@ -import { NgIf } from '@angular/common'; +import { + NgFor, + NgIf, +} from '@angular/common'; import { Component, Input, @@ -20,6 +23,7 @@ import { ObjectKeysPipe } from '../../../shared/utils/object-keys-pipe'; imports: [ TranslateModule, NgIf, + NgFor, ObjectKeysPipe, ], standalone: true, diff --git a/src/app/notifications/suggestion-list-element/suggestion-list-element.component.ts b/src/app/notifications/suggestion-list-element/suggestion-list-element.component.ts index 67b7254f916..c636fabe10b 100644 --- a/src/app/notifications/suggestion-list-element/suggestion-list-element.component.ts +++ b/src/app/notifications/suggestion-list-element/suggestion-list-element.component.ts @@ -1,3 +1,4 @@ +import { NgIf } from '@angular/common'; import { Component, EventEmitter, @@ -26,6 +27,7 @@ import { SuggestionEvidencesComponent } from './suggestion-evidences/suggestion- templateUrl: './suggestion-list-element.component.html', animations: [fadeIn], imports: [ + NgIf, TranslateModule, ItemSearchResultListElementComponent, SuggestionActionsComponent, diff --git a/src/app/notifications/suggestion-targets/publication-claim/publication-claim.component.ts b/src/app/notifications/suggestion-targets/publication-claim/publication-claim.component.ts index 700aa9631a9..95788bf4bad 100644 --- a/src/app/notifications/suggestion-targets/publication-claim/publication-claim.component.ts +++ b/src/app/notifications/suggestion-targets/publication-claim/publication-claim.component.ts @@ -1,5 +1,6 @@ import { AsyncPipe, + NgFor, NgIf, } from '@angular/common'; import { @@ -44,6 +45,7 @@ import { SuggestionTargetsStateService } from '../suggestion-targets.state.servi TranslateModule, PaginationComponent, NgIf, + NgFor, RouterLink, ], standalone: true, diff --git a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts index 0975954ccc1..c4f22f4dd7b 100644 --- a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts +++ b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts @@ -13,7 +13,9 @@ import { of as observableOf } from 'rxjs'; import { RestResponse } from '../../core/cache/response.models'; import { EPersonDataService } from '../../core/eperson/eperson-data.service'; +import { AlertComponent } from '../../shared/alert/alert.component'; import { FormBuilderService } from '../../shared/form/builder/form-builder.service'; +import { FormComponent } from '../../shared/form/form.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { VarDirective } from '../../shared/utils/var.directive'; import { ProfilePageSecurityFormComponent } from './profile-page-security-form.component'; @@ -52,6 +54,8 @@ describe('ProfilePageSecurityFormComponent', () => { FormBuilderService, ], schemas: [NO_ERRORS_SCHEMA], + }).overrideComponent(ProfilePageSecurityFormComponent, { + remove: { imports: [ FormComponent, AlertComponent ] }, }).compileComponents(); })); diff --git a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts index 41a60648573..929ff280c52 100644 --- a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts +++ b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts @@ -1,3 +1,4 @@ +import { NgIf } from '@angular/common'; import { Component, EventEmitter, @@ -32,6 +33,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s selector: 'ds-profile-page-security-form', templateUrl: './profile-page-security-form.component.html', imports: [ + NgIf, FormComponent, AlertComponent, TranslateModule, diff --git a/src/app/shared/menu/menu-item/external-link-menu-item.component.ts b/src/app/shared/menu/menu-item/external-link-menu-item.component.ts index 69a92023b0c..69693ceada0 100644 --- a/src/app/shared/menu/menu-item/external-link-menu-item.component.ts +++ b/src/app/shared/menu/menu-item/external-link-menu-item.component.ts @@ -4,6 +4,7 @@ import { Inject, OnInit, } from '@angular/core'; +import { RouterLinkActive } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { isNotEmpty } from '../../empty.util'; @@ -17,7 +18,7 @@ import { ExternalLinkMenuItemModel } from './models/external-link.model'; styleUrls: ['./menu-item.component.scss'], templateUrl: './external-link-menu-item.component.html', standalone: true, - imports: [NgClass, TranslateModule], + imports: [NgClass, TranslateModule, RouterLinkActive], }) export class ExternalLinkMenuItemComponent implements OnInit { item: ExternalLinkMenuItemModel; diff --git a/src/app/shared/menu/menu-item/onclick-menu-item.component.ts b/src/app/shared/menu/menu-item/onclick-menu-item.component.ts index 9ec1e8d5e0f..3073ecc470d 100644 --- a/src/app/shared/menu/menu-item/onclick-menu-item.component.ts +++ b/src/app/shared/menu/menu-item/onclick-menu-item.component.ts @@ -3,6 +3,7 @@ import { Component, Inject, } from '@angular/core'; +import { RouterLinkActive } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { OnClickMenuItemModel } from './models/onclick.model'; @@ -15,7 +16,7 @@ import { OnClickMenuItemModel } from './models/onclick.model'; styleUrls: ['./menu-item.component.scss', './onclick-menu-item.component.scss'], templateUrl: './onclick-menu-item.component.html', standalone: true, - imports: [NgIf, TranslateModule], + imports: [NgIf, TranslateModule, RouterLinkActive], }) export class OnClickMenuItemComponent { item: OnClickMenuItemModel; diff --git a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts index bda1c765b0e..4efbc01e480 100644 --- a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts @@ -10,6 +10,7 @@ import { Item } from '../../../../core/shared/item.model'; import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model'; import { AbstractComponentLoaderComponent } from '../../../abstract-component-loader/abstract-component-loader.component'; +import { DynamicComponentLoaderDirective } from '../../../abstract-component-loader/dynamic-component-loader.directive'; import { MyDSpaceActionsResult } from '../../mydspace-actions'; import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-actions-abstract.component'; import { getComponentByWorkflowTaskOption } from './claimed-task-actions-decorator'; @@ -18,6 +19,7 @@ import { getComponentByWorkflowTaskOption } from './claimed-task-actions-decorat selector: 'ds-claimed-task-actions-loader', templateUrl: '../../../abstract-component-loader/abstract-component-loader.component.html', standalone: true, + imports: [ DynamicComponentLoaderDirective ], }) /** * Component for loading a ClaimedTaskAction component depending on the "option" input diff --git a/src/app/shared/object-collection/shared/objects-collection-tabulatable/objects-collection-tabulatable.component.ts b/src/app/shared/object-collection/shared/objects-collection-tabulatable/objects-collection-tabulatable.component.ts index 84042358b36..f1368b62784 100644 --- a/src/app/shared/object-collection/shared/objects-collection-tabulatable/objects-collection-tabulatable.component.ts +++ b/src/app/shared/object-collection/shared/objects-collection-tabulatable/objects-collection-tabulatable.component.ts @@ -15,6 +15,7 @@ import { ListableObject } from '../listable-object.model'; @Component({ selector: 'ds-objects-collection-tabulatable', template: ``, + standalone: true, }) /** diff --git a/src/app/shared/utils/ipV4.validator.ts b/src/app/shared/utils/ipV4.validator.ts index 04f2a4b0229..c97453da0d9 100644 --- a/src/app/shared/utils/ipV4.validator.ts +++ b/src/app/shared/utils/ipV4.validator.ts @@ -11,6 +11,7 @@ import { providers: [ { provide: NG_VALIDATORS, useExisting: IpV4Validator, multi: true }, ], + standalone: true, }) /** * Validator to validate if an Ip is in the right format diff --git a/tsconfig.json b/tsconfig.json index 4ccd727a64d..afd00f8568c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,7 +46,13 @@ "angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true, - "strictInputAccessModifiers": true + "strictInputAccessModifiers": true, + "extendedDiagnostics": { + // The categories to use for specific diagnostics. + "checks": { + "missingControlFlowDirective": "error" + }, + } }, "exclude": [ "cypress.config.ts"