cloud-ide-auth 1.0.82 → 1.0.85

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.
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, Injectable, Component, signal, DestroyRef, Injector } from '@angular/core';
4
- import { MLogin, customEncrypt, cidePath, hostManagerRoutesUrl, authRoutesUrl, MResetPassword, MEntitySwitch, generateObjectFromString, MEntityByDomain, generateStringFromObject, coreRoutesUrl, MForgotPassword, validateRequestModal, MReLogin } from 'cloud-ide-lms-model';
4
+ import { cidePath, hostManagerRoutesUrl, authRoutesUrl, MLogin, customEncrypt, MResetPassword, MEntitySwitch, generateObjectFromString, MEntityByDomain, generateStringFromObject, coreRoutesUrl, MForgotPassword, validateRequestModal, MReLogin } from 'cloud-ide-lms-model';
5
5
  import { BehaviorSubject, of, from, catchError as catchError$1 } from 'rxjs';
6
6
  import { RouterOutlet, Router, ActivatedRoute, RouterLink } from '@angular/router';
7
7
  import * as i1 from '@angular/forms';
@@ -129,6 +129,19 @@ class CloudIdeAuthService {
129
129
  }
130
130
  }
131
131
  }
132
+ /**
133
+ * Get login test credentials configuration for an entity
134
+ */
135
+ getLoginTestConfig(entityId) {
136
+ const url = cidePath?.join([
137
+ hostManagerRoutesUrl?.cideSuiteHost,
138
+ authRoutesUrl?.module,
139
+ 'login-test-config'
140
+ ]);
141
+ return this.http?.get(url, {
142
+ params: entityId ? { syen_id: entityId } : {}
143
+ });
144
+ }
132
145
  signIn(body) {
133
146
  // Create a copy to avoid mutating the original
134
147
  const loginPayload = new MLogin(body);
@@ -880,11 +893,11 @@ const authRoutes = {
880
893
  },
881
894
  {
882
895
  path: "sign-in/:query",
883
- loadComponent: () => import('./cloud-ide-auth-sign-in.component-DY2khC37.mjs').then(c => c.CideAuthSignInComponent)
896
+ loadComponent: () => import('./cloud-ide-auth-sign-in.component-BrW2B2CL.mjs').then(c => c.CideAuthSignInComponent)
884
897
  },
885
898
  {
886
899
  path: "sign-in",
887
- loadComponent: () => import('./cloud-ide-auth-sign-in.component-DY2khC37.mjs').then(c => c.CideAuthSignInComponent)
900
+ loadComponent: () => import('./cloud-ide-auth-sign-in.component-BrW2B2CL.mjs').then(c => c.CideAuthSignInComponent)
888
901
  },
889
902
  {
890
903
  path: "forgot-password/:query",
@@ -896,11 +909,11 @@ const authRoutes = {
896
909
  },
897
910
  {
898
911
  path: "reset-password/:rout_token/:query",
899
- loadComponent: () => import('./cloud-ide-auth-reset-password.component-Ddt8gDLT.mjs').then(c => c.CideAuthResetPasswordComponent)
912
+ loadComponent: () => import('./cloud-ide-auth-reset-password.component-lhtRGRGn.mjs').then(c => c.CideAuthResetPasswordComponent)
900
913
  },
901
914
  {
902
915
  path: "reset-password/:rout_token",
903
- loadComponent: () => import('./cloud-ide-auth-reset-password.component-Ddt8gDLT.mjs').then(c => c.CideAuthResetPasswordComponent)
916
+ loadComponent: () => import('./cloud-ide-auth-reset-password.component-lhtRGRGn.mjs').then(c => c.CideAuthResetPasswordComponent)
904
917
  }
905
918
  ]
906
919
  };
