cloud-ide-auth 1.0.0 → 1.0.1

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.
Files changed (25) hide show
  1. package/README.md +35 -189
  2. package/fesm2022/cloud-ide-auth-reset-password.component-BZiK83P_.mjs +61 -0
  3. package/fesm2022/{cloud-ide-auth-reset-password.component-s7NMNjch.mjs.map → cloud-ide-auth-reset-password.component-BZiK83P_.mjs.map} +1 -1
  4. package/fesm2022/{cloud-ide-auth-sign-in.component-Cu4z1fIE.mjs → cloud-ide-auth-sign-in.component-D7Q5GGKH.mjs} +15 -14
  5. package/fesm2022/{cloud-ide-auth-sign-in.component-Cu4z1fIE.mjs.map → cloud-ide-auth-sign-in.component-D7Q5GGKH.mjs.map} +1 -1
  6. package/fesm2022/cloud-ide-auth.mjs +24 -23
  7. package/fesm2022/cloud-ide-auth.mjs.map +1 -1
  8. package/index.d.ts +59 -5
  9. package/package.json +3 -5
  10. package/esm2022/cloud-ide-auth.mjs +0 -5
  11. package/esm2022/lib/auth/forgot-password/forgot-password.component.mjs +0 -62
  12. package/esm2022/lib/auth/reset-password/reset-password.component.mjs +0 -57
  13. package/esm2022/lib/auth/sign-in/sign-in.component.mjs +0 -78
  14. package/esm2022/lib/cloud-ide-auth.component.mjs +0 -16
  15. package/esm2022/lib/cloud-ide-auth.routes.mjs +0 -24
  16. package/esm2022/lib/cloud-ide-auth.service.mjs +0 -165
  17. package/esm2022/public-api.mjs +0 -8
  18. package/fesm2022/cloud-ide-auth-reset-password.component-s7NMNjch.mjs +0 -60
  19. package/lib/auth/forgot-password/forgot-password.component.d.ts +0 -16
  20. package/lib/auth/reset-password/reset-password.component.d.ts +0 -18
  21. package/lib/auth/sign-in/sign-in.component.d.ts +0 -26
  22. package/lib/cloud-ide-auth.component.d.ts +0 -5
  23. package/lib/cloud-ide-auth.routes.d.ts +0 -2
  24. package/lib/cloud-ide-auth.service.d.ts +0 -29
  25. package/public-api.d.ts +0 -4
package/README.md CHANGED
@@ -1,217 +1,63 @@
1
- # Cloud IDE Authentication Library
1
+ # CloudIdeAuth
2
2
 
3
- The Cloud IDE Authentication library provides components and services for user authentication in CIDE-LMS applications. It handles user login, registration, password reset, and session management.
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.0.
4
4
 
5
- ## Features
5
+ ## Code scaffolding
6
6
 
7
- - **Authentication Components**
8
- - Sign-in Form
9
- - Registration Form
10
- - Forgot Password Flow
11
- - Reset Password Flow
12
- - **Authentication Service**
13
- - Token-based Authentication
14
- - Session Management
15
- - Automatic Token Refresh
16
- - Auth Guards for Route Protection
17
- - **Integration with Backend**
18
- - HTTP Interceptors for Auth Headers
19
- - Error Handling for Auth Failures
20
-
21
- ## Installation
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
22
8
 
23
9
  ```bash
24
- npm install @cide-lms/cloud-ide-auth
10
+ ng generate component component-name
25
11
  ```
26
12
 
27
- ## Usage
28
-
29
- ### Setup
30
-
31
- Import the authentication module in your app module:
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
32
14
 
