@adins/ucviewgeneric 2.0.73 → 2.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/adins-ucviewgeneric.metadata.json +1 -1
- package/bundles/adins-ucviewgeneric.umd.js +114 -25
- package/bundles/adins-ucviewgeneric.umd.js.map +1 -1
- package/bundles/adins-ucviewgeneric.umd.min.js +1 -1
- package/bundles/adins-ucviewgeneric.umd.min.js.map +1 -1
- package/esm2015/lib/ucviewgeneric.component.js +112 -22
- package/esm5/lib/ucviewgeneric.component.js +124 -22
- package/fesm2015/adins-ucviewgeneric.js +104 -21
- package/fesm2015/adins-ucviewgeneric.js.map +1 -1
- package/fesm5/adins-ucviewgeneric.js +116 -21
- package/fesm5/adins-ucviewgeneric.js.map +1 -1
- package/lib/ucviewgeneric.component.d.ts +6 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@adins/uc-subsection"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@adins/ucviewgeneric",["exports","@angular/common/http","@angular/core","@angular/common","@angular/router","@adins/uc-subsection","@ngx-translate/core"],n):n((e.adins=e.adins||{},e.adins.ucviewgeneric={}),e.ng.common.http,e.ng.core,e.ng.common,e.ng.router,e.ucSubsection,e.core)}(this,function(e,n,s,i,t,r,o){"use strict";var a=(l.decorators=[{type:s.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[]},l.ngInjectableDef=s.defineInjectable({factory:function(){return new l},token:l,providedIn:"root"}),l);function l(){}var c=function v(){this.viewInput="",this.viewEnvironment="",this.ddlEnvironments=new Array,this.listEnvironments=new Array,this.whereValue=new Array},u=(p.prototype.ngOnInit=function(){console.log("viewgeneric"),this.initiateForm()},p.prototype.initiateForm=function(){var a=this;this.getJSON(this.viewGenericObj.viewInput).subscribe(function(e){a.viewList=e,a.viewInfoObjList=[];for(var n=0;n<a.viewList.subsection.length;n++)a.viewInfoObjList.push(n);for(var i,t=function(o){null!=a.viewList.subsection[o].querystring?(0==a.viewGenericObj.whereValue.length?a.viewList.subsection[o].querystring.whereQuery=Object.values(a.getList):a.viewList.subsection[o].querystring.whereQuery=a.viewGenericObj.whereValue,a.viewList.subsection[o].mainInfoPath!=undefined&&""!=a.viewList.subsection[o].mainInfoPath&&a.viewGenericObj.viewEnvironment!=undefined&&""!=a.viewGenericObj.viewEnvironment?a.viewList.subsection[o].fullpath=a.viewGenericObj.viewEnvironment+a.viewList.subsection[o].mainInfoPath:a.viewList.subsection[o].fullpath=a.viewList.subsection[o].mainInfoUrl,i={querystring:a.viewList.subsection[o].querystring},a.http.post(a.viewList.subsection[o].fullpath,i).subscribe(function(e){a.viewInfoObjList[o]=e.Data[0];for(var n=0;n<a.viewList.subsection[o].mainInfo.length;n++){if(a.viewList.subsection[o].mainInfo[n].propertyList!=undefined&&0!=a.viewList.subsection[o].mainInfo[n].propertyList.length){for(var i=a.viewList.subsection[o].mainInfo[n].propertyList,t="",s=0;s<i.length;s++)t=t+i[s].prefix+a.viewInfoObjList[o][i[s].property]+i[s].suffix;a.viewList.subsection[o].mainInfo[n].concat=t}if("link"==a.viewList.subsection[o].mainInfo[n].type&&(a.viewGenericObj.navigationConst!=undefined||null!=a.viewGenericObj.navigationConst)){var r=a.viewGenericObj.navigationConst[a.viewList.subsection[o].mainInfo[n].path];r!=undefined&&null!=r&&(a.viewList.subsection[o].mainInfo[n].path=r)}if("link"==a.viewList.subsection[o].mainInfo[n].type&&a.viewGenericObj.ddlEnvironments!=undefined&&0!=a.viewGenericObj.ddlEnvironments.length){for(s=0;s<a.viewGenericObj.ddlEnvironments.length;s++)if(a.viewList.subsection[o].mainInfo[n].name==a.viewGenericObj.ddlEnvironments[s].name){a.viewList.subsection[o].mainInfo[n].isFullpath=!0,a.viewList.subsection[o].mainInfo[n].fullpath=a.viewGenericObj.ddlEnvironments[s].environment+a.viewList.subsection[o].mainInfo[n].path;break}}else if("link"==a.viewList.subsection[o].mainInfo[n].type&&a.viewGenericObj.listEnvironments!=undefined&&0!=a.viewGenericObj.listEnvironments.length){for(s=0;s<a.viewGenericObj.listEnvironments.length;s++)if(a.viewList.subsection[o].mainInfo[n].environment==a.viewGenericObj.listEnvironments[s].environment){a.viewList.subsection[o].mainInfo[n].isFullpath=!0,a.viewList.subsection[o].mainInfo[n].fullpath=a.viewGenericObj.listEnvironments[s].url+a.viewList.subsection[o].mainInfo[n].path;break}}else"link"==a.viewList.subsection[o].mainInfo[n].type&&(a.viewList.subsection[o].mainInfo[n].isFullpath=!1,a.viewList.subsection[o].mainInfo[n].fullpath=a.viewList.subsection[o].mainInfo[n].path)}a.isReady=!0},function(e){console.log(e)})):(a.viewList.subsection[o].mainInfoPath!=undefined&&""!=a.viewList.subsection[o].mainInfoPath&&a.viewGenericObj.viewEnvironment!=undefined&&""!=a.viewGenericObj.viewEnvironment?a.viewList.subsection[o].fullpath=a.viewGenericObj.viewEnvironment+a.viewList.subsection[o].mainInfoPath:a.viewList.subsection[o].fullpath=a.viewList.subsection[o].mainInfoUrl,a.http.post(a.viewList.subsection[o].fullpath,a.getList).subscribe(function(e){a.viewInfoObjList[o]=e.Data},function(e){console.log(e)}))},s=0;s<a.viewList.subsection.length;s++)t(s)})},p.prototype.getJSON=function(e){return this.http.get(e)},p.prototype.genAction=function(e,n){for(var i={},t=0;t<n.length;t++)e[n[t].type]!=undefined||e[n[t].property]!=undefined?i[n[t].type]=e[n[t].property]:i[n[t].type]=n[t].property;return i},p.prototype.genRouterLink=function(e){var n=e;return this.viewGenericObj.navigationConst!=undefined&&null!=this.viewGenericObj.navigationConst[e]&&(n=this.viewGenericObj.navigationConst[e]),n},p.prototype.redirectFullPath=function(e,n,i){for(var t="",s=Object.keys(n),r=0;r<s.length;r++)t=""!=t?t+"&"+s[r]+"="+n[s[r]]:s[r]+"="+n[s[r]];window.open(e+"?"+t,i)},p.prototype.callbackFunction=function(e,n){void 0===n&&(n="");var i={ViewObj:e,Key:n};this.callback.emit(i)},p.prototype.switchCase=function(e,n){for(var i=!1,t=0;t<n.conditions.length;t++)if("EQ"==n.conditions[t].restriction)if(1!=n.conditions[t].isUser){if(e[n.conditions[t].property]!=n.conditions[t].value){i=!1;break}i=!0}else{var s=localStorage.getItem("Username");if(e[n.conditions[t].property]!=s){i=!1;break}i=!0}else if("NEQ"==n.conditions[t].restriction)if(1!=n.conditions[t].isUser){if(e[n.conditions[t].property]==n.conditions[t].value){i=!1;break}i=!0}else{if(s=localStorage.getItem("Username"),e[n.conditions[t].property]==s){i=!1;break}i=!0}else if("GT"==n.conditions[t].restriction)if(1!=n.conditions[t].isUser){if(!(e[n.conditions[t].property]>n.conditions[t].value)){i=!1;break}i=!0}else{if(s=localStorage.getItem("Username"),!(e[n.conditions[t].property]>s)){i=!1;break}i=!0}else if("GTE"==n.conditions[t].restriction)if(1!=n.conditions[t].isUser){if(!(e[n.conditions[t].property]>=n.conditions[t].value)){i=!1;break}i=!0}else{if(s=localStorage.getItem("Username"),!(e[n.conditions[t].property]>=s)){i=!1;break}i=!0}else if("LT"==n.conditions[t].restriction)if(1!=n.conditions[t].isUser){if(!(e[n.conditions[t].property]<n.conditions[t].value)){i=!1;break}i=!0}else{if(s=localStorage.getItem("Username"),!(e[n.conditions[t].property]<s)){i=!1;break}i=!0}else if("LTE"==n.conditions[t].restriction)if(1!=n.conditions[t].isUser){if(!(e[n.conditions[t].property]<=n.conditions[t].value)){i=!1;break}i=!0}else{if(s=localStorage.getItem("Username"),!(e[n.conditions[t].property]<=s)){i=!1;break}i=!0}return i},p.decorators=[{type:s.Component,args:[{selector:"lib-ucviewgeneric",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]="mi.customClassLabel != undefined ? mi.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"\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:\'.2\':\'en-US\'}} </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: \'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 \x3c!-- <label\r\n *ngIf="viewInfoObjList[i][mi.property] == \'\' || viewInfoObjList[i][mi.property] == null">-</label> --\x3e\r\n </span>\r\n <span *ngIf="mi.type == \'concat\'">\r\n <label class="label-control"\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)">\r\n <span class="label-control"\r\n [ngClass]="mi.customClassProperty != undefined ? mi.customClassProperty : \'\'"\r\n translate *ngIf="cs.result.type == \'text\'">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]="mi.customClassProperty != undefined ? mi.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]="mi.customClassProperty != undefined ? mi.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]="mi.customClassProperty != undefined ? mi.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]="mi.customClassProperty != undefined ? mi.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>\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>'}]}],p.ctorParameters=function(){return[{type:t.ActivatedRoute},{type:n.HttpClient},{type:o.TranslateService}]},p.propDecorators={viewGenericObj:[{type:s.Input}],callback:[{type:s.Output}]},p);function p(e,n,i){var t=this;this.route=e,this.http=n,this.translateService=i,this.viewGenericObj=new c,this.callback=new s.EventEmitter,this.viewList="",this.isReady=!1,this.route.queryParams.subscribe(function(e){t.getList=e}),this.translateService.setDefaultLang("en"),this.translateService.use(localStorage.getItem("lang")||"en")}var m=(f.decorators=[{type:s.NgModule,args:[{declarations:[u],imports:[i.CommonModule,t.RouterModule,r.UcSubsectionModule,o.TranslateModule.forChild()],exports:[u]}]}],f);function f(){}e.UcviewgenericService=a,e.UcviewgenericComponent=u,e.UcviewgenericModule=m,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(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")):"function"==typeof define&&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"],n):n((e.adins=e.adins||{},e.adins.ucviewgeneric={}),e.ng.common.http,e.ngxCookie,e.CryptoJS,e.ng.core,e.ng.common,e.ng.router,e.ucSubsection,e.core)}(this,function(e,n,i,s,r,t,o,a,l){"use strict";var c=(u.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],u.ctorParameters=function(){return[]},u.ngInjectableDef=r.defineInjectable({factory:function(){return new u},token:u,providedIn:"root"}),u);function u(){}var p=function b(){this.viewInput="",this.viewEnvironment="",this.ddlEnvironments=new Array,this.listEnvironments=new Array,this.whereValue=new Array},f=(m.prototype.ngOnInit=function(){console.log("viewgeneric"),this.initiateForm()},m.prototype.initiateForm=function(){var a=this;this.getJSON(this.viewGenericObj.viewInput).subscribe(function(e){a.viewList=e,a.viewInfoObjList=[];for(var n=0;n<a.viewList.subsection.length;n++)a.viewInfoObjList.push(n);for(var i,t=function(o){null!=a.viewList.subsection[o].querystring?(0==a.viewGenericObj.whereValue.length?a.viewList.subsection[o].querystring.whereQuery=Object.values(a.getList):a.viewList.subsection[o].querystring.whereQuery=a.viewGenericObj.whereValue,a.viewList.subsection[o].mainInfoPath!=undefined&&""!=a.viewList.subsection[o].mainInfoPath&&a.viewGenericObj.viewEnvironment!=undefined&&""!=a.viewGenericObj.viewEnvironment?a.viewList.subsection[o].fullpath=a.viewGenericObj.viewEnvironment+a.viewList.subsection[o].mainInfoPath:a.viewList.subsection[o].fullpath=a.viewList.subsection[o].mainInfoUrl,i={querystring:a.viewList.subsection[o].querystring},a.http.post(a.viewList.subsection[o].fullpath,i).subscribe(function(e){a.viewInfoObjList[o]=e.Data[0];for(var n=0;n<a.viewList.subsection[o].mainInfo.length;n++){if(a.viewList.subsection[o].mainInfo[n].propertyList!=undefined&&0!=a.viewList.subsection[o].mainInfo[n].propertyList.length){for(var i=a.viewList.subsection[o].mainInfo[n].propertyList,t="",s=0;s<i.length;s++)t=t+i[s].prefix+a.viewInfoObjList[o][i[s].property]+i[s].suffix;a.viewList.subsection[o].mainInfo[n].concat=t}if("link"==a.viewList.subsection[o].mainInfo[n].type&&(a.viewGenericObj.navigationConst!=undefined||null!=a.viewGenericObj.navigationConst)){var r=a.viewGenericObj.navigationConst[a.viewList.subsection[o].mainInfo[n].path];r!=undefined&&null!=r&&(a.viewList.subsection[o].mainInfo[n].path=r)}if("link"==a.viewList.subsection[o].mainInfo[n].type&&a.viewGenericObj.ddlEnvironments!=undefined&&0!=a.viewGenericObj.ddlEnvironments.length){for(s=0;s<a.viewGenericObj.ddlEnvironments.length;s++)if(a.viewList.subsection[o].mainInfo[n].name==a.viewGenericObj.ddlEnvironments[s].name){a.viewList.subsection[o].mainInfo[n].isFullpath=!0,a.viewList.subsection[o].mainInfo[n].fullpath=a.viewGenericObj.ddlEnvironments[s].environment+a.viewList.subsection[o].mainInfo[n].path;break}}else if("link"==a.viewList.subsection[o].mainInfo[n].type&&a.viewGenericObj.listEnvironments!=undefined&&0!=a.viewGenericObj.listEnvironments.length){for(s=0;s<a.viewGenericObj.listEnvironments.length;s++)if(a.viewList.subsection[o].mainInfo[n].environment==a.viewGenericObj.listEnvironments[s].environment){a.viewList.subsection[o].mainInfo[n].isFullpath=!0,a.viewList.subsection[o].mainInfo[n].fullpath=a.viewGenericObj.listEnvironments[s].url+a.viewList.subsection[o].mainInfo[n].path;break}}else"link"==a.viewList.subsection[o].mainInfo[n].type&&(a.viewList.subsection[o].mainInfo[n].isFullpath=!1,a.viewList.subsection[o].mainInfo[n].fullpath=a.viewList.subsection[o].mainInfo[n].path)}a.isReady=!0},function(e){console.log(e)})):(a.viewList.subsection[o].mainInfoPath!=undefined&&""!=a.viewList.subsection[o].mainInfoPath&&a.viewGenericObj.viewEnvironment!=undefined&&""!=a.viewGenericObj.viewEnvironment?a.viewList.subsection[o].fullpath=a.viewGenericObj.viewEnvironment+a.viewList.subsection[o].mainInfoPath:a.viewList.subsection[o].fullpath=a.viewList.subsection[o].mainInfoUrl,a.http.post(a.viewList.subsection[o].fullpath,a.getList).subscribe(function(e){a.viewInfoObjList[o]=e.Data},function(e){console.log(e)}))},s=0;s<a.viewList.subsection.length;s++)t(s)})},m.prototype.getJSON=function(e){return this.http.get(e)},m.prototype.GetCookie=function(e,n){var i=e.get(n);return i==undefined||""==i.trim()?null:this.DecryptString(i,"AdInsFOU12345678")},m.prototype.DecryptString=function(e,n){if(n==undefined||""==n.trim()||e==undefined||""==e.trim())return e;var i=s.enc.Utf8.parse(n),t=s.lib.WordArray.create([0,0,0,0]);return s.AES.decrypt(e,i,{iv:t}).toString(s.enc.Utf8)},m.prototype.genAction=function(e,n){for(var i={},t=0;t<n.length;t++)e[n[t].type]!=undefined||e[n[t].property]!=undefined?i[n[t].type]=e[n[t].property]:i[n[t].type]=n[t].property;return i},m.prototype.genRouterLink=function(e){var n=e;return this.viewGenericObj.navigationConst!=undefined&&null!=this.viewGenericObj.navigationConst[e]&&(n=this.viewGenericObj.navigationConst[e]),n},m.prototype.redirectFullPath=function(e,n,i){for(var t="",s=Object.keys(n),r=0;r<s.length;r++)t=""!=t?t+"&"+s[r]+"="+n[s[r]]:s[r]+"="+n[s[r]];window.open(e+"?"+t,i)},m.prototype.callbackFunction=function(e,n){void 0===n&&(n="");var i={ViewObj:e,Key:n};this.callback.emit(i)},m.prototype.switchCase=function(n,i){for(var t=this,e=!1,s=0;s<i.conditions.length;s++)if("EQ"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(n[i.conditions[s].property]!=i.conditions[s].value){e=!1;break}e=!0}else{if(n[i.conditions[s].property]!=this.UserAccess.UserName){e=!1;break}e=!0}else if("NEQ"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(n[i.conditions[s].property]==i.conditions[s].value){e=!1;break}e=!0}else{if(n[i.conditions[s].property]==this.UserAccess.UserName){e=!1;break}e=!0}else if("GT"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(!(n[i.conditions[s].property]>i.conditions[s].value)){e=!1;break}e=!0}else{if(!(n[i.conditions[s].property]>this.UserAccess.UserName)){e=!1;break}e=!0}else if("GTE"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(!(n[i.conditions[s].property]>=i.conditions[s].value)){e=!1;break}e=!0}else{if(!(n[i.conditions[s].property]>=this.UserAccess.UserName)){e=!1;break}e=!0}else if("LT"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(!(n[i.conditions[s].property]<i.conditions[s].value)){e=!1;break}e=!0}else{if(!(n[i.conditions[s].property]<this.UserAccess.UserName)){e=!1;break}e=!0}else if("LTE"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(!(n[i.conditions[s].property]<=i.conditions[s].value)){e=!1;break}e=!0}else{if(!(n[i.conditions[s].property]<=this.UserAccess.UserName)){e=!1;break}e=!0}else if("IN"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(!(0<=i.conditions[s].value.findIndex(function(e){return e==n[i.conditions[s].property]}))){e=!1;break}e=!0}else{if(!(0<=i.conditions[s].value.findIndex(function(e){return e==t.UserAccess.UserName}))){e=!1;break}e=!0}else if("NIN"==i.conditions[s].restriction)if(1!=i.conditions[s].isUser){if(-1!=i.conditions[s].value.findIndex(function(e){return e==n[i.conditions[s].property]})){e=!1;break}e=!0}else{if(-1!=i.conditions[s].value.findIndex(function(e){return e==t.UserAccess.UserName})){e=!1;break}e=!0}return e},m.decorators=[{type:r.Component,args:[{selector:"lib-ucviewgeneric",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]="mi.customClassLabel != undefined ? mi.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:\'.2\':\'en-US\'}} </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: \'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 \x3c!-- <label\r\n *ngIf="viewInfoObjList[i][mi.property] == \'\' || viewInfoObjList[i][mi.property] == null">-</label> --\x3e\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)">\r\n <span class="label-control breakword"\r\n [ngClass]="mi.customClassProperty != undefined ? mi.customClassProperty : \'\'"\r\n translate *ngIf="cs.result.type == \'text\'">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]="mi.customClassProperty != undefined ? mi.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]="mi.customClassProperty != undefined ? mi.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]="mi.customClassProperty != undefined ? mi.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]="mi.customClassProperty != undefined ? mi.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>\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>'}]}],m.ctorParameters=function(){return[{type:o.ActivatedRoute},{type:n.HttpClient},{type:l.TranslateService},{type:i.CookieService}]},m.propDecorators={viewGenericObj:[{type:r.Input}],callback:[{type:r.Output}]},m);function m(e,n,i,t){var s=this;this.route=e,this.http=n,this.translateService=i,this.cookieService=t,this.viewGenericObj=new p,this.callback=new r.EventEmitter,this.UserAccess=JSON.parse(this.GetCookie(this.cookieService,"UserAccess")),this.viewList="",this.isReady=!1,this.route.queryParams.subscribe(function(e){s.getList=e}),this.translateService.setDefaultLang("en"),this.translateService.use(localStorage.getItem("lang")||"en")}var d=(v.decorators=[{type:r.NgModule,args:[{declarations:[f],imports:[t.CommonModule,o.RouterModule,a.UcSubsectionModule,l.TranslateModule.forChild()],exports:[f]}]}],v);function v(){}e.UcviewgenericService=c,e.UcviewgenericComponent=f,e.UcviewgenericModule=d,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=adins-ucviewgeneric.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://@adins/ucviewgeneric/lib/ucviewgeneric.service.ts","ng://@adins/ucviewgeneric/lib/model/UcViewGenericObj.model.ts","ng://@adins/ucviewgeneric/lib/ucviewgeneric.component.ts","ng://@adins/ucviewgeneric/lib/ucviewgeneric.module.ts"],"names":["UcviewgenericService","Injectable","args","providedIn","UcViewGenericObj","this","viewInput","viewEnvironment","ddlEnvironments","Array","listEnvironments","whereValue","UcviewgenericComponent","prototype","ngOnInit","console","log","initiateForm","_this","getJSON","viewGenericObj","subscribe","data","viewList","viewInfoObjList","j","subsection","length","push","queryObj","i","querystring","whereQuery","values","getList","mainInfoPath","undefined","fullpath","mainInfoUrl","http","post","response","y","mainInfo","propertyList","concat","z","prefix","property","suffix","type","navigationConst","tempLink","path","name","isFullpath","environment","url","isReady","error","get","genAction","viewObj","param","arrList","genRouterLink","urlLink","redirectFullPath","target","queryParam","ListObj","Object","keys","window","open","callbackFunction","item","key","CBObj","ViewObj","Key","callback","emit","switchCase","condList","condition","conditions","restriction","isUser","value","username","localStorage","getItem","Component","selector","template","ActivatedRoute","HttpClient","TranslateService","Input","Output","route","translateService","EventEmitter","queryParams","params","setDefaultLang","use","UcviewgenericModule","NgModule","declarations","imports","CommonModule","RouterModule","UcSubsectionModule","TranslateModule","forChild","exports"],"mappings":"8mBAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KC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AAAkC,KAAAA,EAA0BlC,KAAAiG,iBAAAA,EAPpEjG,KAAAe,eAAmC,IAAIhB,EACtCC,KAAA4E,SAA8B,IAAIsB,EAAAA,aAC5ClG,KAAAkB,SAAgB,GAGhBlB,KAAAqD,SAAmB,EAGjBrD,KAAKgG,MAAMG,YAAYnF,UAAS,SAACoF,GAC/BvF,EAAKgB,QAAUuE,IAGjBpG,KAAKiG,iBAAiBI,eAAe,MACrCrG,KAAKiG,iBAAiBK,IAAIhB,aAAaC,QAAQ,SAAW,MC5B9D,IAAAgB,uBAOCC,EAAAA,SAAQ3G,KAAA,CAAC,CACR4G,aAAc,CAAClG,GACfmG,QAAS,CACPC,EAAAA,aACAC,EAAAA,aACAC,EAAAA,mBACAC,EAAAA,gBAAgBC,YAElBC,QAAS,CAACzG,OAEuBgG,GAVnC,SAAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UcviewgenericService {\r\n\r\n constructor() { }\r\n}\r\n","\r\nexport class UcViewGenericObj {\r\n viewInput: string;\r\n viewEnvironment: string;\r\n navigationConst: any;\r\n ddlEnvironments: Array<EnviObj>;\r\n listEnvironments: Array<EnvisObj>;\r\n whereValue: Array<WhereValueObj>;\r\n\r\n constructor() {\r\n this.viewInput = \"\";\r\n this.viewEnvironment = \"\";\r\n this.ddlEnvironments = new Array<EnviObj>();\r\n this.listEnvironments = new Array<EnvisObj>();\r\n this.whereValue = new Array<WhereValueObj>();\r\n }\r\n}\r\n\r\nexport class EnviObj {\r\n name: string;\r\n environment: string;\r\n\r\n constructor() {\r\n this.name = \"\";\r\n this.environment = \"\";\r\n }\r\n}\r\n\r\nexport class WhereValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class EnvisObj {\r\n environment: string;\r\n url: string;\r\n\r\n constructor() {\r\n this.environment = \"\";\r\n this.url = \"\";\r\n }\r\n}","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { EnviObj } from './model/EnviObj.model';\r\nimport { UcViewGenericObj } from './model/UcViewGenericObj.model';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'lib-ucviewgeneric',\r\n templateUrl: './ucviewgeneric.component.html',\r\n styles: []\r\n})\r\nexport class UcviewgenericComponent implements OnInit {\r\n\r\n @Input() viewGenericObj: UcViewGenericObj = new UcViewGenericObj();\r\n @Output() callback: EventEmitter<any> = new EventEmitter();\r\n viewList: any = \"\";\r\n getList: any;\r\n viewInfoObjList: any;\r\n isReady: boolean = false;\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpClient, private translateService: TranslateService) {\r\n this.route.queryParams.subscribe(params => {\r\n this.getList = params;\r\n });\r\n\r\n this.translateService.setDefaultLang('en');\r\n this.translateService.use(localStorage.getItem('lang') || 'en');\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"viewgeneric\");\r\n this.initiateForm();\r\n }\r\n\r\n initiateForm() {\r\n this.getJSON(this.viewGenericObj.viewInput).subscribe(data => {\r\n this.viewList = data;\r\n this.viewInfoObjList = [];\r\n\r\n for (var j = 0; j < this.viewList.subsection.length; j++) {\r\n this.viewInfoObjList.push(j);\r\n }\r\n\r\n for (let i = 0; i < this.viewList.subsection.length; i++) {\r\n if (this.viewList.subsection[i].querystring != null) {\r\n var queryObj: any;\r\n if (this.viewGenericObj.whereValue.length == 0) {\r\n this.viewList.subsection[i].querystring.whereQuery = (<any>Object).values(this.getList);\r\n } else {\r\n this.viewList.subsection[i].querystring.whereQuery = this.viewGenericObj.whereValue;\r\n }\r\n\r\n if (this.viewList.subsection[i].mainInfoPath != undefined && this.viewList.subsection[i].mainInfoPath != \"\") {\r\n if (this.viewGenericObj.viewEnvironment != undefined && this.viewGenericObj.viewEnvironment != \"\") {\r\n this.viewList.subsection[i].fullpath = this.viewGenericObj.viewEnvironment + this.viewList.subsection[i].mainInfoPath;\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n\r\n queryObj = {\r\n querystring: this.viewList.subsection[i].querystring\r\n }\r\n this.http.post(this.viewList.subsection[i].fullpath, queryObj).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"][0];\r\n\r\n for (var y = 0; y < this.viewList.subsection[i].mainInfo.length; y++) {\r\n if (this.viewList.subsection[i].mainInfo[y].propertyList != undefined && this.viewList.subsection[i].mainInfo[y].propertyList.length != 0) {\r\n const propertyList = this.viewList.subsection[i].mainInfo[y].propertyList;\r\n let concat = \"\";\r\n for (let z = 0; z < propertyList.length; z++) {\r\n concat = concat + propertyList[z].prefix + this.viewInfoObjList[i][propertyList[z].property] + propertyList[z].suffix;\r\n }\r\n this.viewList.subsection[i].mainInfo[y].concat = concat;\r\n }\r\n\r\n if (this.viewList.subsection[i].mainInfo[y].type == \"link\" && (this.viewGenericObj.navigationConst != undefined || this.viewGenericObj.navigationConst != null)) {\r\n let tempLink = this.viewGenericObj.navigationConst[this.viewList.subsection[i].mainInfo[y].path];\r\n if (tempLink != undefined && tempLink != null) {\r\n this.viewList.subsection[i].mainInfo[y].path = tempLink;\r\n }\r\n }\r\n if (this.viewList.subsection[i].mainInfo[y].type == \"link\"\r\n && this.viewGenericObj.ddlEnvironments != undefined && this.viewGenericObj.ddlEnvironments.length != 0) {\r\n for (let z = 0; z < this.viewGenericObj.ddlEnvironments.length; z++) {\r\n if (this.viewList.subsection[i].mainInfo[y].name == this.viewGenericObj.ddlEnvironments[z].name) {\r\n this.viewList.subsection[i].mainInfo[y].isFullpath = true;\r\n this.viewList.subsection[i].mainInfo[y].fullpath = this.viewGenericObj.ddlEnvironments[z].environment + this.viewList.subsection[i].mainInfo[y].path;\r\n break;\r\n }\r\n }\r\n } else if (this.viewList.subsection[i].mainInfo[y].type == \"link\"\r\n && this.viewGenericObj.listEnvironments != undefined && this.viewGenericObj.listEnvironments.length != 0) {\r\n for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {\r\n if (this.viewList.subsection[i].mainInfo[y].environment == this.viewGenericObj.listEnvironments[z].environment) {\r\n this.viewList.subsection[i].mainInfo[y].isFullpath = true;\r\n this.viewList.subsection[i].mainInfo[y].fullpath = this.viewGenericObj.listEnvironments[z].url + this.viewList.subsection[i].mainInfo[y].path;\r\n break;\r\n }\r\n }\r\n } else if (this.viewList.subsection[i].mainInfo[y].type == \"link\") {\r\n this.viewList.subsection[i].mainInfo[y].isFullpath = false;\r\n this.viewList.subsection[i].mainInfo[y].fullpath = this.viewList.subsection[i].mainInfo[y].path;\r\n }\r\n }\r\n this.isReady = true;\r\n },\r\n (error) => {\r\n console.log(error);\r\n });\r\n } else {\r\n if (this.viewList.subsection[i].mainInfoPath != undefined && this.viewList.subsection[i].mainInfoPath != \"\") {\r\n if (this.viewGenericObj.viewEnvironment != undefined && this.viewGenericObj.viewEnvironment != \"\") {\r\n this.viewList.subsection[i].fullpath = this.viewGenericObj.viewEnvironment + this.viewList.subsection[i].mainInfoPath;\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n\r\n this.http.post(this.viewList.subsection[i].fullpath, this.getList).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"];\r\n },\r\n (error) => {\r\n console.log(error);\r\n })\r\n }\r\n }\r\n })\r\n }\r\n\r\n public getJSON(url: string): Observable<any> {\r\n return this.http.get(url);\r\n }\r\n\r\n genAction(viewObj, param) {\r\n var arrList = {};\r\n\r\n for (var i = 0; i < param.length; i++) {\r\n if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {\r\n arrList[param[i].type] = viewObj[param[i].property];\r\n } else {\r\n arrList[param[i].type] = param[i].property;\r\n }\r\n }\r\n return arrList;\r\n }\r\n\r\n genRouterLink(urlLink: string) {\r\n let tempLink = urlLink;\r\n if (this.viewGenericObj.navigationConst != undefined && this.viewGenericObj.navigationConst[urlLink] != null) {\r\n tempLink = this.viewGenericObj.navigationConst[urlLink];\r\n }\r\n return tempLink;\r\n }\r\n\r\n redirectFullPath(fullpath: string, param: Object, target: string) {\r\n let queryParam = \"\";\r\n const ListObj = Object.keys(param);\r\n for (let i = 0; i < ListObj.length; i++) {\r\n if (queryParam != \"\") {\r\n queryParam = queryParam + \"&\" + ListObj[i] + \"=\" + param[ListObj[i]];\r\n } else {\r\n queryParam = ListObj[i] + \"=\" + param[ListObj[i]];\r\n }\r\n }\r\n window.open(fullpath + \"?\" + queryParam, target);\r\n }\r\n\r\n callbackFunction(item, key: string = \"\") {\r\n var CBObj = {\r\n ViewObj: item,\r\n Key: key\r\n }\r\n this.callback.emit(CBObj);\r\n }\r\n\r\n switchCase(item, condList) {\r\n var condition = false;\r\n\r\n for (var i = 0; i < condList.conditions.length; i++) {\r\n if (condList.conditions[i].restriction == \"EQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] == condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (item[condList.conditions[i].property] == username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NEQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] != condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (item[condList.conditions[i].property] != username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] > condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (item[condList.conditions[i].property] > username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] >= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (item[condList.conditions[i].property] >= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] < condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (item[condList.conditions[i].property] < username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] <= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (item[condList.conditions[i].property] <= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return condition;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UcviewgenericComponent } from './ucviewgeneric.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { UcSubsectionModule } from '@adins/uc-subsection';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\n\r\n@NgModule({\r\n declarations: [UcviewgenericComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n UcSubsectionModule,\r\n TranslateModule.forChild()\r\n ],\r\n exports: [UcviewgenericComponent]\r\n})\r\nexport class UcviewgenericModule { }\r\n"]}
|
|
1
|
+
{"version":3,"sources":["ng://@adins/ucviewgeneric/lib/ucviewgeneric.service.ts","ng://@adins/ucviewgeneric/lib/model/UcViewGenericObj.model.ts","ng://@adins/ucviewgeneric/lib/ucviewgeneric.component.ts","ng://@adins/ucviewgeneric/lib/ucviewgeneric.module.ts"],"names":["UcviewgenericService","Injectable","args","providedIn","UcViewGenericObj","this","viewInput","viewEnvironment","ddlEnvironments","Array","listEnvironments","whereValue","UcviewgenericComponent","prototype","ngOnInit","console","log","initiateForm","_this","getJSON","viewGenericObj","subscribe","data","viewList","viewInfoObjList","j","subsection","length","push","queryObj","i","querystring","whereQuery","values","getList","mainInfoPath","undefined","fullpath","mainInfoUrl","http","post","response","y","mainInfo","propertyList","concat","z","prefix","property","suffix","type","navigationConst","tempLink","path","name","isFullpath","environment","url","isReady","error","get","GetCookie","cookieService","key","value","trim","DecryptString","chipperText","chipperKey","chipperKeyArr","CryptoJS.enc","Utf8","parse","iv","CryptoJS.lib","WordArray","create","CryptoJS.AES","decrypt","toString","genAction","viewObj","param","arrList","genRouterLink","urlLink","redirectFullPath","target","queryParam","ListObj","Object","keys","window","open","callbackFunction","item","CBObj","ViewObj","Key","callback","emit","switchCase","condList","condition","conditions","restriction","isUser","UserAccess","findIndex","x","Component","selector","template","ActivatedRoute","HttpClient","TranslateService","CookieService","Input","Output","route","translateService","EventEmitter","JSON","queryParams","params","setDefaultLang","use","localStorage","getItem","UcviewgenericModule","NgModule","declarations","imports","CommonModule","RouterModule","UcSubsectionModule","TranslateModule","forChild","exports"],"mappings":"6sBAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KCNF,IAAAI,EAQI,SAAAA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MAAAA,EAA+BlH,KAAAkC,KAAAA,EAA0BlC,KAAAmH,iBAAAA,EAA4CnH,KAAAyD,cAAAA,EARhHzD,KAAAe,eAAmC,IAAIhB,EACtCC,KAAA8F,SAA8B,IAAIsB,EAAAA,aAC5CpH,KAAAsG,WAAkBe,KAAKlD,MAAMnE,KAAKwD,UAAUxD,KAAKyD,cAAe,eAChEzD,KAAAkB,SAAgB,GAGhBlB,KAAAqD,SAAmB,EAGjBrD,KAAKkH,MAAMI,YAAYtG,UAAS,SAACuG,GAC/B1G,EAAKgB,QAAU0F,IAGjBvH,KAAKmH,iBAAiBK,eAAe,MACrCxH,KAAKmH,iBAAiBM,IAAIC,aAAaC,QAAQ,SAAW,MC/B9D,IAAAC,uBAOCC,EAAAA,SAAQhI,KAAA,CAAC,CACRiI,aAAc,CAACvH,GACfwH,QAAS,CACPC,EAAAA,aACAC,EAAAA,aACAC,EAAAA,mBACAC,EAAAA,gBAAgBC,YAElBC,QAAS,CAAC9H,OAEuBqH,GAVnC,SAAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UcviewgenericService {\r\n\r\n constructor() { }\r\n}\r\n","\r\nexport class UcViewGenericObj {\r\n viewInput: string;\r\n viewEnvironment: string;\r\n navigationConst: any;\r\n ddlEnvironments: Array<EnviObj>;\r\n listEnvironments: Array<EnvisObj>;\r\n whereValue: Array<WhereValueObj>;\r\n\r\n constructor() {\r\n this.viewInput = \"\";\r\n this.viewEnvironment = \"\";\r\n this.ddlEnvironments = new Array<EnviObj>();\r\n this.listEnvironments = new Array<EnvisObj>();\r\n this.whereValue = new Array<WhereValueObj>();\r\n }\r\n}\r\n\r\nexport class EnviObj {\r\n name: string;\r\n environment: string;\r\n\r\n constructor() {\r\n this.name = \"\";\r\n this.environment = \"\";\r\n }\r\n}\r\n\r\nexport class WhereValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class EnvisObj {\r\n environment: string;\r\n url: string;\r\n\r\n constructor() {\r\n this.environment = \"\";\r\n this.url = \"\";\r\n }\r\n}","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { EnviObj } from './model/EnviObj.model';\r\nimport { UcViewGenericObj } from './model/UcViewGenericObj.model';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { CookieService } from 'ngx-cookie';\r\nimport * as CryptoJS from 'crypto-js';\r\n\r\n@Component({\r\n selector: 'lib-ucviewgeneric',\r\n templateUrl: './ucviewgeneric.component.html',\r\n styles: []\r\n})\r\nexport class UcviewgenericComponent implements OnInit {\r\n\r\n @Input() viewGenericObj: UcViewGenericObj = new UcViewGenericObj();\r\n @Output() callback: EventEmitter<any> = new EventEmitter();\r\n UserAccess: any = JSON.parse(this.GetCookie(this.cookieService, \"UserAccess\"));\r\n viewList: any = \"\";\r\n getList: any;\r\n viewInfoObjList: any;\r\n isReady: boolean = false;\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpClient, private translateService: TranslateService, private cookieService: CookieService) {\r\n this.route.queryParams.subscribe(params => {\r\n this.getList = params;\r\n });\r\n\r\n this.translateService.setDefaultLang('en');\r\n this.translateService.use(localStorage.getItem('lang') || 'en');\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"viewgeneric\");\r\n this.initiateForm();\r\n }\r\n\r\n initiateForm() {\r\n this.getJSON(this.viewGenericObj.viewInput).subscribe(data => {\r\n this.viewList = data;\r\n this.viewInfoObjList = [];\r\n\r\n for (var j = 0; j < this.viewList.subsection.length; j++) {\r\n this.viewInfoObjList.push(j);\r\n }\r\n\r\n for (let i = 0; i < this.viewList.subsection.length; i++) {\r\n if (this.viewList.subsection[i].querystring != null) {\r\n var queryObj: any;\r\n if (this.viewGenericObj.whereValue.length == 0) {\r\n this.viewList.subsection[i].querystring.whereQuery = (<any>Object).values(this.getList);\r\n } else {\r\n this.viewList.subsection[i].querystring.whereQuery = this.viewGenericObj.whereValue;\r\n }\r\n\r\n if (this.viewList.subsection[i].mainInfoPath != undefined && this.viewList.subsection[i].mainInfoPath != \"\") {\r\n if (this.viewGenericObj.viewEnvironment != undefined && this.viewGenericObj.viewEnvironment != \"\") {\r\n this.viewList.subsection[i].fullpath = this.viewGenericObj.viewEnvironment + this.viewList.subsection[i].mainInfoPath;\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n\r\n queryObj = {\r\n querystring: this.viewList.subsection[i].querystring\r\n }\r\n this.http.post(this.viewList.subsection[i].fullpath, queryObj).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"][0];\r\n\r\n for (var y = 0; y < this.viewList.subsection[i].mainInfo.length; y++) {\r\n if (this.viewList.subsection[i].mainInfo[y].propertyList != undefined && this.viewList.subsection[i].mainInfo[y].propertyList.length != 0) {\r\n const propertyList = this.viewList.subsection[i].mainInfo[y].propertyList;\r\n let concat = \"\";\r\n for (let z = 0; z < propertyList.length; z++) {\r\n concat = concat + propertyList[z].prefix + this.viewInfoObjList[i][propertyList[z].property] + propertyList[z].suffix;\r\n }\r\n this.viewList.subsection[i].mainInfo[y].concat = concat;\r\n }\r\n\r\n if (this.viewList.subsection[i].mainInfo[y].type == \"link\" && (this.viewGenericObj.navigationConst != undefined || this.viewGenericObj.navigationConst != null)) {\r\n let tempLink = this.viewGenericObj.navigationConst[this.viewList.subsection[i].mainInfo[y].path];\r\n if (tempLink != undefined && tempLink != null) {\r\n this.viewList.subsection[i].mainInfo[y].path = tempLink;\r\n }\r\n }\r\n if (this.viewList.subsection[i].mainInfo[y].type == \"link\"\r\n && this.viewGenericObj.ddlEnvironments != undefined && this.viewGenericObj.ddlEnvironments.length != 0) {\r\n for (let z = 0; z < this.viewGenericObj.ddlEnvironments.length; z++) {\r\n if (this.viewList.subsection[i].mainInfo[y].name == this.viewGenericObj.ddlEnvironments[z].name) {\r\n this.viewList.subsection[i].mainInfo[y].isFullpath = true;\r\n this.viewList.subsection[i].mainInfo[y].fullpath = this.viewGenericObj.ddlEnvironments[z].environment + this.viewList.subsection[i].mainInfo[y].path;\r\n break;\r\n }\r\n }\r\n } else if (this.viewList.subsection[i].mainInfo[y].type == \"link\"\r\n && this.viewGenericObj.listEnvironments != undefined && this.viewGenericObj.listEnvironments.length != 0) {\r\n for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {\r\n if (this.viewList.subsection[i].mainInfo[y].environment == this.viewGenericObj.listEnvironments[z].environment) {\r\n this.viewList.subsection[i].mainInfo[y].isFullpath = true;\r\n this.viewList.subsection[i].mainInfo[y].fullpath = this.viewGenericObj.listEnvironments[z].url + this.viewList.subsection[i].mainInfo[y].path;\r\n break;\r\n }\r\n }\r\n } else if (this.viewList.subsection[i].mainInfo[y].type == \"link\") {\r\n this.viewList.subsection[i].mainInfo[y].isFullpath = false;\r\n this.viewList.subsection[i].mainInfo[y].fullpath = this.viewList.subsection[i].mainInfo[y].path;\r\n }\r\n }\r\n this.isReady = true;\r\n },\r\n (error) => {\r\n console.log(error);\r\n });\r\n } else {\r\n if (this.viewList.subsection[i].mainInfoPath != undefined && this.viewList.subsection[i].mainInfoPath != \"\") {\r\n if (this.viewGenericObj.viewEnvironment != undefined && this.viewGenericObj.viewEnvironment != \"\") {\r\n this.viewList.subsection[i].fullpath = this.viewGenericObj.viewEnvironment + this.viewList.subsection[i].mainInfoPath;\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n } else {\r\n this.viewList.subsection[i].fullpath = this.viewList.subsection[i].mainInfoUrl;\r\n }\r\n\r\n this.http.post(this.viewList.subsection[i].fullpath, this.getList).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"];\r\n },\r\n (error) => {\r\n console.log(error);\r\n })\r\n }\r\n }\r\n })\r\n }\r\n\r\n public getJSON(url: string): Observable<any> {\r\n return this.http.get(url);\r\n }\r\n\r\n private GetCookie(cookieService: CookieService, key: string) {\r\n var value = cookieService.get(key);\r\n if (value == undefined || value.trim() == '') return null;\r\n return this.DecryptString(value, \"AdInsFOU12345678\");\r\n }\r\n\r\n private DecryptString(chipperText: string, chipperKey: string) {\r\n if (\r\n chipperKey == undefined || chipperKey.trim() == '' ||\r\n chipperText == undefined || chipperText.trim() == ''\r\n ) return chipperText;\r\n var chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);\r\n var iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);\r\n var decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });\r\n var plainText = decrypted.toString(CryptoJS.enc.Utf8);\r\n return plainText;\r\n }\r\n\r\n genAction(viewObj, param) {\r\n var arrList = {};\r\n\r\n for (var i = 0; i < param.length; i++) {\r\n if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {\r\n arrList[param[i].type] = viewObj[param[i].property];\r\n } else {\r\n arrList[param[i].type] = param[i].property;\r\n }\r\n }\r\n return arrList;\r\n }\r\n\r\n genRouterLink(urlLink: string) {\r\n let tempLink = urlLink;\r\n if (this.viewGenericObj.navigationConst != undefined && this.viewGenericObj.navigationConst[urlLink] != null) {\r\n tempLink = this.viewGenericObj.navigationConst[urlLink];\r\n }\r\n return tempLink;\r\n }\r\n\r\n redirectFullPath(fullpath: string, param: Object, target: string) {\r\n let queryParam = \"\";\r\n const ListObj = Object.keys(param);\r\n for (let i = 0; i < ListObj.length; i++) {\r\n if (queryParam != \"\") {\r\n queryParam = queryParam + \"&\" + ListObj[i] + \"=\" + param[ListObj[i]];\r\n } else {\r\n queryParam = ListObj[i] + \"=\" + param[ListObj[i]];\r\n }\r\n }\r\n window.open(fullpath + \"?\" + queryParam, target);\r\n }\r\n\r\n callbackFunction(item, key: string = \"\") {\r\n var CBObj = {\r\n ViewObj: item,\r\n Key: key\r\n }\r\n this.callback.emit(CBObj);\r\n }\r\n\r\n switchCase(item, condList) {\r\n var condition = false;\r\n\r\n for (var i = 0; i < condList.conditions.length; i++) {\r\n if (condList.conditions[i].restriction == \"EQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] == condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (item[condList.conditions[i].property] == this.UserAccess[\"UserName\"]) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NEQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] != condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (item[condList.conditions[i].property] != this.UserAccess[\"UserName\"]) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] > condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (item[condList.conditions[i].property] > this.UserAccess[\"UserName\"]) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] >= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (item[condList.conditions[i].property] >= this.UserAccess[\"UserName\"]) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] < condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (item[condList.conditions[i].property] < this.UserAccess[\"UserName\"]) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (item[condList.conditions[i].property] <= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (item[condList.conditions[i].property] <= this.UserAccess[\"UserName\"]) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } \r\n } else if (condList.conditions[i].restriction == \"IN\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (condList.conditions[i].value.findIndex(x => x == item[condList.conditions[i].property]) >= 0) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (condList.conditions[i].value.findIndex(x => x == this.UserAccess[\"UserName\"]) >= 0) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NIN\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (condList.conditions[i].value.findIndex(x => x == item[condList.conditions[i].property]) == -1) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n if (condList.conditions[i].value.findIndex(x => x == this.UserAccess[\"UserName\"]) == -1) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return condition;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UcviewgenericComponent } from './ucviewgeneric.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { UcSubsectionModule } from '@adins/uc-subsection';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\n\r\n@NgModule({\r\n declarations: [UcviewgenericComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n UcSubsectionModule,\r\n TranslateModule.forChild()\r\n ],\r\n exports: [UcviewgenericComponent]\r\n})\r\nexport class UcviewgenericModule { }\r\n"]}
|