@adins/ucsearch 2.9.4 → 2.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/adins-ucsearch.d.ts +1 -2
  2. package/esm2020/adins-ucsearch.mjs +5 -0
  3. package/esm2020/lib/model/adins-constant.mjs +22 -0
  4. package/esm2020/lib/model/criteria-obj.model.mjs +9 -0
  5. package/esm2020/lib/model/input-search-obj.model.mjs +45 -0
  6. package/esm2020/lib/model/integration-obj.model.mjs +12 -0
  7. package/esm2020/lib/model/key-value-report.model.mjs +14 -0
  8. package/esm2020/lib/model/key-value-uc-search.model.mjs +38 -0
  9. package/esm2020/lib/model/request-criteria-obj.model.mjs +14 -0
  10. package/esm2020/lib/pipe/text-search.pipe.mjs +24 -0
  11. package/esm2020/lib/services/excel-service/excel-service.mjs +29 -0
  12. package/esm2020/lib/ucsearch.component.mjs +949 -0
  13. package/esm2020/lib/ucsearch.module.mjs +55 -0
  14. package/esm2020/lib/ucsearch.service.mjs +14 -0
  15. package/esm2020/public-api.mjs +7 -0
  16. package/fesm2015/adins-ucsearch.mjs +1214 -0
  17. package/fesm2015/adins-ucsearch.mjs.map +1 -0
  18. package/fesm2020/adins-ucsearch.mjs +1205 -0
  19. package/fesm2020/adins-ucsearch.mjs.map +1 -0
  20. package/lib/pipe/text-search.pipe.d.ts +3 -0
  21. package/lib/services/excel-service/excel-service.d.ts +3 -0
  22. package/lib/ucsearch.component.d.ts +3 -0
  23. package/lib/ucsearch.module.d.ts +12 -0
  24. package/lib/ucsearch.service.d.ts +3 -0
  25. package/package.json +23 -12
  26. package/adins-ucsearch.metadata.json +0 -1
  27. package/bundles/adins-ucsearch.umd.js +0 -1758
  28. package/bundles/adins-ucsearch.umd.js.map +0 -1
  29. package/bundles/adins-ucsearch.umd.min.js +0 -2
  30. package/bundles/adins-ucsearch.umd.min.js.map +0 -1
  31. package/esm2015/adins-ucsearch.js +0 -11
  32. package/esm2015/lib/model/adins-constant.js +0 -68
  33. package/esm2015/lib/model/criteria-obj.model.js +0 -31
  34. package/esm2015/lib/model/input-search-obj.model.js +0 -105
  35. package/esm2015/lib/model/integration-obj.model.js +0 -30
  36. package/esm2015/lib/model/key-value-report.model.js +0 -36
  37. package/esm2015/lib/model/key-value-uc-search.model.js +0 -54
  38. package/esm2015/lib/model/request-criteria-obj.model.js +0 -42
  39. package/esm2015/lib/pipe/text-search.pipe.js +0 -33
  40. package/esm2015/lib/services/excel-service/excel-service.js +0 -49
  41. package/esm2015/lib/ucsearch.component.js +0 -1309
  42. package/esm2015/lib/ucsearch.module.js +0 -43
  43. package/esm2015/lib/ucsearch.service.js +0 -18
  44. package/esm2015/public-api.js +0 -11
  45. package/esm5/adins-ucsearch.js +0 -11
  46. package/esm5/lib/model/adins-constant.js +0 -72
  47. package/esm5/lib/model/criteria-obj.model.js +0 -33
  48. package/esm5/lib/model/input-search-obj.model.js +0 -117
  49. package/esm5/lib/model/integration-obj.model.js +0 -32
  50. package/esm5/lib/model/key-value-report.model.js +0 -42
  51. package/esm5/lib/model/key-value-uc-search.model.js +0 -58
  52. package/esm5/lib/model/request-criteria-obj.model.js +0 -44
  53. package/esm5/lib/pipe/text-search.pipe.js +0 -42
  54. package/esm5/lib/services/excel-service/excel-service.js +0 -63
  55. package/esm5/lib/ucsearch.component.js +0 -1447
  56. package/esm5/lib/ucsearch.module.js +0 -47
  57. package/esm5/lib/ucsearch.service.js +0 -21
  58. package/esm5/public-api.js +0 -11
  59. package/fesm2015/adins-ucsearch.js +0 -1491
  60. package/fesm2015/adins-ucsearch.js.map +0 -1
  61. package/fesm5/adins-ucsearch.js +0 -1665
  62. package/fesm5/adins-ucsearch.js.map +0 -1
