exceladdincbms-v2 17.0.0 → 20.0.3
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/{exceladdincbms.mjs → exceladdincbms-20.mjs} +64 -72
- package/fesm2022/exceladdincbms-20.mjs.map +1 -0
- package/index.d.ts +196 -5
- package/package.json +5 -7
- package/public_api.d.ts +2 -6
- package/src/lib/auth.service.ts +46 -0
- package/src/lib/base-app.service.ts +36 -0
- package/src/lib/bulk-tool.component.ts +20 -0
- package/src/lib/bulk-tool.module.ts +32 -0
- package/src/lib/constant.enum.ts +6 -0
- package/src/lib/environmentsModel.info.ts +14 -0
- package/src/lib/http-interceptor.ts +22 -0
- package/src/lib/login/login.component.css +103 -0
- package/src/lib/login/login.component.html +59 -0
- package/src/lib/login/login.component.ts +105 -0
- package/src/lib/materils/materils.module.ts +96 -0
- package/src/lib/menu/menu.component.css +388 -0
- package/src/lib/menu/menu.component.html +46 -0
- package/src/lib/menu/menu.component.ts +191 -0
- package/src/public_api.ts +14 -0
- package/esm2022/exceladdincbms.mjs +0 -5
- package/esm2022/lib/auth.service.mjs +0 -56
- package/esm2022/lib/base-app.service.mjs +0 -41
- package/esm2022/lib/bulk-tool.component.mjs +0 -22
- package/esm2022/lib/bulk-tool.module.mjs +0 -51
- package/esm2022/lib/constant.enum.mjs +0 -6
- package/esm2022/lib/environmentsModel.info.mjs +0 -3
- package/esm2022/lib/http-interceptor.mjs +0 -25
- package/esm2022/lib/login/login.component.mjs +0 -111
- package/esm2022/lib/materils/materils.module.mjs +0 -177
- package/esm2022/lib/menu/menu.component.mjs +0 -187
- package/esm2022/public_api.mjs +0 -10
- package/fesm2022/exceladdincbms.mjs.map +0 -1
- package/lib/auth.service.d.ts +0 -18
- package/lib/base-app.service.d.ts +0 -16
- package/lib/bulk-tool.component.d.ts +0 -8
- package/lib/bulk-tool.module.d.ts +0 -17
- package/lib/constant.enum.d.ts +0 -5
- package/lib/environmentsModel.info.d.ts +0 -9
- package/lib/http-interceptor.d.ts +0 -8
- package/lib/login/login.component.d.ts +0 -32
- package/lib/materils/materils.module.d.ts +0 -46
- package/lib/menu/menu.component.d.ts +0 -49
package/index.d.ts
CHANGED
|
@@ -1,5 +1,196 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injector, OnInit, ModuleWithProviders } from '@angular/core';
|
|
3
|
+
import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import * as i6$1 from '@angular/common';
|
|
6
|
+
import { Location } from '@angular/common';
|
|
7
|
+
import * as i7$1 from '@angular/router';
|
|
8
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
9
|
+
import * as i5$1 from '@angular/forms';
|
|
10
|
+
import { FormGroup, FormBuilder, AbstractControl } from '@angular/forms';
|
|
11
|
+
import * as i1 from '@angular/cdk/a11y';
|
|
12
|
+
import * as i2 from '@angular/cdk/table';
|
|
13
|
+
import * as i3 from '@angular/cdk/tree';
|
|
14
|
+
import * as i4 from '@angular/cdk/drag-drop';
|
|
15
|
+
import * as i5 from '@angular/material/autocomplete';
|
|
16
|
+
import * as i6 from '@angular/material/badge';
|
|
17
|
+
import * as i7 from '@angular/material/bottom-sheet';
|
|
18
|
+
import * as i8 from '@angular/material/button';
|
|
19
|
+
import * as i9 from '@angular/material/button-toggle';
|
|
20
|
+
import * as i10 from '@angular/material/card';
|
|
21
|
+
import * as i11 from '@angular/material/checkbox';
|
|
22
|
+
import * as i12 from '@angular/material/chips';
|
|
23
|
+
import * as i13 from '@angular/material/stepper';
|
|
24
|
+
import * as i14 from '@angular/material/datepicker';
|
|
25
|
+
import * as i15 from '@angular/material/dialog';
|
|
26
|
+
import * as i16 from '@angular/material/divider';
|
|
27
|
+
import * as i17 from '@angular/material/expansion';
|
|
28
|
+
import * as i18 from '@angular/material/grid-list';
|
|
29
|
+
import * as i19 from '@angular/material/icon';
|
|
30
|
+
import * as i20 from '@angular/material/input';
|
|
31
|
+
import * as i21 from '@angular/material/list';
|
|
32
|
+
import * as i22 from '@angular/material/menu';
|
|
33
|
+
import * as i23 from '@angular/material/core';
|
|
34
|
+
import * as i24 from '@angular/material/paginator';
|
|
35
|
+
import * as i25 from '@angular/material/progress-bar';
|
|
36
|
+
import * as i26 from '@angular/material/progress-spinner';
|
|
37
|
+
import * as i27 from '@angular/material/radio';
|
|
38
|
+
import * as i28 from '@angular/material/select';
|
|
39
|
+
import * as i29 from '@angular/material/sidenav';
|
|
40
|
+
import * as i30 from '@angular/material/slider';
|
|
41
|
+
import * as i31 from '@angular/material/slide-toggle';
|
|
42
|
+
import * as i32 from '@angular/material/snack-bar';
|
|
43
|
+
import * as i33 from '@angular/material/sort';
|
|
44
|
+
import * as i34 from '@angular/material/table';
|
|
45
|
+
import * as i35 from '@angular/material/tabs';
|
|
46
|
+
import * as i36 from '@angular/material/toolbar';
|
|
47
|
+
import * as i37 from '@angular/material/tooltip';
|
|
48
|
+
import * as i38 from '@angular/material/tree';
|
|
49
|
+
import * as i39 from '@angular/cdk/scrolling';
|
|
50
|
+
import * as i40 from '@angular/cdk/overlay';
|
|
51
|
+
|
|
52
|
+
declare class BaseAppService {
|
|
53
|
+
private userInfo;
|
|
54
|
+
private userMenus;
|
|
55
|
+
private menuName;
|
|
56
|
+
getUserInfo(): any;
|
|
57
|
+
setUserInfo(value: any): void;
|
|
58
|
+
removeUserInfo(): void;
|
|
59
|
+
setUserMenus(data: any): void;
|
|
60
|
+
getUserMenus(): any;
|
|
61
|
+
clearData(): void;
|
|
62
|
+
setmenuNameFromBudget(name: any): void;
|
|
63
|
+
getmenuNameFromBudget(): any;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseAppService, never>;
|
|
65
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseAppService>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare class AuthService {
|
|
69
|
+
private http;
|
|
70
|
+
injector: Injector;
|
|
71
|
+
private baseAppService;
|
|
72
|
+
private API_ENDPOINT;
|
|
73
|
+
private menuName;
|
|
74
|
+
constructor(http: HttpClient, injector: Injector, baseAppService: BaseAppService);
|
|
75
|
+
login(username: string, password: string): Observable<any>;
|
|
76
|
+
logout(): void;
|
|
77
|
+
GetMenu(userId: any): Observable<any>;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
79
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare class BulkToolComponent implements OnInit {
|
|
83
|
+
constructor();
|
|
84
|
+
ngOnInit(): void;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BulkToolComponent, never>;
|
|
86
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BulkToolComponent, "lib-BulkTool", never, {}, {}, never, never, false, never>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface IEnvironmentsInfo {
|
|
90
|
+
production: true;
|
|
91
|
+
baseAppApiUrl: string;
|
|
92
|
+
rootUrl: string;
|
|
93
|
+
moduleName: string;
|
|
94
|
+
MenuName?: "Budget";
|
|
95
|
+
Url?: string;
|
|
96
|
+
RootUrl?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface Login {
|
|
100
|
+
[key: string]: AbstractControl;
|
|
101
|
+
}
|
|
102
|
+
declare class LoginComponent implements OnInit {
|
|
103
|
+
private formBuilder;
|
|
104
|
+
private route;
|
|
105
|
+
private router;
|
|
106
|
+
private location;
|
|
107
|
+
private authenticationService;
|
|
108
|
+
private baseAppService;
|
|
109
|
+
isLoading: boolean;
|
|
110
|
+
routeUrl: string;
|
|
111
|
+
loginForm: FormGroup;
|
|
112
|
+
submitted: boolean;
|
|
113
|
+
returnUrl: string;
|
|
114
|
+
error: string;
|
|
115
|
+
userInfo: any;
|
|
116
|
+
constructor(formBuilder: FormBuilder, route: ActivatedRoute, router: Router, location: Location, authenticationService: AuthService, baseAppService: BaseAppService);
|
|
117
|
+
isvalidUser: boolean;
|
|
118
|
+
ngOnInit(): void;
|
|
119
|
+
get formsData(): Login;
|
|
120
|
+
onLogin(): void;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
122
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "lib-login", never, { "routeUrl": { "alias": "routeUrl"; "required": false; }; }, {}, never, never, false, never>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
interface Menu {
|
|
126
|
+
displaytext: string;
|
|
127
|
+
displayorder: number;
|
|
128
|
+
menuId: number;
|
|
129
|
+
menulevel: number;
|
|
130
|
+
parentMenuId: number;
|
|
131
|
+
targetAction: string;
|
|
132
|
+
targetServer: string;
|
|
133
|
+
parentMenuName: string;
|
|
134
|
+
children: any[];
|
|
135
|
+
}
|
|
136
|
+
declare class MenuComponent implements OnInit {
|
|
137
|
+
private authenticationService;
|
|
138
|
+
private route;
|
|
139
|
+
private router;
|
|
140
|
+
injector: Injector;
|
|
141
|
+
private baseAppService;
|
|
142
|
+
async: any;
|
|
143
|
+
MenuMode: string;
|
|
144
|
+
message: string;
|
|
145
|
+
tooltext: any;
|
|
146
|
+
menuName: string;
|
|
147
|
+
childMenu: string;
|
|
148
|
+
isLoading: boolean;
|
|
149
|
+
userInfo: any;
|
|
150
|
+
moduleNameFromExcel: string;
|
|
151
|
+
IsPermissionExists: boolean;
|
|
152
|
+
messages: string[];
|
|
153
|
+
MenuData: Menu[];
|
|
154
|
+
RootUrl: string;
|
|
155
|
+
menuFromExcel: any;
|
|
156
|
+
navigateMsg: string;
|
|
157
|
+
result: any;
|
|
158
|
+
constructor(authenticationService: AuthService, route: ActivatedRoute, router: Router, injector: Injector, baseAppService: BaseAppService);
|
|
159
|
+
ngOnInit(): void;
|
|
160
|
+
GetCBMSMenu(): void;
|
|
161
|
+
navigateToChildMenu(CurrentMenu: any): void;
|
|
162
|
+
listItemClick(link: any): void;
|
|
163
|
+
navigateToAnotherMenu(link: any): void;
|
|
164
|
+
navigateUrl(Url: string): string;
|
|
165
|
+
onLogOut(): void;
|
|
166
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, never>;
|
|
167
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "lib-menu", never, {}, {}, never, never, false, never>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare class MaterilsModule {
|
|
171
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaterilsModule, never>;
|
|
172
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MaterilsModule, never, never, [typeof i1.A11yModule, typeof i2.CdkTableModule, typeof i3.CdkTreeModule, typeof i4.DragDropModule, typeof i5.MatAutocompleteModule, typeof i6.MatBadgeModule, typeof i7.MatBottomSheetModule, typeof i8.MatButtonModule, typeof i9.MatButtonToggleModule, typeof i10.MatCardModule, typeof i11.MatCheckboxModule, typeof i12.MatChipsModule, typeof i13.MatStepperModule, typeof i14.MatDatepickerModule, typeof i15.MatDialogModule, typeof i16.MatDividerModule, typeof i17.MatExpansionModule, typeof i18.MatGridListModule, typeof i19.MatIconModule, typeof i20.MatInputModule, typeof i21.MatListModule, typeof i22.MatMenuModule, typeof i23.MatNativeDateModule, typeof i24.MatPaginatorModule, typeof i25.MatProgressBarModule, typeof i26.MatProgressSpinnerModule, typeof i27.MatRadioModule, typeof i23.MatRippleModule, typeof i28.MatSelectModule, typeof i29.MatSidenavModule, typeof i30.MatSliderModule, typeof i31.MatSlideToggleModule, typeof i32.MatSnackBarModule, typeof i33.MatSortModule, typeof i34.MatTableModule, typeof i35.MatTabsModule, typeof i36.MatToolbarModule, typeof i37.MatTooltipModule, typeof i38.MatTreeModule, typeof i39.ScrollingModule, typeof i40.OverlayModule]>;
|
|
173
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MaterilsModule>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare class BulkToolModule {
|
|
177
|
+
static forRoot(config: IEnvironmentsInfo): ModuleWithProviders<BulkToolModule>;
|
|
178
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BulkToolModule, never>;
|
|
179
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BulkToolModule, [typeof BulkToolComponent, typeof LoginComponent, typeof MenuComponent], [typeof MaterilsModule, typeof i5$1.FormsModule, typeof i6$1.CommonModule, typeof i7$1.RouterModule, typeof i5$1.ReactiveFormsModule], [typeof BulkToolComponent, typeof LoginComponent, typeof MenuComponent]>;
|
|
180
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BulkToolModule>;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare const Constant: {
|
|
184
|
+
APPSERVICEURL: string;
|
|
185
|
+
APPSERVICEPRODURL: string;
|
|
186
|
+
INVALID: string;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
declare class HttpLibInterceptor implements HttpInterceptor {
|
|
190
|
+
intercept(request: HttpRequest<any>, newRequest: HttpHandler): Observable<HttpEvent<any>>;
|
|
191
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpLibInterceptor, never>;
|
|
192
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpLibInterceptor>;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export { AuthService, BaseAppService, BulkToolComponent, BulkToolModule, Constant, HttpLibInterceptor, LoginComponent, MaterilsModule, MenuComponent };
|
|
196
|
+
export type { IEnvironmentsInfo, Login, Menu };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exceladdincbms-v2",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^20.3.5",
|
|
6
|
+
"@angular/core": "^20.3.5"
|
|
7
7
|
},
|
|
8
|
-
"module": "fesm2022/exceladdincbms.mjs",
|
|
8
|
+
"module": "fesm2022/exceladdincbms-20.mjs",
|
|
9
9
|
"typings": "index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
"./package.json": {
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
|
-
"
|
|
17
|
-
"esm": "./esm2022/exceladdincbms.mjs",
|
|
18
|
-
"default": "./fesm2022/exceladdincbms.mjs"
|
|
16
|
+
"default": "./fesm2022/exceladdincbms-20.mjs"
|
|
19
17
|
}
|
|
20
18
|
},
|
|
21
19
|
"sideEffects": false,
|
package/public_api.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
|
|
3
|
-
export * from './lib/bulk-tool.module';
|
|
4
|
-
export * from './lib/login/login.component';
|
|
5
|
-
export * from './lib/menu/menu.component';
|
|
6
|
-
export * from './lib/materils/materils.module';
|
|
1
|
+
export * from './src/public_api';
|
|
2
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Injectable, Injector } from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { map, Observable } from 'rxjs';
|
|
4
|
+
import { BaseAppService } from './base-app.service'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Injectable({
|
|
8
|
+
providedIn: 'root'
|
|
9
|
+
})
|
|
10
|
+
export class AuthService {
|
|
11
|
+
private API_ENDPOINT: string;
|
|
12
|
+
private menuName: string;
|
|
13
|
+
//private RM_ENDPOINT = this.injector.get("config").apiBaseUrl;
|
|
14
|
+
//private headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' });
|
|
15
|
+
constructor(private http: HttpClient, public injector: Injector, private baseAppService: BaseAppService) {
|
|
16
|
+
this.API_ENDPOINT = this.injector.get("config").baseAppApiUrl;
|
|
17
|
+
this.menuName = this.injector.get("config").moduleName;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//private postheaders = new Headers({'Content-Type': 'application/json'});
|
|
21
|
+
login(username: string, password: string): Observable<any> {
|
|
22
|
+
return this.http.post<any>(this.API_ENDPOINT + "/Login", { username, password })
|
|
23
|
+
.pipe(map(user => {
|
|
24
|
+
if (user.status != "Invalid") {
|
|
25
|
+
console.log(user);
|
|
26
|
+
localStorage.clear();
|
|
27
|
+
localStorage.setItem('UserInfo', JSON.stringify(user));
|
|
28
|
+
this.baseAppService.setUserInfo(user);
|
|
29
|
+
}
|
|
30
|
+
return user;
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
logout() {
|
|
35
|
+
this.baseAppService.clearData();
|
|
36
|
+
localStorage.clear();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public GetMenu(userId): Observable<any> {
|
|
40
|
+
return this.http.get(this.API_ENDPOINT + '/userMenus?userId=' + userId + '&menu=' + this.menuName)
|
|
41
|
+
.pipe(map(res => {
|
|
42
|
+
this.baseAppService.setUserMenus(res);
|
|
43
|
+
return res;
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Injectable({
|
|
4
|
+
providedIn: 'root'
|
|
5
|
+
})
|
|
6
|
+
export class BaseAppService {
|
|
7
|
+
|
|
8
|
+
private userInfo: any;
|
|
9
|
+
private userMenus: any;
|
|
10
|
+
private menuName: any
|
|
11
|
+
getUserInfo() {
|
|
12
|
+
return this.userInfo;
|
|
13
|
+
}
|
|
14
|
+
setUserInfo(value) {
|
|
15
|
+
this.userInfo = value;
|
|
16
|
+
}
|
|
17
|
+
removeUserInfo() {
|
|
18
|
+
this.userInfo = null;
|
|
19
|
+
}
|
|
20
|
+
setUserMenus(data) {
|
|
21
|
+
this.userMenus = data;
|
|
22
|
+
}
|
|
23
|
+
getUserMenus() {
|
|
24
|
+
return this.userMenus;
|
|
25
|
+
}
|
|
26
|
+
clearData() {
|
|
27
|
+
this.userInfo = undefined;
|
|
28
|
+
this.userMenus = undefined;
|
|
29
|
+
}
|
|
30
|
+
setmenuNameFromBudget(name) {
|
|
31
|
+
this.menuName = name
|
|
32
|
+
}
|
|
33
|
+
getmenuNameFromBudget() {
|
|
34
|
+
return this.menuName
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-BulkTool',
|
|
5
|
+
template: `
|
|
6
|
+
<p>
|
|
7
|
+
bulk-tool works!
|
|
8
|
+
</p>
|
|
9
|
+
`,
|
|
10
|
+
styles: [],
|
|
11
|
+
standalone: false
|
|
12
|
+
})
|
|
13
|
+
export class BulkToolComponent implements OnInit {
|
|
14
|
+
|
|
15
|
+
constructor() { }
|
|
16
|
+
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NgModule, ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { BulkToolComponent } from './bulk-tool.component';
|
|
3
|
+
import { LoginComponent } from './login/login.component';
|
|
4
|
+
import { MaterilsModule } from './materils/materils.module';
|
|
5
|
+
import { MenuComponent } from './menu/menu.component';
|
|
6
|
+
|
|
7
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { RouterModule } from '@angular/router';
|
|
10
|
+
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
11
|
+
import { HttpLibInterceptor } from './http-interceptor';
|
|
12
|
+
import { AuthService } from './auth.service';
|
|
13
|
+
import { BaseAppService } from './base-app.service';
|
|
14
|
+
import { IEnvironmentsInfo } from '../lib/environmentsModel.info';
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@NgModule({ declarations: [BulkToolComponent, LoginComponent, MenuComponent],
|
|
19
|
+
exports: [BulkToolComponent, LoginComponent, MenuComponent], imports: [MaterilsModule,
|
|
20
|
+
FormsModule,
|
|
21
|
+
CommonModule,
|
|
22
|
+
RouterModule,
|
|
23
|
+
ReactiveFormsModule], providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpLibInterceptor, multi: true }, AuthService, BaseAppService, provideHttpClient(withInterceptorsFromDi())] })
|
|
24
|
+
export class BulkToolModule {
|
|
25
|
+
static forRoot(config: IEnvironmentsInfo): ModuleWithProviders<BulkToolModule> {
|
|
26
|
+
return {
|
|
27
|
+
ngModule: BulkToolModule,
|
|
28
|
+
providers: [{ provide: 'config', useValue: config }, BaseAppService]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// export interface IEnvironmentsInfo {
|
|
2
|
+
// baseAppApiUrl: string,
|
|
3
|
+
// rootUrl: string,
|
|
4
|
+
// moduleName: string
|
|
5
|
+
// }
|
|
6
|
+
export interface IEnvironmentsInfo {
|
|
7
|
+
production: true,
|
|
8
|
+
baseAppApiUrl: string,
|
|
9
|
+
rootUrl: string,
|
|
10
|
+
moduleName: string,
|
|
11
|
+
MenuName?: "Budget",
|
|
12
|
+
Url?: string,
|
|
13
|
+
RootUrl?: string,
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
@Injectable()
|
|
5
|
+
export class HttpLibInterceptor implements HttpInterceptor {
|
|
6
|
+
intercept(request: HttpRequest<any>, newRequest: HttpHandler): Observable<HttpEvent<any>> {
|
|
7
|
+
// add authorization header to request
|
|
8
|
+
//Get Token data from local storage
|
|
9
|
+
//let tokenInfo = JSON.parse(localStorage.getItem('TokenInfo'));
|
|
10
|
+
|
|
11
|
+
// if (tokenInfo && tokenInfo.token) {
|
|
12
|
+
// request = request.clone({
|
|
13
|
+
// setHeaders: {
|
|
14
|
+
// Authorization: `Bearer ${tokenInfo.token}`,
|
|
15
|
+
// "Content-Type": 'application/json'
|
|
16
|
+
// }
|
|
17
|
+
// });
|
|
18
|
+
// }
|
|
19
|
+
console.log(request);
|
|
20
|
+
return newRequest.handle(request);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
body{
|
|
2
|
+
background: #f4fafd;
|
|
3
|
+
}
|
|
4
|
+
.loginForm {
|
|
5
|
+
border-radius: 0px;
|
|
6
|
+
background: #fff;
|
|
7
|
+
padding: 30px;
|
|
8
|
+
width: 90%;
|
|
9
|
+
max-width: 450px;
|
|
10
|
+
padding: 15px;
|
|
11
|
+
text-align: left;
|
|
12
|
+
margin: 60px auto;
|
|
13
|
+
border: #f4f4f4 solid 1px;
|
|
14
|
+
-webkit-box-shadow: 4px 2px 5px -2px rgba(194,179,194,1);
|
|
15
|
+
-moz-box-shadow: 4px 2px 5px -2px rgba(194,179,194,1);
|
|
16
|
+
box-shadow: 4px 2px 5px -2px rgba(194,179,194,1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
::ng-deep .mat-button, .mat-flat-button, .mat-icon-button, .mat-stroked-button {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
position: relative;
|
|
22
|
+
-webkit-user-select: none;
|
|
23
|
+
-moz-user-select: none;
|
|
24
|
+
-ms-user-select: none;
|
|
25
|
+
user-select: none;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
outline: 0;
|
|
28
|
+
border: none;
|
|
29
|
+
-webkit-tap-highlight-color: transparent;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
vertical-align: top;
|
|
34
|
+
text-align: center;
|
|
35
|
+
margin: 0;
|
|
36
|
+
min-width: 64px;
|
|
37
|
+
line-height: 28px!important;
|
|
38
|
+
padding: 0 16px;
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
overflow: visible;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.nb-spinner {
|
|
44
|
+
width: 75pxx;
|
|
45
|
+
height: 75px;
|
|
46
|
+
margin: 0;
|
|
47
|
+
background: transparent;
|
|
48
|
+
border-top: 4px solid #03A9F4;
|
|
49
|
+
border-right: 4px solid transparent;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
-webkit-animation: 1s spin linear infinite;
|
|
52
|
+
animation: 1s spin linear infinite;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.loade {
|
|
56
|
+
background: rgba(255, 255, 255, 0.5);
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
|
|
61
|
+
padding-left: 67px;
|
|
62
|
+
position: absolute;
|
|
63
|
+
z-index: 1;
|
|
64
|
+
opacity: 50;
|
|
65
|
+
top:0px;
|
|
66
|
+
padding-top:135px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.square-spinner {
|
|
70
|
+
width: 55px;
|
|
71
|
+
display: block;
|
|
72
|
+
background-color: #03A9F4;
|
|
73
|
+
height: 55px;
|
|
74
|
+
-webkit-animation: 3s rotate2 ease-in-out infinite;
|
|
75
|
+
animation: 3s flip ease-in-out infinite;
|
|
76
|
+
}
|
|
77
|
+
::ng-deep .mat-spinner circle{
|
|
78
|
+
stroke:green;
|
|
79
|
+
stroke-width:10%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
mat-form-field {
|
|
83
|
+
width: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.mat-mdc-input-element {
|
|
87
|
+
font-size: 16px !important;
|
|
88
|
+
margin: 0 !important;
|
|
89
|
+
padding: 5px 0 8px !important;
|
|
90
|
+
line-height: 16px !important;
|
|
91
|
+
vertical-align: text-bottom;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Hide required field markers (asterisks) */
|
|
95
|
+
::ng-deep .mat-mdc-form-field-required-marker {
|
|
96
|
+
display: none !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
::ng-deep .mdc-floating-label--required::after {
|
|
100
|
+
content: none !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
<div class="container">
|
|
3
|
+
<div class="loginForm">
|
|
4
|
+
<div class="example-sidenav-content">
|
|
5
|
+
<div class="loginWidget">
|
|
6
|
+
<form [formGroup]="loginForm" >
|
|
7
|
+
<h2>Login</h2>
|
|
8
|
+
<div> </div>
|
|
9
|
+
<div class="form-group">
|
|
10
|
+
<!-- <label for="username">Username</label> -->
|
|
11
|
+
<!-- <input type="text" formControlName="username" class="form-control"
|
|
12
|
+
[ngClass]="{ 'is-invalid': submitted && formsData.username.errors }" /> -->
|
|
13
|
+
<mat-form-field class="example-full-width" color="primary">
|
|
14
|
+
<mat-label>Enter Username</mat-label>
|
|
15
|
+
<input class="toolbar-search bxForm" formControlName="username" type="text" matInput >
|
|
16
|
+
<!-- <mat-icon matSuffix style="font-size: 1.2em"></mat-icon> -->
|
|
17
|
+
</mat-form-field>
|
|
18
|
+
<!-- <div *ngIf="submitted && formsData.username.errors" class="invalid-feedback">
|
|
19
|
+
<div *ngIf="formsData.username.errors.required">Username is required</div>
|
|
20
|
+
</div> -->
|
|
21
|
+
</div>
|
|
22
|
+
<div class="form-group">
|
|
23
|
+
<!-- <label for="password">Password</label> -->
|
|
24
|
+
<!-- <input type="password" formControlName="password" class="form-control"
|
|
25
|
+
[ngClass]="{ 'is-invalid': submitted && formsData.password.errors }" /> -->
|
|
26
|
+
<mat-form-field class="example-full-width" color="primary">
|
|
27
|
+
<mat-label>Enter Password</mat-label>
|
|
28
|
+
<input class="toolbar-search" formControlName="password" type="password" matInput >
|
|
29
|
+
<mat-icon matSuffix style="font-size:12px"></mat-icon>
|
|
30
|
+
</mat-form-field>
|
|
31
|
+
<!-- <div *ngIf="submitted && formsData.password.errors" class="invalid-feedback">
|
|
32
|
+
<div *ngIf="formsData.password.errors.required">Password is required</div>
|
|
33
|
+
</div> -->
|
|
34
|
+
</div>
|
|
35
|
+
<div class="form-group">
|
|
36
|
+
<!-- <button [disabled]="submitClick" class="btn btn-primary">Login</button> -->
|
|
37
|
+
<button style="background-color: #0888CA; color: #fff;line-height: 21px; padding: 4px 10px !important;" mat-button class="!loginForm.valid btn btn-primary" (click)="onLogin()">Login</button>
|
|
38
|
+
</div>
|
|
39
|
+
<div *ngIf ="!isvalidUser" class="alert alert-danger">{{error}}</div>
|
|
40
|
+
</form>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<section class="loade" *ngIf="isLoading">
|
|
44
|
+
<mat-spinner color="black" [diameter]=60 ></mat-spinner>
|
|
45
|
+
<span>
|
|
46
|
+
Logging...
|
|
47
|
+
</span>
|
|
48
|
+
</section>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<!-- <button type="button" mat-button (click)="drawer.toggle()">
|
|
52
|
+
Toggle sidenav
|
|
53
|
+
</button> -->
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|