cloud-ide-auth 1.0.39 → 1.0.41
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.
- package/fesm2022/cloud-ide-auth-reset-password.component-BrDBJOl3.mjs +62 -0
- package/fesm2022/cloud-ide-auth-reset-password.component-BrDBJOl3.mjs.map +1 -0
- package/fesm2022/cloud-ide-auth-sign-in.component-COCAxeV8.mjs +119 -0
- package/fesm2022/cloud-ide-auth-sign-in.component-COCAxeV8.mjs.map +1 -0
- package/fesm2022/cloud-ide-auth.mjs +11 -11
- package/fesm2022/cloud-ide-auth.mjs.map +1 -1
- package/index.d.ts +1 -3
- package/package.json +1 -1
- package/fesm2022/cloud-ide-auth-reset-password.component-pMbUiBFx.mjs +0 -62
- package/fesm2022/cloud-ide-auth-reset-password.component-pMbUiBFx.mjs.map +0 -1
- package/fesm2022/cloud-ide-auth-sign-in.component-BKUnfWNc.mjs +0 -94
- package/fesm2022/cloud-ide-auth-sign-in.component-BKUnfWNc.mjs.map +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, inject, Component } from '@angular/core';
|
|
3
|
+
import { CideInputComponent, CideEleButtonComponent, CideEleThemeToggleComponent } from 'cloud-ide-element';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { Router } from '@angular/router';
|
|
8
|
+
import { CloudIdeAuthService } from './cloud-ide-auth.mjs';
|
|
9
|
+
|
|
10
|
+
class CideAuthResetPasswordComponent {
|
|
11
|
+
resetPassswordForm;
|
|
12
|
+
erro_message = signal('', ...(ngDevMode ? [{ debugName: "erro_message" }] : []));
|
|
13
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
14
|
+
authService = inject(CloudIdeAuthService);
|
|
15
|
+
route = inject(Router);
|
|
16
|
+
constructor() {
|
|
17
|
+
this.resetPassswordForm = new FormGroup({
|
|
18
|
+
user_new_password: new FormControl(''),
|
|
19
|
+
user_confirm_password: new FormControl('')
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
onForgotPasssword() {
|
|
23
|
+
if (this.resetPassswordForm.valid) {
|
|
24
|
+
this.loading.set(true);
|
|
25
|
+
const resetPasssword = {
|
|
26
|
+
user_password: this.resetPassswordForm?.get('user_new_password')?.value || '',
|
|
27
|
+
user_username: "",
|
|
28
|
+
sylog_config_data: {
|
|
29
|
+
reset_password_link: "",
|
|
30
|
+
reset_password_secret: "",
|
|
31
|
+
request_timestamp: new Date()
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
this.authService.resetPassword(resetPasssword)?.subscribe({
|
|
35
|
+
next: (response) => {
|
|
36
|
+
if (response?.success === true) {
|
|
37
|
+
this.loading.set(false);
|
|
38
|
+
this.route.navigate(['auth', 'sign-in']);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
error: (response) => {
|
|
42
|
+
this.loading.set(false);
|
|
43
|
+
const errorMessage = response?.error?.message || 'Failed to reset password. Please try again.';
|
|
44
|
+
this.erro_message.set(errorMessage);
|
|
45
|
+
console.error('Reset password error:', response);
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
this.erro_message.set('');
|
|
48
|
+
}, 3000);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideAuthResetPasswordComponent, isStandalone: true, selector: "cide-auth-reset-password", 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-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 <!-- Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Reset Password</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-80\">\n <cide-ele-input id=\"new_password\" formControlName=\"new_password\"></cide-ele-input>\n </div>\n <!-- Confirm Password -->\n <div class=\"tw-m-auto tw-w-80\">\n <cide-ele-input id=\"confirm_password\" formControlName=\"confirm_password\"></cide-ele-input>\n </div> <!-- Forgot Password button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button cideEleButton id=\"reset_password_button\" [loading]=\"loading()\" [disabled]=\"!resetPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>", styles: [""], 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"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideEleThemeToggleComponent, selector: "cide-ele-theme-toggle" }] });
|
|
55
|
+
}
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthResetPasswordComponent, decorators: [{
|
|
57
|
+
type: Component,
|
|
58
|
+
args: [{ selector: 'cide-auth-reset-password', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent], 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-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 <!-- Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Reset Password</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-80\">\n <cide-ele-input id=\"new_password\" formControlName=\"new_password\"></cide-ele-input>\n </div>\n <!-- Confirm Password -->\n <div class=\"tw-m-auto tw-w-80\">\n <cide-ele-input id=\"confirm_password\" formControlName=\"confirm_password\"></cide-ele-input>\n </div> <!-- Forgot Password button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button cideEleButton id=\"reset_password_button\" [loading]=\"loading()\" [disabled]=\"!resetPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>" }]
|
|
59
|
+
}], ctorParameters: () => [] });
|
|
60
|
+
|
|
61
|
+
export { CideAuthResetPasswordComponent };
|
|
62
|
+
//# sourceMappingURL=cloud-ide-auth-reset-password.component-BrDBJOl3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-ide-auth-reset-password.component-BrDBJOl3.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 } from '@angular/core';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent } from 'cloud-ide-element';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { MResetPassword, controllerResponse } from 'cloud-ide-lms-model';\n\n@Component({\n selector: 'cide-auth-reset-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent],\n templateUrl: './reset-password.component.html',\n styleUrl: './reset-password.component.css'\n})\nexport class CideAuthResetPasswordComponent {\n public resetPassswordForm: FormGroupModel<{user_new_password: string, user_confirm_password: string}>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n\n private authService = inject(CloudIdeAuthService);\n private route = inject(Router);\n\n constructor() {\n\n this.resetPassswordForm = new FormGroup({\n user_new_password: new FormControl(''),\n user_confirm_password: new FormControl('')\n }) as unknown as FormGroupModel<{user_new_password: string, user_confirm_password: string}>;\n }\n\n\n onForgotPasssword() {\n if (this.resetPassswordForm.valid) {\n this.loading.set(true);\n const resetPasssword : MResetPassword= {\n user_password: this.resetPassswordForm?.get('user_new_password')?.value || '',\n user_username: \"\",\n sylog_config_data: {\n reset_password_link: \"\",\n reset_password_secret: \"\",\n request_timestamp: new Date()\n }\n }\n this.authService.resetPassword(resetPasssword)?.subscribe({\n next: (response) => {\n if (response?.success === true) {\n this.loading.set(false);\n this.route.navigate(['auth', 'sign-in'])\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 }\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 <!-- Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Reset Password</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-80\">\n <cide-ele-input id=\"new_password\" formControlName=\"new_password\"></cide-ele-input>\n </div>\n <!-- Confirm Password -->\n <div class=\"tw-m-auto tw-w-80\">\n <cide-ele-input id=\"confirm_password\" formControlName=\"confirm_password\"></cide-ele-input>\n </div> <!-- Forgot Password button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button cideEleButton id=\"reset_password_button\" [loading]=\"loading()\" [disabled]=\"!resetPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>"],"names":[],"mappings":";;;;;;;;;MAgBa,8BAA8B,CAAA;AAClC,IAAA,kBAAkB;AAClB,IAAA,YAAY,GAAG,MAAM,CAAS,EAAE,wDAAC;AACjC,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,mDAAC;AAE/B,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACzC,IAAA,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAE9B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,SAAS,CAAC;AACtC,YAAA,iBAAiB,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACtC,YAAA,qBAAqB,EAAE,IAAI,WAAW,CAAC,EAAE;AAC1C,SAAA,CAA0F;;IAI7F,iBAAiB,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE;AACjC,YAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;AACtB,YAAA,MAAM,cAAc,GAAmB;AACrC,gBAAA,aAAa,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,mBAAmB,CAAC,EAAE,KAAK,IAAI,EAAE;AAC7E,gBAAA,aAAa,EAAE,EAAE;AACjB,gBAAA,iBAAiB,EAAE;AACjB,oBAAA,mBAAmB,EAAE,EAAE;AACvB,oBAAA,qBAAqB,EAAE,EAAE;oBACzB,iBAAiB,EAAE,IAAI,IAAI;AAC5B;aACF;YACD,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;AACxD,gBAAA,IAAI,EAAE,CAAC,QAAQ,KAAI;AACjB,oBAAA,IAA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AAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,YAAA,EAAA,cAAA,EAAA,oBAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,2BAA2B,EAAA,QAAA,EAAA,uBAAA,EAAA,CAAA,EAAA,CAAA;;2FAIzG,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,UAAA,EACxB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,2BAA2B,CAAC,EAAA,QAAA,EAAA,ghEAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, signal, inject, Injector, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
|
7
|
+
import { CloudIdeAuthService } from './cloud-ide-auth.mjs';
|
|
8
|
+
import { CideInputComponent, CideEleButtonComponent, CideEleThemeToggleComponent } from 'cloud-ide-element';
|
|
9
|
+
import { CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';
|
|
10
|
+
|
|
11
|
+
class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
|
|
12
|
+
shared_wrapper_setup_param = input({
|
|
13
|
+
sypg_page_code: "auth_sign_in"
|
|
14
|
+
}, ...(ngDevMode ? [{ debugName: "shared_wrapper_setup_param" }] : []));
|
|
15
|
+
loginForm;
|
|
16
|
+
erro_message = signal('', ...(ngDevMode ? [{ debugName: "erro_message" }] : []));
|
|
17
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
18
|
+
returnUrl = '/control-panel'; // Default return URL
|
|
19
|
+
router = inject(Router);
|
|
20
|
+
activatedRoute = inject(ActivatedRoute);
|
|
21
|
+
authService = inject(CloudIdeAuthService);
|
|
22
|
+
appStateService = inject(AppStateHelperService);
|
|
23
|
+
injector = inject(Injector);
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.loginForm = new FormGroup({
|
|
27
|
+
custom_login_method: new FormControl('pass'),
|
|
28
|
+
user_username: new FormControl(''),
|
|
29
|
+
user_password: new FormControl(''),
|
|
30
|
+
mpin_pin: new FormControl(''),
|
|
31
|
+
stay_sign_in: new FormControl(true)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
ngOnInit() {
|
|
35
|
+
super.ngOnInit();
|
|
36
|
+
// Get return URL from route parameters or default to '/control-panel'
|
|
37
|
+
this.returnUrl = this.activatedRoute.snapshot.queryParams['returnUrl'] || 'control-panel';
|
|
38
|
+
// If user is already authenticated, redirect to the return URL
|
|
39
|
+
if (this.authService.isAuthenticated() && !this.authService.isTokenExpired()) {
|
|
40
|
+
this.router.navigateByUrl(this.returnUrl);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
onSignIn() {
|
|
44
|
+
if (this.loginForm.valid) {
|
|
45
|
+
this.loading.set(true);
|
|
46
|
+
this.authService.signIn(this.loginForm?.value)?.subscribe({
|
|
47
|
+
next: async (response) => {
|
|
48
|
+
this.loading.set(false);
|
|
49
|
+
if (response?.success === true) {
|
|
50
|
+
// Store user data in auth service
|
|
51
|
+
this.authService.storeUserData(response?.data?.auth_user_mst || {});
|
|
52
|
+
// Synchronize AppStateService with the same user data
|
|
53
|
+
this.appStateService.setUser(response?.data?.auth_user_mst || null);
|
|
54
|
+
// Store active entity data
|
|
55
|
+
const entity = response?.data?.core_system_entity || null;
|
|
56
|
+
this.appStateService.setActiveEntity(entity);
|
|
57
|
+
// Load currency configuration from financial config after login
|
|
58
|
+
// Note: The app should handle fetching financial config and setting it
|
|
59
|
+
// This is just a placeholder - implement based on your app's structure
|
|
60
|
+
if (entity?._id) {
|
|
61
|
+
try {
|
|
62
|
+
const { CurrencyService } = await import('cloud-ide-element');
|
|
63
|
+
const currencyService = this.injector.get(CurrencyService);
|
|
64
|
+
// TODO: Fetch financial config from your app's service
|
|
65
|
+
// Example:
|
|
66
|
+
// const financialConfigService = this.injector.get(CideAccFinancialConfigService);
|
|
67
|
+
// const response = await financialConfigService
|
|
68
|
+
// .getFinancialConfigById({ accfincfg_entity_id_syen: entity._id })
|
|
69
|
+
// .toPromise();
|
|
70
|
+
// if (response?.success && response?.data) {
|
|
71
|
+
// currencyService.loadFromFinancialConfigData(response.data);
|
|
72
|
+
// }
|
|
73
|
+
console.log('✅ Currency service initialized (using default INR or previously set config)');
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
console.warn('⚠️ Failed to initialize currency service:', error);
|
|
77
|
+
// Continue with default currency config (INR)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Store token through the service setter which saves to localStorage
|
|
81
|
+
this.authService.auth_token = (response?.token || '');
|
|
82
|
+
console.log(response?.token);
|
|
83
|
+
// Navigate to the return URL or control panel
|
|
84
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
85
|
+
this.router.navigateByUrl(this.returnUrl);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// Handle case where API returns success: false
|
|
89
|
+
const errorMessage = response?.message || response?.error_code || 'Login failed. Please check your credentials and try again.';
|
|
90
|
+
this.erro_message.set(errorMessage);
|
|
91
|
+
// Clear error message after 5 seconds
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
this.erro_message.set('');
|
|
94
|
+
}, 5000);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
error: (response) => {
|
|
98
|
+
this.loading.set(false);
|
|
99
|
+
const errorMessage = response?.error?.message || 'Login failed. Please check your credentials and try again.';
|
|
100
|
+
this.erro_message.set(errorMessage);
|
|
101
|
+
console.error('Login error:', response);
|
|
102
|
+
// Clear error message after 5 seconds
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
this.erro_message.set('');
|
|
105
|
+
}, 5000);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthSignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", 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-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 <!-- Login Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold tw-text-gray-900\">SignIn to CloudIDE sys</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-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-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\n <div>\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div>\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">Forgot Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\" [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\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"], 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" }] });
|
|
112
|
+
}
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthSignInComponent, decorators: [{
|
|
114
|
+
type: Component,
|
|
115
|
+
args: [{ selector: 'cide-auth-sign-in', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink, CideEleThemeToggleComponent], 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-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 <!-- Login Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold tw-text-gray-900\">SignIn to CloudIDE sys</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-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-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\n <div>\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div>\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">Forgot Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\" [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\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"] }]
|
|
116
|
+
}], ctorParameters: () => [] });
|
|
117
|
+
|
|
118
|
+
export { CideAuthSignInComponent };
|
|
119
|
+
//# sourceMappingURL=cloud-ide-auth-sign-in.component-COCAxeV8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-ide-auth-sign-in.component-COCAxeV8.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 } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { loginMethod, MLogin, controllerResponse } from 'cloud-ide-lms-model';\nimport { Router, RouterLink, ActivatedRoute } from '@angular/router';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent } from 'cloud-ide-element';\nimport { CideLytSharedWrapperComponent, CideLytSharedWrapperSetupParam, AppStateHelperService } from 'cloud-ide-layout';\n\nexport type FormGroupModel<T> = FormGroup<{\n [K in keyof T]: FormControl<T[K]>\n}>\n\n@Component({\n selector: 'cide-auth-sign-in',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink, CideEleThemeToggleComponent],\n templateUrl: './sign-in.component.html',\n styleUrl: './sign-in.component.css'\n})\nexport class CideAuthSignInComponent extends CideLytSharedWrapperComponent implements OnInit {\n public override shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({\n sypg_page_code: \"auth_sign_in\"\n });\n public loginForm: FormGroupModel<MLogin>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n private returnUrl: string = '/control-panel'; // Default return URL\n protected override router = inject(Router);\n private activatedRoute = inject(ActivatedRoute);\n private authService = inject(CloudIdeAuthService);\n private appStateService = inject(AppStateHelperService);\n private injector = inject(Injector);\n constructor(\n ) {\n super();\n\n this.loginForm = new FormGroup({\n custom_login_method: new FormControl<loginMethod>('pass'),\n user_username: new FormControl(''),\n user_password: new FormControl(''),\n mpin_pin: new FormControl(''),\n stay_sign_in: new FormControl(true)\n }) as unknown as FormGroupModel<MLogin>;\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\n\n // Get return URL from route parameters or default to '/control-panel'\n this.returnUrl = this.activatedRoute.snapshot.queryParams['returnUrl'] || 'control-panel';\n\n // If user is already authenticated, redirect to the return URL\n if (this.authService.isAuthenticated() && !this.authService.isTokenExpired()) {\n this.router.navigateByUrl(this.returnUrl);\n }\n }\n\n\n onSignIn(): void {\n if (this.loginForm.valid) {\n this.loading.set(true);\n this.authService.signIn(this.loginForm?.value as MLogin)?.subscribe({\n next: async (response) => {\n this.loading.set(false);\n \n if (response?.success === true) {\n // Store user data in auth service\n this.authService.storeUserData(response?.data?.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 // Load currency configuration from financial config after login\n // Note: The app should handle fetching financial config and setting it\n // This is just a placeholder - implement based on your app's structure\n if (entity?._id) {\n try {\n const { CurrencyService } = await import('cloud-ide-element');\n const currencyService = this.injector.get(CurrencyService);\n \n // TODO: Fetch financial config from your app's service\n // Example:\n // const financialConfigService = this.injector.get(CideAccFinancialConfigService);\n // const response = await financialConfigService\n // .getFinancialConfigById({ accfincfg_entity_id_syen: entity._id })\n // .toPromise();\n // if (response?.success && response?.data) {\n // currencyService.loadFromFinancialConfigData(response.data);\n // }\n \n console.log('✅ Currency service initialized (using default INR or previously set config)');\n } catch (error) {\n console.warn('⚠️ Failed to initialize currency service:', error);\n // Continue with default currency config (INR)\n }\n }\n\n // Store token through the service setter which saves to localStorage\n this.authService.auth_token = (response?.token || '');\n console.log(response?.token);\n\n // Navigate to the return URL or control panel\n await new Promise(resolve => setTimeout(resolve, 200));\n this.router.navigateByUrl(this.returnUrl);\n } else {\n // Handle case where API returns success: false\n const errorMessage = response?.message || response?.error_code || 'Login failed. Please check your credentials and try again.';\n this.erro_message.set(errorMessage);\n \n // Clear error message after 5 seconds\n setTimeout(() => {\n this.erro_message.set('');\n }, 5000);\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.loading.set(false);\n \n const errorMessage = response?.error?.message || 'Login failed. Please check your credentials and try again.';\n this.erro_message.set(errorMessage);\n console.error('Login error:', response);\n \n // Clear error message after 5 seconds\n setTimeout(() => {\n this.erro_message.set('');\n }, 5000);\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 <!-- Login Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold tw-text-gray-900\">SignIn to CloudIDE sys</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-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-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\n <div>\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div>\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">Forgot Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"loading()\" [disabled]=\"!loginForm.valid || loading()\">Sign In</button>\n </div>\n </div>\n </form>\n </div>\n</div>"],"names":[],"mappings":";;;;;;;;;;AAoBM,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;AAC/B,IAAA,SAAS,GAAW,gBAAgB,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,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,sBAAsB,EAAA,QAAA,EAAA,0DAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,IAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,aAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,YAAA,EAAA,cAAA,EAAA,oBAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,oOAAE,2BAA2B,EAAA,QAAA,EAAA,uBAAA,EAAA,CAAA,EAAA,CAAA;;2FAIrH,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,UAAA,EACjB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,UAAU,EAAE,2BAA2B,CAAC,EAAA,QAAA,EAAA,g4EAAA,EAAA,MAAA,EAAA,CAAA,+pCAAA,CAAA,EAAA;;;;;"}
|
|
@@ -7,7 +7,7 @@ import { RouterOutlet, Router } from '@angular/router';
|
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
8
8
|
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
10
|
-
import { CideInputComponent, CideEleButtonComponent, CideEleFloatingContainerService } from 'cloud-ide-element';
|
|
10
|
+
import { CideInputComponent, CideEleButtonComponent, CideEleThemeToggleComponent, CideEleFloatingContainerService } from 'cloud-ide-element';
|
|
11
11
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
12
|
import { CideLytSharedWrapperComponent } from 'cloud-ide-layout';
|
|
13
13
|
import { AUTH_SERVICE_TOKEN, APP_STATE_SERVICE_TOKEN } from 'cloud-ide-shared';
|
|
@@ -225,9 +225,9 @@ var cloudIdeAuth_component = /*#__PURE__*/Object.freeze({
|
|
|
225
225
|
});
|
|
226
226
|
|
|
227
227
|
class CideAuthForgotPasswordComponent {
|
|
228
|
-
setup_param = { form_loading: false };
|
|
229
228
|
forgotPassswordForm;
|
|
230
229
|
erro_message = signal('', ...(ngDevMode ? [{ debugName: "erro_message" }] : []));
|
|
230
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
231
231
|
authService = inject(CloudIdeAuthService);
|
|
232
232
|
route = inject(Router);
|
|
233
233
|
constructor() {
|
|
@@ -240,19 +240,19 @@ class CideAuthForgotPasswordComponent {
|
|
|
240
240
|
}
|
|
241
241
|
onForgotPasssword() {
|
|
242
242
|
if (this.forgotPassswordForm.valid) {
|
|
243
|
-
this.
|
|
243
|
+
this.loading.set(true);
|
|
244
244
|
const validate = validateRequestModal(new MForgotPassword(this.forgotPassswordForm?.value));
|
|
245
245
|
console.log(validate);
|
|
246
246
|
if (validate === true) {
|
|
247
247
|
this.authService.forgotPassword(this.forgotPassswordForm?.value)?.subscribe({
|
|
248
248
|
next: (response) => {
|
|
249
249
|
if (response?.success === true) {
|
|
250
|
-
this.
|
|
250
|
+
this.loading.set(false);
|
|
251
251
|
this.route.navigate(['auth', 'sign-in']);
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
error: (response) => {
|
|
255
|
-
this.
|
|
255
|
+
this.loading.set(false);
|
|
256
256
|
const errorMessage = response?.error?.message || 'Failed to process forgot password request. Please try again.';
|
|
257
257
|
this.erro_message.set(errorMessage);
|
|
258
258
|
console.error('Forgot password error:', response);
|
|
@@ -263,7 +263,7 @@ class CideAuthForgotPasswordComponent {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
else {
|
|
266
|
-
this.
|
|
266
|
+
this.loading.set(false);
|
|
267
267
|
this.erro_message.set(validate.first);
|
|
268
268
|
setTimeout(() => {
|
|
269
269
|
this.erro_message.set('');
|
|
@@ -272,11 +272,11 @@ class CideAuthForgotPasswordComponent {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
275
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideAuthForgotPasswordComponent, isStandalone: true, selector: "cide-auth-forgot-password", ngImport: i0, template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\
|
|
275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideAuthForgotPasswordComponent, isStandalone: true, selector: "cide-auth-forgot-password", 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-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 <!-- Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Forgot Password</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div> <!-- Forgot Password button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button cideEleButton id=\"reset_password_link_button\" [loading]=\"loading()\" [disabled]=\"!forgotPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>", styles: [""], 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"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideEleThemeToggleComponent, selector: "cide-ele-theme-toggle" }] });
|
|
276
276
|
}
|
|
277
277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthForgotPasswordComponent, decorators: [{
|
|
278
278
|
type: Component,
|
|
279
|
-
args: [{ selector: 'cide-auth-forgot-password', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent], template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\
|
|
279
|
+
args: [{ selector: 'cide-auth-forgot-password', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent], 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-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 <!-- Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Forgot Password</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div> <!-- Forgot Password button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button cideEleButton id=\"reset_password_link_button\" [loading]=\"loading()\" [disabled]=\"!forgotPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>" }]
|
|
280
280
|
}], ctorParameters: () => [] });
|
|
281
281
|
|
|
282
282
|
var forgotPassword_component = /*#__PURE__*/Object.freeze({
|
|
@@ -561,7 +561,7 @@ class CideAuthReLoginComponent extends CideLytSharedWrapperComponent {
|
|
|
561
561
|
</div>
|
|
562
562
|
</form>
|
|
563
563
|
</div>
|
|
564
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "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", "size"], outputs: ["ngModelChange"] }, { 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"], outputs: ["btnClick", "doubleClick"] }] });
|
|
564
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "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: "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"], outputs: ["btnClick", "doubleClick"] }] });
|
|
565
565
|
}
|
|
566
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthReLoginComponent, decorators: [{
|
|
567
567
|
type: Component,
|
|
@@ -629,7 +629,7 @@ const authRoutes = {
|
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
631
|
path: "sign-in",
|
|
632
|
-
loadComponent: () => import('./cloud-ide-auth-sign-in.component-
|
|
632
|
+
loadComponent: () => import('./cloud-ide-auth-sign-in.component-COCAxeV8.mjs').then(c => c.CideAuthSignInComponent)
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
path: "forgot-password",
|
|
@@ -637,7 +637,7 @@ const authRoutes = {
|
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
639
|
path: "reset-password/:rout_token",
|
|
640
|
-
loadComponent: () => import('./cloud-ide-auth-reset-password.component-
|
|
640
|
+
loadComponent: () => import('./cloud-ide-auth-reset-password.component-BrDBJOl3.mjs').then(c => c.CideAuthResetPasswordComponent)
|
|
641
641
|
}
|
|
642
642
|
]
|
|
643
643
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-ide-auth.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/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\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 get auth_token(): string {\n return this._auth_token;\n }\n\n set auth_token(value: string) {\n this._auth_token = value;\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 return this._view_only_token;\n }\n\n set view_only_token(value: string) {\n this._view_only_token = value;\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","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 { Component, inject, signal } from '@angular/core';\r\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router } from '@angular/router';\r\nimport { FormGroupModel } from '../sign-in/sign-in.component';\r\nimport { forgotPasswordMethod, MForgotPassword, validateRequestModal, controllerResponse } from 'cloud-ide-lms-model';\r\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\r\nimport { CideEleButtonComponent, CideInputComponent } from 'cloud-ide-element';\r\n\r\n@Component({\r\n selector: 'cide-auth-forgot-password',\r\n standalone: true,\r\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent],\r\n templateUrl: './forgot-password.component.html',\r\n styleUrl: './forgot-password.component.css'\r\n})\r\nexport class CideAuthForgotPasswordComponent {\r\n public setup_param = { form_loading: false };\r\n public forgotPassswordForm: FormGroupModel<MForgotPassword>;\r\n public erro_message = signal<string>('');\r\n\r\n private authService = inject(CloudIdeAuthService);\r\n private route = inject(Router);\r\n\r\n constructor() {\r\n\r\n this.forgotPassswordForm = new FormGroup({\r\n custom_forgot_password_method: new FormControl<forgotPasswordMethod>('username'),\r\n user_username: new FormControl(''),\r\n user_emailid: new FormControl(''),\r\n user_mobileno: new FormControl(),\r\n }) as unknown as FormGroupModel<MForgotPassword>;\r\n }\r\n\r\n\r\n onForgotPasssword() {\r\n if (this.forgotPassswordForm.valid) {\r\n this.setup_param.form_loading = true;\r\n const validate = validateRequestModal(new MForgotPassword(this.forgotPassswordForm?.value as MForgotPassword));\r\n console.log(validate)\r\n if(validate === true){\r\n this.authService.forgotPassword(this.forgotPassswordForm?.value as MForgotPassword)?.subscribe({\r\n next: (response) => {\r\n if (response?.success === true) {\r\n this.setup_param.form_loading = false;\r\n this.route.navigate(['auth', 'sign-in'])\r\n }\r\n },\r\n error: (response: { error: controllerResponse }) => {\r\n this.setup_param.form_loading = false;\r\n const errorMessage = response?.error?.message || 'Failed to process forgot password request. Please try again.';\r\n this.erro_message.set(errorMessage);\r\n console.error('Forgot password error:', response);\r\n setTimeout(() => {\r\n this.erro_message.set('');\r\n }, 3000);\r\n }\r\n });\r\n } else {\r\n this.setup_param.form_loading = false;\r\n this.erro_message.set(validate.first);\r\n setTimeout(() => {\r\n this.erro_message.set('');\r\n }, 3000);\r\n }\r\n }\r\n }\r\n}","<!-- https://play.tailwindcss.com/lfO85drpUy -->\r\n<!-- Main Div Outer Div-->\r\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3\">\r\n <!-- Forrm Wrapper -->\r\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\r\n <!-- Logo Wrapper -->\r\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\r\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\r\n alt=\"Cloud IDE Logo\" />\r\n </div> <!-- Entity name here -->\r\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Forgot Password</div>\r\n <!-- Error Logger -->\r\n @if (erro_message()) {\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\r\n {{erro_message()}}\r\n </div>\r\n }\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"forgotPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\r\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\r\n <!-- Username -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\r\n </div> <!-- Forgot Password button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button cideEleButton id=\"reset_password_link_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!forgotPassswordForm.valid\">Reset Password</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\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} from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\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\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 AuthUserMst;\n this.authService.storeUserData(userData);\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, signal, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } 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';\nimport { CideLytSharedWrapperComponent, CideLytSharedWrapperSetupParam } from 'cloud-ide-layout';\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 extends CideLytSharedWrapperComponent implements OnInit, OnDestroy {\n public override shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({\n sypg_page_code: \"auth_relogin_dialog\"\n });\n\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 constructor() {\n super();\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\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';\r\n\r\nexport const authRoutes: Route = {\r\n path: \"auth\",\r\n loadComponent: () => import('./cloud-ide-auth.component').then(c => c.CloudIdeAuthComponent),\r\n children: [\r\n {\r\n path: \"\",\r\n pathMatch: 'full',\r\n redirectTo: 'sign-in'\r\n },\r\n {\r\n path: \"sign-in\",\r\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\r\n },\r\n {\r\n path: \"forgot-password\",\r\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\r\n },\r\n {\r\n path: \"reset-password/:rout_token\",\r\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\r\n }\r\n ]\r\n}\r\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 }\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":[],"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;;AAGhC;;AAEG;IACK,uBAAuB,GAAA;AAC7B,QAAA,IAAI;YACF,OAAO,OAAO,MAAM,KA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D,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,uBAAuB,CAAqB;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,KAAC,CAAC;IAEF,IAAI,eAAe,EAAE;AACnB,QAAA,OAAO,IAAI;;;AAIb,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;;AC/BA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cloud-ide-auth.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/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\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 get auth_token(): string {\n return this._auth_token;\n }\n\n set auth_token(value: string) {\n this._auth_token = value;\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 return this._view_only_token;\n }\n\n set view_only_token(value: string) {\n this._view_only_token = value;\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","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 { Component, inject, signal } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { forgotPasswordMethod, MForgotPassword, validateRequestModal, controllerResponse } from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { CideEleButtonComponent, CideInputComponent, CideEleThemeToggleComponent } from 'cloud-ide-element';\n\n@Component({\n selector: 'cide-auth-forgot-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, CideEleThemeToggleComponent],\n templateUrl: './forgot-password.component.html',\n styleUrl: './forgot-password.component.css'\n})\nexport class CideAuthForgotPasswordComponent {\n public forgotPassswordForm: FormGroupModel<MForgotPassword>;\n public erro_message = signal<string>('');\n public loading = signal<boolean>(false);\n\n private authService = inject(CloudIdeAuthService);\n private route = inject(Router);\n\n constructor() {\n\n this.forgotPassswordForm = new FormGroup({\n custom_forgot_password_method: new FormControl<forgotPasswordMethod>('username'),\n user_username: new FormControl(''),\n user_emailid: new FormControl(''),\n user_mobileno: new FormControl(),\n }) as unknown as FormGroupModel<MForgotPassword>;\n }\n\n\n onForgotPasssword() {\n if (this.forgotPassswordForm.valid) {\n this.loading.set(true);\n const validate = validateRequestModal(new MForgotPassword(this.forgotPassswordForm?.value as MForgotPassword));\n console.log(validate)\n if(validate === true){\n this.authService.forgotPassword(this.forgotPassswordForm?.value as MForgotPassword)?.subscribe({\n next: (response) => {\n if (response?.success === true) {\n this.loading.set(false);\n this.route.navigate(['auth', 'sign-in'])\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 } else {\n this.loading.set(false);\n this.erro_message.set(validate.first);\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 <!-- Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Forgot Password</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-80\">\n <cide-ele-input id=\"user_username\" formControlName=\"user_username\"></cide-ele-input>\n </div> <!-- Forgot Password button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button cideEleButton id=\"reset_password_link_button\" [loading]=\"loading()\" [disabled]=\"!forgotPassswordForm.valid || loading()\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\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} from 'cloud-ide-lms-model';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\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\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 AuthUserMst;\n this.authService.storeUserData(userData);\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, signal, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } 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';\nimport { CideLytSharedWrapperComponent, CideLytSharedWrapperSetupParam } from 'cloud-ide-layout';\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 extends CideLytSharedWrapperComponent implements OnInit, OnDestroy {\n public override shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({\n sypg_page_code: \"auth_relogin_dialog\"\n });\n\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 constructor() {\n super();\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\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';\r\n\r\nexport const authRoutes: Route = {\r\n path: \"auth\",\r\n loadComponent: () => import('./cloud-ide-auth.component').then(c => c.CloudIdeAuthComponent),\r\n children: [\r\n {\r\n path: \"\",\r\n pathMatch: 'full',\r\n redirectTo: 'sign-in'\r\n },\r\n {\r\n path: \"sign-in\",\r\n loadComponent: () => import('./auth/sign-in/sign-in.component').then(c => c.CideAuthSignInComponent)\r\n },\r\n {\r\n path: \"forgot-password\",\r\n loadComponent: () => import('./auth/forgot-password/forgot-password.component').then(c => c.CideAuthForgotPasswordComponent)\r\n },\r\n {\r\n path: \"reset-password/:rout_token\",\r\n loadComponent: () => import('./auth/reset-password/reset-password.component').then(c => c.CideAuthResetPasswordComponent)\r\n }\r\n ]\r\n}\r\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 }\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":[],"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;;AAGhC;;AAEG;IACK,uBAAuB,GAAA;AAC7B,QAAA,IAAI;YACF,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,YAAY,KAAK,WAAW;;AAC3E,QAAA,MAAM;AACN,YAAA,OAAO,KAAK;;;;AAKhB,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,WAAW;;IAGzB,IAAI,UAAU,CAAC,KAAa,EAAA;AAC1B,QAAA,IAAI,CAAC,WAAW,GAAG,KAAK;AACxB,QAAA,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE;YACnC;;QAEF,IAAI,KAAK,EAAE;YACT,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC;;aAC9C;AACL,YAAA,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC;;;;IAKlC,2BAA2B,GAAG,2BAA2B;IAClE,gBAAgB,GAAW,EAAE;AAErC,IAAA,IAAI,eAAe,GAAA;QACjB,OAAO,IAAI,CAAC,gBAAgB;;IAG9B,IAAI,eAAe,CAA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AAG,MAAM,CAAC,kBAAkB,CAAiB;AAC9D,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,uBAAuB,CAAqB;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,KAAC,CAAC;IAEF,IAAI,eAAe,EAAE;AACnB,QAAA,OAAO,IAAI;;;AAIb,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;;AC/BA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -47,11 +47,9 @@ type FormGroupModel<T> = FormGroup<{
|
|
|
47
47
|
}>;
|
|
48
48
|
|
|
49
49
|
declare class CideAuthForgotPasswordComponent {
|
|
50
|
-
setup_param: {
|
|
51
|
-
form_loading: boolean;
|
|
52
|
-
};
|
|
53
50
|
forgotPassswordForm: FormGroupModel<MForgotPassword>;
|
|
54
51
|
erro_message: i0.WritableSignal<string>;
|
|
52
|
+
loading: i0.WritableSignal<boolean>;
|
|
55
53
|
private authService;
|
|
56
54
|
private route;
|
|
57
55
|
constructor();
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, inject, Component } from '@angular/core';
|
|
3
|
-
import { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';
|
|
4
|
-
import * as i1 from '@angular/forms';
|
|
5
|
-
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { Router } from '@angular/router';
|
|
8
|
-
import { CloudIdeAuthService } from './cloud-ide-auth.mjs';
|
|
9
|
-
|
|
10
|
-
class CideAuthResetPasswordComponent {
|
|
11
|
-
setup_param = { form_loading: false };
|
|
12
|
-
resetPassswordForm;
|
|
13
|
-
erro_message = signal('', ...(ngDevMode ? [{ debugName: "erro_message" }] : []));
|
|
14
|
-
authService = inject(CloudIdeAuthService);
|
|
15
|
-
route = inject(Router);
|
|
16
|
-
constructor() {
|
|
17
|
-
this.resetPassswordForm = new FormGroup({
|
|
18
|
-
user_new_password: new FormControl(''),
|
|
19
|
-
user_confirm_password: new FormControl('')
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
onForgotPasssword() {
|
|
23
|
-
if (this.resetPassswordForm.valid) {
|
|
24
|
-
this.setup_param.form_loading = true;
|
|
25
|
-
const resetPasssword = {
|
|
26
|
-
user_password: this.resetPassswordForm?.get('user_new_password')?.value || '',
|
|
27
|
-
user_username: "",
|
|
28
|
-
sylog_config_data: {
|
|
29
|
-
reset_password_link: "",
|
|
30
|
-
reset_password_secret: "",
|
|
31
|
-
request_timestamp: new Date()
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
this.authService.resetPassword(resetPasssword)?.subscribe({
|
|
35
|
-
next: (response) => {
|
|
36
|
-
if (response?.success === true) {
|
|
37
|
-
this.setup_param.form_loading = false;
|
|
38
|
-
this.route.navigate(['auth', 'sign-in']);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
error: (response) => {
|
|
42
|
-
this.setup_param.form_loading = false;
|
|
43
|
-
const errorMessage = response?.error?.message || 'Failed to reset password. Please try again.';
|
|
44
|
-
this.erro_message.set(errorMessage);
|
|
45
|
-
console.error('Reset password error:', response);
|
|
46
|
-
setTimeout(() => {
|
|
47
|
-
this.erro_message.set('');
|
|
48
|
-
}, 3000);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideAuthResetPasswordComponent, isStandalone: true, selector: "cide-auth-reset-password", ngImport: i0, template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\r\n<!-- Main Div Outer Div-->\r\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3\">\r\n <!-- Forrm Wrapper -->\r\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\r\n <!-- Logo Wrapper -->\r\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\r\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\r\n alt=\"Cloud IDE Logo\" />\r\n </div> <!-- Entity name here -->\r\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Reset Password</div>\r\n <!-- Error Logger -->\r\n @if (erro_message()) {\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\r\n {{erro_message()}}\r\n </div>\r\n }\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"resetPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\r\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\r\n <!-- New Password -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"new_password\" formControlName=\"new_password\"></cide-ele-input>\r\n </div>\r\n <!-- Confirm Password -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"confirm_password\" formControlName=\"confirm_password\"></cide-ele-input>\r\n </div> <!-- Forgot Password button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button cideEleButton id=\"reset_password_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">Reset Password</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>", styles: [""], 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", "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"], outputs: ["btnClick", "doubleClick"] }] });
|
|
55
|
-
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthResetPasswordComponent, decorators: [{
|
|
57
|
-
type: Component,
|
|
58
|
-
args: [{ selector: 'cide-auth-reset-password', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent], template: "<!-- https://play.tailwindcss.com/lfO85drpUy -->\r\n<!-- Main Div Outer Div-->\r\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3\">\r\n <!-- Forrm Wrapper -->\r\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\r\n <!-- Logo Wrapper -->\r\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\r\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\r\n alt=\"Cloud IDE Logo\" />\r\n </div> <!-- Entity name here -->\r\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Reset Password</div>\r\n <!-- Error Logger -->\r\n @if (erro_message()) {\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\r\n {{erro_message()}}\r\n </div>\r\n }\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"resetPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\r\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\r\n <!-- New Password -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"new_password\" formControlName=\"new_password\"></cide-ele-input>\r\n </div>\r\n <!-- Confirm Password -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"confirm_password\" formControlName=\"confirm_password\"></cide-ele-input>\r\n </div> <!-- Forgot Password button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button cideEleButton id=\"reset_password_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">Reset Password</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>" }]
|
|
59
|
-
}], ctorParameters: () => [] });
|
|
60
|
-
|
|
61
|
-
export { CideAuthResetPasswordComponent };
|
|
62
|
-
//# sourceMappingURL=cloud-ide-auth-reset-password.component-pMbUiBFx.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-ide-auth-reset-password.component-pMbUiBFx.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 } from '@angular/core';\nimport { CideEleButtonComponent, CideInputComponent } from 'cloud-ide-element';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { FormGroupModel } from '../sign-in/sign-in.component';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { MResetPassword, controllerResponse } from 'cloud-ide-lms-model';\n\n@Component({\n selector: 'cide-auth-reset-password',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent],\n templateUrl: './reset-password.component.html',\n styleUrl: './reset-password.component.css'\n})\nexport class CideAuthResetPasswordComponent {\n public setup_param = { form_loading: false };\n public resetPassswordForm: FormGroupModel<{user_new_password: string, user_confirm_password: string}>;\n public erro_message = signal<string>('');\n\n private authService = inject(CloudIdeAuthService);\n private route = inject(Router);\n\n constructor() {\n\n this.resetPassswordForm = new FormGroup({\n user_new_password: new FormControl(''),\n user_confirm_password: new FormControl('')\n }) as unknown as FormGroupModel<{user_new_password: string, user_confirm_password: string}>;\n }\n\n\n onForgotPasssword() {\n if (this.resetPassswordForm.valid) {\n this.setup_param.form_loading = true;\n const resetPasssword : MResetPassword= {\n user_password: this.resetPassswordForm?.get('user_new_password')?.value || '',\n user_username: \"\",\n sylog_config_data: {\n reset_password_link: \"\",\n reset_password_secret: \"\",\n request_timestamp: new Date()\n }\n }\n this.authService.resetPassword(resetPasssword)?.subscribe({\n next: (response) => {\n if (response?.success === true) {\n this.setup_param.form_loading = false;\n this.route.navigate(['auth', 'sign-in'])\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.setup_param.form_loading = 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 }\n }\n}\n\n","<!-- https://play.tailwindcss.com/lfO85drpUy -->\r\n<!-- Main Div Outer Div-->\r\n<div class=\"cide-font-poppins tw-flex tw-min-h-screen tw-w-full tw-bg-gray-50 tw-py-3\">\r\n <!-- Forrm Wrapper -->\r\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\r\n <!-- Logo Wrapper -->\r\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\r\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\r\n alt=\"Cloud IDE Logo\" />\r\n </div> <!-- Entity name here -->\r\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold\">Reset Password</div>\r\n <!-- Error Logger -->\r\n @if (erro_message()) {\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-mx-auto tw-mb-2 tw-max-w-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\r\n {{erro_message()}}\r\n </div>\r\n }\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"resetPassswordForm\" (ngSubmit)=\"onForgotPasssword()\" novalidate>\r\n <div class=\"tw-m-auto tw-pb-3 tw-pt-3\">\r\n <!-- New Password -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"new_password\" formControlName=\"new_password\"></cide-ele-input>\r\n </div>\r\n <!-- Confirm Password -->\r\n <div class=\"tw-m-auto tw-w-80\">\r\n <cide-ele-input id=\"confirm_password\" formControlName=\"confirm_password\"></cide-ele-input>\r\n </div> <!-- Forgot Password button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button cideEleButton id=\"reset_password_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">Reset Password</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>"],"names":[],"mappings":";;;;;;;;;MAgBa,8BAA8B,CAAA;AAClC,IAAA,WAAW,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE;AACrC,IAAA,kBAAkB;AAClB,IAAA,YAAY,GAAG,MAAM,CAAS,EAAE,wDAAC;AAEhC,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACzC,IAAA,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAE9B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,SAAS,CAAC;AACtC,YAAA,iBAAiB,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACtC,YAAA,qBAAqB,EAAE,IAAI,WAAW,CAAC,EAAE;AAC1C,SAAA,CAA0F;;IAI7F,iBAAiB,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE;AACjC,YAAA,IAAI,CAAC,WAAW,CAAC,YAAY,GAAG,IAAI;AACpC,YAAA,MAAM,cAAc,GAAmB;AACrC,gBAAA,aAAa,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,CAAC,mBAAmB,CAAC,EAAE,KAAK,IAAI,EAAE;AAC7E,gBAAA,aAAa,EAAE,EAAE;AACjB,gBAAA,iBAAiB,EAAE;AACjB,oBAAA,mBAAmB,EAAE,EAAE;AACvB,oBAAA,qBAAqB,EAAE,EAAE;oBACzB,iBAAiB,EAAE,IAAI,IA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AC,EAAA,QAAA,EAAA,u5DAAA,EAAA;;;;;"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, signal, inject, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
4
|
-
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
|
7
|
-
import { CloudIdeAuthService } from './cloud-ide-auth.mjs';
|
|
8
|
-
import { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';
|
|
9
|
-
import { CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';
|
|
10
|
-
|
|
11
|
-
class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
|
|
12
|
-
shared_wrapper_setup_param = input({
|
|
13
|
-
sypg_page_code: "auth_sign_in"
|
|
14
|
-
}, ...(ngDevMode ? [{ debugName: "shared_wrapper_setup_param" }] : []));
|
|
15
|
-
setup_param = { form_loading: false };
|
|
16
|
-
loginForm;
|
|
17
|
-
erro_message = signal('', ...(ngDevMode ? [{ debugName: "erro_message" }] : []));
|
|
18
|
-
returnUrl = '/control-panel'; // Default return URL
|
|
19
|
-
router = inject(Router);
|
|
20
|
-
activatedRoute = inject(ActivatedRoute);
|
|
21
|
-
authService = inject(CloudIdeAuthService);
|
|
22
|
-
appStateService = inject(AppStateHelperService);
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this.loginForm = new FormGroup({
|
|
26
|
-
custom_login_method: new FormControl('pass'),
|
|
27
|
-
user_username: new FormControl(''),
|
|
28
|
-
user_password: new FormControl(''),
|
|
29
|
-
mpin_pin: new FormControl(''),
|
|
30
|
-
stay_sign_in: new FormControl(true)
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
ngOnInit() {
|
|
34
|
-
super.ngOnInit();
|
|
35
|
-
// Get return URL from route parameters or default to '/control-panel'
|
|
36
|
-
this.returnUrl = this.activatedRoute.snapshot.queryParams['returnUrl'] || 'control-panel';
|
|
37
|
-
// If user is already authenticated, redirect to the return URL
|
|
38
|
-
if (this.authService.isAuthenticated() && !this.authService.isTokenExpired()) {
|
|
39
|
-
this.router.navigateByUrl(this.returnUrl);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
onSignIn() {
|
|
43
|
-
if (this.loginForm.valid) {
|
|
44
|
-
this.setup_param.form_loading = true;
|
|
45
|
-
this.authService.signIn(this.loginForm?.value)?.subscribe({
|
|
46
|
-
next: async (response) => {
|
|
47
|
-
this.setup_param.form_loading = false;
|
|
48
|
-
if (response?.success === true) {
|
|
49
|
-
// Store user data in auth service
|
|
50
|
-
this.authService.storeUserData(response?.data?.auth_user_mst || {});
|
|
51
|
-
// Synchronize AppStateService with the same user data
|
|
52
|
-
this.appStateService.setUser(response?.data?.auth_user_mst || null);
|
|
53
|
-
// Store active entity data
|
|
54
|
-
this.appStateService.setActiveEntity(response?.data?.core_system_entity || null);
|
|
55
|
-
// Store token through the service setter which saves to localStorage
|
|
56
|
-
this.authService.auth_token = (response?.token || '');
|
|
57
|
-
console.log(response?.token);
|
|
58
|
-
// Navigate to the return URL or control panel
|
|
59
|
-
await new Promise(resolve => setTimeout(resolve, 200));
|
|
60
|
-
this.router.navigateByUrl(this.returnUrl);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
// Handle case where API returns success: false
|
|
64
|
-
const errorMessage = response?.message || response?.error_code || 'Login failed. Please check your credentials and try again.';
|
|
65
|
-
this.erro_message.set(errorMessage);
|
|
66
|
-
// Clear error message after 5 seconds
|
|
67
|
-
setTimeout(() => {
|
|
68
|
-
this.erro_message.set('');
|
|
69
|
-
}, 5000);
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
error: (response) => {
|
|
73
|
-
this.setup_param.form_loading = false;
|
|
74
|
-
const errorMessage = response?.error?.message || 'Login failed. Please check your credentials and try again.';
|
|
75
|
-
this.erro_message.set(errorMessage);
|
|
76
|
-
console.error('Login error:', response);
|
|
77
|
-
// Clear error message after 5 seconds
|
|
78
|
-
setTimeout(() => {
|
|
79
|
-
this.erro_message.set('');
|
|
80
|
-
}, 5000);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthSignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", 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-3\">\n <!-- Login Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold tw-text-gray-900\">SignIn to CloudIDE sys</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-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-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\n <div>\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div>\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">Forgot Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</button>\n </div>\n </div>\n </form>\n </div>\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", "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"], outputs: ["btnClick", "doubleClick"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
87
|
-
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthSignInComponent, decorators: [{
|
|
89
|
-
type: Component,
|
|
90
|
-
args: [{ selector: 'cide-auth-sign-in', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink], 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-3\">\n <!-- Login Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold tw-text-gray-900\">SignIn to CloudIDE sys</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-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-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\n <div>\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div>\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">Forgot Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</button>\n </div>\n </div>\n </form>\n </div>\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"] }]
|
|
91
|
-
}], ctorParameters: () => [] });
|
|
92
|
-
|
|
93
|
-
export { CideAuthSignInComponent };
|
|
94
|
-
//# sourceMappingURL=cloud-ide-auth-sign-in.component-BKUnfWNc.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-ide-auth-sign-in.component-BKUnfWNc.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 } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { loginMethod, MLogin, controllerResponse } from 'cloud-ide-lms-model';\nimport { Router, RouterLink, ActivatedRoute } from '@angular/router';\nimport { CloudIdeAuthService } from '../../cloud-ide-auth.service';\nimport { CideEleButtonComponent, CideInputComponent } from 'cloud-ide-element';\nimport { CideLytSharedWrapperComponent, CideLytSharedWrapperSetupParam, AppStateHelperService } from 'cloud-ide-layout';\n\nexport type FormGroupModel<T> = FormGroup<{\n [K in keyof T]: FormControl<T[K]>\n}>\n\n@Component({\n selector: 'cide-auth-sign-in',\n standalone: true,\n imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink],\n templateUrl: './sign-in.component.html',\n styleUrl: './sign-in.component.css'\n})\nexport class CideAuthSignInComponent extends CideLytSharedWrapperComponent implements OnInit {\n public override shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({\n sypg_page_code: \"auth_sign_in\"\n });\n public setup_param = { form_loading: false };\n public loginForm: FormGroupModel<MLogin>;\n public erro_message = signal<string>('');\n private returnUrl: string = '/control-panel'; // Default return URL\n protected override router = inject(Router);\n private activatedRoute = inject(ActivatedRoute);\n private authService = inject(CloudIdeAuthService);\n private appStateService = inject(AppStateHelperService);\n constructor(\n ) {\n super();\n\n this.loginForm = new FormGroup({\n custom_login_method: new FormControl<loginMethod>('pass'),\n user_username: new FormControl(''),\n user_password: new FormControl(''),\n mpin_pin: new FormControl(''),\n stay_sign_in: new FormControl(true)\n }) as unknown as FormGroupModel<MLogin>;\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\n\n // Get return URL from route parameters or default to '/control-panel'\n this.returnUrl = this.activatedRoute.snapshot.queryParams['returnUrl'] || 'control-panel';\n\n // If user is already authenticated, redirect to the return URL\n if (this.authService.isAuthenticated() && !this.authService.isTokenExpired()) {\n this.router.navigateByUrl(this.returnUrl);\n }\n }\n\n\n onSignIn(): void {\n if (this.loginForm.valid) {\n this.setup_param.form_loading = true;\n this.authService.signIn(this.loginForm?.value as MLogin)?.subscribe({\n next: async (response) => {\n this.setup_param.form_loading = false;\n \n if (response?.success === true) {\n // Store user data in auth service\n this.authService.storeUserData(response?.data?.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 this.appStateService.setActiveEntity(response?.data?.core_system_entity || null);\n\n // Store token through the service setter which saves to localStorage\n this.authService.auth_token = (response?.token || '');\n console.log(response?.token);\n\n // Navigate to the return URL or control panel\n await new Promise(resolve => setTimeout(resolve, 200));\n this.router.navigateByUrl(this.returnUrl);\n } else {\n // Handle case where API returns success: false\n const errorMessage = response?.message || response?.error_code || 'Login failed. Please check your credentials and try again.';\n this.erro_message.set(errorMessage);\n \n // Clear error message after 5 seconds\n setTimeout(() => {\n this.erro_message.set('');\n }, 5000);\n }\n },\n error: (response: { error: controllerResponse }) => {\n this.setup_param.form_loading = false;\n \n const errorMessage = response?.error?.message || 'Login failed. Please check your credentials and try again.';\n this.erro_message.set(errorMessage);\n console.error('Login error:', response);\n \n // Clear error message after 5 seconds\n setTimeout(() => {\n this.erro_message.set('');\n }, 5000);\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\">\n <!-- Login Forrm Wrapper -->\n <div class=\"tw-m-auto tw-w-96 tw-rounded-2xl tw-bg-white tw-py-6 tw-shadow-xl\">\n <!-- Logo Wrapper -->\n <div class=\"tw-m-auto tw-h-32 tw-w-64 tw-text-center\">\n <img src=\"https://console.cloudidesys.com/assets/Cloud%20IDE%20Logo%20Dark.png\" class=\"tw-m-auto tw-h-full\"\n alt=\"Cloud IDE Logo\" />\n </div> <!-- Entity name here -->\n <div class=\"tw-my-2 tw-text-center tw-text-xl tw-font-semibold tw-text-gray-900\">SignIn to CloudIDE sys</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-80 tw-text-center tw-text-sm tw-text-red-600 dark:tw-text-red-400\">\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-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-80\">\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\n </div>\n <!-- Forgot password -->\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\n <div>\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\n </div>\n <div>\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">Forgot Password?</a>\n </div>\n </div> <!-- Sign in button -->\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</button>\n </div>\n </div>\n </form>\n </div>\n</div>"],"names":[],"mappings":";;;;;;;;;;AAoBM,MAAO,uBAAwB,SAAQ,6BAA6B,CAAA;IACxD,0BAA0B,GAAG,KAAK,CAA0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