[DURACOM-191] Fix missing import for ngIf and ngFor directive

This commit is contained in:
Giuseppe Digilio
2024-03-19 18:04:09 +01:00
parent dfad3f3fad
commit 2826ff5536
15 changed files with 39 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import { import {
AsyncPipe, AsyncPipe,
NgClass, NgClass,
NgFor,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { import {
@@ -83,6 +84,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
imports: [ imports: [
FormComponent, FormComponent,
NgIf, NgIf,
NgFor,
AsyncPipe, AsyncPipe,
TranslateModule, TranslateModule,
NgClass, NgClass,

View File

@@ -1,6 +1,7 @@
import { import {
AsyncPipe, AsyncPipe,
NgClass, NgClass,
NgFor,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { import {
@@ -54,6 +55,7 @@ import { LdnService } from '../ldn-services-model/ldn-services.model';
changeDetection: ChangeDetectionStrategy.Default, changeDetection: ChangeDetectionStrategy.Default,
imports: [ imports: [
NgIf, NgIf,
NgFor,
TranslateModule, TranslateModule,
AsyncPipe, AsyncPipe,
PaginationComponent, PaginationComponent,

View File

@@ -1,6 +1,7 @@
import { import {
AsyncPipe, AsyncPipe,
NgForOf, NgForOf,
NgIf,
} from '@angular/common'; } from '@angular/common';
import { import {
Component, Component,
@@ -59,6 +60,7 @@ import { QueryPredicate } from './query-predicate.model';
NgbAccordionModule, NgbAccordionModule,
TranslateModule, TranslateModule,
AsyncPipe, AsyncPipe,
NgIf,
NgForOf, NgForOf,
FiltersComponent, FiltersComponent,
], ],

View File

@@ -24,6 +24,7 @@ import { AuthenticateAction } from '../../core/auth/auth.actions';
import { CoreState } from '../../core/core-state.model'; import { CoreState } from '../../core/core-state.model';
import { EPersonDataService } from '../../core/eperson/eperson-data.service'; import { EPersonDataService } from '../../core/eperson/eperson-data.service';
import { Registration } from '../../core/shared/registration.model'; 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 { NotificationsService } from '../../shared/notifications/notifications.service';
import { import {
createFailedRemoteDataObject$, createFailedRemoteDataObject$,
@@ -84,6 +85,8 @@ describe('ForgotPasswordFormComponent', () => {
{ provide: NotificationsService, useValue: notificationsService }, { provide: NotificationsService, useValue: notificationsService },
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).overrideComponent(ForgotPasswordFormComponent, {
remove: { imports: [ ProfilePageSecurityFormComponent ] },
}).compileComponents(); }).compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {

View File

@@ -1,4 +1,7 @@
import { NgIf } from '@angular/common'; import {
NgFor,
NgIf,
} from '@angular/common';
import { import {
Component, Component,
Input, Input,
@@ -20,6 +23,7 @@ import { ObjectKeysPipe } from '../../../shared/utils/object-keys-pipe';
imports: [ imports: [
TranslateModule, TranslateModule,
NgIf, NgIf,
NgFor,
ObjectKeysPipe, ObjectKeysPipe,
], ],
standalone: true, standalone: true,

View File

@@ -1,3 +1,4 @@
import { NgIf } from '@angular/common';
import { import {
Component, Component,
EventEmitter, EventEmitter,
@@ -26,6 +27,7 @@ import { SuggestionEvidencesComponent } from './suggestion-evidences/suggestion-
templateUrl: './suggestion-list-element.component.html', templateUrl: './suggestion-list-element.component.html',
animations: [fadeIn], animations: [fadeIn],
imports: [ imports: [
NgIf,
TranslateModule, TranslateModule,
ItemSearchResultListElementComponent, ItemSearchResultListElementComponent,
SuggestionActionsComponent, SuggestionActionsComponent,

View File

@@ -1,5 +1,6 @@
import { import {
AsyncPipe, AsyncPipe,
NgFor,
NgIf, NgIf,
} from '@angular/common'; } from '@angular/common';
import { import {
@@ -44,6 +45,7 @@ import { SuggestionTargetsStateService } from '../suggestion-targets.state.servi
TranslateModule, TranslateModule,
PaginationComponent, PaginationComponent,
NgIf, NgIf,
NgFor,
RouterLink, RouterLink,
], ],
standalone: true, standalone: true,

View File

@@ -13,7 +13,9 @@ import { of as observableOf } from 'rxjs';
import { RestResponse } from '../../core/cache/response.models'; import { RestResponse } from '../../core/cache/response.models';
import { EPersonDataService } from '../../core/eperson/eperson-data.service'; 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 { FormBuilderService } from '../../shared/form/builder/form-builder.service';
import { FormComponent } from '../../shared/form/form.component';
import { NotificationsService } from '../../shared/notifications/notifications.service'; import { NotificationsService } from '../../shared/notifications/notifications.service';
import { VarDirective } from '../../shared/utils/var.directive'; import { VarDirective } from '../../shared/utils/var.directive';
import { ProfilePageSecurityFormComponent } from './profile-page-security-form.component'; import { ProfilePageSecurityFormComponent } from './profile-page-security-form.component';
@@ -52,6 +54,8 @@ describe('ProfilePageSecurityFormComponent', () => {
FormBuilderService, FormBuilderService,
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(ProfilePageSecurityFormComponent, {
remove: { imports: [ FormComponent, AlertComponent ] },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -1,3 +1,4 @@
import { NgIf } from '@angular/common';
import { import {
Component, Component,
EventEmitter, EventEmitter,
@@ -32,6 +33,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
selector: 'ds-profile-page-security-form', selector: 'ds-profile-page-security-form',
templateUrl: './profile-page-security-form.component.html', templateUrl: './profile-page-security-form.component.html',
imports: [ imports: [
NgIf,
FormComponent, FormComponent,
AlertComponent, AlertComponent,
TranslateModule, TranslateModule,

View File

@@ -4,6 +4,7 @@ import {
Inject, Inject,
OnInit, OnInit,
} from '@angular/core'; } from '@angular/core';
import { RouterLinkActive } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { isNotEmpty } from '../../empty.util'; import { isNotEmpty } from '../../empty.util';
@@ -17,7 +18,7 @@ import { ExternalLinkMenuItemModel } from './models/external-link.model';
styleUrls: ['./menu-item.component.scss'], styleUrls: ['./menu-item.component.scss'],
templateUrl: './external-link-menu-item.component.html', templateUrl: './external-link-menu-item.component.html',
standalone: true, standalone: true,
imports: [NgClass, TranslateModule], imports: [NgClass, TranslateModule, RouterLinkActive],
}) })
export class ExternalLinkMenuItemComponent implements OnInit { export class ExternalLinkMenuItemComponent implements OnInit {
item: ExternalLinkMenuItemModel; item: ExternalLinkMenuItemModel;

View File

@@ -3,6 +3,7 @@ import {
Component, Component,
Inject, Inject,
} from '@angular/core'; } from '@angular/core';
import { RouterLinkActive } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { OnClickMenuItemModel } from './models/onclick.model'; 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'], styleUrls: ['./menu-item.component.scss', './onclick-menu-item.component.scss'],
templateUrl: './onclick-menu-item.component.html', templateUrl: './onclick-menu-item.component.html',
standalone: true, standalone: true,
imports: [NgIf, TranslateModule], imports: [NgIf, TranslateModule, RouterLinkActive],
}) })
export class OnClickMenuItemComponent { export class OnClickMenuItemComponent {
item: OnClickMenuItemModel; item: OnClickMenuItemModel;

View File

@@ -10,6 +10,7 @@ import { Item } from '../../../../core/shared/item.model';
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model'; import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model';
import { AbstractComponentLoaderComponent } from '../../../abstract-component-loader/abstract-component-loader.component'; 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 { MyDSpaceActionsResult } from '../../mydspace-actions';
import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-actions-abstract.component'; import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-actions-abstract.component';
import { getComponentByWorkflowTaskOption } from './claimed-task-actions-decorator'; import { getComponentByWorkflowTaskOption } from './claimed-task-actions-decorator';
@@ -18,6 +19,7 @@ import { getComponentByWorkflowTaskOption } from './claimed-task-actions-decorat
selector: 'ds-claimed-task-actions-loader', selector: 'ds-claimed-task-actions-loader',
templateUrl: '../../../abstract-component-loader/abstract-component-loader.component.html', templateUrl: '../../../abstract-component-loader/abstract-component-loader.component.html',
standalone: true, standalone: true,
imports: [ DynamicComponentLoaderDirective ],
}) })
/** /**
* Component for loading a ClaimedTaskAction component depending on the "option" input * Component for loading a ClaimedTaskAction component depending on the "option" input

View File

@@ -15,6 +15,7 @@ import { ListableObject } from '../listable-object.model';
@Component({ @Component({
selector: 'ds-objects-collection-tabulatable', selector: 'ds-objects-collection-tabulatable',
template: ``, template: ``,
standalone: true,
}) })
/** /**

View File

@@ -11,6 +11,7 @@ import {
providers: [ providers: [
{ provide: NG_VALIDATORS, useExisting: IpV4Validator, multi: true }, { provide: NG_VALIDATORS, useExisting: IpV4Validator, multi: true },
], ],
standalone: true,
}) })
/** /**
* Validator to validate if an Ip is in the right format * Validator to validate if an Ip is in the right format

View File

@@ -46,7 +46,13 @@
"angularCompilerOptions": { "angularCompilerOptions": {
"fullTemplateTypeCheck": true, "fullTemplateTypeCheck": true,
"strictInjectionParameters": true, "strictInjectionParameters": true,
"strictInputAccessModifiers": true "strictInputAccessModifiers": true,
"extendedDiagnostics": {
// The categories to use for specific diagnostics.
"checks": {
"missingControlFlowDirective": "error"
},
}
}, },
"exclude": [ "exclude": [
"cypress.config.ts" "cypress.config.ts"