-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into issue-1476-upgrade-to-angular-16
Change strength meter to @wise-community/angular-password-strength-meter
- Loading branch information
Showing
97 changed files
with
2,199 additions
and
2,129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { FormGroup } from '@angular/forms'; | ||
import { NewPasswordAndConfirmComponent } from '../password/new-password-and-confirm/new-password-and-confirm.component'; | ||
import { PasswordErrors } from '../domain/password/password-errors'; | ||
|
||
export function changePasswordError( | ||
error: PasswordErrors, | ||
incorrectPasswordFormGroup: FormGroup, | ||
invalidPasswordFormGroup: FormGroup, | ||
previousPasswordFieldName: string | ||
): void { | ||
switch (error.messageCode) { | ||
case 'incorrectPassword': | ||
incorrectPasswordFormGroup | ||
.get(previousPasswordFieldName) | ||
.setErrors({ incorrectPassword: true }); | ||
break; | ||
case 'invalidPassword': | ||
injectPasswordErrors(invalidPasswordFormGroup, error); | ||
break; | ||
} | ||
} | ||
|
||
export function injectPasswordErrors(formGroup: FormGroup, passwordErrors: PasswordErrors): void { | ||
formGroup | ||
.get(NewPasswordAndConfirmComponent.NEW_PASSWORD_FORM_CONTROL_NAME) | ||
.setErrors(passwordErrors); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export class PasswordErrors { | ||
messageCode: string = 'invalidPassword'; | ||
missingLetter: boolean; | ||
missingNumber: boolean; | ||
tooShort: boolean; | ||
|
||
constructor(missingLetter: boolean, missingNumber: boolean, tooShort: boolean) { | ||
this.missingLetter = missingLetter; | ||
this.missingNumber = missingNumber; | ||
this.tooShort = tooShort; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Directive, OnInit } from '@angular/core'; | ||
import { ConfigService } from '../../services/config.service'; | ||
import { filter } from 'rxjs'; | ||
|
||
@Directive() | ||
export abstract class FaqComponent implements OnInit { | ||
protected contextPath: string; | ||
|
||
constructor(private configService: ConfigService) { | ||
this.configService | ||
.getConfig() | ||
.pipe(filter((config) => config != null)) | ||
.subscribe((config) => { | ||
this.contextPath = config.contextPath; | ||
}); | ||
} | ||
|
||
ngOnInit(): void {} | ||
|
||
ngAfterViewInit(): void { | ||
document.getElementsByTagName('app-help')[0]?.scrollIntoView(); | ||
} | ||
} |
Oops, something went wrong.