sgh-navbar 0.0.37 → 0.0.38
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/esm2020/lib/sgh-navbar.component.mjs +22 -0
- package/esm2020/lib/sgh-navbar.module.mjs +77 -0
- package/esm2020/lib/sgh-navbar.service.mjs +36 -0
- package/esm2020/lib/sidenav/helper.mjs +12 -0
- package/esm2020/lib/sidenav/menu-list-item/menu-list-item.component.mjs +46 -0
- package/esm2020/lib/sidenav/nav-data.mjs +97 -0
- package/esm2020/lib/sidenav/sidenav-data.mjs +3 -0
- package/esm2020/lib/sidenav/sidenav.component.mjs +92 -0
- package/esm2020/lib/sidenav/sublevel-menu.component.mjs +168 -0
- package/esm2020/lib/toolbar/noftification-list/noftification-list.component.mjs +14 -0
- package/esm2020/lib/toolbar/search.pipe.mjs +21 -0
- package/esm2020/lib/toolbar/sub-client-dialog/sub-client-dialog.component.mjs +47 -0
- package/esm2020/lib/toolbar/toolbar-data.mjs +9 -0
- package/esm2020/lib/toolbar/toolbar.component.mjs +214 -0
- package/esm2020/public-api.mjs +10 -0
- package/esm2020/sgh-navbar.mjs +5 -0
- package/fesm2015/sgh-navbar.mjs +817 -0
- package/fesm2015/sgh-navbar.mjs.map +1 -0
- package/fesm2020/sgh-navbar.mjs +809 -0
- package/fesm2020/sgh-navbar.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/sgh-navbar.component.d.ts +8 -0
- package/lib/sgh-navbar.module.d.ts +21 -0
- package/lib/sgh-navbar.service.d.ts +15 -0
- package/lib/sidenav/helper.d.ts +9 -0
- package/lib/sidenav/menu-list-item/menu-list-item.component.d.ts +16 -0
- package/lib/sidenav/nav-data.d.ts +2 -0
- package/lib/sidenav/sidenav-data.d.ts +11 -0
- package/lib/sidenav/sidenav.component.d.ts +24 -0
- package/lib/sidenav/sublevel-menu.component.d.ts +18 -0
- package/lib/toolbar/noftification-list/noftification-list.component.d.ts +8 -0
- package/lib/toolbar/search.pipe.d.ts +7 -0
- package/lib/toolbar/sub-client-dialog/sub-client-dialog.component.d.ts +19 -0
- package/lib/toolbar/toolbar-data.d.ts +32 -0
- package/lib/toolbar/toolbar.component.d.ts +41 -0
- package/package.json +31 -11
- package/{src/public-api.ts → public-api.d.ts} +0 -6
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -7
- package/src/lib/sgh-navbar.component.spec.ts +0 -23
- package/src/lib/sgh-navbar.component.ts +0 -20
- package/src/lib/sgh-navbar.module.ts +0 -48
- package/src/lib/sgh-navbar.service.spec.ts +0 -16
- package/src/lib/sgh-navbar.service.ts +0 -34
- package/src/lib/sidenav/helper.ts +0 -25
- package/src/lib/sidenav/menu-list-item/item1/item1.component.html +0 -1
- package/src/lib/sidenav/menu-list-item/item1/item1.component.scss +0 -0
- package/src/lib/sidenav/menu-list-item/item1/item1.component.spec.ts +0 -25
- package/src/lib/sidenav/menu-list-item/item1/item1.component.ts +0 -15
- package/src/lib/sidenav/menu-list-item/item1/sub-item1/sub-item1.component.html +0 -1
- package/src/lib/sidenav/menu-list-item/item1/sub-item1/sub-item1.component.scss +0 -0
- package/src/lib/sidenav/menu-list-item/item1/sub-item1/sub-item1.component.spec.ts +0 -25
- package/src/lib/sidenav/menu-list-item/item1/sub-item1/sub-item1.component.ts +0 -15
- package/src/lib/sidenav/menu-list-item/item2/item2.component.html +0 -1
- package/src/lib/sidenav/menu-list-item/item2/item2.component.scss +0 -0
- package/src/lib/sidenav/menu-list-item/item2/item2.component.spec.ts +0 -25
- package/src/lib/sidenav/menu-list-item/item2/item2.component.ts +0 -15
- package/src/lib/sidenav/menu-list-item/item3/item3.component.html +0 -1
- package/src/lib/sidenav/menu-list-item/item3/item3.component.scss +0 -0
- package/src/lib/sidenav/menu-list-item/item3/item3.component.spec.ts +0 -25
- package/src/lib/sidenav/menu-list-item/item3/item3.component.ts +0 -15
- package/src/lib/sidenav/menu-list-item/menu-list-item.component.html +0 -17
- package/src/lib/sidenav/menu-list-item/menu-list-item.component.scss +0 -128
- package/src/lib/sidenav/menu-list-item/menu-list-item.component.spec.ts +0 -25
- package/src/lib/sidenav/menu-list-item/menu-list-item.component.ts +0 -42
- package/src/lib/sidenav/nav-data.ts +0 -98
- package/src/lib/sidenav/sidenav-data.ts +0 -12
- package/src/lib/sidenav/sidenav.component.html +0 -34
- package/src/lib/sidenav/sidenav.component.scss +0 -173
- package/src/lib/sidenav/sidenav.component.ts +0 -84
- package/src/lib/sidenav/sublevel-menu.component.ts +0 -106
- package/src/lib/toolbar/assets/Synergen_Logo-Large2.png +0 -0
- package/src/lib/toolbar/noftification-list/noftification-list.component.html +0 -18
- package/src/lib/toolbar/noftification-list/noftification-list.component.scss +0 -67
- package/src/lib/toolbar/noftification-list/noftification-list.component.spec.ts +0 -25
- package/src/lib/toolbar/noftification-list/noftification-list.component.ts +0 -14
- package/src/lib/toolbar/search.pipe.ts +0 -18
- package/src/lib/toolbar/sub-client-dialog/sub-client-dialog.component.html +0 -14
- package/src/lib/toolbar/sub-client-dialog/sub-client-dialog.component.scss +0 -40
- package/src/lib/toolbar/sub-client-dialog/sub-client-dialog.component.spec.ts +0 -23
- package/src/lib/toolbar/sub-client-dialog/sub-client-dialog.component.ts +0 -41
- package/src/lib/toolbar/toolbar-data.ts +0 -35
- package/src/lib/toolbar/toolbar.component.html +0 -79
- package/src/lib/toolbar/toolbar.component.scss +0 -493
- package/src/lib/toolbar/toolbar.component.ts +0 -218
- package/src/test.ts +0 -15
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SghNavbarService } from './sgh-navbar.service';
|
|
4
|
-
|
|
5
|
-
describe('SghNavbarService', () => {
|
|
6
|
-
let service: SghNavbarService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(SghNavbarService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import {BehaviorSubject} from "rxjs";
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export class SghNavbarService {
|
|
8
|
-
expanded:boolean;
|
|
9
|
-
client = new BehaviorSubject({});
|
|
10
|
-
subClient = new BehaviorSubject({});
|
|
11
|
-
setExpanded(value: boolean) {
|
|
12
|
-
this.expanded = value;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
getExpanded() {
|
|
16
|
-
return this.expanded;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
setClient(client) {
|
|
20
|
-
this.client.next(client);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
getClient() {
|
|
24
|
-
return this.client;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
setSubclient(subclient) {
|
|
28
|
-
this.subClient.next(subclient);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
getSubclient() {
|
|
32
|
-
return this.subClient;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { animate, style, transition, trigger } from "@angular/animations";
|
|
2
|
-
|
|
3
|
-
export interface INavbarData {
|
|
4
|
-
routeLink: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
label: string;
|
|
7
|
-
expanded?: boolean;
|
|
8
|
-
visible: boolean;
|
|
9
|
-
items?: INavbarData[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const fadeInOut = trigger('fadeInOut', [
|
|
13
|
-
transition(':enter', [
|
|
14
|
-
style({opacity: 0}),
|
|
15
|
-
animate('350ms',
|
|
16
|
-
style({opacity: 1})
|
|
17
|
-
)
|
|
18
|
-
]),
|
|
19
|
-
transition(':leave', [
|
|
20
|
-
style({opacity: 1}),
|
|
21
|
-
animate('350ms',
|
|
22
|
-
style({opacity: 0})
|
|
23
|
-
)
|
|
24
|
-
])
|
|
25
|
-
])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>item1 works!</p>
|
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { Item1Component } from './item1.component';
|
|
4
|
-
|
|
5
|
-
describe('Item1Component', () => {
|
|
6
|
-
let component: Item1Component;
|
|
7
|
-
let fixture: ComponentFixture<Item1Component>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ Item1Component ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(Item1Component);
|
|
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-item1',
|
|
5
|
-
templateUrl: './item1.component.html',
|
|
6
|
-
styleUrls: ['./item1.component.scss']
|
|
7
|
-
})
|
|
8
|
-
export class Item1Component implements OnInit {
|
|
9
|
-
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit(): void {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>sub-item1 works!</p>
|
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SubItem1Component } from './sub-item1.component';
|
|
4
|
-
|
|
5
|
-
describe('SubItem1Component', () => {
|
|
6
|
-
let component: SubItem1Component;
|
|
7
|
-
let fixture: ComponentFixture<SubItem1Component>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ SubItem1Component ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(SubItem1Component);
|
|
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-sub-item1',
|
|
5
|
-
templateUrl: './sub-item1.component.html',
|
|
6
|
-
styleUrls: ['./sub-item1.component.scss']
|
|
7
|
-
})
|
|
8
|
-
export class SubItem1Component implements OnInit {
|
|
9
|
-
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit(): void {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>item2 works!</p>
|
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { Item2Component } from './item2.component';
|
|
4
|
-
|
|
5
|
-
describe('Item2Component', () => {
|
|
6
|
-
let component: Item2Component;
|
|
7
|
-
let fixture: ComponentFixture<Item2Component>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ Item2Component ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(Item2Component);
|
|
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-item2',
|
|
5
|
-
templateUrl: './item2.component.html',
|
|
6
|
-
styleUrls: ['./item2.component.scss']
|
|
7
|
-
})
|
|
8
|
-
export class Item2Component implements OnInit {
|
|
9
|
-
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit(): void {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>item3 works!</p>
|
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { Item3Component } from './item3.component';
|
|
4
|
-
|
|
5
|
-
describe('Item3Component', () => {
|
|
6
|
-
let component: Item3Component;
|
|
7
|
-
let fixture: ComponentFixture<Item3Component>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ Item3Component ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(Item3Component);
|
|
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-item3',
|
|
5
|
-
templateUrl: './item3.component.html',
|
|
6
|
-
styleUrls: ['./item3.component.scss']
|
|
7
|
-
})
|
|
8
|
-
export class Item3Component implements OnInit {
|
|
9
|
-
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit(): void {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="sidebar_div" *ngFor="let data of items">
|
|
2
|
-
<a (click)="onItemSelected(data)" class="sub-link"
|
|
3
|
-
[routerLink]="[data.routeLink]" routerLinkActive="item-active" *ngIf="data.visible">
|
|
4
|
-
<div class="text-wrapper">
|
|
5
|
-
<i class="fa-size fa fa-{{data.icon}} {{data.icon ? '' : 'padding-10'}}"></i>
|
|
6
|
-
<div class="text-div">
|
|
7
|
-
{{data.label}}
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
<i class="fa-size fa fa-angle-down" *ngIf="!(data.items == undefined)"
|
|
11
|
-
[@indicatorRotate]="data.expanded ? 'expanded': 'collapsed'"></i>
|
|
12
|
-
</a>
|
|
13
|
-
<div class="sub-link-wrapper" *ngIf="data.expanded">
|
|
14
|
-
<app-menu-list-item [items]="data.items">
|
|
15
|
-
</app-menu-list-item>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
.padding-10{
|
|
2
|
-
padding-left: 10px;
|
|
3
|
-
}
|
|
4
|
-
.text-div{
|
|
5
|
-
text-align: initial;
|
|
6
|
-
padding-left: 10px;
|
|
7
|
-
}
|
|
8
|
-
.sub-link {
|
|
9
|
-
padding-left: 30px !important;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.sidebar_div {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
//width: 200px;
|
|
16
|
-
|
|
17
|
-
//position: fixed;
|
|
18
|
-
//height: 100%;
|
|
19
|
-
overflow: auto;
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* sidebar_div links */
|
|
24
|
-
.sidebar_div a {
|
|
25
|
-
color: #005860;
|
|
26
|
-
padding: 10px 13px;
|
|
27
|
-
text-decoration: none;
|
|
28
|
-
margin: 0px 2px;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Active/current link */
|
|
36
|
-
.sidebar_div a.active {
|
|
37
|
-
background-color: #006068;
|
|
38
|
-
color: white;
|
|
39
|
-
border-radius: 13px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Links on mouse-over */
|
|
43
|
-
.sidebar_div a:hover:not(.active) {
|
|
44
|
-
background-color: #26787f !important;
|
|
45
|
-
color: white;
|
|
46
|
-
border-radius: 13px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* Page content. The value of the margin-left property should match the value of the sidebar_div's width property */
|
|
50
|
-
div.content {
|
|
51
|
-
margin-left: 200px;
|
|
52
|
-
padding: 1px 16px;
|
|
53
|
-
height: 1000px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* On screens that are less than 700px wide, make the sidebar_div into a topbar */
|
|
57
|
-
@media screen and (max-width: 700px) {
|
|
58
|
-
.sidebar_div {
|
|
59
|
-
width: 100%;
|
|
60
|
-
height: auto;
|
|
61
|
-
position: relative;
|
|
62
|
-
}
|
|
63
|
-
.sidebar_div a {
|
|
64
|
-
float: left;
|
|
65
|
-
width: -webkit-fill-available;
|
|
66
|
-
}
|
|
67
|
-
div.content {
|
|
68
|
-
margin-left: 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* On screens that are less than 400px, display the bar vertically, instead of horizontally */
|
|
73
|
-
@media screen and (max-width: 400px) {
|
|
74
|
-
.sidebar_div a {
|
|
75
|
-
text-align: center;
|
|
76
|
-
float: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.nav-list li a {
|
|
82
|
-
text-decoration: none;
|
|
83
|
-
display: block;
|
|
84
|
-
padding: 10px;
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
border-bottom: 1px solid #515151 !important;
|
|
87
|
-
color: #9d9d9d;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.nav-list > li > a {
|
|
91
|
-
color: #C4C4C4;
|
|
92
|
-
font-size: 14px;
|
|
93
|
-
padding-left: 13px !important;
|
|
94
|
-
border-bottom: 1px solid #585858;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.nav-list > li > a:hover {
|
|
98
|
-
background-color: #444444;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.sidenav-overlay {
|
|
102
|
-
display: none;
|
|
103
|
-
position: fixed;
|
|
104
|
-
width: 100%;
|
|
105
|
-
height: 100%;
|
|
106
|
-
background-color: #0009 !important;
|
|
107
|
-
left: 0%;
|
|
108
|
-
top: 0;
|
|
109
|
-
z-index: -1;
|
|
110
|
-
cursor: default;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.text-wrapper {
|
|
114
|
-
display: flex !important;
|
|
115
|
-
align-items: center !important;
|
|
116
|
-
margin-left: 10px !important;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@media screen and (max-width: 600px) {
|
|
120
|
-
.sgh-sidebar {
|
|
121
|
-
position: absolute !important;
|
|
122
|
-
background: white !important;
|
|
123
|
-
}
|
|
124
|
-
.sidenav-overlay {
|
|
125
|
-
display: block;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MenuListItemComponent } from './menu-list-item.component';
|
|
4
|
-
|
|
5
|
-
describe('MenuListItemComponent', () => {
|
|
6
|
-
let component: MenuListItemComponent;
|
|
7
|
-
let fixture: ComponentFixture<MenuListItemComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ MenuListItemComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(MenuListItemComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {Component, HostBinding, Input, OnInit, ViewEncapsulation} from '@angular/core';
|
|
2
|
-
import {INavbarData} from '../helper';
|
|
3
|
-
import {Router} from '@angular/router';
|
|
4
|
-
import {animate, state, style, transition, trigger} from '@angular/animations';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-menu-list-item',
|
|
8
|
-
templateUrl: './menu-list-item.component.html',
|
|
9
|
-
styleUrls: ['./menu-list-item.component.scss'],
|
|
10
|
-
encapsulation:ViewEncapsulation.None,
|
|
11
|
-
animations: [
|
|
12
|
-
trigger('indicatorRotate', [
|
|
13
|
-
state('collapsed', style({transform: 'rotate(0deg)'})),
|
|
14
|
-
state('expanded', style({transform: 'rotate(180deg)'})),
|
|
15
|
-
transition('expanded <=> collapsed',
|
|
16
|
-
animate('225ms cubic-bezier(0.4,0.0,0.2,1)')
|
|
17
|
-
),
|
|
18
|
-
])
|
|
19
|
-
]
|
|
20
|
-
})
|
|
21
|
-
export class MenuListItemComponent implements OnInit {
|
|
22
|
-
expanded: boolean;
|
|
23
|
-
expandMenu: boolean;
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
@HostBinding('attr.aria-expanded') ariaExpanded = this.expanded;
|
|
26
|
-
@Input() items: any;
|
|
27
|
-
|
|
28
|
-
constructor(public router: Router) { }
|
|
29
|
-
|
|
30
|
-
ngOnInit(): void {
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
onItemSelected(item: INavbarData) {
|
|
34
|
-
if (!item.items || !item.items.length) {
|
|
35
|
-
this.router.navigate([item.routeLink]).then();
|
|
36
|
-
}
|
|
37
|
-
if (item.items && item.items.length) {
|
|
38
|
-
item.expanded = !item.expanded;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { INavbarData } from "./helper";
|
|
2
|
-
|
|
3
|
-
export const navbarData: INavbarData[] = [
|
|
4
|
-
{
|
|
5
|
-
"label": "Dashboard",
|
|
6
|
-
"icon": "home",
|
|
7
|
-
"routeLink": "dashboard",
|
|
8
|
-
"visible": true,
|
|
9
|
-
"items": [
|
|
10
|
-
{
|
|
11
|
-
"label": "Cards",
|
|
12
|
-
"icon": "home",
|
|
13
|
-
"routeLink": "dashboard/cards",
|
|
14
|
-
"visible": true,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"label": "Charts",
|
|
18
|
-
"icon": "home",
|
|
19
|
-
"routeLink": "dashboard/charts",
|
|
20
|
-
"visible": true,
|
|
21
|
-
"items": [
|
|
22
|
-
{
|
|
23
|
-
"label": "Vertical bar chart",
|
|
24
|
-
"icon": "",
|
|
25
|
-
"routeLink": "dashboard/charts/pages/vertical-bar-chart",
|
|
26
|
-
"visible": true
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"label": "Horizontal bar chart",
|
|
30
|
-
"icon": "",
|
|
31
|
-
"routeLink": "dashboard/charts/pages/horizontal-bar-chart",
|
|
32
|
-
"visible": true
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"label": "Grouped horizontal bar chart",
|
|
36
|
-
"icon": "",
|
|
37
|
-
"routeLink": "dashboard/charts/pages/grouped-horizontal-bar-chart",
|
|
38
|
-
"visible": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"label": "Grouped vertical bar chart",
|
|
42
|
-
"icon": "",
|
|
43
|
-
"routeLink": "dashboard/charts/pages/grouped-vertical-bar-chart",
|
|
44
|
-
"visible": true
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"label": "Pie chart",
|
|
48
|
-
"icon": "",
|
|
49
|
-
"routeLink": "dashboard/charts/pages/pie-chart",
|
|
50
|
-
"visible": true
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"label": "Advanced pie chart",
|
|
54
|
-
"icon": "",
|
|
55
|
-
"routeLink": "dashboard/charts/pages/advanced-pie-chart",
|
|
56
|
-
"visible": true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"label": "Pie grid chart",
|
|
60
|
-
"icon": "",
|
|
61
|
-
"routeLink": "dashboard/charts/pages/pie-grid-chart",
|
|
62
|
-
"visible": true
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"label": "Line chart",
|
|
66
|
-
"icon": "",
|
|
67
|
-
"routeLink": "dashboard/charts/pages/line-chart",
|
|
68
|
-
"visible": true
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"label": "Number card chart",
|
|
72
|
-
"icon": "",
|
|
73
|
-
"routeLink": "dashboard/charts/pages/number-card-chart",
|
|
74
|
-
"visible": true
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"label": "Linear gauge chart",
|
|
78
|
-
"icon": "",
|
|
79
|
-
"routeLink": "dashboard/charts/pages/linear-gauge-chart",
|
|
80
|
-
"visible": true
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"label": "Combo chart",
|
|
84
|
-
"icon": "",
|
|
85
|
-
"routeLink": "dashboard/charts/pages/combo-chart",
|
|
86
|
-
"visible": true
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"label": "Form elements",
|
|
94
|
-
"icon": "home",
|
|
95
|
-
"routeLink": "main",
|
|
96
|
-
"visible": true,
|
|
97
|
-
},
|
|
98
|
-
];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {INavbarData} from "./helper";
|
|
2
|
-
import {ClientListItem, SubClientListItem} from "../toolbar/toolbar-data";
|
|
3
|
-
|
|
4
|
-
export class SidenavData {
|
|
5
|
-
navData:INavbarData[];
|
|
6
|
-
bgColor:string;
|
|
7
|
-
imgSm:string;
|
|
8
|
-
imgLg:string;
|
|
9
|
-
client?: ClientListItem;
|
|
10
|
-
subclient?: SubClientListItem;
|
|
11
|
-
activeRole?: string;
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<div class="close sidenav-overlay" *ngIf="expanded"></div>
|
|
2
|
-
<aside class="sgh-sidebar" *ngIf="expanded" [@slideInOut]>
|
|
3
|
-
<div class="menu-wrapper">
|
|
4
|
-
<div class="sidebar_div " *ngFor="let data of sidenavData.navData">
|
|
5
|
-
<a (click)="onItemSelected(data)"
|
|
6
|
-
[routerLink]="[data.routeLink]" routerLinkActive="item-active" *ngIf="data.visible">
|
|
7
|
-
<div class="text-wrap">
|
|
8
|
-
<div class="icon-wrapper">
|
|
9
|
-
<i class="fa-size fa fa-{{data.icon}}"></i>
|
|
10
|
-
</div>
|
|
11
|
-
<div>
|
|
12
|
-
{{data.label}}
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<i class="fa-size fa fa-angle-down" *ngIf="!(data.items == undefined)"
|
|
16
|
-
[@indicatorRotate]="data.expanded ? 'expanded': 'collapsed'"></i>
|
|
17
|
-
</a>
|
|
18
|
-
<div class="sub-link-wrapper" *ngIf="data.expanded">
|
|
19
|
-
<app-menu-list-item [items]="data.items">
|
|
20
|
-
</app-menu-list-item>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="auth-info-wrp">
|
|
24
|
-
<div *ngIf="client && subclient" class="client-info-wrp">
|
|
25
|
-
<div>{{client?.text}}</div>
|
|
26
|
-
<i class="fa fa-angle-right"></i>
|
|
27
|
-
<div>{{subclient?.text}}</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div *ngIf="sidenavData.activeRole" class="role-info-wrp">
|
|
30
|
-
<span class="role-info-text">Logged in as </span>
|
|
31
|
-
<span class="role-info-text role">{{sidenavData.activeRole}}</span></div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</aside>
|