{"version":3,"file":"biit-solutions-wizardry-theme-login.mjs","names":[],"sources":["../../../projects/wizardry-theme/login/src/biit-login/models/LoginErrors.ts","../../../projects/wizardry-theme/login/src/biit-login/models/sign-up-request.ts","../../../projects/wizardry-theme/login/src/biit-login/biit-login.component.ts","../../../projects/wizardry-theme/login/src/biit-login/biit-login.component.html","../../../projects/wizardry-theme/login/src/biit-login/biit-login.module.ts"],"sourcesContent":["export enum LoginErrors {\n  USERNAME = \"USERNAME\",\n  PASSWORD = \"PASSWORD\",\n  EMAIL = \"EMAIL\",\n  NAME = \"NAME\",\n  TEAM = \"TEAM\",\n  LASTNAME = \"LASTNAME\"\n}\n","export class SignUpRequest {\n  name: string;\n  lastname: string;\n  username: string;\n  email: string;\n  password: string;\n  team: string;\n  organization: string;\n  constructor() {\n    this.name = '';\n    this.lastname = '';\n    this.username = '';\n    this.email = '';\n    this.password = '';\n    this.team = null;\n  }\n}\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {Type} from '@biit-solutions/wizardry-theme/inputs';\nimport {BiitLogin} from \"@biit-solutions/wizardry-theme/models\";\nimport {LoginErrors} from \"./models/LoginErrors\";\nimport {TRANSLOCO_SCOPE, TranslocoService} from \"@jsverse/transloco\";\nimport {SignUpRequest} from \"./models/sign-up-request\";\nimport {HttpErrorResponse} from \"@angular/common/http\";\nimport {BiitLoginServiceSupport} from \"./models/biit-login-service-support\";\nimport {debounceTime, Subject} from \"rxjs\";\n\n@Component({\n    selector: 'biit-login',\n    templateUrl: './biit-login.component.html',\n    styleUrls: ['./biit-login.component.scss'],\n    providers: [{\n            provide: TRANSLOCO_SCOPE,\n            useValue: { scope: 'wizardry-theme/login', alias: \"login\" },\n            multi: true\n        }, {\n            provide: TRANSLOCO_SCOPE,\n            useValue: { scope: 'wizardry-theme/login-welcome', alias: \"login-welcome\" },\n            multi: true\n        }],\n    standalone: false\n})\nexport class BiitLoginComponent implements OnInit {\n\n  @Input() login: BiitLogin;\n  @Input() allowSignUp = false;\n  @Input() allowResetPassword = true;\n  @Input() signUpGeneratedPassword = false;\n  @Input() signUpGeneratedUsername = true;\n  @Input() teams: { key: any, label: string }[];\n  @Input() biitLoginServiceSupport: BiitLoginServiceSupport;\n  @Input() notification: boolean = false;\n  @Input() displayLogin: boolean = false;\n  @Input() signupIfCookies: boolean = true;\n\n  @Output() onLogin: EventEmitter<BiitLogin>;\n  @Output() onNotRemember: EventEmitter<void>;\n  @Output() onResetPassword: EventEmitter<string>;\n  @Output() onSignUp: EventEmitter<SignUpRequest>;\n\n  protected readonly keyId: string;\n  protected readonly Type = Type;\n  protected readonly LoginError = LoginErrors;\n\n  protected signUpView = false;\n  protected signUpData: SignUpRequest = new SignUpRequest();\n  protected resetView = false;\n  protected resetEmail = \"\";\n  protected dumbTeam: { key: any, label: string };\n\n  protected loginErrors: Map<LoginErrors, string>;\n  protected readonly LoginErrors = LoginErrors;\n  protected readonly PWD_MIN_LENGTH = 12\n  protected readonly PWD_MAX_LENGTH = 25\n\n  protected usernameSearch: Subject<string> = new Subject();\n  protected showNotification: boolean = true;\n\n  constructor(public translocoService: TranslocoService) {\n    if (!this.login) {\n      this.login = new BiitLogin();\n    }\n    this.usernameSearch.pipe(debounceTime(1000)).subscribe(() => this.checkUsernameExists());\n    this.onLogin = new EventEmitter<BiitLogin>();\n    this.onNotRemember = new EventEmitter<void>();\n    this.onResetPassword = new EventEmitter<string>();\n    this.onSignUp = new EventEmitter<SignUpRequest>();\n    this.loginErrors = new Map<LoginErrors, string>();\n    const generatedId: number = Math.floor(Math.random() * (20 - 1 + 1) + 1);\n    this.keyId = `${generatedId < 10 ? '0' : ''}${generatedId}`\n  }\n\n  ngOnInit() {\n    if (this.allowSignUp && !this.displayLogin) {\n      if (this.signupIfCookies) {\n        const cookiesAccepted: string | null = localStorage.getItem(\"cookies-consent\");\n        if (!cookiesAccepted) {\n          this.signUpView = true;\n        }\n      } else {\n        this.signUpView = true;\n      }\n    }\n    if (this.teams && this.teams.length) {\n      this.dumbTeam = this.teams[0];\n      this.signUpData.team = this.dumbTeam.key;\n    }\n  }\n\n  protected performLogin(): void {\n    if (this.validateLogin()) {\n      //Trim username\n      if (this.login && this.login.username) {\n        this.login.username = this.login.username.trim();\n      }\n      this.onLogin.emit(this.login)\n    }\n  }\n\n  private validateLogin(): boolean {\n    this.loginErrors.clear();\n    if (!this.login.username || !this.login.username.length) {\n      this.loginErrors.set(LoginErrors.USERNAME, this.translocoService.translate('login.username-empty'));\n    }\n    if (!this.login.password || !this.login.password.length) {\n      this.loginErrors.set(LoginErrors.PASSWORD, this.translocoService.translate('login.password-empty'));\n    }\n    return !this.loginErrors.size;\n  }\n\n  protected performResetPassword(): void {\n    if (this.validateResetPassword()) {\n      this.onResetPassword.emit(this.resetEmail);\n      this.restartView();\n    }\n  }\n\n  private validateResetPassword(): boolean {\n    this.loginErrors.clear();\n    if (!this.resetEmail.length) {\n      this.loginErrors.set(LoginErrors.EMAIL, this.translocoService.translate('login.email-empty'));\n    }\n    return !this.loginErrors.get(LoginErrors.EMAIL);\n  }\n\n  restartView() {\n    this.loginErrors.clear();\n\n    this.resetView = false;\n    this.resetEmail = \"\";\n\n    this.signUpView = false;\n    this.signUpData = new SignUpRequest();\n  }\n\n  protected performSignUp(): void {\n    this.signUpData.team = this.dumbTeam?.key;\n    if (this.validateSignUp()) {\n      if (this.signUpGeneratedPassword) {\n        this.signUpData.password = this.generatePassword();\n      }\n      if (this.dumbTeam) {\n        this.signUpData.team = this.dumbTeam.key;\n      }\n      this.onSignUp.emit(this.signUpData);\n    }\n  }\n\n  private validateSignUp(): boolean {\n    this.loginErrors.clear();\n    // if (!this.signUpData.name || !this.signUpData.name.length) {\n    //   this.loginErrors.set(LoginErrors.NAME, this.translocoService.translate('login.name-empty'));\n    // }\n    // if (!this.signUpData.lastname || !this.signUpData.lastname.length) {\n    //   this.loginErrors.set(LoginErrors.LASTNAME, this.translocoService.translate('login.lastname-empty'));\n    // }\n    if (!this.signUpData.email || !this.signUpData.email.length) {\n      this.loginErrors.set(LoginErrors.EMAIL, this.translocoService.translate('login.email-empty'));\n      console.error(\"Email is mandatory\");\n    }\n    if (!this.signUpGeneratedPassword && (!this.signUpData.password || !this.signUpData.password.length)) {\n      this.loginErrors.set(LoginErrors.PASSWORD, this.translocoService.translate('login.password-empty'));\n      console.error(\"Password is mandatory\");\n    }\n    if (!this.signUpGeneratedUsername && (!this.signUpData.username || !this.signUpData.username.length)) {\n      this.loginErrors.set(LoginErrors.USERNAME, this.translocoService.translate('login.username-empty'));\n      console.error(\"Username is mandatory\");\n    }\n    if ((this.teams && this.teams.length) && (!this.signUpData.team || !this.signUpData.team.length)) {\n      this.loginErrors.set(LoginErrors.TEAM, this.translocoService.translate('login.team-mandatory'));\n      console.error(\"Team is mandatory\");\n    }\n    return !this.loginErrors.size;\n  }\n\n  public generatePassword(): string {\n    const pattern: RegExp = /[A-Za-z\\d@$!%*?&]/;\n    const randomSize: number = Math.floor(Math.random() * (this.PWD_MAX_LENGTH - this.PWD_MIN_LENGTH + 1))\n      + this.PWD_MIN_LENGTH;\n    let password: string = '';\n    while (password.length < randomSize) {\n      const result: string = String.fromCharCode(this.randomChar());\n      if (pattern.test(result)) {\n        password += result;\n      }\n    }\n    return password;\n  }\n\n  private randomChar(): number {\n    if (window.crypto && window.crypto.getRandomValues) {\n      const buffer = new Uint8Array(new ArrayBuffer(1));\n      window.crypto.getRandomValues(buffer);\n      return buffer[0];\n    } else {\n      return Math.floor(Math.random() * 256);\n    }\n  }\n\n\n  protected checkUsernameExists(): void {\n    if (this.signUpData.username && this.signUpData.username.length) {\n      this.biitLoginServiceSupport.checkUserName(this.signUpData.username).then((exists: boolean) => {\n        if (exists) {\n          this.loginErrors.set(this.LoginError.USERNAME, this.translocoService.translate('login.username-exists'));\n        } else {\n          this.loginErrors.delete(this.LoginError.USERNAME);\n        }\n      }).catch((error: HttpErrorResponse) => {\n        if (error instanceof HttpErrorResponse) {\n          switch (error.status) {\n            case 409:\n            case 400:\n              this.loginErrors.set(this.LoginError.USERNAME, this.translocoService.translate('login.username-exists'));\n              break;\n            default:\n              throw error;\n          }\n        }\n      });\n    }\n  }\n}\n","<biit-popup no-header *transloco=\"let t\">\n  @if (allowSignUp && !resetView) {\n    <div id=\"login-tabs\"\n      class=\"tab-buttons\"\n      >\n      <div id=\"tab-login\"\n        [class.selected]=\"!signUpView\"\n        (click)=\"signUpView = false\"\n        >\n        {{ t('login.log_in') }}\n      </div>\n      <div id=\"tab-signup\"\n        [class.selected]=\"signUpView\"\n        (click)=\"signUpView = true\"\n        >\n        {{ t('login.sign_up') }}\n      </div>\n    </div>\n  }\n  <div class=\"login-container\" [class.allow-signup]=\"allowSignUp\">\n    <div class=\"login-column\">\n      <div class=\"login-icon-square\">\n        <div class=\"login-keyring\"></div>\n        <biit-icon [name]=\"$any('key_' + keyId)\" class=\"login-key-icon\"></biit-icon>\n      </div>\n    </div>\n    <ng-container *ngTemplateOutlet=\"resetView ? resetForm : signUpView ? signUpForm : loginForm\"></ng-container>\n  </div>\n</biit-popup>\n\n<ng-template #loginForm>\n  <div id=\"login-column\" class=\"login-column\" *transloco=\"let t\">\n    <biit-input-text id=\"login-username\" [(ngModel)]=\"login.username\" fieldName=\"username\" [type]=\"Type.TEXT\"\n      [error]=\"this.loginErrors.get(LoginError.USERNAME)\"\n      (keyup.enter)=\"performLogin()\"\n    placeholder=\"{{t('login.username')}}\" class=\"login-input\"></biit-input-text>\n    <biit-input-text id=\"login-password\" [(ngModel)]=\"login.password\" fieldName=\"password\"\n      [error]=\"this.loginErrors.get(LoginError.PASSWORD)\"\n      (keyup.enter)=\"performLogin()\"\n    placeholder=\"{{t('login.password')}}\" [type]=\"Type.PASSWORD\" class=\"login-input\"></biit-input-text>\n    <biit-toggle\n      class=\"margin-vertical-14\"\n      [(ngModel)]=\"login.remember\">\n      {{ t('login.remember') }}\n    </biit-toggle>\n    <div class=\"margin-top-18 centered\">\n      <button id=\"login-button\" biit-button primary\n        (click)=\"performLogin()\"\n        >\n        {{ t('login.take_me_in') }}\n      </button>\n    </div>\n    <div class=\"margin-top-18 centered\">\n      @if (allowResetPassword) {\n        <button biit-button tertiary\n          (click)=\"resetView = true\"\n          class=\"smaller-text\"\n          >\n          {{ t('login.forgot') }}\n        </button>\n      }\n    </div>\n  </div>\n</ng-template>\n\n<ng-template #resetForm>\n  <div class=\"login-column-expanded\" *transloco=\"let t\">\n    <span class=\"title\">\n      {{ t('login.reset_password_title') }}\n    </span>\n    <span class=\"subtitle\"\n      style=\"margin-top: 1em;\">\n      {{ t('login.reset_password_subtitle') }}\n    </span>\n    <span class=\"body\"\n      style=\"margin-top: 0.5em\">\n      {{ t('login.reset_password_body') }}\n    </span>\n    <biit-input-text [(ngModel)]=\"resetEmail\" fieldName=\"email\" [type]=\"Type.EMAIL\"\n      [error]=\"this.loginErrors.get(LoginError.EMAIL)\"\n      (keyup.enter)=\"performResetPassword()\" style=\"margin-top: 2em; margin-bottom: 2.5em\"\n    placeholder=\"{{t('login.email')}}\" class=\"login-input\"></biit-input-text>\n    <div class=\"buttons\">\n      <button biit-button (click)=\"performResetPassword()\">\n        {{ t('login.reset') }}\n      </button>\n      <button biit-button tertiary (click)=\"restartView()\" class=\"smaller-text\">\n        {{ t('login.i_remember') }}\n      </button>\n    </div>\n  </div>\n</ng-template>\n\n<ng-template #signUpForm>\n  <div id=\"signup-column\" class=\"login-column\" *transloco=\"let t\">\n    @if (!signUpGeneratedUsername) {\n      <biit-input-text id=\"signup-username\" [(ngModel)]=\"signUpData.username\" fieldName=\"username\"\n        [type]=\"Type.TEXT\"\n        [error]=\"this.loginErrors.get(LoginError.USERNAME)\"\n        (keyup.enter)=\"performLogin()\"\n        (ngModelChange)=\"usernameSearch.next($event)\"\n      placeholder=\"{{t('login.username')}}\" class=\"login-input\"></biit-input-text>\n    }\n    <biit-input-text id=\"signup-name\" [(ngModel)]=\"signUpData.name\" fieldName=\"name\" [type]=\"Type.TEXT\"\n      [error]=\"this.loginErrors.get(LoginError.NAME)\"\n      (keyup.enter)=\"performLogin()\"\n    placeholder=\"{{t('login.name')}}\" class=\"login-input\"></biit-input-text>\n    <biit-input-text id=\"signup-lastname\" [(ngModel)]=\"signUpData.lastname\" fieldName=\"lastname\" [type]=\"Type.TEXT\"\n      [error]=\"this.loginErrors.get(LoginError.LASTNAME)\"\n      (keyup.enter)=\"performLogin()\"\n    placeholder=\"{{t('login.lastname')}}\" class=\"login-input\"></biit-input-text>\n    <biit-input-text id=\"signup-email\" [(ngModel)]=\"signUpData.email\" fieldName=\"email\" [type]=\"Type.TEXT\"\n      [error]=\"this.loginErrors.get(LoginError.EMAIL)\" [required]=\"true\"\n      (keyup.enter)=\"performLogin()\"\n    placeholder=\"{{t('login.email')}}\" class=\"login-input\"></biit-input-text>\n    @if (teams && teams.length) {\n      <biit-dropdown\n        [(ngModel)]=\"dumbTeam\"\n        [required]=\"true\"\n        [data]=\"teams\"\n        value=\"key\"\n        label=\"label\"\n        title=\"{{t('login.team')}}\" class=\"login-input\"/>\n    }\n    @if (!signUpGeneratedPassword) {\n      <biit-input-text id=\"signup-password\" [(ngModel)]=\"signUpData.password\" fieldName=\"password\"\n        [error]=\"this.loginErrors.get(LoginError.PASSWORD)\"\n        (keyup.enter)=\"performLogin()\"\n      placeholder=\"{{t('login.password')}}\" [type]=\"Type.PASSWORD\" class=\"login-input\"></biit-input-text>\n    }\n    <div class=\"margin-top-18 centered\">\n      <button id=\"signup-button\" biit-button primary\n        (click)=\"performSignUp()\"\n        >\n        {{ t('login.sign_me_up') }}\n      </button>\n    </div>\n  </div>\n  <div *transloco=\"let t\">\n    @if (notification && showNotification) {\n      <biit-popup id=\"warning-popup\"\n        [title]=\"t('login-welcome.warning_window.tittle')\"\n        closable\n        (onClosed)=\"showNotification = false\">\n        <div [innerHTML]=\"t('login-welcome.warning_window.content')\"></div>\n      </biit-popup>\n    }\n  </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BiitLoginComponent } from './biit-login.component';\nimport {BiitPopupModule} from \"@biit-solutions/wizardry-theme/popup\";\nimport {BiitIconModule} from \"@biit-solutions/wizardry-theme/icon\";\nimport {BiitDropdownModule, BiitInputTextModule, BiitToggleModule} from \"@biit-solutions/wizardry-theme/inputs\";\nimport {FormsModule} from \"@angular/forms\";\nimport {BiitButtonModule} from \"@biit-solutions/wizardry-theme/button\";\nimport {TranslocoRootModule} from \"@biit-solutions/wizardry-theme/i18n\";\n\n\n@NgModule({\n  declarations: [\n    BiitLoginComponent\n  ],\n  imports: [\n    CommonModule,\n    BiitPopupModule,\n    BiitIconModule,\n    BiitInputTextModule,\n    FormsModule,\n    BiitToggleModule,\n    BiitButtonModule,\n    TranslocoRootModule,\n    BiitDropdownModule\n  ], exports: [\n    BiitLoginComponent\n  ]\n})\nexport class BiitLoginModule { }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAY;CAAZ,SAAY,aAAW;CACrB,YAAA,cAAA;CACA,YAAA,cAAA;CACA,YAAA,WAAA;CACA,YAAA,UAAA;CACA,YAAA,UAAA;CACA,YAAA,cAAA;AACF,EAAA,CAPY,gBAAA,cAAW,CAAA,EAAA;ACAvB,IAAa,gBAAb,MAA0B;CAQxB,cAAA;EACE,KAAK,OAAO;EACZ,KAAK,WAAW;EAChB,KAAK,WAAW;EAChB,KAAK,QAAQ;EACb,KAAK,WAAW;EAChB,KAAK,OAAO;CACd;AACD;ACSD,IAAa,qBAAb,MAAa,mBAAkB;CAoC7B,YAAmB,kBAAkC;EAAlC,KAAA,mBAAA;EAjCV,KAAA,cAAc;EACd,KAAA,qBAAqB;EACrB,KAAA,0BAA0B;EAC1B,KAAA,0BAA0B;EAG1B,KAAA,eAAwB;EACxB,KAAA,eAAwB;EACxB,KAAA,kBAA2B;EAQjB,KAAA,OAAO;EACP,KAAA,aAAa;EAEtB,KAAA,aAAa;EACb,KAAA,aAA4B,IAAI,cAAa;EAC7C,KAAA,YAAY;EACZ,KAAA,aAAa;EAIJ,KAAA,cAAc;EAC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