@adins/ucviewgeneric 2.3.3 → 2.4.0

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.
Files changed (41) hide show
  1. package/README.md +3 -2
  2. package/adins-ucviewgeneric.d.ts +1 -0
  3. package/esm2020/adins-ucviewgeneric.mjs +5 -0
  4. package/esm2020/lib/model/envi-obj.model.mjs +7 -0
  5. package/esm2020/lib/model/uc-view-generic-obj.model.mjs +29 -0
  6. package/esm2020/lib/ucviewgeneric.component.mjs +411 -0
  7. package/esm2020/lib/ucviewgeneric.module.mjs +34 -0
  8. package/esm2020/lib/ucviewgeneric.service.mjs +14 -0
  9. package/esm2020/public-api.mjs +7 -0
  10. package/fesm2015/adins-ucviewgeneric.mjs +488 -0
  11. package/fesm2015/adins-ucviewgeneric.mjs.map +1 -0
  12. package/fesm2020/adins-ucviewgeneric.mjs +488 -0
  13. package/fesm2020/adins-ucviewgeneric.mjs.map +1 -0
  14. package/lib/model/uc-view-generic-obj.model.d.ts +1 -0
  15. package/lib/ucviewgeneric.component.d.ts +5 -0
  16. package/lib/ucviewgeneric.module.d.ts +9 -0
  17. package/lib/ucviewgeneric.service.d.ts +3 -0
  18. package/package.json +24 -13
  19. package/adins-ucviewgeneric.metadata.json +0 -1
  20. package/bundles/adins-ucviewgeneric.umd.js +0 -643
  21. package/bundles/adins-ucviewgeneric.umd.js.map +0 -1
  22. package/bundles/adins-ucviewgeneric.umd.min.js +0 -2
  23. package/bundles/adins-ucviewgeneric.umd.min.js.map +0 -1
  24. package/esm2015/adins-ucviewgeneric.js +0 -9
  25. package/esm2015/lib/model/envi-obj.model.js +0 -17
  26. package/esm2015/lib/model/uc-view-generic-obj.model.js +0 -63
  27. package/esm2015/lib/ucviewgeneric.component.js +0 -557
  28. package/esm2015/lib/ucviewgeneric.module.js +0 -25
  29. package/esm2015/lib/ucviewgeneric.service.js +0 -18
  30. package/esm2015/public-api.js +0 -11
  31. package/esm5/adins-ucviewgeneric.js +0 -9
  32. package/esm5/lib/model/envi-obj.model.js +0 -19
  33. package/esm5/lib/model/uc-view-generic-obj.model.js +0 -71
  34. package/esm5/lib/ucviewgeneric.component.js +0 -613
  35. package/esm5/lib/ucviewgeneric.module.js +0 -29
  36. package/esm5/lib/ucviewgeneric.service.js +0 -21
  37. package/esm5/public-api.js +0 -11
  38. package/fesm2015/adins-ucviewgeneric.js +0 -585
  39. package/fesm2015/adins-ucviewgeneric.js.map +0 -1
  40. package/fesm5/adins-ucviewgeneric.js +0 -646
  41. package/fesm5/adins-ucviewgeneric.js.map +0 -1
