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