33
- ```typescript
34
- import { CloudIdeAuthModule } from '@cide-lms/cloud-ide-auth';
35
-
36
- @NgModule({
37
- imports: [
38
- CloudIdeAuthModule.forRoot({
39
- apiUrl: 'https://api.example.com/auth',
40
- tokenStorageKey: 'auth_token',
41
- refreshTokenStorageKey: 'refresh_token'
42
- })
43
- ],
44
- // ...
45
- })
46
- export class AppModule { }
47
- ```
48
-
49
- ### Authentication Service
50
-
51
- ```typescript
52
- import { Component } from '@angular/core';
53
- import { CloudIdeAuthService } from '@cide-lms/cloud-ide-auth';
54
-
55
- @Component({
56
- selector: 'app-login',
57
- template: `
58
- <form (ngSubmit)="login()">
59
- <input type="email" [(ngModel)]="email" name="email" required>
60
- <input type="password" [(ngModel)]="password" name="password" required>
61
- <button type="submit" [disabled]="isLoading">Login</button>
62
- <div *ngIf="error">{{ error }}</div>
63
- </form>
64
- `
65
- })
66
- export class LoginComponent {
67
- email = '';
68
- password = '';
69
- error = '';
70
- isLoading = false;
71
-
72
- constructor(private authService: CloudIdeAuthService) {}
73
-
74
- login() {
75
- this.isLoading = true;
76
- this.error = '';
77
-
78
- this.authService.login(this.email, this.password)
79
- .subscribe({
80
- next: () => {
81
- // Redirect to dashboard
82
- },
83
- error: (err) => {
84
- this.error = err.message || 'Login failed';
85
- this.isLoading = false;
86
- },
87
- complete: () => {
88
- this.isLoading = false;
89
- }
90
- });
91
- }
92
- }
15
+ ```bash
16
+ ng generate --help
93
17
  ```
94
18
 
95
- ### Authentication Guard
96
-
97
- ```typescript
98
- import { inject } from '@angular/core';
99
- import { Router, CanActivateFn } from '@angular/router';
100
- import { map, take } from 'rxjs/operators';
101
- import { CloudIdeAuthService } from '@cide-lms/cloud-ide-auth';
102
-
103
- export const authGuard: CanActivateFn = (route, state) => {
104
- const router = inject(Router);
105
- const authService = inject(CloudIdeAuthService);
106
-
107
- return authService.isAuthenticated$.pipe(
108
- take(1),
109
- map(isAuthenticated => {
110
- if (isAuthenticated) {
111
- return true;
112
- } else {
113
- router.navigate(['/auth/login'], { queryParams: { returnUrl: state.url } });
114
- return false;
115
- }
116
- })
117
- );
118
- };
119
- ```
19
+ ## Building
120
20
 
121
- ### Using Auth Components
21
+ To build the library, run:
122
22
 
123
- ```html
124
- <!-- Sign-in component -->
125
- <cloud-ide-sign-in
126
- [redirectUrl]="'/dashboard'"
127
- [rememberMe]="true"
128
- ></cloud-ide-sign-in>
23
+ ```bash
24
+ ng build cloud-ide-auth
25
+ ```
129
26
 
130
- <!-- Forgot password component -->
131
- <cloud-ide-forgot-password></cloud-ide-forgot-password>
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
132
28
 
133
- <!-- Reset password component -->
134
- <cloud-ide-reset-password [token]="resetToken"></cloud-ide-reset-password>
135
- ```
29
+ ### Publishing the Library
136
30
 
137
- ## Auth Routes
31
+ Once the project is built, you can publish your library by following these steps:
138
32
 
139
- The library includes predefined routes for authentication flows:
33
+ 1. Navigate to the `dist` directory:
34
+ ```bash
35
+ cd dist/cloud-ide-auth
36
+ ```
140
37
 
141
- - `/auth/sign-in` - Login page
142
- - `/auth/register` - Registration page
143
- - `/auth/forgot-password` - Forgot password page
144
- - `/auth/reset-password/:token` - Reset password page with token
38
+ 2. Run the `npm publish` command to publish your library to the npm registry:
39
+ ```bash
40
+ npm publish
41
+ ```
145
42
 
146
- Import these routes in your app routing:
43
+ ## Running unit tests
147
44
 
148
- ```typescript
149
- import { Routes } from '@angular/router';
150
- import { cloudIdeAuthRoutes } from '@cide-lms/cloud-ide-auth';
45
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
151
46
 
152
- export const routes: Routes = [
153
- // Your app routes
154
- {
155
- path: 'auth',
156
- children: cloudIdeAuthRoutes
157
- }
158
- ];
47
+ ```bash
48
+ ng test
159
49
  ```
160
50
 
161
- ## HTTP Interceptor
162
-
163
- The library includes an HTTP interceptor for automatically adding authentication tokens to requests:
51
+ ## Running end-to-end tests
164
52
 