@@ -940,4 +953,4 @@ const authGuard = (route, state) => {
940
953
  */
941
954
 
942
955
  export { CloudIdeAuthService as C, EntityDetectionService as E, ReLoginService as R, CloudIdeAuthComponent as a, CideAuthForgotPasswordComponent as b, ReLoginFloatingService as c, CideAuthReLoginComponent as d, authRoutes as e, authGuard as f };
943
- //# sourceMappingURL=cloud-ide-auth-cloud-ide-auth-Ct2MD8bh.mjs.map
956
+ //# sourceMappingURL=cloud-ide-auth-cloud-ide-auth-C1Hhl7MY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-ide-auth-cloud-ide-auth-C1Hhl7MY.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.service.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.component.ts","../../../projects/cloud-ide-auth/src/lib/services/entity-detection.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.html","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login-floating.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.component.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.routes.ts","../../../projects/cloud-ide-auth/src/lib/guards/auth.guard.ts","../../../projects/cloud-ide-auth/src/public-api.ts","../../../projects/cloud-ide-auth/src/cloud-ide-auth.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport {\n authRoutesUrl, cidePath, hostManagerRoutesUrl, AuthUserMst,\n loginControllerResponse, MLogin, MForgotPassword, ForgotPasswordControllerResponse,\n MResetPassword, ResetPasswordControllerResponse, customEncrypt, MEntitySwitch, switchEntityControllerResponse\n} from 'cloud-ide-lms-model';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CloudIdeAuthService {\n public auth_user_mst: BehaviorSubject<AuthUserMst> = new BehaviorSubject({});\n private _auth_token: string = \"\";\n\n // Storage keys\n private readonly TOKEN_STORAGE_KEY = 'cide_auth_token';\n private readonly USER_STORAGE_KEY = 'cide_auth_user';\n\n // Modern Angular v20 dependency injection pattern\n private http = inject(HttpClient);\n\n constructor() {\n // Modern Angular v20 pattern: Use constructor for initialization only\n this.loadAuthDataFromStorage();\n }\n\n /**\n * Check if localStorage is available (browser environment)\n */\n private isLocalStorageAvailable(): boolean {\n try {\n return typeof window !== 'undefined' && typeof localStorage !== 'undefined';\n } catch {\n return false;\n }\n }\n\n // Getter and setter for auth_token with localStorage persistence\n // Single source of truth: localStorage is the authoritative source\n get auth_token(): string {\n // Always read from localStorage as single source of truth\n if (this.isLocalStorageAvailable()) {\n const storedToken = localStorage.getItem(this.TOKEN_STORAGE_KEY);\n if (storedToken) {\n // Sync in-memory value with localStorage\n this._auth_token = storedToken;\n return storedToken;\n }\n }\n return this._auth_token;\n }\n\n set auth_token(value: string) {\n // Update in-memory value\n this._auth_token = value;\n \n // Save to localStorage as single source of truth\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n if (value) {\n localStorage.setItem(this.TOKEN_STORAGE_KEY, value);\n } else {\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\n }\n }\n\n // View-only token for public APIs\n private readonly VIEW_ONLY_TOKEN_STORAGE_KEY = 'cloud_ide_view_only_token';\n private _view_only_token: string = '';\n\n get view_only_token(): string {\n // Always read from localStorage as single source of truth\n if (this.isLocalStorageAvailable()) {\n const storedToken = localStorage.getItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\n if (storedToken) {\n // Sync in-memory value with localStorage\n this._view_only_token = storedToken;\n return storedToken;\n }\n }\n return this._view_only_token;\n }\n\n set view_only_token(value: string) {\n // Update in-memory value\n this._view_only_token = value;\n \n // Save to localStorage as single source of truth\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n if (value) {\n localStorage.setItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY, value);\n } else {\n localStorage.removeItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\n }\n }\n\n // Load authentication data from localStorage on service initialization\n private loadAuthDataFromStorage(): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n try {\n // Load token\n const storedToken = localStorage.getItem(this.TOKEN_STORAGE_KEY);\n if (storedToken) {\n this._auth_token = storedToken;\n }\n\n // Load view-only token\n const storedViewOnlyToken = localStorage.getItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\n if (storedViewOnlyToken) {\n this._view_only_token = storedViewOnlyToken;\n }\n\n // Load user data\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\n if (storedUserData) {\n const userData = JSON.parse(storedUserData);\n this.auth_user_mst.next(userData);\n }\n } catch (error) {\n // Silent error handling for auth data loading\n }\n }\n\n // Store user data in localStorage\n public storeUserData(userData: AuthUserMst): void {\n if (userData) {\n this.auth_user_mst.next(userData);\n if (this.isLocalStorageAvailable()) {\n localStorage.setItem(this.USER_STORAGE_KEY, JSON.stringify(userData));\n }\n }\n }\n\n /**\n * Get login test credentials configuration for an entity\n */\n getLoginTestConfig(entityId: string) {\n const url = cidePath?.join([\n hostManagerRoutesUrl?.cideSuiteHost,\n authRoutesUrl?.module,\n 'login-test-config'\n ]);\n\n return this.http?.get(url, {\n params: entityId ? { syen_id: entityId } : {}\n });\n }\n\n signIn(body: MLogin): Observable<loginControllerResponse> {\n // Create a copy to avoid mutating the original\n const loginPayload: MLogin = new MLogin(body);\n \n if (loginPayload?.user_password) {\n if (loginPayload?.user_password?.length <= 6) {\n // MPIN - no encryption needed for MPIN\n loginPayload.custom_login_method = \"mpin\";\n loginPayload.mpin_pin = loginPayload?.user_password;\n loginPayload.user_password = \"\";\n } else {\n // Password - encrypt before sending\n loginPayload.custom_login_method = \"pass\";\n loginPayload.user_password = customEncrypt(loginPayload.user_password);\n }\n }\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.signIn]), loginPayload);\n }\n\n forgotPassword(body: MForgotPassword): Observable<ForgotPasswordControllerResponse> {\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.forgotPassword]), body);\n }\n\n resetPassword(body: MResetPassword): Observable<ResetPasswordControllerResponse> {\n const payload = new MResetPassword(body);\n if (payload?.Validate) {\n payload?.Validate();\n }\n // Encrypt password before sending\n if (payload.user_password) {\n payload.user_password = customEncrypt(payload.user_password);\n }\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.resetPassword]), payload);\n }\n\n // Sign out the user and clear all stored auth data\n signOut(): void {\n // Clear token and user data from memory\n this._auth_token = \"\";\n this.auth_user_mst.next({});\n\n // Clear stored data\n if (this.isLocalStorageAvailable()) {\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\n localStorage.removeItem(this.USER_STORAGE_KEY);\n }\n }\n\n // Check if user is authenticated\n isAuthenticated(): boolean {\n return !!this._auth_token;\n }\n\n // Get current user data \n getCurrentUser(): AuthUserMst {\n return this.auth_user_mst.getValue();\n }\n\n // Check if token is expired\n isTokenExpired(): boolean {\n try {\n if (!this._auth_token) {\n return true;\n }\n\n // Extract the payload from the JWT token\n const tokenParts = this._auth_token.split('.');\n if (tokenParts.length !== 3) {\n return true; // Not a valid JWT token\n }\n\n const payload = JSON.parse(atob(tokenParts[1]));\n\n // Check expiration time\n const expiration = payload.exp * 1000; // Convert seconds to milliseconds\n return Date.now() >= expiration;\n } catch (error) {\n return true; // Assume expired if there's an error\n }\n }\n\n // Refresh auth data if needed based on stored data\n refreshAuthState(): void {\n // If we have a token but no user data, try to load user data\n if (this._auth_token && this.auth_user_mst && Object.keys(this.auth_user_mst.getValue()).length === 0 && this.isLocalStorageAvailable()) {\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\n if (storedUserData) {\n try {\n const userData = JSON.parse(storedUserData);\n this.auth_user_mst.next(userData);\n } catch (error) {\n // Silent error handling for parsing user data\n }\n }\n }\n\n // If token is expired, sign out\n if (this.isTokenExpired()) {\n this.signOut();\n }\n }\n\n /**\n * Switch entity for logged-in user\n * Creates a new auth_logs entry and updates the entity mapping\n * @param entityId - Entity ID to switch to\n * @returns Observable with new token and entity data\n */\n switchEntity(entityId: string): Observable<switchEntityControllerResponse> {\n const payload: MEntitySwitch = new MEntitySwitch({\n syen_id: entityId\n });\n \n return this.http?.post<switchEntityControllerResponse>(\n cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.switchEntity]),\n payload\n );\n }\n}\n","import { Component } from '@angular/core';\r\nimport { RouterOutlet } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'cide-auth-wrapper',\r\n standalone: true,\r\n imports: [RouterOutlet],\r\n template: `\r\n <router-outlet></router-outlet>\r\n `,\r\n styles: ``\r\n})\r\nexport class CloudIdeAuthComponent {\r\n\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, of } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport {\r\n cidePath,\r\n hostManagerRoutesUrl,\r\n coreRoutesUrl,\r\n generateStringFromObject,\r\n generateObjectFromString,\r\n entityByDomainControllerResponse,\r\n MEntityByDomain\r\n} from 'cloud-ide-lms-model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EntityDetectionService {\r\n private http = inject(HttpClient);\r\n\r\n /**\r\n * Extract and normalize domain from current URL\r\n * @returns Normalized domain string (without www. prefix, lowercase)\r\n */\r\n getDomainFromUrl(): string {\r\n if (typeof window === 'undefined') {\r\n return '';\r\n }\r\n const hostname = window.location.hostname;\r\n // Remove 'www.' prefix if present and convert to lowercase\r\n return hostname.replace(/^www\\./, '').toLowerCase();\r\n }\r\n\r\n /**\r\n * Extract entity ID from route parameters (object-to-string format)\r\n * @param routeParams - Route parameters object (e.g., { query: 'suwrklfs' })\r\n * @returns Entity ID string or null\r\n */\r\n getEntityIdFromRoute(routeParams?: any): string | null {\r\n if (!routeParams || !routeParams['query']) {\r\n return null;\r\n }\r\n\r\n try {\r\n const queryData = generateObjectFromString(routeParams['query']);\r\n return queryData?.syen_id || null;\r\n } catch (error) {\r\n console.warn('Failed to decode route parameter:', error);\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Lookup entity ID by domain using API\r\n * @param domain - Domain string to lookup\r\n * @returns Observable of entity ID string or null\r\n */\r\n lookupEntityByDomain(domain: string): Observable<string | null> {\r\n if (!domain) {\r\n return of(null);\r\n }\r\n\r\n const domainPayload: MEntityByDomain = new MEntityByDomain({ domain });\r\n const query = generateStringFromObject(domainPayload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl.entityByDomain,\r\n query\r\n ]);\r\n\r\n return this.http.get<entityByDomainControllerResponse>(url).pipe(\r\n map((response) => {\r\n if (response?.success && response?.data?._id) {\r\n return response.data._id;\r\n }\r\n return null;\r\n }),\r\n catchError((error) => {\r\n console.warn('Domain lookup failed:', error);\r\n return of(null);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Detect entity ID using priority:\r\n * 1. Domain lookup (primary)\r\n * 2. Route parameter (fallback)\r\n * @param routeParams - Optional route parameters for fallback\r\n * @returns Observable of entity ID string or null\r\n */\r\n detectEntityId(routeParams?: any): Observable<string | null> {\r\n // First, try domain lookup\r\n const domain = this.getDomainFromUrl();\r\n \r\n if (domain) {\r\n return this.lookupEntityByDomain(domain).pipe(\r\n map((entityId) => {\r\n // If domain lookup succeeds, return the entity ID\r\n if (entityId) {\r\n return entityId;\r\n }\r\n // If domain lookup fails, try route parameter fallback\r\n return this.getEntityIdFromRoute(routeParams);\r\n })\r\n );\r\n }\r\n\r\n // If no domain, try route parameter fallback\r\n const routeEntityId = this.getEntityIdFromRoute(routeParams);\r\n return of(routeEntityId);\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, inject, signal, OnInit, DestroyRef, Injector } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router, ActivatedRoute, RouterLink } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { forgotPasswordMethod, MForgotPassword, validateRequestModal, controllerResponse, CoreSystemEntity } from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { EntityDetectionService } from '../../services/entity-detection.service';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent, NotificationService } from 'cloud-ide-element';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { switchMap, catchError, map } from 'rxjs/operators';\nimport { of, from } from 'rxjs';\n\n@Component({\n selector: 'cide-auth-forgot-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent, RouterLink],\n templateUrl: './forgot-password.component.html',\n styleUrl: './forgot-password.component.css'\n})\nexport class CideAuthForgotPasswordComponent implements OnInit {\n public forgotPassswordForm: FormGroupModel<MForgotPassword>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n public entityLoading = signal<boolean>(true);\n private entityId = signal<string | null>(null);\n public entityInfo = signal<CoreSystemEntity>({});\n\n private authService = inject(CloudIdeAuthService);\n private router = inject(Router);\n private activatedRoute = inject(ActivatedRoute);\n private entityDetectionService = inject(EntityDetectionService);\n private destroyRef = inject(DestroyRef);\n private injector = inject(Injector);\n private notificationService = inject(NotificationService);\n\n constructor() {\n this.forgotPassswordForm = new FormGroup({\n custom_forgot_password_method: new FormControl<forgotPasswordMethod>('username'),\n user_username: new FormControl('', [Validators.required, Validators.minLength(8), Validators.maxLength(20)]),\n user_emailid: new FormControl(''),\n user_mobileno: new FormControl(),\n }) as unknown as FormGroupModel<MForgotPassword>;\n }\n\n ngOnInit(): void {\n // Detect entity ID from domain or route parameter and load entity details\n const routeParams = this.activatedRoute.snapshot.params;\n this.entityDetectionService.detectEntityId(routeParams).pipe(\n switchMap((entityId) => {\n if (entityId) {\n this.entityId.set(entityId);\n console.log('Entity ID detected:', entityId);\n this.entityLoading.set(true); // Start loading\n \n // Load entity details using entity management service\n return this.loadEntityDetails(entityId).pipe(\n catchError((error) => {\n console.warn('Failed to load entity details:', error);\n this.entityLoading.set(false); // Stop loading on error\n return of(null);\n })\n );\n }\n this.entityLoading.set(false); // No entity to load\n return of(null);\n }),\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (entityData) => {\n this.entityLoading.set(false); // Stop loading\n if (entityData) {\n // Update entity info with name and logo\n this.entityInfo.set(entityData);\n }\n \n // Navigate to clean URL (remove :query param) if it exists\n if (routeParams['query']) {\n this.router.navigate(['auth', 'forgot-password'], {\n queryParams: this.activatedRoute.snapshot.queryParams,\n replaceUrl: true\n });\n }\n },\n error: (error) => {\n this.entityLoading.set(false); // Stop loading on error\n console.warn('Entity detection or loading failed:', error);\n }\n });\n }\n\n /**\n * Load entity details by ID\n * @param entityId - Entity ID to load\n * @returns Observable of entity data or null\n */\n private loadEntityDetails(entityId: string) {\n // Dynamically import entity management service to avoid circular dependencies\n return from(import('cloud-ide-core')).pipe(\n switchMap((module) => {\n try {\n const entityService = this.injector.get(module.CideCoreEntityManagementService);\n return entityService.getEntityById(entityId).pipe(\n map((response) => {\n if (response?.success && response?.data) {\n return response.data as CoreSystemEntity;\n }\n return null;\n })\n );\n } catch (error) {\n console.warn('Failed to get entity service:', error);\n return of(null);\n }\n }),\n catchError((error) => {\n console.warn('Failed to import entity service:', error);\n return of(null);\n })\n );\n }\n\n onForgotPasssword() {\n // Mark all fields as touched to show validation errors\n this.forgotPassswordForm.markAllAsTouched();\n \n // Clear previous error messages\n this.erro_message.set('');\n \n // Check if form has basic Angular validators passed\n if (!this.forgotPassswordForm.valid) {\n const usernameControl = this.forgotPassswordForm.get('user_username');\n if (usernameControl?.errors?.['required']) {\n this.erro_message.set('Username is required');\n } else if (usernameControl?.errors?.['minlength']) {\n this.erro_message.set('Username must be at least 8 characters');\n } else if (usernameControl?.errors?.['maxlength']) {\n this.erro_message.set('Username must be at most 20 characters');\n } else {\n this.erro_message.set('Please fill in all required fields correctly');\n }\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n return;\n }\n\n // Create the model and validate using custom validation\n const formValue = {\n ...this.forgotPassswordForm.value,\n syen_id: this.entityId() || undefined\n } as MForgotPassword;\n const forgotPasswordPayload = new MForgotPassword(formValue);\n const validate = validateRequestModal(forgotPasswordPayload);\n \n if (validate !== true) {\n // Custom validation failed\n this.loading.set(false);\n const errorKey = validate.first;\n // Get the error message from errorLogger using the first key\n const errorMessage = (validate.errorLogger as Record<string, string>)?.[errorKey] || 'Validation failed. Please check your input.';\n this.erro_message.set(errorMessage);\n console.error('Forgot password validation error:', validate);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n return;\n }\n\n // All validations passed, make API call\n this.loading.set(true);\n this.authService.forgotPassword(forgotPasswordPayload)?.subscribe({\n next: (response) => {\n this.loading.set(false);\n if (response?.success === true) {\n this.erro_message.set('');\n // Show success notification\n this.notificationService.success(\n 'Password reset link has been sent to your registered email. Please check your email to reset your password.',\n {\n title: 'Email Sent Successfully',\n duration: 5000\n }\n );\n // Reset the form after successful submission\n this.forgotPassswordForm.reset();\n this.forgotPassswordForm.patchValue({\n custom_forgot_password_method: 'username'\n });\n } else {\n // API returned success: false\n const errorMessage = response?.message || 'Failed to process forgot password request. Please try again.';\n this.erro_message.set(errorMessage);\n console.error('Forgot password API error:', response);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.loading.set(false);\n const errorMessage = response?.error?.message || 'Failed to process forgot password request. Please try again.';\n this.erro_message.set(errorMessage);\n console.error('Forgot password error:', response);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n });\n }\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-4 tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching forgot password page structure -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\" class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Reset Password Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\" [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" \n class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full tw-object-contain\"\n alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n Forgot Password - {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n \n <!-- section for controls -->\n <form [formGroup]=\"forgotPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-input \n id=\"user_username\" \n formControlName=\"user_username\"\n placeholder=\"Enter your username\"\n [required]=\"true\">\n </cide-ele-input>\n @if (forgotPassswordForm.get('user_username')?.invalid && forgotPassswordForm.get('user_username')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n @if (forgotPassswordForm.get('user_username')?.errors?.['required']) {\n Username is required\n } @else if (forgotPassswordForm.get('user_username')?.errors?.['minlength']) {\n Username must be at least 8 characters\n } @else if (forgotPassswordForm.get('user_username')?.errors?.['maxlength']) {\n Username must be at most 20 characters\n }\n </div>\n }\n </div>\n <!-- Forgot Password button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"reset_password_link_button\" [loading]=\"loading()\" [disabled]=\"!forgotPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n <!-- Sign In link -->\n <div class=\"tw-m-auto tw-mt-3 tw-text-center tw-w-full tw-max-w-80 sm:tw-w-80\">\n <a routerLink=\"/auth/sign-in\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Back to Sign In</a>\n </div>\n </div>\n </form>\n </div>\n }\n </div>","import { Injectable, inject, signal } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, Observable, catchError, of } from 'rxjs';\nimport {\n authRoutesUrl,\n cidePath,\n hostManagerRoutesUrl,\n MReLogin,\n reLoginControllerResponse,\n AuthUserMst,\n customEncrypt,\n controllerResponse,\n loginResponseData\n} from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { AppStateHelperService } from 'cloud-ide-layout';\n\n/**\n * Service to handle re-login functionality when 401 errors occur\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ReLoginService {\n private http = inject(HttpClient);\n private authService = inject(CloudIdeAuthService);\n\n // Observable to control re-login dialog visibility\n private showReLoginSubject = new BehaviorSubject<boolean>(false);\n public showReLogin$ = this.showReLoginSubject.asObservable();\n private appStateService = inject(AppStateHelperService);\n\n // Signal for re-login state\n isLoading = signal<boolean>(false);\n error = signal<string | null>(null);\n\n /**\n * Show re-login dialog\n */\n showReLogin(): void {\n // Only show if we have a token (session expired scenario)\n if (this.authService.auth_token) {\n this.showReLoginSubject.next(true);\n }\n }\n\n /**\n * Hide re-login dialog\n */\n hideReLogin(): void {\n this.showReLoginSubject.next(false);\n this.error.set(null);\n }\n\n\n /**\n * Perform re-login with MPIN or password\n */\n reLogin(payload: MReLogin): Observable<reLoginControllerResponse> {\n this.isLoading.set(true);\n this.error.set(null);\n\n // Create a copy to avoid mutating the original\n const reLoginPayload: MReLogin = {\n ...payload,\n token: this.authService.auth_token\n };\n\n // Encrypt password if provided (MPIN doesn't need encryption)\n if (reLoginPayload.user_password && reLoginPayload.custom_login_method === 'pass') {\n reLoginPayload.user_password = customEncrypt(reLoginPayload.user_password);\n }\n\n const url = cidePath.join([\n hostManagerRoutesUrl.cideSuiteHost,\n authRoutesUrl.module,\n authRoutesUrl.createReLoginSession\n ]);\n\n return this.http.post<reLoginControllerResponse>(url, reLoginPayload).pipe(\n catchError((response: { error: controllerResponse }) => {\n this.isLoading.set(false);\n const errorMessage = response?.error?.message || 'Re-login failed';\n this.error.set(errorMessage);\n return of({\n success: false,\n message: errorMessage\n } as reLoginControllerResponse);\n })\n );\n }\n\n /**\n * Handle successful re-login\n */\n handleReLoginSuccess(response: reLoginControllerResponse): void {\n if (response.success && response.token) {\n // Update auth token\n this.authService.auth_token = response.token;\n\n // Update user data if available\n if (response.data) {\n const userData = response.data as loginResponseData;\n this.authService.storeUserData(userData?.auth_user_mst);\n\n // Synchronize AppStateService with the same user data \n this.appStateService.setUser(response?.data?.auth_user_mst || null);\n\n // Store active entity data\n const entity = response?.data?.core_system_entity || null;\n this.appStateService.setActiveEntity(entity);\n\n }\n\n // Hide re-login dialog\n this.hideReLogin();\n this.isLoading.set(false);\n } else {\n this.error.set(response.message || 'Re-login failed');\n this.isLoading.set(false);\n }\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { ReLoginService } from './re-login.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\nimport type { FloatingContainerConfig } from 'cloud-ide-element';\n\n/**\n * Service to manage re-login component in floating container\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ReLoginFloatingService {\n private containerService = inject(CideEleFloatingContainerService);\n private reLoginService = inject(ReLoginService);\n private readonly destroyRef = inject(DestroyRef);\n private containerId: string | null = null;\n\n constructor() {\n // Register the component when service is initialized\n this.registerReLoginComponent();\n\n // Subscribe to re-login service to show/hide dialog\n this.reLoginService.showReLogin$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((shouldShow) => {\n if (shouldShow && !this.containerId) {\n this.show();\n } else if (!shouldShow && this.containerId) {\n this.hide();\n }\n });\n }\n\n /**\n * Register re-login component with floating container service\n */\n private async registerReLoginComponent(): Promise<void> {\n if (this.containerService.isComponentRegistered('re-login')) {\n return;\n }\n\n try {\n const module = await import('./re-login.component');\n if (!module.CideAuthReLoginComponent) {\n throw new Error('Component class not found in module');\n }\n this.containerService.registerComponent('re-login', module.CideAuthReLoginComponent);\n } catch (error) {\n console.error('Failed to register re-login component:', error);\n }\n }\n\n /**\n * Show re-login in floating container\n */\n async show(): Promise<string | null> {\n // Ensure component is registered\n if (!this.containerService.isComponentRegistered('re-login')) {\n await this.registerReLoginComponent();\n }\n\n const config: FloatingContainerConfig = {\n id: 're-login-container',\n title: 'Re-Login Required',\n icon: 'lock',\n backdrop: true,\n width: '420px',\n height: 'auto',\n minWidth: '400px',\n minHeight: '200px',\n resizable: false,\n draggable: true,\n closable: false, // Prevent closing - user must re-login\n minimizable: false,\n maximizable: false,\n componentId: 're-login',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n };\n\n this.containerId = this.containerService.show(config);\n return this.containerId;\n }\n\n /**\n * Hide re-login floating container\n */\n hide(): void {\n if (this.containerId) {\n this.containerService.hide(this.containerId);\n this.containerId = null;\n }\n }\n}\n","import { Component, inject, OnInit, OnDestroy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\nimport {\n loginMethod,\n MReLogin,\n reLoginControllerResponse\n} from 'cloud-ide-lms-model';\nimport { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';\nimport { ReLoginService } from './re-login.service';\n\n@Component({\n selector: 'cide-auth-re-login',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideInputComponent,\n CideEleButtonComponent\n ],\n template: `\n <div class=\"tw-w-full tw-max-w-md tw-mx-auto tw-p-6\">\n <div class=\"tw-text-center tw-mb-6\">\n <h2 class=\"tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2\">Session Expired</h2>\n <p class=\"tw-text-sm tw-text-gray-600\">Please re-authenticate to continue</p>\n </div>\n\n @if (error()) {\n <div class=\"tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <p class=\"tw-text-sm tw-text-red-600\">{{ error() }}</p>\n </div>\n }\n\n <form [formGroup]=\"reLoginForm\" (ngSubmit)=\"onSubmit()\">\n <div class=\"tw-space-y-4\">\n <!-- Single input field for both password and MPIN -->\n <div>\n <cide-ele-input\n id=\"user_password_mpin\"\n formControlName=\"user_password\"\n type=\"password\"\n placeholder=\"Enter your password or MPIN\"\n [required]=\"true\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-flex tw-gap-3 tw-pt-4\">\n <button\n type=\"submit\"\n cideEleButton\n variant=\"primary\"\n [loading]=\"isLoading()\"\n [disabled]=\"!reLoginForm.valid || isLoading()\"\n class=\"tw-flex-1\">\n Re-Login\n </button>\n </div>\n </div>\n </form>\n </div>\n `,\n styles: []\n})\nexport class CideAuthReLoginComponent implements OnInit, OnDestroy {\n private reLoginService = inject(ReLoginService);\n private readonly destroyRef = inject(DestroyRef);\n\n isLoading = this.reLoginService.isLoading;\n error = this.reLoginService.error;\n\n reLoginForm = new FormGroup({\n custom_login_method: new FormControl<loginMethod>('pass'),\n user_password: new FormControl<string>('')\n });\n\n ngOnInit(): void {\n // Set default login method to password\n this.reLoginForm.patchValue({\n custom_login_method: 'pass'\n });\n }\n\n ngOnDestroy(): void {\n // Cleanup handled by takeUntilDestroyed\n }\n\n onSubmit(): void {\n if (this.reLoginForm.valid) {\n const formValue = this.reLoginForm.value;\n const passwordValue = formValue.user_password || '';\n \n // Auto-detect MPIN vs Password based on length (same as login screen)\n // If length <= 6, treat as MPIN, otherwise as password\n let customLoginMethod: loginMethod = 'pass';\n let userPassword: string | undefined = passwordValue;\n let mpinPin: string | undefined = undefined;\n\n if (passwordValue && passwordValue.length <= 6) {\n customLoginMethod = 'mpin';\n mpinPin = passwordValue;\n userPassword = undefined;\n }\n\n const payload: MReLogin = new MReLogin({\n custom_login_method: customLoginMethod,\n user_password: userPassword,\n mpin_pin: mpinPin\n } as MReLogin);\n\n this.reLoginService.reLogin(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response: reLoginControllerResponse) => {\n this.reLoginService.handleReLoginSuccess(response);\n },\n error: () => {\n // Error is handled in the service\n }\n });\n }\n }\n}\n\n","import { Route } from '@angular/router';\n\nexport const authRoutes: Route = {\n path: \"auth\", // localhost:4200/auth/sign-in\n loadComponent: () => import('./cloud-ide-auth.component').then(c => c.CloudIdeAuthComponent),\n children: [\n {\n path: \"\",\n pathMatch: 'full',\n redirectTo: 'sign-in'\n },\n {\n path: \"sign-in/:query\",\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\n },\n {\n path: \"sign-in\",\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\n },\n {\n path: \"forgot-password/:query\",\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\n },\n {\n path: \"forgot-password\",\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\n },\n {\n path: \"reset-password/:rout_token/:query\",\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\n },\n {\n path: \"reset-password/:rout_token\",\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\n }\n ]\n}\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { IAuthService, AUTH_SERVICE_TOKEN, IAppStateService, APP_STATE_SERVICE_TOKEN } from 'cloud-ide-shared';\r\n\r\nexport const authGuard: CanActivateFn = (route, state) => {\r\n const authService = inject(AUTH_SERVICE_TOKEN) as IAuthService;\r\n const appState = inject(APP_STATE_SERVICE_TOKEN) as IAppStateService;\r\n const router = inject(Router);\r\n\r\n // Check if user is authenticated using current state (without refreshing first)\r\n const isAuthenticated = appState.isUserAuthenticated() && !authService.isTokenExpired();\r\n\r\n // Defer state refresh to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\r\n Promise.resolve().then(() => {\r\n // Refresh auth state to make sure it's current\r\n authService.refreshAuthState();\r\n\r\n // Refresh app state from localStorage to ensure synchronization\r\n appState.refreshFromLocalStorage();\r\n });\r\n\r\n if (isAuthenticated) {\r\n return true;\r\n } else {\r\n console.log('User is not authenticated, redirecting to login page', appState.isUserAuthenticated(), !authService.isTokenExpired());\r\n }\r\n\r\n // Redirect to login page with the intended destination\r\n router.navigate(['/auth/sign-in'], { \r\n queryParams: { returnUrl: state.url }\r\n });\r\n\r\n return false;\r\n};\r\n","/*\n * Public API Surface of cloud-ide-auth\n */\n\nexport * from './lib/cloud-ide-auth.service';\nexport * from './lib/cloud-ide-auth.component';\nexport * from './lib/auth/forgot-password/forgot-password.component';\nexport * from './lib/auth/re-login/re-login.service';\nexport * from './lib/auth/re-login/re-login-floating.service';\nexport * from './lib/auth/re-login/re-login.component';\nexport * from './lib/cloud-ide-auth.routes';\nexport * from './lib/guards/auth.guard';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["catchError"],"mappings":";;;;;;;;;;;;;;;MAYa,mBAAmB,CAAA;AACvB,IAAA,aAAa,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;IACpE,WAAW,GAAW,EAAE;;IAGf,iBAAiB,GAAG,iBAAiB;IACrC,gBAAgB,GAAG,gBAAgB;;AAG5C,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEjC,IAAA,WAAA,GAAA;;QAEE,IAAI,CAAC,uBAAuB,EAAE;IAChC;AAEA;;AAEG;IACK,uBAAuB,GAAA;AAC7B,QAAA,IAAI;YACF,OAAO,OAAO,MAAM,KAAK,WAAW,IA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AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;;AAG7B,IAAA,MAAM,eAAe,GAAG,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;;AAGvF,IAAA,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAK;;QAE1B,WAAW,CAAC,gBAAgB,EAAE;;QAG9B,QAAQ,CAAC,uBAAuB,EAAE;AACpC,IAAA,CAAC,CAAC;IAEF,IAAI,eAAe,EAAE;AACnB,QAAA,OAAO,IAAI;IACb;SAAO;AACL,QAAA,OAAO,CAAC,GAAG,CAAC,sDAAsD,EAAE,QAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC;IACpI;;AAGA,IAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE;AACjC,QAAA,WAAW,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG;AACpC,KAAA,CAAC;AAEF,IAAA,OAAO,KAAK;AACd;;ACjCA;;AAEG;;ACFH;;AAEG;;;;"}
@@ -5,7 +5,7 @@ import * as i1 from '@angular/forms';
5
5
  import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
6
6
  import { CommonModule } from '@angular/common';
7
7
  import { Router, ActivatedRoute, RouterLink } from '@angular/router';
8
- import { C as CloudIdeAuthService, E as EntityDetectionService } from './cloud-ide-auth-cloud-ide-auth-Ct2MD8bh.mjs';
8
+ import { C as CloudIdeAuthService, E as EntityDetectionService } from './cloud-ide-auth-cloud-ide-auth-C1Hhl7MY.mjs';
9
9
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
10
  import { switchMap, catchError, map } from 'rxjs/operators';
11
11
  import { of, from } from 'rxjs';
@@ -212,4 +212,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
212
212
  }], ctorParameters: () => [] });
