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