sgh-navbar 0.0.37 → 0.0.39
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,173 +0,0 @@
|
|
|
1
|
-
.sidebar_div a > div > i {
|
|
2
|
-
padding-right: 10px;
|
|
3
|
-
}
|
|
4
|
-
.menu-wrapper{
|
|
5
|
-
min-height: calc(100vh - 70px);
|
|
6
|
-
overflow: auto;
|
|
7
|
-
position: relative;
|
|
8
|
-
.auth-info-wrp{
|
|
9
|
-
position: absolute;
|
|
10
|
-
bottom: 0;
|
|
11
|
-
width: 100%;
|
|
12
|
-
padding-top: 5px;
|
|
13
|
-
border-top: 1px solid lightgrey;
|
|
14
|
-
color: #005860;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
.client-info-wrp {
|
|
18
|
-
display: flex;
|
|
19
|
-
gap: 10px;
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
}
|
|
23
|
-
.role-info-wrp {
|
|
24
|
-
font-size: 12px;
|
|
25
|
-
.role-info-text{
|
|
26
|
-
font-weight: normal;
|
|
27
|
-
&.role{
|
|
28
|
-
font-weight: bold;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
.fa-size {
|
|
35
|
-
font-size: 1.6em;
|
|
36
|
-
line-height: .75em;
|
|
37
|
-
vertical-align: -15%;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.sgh-sidebar {
|
|
41
|
-
height: auto;
|
|
42
|
-
min-height: 100% !important;
|
|
43
|
-
max-height: calc(100vh - 60px);
|
|
44
|
-
box-shadow: 0 1px 0 -1px rgba(0, 0, 0, 0), 0 1px 1px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1215686275);
|
|
45
|
-
border-right: none;
|
|
46
|
-
overflow-y: auto;
|
|
47
|
-
padding: 5px 0;
|
|
48
|
-
font-size: 12px;
|
|
49
|
-
margin-right: 10px;
|
|
50
|
-
background: white;
|
|
51
|
-
width: 240px;
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: center !important;
|
|
55
|
-
z-index: 1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.sidebar_div {
|
|
59
|
-
margin: 0;
|
|
60
|
-
padding: 0;
|
|
61
|
-
width: 220px;
|
|
62
|
-
overflow: hidden !important;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* sidebar_div links */
|
|
66
|
-
.sidebar_div a {
|
|
67
|
-
color: #005860;
|
|
68
|
-
padding: 10px 14px;
|
|
69
|
-
text-decoration: none;
|
|
70
|
-
margin: 0 5px;
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: space-between;
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* Active/current link */
|
|
78
|
-
.sidebar_div a.active {
|
|
79
|
-
background-color: #006068;
|
|
80
|
-
border-radius: 13px;
|
|
81
|
-
|
|
82
|
-
.text-wrap , .text-wrapper{
|
|
83
|
-
color: white !important;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.text-wrap{
|
|
88
|
-
display: flex;
|
|
89
|
-
justify-content: flex-start;
|
|
90
|
-
width: 100%;
|
|
91
|
-
.icon-wrapper{
|
|
92
|
-
width: 15%;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
/* Links on mouse-over */
|
|
96
|
-
.sidebar_div a:hover:not(.active) {
|
|
97
|
-
background-color: #26787f !important;
|
|
98
|
-
color: white;
|
|
99
|
-
border-radius: 12px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* Page content. The value of the margin-left property should match the value of the sidebar_div's width property */
|
|
103
|
-
div.content {
|
|
104
|
-
margin-left: 200px;
|
|
105
|
-
padding: 1px 16px;
|
|
106
|
-
height: 1000px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* On screens that are less than 700px wide, make the sidebar_div into a topbar */
|
|
110
|
-
@media screen and (max-width: 700px) {
|
|
111
|
-
.sidebar_div {
|
|
112
|
-
//width: 100%;
|
|
113
|
-
height: auto;
|
|
114
|
-
position: relative;
|
|
115
|
-
}
|
|
116
|
-
div.content {
|
|
117
|
-
margin-left: 0;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* On screens that are less than 400px, display the bar vertically, instead of horizontally */
|
|
122
|
-
@media screen and (max-width: 400px) {
|
|
123
|
-
.sidebar_div a {
|
|
124
|
-
text-align: center;
|
|
125
|
-
float: none;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.nav-list li a {
|
|
131
|
-
text-decoration: none;
|
|
132
|
-
display: block;
|
|
133
|
-
padding: 10px;
|
|
134
|
-
cursor: pointer;
|
|
135
|
-
border-bottom: 1px solid #515151 !important;
|
|
136
|
-
color: #9d9d9d;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.nav-list > li > a {
|
|
140
|
-
color: #C4C4C4;
|
|
141
|
-
font-size: 14px;
|
|
142
|
-
padding-left: 15px !important;
|
|
143
|
-
border-bottom: 1px solid #585858;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.nav-list > li > a:hover {
|
|
147
|
-
background-color: #444444;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.sidenav-overlay {
|
|
151
|
-
display: none;
|
|
152
|
-
position: fixed;
|
|
153
|
-
width: 100%;
|
|
154
|
-
height: 100%;
|
|
155
|
-
background-color: #00000063 !important;
|
|
156
|
-
left: 0%;
|
|
157
|
-
top: 0;
|
|
158
|
-
z-index: 1;
|
|
159
|
-
cursor: default;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@media screen and (max-width: 600px) {
|
|
163
|
-
.sidebar_div{
|
|
164
|
-
margin: 0 0 !important;
|
|
165
|
-
}
|
|
166
|
-
.sgh-sidebar {
|
|
167
|
-
position: fixed !important;
|
|
168
|
-
background: white !important;
|
|
169
|
-
}
|
|
170
|
-
.sidenav-overlay {
|
|
171
|
-
display: block;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {animate, keyframes, state, style, transition, trigger} from '@angular/animations';
|
|
2
|
-
import {
|
|
3
|
-
Component,
|
|
4
|
-
Output,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
OnInit,
|
|
7
|
-
Input,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import {Router} from '@angular/router';
|
|
10
|
-
import {navbarData} from './nav-data';
|
|
11
|
-
import {SghNavbarService} from "../sgh-navbar.service";
|
|
12
|
-
import {SidenavData} from "./sidenav-data";
|
|
13
|
-
|
|
14
|
-
interface SideNavToggle {
|
|
15
|
-
screenWidth: number;
|
|
16
|
-
collapsed: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Component({
|
|
20
|
-
selector: 'app-sidenav',
|
|
21
|
-
templateUrl: './sidenav.component.html',
|
|
22
|
-
styleUrls: ['./sidenav.component.scss'],
|
|
23
|
-
animations: [
|
|
24
|
-
trigger('rotate', [
|
|
25
|
-
transition(':enter', [
|
|
26
|
-
animate('1000ms',
|
|
27
|
-
keyframes([
|
|
28
|
-
style({transform: 'rotate(0deg)', offset: '0'}),
|
|
29
|
-
style({transform: 'rotate(2turn)', offset: '1'})
|
|
30
|
-
])
|
|
31
|
-
)
|
|
32
|
-
])
|
|
33
|
-
]),
|
|
34
|
-
trigger('indicatorRotate', [
|
|
35
|
-
state('collapsed', style({transform: 'rotate(0deg)'})),
|
|
36
|
-
state('expanded', style({transform: 'rotate(180deg)'})),
|
|
37
|
-
transition('expanded <=> collapsed',
|
|
38
|
-
animate('225ms cubic-bezier(0.4,0.0,0.2,1)')
|
|
39
|
-
),
|
|
40
|
-
]),
|
|
41
|
-
trigger('slideInOut', [
|
|
42
|
-
transition(':enter', [style({transform: 'translateX(-100px)'}), animate('.5s ease-out', style({transform: 'translateX(0%)'}))]),
|
|
43
|
-
transition(':leave', [
|
|
44
|
-
style({ transform: 'translateX(0%)' }),
|
|
45
|
-
animate('.5s ease-out', style({ transform: 'translateX(-100%)' }))
|
|
46
|
-
])
|
|
47
|
-
])
|
|
48
|
-
]
|
|
49
|
-
})
|
|
50
|
-
export class SidenavComponent implements OnInit {
|
|
51
|
-
|
|
52
|
-
@Output() onToggleSideNav: EventEmitter<SideNavToggle> = new EventEmitter();
|
|
53
|
-
@Input() expanded:boolean;
|
|
54
|
-
@Input() sidenavData: SidenavData = {
|
|
55
|
-
navData: navbarData,
|
|
56
|
-
bgColor: '#fff',
|
|
57
|
-
imgSm: '',
|
|
58
|
-
imgLg: ''
|
|
59
|
-
}
|
|
60
|
-
client;
|
|
61
|
-
subclient;
|
|
62
|
-
|
|
63
|
-
constructor(public router: Router, private sidebarService: SghNavbarService) {
|
|
64
|
-
this.sidebarService.getClient().subscribe((client) => {
|
|
65
|
-
this.client = client;
|
|
66
|
-
});
|
|
67
|
-
this.sidebarService.getSubclient().subscribe((subclient) => {
|
|
68
|
-
this.subclient = subclient;
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
ngOnInit(): void {
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
onItemSelected(item: any) {
|
|
77
|
-
if (!item.items || !item.items.length) {
|
|
78
|
-
this.router.navigate([item.routeLink]).then();
|
|
79
|
-
}
|
|
80
|
-
if (item.items && item.items.length) {
|
|
81
|
-
item.expanded = !item.expanded;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
2
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
-
import { Router } from '@angular/router';
|
|
4
|
-
import { fadeInOut, INavbarData } from './helper';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-sublevel-menu',
|
|
8
|
-
template: `
|
|
9
|
-
<ul *ngIf="collapsed && data.items && data.items.length > 0"
|
|
10
|
-
[@submenu]="expanded
|
|
11
|
-
? {value: 'visible',
|
|
12
|
-
params: {transitionParams: '400ms cubic-bezier(0.86, 0, 0.07, 1)', height: '*'}}
|
|
13
|
-
: {value: 'hidden',
|
|
14
|
-
params: {transitionParams: '400ms cubic-bezier(0.86, 0, 0.07, 1)', height: '0'}}"
|
|
15
|
-
class="sublevel-nav"
|
|
16
|
-
>
|
|
17
|
-
<li *ngFor="let item of data.items" class="sublevel-nav-item">
|
|
18
|
-
<a class="sublevel-nav-link"
|
|
19
|
-
(click)="handleClick(item)"
|
|
20
|
-
*ngIf="item.items && item.items.length > 0 && item.visible"
|
|
21
|
-
[ngClass]="getActiveClass(item)"
|
|
22
|
-
>
|
|
23
|
-
<i class="sublevel-link-icon fa fa-circle"></i>
|
|
24
|
-
<span class="sublevel-link-text" @fadeInOut
|
|
25
|
-
*ngIf="collapsed">{{item.label}}</span>
|
|
26
|
-
<i *ngIf="item.items && collapsed" class="menu-collapse-icon"
|
|
27
|
-
[ngClass]="!item.expanded ? 'fal fa-angle-right' : 'fal fa-angle-down'"
|
|
28
|
-
></i>
|
|
29
|
-
</a>
|
|
30
|
-
<a class="sublevel-nav-link"
|
|
31
|
-
*ngIf="(!item.items || (item.items && item.items.length === 0)) && item.visible"
|
|
32
|
-
[routerLink]="[item.routeLink]"
|
|
33
|
-
routerLinkActive="active-sublevel"
|
|
34
|
-
[routerLinkActiveOptions]="{exact: true}"
|
|
35
|
-
>
|
|
36
|
-
<i class="sublevel-link-icon fa fa-circle"></i>
|
|
37
|
-
<span class="sublevel-link-text" @fadeInOut
|
|
38
|
-
*ngIf="collapsed">{{item.label}}</span>
|
|
39
|
-
</a>
|
|
40
|
-
<div *ngIf="item.items && item.items.length > 0">
|
|
41
|
-
<app-sublevel-menu
|
|
42
|
-
[data]="item"
|
|
43
|
-
[collapsed]="collapsed"
|
|
44
|
-
[multiple]="multiple"
|
|
45
|
-
[expanded]="item.expanded"
|
|
46
|
-
></app-sublevel-menu>
|
|
47
|
-
</div>
|
|
48
|
-
</li>
|
|
49
|
-
</ul>
|
|
50
|
-
`,
|
|
51
|
-
styleUrls: ['./sidenav.component.scss'],
|
|
52
|
-
animations: [
|
|
53
|
-
fadeInOut,
|
|
54
|
-
trigger('submenu', [
|
|
55
|
-
state('hidden', style({
|
|
56
|
-
height: '0',
|
|
57
|
-
overflow: 'hidden'
|
|
58
|
-
})),
|
|
59
|
-
state('visible', style({
|
|
60
|
-
height: '*'
|
|
61
|
-
})),
|
|
62
|
-
transition('visible <=> hidden', [style({overflow: 'hidden'}),
|
|
63
|
-
animate('{{transitionParams}}')]),
|
|
64
|
-
transition('void => *', animate(0))
|
|
65
|
-
])
|
|
66
|
-
]
|
|
67
|
-
})
|
|
68
|
-
export class SublevelMenuComponent implements OnInit {
|
|
69
|
-
|
|
70
|
-
@Input() data: INavbarData = {
|
|
71
|
-
routeLink: '',
|
|
72
|
-
icon: '',
|
|
73
|
-
label: '',
|
|
74
|
-
visible: true,
|
|
75
|
-
items: []
|
|
76
|
-
}
|
|
77
|
-
@Input() collapsed = false;
|
|
78
|
-
@Input() animating: boolean | undefined;
|
|
79
|
-
@Input() expanded: boolean | undefined;
|
|
80
|
-
@Input() multiple: boolean = false;
|
|
81
|
-
|
|
82
|
-
constructor(public router: Router) {}
|
|
83
|
-
|
|
84
|
-
ngOnInit(): void {
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
handleClick(item: any): void {
|
|
88
|
-
if (!this.multiple) {
|
|
89
|
-
if (this.data.items && this.data.items.length > 0) {
|
|
90
|
-
for(let modelItem of this.data.items) {
|
|
91
|
-
if (item !==modelItem && modelItem.expanded) {
|
|
92
|
-
modelItem.expanded = false;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
item.expanded = !item.expanded;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
getActiveClass(item: INavbarData): string {
|
|
101
|
-
return item.expanded && this.router.url.includes(item.routeLink)
|
|
102
|
-
? 'active-sublevel'
|
|
103
|
-
: '';
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
}
|
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<div class="notifications-list-wrapper">
|
|
2
|
-
<div class="notifications-list">
|
|
3
|
-
<div class="notifications-title">
|
|
4
|
-
<span class="title mat-h3">Notifications</span>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="notifications-list-item">
|
|
7
|
-
<span class="item-title mat-h4">David James</span>
|
|
8
|
-
<span class="item-description mat-h5">A notification box show message</span>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="notifications-list-item">
|
|
11
|
-
<span class="item-title mat-h4">David James</span>
|
|
12
|
-
<span class="item-description mat-h5">A notification box show message</span>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="notifications-title">
|
|
15
|
-
<span class="see-all mat-h4">See all</span>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
$border-bottom-color: #f1f1f3;
|
|
2
|
-
$sgh-color-palette-50:#e0eced;
|
|
3
|
-
$sgh-color-palette-500:#006068;
|
|
4
|
-
$text-color: rgba(0,0,0,0.87);
|
|
5
|
-
.notifications-list-wrapper {
|
|
6
|
-
padding: 10px;
|
|
7
|
-
position: absolute;
|
|
8
|
-
right: 10px;
|
|
9
|
-
top: 45px;
|
|
10
|
-
z-index: 2;
|
|
11
|
-
color: $text-color;
|
|
12
|
-
width: 400px;
|
|
13
|
-
.notifications-list {
|
|
14
|
-
box-shadow: 0 2px 10px rgba(0,0,0,0.15);
|
|
15
|
-
position: relative;
|
|
16
|
-
.notifications-title {
|
|
17
|
-
background-color: #ffffff;
|
|
18
|
-
text-align: center;
|
|
19
|
-
padding: 20px 10px;
|
|
20
|
-
border-bottom: 1px solid $border-bottom-color;
|
|
21
|
-
}
|
|
22
|
-
.notifications-list-item {
|
|
23
|
-
padding: 10px 10px 10px 30px;
|
|
24
|
-
background-color: $sgh-color-palette-50;
|
|
25
|
-
border-bottom: 1px solid $border-bottom-color;
|
|
26
|
-
.item-title {
|
|
27
|
-
margin: 0;
|
|
28
|
-
white-space: normal;
|
|
29
|
-
margin-right: 5px;
|
|
30
|
-
}
|
|
31
|
-
.item-description {
|
|
32
|
-
margin: 0;
|
|
33
|
-
color: $text-color;
|
|
34
|
-
opacity: 0.5;
|
|
35
|
-
white-space: normal;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.see-all {
|
|
39
|
-
background-color: #ffffff;
|
|
40
|
-
color: $sgh-color-palette-500;
|
|
41
|
-
font-weight: 500;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
@media screen and (max-width: 599px) {
|
|
46
|
-
.notifications-list-wrapper {
|
|
47
|
-
width: auto;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.notifications-list-wrapper {
|
|
52
|
-
-webkit-animation: cardAnim 1s cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none;
|
|
53
|
-
animation: cardAnim 1s cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none;
|
|
54
|
-
}
|
|
55
|
-
@keyframes cardAnim {
|
|
56
|
-
0% {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
transform: rotateX(-100deg);
|
|
59
|
-
transform-origin: top;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
100% {
|
|
63
|
-
opacity: 1;
|
|
64
|
-
transform: rotateX(0deg);
|
|
65
|
-
transform-origin: top;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { NoftificationListComponent } from './noftification-list.component';
|
|
4
|
-
|
|
5
|
-
describe('NoftificationListComponent', () => {
|
|
6
|
-
let component: NoftificationListComponent;
|
|
7
|
-
let fixture: ComponentFixture<NoftificationListComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ NoftificationListComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(NoftificationListComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-noftification-list',
|
|
5
|
-
templateUrl: './noftification-list.component.html',
|
|
6
|
-
styleUrls: ['./noftification-list.component.scss']
|
|
7
|
-
})
|
|
8
|
-
export class NoftificationListComponent implements OnInit {
|
|
9
|
-
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit(): void {
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Pipe({
|
|
4
|
-
name: 'search'
|
|
5
|
-
})
|
|
6
|
-
export class SearchPipe implements PipeTransform {
|
|
7
|
-
|
|
8
|
-
transform(values: any, args?: any): any {
|
|
9
|
-
if (args === undefined) {
|
|
10
|
-
return values;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return values.filter(value => {
|
|
14
|
-
return value.text.toLowerCase().includes(args.toLowerCase());
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div class="subclientlist-wrapper dialog-wrapper">
|
|
2
|
-
<h4 class="subclientlist-header">Select Sub Client</h4>
|
|
3
|
-
<div class="subclientlist-body">
|
|
4
|
-
<div>
|
|
5
|
-
<mat-radio-group class="subclientlist-radiogrp" aria-label="Select an option">
|
|
6
|
-
<mat-radio-button [value]="item.value" *ngFor="let item of subClientList;index as i" (click)="onSubClientSelect(item)" [checked]="item.checked">{{item.text}}</mat-radio-button>
|
|
7
|
-
</mat-radio-group>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="subclientlist-btns">
|
|
11
|
-
<button class="sgh-btn-primary" (click)="onSelectBtnClick()">Select</button>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
.subclientlist-wrapper {
|
|
2
|
-
|
|
3
|
-
.subclientlist-header {
|
|
4
|
-
font-weight: 500;
|
|
5
|
-
line-height: 48px;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
padding-bottom: 0;
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.subclientlist-body {
|
|
14
|
-
font-weight: 400;
|
|
15
|
-
text-align: center;
|
|
16
|
-
color: black;
|
|
17
|
-
padding: 0 15px 15px 15px;
|
|
18
|
-
.subclientlist-radiogrp {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
justify-content: flex-start;
|
|
22
|
-
align-items: flex-start;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.subclientlist-btns {
|
|
27
|
-
padding: 0;
|
|
28
|
-
min-height: 48px
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
button {
|
|
32
|
-
width: 100%;
|
|
33
|
-
margin-bottom: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.mat-mdc-dialog-actions .mat-mdc-button-base + .mat-mdc-button-base {
|
|
37
|
-
margin-left: 0
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SubClientDialogComponent } from './sub-client-dialog.component';
|
|
4
|
-
|
|
5
|
-
describe('SubclientDialogComponent', () => {
|
|
6
|
-
let component: SubClientDialogComponent;
|
|
7
|
-
let fixture: ComponentFixture<SubClientDialogComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ SubClientDialogComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SubClientDialogComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, Inject, Output} from '@angular/core';
|
|
2
|
-
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
|
3
|
-
import {ClientListItem, SubClientListItem} from "../toolbar-data";
|
|
4
|
-
import {SghNavbarService} from "../../sgh-navbar.service";
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'lib-subclient-dialog',
|
|
8
|
-
templateUrl: './sub-client-dialog.component.html',
|
|
9
|
-
styleUrls: ['./sub-client-dialog.component.scss']
|
|
10
|
-
})
|
|
11
|
-
export class SubClientDialogComponent {
|
|
12
|
-
client: ClientListItem;
|
|
13
|
-
subClientList: SubClientListItem[];
|
|
14
|
-
@Output() subClient = new EventEmitter<any>();
|
|
15
|
-
selectedSubClient: SubClientListItem;
|
|
16
|
-
|
|
17
|
-
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<SubClientDialogComponent>, private sghNavbarService: SghNavbarService) {
|
|
18
|
-
this.client = data.client;
|
|
19
|
-
this.subClientList = data.client.subClientList;
|
|
20
|
-
// find the selected sub client
|
|
21
|
-
let selectedSubClientIndex = this.subClientList.findIndex((subClient) => subClient.checked == true);
|
|
22
|
-
this.selectedSubClient = this.subClientList[selectedSubClientIndex];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
onSubClientSelect(item: SubClientListItem) {
|
|
26
|
-
|
|
27
|
-
// update the sub client list with newly selected values
|
|
28
|
-
this.subClientList.forEach((subClient) => {
|
|
29
|
-
if (subClient == item) {
|
|
30
|
-
subClient.checked = true
|
|
31
|
-
} else {
|
|
32
|
-
subClient.checked = false;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
this.selectedSubClient = item;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onSelectBtnClick() {
|
|
39
|
-
this.dialogRef.close({data: {selectedSubClient: this.selectedSubClient}});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export class ToolbarData {
|
|
2
|
-
themeOptions: ThemeOption[]
|
|
3
|
-
clientList?: ClientListItem[]
|
|
4
|
-
bgColor: string;
|
|
5
|
-
img: string;
|
|
6
|
-
searchEnable?: boolean;
|
|
7
|
-
notificationEnable?: boolean;
|
|
8
|
-
profileEnable?: boolean;
|
|
9
|
-
settingsEnable?: boolean;
|
|
10
|
-
profileView?: boolean;
|
|
11
|
-
profileContent?: any;
|
|
12
|
-
clientConfigurationEnable?: boolean;
|
|
13
|
-
applicationConfigurationEnable?: boolean;
|
|
14
|
-
isThemeCollapsed?: boolean;
|
|
15
|
-
isNotifNavCollapsed?: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class ThemeOption {
|
|
19
|
-
name: string;
|
|
20
|
-
value: string;
|
|
21
|
-
checked: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class ClientListItem {
|
|
25
|
-
text: string;
|
|
26
|
-
value: string;
|
|
27
|
-
selected: boolean;
|
|
28
|
-
subClientList?: SubClientListItem[]
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class SubClientListItem {
|
|
32
|
-
text: string;
|
|
33
|
-
value: string;
|
|
34
|
-
checked: boolean
|
|
35
|
-
}
|