exceladdincbms-v2 5.13.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-20.mjs +638 -0
- 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/src/styles.css +44 -0
- package/esm2022/exceladdincbms-v1.mjs +0 -5
- package/esm2022/lib/auth.service.mjs +0 -61
- 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 -52
- package/esm2022/lib/constant.enum.mjs +0 -6
- package/esm2022/lib/environmentsModel.info.mjs +0 -2
- package/esm2022/lib/http-interceptor.mjs +0 -25
- package/esm2022/lib/login/login.component.mjs +0 -158
- package/esm2022/lib/materils/materils.module.mjs +0 -178
- package/esm2022/lib/menu/menu.component.mjs +0 -293
- package/esm2022/public_api.mjs +0 -10
- package/fesm2022/exceladdincbms-v1.mjs +0 -806
- package/fesm2022/exceladdincbms-v1.mjs.map +0 -1
- package/lib/auth.service.d.ts +0 -20
- 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 -5
- 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 -51
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
5
|
+
import { map } from 'rxjs';
|
|
6
|
+
import * as i3 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i2 from '@angular/router';
|
|
9
|
+
import { RouterModule } from '@angular/router';
|
|
10
|
+
import * as i1$1 from '@angular/forms';
|
|
11
|
+
import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
|
+
import { first } from 'rxjs/operators';
|
|
13
|
+
import * as i6 from '@angular/material/button';
|
|
14
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
15
|
+
import * as i7 from '@angular/material/icon';
|
|
16
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
+
import * as i8 from '@angular/material/input';
|
|
18
|
+
import { MatInputModule } from '@angular/material/input';
|
|
19
|
+
import * as i9 from '@angular/material/progress-spinner';
|
|
20
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
21
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
22
|
+
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
23
|
+
import { CdkTableModule } from '@angular/cdk/table';
|
|
24
|
+
import { CdkTreeModule } from '@angular/cdk/tree';
|
|
25
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
26
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
27
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
28
|
+
import { MatBadgeModule } from '@angular/material/badge';
|
|
29
|
+
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
|
|
30
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
31
|
+
import { MatCardModule } from '@angular/material/card';
|
|
32
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
33
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
34
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
35
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
36
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
37
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
38
|
+
import { MatGridListModule } from '@angular/material/grid-list';
|
|
39
|
+
import { MatListModule } from '@angular/material/list';
|
|
40
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
41
|
+
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
|
|
42
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
43
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
44
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
45
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
46
|
+
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
47
|
+
import { MatSliderModule } from '@angular/material/slider';
|
|
48
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
49
|
+
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
50
|
+
import { MatSortModule } from '@angular/material/sort';
|
|
51
|
+
import { MatStepperModule } from '@angular/material/stepper';
|
|
52
|
+
import { MatTableModule } from '@angular/material/table';
|
|
53
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
54
|
+
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
55
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
56
|
+
import { MatTreeModule } from '@angular/material/tree';
|
|
57
|
+
|
|
58
|
+
class BaseAppService {
|
|
59
|
+
userInfo;
|
|
60
|
+
userMenus;
|
|
61
|
+
menuName;
|
|
62
|
+
getUserInfo() {
|
|
63
|
+
return this.userInfo;
|
|
64
|
+
}
|
|
65
|
+
setUserInfo(value) {
|
|
66
|
+
this.userInfo = value;
|
|
67
|
+
}
|
|
68
|
+
removeUserInfo() {
|
|
69
|
+
this.userInfo = null;
|
|
70
|
+
}
|
|
71
|
+
setUserMenus(data) {
|
|
72
|
+
this.userMenus = data;
|
|
73
|
+
}
|
|
74
|
+
getUserMenus() {
|
|
75
|
+
return this.userMenus;
|
|
76
|
+
}
|
|
77
|
+
clearData() {
|
|
78
|
+
this.userInfo = undefined;
|
|
79
|
+
this.userMenus = undefined;
|
|
80
|
+
}
|
|
81
|
+
setmenuNameFromBudget(name) {
|
|
82
|
+
this.menuName = name;
|
|
83
|
+
}
|
|
84
|
+
getmenuNameFromBudget() {
|
|
85
|
+
return this.menuName;
|
|
86
|
+
}
|
|
87
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BaseAppService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
88
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BaseAppService, providedIn: 'root' });
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BaseAppService, decorators: [{
|
|
91
|
+
type: Injectable,
|
|
92
|
+
args: [{
|
|
93
|
+
providedIn: 'root'
|
|
94
|
+
}]
|
|
95
|
+
}] });
|
|
96
|
+
|
|
97
|
+
class AuthService {
|
|
98
|
+
http;
|
|
99
|
+
injector;
|
|
100
|
+
baseAppService;
|
|
101
|
+
API_ENDPOINT;
|
|
102
|
+
menuName;
|
|
103
|
+
//private RM_ENDPOINT = this.injector.get("config").apiBaseUrl;
|
|
104
|
+
//private headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' });
|
|
105
|
+
constructor(http, injector, baseAppService) {
|
|
106
|
+
this.http = http;
|
|
107
|
+
this.injector = injector;
|
|
108
|
+
this.baseAppService = baseAppService;
|
|
109
|
+
this.API_ENDPOINT = this.injector.get("config").baseAppApiUrl;
|
|
110
|
+
this.menuName = this.injector.get("config").moduleName;
|
|
111
|
+
}
|
|
112
|
+
//private postheaders = new Headers({'Content-Type': 'application/json'});
|
|
113
|
+
login(username, password) {
|
|
114
|
+
return this.http.post(this.API_ENDPOINT + "/Login", { username, password })
|
|
115
|
+
.pipe(map(user => {
|
|
116
|
+
if (user.status != "Invalid") {
|
|
117
|
+
console.log(user);
|
|
118
|
+
localStorage.clear();
|
|
119
|
+
localStorage.setItem('UserInfo', JSON.stringify(user));
|
|
120
|
+
this.baseAppService.setUserInfo(user);
|
|
121
|
+
}
|
|
122
|
+
return user;
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
logout() {
|
|
126
|
+
this.baseAppService.clearData();
|
|
127
|
+
localStorage.clear();
|
|
128
|
+
}
|
|
129
|
+
GetMenu(userId) {
|
|
130
|
+
return this.http.get(this.API_ENDPOINT + '/userMenus?userId=' + userId + '&menu=' + this.menuName)
|
|
131
|
+
.pipe(map(res => {
|
|
132
|
+
this.baseAppService.setUserMenus(res);
|
|
133
|
+
return res;
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i0.Injector }, { token: BaseAppService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
137
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
138
|
+
}
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: AuthService, decorators: [{
|
|
140
|
+
type: Injectable,
|
|
141
|
+
args: [{
|
|
142
|
+
providedIn: 'root'
|
|
143
|
+
}]
|
|
144
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i0.Injector }, { type: BaseAppService }] });
|
|
145
|
+
|
|
146
|
+
class BulkToolComponent {
|
|
147
|
+
constructor() { }
|
|
148
|
+
ngOnInit() {
|
|
149
|
+
}
|
|
150
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BulkToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.5", type: BulkToolComponent, isStandalone: false, selector: "lib-BulkTool", ngImport: i0, template: `
|
|
152
|
+
<p>
|
|
153
|
+
bulk-tool works!
|
|
154
|
+
</p>
|
|
155
|
+
`, isInline: true });
|
|
156
|
+
}
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BulkToolComponent, decorators: [{
|
|
158
|
+
type: Component,
|
|
159
|
+
args: [{ selector: 'lib-BulkTool', template: `
|
|
160
|
+
<p>
|
|
161
|
+
bulk-tool works!
|
|
162
|
+
</p>
|
|
163
|
+
`, standalone: false }]
|
|
164
|
+
}], ctorParameters: () => [] });
|
|
165
|
+
|
|
166
|
+
const Constant = {
|
|
167
|
+
APPSERVICEURL: 'https://localhost:44348/api',
|
|
168
|
+
APPSERVICEPRODURL: 'https://tk4addin.dev.summitenergy.com/appservices/api',
|
|
169
|
+
INVALID: "Invalid Username or Password"
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
class LoginComponent {
|
|
173
|
+
formBuilder;
|
|
174
|
+
route;
|
|
175
|
+
router;
|
|
176
|
+
location;
|
|
177
|
+
authenticationService;
|
|
178
|
+
baseAppService;
|
|
179
|
+
isLoading = false;
|
|
180
|
+
routeUrl;
|
|
181
|
+
loginForm;
|
|
182
|
+
submitted = false;
|
|
183
|
+
returnUrl;
|
|
184
|
+
error = '';
|
|
185
|
+
userInfo;
|
|
186
|
+
constructor(formBuilder, route, router, location, authenticationService, baseAppService) {
|
|
187
|
+
this.formBuilder = formBuilder;
|
|
188
|
+
this.route = route;
|
|
189
|
+
this.router = router;
|
|
190
|
+
this.location = location;
|
|
191
|
+
this.authenticationService = authenticationService;
|
|
192
|
+
this.baseAppService = baseAppService;
|
|
193
|
+
let userObject = localStorage.getItem("UserInfo");
|
|
194
|
+
this.userInfo = JSON.parse(userObject);
|
|
195
|
+
this.baseAppService.setUserInfo(this.userInfo);
|
|
196
|
+
}
|
|
197
|
+
isvalidUser = true;
|
|
198
|
+
ngOnInit() {
|
|
199
|
+
this.loginForm = this.formBuilder.group({
|
|
200
|
+
username: ['', Validators.required],
|
|
201
|
+
password: ['', Validators.required]
|
|
202
|
+
});
|
|
203
|
+
this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || this.routeUrl;
|
|
204
|
+
//Checking User already logged in or not
|
|
205
|
+
let isNavigate = localStorage.getItem("IsNavigate");
|
|
206
|
+
if (this.location.path() !== '' && this.location.path().indexOf('UserId') !== -1) {
|
|
207
|
+
let userId = this.location.path().split('?')[1].split('UserId=')[1];
|
|
208
|
+
if (userId == this.userInfo.userInfoId) {
|
|
209
|
+
this.router.navigate([this.returnUrl]);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else if (JSON.parse(isNavigate) == true) {
|
|
214
|
+
if (this.userInfo) {
|
|
215
|
+
console.log("Login After naviagtion-", this.returnUrl);
|
|
216
|
+
localStorage.removeItem("IsNavigate");
|
|
217
|
+
this.router.navigate([this.returnUrl]);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
get formsData() { return this.loginForm.controls; }
|
|
223
|
+
onLogin() {
|
|
224
|
+
this.submitted = true;
|
|
225
|
+
this.isLoading = true;
|
|
226
|
+
// stop here if form is invalid
|
|
227
|
+
if (this.loginForm.invalid) {
|
|
228
|
+
this.isLoading = false;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
//this.submitClick = true;
|
|
232
|
+
this.authenticationService.login(this.formsData.username.value, this.formsData.password.value)
|
|
233
|
+
.pipe(first())
|
|
234
|
+
.subscribe(data => {
|
|
235
|
+
console.log(data.status);
|
|
236
|
+
if (data.status === "InValid") {
|
|
237
|
+
this.isLoading = false;
|
|
238
|
+
this.isvalidUser = false;
|
|
239
|
+
this.error = Constant.INVALID;
|
|
240
|
+
this.router.navigate(["/login"]);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
console.log("Login Success-", this.returnUrl);
|
|
244
|
+
this.isLoading = false;
|
|
245
|
+
this.router.navigate([this.returnUrl]);
|
|
246
|
+
}
|
|
247
|
+
}, error => {
|
|
248
|
+
this.isLoading = false;
|
|
249
|
+
this.error = Constant.INVALID;
|
|
250
|
+
this.router.navigate(["/login"]);
|
|
251
|
+
//this.submitClick = true;
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: LoginComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i3.Location }, { token: AuthService }, { token: BaseAppService }], target: i0.ɵɵFactoryTarget.Component });
|
|
255
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.5", type: LoginComponent, isStandalone: false, selector: "lib-login", inputs: { routeUrl: "routeUrl" }, ngImport: i0, template: "\r\n<div class=\"container\">\r\n <div class=\"loginForm\">\r\n <div class=\"example-sidenav-content\">\r\n <div class=\"loginWidget\">\r\n <form [formGroup]=\"loginForm\" >\r\n <h2>Login</h2>\r\n <div> </div>\r\n <div class=\"form-group\">\r\n <!-- <label for=\"username\">Username</label> -->\r\n <!-- <input type=\"text\" formControlName=\"username\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': submitted && formsData.username.errors }\" /> -->\r\n <mat-form-field class=\"example-full-width\" color=\"primary\">\r\n <mat-label>Enter Username</mat-label>\r\n <input class=\"toolbar-search bxForm\" formControlName=\"username\" type=\"text\" matInput >\r\n <!-- <mat-icon matSuffix style=\"font-size: 1.2em\"></mat-icon> -->\r\n </mat-form-field>\r\n <!-- <div *ngIf=\"submitted && formsData.username.errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"formsData.username.errors.required\">Username is required</div>\r\n </div> -->\r\n </div>\r\n <div class=\"form-group\">\r\n <!-- <label for=\"password\">Password</label> -->\r\n <!-- <input type=\"password\" formControlName=\"password\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': submitted && formsData.password.errors }\" /> -->\r\n <mat-form-field class=\"example-full-width\" color=\"primary\">\r\n <mat-label>Enter Password</mat-label>\r\n <input class=\"toolbar-search\" formControlName=\"password\" type=\"password\" matInput >\r\n <mat-icon matSuffix style=\"font-size:12px\"></mat-icon>\r\n </mat-form-field>\r\n <!-- <div *ngIf=\"submitted && formsData.password.errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"formsData.password.errors.required\">Password is required</div>\r\n </div> -->\r\n </div>\r\n <div class=\"form-group\">\r\n <!-- <button [disabled]=\"submitClick\" class=\"btn btn-primary\">Login</button> -->\r\n <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>\r\n </div>\r\n <div *ngIf =\"!isvalidUser\" class=\"alert alert-danger\">{{error}}</div>\r\n </form>\r\n </div>\r\n\r\n <section class=\"loade\" *ngIf=\"isLoading\">\r\n <mat-spinner color=\"black\" [diameter]=60 ></mat-spinner>\r\n <span>\r\n Logging...\r\n </span>\r\n </section>\r\n\r\n \r\n <!-- <button type=\"button\" mat-button (click)=\"drawer.toggle()\">\r\n Toggle sidenav\r\n</button> -->\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n", styles: ["body{background:#f4fafd}.loginForm{border-radius:0;background:#fff;width:90%;max-width:450px;padding:15px;text-align:left;margin:60px auto;border:#f4f4f4 solid 1px;-webkit-box-shadow:4px 2px 5px -2px rgba(194,179,194,1);-moz-box-shadow:4px 2px 5px -2px rgba(194,179,194,1);box-shadow:4px 2px 5px -2px #c2b3c2}::ng-deep .mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:top;text-align:center;margin:0;min-width:64px;line-height:28px!important;padding:0 16px;border-radius:4px;overflow:visible}.nb-spinner{width:75pxx;height:75px;margin:0;background:transparent;border-top:4px solid #03A9F4;border-right:4px solid transparent;border-radius:50%;-webkit-animation:1s spin linear infinite;animation:1s spin linear infinite}.loade{background:#ffffff80;width:100%;height:100%;overflow:hidden;padding-left:67px;position:absolute;z-index:1;opacity:50;top:0;padding-top:135px}.square-spinner{width:55px;display:block;background-color:#03a9f4;height:55px;-webkit-animation:3s rotate2 ease-in-out infinite;animation:3s flip ease-in-out infinite}::ng-deep .mat-spinner circle{stroke:green;stroke-width:10%}mat-form-field{width:100%}.mat-mdc-input-element{font-size:16px!important;margin:0!important;padding:5px 0 8px!important;line-height:16px!important;vertical-align:text-bottom}::ng-deep .mat-mdc-form-field-required-marker{display:none!important}::ng-deep .mdc-floating-label--required:after{content:none!important}\n"], dependencies: [{ kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
256
|
+
}
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: LoginComponent, decorators: [{
|
|
258
|
+
type: Component,
|
|
259
|
+
args: [{ selector: 'lib-login', standalone: false, template: "\r\n<div class=\"container\">\r\n <div class=\"loginForm\">\r\n <div class=\"example-sidenav-content\">\r\n <div class=\"loginWidget\">\r\n <form [formGroup]=\"loginForm\" >\r\n <h2>Login</h2>\r\n <div> </div>\r\n <div class=\"form-group\">\r\n <!-- <label for=\"username\">Username</label> -->\r\n <!-- <input type=\"text\" formControlName=\"username\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': submitted && formsData.username.errors }\" /> -->\r\n <mat-form-field class=\"example-full-width\" color=\"primary\">\r\n <mat-label>Enter Username</mat-label>\r\n <input class=\"toolbar-search bxForm\" formControlName=\"username\" type=\"text\" matInput >\r\n <!-- <mat-icon matSuffix style=\"font-size: 1.2em\"></mat-icon> -->\r\n </mat-form-field>\r\n <!-- <div *ngIf=\"submitted && formsData.username.errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"formsData.username.errors.required\">Username is required</div>\r\n </div> -->\r\n </div>\r\n <div class=\"form-group\">\r\n <!-- <label for=\"password\">Password</label> -->\r\n <!-- <input type=\"password\" formControlName=\"password\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': submitted && formsData.password.errors }\" /> -->\r\n <mat-form-field class=\"example-full-width\" color=\"primary\">\r\n <mat-label>Enter Password</mat-label>\r\n <input class=\"toolbar-search\" formControlName=\"password\" type=\"password\" matInput >\r\n <mat-icon matSuffix style=\"font-size:12px\"></mat-icon>\r\n </mat-form-field>\r\n <!-- <div *ngIf=\"submitted && formsData.password.errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"formsData.password.errors.required\">Password is required</div>\r\n </div> -->\r\n </div>\r\n <div class=\"form-group\">\r\n <!-- <button [disabled]=\"submitClick\" class=\"btn btn-primary\">Login</button> -->\r\n <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>\r\n </div>\r\n <div *ngIf =\"!isvalidUser\" class=\"alert alert-danger\">{{error}}</div>\r\n </form>\r\n </div>\r\n\r\n <section class=\"loade\" *ngIf=\"isLoading\">\r\n <mat-spinner color=\"black\" [diameter]=60 ></mat-spinner>\r\n <span>\r\n Logging...\r\n </span>\r\n </section>\r\n\r\n \r\n <!-- <button type=\"button\" mat-button (click)=\"drawer.toggle()\">\r\n Toggle sidenav\r\n</button> -->\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n", styles: ["body{background:#f4fafd}.loginForm{border-radius:0;background:#fff;width:90%;max-width:450px;padding:15px;text-align:left;margin:60px auto;border:#f4f4f4 solid 1px;-webkit-box-shadow:4px 2px 5px -2px rgba(194,179,194,1);-moz-box-shadow:4px 2px 5px -2px rgba(194,179,194,1);box-shadow:4px 2px 5px -2px #c2b3c2}::ng-deep .mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:top;text-align:center;margin:0;min-width:64px;line-height:28px!important;padding:0 16px;border-radius:4px;overflow:visible}.nb-spinner{width:75pxx;height:75px;margin:0;background:transparent;border-top:4px solid #03A9F4;border-right:4px solid transparent;border-radius:50%;-webkit-animation:1s spin linear infinite;animation:1s spin linear infinite}.loade{background:#ffffff80;width:100%;height:100%;overflow:hidden;padding-left:67px;position:absolute;z-index:1;opacity:50;top:0;padding-top:135px}.square-spinner{width:55px;display:block;background-color:#03a9f4;height:55px;-webkit-animation:3s rotate2 ease-in-out infinite;animation:3s flip ease-in-out infinite}::ng-deep .mat-spinner circle{stroke:green;stroke-width:10%}mat-form-field{width:100%}.mat-mdc-input-element{font-size:16px!important;margin:0!important;padding:5px 0 8px!important;line-height:16px!important;vertical-align:text-bottom}::ng-deep .mat-mdc-form-field-required-marker{display:none!important}::ng-deep .mdc-floating-label--required:after{content:none!important}\n"] }]
|
|
260
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i3.Location }, { type: AuthService }, { type: BaseAppService }], propDecorators: { routeUrl: [{
|
|
261
|
+
type: Input
|
|
262
|
+
}] } });
|
|
263
|
+
|
|
264
|
+
class MaterilsModule {
|
|
265
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: MaterilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
266
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: MaterilsModule, exports: [A11yModule,
|
|
267
|
+
CdkTableModule,
|
|
268
|
+
CdkTreeModule,
|
|
269
|
+
DragDropModule,
|
|
270
|
+
MatAutocompleteModule,
|
|
271
|
+
MatBadgeModule,
|
|
272
|
+
MatBottomSheetModule,
|
|
273
|
+
MatButtonModule,
|
|
274
|
+
MatButtonToggleModule,
|
|
275
|
+
MatCardModule,
|
|
276
|
+
MatCheckboxModule,
|
|
277
|
+
MatChipsModule,
|
|
278
|
+
MatStepperModule,
|
|
279
|
+
MatDatepickerModule,
|
|
280
|
+
MatDialogModule,
|
|
281
|
+
MatDividerModule,
|
|
282
|
+
MatExpansionModule,
|
|
283
|
+
MatGridListModule,
|
|
284
|
+
MatIconModule,
|
|
285
|
+
MatInputModule,
|
|
286
|
+
MatListModule,
|
|
287
|
+
MatMenuModule,
|
|
288
|
+
MatNativeDateModule,
|
|
289
|
+
MatPaginatorModule,
|
|
290
|
+
MatProgressBarModule,
|
|
291
|
+
MatProgressSpinnerModule,
|
|
292
|
+
MatRadioModule,
|
|
293
|
+
MatRippleModule,
|
|
294
|
+
MatSelectModule,
|
|
295
|
+
MatSidenavModule,
|
|
296
|
+
MatSliderModule,
|
|
297
|
+
MatSlideToggleModule,
|
|
298
|
+
MatSnackBarModule,
|
|
299
|
+
MatSortModule,
|
|
300
|
+
MatTableModule,
|
|
301
|
+
MatTabsModule,
|
|
302
|
+
MatToolbarModule,
|
|
303
|
+
MatTooltipModule,
|
|
304
|
+
MatTreeModule,
|
|
305
|
+
ScrollingModule,
|
|
306
|
+
OverlayModule] });
|
|
307
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: MaterilsModule, imports: [A11yModule,
|
|
308
|
+
CdkTableModule,
|
|
309
|
+
CdkTreeModule,
|
|
310
|
+
DragDropModule,
|
|
311
|
+
MatAutocompleteModule,
|
|
312
|
+
MatBadgeModule,
|
|
313
|
+
MatBottomSheetModule,
|
|
314
|
+
MatButtonModule,
|
|
315
|
+
MatButtonToggleModule,
|
|
316
|
+
MatCardModule,
|
|
317
|
+
MatCheckboxModule,
|
|
318
|
+
MatChipsModule,
|
|
319
|
+
MatStepperModule,
|
|
320
|
+
MatDatepickerModule,
|
|
321
|
+
MatDialogModule,
|
|
322
|
+
MatDividerModule,
|
|
323
|
+
MatExpansionModule,
|
|
324
|
+
MatGridListModule,
|
|
325
|
+
MatIconModule,
|
|
326
|
+
MatInputModule,
|
|
327
|
+
MatListModule,
|
|
328
|
+
MatMenuModule,
|
|
329
|
+
MatNativeDateModule,
|
|
330
|
+
MatPaginatorModule,
|
|
331
|
+
MatProgressBarModule,
|
|
332
|
+
MatProgressSpinnerModule,
|
|
333
|
+
MatRadioModule,
|
|
334
|
+
MatRippleModule,
|
|
335
|
+
MatSelectModule,
|
|
336
|
+
MatSidenavModule,
|
|
337
|
+
MatSliderModule,
|
|
338
|
+
MatSlideToggleModule,
|
|
339
|
+
MatSnackBarModule,
|
|
340
|
+
MatSortModule,
|
|
341
|
+
MatTableModule,
|
|
342
|
+
MatTabsModule,
|
|
343
|
+
MatToolbarModule,
|
|
344
|
+
MatTooltipModule,
|
|
345
|
+
MatTreeModule,
|
|
346
|
+
ScrollingModule,
|
|
347
|
+
OverlayModule] });
|
|
348
|
+
}
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: MaterilsModule, decorators: [{
|
|
350
|
+
type: NgModule,
|
|
351
|
+
args: [{
|
|
352
|
+
exports: [
|
|
353
|
+
A11yModule,
|
|
354
|
+
CdkTableModule,
|
|
355
|
+
CdkTreeModule,
|
|
356
|
+
DragDropModule,
|
|
357
|
+
MatAutocompleteModule,
|
|
358
|
+
MatBadgeModule,
|
|
359
|
+
MatBottomSheetModule,
|
|
360
|
+
MatButtonModule,
|
|
361
|
+
MatButtonToggleModule,
|
|
362
|
+
MatCardModule,
|
|
363
|
+
MatCheckboxModule,
|
|
364
|
+
MatChipsModule,
|
|
365
|
+
MatStepperModule,
|
|
366
|
+
MatDatepickerModule,
|
|
367
|
+
MatDialogModule,
|
|
368
|
+
MatDividerModule,
|
|
369
|
+
MatExpansionModule,
|
|
370
|
+
MatGridListModule,
|
|
371
|
+
MatIconModule,
|
|
372
|
+
MatInputModule,
|
|
373
|
+
MatListModule,
|
|
374
|
+
MatMenuModule,
|
|
375
|
+
MatNativeDateModule,
|
|
376
|
+
MatPaginatorModule,
|
|
377
|
+
MatProgressBarModule,
|
|
378
|
+
MatProgressSpinnerModule,
|
|
379
|
+
MatRadioModule,
|
|
380
|
+
MatRippleModule,
|
|
381
|
+
MatSelectModule,
|
|
382
|
+
MatSidenavModule,
|
|
383
|
+
MatSliderModule,
|
|
384
|
+
MatSlideToggleModule,
|
|
385
|
+
MatSnackBarModule,
|
|
386
|
+
MatSortModule,
|
|
387
|
+
MatTableModule,
|
|
388
|
+
MatTabsModule,
|
|
389
|
+
MatToolbarModule,
|
|
390
|
+
MatTooltipModule,
|
|
391
|
+
MatTreeModule,
|
|
392
|
+
ScrollingModule,
|
|
393
|
+
OverlayModule
|
|
394
|
+
]
|
|
395
|
+
}]
|
|
396
|
+
}] });
|
|
397
|
+
|
|
398
|
+
class MenuComponent {
|
|
399
|
+
authenticationService;
|
|
400
|
+
route;
|
|
401
|
+
router;
|
|
402
|
+
injector;
|
|
403
|
+
baseAppService;
|
|
404
|
+
async;
|
|
405
|
+
MenuMode = "over";
|
|
406
|
+
message = '';
|
|
407
|
+
tooltext = "CBMS";
|
|
408
|
+
menuName;
|
|
409
|
+
childMenu;
|
|
410
|
+
isLoading = false;
|
|
411
|
+
userInfo;
|
|
412
|
+
moduleNameFromExcel;
|
|
413
|
+
IsPermissionExists = true;
|
|
414
|
+
messages = [];
|
|
415
|
+
MenuData;
|
|
416
|
+
RootUrl;
|
|
417
|
+
menuFromExcel;
|
|
418
|
+
navigateMsg;
|
|
419
|
+
result;
|
|
420
|
+
constructor(authenticationService, route, router, injector, baseAppService) {
|
|
421
|
+
this.authenticationService = authenticationService;
|
|
422
|
+
this.route = route;
|
|
423
|
+
this.router = router;
|
|
424
|
+
this.injector = injector;
|
|
425
|
+
this.baseAppService = baseAppService;
|
|
426
|
+
this.RootUrl = this.injector.get("config").rootUrl; //getting from environment file from application accessing BaseApp
|
|
427
|
+
this.menuName = this.injector.get("config").moduleName; //getting from environment file from application accessing BaseApp
|
|
428
|
+
this.userInfo = this.baseAppService.getUserInfo();
|
|
429
|
+
this.childMenu = localStorage.getItem("childMenu");
|
|
430
|
+
if (!this.userInfo) { //incase getUserInfo service fails.
|
|
431
|
+
let userDetails = localStorage.getItem("UserInfo");
|
|
432
|
+
this.userInfo = JSON.parse(userDetails);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
ngOnInit() {
|
|
436
|
+
console.log("Url came base from application -", window.location.href);
|
|
437
|
+
this.isLoading = true;
|
|
438
|
+
this.GetCBMSMenu();
|
|
439
|
+
}
|
|
440
|
+
GetCBMSMenu() {
|
|
441
|
+
if (this.userInfo) {
|
|
442
|
+
this.authenticationService.GetMenu(this.userInfo.userInfoId).subscribe(data => {
|
|
443
|
+
this.MenuData = data;
|
|
444
|
+
this.isLoading = false;
|
|
445
|
+
if (this.MenuData) {
|
|
446
|
+
this.menuFromExcel = this.baseAppService.getmenuNameFromBudget();
|
|
447
|
+
console.log("MenuFromExcel", this.menuFromExcel);
|
|
448
|
+
if (!this.menuFromExcel) {
|
|
449
|
+
let CurrentMenu = data.find(e => e.parentMenuName == this.menuName); //Finding Which application Accessing BaseApp
|
|
450
|
+
this.tooltext = CurrentMenu ? CurrentMenu.parentMenuName : "CBMS";
|
|
451
|
+
console.log("Isdownload", this.userInfo.isDownload);
|
|
452
|
+
if (!this.userInfo.isDownload) {
|
|
453
|
+
if (CurrentMenu) {
|
|
454
|
+
if (CurrentMenu.children.length == 0) {
|
|
455
|
+
this.router.navigate([CurrentMenu.targetAction.split("app")[1]]);
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
if (this.childMenu) {
|
|
459
|
+
this.navigateToChildMenu(CurrentMenu);
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
this.router.navigate([CurrentMenu.children[0].targetAction.split("app")[1]]);
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
console.log("Redirecting to the First application in menu Tab");
|
|
469
|
+
this.navigateToAnotherMenu(this.MenuData[0]); // Redirecting to the First application in menu Tab
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
let menu = this.MenuData.find(e => e.displaytext == this.menuFromExcel);
|
|
475
|
+
if (menu) {
|
|
476
|
+
if (!this.childMenu) {
|
|
477
|
+
console.log("noChildMenu");
|
|
478
|
+
this.navigateToAnotherMenu(this.MenuData.find(e => e.displaytext == this.menuFromExcel));
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
console.log("childMenuThere");
|
|
482
|
+
this.navigateToChildMenu(this.MenuData.find(e => e.parentMenuName == this.menuName));
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
else {
|
|
486
|
+
this.navigateToAnotherMenu(this.MenuData[0]);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
this.IsPermissionExists = false; //Notifing User that he or she doednot have permission if menuData is empty.
|
|
492
|
+
}
|
|
493
|
+
this.isLoading = false;
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
navigateToChildMenu(CurrentMenu) {
|
|
498
|
+
localStorage.removeItem("childMenu");
|
|
499
|
+
let childrenMenu = CurrentMenu.children.filter(e => e.displaytext == this.childMenu);
|
|
500
|
+
console.log("childrenMenu", childrenMenu);
|
|
501
|
+
if (childrenMenu.length > 0) {
|
|
502
|
+
this.router.navigate([childrenMenu[0].targetAction.split("app")[1]]);
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
this.router.navigate([CurrentMenu.targetAction.split("app")[1]]);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
listItemClick(link) {
|
|
510
|
+
this.isLoading = true;
|
|
511
|
+
if (link.parentMenuName == this.menuName) {
|
|
512
|
+
if (link.parentMenuId == 0) {
|
|
513
|
+
if (link.children.length > 0) {
|
|
514
|
+
console.log("navigationUrl", link.children[0].targetAction);
|
|
515
|
+
this.isLoading = false;
|
|
516
|
+
this.router.navigate([link.children[0].targetAction.split("app")[1]]);
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
console.log("navigationUrl", link.targetAction);
|
|
520
|
+
this.isLoading = false;
|
|
521
|
+
this.router.navigate([link.targetAction.split("app")[1]]);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
localStorage.setItem("childMenu", link.displaytext);
|
|
526
|
+
console.log("navigationUrl", link.targetAction);
|
|
527
|
+
this.isLoading = false;
|
|
528
|
+
this.router.navigate([link.targetAction.split("app")[1]]);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
this.isLoading = false;
|
|
533
|
+
this.navigateToAnotherMenu(link);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
navigateToAnotherMenu(link) {
|
|
537
|
+
this.navigateMsg = "...Redirecting to " + link.parentMenuName;
|
|
538
|
+
let navLink = link.targetAction;
|
|
539
|
+
navLink = link.targetAction.split("app")[0] + "app";
|
|
540
|
+
if (link.parentMenuId != 0) {
|
|
541
|
+
localStorage.setItem("childMenu", link.displaytext);
|
|
542
|
+
}
|
|
543
|
+
this.isLoading = false;
|
|
544
|
+
localStorage.setItem("IsNavigate", "true");
|
|
545
|
+
let navigateUrl = this.navigateUrl(navLink);
|
|
546
|
+
console.log("navigating to", link.displaytext);
|
|
547
|
+
window.location.assign(navigateUrl);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
navigateUrl(Url) {
|
|
551
|
+
let replacements = Url.match(/\{.*?\}/g);
|
|
552
|
+
let value = "";
|
|
553
|
+
if (replacements) {
|
|
554
|
+
replacements.forEach(element => {
|
|
555
|
+
if (element == "{userId}") {
|
|
556
|
+
value = this.userInfo.userInfoId;
|
|
557
|
+
}
|
|
558
|
+
Url = Url.replace(element, value);
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
return this.RootUrl + Url;
|
|
562
|
+
}
|
|
563
|
+
onLogOut() {
|
|
564
|
+
this.authenticationService.logout();
|
|
565
|
+
this.router.navigate(["/login"]);
|
|
566
|
+
}
|
|
567
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: MenuComponent, deps: [{ token: AuthService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i0.Injector }, { token: BaseAppService }], target: i0.ɵɵFactoryTarget.Component });
|
|
568
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.5", type: MenuComponent, isStandalone: false, selector: "lib-menu", ngImport: i0, template: "\r\n<div class=\"example-container\">\r\n\r\n <nav class=\"nav-header\">\r\n <ul class=\"nav\"> \r\n <li class=\"nav-time\"> \r\n <a>\r\n <i class=\"fa fa-bars\" style=\"font-size:24px\"></i>\r\n </a>\r\n <ul>\r\n <div *ngFor=\"let parent of MenuData\">\r\n <li *ngIf=\"parent.children && parent.children.length > 0\">\r\n <a class=\"item\"> {{parent.displaytext}}</a>\r\n <ul>\r\n <li *ngFor=\"let child of parent.children\">\r\n <a (click)=\"listItemClick(child)\">{{child.displaytext}}</a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li *ngIf=\"!parent.children || parent.children.length === 0\">\r\n <a (click)=\"listItemClick(parent)\">{{parent.displaytext}}</a>\r\n </li>\r\n </div>\r\n <li> \r\n <a (click)=\"onLogOut()\">Logout</a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"nav-item\">\r\n <h5 style=\"padding-top:12px;\"> {{tooltext}}</h5>\r\n </li>\r\n </ul>\r\n </nav>\r\n <div *ngIf=\"IsPermissionExists==false\">User Does't have permission to access any of Excel applications</div>\r\n <router-outlet></router-outlet>\r\n </div>\r\n <div class=\"navigateMsg\" *ngIf=\"navigateMsg\">\r\n {{navigateMsg}}\r\n </div>\r\n <section class=\"loade\" *ngIf=\"isLoading\">\r\n <mat-spinner color=\"black\" [diameter]=60 ></mat-spinner>\r\n <span>\r\n Loading...\r\n </span>\r\n </section>\r\n ", styles: [".item{cursor:not-allowed!important}nav{display:block;text-align:left}nav ul{margin:0;padding:0;list-style:none}.nav a{display:block;cursor:pointer;color:#000;text-decoration:none;padding:.8em 1.8em;text-transform:none;font-size:80%;letter-spacing:1px;position:relative;font-family:Roboto,Helvetica Neue,sans-serif!important}.nav{vertical-align:top;display:inline-block;border-radius:6px}.nav li{position:relative}.item:before{content:\"\";position:absolute;height:0;width:0;top:50%;right:5px;border:5px solid transparent;border-left-color:#000}.nav>li{float:left;margin-right:1px}.nav>li>a{margin-bottom:1px;color:#fff;cursor:pointer}.nav li:hover>a{background:#0000000a}.nav>li:first-child{border-radius:4px 0 0 4px}.nav>li:first-child>a{border-radius:4px 0 0}.nav>li:last-child{border-radius:0 0 4px;margin-right:0}.nav>li:last-child>a{border-radius:0 4px 0 0}.nav li li a{margin-top:1px}.nav li a:first-child:nth-last-child(2):before{content:\"\";position:absolute;height:0;width:0;top:50%;right:5px}.nav ul{position:absolute;white-space:nowrap;background-color:#fff;z-index:11111;left:-99999em}.nav>li:hover>ul{left:auto;padding-top:5px;min-width:100%;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.nav>li li ul{border-left:1px solid #fff}.nav>li li:hover>ul{left:100%;top:-1px;z-index:1;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.nav>li>a:first-child:nth-last-child(2):before{border-top-color:#aaa}.nav>li:hover>a:first-child:nth-last-child(2):before{border:5px solid transparent;margin-top:-5px}.nav li li>a:first-child:nth-last-child(2):before{border-left-color:#aaa;margin-top:-5px}.nav li li:hover>a:first-child:nth-last-child(2):before{border:5px solid transparent;border-right-color:#2f2c2c;right:10px}.nav-header{background:#779cf1;width:100%}.nav-header>.nav>.nav-item{color:#fff}.nav-header>.nav>.nav-item a{color:#fff}.loade{background:#ffffff80;width:100%;height:100%;overflow:hidden;position:absolute;z-index:1;opacity:50;top:0;vertical-align:middle;padding:40%}.permission{padding:10px;color:red}.navigateMsg{text-align:center;margin-top:60px}\n"], dependencies: [{ kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
569
|
+
}
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: MenuComponent, decorators: [{
|
|
571
|
+
type: Component,
|
|
572
|
+
args: [{ selector: 'lib-menu', standalone: false, template: "\r\n<div class=\"example-container\">\r\n\r\n <nav class=\"nav-header\">\r\n <ul class=\"nav\"> \r\n <li class=\"nav-time\"> \r\n <a>\r\n <i class=\"fa fa-bars\" style=\"font-size:24px\"></i>\r\n </a>\r\n <ul>\r\n <div *ngFor=\"let parent of MenuData\">\r\n <li *ngIf=\"parent.children && parent.children.length > 0\">\r\n <a class=\"item\"> {{parent.displaytext}}</a>\r\n <ul>\r\n <li *ngFor=\"let child of parent.children\">\r\n <a (click)=\"listItemClick(child)\">{{child.displaytext}}</a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li *ngIf=\"!parent.children || parent.children.length === 0\">\r\n <a (click)=\"listItemClick(parent)\">{{parent.displaytext}}</a>\r\n </li>\r\n </div>\r\n <li> \r\n <a (click)=\"onLogOut()\">Logout</a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"nav-item\">\r\n <h5 style=\"padding-top:12px;\"> {{tooltext}}</h5>\r\n </li>\r\n </ul>\r\n </nav>\r\n <div *ngIf=\"IsPermissionExists==false\">User Does't have permission to access any of Excel applications</div>\r\n <router-outlet></router-outlet>\r\n </div>\r\n <div class=\"navigateMsg\" *ngIf=\"navigateMsg\">\r\n {{navigateMsg}}\r\n </div>\r\n <section class=\"loade\" *ngIf=\"isLoading\">\r\n <mat-spinner color=\"black\" [diameter]=60 ></mat-spinner>\r\n <span>\r\n Loading...\r\n </span>\r\n </section>\r\n ", styles: [".item{cursor:not-allowed!important}nav{display:block;text-align:left}nav ul{margin:0;padding:0;list-style:none}.nav a{display:block;cursor:pointer;color:#000;text-decoration:none;padding:.8em 1.8em;text-transform:none;font-size:80%;letter-spacing:1px;position:relative;font-family:Roboto,Helvetica Neue,sans-serif!important}.nav{vertical-align:top;display:inline-block;border-radius:6px}.nav li{position:relative}.item:before{content:\"\";position:absolute;height:0;width:0;top:50%;right:5px;border:5px solid transparent;border-left-color:#000}.nav>li{float:left;margin-right:1px}.nav>li>a{margin-bottom:1px;color:#fff;cursor:pointer}.nav li:hover>a{background:#0000000a}.nav>li:first-child{border-radius:4px 0 0 4px}.nav>li:first-child>a{border-radius:4px 0 0}.nav>li:last-child{border-radius:0 0 4px;margin-right:0}.nav>li:last-child>a{border-radius:0 4px 0 0}.nav li li a{margin-top:1px}.nav li a:first-child:nth-last-child(2):before{content:\"\";position:absolute;height:0;width:0;top:50%;right:5px}.nav ul{position:absolute;white-space:nowrap;background-color:#fff;z-index:11111;left:-99999em}.nav>li:hover>ul{left:auto;padding-top:5px;min-width:100%;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.nav>li li ul{border-left:1px solid #fff}.nav>li li:hover>ul{left:100%;top:-1px;z-index:1;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.nav>li>a:first-child:nth-last-child(2):before{border-top-color:#aaa}.nav>li:hover>a:first-child:nth-last-child(2):before{border:5px solid transparent;margin-top:-5px}.nav li li>a:first-child:nth-last-child(2):before{border-left-color:#aaa;margin-top:-5px}.nav li li:hover>a:first-child:nth-last-child(2):before{border:5px solid transparent;border-right-color:#2f2c2c;right:10px}.nav-header{background:#779cf1;width:100%}.nav-header>.nav>.nav-item{color:#fff}.nav-header>.nav>.nav-item a{color:#fff}.loade{background:#ffffff80;width:100%;height:100%;overflow:hidden;position:absolute;z-index:1;opacity:50;top:0;vertical-align:middle;padding:40%}.permission{padding:10px;color:red}.navigateMsg{text-align:center;margin-top:60px}\n"] }]
|
|
573
|
+
}], ctorParameters: () => [{ type: AuthService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i0.Injector }, { type: BaseAppService }] });
|
|
574
|
+
|
|
575
|
+
class HttpLibInterceptor {
|
|
576
|
+
intercept(request, newRequest) {
|
|
577
|
+
// add authorization header to request
|
|
578
|
+
//Get Token data from local storage
|
|
579
|
+
//let tokenInfo = JSON.parse(localStorage.getItem('TokenInfo'));
|
|
580
|
+
// if (tokenInfo && tokenInfo.token) {
|
|
581
|
+
// request = request.clone({
|
|
582
|
+
// setHeaders: {
|
|
583
|
+
// Authorization: `Bearer ${tokenInfo.token}`,
|
|
584
|
+
// "Content-Type": 'application/json'
|
|
585
|
+
// }
|
|
586
|
+
// });
|
|
587
|
+
// }
|
|
588
|
+
console.log(request);
|
|
589
|
+
return newRequest.handle(request);
|
|
590
|
+
}
|
|
591
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: HttpLibInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
592
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: HttpLibInterceptor });
|
|
593
|
+
}
|
|
594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: HttpLibInterceptor, decorators: [{
|
|
595
|
+
type: Injectable
|
|
596
|
+
}] });
|
|
597
|
+
|
|
598
|
+
class BulkToolModule {
|
|
599
|
+
static forRoot(config) {
|
|
600
|
+
return {
|
|
601
|
+
ngModule: BulkToolModule,
|
|
602
|
+
providers: [{ provide: 'config', useValue: config }, BaseAppService]
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BulkToolModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
606
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: BulkToolModule, declarations: [BulkToolComponent, LoginComponent, MenuComponent], imports: [MaterilsModule,
|
|
607
|
+
FormsModule,
|
|
608
|
+
CommonModule,
|
|
609
|
+
RouterModule,
|
|
610
|
+
ReactiveFormsModule], exports: [BulkToolComponent, LoginComponent, MenuComponent] });
|
|
611
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BulkToolModule, providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpLibInterceptor, multi: true }, AuthService, BaseAppService, provideHttpClient(withInterceptorsFromDi())], imports: [MaterilsModule,
|
|
612
|
+
FormsModule,
|
|
613
|
+
CommonModule,
|
|
614
|
+
RouterModule,
|
|
615
|
+
ReactiveFormsModule] });
|
|
616
|
+
}
|
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: BulkToolModule, decorators: [{
|
|
618
|
+
type: NgModule,
|
|
619
|
+
args: [{ declarations: [BulkToolComponent, LoginComponent, MenuComponent],
|
|
620
|
+
exports: [BulkToolComponent, LoginComponent, MenuComponent], imports: [MaterilsModule,
|
|
621
|
+
FormsModule,
|
|
622
|
+
CommonModule,
|
|
623
|
+
RouterModule,
|
|
624
|
+
ReactiveFormsModule], providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpLibInterceptor, multi: true }, AuthService, BaseAppService, provideHttpClient(withInterceptorsFromDi())] }]
|
|
625
|
+
}] });
|
|
626
|
+
|
|
627
|
+
;
|
|
628
|
+
|
|
629
|
+
/*
|
|
630
|
+
* Public API Surface of bulk-tool
|
|
631
|
+
*/
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Generated bundle index. Do not edit.
|
|
635
|
+
*/
|
|
636
|
+
|
|
637
|
+
export { AuthService, BaseAppService, BulkToolComponent, BulkToolModule, Constant, HttpLibInterceptor, LoginComponent, MaterilsModule, MenuComponent };
|
|
638
|
+
//# sourceMappingURL=exceladdincbms-20.mjs.map
|