165
- ```typescript
166
- import { HTTP_INTERCEPTORS } from '@angular/common/http';
167
- import { AuthInterceptor } from '@cide-lms/cloud-ide-auth';
53
+ For end-to-end (e2e) testing, run:
168
54
 
169
- @NgModule({
170
- providers: [
171
- {
172
- provide: HTTP_INTERCEPTORS,
173
- useClass: AuthInterceptor,
174
- multi: true
175
- }
176
- ]
177
- })
178
- export class AppModule { }
55
+ ```bash
56
+ ng e2e
179
57
  ```
180
58
 
181
- ## Customization
182
-
183
- You can customize the appearance of authentication components by overriding the CSS variables:
59
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
184
60
 
185
- ```scss
186
- :root {
187
- --cide-auth-primary-color: #3b82f6;
188
- --cide-auth-error-color: #ef4444;
189
- --cide-auth-background: #f8fafc;
190
- --cide-auth-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
191
- }
192
- ```
61
+ ## Additional Resources
193
62
 
194
- ## Error Handling
195
-
196
- The auth service provides standardized error messages:
197
-
198
- ```typescript
199
- import { AuthErrorType, CloudIdeAuthService } from '@cide-lms/cloud-ide-auth';
200
-
201
- @Component({/* ... */})
202
- export class LoginComponent {
203
- constructor(private authService: CloudIdeAuthService) {
204
- this.authService.loginError$.subscribe(error => {
205
- switch(error.type) {
206
- case AuthErrorType.INVALID_CREDENTIALS:
207
- this.errorMessage = 'Invalid username or password';
208
- break;
209
- case AuthErrorType.ACCOUNT_LOCKED:
210
- this.errorMessage = 'Your account has been locked';
211
- break;
212
- // Handle other error types
213
- }
214
- });
215
- }
216
- }
217
- ```
63
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,61 @@
1
+ import * as i0 from '@angular/core';
2
+ import { 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 = "";
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_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: (error) => {
42
+ this.setup_param.form_loading = false;
43
+ this.erro_message = error?.error?.message;
44
+ console.log(error);
45
+ setTimeout(() => {
46
+ this.erro_message = "";
47
+ }, 3000);
48
+ }
49
+ });
50
+ }
51
+ }
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
53
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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\">\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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">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", "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]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }] });
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthResetPasswordComponent, decorators: [{
56
+ type: Component,
57
+ args: [{ selector: 'cide-auth-reset-password', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent], 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 <!-- 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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>" }]
58
+ }], ctorParameters: () => [] });
59
+
60
+ export { CideAuthResetPasswordComponent };
61
+ //# sourceMappingURL=cloud-ide-auth-reset-password.component-BZiK83P_.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-ide-auth-reset-password.component-s7NMNjch.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 } 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 } 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 = \"\";\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 onForgotPasssword() {\n if (this.resetPassswordForm.valid) {\n this.setup_param.form_loading = true;\n const resetPasssword : MResetPassword= {\n user_password: this.resetPassswordForm?.get('user_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: (error) => {\n this.setup_param.form_loading = false;\n this.erro_message = error?.error?.message;\n console.log(error)\n setTimeout(() => {\n this.erro_message = \"\"\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\">\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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>"],"names":[],"mappings":";;;;;;;;;MAgBa,8BAA8B,CAAA;AAQzC,IAAA,WAAA,GAAA;AAPO,QAAA,IAAA,CAAA,WA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,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,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,yCAAA,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,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAI5E,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;+BACE,0BAA0B,EAAA,UAAA,EACxB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,CAAC,EAAA,QAAA,EAAA,+tDAAA,EAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"cloud-ide-auth-reset-password.component-BZiK83P_.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 } 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 } 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 = \"\";\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 onForgotPasssword() {\n if (this.resetPassswordForm.valid) {\n this.setup_param.form_loading = true;\n const resetPasssword : MResetPassword= {\n user_password: this.resetPassswordForm?.get('user_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: (error) => {\n this.setup_param.form_loading = false;\n this.erro_message = error?.error?.message;\n console.log(error)\n setTimeout(() => {\n this.erro_message = \"\"\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\">\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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!resetPassswordForm.valid\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>"],"names":[],"mappings":";;;;;;;;;MAgBa,8BAA8B,CAAA;AAClC,IAAA,WAAW,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE;AACrC,IAAA,kBAAkB;IAClB,YAAY,GAAG,EAAE;AAEhB,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;;IAG7F,iBAAiB,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,k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AA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAI5E,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;+BACE,0BAA0B,EAAA,UAAA,EACxB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,CAAC,EAAA,QAAA,EAAA,+tDAAA,EAAA;;;;;"}
@@ -9,18 +9,19 @@ import { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';
9
9
  import { CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';
10
10
 
11
11
  class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
12
+ shared_wrapper_setup_param = {
13
+ sypg_page_code: "auth_sign_in"
14
+ };
15
+ setup_param = { form_loading: false };
16
+ loginForm;
17
+ 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);
12
23
  constructor() {
13
24
  super();
14
- this.shared_wrapper_setup_param = {
15
- sypg_page_code: "auth_sign_in"
16
- };
17
- this.setup_param = { form_loading: false };
18
- this.erro_message = "";
19
- this.returnUrl = '/control-panel'; // Default return URL
20
- this.router = inject(Router);
21
- this.activatedRoute = inject(ActivatedRoute);
22
- this.authService = inject(CloudIdeAuthService);
23
- this.appStateService = inject(AppStateHelperService);
24
25
  this.loginForm = new FormGroup({
25
26
  custom_login_method: new FormControl('pass'),
26
27
  user_username: new FormControl(''),
@@ -69,13 +70,13 @@ class CideAuthSignInComponent extends CideLytSharedWrapperComponent {
69
70
  });
70
71
  }
71
72
  }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideAuthSignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
73
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CideAuthSignInComponent, isStandalone: true, selector: "cide-auth-sign-in", usesInheritance: true, 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 <!-- Login 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\">SignIn to CloudIDE sys</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" 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>\r\n <!-- Password -->\r\n <div class=\"tw-m-auto tw-mt-4 tw-w-80\">\r\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\r\n </div>\r\n <!-- Forgot password -->\r\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\r\n <div>\r\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\r\n </div>\r\n <div>\r\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-700\">Forgot Password?</a>\r\n </div>\r\n </div> <!-- Sign in button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</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]", 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"] }] }); }
73
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthSignInComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
74
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CideAuthSignInComponent, isStandalone: true, selector: "cide-auth-sign-in", usesInheritance: true, 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 <!-- Login 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\">SignIn to CloudIDE sys</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" 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>\r\n <!-- Password -->\r\n <div class=\"tw-m-auto tw-mt-4 tw-w-80\">\r\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\r\n </div>\r\n <!-- Forgot password -->\r\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\r\n <div>\r\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\r\n </div>\r\n <div>\r\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-700\">Forgot Password?</a>\r\n </div>\r\n </div> <!-- Sign in button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</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]", 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"] }] });
74
75
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideAuthSignInComponent, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthSignInComponent, decorators: [{
76
77
  type: Component,
77
78
  args: [{ selector: 'cide-auth-sign-in', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent, RouterLink], 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 <!-- Login 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\">SignIn to CloudIDE sys</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" 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>\r\n <!-- Password -->\r\n <div class=\"tw-m-auto tw-mt-4 tw-w-80\">\r\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\r\n </div>\r\n <!-- Forgot password -->\r\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\r\n <div>\r\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\r\n </div>\r\n <div>\r\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-700\">Forgot Password?</a>\r\n </div>\r\n </div> <!-- Sign in button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</div>" }]
78
79
  }], ctorParameters: () => [] });
79
80
 
80
81
  export { CideAuthSignInComponent };
81
- //# sourceMappingURL=cloud-ide-auth-sign-in.component-Cu4z1fIE.mjs.map
82
+ //# sourceMappingURL=cloud-ide-auth-sign-in.component-D7Q5GGKH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-ide-auth-sign-in.component-Cu4z1fIE.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, OnInit } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { loginMethod, MLogin } 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: 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 = \"\";\n private returnUrl: string = '/control-panel'; // Default return URL\n private 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 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: (response) => {\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 \n // Navigate to the return URL or control panel\n this.router.navigateByUrl(this.returnUrl);\n }\n },\n error: (error) => {\n this.setup_param.form_loading = false;\n this.erro_message = error?.error?.message;\n console.log(error);\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(3000).then(() => {\n this.erro_message = \"\";\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 <!-- Login 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\">SignIn to CloudIDE sys</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" 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>\r\n <!-- Password -->\r\n <div class=\"tw-m-auto tw-mt-4 tw-w-80\">\r\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\r\n </div>\r\n <!-- Forgot password -->\r\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\r\n <div>\r\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\r\n </div>\r\n <div>\r\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-700\">Forgot Password?</a>\r\n </div>\r\n </div> <!-- Sign in button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</div>"],"names":[],"mappings":";;;;;;;;;;AAoBM,MAAO,uBAAwB,SAAQ,6BAA6B,CAAA;AAYxE,IAAA,WAAA,GAAA;AAEE,QAAA,KAAK,EAAE,CAAC;AAbM,QAAA,IAAA,CAAA,0BAA0B,GAA4C;AACpF,YAAA,cAAc,EAAE,cAAc;SAC/B,CAAA;AACM,QAAA,IAAA,CAAA,WAAW,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAEtC,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;AACjB,QAAA,IAAA,CAAA,SAAS,GAAW,gBAAgB,CAAC;AACrC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AACxC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAKtD,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC;AAC7B,YAAA,mBAAmB,EAAE,IAAI,WAAW,CAAc,MAAM,CAAC;AACzD,YAAA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AAA,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,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIxF,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EACjB,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAA,QAAA,EAAA,ynEAAA,EAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"cloud-ide-auth-sign-in.component-D7Q5GGKH.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, OnInit } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { loginMethod, MLogin } 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: 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 = \"\";\n private returnUrl: string = '/control-panel'; // Default return URL\n private 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 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: (response) => {\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 \n // Navigate to the return URL or control panel\n this.router.navigateByUrl(this.returnUrl);\n }\n },\n error: (error) => {\n this.setup_param.form_loading = false;\n this.erro_message = error?.error?.message;\n console.log(error);\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(3000).then(() => {\n this.erro_message = \"\";\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 <!-- Login 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\">SignIn to CloudIDE sys</div>\r\n <!-- Error Logger -->\r\n <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\r\n \r\n <!-- section for controls -->\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSignIn()\" 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>\r\n <!-- Password -->\r\n <div class=\"tw-m-auto tw-mt-4 tw-w-80\">\r\n <cide-ele-input id=\"user_password_mpin\" formControlName=\"user_password\"></cide-ele-input>\r\n </div>\r\n <!-- Forgot password -->\r\n <div class=\"tw-m-auto tw-mt-3 tw-flex tw-w-80 tw-justify-between\">\r\n <div>\r\n <cide-ele-input id=\"stay_sign_in\" formControlName=\"stay_sign_in\"></cide-ele-input>\r\n </div>\r\n <div>\r\n <a routerLink=\"/auth/forgot-password\" class=\"tw-text-blue-700\">Forgot Password?</a>\r\n </div>\r\n </div> <!-- Sign in button -->\r\n <div class=\"tw-w-80 tw-m-auto tw-mt-3\">\r\n <button type=\"submit\" class=\"tw-w-full\" cideEleButton id=\"stay_sin_button\" [loading]=\"setup_param.form_loading\" [disabled]=\"!loginForm.valid\">a</button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</div>"],"names":[],"mappings":";;;;;;;;;;AAoBM,MAAO,uBAAwB,SAAQ,6BAA6B,CAAA;AACxD,IAAA,0BAA0B,GAA4C;AACpF,QAAA,cAAc,EAAE;KACjB;AACM,IAAA,WAAW,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE;AACrC,IAAA,SAAS;IACT,YAAY,GAAG,EAAE;AAChB,IAAA,SAAS,GAAW,gBAAgB,CAAC;AACrC,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACzC,IAAA,eAAe,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAA,WAAA,GAAA;AAEE,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC;AAC7B,YAAA,mBAAmB,EAAE,IAAI,WAAW,CAAc,MAAM,CAAC;AACzD,YAAA,aAAa,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAClC,YAAA,aAAa,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAClC,YAAA,QAAQ,EAAE,IAAI,WAAW,CAAC,EAAE,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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIxF,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,CAAC,EAAA,QAAA,EAAA,ynEAAA,EAAA;;;;;"}
@@ -10,14 +10,14 @@ import { CommonModule } from '@angular/common';
10
10
  import { CideInputComponent, CideEleButtonComponent } from 'cloud-ide-element';
11
11
 
12
12
  class CloudIdeAuthService {
13
+ auth_user_mst = new BehaviorSubject({});
14
+ _auth_token = "";
15
+ // Storage keys
16
+ TOKEN_STORAGE_KEY = 'cide_auth_token';
17
+ USER_STORAGE_KEY = 'cide_auth_user';
18
+ // Modern Angular v20 dependency injection pattern
19
+ http = inject(HttpClient);
13
20
  constructor() {
14
- this.auth_user_mst = new BehaviorSubject({});
15
- this._auth_token = "";
16
- // Storage keys
17
- this.TOKEN_STORAGE_KEY = 'cide_auth_token';
18
- this.USER_STORAGE_KEY = 'cide_auth_user';
19
- // Modern Angular v20 dependency injection pattern
20
- this.http = inject(HttpClient);
21
21
  // Modern Angular v20 pattern: Use constructor for initialization only
22
22
  this.loadAuthDataFromStorage();
23
23
  }
@@ -159,10 +159,10 @@ class CloudIdeAuthService {
159
159
  this.signOut();
160
160
  }
161
161
  }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
163
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeAuthService, providedIn: 'root' }); }
162
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
163
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeAuthService, providedIn: 'root' });
164
164
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeAuthService, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeAuthService, decorators: [{
166
166
  type: Injectable,
167
167
  args: [{
168
168
  providedIn: 'root'
@@ -170,12 +170,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
170
170
  }], ctorParameters: () => [] });
171
171
 
172
172
  class CloudIdeAuthComponent {
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CloudIdeAuthComponent, isStandalone: true, selector: "cide-auth-wrapper", ngImport: i0, template: `
173
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
174
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CloudIdeAuthComponent, isStandalone: true, selector: "cide-auth-wrapper", ngImport: i0, template: `
175
175
  <router-outlet></router-outlet>
176
- `, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
176
+ `, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
177
177
  }
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CloudIdeAuthComponent, decorators: [{
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeAuthComponent, decorators: [{
179
179
  type: Component,
180
180
  args: [{ selector: 'cide-auth-wrapper', standalone: true, imports: [RouterOutlet], template: `