213
213
 
214
214
  export { CideAuthResetPasswordComponent };
215
- //# sourceMappingURL=cloud-ide-auth-reset-password.component-Ddt8gDLT.mjs.map
215
+ //# sourceMappingURL=cloud-ide-auth-reset-password.component-lhtRGRGn.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-ide-auth-reset-password.component-Ddt8gDLT.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/auth/reset-password/reset-password.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/reset-password/reset-password.component.html"],"sourcesContent":["import { Component, inject, signal, OnInit, DestroyRef, Injector } from '@angular/core';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators, AbstractControl, ValidationErrors } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router, ActivatedRoute, RouterLink } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { EntityDetectionService } from '../../services/entity-detection.service';\nimport { MResetPassword, controllerResponse, CoreSystemEntity } from 'cloud-ide-lms-model';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { switchMap, catchError, map } from 'rxjs/operators';\nimport { of, from } from 'rxjs';\n\n// Custom validator for password matching\nfunction passwordMatchValidator(control: AbstractControl): ValidationErrors | null {\n const password = control.get('new_password');\n const confirmPassword = control.get('confirm_password');\n \n if (!password || !confirmPassword) {\n return null;\n }\n \n return password.value === confirmPassword.value ? null : { passwordMismatch: true };\n}\n\n@Component({\n selector: 'cide-auth-reset-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent, RouterLink],\n templateUrl: './reset-password.component.html',\n styleUrl: './reset-password.component.css'\n})\nexport class CideAuthResetPasswordComponent implements OnInit {\n public resetPassswordForm: FormGroupModel<{new_password: string, confirm_password: string}>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n public entityLoading = signal<boolean>(true);\n public resetToken: string = '';\n private entityId = signal<string | null>(null);\n public entityInfo = signal<CoreSystemEntity>({});\n\n private authService = inject(CloudIdeAuthService);\n private router = inject(Router);\n private activatedRoute = inject(ActivatedRoute);\n private entityDetectionService = inject(EntityDetectionService);\n private destroyRef = inject(DestroyRef);\n private injector = inject(Injector);\n\n constructor() {\n this.resetPassswordForm = new FormGroup({\n new_password: new FormControl('', [Validators.required, Validators.minLength(6)]),\n confirm_password: new FormControl('', [Validators.required])\n }, { validators: passwordMatchValidator }) as unknown as FormGroupModel<{new_password: string, confirm_password: string}>;\n }\n\n ngOnInit(): void {\n // Extract the reset token from route parameters using snapshot for immediate access\n const routeParams = this.activatedRoute.snapshot.params;\n this.resetToken = routeParams['rout_token'] || '';\n \n // If token not found in route params (might be due to dots in JWT), try extracting from URL directly\n if (!this.resetToken && typeof window !== 'undefined') {\n const url = window.location.href;\n const resetPasswordMatch = url.match(/\\/reset-password\\/(.+)$/);\n if (resetPasswordMatch && resetPasswordMatch[1]) {\n // Extract token from URL, handling potential hash fragments\n this.resetToken = resetPasswordMatch[1].split('#')[0].split('?')[0];\n console.log('Reset Password: Token extracted from URL directly');\n }\n }\n \n // Debug logging to help diagnose route parameter issues\n console.log('Reset Password Component - Route Params:', routeParams);\n console.log('Reset Password Component - Extracted Token:', this.resetToken ? 'Token found' : 'No token');\n console.log('Reset Password Component - Current URL:', typeof window !== 'undefined' ? window.location.href : 'N/A');\n \n // Also subscribe to handle route parameter changes (for navigation within the same component)\n this.activatedRoute.params.subscribe(params => {\n const token = params['rout_token'] || '';\n if (token && token !== this.resetToken) {\n this.resetToken = token;\n this.erro_message.set(''); // Clear any previous error\n }\n });\n \n // Validate token exists and is not empty\n if (!this.resetToken || this.resetToken.trim() === '') {\n this.erro_message.set('Invalid reset password link. Missing token. Please request a new one.');\n console.error('Reset Password: No token found in route parameters or URL');\n } else {\n // Token is present, clear any error messages\n this.erro_message.set('');\n console.log('Reset Password: Token successfully extracted');\n }\n\n // Detect entity ID from domain or route parameter and load entity details (preserve rout_token)\n this.entityDetectionService.detectEntityId(routeParams).pipe(\n switchMap((entityId) => {\n if (entityId) {\n this.entityId.set(entityId);\n console.log('Entity ID detected:', entityId);\n this.entityLoading.set(true); // Start loading\n \n // Load entity details using entity management service\n return this.loadEntityDetails(entityId).pipe(\n catchError((error) => {\n console.warn('Failed to load entity details:', error);\n this.entityLoading.set(false); // Stop loading on error\n return of(null);\n })\n );\n }\n this.entityLoading.set(false); // No entity to load\n return of(null);\n }),\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (entityData) => {\n this.entityLoading.set(false); // Stop loading\n if (entityData) {\n // Update entity info with name and logo\n this.entityInfo.set(entityData);\n }\n \n // Navigate to clean URL (preserve rout_token, remove :query param) if it exists\n if (routeParams['query'] && this.resetToken) {\n this.router.navigate(['auth', 'reset-password', this.resetToken], {\n queryParams: this.activatedRoute.snapshot.queryParams,\n replaceUrl: true\n });\n }\n },\n error: (error) => {\n this.entityLoading.set(false); // Stop loading on error\n console.warn('Entity detection or loading failed:', error);\n }\n });\n }\n\n /**\n * Load entity details by ID\n * @param entityId - Entity ID to load\n * @returns Observable of entity data or null\n */\n private loadEntityDetails(entityId: string) {\n // Dynamically import entity management service to avoid circular dependencies\n return from(import('cloud-ide-core')).pipe(\n switchMap((module) => {\n try {\n const entityService = this.injector.get(module.CideCoreEntityManagementService);\n return entityService.getEntityById(entityId).pipe(\n map((response) => {\n if (response?.success && response?.data) {\n return response.data as CoreSystemEntity;\n }\n return null;\n })\n );\n } catch (error) {\n console.warn('Failed to get entity service:', error);\n return of(null);\n }\n }),\n catchError((error) => {\n console.warn('Failed to import entity service:', error);\n return of(null);\n })\n );\n }\n\n onForgotPasssword() {\n // Mark all fields as touched to show validation errors\n this.resetPassswordForm.markAllAsTouched();\n \n if (this.resetPassswordForm.valid && this.resetToken) {\n this.loading.set(true);\n this.erro_message.set('');\n \n const newPassword = this.resetPassswordForm?.get('new_password')?.value || '';\n const confirmPassword = this.resetPassswordForm?.get('confirm_password')?.value || '';\n \n // Double check password match\n if (newPassword !== confirmPassword) {\n this.loading.set(false);\n this.erro_message.set('Passwords do not match. Please try again.');\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n return;\n }\n\n const resetPasssword: MResetPassword = {\n user_password: newPassword,\n user_username: \"\",\n syen_id: this.entityId() || undefined,\n sylog_config_data: {\n reset_password_link: \"\",\n reset_password_secret: this.resetToken,\n request_timestamp: new Date()\n }\n };\n \n this.authService.resetPassword(resetPasssword)?.subscribe({\n next: (response) => {\n if (response?.success === true) {\n this.loading.set(false);\n this.erro_message.set('');\n this.router.navigate(['auth', 'sign-in']);\n } else {\n this.loading.set(false);\n const errorMessage = response?.message || 'Failed to reset password. Please try again.';\n this.erro_message.set(errorMessage);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.loading.set(false);\n const errorMessage = response?.error?.message || 'Failed to reset password. Please try again.';\n this.erro_message.set(errorMessage);\n console.error('Reset password error:', response);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n });\n } else {\n if (!this.resetToken) {\n this.erro_message.set('Invalid reset password link. Please request a new one.');\n } else if (!this.resetPassswordForm.valid) {\n this.erro_message.set('Please fill in all required fields correctly.');\n }\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n }\n}\n\n","<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-4 tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching reset password page structure -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\" class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- New Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Confirm Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Reset Password Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\" [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" \n class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full tw-object-contain\"\n alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n Reset Password - {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n \n <!-- section for controls -->\n <form [formGroup]=\"resetPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- New Password -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-input \n id=\"new_password\" \n formControlName=\"new_password\"\n type=\"password\"\n placeholder=\"Enter new password\"\n [required]=\"true\">\n </cide-ele-input>\n @if (resetPassswordForm.get('new_password')?.invalid && resetPassswordForm.get('new_password')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n @if (resetPassswordForm.get('new_password')?.errors?.['required']) {\n Password is required\n } @else if (resetPassswordForm.get('new_password')?.errors?.['minlength']) {\n Password must be at least 6 characters\n }\n </div>\n }\n </div>\n <!-- Confirm Password -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-input \n id=\"confirm_password\" \n formControlName=\"confirm_password\"\n type=\"password\"\n placeholder=\"Confirm new password\"\n [required]=\"true\">\n </cide-ele-input>\n @if (resetPassswordForm.get('confirm_password')?.invalid && resetPassswordForm.get('confirm_password')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n @if (resetPassswordForm.get('confirm_password')?.errors?.['required']) {\n Please confirm your password\n }\n </div>\n }\n @if (resetPassswordForm.errors?.['passwordMismatch'] && resetPassswordForm.get('confirm_password')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n Passwords do not match\n </div>\n }\n </div>\n <!-- Reset Password button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"reset_password_button\" [loading]=\"loading()\" [disabled]=\"!resetPassswordForm.valid || loading() || !resetToken\">Reset Password</button>\n </div>\n <!-- Sign In link -->\n <div class=\"tw-m-auto tw-mt-3 tw-text-center tw-w-full tw-max-w-80 sm:tw-w-80\">\n <a routerLink=\"/auth/sign-in\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Back to Sign In</a>\n </div>\n </div>\n </form>\n </div>\n }\n </div>"],"names":[],"mappings":";;;;;;;;;;;;AAaA;AACA,SAAS,sBAAsB,CAAC,OAAwB,EAAA;IACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC5C,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AAEvD,IAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,eAAe,EAAE;AACjC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,OAAO,QAAQ,C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AA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIhL,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,cACxB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,UAAU,CAAC,EAAA,QAAA,EAAA,uxMAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"cloud-ide-auth-reset-password.component-lhtRGRGn.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/auth/reset-password/reset-password.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/reset-password/reset-password.component.html"],"sourcesContent":["import { Component, inject, signal, OnInit, DestroyRef, Injector } from '@angular/core';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators, AbstractControl, ValidationErrors } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router, ActivatedRoute, RouterLink } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { EntityDetectionService } from '../../services/entity-detection.service';\nimport { MResetPassword, controllerResponse, CoreSystemEntity } from 'cloud-ide-lms-model';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { switchMap, catchError, map } from 'rxjs/operators';\nimport { of, from } from 'rxjs';\n\n// Custom validator for password matching\nfunction passwordMatchValidator(control: AbstractControl): ValidationErrors | null {\n const password = control.get('new_password');\n const confirmPassword = control.get('confirm_password');\n \n if (!password || !confirmPassword) {\n return null;\n }\n \n return password.value === confirmPassword.value ? null : { passwordMismatch: true };\n}\n\n@Component({\n selector: 'cide-auth-reset-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent, RouterLink],\n templateUrl: './reset-password.component.html',\n styleUrl: './reset-password.component.css'\n})\nexport class CideAuthResetPasswordComponent implements OnInit {\n public resetPassswordForm: FormGroupModel<{new_password: string, confirm_password: string}>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n public entityLoading = signal<boolean>(true);\n public resetToken: string = '';\n private entityId = signal<string | null>(null);\n public entityInfo = signal<CoreSystemEntity>({});\n\n private authService = inject(CloudIdeAuthService);\n private router = inject(Router);\n private activatedRoute = inject(ActivatedRoute);\n private entityDetectionService = inject(EntityDetectionService);\n private destroyRef = inject(DestroyRef);\n private injector = inject(Injector);\n\n constructor() {\n this.resetPassswordForm = new FormGroup({\n new_password: new FormControl('', [Validators.required, Validators.minLength(6)]),\n confirm_password: new FormControl('', [Validators.required])\n }, { validators: passwordMatchValidator }) as unknown as FormGroupModel<{new_password: string, confirm_password: string}>;\n }\n\n ngOnInit(): void {\n // Extract the reset token from route parameters using snapshot for immediate access\n const routeParams = this.activatedRoute.snapshot.params;\n this.resetToken = routeParams['rout_token'] || '';\n \n // If token not found in route params (might be due to dots in JWT), try extracting from URL directly\n if (!this.resetToken && typeof window !== 'undefined') {\n const url = window.location.href;\n const resetPasswordMatch = url.match(/\\/reset-password\\/(.+)$/);\n if (resetPasswordMatch && resetPasswordMatch[1]) {\n // Extract token from URL, handling potential hash fragments\n this.resetToken = resetPasswordMatch[1].split('#')[0].split('?')[0];\n console.log('Reset Password: Token extracted from URL directly');\n }\n }\n \n // Debug logging to help diagnose route parameter issues\n console.log('Reset Password Component - Route Params:', routeParams);\n console.log('Reset Password Component - Extracted Token:', this.resetToken ? 'Token found' : 'No token');\n console.log('Reset Password Component - Current URL:', typeof window !== 'undefined' ? window.location.href : 'N/A');\n \n // Also subscribe to handle route parameter changes (for navigation within the same component)\n this.activatedRoute.params.subscribe(params => {\n const token = params['rout_token'] || '';\n if (token && token !== this.resetToken) {\n this.resetToken = token;\n this.erro_message.set(''); // Clear any previous error\n }\n });\n \n // Validate token exists and is not empty\n if (!this.resetToken || this.resetToken.trim() === '') {\n this.erro_message.set('Invalid reset password link. Missing token. Please request a new one.');\n console.error('Reset Password: No token found in route parameters or URL');\n } else {\n // Token is present, clear any error messages\n this.erro_message.set('');\n console.log('Reset Password: Token successfully extracted');\n }\n\n // Detect entity ID from domain or route parameter and load entity details (preserve rout_token)\n this.entityDetectionService.detectEntityId(routeParams).pipe(\n switchMap((entityId) => {\n if (entityId) {\n this.entityId.set(entityId);\n console.log('Entity ID detected:', entityId);\n this.entityLoading.set(true); // Start loading\n \n // Load entity details using entity management service\n return this.loadEntityDetails(entityId).pipe(\n catchError((error) => {\n console.warn('Failed to load entity details:', error);\n this.entityLoading.set(false); // Stop loading on error\n return of(null);\n })\n );\n }\n this.entityLoading.set(false); // No entity to load\n return of(null);\n }),\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (entityData) => {\n this.entityLoading.set(false); // Stop loading\n if (entityData) {\n // Update entity info with name and logo\n this.entityInfo.set(entityData);\n }\n \n // Navigate to clean URL (preserve rout_token, remove :query param) if it exists\n if (routeParams['query'] && this.resetToken) {\n this.router.navigate(['auth', 'reset-password', this.resetToken], {\n queryParams: this.activatedRoute.snapshot.queryParams,\n replaceUrl: true\n });\n }\n },\n error: (error) => {\n this.entityLoading.set(false); // Stop loading on error\n console.warn('Entity detection or loading failed:', error);\n }\n });\n }\n\n /**\n * Load entity details by ID\n * @param entityId - Entity ID to load\n * @returns Observable of entity data or null\n */\n private loadEntityDetails(entityId: string) {\n // Dynamically import entity management service to avoid circular dependencies\n return from(import('cloud-ide-core')).pipe(\n switchMap((module) => {\n try {\n const entityService = this.injector.get(module.CideCoreEntityManagementService);\n return entityService.getEntityById(entityId).pipe(\n map((response) => {\n if (response?.success && response?.data) {\n return response.data as CoreSystemEntity;\n }\n return null;\n })\n );\n } catch (error) {\n console.warn('Failed to get entity service:', error);\n return of(null);\n }\n }),\n catchError((error) => {\n console.warn('Failed to import entity service:', error);\n return of(null);\n })\n );\n }\n\n onForgotPasssword() {\n // Mark all fields as touched to show validation errors\n this.resetPassswordForm.markAllAsTouched();\n \n if (this.resetPassswordForm.valid && this.resetToken) {\n this.loading.set(true);\n this.erro_message.set('');\n \n const newPassword = this.resetPassswordForm?.get('new_password')?.value || '';\n const confirmPassword = this.resetPassswordForm?.get('confirm_password')?.value || '';\n \n // Double check password match\n if (newPassword !== confirmPassword) {\n this.loading.set(false);\n this.erro_message.set('Passwords do not match. Please try again.');\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n return;\n }\n\n const resetPasssword: MResetPassword = {\n user_password: newPassword,\n user_username: \"\",\n syen_id: this.entityId() || undefined,\n sylog_config_data: {\n reset_password_link: \"\",\n reset_password_secret: this.resetToken,\n request_timestamp: new Date()\n }\n };\n \n this.authService.resetPassword(resetPasssword)?.subscribe({\n next: (response) => {\n if (response?.success === true) {\n this.loading.set(false);\n this.erro_message.set('');\n this.router.navigate(['auth', 'sign-in']);\n } else {\n this.loading.set(false);\n const errorMessage = response?.message || 'Failed to reset password. Please try again.';\n this.erro_message.set(errorMessage);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.loading.set(false);\n const errorMessage = response?.error?.message || 'Failed to reset password. Please try again.';\n this.erro_message.set(errorMessage);\n console.error('Reset password error:', response);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n });\n } else {\n if (!this.resetToken) {\n this.erro_message.set('Invalid reset password link. Please request a new one.');\n } else if (!this.resetPassswordForm.valid) {\n this.erro_message.set('Please fill in all required fields correctly.');\n }\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n }\n}\n\n","<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-4 tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching reset password page structure -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\" class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- New Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Confirm Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Reset Password Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\" [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" \n class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full tw-object-contain\"\n alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n Reset Password - {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n \n <!-- section for controls -->\n <form [formGroup]=\"resetPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- New Password -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-input \n id=\"new_password\" \n formControlName=\"new_password\"\n type=\"password\"\n placeholder=\"Enter new password\"\n [required]=\"true\">\n </cide-ele-input>\n @if (resetPassswordForm.get('new_password')?.invalid && resetPassswordForm.get('new_password')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n @if (resetPassswordForm.get('new_password')?.errors?.['required']) {\n Password is required\n } @else if (resetPassswordForm.get('new_password')?.errors?.['minlength']) {\n Password must be at least 6 characters\n }\n </div>\n }\n </div>\n <!-- Confirm Password -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-input \n id=\"confirm_password\" \n formControlName=\"confirm_password\"\n type=\"password\"\n placeholder=\"Confirm new password\"\n [required]=\"true\">\n </cide-ele-input>\n @if (resetPassswordForm.get('confirm_password')?.invalid && resetPassswordForm.get('confirm_password')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n @if (resetPassswordForm.get('confirm_password')?.errors?.['required']) {\n Please confirm your password\n }\n </div>\n }\n @if (resetPassswordForm.errors?.['passwordMismatch'] && resetPassswordForm.get('confirm_password')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n Passwords do not match\n </div>\n }\n </div>\n <!-- Reset Password button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"reset_password_button\" [loading]=\"loading()\" [disabled]=\"!resetPassswordForm.valid || loading() || !resetToken\">Reset Password</button>\n </div>\n <!-- Sign In link -->\n <div class=\"tw-m-auto tw-mt-3 tw-text-center tw-w-full tw-max-w-80 sm:tw-w-80\">\n <a routerLink=\"/auth/sign-in\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Back to Sign In</a>\n </div>\n </div>\n </form>\n </div>\n }\n </div>"],"names":[],"mappings":";;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,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,8BAA8B,kJAAE,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIhL,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,cACxB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,UAAU,CAAC,EAAA,QAAA,EAAA,uxMAAA,EAAA;;;;;"}
@@ -6,7 +6,7 @@ import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
6
6
  import { CommonModule } from '@angular/common';
