Skip to content

Commit

Permalink
[DURACOM-191] Fix missing import for ngIf and ngFor directive
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Mar 19, 2024
1 parent dfad3f3 commit 2826ff5
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
AsyncPipe,
NgClass,
NgFor,
NgIf,
} from '@angular/common';
import {
Expand Down Expand Up @@ -83,6 +84,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
imports: [
FormComponent,
NgIf,
NgFor,
AsyncPipe,
TranslateModule,
NgClass,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
AsyncPipe,
NgClass,
NgFor,
NgIf,
} from '@angular/common';
import {
Expand Down Expand Up @@ -54,6 +55,7 @@ import { LdnService } from '../ldn-services-model/ldn-services.model';
changeDetection: ChangeDetectionStrategy.Default,
imports: [
NgIf,
NgFor,
TranslateModule,
AsyncPipe,
PaginationComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
AsyncPipe,
NgForOf,
NgIf,
} from '@angular/common';
import {
Component,
Expand Down Expand Up @@ -59,6 +60,7 @@ import { QueryPredicate } from './query-predicate.model';
NgbAccordionModule,
TranslateModule,
AsyncPipe,
NgIf,
NgForOf,
FiltersComponent,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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$,
Expand Down Expand Up @@ -84,6 +85,8 @@ describe('ForgotPasswordFormComponent', () => {
{ provide: NotificationsService, useValue: notificationsService },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).overrideComponent(ForgotPasswordFormComponent, {
remove: { imports: [ ProfilePageSecurityFormComponent ] },
}).compileComponents();
}));
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { NgIf } from '@angular/common';
import {
NgFor,
NgIf,
} from '@angular/common';
import {
Component,
Input,
Expand All @@ -20,6 +23,7 @@ import { ObjectKeysPipe } from '../../../shared/utils/object-keys-pipe';
imports: [
TranslateModule,
NgIf,
NgFor,
ObjectKeysPipe,
],
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NgIf } from '@angular/common';
import {
Component,
EventEmitter,
Expand Down Expand Up @@ -26,6 +27,7 @@ import { SuggestionEvidencesComponent } from './suggestion-evidences/suggestion-
templateUrl: './suggestion-list-element.component.html',
animations: [fadeIn],
imports: [
NgIf,
TranslateModule,
ItemSearchResultListElementComponent,
SuggestionActionsComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
AsyncPipe,
NgFor,
NgIf,
} from '@angular/common';
import {
Expand Down Expand Up @@ -44,6 +45,7 @@ import { SuggestionTargetsStateService } from '../suggestion-targets.state.servi
TranslateModule,
PaginationComponent,
NgIf,
NgFor,
RouterLink,
],
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -52,6 +54,8 @@ describe('ProfilePageSecurityFormComponent', () => {
FormBuilderService,
],
schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(ProfilePageSecurityFormComponent, {
remove: { imports: [ FormComponent, AlertComponent ] },
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NgIf } from '@angular/common';
import {
Component,
EventEmitter,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/menu/menu-item/onclick-menu-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ListableObject } from '../listable-object.model';
@Component({
selector: 'ds-objects-collection-tabulatable',
template: ``,
standalone: true,
})

/**
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/utils/ipV4.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2826ff5

Please sign in to comment.