tango-app-ui-auth 3.5.0-beta.5 → 3.5.0-beta.7

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.
@@ -8,7 +8,8 @@ import * as i2$1 from '@angular/forms';
8
8
  import { Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
9
9
  import { BehaviorSubject, of, map, catchError, throwError, Subject, takeUntil, timer } from 'rxjs';
10
10
  import dayjs from 'dayjs';
11
- import CryptoJS from 'crypto-js';
11
+ import * as CryptoJS from 'crypto-js';
12
+ import CryptoJS__default from 'crypto-js';
12
13
  import * as i2 from '@angular/common/http';
13
14
  import * as i4 from 'tango-app-ui-global';
14
15
  import * as i1 from '@ng-bootstrap/ng-bootstrap';
@@ -295,7 +296,7 @@ class TangoAuthLoginComponent {
295
296
  const originalPassword = this.credentials.password;
296
297
  const addonPassword = `${this.credentials.password}___${Math.floor(Date.now() / 1000)}`;
297
298
  const secretKey = this.secretKey;
298
- const encrypted = CryptoJS.AES.encrypt(addonPassword, secretKey).toString();
299
+ const encrypted = CryptoJS__default.AES.encrypt(addonPassword, secretKey).toString();
299
300
  this.credentials.password = encrypted;
300
301
  this.service.login(this.credentials).pipe(takeUntil(this.destroy$)).subscribe({
301
302
  next: (res) => {
@@ -423,7 +424,7 @@ class TangoAuthLoginComponent {
423
424
  this.userProfile();
424
425
  }
425
426
  else {
426
- this.onLogin(true);
427
+ // this.onLogin(true);
427
428
  }
428
429
  }).catch(() => {
429
430
  });
@@ -1555,6 +1556,7 @@ class TangoAuthForgotPasswordComponent {
1555
1556
  authService;
1556
1557
  activatedRoute;
1557
1558
  fb;
1559
+ gs;
1558
1560
  router;
1559
1561
  pageInfo;
1560
1562
  emailEnable = true;
@@ -1570,13 +1572,21 @@ class TangoAuthForgotPasswordComponent {
1570
1572
  Validators.minLength(3),
1571
1573
  ]);
1572
1574
  PasswordForm;
1573
- constructor(toast, authService, activatedRoute, fb, router, pageInfo) {
1575
+ secretKey;
1576
+ destroy$ = new Subject();
1577
+ constructor(toast, authService, activatedRoute, fb, gs, router, pageInfo) {
1574
1578
  this.toast = toast;
1575
1579
  this.authService = authService;
1576
1580
  this.activatedRoute = activatedRoute;
1577
1581
  this.fb = fb;
1582
+ this.gs = gs;
1578
1583
  this.router = router;
1579
1584
  this.pageInfo = pageInfo;
1585
+ this.gs.environment.pipe(takeUntil(this.destroy$)).subscribe((env) => {
1586
+ if (env) {
1587
+ this.secretKey = env.secretKey;
1588
+ }
1589
+ });
1580
1590
  this.PasswordForm = this.fb.group({
1581
1591
  password: [
1582
1592
  "",
@@ -1657,28 +1667,50 @@ class TangoAuthForgotPasswordComponent {
1657
1667
  this.confirmPasswordShow = !this.confirmPasswordShow;
1658
1668
  }
1659
1669
  onPasswordSubmit() {
1660
- this.authService.forgotPassword(this.PasswordForm.value).subscribe({
1670
+ if (this.PasswordForm.invalid) {
1671
+ this.toast.getErrorToast('Please fill out the form correctly.');
1672
+ return;
1673
+ }
1674
+ const password = this.PasswordForm.get('password')?.value;
1675
+ const confirmPassword = this.PasswordForm.get('confirmPassword')?.value;
1676
+ if (password !== confirmPassword) {
1677
+ this.toast.getErrorToast('Passwords do not match.');
1678
+ return;
1679
+ }
1680
+ const addonPassword = `${password}___${Math.floor(Date.now() / 1000)}`;
1681
+ const secretKey = this.secretKey;
1682
+ const encryptedPassword = CryptoJS.AES.encrypt(addonPassword, secretKey).toString();
1683
+ const payload = {
1684
+ ...this.PasswordForm.value,
1685
+ password: encryptedPassword,
1686
+ confirmPassword: encryptedPassword
1687
+ };
1688
+ this.authService.forgotPassword(payload).subscribe({
1661
1689
  next: (res) => {
1662
1690
  if (res && res.code == 200) {
1663
1691
  this.toast.getSuccessToast("Password updated successfully.");
1664
1692
  this.router.navigate(['auth/login']);
1665
1693
  }
1666
1694
  else {
1695
+ this.PasswordForm.get('password')?.setValue(password);
1696
+ this.PasswordForm.get('confirmPassword')?.setValue(confirmPassword);
1667
1697
  this.toast.getErrorToast('Unable to reset password! Please try again later.');
1668
1698
  }
1669
1699
  },
1670
1700
  error: () => {
1701
+ this.PasswordForm.get('password')?.setValue(password);
1702
+ this.PasswordForm.get('confirmPassword')?.setValue(confirmPassword);
1671
1703
  this.toast.getErrorToast('Unable to reset password! Please try again later.');
1672
1704
  },
1673
1705
  });
1674
1706
  }
1675
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoAuthForgotPasswordComponent, deps: [{ token: i5.ToastService }, { token: AuthService }, { token: i3.ActivatedRoute }, { token: i2$1.FormBuilder }, { token: i3.Router }, { token: i4.PageInfoService }], target: i0.ɵɵFactoryTarget.Component });
1707
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoAuthForgotPasswordComponent, deps: [{ token: i5.ToastService }, { token: AuthService }, { token: i3.ActivatedRoute }, { token: i2$1.FormBuilder }, { token: i4.GlobalStateService }, { token: i3.Router }, { token: i4.PageInfoService }], target: i0.ɵɵFactoryTarget.Component });
1676
1708
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: TangoAuthForgotPasswordComponent, selector: "lib-tango-auth-forgot-password", ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"row position-absolute\">\r\n <div class=\"col-md-6 pe-10 d-flex justify-content-center align-items-center \">\r\n <img src=\"./assets/tango/Icons/LHS.svg\" alt=\"Image\" class=\"img-fluid\">\r\n </div>\r\n @if (emailEnable) {\r\n <div class=\"col-md-6 ps-10 d-flex justify-content-center align-items-center\">\r\n <div class=\"card card-flush w-lg-600px ms-20 py-3 mt-20\">\r\n\r\n <div class=\"login-form login-signin w-100\">\r\n\r\n <div class=\"d-flex flex-column align-items-between title-padding\">\r\n <div class=\"text-start my-10 ms-10\">\r\n <h1 class=\"title my-4\"> Forgot Password\r\n </h1>\r\n <div class=\"title-subtitle mb-1\"> Enter the Email associated with your account and\r\n we'll send you a OTP to reset your password.\r\n </div>\r\n </div>\r\n <form class=\"w-100 title-padding\" novalidate=\"novalidate\">\r\n <div class=\"mb-1\">\r\n <label class=\"label\">Email</label>\r\n <input class=\"form-control my-3\" [formControl]=\"email\" type=\"email\" id=\"email\"\r\n name=\"email\">\r\n </div>\r\n </form>\r\n\r\n <div class=\"d-flex mt-5 mb-5 mx-10\" role=\"group\">\r\n\r\n <button class=\"btn btn-primary w-100\" id=\"alert-toast\" [disabled]=\"email.invalid\"\r\n (click)=\"onSubmit()\">Request reset link</button>\r\n </div>\r\n <a class=\"text-decoration-underline backtologin text-center my-3\" routerLink=\"/auth/login\">Back\r\n to\r\n login</a>\r\n </div>\r\n <div class=\" d-flex flex-column flex-md-row mb-3 flex-md-stack pt-3 container-fluid\">\r\n <div class=\"text-gray-900 order-2 order-md-1 ms-20\">\r\n <span class=\"me-1 footer\">2024</span>\r\n <a target=\"_blank\"\r\n class=\"footer text-decoration-underline cursor-pointer\">&#64;TangoITSolutions\r\n India Pvt Ltd</a>\r\n </div>\r\n <ul class=\"menu menu-gray-600 menu-hover-primary fw-semibold order-1 me-7\">\r\n <li class=\"menu-item footer\"><a target=\"_blank\" href=\"https://tangoeye.ai/#aboutus\"\r\n class=\"menu-link px-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\"\r\n height=\"13\" viewBox=\"0 0 12 13\" fill=\"none\">\r\n <path\r\n d=\"M11 3.7002C11 3.1502 10.55 2.7002 10 2.7002H2C1.45 2.7002 1 3.1502 1 3.7002M11 3.7002V9.7002C11 10.2502 10.55 10.7002 10 10.7002H2C1.45 10.7002 1 10.2502 1 9.7002V3.7002M11 3.7002L6 7.2002L1 3.7002\"\r\n stroke=\"#667085\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">support&#64;tangotech.co.in</span></a></li>\r\n\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n }\r\n @if(passwordEnable) {\r\n <div class=\"col-md-6 ps-10 d-flex justify-content-center align-items-center\">\r\n <div class=\"card card-flush w-lg-600px ms-20 py-3 mt-20\">\r\n\r\n <div class=\"login-form login-signin w-100\">\r\n\r\n <div class=\"d-flex flex-column align-items-between title-padding\">\r\n <div class=\"text-start my-5 ms-10\">\r\n\r\n <h1 class=\"title my-4\">Reset Password\r\n </h1>\r\n <div class=\"title-subtitle mb-7\">Enter a new password to reset the password on your account\r\n </div>\r\n <form [formGroup]=\"PasswordForm\" novalidate=\"novalidate\" class=\"\">\r\n <div class=\"row px-0\">\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"email\" class=\"form-label\">New Password</label>\r\n <div class=\"position-relative mb-3\">\r\n <input [type]=\"newPasswordShow ? 'text' : 'password'\" class=\"form-control\" id=\"password\"\r\n formControlName=\"password\"\r\n [ngClass]=\"{ 'is-invalid': PasswordForm.get('password')?.touched && PasswordForm.get('password')?.hasError('required') }\">\r\n <span (click)=\"showNewPassword()\"\r\n class=\"btn btn-sm btn-icon position-absolute translate-middle top-50 end-0 me-n2\"\r\n data-kt-password-meter-control=\"visibility\">\r\n <i *ngIf=\"newPasswordShow\" class=\"fa fa-eye\" aria-hidden=\"true\"></i>\r\n <i *ngIf=\"!newPasswordShow\" class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>\r\n </span>\r\n </div>\r\n @if(PasswordForm.get('password')?.touched) {\r\n @if (PasswordForm.get('password')?.hasError('required')) {\r\n <small>Password is required</small>\r\n } \r\n }\r\n <small *ngIf=\"PasswordForm.get('password')?.hasError('pattern')\">The password must contain atleast one capital letter, one special character, number and the strength should be more than 7 characters.</small>\r\n <small *ngIf=\"PasswordForm.get('password')?.hasError('noSpaces') && !PasswordForm.get('password')?.hasError('pattern') && PasswordForm.get('password')?.touched\">Password cannot contain spaces.</small> \r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Confirm New Password</label>\r\n <div class=\"position-relative mb-3\">\r\n <input [type]=\"verifyPasswordShow ? 'text' : 'password'\" class=\"form-control\" id=\"confirmPassword\"\r\n formControlName=\"confirmPassword\"\r\n [ngClass]=\"{ 'is-invalid': PasswordForm.get('confirmPassword')?.touched && PasswordForm.get('confirmPassword')?.hasError('required') }\">\r\n <span (click)=\"showVerifyPassword()\"\r\n class=\"btn btn-sm btn-icon position-absolute translate-middle top-50 end-0 me-n2\"\r\n data-kt-password-meter-control=\"visibility\">\r\n <i *ngIf=\"verifyPasswordShow\" class=\"fa fa-eye\" aria-hidden=\"true\"></i>\r\n <i *ngIf=\"!verifyPasswordShow\" class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>\r\n </span>\r\n </div>\r\n @if(PasswordForm.get('confirmPassword')?.touched) {\r\n @if (PasswordForm.get('confirmPassword')?.hasError('required')) {\r\n <small>Confirm password is required</small>\r\n } @else {\r\n <!-- <small *ngIf=\"PasswordForm.get('confirmPassword')?.hasError('pattern')\">The confirm password must\r\n contain atleast one capital letter and number.</small> -->\r\n <small\r\n *ngIf=\"PasswordForm.get('confirmPassword')?.touched && PasswordForm.get('confirmPassword')?.hasError('NotEqual') && !PasswordForm.get('confirmPassword')?.hasError('required')\">Password\r\n does not match</small>\r\n }\r\n <small *ngIf=\"PasswordForm.get('confirmPassword')?.hasError('noSpaces') && !PasswordForm.get('confirmPassword')?.hasError('NotEqual') && PasswordForm.get('confirmPassword')?.touched\">Password cannot contain spaces.</small> \r\n }\r\n </div>\r\n </div>\r\n </form>\r\n <div class=\"d-flex mt-10 mb-5\" role=\"group\">\r\n <button class=\"btn btn-primary w-100 \" id=\"alert-toast\" [disabled]=\"PasswordForm.invalid\"\r\n (click)=\"onPasswordSubmit()\">Reset\r\n password</button>\r\n </div>\r\n </div>\r\n <a class=\"text-decoration-underline backtologin text-center\" routerLink=\"/auth/login\">Back to\r\n login</a>\r\n\r\n </div>\r\n <div class=\" d-flex flex-column flex-md-row mb-3 flex-md-stack pt-3 container-fluid\">\r\n <div class=\"text-gray-900 order-2 order-md-1 ms-20\">\r\n <span class=\"me-1 footer\">2024</span>\r\n <a target=\"_blank\"\r\n class=\"footer text-decoration-underline cursor-pointer\">&#64;TangoITSolutions\r\n India Pvt Ltd</a>\r\n </div>\r\n <ul class=\"menu menu-gray-600 menu-hover-primary fw-semibold order-1 me-7\">\r\n <li class=\"menu-item footer\"><a target=\"_blank\" href=\"https://tangoeye.ai/#aboutus\"\r\n class=\"menu-link px-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\"\r\n height=\"13\" viewBox=\"0 0 12 13\" fill=\"none\">\r\n <path\r\n d=\"M11 3.7002C11 3.1502 10.55 2.7002 10 2.7002H2C1.45 2.7002 1 3.1502 1 3.7002M11 3.7002V9.7002C11 10.2502 10.55 10.7002 10 10.7002H2C1.45 10.7002 1 10.2502 1 9.7002V3.7002M11 3.7002L6 7.2002L1 3.7002\"\r\n stroke=\"#667085\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">support&#64;tangotech.co.in</span></a></li>\r\n\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <img src=\"./assets/tango/Icons/login-background1.svg\" alt=\"Image\" class=\"background-image\">\r\n</div>\r\n\r\n\r\n\r\n\r\n", styles: [".title{color:var(--Gray-900, #101828)!important;font-size:24px!important;font-weight:600;line-height:32px!important}.title-subtitle{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400;line-height:20px!important}.label{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:500;line-height:20px!important}:host ::ng-deep .ng-otp-input-wrapper .otp-input:first-child{margin:0}:host ::ng-deep .ng-otp-input-wrapper .otp-input{margin-right:0!important;height:80px!important;width:80px;padding:8px;text-align:center;margin:10px 38px;color:var(--Gray-300, #D0D5DD)!important;font-size:60px;font-style:normal;font-weight:500;line-height:72px;letter-spacing:-1.2px;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d}.small_lbl{color:var(--Gray-500, #667085);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.container{width:100%;height:100%;overflow:hidden}.background-image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:-1}.content{position:relative;z-index:1;width:45%;margin-left:auto;padding:20px;border-radius:16px;background:#fff;box-shadow:0 4px 10px #0000000d}.login-form .title-padding{padding:0 32px}.login-form .login-title{color:var(--Gray-900, #101828);font-size:36px;font-weight:600;line-height:44px;letter-spacing:-.72px}.login-form .login-sub-title{color:var(--Gray-500, #667085);font-size:16px;font-weight:400;line-height:24px}.login-form .form-label{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:500;line-height:20px}.login-form .img-src{padding:10px 5px 32px}.login-form .mx-25{margin-right:-10px!important;margin-left:-45px!important}.login-form .w-360px{width:360px!important}.login-form .forgot{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600;line-height:20px;text-decoration-line:underline;text-transform:capitalize;text-align:center}.login-form .signup-default{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.login-form .signup-primary{color:var(--Primary-700, #009BF3)!important;font-size:14px;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.login-form .footer{color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:400!important;line-height:20px}@media (min-width: 1745px) and (max-width: 1910px){.mt-6{margin-top:7rem!important}}@media (min-width: 1920px) and (max-width: 2100px){.mt-6{margin-top:10rem!important}.login-form .mx-25{margin-right:0!important;margin-left:20px!important}}.position-absolute{position:absolute;top:50%;transform:translateY(-50%)}.card{border-radius:16px;background:#fff;box-shadow:0 4px 10px #0000000d}.backtologin{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:600;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.form-control{display:block;color:var(--Gray-500, #667085);font-size:16px;font-weight:400;line-height:24px;-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-select{font-size:1.1rem;font-weight:600;line-height:2.35;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important}.form-label{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:500;line-height:20px}small{color:var(--Error-500, #F04438)!important;font-size:13px!important;font-weight:400!important;line-height:20px}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}.alert-required{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:500!important;line-height:20px}.translate-middle{transform:translate(-65%,-50%)!important}\n"], dependencies: [{ kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
1677
1709
  }
1678
1710
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoAuthForgotPasswordComponent, decorators: [{
1679
1711
  type: Component,
1680
1712
  args: [{ selector: "lib-tango-auth-forgot-password", template: "<div class=\"container\">\r\n <div class=\"row position-absolute\">\r\n <div class=\"col-md-6 pe-10 d-flex justify-content-center align-items-center \">\r\n <img src=\"./assets/tango/Icons/LHS.svg\" alt=\"Image\" class=\"img-fluid\">\r\n </div>\r\n @if (emailEnable) {\r\n <div class=\"col-md-6 ps-10 d-flex justify-content-center align-items-center\">\r\n <div class=\"card card-flush w-lg-600px ms-20 py-3 mt-20\">\r\n\r\n <div class=\"login-form login-signin w-100\">\r\n\r\n <div class=\"d-flex flex-column align-items-between title-padding\">\r\n <div class=\"text-start my-10 ms-10\">\r\n <h1 class=\"title my-4\"> Forgot Password\r\n </h1>\r\n <div class=\"title-subtitle mb-1\"> Enter the Email associated with your account and\r\n we'll send you a OTP to reset your password.\r\n </div>\r\n </div>\r\n <form class=\"w-100 title-padding\" novalidate=\"novalidate\">\r\n <div class=\"mb-1\">\r\n <label class=\"label\">Email</label>\r\n <input class=\"form-control my-3\" [formControl]=\"email\" type=\"email\" id=\"email\"\r\n name=\"email\">\r\n </div>\r\n </form>\r\n\r\n <div class=\"d-flex mt-5 mb-5 mx-10\" role=\"group\">\r\n\r\n <button class=\"btn btn-primary w-100\" id=\"alert-toast\" [disabled]=\"email.invalid\"\r\n (click)=\"onSubmit()\">Request reset link</button>\r\n </div>\r\n <a class=\"text-decoration-underline backtologin text-center my-3\" routerLink=\"/auth/login\">Back\r\n to\r\n login</a>\r\n </div>\r\n <div class=\" d-flex flex-column flex-md-row mb-3 flex-md-stack pt-3 container-fluid\">\r\n <div class=\"text-gray-900 order-2 order-md-1 ms-20\">\r\n <span class=\"me-1 footer\">2024</span>\r\n <a target=\"_blank\"\r\n class=\"footer text-decoration-underline cursor-pointer\">&#64;TangoITSolutions\r\n India Pvt Ltd</a>\r\n </div>\r\n <ul class=\"menu menu-gray-600 menu-hover-primary fw-semibold order-1 me-7\">\r\n <li class=\"menu-item footer\"><a target=\"_blank\" href=\"https://tangoeye.ai/#aboutus\"\r\n class=\"menu-link px-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\"\r\n height=\"13\" viewBox=\"0 0 12 13\" fill=\"none\">\r\n <path\r\n d=\"M11 3.7002C11 3.1502 10.55 2.7002 10 2.7002H2C1.45 2.7002 1 3.1502 1 3.7002M11 3.7002V9.7002C11 10.2502 10.55 10.7002 10 10.7002H2C1.45 10.7002 1 10.2502 1 9.7002V3.7002M11 3.7002L6 7.2002L1 3.7002\"\r\n stroke=\"#667085\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">support&#64;tangotech.co.in</span></a></li>\r\n\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n }\r\n @if(passwordEnable) {\r\n <div class=\"col-md-6 ps-10 d-flex justify-content-center align-items-center\">\r\n <div class=\"card card-flush w-lg-600px ms-20 py-3 mt-20\">\r\n\r\n <div class=\"login-form login-signin w-100\">\r\n\r\n <div class=\"d-flex flex-column align-items-between title-padding\">\r\n <div class=\"text-start my-5 ms-10\">\r\n\r\n <h1 class=\"title my-4\">Reset Password\r\n </h1>\r\n <div class=\"title-subtitle mb-7\">Enter a new password to reset the password on your account\r\n </div>\r\n <form [formGroup]=\"PasswordForm\" novalidate=\"novalidate\" class=\"\">\r\n <div class=\"row px-0\">\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"email\" class=\"form-label\">New Password</label>\r\n <div class=\"position-relative mb-3\">\r\n <input [type]=\"newPasswordShow ? 'text' : 'password'\" class=\"form-control\" id=\"password\"\r\n formControlName=\"password\"\r\n [ngClass]=\"{ 'is-invalid': PasswordForm.get('password')?.touched && PasswordForm.get('password')?.hasError('required') }\">\r\n <span (click)=\"showNewPassword()\"\r\n class=\"btn btn-sm btn-icon position-absolute translate-middle top-50 end-0 me-n2\"\r\n data-kt-password-meter-control=\"visibility\">\r\n <i *ngIf=\"newPasswordShow\" class=\"fa fa-eye\" aria-hidden=\"true\"></i>\r\n <i *ngIf=\"!newPasswordShow\" class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>\r\n </span>\r\n </div>\r\n @if(PasswordForm.get('password')?.touched) {\r\n @if (PasswordForm.get('password')?.hasError('required')) {\r\n <small>Password is required</small>\r\n } \r\n }\r\n <small *ngIf=\"PasswordForm.get('password')?.hasError('pattern')\">The password must contain atleast one capital letter, one special character, number and the strength should be more than 7 characters.</small>\r\n <small *ngIf=\"PasswordForm.get('password')?.hasError('noSpaces') && !PasswordForm.get('password')?.hasError('pattern') && PasswordForm.get('password')?.touched\">Password cannot contain spaces.</small> \r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Confirm New Password</label>\r\n <div class=\"position-relative mb-3\">\r\n <input [type]=\"verifyPasswordShow ? 'text' : 'password'\" class=\"form-control\" id=\"confirmPassword\"\r\n formControlName=\"confirmPassword\"\r\n [ngClass]=\"{ 'is-invalid': PasswordForm.get('confirmPassword')?.touched && PasswordForm.get('confirmPassword')?.hasError('required') }\">\r\n <span (click)=\"showVerifyPassword()\"\r\n class=\"btn btn-sm btn-icon position-absolute translate-middle top-50 end-0 me-n2\"\r\n data-kt-password-meter-control=\"visibility\">\r\n <i *ngIf=\"verifyPasswordShow\" class=\"fa fa-eye\" aria-hidden=\"true\"></i>\r\n <i *ngIf=\"!verifyPasswordShow\" class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>\r\n </span>\r\n </div>\r\n @if(PasswordForm.get('confirmPassword')?.touched) {\r\n @if (PasswordForm.get('confirmPassword')?.hasError('required')) {\r\n <small>Confirm password is required</small>\r\n } @else {\r\n <!-- <small *ngIf=\"PasswordForm.get('confirmPassword')?.hasError('pattern')\">The confirm password must\r\n contain atleast one capital letter and number.</small> -->\r\n <small\r\n *ngIf=\"PasswordForm.get('confirmPassword')?.touched && PasswordForm.get('confirmPassword')?.hasError('NotEqual') && !PasswordForm.get('confirmPassword')?.hasError('required')\">Password\r\n does not match</small>\r\n }\r\n <small *ngIf=\"PasswordForm.get('confirmPassword')?.hasError('noSpaces') && !PasswordForm.get('confirmPassword')?.hasError('NotEqual') && PasswordForm.get('confirmPassword')?.touched\">Password cannot contain spaces.</small> \r\n }\r\n </div>\r\n </div>\r\n </form>\r\n <div class=\"d-flex mt-10 mb-5\" role=\"group\">\r\n <button class=\"btn btn-primary w-100 \" id=\"alert-toast\" [disabled]=\"PasswordForm.invalid\"\r\n (click)=\"onPasswordSubmit()\">Reset\r\n password</button>\r\n </div>\r\n </div>\r\n <a class=\"text-decoration-underline backtologin text-center\" routerLink=\"/auth/login\">Back to\r\n login</a>\r\n\r\n </div>\r\n <div class=\" d-flex flex-column flex-md-row mb-3 flex-md-stack pt-3 container-fluid\">\r\n <div class=\"text-gray-900 order-2 order-md-1 ms-20\">\r\n <span class=\"me-1 footer\">2024</span>\r\n <a target=\"_blank\"\r\n class=\"footer text-decoration-underline cursor-pointer\">&#64;TangoITSolutions\r\n India Pvt Ltd</a>\r\n </div>\r\n <ul class=\"menu menu-gray-600 menu-hover-primary fw-semibold order-1 me-7\">\r\n <li class=\"menu-item footer\"><a target=\"_blank\" href=\"https://tangoeye.ai/#aboutus\"\r\n class=\"menu-link px-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\"\r\n height=\"13\" viewBox=\"0 0 12 13\" fill=\"none\">\r\n <path\r\n d=\"M11 3.7002C11 3.1502 10.55 2.7002 10 2.7002H2C1.45 2.7002 1 3.1502 1 3.7002M11 3.7002V9.7002C11 10.2502 10.55 10.7002 10 10.7002H2C1.45 10.7002 1 10.2502 1 9.7002V3.7002M11 3.7002L6 7.2002L1 3.7002\"\r\n stroke=\"#667085\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">support&#64;tangotech.co.in</span></a></li>\r\n\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <img src=\"./assets/tango/Icons/login-background1.svg\" alt=\"Image\" class=\"background-image\">\r\n</div>\r\n\r\n\r\n\r\n\r\n", styles: [".title{color:var(--Gray-900, #101828)!important;font-size:24px!important;font-weight:600;line-height:32px!important}.title-subtitle{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400;line-height:20px!important}.label{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:500;line-height:20px!important}:host ::ng-deep .ng-otp-input-wrapper .otp-input:first-child{margin:0}:host ::ng-deep .ng-otp-input-wrapper .otp-input{margin-right:0!important;height:80px!important;width:80px;padding:8px;text-align:center;margin:10px 38px;color:var(--Gray-300, #D0D5DD)!important;font-size:60px;font-style:normal;font-weight:500;line-height:72px;letter-spacing:-1.2px;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d}.small_lbl{color:var(--Gray-500, #667085);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.container{width:100%;height:100%;overflow:hidden}.background-image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:-1}.content{position:relative;z-index:1;width:45%;margin-left:auto;padding:20px;border-radius:16px;background:#fff;box-shadow:0 4px 10px #0000000d}.login-form .title-padding{padding:0 32px}.login-form .login-title{color:var(--Gray-900, #101828);font-size:36px;font-weight:600;line-height:44px;letter-spacing:-.72px}.login-form .login-sub-title{color:var(--Gray-500, #667085);font-size:16px;font-weight:400;line-height:24px}.login-form .form-label{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:500;line-height:20px}.login-form .img-src{padding:10px 5px 32px}.login-form .mx-25{margin-right:-10px!important;margin-left:-45px!important}.login-form .w-360px{width:360px!important}.login-form .forgot{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600;line-height:20px;text-decoration-line:underline;text-transform:capitalize;text-align:center}.login-form .signup-default{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.login-form .signup-primary{color:var(--Primary-700, #009BF3)!important;font-size:14px;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.login-form .footer{color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:400!important;line-height:20px}@media (min-width: 1745px) and (max-width: 1910px){.mt-6{margin-top:7rem!important}}@media (min-width: 1920px) and (max-width: 2100px){.mt-6{margin-top:10rem!important}.login-form .mx-25{margin-right:0!important;margin-left:20px!important}}.position-absolute{position:absolute;top:50%;transform:translateY(-50%)}.card{border-radius:16px;background:#fff;box-shadow:0 4px 10px #0000000d}.backtologin{color:var(--Primary-700, #009BF3);font-size:14px;font-weight:600;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.form-control{display:block;color:var(--Gray-500, #667085);font-size:16px;font-weight:400;line-height:24px;-webkit-appearance:none;appearance:none;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-select{font-size:1.1rem;font-weight:600;line-height:2.35;border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important}.form-label{color:var(--Gray-700, #344054);font-size:14px;font-style:normal;font-weight:500;line-height:20px}small{color:var(--Error-500, #F04438)!important;font-size:13px!important;font-weight:400!important;line-height:20px}.is-invalid{border-radius:8px!important;border:1px solid var(--Error-300, #FDA29B)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;padding-right:calc(1.5em + .75rem)!important;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMDFfMjA5NTApIj4KPHBhdGggZD0iTTcuOTk5NjcgNS4zMzM5OFY4LjAwMDY1TTcuOTk5NjcgMTAuNjY3M0g4LjAwNjM0TTE0LjY2NjMgOC4wMDA2NUMxNC42NjYzIDExLjY4MjYgMTEuNjgxNiAxNC42NjczIDcuOTk5NjcgMTQuNjY3M0M0LjMxNzc4IDE0LjY2NzMgMS4zMzMwMSAxMS42ODI2IDEuMzMzMDEgOC4wMDA2NUMxLjMzMzAxIDQuMzE4NzUgNC4zMTc3OCAxLjMzMzk4IDcuOTk5NjcgMS4zMzM5OEMxMS42ODE2IDEuMzMzOTggMTQuNjY2MyA0LjMxODc1IDE0LjY2NjMgOC4wMDA2NVoiIHN0cm9rZT0iI0YwNDQzOCIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjAxXzIwOTUwIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=)!important;background-repeat:no-repeat!important;background-position:right calc(.375em + .1875rem) center!important;background-size:calc(.75em + .375rem) calc(.75em + .375rem)!important}.alert-required{color:var(--Error-500, #F04438)!important;font-size:14px!important;font-weight:500!important;line-height:20px}.translate-middle{transform:translate(-65%,-50%)!important}\n"] }]
1681
- }], ctorParameters: () => [{ type: i5.ToastService }, { type: AuthService }, { type: i3.ActivatedRoute }, { type: i2$1.FormBuilder }, { type: i3.Router }, { type: i4.PageInfoService }] });
1713
+ }], ctorParameters: () => [{ type: i5.ToastService }, { type: AuthService }, { type: i3.ActivatedRoute }, { type: i2$1.FormBuilder }, { type: i4.GlobalStateService }, { type: i3.Router }, { type: i4.PageInfoService }] });
1682
1714
 
1683
1715
  const routes = [
1684
1716
  {