181
181
  <router-outlet></router-outlet>
@@ -188,11 +188,12 @@ var cloudIdeAuth_component = /*#__PURE__*/Object.freeze({
188
188
  });
189
189
 
190
190
  class CideAuthForgotPasswordComponent {
191
+ setup_param = { form_loading: false };
192
+ forgotPassswordForm;
193
+ erro_message = "";
194
+ authService = inject(CloudIdeAuthService);
195
+ route = inject(Router);
191
196
  constructor() {
192
- this.setup_param = { form_loading: false };
193
- this.erro_message = "";
194
- this.authService = inject(CloudIdeAuthService);
195
- this.route = inject(Router);
196
197
  this.forgotPassswordForm = new FormGroup({
197
198
  custom_forgot_password_method: new FormControl('username'),
198
199
  user_username: new FormControl(''),
@@ -232,10 +233,10 @@ class CideAuthForgotPasswordComponent {
232
233
  }
233
234
  }
234
235
  }
235
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideAuthForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
236
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.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\">\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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!forgotPassswordForm.valid\">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", "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]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }] }); }
236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
237
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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\">\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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!forgotPassswordForm.valid\">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", "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]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }] });
237
238
  }
238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CideAuthForgotPasswordComponent, decorators: [{
239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideAuthForgotPasswordComponent, decorators: [{
239
240
  type: Component,
240
241
  args: [{ selector: 'cide-auth-forgot-password', standalone: true, imports: [CideInputComponent, ReactiveFormsModule, CommonModule, CideEleButtonComponent], 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 <!-- 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 <div class=\"tw-w-full tw-select-none tw-py-1 tw-text-center tw-text-red-500 tw-h-4 tw-text-sm\">{{erro_message}}</div>\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]=\"setup_param.form_loading\" [disabled]=\"!forgotPassswordForm.valid\">Reset Password</button>\n </div>\n </div>\n </form>\n </div>\n </div>" }]
241
242
  }], ctorParameters: () => [] });
@@ -256,7 +257,7 @@ const authRoutes = {
256
257
  },
257
258
  {
258
259
  path: "sign-in",
259
- loadComponent: () => import('./cloud-ide-auth-sign-in.component-Cu4z1fIE.mjs').then(c => c.CideAuthSignInComponent)
260
+ loadComponent: () => import('./cloud-ide-auth-sign-in.component-D7Q5GGKH.mjs').then(c => c.CideAuthSignInComponent)
260
261
  },
261
262
  {
262
263
  path: "forgot-password",
@@ -264,7 +265,7 @@ const authRoutes = {
264
265
  },
265
266
  {
266
267
  path: "reset-password/:rout_token",
267
- loadComponent: () => import('./cloud-ide-auth-reset-password.component-s7NMNjch.mjs').then(c => c.CideAuthResetPasswordComponent)
268
+ loadComponent: () => import('./cloud-ide-auth-reset-password.component-BZiK83P_.mjs').then(c => c.CideAuthResetPasswordComponent)
268
269
  }
269
270
  ]
270
271
  };