@adins/ucviewgeneric 1.0.0 → 1.0.2
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 +43 -447
- package/bundles/ucviewgeneric.umd.js +166 -0
- package/bundles/ucviewgeneric.umd.js.map +1 -0
- package/bundles/ucviewgeneric.umd.min.js +2 -0
- package/bundles/ucviewgeneric.umd.min.js.map +1 -0
- package/esm2015/lib/ucviewgeneric.component.js +114 -0
- package/esm2015/lib/ucviewgeneric.module.js +23 -0
- package/esm2015/lib/ucviewgeneric.service.js +18 -0
- package/esm2015/public-api.js +11 -0
- package/esm2015/ucviewgeneric.js +9 -0
- package/esm5/lib/ucviewgeneric.component.js +128 -0
- package/esm5/lib/ucviewgeneric.module.js +27 -0
- package/esm5/lib/ucviewgeneric.service.js +21 -0
- package/esm5/public-api.js +11 -0
- package/esm5/ucviewgeneric.js +9 -0
- package/fesm2015/ucviewgeneric.js +144 -0
- package/fesm2015/ucviewgeneric.js.map +1 -0
- package/fesm5/ucviewgeneric.js +162 -0
- package/fesm5/ucviewgeneric.js.map +1 -0
- package/lib/ucviewgeneric.component.d.ts +8 -36
- package/lib/ucviewgeneric.module.d.ts +0 -11
- package/lib/ucviewgeneric.service.d.ts +0 -3
- package/package.json +20 -4
- package/{adins-ucviewgeneric.d.ts → ucviewgeneric.d.ts} +0 -1
- package/ucviewgeneric.metadata.json +1 -0
- package/esm2020/adins-ucviewgeneric.mjs +0 -5
- package/esm2020/lib/model/grid-view-obj.model.mjs +0 -8
- package/esm2020/lib/model/input-grid-obj.model.mjs +0 -24
- package/esm2020/lib/model/uc-view-generic-obj.model.mjs +0 -30
- package/esm2020/lib/ucviewgeneric.component.mjs +0 -566
- package/esm2020/lib/ucviewgeneric.module.mjs +0 -42
- package/esm2020/lib/ucviewgeneric.service.mjs +0 -14
- package/esm2020/public-api.mjs +0 -7
- package/fesm2015/adins-ucviewgeneric.mjs +0 -687
- package/fesm2015/adins-ucviewgeneric.mjs.map +0 -1
- package/fesm2020/adins-ucviewgeneric.mjs +0 -682
- package/fesm2020/adins-ucviewgeneric.mjs.map +0 -1
- package/lib/model/grid-view-obj.model.d.ts +0 -18
- package/lib/model/input-grid-obj.model.d.ts +0 -26
- package/lib/model/uc-view-generic-obj.model.d.ts +0 -27
|
@@ -1,687 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import { __awaiter } from 'tslib';
|
|
4
|
-
import * as CryptoJS from 'crypto-js';
|
|
5
|
-
import * as i1 from '@angular/router';
|
|
6
|
-
import { RouterModule } from '@angular/router';
|
|
7
|
-
import * as i2 from '@angular/common/http';
|
|
8
|
-
import * as i3 from '@ngx-translate/core';
|
|
9
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
10
|
-
import * as i4 from 'ngx-cookie';
|
|
11
|
-
import * as i5 from '@adins/uc-subsection';
|
|
12
|
-
import { UcSubsectionModule } from '@adins/uc-subsection';
|
|
13
|
-
import * as i6 from '@adins/uctable';
|
|
14
|
-
import { UctableModule } from '@adins/uctable';
|
|
15
|
-
import * as i7 from '@angular/common';
|
|
16
|
-
import { CommonModule } from '@angular/common';
|
|
17
|
-
import { UcgridviewModule } from '@adins/ucgridview';
|
|
18
|
-
|
|
19
|
-
class UcviewgenericService {
|
|
20
|
-
constructor() { }
|
|
21
|
-
}
|
|
22
|
-
/** @nocollapse */ UcviewgenericService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
-
/** @nocollapse */ UcviewgenericService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericService, providedIn: 'root' });
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericService, decorators: [{
|
|
25
|
-
type: Injectable,
|
|
26
|
-
args: [{
|
|
27
|
-
providedIn: 'root'
|
|
28
|
-
}]
|
|
29
|
-
}], ctorParameters: function () { return []; } });
|
|
30
|
-
|
|
31
|
-
class UcViewGenericObj {
|
|
32
|
-
constructor() {
|
|
33
|
-
this.IsCard = true;
|
|
34
|
-
this.viewInput = "";
|
|
35
|
-
this.viewEnvironment = "";
|
|
36
|
-
this.ddlEnvironments = new Array();
|
|
37
|
-
this.listEnvironments = new Array();
|
|
38
|
-
this.whereValue = new Array();
|
|
39
|
-
this.IsCard = true;
|
|
40
|
-
this.dicts = {};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
class EnviObj {
|
|
44
|
-
constructor() {
|
|
45
|
-
this.name = "";
|
|
46
|
-
this.environment = "";
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
class WhereValueObj {
|
|
50
|
-
constructor() {
|
|
51
|
-
this.property = "";
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
class EnvisObj {
|
|
55
|
-
constructor() {
|
|
56
|
-
this.environment = "";
|
|
57
|
-
this.url = "";
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
class GridViewObj {
|
|
62
|
-
constructor() {
|
|
63
|
-
this.gridViews = [];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
class GridViewInput {
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
class InputGridObj {
|
|
70
|
-
constructor() {
|
|
71
|
-
this.apiUrl = "";
|
|
72
|
-
this.deleteUrl = "";
|
|
73
|
-
this.pageNow = 0;
|
|
74
|
-
this.pageSize = 0;
|
|
75
|
-
this.pagingJson = "";
|
|
76
|
-
this.switchValue = new Array();
|
|
77
|
-
this.addGridList = new Array();
|
|
78
|
-
this.classPadding = "";
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
class SwitchValueObj {
|
|
82
|
-
constructor() {
|
|
83
|
-
this.property = "";
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
class InputAddGridObj {
|
|
87
|
-
constructor() {
|
|
88
|
-
this.AddGridLabel = "";
|
|
89
|
-
this.AddGridProperty = "";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
class UcviewgenericComponent {
|
|
94
|
-
constructor(route, http, translateService, cookieService) {
|
|
95
|
-
this.route = route;
|
|
96
|
-
this.http = http;
|
|
97
|
-
this.translateService = translateService;
|
|
98
|
-
this.cookieService = cookieService;
|
|
99
|
-
this.viewGenericObj = new UcViewGenericObj();
|
|
100
|
-
this.gridViewObj = new GridViewObj();
|
|
101
|
-
this.callback = new EventEmitter();
|
|
102
|
-
this.UserAccess = JSON.parse(this.GetCookie(this.cookieService, "UserAccess"));
|
|
103
|
-
this.inputGridViewObjs = new Array();
|
|
104
|
-
this.viewList = "";
|
|
105
|
-
this.isReady = false;
|
|
106
|
-
this.IsCard = true;
|
|
107
|
-
this.route.queryParams.subscribe((params) => {
|
|
108
|
-
this.getList = params;
|
|
109
|
-
});
|
|
110
|
-
this.translateService.setDefaultLang("en");
|
|
111
|
-
this.translateService.use(localStorage.getItem("lang") || "en");
|
|
112
|
-
}
|
|
113
|
-
ngOnInit() {
|
|
114
|
-
console.log("viewgeneric");
|
|
115
|
-
this.initiateForm();
|
|
116
|
-
this.CheckIsCard();
|
|
117
|
-
}
|
|
118
|
-
CheckIsCard() {
|
|
119
|
-
if (this.viewGenericObj.IsCard == undefined ||
|
|
120
|
-
this.viewGenericObj.IsCard == null)
|
|
121
|
-
return;
|
|
122
|
-
this.IsCard = this.viewGenericObj.IsCard;
|
|
123
|
-
}
|
|
124
|
-
initiateForm() {
|
|
125
|
-
var _a;
|
|
126
|
-
if (this.viewGenericObj.dataInput !== undefined &&
|
|
127
|
-
Object.keys(this.viewGenericObj.dataInput).length !== 0) {
|
|
128
|
-
this.setConfiguration(Object.assign({}, this.viewGenericObj.dataInput));
|
|
129
|
-
this.gridViewObj.gridViews = ((_a = this.viewGenericObj.dataInput.subsection[0]) === null || _a === void 0 ? void 0 : _a.gridViews) || [];
|
|
130
|
-
this.initializeGridViews();
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
this.getJSON(this.viewGenericObj.viewInput).subscribe((data) => {
|
|
134
|
-
this.setConfiguration(data);
|
|
135
|
-
});
|
|
136
|
-
this.initializeGridViews();
|
|
137
|
-
}
|
|
138
|
-
initializeGridViews() {
|
|
139
|
-
if (this.gridViewObj && this.gridViewObj.gridViews.length === 0) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
this.gridViewObj.gridViews.map((gridView) => __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
const inputGridObj = new InputGridObj();
|
|
144
|
-
inputGridObj.dataInput = gridView.tableInput;
|
|
145
|
-
inputGridObj.resultData = { Data: [] };
|
|
146
|
-
yield this.GetGridViewData(gridView.getData, inputGridObj);
|
|
147
|
-
this.inputGridViewObjs.push(inputGridObj);
|
|
148
|
-
}));
|
|
149
|
-
}
|
|
150
|
-
getEnvironment(envi) {
|
|
151
|
-
const filteredEnvis = this.viewGenericObj.listEnvironments.filter((v) => v.environment == envi);
|
|
152
|
-
return filteredEnvis.length > 0 ? filteredEnvis[0] : null;
|
|
153
|
-
}
|
|
154
|
-
GetGridViewData(meta, inputGridObj) {
|
|
155
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
let templListData = [];
|
|
157
|
-
const enviUrl = meta.environment && this.getEnvironment(meta.environment);
|
|
158
|
-
yield this.http
|
|
159
|
-
.post(enviUrl ? enviUrl.url + meta.apiPath : meta.apiPath, meta.reqObj)
|
|
160
|
-
.toPromise()
|
|
161
|
-
.then((response) => {
|
|
162
|
-
templListData = response[meta.customObjName || "ReturnObject"];
|
|
163
|
-
inputGridObj.apiUrl = meta.apiPath;
|
|
164
|
-
inputGridObj.resultData["Data"] = new Array();
|
|
165
|
-
inputGridObj.resultData.Data = templListData;
|
|
166
|
-
})
|
|
167
|
-
.catch((error) => {
|
|
168
|
-
console.log(error);
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
gridEvent(ev) {
|
|
173
|
-
this.callbackFunction(ev.RowObj, ev.Key);
|
|
174
|
-
}
|
|
175
|
-
setConfiguration(data) {
|
|
176
|
-
var _a;
|
|
177
|
-
this.viewList = data;
|
|
178
|
-
this.viewInfoObjList = [];
|
|
179
|
-
for (let j = 0; j < this.viewList.subsection.length; j++) {
|
|
180
|
-
this.viewInfoObjList.push(j);
|
|
181
|
-
}
|
|
182
|
-
for (let i = 0; i < this.viewList.subsection.length; i++) {
|
|
183
|
-
if (this.viewList.subsection[i].querystring != null &&
|
|
184
|
-
this.viewList.subsection[i].querystring.name != "") {
|
|
185
|
-
let queryObj;
|
|
186
|
-
if (this.viewGenericObj.whereValue.length == 0) {
|
|
187
|
-
this.viewList.subsection[i].querystring.whereQuery = (Object).values(this.getList);
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
this.viewList.subsection[i].querystring.whereQuery =
|
|
191
|
-
this.viewGenericObj.whereValue;
|
|
192
|
-
}
|
|
193
|
-
if (this.viewList.subsection[i].mainInfoPath != undefined &&
|
|
194
|
-
this.viewList.subsection[i].mainInfoPath != "") {
|
|
195
|
-
if (this.viewGenericObj.viewEnvironment != undefined &&
|
|
196
|
-
this.viewGenericObj.viewEnvironment != "") {
|
|
197
|
-
this.viewList.subsection[i].fullpath =
|
|
198
|
-
this.viewGenericObj.viewEnvironment +
|
|
199
|
-
this.viewList.subsection[i].mainInfoPath;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
this.viewList.subsection[i].fullpath =
|
|
203
|
-
this.viewList.subsection[i].mainInfoUrl;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
this.viewList.subsection[i].fullpath =
|
|
208
|
-
this.viewList.subsection[i].mainInfoUrl;
|
|
209
|
-
}
|
|
210
|
-
queryObj = {
|
|
211
|
-
querystring: this.viewList.subsection[i].querystring,
|
|
212
|
-
};
|
|
213
|
-
this.http
|
|
214
|
-
.post(this.viewList.subsection[i].fullpath, queryObj)
|
|
215
|
-
.subscribe((response) => {
|
|
216
|
-
this.viewInfoObjList[i] = response["Data"][0];
|
|
217
|
-
for (let y = 0; y < this.viewList.subsection[i].mainInfo.length; y++) {
|
|
218
|
-
if (this.viewList.subsection[i].mainInfo[y].propertyList !=
|
|
219
|
-
undefined &&
|
|
220
|
-
this.viewList.subsection[i].mainInfo[y].propertyList.length !=
|
|
221
|
-
0) {
|
|
222
|
-
const propertyList = this.viewList.subsection[i].mainInfo[y].propertyList;
|
|
223
|
-
let concat = "";
|
|
224
|
-
for (let z = 0; z < propertyList.length; z++) {
|
|
225
|
-
concat =
|
|
226
|
-
concat +
|
|
227
|
-
propertyList[z].prefix +
|
|
228
|
-
this.viewInfoObjList[i][propertyList[z].property] +
|
|
229
|
-
propertyList[z].suffix;
|
|
230
|
-
}
|
|
231
|
-
this.viewList.subsection[i].mainInfo[y].concat = concat;
|
|
232
|
-
}
|
|
233
|
-
//switch case
|
|
234
|
-
if (this.viewList.subsection[i].mainInfo[y].type == "switch") {
|
|
235
|
-
for (let z = 0; z < this.viewList.subsection[i].mainInfo[y].case.length; z++) {
|
|
236
|
-
let Empty = new Array();
|
|
237
|
-
this.viewList.subsection[i].mainInfo[y].case[z].Hidden =
|
|
238
|
-
false;
|
|
239
|
-
//check hideIfEmpty
|
|
240
|
-
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
241
|
-
.hideIfEmpty != undefined &&
|
|
242
|
-
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
243
|
-
.hideIfEmpty != null) {
|
|
244
|
-
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
245
|
-
.type != "concat") {
|
|
246
|
-
Empty.push(this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z]
|
|
247
|
-
.result.property] != undefined &&
|
|
248
|
-
this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z]
|
|
249
|
-
.result.property] != null &&
|
|
250
|
-
this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z]
|
|
251
|
-
.result.property] != ""
|
|
252
|
-
? false
|
|
253
|
-
: true);
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
// type concat
|
|
257
|
-
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
258
|
-
.propertyList != undefined &&
|
|
259
|
-
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
260
|
-
.propertyList.length != 0) {
|
|
261
|
-
const propertyList = this.viewList.subsection[i].mainInfo[y].case[z]
|
|
262
|
-
.result.propertyList;
|
|
263
|
-
let concat = "";
|
|
264
|
-
for (let a = 0; a < propertyList.length; a++) {
|
|
265
|
-
concat =
|
|
266
|
-
concat +
|
|
267
|
-
propertyList[a].prefix +
|
|
268
|
-
this.viewInfoObjList[i][propertyList[a].property] +
|
|
269
|
-
propertyList[a].suffix;
|
|
270
|
-
Empty.push(this.viewInfoObjList[i][propertyList[a].property] != undefined &&
|
|
271
|
-
this.viewInfoObjList[i][propertyList[a].property] != null &&
|
|
272
|
-
this.viewInfoObjList[i][propertyList[a].property] != ""
|
|
273
|
-
? false
|
|
274
|
-
: true);
|
|
275
|
-
}
|
|
276
|
-
this.viewList.subsection[i].mainInfo[y].case[z].result.concat = concat;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
if (Empty.includes(true) &&
|
|
280
|
-
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
281
|
-
.hideIfEmpty) {
|
|
282
|
-
this.viewList.subsection[i].mainInfo[y].case[z].Hidden =
|
|
283
|
-
true;
|
|
284
|
-
this.viewList.subsection[i].mainInfo[y].isHide = true;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
//concat
|
|
289
|
-
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
290
|
-
.propertyList != undefined &&
|
|
291
|
-
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
292
|
-
.propertyList.length != 0) {
|
|
293
|
-
const propertyList = this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
294
|
-
.propertyList;
|
|
295
|
-
let concat = "";
|
|
296
|
-
for (let a = 0; a < propertyList.length; a++) {
|
|
297
|
-
concat =
|
|
298
|
-
concat +
|
|
299
|
-
propertyList[a].prefix +
|
|
300
|
-
this.viewInfoObjList[i][propertyList[a].property] +
|
|
301
|
-
propertyList[a].suffix;
|
|
302
|
-
}
|
|
303
|
-
this.viewList.subsection[i].mainInfo[y].case[z].result.concat = concat;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
if (this.viewList.subsection[i].mainInfo[y].type == "link" &&
|
|
309
|
-
(this.viewGenericObj.navigationConst != undefined ||
|
|
310
|
-
this.viewGenericObj.navigationConst != null)) {
|
|
311
|
-
let tempLink = this.viewGenericObj.navigationConst[this.viewList.subsection[i].mainInfo[y].path];
|
|
312
|
-
if (tempLink != undefined && tempLink != null) {
|
|
313
|
-
this.viewList.subsection[i].mainInfo[y].path = tempLink;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
if (this.viewList.subsection[i].mainInfo[y].type == "link" &&
|
|
317
|
-
this.viewGenericObj.listEnvironments != undefined &&
|
|
318
|
-
this.viewGenericObj.listEnvironments.length != 0) {
|
|
319
|
-
for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {
|
|
320
|
-
if (this.viewList.subsection[i].mainInfo[y].environment ==
|
|
321
|
-
this.viewGenericObj.listEnvironments[z].environment) {
|
|
322
|
-
this.viewList.subsection[i].mainInfo[y].isFullpath = true;
|
|
323
|
-
this.viewList.subsection[i].mainInfo[y].fullpath =
|
|
324
|
-
this.viewGenericObj.listEnvironments[z].url +
|
|
325
|
-
this.viewList.subsection[i].mainInfo[y].path;
|
|
326
|
-
break;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
else if (this.viewList.subsection[i].mainInfo[y].type == "link") {
|
|
331
|
-
this.viewList.subsection[i].mainInfo[y].isFullpath = false;
|
|
332
|
-
this.viewList.subsection[i].mainInfo[y].fullpath =
|
|
333
|
-
this.viewList.subsection[i].mainInfo[y].path;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
this.isReady = true;
|
|
337
|
-
}, (error) => {
|
|
338
|
-
console.log(error);
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
else {
|
|
342
|
-
if (this.viewList.subsection[i].mainInfoPath != undefined &&
|
|
343
|
-
this.viewList.subsection[i].mainInfoPath != "") {
|
|
344
|
-
if (this.viewList.subsection[i].environment != undefined &&
|
|
345
|
-
this.viewList.subsection[i].mainInfoPath != "") {
|
|
346
|
-
for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {
|
|
347
|
-
if (this.viewList.subsection[i].environment ==
|
|
348
|
-
this.viewGenericObj.listEnvironments[z].environment) {
|
|
349
|
-
this.viewList.subsection[i].fullpath =
|
|
350
|
-
this.viewGenericObj.listEnvironments[z].url +
|
|
351
|
-
this.viewList.subsection[i].mainInfoPath;
|
|
352
|
-
break;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
else if (this.viewGenericObj.viewEnvironment != undefined &&
|
|
357
|
-
this.viewGenericObj.viewEnvironment != "") {
|
|
358
|
-
this.viewList.subsection[i].fullpath =
|
|
359
|
-
this.viewGenericObj.viewEnvironment +
|
|
360
|
-
this.viewList.subsection[i].mainInfoPath;
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
this.viewList.subsection[i].fullpath =
|
|
364
|
-
this.viewList.subsection[i].mainInfoUrl;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
this.viewList.subsection[i].fullpath =
|
|
369
|
-
this.viewList.subsection[i].mainInfoUrl;
|
|
370
|
-
}
|
|
371
|
-
const reqObj = (_a = this.viewList.subsection[i].reqObj) !== null && _a !== void 0 ? _a : this.getList;
|
|
372
|
-
if (this.viewList.subsection[i].reqObj !== undefined) {
|
|
373
|
-
for (const [key, value] of Object.entries(this.viewList.subsection[i].reqObj)) {
|
|
374
|
-
reqObj[key] = this.getList[value] || this.viewGenericObj.dicts[value];
|
|
375
|
-
if (reqObj[key] == undefined) {
|
|
376
|
-
reqObj[key] = value;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
this.http.post(this.viewList.subsection[i].fullpath, reqObj).subscribe((response) => {
|
|
381
|
-
if (this.viewList.subsection[i].resObjName === undefined ||
|
|
382
|
-
this.viewList.subsection[i].resObjName === "") {
|
|
383
|
-
this.viewInfoObjList[i] = response;
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
this.viewInfoObjList[i] =
|
|
387
|
-
response[this.viewList.subsection[i].resObjName];
|
|
388
|
-
}
|
|
389
|
-
this.isReady = true;
|
|
390
|
-
}, (error) => {
|
|
391
|
-
console.log(error);
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
getJSON(url) {
|
|
397
|
-
return this.http.get(url);
|
|
398
|
-
}
|
|
399
|
-
GetCookie(cookieService, key) {
|
|
400
|
-
let value = cookieService.get(key);
|
|
401
|
-
if (value == undefined || value.trim() == "")
|
|
402
|
-
return null;
|
|
403
|
-
return this.DecryptString(value, "AdInsFOU12345678");
|
|
404
|
-
}
|
|
405
|
-
DecryptString(chipperText, chipperKey) {
|
|
406
|
-
if (chipperKey == undefined ||
|
|
407
|
-
chipperKey.trim() == "" ||
|
|
408
|
-
chipperText == undefined ||
|
|
409
|
-
chipperText.trim() == "")
|
|
410
|
-
return chipperText;
|
|
411
|
-
let chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);
|
|
412
|
-
let iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);
|
|
413
|
-
let decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, {
|
|
414
|
-
iv: iv,
|
|
415
|
-
});
|
|
416
|
-
let plainText = decrypted.toString(CryptoJS.enc.Utf8);
|
|
417
|
-
return plainText;
|
|
418
|
-
}
|
|
419
|
-
genAction(viewObj, param) {
|
|
420
|
-
let arrList = {};
|
|
421
|
-
for (let i = 0; i < param.length; i++) {
|
|
422
|
-
if (viewObj[param[i].type] != undefined ||
|
|
423
|
-
viewObj[param[i].property] != undefined) {
|
|
424
|
-
arrList[param[i].type] = viewObj[param[i].property];
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
arrList[param[i].type] = param[i].property;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
return arrList;
|
|
431
|
-
}
|
|
432
|
-
genRouterLink(urlLink) {
|
|
433
|
-
let tempLink = urlLink;
|
|
434
|
-
if (this.viewGenericObj.navigationConst != undefined &&
|
|
435
|
-
this.viewGenericObj.navigationConst[urlLink] != null) {
|
|
436
|
-
tempLink = this.viewGenericObj.navigationConst[urlLink];
|
|
437
|
-
}
|
|
438
|
-
return tempLink;
|
|
439
|
-
}
|
|
440
|
-
redirectFullPath(fullpath, param, target) {
|
|
441
|
-
let queryParam = "";
|
|
442
|
-
const ListObj = Object.keys(param);
|
|
443
|
-
for (let i = 0; i < ListObj.length; i++) {
|
|
444
|
-
if (queryParam != "") {
|
|
445
|
-
queryParam = queryParam + "&" + ListObj[i] + "=" + param[ListObj[i]];
|
|
446
|
-
}
|
|
447
|
-
else {
|
|
448
|
-
queryParam = ListObj[i] + "=" + param[ListObj[i]];
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
window.open(fullpath + "?" + queryParam, target);
|
|
452
|
-
}
|
|
453
|
-
callbackFunction(item, key = "") {
|
|
454
|
-
let CBObj = {
|
|
455
|
-
ViewObj: item,
|
|
456
|
-
Key: key,
|
|
457
|
-
};
|
|
458
|
-
this.callback.emit(CBObj);
|
|
459
|
-
}
|
|
460
|
-
switchCase(item, condList) {
|
|
461
|
-
let condition = false;
|
|
462
|
-
if (!item)
|
|
463
|
-
return false;
|
|
464
|
-
for (let i = 0; i < condList.conditions.length; i++) {
|
|
465
|
-
if (condList.conditions[i].restriction == "EQ") {
|
|
466
|
-
if (condList.conditions[i].isUser != true) {
|
|
467
|
-
if (item[condList.conditions[i].property] ==
|
|
468
|
-
condList.conditions[i].value) {
|
|
469
|
-
condition = true;
|
|
470
|
-
}
|
|
471
|
-
else {
|
|
472
|
-
condition = false;
|
|
473
|
-
break;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
if (item[condList.conditions[i].property] == this.UserAccess["UserName"]) {
|
|
478
|
-
condition = true;
|
|
479
|
-
}
|
|
480
|
-
else {
|
|
481
|
-
condition = false;
|
|
482
|
-
break;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
else if (condList.conditions[i].restriction == "NEQ") {
|
|
487
|
-
if (condList.conditions[i].isUser != true) {
|
|
488
|
-
if (item[condList.conditions[i].property] !=
|
|
489
|
-
condList.conditions[i].value) {
|
|
490
|
-
condition = true;
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
condition = false;
|
|
494
|
-
break;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
if (item[condList.conditions[i].property] != this.UserAccess["UserName"]) {
|
|
499
|
-
condition = true;
|
|
500
|
-
}
|
|
501
|
-
else {
|
|
502
|
-
condition = false;
|
|
503
|
-
break;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
else if (condList.conditions[i].restriction == "GT") {
|
|
508
|
-
if (condList.conditions[i].isUser != true) {
|
|
509
|
-
if (item[condList.conditions[i].property] > condList.conditions[i].value) {
|
|
510
|
-
condition = true;
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
513
|
-
condition = false;
|
|
514
|
-
break;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
else {
|
|
518
|
-
if (item[condList.conditions[i].property] > this.UserAccess["UserName"]) {
|
|
519
|
-
condition = true;
|
|
520
|
-
}
|
|
521
|
-
else {
|
|
522
|
-
condition = false;
|
|
523
|
-
break;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
else if (condList.conditions[i].restriction == "GTE") {
|
|
528
|
-
if (condList.conditions[i].isUser != true) {
|
|
529
|
-
if (item[condList.conditions[i].property] >=
|
|
530
|
-
condList.conditions[i].value) {
|
|
531
|
-
condition = true;
|
|
532
|
-
}
|
|
533
|
-
else {
|
|
534
|
-
condition = false;
|
|
535
|
-
break;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
else {
|
|
539
|
-
if (item[condList.conditions[i].property] >= this.UserAccess["UserName"]) {
|
|
540
|
-
condition = true;
|
|
541
|
-
}
|
|
542
|
-
else {
|
|
543
|
-
condition = false;
|
|
544
|
-
break;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
else if (condList.conditions[i].restriction == "LT") {
|
|
549
|
-
if (condList.conditions[i].isUser != true) {
|
|
550
|
-
if (item[condList.conditions[i].property] < condList.conditions[i].value) {
|
|
551
|
-
condition = true;
|
|
552
|
-
}
|
|
553
|
-
else {
|
|
554
|
-
condition = false;
|
|
555
|
-
break;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
if (item[condList.conditions[i].property] < this.UserAccess["UserName"]) {
|
|
560
|
-
condition = true;
|
|
561
|
-
}
|
|
562
|
-
else {
|
|
563
|
-
condition = false;
|
|
564
|
-
break;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
else if (condList.conditions[i].restriction == "LTE") {
|
|
569
|
-
if (condList.conditions[i].isUser != true) {
|
|
570
|
-
if (item[condList.conditions[i].property] <=
|
|
571
|
-
condList.conditions[i].value) {
|
|
572
|
-
condition = true;
|
|
573
|
-
}
|
|
574
|
-
else {
|
|
575
|
-
condition = false;
|
|
576
|
-
break;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
else {
|
|
580
|
-
if (item[condList.conditions[i].property] <= this.UserAccess["UserName"]) {
|
|
581
|
-
condition = true;
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
condition = false;
|
|
585
|
-
break;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
else if (condList.conditions[i].restriction == "IN") {
|
|
590
|
-
if (condList.conditions[i].isUser != true) {
|
|
591
|
-
if (condList.conditions[i].value.findIndex((x) => x == item[condList.conditions[i].property]) >= 0) {
|
|
592
|
-
condition = true;
|
|
593
|
-
}
|
|
594
|
-
else {
|
|
595
|
-
condition = false;
|
|
596
|
-
break;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
else {
|
|
600
|
-
if (condList.conditions[i].value.findIndex((x) => x == this.UserAccess["UserName"]) >= 0) {
|
|
601
|
-
condition = true;
|
|
602
|
-
}
|
|
603
|
-
else {
|
|
604
|
-
condition = false;
|
|
605
|
-
break;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
else if (condList.conditions[i].restriction == "NIN") {
|
|
610
|
-
if (condList.conditions[i].isUser != true) {
|
|
611
|
-
if (condList.conditions[i].value.findIndex((x) => x == item[condList.conditions[i].property]) == -1) {
|
|
612
|
-
condition = true;
|
|
613
|
-
}
|
|
614
|
-
else {
|
|
615
|
-
condition = false;
|
|
616
|
-
break;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
if (condList.conditions[i].value.findIndex((x) => x == this.UserAccess["UserName"]) == -1) {
|
|
621
|
-
condition = true;
|
|
622
|
-
}
|
|
623
|
-
else {
|
|
624
|
-
condition = false;
|
|
625
|
-
break;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
return condition;
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
/** @nocollapse */ UcviewgenericComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.HttpClient }, { token: i3.TranslateService }, { token: i4.CookieService }], target: i0.ɵɵFactoryTarget.Component });
|
|
634
|
-
/** @nocollapse */ UcviewgenericComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UcviewgenericComponent, selector: "lib-ucviewgeneric", inputs: { viewGenericObj: "viewGenericObj", gridViewObj: "gridViewObj" }, outputs: { callback: "callback" }, ngImport: i0, template: "<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div [ngClass]=\"IsCard ? '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>\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 p-3 border-top border-bottom\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-xxl-2 col-xl-3 col-lg-4 col-md-6 col-xs-12 py-2': 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-12\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control label-field\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-12\" *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 label-field\"\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-12\" [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 *ngIf=\"mi.type == 'blank'\"></label>\r\n <label *ngIf=\"mi.type != 'blank'\" class=\"label-control label-field\"\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 label-field\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\"> %</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control label-field\"\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 class=\"label-control\" *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label class=\"label-control\" *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"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 *ngIf=\"cs.result.type == 'decimal'\">\r\n <label class=\"label-control breakword\" [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span>\r\n {{ viewInfoObjList[i][cs.result.property] | number: cs.result.precision ? cs.result.precision : '0.2' :'en-US' }}</span> \r\n <span *ngIf=\"cs.result.IsPrcnt\"> %</span>\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'date'\">\r\n <label class=\"label-control breakword\" [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n {{ viewInfoObjList[i][cs.result.property] | date: 'dd-MMM-yyyy' }}\r\n </label>\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 <label class=\"label-control breakword\" [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true' || viewInfoObjList[i][cs.result.property] == true\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false' || viewInfoObjList[i][cs.result.property] == false\">No</span>\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid-view\" *ngIf=\"gridViewObj.gridViews.length > 0\">\r\n <div *ngFor=\"let gridView of inputGridViewObjs; let i = index\">\r\n <lib-ucSubsection\r\n *ngIf=\"gridViewObj.gridViews[i].subsection && gridViewObj.gridViews[i].subsection !== ''\"\r\n [id]=\"'grid-subsection-id'+i\"\r\n [title]=\"gridViewObj.gridViews[i].subsection\"\r\n [panel]=\"'grid-subsection-panel-'+i\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]=\"'grid-subsection-panel-'+i\">\r\n<!-- <lib-ucgridview [gridInput]=\"gridView\" (callback)=\"gridEvent($event)\" (isRefresh)=\"GetGridViewData(gridViewObj.gridViews[i], gridView)\"></lib-ucgridview>-->\r\n <lib-uctable [gridObj]=\"gridView\" [standalone]=\"false\" (callback)=\"gridEvent($event)\" [classPadding]=\"'px-0'\"></lib-uctable>\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 </div>\r\n</section>\r\n", styles: [".label-field{color:var(--gray-font-2, #A1A3A5);font-size:10px!important;font-weight:500}.label-control{padding:0!important}.label-control>a{color:var(--blue, #246CFE)}@media (min-width: 1366px){.col-xxl-2{flex:0 0 20%;max-width:20%}}\n"], components: [{ type: i5.UcSubsectionComponent, selector: "lib-ucSubsection", inputs: ["title", "panel", "id"] }, { type: i6.UctableComponent, selector: "lib-uctable", inputs: ["pageLimitFooter", "pageSize", "gridObj", "standalone", "classPadding"], outputs: ["callback"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "number": i7.DecimalPipe, "date": i7.DatePipe } });
|
|
635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericComponent, decorators: [{
|
|
636
|
-
type: Component,
|
|
637
|
-
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 [ngClass]=\"IsCard ? '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>\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 p-3 border-top border-bottom\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-xxl-2 col-xl-3 col-lg-4 col-md-6 col-xs-12 py-2': 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-12\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control label-field\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-12\" *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 label-field\"\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-12\" [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 *ngIf=\"mi.type == 'blank'\"></label>\r\n <label *ngIf=\"mi.type != 'blank'\" class=\"label-control label-field\"\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 label-field\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\"> %</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control label-field\"\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 class=\"label-control\" *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label class=\"label-control\" *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"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 *ngIf=\"cs.result.type == 'decimal'\">\r\n <label class=\"label-control breakword\" [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span>\r\n {{ viewInfoObjList[i][cs.result.property] | number: cs.result.precision ? cs.result.precision : '0.2' :'en-US' }}</span> \r\n <span *ngIf=\"cs.result.IsPrcnt\"> %</span>\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'date'\">\r\n <label class=\"label-control breakword\" [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n {{ viewInfoObjList[i][cs.result.property] | date: 'dd-MMM-yyyy' }}\r\n </label>\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 <label class=\"label-control breakword\" [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true' || viewInfoObjList[i][cs.result.property] == true\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false' || viewInfoObjList[i][cs.result.property] == false\">No</span>\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid-view\" *ngIf=\"gridViewObj.gridViews.length > 0\">\r\n <div *ngFor=\"let gridView of inputGridViewObjs; let i = index\">\r\n <lib-ucSubsection\r\n *ngIf=\"gridViewObj.gridViews[i].subsection && gridViewObj.gridViews[i].subsection !== ''\"\r\n [id]=\"'grid-subsection-id'+i\"\r\n [title]=\"gridViewObj.gridViews[i].subsection\"\r\n [panel]=\"'grid-subsection-panel-'+i\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]=\"'grid-subsection-panel-'+i\">\r\n<!-- <lib-ucgridview [gridInput]=\"gridView\" (callback)=\"gridEvent($event)\" (isRefresh)=\"GetGridViewData(gridViewObj.gridViews[i], gridView)\"></lib-ucgridview>-->\r\n <lib-uctable [gridObj]=\"gridView\" [standalone]=\"false\" (callback)=\"gridEvent($event)\" [classPadding]=\"'px-0'\"></lib-uctable>\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 </div>\r\n</section>\r\n", styles: [".label-field{color:var(--gray-font-2, #A1A3A5);font-size:10px!important;font-weight:500}.label-control{padding:0!important}.label-control>a{color:var(--blue, #246CFE)}@media (min-width: 1366px){.col-xxl-2{flex:0 0 20%;max-width:20%}}\n"] }]
|
|
638
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.HttpClient }, { type: i3.TranslateService }, { type: i4.CookieService }]; }, propDecorators: { viewGenericObj: [{
|
|
639
|
-
type: Input
|
|
640
|
-
}], gridViewObj: [{
|
|
641
|
-
type: Input
|
|
642
|
-
}], callback: [{
|
|
643
|
-
type: Output
|
|
644
|
-
}] } });
|
|
645
|
-
|
|
646
|
-
class UcviewgenericModule {
|
|
647
|
-
}
|
|
648
|
-
/** @nocollapse */ UcviewgenericModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
649
|
-
/** @nocollapse */ UcviewgenericModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, declarations: [UcviewgenericComponent], imports: [CommonModule,
|
|
650
|
-
RouterModule,
|
|
651
|
-
UcSubsectionModule,
|
|
652
|
-
UcgridviewModule,
|
|
653
|
-
UctableModule, i3.TranslateModule], exports: [UcviewgenericComponent] });
|
|
654
|
-
/** @nocollapse */ UcviewgenericModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, imports: [[
|
|
655
|
-
CommonModule,
|
|
656
|
-
RouterModule,
|
|
657
|
-
UcSubsectionModule,
|
|
658
|
-
UcgridviewModule,
|
|
659
|
-
UctableModule,
|
|
660
|
-
TranslateModule.forChild(),
|
|
661
|
-
]] });
|
|
662
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, decorators: [{
|
|
663
|
-
type: NgModule,
|
|
664
|
-
args: [{
|
|
665
|
-
declarations: [UcviewgenericComponent],
|
|
666
|
-
imports: [
|
|
667
|
-
CommonModule,
|
|
668
|
-
RouterModule,
|
|
669
|
-
UcSubsectionModule,
|
|
670
|
-
UcgridviewModule,
|
|
671
|
-
UctableModule,
|
|
672
|
-
TranslateModule.forChild(),
|
|
673
|
-
],
|
|
674
|
-
exports: [UcviewgenericComponent],
|
|
675
|
-
}]
|
|
676
|
-
}] });
|
|
677
|
-
|
|
678
|
-
/*
|
|
679
|
-
* Public API Surface of ucviewgeneric
|
|
680
|
-
*/
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Generated bundle index. Do not edit.
|
|
684
|
-
*/
|
|
685
|
-
|
|
686
|
-
export { UcviewgenericComponent, UcviewgenericModule, UcviewgenericService };
|
|
687
|
-
//# sourceMappingURL=adins-ucviewgeneric.mjs.map
|