7
7
  import { generateStringFromObject, cidePath, hostManagerRoutesUrl, admissionRoutesUrl } from 'cloud-ide-lms-model';
8
8
  import { Router, ActivatedRoute, RouterLink } from '@angular/router';
9
- import { C as CloudIdeAuthService, E as EntityDetectionService } from './cloud-ide-auth-cloud-ide-auth-Ct2MD8bh.mjs';
9
+ import { C as CloudIdeAuthService, E as EntityDetectionService } from './cloud-ide-auth-cloud-ide-auth-C1Hhl7MY.mjs';
10
10
  import { CideInputComponent, CideEleButtonComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';
11
11
  import { CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';
12
12
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -23,6 +23,7 @@ class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
23
23
  loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
24
24
  entityLoading = signal(true, ...(ngDevMode ? [{ debugName: "entityLoading" }] : []));
25
25
  entityId = signal(null, ...(ngDevMode ? [{ debugName: "entityId" }] : []));
26
+ testLoginConfig = signal(null, ...(ngDevMode ? [{ debugName: "testLoginConfig" }] : []));
26
27
  returnUrl = '/control-panel'; // Default return URL
27
28
  entityInfo = signal({}, ...(ngDevMode ? [{ debugName: "entityInfo" }] : []));
28
29
  router = inject(Router);
@@ -81,6 +82,25 @@ class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
81
82
  if (entityData) {
82
83
  // Update entity info with name and logo
83
84
  this.entityInfo.set(entityData);
85
+ // Load login test credentials config for this entity
86
+ const currentEntityId = this.entityId();
87
+ if (currentEntityId) {
88
+ this.authService.getLoginTestConfig(currentEntityId)
89
+ ?.pipe(takeUntilDestroyed(this.destroyRef))
90
+ .subscribe({
91
+ next: (response) => {
92
+ if (response?.success && response?.data) {
93
+ this.testLoginConfig.set(response.data);
94
+ }
95
+ else {
96
+ this.testLoginConfig.set(null);
97
+ }
98
+ },
99
+ error: () => {
100
+ this.testLoginConfig.set(null);
101
+ }
102
+ });
103
+ }
84
104
  }
85
105
  // Navigate to clean URL (remove :query param) if it exists
86
106
  if (routeParams['query']) {
@@ -219,12 +239,12 @@ class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
219
239
  }));
220
240
  }
