bulk-tool-menu-library 0.2.1 → 20.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.
- package/esm2022/bulk-tool-20.mjs +5 -0
- package/esm2022/lib/auth.service.mjs +50 -0
- package/esm2022/lib/bulk-tool.component.mjs +22 -0
- package/esm2022/lib/bulk-tool.module.mjs +50 -0
- package/esm2022/lib/bulk-tool.service.mjs +14 -0
- package/esm2022/lib/constant.enum.mjs +6 -0
- package/esm2022/lib/environmentsModel.info.mjs +2 -0
- package/esm2022/lib/http-interceptor.mjs +25 -0
- package/esm2022/lib/login/login.component.mjs +84 -0
- package/esm2022/lib/materils/materils.module.mjs +172 -0
- package/esm2022/lib/menu/menu.component.mjs +47 -0
- package/esm2022/public_api.mjs +10 -0
- package/fesm2022/bulk-tool-20.mjs +448 -0
- package/fesm2022/bulk-tool-20.mjs.map +1 -0
- package/index.d.ts +144 -0
- package/lib/auth.service.d.ts +16 -0
- package/lib/bulk-tool.component.d.ts +8 -0
- package/lib/bulk-tool.module.d.ts +17 -0
- package/lib/bulk-tool.service.d.ts +6 -0
- package/lib/constant.enum.d.ts +5 -0
- package/lib/environmentsModel.info.d.ts +3 -0
- package/lib/http-interceptor.d.ts +8 -0
- package/lib/login/login.component.d.ts +27 -0
- package/lib/materils/materils.module.d.ts +45 -0
- package/lib/menu/menu.component.d.ts +28 -0
- package/package.json +23 -59
- package/{projects/bulk-tool/src/public_api.ts → public_api.d.ts} +6 -10
- package/.editorconfig +0 -13
- package/README.md +0 -27
- package/angular.json +0 -172
- package/e2e/protractor.conf.js +0 -28
- package/e2e/src/app.e2e-spec.ts +0 -14
- package/e2e/src/app.po.ts +0 -11
- package/e2e/tsconfig.e2e.json +0 -13
- package/projects/bulk-tool/karma.conf.js +0 -31
- package/projects/bulk-tool/ng-package.json +0 -8
- package/projects/bulk-tool/ng-package.prod.json +0 -7
- package/projects/bulk-tool/package-lock.json +0 -5
- package/projects/bulk-tool/package.json +0 -8
- package/projects/bulk-tool/src/lib/auth.service.spec.ts +0 -15
- package/projects/bulk-tool/src/lib/auth.service.ts +0 -46
- package/projects/bulk-tool/src/lib/base-app.service.ts +0 -36
- package/projects/bulk-tool/src/lib/bulk-tool.component.spec.ts +0 -25
- package/projects/bulk-tool/src/lib/bulk-tool.component.ts +0 -19
- package/projects/bulk-tool/src/lib/bulk-tool.module.ts +0 -41
- package/projects/bulk-tool/src/lib/bulk-tool.service.spec.ts +0 -15
- package/projects/bulk-tool/src/lib/constant.enum.ts +0 -6
- package/projects/bulk-tool/src/lib/environmentsModel.info.ts +0 -5
- package/projects/bulk-tool/src/lib/http-interceptor.ts +0 -22
- package/projects/bulk-tool/src/lib/login/login.component.css +0 -86
- package/projects/bulk-tool/src/lib/login/login.component.html +0 -59
- package/projects/bulk-tool/src/lib/login/login.component.spec.ts +0 -25
- package/projects/bulk-tool/src/lib/login/login.component.ts +0 -104
- package/projects/bulk-tool/src/lib/materils/materils.module.spec.ts +0 -13
- package/projects/bulk-tool/src/lib/materils/materils.module.ts +0 -96
- package/projects/bulk-tool/src/lib/menu/menu.component.css +0 -388
- package/projects/bulk-tool/src/lib/menu/menu.component.html +0 -46
- package/projects/bulk-tool/src/lib/menu/menu.component.spec.ts +0 -25
- package/projects/bulk-tool/src/lib/menu/menu.component.ts +0 -197
- package/projects/bulk-tool/src/test.ts +0 -22
- package/projects/bulk-tool/tsconfig.lib.json +0 -33
- package/projects/bulk-tool/tsconfig.spec.json +0 -17
- package/projects/bulk-tool/tslint.json +0 -17
- package/src/app/app.component.css +0 -0
- package/src/app/app.component.html +0 -18
- package/src/app/app.component.spec.ts +0 -27
- package/src/app/app.component.ts +0 -14
- package/src/app/app.module.ts +0 -44
- package/src/app/home/home.component.css +0 -0
- package/src/app/home/home.component.html +0 -13
- package/src/app/home/home.component.spec.ts +0 -25
- package/src/app/home/home.component.ts +0 -15
- package/src/app/login/login.component.css +0 -76
- package/src/app/login/login.component.html +0 -1
- package/src/app/login/login.component.spec.ts +0 -25
- package/src/app/login/login.component.ts +0 -72
- package/src/assets/.gitkeep +0 -0
- package/src/browserslist +0 -9
- package/src/environments/environment.prod.ts +0 -4
- package/src/environments/environment.ts +0 -18
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -24
- package/src/karma.conf.js +0 -31
- package/src/main.ts +0 -12
- package/src/polyfills.ts +0 -80
- package/src/styles.css +0 -1
- package/src/test.ts +0 -20
- package/src/tsconfig.app.json +0 -11
- package/src/tsconfig.spec.json +0 -18
- package/src/tslint.json +0 -17
- package/tsconfig.json +0 -29
- package/tslint.json +0 -130
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, ViewChild,Injectable, Injector } from '@angular/core';
|
|
2
|
-
import { AuthService } from '../auth.service';
|
|
3
|
-
//import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
|
6
|
-
import { map } from 'rxjs/operators';
|
|
7
|
-
import { MediaMatcher } from '@angular/cdk/layout';
|
|
8
|
-
import { ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
9
|
-
import { FormControl } from '@angular/forms';
|
|
10
|
-
import {BaseAppService} from '../base-app.service'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export interface Menu {
|
|
14
|
-
displaytext: string;
|
|
15
|
-
displayorder: number;
|
|
16
|
-
menuId: number;
|
|
17
|
-
menulevel: number;
|
|
18
|
-
parentMenuId: number;
|
|
19
|
-
targetAction: string;
|
|
20
|
-
targetServer: string;
|
|
21
|
-
parentMenuName:string;
|
|
22
|
-
children:any[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@Component({
|
|
26
|
-
selector: 'lib-menu',
|
|
27
|
-
templateUrl: './menu.component.html',
|
|
28
|
-
styleUrls: ['./menu.component.css']
|
|
29
|
-
})
|
|
30
|
-
export class MenuComponent implements OnInit {
|
|
31
|
-
|
|
32
|
-
public async: any;
|
|
33
|
-
public MenuMode:string="over";
|
|
34
|
-
public message = '';
|
|
35
|
-
public tooltext: any="CBMS"
|
|
36
|
-
public menuName:string;
|
|
37
|
-
public childMenu:string;
|
|
38
|
-
public isLoading: boolean = false;
|
|
39
|
-
public userInfo:any;
|
|
40
|
-
public moduleNameFromExcel:string;
|
|
41
|
-
public IsPermissionExists:boolean=true;
|
|
42
|
-
public messages: string[] = [];
|
|
43
|
-
public MenuData: Menu[]
|
|
44
|
-
public RootUrl :string;
|
|
45
|
-
public menuFromExcel:any;
|
|
46
|
-
public navigateMsg:string;
|
|
47
|
-
public result:any;
|
|
48
|
-
constructor(private authenticationService: AuthService,private route: ActivatedRoute,
|
|
49
|
-
private router: Router,public injector: Injector,private baseAppService:BaseAppService) {
|
|
50
|
-
this.RootUrl = this.injector.get("config").RootUrl; //getting from environment file from application accessing BaseApp
|
|
51
|
-
this.menuName=this.injector.get("config").MenuName; //getting from environment file from application accessing BaseApp
|
|
52
|
-
this.userInfo=this.baseAppService.getUserInfo();
|
|
53
|
-
this.childMenu=localStorage.getItem("childMenu")
|
|
54
|
-
if(!this.userInfo){ //incase getUserInfo service fails.
|
|
55
|
-
let userDetails=localStorage.getItem("UserInfo");
|
|
56
|
-
this.userInfo=JSON.parse(userDetails);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
ngOnInit() {
|
|
60
|
-
console.log("Url came base from application -",window.location.href);
|
|
61
|
-
this.isLoading = true;
|
|
62
|
-
this.GetCBMSMenu();
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
public GetCBMSMenu(){
|
|
66
|
-
if(this.userInfo){
|
|
67
|
-
this.authenticationService.GetMenu(this.userInfo.userInfoId).subscribe(data => {
|
|
68
|
-
this.MenuData = data;
|
|
69
|
-
this.isLoading = false;
|
|
70
|
-
if(this.MenuData){
|
|
71
|
-
this.menuFromExcel= this.baseAppService.getmenuNameFromBudget()
|
|
72
|
-
console.log("MenuFromExcel", this.menuFromExcel);
|
|
73
|
-
if(!this.menuFromExcel){
|
|
74
|
-
let CurrentMenu=data.find(e=>e.parentMenuName==this.menuName) //Finding Which application Accessing BaseApp
|
|
75
|
-
this.tooltext = CurrentMenu?CurrentMenu.parentMenuName:"CBMS";
|
|
76
|
-
console.log("Isdownload",this.userInfo.isDownload);
|
|
77
|
-
if(!this.userInfo.isDownload){
|
|
78
|
-
if(CurrentMenu){
|
|
79
|
-
if(CurrentMenu.children.length==0){
|
|
80
|
-
this.router.navigate([CurrentMenu.targetAction.split("app")[1]]);
|
|
81
|
-
}
|
|
82
|
-
else{
|
|
83
|
-
if(this.childMenu){
|
|
84
|
-
this.navigateToChildMenu(CurrentMenu)
|
|
85
|
-
}
|
|
86
|
-
else{
|
|
87
|
-
this.router.navigate([CurrentMenu.children[0].targetAction.split("app")[1]]);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
else{
|
|
93
|
-
console.log("Redirecting to the First application in menu Tab")
|
|
94
|
-
this.navigateToAnotherMenu(this.MenuData[0]); // Redirecting to the First application in menu Tab
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else{
|
|
99
|
-
let menu =this.MenuData.find(e=>e.displaytext==this.menuFromExcel)
|
|
100
|
-
if(menu){
|
|
101
|
-
if(!this.childMenu){
|
|
102
|
-
console.log("noChildMenu")
|
|
103
|
-
this.navigateToAnotherMenu(this.MenuData.find(e=>e.displaytext==this.menuFromExcel));
|
|
104
|
-
}
|
|
105
|
-
else{
|
|
106
|
-
console.log("childMenuThere")
|
|
107
|
-
this.navigateToChildMenu(this.MenuData.find(e=>e.parentMenuName==this.menuName))
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
else{
|
|
111
|
-
this.navigateToAnotherMenu(this.MenuData[0]);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
else{
|
|
116
|
-
this.IsPermissionExists=false; //Notifing User that he or she doednot have permission if menuData is empty.
|
|
117
|
-
}
|
|
118
|
-
this.isLoading = false;
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
navigateToChildMenu(CurrentMenu){
|
|
125
|
-
localStorage.removeItem("childMenu");
|
|
126
|
-
let childrenMenu= CurrentMenu.children.filter(e=>e.displaytext==this.childMenu)
|
|
127
|
-
console.log("childrenMenu",childrenMenu);
|
|
128
|
-
if(childrenMenu.length>0){
|
|
129
|
-
this.router.navigate([childrenMenu[0].targetAction.split("app")[1]]);
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
else{
|
|
133
|
-
this.router.navigate([CurrentMenu.targetAction.split("app")[1]]);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
listItemClick(link)
|
|
138
|
-
{
|
|
139
|
-
this.isLoading = true;
|
|
140
|
-
if(link.parentMenuName==this.menuName){
|
|
141
|
-
if(link.parentMenuId==0){
|
|
142
|
-
if(link.children.length>0){
|
|
143
|
-
console.log("navigationUrl",link.children[0].targetAction)
|
|
144
|
-
this.isLoading = false;
|
|
145
|
-
this.router.navigate([link.children[0].targetAction.split("app")[1]]);
|
|
146
|
-
}
|
|
147
|
-
else{
|
|
148
|
-
console.log("navigationUrl",link.targetAction)
|
|
149
|
-
this.isLoading = false;
|
|
150
|
-
this.router.navigate([link.targetAction.split("app")[1]]);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else{
|
|
154
|
-
localStorage.setItem("childMenu",link.displaytext);
|
|
155
|
-
console.log("navigationUrl",link.targetAction)
|
|
156
|
-
this.isLoading = false;
|
|
157
|
-
this.router.navigate([link.targetAction.split("app")[1]]);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
else{
|
|
161
|
-
this.isLoading = false;
|
|
162
|
-
this.navigateToAnotherMenu(link)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
navigateToAnotherMenu(link){
|
|
166
|
-
this.navigateMsg="...Redirecting to "+link.parentMenuName
|
|
167
|
-
let navLink=link.targetAction
|
|
168
|
-
navLink=link.targetAction.split("app")[0]+"app"
|
|
169
|
-
if(link.parentMenuId!=0){
|
|
170
|
-
localStorage.setItem("childMenu",link.displaytext);
|
|
171
|
-
}
|
|
172
|
-
this.isLoading = false;
|
|
173
|
-
localStorage.setItem("IsNavigate","true");
|
|
174
|
-
let navigateUrl=this.navigateUrl(navLink)
|
|
175
|
-
console.log("navigating to",link.displaytext)
|
|
176
|
-
window.location.assign(navigateUrl);
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
navigateUrl(Url:string){
|
|
180
|
-
let replacements = Url.match(/\{.*?\}/g);
|
|
181
|
-
let value ="";
|
|
182
|
-
if(replacements){
|
|
183
|
-
replacements.forEach(element =>{
|
|
184
|
-
if(element=="{userId}"){
|
|
185
|
-
value=this.userInfo.userInfoId;
|
|
186
|
-
}
|
|
187
|
-
Url=Url.replace(element,value);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
return this.RootUrl+Url;
|
|
191
|
-
}
|
|
192
|
-
onLogOut(){
|
|
193
|
-
this.authenticationService.logout();
|
|
194
|
-
this.router.navigate(["/login"]);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
-
|
|
3
|
-
import 'core-js/es7/reflect';
|
|
4
|
-
import 'zone.js/dist/zone';
|
|
5
|
-
import 'zone.js/dist/zone-testing';
|
|
6
|
-
import { getTestBed } from '@angular/core/testing';
|
|
7
|
-
import {
|
|
8
|
-
BrowserDynamicTestingModule,
|
|
9
|
-
platformBrowserDynamicTesting
|
|
10
|
-
} from '@angular/platform-browser-dynamic/testing';
|
|
11
|
-
|
|
12
|
-
declare const require: any;
|
|
13
|
-
|
|
14
|
-
// First, initialize the Angular testing environment.
|
|
15
|
-
getTestBed().initTestEnvironment(
|
|
16
|
-
BrowserDynamicTestingModule,
|
|
17
|
-
platformBrowserDynamicTesting()
|
|
18
|
-
);
|
|
19
|
-
// Then we find all the tests.
|
|
20
|
-
const context = require.context('./', true, /\.spec\.ts$/);
|
|
21
|
-
// And load the modules.
|
|
22
|
-
context.keys().map(context);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../out-tsc/lib",
|
|
5
|
-
"target": "es2015",
|
|
6
|
-
"module": "es2015",
|
|
7
|
-
"moduleResolution": "node",
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"inlineSources": true,
|
|
11
|
-
"emitDecoratorMetadata": true,
|
|
12
|
-
"experimentalDecorators": true,
|
|
13
|
-
"importHelpers": true,
|
|
14
|
-
"types": [],
|
|
15
|
-
"lib": [
|
|
16
|
-
"dom",
|
|
17
|
-
"es2015"
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
"angularCompilerOptions": {
|
|
21
|
-
"annotateForClosureCompiler": true,
|
|
22
|
-
"skipTemplateCodegen": true,
|
|
23
|
-
"strictMetadataEmit": true,
|
|
24
|
-
"fullTemplateTypeCheck": true,
|
|
25
|
-
"strictInjectionParameters": true,
|
|
26
|
-
"flatModuleId": "AUTOGENERATED",
|
|
27
|
-
"flatModuleOutFile": "AUTOGENERATED"
|
|
28
|
-
},
|
|
29
|
-
"exclude": [
|
|
30
|
-
"src/test.ts",
|
|
31
|
-
"**/*.spec.ts"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
File without changes
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!--The content below is only a placeholder and can be replaced.-->
|
|
2
|
-
|
|
3
|
-
<!-- <lib-login [routeUrl]="data"></lib-login> -->
|
|
4
|
-
|
|
5
|
-
<!-- <div class="container-fluid">
|
|
6
|
-
<div class="row">
|
|
7
|
-
<mat-card>
|
|
8
|
-
<div class="col-md-12 col-xs-12"> -->
|
|
9
|
-
<!-- <app-my-nav></app-my-nav> -->
|
|
10
|
-
<!-- <lib-menu ></lib-menu>
|
|
11
|
-
</div>
|
|
12
|
-
</mat-card> -->
|
|
13
|
-
<div class="col-md-11 col-xs-11">
|
|
14
|
-
|
|
15
|
-
<router-outlet></router-outlet>
|
|
16
|
-
</div>
|
|
17
|
-
<!-- </div>
|
|
18
|
-
</div> -->
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { TestBed, async } from '@angular/core/testing';
|
|
2
|
-
import { AppComponent } from './app.component';
|
|
3
|
-
describe('AppComponent', () => {
|
|
4
|
-
beforeEach(async(() => {
|
|
5
|
-
TestBed.configureTestingModule({
|
|
6
|
-
declarations: [
|
|
7
|
-
AppComponent
|
|
8
|
-
],
|
|
9
|
-
}).compileComponents();
|
|
10
|
-
}));
|
|
11
|
-
it('should create the app', async(() => {
|
|
12
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
13
|
-
const app = fixture.debugElement.componentInstance;
|
|
14
|
-
expect(app).toBeTruthy();
|
|
15
|
-
}));
|
|
16
|
-
it(`should have as title 'BulkToolLibrary'`, async(() => {
|
|
17
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
18
|
-
const app = fixture.debugElement.componentInstance;
|
|
19
|
-
expect(app.title).toEqual('BulkToolLibrary');
|
|
20
|
-
}));
|
|
21
|
-
it('should render title in a h1 tag', async(() => {
|
|
22
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
23
|
-
fixture.detectChanges();
|
|
24
|
-
const compiled = fixture.debugElement.nativeElement;
|
|
25
|
-
expect(compiled.querySelector('h1').textContent).toContain('Welcome to BulkToolLibrary!');
|
|
26
|
-
}));
|
|
27
|
-
});
|
package/src/app/app.component.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'app-root',
|
|
7
|
-
templateUrl: './app.component.html',
|
|
8
|
-
styleUrls: ['./app.component.css']
|
|
9
|
-
})
|
|
10
|
-
export class AppComponent {
|
|
11
|
-
title = 'BulkToolLibrary';
|
|
12
|
-
data="/home"
|
|
13
|
-
|
|
14
|
-
}
|
package/src/app/app.module.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
import { AppComponent } from './app.component';
|
|
5
|
-
import { from } from 'rxjs';
|
|
6
|
-
import {BulkToolModule,MaterilsModule} from 'exceladdincbms-v1'
|
|
7
|
-
//import { BulkToolModule, MaterilsModule} from 'projects/bulk-tool/src/public_api';
|
|
8
|
-
//import {IEnvironmentsInfo } from 'projects/bulk-tool/src/lib/environmentsModel.info';
|
|
9
|
-
import { IEnvironmentsInfo } from 'exceladdincbms-v1/lib/environmentsModel.info';
|
|
10
|
-
import { environment } from 'src/environments/environment';
|
|
11
|
-
import { LoginComponent } from './login/login.component';
|
|
12
|
-
import { Routes, RouterModule } from '@angular/router';
|
|
13
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
14
|
-
import { CommonModule } from '@angular/common';
|
|
15
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
16
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
17
|
-
import { HomeComponent } from './home/home.component';
|
|
18
|
-
const appRoutes: Routes = [
|
|
19
|
-
{ path: 'login', component: LoginComponent },
|
|
20
|
-
{ path: '', redirectTo:"login",pathMatch:'full' },
|
|
21
|
-
{ path: 'home', component: HomeComponent },
|
|
22
|
-
|
|
23
|
-
];
|
|
24
|
-
@NgModule({
|
|
25
|
-
declarations: [
|
|
26
|
-
AppComponent,
|
|
27
|
-
LoginComponent,
|
|
28
|
-
HomeComponent
|
|
29
|
-
],
|
|
30
|
-
imports: [
|
|
31
|
-
BrowserModule,
|
|
32
|
-
BulkToolModule.forRoot(<IEnvironmentsInfo>environment),
|
|
33
|
-
MaterilsModule,
|
|
34
|
-
RouterModule.forRoot(appRoutes),
|
|
35
|
-
FormsModule,
|
|
36
|
-
CommonModule,
|
|
37
|
-
ReactiveFormsModule,
|
|
38
|
-
HttpClientModule,
|
|
39
|
-
BrowserAnimationsModule
|
|
40
|
-
],
|
|
41
|
-
providers: [],
|
|
42
|
-
bootstrap: [AppComponent]
|
|
43
|
-
})
|
|
44
|
-
export class AppModule { }
|
|
File without changes
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div class="container-fluid">
|
|
2
|
-
<div class="row">
|
|
3
|
-
<mat-card>
|
|
4
|
-
<div class="col-md-12 col-xs-12">
|
|
5
|
-
<!-- <app-my-nav></app-my-nav> -->
|
|
6
|
-
<lib-menu></lib-menu>
|
|
7
|
-
</div>
|
|
8
|
-
</mat-card>
|
|
9
|
-
<!-- <div class="col-md-11 col-xs-11">
|
|
10
|
-
<router-outlet></router-outlet>
|
|
11
|
-
</div> -->
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { HomeComponent } from './home.component';
|
|
4
|
-
|
|
5
|
-
describe('HomeComponent', () => {
|
|
6
|
-
let component: HomeComponent;
|
|
7
|
-
let fixture: ComponentFixture<HomeComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ HomeComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(HomeComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-home',
|
|
5
|
-
templateUrl: './home.component.html',
|
|
6
|
-
styleUrls: ['./home.component.css']
|
|
7
|
-
})
|
|
8
|
-
export class HomeComponent implements OnInit {
|
|
9
|
-
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit() {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/* body{
|
|
2
|
-
background: #1a3e58;
|
|
3
|
-
margin: 0px;
|
|
4
|
-
padding: 0px;
|
|
5
|
-
font-family: Roboto,"Helvetica Neue", sans-serif;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.loginWidget{
|
|
10
|
-
/* width: 350px; */
|
|
11
|
-
/* margin: 0px auto;
|
|
12
|
-
background: #ebebeb;
|
|
13
|
-
padding: 0px;
|
|
14
|
-
margin-top: 15%;
|
|
15
|
-
box-shadow: 0px 0px 13px #1a2a35;
|
|
16
|
-
}
|
|
17
|
-
.loginHeading {
|
|
18
|
-
background:#214285;
|
|
19
|
-
color: #fff;
|
|
20
|
-
padding: 10px 15px;
|
|
21
|
-
font-family: arial;
|
|
22
|
-
font-size: 17px;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
text-align: left;
|
|
25
|
-
text-transform: uppercase;
|
|
26
|
-
}
|
|
27
|
-
.loginContainer {
|
|
28
|
-
padding: 15px 15px 0px 15px;
|
|
29
|
-
margin: 0px;
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
.loginGroup{
|
|
33
|
-
margin: 0px;
|
|
34
|
-
display: block; */
|
|
35
|
-
/* margin-bottom: 10px; */
|
|
36
|
-
/* }
|
|
37
|
-
.loginGroup label {
|
|
38
|
-
margin: 0px;
|
|
39
|
-
display: block;
|
|
40
|
-
padding:5px 10px;
|
|
41
|
-
font-size: 12px;
|
|
42
|
-
font-weight: normal;
|
|
43
|
-
}
|
|
44
|
-
.loginGroup input {
|
|
45
|
-
margin: 0px;
|
|
46
|
-
display: block;
|
|
47
|
-
padding: 3px 10px;
|
|
48
|
-
font-size: 12px;
|
|
49
|
-
font-weight: normal;
|
|
50
|
-
margin-left: 10px;
|
|
51
|
-
width: 85%;
|
|
52
|
-
border: #d6d5d5 solid 1px;
|
|
53
|
-
}
|
|
54
|
-
.btnGroup {
|
|
55
|
-
display: block;
|
|
56
|
-
padding: 5px 15px 0px 15px;
|
|
57
|
-
margin: 0px; */
|
|
58
|
-
/* margin-bottom: 10px; */
|
|
59
|
-
/* }
|
|
60
|
-
.loginBtn{
|
|
61
|
-
width: 100px;
|
|
62
|
-
padding: 10px;
|
|
63
|
-
background: #2288dd;
|
|
64
|
-
border: #fff solid 1px;
|
|
65
|
-
color: #FFF;
|
|
66
|
-
text-align: center;
|
|
67
|
-
text-transform: uppercase;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
font-size: 12px;
|
|
70
|
-
}
|
|
71
|
-
.remember{
|
|
72
|
-
margin-bottom: 10px;
|
|
73
|
-
font-size: 12px;
|
|
74
|
-
color: #848080;
|
|
75
|
-
padding-bottom: 18px;
|
|
76
|
-
} */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<lib-login [routeUrl]="url"></lib-login>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { LoginComponent } from './login.component';
|
|
4
|
-
|
|
5
|
-
describe('LoginComponent', () => {
|
|
6
|
-
let component: LoginComponent;
|
|
7
|
-
let fixture: ComponentFixture<LoginComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ LoginComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(LoginComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { Router, ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
4
|
-
import { first } from 'rxjs/operators';
|
|
5
|
-
|
|
6
|
-
declare const Excel: any;
|
|
7
|
-
declare const Office: any;
|
|
8
|
-
declare var jquery: any;
|
|
9
|
-
declare var $: any;
|
|
10
|
-
declare var toastr: any;
|
|
11
|
-
declare var _the;
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'app-login',
|
|
15
|
-
templateUrl: './login.component.html',
|
|
16
|
-
styleUrls: ['./login.component.css']
|
|
17
|
-
})
|
|
18
|
-
export class LoginComponent implements OnInit {
|
|
19
|
-
//loginForm: FormGroup;
|
|
20
|
-
loading = false;
|
|
21
|
-
submitted = false;
|
|
22
|
-
returnUrl: string;
|
|
23
|
-
public url:string="/home";
|
|
24
|
-
constructor( private route: Router){
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// constructor(
|
|
29
|
-
// private formBuilder: FormBuilder,
|
|
30
|
-
// private route: ActivatedRoute,
|
|
31
|
-
// private router: Router,
|
|
32
|
-
// private authenticationService: AuthenticationService,
|
|
33
|
-
// private alertService: AlertService) {}
|
|
34
|
-
|
|
35
|
-
ngOnInit() {
|
|
36
|
-
|
|
37
|
-
// this.loginForm = this.formBuilder.group({
|
|
38
|
-
// username: ['', Validators.required],
|
|
39
|
-
// password: ['', Validators.required]
|
|
40
|
-
// });
|
|
41
|
-
|
|
42
|
-
// reset login status
|
|
43
|
-
// this.authenticationService.logout();
|
|
44
|
-
|
|
45
|
-
// // get return url from route parameters or default to '/'
|
|
46
|
-
// this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/second';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// convenience getter for easy access to form fields
|
|
50
|
-
// get f() { return this.loginForm.controls; }
|
|
51
|
-
|
|
52
|
-
// onSubmit() {
|
|
53
|
-
// this.submitted = true;
|
|
54
|
-
|
|
55
|
-
// // stop here if form is invalid
|
|
56
|
-
// if (this.loginForm.invalid) {
|
|
57
|
-
// return;
|
|
58
|
-
// }
|
|
59
|
-
|
|
60
|
-
// this.loading = true;
|
|
61
|
-
// this.authenticationService.login(this.f.username.value, this.f.password.value)
|
|
62
|
-
// .pipe(first())
|
|
63
|
-
// .subscribe(
|
|
64
|
-
// data => {
|
|
65
|
-
// this.router.navigate([this.returnUrl]);
|
|
66
|
-
// },
|
|
67
|
-
// error => {
|
|
68
|
-
// this.alertService.error(error);
|
|
69
|
-
// this.loading = false;
|
|
70
|
-
// });
|
|
71
|
-
// }
|
|
72
|
-
}
|
package/src/assets/.gitkeep
DELETED
|
File without changes
|
package/src/browserslist
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
|
2
|
-
# For additional information regarding the format and rule options, please see:
|
|
3
|
-
# https://github.com/browserslist/browserslist#queries
|
|
4
|
-
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
|
|
5
|
-
> 0.5%
|
|
6
|
-
last 2 versions
|
|
7
|
-
Firefox ESR
|
|
8
|
-
not dead
|
|
9
|
-
# IE 9-11
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// This file can be replaced during build by using the `fileReplacements` array.
|
|
2
|
-
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
3
|
-
// The list of file replacements can be found in `angular.json`.
|
|
4
|
-
|
|
5
|
-
export const environment = {
|
|
6
|
-
production: false,
|
|
7
|
-
MenuName:"Budget",
|
|
8
|
-
Url:"https://localhost:44348/api",
|
|
9
|
-
RootUrl:"https://exceladdin-tk1.ems.schneider-electric.com/"
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
* In development mode, for easier debugging, you can ignore zone related error
|
|
14
|
-
* stack frames such as `zone.run`/`zoneDelegate.invokeTask` by importing the
|
|
15
|
-
* below file. Don't forget to comment it out in production mode
|
|
16
|
-
* because it will have a performance impact when errors are thrown
|
|
17
|
-
*/
|
|
18
|
-
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
package/src/favicon.ico
DELETED
|
Binary file
|