bulk-tool-menu-library 0.2.1 → 17.0.5
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/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 +85 -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/esm2022/test-bulk-tool.mjs +5 -0
- package/fesm2022/test-bulk-tool.mjs +449 -0
- package/fesm2022/test-bulk-tool.mjs.map +1 -0
- package/index.d.ts +5 -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 +25 -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,388 +0,0 @@
|
|
|
1
|
-
/* body{
|
|
2
|
-
font: normal normal 12px Arial, sans-serif !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
.sidenav-container {
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.sidenav {
|
|
12
|
-
width: 200px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.sidenav .mat-toolbar {
|
|
16
|
-
background: inherit;
|
|
17
|
-
font: normal normal 12px Arial, sans-serif !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.mat-toolbar.mat-primary {
|
|
21
|
-
position: -webkit-sticky;
|
|
22
|
-
position: sticky;
|
|
23
|
-
height: 40px;
|
|
24
|
-
font-size: 17px;
|
|
25
|
-
top: 10px;
|
|
26
|
-
z-index: 1;
|
|
27
|
-
font-weight: 5px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.example-container {
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 0;
|
|
37
|
-
bottom: 0;
|
|
38
|
-
left: 0;
|
|
39
|
-
right: 0;
|
|
40
|
-
height: auto;
|
|
41
|
-
min-height: 350px;
|
|
42
|
-
border:#999 solid 1px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.example-is-mobile .example-toolbar {
|
|
46
|
-
position: fixed;
|
|
47
|
-
z-index: 2;
|
|
48
|
-
}
|
|
49
|
-
.mat-list-base
|
|
50
|
-
{
|
|
51
|
-
padding-top:0px!important;
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.mat-drawer {
|
|
56
|
-
z-index: 4;
|
|
57
|
-
display: block;
|
|
58
|
-
position: absolute;
|
|
59
|
-
top: 40px;
|
|
60
|
-
bottom: 0;
|
|
61
|
-
z-index: 3;
|
|
62
|
-
outline: 0;
|
|
63
|
-
box-sizing: border-box;
|
|
64
|
-
transform: translate3d(-100%,0,0);
|
|
65
|
-
height: 50%;
|
|
66
|
-
background-color: rgba(235, 235, 255, 1);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.mat-drawer-backdrop.mat-drawer-shown
|
|
70
|
-
{
|
|
71
|
-
background-color: rgba(255, 255, 255, 1) !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
a.mat-list-item {
|
|
75
|
-
padding: 0px 10px;
|
|
76
|
-
background: rgba(235, 235, 255, 1) !important;
|
|
77
|
-
width: 100%;
|
|
78
|
-
display: block;
|
|
79
|
-
color: rgba(0, 0, 0, 0.87) !important;
|
|
80
|
-
}
|
|
81
|
-
.mat-drawer-inner-container {
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
overflow: inherit;
|
|
85
|
-
-webkit-overflow-scrolling: touch;
|
|
86
|
-
/* height: 300px !important; */
|
|
87
|
-
/* }
|
|
88
|
-
.subMenu{
|
|
89
|
-
margin: 0px;
|
|
90
|
-
width: 100%;
|
|
91
|
-
padding: 0px 15px;
|
|
92
|
-
background: rgba(235, 235, 255, 1) !important;
|
|
93
|
-
list-style: none;
|
|
94
|
-
}
|
|
95
|
-
.mat-list-base .mat-list-item .mat-list-option .mat-list-item-content{
|
|
96
|
-
margin: 0px;
|
|
97
|
-
height:30px!important;
|
|
98
|
-
}
|
|
99
|
-
.mat-list-base .mat-list-item .mat-list-item-content, .mat-list-base .mat-list-option .mat-list-item-content
|
|
100
|
-
{
|
|
101
|
-
padding: 0px,0px,0px,0px!important;
|
|
102
|
-
font: normal normal 15px Arial, sans-serif !important;
|
|
103
|
-
}
|
|
104
|
-
.example-container {
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
position: fixed;
|
|
108
|
-
top: 0;
|
|
109
|
-
bottom: 0;
|
|
110
|
-
left: 0;
|
|
111
|
-
right: 0;
|
|
112
|
-
height: auto;
|
|
113
|
-
min-height: auto;
|
|
114
|
-
} */
|
|
115
|
-
/* --------------------------------Mobile View Responsive ---------------- */
|
|
116
|
-
/* @media only screen
|
|
117
|
-
and (min-device-width: 320px)
|
|
118
|
-
and (max-device-width: 720px)
|
|
119
|
-
and (-webkit-min-device-pixel-ratio: 2) {
|
|
120
|
-
div#toolbarTitle h1{
|
|
121
|
-
font-size: 19px;
|
|
122
|
-
font-weight: bold;
|
|
123
|
-
color: #ffffff;
|
|
124
|
-
text-transform: uppercase;
|
|
125
|
-
}
|
|
126
|
-
app-adddealticket.ng-star-inserted {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 59px;
|
|
129
|
-
display: block;
|
|
130
|
-
padding: 0px;
|
|
131
|
-
margin: 0px;
|
|
132
|
-
}
|
|
133
|
-
app-adddealticket.ng-star-inserted h1{
|
|
134
|
-
font-size: 19px;
|
|
135
|
-
font-weight: bold;
|
|
136
|
-
color: #ffffff;
|
|
137
|
-
text-transform: uppercase;
|
|
138
|
-
}
|
|
139
|
-
.example-container {
|
|
140
|
-
display: flex;
|
|
141
|
-
flex-direction: column;
|
|
142
|
-
position: fixed;
|
|
143
|
-
top: 0;
|
|
144
|
-
bottom: 0;
|
|
145
|
-
left: 0;
|
|
146
|
-
right: 0;
|
|
147
|
-
height: auto;
|
|
148
|
-
min-height: auto;
|
|
149
|
-
}
|
|
150
|
-
.mat-toolbar.mat-primary {
|
|
151
|
-
position: -webkit-sticky;
|
|
152
|
-
position: sticky;
|
|
153
|
-
height: 56px;
|
|
154
|
-
font-size: 18px;
|
|
155
|
-
top: 0px;
|
|
156
|
-
z-index: 1;
|
|
157
|
-
font-weight: bold;
|
|
158
|
-
background: #054182;
|
|
159
|
-
}
|
|
160
|
-
.mat-drawer{
|
|
161
|
-
z-index: 4;
|
|
162
|
-
display: block;
|
|
163
|
-
position: absolute;
|
|
164
|
-
top: 40px;
|
|
165
|
-
bottom: 0;
|
|
166
|
-
z-index: 3;
|
|
167
|
-
outline: 0;
|
|
168
|
-
box-sizing: border-box;
|
|
169
|
-
-webkit-transform: translate3d(-100%,0,0);
|
|
170
|
-
background-color: rgba(235, 235, 255, 1);
|
|
171
|
-
transform: translate3d(-100%,0,0);
|
|
172
|
-
height: 50%;
|
|
173
|
-
/* min-height: 550px;
|
|
174
|
-
max-height: 550px; */
|
|
175
|
-
|
|
176
|
-
/* }
|
|
177
|
-
.mat-drawer-inner-container {
|
|
178
|
-
width: 100%;
|
|
179
|
-
overflow: auto;
|
|
180
|
-
-webkit-overflow-scrolling: touch;
|
|
181
|
-
/* min-height: 550px; */
|
|
182
|
-
/* background: #2f4050;
|
|
183
|
-
}
|
|
184
|
-
.mat-list-option:not(.mat-list-item-disabled):hover, .mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover {
|
|
185
|
-
background: #0c79df;
|
|
186
|
-
}
|
|
187
|
-
.mat-list-base .mat-list-item, .mat-list-base .mat-list-option {
|
|
188
|
-
display: block;
|
|
189
|
-
/* height: 35px; */
|
|
190
|
-
/* -webkit-tap-highlight-color: transparent; */
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
/* .mat-menu-panel.myMenu {
|
|
194
|
-
min-width: 35px;
|
|
195
|
-
max-width: 280px;
|
|
196
|
-
overflow: auto;
|
|
197
|
-
-webkit-overflow-scrolling: touch;
|
|
198
|
-
max-height: calc(100vh - 48px);
|
|
199
|
-
border-radius: 2px;
|
|
200
|
-
outline: 0;
|
|
201
|
-
background: transparent;
|
|
202
|
-
padding-left: 10px !important;
|
|
203
|
-
} */
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
/* .navbar-nav li:hover > ul.dropdown-menu {
|
|
207
|
-
display: block;
|
|
208
|
-
}
|
|
209
|
-
.dropdown-submenu {
|
|
210
|
-
position:relative;
|
|
211
|
-
}
|
|
212
|
-
.dropdown-submenu>.dropdown-menu {
|
|
213
|
-
top:0;
|
|
214
|
-
left:100%;
|
|
215
|
-
margin-top:-6px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
.dropdown-menu > li > a:hover:after {
|
|
220
|
-
text-decoration: underline;
|
|
221
|
-
transform: rotate(-90deg);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
@media (min-width: 220px) and (max-width: 775px) {
|
|
225
|
-
.hide-web{display:none !important}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
@media (min-width: 220px) and (max-width: 775px){
|
|
229
|
-
.view-mobile{display:block !important}
|
|
230
|
-
} */
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
/* new Styles for Menu */
|
|
234
|
-
.item{
|
|
235
|
-
cursor: not-allowed !important;
|
|
236
|
-
}
|
|
237
|
-
nav {
|
|
238
|
-
display: block;
|
|
239
|
-
text-align: left;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
nav ul {
|
|
244
|
-
margin: 0;
|
|
245
|
-
padding:0;
|
|
246
|
-
list-style: none;
|
|
247
|
-
}
|
|
248
|
-
.nav a {
|
|
249
|
-
display:block;
|
|
250
|
-
cursor: pointer;
|
|
251
|
-
color:#000;
|
|
252
|
-
text-decoration: none;
|
|
253
|
-
padding: .8em 1.8em;
|
|
254
|
-
text-transform:none;
|
|
255
|
-
font-size: 80%;letter-spacing: 1px;
|
|
256
|
-
position: relative;
|
|
257
|
-
font-family: Roboto,"Helvetica Neue", sans-serif !important;
|
|
258
|
-
}
|
|
259
|
-
.nav{
|
|
260
|
-
vertical-align: top;
|
|
261
|
-
display: inline-block;
|
|
262
|
-
border-radius:6px;
|
|
263
|
-
}
|
|
264
|
-
.nav li{position: relative;}
|
|
265
|
-
.item::before{
|
|
266
|
-
content: "";
|
|
267
|
-
position: absolute;
|
|
268
|
-
height: 0;
|
|
269
|
-
width: 0;
|
|
270
|
-
top: 50%;
|
|
271
|
-
right: 5px;
|
|
272
|
-
border: 5px solid transparent;
|
|
273
|
-
border-left-color: #000;
|
|
274
|
-
}
|
|
275
|
-
.nav > li {
|
|
276
|
-
float:left;
|
|
277
|
-
/* border-bottom: 4px #aaa solid; */
|
|
278
|
-
margin-right: 1px;
|
|
279
|
-
}
|
|
280
|
-
.nav > li > a {
|
|
281
|
-
margin-bottom:1px;
|
|
282
|
-
color: #fff;
|
|
283
|
-
cursor: pointer;
|
|
284
|
-
}
|
|
285
|
-
.nav > li:hover , .nav > li:hover >a{
|
|
286
|
-
/* border-bottom-color:whitex; */
|
|
287
|
-
}
|
|
288
|
-
.nav li:hover > a { background:rgba(0,0,0,0.04); }
|
|
289
|
-
.nav > li:first-child { border-radius: 4px 0 0 4px;}
|
|
290
|
-
.nav > li:first-child>a{border-radius: 4px 0 0 0;}
|
|
291
|
-
.nav > li:last-child {
|
|
292
|
-
border-radius: 0 0 4px 0;
|
|
293
|
-
margin-right: 0;
|
|
294
|
-
}
|
|
295
|
-
.nav > li:last-child >a{border-radius: 0 4px 0 0; }
|
|
296
|
-
.nav li li a { margin-top:1px}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
.nav li a:first-child:nth-last-child(2):before {
|
|
301
|
-
content:"";
|
|
302
|
-
position: absolute;
|
|
303
|
-
height:0;
|
|
304
|
-
width: 0;
|
|
305
|
-
/* border: 5px solid transparent; */
|
|
306
|
-
top: 50% ;
|
|
307
|
-
right:5px;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
/* submenu positioning*/
|
|
315
|
-
.nav ul {
|
|
316
|
-
position: absolute;
|
|
317
|
-
white-space: nowrap;
|
|
318
|
-
/* border-bottom: 5px solid #fff; */
|
|
319
|
-
background-color: #fff;
|
|
320
|
-
z-index:11111;
|
|
321
|
-
left: -99999em;
|
|
322
|
-
}
|
|
323
|
-
.nav > li:hover > ul {
|
|
324
|
-
left: auto;
|
|
325
|
-
padding-top: 5px ;
|
|
326
|
-
min-width: 100%;
|
|
327
|
-
box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
|
|
328
|
-
}
|
|
329
|
-
.nav > li li ul { border-left:1px solid #fff;}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
.nav > li li:hover > ul {
|
|
333
|
-
/* margin-left: 1px */
|
|
334
|
-
left: 100%;
|
|
335
|
-
top: -1px;
|
|
336
|
-
z-index: 1;
|
|
337
|
-
box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
|
|
338
|
-
}
|
|
339
|
-
/* arrow hover styling */
|
|
340
|
-
.nav > li > a:first-child:nth-last-child(2):before {
|
|
341
|
-
border-top-color: #aaa;
|
|
342
|
-
}
|
|
343
|
-
.nav > li:hover > a:first-child:nth-last-child(2):before {
|
|
344
|
-
border: 5px solid transparent;
|
|
345
|
-
/* border-bottom-color:white; */
|
|
346
|
-
margin-top:-5px
|
|
347
|
-
}
|
|
348
|
-
.nav li li > a:first-child:nth-last-child(2):before {
|
|
349
|
-
border-left-color: #aaa;
|
|
350
|
-
margin-top: -5px;
|
|
351
|
-
}
|
|
352
|
-
.nav li li:hover > a:first-child:nth-last-child(2):before {
|
|
353
|
-
border: 5px solid transparent;
|
|
354
|
-
border-right-color:#2f2c2c;
|
|
355
|
-
right: 10px;
|
|
356
|
-
}
|
|
357
|
-
.nav-header{
|
|
358
|
-
background: #779cf1;
|
|
359
|
-
width: 100%;
|
|
360
|
-
}
|
|
361
|
-
.nav-header > .nav > .nav-item{
|
|
362
|
-
color: #fff;
|
|
363
|
-
}
|
|
364
|
-
.nav-header > .nav > .nav-item a{
|
|
365
|
-
color: #fff;
|
|
366
|
-
}
|
|
367
|
-
.loade {
|
|
368
|
-
background: rgba(255, 255, 255, 0.5);
|
|
369
|
-
width: 100%;
|
|
370
|
-
height: 100%;
|
|
371
|
-
overflow: hidden;
|
|
372
|
-
position: absolute;
|
|
373
|
-
z-index: 1;
|
|
374
|
-
opacity: 50;
|
|
375
|
-
top:0px;
|
|
376
|
-
vertical-align: middle;
|
|
377
|
-
padding:40% 40%;
|
|
378
|
-
}
|
|
379
|
-
.permission{
|
|
380
|
-
padding: 10px;
|
|
381
|
-
color: red;
|
|
382
|
-
}
|
|
383
|
-
.navigateMsg{
|
|
384
|
-
text-align: center;
|
|
385
|
-
margin-top: 60px;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<div class="example-container">
|
|
3
|
-
|
|
4
|
-
<nav class="nav-header">
|
|
5
|
-
<ul class="nav">
|
|
6
|
-
<li class="nav-time">
|
|
7
|
-
<a>
|
|
8
|
-
<i class="fa fa-bars" style="font-size:24px"></i>
|
|
9
|
-
</a>
|
|
10
|
-
<ul>
|
|
11
|
-
<div *ngFor="let parent of MenuData">
|
|
12
|
-
<li *ngIf="parent.children && parent.children.length > 0">
|
|
13
|
-
<a class="item"> {{parent.displaytext}}</a>
|
|
14
|
-
<ul>
|
|
15
|
-
<li *ngFor="let child of parent.children">
|
|
16
|
-
<a (click)="listItemClick(child)">{{child.displaytext}}</a>
|
|
17
|
-
</li>
|
|
18
|
-
</ul>
|
|
19
|
-
</li>
|
|
20
|
-
<li *ngIf="!parent.children || parent.children.length === 0">
|
|
21
|
-
<a (click)="listItemClick(parent)">{{parent.displaytext}}</a>
|
|
22
|
-
</li>
|
|
23
|
-
</div>
|
|
24
|
-
<li>
|
|
25
|
-
<a (click)="onLogOut()">Logout</a>
|
|
26
|
-
</li>
|
|
27
|
-
</ul>
|
|
28
|
-
</li>
|
|
29
|
-
<li class="nav-item">
|
|
30
|
-
<h5 style="padding-top:12px;"> {{tooltext}}</h5>
|
|
31
|
-
</li>
|
|
32
|
-
</ul>
|
|
33
|
-
</nav>
|
|
34
|
-
<div *ngIf="IsPermissionExists==false" class="permission">User does't have permission to access any excel applications, please contact admin.</div>
|
|
35
|
-
<router-outlet></router-outlet>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="navigateMsg" *ngIf="navigateMsg">
|
|
38
|
-
{{navigateMsg}}
|
|
39
|
-
</div>
|
|
40
|
-
<section class="loade" *ngIf="isLoading">
|
|
41
|
-
<mat-spinner color="black" [diameter]=60 ></mat-spinner>
|
|
42
|
-
<span>
|
|
43
|
-
Loading...
|
|
44
|
-
</span>
|
|
45
|
-
</section>
|
|
46
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MenuComponent } from './menu.component';
|
|
4
|
-
|
|
5
|
-
describe('MenuComponent', () => {
|
|
6
|
-
let component: MenuComponent;
|
|
7
|
-
let fixture: ComponentFixture<MenuComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ MenuComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(MenuComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -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
|
-
}
|