221
241
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideAuthSignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideAuthSignInComponent, isStandalone: true, selector: "cide-auth-sign-in", inputs: { shared_wrapper_setup_param: { classPropertyName: "shared_wrapper_setup_param", publicName: "shared_wrapper_setup_param", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-2 sm:tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-2 tw-right-2 sm:tw-top-4 sm:tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Login Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching login page structure -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\"\n class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Forgot Password & Stay Signed In Skeleton -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0 tw-mb-3\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-skeleton-loader [width]=\"'1rem'\" [height]=\"'1rem'\"\n [borderRadius]=\"'0.25rem'\"></cide-ele-skeleton-loader>\n <cide-ele-skeleton-loader [width]=\"'6rem'\" [height]=\"'1rem'\" [count]=\"1\"\n class=\"tw-ml-2\"></cide-ele-skeleton-loader>\n </div>\n <div>\n <cide-ele-skeleton-loader [width]=\"'7rem'\" [height]=\"'1rem'\" [count]=\"1\"></cide-ele-skeleton-loader>\n </div>\n </div>\n <!-- Sign In Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\"\n [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\"\n class=\"tw-m-auto tw-h-full tw-object-contain\" alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n SignIn to {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div\n class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n\n <!-- section for controls -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div>\n <!-- Password -->\n <div class=\"tw-m-auto tw-mt-4 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\" type=\"password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0\">\n <div>\n <cide-ele-input type=\"checkbox\" id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div class=\"tw-text-center sm:tw-text-right\">\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Forgot\n Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\"\n [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n }\n</div>", styles: [":root[data-theme=dark] .cide-font-poppins,:root.dark-mode .cide-font-poppins,html[data-theme=dark] .cide-font-poppins,html.dark-mode .cide-font-poppins{background-color:var(--cide-theme-dark-color)!important}:root[data-theme=dark] .tw-bg-white,:root.dark-mode .tw-bg-white,html[data-theme=dark] .tw-bg-white,html.dark-mode .tw-bg-white{background-color:var(--cide-theme-light-color)!important}:root[data-theme=dark] .tw-text-gray-900,:root.dark-mode .tw-text-gray-900,html[data-theme=dark] .tw-text-gray-900,html.dark-mode .tw-text-gray-900{color:var(--cide-theme-text-color)!important}:root[data-theme=dark] .tw-text-blue-600,:root[data-theme=dark] .tw-text-blue-700,:root.dark-mode .tw-text-blue-600,:root.dark-mode .tw-text-blue-700,html[data-theme=dark] .tw-text-blue-600,html[data-theme=dark] .tw-text-blue-700,html.dark-mode .tw-text-blue-600,html.dark-mode .tw-text-blue-700{color:var(--cide-theme-primary-color)!important}:root[data-theme=dark] .tw-shadow-xl,:root.dark-mode .tw-shadow-xl,html[data-theme=dark] .tw-shadow-xl,html.dark-mode .tw-shadow-xl{box-shadow:0 20px 25px -5px var(--cide-theme-shadow-color),0 10px 10px -5px var(--cide-theme-shadow-color)!important}\n"], dependencies: [{ kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated", "adaptive"], outputs: ["btnClick", "doubleClick"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: CideEleThemeToggleComponent, selector: "cide-ele-theme-toggle", inputs: ["size"] }, { kind: "directive", type: CideEleFileImageDirective, selector: "[cideEleFileImage]", inputs: ["fileId", "altText"] }, { kind: "component", type: CideEleSkeletonLoaderComponent, selector: "cide-ele-skeleton-loader", inputs: ["width", "height", "borderRadius", "count", "circle", "animation"] }] });
242
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideAuthSignInComponent, isStandalone: true, selector: "cide-auth-sign-in", inputs: { shared_wrapper_setup_param: { classPropertyName: "shared_wrapper_setup_param", publicName: "shared_wrapper_setup_param", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-2 sm:tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-2 tw-right-2 sm:tw-top-4 sm:tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Login Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching login page structure -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\"\n class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Forgot Password & Stay Signed In Skeleton -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0 tw-mb-3\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-skeleton-loader [width]=\"'1rem'\" [height]=\"'1rem'\"\n [borderRadius]=\"'0.25rem'\"></cide-ele-skeleton-loader>\n <cide-ele-skeleton-loader [width]=\"'6rem'\" [height]=\"'1rem'\" [count]=\"1\"\n class=\"tw-ml-2\"></cide-ele-skeleton-loader>\n </div>\n <div>\n <cide-ele-skeleton-loader [width]=\"'7rem'\" [height]=\"'1rem'\" [count]=\"1\"></cide-ele-skeleton-loader>\n </div>\n </div>\n <!-- Sign In Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\"\n [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\"\n class=\"tw-m-auto tw-h-full tw-object-contain\" alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n SignIn to {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div\n class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n\n <!-- section for controls -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div>\n <!-- Password -->\n <div class=\"tw-m-auto tw-mt-4 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\" type=\"password\"></cide-ele-input>\n </div>\n <!-- Test login credentials from system config -->\n @if (testLoginConfig()?.is_test_entity && testLoginConfig()?.credentials?.length) {\n <div class=\"tw-m-auto tw-mt-3 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <div class=\"tw-text-xs tw-text-gray-600 tw-mb-1\">\n Test users (from system config)\n </div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-2\">\n @for (cred of testLoginConfig()?.credentials; track cred.username) {\n <button\n type=\"button\"\n class=\"tw-text-xs tw-px-2 tw-py-1 tw-border tw-rounded tw-bg-gray-50 hover:tw-bg-gray-100 tw-flex tw-items-center tw-gap-1\"\n (click)=\"loginForm.patchValue({ user_username: cred.username, user_password: cred.password })\">\n <span class=\"tw-font-medium\">{{ cred.username }}</span>\n </button>\n }\n </div>\n </div>\n }\n <!-- Forgot password -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0\">\n <div>\n <cide-ele-input type=\"checkbox\" id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div class=\"tw-text-center sm:tw-text-right\">\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Forgot\n Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\"\n [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n }\n</div>", styles: [":root[data-theme=dark] .cide-font-poppins,:root.dark-mode .cide-font-poppins,html[data-theme=dark] .cide-font-poppins,html.dark-mode .cide-font-poppins{background-color:var(--cide-theme-dark-color)!important}:root[data-theme=dark] .tw-bg-white,:root.dark-mode .tw-bg-white,html[data-theme=dark] .tw-bg-white,html.dark-mode .tw-bg-white{background-color:var(--cide-theme-light-color)!important}:root[data-theme=dark] .tw-text-gray-900,:root.dark-mode .tw-text-gray-900,html[data-theme=dark] .tw-text-gray-900,html.dark-mode .tw-text-gray-900{color:var(--cide-theme-text-color)!important}:root[data-theme=dark] .tw-text-blue-600,:root[data-theme=dark] .tw-text-blue-700,:root.dark-mode .tw-text-blue-600,:root.dark-mode .tw-text-blue-700,html[data-theme=dark] .tw-text-blue-600,html[data-theme=dark] .tw-text-blue-700,html.dark-mode .tw-text-blue-600,html.dark-mode .tw-text-blue-700{color:var(--cide-theme-primary-color)!important}:root[data-theme=dark] .tw-shadow-xl,:root.dark-mode .tw-shadow-xl,html[data-theme=dark] .tw-shadow-xl,html.dark-mode .tw-shadow-xl{box-shadow:0 20px 25px -5px var(--cide-theme-shadow-color),0 10px 10px -5px var(--cide-theme-shadow-color)!important}\n"], dependencies: [{ kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated", "adaptive"], outputs: ["btnClick", "doubleClick"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: CideEleThemeToggleComponent, selector: "cide-ele-theme-toggle", inputs: ["size"] }, { kind: "directive", type: CideEleFileImageDirective, selector: "[cideEleFileImage]", inputs: ["fileId", "altText"] }, { kind: "component", type: CideEleSkeletonLoaderComponent, selector: "cide-ele-skeleton-loader", inputs: ["width", "height", "borderRadius", "count", "circle", "animation"] }] });
223
243
  }
224
244
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideAuthSignInComponent, decorators: [{
225
245
  type: Component,
226
- args: [{ selector: 'cide-auth-sign-in', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent], template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-2 sm:tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-2 tw-right-2 sm:tw-top-4 sm:tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Login Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching login page structure -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\"\n class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Forgot Password & Stay Signed In Skeleton -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0 tw-mb-3\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-skeleton-loader [width]=\"'1rem'\" [height]=\"'1rem'\"\n [borderRadius]=\"'0.25rem'\"></cide-ele-skeleton-loader>\n <cide-ele-skeleton-loader [width]=\"'6rem'\" [height]=\"'1rem'\" [count]=\"1\"\n class=\"tw-ml-2\"></cide-ele-skeleton-loader>\n </div>\n <div>\n <cide-ele-skeleton-loader [width]=\"'7rem'\" [height]=\"'1rem'\" [count]=\"1\"></cide-ele-skeleton-loader>\n </div>\n </div>\n <!-- Sign In Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\"\n [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\"\n class=\"tw-m-auto tw-h-full tw-object-contain\" alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n SignIn to {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div\n class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n\n <!-- section for controls -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div>\n <!-- Password -->\n <div class=\"tw-m-auto tw-mt-4 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\" type=\"password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0\">\n <div>\n <cide-ele-input type=\"checkbox\" id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div class=\"tw-text-center sm:tw-text-right\">\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Forgot\n Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\"\n [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n }\n</div>", styles: [":root[data-theme=dark] .cide-font-poppins,:root.dark-mode .cide-font-poppins,html[data-theme=dark] .cide-font-poppins,html.dark-mode .cide-font-poppins{background-color:var(--cide-theme-dark-color)!important}:root[data-theme=dark] .tw-bg-white,:root.dark-mode .tw-bg-white,html[data-theme=dark] .tw-bg-white,html.dark-mode .tw-bg-white{background-color:var(--cide-theme-light-color)!important}:root[data-theme=dark] .tw-text-gray-900,:root.dark-mode .tw-text-gray-900,html[data-theme=dark] .tw-text-gray-900,html.dark-mode .tw-text-gray-900{color:var(--cide-theme-text-color)!important}:root[data-theme=dark] .tw-text-blue-600,:root[data-theme=dark] .tw-text-blue-700,:root.dark-mode .tw-text-blue-600,:root.dark-mode .tw-text-blue-700,html[data-theme=dark] .tw-text-blue-600,html[data-theme=dark] .tw-text-blue-700,html.dark-mode .tw-text-blue-600,html.dark-mode .tw-text-blue-700{color:var(--cide-theme-primary-color)!important}:root[data-theme=dark] .tw-shadow-xl,:root.dark-mode .tw-shadow-xl,html[data-theme=dark] .tw-shadow-xl,html.dark-mode .tw-shadow-xl{box-shadow:0 20px 25px -5px var(--cide-theme-shadow-color),0 10px 10px -5px var(--cide-theme-shadow-color)!important}\n"] }]
246
+ args: [{ selector: 'cide-auth-sign-in', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent], template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-2 sm:tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-2 tw-right-2 sm:tw-top-4 sm:tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Login Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching login page structure -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\"\n class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Forgot Password & Stay Signed In Skeleton -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0 tw-mb-3\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-skeleton-loader [width]=\"'1rem'\" [height]=\"'1rem'\"\n [borderRadius]=\"'0.25rem'\"></cide-ele-skeleton-loader>\n <cide-ele-skeleton-loader [width]=\"'6rem'\" [height]=\"'1rem'\" [count]=\"1\"\n class=\"tw-ml-2\"></cide-ele-skeleton-loader>\n </div>\n <div>\n <cide-ele-skeleton-loader [width]=\"'7rem'\" [height]=\"'1rem'\" [count]=\"1\"></cide-ele-skeleton-loader>\n </div>\n </div>\n <!-- Sign In Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\"\n [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\"\n class=\"tw-m-auto tw-h-full tw-object-contain\" alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n SignIn to {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div\n class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n\n <!-- section for controls -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div>\n <!-- Password -->\n <div class=\"tw-m-auto tw-mt-4 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\" type=\"password\"></cide-ele-input>\n </div>\n <!-- Test login credentials from system config -->\n @if (testLoginConfig()?.is_test_entity && testLoginConfig()?.credentials?.length) {\n <div class=\"tw-m-auto tw-mt-3 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <div class=\"tw-text-xs tw-text-gray-600 tw-mb-1\">\n Test users (from system config)\n </div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-2\">\n @for (cred of testLoginConfig()?.credentials; track cred.username) {\n <button\n type=\"button\"\n class=\"tw-text-xs tw-px-2 tw-py-1 tw-border tw-rounded tw-bg-gray-50 hover:tw-bg-gray-100 tw-flex tw-items-center tw-gap-1\"\n (click)=\"loginForm.patchValue({ user_username: cred.username, user_password: cred.password })\">\n <span class=\"tw-font-medium\">{{ cred.username }}</span>\n </button>\n }\n </div>\n </div>\n }\n <!-- Forgot password -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0\">\n <div>\n <cide-ele-input type=\"checkbox\" id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div class=\"tw-text-center sm:tw-text-right\">\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Forgot\n Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\"\n [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n }\n</div>", styles: [":root[data-theme=dark] .cide-font-poppins,:root.dark-mode .cide-font-poppins,html[data-theme=dark] .cide-font-poppins,html.dark-mode .cide-font-poppins{background-color:var(--cide-theme-dark-color)!important}:root[data-theme=dark] .tw-bg-white,:root.dark-mode .tw-bg-white,html[data-theme=dark] .tw-bg-white,html.dark-mode .tw-bg-white{background-color:var(--cide-theme-light-color)!important}:root[data-theme=dark] .tw-text-gray-900,:root.dark-mode .tw-text-gray-900,html[data-theme=dark] .tw-text-gray-900,html.dark-mode .tw-text-gray-900{color:var(--cide-theme-text-color)!important}:root[data-theme=dark] .tw-text-blue-600,:root[data-theme=dark] .tw-text-blue-700,:root.dark-mode .tw-text-blue-600,:root.dark-mode .tw-text-blue-700,html[data-theme=dark] .tw-text-blue-600,html[data-theme=dark] .tw-text-blue-700,html.dark-mode .tw-text-blue-600,html.dark-mode .tw-text-blue-700{color:var(--cide-theme-primary-color)!important}:root[data-theme=dark] .tw-shadow-xl,:root.dark-mode .tw-shadow-xl,html[data-theme=dark] .tw-shadow-xl,html.dark-mode .tw-shadow-xl{box-shadow:0 20px 25px -5px var(--cide-theme-shadow-color),0 10px 10px -5px var(--cide-theme-shadow-color)!important}\n"] }]
227
247
  }], ctorParameters: () => [], propDecorators: { shared_wrapper_setup_param: [{ type: i0.Input, args: [{ isSignal: true, alias: "shared_wrapper_setup_param", required: false }] }] } });
228
248
 
229
249
  export { CideAuthSignInComponent };
230
- //# sourceMappingURL=cloud-ide-auth-sign-in.component-DY2khC37.mjs.map
250
+ //# sourceMappingURL=cloud-ide-auth-sign-in.component-BrW2B2CL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-ide-auth-sign-in.component-BrW2B2CL.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/auth/sign-in/sign-in.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/sign-in/sign-in.component.html"],"sourcesContent":["import { Component, inject, input, OnInit, signal, Injector, DestroyRef } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { loginMethod, MLogin, controllerResponse, CoreSystemEntity, admissionRoutesUrl, hostManagerRoutesUrl, generateStringFromObject, cidePath, AuthUserWithMappings } from 'cloud-ide-lms-model';\r\nimport { Router, RouterLink, ActivatedRoute } from '@angular/router';\r\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\r\nimport { EntityDetectionService } from '../../services/entity-detection.service';\r\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';\r\nimport { CideLytSharedWrapperComponent, CideLytSharedWrapperSetupParam, AppStateHelperService } from 'cloud-ide-layout';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { switchMap, catchError, map } from 'rxjs/operators';\r\nimport { of, from, firstValueFrom } from 'rxjs';\r\nimport { App } from '@capacitor/app';\r\n\r\nexport type FormGroupModel<T> = FormGroup<{\r\n [K in keyof T]: FormControl<T[K]>\r\n}>\r\n\r\n@Component({\r\n selector: 'cide-auth-sign-in',\r\n standalone: true,\r\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent],\r\n templateUrl: './sign-in.component.html',\r\n styleUrl: './sign-in.component.css'\r\n})\r\nexport class CideAuthSignInComponent extends CideLytSharedWrapperComponent implements OnInit {\r\n public override shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({\r\n sypg_page_code: \"auth_sign_in\"\r\n });\r\n public loginForm: FormGroupModel<MLogin>;\r\n public erro_message = signal<string>('');\r\n public loading = signal<boolean>(false);\r\n public entityLoading = signal<boolean>(true);\r\n private entityId = signal<string | null>(null);\r\n public testLoginConfig = signal<{ is_test_entity: boolean; credentials: { username: string; password: string }[] } | null>(null);\r\n private returnUrl: string = '/control-panel'; // Default return URL\r\n public entityInfo = signal<CoreSystemEntity>({});\r\n protected override router = inject(Router);\r\n private activatedRoute = inject(ActivatedRoute);\r\n private authService = inject(CloudIdeAuthService);\r\n private entityDetectionService = inject(EntityDetectionService);\r\n private appStateService = inject(AppStateHelperService);\r\n private injector = inject(Injector);\r\n private destroyRef = inject(DestroyRef);\r\n private http = inject(HttpClient);\r\n constructor(\r\n ) {\r\n super();\r\n\r\n this.loginForm = new FormGroup({\r\n custom_login_method: new FormControl<loginMethod>('pass'),\r\n user_username: new FormControl(''),\r\n user_password: new FormControl(''),\r\n mpin_pin: new FormControl(''),\r\n stay_sign_in: new FormControl(true)\r\n }) as unknown as FormGroupModel<MLogin>;\r\n\r\n\r\n }\r\n\r\n override ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n // Inside ngOnInit\r\n App.addListener('appStateChange', ({ isActive }) => {\r\n if (isActive) {\r\n console.log('App became active/loaded');\r\n this.ngOnInit();\r\n }\r\n });\r\n\r\n // Get return URL from route parameters or default to '/control-panel'\r\n this.returnUrl = this.activatedRoute.snapshot.queryParams['returnUrl'] || 'control-panel';\r\n\r\n // If user is already authenticated, redirect to the return URL\r\n if (this.authService.isAuthenticated() && !this.authService.isTokenExpired()) {\r\n this.router.navigateByUrl(this.returnUrl);\r\n return;\r\n }\r\n\r\n // Detect entity ID from domain or route parameter and load entity details\r\n const routeParams = this.activatedRoute.snapshot.params;\r\n this.entityDetectionService.detectEntityId(routeParams).pipe(\r\n switchMap((entityId) => {\r\n if (entityId) {\r\n this.entityId.set(entityId);\r\n console.log('Entity ID detected:', entityId);\r\n this.entityLoading.set(true); // Start loading\r\n\r\n // Load entity details using entity management service\r\n return this.loadEntityDetails(entityId).pipe(\r\n catchError((error) => {\r\n console.warn('Failed to load entity details:', error);\r\n this.entityLoading.set(false); // Stop loading on error\r\n return of(null);\r\n })\r\n );\r\n }\r\n this.entityLoading.set(false); // No entity to load\r\n return of(null);\r\n }),\r\n takeUntilDestroyed(this.destroyRef)\r\n ).subscribe({\r\n next: (entityData) => {\r\n this.entityLoading.set(false); // Stop loading\r\n if (entityData) {\r\n // Update entity info with name and logo\r\n this.entityInfo.set(entityData);\r\n\r\n // Load login test credentials config for this entity\r\n const currentEntityId = this.entityId();\r\n if (currentEntityId) {\r\n this.authService.getLoginTestConfig(currentEntityId)\r\n ?.pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: any) => {\r\n if (response?.success && response?.data) {\r\n this.testLoginConfig.set(response.data);\r\n } else {\r\n this.testLoginConfig.set(null);\r\n }\r\n },\r\n error: () => {\r\n this.testLoginConfig.set(null);\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Navigate to clean URL (remove :query param) if it exists\r\n if (routeParams['query']) {\r\n this.router.navigate(['auth', 'sign-in'], {\r\n queryParams: this.activatedRoute.snapshot.queryParams,\r\n replaceUrl: true\r\n });\r\n }\r\n },\r\n error: (error) => {\r\n this.entityLoading.set(false); // Stop loading on error\r\n console.warn('Entity detection or loading failed:', error);\r\n }\r\n });\r\n }\r\n\r\n\r\n onSignIn(): void {\r\n if (this.loginForm.valid) {\r\n this.loading.set(true);\r\n\r\n // Include entity ID in login payload if detected\r\n const loginPayload: MLogin = {\r\n ...this.loginForm.value,\r\n syen_id: this.entityId() || undefined\r\n } as MLogin;\r\n\r\n this.authService.signIn(loginPayload)?.subscribe({\r\n next: async (response) => {\r\n this.loading.set(false);\r\n\r\n if (response?.success === true) {\r\n // Store user data in auth service\r\n this.authService.storeUserData(response?.data?.auth_user_mst || {});\r\n\r\n // Synchronize AppStateService with the same user data \r\n this.appStateService.setUser(response?.data?.auth_user_mst || null);\r\n\r\n // Store active entity data\r\n const entity = response?.data?.core_system_entity || null;\r\n this.appStateService.setActiveEntity(entity);\r\n\r\n // Check if user is a student and load admission data\r\n const user = response?.data?.auth_user_mst;\r\n if ((user as AuthUserWithMappings)?.user_type_mapping?.syutm_user_type === 'STUDENT') {\r\n try {\r\n const query = generateStringFromObject({ admap_user_id_auth: user?._id });\r\n const admissionUrl = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n admissionRoutesUrl.module,\r\n admissionRoutesUrl.admissionApplications,\r\n query\r\n ]);\r\n\r\n console.log('🎓 [SignIn] Loading student admission data...');\r\n const admissionResponse: any = await firstValueFrom(this.http.get(admissionUrl));\r\n\r\n if (admissionResponse?.success && admissionResponse?.data) {\r\n const admissionData = Array.isArray(admissionResponse.data) ? admissionResponse.data[0] : admissionResponse.data;\r\n console.log('🎓 [SignIn] Student data loaded:', admissionData?._id);\r\n this.appStateService.setStudentModel(admissionData);\r\n }\r\n } catch (err) {\r\n console.error('🎓 [SignIn] Failed to load student data:', err);\r\n // Don't block login on error, just log it\r\n }\r\n }\r\n\r\n // Load currency configuration from financial config after login\r\n // Note: The app should handle fetching financial config and setting it\r\n // This is just a placeholder - implement based on your app's structure\r\n if (entity?._id) {\r\n try {\r\n const { CurrencyService } = await import('cloud-ide-element');\r\n const currencyService = this.injector.get(CurrencyService);\r\n\r\n // TODO: Fetch financial config from your app's service\r\n // Example:\r\n // const financialConfigService = this.injector.get(CideAccFinancialConfigService);\r\n // const response = await financialConfigService\r\n // .getFinancialConfigById({ accfincfg_entity_id_syen: entity._id })\r\n // .toPromise();\r\n // if (response?.success && response?.data) {\r\n // currencyService.loadFromFinancialConfigData(response.data);\r\n // }\r\n\r\n console.log('✅ Currency service initialized (using default INR or previously set config)');\r\n } catch (error) {\r\n console.warn('⚠️ Failed to initialize currency service:', error);\r\n // Continue with default currency config (INR)\r\n }\r\n }\r\n\r\n // Store token through the service setter which saves to localStorage\r\n this.authService.auth_token = (response?.token || '');\r\n console.log(response?.token);\r\n\r\n // Navigate to the return URL or control panel\r\n await new Promise(resolve => setTimeout(resolve, 200));\r\n this.router.navigateByUrl(this.returnUrl);\r\n } else {\r\n // Handle case where API returns success: false\r\n const errorMessage = response?.message || response?.error_code || 'Login failed. Please check your credentials and try again.';\r\n this.erro_message.set(errorMessage);\r\n\r\n // Clear error message after 5 seconds\r\n setTimeout(() => {\r\n this.erro_message.set('');\r\n }, 5000);\r\n }\r\n },\r\n error: (response: { error: controllerResponse }) => {\r\n this.loading.set(false);\r\n\r\n const errorMessage = response?.error?.message || 'Login failed. Please check your credentials and try again.';\r\n this.erro_message.set(errorMessage);\r\n console.error('Login error:', response);\r\n\r\n // Clear error message after 5 seconds\r\n setTimeout(() => {\r\n this.erro_message.set('');\r\n }, 5000);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Load entity details by ID\r\n * @param entityId - Entity ID to load\r\n * @returns Observable of entity data or null\r\n */\r\n private loadEntityDetails(entityId: string) {\r\n // Dynamically import entity management service to avoid circular dependencies\r\n return from(import('cloud-ide-core')).pipe(\r\n switchMap((module) => {\r\n try {\r\n const entityService = this.injector.get(module.CideCoreEntityManagementService);\r\n return entityService.getEntityById(entityId).pipe(\r\n map((response) => {\r\n if (response?.success && response?.data) {\r\n return response.data as CoreSystemEntity;\r\n }\r\n return null;\r\n })\r\n );\r\n } catch (error) {\r\n console.warn('Failed to get entity service:', error);\r\n return of(null);\r\n }\r\n }),\r\n catchError((error) => {\r\n console.warn('Failed to import entity service:', error);\r\n return of(null);\r\n })\r\n );\r\n }\r\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-2 sm:tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-2 tw-right-2 sm:tw-top-4 sm:tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Login Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching login page structure -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\"\n class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Forgot Password & Stay Signed In Skeleton -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0 tw-mb-3\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-skeleton-loader [width]=\"'1rem'\" [height]=\"'1rem'\"\n [borderRadius]=\"'0.25rem'\"></cide-ele-skeleton-loader>\n <cide-ele-skeleton-loader [width]=\"'6rem'\" [height]=\"'1rem'\" [count]=\"1\"\n class=\"tw-ml-2\"></cide-ele-skeleton-loader>\n </div>\n <div>\n <cide-ele-skeleton-loader [width]=\"'7rem'\" [height]=\"'1rem'\" [count]=\"1\"></cide-ele-skeleton-loader>\n </div>\n </div>\n <!-- Sign In Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\"\n [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\"\n class=\"tw-m-auto tw-h-full tw-object-contain\" alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n SignIn to {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div\n class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n\n <!-- section for controls -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div>\n <!-- Password -->\n <div class=\"tw-m-auto tw-mt-4 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\" type=\"password\"></cide-ele-input>\n </div>\n <!-- Test login credentials from system config -->\n @if (testLoginConfig()?.is_test_entity && testLoginConfig()?.credentials?.length) {\n <div class=\"tw-m-auto tw-mt-3 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <div class=\"tw-text-xs tw-text-gray-600 tw-mb-1\">\n Test users (from system config)\n </div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-2\">\n @for (cred of testLoginConfig()?.credentials; track cred.username) {\n <button\n type=\"button\"\n class=\"tw-text-xs tw-px-2 tw-py-1 tw-border tw-rounded tw-bg-gray-50 hover:tw-bg-gray-100 tw-flex tw-items-center tw-gap-1\"\n (click)=\"loginForm.patchValue({ user_username: cred.username, user_password: cred.password })\">\n <span class=\"tw-font-medium\">{{ cred.username }}</span>\n </button>\n }\n </div>\n </div>\n }\n <!-- Forgot password -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0\">\n <div>\n <cide-ele-input type=\"checkbox\" id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div class=\"tw-text-center sm:tw-text-right\">\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Forgot\n Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\"\n [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n }\n</div>"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BM,MAAO,uBAAwB,SAAQ,6BAA6B,CAAA;IACxD,0BAA0B,GAAG,KAAK,CAA0C;AAC1F,QAAA,cAAc,EAAE;AACjB,KAAA,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,4BAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AACK,IAAA,SAAS;AACT,IAAA,YAAY,GAAG,MAAM,CAAS,EAAE,wDAAC;AACjC,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,mDAAC;AAChC,IAAA,aAAa,GAAG,MAAM,CAAU,IAAI,yDAAC;AACpC,IAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI,oDAAC;AACvC,IAAA,eAAe,GAAG,MAAM,CAA4F,IAAI,2DAAC;AACxH,IAAA,SAAS,GAAW,gBAAgB,CAAC;AACtC,IAAA,UAAU,GAAG,MAAM,CAAmB,EAAE,sDAAC;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAClC,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC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,CAAA;;4FAIhL,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,cACjB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,UAAU,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,8BAA8B,CAAC,EAAA,QAAA,EAAA,oiNAAA,EAAA,MAAA,EAAA,CAAA,+pCAAA,CAAA,EAAA;;;;;"}
@@ -1,2 +1,2 @@
1
- export { b as CideAuthForgotPasswordComponent, d as CideAuthReLoginComponent, a as CloudIdeAuthComponent, C as CloudIdeAuthService, c as ReLoginFloatingService, R as ReLoginService, f as authGuard, e as authRoutes } from './cloud-ide-auth-cloud-ide-auth-Ct2MD8bh.mjs';
1
+ export { b as CideAuthForgotPasswordComponent, d as CideAuthReLoginComponent, a as CloudIdeAuthComponent, C as CloudIdeAuthService, c as ReLoginFloatingService, R as ReLoginService, f as authGuard, e as authRoutes } from './cloud-ide-auth-cloud-ide-auth-C1Hhl7MY.mjs';
2
2
  //# sourceMappingURL=cloud-ide-auth.mjs.map
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AuthUserMst, MLogin, loginControllerResponse, MForgotPassword, ForgotPasswordControllerResponse, MResetPassword, ResetPasswordControllerResponse, switchEntityControllerResponse, CoreSystemEntity, MReLogin, reLoginControllerResponse, loginMethod } from 'cloud-ide-lms-model';
2
2
  import { BehaviorSubject, Observable } from 'rxjs';
3
- import * as i0 from '@angular/core';
3
+ import * as _angular_core from '@angular/core';
4
4
  import { OnInit, OnDestroy } from '@angular/core';
5
5
  import { FormGroup, FormControl } from '@angular/forms';
6
6
  import { Route, CanActivateFn } from '@angular/router';
@@ -24,6 +24,10 @@ declare class CloudIdeAuthService {
24
24
  set view_only_token(value: string);
25
25
  private loadAuthDataFromStorage;
26
26
  storeUserData(userData: AuthUserMst): void;
27
+ /**
28
+ * Get login test credentials configuration for an entity
29
+ */
30
+ getLoginTestConfig(entityId: string): Observable<Object>;
27
31
  signIn(body: MLogin): Observable<loginControllerResponse>;
28
32
  forgotPassword(body: MForgotPassword): Observable<ForgotPasswordControllerResponse>;
29
33
  resetPassword(body: MResetPassword): Observable<ResetPasswordControllerResponse>;
@@ -39,13 +43,13 @@ declare class CloudIdeAuthService {
39
43
  * @returns Observable with new token and entity data
40
44
  */
41
45
  switchEntity(entityId: string): Observable<switchEntityControllerResponse>;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<CloudIdeAuthService, never>;
43
- static ɵprov: i0.ɵɵInjectableDeclaration<CloudIdeAuthService>;
46
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CloudIdeAuthService, never>;
47
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<CloudIdeAuthService>;
44
48
  }
45
49
 
46
50
  declare class CloudIdeAuthComponent {
47
- static ɵfac: i0.ɵɵFactoryDeclaration<CloudIdeAuthComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<CloudIdeAuthComponent, "cide-auth-wrapper", never, {}, {}, never, never, true, never>;
51
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CloudIdeAuthComponent, never>;
52
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CloudIdeAuthComponent, "cide-auth-wrapper", never, {}, {}, never, never, true, never>;
49
53
  }
50
54
 
51
55
  type FormGroupModel<T> = FormGroup<{
@@ -54,11 +58,11 @@ type FormGroupModel<T> = FormGroup<{
54
58
 
55
59
  declare class CideAuthForgotPasswordComponent implements OnInit {
56
60
  forgotPassswordForm: FormGroupModel<MForgotPassword>;
57
- erro_message: i0.WritableSignal<string>;
58
- loading: i0.WritableSignal<boolean>;
59
- entityLoading: i0.WritableSignal<boolean>;
61
+ erro_message: _angular_core.WritableSignal<string>;
62
+ loading: _angular_core.WritableSignal<boolean>;
63
+ entityLoading: _angular_core.WritableSignal<boolean>;
60
64
  private entityId;
61
- entityInfo: i0.WritableSignal<CoreSystemEntity>;
65
+ entityInfo: _angular_core.WritableSignal<CoreSystemEntity>;
62
66
  private authService;
63
67
  private router;
64
68
  private activatedRoute;
@@ -75,8 +79,8 @@ declare class CideAuthForgotPasswordComponent implements OnInit {
75
79
  */
76
80
  private loadEntityDetails;
77
81
  onForgotPasssword(): void;
78
- static ɵfac: i0.ɵɵFactoryDeclaration<CideAuthForgotPasswordComponent, never>;
79
- static ɵcmp: i0.ɵɵComponentDeclaration<CideAuthForgotPasswordComponent, "cide-auth-forgot-password", never, {}, {}, never, never, true, never>;
82
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CideAuthForgotPasswordComponent, never>;
83
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CideAuthForgotPasswordComponent, "cide-auth-forgot-password", never, {}, {}, never, never, true, never>;
80
84
  }
81
85
 
82
86
  /**
@@ -88,8 +92,8 @@ declare class ReLoginService {
88
92
  private showReLoginSubject;
89
93
  showReLogin$: Observable<boolean>;
90
94
  private appStateService;
91
- isLoading: i0.WritableSignal<boolean>;
92
- error: i0.WritableSignal<string | null>;
95
+ isLoading: _angular_core.WritableSignal<boolean>;
96
+ error: _angular_core.WritableSignal<string | null>;
93
97
  /**
94
98
  * Show re-login dialog
95
99
  */
@@ -106,8 +110,8 @@ declare class ReLoginService {
106
110
  * Handle successful re-login
107
111
  */
108
112
  handleReLoginSuccess(response: reLoginControllerResponse): void;
109
- static ɵfac: i0.ɵɵFactoryDeclaration<ReLoginService, never>;
110
- static ɵprov: i0.ɵɵInjectableDeclaration<ReLoginService>;
113
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ReLoginService, never>;
114
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ReLoginService>;
111
115
  }
112
116
 
113
117
  /**
@@ -131,15 +135,15 @@ declare class ReLoginFloatingService {
131
135
  * Hide re-login floating container
132
136
  */
133
137
  hide(): void;
134
- static ɵfac: i0.ɵɵFactoryDeclaration<ReLoginFloatingService, never>;
135
- static ɵprov: i0.ɵɵInjectableDeclaration<ReLoginFloatingService>;
138
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ReLoginFloatingService, never>;
139
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ReLoginFloatingService>;
136
140
  }
137
141
 
138
142
  declare class CideAuthReLoginComponent implements OnInit, OnDestroy {
139
143
  private reLoginService;
140
144
  private readonly destroyRef;
141
- isLoading: i0.WritableSignal<boolean>;
142
- error: i0.WritableSignal<string | null>;
145
+ isLoading: _angular_core.WritableSignal<boolean>;
146
+ error: _angular_core.WritableSignal<string | null>;
143
147
  reLoginForm: FormGroup<{
144
148
  custom_login_method: FormControl<loginMethod | null>;
145
149
  user_password: FormControl<string | null>;
@@ -147,8 +151,8 @@ declare class CideAuthReLoginComponent implements OnInit, OnDestroy {
147
151
  ngOnInit(): void;
148
152
  ngOnDestroy(): void;
149
153
  onSubmit(): void;
150
- static ɵfac: i0.ɵɵFactoryDeclaration<CideAuthReLoginComponent, never>;
151
- static ɵcmp: i0.ɵɵComponentDeclaration<CideAuthReLoginComponent, "cide-auth-re-login", never, {}, {}, never, never, true, never>;
154
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CideAuthReLoginComponent, never>;
155
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CideAuthReLoginComponent, "cide-auth-re-login", never, {}, {}, never, never, true, never>;
152
156
  }
153
157
 
154
158
  declare const authRoutes: Route;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-ide-auth",
3
- "version": "1.0.82",
3
+ "version": "1.0.85",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0",
package/README.md DELETED
@@ -1,63 +0,0 @@
1
- # CloudIdeAuth
2
-
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.0.
4
-
5
- ## Code scaffolding
6
-
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
-
9
- ```bash
10
- ng generate component component-name
11
- ```
12
-
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
-
15
- ```bash
16
- ng generate --help
17
- ```
18
-
19
- ## Building
20
-
21
- To build the library, run:
22
-
23
- ```bash
24
- ng build cloud-ide-auth
25
- ```
26
-
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
-
29
- ### Publishing the Library
30
-
31
- Once the project is built, you can publish your library by following these steps:
32
-
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/cloud-ide-auth
36
- ```
37
-
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
42
-
43
- ## Running unit tests
44
-
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
-
47
- ```bash
48
- ng test
49
- ```
50
-
51
- ## Running end-to-end tests
52
-
53
- For end-to-end (e2e) testing, run:
54
-
55
- ```bash
56
- ng e2e
57
- ```
58
-
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
60
-
61
- ## Additional Resources
62
-
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloud-ide-auth-cloud-ide-auth-Ct2MD8bh.mjs","sources":["../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.service.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.component.ts","../../../projects/cloud-ide-auth/src/lib/services/entity-detection.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/forgot-password/forgot-password.component.html","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login-floating.service.ts","../../../projects/cloud-ide-auth/src/lib/auth/re-login/re-login.component.ts","../../../projects/cloud-ide-auth/src/lib/cloud-ide-auth.routes.ts","../../../projects/cloud-ide-auth/src/lib/guards/auth.guard.ts","../../../projects/cloud-ide-auth/src/public-api.ts","../../../projects/cloud-ide-auth/src/cloud-ide-auth.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport {\n authRoutesUrl, cidePath, hostManagerRoutesUrl, AuthUserMst,\n loginControllerResponse, MLogin, MForgotPassword, ForgotPasswordControllerResponse,\n MResetPassword, ResetPasswordControllerResponse, customEncrypt, MEntitySwitch, switchEntityControllerResponse\n} from 'cloud-ide-lms-model';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CloudIdeAuthService {\n public auth_user_mst: BehaviorSubject<AuthUserMst> = new BehaviorSubject({});\n private _auth_token: string = \"\";\n\n // Storage keys\n private readonly TOKEN_STORAGE_KEY = 'cide_auth_token';\n private readonly USER_STORAGE_KEY = 'cide_auth_user';\n\n // Modern Angular v20 dependency injection pattern\n private http = inject(HttpClient);\n\n constructor() {\n // Modern Angular v20 pattern: Use constructor for initialization only\n this.loadAuthDataFromStorage();\n }\n\n /**\n * Check if localStorage is available (browser environment)\n */\n private isLocalStorageAvailable(): boolean {\n try {\n return typeof window !== 'undefined' && typeof localStorage !== 'undefined';\n } catch {\n return false;\n }\n }\n\n // Getter and setter for auth_token with localStorage persistence\n // Single source of truth: localStorage is the authoritative source\n get auth_token(): string {\n // Always read from localStorage as single source of truth\n if (this.isLocalStorageAvailable()) {\n const storedToken = localStorage.getItem(this.TOKEN_STORAGE_KEY);\n if (storedToken) {\n // Sync in-memory value with localStorage\n this._auth_token = storedToken;\n return storedToken;\n }\n }\n return this._auth_token;\n }\n\n set auth_token(value: string) {\n // Update in-memory value\n this._auth_token = value;\n \n // Save to localStorage as single source of truth\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n if (value) {\n localStorage.setItem(this.TOKEN_STORAGE_KEY, value);\n } else {\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\n }\n }\n\n // View-only token for public APIs\n private readonly VIEW_ONLY_TOKEN_STORAGE_KEY = 'cloud_ide_view_only_token';\n private _view_only_token: string = '';\n\n get view_only_token(): string {\n // Always read from localStorage as single source of truth\n if (this.isLocalStorageAvailable()) {\n const storedToken = localStorage.getItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\n if (storedToken) {\n // Sync in-memory value with localStorage\n this._view_only_token = storedToken;\n return storedToken;\n }\n }\n return this._view_only_token;\n }\n\n set view_only_token(value: string) {\n // Update in-memory value\n this._view_only_token = value;\n \n // Save to localStorage as single source of truth\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n if (value) {\n localStorage.setItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY, value);\n } else {\n localStorage.removeItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\n }\n }\n\n // Load authentication data from localStorage on service initialization\n private loadAuthDataFromStorage(): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n try {\n // Load token\n const storedToken = localStorage.getItem(this.TOKEN_STORAGE_KEY);\n if (storedToken) {\n this._auth_token = storedToken;\n }\n\n // Load view-only token\n const storedViewOnlyToken = localStorage.getItem(this.VIEW_ONLY_TOKEN_STORAGE_KEY);\n if (storedViewOnlyToken) {\n this._view_only_token = storedViewOnlyToken;\n }\n\n // Load user data\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\n if (storedUserData) {\n const userData = JSON.parse(storedUserData);\n this.auth_user_mst.next(userData);\n }\n } catch (error) {\n // Silent error handling for auth data loading\n }\n }\n\n // Store user data in localStorage\n public storeUserData(userData: AuthUserMst): void {\n if (userData) {\n this.auth_user_mst.next(userData);\n if (this.isLocalStorageAvailable()) {\n localStorage.setItem(this.USER_STORAGE_KEY, JSON.stringify(userData));\n }\n }\n }\n\n signIn(body: MLogin): Observable<loginControllerResponse> {\n // Create a copy to avoid mutating the original\n const loginPayload: MLogin = new MLogin(body);\n \n if (loginPayload?.user_password) {\n if (loginPayload?.user_password?.length <= 6) {\n // MPIN - no encryption needed for MPIN\n loginPayload.custom_login_method = \"mpin\";\n loginPayload.mpin_pin = loginPayload?.user_password;\n loginPayload.user_password = \"\";\n } else {\n // Password - encrypt before sending\n loginPayload.custom_login_method = \"pass\";\n loginPayload.user_password = customEncrypt(loginPayload.user_password);\n }\n }\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.signIn]), loginPayload);\n }\n\n forgotPassword(body: MForgotPassword): Observable<ForgotPasswordControllerResponse> {\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.forgotPassword]), body);\n }\n\n resetPassword(body: MResetPassword): Observable<ResetPasswordControllerResponse> {\n const payload = new MResetPassword(body);\n if (payload?.Validate) {\n payload?.Validate();\n }\n // Encrypt password before sending\n if (payload.user_password) {\n payload.user_password = customEncrypt(payload.user_password);\n }\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.resetPassword]), payload);\n }\n\n // Sign out the user and clear all stored auth data\n signOut(): void {\n // Clear token and user data from memory\n this._auth_token = \"\";\n this.auth_user_mst.next({});\n\n // Clear stored data\n if (this.isLocalStorageAvailable()) {\n localStorage.removeItem(this.TOKEN_STORAGE_KEY);\n localStorage.removeItem(this.USER_STORAGE_KEY);\n }\n }\n\n // Check if user is authenticated\n isAuthenticated(): boolean {\n return !!this._auth_token;\n }\n\n // Get current user data \n getCurrentUser(): AuthUserMst {\n return this.auth_user_mst.getValue();\n }\n\n // Check if token is expired\n isTokenExpired(): boolean {\n try {\n if (!this._auth_token) {\n return true;\n }\n\n // Extract the payload from the JWT token\n const tokenParts = this._auth_token.split('.');\n if (tokenParts.length !== 3) {\n return true; // Not a valid JWT token\n }\n\n const payload = JSON.parse(atob(tokenParts[1]));\n\n // Check expiration time\n const expiration = payload.exp * 1000; // Convert seconds to milliseconds\n return Date.now() >= expiration;\n } catch (error) {\n return true; // Assume expired if there's an error\n }\n }\n\n // Refresh auth data if needed based on stored data\n refreshAuthState(): void {\n // If we have a token but no user data, try to load user data\n if (this._auth_token && this.auth_user_mst && Object.keys(this.auth_user_mst.getValue()).length === 0 && this.isLocalStorageAvailable()) {\n const storedUserData = localStorage.getItem(this.USER_STORAGE_KEY);\n if (storedUserData) {\n try {\n const userData = JSON.parse(storedUserData);\n this.auth_user_mst.next(userData);\n } catch (error) {\n // Silent error handling for parsing user data\n }\n }\n }\n\n // If token is expired, sign out\n if (this.isTokenExpired()) {\n this.signOut();\n }\n }\n\n /**\n * Switch entity for logged-in user\n * Creates a new auth_logs entry and updates the entity mapping\n * @param entityId - Entity ID to switch to\n * @returns Observable with new token and entity data\n */\n switchEntity(entityId: string): Observable<switchEntityControllerResponse> {\n const payload: MEntitySwitch = new MEntitySwitch({\n syen_id: entityId\n });\n \n return this.http?.post<switchEntityControllerResponse>(\n cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, authRoutesUrl?.module, authRoutesUrl?.switchEntity]),\n payload\n );\n }\n}\n","import { Component } from '@angular/core';\r\nimport { RouterOutlet } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'cide-auth-wrapper',\r\n standalone: true,\r\n imports: [RouterOutlet],\r\n template: `\r\n <router-outlet></router-outlet>\r\n `,\r\n styles: ``\r\n})\r\nexport class CloudIdeAuthComponent {\r\n\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, of } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport {\r\n cidePath,\r\n hostManagerRoutesUrl,\r\n coreRoutesUrl,\r\n generateStringFromObject,\r\n generateObjectFromString,\r\n entityByDomainControllerResponse,\r\n MEntityByDomain\r\n} from 'cloud-ide-lms-model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EntityDetectionService {\r\n private http = inject(HttpClient);\r\n\r\n /**\r\n * Extract and normalize domain from current URL\r\n * @returns Normalized domain string (without www. prefix, lowercase)\r\n */\r\n getDomainFromUrl(): string {\r\n if (typeof window === 'undefined') {\r\n return '';\r\n }\r\n const hostname = window.location.hostname;\r\n // Remove 'www.' prefix if present and convert to lowercase\r\n return hostname.replace(/^www\\./, '').toLowerCase();\r\n }\r\n\r\n /**\r\n * Extract entity ID from route parameters (object-to-string format)\r\n * @param routeParams - Route parameters object (e.g., { query: 'suwrklfs' })\r\n * @returns Entity ID string or null\r\n */\r\n getEntityIdFromRoute(routeParams?: any): string | null {\r\n if (!routeParams || !routeParams['query']) {\r\n return null;\r\n }\r\n\r\n try {\r\n const queryData = generateObjectFromString(routeParams['query']);\r\n return queryData?.syen_id || null;\r\n } catch (error) {\r\n console.warn('Failed to decode route parameter:', error);\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Lookup entity ID by domain using API\r\n * @param domain - Domain string to lookup\r\n * @returns Observable of entity ID string or null\r\n */\r\n lookupEntityByDomain(domain: string): Observable<string | null> {\r\n if (!domain) {\r\n return of(null);\r\n }\r\n\r\n const domainPayload: MEntityByDomain = new MEntityByDomain({ domain });\r\n const query = generateStringFromObject(domainPayload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl.entityByDomain,\r\n query\r\n ]);\r\n\r\n return this.http.get<entityByDomainControllerResponse>(url).pipe(\r\n map((response) => {\r\n if (response?.success && response?.data?._id) {\r\n return response.data._id;\r\n }\r\n return null;\r\n }),\r\n catchError((error) => {\r\n console.warn('Domain lookup failed:', error);\r\n return of(null);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Detect entity ID using priority:\r\n * 1. Domain lookup (primary)\r\n * 2. Route parameter (fallback)\r\n * @param routeParams - Optional route parameters for fallback\r\n * @returns Observable of entity ID string or null\r\n */\r\n detectEntityId(routeParams?: any): Observable<string | null> {\r\n // First, try domain lookup\r\n const domain = this.getDomainFromUrl();\r\n \r\n if (domain) {\r\n return this.lookupEntityByDomain(domain).pipe(\r\n map((entityId) => {\r\n // If domain lookup succeeds, return the entity ID\r\n if (entityId) {\r\n return entityId;\r\n }\r\n // If domain lookup fails, try route parameter fallback\r\n return this.getEntityIdFromRoute(routeParams);\r\n })\r\n );\r\n }\r\n\r\n // If no domain, try route parameter fallback\r\n const routeEntityId = this.getEntityIdFromRoute(routeParams);\r\n return of(routeEntityId);\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, inject, signal, OnInit, DestroyRef, Injector } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router, ActivatedRoute, RouterLink } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { forgotPasswordMethod, MForgotPassword, validateRequestModal, controllerResponse, CoreSystemEntity } from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { EntityDetectionService } from '../../services/entity-detection.service';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent, NotificationService } from 'cloud-ide-element';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { switchMap, catchError, map } from 'rxjs/operators';\nimport { of, from } from 'rxjs';\n\n@Component({\n selector: 'cide-auth-forgot-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent, RouterLink],\n templateUrl: './forgot-password.component.html',\n styleUrl: './forgot-password.component.css'\n})\nexport class CideAuthForgotPasswordComponent implements OnInit {\n public forgotPassswordForm: FormGroupModel<MForgotPassword>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n public entityLoading = signal<boolean>(true);\n private entityId = signal<string | null>(null);\n public entityInfo = signal<CoreSystemEntity>({});\n\n private authService = inject(CloudIdeAuthService);\n private router = inject(Router);\n private activatedRoute = inject(ActivatedRoute);\n private entityDetectionService = inject(EntityDetectionService);\n private destroyRef = inject(DestroyRef);\n private injector = inject(Injector);\n private notificationService = inject(NotificationService);\n\n constructor() {\n this.forgotPassswordForm = new FormGroup({\n custom_forgot_password_method: new FormControl<forgotPasswordMethod>('username'),\n user_username: new FormControl('', [Validators.required, Validators.minLength(8), Validators.maxLength(20)]),\n user_emailid: new FormControl(''),\n user_mobileno: new FormControl(),\n }) as unknown as FormGroupModel<MForgotPassword>;\n }\n\n ngOnInit(): void {\n // Detect entity ID from domain or route parameter and load entity details\n const routeParams = this.activatedRoute.snapshot.params;\n this.entityDetectionService.detectEntityId(routeParams).pipe(\n switchMap((entityId) => {\n if (entityId) {\n this.entityId.set(entityId);\n console.log('Entity ID detected:', entityId);\n this.entityLoading.set(true); // Start loading\n \n // Load entity details using entity management service\n return this.loadEntityDetails(entityId).pipe(\n catchError((error) => {\n console.warn('Failed to load entity details:', error);\n this.entityLoading.set(false); // Stop loading on error\n return of(null);\n })\n );\n }\n this.entityLoading.set(false); // No entity to load\n return of(null);\n }),\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (entityData) => {\n this.entityLoading.set(false); // Stop loading\n if (entityData) {\n // Update entity info with name and logo\n this.entityInfo.set(entityData);\n }\n \n // Navigate to clean URL (remove :query param) if it exists\n if (routeParams['query']) {\n this.router.navigate(['auth', 'forgot-password'], {\n queryParams: this.activatedRoute.snapshot.queryParams,\n replaceUrl: true\n });\n }\n },\n error: (error) => {\n this.entityLoading.set(false); // Stop loading on error\n console.warn('Entity detection or loading failed:', error);\n }\n });\n }\n\n /**\n * Load entity details by ID\n * @param entityId - Entity ID to load\n * @returns Observable of entity data or null\n */\n private loadEntityDetails(entityId: string) {\n // Dynamically import entity management service to avoid circular dependencies\n return from(import('cloud-ide-core')).pipe(\n switchMap((module) => {\n try {\n const entityService = this.injector.get(module.CideCoreEntityManagementService);\n return entityService.getEntityById(entityId).pipe(\n map((response) => {\n if (response?.success && response?.data) {\n return response.data as CoreSystemEntity;\n }\n return null;\n })\n );\n } catch (error) {\n console.warn('Failed to get entity service:', error);\n return of(null);\n }\n }),\n catchError((error) => {\n console.warn('Failed to import entity service:', error);\n return of(null);\n })\n );\n }\n\n onForgotPasssword() {\n // Mark all fields as touched to show validation errors\n this.forgotPassswordForm.markAllAsTouched();\n \n // Clear previous error messages\n this.erro_message.set('');\n \n // Check if form has basic Angular validators passed\n if (!this.forgotPassswordForm.valid) {\n const usernameControl = this.forgotPassswordForm.get('user_username');\n if (usernameControl?.errors?.['required']) {\n this.erro_message.set('Username is required');\n } else if (usernameControl?.errors?.['minlength']) {\n this.erro_message.set('Username must be at least 8 characters');\n } else if (usernameControl?.errors?.['maxlength']) {\n this.erro_message.set('Username must be at most 20 characters');\n } else {\n this.erro_message.set('Please fill in all required fields correctly');\n }\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n return;\n }\n\n // Create the model and validate using custom validation\n const formValue = {\n ...this.forgotPassswordForm.value,\n syen_id: this.entityId() || undefined\n } as MForgotPassword;\n const forgotPasswordPayload = new MForgotPassword(formValue);\n const validate = validateRequestModal(forgotPasswordPayload);\n \n if (validate !== true) {\n // Custom validation failed\n this.loading.set(false);\n const errorKey = validate.first;\n // Get the error message from errorLogger using the first key\n const errorMessage = (validate.errorLogger as Record<string, string>)?.[errorKey] || 'Validation failed. Please check your input.';\n this.erro_message.set(errorMessage);\n console.error('Forgot password validation error:', validate);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n return;\n }\n\n // All validations passed, make API call\n this.loading.set(true);\n this.authService.forgotPassword(forgotPasswordPayload)?.subscribe({\n next: (response) => {\n this.loading.set(false);\n if (response?.success === true) {\n this.erro_message.set('');\n // Show success notification\n this.notificationService.success(\n 'Password reset link has been sent to your registered email. Please check your email to reset your password.',\n {\n title: 'Email Sent Successfully',\n duration: 5000\n }\n );\n // Reset the form after successful submission\n this.forgotPassswordForm.reset();\n this.forgotPassswordForm.patchValue({\n custom_forgot_password_method: 'username'\n });\n } else {\n // API returned success: false\n const errorMessage = response?.message || 'Failed to process forgot password request. Please try again.';\n this.erro_message.set(errorMessage);\n console.error('Forgot password API error:', response);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.loading.set(false);\n const errorMessage = response?.error?.message || 'Failed to process forgot password request. Please try again.';\n this.erro_message.set(errorMessage);\n console.error('Forgot password error:', response);\n setTimeout(() => {\n this.erro_message.set('');\n }, 3000);\n }\n });\n }\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-4 tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching forgot password page structure -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\" class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Reset Password Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl md:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 md:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\" [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" \n class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full tw-object-contain\"\n alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n Forgot Password - {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n \n <!-- section for controls -->\n <form [formGroup]=\"forgotPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-input \n id=\"user_username\" \n formControlName=\"user_username\"\n placeholder=\"Enter your username\"\n [required]=\"true\">\n </cide-ele-input>\n @if (forgotPassswordForm.get('user_username')?.invalid && forgotPassswordForm.get('user_username')?.touched) {\n <div class=\"tw-text-xs tw-text-red-600 tw-mt-1\">\n @if (forgotPassswordForm.get('user_username')?.errors?.['required']) {\n Username is required\n } @else if (forgotPassswordForm.get('user_username')?.errors?.['minlength']) {\n Username must be at least 8 characters\n } @else if (forgotPassswordForm.get('user_username')?.errors?.['maxlength']) {\n Username must be at most 20 characters\n }\n </div>\n }\n </div>\n <!-- Forgot Password button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"reset_password_link_button\" [loading]=\"loading()\" [disabled]=\"!forgotPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n <!-- Sign In link -->\n <div class=\"tw-m-auto tw-mt-3 tw-text-center tw-w-full tw-max-w-80 sm:tw-w-80\">\n <a routerLink=\"/auth/sign-in\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Back to Sign In</a>\n </div>\n </div>\n </form>\n </div>\n }\n </div>","import { Injectable, inject, signal } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, Observable, catchError, of } from 'rxjs';\nimport {\n authRoutesUrl,\n cidePath,\n hostManagerRoutesUrl,\n MReLogin,\n reLoginControllerResponse,\n AuthUserMst,\n customEncrypt,\n controllerResponse,\n loginResponseData\n} from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { AppStateHelperService } from 'cloud-ide-layout';\n\n/**\n * Service to handle re-login functionality when 401 errors occur\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ReLoginService {\n private http = inject(HttpClient);\n private authService = inject(CloudIdeAuthService);\n\n // Observable to control re-login dialog visibility\n private showReLoginSubject = new BehaviorSubject<boolean>(false);\n public showReLogin$ = this.showReLoginSubject.asObservable();\n private appStateService = inject(AppStateHelperService);\n\n // Signal for re-login state\n isLoading = signal<boolean>(false);\n error = signal<string | null>(null);\n\n /**\n * Show re-login dialog\n */\n showReLogin(): void {\n // Only show if we have a token (session expired scenario)\n if (this.authService.auth_token) {\n this.showReLoginSubject.next(true);\n }\n }\n\n /**\n * Hide re-login dialog\n */\n hideReLogin(): void {\n this.showReLoginSubject.next(false);\n this.error.set(null);\n }\n\n\n /**\n * Perform re-login with MPIN or password\n */\n reLogin(payload: MReLogin): Observable<reLoginControllerResponse> {\n this.isLoading.set(true);\n this.error.set(null);\n\n // Create a copy to avoid mutating the original\n const reLoginPayload: MReLogin = {\n ...payload,\n token: this.authService.auth_token\n };\n\n // Encrypt password if provided (MPIN doesn't need encryption)\n if (reLoginPayload.user_password && reLoginPayload.custom_login_method === 'pass') {\n reLoginPayload.user_password = customEncrypt(reLoginPayload.user_password);\n }\n\n const url = cidePath.join([\n hostManagerRoutesUrl.cideSuiteHost,\n authRoutesUrl.module,\n authRoutesUrl.createReLoginSession\n ]);\n\n return this.http.post<reLoginControllerResponse>(url, reLoginPayload).pipe(\n catchError((response: { error: controllerResponse }) => {\n this.isLoading.set(false);\n const errorMessage = response?.error?.message || 'Re-login failed';\n this.error.set(errorMessage);\n return of({\n success: false,\n message: errorMessage\n } as reLoginControllerResponse);\n })\n );\n }\n\n /**\n * Handle successful re-login\n */\n handleReLoginSuccess(response: reLoginControllerResponse): void {\n if (response.success && response.token) {\n // Update auth token\n this.authService.auth_token = response.token;\n\n // Update user data if available\n if (response.data) {\n const userData = response.data as loginResponseData;\n this.authService.storeUserData(userData?.auth_user_mst);\n\n // Synchronize AppStateService with the same user data \n this.appStateService.setUser(response?.data?.auth_user_mst || null);\n\n // Store active entity data\n const entity = response?.data?.core_system_entity || null;\n this.appStateService.setActiveEntity(entity);\n\n }\n\n // Hide re-login dialog\n this.hideReLogin();\n this.isLoading.set(false);\n } else {\n this.error.set(response.message || 'Re-login failed');\n this.isLoading.set(false);\n }\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { ReLoginService } from './re-login.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\nimport type { FloatingContainerConfig } from 'cloud-ide-element';\n\n/**\n * Service to manage re-login component in floating container\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ReLoginFloatingService {\n private containerService = inject(CideEleFloatingContainerService);\n private reLoginService = inject(ReLoginService);\n private readonly destroyRef = inject(DestroyRef);\n private containerId: string | null = null;\n\n constructor() {\n // Register the component when service is initialized\n this.registerReLoginComponent();\n\n // Subscribe to re-login service to show/hide dialog\n this.reLoginService.showReLogin$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((shouldShow) => {\n if (shouldShow && !this.containerId) {\n this.show();\n } else if (!shouldShow && this.containerId) {\n this.hide();\n }\n });\n }\n\n /**\n * Register re-login component with floating container service\n */\n private async registerReLoginComponent(): Promise<void> {\n if (this.containerService.isComponentRegistered('re-login')) {\n return;\n }\n\n try {\n const module = await import('./re-login.component');\n if (!module.CideAuthReLoginComponent) {\n throw new Error('Component class not found in module');\n }\n this.containerService.registerComponent('re-login', module.CideAuthReLoginComponent);\n } catch (error) {\n console.error('Failed to register re-login component:', error);\n }\n }\n\n /**\n * Show re-login in floating container\n */\n async show(): Promise<string | null> {\n // Ensure component is registered\n if (!this.containerService.isComponentRegistered('re-login')) {\n await this.registerReLoginComponent();\n }\n\n const config: FloatingContainerConfig = {\n id: 're-login-container',\n title: 'Re-Login Required',\n icon: 'lock',\n backdrop: true,\n width: '420px',\n height: 'auto',\n minWidth: '400px',\n minHeight: '200px',\n resizable: false,\n draggable: true,\n closable: false, // Prevent closing - user must re-login\n minimizable: false,\n maximizable: false,\n componentId: 're-login',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n };\n\n this.containerId = this.containerService.show(config);\n return this.containerId;\n }\n\n /**\n * Hide re-login floating container\n */\n hide(): void {\n if (this.containerId) {\n this.containerService.hide(this.containerId);\n this.containerId = null;\n }\n }\n}\n","import { Component, inject, OnInit, OnDestroy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\nimport {\n loginMethod,\n MReLogin,\n reLoginControllerResponse\n} from 'cloud-ide-lms-model';\nimport { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';\nimport { ReLoginService } from './re-login.service';\n\n@Component({\n selector: 'cide-auth-re-login',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideInputComponent,\n CideEleButtonComponent\n ],\n template: `\n <div class=\"tw-w-full tw-max-w-md tw-mx-auto tw-p-6\">\n <div class=\"tw-text-center tw-mb-6\">\n <h2 class=\"tw-text-2xl tw-font-semibold tw-text-gray-900 tw-mb-2\">Session Expired</h2>\n <p class=\"tw-text-sm tw-text-gray-600\">Please re-authenticate to continue</p>\n </div>\n\n @if (error()) {\n <div class=\"tw-mb-4 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <p class=\"tw-text-sm tw-text-red-600\">{{ error() }}</p>\n </div>\n }\n\n <form [formGroup]=\"reLoginForm\" (ngSubmit)=\"onSubmit()\">\n <div class=\"tw-space-y-4\">\n <!-- Single input field for both password and MPIN -->\n <div>\n <cide-ele-input\n id=\"user_password_mpin\"\n formControlName=\"user_password\"\n type=\"password\"\n placeholder=\"Enter your password or MPIN\"\n [required]=\"true\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-flex tw-gap-3 tw-pt-4\">\n <button\n type=\"submit\"\n cideEleButton\n variant=\"primary\"\n [loading]=\"isLoading()\"\n [disabled]=\"!reLoginForm.valid || isLoading()\"\n class=\"tw-flex-1\">\n Re-Login\n </button>\n </div>\n </div>\n </form>\n </div>\n `,\n styles: []\n})\nexport class CideAuthReLoginComponent implements OnInit, OnDestroy {\n private reLoginService = inject(ReLoginService);\n private readonly destroyRef = inject(DestroyRef);\n\n isLoading = this.reLoginService.isLoading;\n error = this.reLoginService.error;\n\n reLoginForm = new FormGroup({\n custom_login_method: new FormControl<loginMethod>('pass'),\n user_password: new FormControl<string>('')\n });\n\n ngOnInit(): void {\n // Set default login method to password\n this.reLoginForm.patchValue({\n custom_login_method: 'pass'\n });\n }\n\n ngOnDestroy(): void {\n // Cleanup handled by takeUntilDestroyed\n }\n\n onSubmit(): void {\n if (this.reLoginForm.valid) {\n const formValue = this.reLoginForm.value;\n const passwordValue = formValue.user_password || '';\n \n // Auto-detect MPIN vs Password based on length (same as login screen)\n // If length <= 6, treat as MPIN, otherwise as password\n let customLoginMethod: loginMethod = 'pass';\n let userPassword: string | undefined = passwordValue;\n let mpinPin: string | undefined = undefined;\n\n if (passwordValue && passwordValue.length <= 6) {\n customLoginMethod = 'mpin';\n mpinPin = passwordValue;\n userPassword = undefined;\n }\n\n const payload: MReLogin = new MReLogin({\n custom_login_method: customLoginMethod,\n user_password: userPassword,\n mpin_pin: mpinPin\n } as MReLogin);\n\n this.reLoginService.reLogin(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response: reLoginControllerResponse) => {\n this.reLoginService.handleReLoginSuccess(response);\n },\n error: () => {\n // Error is handled in the service\n }\n });\n }\n }\n}\n\n","import { Route } from '@angular/router';\n\nexport const authRoutes: Route = {\n path: \"auth\", // localhost:4200/auth/sign-in\n loadComponent: () => import('./cloud-ide-auth.component').then(c => c.CloudIdeAuthComponent),\n children: [\n {\n path: \"\",\n pathMatch: 'full',\n redirectTo: 'sign-in'\n },\n {\n path: \"sign-in/:query\",\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\n },\n {\n path: \"sign-in\",\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\n },\n {\n path: \"forgot-password/:query\",\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\n },\n {\n path: \"forgot-password\",\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\n },\n {\n path: \"reset-password/:rout_token/:query\",\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\n },\n {\n path: \"reset-password/:rout_token\",\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\n }\n ]\n}\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { IAuthService, AUTH_SERVICE_TOKEN, IAppStateService, APP_STATE_SERVICE_TOKEN } from 'cloud-ide-shared';\r\n\r\nexport const authGuard: CanActivateFn = (route, state) => {\r\n const authService = inject(AUTH_SERVICE_TOKEN) as IAuthService;\r\n const appState = inject(APP_STATE_SERVICE_TOKEN) as IAppStateService;\r\n const router = inject(Router);\r\n\r\n // Check if user is authenticated using current state (without refreshing first)\r\n const isAuthenticated = appState.isUserAuthenticated() && !authService.isTokenExpired();\r\n\r\n // Defer state refresh to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\r\n Promise.resolve().then(() => {\r\n // Refresh auth state to make sure it's current\r\n authService.refreshAuthState();\r\n\r\n // Refresh app state from localStorage to ensure synchronization\r\n appState.refreshFromLocalStorage();\r\n });\r\n\r\n if (isAuthenticated) {\r\n return true;\r\n } else {\r\n console.log('User is not authenticated, redirecting to login page', appState.isUserAuthenticated(), !authService.isTokenExpired());\r\n }\r\n\r\n // Redirect to login page with the intended destination\r\n router.navigate(['/auth/sign-in'], { \r\n queryParams: { returnUrl: state.url }\r\n });\r\n\r\n return false;\r\n};\r\n","/*\n * Public API Surface of cloud-ide-auth\n */\n\nexport * from './lib/cloud-ide-auth.service';\nexport * from './lib/cloud-ide-auth.component';\nexport * from './lib/auth/forgot-password/forgot-password.component';\nexport * from './lib/auth/re-login/re-login.service';\nexport * from './lib/auth/re-login/re-login-floating.service';\nexport * from './lib/auth/re-login/re-login.component';\nexport * from './lib/cloud-ide-auth.routes';\nexport * from './lib/guards/auth.guard';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["catchError"],"mappings":";;;;;;;;;;;;;;;MAYa,mBAAmB,CAAA;AACvB,IAAA,aAAa,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;IACpE,WAAW,GAAW,EAAE;;IAGf,iBAAiB,GAAG,iBAAiB;IACrC,gBAAgB,GAAG,gBAAgB;;AAG5C,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEjC,IAAA,WAAA,GAAA;;QAEE,IAAI,CAAC,uBAAuB,EAAE;IAChC;AAEA;;AAEG;IACK,uBAAuB,GAAA;AAC7B,QAAA,IAAI;YACF,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,YAAY,KAAK,WAAW;QAC7E;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,KAAK;QACd;IACF;;;AAIA,IAAA,IAAI,UAAU,GAAA;;AAEZ,QAAA,IAAI,IAAI,CAAC,uBAAuB,EAAE,EAAE;YAClC,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAChE,IAAI,WAAW,EAAE;;AAEf,gBAAA,IAAI,CAAC,WAAW,GAAG,WAAW;AAC9B,gBAAA,OAAO,WAAW;YACpB;QACF;QACA,OAAO,IAAI,CAAC,WAAW;IACzB;IAEA,IAAI,UAAU,CAAC,KAAa,EAAA;;AAE1B,QAAA,IAAI,CAAC,WAA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.component.ts","../../../projects/cloud-ide-auth/src/lib/auth/sign-in/sign-in.component.html"],"sourcesContent":["import { Component, inject, input, OnInit, signal, Injector, DestroyRef } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { loginMethod, MLogin, controllerResponse, CoreSystemEntity, admissionRoutesUrl, hostManagerRoutesUrl, generateStringFromObject, cidePath, AuthUserWithMappings } from 'cloud-ide-lms-model';\r\nimport { Router, RouterLink, ActivatedRoute } from '@angular/router';\r\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\r\nimport { EntityDetectionService } from '../../services/entity-detection.service';\r\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';\r\nimport { CideLytSharedWrapperComponent, CideLytSharedWrapperSetupParam, AppStateHelperService } from 'cloud-ide-layout';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { switchMap, catchError, map } from 'rxjs/operators';\r\nimport { of, from, firstValueFrom } from 'rxjs';\r\nimport { App } from '@capacitor/app';\r\n\r\nexport type FormGroupModel<T> = FormGroup<{\r\n [K in keyof T]: FormControl<T[K]>\r\n}>\r\n\r\n@Component({\r\n selector: 'cide-auth-sign-in',\r\n standalone: true,\r\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink, CideEleThemeToggleComponent, CideEleFileImageDirective, CideEleSkeletonLoaderComponent],\r\n templateUrl: './sign-in.component.html',\r\n styleUrl: './sign-in.component.css'\r\n})\r\nexport class CideAuthSignInComponent extends CideLytSharedWrapperComponent implements OnInit {\r\n public override shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({\r\n sypg_page_code: \"auth_sign_in\"\r\n });\r\n public loginForm: FormGroupModel<MLogin>;\r\n public erro_message = signal<string>('');\r\n public loading = signal<boolean>(false);\r\n public entityLoading = signal<boolean>(true);\r\n private entityId = signal<string | null>(null);\r\n private returnUrl: string = '/control-panel'; // Default return URL\r\n public entityInfo = signal<CoreSystemEntity>({});\r\n protected override router = inject(Router);\r\n private activatedRoute = inject(ActivatedRoute);\r\n private authService = inject(CloudIdeAuthService);\r\n private entityDetectionService = inject(EntityDetectionService);\r\n private appStateService = inject(AppStateHelperService);\r\n private injector = inject(Injector);\r\n private destroyRef = inject(DestroyRef);\r\n private http = inject(HttpClient);\r\n constructor(\r\n ) {\r\n super();\r\n\r\n this.loginForm = new FormGroup({\r\n custom_login_method: new FormControl<loginMethod>('pass'),\r\n user_username: new FormControl(''),\r\n user_password: new FormControl(''),\r\n mpin_pin: new FormControl(''),\r\n stay_sign_in: new FormControl(true)\r\n }) as unknown as FormGroupModel<MLogin>;\r\n\r\n\r\n }\r\n\r\n override ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n // Inside ngOnInit\r\n App.addListener('appStateChange', ({ isActive }) => {\r\n if (isActive) {\r\n console.log('App became active/loaded');\r\n this.ngOnInit();\r\n }\r\n });\r\n\r\n // Get return URL from route parameters or default to '/control-panel'\r\n this.returnUrl = this.activatedRoute.snapshot.queryParams['returnUrl'] || 'control-panel';\r\n\r\n // If user is already authenticated, redirect to the return URL\r\n if (this.authService.isAuthenticated() && !this.authService.isTokenExpired()) {\r\n this.router.navigateByUrl(this.returnUrl);\r\n return;\r\n }\r\n\r\n // Detect entity ID from domain or route parameter and load entity details\r\n const routeParams = this.activatedRoute.snapshot.params;\r\n this.entityDetectionService.detectEntityId(routeParams).pipe(\r\n switchMap((entityId) => {\r\n if (entityId) {\r\n this.entityId.set(entityId);\r\n console.log('Entity ID detected:', entityId);\r\n this.entityLoading.set(true); // Start loading\r\n\r\n // Load entity details using entity management service\r\n return this.loadEntityDetails(entityId).pipe(\r\n catchError((error) => {\r\n console.warn('Failed to load entity details:', error);\r\n this.entityLoading.set(false); // Stop loading on error\r\n return of(null);\r\n })\r\n );\r\n }\r\n this.entityLoading.set(false); // No entity to load\r\n return of(null);\r\n }),\r\n takeUntilDestroyed(this.destroyRef)\r\n ).subscribe({\r\n next: (entityData) => {\r\n this.entityLoading.set(false); // Stop loading\r\n if (entityData) {\r\n // Update entity info with name and logo\r\n this.entityInfo.set(entityData);\r\n }\r\n\r\n // Navigate to clean URL (remove :query param) if it exists\r\n if (routeParams['query']) {\r\n this.router.navigate(['auth', 'sign-in'], {\r\n queryParams: this.activatedRoute.snapshot.queryParams,\r\n replaceUrl: true\r\n });\r\n }\r\n },\r\n error: (error) => {\r\n this.entityLoading.set(false); // Stop loading on error\r\n console.warn('Entity detection or loading failed:', error);\r\n }\r\n });\r\n }\r\n\r\n\r\n onSignIn(): void {\r\n if (this.loginForm.valid) {\r\n this.loading.set(true);\r\n\r\n // Include entity ID in login payload if detected\r\n const loginPayload: MLogin = {\r\n ...this.loginForm.value,\r\n syen_id: this.entityId() || undefined\r\n } as MLogin;\r\n\r\n this.authService.signIn(loginPayload)?.subscribe({\r\n next: async (response) => {\r\n this.loading.set(false);\r\n\r\n if (response?.success === true) {\r\n // Store user data in auth service\r\n this.authService.storeUserData(response?.data?.auth_user_mst || {});\r\n\r\n // Synchronize AppStateService with the same user data \r\n this.appStateService.setUser(response?.data?.auth_user_mst || null);\r\n\r\n // Store active entity data\r\n const entity = response?.data?.core_system_entity || null;\r\n this.appStateService.setActiveEntity(entity);\r\n\r\n // Check if user is a student and load admission data\r\n const user = response?.data?.auth_user_mst;\r\n if ((user as AuthUserWithMappings)?.user_type_mapping?.syutm_user_type === 'STUDENT') {\r\n try {\r\n const query = generateStringFromObject({ admap_user_id_auth: user?._id });\r\n const admissionUrl = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n admissionRoutesUrl.module,\r\n admissionRoutesUrl.admissionApplications,\r\n query\r\n ]);\r\n\r\n console.log('🎓 [SignIn] Loading student admission data...');\r\n const admissionResponse: any = await firstValueFrom(this.http.get(admissionUrl));\r\n\r\n if (admissionResponse?.success && admissionResponse?.data) {\r\n const admissionData = Array.isArray(admissionResponse.data) ? admissionResponse.data[0] : admissionResponse.data;\r\n console.log('🎓 [SignIn] Student data loaded:', admissionData?._id);\r\n this.appStateService.setStudentModel(admissionData);\r\n }\r\n } catch (err) {\r\n console.error('🎓 [SignIn] Failed to load student data:', err);\r\n // Don't block login on error, just log it\r\n }\r\n }\r\n\r\n // Load currency configuration from financial config after login\r\n // Note: The app should handle fetching financial config and setting it\r\n // This is just a placeholder - implement based on your app's structure\r\n if (entity?._id) {\r\n try {\r\n const { CurrencyService } = await import('cloud-ide-element');\r\n const currencyService = this.injector.get(CurrencyService);\r\n\r\n // TODO: Fetch financial config from your app's service\r\n // Example:\r\n // const financialConfigService = this.injector.get(CideAccFinancialConfigService);\r\n // const response = await financialConfigService\r\n // .getFinancialConfigById({ accfincfg_entity_id_syen: entity._id })\r\n // .toPromise();\r\n // if (response?.success && response?.data) {\r\n // currencyService.loadFromFinancialConfigData(response.data);\r\n // }\r\n\r\n console.log('✅ Currency service initialized (using default INR or previously set config)');\r\n } catch (error) {\r\n console.warn('⚠️ Failed to initialize currency service:', error);\r\n // Continue with default currency config (INR)\r\n }\r\n }\r\n\r\n // Store token through the service setter which saves to localStorage\r\n this.authService.auth_token = (response?.token || '');\r\n console.log(response?.token);\r\n\r\n // Navigate to the return URL or control panel\r\n await new Promise(resolve => setTimeout(resolve, 200));\r\n this.router.navigateByUrl(this.returnUrl);\r\n } else {\r\n // Handle case where API returns success: false\r\n const errorMessage = response?.message || response?.error_code || 'Login failed. Please check your credentials and try again.';\r\n this.erro_message.set(errorMessage);\r\n\r\n // Clear error message after 5 seconds\r\n setTimeout(() => {\r\n this.erro_message.set('');\r\n }, 5000);\r\n }\r\n },\r\n error: (response: { error: controllerResponse }) => {\r\n this.loading.set(false);\r\n\r\n const errorMessage = response?.error?.message || 'Login failed. Please check your credentials and try again.';\r\n this.erro_message.set(errorMessage);\r\n console.error('Login error:', response);\r\n\r\n // Clear error message after 5 seconds\r\n setTimeout(() => {\r\n this.erro_message.set('');\r\n }, 5000);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Load entity details by ID\r\n * @param entityId - Entity ID to load\r\n * @returns Observable of entity data or null\r\n */\r\n private loadEntityDetails(entityId: string) {\r\n // Dynamically import entity management service to avoid circular dependencies\r\n return from(import('cloud-ide-core')).pipe(\r\n switchMap((module) => {\r\n try {\r\n const entityService = this.injector.get(module.CideCoreEntityManagementService);\r\n return entityService.getEntityById(entityId).pipe(\r\n map((response) => {\r\n if (response?.success && response?.data) {\r\n return response.data as CoreSystemEntity;\r\n }\r\n return null;\r\n })\r\n );\r\n } catch (error) {\r\n console.warn('Failed to get entity service:', error);\r\n return of(null);\r\n }\r\n }),\r\n catchError((error) => {\r\n console.warn('Failed to import entity service:', error);\r\n return of(null);\r\n })\r\n );\r\n }\r\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\n<!-- Main Div Outer Div-->\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-2 sm:tw-py-3 tw-relative\">\n <!-- Theme Toggle - Top Right Corner -->\n <div class=\"tw-absolute tw-top-2 tw-right-2 sm:tw-top-4 sm:tw-right-4 tw-z-50\">\n <cide-ele-theme-toggle size=\"small\"></cide-ele-theme-toggle>\n </div>\n <!-- Login Form Wrapper -->\n @if (entityLoading()) {\n <!-- Loading state - show skeleton loader matching login page structure -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Skeleton -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center tw-mb-2\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Entity Name Skeleton -->\n <div class=\"tw-my-2 tw-text-center tw-px-2\">\n <cide-ele-skeleton-loader [width]=\"'60%'\" [height]=\"'1.5rem'\" [count]=\"1\"\n class=\"tw-mx-auto\"></cide-ele-skeleton-loader>\n </div>\n <!-- Form Fields Skeleton -->\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-4\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Password Input Skeleton -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80 tw-mb-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n <!-- Forgot Password & Stay Signed In Skeleton -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0 tw-mb-3\">\n <div class=\"tw-flex tw-items-center\">\n <cide-ele-skeleton-loader [width]=\"'1rem'\" [height]=\"'1rem'\"\n [borderRadius]=\"'0.25rem'\"></cide-ele-skeleton-loader>\n <cide-ele-skeleton-loader [width]=\"'6rem'\" [height]=\"'1rem'\" [count]=\"1\"\n class=\"tw-ml-2\"></cide-ele-skeleton-loader>\n </div>\n <div>\n <cide-ele-skeleton-loader [width]=\"'7rem'\" [height]=\"'1rem'\" [count]=\"1\"></cide-ele-skeleton-loader>\n </div>\n </div>\n <!-- Sign In Button Skeleton -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <cide-ele-skeleton-loader [width]=\"'100%'\" [height]=\"'2.5rem'\"\n [borderRadius]=\"'0.5rem'\"></cide-ele-skeleton-loader>\n </div>\n </div>\n </div>\n } @else {\n <!-- Content shown after entity is loaded -->\n <div\n class=\"tw-m-auto tw-w-full tw-max-w-96 sm:tw-mx-auto sm:tw-w-96 tw-rounded-2xl sm:tw-bg-white tw-py-4 sm:tw-py-6 tw-px-4 sm:tw-px-6 sm:tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-24 tw-w-48 sm:tw-h-32 sm:tw-w-64 tw-text-center\">\n @if (entityInfo().syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(entityInfo().syen_photo_id_cyfm || '')\"\n [altText]=\"(entityInfo().syen_name || '') + ' Logo'\" class=\"tw-m-auto tw-h-full tw-object-contain\" />\n } @else {\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\"\n class=\"tw-m-auto tw-h-full tw-object-contain\" alt=\"Cloud IDE Logo\" />\n }\n </div>\n <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-lg sm:tw-text-xl tw-font-semibold tw-text-gray-900 tw-px-2\">\n SignIn to {{ entityInfo().syen_name || 'CloudIDE sys' }}\n </div>\n <!-- Error Logger -->\n @if (erro_message()) {\n <div\n class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-full sm:tw-max-w-80 tw-text-center tw-text-xs sm:tw-text-sm tw-text-red-600 dark:tw-text-red-400 tw-px-2\">\n {{erro_message()}}\n </div>\n }\n\n <!-- section for controls -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" novalidate>\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\n <!-- Username -->\n <div class=\"tw-m-auto tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div>\n <!-- Password -->\n <div class=\"tw-m-auto tw-mt-4 tw-w-full tw-max-w-80 sm:tw-w-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\" type=\"password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div\n class=\"tw-m-auto tw-mt-3 tw-flex tw-flex-col sm:tw-flex-row tw-w-full tw-max-w-80 sm:tw-w-80 tw-justify-between tw-gap-2 sm:tw-gap-0\">\n <div>\n <cide-ele-input type=\"checkbox\" id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div class=\"tw-text-center sm:tw-text-right\">\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700 tw-text-sm\">Forgot\n Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-full tw-max-w-80 sm:tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\"\n [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n }\n</div>"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BM,MAAO,uBAAwB,SAAQ,6BAA6B,CAAA;IACxD,0BAA0B,GAAG,KAAK,CAA0C;AAC1F,QAAA,cAAc,EAAE;AACjB,KAAA,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,4BAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AACK,IAAA,SAAS;AACT,IAAA,YAAY,GAAG,MAAM,CAAS,EAAE,wDAAC;AACjC,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,mDAAC;AAChC,IAAA,aAAa,GAAG,MAAM,CAAU,IAAI,yDAAC;AACpC,IAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI,oDAAC;AACtC,IAAA,SAAS,GAAW,gBAAgB,CAAC;AACtC,IAAA,UAAU,GAAG,MAAM,CAAmB,EAAE,sDAAC;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAClC,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;A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