ngx-techlify-core 18.8.0 → 18.9.0
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/esm2022/lib/login/login-form-fields/login-form-fields.component.mjs +134 -0
- package/esm2022/lib/login/login.component.mjs +18 -96
- package/esm2022/lib/login/login.module.mjs +11 -4
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/ngx-techlify-core.mjs +168 -123
- package/fesm2022/ngx-techlify-core.mjs.map +1 -1
- package/lib/login/login-form-fields/login-form-fields.component.d.ts +38 -0
- package/lib/login/login.component.d.ts +5 -24
- package/lib/login/login.module.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { TechlifyFormComponentInterface } from '../../base-model';
|
|
4
|
+
import { AuthenticationService, ConfigService, CredentialsService, ErrorHandlerService, FormValidatorService } from '../../core';
|
|
5
|
+
import { CurrentUserService } from '../../user';
|
|
6
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
7
|
+
import { MultiUserConfig, UserConfigService } from '../../user-config';
|
|
8
|
+
import { UserTypeEnum } from '../../user/user-type.enum';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class LoginFormFieldsComponent extends TechlifyFormComponentInterface implements OnInit {
|
|
11
|
+
private fb;
|
|
12
|
+
private config;
|
|
13
|
+
private credentialService;
|
|
14
|
+
currentUserService: CurrentUserService;
|
|
15
|
+
private authService;
|
|
16
|
+
private router;
|
|
17
|
+
private route;
|
|
18
|
+
userConfigService: UserConfigService;
|
|
19
|
+
private errorHandler;
|
|
20
|
+
userConfig?: MultiUserConfig;
|
|
21
|
+
isWorking: boolean;
|
|
22
|
+
form: UntypedFormGroup;
|
|
23
|
+
loginError: {
|
|
24
|
+
type: string;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
userClients: any[];
|
|
28
|
+
userType: typeof UserTypeEnum;
|
|
29
|
+
constructor(fb: FormBuilder, formValidatorService: FormValidatorService, config: ConfigService, credentialService: CredentialsService, currentUserService: CurrentUserService, authService: AuthenticationService, router: Router, route: ActivatedRoute, userConfigService: UserConfigService, errorHandler: ErrorHandlerService);
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
handleUserRedirect(): void;
|
|
32
|
+
login(): void;
|
|
33
|
+
private handleLoginErrors;
|
|
34
|
+
backToLogin(): void;
|
|
35
|
+
redirect(provider: any): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginFormFieldsComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginFormFieldsComponent, "app-login-form-fields", never, { "userConfig": { "alias": "userConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { ConfigService, FormValidatorService } from '../core';
|
|
4
3
|
import { AlertService } from '../core';
|
|
5
4
|
import { StorageService } from '../core';
|
|
6
|
-
import { UntypedFormGroup
|
|
5
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
7
6
|
import { UserConfigService } from '../user-config';
|
|
8
7
|
import { MultiUserConfig } from '../user-config';
|
|
9
|
-
import { AuthenticationService, CredentialsService
|
|
8
|
+
import { AuthenticationService, CredentialsService } from '../core';
|
|
10
9
|
import { User } from '../user';
|
|
11
10
|
import { CurrentUserService } from '../user';
|
|
11
|
+
import { UserTypeEnum } from '../user/user-type.enum';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
export declare class LoginComponent implements OnInit {
|
|
14
|
-
private http;
|
|
15
14
|
private alerter;
|
|
16
15
|
private router;
|
|
17
16
|
private authService;
|
|
18
|
-
private config;
|
|
19
17
|
currentUserService: CurrentUserService;
|
|
20
|
-
private errorService;
|
|
21
18
|
private storage;
|
|
22
19
|
private credentialService;
|
|
23
|
-
private fb;
|
|
24
|
-
private formValidatorService;
|
|
25
20
|
private route;
|
|
26
21
|
userConfigService: UserConfigService;
|
|
27
22
|
user: User;
|
|
@@ -32,24 +27,10 @@ export declare class LoginComponent implements OnInit {
|
|
|
32
27
|
type: string;
|
|
33
28
|
message: string;
|
|
34
29
|
};
|
|
35
|
-
|
|
36
|
-
constructor(
|
|
30
|
+
userType: typeof UserTypeEnum;
|
|
31
|
+
constructor(alerter: AlertService, router: Router, authService: AuthenticationService, currentUserService: CurrentUserService, storage: StorageService, credentialService: CredentialsService, route: ActivatedRoute, userConfigService: UserConfigService);
|
|
37
32
|
ngOnInit(): void;
|
|
38
|
-
login(): void;
|
|
39
33
|
loadUser(): void;
|
|
40
|
-
redirect(provider: any): void;
|
|
41
|
-
/** Method to evaluate form fields*/
|
|
42
|
-
isFieldValid(field: string): any;
|
|
43
|
-
/** Method to find error in form fields*/
|
|
44
|
-
getErrorMessage(field: string): any;
|
|
45
|
-
/**
|
|
46
|
-
* Handle the login errors.
|
|
47
|
-
*
|
|
48
|
-
* @param errorObj
|
|
49
|
-
* @private
|
|
50
|
-
*/
|
|
51
|
-
private handleLoginErrors;
|
|
52
|
-
backToLogin(): void;
|
|
53
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
54
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "login", never, {}, {}, never, never, false, never>;
|
|
55
36
|
}
|
|
@@ -8,8 +8,9 @@ import * as i6 from "@angular/material/form-field";
|
|
|
8
8
|
import * as i7 from "@angular/material/button";
|
|
9
9
|
import * as i8 from "@angular/flex-layout";
|
|
10
10
|
import * as i9 from "@angular/material/card";
|
|
11
|
+
import * as i10 from "./login-form-fields/login-form-fields.component";
|
|
11
12
|
export declare class LoginModule {
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LoginModule, [typeof i1.LoginComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.MaterialModule, typeof i5.LoginRoutingModule, typeof i6.MatFormFieldModule, typeof i7.MatButtonModule, typeof i8.FlexModule, typeof i9.MatCardModule],
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoginModule, [typeof i1.LoginComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.MaterialModule, typeof i5.LoginRoutingModule, typeof i6.MatFormFieldModule, typeof i7.MatButtonModule, typeof i8.FlexModule, typeof i9.MatCardModule, typeof i10.LoginFormFieldsComponent], [typeof i1.LoginComponent]>;
|
|
14
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<LoginModule>;
|
|
15
16
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -129,3 +129,5 @@ export * from './lib/reset-password/reset-password.module';
|
|
|
129
129
|
export * from './lib/company-information/company-information/company-information.component';
|
|
130
130
|
export * from './lib/company-information/company-info-display/company-info-display.component';
|
|
131
131
|
export * from './lib/company-information/client.service';
|
|
132
|
+
export * from './lib/login/login.module';
|
|
133
|
+
export * from './lib/login/login-form-fields/login-form-fields.component';
|