@annalib/anna-cognito-lib 4.2.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { IConfigService } from '../../config/config-service.token';
4
+ import { LoginConstant } from '../../constants/loginConstant';
5
+ import { AnnaLibAuthService } from '../../services/auth.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class CatcLoginComponent implements OnInit {
8
+ authService: AnnaLibAuthService;
9
+ private fb;
10
+ consumingProjectConfigService: IConfigService;
11
+ loginForm: FormGroup;
12
+ constants: typeof LoginConstant;
13
+ emailPattern: RegExp;
14
+ constructor(authService: AnnaLibAuthService, fb: FormBuilder, consumingProjectConfigService: IConfigService);
15
+ ngOnInit(): void;
16
+ onIntialiseForm(): void;
17
+ OnLogin(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<CatcLoginComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<CatcLoginComponent, "anna-cognito-catc-login", never, {}, {}, never, never, true, never>;
20
+ }
@@ -28,6 +28,7 @@ export declare class ForgotPasswordComponent implements OnInit {
28
28
  confirmPassword: PasswordType;
29
29
  infoMessageToRedirectLogin: string;
30
30
  isLoading: boolean;
31
+ emailPattern: RegExp;
31
32
  constructor(authService: AnnaLibAuthService, fb: FormBuilder, toastr: ToastrService, router: Router, consumingProjectConfigService: IConfigService, consumingProjectAuthService: IAuthService, consumingProjectSSOLoginService: ISSOLoginService);
32
33
  ngOnInit(): void;
33
34
  onIntialiseForm(): void;
@@ -35,8 +36,9 @@ export declare class ForgotPasswordComponent implements OnInit {
35
36
  isFormValid(): boolean;
36
37
  onLoginOrGetOtpButtonClick(): void;
37
38
  onVerifyRegisteredEmail(): void;
39
+ onVerifyingRegisteredEmailForCatc(): void;
38
40
  onGettingUserStatus(isUsernameAvailable: boolean, isUserWithTempPassword: boolean, username: string): void;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<ForgotPasswordComponent, never>;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<ForgotPasswordComponent, [null, null, null, null, null, null, { optional: true; }]>;
40
42
  static ɵcmp: i0.ɵɵComponentDeclaration<ForgotPasswordComponent, "anna-cognito-lib-forgot-password", never, {}, {}, never, never, true, never>;
41
43
  }
42
44
  export {};
@@ -1,5 +1,4 @@
1
1
  import { InjectionToken } from "@angular/core";
2
- import { AuthTokens } from "aws-amplify/auth";
3
2
  import { Observable } from "rxjs";
4
3
  /** Token to inject the auth service */
5
4
  export declare const AUTH_SERVICE_TOKEN: InjectionToken<IAuthService>;
@@ -10,7 +9,7 @@ export interface IAuthService {
10
9
  IdToken: any;
11
10
  defaultLoginPageUrl: "co-pilot-login" | "login";
12
11
  onSuccessfulAuthenticatingUser(loggedInViaSso: boolean): void;
13
- getAllCognitoTokenAndGroups(tokens: AuthTokens): void;
12
+ getAllCognitoTokenAndGroups(tokens: any): void;
14
13
  isUsernameAvailable(username: string): Observable<any>;
15
14
  isEmailAvailable(emailId: string, ogId: number): Observable<any>;
16
15
  getUserState(username: string): Observable<any>;
@@ -10,4 +10,5 @@ export interface IConfigService {
10
10
  };
11
11
  currentAnnaVersion: string;
12
12
  };
13
+ isCatcApplication?: boolean;
13
14
  }
@@ -1,6 +1,7 @@
1
1
  export declare class LoginConstant {
2
- static readonly enterEmail = "Enter your username";
2
+ static readonly enterUsername = "Enter your username";
3
3
  static readonly enterUserCode = "Enter your usercode";
4
+ static readonly enterEmail = "Enter your email";
4
5
  static readonly password = "Password";
5
6
  static readonly confirmPassword = "Confirm Password";
6
7
  static readonly login = "Login";
@@ -36,6 +37,7 @@ export declare class LoginConstant {
36
37
  static readonly forgotPasswordHeading = "Forgot your password?";
37
38
  static readonly PleaseEnterYourUsernameMessage = "Please enter your username.";
38
39
  static readonly PleaseEnterYourUsercodeMessage = "Please enter your usercode.";
40
+ static readonly PleaseEnterYourEmailMessage = "Please enter your email address below.";
39
41
  static readonly forgotPasswordButton: string;
40
42
  static readonly apiFailErrorMessage = "Unable to connect to server right now. Please try after some time.";
41
43
  static readonly setNewPasswordUrl = "/set-new-password";
@@ -6,6 +6,6 @@ export declare class AnnaLibAclService {
6
6
  userGroupsInCognitoJWT: string[];
7
7
  isUserAuthorisedToAccessPage(url: string): boolean;
8
8
  isUserAuthorisedToAccessElement(privilege: string): boolean;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<AnnaLibAclService, never>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnnaLibAclService, [{ optional: true; }]>;
10
10
  static ɵprov: i0.ɵɵInjectableDeclaration<AnnaLibAclService>;
11
11
  }
@@ -41,6 +41,6 @@ export declare class AnnaLibAuthService {
41
41
  expiryAllExistingCurrentSession(username: string, newPassword: string): void;
42
42
  onLoginInCogntioToGetAccessToken(username: string, password: string): Promise<void>;
43
43
  onCallGlobalSignout(): Promise<void>;
44
- static ɵfac: i0.ɵɵFactoryDeclaration<AnnaLibAuthService, never>;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnnaLibAuthService, [null, null, null, null, { optional: true; }, null]>;
45
45
  static ɵprov: i0.ɵɵInjectableDeclaration<AnnaLibAuthService>;
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annalib/anna-cognito-lib",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.12",
6
6
  "@angular/core": "^16.2.12",
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./lib/components/anna-login/anna-login.component";
2
+ export * from "./lib/components/catc-login/catc-login.component";
2
3
  export * from "./lib/components/cognito-and-sso-login-container/cognito-and-sso-login-container.component";
3
4
  export * from "./lib/components/forgot-password/forgot-password.component";
4
5
  export * from "./lib/components/password-matching/password-matching.component";