@@ -0,0 +1,1205 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Pipe, EventEmitter, Component, Inject, ViewChild, Input, Output, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import * as i8 from '@angular/forms';
5
+ import { FormsModule } from '@angular/forms';
6
+ import * as i5 from '@angular/common';
7
+ import { formatDate, DOCUMENT, DatePipe, CommonModule } from '@angular/common';
8
+ import * as FileSaver from 'file-saver';
9
+ import * as XLSX from 'xlsx';
10
+ import { trigger, state, style, transition, animate } from '@angular/animations';
11
+ import * as i3 from 'ngx-toastr';
12
+ import * as i4 from 'ngx-cookie';
13
+ import * as CryptoJS from 'crypto-js';
14
+ import * as i6 from '@adins/uc-show-errors';
15
+ import { UcShowErrorsModule } from '@adins/uc-show-errors';
16
+ import * as i7 from '@ngx-translate/core';
17
+ import { TranslateModule } from '@ngx-translate/core';
18
+ import * as i9 from '@adins/uc-directive-upper-case';
19
+ import { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';
20
+ import * as i10 from 'ngx-currency';
21
+ import { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';
22
+
23
+ class UCSearchService {
24
+ constructor() { }
25
+ }
26
+ /** @nocollapse */ /** @nocollapse */ UCSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
27
+ /** @nocollapse */ /** @nocollapse */ UCSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchService, providedIn: 'root' });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchService, decorators: [{
29
+ type: Injectable,
30
+ args: [{
31
+ providedIn: 'root'
32
+ }]
33
+ }], ctorParameters: function () { return []; } });
34
+
35
+ class AdInsConstant {
36
+ }
37
+ AdInsConstant.RestrictionBetween = "Between";
38
+ AdInsConstant.RestrictionLike = "Like";
39
+ AdInsConstant.RestrictionEq = "Eq";
40
+ AdInsConstant.RestrictionNeq = "NEQ";
41
+ AdInsConstant.RestrictionGt = "GT";
42
+ AdInsConstant.RestrictionGte = "GTE";
43
+ AdInsConstant.RestrictionLt = "LT";
44
+ AdInsConstant.RestrictionLte = "LTE";
45
+ AdInsConstant.RestrictionIn = "IN";
46
+ AdInsConstant.RestrictionNotIn = "NotIn";
47
+ AdInsConstant.RestrictionOr = "Or"; //pastikan ada 1 criteria sebelumnya
48
+ AdInsConstant.RestrictionOrNeq = "OrNeq"; //pastikan ada 1 criteria sebelumnya
49
+ AdInsConstant.RestrictionIsNull = "ISNULL";
50
+ AdInsConstant.RestrictionIsNotNull = "ISNOTNULL";
51
+ AdInsConstant.RestrictionGTE = "GTE";
52
+ AdInsConstant.RestrictionLTE = "LTE";
53
+ AdInsConstant.showData = "10,50,100";
54
+ AdInsConstant.JoinTypeInner = "INNER";
55
+ AdInsConstant.JoinTypeLeft = "LEFT";
56
+
57
+ class IntegrationObj {
58
+ constructor() {
59
+ this.baseUrl = "";
60
+ this.apiPath = "";
61
+ this.requestObj = new Object();
62
+ this.leftColumnToJoin = "";
63
+ this.rightColumnToJoin = "";
64
+ this.joinType = AdInsConstant.JoinTypeInner;
65
+ }
66
+ }
67
+
68
+ class InputSearchObj {
69
+ constructor() {
70
+ this._url = "";
71
+ this.enviromentUrl = "";
72
+ this.title = "";
73
+ this.apiQryPaging = "";
74
+ this.arrCritObj = null;
75
+ this.addCritInput = new Array();
76
+ this.listEnvironments = new Array();
77
+ this.whereValue = new Array();
78
+ this.fromValue = new Array();
79
+ this.switchValue = new Array();
80
+ this.integrationObj = new IntegrationObj();
81
+ this.isJoinExAPI = false;
82
+ }
83
+ }
84
+ class EnviObj {
85
+ constructor() {
86
+ this.name = "";
87
+ this.environment = "";
88
+ }
89
+ }
90
+ class WhereValueObj {
91
+ constructor() {
92
+ this.property = "";
93
+ }
94
+ }
95
+ class FromValueObj {
96
+ constructor() {
97
+ this.property = "";
98
+ }
99
+ }
100
+ class SwitchValueObj {
101
+ constructor() {
102
+ this.property = "";
103
+ }
104
+ }
105
+ class EnvisObj {
106
+ constructor() {
107
+ this.environment = "";
108
+ this.url = "";
109
+ }
110
+ }
111
+
112
+ class CriteriaObj {
113
+ constructor() {
114
+ this.low = 0;
115
+ this.high = 0;
116
+ this.DataType = 'Text';
117
+ this.isCriteriaDataTable = false;
118
+ }
119
+ }
120
+
121
+ class RequestCriteriaObj {
122
+ constructor() {
123
+ this.includeCount = true;
124
+ this.includeData = true;
125
+ this.isLoading = true;
126
+ this.queryString = '';
127
+ this.rowVersion = '';
128
+ this.integrationObj = new IntegrationObj();
129
+ this.joinType = AdInsConstant.JoinTypeInner;
130
+ }
131
+ }
132
+
133
+ const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
134
+ const EXCEL_EXTENSION = '.xlsx';
135
+ class ExcelService {
136
+ constructor() { }
137
+ exportAsExcelFile(json, excelFileName) {
138
+ const worksheet = XLSX.utils.json_to_sheet(json);
139
+ console.log('worksheet', worksheet);
140
+ const workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
141
+ const excelBuffer = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
142
+ //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });
143
+ this.saveAsExcelFile(excelBuffer, excelFileName);
144
+ }
145
+ saveAsExcelFile(buffer, fileName) {
146
+ const data = new Blob([buffer], {
147
+ type: EXCEL_TYPE
148
+ });
149
+ FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);
150
+ }
151
+ }
152
+ /** @nocollapse */ /** @nocollapse */ ExcelService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ExcelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
153
+ /** @nocollapse */ /** @nocollapse */ ExcelService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ExcelService });
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ExcelService, decorators: [{
155
+ type: Injectable
156
+ }], ctorParameters: function () { return []; } });
157
+
158
+ class KeyValueReportObj {
159
+ constructor() {
160
+ this.key = 0;
161
+ this.value = "";
162
+ }
163
+ }
164
+ class ExportTypeConstant {
165
+ }
166
+ ExportTypeConstant.EXP_TYPE_PDF = 0;
167
+ ExportTypeConstant.EXP_TYPE_XLS = 1;
168
+ ExportTypeConstant.EXP_TYPE_XLSX = 2;
169
+ ExportTypeConstant.EXP_TYPE_DOC = 3;
170
+ ExportTypeConstant.EXP_TYPE_DOCX = 4;
171
+
172
+ class KeyValueUCSearchObj {
173
+ constructor() {
174
+ this.key = 0;
175
+ this.value = "";
176
+ }
177
+ }
178
+ class ListKeyValueMonth {
179
+ constructor() {
180
+ this.DictOfMonth = {};
181
+ this.ListOfMonth = new Array();
182
+ this.DictOfMonth = {};
183
+ this.ListOfMonth.push({ key: 1, value: "January" });
184
+ this.DictOfMonth[1] = "January";
185
+ this.ListOfMonth.push({ key: 2, value: "February" });
186
+ this.DictOfMonth[2] = "February";
187
+ this.ListOfMonth.push({ key: 3, value: "March" });
188
+ this.DictOfMonth[3] = "March";
189
+ this.ListOfMonth.push({ key: 4, value: "April" });
190
+ this.DictOfMonth[4] = "April";
191
+ this.ListOfMonth.push({ key: 5, value: "May" });
192
+ this.DictOfMonth[5] = "May";
193
+ this.ListOfMonth.push({ key: 6, value: "June" });
194
+ this.DictOfMonth[6] = "June";
195
+ this.ListOfMonth.push({ key: 7, value: "July" });
196
+ this.DictOfMonth[7] = "July";
197
+ this.ListOfMonth.push({ key: 8, value: "August" });
198
+ this.DictOfMonth[8] = "August";
199
+ this.ListOfMonth.push({ key: 9, value: "September" });
200
+ this.DictOfMonth[9] = "September";
201
+ this.ListOfMonth.push({ key: 10, value: "October" });
202
+ this.DictOfMonth[10] = "October";
203
+ this.ListOfMonth.push({ key: 11, value: "November" });
204
+ this.DictOfMonth[11] = "November";
205
+ this.ListOfMonth.push({ key: 12, value: "December" });
206
+ this.DictOfMonth[12] = "December";
207
+ }
208
+ }
209
+
210
+ class TextSearchPipe {
211
+ transform(items, text) {
212
+ if (!text) {
213
+ return items;
214
+ }
215
+ return items.filter((item) => {
216
+ if (item.Value && typeof item.Value === 'string') {
217
+ return item.Value.toLowerCase().indexOf(text.toLowerCase()) > -1;
218
+ }
219
+ return false;
220
+ });
221
+ }
222
+ }
223
+ /** @nocollapse */ /** @nocollapse */ TextSearchPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: TextSearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
224
+ /** @nocollapse */ /** @nocollapse */ TextSearchPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: TextSearchPipe, name: "textSearch" });
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: TextSearchPipe, decorators: [{
226
+ type: Pipe,
227
+ args: [{
228
+ name: 'textSearch'
229
+ }]
230
+ }] });
231
+
232
+ class UCSearchComponent {
233
+ constructor(http, excelService, _renderer2, _document, toastr, cookieService, datePipe, elemRef) {
234
+ this.http = http;
235
+ this.excelService = excelService;
236
+ this._renderer2 = _renderer2;
237
+ this._document = _document;
238
+ this.toastr = toastr;
239
+ this.cookieService = cookieService;
240
+ this.datePipe = datePipe;
241
+ this.elemRef = elemRef;
242
+ this.searchInput = new InputSearchObj();
243
+ this.pageSize = 10;
244
+ this.isReport = false;
245
+ this.result = new EventEmitter();
246
+ this.genRpt = new EventEmitter();
247
+ this.reqGetAllData = new EventEmitter();
248
+ this.ExportTypeList = [
249
+ {
250
+ key: ExportTypeConstant.EXP_TYPE_PDF,
251
+ value: "PDF"
252
+ },
253
+ {
254
+ key: ExportTypeConstant.EXP_TYPE_XLS,
255
+ value: "Excel 2003"
256
+ },
257
+ {
258
+ key: ExportTypeConstant.EXP_TYPE_XLSX,
259
+ value: "Excel 2007"
260
+ },
261
+ {
262
+ key: ExportTypeConstant.EXP_TYPE_DOC,
263
+ value: "Document"
264
+ },
265
+ {
266
+ key: ExportTypeConstant.EXP_TYPE_DOCX,
267
+ value: "Document XML"
268
+ },
269
+ ];
270
+ this.ListOfMonth = new ListKeyValueMonth();
271
+ this.ListOfYear = new Array();
272
+ this.ClaimList = [
273
+ {
274
+ Key: AdInsConstant.RestrictionIsNotNull,
275
+ Value: "CLAIMED"
276
+ },
277
+ {
278
+ Key: AdInsConstant.RestrictionIsNull,
279
+ Value: "UNCLAIMED"
280
+ },
281
+ ];
282
+ this.ExportType = 0;
283
+ this.pageNow = 1;
284
+ this.isDataLoaded = false;
285
+ this.isHidden = false;
286
+ this.BusinessDt = new Date();
287
+ this.dateWrong = false;
288
+ this.readonly = false;
289
+ this.currentState = 'initial';
290
+ this.countForm = 0;
291
+ this.formattedAmount = '';
292
+ this.amount = 0;
293
+ }
294
+ // isListHide: boolean = true;
295
+ // @HostListener('document:click', ['$event'])
296
+ // onClick(ev: MouseEvent) {
297
+ // const clickInside = this.elemRef.nativeElement.contains(ev.target);
298
+ // if (!clickInside) {
299
+ // this.isListHide = true;
300
+ // }
301
+ // }
302
+ set content(content) {
303
+ if (content) { // initially setter gets called with undefined
304
+ this.searchForm = content;
305
+ }
306
+ }
307
+ changeState() {
308
+ this.currentState = this.currentState == 'initial' ? 'final' : 'initial';
309
+ this.isHidden = !this.isHidden ? true : false;
310
+ }
311
+ async ngOnInit() {
312
+ console.log("ucsearch");
313
+ this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;
314
+ this.arrCrit = this.searchInput.arrCritObj;
315
+ let js = this._renderer2.createElement('script');
316
+ js.text = `
317
+ $(document).ready(function(){
318
+ $("#flip").click(function(){
319
+ $("#panel").slideToggle("slow");
320
+ });
321
+ });
322
+ `;
323
+ this._renderer2.appendChild(this._document.body, js);
324
+ let value = this.cookieService.get('BusinessDateRaw');
325
+ this.BisDt = this.DecryptString(value, "AdInsFOU12345678");
326
+ this.BusinessDt = new Date(this.BisDt);
327
+ await this.initiateForm();
328
+ }
329
+ async initiateForm() {
330
+ await this.getJSON(this.searchInput._url).subscribe(data => {
331
+ this.configuration = data;
332
+ this.exportData = data.exportExcel;
333
+ if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {
334
+ this.ExportTypeList = data.exportTypeList;
335
+ this.ExportType = this.ExportTypeList[0].key;
336
+ }
337
+ this.countForm = data.component.length;
338
+ this.isDataLoaded = true;
339
+ if (this.searchInput.title != undefined && this.searchInput.title != "") {
340
+ this.configuration.title = this.searchInput.title;
341
+ }
342
+ for (let i = 0; i < this.countForm; i++) {
343
+ //ini kalau datanya di load dari URL
344
+ if (data.component[i].isFromURL) {
345
+ let request = new RequestCriteriaObj();
346
+ let arrayCrit = new Array();
347
+ let criteriaObject = new CriteriaObj();
348
+ criteriaObject.DataType = "text";
349
+ criteriaObject.propName = data.component[i].criteriaPropName;
350
+ criteriaObject.value = data.component[i].criteriaPropValue;
351
+ criteriaObject.restriction = "eq";
352
+ arrayCrit.push(criteriaObject);
353
+ request.criteria = arrayCrit;
354
+ request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;
355
+ // Pengecekan penggunaan url atau path
356
+ if (data.component[i].path != undefined && data.component[i].path != "") {
357
+ if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {
358
+ for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {
359
+ if (data.component[i].environment == this.searchInput.listEnvironments[y].environment) {
360
+ data.component[i].fullpath = this.searchInput.listEnvironments[y].url + data.component[i].path;
361
+ break;
362
+ }
363
+ }
364
+ }
365
+ else {
366
+ data.component[i].fullpath = data.component[i].url;
367
+ }
368
+ }
369
+ else {
370
+ data.component[i].fullpath = data.component[i].url;
371
+ }
372
+ //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya
373
+ //biar tiap function ada state2nya sendiri
374
+ this.resolveObject(data.component[i], data.component[i].fullpath, request);
375
+ }
376
+ if (data.component[i].type == "numeric") {
377
+ data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');
378
+ }
379
+ //pengecekan ddl
380
+ if (data.component[i].type == "dropdown") {
381
+ if (data.component[i].dtmType != undefined) {
382
+ if (data.component[i].dtmType.includes("month")) {
383
+ if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
384
+ data.component[i].value = this.setDefaultValueMonth(data.component[i].value);
385
+ }
386
+ data.component[i].items = this.setMonthDDL(data.component[i].dtmType);
387
+ }
388
+ if (data.component[i].dtmType.includes("year")) {
389
+ if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
390
+ data.component[i].value = this.setDefaultValueYear(data.component[i].value);
391
+ }
392
+ data.component[i].items = this.setYearDDL(data.component[i].dtmType);
393
+ }
394
+ }
395
+ }
396
+ // if (data.component[i].type == "dropdownSearch" && !data.component[i].isFromURL && data.component[i].items?.length != 1) {
397
+ // if (data.component[i].ddsType == undefined || data.component[i].ddsType == "all") {
398
+ // data.component[i].value = "all";
399
+ // data.component[i].descr = "All";
400
+ // } else if (data.component[i].ddsType == "one") {
401
+ // data.component[i].value = "one";
402
+ // data.component[i].descr = "Select One";
403
+ // }
404
+ // }
405
+ if (data.component[i].type == "dropdownSearch" && !data.component[i].isFromURL && data.component[i].items.length == 1) {
406
+ data.component[i].value = data.component[i].items[0].Key;
407
+ data.component[i].descr = data.component[i].items[0].Value;
408
+ }
409
+ if (data.component[i].type != "dropdownSearch" && !data.component[i].value) {
410
+ data.component[i].value = "";
411
+ if (data.component[i].ddlType == 'all')
412
+ data.component[i].value = "all";
413
+ if (data.component[i].ddlType == 'one')
414
+ data.component[i].value = "one";
415
+ }
416
+ //pengecekan tanggal
417
+ if (data.component[i].type == "datepicker") {
418
+ this.readonly = data.component[i].readonly;
419
+ if (data.component[i].value.includes("BD")) {
420
+ let businessDate = new Date();
421
+ if (this.BisDt != null) {
422
+ businessDate = new Date(this.BisDt);
423
+ }
424
+ let operator = data.component[i].value.charAt(2);
425
+ let dateShow = new Date();
426
+ if (operator == "-") {
427
+ let tempMinus = data.component[i].value.split("-", 2);
428
+ let numDay = parseInt(tempMinus[1]);
429
+ businessDate.setDate(businessDate.getDate() - numDay);
430
+ }
431
+ else if (operator == "+") {
432
+ let tempMinus = data.component[i].value.split("+", 2);
433
+ let numDay = parseInt(tempMinus[1]);
434
+ businessDate.setDate(businessDate.getDate() + numDay);
435
+ }
436
+ dateShow = businessDate;
437
+ let dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US');
438
+ data.component[i].value = dateText;
439
+ }
440
+ if (this.readonly = false) {
441
+ if (data.component[i].restriction != undefined && data.component[i].restriction != "") {
442
+ if (data.component[i].restriction.toUpperCase() == "GT") {
443
+ let minDate = new Date(this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));
444
+ minDate.setDate(minDate.getDate() + 1);
445
+ data.component[i].minDate = minDate;
446
+ }
447
+ else if (data.component[i].restriction.toUpperCase() == "LT") {
448
+ let maxDate = new Date(this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));
449
+ maxDate.setDate(maxDate.getDate() - 1);
450
+ data.component[i].maxDate = maxDate;
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+ setTimeout(() => {
457
+ for (let j = 0; j < this.countForm; j++) {
458
+ if (data.component[j].isEvent && this.configuration.component[j].itemsUrl.length == 1) {
459
+ this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);
460
+ }
461
+ if (data.component[j].type == "officeRoleCodes" && this.configuration.component[j].itemsUrl.length > 0) {
462
+ this.SetRoleOfficeCodes(j);
463
+ }
464
+ }
465
+ }, 1000);
466
+ });
467
+ }
468
+ SetRoleOfficeCodes(i) {
469
+ let value = this.cookieService.get("UserAccess");
470
+ let userAccess = JSON.parse(this.DecryptString(value, "AdInsFOU12345678"));
471
+ let roleCode = userAccess["RoleCode"];
472
+ let listOfficeRoleCodes = new Array();
473
+ listOfficeRoleCodes.push(roleCode);
474
+ let component = this.myForm.nativeElement[i];
475
+ let ddl = component.options;
476
+ let text = ddl[ddl.selectedIndex].value.trim();
477
+ if (this.configuration.component[i].itemsUrl.length == 1 || (this.configuration.component[i].ddlType == 'all' && text == 'all')) {
478
+ for (let index = 0; index < this.configuration.component[i].itemsUrl.length; index++) {
479
+ const element = this.configuration.component[i].itemsUrl[index];
480
+ listOfficeRoleCodes.push(element.Key);
481
+ listOfficeRoleCodes.push(roleCode + "-" + element.Key);
482
+ }
483
+ }
484
+ else {
485
+ listOfficeRoleCodes.push(text);
486
+ listOfficeRoleCodes.push(roleCode + "-" + text);
487
+ }
488
+ this.searchInput.integrationObj.requestObj["OfficeRoleCodes"] = listOfficeRoleCodes;
489
+ }
490
+ setDefaultValueMonth(value) {
491
+ let businessDate = new Date(this.BusinessDt);
492
+ let operator = value.charAt(2);
493
+ let tempValue = value.split(operator, 2);
494
+ let numMonth = parseInt(tempValue[1]);
495
+ if (!numMonth)
496
+ numMonth = 1;
497
+ if (operator == "-") {
498
+ businessDate.setMonth(businessDate.getMonth() - numMonth);
499
+ }
500
+ else if (operator == "+") {
501
+ businessDate.setMonth(businessDate.getMonth() + numMonth);
502
+ }
503
+ return businessDate.getMonth();
504
+ }
505
+ setMonthDDL(month) {
506
+ let ListOfMonth;
507
+ let equation = month.match("[\\/+][-]|[-][\\/+]|\\/+|-");
508
+ let toMin = this.BusinessDt.getMonth();
509
+ let toMax = this.BusinessDt.getMonth();
510
+ let tempEquation = equation[0];
511
+ let minMax = parseInt(month.substring(equation.index + equation[0].length));
512
+ if (minMax >= 12)
513
+ return this.ListOfMonth.ListOfMonth;
514
+ if ((tempEquation == "+-" || tempEquation == "-+") && minMax >= 6)
515
+ return this.ListOfMonth.ListOfMonth;
516
+ let dictOfMonth = this.ListOfMonth.DictOfMonth;
517
+ ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
518
+ for (let q = 0; q < minMax; q++) {
519
+ if (tempEquation.includes("-")) {
520
+ toMin--;
521
+ if (toMin == 0)
522
+ toMin = 12;
523
+ ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
524
+ }
525
+ if (tempEquation.includes("+")) {
526
+ toMax++;
527
+ if (toMax == 13)
528
+ toMax = 1;
529
+ ListOfMonth.push({ key: toMax, value: dictOfMonth[toMax] });
530
+ }
531
+ }
532
+ ListOfMonth.sort((a, b) => {
533
+ return a.key - b.key;
534
+ });
535
+ return ListOfMonth;
536
+ }
537
+ setDefaultValueYear(value) {
538
+ let businessDate = new Date(this.BusinessDt);
539
+ let operator = value.charAt(2);
540
+ let tempValue = value.split(operator, 2);
541
+ let numYear = parseInt(tempValue[1]);
542
+ if (!numYear)
543
+ numYear = 1;
544
+ if (operator == "-") {
545
+ businessDate.setFullYear(businessDate.getFullYear() - numYear);
546
+ }
547
+ else if (operator == "+") {
548
+ businessDate.setFullYear(businessDate.getFullYear() + numYear);
549
+ }
550
+ return businessDate.getFullYear();
551
+ }
552
+ setYearDDL(year) {
553
+ this.ListOfYear = new Array();
554
+ let equation = year.match("[\\/+][-]|[-][\\/+]|\\/+|-");
555
+ let toMin = this.BusinessDt.getFullYear();
556
+ let toMax = this.BusinessDt.getFullYear();
557
+ let minMax = parseInt(year.substring(equation.index + equation[0].length));
558
+ this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });
559
+ for (let q = 0; q < minMax; q++) {
560
+ if (equation[0] == "-+" || equation[0] == "+-") {
561
+ toMin--;
562
+ toMax++;
563
+ this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });
564
+ }
565
+ else if (equation[0] == "-") {
566
+ toMin--;
567
+ this.ListOfYear.push({ key: toMin, value: toMin.toString() });
568
+ }
569
+ else if (equation[0] == "+") {
570
+ toMax++;
571
+ this.ListOfYear.push({ key: toMax, value: toMax.toString() });
572
+ }
573
+ }
574
+ this.ListOfYear.sort((a, b) => {
575
+ return a.key - b.key;
576
+ });
577
+ return this.ListOfYear;
578
+ }
579
+ getJSON(url) {
580
+ return this.http.get(url);
581
+ }
582
+ postJSON(url, criteria = null) {
583
+ return this.http.post(url, criteria);
584
+ }
585
+ searchClick() {
586
+ // for(let i=0;i<this.countForm;i++){
587
+ // if(this.configuration.component[i].type == "datepicker"){
588
+ // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){
589
+ // this.checkInputDate(this.configuration.component[i]);
590
+ // }
591
+ // }
592
+ // }
593
+ // if(this.dateWrong) return;
594
+ let order = null;
595
+ if (this.configuration.orderby != null) {
596
+ order = {
597
+ key: this.configuration.orderby.key,
598
+ value: this.configuration.orderby.value
599
+ };
600
+ }
601
+ this.pageNow = 1;
602
+ this.search(this.apiUrl, this.pageNow, this.pageSize, order, this.arrCrit);
603
+ }
604
+ async reset() {
605
+ this.searchForm.resetForm({
606
+ ExportType: this.ExportTypeList[0].key
607
+ });
608
+ await this.initiateForm();
609
+ }
610
+ search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = new Array()) {
611
+ let request = new RequestCriteriaObj();
612
+ let arrCrit = new Array();
613
+ let IsQueryIn = false;
614
+ let IsBreak = false;
615
+ // Inject whereQuery for where criteria
616
+ if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {
617
+ this.configuration.querystring.whereQuery = new Array();
618
+ for (let x = 0; x < this.searchInput.whereValue.length; x++) {
619
+ this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);
620
+ }
621
+ }
622
+ if (this.searchInput.fromValue != undefined && this.searchInput.fromValue.length != 0) {
623
+ this.configuration.querystring.fromQuery = new Array();
624
+ for (let x = 0; x < this.searchInput.fromValue.length; x++) {
625
+ this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[x].value);
626
+ }
627
+ }
628
+ request.pageNo = pageNo;
629
+ request.rowPerPage = rowPerPage;
630
+ request.orderBy = orderBy;
631
+ request.queryString = this.configuration.querystring;
632
+ let formSeq = -1;
633
+ for (let i = 0; i < this.countForm; i++) {
634
+ let critObj = new CriteriaObj();
635
+ if (this.configuration.component[i].type == "dropdownSearch") {
636
+ formSeq += 3;
637
+ }
638
+ else {
639
+ formSeq++;
640
+ }
641
+ let component = this.myForm.nativeElement[formSeq];
642
+ // // popup message if required
643
+ // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == "true") {
644
+ // let val = component.value.trim();
645
+ // if (val == "") {
646
+ // IsBreak = true;
647
+ // let label = component.getAttribute('label');
648
+ // this.toastr.warning("Please input " + label);
649
+ // break;
650
+ // }
651
+ // }
652
+ critObj.DataType = component.getAttribute('data-type');
653
+ //Ini khusus kalau dari Drop Down
654
+ if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == "true") {
655
+ IsQueryIn = true;
656
+ }
657
+ else {
658
+ IsQueryIn = false;
659
+ }
660
+ if (component.value != "") {
661
+ if (component.nodeName == 'SELECT') {
662
+ let ddl = component.options;
663
+ let text = ddl[ddl.selectedIndex].value.trim();
664
+ if (text == "one") {
665
+ IsBreak = true;
666
+ let label = component.getAttribute('label');
667
+ this.toastr.warning("Please select " + label);
668
+ break;
669
+ }
670
+ if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
671
+ critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
672
+ }
673
+ if (this.configuration.component[i].type == "taskDefinitionKey" ||
674
+ this.configuration.component[i].type == "processKey")
675
+ continue;
676
+ if (this.configuration.component[i].type == "claim") {
677
+ critObj.propName = component.getAttribute('data-name');
678
+ critObj.restriction = text;
679
+ critObj.value = null;
680
+ arrCrit.push(critObj);
681
+ }
682
+ else {
683
+ if (text != "all" && text != "one") {
684
+ //Kalau Dari Dropdown udah pasti pake Eq
685
+ critObj.restriction = AdInsConstant.RestrictionEq;
686
+ if (component.name != "") {
687
+ critObj.propName = component.name;
688
+ }
689
+ else {
690
+ critObj.propName = component.getAttribute('data-name');
691
+ }
692
+ critObj.value = text;
693
+ arrCrit.push(critObj);
694
+ }
695
+ else if (text == "all" && IsQueryIn && component.options.length != 0) {
696
+ let ddlList = new Array();
697
+ for (let x = 0; x < component.options.length; x++) {
698
+ if (x != 0) {
699
+ ddlList.push(component.options[x].value);
700
+ }
701
+ }
702
+ if (ddlList.length != 0) {
703
+ critObj.restriction = AdInsConstant.RestrictionIn;
704
+ if (component.name != "") {
705
+ critObj.propName = component.name;
706
+ }
707
+ else {
708
+ critObj.propName = component.getAttribute('data-name');
709
+ }
710
+ critObj.listValue = ddlList;
711
+ arrCrit.push(critObj);
712
+ }
713
+ }
714
+ }
715
+ }
716
+ else {
717
+ //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like
718
+ if (component.name != "") {
719
+ critObj.propName = component.name;
720
+ }
721
+ else {
722
+ critObj.propName = component.getAttribute('data-name');
723
+ }
724
+ critObj.value = component.value.trim();
725
+ if (component.value.includes("%")) {
726
+ critObj.restriction = AdInsConstant.RestrictionLike;
727
+ }
728
+ //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya
729
+ else if (component.getAttribute('data-restriction') != "" && component.getAttribute('data-restriction') != null) {
730
+ critObj.restriction = component.getAttribute('data-restriction');
731
+ if (component.getAttribute('data-type') == 'numeric') {
732
+ critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();
733
+ }
734
+ if (critObj.restriction.toUpperCase() == "LIKE") {
735
+ critObj.value = "%" + component.value.trim() + "%";
736
+ critObj.restriction = AdInsConstant.RestrictionLike;
737
+ }
738
+ }
739
+ else {
740
+ critObj.restriction = AdInsConstant.RestrictionEq;
741
+ }
742
+ if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
743
+ critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
744
+ }
745
+ arrCrit.push(critObj);
746
+ }
747
+ }
748
+ }
749
+ if (IsBreak) {
750
+ return;
751
+ }
752
+ if (addCrit != null && addCrit != undefined) {
753
+ if (addCrit.length != 0) {
754
+ for (let i = 0; i < addCrit.length; i++) {
755
+ arrCrit.push(addCrit[i]);
756
+ }
757
+ }
758
+ else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {
759
+ for (let i = 0; i < this.searchInput.addCritInput.length; i++) {
760
+ arrCrit.push(this.searchInput.addCritInput[i]);
761
+ }
762
+ }
763
+ }
764
+ else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {
765
+ for (let i = 0; i < this.searchInput.addCritInput.length; i++) {
766
+ arrCrit.push(this.searchInput.addCritInput[i]);
767
+ }
768
+ }
769
+ request.criteria = arrCrit;
770
+ if (!this.searchInput.isJoinExAPI) {
771
+ request.integrationObj = null;
772
+ }
773
+ else {
774
+ request.integrationObj = this.searchInput.integrationObj;
775
+ }
776
+ this.http.post(apiUrl, request).subscribe((response) => {
777
+ let qryPaging = {
778
+ response: response,
779
+ pageNow: pageNo
780
+ };
781
+ console.log(qryPaging);
782
+ this.result.emit(qryPaging);
783
+ this.reqGetAllData.emit(request);
784
+ return response;
785
+ });
786
+ }
787
+ GenerateReport() {
788
+ this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });
789
+ }
790
+ lessThanFour() {
791
+ if (this.countForm > 3) {
792
+ return false;
793
+ }
794
+ else {
795
+ return true;
796
+ }
797
+ }
798
+ resolveObject(obj, url, crit = null) {
799
+ const val = this.postJSON(url, crit);
800
+ val.subscribe(tempData => {
801
+ obj.itemsUrl = new Array();
802
+ obj.itemsUrl = tempData.ReturnObject;
803
+ if (obj.exclude != undefined && obj.exclude != "") {
804
+ obj.itemsUrl = obj.itemsUrl.filter((value) => !obj.exclude.includes(value.Key));
805
+ }
806
+ if (obj.type == "dropdownSearch" && obj.itemsUrl.length == 1) {
807
+ obj.value = obj.itemsUrl[0].Key;
808
+ obj.descr = obj.itemsUrl[0].Value;
809
+ }
810
+ if (obj.affectedFilter && obj.itemsUrl.length == 1) {
811
+ this.onChangeEvent(obj.itemsUrl[0].Key, obj);
812
+ }
813
+ });
814
+ }
815
+ transformAmount(element) {
816
+ this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');
817
+ // to show the formatted amount in the textbox.
818
+ element.target.value = this.formattedAmount;
819
+ }
820
+ transformToDecimal(element) {
821
+ element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
822
+ }
823
+ exportAsXLSX() {
824
+ let request = new RequestCriteriaObj();
825
+ request.pageNo = 1;
826
+ request.rowPerPage = 9999;
827
+ request.orderBy = null;
828
+ request.criteria = [];
829
+ request.queryString = this.configuration.querystring;
830
+ if (!this.searchInput.isJoinExAPI) {
831
+ request.integrationObj = null;
832
+ }
833
+ else {
834
+ request.integrationObj = this.searchInput.integrationObj;
835
+ }
836
+ this.http.post(this.apiUrl, request).subscribe(response => {
837
+ this.ExcelData = response["Data"];
838
+ this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
839
+ }, (error) => {
840
+ console.log(error);
841
+ });
842
+ }
843
+ onChangeEvent(optValue, afFilter) {
844
+ let jsonComp = this.configuration.component;
845
+ for (let i = 0; i < afFilter.affectedFilter.length; i++) {
846
+ for (let j = 0; j < jsonComp.length; j++) {
847
+ if (jsonComp[j].name == afFilter.affectedFilter[i]) {
848
+ let request = new RequestCriteriaObj();
849
+ let arrayCrit = new Array();
850
+ if (optValue != "all" && optValue != "one") {
851
+ let critObj = new CriteriaObj();
852
+ critObj.DataType = afFilter.datatype;
853
+ if (afFilter.filterPropName != undefined || afFilter.filterPropName != "") {
854
+ request[afFilter.filterPropName] = optValue;
855
+ critObj.propName = afFilter.filterPropName;
856
+ }
857
+ else {
858
+ critObj.propName = afFilter.name;
859
+ request[afFilter.name] = optValue;
860
+ }
861
+ critObj.value = optValue;
862
+ critObj.restriction = AdInsConstant.RestrictionEq;
863
+ arrayCrit.push(critObj);
864
+ }
865
+ request.criteria = arrayCrit;
866
+ if (jsonComp[j].path != undefined && jsonComp[j].path != "") {
867
+ if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {
868
+ for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {
869
+ if (jsonComp[j].environment == this.searchInput.listEnvironments[y].environment) {
870
+ jsonComp[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp[j].path;
871
+ break;
872
+ }
873
+ }
874
+ }
875
+ else {
876
+ jsonComp[j].fullpath = jsonComp[j].url;
877
+ }
878
+ }
879
+ else {
880
+ jsonComp[j].fullpath = jsonComp[j].url;
881
+ }
882
+ this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);
883
+ }
884
+ }
885
+ }
886
+ }
887
+ SetProcessKey(idx, wfKeyFilter) {
888
+ let component = this.myForm.nativeElement[idx];
889
+ let ddl = component.options;
890
+ let text = ddl[ddl.selectedIndex].value.trim();
891
+ if (text) {
892
+ this.searchInput.integrationObj.requestObj[wfKeyFilter] = text;
893
+ }
894
+ }
895
+ switchCase(condList) {
896
+ let condition = false;
897
+ for (let i = 0; i < condList.conditions.length; i++) {
898
+ let idx = this.searchInput.switchValue.findIndex(x => x.property == condList.conditions[i].property);
899
+ if (condList.conditions[i].restriction == "EQ") {
900
+ if (!condList.conditions[i].isUser) {
901
+ if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {
902
+ condition = true;
903
+ }
904
+ else {
905
+ condition = false;
906
+ break;
907
+ }
908
+ }
909
+ else {
910
+ let username = localStorage.getItem("Username");
911
+ if (this.searchInput.switchValue[idx].value == username) {
912
+ condition = true;
913
+ }
914
+ else {
915
+ condition = false;
916
+ break;
917
+ }
918
+ }
919
+ }
920
+ else if (condList.conditions[i].restriction == "NEQ") {
921
+ if (condList.conditions[i].isUser != true) {
922
+ if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {
923
+ condition = true;
924
+ }
925
+ else {
926
+ condition = false;
927
+ break;
928
+ }
929
+ }
930
+ else {
931
+ let username = localStorage.getItem("Username");
932
+ if (this.searchInput.switchValue[idx].value != username) {
933
+ condition = true;
934
+ }
935
+ else {
936
+ condition = false;
937
+ break;
938
+ }
939
+ }
940
+ }
941
+ else if (condList.conditions[i].restriction == "GT") {
942
+ if (!condList.conditions[i].isUser) {
943
+ if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {
944
+ condition = true;
945
+ }
946
+ else {
947
+ condition = false;
948
+ break;
949
+ }
950
+ }
951
+ else {
952
+ let username = localStorage.getItem("Username");
953
+ if (this.searchInput.switchValue[idx].value > username) {
954
+ condition = true;
955
+ }
956
+ else {
957
+ condition = false;
958
+ break;
959
+ }
960
+ }
961
+ }
962
+ else if (condList.conditions[i].restriction == "GTE") {
963
+ if (!condList.conditions[i].isUser) {
964
+ if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {
965
+ condition = true;
966
+ }
967
+ else {
968
+ condition = false;
969
+ break;
970
+ }
971
+ }
972
+ else {
973
+ let username = localStorage.getItem("Username");
974
+ if (this.searchInput.switchValue[idx].value >= username) {
975
+ condition = true;
976
+ }
977
+ else {
978
+ condition = false;
979
+ break;
980
+ }
981
+ }
982
+ }
983
+ else if (condList.conditions[i].restriction == "LT") {
984
+ if (!condList.conditions[i].isUser) {
985
+ if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {
986
+ condition = true;
987
+ }
988
+ else {
989
+ condition = false;
990
+ break;
991
+ }
992
+ }
993
+ else {
994
+ let username = localStorage.getItem("Username");
995
+ if (this.searchInput.switchValue[idx].value < username) {
996
+ condition = true;
997
+ }
998
+ else {
999
+ condition = false;
1000
+ break;
1001
+ }
1002
+ }
1003
+ }
1004
+ else if (condList.conditions[i].restriction == "LTE") {
1005
+ if (!condList.conditions[i].isUser) {
1006
+ if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {
1007
+ condition = true;
1008
+ }
1009
+ else {
1010
+ condition = false;
1011
+ break;
1012
+ }
1013
+ }
1014
+ else {
1015
+ let username = localStorage.getItem("Username");
1016
+ if (this.searchInput.switchValue[idx].value <= username) {
1017
+ condition = true;
1018
+ }
1019
+ else {
1020
+ condition = false;
1021
+ break;
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ return condition;
1027
+ }
1028
+ DecryptString(chipperText, chipperKey) {
1029
+ if (chipperKey == undefined || chipperKey.trim() == '' ||
1030
+ chipperText == undefined || chipperText.trim() == '')
1031
+ return chipperText;
1032
+ let chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);
1033
+ let iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);
1034
+ let decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });
1035
+ let plainText = decrypted.toString(CryptoJS.enc.Utf8);
1036
+ return plainText;
1037
+ }
1038
+ checkInputDate(component) {
1039
+ let minDateVal;
1040
+ let maxDateVal;
1041
+ let label;
1042
+ let errorMessage = new Array();
1043
+ let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GT")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"));
1044
+ if (MinComponent != undefined) {
1045
+ minDateVal = this.myForm.nativeElement[MinComponent.id].min == "" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);
1046
+ label = MinComponent.label.split(">", 2);
1047
+ if (minDateVal != null) {
1048
+ if (MinComponent.restriction.toUpperCase() == "GT") {
1049
+ minDateVal.setDate(minDateVal.getDate() - 1);
1050
+ errorMessage.push(" must be greater than ");
1051
+ }
1052
+ else if (MinComponent.restriction.toUpperCase() == "GTE") {
1053
+ errorMessage.push(" must be greater than or equals to ");
1054
+ }
1055
+ }
1056
+ }
1057
+ let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LTE")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LT")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LTE"));
1058
+ if (MaxComponent != undefined) {
1059
+ maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == "" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);
1060
+ label = MaxComponent.label.split("<", 2);
1061
+ if (maxDateVal != null) {
1062
+ if (MaxComponent.restriction.toUpperCase() == "LT") {
1063
+ maxDateVal.setDate(maxDateVal.getDate() + 1);
1064
+ errorMessage.push(" must be less than ");
1065
+ }
1066
+ else if (MaxComponent.restriction.toUpperCase() == "LTE") {
1067
+ errorMessage.push(" must be less than or equals to ");
1068
+ }
1069
+ }
1070
+ }
1071
+ if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {
1072
+ this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1073
+ this.dateWrong = true;
1074
+ }
1075
+ else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {
1076
+ this.toastr.warning(label[0] + errorMessage[0] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1077
+ this.dateWrong = true;
1078
+ }
1079
+ else if (minDateVal != null && maxDateVal != null) {
1080
+ if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {
1081
+ this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + " and" + errorMessage[1] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1082
+ this.dateWrong = true;
1083
+ }
1084
+ else {
1085
+ this.dateWrong = false;
1086
+ }
1087
+ }
1088
+ else {
1089
+ this.dateWrong = false;
1090
+ }
1091
+ }
1092
+ selectedOption(item, crit) {
1093
+ crit.descr = item.Value;
1094
+ crit.isListHide = true;
1095
+ }
1096
+ }
1097
+ /** @nocollapse */ /** @nocollapse */ UCSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchComponent, deps: [{ token: i1.HttpClient }, { token: ExcelService }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: i3.ToastrService }, { token: i4.CookieService }, { token: i5.DatePipe }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1098
+ /** @nocollapse */ /** @nocollapse */ UCSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: UCSearchComponent, selector: "lib-UCSearch", inputs: { searchInput: "searchInput", pageSize: "pageSize", isReport: "isReport" }, outputs: { result: "result", genRpt: "genRpt", reqGetAllData: "reqGetAllData" }, providers: [ExcelService, DatePipe], viewQueries: [{ propertyName: "content", first: true, predicate: ["enjiForm"], descendants: true }, { propertyName: "myForm", first: true, predicate: ["formIdSearch"], descendants: true }], ngImport: i0, template: "<!-- Basic form layout section start -->\r\n<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"configuration?.title != undefined && configuration?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" translate>{{configuration.title}}</h4>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch #enjiForm=\"ngForm\"\r\n (ngSubmit)=\"enjiForm.valid && searchClick()\">\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section font-weight-bold\">\r\n <div (click)=\"changeState()\" class=\"btn no-padding cursor-pointer flip\">\r\n <i class=\"fa\" style=\"font-size: 15px; margin: 0px 0px 5px -15px;\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-right' : 'fa-chevron-down'\"></i>\r\n </div>\r\n <span\r\n *ngIf=\"configuration?.sectionTitle != undefined && configuration?.sectionTitle != ''; then inputSectionTitle else defaultSectionTitle\"></span>\r\n <ng-template #inputSectionTitle>\r\n {{configuration?.sectionTitle}}\r\n </ng-template>\r\n <ng-template #defaultSectionTitle>\r\n Paging\r\n </ng-template>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div class=\"panel-active\" [@changeDivSize]=currentState>\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\" *ngFor=\"let question of configuration?.component; let i = index\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n [ngClass]=\"{'adins-required-label': (question.isRequired || (question?.ddlType != undefined && question.ddlType == 'one'))}\"\r\n translate>{{question.label}}</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"question.type=='textbox'\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='textarea'\">\r\n <textarea type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <input type=\"number\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name+[i]}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='currency'\">\r\n <div *ngIf=\"question?.isCustom != undefined && question?.isCustom\">\r\n <input type=\"\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: question.thousands, decimal: question.decimal, align: question.align, allowNegative: question.allowNegative, allowZero: question.allowZero, precision: question.precision, nullable: question.nullable }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question?.isCustom == undefined || !question?.isCustom\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: ',', decimal: '.', align: 'right', allowNegative: false, allowZero:true, precision: 2, nullable: false }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <input type=\"{{question.isTime ? 'datetime-local' : 'date'}}\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name+[i]}}\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\" min=\"{{question.minDate | date:'yyyy-MM-dd'}}\"\r\n max=\"{{question.maxDate | date:'yyyy-MM-dd'}}\"\r\n (focusout)=\"question.restriction != undefined && checkInputDate(question)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || question.type == 'officeRoleCodes'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.label=\"{{question.label}}\" [hidden]=\"question?.itemsUrl?.length == 1\"\r\n (change)=\"(question.type == 'taskDefinitionKey' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : SetRoleOfficeCodes(i)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && question?.itemsUrl?.length != 1\"\r\n value=\"one\">Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && question?.itemsUrl?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of question?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf=\"question?.itemsUrl?.length == 1\">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [(ngModel)]=\"question.value\" [required]=\"question.isRequired\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{question.descr}}</label>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control search-form-control\"\r\n name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n [placeholder]=\"question.placeholder\">\r\n <div class=\"dds-items-container\">\r\n <select class=\"full-width\" name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" [(ngModel)]=\"question.value\"\r\n [required]=\"question.isRequired\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\"\r\n size=\"{{question?.size == undefined ? question?.size : 10}}\">\r\n <option (click)=\"selectedOption({Key:'one',Value:'Select One'},question)\"\r\n *ngIf=\"question.ddsType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option (click)=\"selectedOption({Key:'all',Value:'All'},question)\"\r\n *ngIf=\"(question?.ddsType == undefined || question.ddsType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <!-- <option *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\" [value]=\"item?.key\" (click)=\"selectedOption(item,question)\">\r\n {{item?.value}}\r\n </option> -->\r\n <option\r\n *ngFor=\"let item of !question.isFromURL ? (question?.items | textSearch : question.searchText) : question?.itemsUrl | textSearch : question.searchText\"\r\n (click)=\"selectedOption(item,question)\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"question.type=='claim'\">\r\n <select name=\"{{'claim'+[i]}}\" class=\"form-control search-form-control\"\r\n attr.data-type=\"{{'text'}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-name=\"{{'Assignee'}}\" [hidden]=\"ClaimList?.length == 1\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls['claim'+[i]]?.touched || enjiForm.form.controls['claim'+[i]]?.dirty) && enjiForm.form.controls['claim'+[i]]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && ClaimList?.length != 1\" value=\"one\">Select\r\n One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && ClaimList?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of ClaimList\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <lib-uc-show-errors *ngIf=\"question.type!='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf=\"question.type=='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name+[i]]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 form-group\" *ngIf=\"(isReport != undefined && isReport)\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" translate>Report Type</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <select name=\"ExportType\" [(ngModel)]=\"ExportType\" class=\"form-control search-form-control\"\r\n attr.data-type=\"text\">\r\n <option *ngFor=\"let item of ExportTypeList\" [value]=\"item.key\">{{item.value}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Export Excel</span>\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i>&nbsp;<span translate>Reset</span>\r\n </button>\r\n <button *ngIf=\"(isReport == undefined || !isReport)\" type=\"submit\"\r\n class=\"btn btn-raised btn-primary\" #UCSearchClick>\r\n <i class=\"fa fa-search\"></i>&nbsp;<span translate>Search</span>\r\n </button>\r\n <button *ngIf=\"(isReport != undefined && isReport)\" type=\"button\" (click)=\"GenerateReport()\"\r\n class=\"btn btn-raised btn-primary\">\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Generate\r\n Report</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->", styles: [".ucSearch-title{margin:3px}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:\"\\e929\";font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;transform:rotate(90deg)}.dds-list-container{position:absolute;width:100%;z-index:9}\n"], components: [{ type: i6.UcShowErrorsComponent, selector: "lib-uc-show-errors", inputs: ["control", "submit", "fieldName"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.UpperCaseDirective, selector: "input[type=text], input", inputs: ["IsUpperCase"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i10.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["options"] }, { type: i8.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i8.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i8.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }], pipes: { "date": i5.DatePipe, "textSearch": TextSearchPipe }, animations: [
1099
+ trigger('changeDivSize', [
1100
+ state('initial', style({
1101
+ height: '*',
1102
+ opacity: '1',
1103
+ })),
1104
+ state('final', style({
1105
+ height: '0px',
1106
+ opacity: '0',
1107
+ overflow: 'hidden',
1108
+ })),
1109
+ transition('initial=>final', animate('300ms')),
1110
+ transition('final=>initial', animate('300ms'))
1111
+ ]),
1112
+ ] });
1113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchComponent, decorators: [{
1114
+ type: Component,
1115
+ args: [{ selector: 'lib-UCSearch', providers: [ExcelService, DatePipe], animations: [
1116
+ trigger('changeDivSize', [
1117
+ state('initial', style({
1118
+ height: '*',
1119
+ opacity: '1',
1120
+ })),
1121
+ state('final', style({
1122
+ height: '0px',
1123
+ opacity: '0',
1124
+ overflow: 'hidden',
1125
+ })),
1126
+ transition('initial=>final', animate('300ms')),
1127
+ transition('final=>initial', animate('300ms'))
1128
+ ]),
1129
+ ], template: "<!-- Basic form layout section start -->\r\n<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"configuration?.title != undefined && configuration?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" translate>{{configuration.title}}</h4>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch #enjiForm=\"ngForm\"\r\n (ngSubmit)=\"enjiForm.valid && searchClick()\">\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section font-weight-bold\">\r\n <div (click)=\"changeState()\" class=\"btn no-padding cursor-pointer flip\">\r\n <i class=\"fa\" style=\"font-size: 15px; margin: 0px 0px 5px -15px;\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-right' : 'fa-chevron-down'\"></i>\r\n </div>\r\n <span\r\n *ngIf=\"configuration?.sectionTitle != undefined && configuration?.sectionTitle != ''; then inputSectionTitle else defaultSectionTitle\"></span>\r\n <ng-template #inputSectionTitle>\r\n {{configuration?.sectionTitle}}\r\n </ng-template>\r\n <ng-template #defaultSectionTitle>\r\n Paging\r\n </ng-template>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div class=\"panel-active\" [@changeDivSize]=currentState>\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\" *ngFor=\"let question of configuration?.component; let i = index\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n [ngClass]=\"{'adins-required-label': (question.isRequired || (question?.ddlType != undefined && question.ddlType == 'one'))}\"\r\n translate>{{question.label}}</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"question.type=='textbox'\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='textarea'\">\r\n <textarea type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <input type=\"number\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name+[i]}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='currency'\">\r\n <div *ngIf=\"question?.isCustom != undefined && question?.isCustom\">\r\n <input type=\"\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: question.thousands, decimal: question.decimal, align: question.align, allowNegative: question.allowNegative, allowZero: question.allowZero, precision: question.precision, nullable: question.nullable }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question?.isCustom == undefined || !question?.isCustom\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: ',', decimal: '.', align: 'right', allowNegative: false, allowZero:true, precision: 2, nullable: false }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <input type=\"{{question.isTime ? 'datetime-local' : 'date'}}\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name+[i]}}\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\" min=\"{{question.minDate | date:'yyyy-MM-dd'}}\"\r\n max=\"{{question.maxDate | date:'yyyy-MM-dd'}}\"\r\n (focusout)=\"question.restriction != undefined && checkInputDate(question)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || question.type == 'officeRoleCodes'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.label=\"{{question.label}}\" [hidden]=\"question?.itemsUrl?.length == 1\"\r\n (change)=\"(question.type == 'taskDefinitionKey' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : SetRoleOfficeCodes(i)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && question?.itemsUrl?.length != 1\"\r\n value=\"one\">Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && question?.itemsUrl?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of question?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf=\"question?.itemsUrl?.length == 1\">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [(ngModel)]=\"question.value\" [required]=\"question.isRequired\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{question.descr}}</label>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control search-form-control\"\r\n name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n [placeholder]=\"question.placeholder\">\r\n <div class=\"dds-items-container\">\r\n <select class=\"full-width\" name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" [(ngModel)]=\"question.value\"\r\n [required]=\"question.isRequired\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\"\r\n size=\"{{question?.size == undefined ? question?.size : 10}}\">\r\n <option (click)=\"selectedOption({Key:'one',Value:'Select One'},question)\"\r\n *ngIf=\"question.ddsType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option (click)=\"selectedOption({Key:'all',Value:'All'},question)\"\r\n *ngIf=\"(question?.ddsType == undefined || question.ddsType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <!-- <option *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\" [value]=\"item?.key\" (click)=\"selectedOption(item,question)\">\r\n {{item?.value}}\r\n </option> -->\r\n <option\r\n *ngFor=\"let item of !question.isFromURL ? (question?.items | textSearch : question.searchText) : question?.itemsUrl | textSearch : question.searchText\"\r\n (click)=\"selectedOption(item,question)\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"question.type=='claim'\">\r\n <select name=\"{{'claim'+[i]}}\" class=\"form-control search-form-control\"\r\n attr.data-type=\"{{'text'}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-name=\"{{'Assignee'}}\" [hidden]=\"ClaimList?.length == 1\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls['claim'+[i]]?.touched || enjiForm.form.controls['claim'+[i]]?.dirty) && enjiForm.form.controls['claim'+[i]]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && ClaimList?.length != 1\" value=\"one\">Select\r\n One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && ClaimList?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of ClaimList\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <lib-uc-show-errors *ngIf=\"question.type!='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf=\"question.type=='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name+[i]]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 form-group\" *ngIf=\"(isReport != undefined && isReport)\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" translate>Report Type</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <select name=\"ExportType\" [(ngModel)]=\"ExportType\" class=\"form-control search-form-control\"\r\n attr.data-type=\"text\">\r\n <option *ngFor=\"let item of ExportTypeList\" [value]=\"item.key\">{{item.value}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Export Excel</span>\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i>&nbsp;<span translate>Reset</span>\r\n </button>\r\n <button *ngIf=\"(isReport == undefined || !isReport)\" type=\"submit\"\r\n class=\"btn btn-raised btn-primary\" #UCSearchClick>\r\n <i class=\"fa fa-search\"></i>&nbsp;<span translate>Search</span>\r\n </button>\r\n <button *ngIf=\"(isReport != undefined && isReport)\" type=\"button\" (click)=\"GenerateReport()\"\r\n class=\"btn btn-raised btn-primary\">\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Generate\r\n Report</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->", styles: [".ucSearch-title{margin:3px}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:\"\\e929\";font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;transform:rotate(90deg)}.dds-list-container{position:absolute;width:100%;z-index:9}\n"] }]
1130
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ExcelService }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
1131
+ type: Inject,
1132
+ args: [DOCUMENT]
1133
+ }] }, { type: i3.ToastrService }, { type: i4.CookieService }, { type: i5.DatePipe }, { type: i0.ElementRef }]; }, propDecorators: { content: [{
1134
+ type: ViewChild,
1135
+ args: ['enjiForm']
1136
+ }], myForm: [{
1137
+ type: ViewChild,
1138
+ args: ['formIdSearch', { static: false }]
1139
+ }], searchInput: [{
1140
+ type: Input
1141
+ }], pageSize: [{
1142
+ type: Input
1143
+ }], isReport: [{
1144
+ type: Input
1145
+ }], result: [{
1146
+ type: Output
1147
+ }], genRpt: [{
1148
+ type: Output
1149
+ }], reqGetAllData: [{
1150
+ type: Output
1151
+ }] } });
1152
+
1153
+ const customCurrencyMaskConfig = {
1154
+ align: "right",
1155
+ allowNegative: false,
1156
+ allowZero: true,
1157
+ decimal: ".",
1158
+ precision: 2,
1159
+ prefix: "",
1160
+ suffix: "",
1161
+ thousands: ",",
1162
+ nullable: false,
1163
+ inputMode: CurrencyMaskInputMode.NATURAL
1164
+ };
1165
+ class UCSearchModule {
1166
+ }
1167
+ /** @nocollapse */ /** @nocollapse */ UCSearchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1168
+ /** @nocollapse */ /** @nocollapse */ UCSearchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchModule, declarations: [UCSearchComponent, TextSearchPipe], imports: [CommonModule,
1169
+ FormsModule,
1170
+ UcShowErrorsModule,
1171
+ UcDirectiveUpperCaseModule, i10.NgxCurrencyModule, i7.TranslateModule], exports: [UCSearchComponent] });
1172
+ /** @nocollapse */ /** @nocollapse */ UCSearchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchModule, imports: [[
1173
+ CommonModule,
1174
+ FormsModule,
1175
+ UcShowErrorsModule,
1176
+ UcDirectiveUpperCaseModule,
1177
+ NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
1178
+ TranslateModule.forChild()
1179
+ ]] });
1180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UCSearchModule, decorators: [{
1181
+ type: NgModule,
1182
+ args: [{
1183
+ declarations: [UCSearchComponent, TextSearchPipe],
1184
+ imports: [
1185
+ CommonModule,
1186
+ FormsModule,
1187
+ UcShowErrorsModule,
1188
+ UcDirectiveUpperCaseModule,
1189
+ NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
1190
+ TranslateModule.forChild()
1191
+ ],
1192
+ exports: [UCSearchComponent]
1193
+ }]
1194
+ }] });
1195
+
1196
+ /*
1197
+ * Public API Surface of ucsearch
1198
+ */
1199
+
1200
+ /**
1201
+ * Generated bundle index. Do not edit.
1202
+ */
1203
+
1204
+ export { UCSearchComponent, UCSearchModule, UCSearchService, customCurrencyMaskConfig };
1205
+ //# sourceMappingURL=adins-ucsearch.mjs.map