@adins/ucviewgeneric 2.0.10 → 2.0.12
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 +21 -0
- package/bundles/ucviewgeneric.umd.js +31 -3
- package/bundles/ucviewgeneric.umd.js.map +1 -1
- package/bundles/ucviewgeneric.umd.min.js +1 -1
- package/bundles/ucviewgeneric.umd.min.js.map +1 -1
- package/esm2015/lib/ucviewgeneric.component.js +27 -5
- package/esm5/lib/ucviewgeneric.component.js +33 -5
- package/fesm2015/ucviewgeneric.js +24 -4
- package/fesm2015/ucviewgeneric.js.map +1 -1
- package/fesm5/ucviewgeneric.js +30 -4
- package/fesm5/ucviewgeneric.js.map +1 -1
- package/lib/ucviewgeneric.component.d.ts +4 -2
- package/package.json +2 -2
- package/ucviewgeneric.metadata.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
|
|
4
4
|
|
|
5
5
|
## Version
|
|
6
|
+
Version 2.0.12
|
|
7
|
+
1. fix data kosong
|
|
8
|
+
|
|
9
|
+
Version 2.0.11
|
|
10
|
+
1. fix data kosong
|
|
11
|
+
|
|
6
12
|
Version 2.0.10
|
|
7
13
|
1. fix boolean false agar tidak tampil '-'
|
|
8
14
|
2. string kosong akan menampilkan '-'
|
|
@@ -53,6 +59,14 @@ lib-ucviewgeneric
|
|
|
53
59
|
2. whereValue : []
|
|
54
60
|
|
|
55
61
|
## Output
|
|
62
|
+
1. callback : return view object
|
|
63
|
+
|
|
64
|
+
## Callback
|
|
65
|
+
- Callback return object:
|
|
66
|
+
{
|
|
67
|
+
ViewObj: item, // return view object
|
|
68
|
+
Key: key // Key name
|
|
69
|
+
}
|
|
56
70
|
|
|
57
71
|
## JSON property
|
|
58
72
|
view.json :
|
|
@@ -73,6 +87,7 @@ view.json :
|
|
|
73
87
|
"path": "/test/paging", // router path
|
|
74
88
|
"param": [ // passing optional parameters
|
|
75
89
|
{
|
|
90
|
+
"type" : "vendorId", // key parameter
|
|
76
91
|
"property": "vendorId", // property to pass
|
|
77
92
|
}
|
|
78
93
|
]
|
|
@@ -101,6 +116,12 @@ view.json :
|
|
|
101
116
|
"type": "boolean", // boolean 0|1 (no|yes)
|
|
102
117
|
"label": "View Code",
|
|
103
118
|
"property": "viewCode"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type" : "callback", // return selected row object
|
|
122
|
+
"label": "View Code",
|
|
123
|
+
"property" : "bodyId",
|
|
124
|
+
"key" : "download/upload/trigger" // Key name for specific action
|
|
104
125
|
}
|
|
105
126
|
]
|
|
106
127
|
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
this.route = route;
|
|
33
33
|
this.http = http$$1;
|
|
34
34
|
this.whereValue = [];
|
|
35
|
+
this.callback = new i0.EventEmitter();
|
|
35
36
|
this.viewList = "";
|
|
36
37
|
this.route.queryParams.subscribe(( /**
|
|
37
38
|
* @param {?} params
|
|
@@ -135,14 +136,40 @@
|
|
|
135
136
|
/** @type {?} */
|
|
136
137
|
var arrList = {};
|
|
137
138
|
for (var i = 0; i < param.length; i++) {
|
|
138
|
-
|
|
139
|
+
if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {
|
|
140
|
+
arrList[param[i].type] = viewObj[param[i].property];
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
arrList[param[i].type] = param[i].property;
|
|
144
|
+
}
|
|
139
145
|
}
|
|
140
146
|
return arrList;
|
|
141
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* @param {?} item
|
|
150
|
+
* @param {?=} key
|
|
151
|
+
* @return {?}
|
|
152
|
+
*/
|
|
153
|
+
UcviewgenericComponent.prototype.callbackFunction = /**
|
|
154
|
+
* @param {?} item
|
|
155
|
+
* @param {?=} key
|
|
156
|
+
* @return {?}
|
|
157
|
+
*/
|
|
158
|
+
function (item, key) {
|
|
159
|
+
if (key === void 0) {
|
|
160
|
+
key = "";
|
|
161
|
+
}
|
|
162
|
+
/** @type {?} */
|
|
163
|
+
var CBObj = {
|
|
164
|
+
ViewObj: item,
|
|
165
|
+
Key: key
|
|
166
|
+
};
|
|
167
|
+
this.callback.emit(CBObj);
|
|
168
|
+
};
|
|
142
169
|
UcviewgenericComponent.decorators = [
|
|
143
170
|
{ type: i0.Component, args: [{
|
|
144
171
|
selector: 'lib-ucviewgeneric',
|
|
145
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\r\n </div>\r\n <div 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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"
|
|
172
|
+
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control\" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\" translate>\r\n <a [routerLink]=\"[mi.path]\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
|
|
146
173
|
}] }
|
|
147
174
|
];
|
|
148
175
|
/** @nocollapse */
|
|
@@ -154,7 +181,8 @@
|
|
|
154
181
|
};
|
|
155
182
|
UcviewgenericComponent.propDecorators = {
|
|
156
183
|
viewInput: [{ type: i0.Input }],
|
|
157
|
-
whereValue: [{ type: i0.Input }]
|
|
184
|
+
whereValue: [{ type: i0.Input }],
|
|
185
|
+
callback: [{ type: i0.Output }]
|
|
158
186
|
};
|
|
159
187
|
return UcviewgenericComponent;
|
|
160
188
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ucviewgeneric.umd.js.map","sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"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","import { Component, OnInit, Input } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\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() viewInput:
|
|
1
|
+
{"version":3,"file":"ucviewgeneric.umd.js.map","sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"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","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\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() viewInput: string;\r\n @Input() whereValue = [];\r\n @Output() callback: EventEmitter<any> = new EventEmitter();\r\n viewList: any = \"\";\r\n getList: any;\r\n viewInfoObjList: any;\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpClient) {\r\n this.route.queryParams.subscribe(params => {\r\n this.getList = params;\r\n });\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.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.whereValue.length == 0) {\r\n this.viewList.subsection[i].querystring.whereQuery = Object.values(this.getList);\r\n } else {\r\n this.viewList.subsection[i].querystring.whereQuery = this.whereValue;\r\n }\r\n queryObj = {\r\n querystring: this.viewList.subsection[i].querystring\r\n }\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, queryObj).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"][0];\r\n },\r\n (error) => {\r\n console.log(error);\r\n })\r\n } else {\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, 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 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","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\n\r\n@NgModule({\r\n declarations: [UcviewgenericComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n UcSubsectionModule\r\n ],\r\n exports: [UcviewgenericComponent]\r\n})\r\nexport class UcviewgenericModule { }\r\n"],"names":["Injectable","http","EventEmitter","Component","ActivatedRoute","HttpClient","Input","Output","NgModule","CommonModule","RouterModule","UcSubsectionModule"],"mappings":";;;;;;;;;;AAAA;QAOE;SAAiB;;oBALlBA,aAAU,SAAC;wBACV,UAAU,EAAE,MAAM;qBACnB;;;;;mCAJD;KAEA;;;;;;ACFA;QAmBE,gCAAoB,KAAqB,EAAUC,OAAgB;YAAnE,iBAIC;YAJmB,UAAK,GAAL,KAAK,CAAgB;YAAU,SAAI,GAAJA,OAAI,CAAY;YAN1D,eAAU,GAAG,EAAE,CAAC;YACf,aAAQ,GAAsB,IAAIC,eAAY,EAAE,CA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AO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,SAAS,EAAE;wBAClF,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;qBACrD;yBAAM;wBACL,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;qBAC5C;iBACF;gBACD,OAAO,OAAO,CAAC;aAChB;;;;;;QAED,iDAAgB;;;;;YAAhB,UAAiB,IAAI,EAAE,GAAgB;gBAAhB,oBAAA;oBAAA,QAAgB;;;oBACjC,KAAK,GAAG;oBACV,OAAO,EAAE,IAAI;oBACb,GAAG,EAAE,GAAG;iBACT;gBACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC3B;;oBAxFFC,YAAS,SAAC;wBACT,QAAQ,EAAE,mBAAmB;wBAC7B,o1GAA6C;qBAE9C;;;;;wBARQC,qBAAc;wBACdC,eAAU;;;;gCAUhBC,QAAK;iCACLA,QAAK;+BACLC,SAAM;;QAgFT,6BAAC;KAzFD;;;;;;ACLA;QAMA;SASoC;;oBATnCC,WAAQ,SAAC;wBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;wBACtC,OAAO,EAAE;4BACPC,mBAAY;4BACZC,mBAAY;4BACZC,+BAAkB;yBACnB;wBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;qBAClC;;QACkC,0BAAC;KATpC;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@adins/uc-subsection")):"function"==typeof define&&define.amd?define("ucviewgeneric",["exports","@angular/common/http","@angular/core","@angular/common","@angular/router","@adins/uc-subsection"],t):t(e.ucviewgeneric={},e.ng.common.http,e.ng.core,e.ng.common,e.ng.router,e.ucSubsection)}(this,function(e,t,n,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@adins/uc-subsection")):"function"==typeof define&&define.amd?define("ucviewgeneric",["exports","@angular/common/http","@angular/core","@angular/common","@angular/router","@adins/uc-subsection"],t):t(e.ucviewgeneric={},e.ng.common.http,e.ng.core,e.ng.common,e.ng.router,e.ucSubsection)}(this,function(e,t,i,n,r,o){"use strict";var s=(l.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[]},l.ngInjectableDef=i.defineInjectable({factory:function(){return new l},token:l,providedIn:"root"}),l);function l(){}var a=(c.prototype.ngOnInit=function(){console.log("viewgeneric"),this.initiateForm()},c.prototype.initiateForm=function(){var o=this;this.getJSON(this.viewInput).subscribe(function(e){o.viewList=e,o.viewInfoObjList=[];for(var t=0;t<o.viewList.subsection.length;t++)o.viewInfoObjList.push(t);for(var n,i=function(t){null!=o.viewList.subsection[t].querystring?(0==o.whereValue.length?o.viewList.subsection[t].querystring.whereQuery=Object.values(o.getList):o.viewList.subsection[t].querystring.whereQuery=o.whereValue,n={querystring:o.viewList.subsection[t].querystring},o.http.post(o.viewList.subsection[t].mainInfoUrl,n).subscribe(function(e){o.viewInfoObjList[t]=e.Data[0]},function(e){console.log(e)})):o.http.post(o.viewList.subsection[t].mainInfoUrl,o.getList).subscribe(function(e){o.viewInfoObjList[t]=e.Data},function(e){console.log(e)})},r=0;r<o.viewList.subsection.length;r++)i(r)})},c.prototype.getJSON=function(e){return this.http.get(e)},c.prototype.genAction=function(e,t){for(var n={},i=0;i<t.length;i++)e[t[i].type]!=undefined||e[t[i].property]!=undefined?n[t[i].type]=e[t[i].property]:n[t[i].type]=t[i].property;return n},c.prototype.callbackFunction=function(e,t){void 0===t&&(t="");var n={ViewObj:e,Key:t};this.callback.emit(n)},c.decorators=[{type:i.Component,args:[{selector:"lib-ucviewgeneric",template:'<div class="card">\r\n <div class="card-header" *ngIf="viewList?.title != \'\'">\r\n <h4 class="card-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 class="col-md-6" *ngFor="let mi of ss?.mainInfo">\r\n <div class="row">\r\n <div class="col-md-6">\r\n <label class="label-control" translate> {{ mi.label }} </label>\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 *ngIf="mi.type == \'text\'">\r\n <label *ngIf="viewInfoObjList[i][mi.property] != \'\' && viewInfoObjList[i][mi.property] != null"\r\n class="label-control" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf="viewInfoObjList[i][mi.property] == \'\' || viewInfoObjList[i][mi.property] == null"\r\n class="label-control" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf="mi.type == \'currency\'" class="label-control" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf="mi.type == \'date\'" class="label-control" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: \'dd-MMM-yyyy\'}} </label>\r\n <label *ngIf="mi.type == \'link\'" class="label-control" translate>\r\n <a [routerLink]="[mi.path]" [target]="mi.target"\r\n [queryParams]="genAction(viewInfoObjList[i], mi.param)">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf="mi.type == \'callback\'" class="label-control" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf="mi.type == \'boolean\'">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>'}]}],c.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:t.HttpClient}]},c.propDecorators={viewInput:[{type:i.Input}],whereValue:[{type:i.Input}],callback:[{type:i.Output}]},c);function c(e,t){var n=this;this.route=e,this.http=t,this.whereValue=[],this.callback=new i.EventEmitter,this.viewList="",this.route.queryParams.subscribe(function(e){n.getList=e})}var u=(p.decorators=[{type:i.NgModule,args:[{declarations:[a],imports:[n.CommonModule,r.RouterModule,o.UcSubsectionModule],exports:[a]}]}],p);function p(){}e.UcviewgenericService=s,e.UcviewgenericComponent=a,e.UcviewgenericModule=u,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=ucviewgeneric.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"names":["UcviewgenericService","Injectable","args","providedIn","UcviewgenericComponent","prototype","ngOnInit","console","log","this","initiateForm","_this","getJSON","viewInput","subscribe","data","viewList","viewInfoObjList","j","subsection","length","push","queryObj","i","querystring","whereValue","whereQuery","Object","values","getList","http","post","mainInfoUrl","response","error","url","get","genAction","viewObj","param","arrList","property","Component","selector","template","ActivatedRoute","HttpClient","Input","route","queryParams","params","UcviewgenericModule","NgModule","declarations","imports","CommonModule","RouterModule","UcSubsectionModule","exports"],"mappings":"6gBAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KCPF,IAAAI,
|
|
1
|
+
{"version":3,"sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"names":["UcviewgenericService","Injectable","args","providedIn","UcviewgenericComponent","prototype","ngOnInit","console","log","this","initiateForm","_this","getJSON","viewInput","subscribe","data","viewList","viewInfoObjList","j","subsection","length","push","queryObj","i","querystring","whereValue","whereQuery","Object","values","getList","http","post","mainInfoUrl","response","error","url","get","genAction","viewObj","param","arrList","type","undefined","property","callbackFunction","item","key","CBObj","ViewObj","Key","callback","emit","Component","selector","template","ActivatedRoute","HttpClient","Input","Output","route","EventEmitter","queryParams","params","UcviewgenericModule","NgModule","declarations","imports","CommonModule","RouterModule","UcSubsectionModule","exports"],"mappings":"6gBAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KCPF,IAAAI,GAyBEA,EAAAC,UAAAC,SAAA,WACEC,QAAQC,IAAI,eACZC,KAAKC,gBAGPN,EAAAC,UAAAK,aAAA,WAAA,IAAAC,EAAAF,KACEA,KAAKG,QAAQH,KAAKI,WAAWC,UAAS,SAACC,GACrCJ,EAAKK,SAAWD,EAChBJ,EAAKM,gBAAkB,GAEvB,IAAK,IAAIC,EAAI,EAAGA,EAAIP,EAAKK,SAASG,WAAWC,OAAQF,IACnDP,EAAKM,gBAAgBI,KAAKH,GAG5B,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AAA,UAASlD,KAAA,CAAC,CACTmD,SAAU,oBACVC,SAAA,40GANOC,EAAAA,sBACAC,EAAAA,iDAUNC,EAAAA,0BACAA,EAAAA,wBACAC,EAAAA,UAgFHtD,GA3EE,SAAAA,EAAoBuD,EAA+B7B,GAAnD,IAAAnB,EAAAF,KAAoBA,KAAAkD,MAAAA,EAA+BlD,KAAAqB,KAAAA,EAN1CrB,KAAAgB,WAAa,GACZhB,KAAAyC,SAA8B,IAAIU,EAAAA,aAC5CnD,KAAAO,SAAgB,GAKdP,KAAKkD,MAAME,YAAY/C,UAAS,SAACgD,GAC/BnD,EAAKkB,QAAUiC,ICrBrB,IAAAC,uBAMCC,EAAAA,SAAQ9D,KAAA,CAAC,CACR+D,aAAc,CAAC7D,GACf8D,QAAS,CACPC,EAAAA,aACAC,EAAAA,aACAC,EAAAA,oBAEFC,QAAS,CAAClE,OAEuB2D,GATnC,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","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\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() viewInput: string;\r\n @Input() whereValue = [];\r\n @Output() callback: EventEmitter<any> = new EventEmitter();\r\n viewList: any = \"\";\r\n getList: any;\r\n viewInfoObjList: any;\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpClient) {\r\n this.route.queryParams.subscribe(params => {\r\n this.getList = params;\r\n });\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.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.whereValue.length == 0) {\r\n this.viewList.subsection[i].querystring.whereQuery = Object.values(this.getList);\r\n } else {\r\n this.viewList.subsection[i].querystring.whereQuery = this.whereValue;\r\n }\r\n queryObj = {\r\n querystring: this.viewList.subsection[i].querystring\r\n }\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, queryObj).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"][0];\r\n },\r\n (error) => {\r\n console.log(error);\r\n })\r\n } else {\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, 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 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","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\n\r\n@NgModule({\r\n declarations: [UcviewgenericComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n UcSubsectionModule\r\n ],\r\n exports: [UcviewgenericComponent]\r\n})\r\nexport class UcviewgenericModule { }\r\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview added by tsickle
|
|
3
3
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
4
|
*/
|
|
5
|
-
import { Component, Input } from '@angular/core';
|
|
5
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
6
6
|
import { ActivatedRoute } from '@angular/router';
|
|
7
7
|
import { HttpClient } from '@angular/common/http';
|
|
8
8
|
export class UcviewgenericComponent {
|
|
@@ -14,6 +14,7 @@ export class UcviewgenericComponent {
|
|
|
14
14
|
this.route = route;
|
|
15
15
|
this.http = http;
|
|
16
16
|
this.whereValue = [];
|
|
17
|
+
this.callback = new EventEmitter();
|
|
17
18
|
this.viewList = "";
|
|
18
19
|
this.route.queryParams.subscribe((/**
|
|
19
20
|
* @param {?} params
|
|
@@ -105,15 +106,33 @@ export class UcviewgenericComponent {
|
|
|
105
106
|
/** @type {?} */
|
|
106
107
|
var arrList = {};
|
|
107
108
|
for (var i = 0; i < param.length; i++) {
|
|
108
|
-
|
|
109
|
+
if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {
|
|
110
|
+
arrList[param[i].type] = viewObj[param[i].property];
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
arrList[param[i].type] = param[i].property;
|
|
114
|
+
}
|
|
109
115
|
}
|
|
110
116
|
return arrList;
|
|
111
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* @param {?} item
|
|
120
|
+
* @param {?=} key
|
|
121
|
+
* @return {?}
|
|
122
|
+
*/
|
|
123
|
+
callbackFunction(item, key = "") {
|
|
124
|
+
/** @type {?} */
|
|
125
|
+
var CBObj = {
|
|
126
|
+
ViewObj: item,
|
|
127
|
+
Key: key
|
|
128
|
+
};
|
|
129
|
+
this.callback.emit(CBObj);
|
|
130
|
+
}
|
|
112
131
|
}
|
|
113
132
|
UcviewgenericComponent.decorators = [
|
|
114
133
|
{ type: Component, args: [{
|
|
115
134
|
selector: 'lib-ucviewgeneric',
|
|
116
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\r\n </div>\r\n <div 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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"
|
|
135
|
+
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control\" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\" translate>\r\n <a [routerLink]=\"[mi.path]\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
|
|
117
136
|
}] }
|
|
118
137
|
];
|
|
119
138
|
/** @nocollapse */
|
|
@@ -123,7 +142,8 @@ UcviewgenericComponent.ctorParameters = () => [
|
|
|
123
142
|
];
|
|
124
143
|
UcviewgenericComponent.propDecorators = {
|
|
125
144
|
viewInput: [{ type: Input }],
|
|
126
|
-
whereValue: [{ type: Input }]
|
|
145
|
+
whereValue: [{ type: Input }],
|
|
146
|
+
callback: [{ type: Output }]
|
|
127
147
|
};
|
|
128
148
|
if (false) {
|
|
129
149
|
/** @type {?} */
|
|
@@ -131,6 +151,8 @@ if (false) {
|
|
|
131
151
|
/** @type {?} */
|
|
132
152
|
UcviewgenericComponent.prototype.whereValue;
|
|
133
153
|
/** @type {?} */
|
|
154
|
+
UcviewgenericComponent.prototype.callback;
|
|
155
|
+
/** @type {?} */
|
|
134
156
|
UcviewgenericComponent.prototype.viewList;
|
|
135
157
|
/** @type {?} */
|
|
136
158
|
UcviewgenericComponent.prototype.getList;
|
|
@@ -147,4 +169,4 @@ if (false) {
|
|
|
147
169
|
*/
|
|
148
170
|
UcviewgenericComponent.prototype.http;
|
|
149
171
|
}
|
|
150
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
172
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWN2aWV3Z2VuZXJpYy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly91Y3ZpZXdnZW5lcmljLyIsInNvdXJjZXMiOlsibGliL3Vjdmlld2dlbmVyaWMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBR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yXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgcXVlcnlPYmogPSB7XHJcbiAgICAgICAgICAgIHF1ZXJ5c3RyaW5nOiB0aGlzLnZpZXdMaXN0LnN1YnNlY3Rpb25baV0ucXVlcnlzdHJpbmdcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIHRoaXMuaHR0cC5wb3N0KHRoaXMudmlld0xpc3Quc3Vic2VjdGlvbltpXS5tYWluSW5mb1VybCwgcXVlcnlPYmopLnN1YnNjcmliZShcclxuICAgICAgICAgICAgKHJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgdGhpcy52aWV3SW5mb09iakxpc3RbaV0gPSByZXNwb25zZVtcIkRhdGFcIl1bMF07XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIChlcnJvcikgPT4ge1xyXG4gICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycm9yKTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgdGhpcy5odHRwLnBvc3QodGhpcy52aWV3TGlzdC5zdWJzZWN0aW9uW2ldLm1haW5JbmZvVXJsLCB0aGlzLmdldExpc3QpLnN1YnNjcmliZShcclxuICAgICAgICAgICAgKHJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgdGhpcy52aWV3SW5mb09iakxpc3RbaV0gPSByZXNwb25zZVtcIkRhdGFcIl07XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIChlcnJvcikgPT4ge1xyXG4gICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycm9yKTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH0pXHJcbiAgfVxyXG5cclxuICBwdWJsaWMgZ2V0SlNPTih1cmw6IHN0cmluZyk6IE9ic2VydmFibGU8YW55PiB7XHJcbiAgICByZXR1cm4gdGhpcy5odHRwLmdldCh1cmwpO1xyXG4gIH1cclxuXHJcbiAgZ2VuQWN0aW9uKHZpZXdPYmosIHBhcmFtKSB7XHJcbiAgICB2YXIgYXJyTGlzdCA9IHt9O1xyXG5cclxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGFyYW0ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgaWYgKHZpZXdPYmpbcGFyYW1baV0udHlwZV0gIT0gdW5kZWZpbmVkIHx8IHZpZXdPYmpbcGFyYW1baV0ucHJvcGVydHldICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIGFyckxpc3RbcGFyYW1baV0udHlwZV0gPSB2aWV3T2JqW3BhcmFtW2ldLnByb3BlcnR5XTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICBhcnJMaXN0W3BhcmFtW2ldLnR5cGVdID0gcGFyYW1baV0ucHJvcGVydHk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBhcnJMaXN0O1xyXG4gIH1cclxuXHJcbiAgY2FsbGJhY2tGdW5jdGlvbihpdGVtLCBrZXk6IHN0cmluZyA9IFwiXCIpIHtcclxuICAgIHZhciBDQk9iaiA9IHtcclxuICAgICAgVmlld09iajogaXRlbSxcclxuICAgICAgS2V5OiBrZXlcclxuICAgIH1cclxuICAgIHRoaXMuY2FsbGJhY2suZW1pdChDQk9iaik7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview added by tsickle
|
|
3
3
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
4
|
*/
|
|
5
|
-
import { Component, Input } from '@angular/core';
|
|
5
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
6
6
|
import { ActivatedRoute } from '@angular/router';
|
|
7
7
|
import { HttpClient } from '@angular/common/http';
|
|
8
8
|
var UcviewgenericComponent = /** @class */ (function () {
|
|
@@ -11,6 +11,7 @@ var UcviewgenericComponent = /** @class */ (function () {
|
|
|
11
11
|
this.route = route;
|
|
12
12
|
this.http = http;
|
|
13
13
|
this.whereValue = [];
|
|
14
|
+
this.callback = new EventEmitter();
|
|
14
15
|
this.viewList = "";
|
|
15
16
|
this.route.queryParams.subscribe((/**
|
|
16
17
|
* @param {?} params
|
|
@@ -120,14 +121,38 @@ var UcviewgenericComponent = /** @class */ (function () {
|
|
|
120
121
|
/** @type {?} */
|
|
121
122
|
var arrList = {};
|
|
122
123
|
for (var i = 0; i < param.length; i++) {
|
|
123
|
-
|
|
124
|
+
if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {
|
|
125
|
+
arrList[param[i].type] = viewObj[param[i].property];
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
arrList[param[i].type] = param[i].property;
|
|
129
|
+
}
|
|
124
130
|
}
|
|
125
131
|
return arrList;
|
|
126
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* @param {?} item
|
|
135
|
+
* @param {?=} key
|
|
136
|
+
* @return {?}
|
|
137
|
+
*/
|
|
138
|
+
UcviewgenericComponent.prototype.callbackFunction = /**
|
|
139
|
+
* @param {?} item
|
|
140
|
+
* @param {?=} key
|
|
141
|
+
* @return {?}
|
|
142
|
+
*/
|
|
143
|
+
function (item, key) {
|
|
144
|
+
if (key === void 0) { key = ""; }
|
|
145
|
+
/** @type {?} */
|
|
146
|
+
var CBObj = {
|
|
147
|
+
ViewObj: item,
|
|
148
|
+
Key: key
|
|
149
|
+
};
|
|
150
|
+
this.callback.emit(CBObj);
|
|
151
|
+
};
|
|
127
152
|
UcviewgenericComponent.decorators = [
|
|
128
153
|
{ type: Component, args: [{
|
|
129
154
|
selector: 'lib-ucviewgeneric',
|
|
130
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\r\n </div>\r\n <div 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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"
|
|
155
|
+
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control\" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\" translate>\r\n <a [routerLink]=\"[mi.path]\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
|
|
131
156
|
}] }
|
|
132
157
|
];
|
|
133
158
|
/** @nocollapse */
|
|
@@ -137,7 +162,8 @@ var UcviewgenericComponent = /** @class */ (function () {
|
|
|
137
162
|
]; };
|
|
138
163
|
UcviewgenericComponent.propDecorators = {
|
|
139
164
|
viewInput: [{ type: Input }],
|
|
140
|
-
whereValue: [{ type: Input }]
|
|
165
|
+
whereValue: [{ type: Input }],
|
|
166
|
+
callback: [{ type: Output }]
|
|
141
167
|
};
|
|
142
168
|
return UcviewgenericComponent;
|
|
143
169
|
}());
|
|
@@ -148,6 +174,8 @@ if (false) {
|
|
|
148
174
|
/** @type {?} */
|
|
149
175
|
UcviewgenericComponent.prototype.whereValue;
|
|
150
176
|
/** @type {?} */
|
|
177
|
+
UcviewgenericComponent.prototype.callback;
|
|
178
|
+
/** @type {?} */
|
|
151
179
|
UcviewgenericComponent.prototype.viewList;
|
|
152
180
|
/** @type {?} */
|
|
153
181
|
UcviewgenericComponent.prototype.getList;
|
|
@@ -164,4 +192,4 @@ if (false) {
|
|
|
164
192
|
*/
|
|
165
193
|
UcviewgenericComponent.prototype.http;
|
|
166
194
|
}
|
|
167
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
195
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWN2aWV3Z2VuZXJpYy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly91Y3ZpZXdnZW5lcmljLyIsInNvdXJjZXMiOlsibGliL3Vjdmlld2dlbmVyaWMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQy9FLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFHbEQ7SUFjRSxnQ0FBb0IsS0FBcUIsRUFBVSxJQUFnQjtRQUFuRSxpQkFJQztRQUptQixVQUFLLEdBQUwsS0FBSyxDQUFn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IH1cclxuICAgICAgICAgIHRoaXMuaHR0cC5wb3N0KHRoaXMudmlld0xpc3Quc3Vic2VjdGlvbltpXS5tYWluSW5mb1VybCwgcXVlcnlPYmopLnN1YnNjcmliZShcclxuICAgICAgICAgICAgKHJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgdGhpcy52aWV3SW5mb09iakxpc3RbaV0gPSByZXNwb25zZVtcIkRhdGFcIl1bMF07XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIChlcnJvcikgPT4ge1xyXG4gICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycm9yKTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgdGhpcy5odHRwLnBvc3QodGhpcy52aWV3TGlzdC5zdWJzZWN0aW9uW2ldLm1haW5JbmZvVXJsLCB0aGlzLmdldExpc3QpLnN1YnNjcmliZShcclxuICAgICAgICAgICAgKHJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgdGhpcy52aWV3SW5mb09iakxpc3RbaV0gPSByZXNwb25zZVtcIkRhdGFcIl07XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIChlcnJvcikgPT4ge1xyXG4gICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycm9yKTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH0pXHJcbiAgfVxyXG5cclxuICBwdWJsaWMgZ2V0SlNPTih1cmw6IHN0cmluZyk6IE9ic2VydmFibGU8YW55PiB7XHJcbiAgICByZXR1cm4gdGhpcy5odHRwLmdldCh1cmwpO1xyXG4gIH1cclxuXHJcbiAgZ2VuQWN0aW9uKHZpZXdPYmosIHBhcmFtKSB7XHJcbiAgICB2YXIgYXJyTGlzdCA9IHt9O1xyXG5cclxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGFyYW0ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgaWYgKHZpZXdPYmpbcGFyYW1baV0udHlwZV0gIT0gdW5kZWZpbmVkIHx8IHZpZXdPYmpbcGFyYW1baV0ucHJvcGVydHldICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIGFyckxpc3RbcGFyYW1baV0udHlwZV0gPSB2aWV3T2JqW3BhcmFtW2ldLnByb3BlcnR5XTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICBhcnJMaXN0W3BhcmFtW2ldLnR5cGVdID0gcGFyYW1baV0ucHJvcGVydHk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBhcnJMaXN0O1xyXG4gIH1cclxuXHJcbiAgY2FsbGJhY2tGdW5jdGlvbihpdGVtLCBrZXk6IHN0cmluZyA9IFwiXCIpIHtcclxuICAgIHZhciBDQk9iaiA9IHtcclxuICAgICAgVmlld09iajogaXRlbSxcclxuICAgICAgS2V5OiBrZXlcclxuICAgIH1cclxuICAgIHRoaXMuY2FsbGJhY2suZW1pdChDQk9iaik7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Injectable, NgModule, Component, Input, defineInjectable } from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule, Component, Input, Output, EventEmitter, defineInjectable } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { ActivatedRoute, RouterModule } from '@angular/router';
|
|
5
5
|
import { UcSubsectionModule } from '@adins/uc-subsection';
|
|
@@ -33,6 +33,7 @@ class UcviewgenericComponent {
|
|
|
33
33
|
this.route = route;
|
|
34
34
|
this.http = http;
|
|
35
35
|
this.whereValue = [];
|
|
36
|
+
this.callback = new EventEmitter();
|
|
36
37
|
this.viewList = "";
|
|
37
38
|
this.route.queryParams.subscribe((/**
|
|
38
39
|
* @param {?} params
|
|
@@ -124,15 +125,33 @@ class UcviewgenericComponent {
|
|
|
124
125
|
/** @type {?} */
|
|
125
126
|
var arrList = {};
|
|
126
127
|
for (var i = 0; i < param.length; i++) {
|
|
127
|
-
|
|
128
|
+
if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {
|
|
129
|
+
arrList[param[i].type] = viewObj[param[i].property];
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
arrList[param[i].type] = param[i].property;
|
|
133
|
+
}
|
|
128
134
|
}
|
|
129
135
|
return arrList;
|
|
130
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* @param {?} item
|
|
139
|
+
* @param {?=} key
|
|
140
|
+
* @return {?}
|
|
141
|
+
*/
|
|
142
|
+
callbackFunction(item, key = "") {
|
|
143
|
+
/** @type {?} */
|
|
144
|
+
var CBObj = {
|
|
145
|
+
ViewObj: item,
|
|
146
|
+
Key: key
|
|
147
|
+
};
|
|
148
|
+
this.callback.emit(CBObj);
|
|
149
|
+
}
|
|
131
150
|
}
|
|
132
151
|
UcviewgenericComponent.decorators = [
|
|
133
152
|
{ type: Component, args: [{
|
|
134
153
|
selector: 'lib-ucviewgeneric',
|
|
135
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\r\n </div>\r\n <div 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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"
|
|
154
|
+
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control\" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\" translate>\r\n <a [routerLink]=\"[mi.path]\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
|
|
136
155
|
}] }
|
|
137
156
|
];
|
|
138
157
|
/** @nocollapse */
|
|
@@ -142,7 +161,8 @@ UcviewgenericComponent.ctorParameters = () => [
|
|
|
142
161
|
];
|
|
143
162
|
UcviewgenericComponent.propDecorators = {
|
|
144
163
|
viewInput: [{ type: Input }],
|
|
145
|
-
whereValue: [{ type: Input }]
|
|
164
|
+
whereValue: [{ type: Input }],
|
|
165
|
+
callback: [{ type: Output }]
|
|
146
166
|
};
|
|
147
167
|
|
|
148
168
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ucviewgeneric.js.map","sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"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","import { Component, OnInit, Input } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\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() viewInput:
|
|
1
|
+
{"version":3,"file":"ucviewgeneric.js.map","sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"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","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\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() viewInput: string;\r\n @Input() whereValue = [];\r\n @Output() callback: EventEmitter<any> = new EventEmitter();\r\n viewList: any = \"\";\r\n getList: any;\r\n viewInfoObjList: any;\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpClient) {\r\n this.route.queryParams.subscribe(params => {\r\n this.getList = params;\r\n });\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.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.whereValue.length == 0) {\r\n this.viewList.subsection[i].querystring.whereQuery = Object.values(this.getList);\r\n } else {\r\n this.viewList.subsection[i].querystring.whereQuery = this.whereValue;\r\n }\r\n queryObj = {\r\n querystring: this.viewList.subsection[i].querystring\r\n }\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, queryObj).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"][0];\r\n },\r\n (error) => {\r\n console.log(error);\r\n })\r\n } else {\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, 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 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","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\n\r\n@NgModule({\r\n declarations: [UcviewgenericComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n UcSubsectionModule\r\n ],\r\n exports: [UcviewgenericComponent]\r\n})\r\nexport class UcviewgenericModule { }\r\n"],"names":[],"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|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Injectable, NgModule, Component, Input, defineInjectable } from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule, Component, Input, Output, EventEmitter, defineInjectable } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { ActivatedRoute, RouterModule } from '@angular/router';
|
|
5
5
|
import { UcSubsectionModule } from '@adins/uc-subsection';
|
|
@@ -32,6 +32,7 @@ var UcviewgenericComponent = /** @class */ (function () {
|
|
|
32
32
|
this.route = route;
|
|
33
33
|
this.http = http;
|
|
34
34
|
this.whereValue = [];
|
|
35
|
+
this.callback = new EventEmitter();
|
|
35
36
|
this.viewList = "";
|
|
36
37
|
this.route.queryParams.subscribe((/**
|
|
37
38
|
* @param {?} params
|
|
@@ -141,14 +142,38 @@ var UcviewgenericComponent = /** @class */ (function () {
|
|
|
141
142
|
/** @type {?} */
|
|
142
143
|
var arrList = {};
|
|
143
144
|
for (var i = 0; i < param.length; i++) {
|
|
144
|
-
|
|
145
|
+
if (viewObj[param[i].type] != undefined || viewObj[param[i].property] != undefined) {
|
|
146
|
+
arrList[param[i].type] = viewObj[param[i].property];
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
arrList[param[i].type] = param[i].property;
|
|
150
|
+
}
|
|
145
151
|
}
|
|
146
152
|
return arrList;
|
|
147
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* @param {?} item
|
|
156
|
+
* @param {?=} key
|
|
157
|
+
* @return {?}
|
|
158
|
+
*/
|
|
159
|
+
UcviewgenericComponent.prototype.callbackFunction = /**
|
|
160
|
+
* @param {?} item
|
|
161
|
+
* @param {?=} key
|
|
162
|
+
* @return {?}
|
|
163
|
+
*/
|
|
164
|
+
function (item, key) {
|
|
165
|
+
if (key === void 0) { key = ""; }
|
|
166
|
+
/** @type {?} */
|
|
167
|
+
var CBObj = {
|
|
168
|
+
ViewObj: item,
|
|
169
|
+
Key: key
|
|
170
|
+
};
|
|
171
|
+
this.callback.emit(CBObj);
|
|
172
|
+
};
|
|
148
173
|
UcviewgenericComponent.decorators = [
|
|
149
174
|
{ type: Component, args: [{
|
|
150
175
|
selector: 'lib-ucviewgeneric',
|
|
151
|
-
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\r\n </div>\r\n <div 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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"
|
|
176
|
+
template: "<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control\" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\" translate>\r\n <a [routerLink]=\"[mi.path]\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
|
|
152
177
|
}] }
|
|
153
178
|
];
|
|
154
179
|
/** @nocollapse */
|
|
@@ -158,7 +183,8 @@ var UcviewgenericComponent = /** @class */ (function () {
|
|
|
158
183
|
]; };
|
|
159
184
|
UcviewgenericComponent.propDecorators = {
|
|
160
185
|
viewInput: [{ type: Input }],
|
|
161
|
-
whereValue: [{ type: Input }]
|
|
186
|
+
whereValue: [{ type: Input }],
|
|
187
|
+
callback: [{ type: Output }]
|
|
162
188
|
};
|
|
163
189
|
return UcviewgenericComponent;
|
|
164
190
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ucviewgeneric.js.map","sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"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","import { Component, OnInit, Input } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\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() viewInput:
|
|
1
|
+
{"version":3,"file":"ucviewgeneric.js.map","sources":["ng://ucviewgeneric/lib/ucviewgeneric.service.ts","ng://ucviewgeneric/lib/ucviewgeneric.component.ts","ng://ucviewgeneric/lib/ucviewgeneric.module.ts"],"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","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\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() viewInput: string;\r\n @Input() whereValue = [];\r\n @Output() callback: EventEmitter<any> = new EventEmitter();\r\n viewList: any = \"\";\r\n getList: any;\r\n viewInfoObjList: any;\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpClient) {\r\n this.route.queryParams.subscribe(params => {\r\n this.getList = params;\r\n });\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.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.whereValue.length == 0) {\r\n this.viewList.subsection[i].querystring.whereQuery = Object.values(this.getList);\r\n } else {\r\n this.viewList.subsection[i].querystring.whereQuery = this.whereValue;\r\n }\r\n queryObj = {\r\n querystring: this.viewList.subsection[i].querystring\r\n }\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, queryObj).subscribe(\r\n (response) => {\r\n this.viewInfoObjList[i] = response[\"Data\"][0];\r\n },\r\n (error) => {\r\n console.log(error);\r\n })\r\n } else {\r\n this.http.post(this.viewList.subsection[i].mainInfoUrl, 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 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","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\n\r\n@NgModule({\r\n declarations: [UcviewgenericComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n UcSubsectionModule\r\n ],\r\n exports: [UcviewgenericComponent]\r\n})\r\nexport class UcviewgenericModule { }\r\n"],"names":[],"mappings":";;;;;;;;;;AAAA;IAOE;KAAiB;;gBALlB,UAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;;+BAJD;CAEA;;;;;;ACFA;IAmBE,gCAAoB,KAAqB,EAAU,IAAgB;QAAnE,iBAIC;QAJmB,UAAK,GAAL,KAAK,CAAgB;QAAU,SAAI,GAAJ,IAAI,CAAY;QAN1D,eAAU,GAAG,EAAE,CAAC;QACf,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QAC3D,aAAQ,GAAQ,EAAE,CAAC;QAKjB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS;;;;QAAC,UAAA,MAAM;YACrC,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;SACvB,EAAC,CAAC;KACJ;;;;IAED,yCAAQ;;;IAAR;QACE,OAAO,CA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K,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;aACrD;iBAAM;gBACL,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;aAC5C;SACF;QACD,OAAO,OAAO,CAAC;KAChB;;;;;;IAED,iDAAgB;;;;;IAAhB,UAAiB,IAAI,EAAE,GAAgB;QAAhB,oBAAA,EAAA,QAAgB;;YACjC,KAAK,GAAG;YACV,OAAO,EAAE,IAAI;YACb,GAAG,EAAE,GAAG;SACT;QACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3B;;gBAxFF,SAAS,SAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,o1GAA6C;iBAE9C;;;;gBARQ,cAAc;gBACd,UAAU;;;4BAUhB,KAAK;6BACL,KAAK;2BACL,MAAM;;IAgFT,6BAAC;CAzFD;;;;;;ACLA;IAMA;KASoC;;gBATnC,QAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,kBAAkB;qBACnB;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC;;IACkC,0BAAC;CATpC;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
export declare class UcviewgenericComponent implements OnInit {
|
|
6
6
|
private route;
|
|
7
7
|
private http;
|
|
8
|
-
viewInput:
|
|
8
|
+
viewInput: string;
|
|
9
9
|
whereValue: any[];
|
|
10
|
+
callback: EventEmitter<any>;
|
|
10
11
|
viewList: any;
|
|
11
12
|
getList: any;
|
|
12
13
|
viewInfoObjList: any;
|
|
@@ -15,4 +16,5 @@ export declare class UcviewgenericComponent implements OnInit {
|
|
|
15
16
|
initiateForm(): void;
|
|
16
17
|
getJSON(url: string): Observable<any>;
|
|
17
18
|
genAction(viewObj: any, param: any): {};
|
|
19
|
+
callbackFunction(item: any, key?: string): void;
|
|
18
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adins/ucviewgeneric",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^7.2.0",
|
|
6
6
|
"@angular/core": "^7.2.0"
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
27
27
|
},
|
|
28
|
-
"author": "",
|
|
28
|
+
"author": "Reynard",
|
|
29
29
|
"license": "ISC"
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"UcviewgenericService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UcviewgenericComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"lib-ucviewgeneric","styles":[],"template":"<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\r\n </div>\r\n <div 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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"UcviewgenericService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UcviewgenericComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"lib-ucviewgeneric","styles":[],"template":"<div class=\"card\">\r\n <div class=\"card-header\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-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 class=\"col-md-6\" *ngFor=\"let mi of ss?.mainInfo\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <label class=\"label-control\" translate> {{ mi.label }} </label>\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 *ngIf=\"mi.type == 'text'\">\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control\" translate> {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number}} </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\" translate>\r\n <a [routerLink]=\"[mi.path]\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\" 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 translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\">\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"}]}],"members":{"viewInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"whereValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"callback":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":14,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"ActivatedRoute","line":19,"character":29},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":19,"character":59}]}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"genAction":[{"__symbolic":"method"}],"callbackFunction":[{"__symbolic":"method"}]}},"UcviewgenericModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UcviewgenericComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":4},{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":10,"character":4},{"__symbolic":"reference","module":"@adins/uc-subsection","name":"UcSubsectionModule","line":11,"character":4}],"exports":[{"__symbolic":"reference","name":"UcviewgenericComponent"}]}]}],"members":{}}},"origins":{"UcviewgenericService":"./lib/ucviewgeneric.service","UcviewgenericComponent":"./lib/ucviewgeneric.component","UcviewgenericModule":"./lib/ucviewgeneric.module"},"importAs":"ucviewgeneric"}
|