@@ -1,585 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { CookieService } from 'ngx-cookie';
3
- import { enc, lib, AES } from 'crypto-js';
4
- import { Injectable, NgModule, Component, Input, Output, EventEmitter, defineInjectable } from '@angular/core';
5
- import { CommonModule } from '@angular/common';
6
- import { ActivatedRoute, RouterModule } from '@angular/router';
7
- import { UcSubsectionModule } from '@adins/uc-subsection';
8
- import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
-
10
- /**
11
- * @fileoverview added by tsickle
12
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13
- */
14
- class UcviewgenericService {
15
- constructor() { }
16
- }
17
- UcviewgenericService.decorators = [
18
- { type: Injectable, args: [{
19
- providedIn: 'root'
20
- },] }
21
- ];
22
- /** @nocollapse */
23
- UcviewgenericService.ctorParameters = () => [];
24
- /** @nocollapse */ UcviewgenericService.ngInjectableDef = defineInjectable({ factory: function UcviewgenericService_Factory() { return new UcviewgenericService(); }, token: UcviewgenericService, providedIn: "root" });
25
-
26
- /**
27
- * @fileoverview added by tsickle
28
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
29
- */
30
- class UcViewGenericObj {
31
- constructor() {
32
- this.viewInput = "";
33
- this.viewEnvironment = "";
34
- this.ddlEnvironments = new Array();
35
- this.listEnvironments = new Array();
36
- this.whereValue = new Array();
37
- }
38
- }
39
-
40
- /**
41
- * @fileoverview added by tsickle
42
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
43
- */
44
- class UcviewgenericComponent {
45
- /**
46
- * @param {?} route
47
- * @param {?} http
48
- * @param {?} translateService
49
- * @param {?} cookieService
50
- */
51
- constructor(route, http, translateService, cookieService) {
52
- this.route = route;
53
- this.http = http;
54
- this.translateService = translateService;
55
- this.cookieService = cookieService;
56
- this.viewGenericObj = new UcViewGenericObj();
57
- this.callback = new EventEmitter();
58
- this.UserAccess = JSON.parse(this.GetCookie(this.cookieService, "UserAccess"));
59
- this.viewList = "";
60
- this.isReady = false;
61
- this.route.queryParams.subscribe((/**
62
- * @param {?} params
63
- * @return {?}
64
- */
65
- params => {
66
- this.getList = params;
67
- }));
68
- this.translateService.setDefaultLang('en');
69
- this.translateService.use(localStorage.getItem('lang') || 'en');
70
- }
71
- /**
72
- * @return {?}
73
- */
74
- ngOnInit() {
75
- console.log("viewgeneric");
76
- this.initiateForm();
77
- }
78
- /**
79
- * @return {?}
80
- */
81
- initiateForm() {
82
- this.getJSON(this.viewGenericObj.viewInput).subscribe((/**
83
- * @param {?} data
84
- * @return {?}
85
- */
86
- data => {
87
- this.viewList = data;
88
- this.viewInfoObjList = [];
89
- for (let j = 0; j < this.viewList.subsection.length; j++) {
90
- this.viewInfoObjList.push(j);
91
- }
92
- for (let i = 0; i < this.viewList.subsection.length; i++) {
93
- if (this.viewList.subsection[i].querystring != null) {
94
- /** @type {?} */
95
- let queryObj;
96
- if (this.viewGenericObj.whereValue.length == 0) {
97
- this.viewList.subsection[i].querystring.whereQuery = ((/** @type {?} */ (Object))).values(this.getList);
98
- }
99
- else {
100
- this.viewList.subsection[i].querystring.whereQuery = this.viewGenericObj.whereValue;
101
- }
102
- if (this.viewList.subsection[i].mainInfoPath != undefined && this.viewList.subsection[i].mainInfoPath != "") {
103
- if (this.viewGenericObj.viewEnvironment != undefined && this.viewGenericObj.viewEnvironment != "") {
104
- this.viewList.subsection[i].fullpath = this.viewGenericObj.viewEnvironment + this.viewList.subsection[i].mainInfoPath;
105
- }
106
- else {
107
- this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;
108
- }
109
- }
110
- else {
111
- this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;
112
- }
113
- queryObj = {
114
- querystring: this.viewList.subsection[i].querystring
115
- };
116
- this.http.post(this.viewList.subsection[i].fullpath, queryObj).subscribe((/**
117
- * @param {?} response
118
- * @return {?}
119
- */
120
- (response) => {
121
- this.viewInfoObjList[i] = response["Data"][0];
122
- for (let y = 0; y < this.viewList.subsection[i].mainInfo.length; y++) {
123
- if (this.viewList.subsection[i].mainInfo[y].propertyList != undefined && this.viewList.subsection[i].mainInfo[y].propertyList.length != 0) {
124
- /** @type {?} */
125
- const propertyList = this.viewList.subsection[i].mainInfo[y].propertyList;
126
- /** @type {?} */
127
- let concat = "";
128
- for (let z = 0; z < propertyList.length; z++) {
129
- concat = concat + propertyList[z].prefix + this.viewInfoObjList[i][propertyList[z].property] + propertyList[z].suffix;
130
- }
131
- this.viewList.subsection[i].mainInfo[y].concat = concat;
132
- }
133
- //switch case
134
- if (this.viewList.subsection[i].mainInfo[y].type == "switch") {
135
- for (let z = 0; z < this.viewList.subsection[i].mainInfo[y].case.length; z++) {
136
- /** @type {?} */
137
- let Empty = new Array();
138
- this.viewList.subsection[i].mainInfo[y].case[z].Hidden = false;
139
- //check hideIfEmpty
140
- if (this.viewList.subsection[i].mainInfo[y].case[z].result.hideIfEmpty != undefined && this.viewList.subsection[i].mainInfo[y].case[z].result.hideIfEmpty != null) {
141
- if (this.viewList.subsection[i].mainInfo[y].case[z].result.type != "concat") {
142
- Empty.push(this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z].result.property] != undefined
143
- && this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z].result.property] != null
144
- && this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z].result.property] != "" ? false : true);
145
- }
146
- else { // type concat
147
- if (this.viewList.subsection[i].mainInfo[y].case[z].result.propertyList != undefined && this.viewList.subsection[i].mainInfo[y].case[z].result.propertyList.length != 0) {
148
- /** @type {?} */
149
- const propertyList = this.viewList.subsection[i].mainInfo[y].case[z].result.propertyList;
150
- /** @type {?} */
151
- let concat = "";
152
- for (let a = 0; a < propertyList.length; a++) {
153
- concat = concat + propertyList[a].prefix + this.viewInfoObjList[i][propertyList[a].property] + propertyList[a].suffix;
154
- Empty.push(this.viewInfoObjList[i][propertyList[a].property] != undefined
155
- && this.viewInfoObjList[i][propertyList[a].property] != null
156
- && this.viewInfoObjList[i][propertyList[a].property] != "" ? false : true);
157
- }
158
- this.viewList.subsection[i].mainInfo[y].case[z].result.concat = concat;
159
- }
160
- }
161
- if (Empty.includes(true) && this.viewList.subsection[i].mainInfo[y].case[z].result.hideIfEmpty) {
162
- this.viewList.subsection[i].mainInfo[y].case[z].Hidden = true;
163
- this.viewList.subsection[i].mainInfo[y].isHide = true;
164
- }
165
- }
166
- else {
167
- //concat
168
- if (this.viewList.subsection[i].mainInfo[y].case[z].result.propertyList != undefined && this.viewList.subsection[i].mainInfo[y].case[z].result.propertyList.length != 0) {
169
- /** @type {?} */
170
- const propertyList = this.viewList.subsection[i].mainInfo[y].case[z].result.propertyList;
171
- /** @type {?} */
172
- let concat = "";
173
- for (let a = 0; a < propertyList.length; a++) {
174
- concat = concat + propertyList[a].prefix + this.viewInfoObjList[i][propertyList[a].property] + propertyList[a].suffix;
175
- }
176
- this.viewList.subsection[i].mainInfo[y].case[z].result.concat = concat;
177
- }
178
- }
179
- }
180
- }
181
- if (this.viewList.subsection[i].mainInfo[y].type == "link" && (this.viewGenericObj.navigationConst != undefined || this.viewGenericObj.navigationConst != null)) {
182
- /** @type {?} */
183
- let tempLink = this.viewGenericObj.navigationConst[this.viewList.subsection[i].mainInfo[y].path];
184
- if (tempLink != undefined && tempLink != null) {
185
- this.viewList.subsection[i].mainInfo[y].path = tempLink;
186
- }
187
- }
188
- if (this.viewList.subsection[i].mainInfo[y].type == "link"
189
- && this.viewGenericObj.listEnvironments != undefined && this.viewGenericObj.listEnvironments.length != 0) {
190
- for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {
191
- if (this.viewList.subsection[i].mainInfo[y].environment == this.viewGenericObj.listEnvironments[z].environment) {
192
- this.viewList.subsection[i].mainInfo[y].isFullpath = true;
193
- this.viewList.subsection[i].mainInfo[y].fullpath = this.viewGenericObj.listEnvironments[z].url + this.viewList.subsection[i].mainInfo[y].path;
194
- break;
195
- }
196
- }
197
- }
198
- else if (this.viewList.subsection[i].mainInfo[y].type == "link") {
199
- this.viewList.subsection[i].mainInfo[y].isFullpath = false;
200
- this.viewList.subsection[i].mainInfo[y].fullpath = this.viewList.subsection[i].mainInfo[y].path;
201
- }
202
- }
203
- this.isReady = true;
204
- }), (/**
205
- * @param {?} error
206
- * @return {?}
207
- */
208
- (error) => {
209
- console.log(error);
210
- }));
211
- }
212
- else {
213
- if (this.viewList.subsection[i].mainInfoPath != undefined && this.viewList.subsection[i].mainInfoPath != "") {
214
- if (this.viewGenericObj.viewEnvironment != undefined && this.viewGenericObj.viewEnvironment != "") {
215
- this.viewList.subsection[i].fullpath = this.viewGenericObj.viewEnvironment + this.viewList.subsection[i].mainInfoPath;
216
- }
217
- else {
218
- this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;
219
- }
220
- }
221
- else {
222
- this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;
223
- }
224
- this.http.post(this.viewList.subsection[i].fullpath, this.getList).subscribe((/**
225
- * @param {?} response
226
- * @return {?}
227
- */
228
- (response) => {
229
- this.viewInfoObjList[i] = response["Data"];
230
- }), (/**
231
- * @param {?} error
232
- * @return {?}
233
- */
234
- (error) => {
235
- console.log(error);
236
- }));
237
- }
238
- }
239
- }));
240
- }
241
- /**
242
- * @param {?} url
243
- * @return {?}
244
- */
245
- getJSON(url) {
246
- return this.http.get(url);
247
- }
248
- /**
249
- * @private
250
- * @param {?} cookieService
251
- * @param {?} key
252
- * @return {?}
253
- */
254
- GetCookie(cookieService, key) {
255
- /** @type {?} */
256
- let value = cookieService.get(key);
257
- if (value == undefined || value.trim() == '')
258
- return null;
259
- return this.DecryptString(value, "AdInsFOU12345678");
260
- }
261
- /**
262
- * @private
263
- * @param {?} chipperText
264
- * @param {?} chipperKey
265
- * @return {?}
266
- */
267
- DecryptString(chipperText, chipperKey) {
268
- if (chipperKey == undefined || chipperKey.trim() == '' ||
269
- chipperText == undefined || chipperText.trim() == '')
270
- return chipperText;
271
- /** @type {?} */
272
- let chipperKeyArr = enc.Utf8.parse(chipperKey);
273
- /** @type {?} */
274
- let iv = lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);
275
- /** @type {?} */
276
- let decrypted = AES.decrypt(chipperText, chipperKeyArr, { iv: iv });
277
- /** @type {?} */
278
- let plainText = decrypted.toString(enc.Utf8);
279
- return plainText;
280
- }
281
- /**
282
- * @param {?} viewObj
283
- * @param {?} param
284
- * @return {?}
285
- */
286
- genAction(viewObj, param) {
287
- /** @type {?} */
288
- let arrList = {};
289
- for (let i = 0; i < param.length; i++) {
290
- if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {
291
- arrList[param[i].type] = viewObj[param[i].property];
292
- }
293
- else {
294
- arrList[param[i].type] = param[i].property;
295
- }
296
- }
297
- return arrList;
298
- }
299
- /**
300
- * @param {?} urlLink
301
- * @return {?}
302
- */
303
- genRouterLink(urlLink) {
304
- /** @type {?} */
305
- let tempLink = urlLink;
306
- if (this.viewGenericObj.navigationConst != undefined && this.viewGenericObj.navigationConst[urlLink] != null) {
307
- tempLink = this.viewGenericObj.navigationConst[urlLink];
308
- }
309
- return tempLink;
310
- }
311
- /**
312
- * @param {?} fullpath
313
- * @param {?} param
314
- * @param {?} target
315
- * @return {?}
316
- */
317
- redirectFullPath(fullpath, param, target) {
318
- /** @type {?} */
319
- let queryParam = "";
320
- /** @type {?} */
321
- const ListObj = Object.keys(param);
322
- for (let i = 0; i < ListObj.length; i++) {
323
- if (queryParam != "") {
324
- queryParam = queryParam + "&" + ListObj[i] + "=" + param[ListObj[i]];
325
- }
326
- else {
327
- queryParam = ListObj[i] + "=" + param[ListObj[i]];
328
- }
329
- }
330
- window.open(fullpath + "?" + queryParam, target);
331
- }
332
- /**
333
- * @param {?} item
334
- * @param {?=} key
335
- * @return {?}
336
- */
337
- callbackFunction(item, key = "") {
338
- /** @type {?} */
339
- let CBObj = {
340
- ViewObj: item,
341
- Key: key
342
- };
343
- this.callback.emit(CBObj);
344
- }
345
- /**
346
- * @param {?} item
347
- * @param {?} condList
348
- * @return {?}
349
- */
350
- switchCase(item, condList) {
351
- /** @type {?} */
352
- let condition = false;
353
- if (!item)
354
- return false;
355
- for (let i = 0; i < condList.conditions.length; i++) {
356
- if (condList.conditions[i].restriction == "EQ") {
357
- if (condList.conditions[i].isUser != true) {
358
- if (item[condList.conditions[i].property] == condList.conditions[i].value) {
359
- condition = true;
360
- }
361
- else {
362
- condition = false;
363
- break;
364
- }
365
- }
366
- else {
367
- if (item[condList.conditions[i].property] == this.UserAccess["UserName"]) {
368
- condition = true;
369
- }
370
- else {
371
- condition = false;
372
- break;
373
- }
374
- }
375
- }
376
- else if (condList.conditions[i].restriction == "NEQ") {
377
- if (condList.conditions[i].isUser != true) {
378
- if (item[condList.conditions[i].property] != condList.conditions[i].value) {
379
- condition = true;
380
- }
381
- else {
382
- condition = false;
383
- break;
384
- }
385
- }
386
- else {
387
- if (item[condList.conditions[i].property] != this.UserAccess["UserName"]) {
388
- condition = true;
389
- }
390
- else {
391
- condition = false;
392
- break;
393
- }
394
- }
395
- }
396
- else if (condList.conditions[i].restriction == "GT") {
397
- if (condList.conditions[i].isUser != true) {
398
- if (item[condList.conditions[i].property] > condList.conditions[i].value) {
399
- condition = true;
400
- }
401
- else {
402
- condition = false;
403
- break;
404
- }
405
- }
406
- else {
407
- if (item[condList.conditions[i].property] > this.UserAccess["UserName"]) {
408
- condition = true;
409
- }
410
- else {
411
- condition = false;
412
- break;
413
- }
414
- }
415
- }
416
- else if (condList.conditions[i].restriction == "GTE") {
417
- if (condList.conditions[i].isUser != true) {
418
- if (item[condList.conditions[i].property] >= condList.conditions[i].value) {
419
- condition = true;
420
- }
421
- else {
422
- condition = false;
423
- break;
424
- }
425
- }
426
- else {
427
- if (item[condList.conditions[i].property] >= this.UserAccess["UserName"]) {
428
- condition = true;
429
- }
430
- else {
431
- condition = false;
432
- break;
433
- }
434
- }
435
- }
436
- else if (condList.conditions[i].restriction == "LT") {
437
- if (condList.conditions[i].isUser != true) {
438
- if (item[condList.conditions[i].property] < condList.conditions[i].value) {
439
- condition = true;
440
- }
441
- else {
442
- condition = false;
443
- break;
444
- }
445
- }
446
- else {
447
- if (item[condList.conditions[i].property] < this.UserAccess["UserName"]) {
448
- condition = true;
449
- }
450
- else {
451
- condition = false;
452
- break;
453
- }
454
- }
455
- }
456
- else if (condList.conditions[i].restriction == "LTE") {
457
- if (condList.conditions[i].isUser != true) {
458
- if (item[condList.conditions[i].property] <= condList.conditions[i].value) {
459
- condition = true;
460
- }
461
- else {
462
- condition = false;
463
- break;
464
- }
465
- }
466
- else {
467
- if (item[condList.conditions[i].property] <= this.UserAccess["UserName"]) {
468
- condition = true;
469
- }
470
- else {
471
- condition = false;
472
- break;
473
- }
474
- }
475
- }
476
- else if (condList.conditions[i].restriction == "IN") {
477
- if (condList.conditions[i].isUser != true) {
478
- if (condList.conditions[i].value.findIndex((/**
479
- * @param {?} x
480
- * @return {?}
481
- */
482
- x => x == item[condList.conditions[i].property])) >= 0) {
483
- condition = true;
484
- }
485
- else {
486
- condition = false;
487
- break;
488
- }
489
- }
490
- else {
491
- if (condList.conditions[i].value.findIndex((/**
492
- * @param {?} x
493
- * @return {?}
494
- */
495
- x => x == this.UserAccess["UserName"])) >= 0) {
496
- condition = true;
497
- }
498
- else {
499
- condition = false;
500
- break;
501
- }
502
- }
503
- }
504
- else if (condList.conditions[i].restriction == "NIN") {
505
- if (condList.conditions[i].isUser != true) {
506
- if (condList.conditions[i].value.findIndex((/**
507
- * @param {?} x
508
- * @return {?}
509
- */
510
- x => x == item[condList.conditions[i].property])) == -1) {
511
- condition = true;
512
- }
513
- else {
514
- condition = false;
515
- break;
516
- }
517
- }
518
- else {
519
- if (condList.conditions[i].value.findIndex((/**
520
- * @param {?} x
521
- * @return {?}
522
- */
523
- x => x == this.UserAccess["UserName"])) == -1) {
524
- condition = true;
525
- }
526
- else {
527
- condition = false;
528
- break;
529
- }
530
- }
531
- }
532
- }
533
- return condition;
534
- }
535
- }
536
- UcviewgenericComponent.decorators = [
537
- { type: Component, args: [{
538
- selector: 'lib-ucviewgeneric',
539
- template: "<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card\" *ngIf=\"isReady\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" id=\"horz-layout-colored-controls\" translate>{{viewList.title}}</h4>\r\n </div>\r\n <div class=\"card-body\" *ngFor=\"let ss of viewList?.subsection;let i = index;\">\r\n <div class=\"px-3\">\r\n <lib-ucSubsection *ngIf=\"ss.subsection != ''\" [id]=\"ss.subSectionId + 'id'\" [title]=\"ss.subSectionTitle\"\r\n [panel]=\"ss.subSectionId\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-md-6': mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)}\">\r\n <span\r\n *ngIf=\"mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"mi.type == 'switch'\">\r\n <div *ngFor=\"let case of mi?.case\">\r\n <div *ngIf=\"switchCase(viewInfoObjList[i],case)\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"case.result.customClassLabel != undefined ? case.result.customClassLabel : ''\" translate>{{case.result.label}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"viewInfoObjList[i] != undefined\" class=\"col-md-6\" [ngClass]=\"{ 'text-left': mi.position == 'left',\r\n 'text-right': mi.position == 'right', 'text-center': mi.position == 'center' }\">\r\n <span\r\n *ngIf=\"(mi.type == 'boolean' && viewInfoObjList[i][mi.property] != null) || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null) || mi.type == 'switch' || mi.type =='concat'; then nonEmptyLabel else emptyLabel\"></span>\r\n <ng-template #emptyLabel>\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>-</label>\r\n </ng-template>\r\n <ng-template #nonEmptyLabel>\r\n <span *ngIf=\"mi.type == 'text'\">\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\">&nbsp;%</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], mi.key)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <textarea *ngIf=\"mi.type == 'textarea'\" class=\"form-control\" readonly\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"cs.result.customClassProperty != undefined ? cs.result.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'text'\">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]=\"cs.result.customClassProperty != undefined ? cs.result.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'decimal'\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span [ngClass]=\"cs.result.customClassProperty != undefined ? cs.result.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'date'\">{{ viewInfoObjList[i][cs.result.property] |\r\n date: 'dd-MMM-yyyy' }}\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'link'\"\r\n [ngClass]=\"cs.result.customClassProperty != undefined ? cs.result.customClassProperty : ''\"\r\n translate>\r\n <a [target]=\"cs.result.target\" [routerLink]=\"genRouterLink(cs.result.path)\"\r\n [queryParams]=\"genAction(viewInfoObjList[i],cs.result.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</span>\r\n </a>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'boolean'\"\r\n [ngClass]=\"cs.result.customClassProperty != undefined ? cs.result.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true'\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false'\">No</span>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"cs.result.customClassProperty != undefined ? cs.result.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>"
540
- }] }
541
- ];
542
- /** @nocollapse */
543
- UcviewgenericComponent.ctorParameters = () => [
544
- { type: ActivatedRoute },
545
- { type: HttpClient },
546
- { type: TranslateService },
547
- { type: CookieService }
548
- ];
549
- UcviewgenericComponent.propDecorators = {
550
- viewGenericObj: [{ type: Input }],
551
- callback: [{ type: Output }]
552
- };
553
-
554
- /**
555
- * @fileoverview added by tsickle
556
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
557
- */
558
- class UcviewgenericModule {
559
- }
560
- UcviewgenericModule.decorators = [
561
- { type: NgModule, args: [{
562
- declarations: [UcviewgenericComponent],
563
- imports: [
564
- CommonModule,
565
- RouterModule,
566
- UcSubsectionModule,
567
- TranslateModule.forChild()
568
- ],
569
- exports: [UcviewgenericComponent]
570
- },] }
571
- ];
572
-
573
- /**
574
- * @fileoverview added by tsickle
575
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
576
- */
577
-
578
- /**
579
- * @fileoverview added by tsickle
580
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
581
- */
582
-
583
- export { UcviewgenericService, UcviewgenericComponent, UcviewgenericModule };
584
-
585
- //# sourceMappingURL=adins-ucviewgeneric.js.map