@adins/ucsearch 2.9.22 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +2 -81
  2. package/adins-ucsearch.d.ts +1 -1
  3. package/adins-ucsearch.metadata.json +1 -0
  4. package/bundles/adins-ucsearch.umd.js +1536 -0
  5. package/bundles/adins-ucsearch.umd.js.map +1 -0
  6. package/bundles/adins-ucsearch.umd.min.js +2 -0
  7. package/bundles/adins-ucsearch.umd.min.js.map +1 -0
  8. package/esm2015/adins-ucsearch.js +10 -0
  9. package/esm2015/lib/model/adins-constant.js +68 -0
  10. package/esm2015/lib/model/criteria-obj.model.js +31 -0
  11. package/esm2015/lib/model/input-search-obj.model.js +105 -0
  12. package/esm2015/lib/model/integration-obj.model.js +30 -0
  13. package/esm2015/lib/model/key-value-report.model.js +36 -0
  14. package/esm2015/lib/model/key-value-uc-search.model.js +54 -0
  15. package/esm2015/lib/model/request-criteria-obj.model.js +42 -0
  16. package/esm2015/lib/services/excel-service/excel-service.js +49 -0
  17. package/esm2015/lib/ucsearch.component.js +1255 -0
  18. package/esm2015/lib/ucsearch.module.js +42 -0
  19. package/esm2015/lib/ucsearch.service.js +18 -0
  20. package/esm2015/public-api.js +11 -0
  21. package/esm5/adins-ucsearch.js +10 -0
  22. package/esm5/lib/model/adins-constant.js +72 -0
  23. package/esm5/lib/model/criteria-obj.model.js +33 -0
  24. package/esm5/lib/model/input-search-obj.model.js +117 -0
  25. package/esm5/lib/model/integration-obj.model.js +32 -0
  26. package/esm5/lib/model/key-value-report.model.js +42 -0
  27. package/esm5/lib/model/key-value-uc-search.model.js +58 -0
  28. package/esm5/lib/model/request-criteria-obj.model.js +44 -0
  29. package/esm5/lib/services/excel-service/excel-service.js +63 -0
  30. package/esm5/lib/ucsearch.component.js +1362 -0
  31. package/esm5/lib/ucsearch.module.js +46 -0
  32. package/esm5/lib/ucsearch.service.js +21 -0
  33. package/esm5/public-api.js +11 -0
  34. package/fesm2015/adins-ucsearch.js +1411 -0
  35. package/fesm2015/adins-ucsearch.js.map +1 -0
  36. package/fesm5/adins-ucsearch.js +1546 -0
  37. package/fesm5/adins-ucsearch.js.map +1 -0
  38. package/lib/model/adins-constant.d.ts +0 -21
  39. package/lib/model/key-value-report.model.d.ts +0 -1
  40. package/lib/services/excel-service/excel-service.d.ts +5 -0
  41. package/lib/ucsearch.component.d.ts +12 -28
  42. package/lib/ucsearch.module.d.ts +0 -12
  43. package/lib/ucsearch.service.d.ts +0 -3
  44. package/package.json +13 -24
  45. package/esm2020/adins-ucsearch.mjs +0 -5
  46. package/esm2020/lib/model/adins-constant.mjs +0 -52
  47. package/esm2020/lib/model/criteria-obj.model.mjs +0 -9
  48. package/esm2020/lib/model/input-search-obj.model.mjs +0 -45
  49. package/esm2020/lib/model/integration-obj.model.mjs +0 -12
  50. package/esm2020/lib/model/key-value-report.model.mjs +0 -15
  51. package/esm2020/lib/model/key-value-uc-search.model.mjs +0 -38
  52. package/esm2020/lib/model/request-criteria-obj.model.mjs +0 -14
  53. package/esm2020/lib/pipe/text-search.pipe.mjs +0 -24
  54. package/esm2020/lib/services/export-file.service.mjs +0 -61
  55. package/esm2020/lib/ucsearch.component.mjs +0 -1043
  56. package/esm2020/lib/ucsearch.module.mjs +0 -55
  57. package/esm2020/lib/ucsearch.service.mjs +0 -14
  58. package/esm2020/public-api.mjs +0 -7
  59. package/fesm2015/adins-ucsearch.mjs +0 -1371
  60. package/fesm2015/adins-ucsearch.mjs.map +0 -1
  61. package/fesm2020/adins-ucsearch.mjs +0 -1360
  62. package/fesm2020/adins-ucsearch.mjs.map +0 -1
  63. package/lib/pipe/text-search.pipe.d.ts +0 -7
  64. package/lib/services/export-file.service.d.ts +0 -12
@@ -0,0 +1,1411 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { DOCUMENT } from '@angular/platform-browser';
3
+ import { saveAs } from 'file-saver';
4
+ import { utils, write } from 'xlsx';
5
+ import { trigger, transition, style, animate, state } from '@angular/animations';
6
+ import { ToastrService } from 'ngx-toastr';
7
+ import { CookieService } from 'ngx-cookie';
8
+ import { enc, lib, AES } from 'crypto-js';
9
+ import { Injectable, NgModule, Component, Input, ViewChild, Inject, Renderer2, EventEmitter, Output, defineInjectable } from '@angular/core';
10
+ import { DatePipe, formatDate, CommonModule } from '@angular/common';
11
+ import { FormsModule } from '@angular/forms';
12
+ import { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';
13
+ import { TranslateModule } from '@ngx-translate/core';
14
+ import { UcShowErrorsModule } from '@adins/uc-show-errors';
15
+ import { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';
16
+
17
+ /**
18
+ * @fileoverview added by tsickle
19
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
20
+ */
21
+ class UCSearchService {
22
+ constructor() { }
23
+ }
24
+ UCSearchService.decorators = [
25
+ { type: Injectable, args: [{
26
+ providedIn: 'root'
27
+ },] }
28
+ ];
29
+ /** @nocollapse */
30
+ UCSearchService.ctorParameters = () => [];
31
+ /** @nocollapse */ UCSearchService.ngInjectableDef = defineInjectable({ factory: function UCSearchService_Factory() { return new UCSearchService(); }, token: UCSearchService, providedIn: "root" });
32
+
33
+ /**
34
+ * @fileoverview added by tsickle
35
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
36
+ */
37
+ class AdInsConstant {
38
+ }
39
+ AdInsConstant.RestrictionBetween = "Between";
40
+ AdInsConstant.RestrictionLike = "Like";
41
+ AdInsConstant.RestrictionEq = "Eq";
42
+ AdInsConstant.RestrictionNeq = "NEQ";
43
+ AdInsConstant.RestrictionGt = "GT";
44
+ AdInsConstant.RestrictionGte = "GTE";
45
+ AdInsConstant.RestrictionLt = "LT";
46
+ AdInsConstant.RestrictionLte = "LTE";
47
+ AdInsConstant.RestrictionIn = "IN";
48
+ AdInsConstant.RestrictionNotIn = "NotIn";
49
+ AdInsConstant.RestrictionOr = "Or"; //pastikan ada 1 criteria sebelumnya
50
+ //pastikan ada 1 criteria sebelumnya
51
+ AdInsConstant.RestrictionOrNeq = "OrNeq"; //pastikan ada 1 criteria sebelumnya
52
+ //pastikan ada 1 criteria sebelumnya
53
+ AdInsConstant.RestrictionIsNull = "ISNULL";
54
+ AdInsConstant.RestrictionIsNotNull = "ISNOTNULL";
55
+ AdInsConstant.RestrictionGTE = "GTE";
56
+ AdInsConstant.RestrictionLTE = "LTE";
57
+ AdInsConstant.showData = "10,50,100";
58
+ AdInsConstant.JoinTypeInner = "INNER";
59
+ AdInsConstant.JoinTypeLeft = "LEFT";
60
+
61
+ /**
62
+ * @fileoverview added by tsickle
63
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
64
+ */
65
+ class IntegrationObj {
66
+ constructor() {
67
+ this.baseUrl = "";
68
+ this.apiPath = "";
69
+ this.requestObj = new Object();
70
+ this.leftColumnToJoin = "";
71
+ this.rightColumnToJoin = "";
72
+ this.joinType = AdInsConstant.JoinTypeInner;
73
+ }
74
+ }
75
+
76
+ /**
77
+ * @fileoverview added by tsickle
78
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
79
+ */
80
+ class InputSearchObj {
81
+ constructor() {
82
+ this._url = "";
83
+ this.enviromentUrl = "";
84
+ this.title = "";
85
+ this.apiQryPaging = "";
86
+ this.arrCritObj = null;
87
+ this.addCritInput = new Array();
88
+ this.listEnvironments = new Array();
89
+ this.whereValue = new Array();
90
+ this.fromValue = new Array();
91
+ this.switchValue = new Array();
92
+ this.integrationObj = new IntegrationObj();
93
+ this.isJoinExAPI = false;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * @fileoverview added by tsickle
99
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
100
+ */
101
+ class CriteriaObj {
102
+ constructor() {
103
+ this.low = 0;
104
+ this.high = 0;
105
+ this.DataType = 'Text';
106
+ this.isCriteriaDataTable = false;
107
+ }
108
+ }
109
+
110
+ /**
111
+ * @fileoverview added by tsickle
112
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
113
+ */
114
+ class RequestCriteriaObj {
115
+ constructor() {
116
+ this.includeCount = true;
117
+ this.includeData = true;
118
+ this.isLoading = true;
119
+ this.queryString = '';
120
+ this.rowVersion = '';
121
+ this.integrationObj = new IntegrationObj();
122
+ this.joinType = AdInsConstant.JoinTypeInner;
123
+ }
124
+ }
125
+
126
+ /**
127
+ * @fileoverview added by tsickle
128
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
129
+ */
130
+ /** @type {?} */
131
+ const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
132
+ /** @type {?} */
133
+ const EXCEL_EXTENSION = '.xlsx';
134
+ class ExcelService {
135
+ constructor() { }
136
+ /**
137
+ * @param {?} json
138
+ * @param {?} excelFileName
139
+ * @return {?}
140
+ */
141
+ exportAsExcelFile(json, excelFileName) {
142
+ /** @type {?} */
143
+ const worksheet = utils.json_to_sheet(json);
144
+ console.log('worksheet', worksheet);
145
+ /** @type {?} */
146
+ const workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
147
+ /** @type {?} */
148
+ const excelBuffer = write(workbook, { bookType: 'xlsx', type: 'array' });
149
+ //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });
150
+ this.saveAsExcelFile(excelBuffer, excelFileName);
151
+ }
152
+ /**
153
+ * @private
154
+ * @param {?} buffer
155
+ * @param {?} fileName
156
+ * @return {?}
157
+ */
158
+ saveAsExcelFile(buffer, fileName) {
159
+ /** @type {?} */
160
+ const data = new Blob([buffer], {
161
+ type: EXCEL_TYPE
162
+ });
163
+ saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);
164
+ }
165
+ }
166
+ ExcelService.decorators = [
167
+ { type: Injectable }
168
+ ];
169
+ /** @nocollapse */
170
+ ExcelService.ctorParameters = () => [];
171
+
172
+ /**
173
+ * @fileoverview added by tsickle
174
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
175
+ */
176
+ class ExportTypeConstant {
177
+ }
178
+ ExportTypeConstant.EXP_TYPE_PDF = 0;
179
+ ExportTypeConstant.EXP_TYPE_XLS = 1;
180
+ ExportTypeConstant.EXP_TYPE_XLSX = 2;
181
+ ExportTypeConstant.EXP_TYPE_DOC = 3;
182
+ ExportTypeConstant.EXP_TYPE_DOCX = 4;
183
+
184
+ /**
185
+ * @fileoverview added by tsickle
186
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
187
+ */
188
+ class ListKeyValueMonth {
189
+ constructor() {
190
+ this.DictOfMonth = {};
191
+ this.ListOfMonth = new Array();
192
+ this.DictOfMonth = {};
193
+ this.ListOfMonth.push({ key: 1, value: "January" });
194
+ this.DictOfMonth[1] = "January";
195
+ this.ListOfMonth.push({ key: 2, value: "February" });
196
+ this.DictOfMonth[2] = "February";
197
+ this.ListOfMonth.push({ key: 3, value: "March" });
198
+ this.DictOfMonth[3] = "March";
199
+ this.ListOfMonth.push({ key: 4, value: "April" });
200
+ this.DictOfMonth[4] = "April";
201
+ this.ListOfMonth.push({ key: 5, value: "May" });
202
+ this.DictOfMonth[5] = "May";
203
+ this.ListOfMonth.push({ key: 6, value: "June" });
204
+ this.DictOfMonth[6] = "June";
205
+ this.ListOfMonth.push({ key: 7, value: "July" });
206
+ this.DictOfMonth[7] = "July";
207
+ this.ListOfMonth.push({ key: 8, value: "August" });
208
+ this.DictOfMonth[8] = "August";
209
+ this.ListOfMonth.push({ key: 9, value: "September" });
210
+ this.DictOfMonth[9] = "September";
211
+ this.ListOfMonth.push({ key: 10, value: "October" });
212
+ this.DictOfMonth[10] = "October";
213
+ this.ListOfMonth.push({ key: 11, value: "November" });
214
+ this.DictOfMonth[11] = "November";
215
+ this.ListOfMonth.push({ key: 12, value: "December" });
216
+ this.DictOfMonth[12] = "December";
217
+ }
218
+ }
219
+
220
+ /**
221
+ * @fileoverview added by tsickle
222
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
223
+ */
224
+ class UCSearchComponent {
225
+ /**
226
+ * @param {?} http
227
+ * @param {?} excelService
228
+ * @param {?} _renderer2
229
+ * @param {?} _document
230
+ * @param {?} toastr
231
+ * @param {?} cookieService
232
+ * @param {?} datePipe
233
+ */
234
+ constructor(http, excelService, _renderer2, _document, toastr, cookieService, datePipe) {
235
+ this.http = http;
236
+ this.excelService = excelService;
237
+ this._renderer2 = _renderer2;
238
+ this._document = _document;
239
+ this.toastr = toastr;
240
+ this.cookieService = cookieService;
241
+ this.datePipe = datePipe;
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
+ // trus nad, bisa ga kalo misalkan gw mau bikin
295
+ // kalo login di cabang IsSelectOne: true
296
+ // kalo login di HO, IsSelectOne: false
297
+ /**
298
+ * @param {?} content
299
+ * @return {?}
300
+ */
301
+ set content(content) {
302
+ if (content) { // initially setter gets called with undefined
303
+ this.searchForm = content;
304
+ }
305
+ }
306
+ /**
307
+ * @return {?}
308
+ */
309
+ changeState() {
310
+ this.currentState = this.currentState === 'initial' ? 'final' : 'initial';
311
+ this.isHidden = this.isHidden === false ? true : false;
312
+ }
313
+ /**
314
+ * @return {?}
315
+ */
316
+ ngOnInit() {
317
+ console.log("ucsearch");
318
+ this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;
319
+ this.arrCrit = this.searchInput.arrCritObj;
320
+ /** @type {?} */
321
+ let js = this._renderer2.createElement('script');
322
+ js.text = `
323
+ $(document).ready(function(){
324
+ $("#flip").click(function(){
325
+ $("#panel").slideToggle("slow");
326
+ });
327
+ });
328
+ `;
329
+ this._renderer2.appendChild(this._document.body, js);
330
+ /** @type {?} */
331
+ let value = this.cookieService.get('BusinessDateRaw');
332
+ this.BisDt = this.DecryptString(value, "AdInsFOU12345678");
333
+ this.BusinessDt = new Date(this.BisDt);
334
+ this.initiateForm();
335
+ }
336
+ /**
337
+ * @return {?}
338
+ */
339
+ initiateForm() {
340
+ this.getJSON(this.searchInput._url).subscribe((/**
341
+ * @param {?} data
342
+ * @return {?}
343
+ */
344
+ data => {
345
+ this.configuration = data;
346
+ this.exportData = data.exportExcel;
347
+ if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {
348
+ this.ExportTypeList = data.exportTypeList;
349
+ this.ExportType = this.ExportTypeList[0].key;
350
+ }
351
+ this.countForm = data.component.length;
352
+ this.isDataLoaded = true;
353
+ if (this.searchInput.title != undefined && this.searchInput.title != "") {
354
+ this.configuration.title = this.searchInput.title;
355
+ }
356
+ for (let i = 0; i < this.countForm; i++) {
357
+ //ini kalau datanya di load dari URL
358
+ if (data.component[i].isFromURL == true) {
359
+ /** @type {?} */
360
+ let request = new RequestCriteriaObj();
361
+ /** @type {?} */
362
+ let arrayCrit = new Array();
363
+ /** @type {?} */
364
+ let criteriaObject = new CriteriaObj();
365
+ criteriaObject.DataType = "text";
366
+ criteriaObject.propName = data.component[i].criteriaPropName;
367
+ criteriaObject.value = data.component[i].criteriaPropValue;
368
+ criteriaObject.restriction = "eq";
369
+ arrayCrit.push(criteriaObject);
370
+ request.criteria = arrayCrit;
371
+ request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;
372
+ // Pengecekan penggunaan url atau path
373
+ if (data.component[i].path != undefined && data.component[i].path != "") {
374
+ if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {
375
+ for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {
376
+ if (data.component[i].environment == this.searchInput.listEnvironments[y].environment) {
377
+ data.component[i].fullpath = this.searchInput.listEnvironments[y].url + data.component[i].path;
378
+ break;
379
+ }
380
+ }
381
+ }
382
+ else {
383
+ data.component[i].fullpath = data.component[i].url;
384
+ }
385
+ }
386
+ else {
387
+ data.component[i].fullpath = data.component[i].url;
388
+ }
389
+ //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya
390
+ //biar tiap function ada state2nya sendiri
391
+ this.resolveObject(data.component[i], data.component[i].fullpath, request);
392
+ }
393
+ if (data.component[i].type == "numeric") {
394
+ data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');
395
+ }
396
+ //pengecekan ddl
397
+ if (data.component[i].type == "dropdown") {
398
+ if (data.component[i].dtmType != undefined) {
399
+ if (data.component[i].dtmType.includes("month")) {
400
+ if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
401
+ data.component[i].value = this.setDefaultValueMonth(data.component[i].value);
402
+ }
403
+ data.component[i].items = this.setMonthDDL(data.component[i].dtmType);
404
+ }
405
+ if (data.component[i].dtmType.includes("year")) {
406
+ if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
407
+ data.component[i].value = this.setDefaultValueYear(data.component[i].value);
408
+ }
409
+ data.component[i].items = this.setYearDDL(data.component[i].dtmType);
410
+ }
411
+ }
412
+ }
413
+ if (!data.component[i].value) {
414
+ data.component[i].value = "";
415
+ if (data.component[i].ddlType == 'all')
416
+ data.component[i].value = "all";
417
+ if (data.component[i].ddlType == 'one')
418
+ data.component[i].value = "one";
419
+ }
420
+ //pengecekan tanggal
421
+ if (data.component[i].type == "datepicker") {
422
+ this.readonly = data.component[i].readonly;
423
+ if (data.component[i].value.includes("BD")) {
424
+ /** @type {?} */
425
+ let businessDate = new Date();
426
+ if (this.BisDt != null) {
427
+ businessDate = new Date(this.BisDt);
428
+ }
429
+ /** @type {?} */
430
+ let operator = data.component[i].value.charAt(2);
431
+ /** @type {?} */
432
+ let dateShow = new Date();
433
+ if (operator == "-") {
434
+ /** @type {?} */
435
+ let tempMinus = data.component[i].value.split("-", 2);
436
+ /** @type {?} */
437
+ let numDay = parseInt(tempMinus[1]);
438
+ businessDate.setDate(businessDate.getDate() - numDay);
439
+ }
440
+ else if (operator == "+") {
441
+ /** @type {?} */
442
+ let tempMinus = data.component[i].value.split("+", 2);
443
+ /** @type {?} */
444
+ let numDay = parseInt(tempMinus[1]);
445
+ businessDate.setDate(businessDate.getDate() + numDay);
446
+ }
447
+ dateShow = businessDate;
448
+ /** @type {?} */
449
+ let dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US');
450
+ data.component[i].value = dateText;
451
+ }
452
+ if (this.readonly = false) {
453
+ if (data.component[i].restriction != undefined && data.component[i].restriction != "") {
454
+ if (data.component[i].restriction.toUpperCase() == "GT") {
455
+ /** @type {?} */
456
+ let minDate = new Date(this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));
457
+ minDate.setDate(minDate.getDate() + 1);
458
+ data.component[i].minDate = minDate;
459
+ }
460
+ else if (data.component[i].restriction.toUpperCase() == "LT") {
461
+ /** @type {?} */
462
+ let maxDate = new Date(this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));
463
+ maxDate.setDate(maxDate.getDate() - 1);
464
+ data.component[i].maxDate = maxDate;
465
+ }
466
+ }
467
+ }
468
+ }
469
+ }
470
+ setTimeout((/**
471
+ * @return {?}
472
+ */
473
+ () => {
474
+ for (let j = 0; j < this.countForm; j++) {
475
+ if (data.component[j].isEvent == true && this.configuration.component[j].itemsUrl.length == 1) {
476
+ this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);
477
+ }
478
+ if (data.component[j].type == "officeRoleCodes" && this.configuration.component[j].itemsUrl.length > 0) {
479
+ this.SetRoleOfficeCodes(j);
480
+ }
481
+ }
482
+ }), 1000);
483
+ }));
484
+ }
485
+ /**
486
+ * @param {?} i
487
+ * @return {?}
488
+ */
489
+ SetRoleOfficeCodes(i) {
490
+ /** @type {?} */
491
+ let value = this.cookieService.get("UserAccess");
492
+ /** @type {?} */
493
+ let userAccess = JSON.parse(this.DecryptString(value, "AdInsFOU12345678"));
494
+ /** @type {?} */
495
+ let roleCode = userAccess["RoleCode"];
496
+ /** @type {?} */
497
+ let listOfficeRoleCodes = new Array();
498
+ listOfficeRoleCodes.push(roleCode);
499
+ /** @type {?} */
500
+ let component = this.myForm.nativeElement[i];
501
+ /** @type {?} */
502
+ let ddl = component.options;
503
+ /** @type {?} */
504
+ let text = ddl[ddl.selectedIndex].value.trim();
505
+ if (this.configuration.component[i].itemsUrl.length == 1 || (this.configuration.component[i].ddlType == 'all' && text == 'all')) {
506
+ for (let index = 0; index < this.configuration.component[i].itemsUrl.length; index++) {
507
+ /** @type {?} */
508
+ const element = this.configuration.component[i].itemsUrl[index];
509
+ listOfficeRoleCodes.push(element.Key);
510
+ listOfficeRoleCodes.push(roleCode + "-" + element.Key);
511
+ }
512
+ }
513
+ else {
514
+ listOfficeRoleCodes.push(text);
515
+ listOfficeRoleCodes.push(roleCode + "-" + text);
516
+ }
517
+ this.searchInput.integrationObj.requestObj["OfficeRoleCodes"] = listOfficeRoleCodes;
518
+ }
519
+ /**
520
+ * @param {?} value
521
+ * @return {?}
522
+ */
523
+ setDefaultValueMonth(value) {
524
+ /** @type {?} */
525
+ let businessDate = new Date(this.BusinessDt);
526
+ /** @type {?} */
527
+ let operator = value.charAt(2);
528
+ /** @type {?} */
529
+ let tempValue = value.split(operator, 2);
530
+ /** @type {?} */
531
+ let numMonth = parseInt(tempValue[1]);
532
+ if (!numMonth)
533
+ numMonth = 1;
534
+ if (operator == "-") {
535
+ businessDate.setMonth(businessDate.getMonth() - numMonth);
536
+ }
537
+ else if (operator == "+") {
538
+ businessDate.setMonth(businessDate.getMonth() + numMonth);
539
+ }
540
+ return businessDate.getMonth();
541
+ }
542
+ /**
543
+ * @param {?} month
544
+ * @return {?}
545
+ */
546
+ setMonthDDL(month) {
547
+ /** @type {?} */
548
+ let ListOfMonth;
549
+ /** @type {?} */
550
+ let equation = month.match("[\\/+][-]|[-][\\/+]|\\/+|-");
551
+ /** @type {?} */
552
+ let toMin = this.BusinessDt.getMonth();
553
+ /** @type {?} */
554
+ let toMax = this.BusinessDt.getMonth();
555
+ /** @type {?} */
556
+ let tempEquation = equation[0];
557
+ /** @type {?} */
558
+ let minMax = parseInt(month.substring(equation.index + equation[0].length));
559
+ if (minMax >= 12)
560
+ return this.ListOfMonth.ListOfMonth;
561
+ if ((tempEquation == "+-" || tempEquation == "-+") && minMax >= 6)
562
+ return this.ListOfMonth.ListOfMonth;
563
+ /** @type {?} */
564
+ let dictOfMonth = this.ListOfMonth.DictOfMonth;
565
+ ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
566
+ for (let q = 0; q < minMax; q++) {
567
+ if (tempEquation.includes("-")) {
568
+ toMin--;
569
+ if (toMin == 0)
570
+ toMin = 12;
571
+ ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
572
+ }
573
+ if (tempEquation.includes("+")) {
574
+ toMax++;
575
+ if (toMax == 13)
576
+ toMax = 1;
577
+ ListOfMonth.push({ key: toMax, value: dictOfMonth[toMax] });
578
+ }
579
+ }
580
+ ListOfMonth.sort((/**
581
+ * @param {?} a
582
+ * @param {?} b
583
+ * @return {?}
584
+ */
585
+ (a, b) => {
586
+ return a.key - b.key;
587
+ }));
588
+ return ListOfMonth;
589
+ }
590
+ /**
591
+ * @param {?} value
592
+ * @return {?}
593
+ */
594
+ setDefaultValueYear(value) {
595
+ /** @type {?} */
596
+ let businessDate = new Date(this.BusinessDt);
597
+ /** @type {?} */
598
+ let operator = value.charAt(2);
599
+ /** @type {?} */
600
+ let tempValue = value.split(operator, 2);
601
+ /** @type {?} */
602
+ let numYear = parseInt(tempValue[1]);
603
+ if (!numYear)
604
+ numYear = 1;
605
+ if (operator == "-") {
606
+ businessDate.setFullYear(businessDate.getFullYear() - numYear);
607
+ }
608
+ else if (operator == "+") {
609
+ businessDate.setFullYear(businessDate.getFullYear() + numYear);
610
+ }
611
+ return businessDate.getFullYear();
612
+ }
613
+ /**
614
+ * @param {?} year
615
+ * @return {?}
616
+ */
617
+ setYearDDL(year) {
618
+ this.ListOfYear = new Array();
619
+ /** @type {?} */
620
+ let equation = year.match("[\\/+][-]|[-][\\/+]|\\/+|-");
621
+ /** @type {?} */
622
+ let toMin = this.BusinessDt.getFullYear();
623
+ /** @type {?} */
624
+ let toMax = this.BusinessDt.getFullYear();
625
+ /** @type {?} */
626
+ let minMax = parseInt(year.substring(equation.index + equation[0].length));
627
+ this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });
628
+ for (let q = 0; q < minMax; q++) {
629
+ if (equation[0] == "-+" || equation[0] == "+-") {
630
+ toMin--;
631
+ toMax++;
632
+ this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });
633
+ }
634
+ else if (equation[0] == "-") {
635
+ toMin--;
636
+ this.ListOfYear.push({ key: toMin, value: toMin.toString() });
637
+ }
638
+ else if (equation[0] == "+") {
639
+ toMax++;
640
+ this.ListOfYear.push({ key: toMax, value: toMax.toString() });
641
+ }
642
+ }
643
+ this.ListOfYear.sort((/**
644
+ * @param {?} a
645
+ * @param {?} b
646
+ * @return {?}
647
+ */
648
+ (a, b) => {
649
+ return a.key - b.key;
650
+ }));
651
+ return this.ListOfYear;
652
+ }
653
+ /**
654
+ * @param {?} url
655
+ * @return {?}
656
+ */
657
+ getJSON(url) {
658
+ return this.http.get(url);
659
+ }
660
+ /**
661
+ * @param {?} url
662
+ * @param {?=} criteria
663
+ * @return {?}
664
+ */
665
+ postJSON(url, criteria = null) {
666
+ return this.http.post(url, criteria);
667
+ }
668
+ /**
669
+ * @return {?}
670
+ */
671
+ searchClick() {
672
+ // for(let i=0;i<this.countForm;i++){
673
+ // if(this.configuration.component[i].type == "datepicker"){
674
+ // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){
675
+ // this.checkInputDate(this.configuration.component[i]);
676
+ // }
677
+ // }
678
+ // }
679
+ // if(this.dateWrong) return;
680
+ // for(let i=0;i<this.countForm;i++){
681
+ // if(this.configuration.component[i].type == "datepicker"){
682
+ // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){
683
+ // this.checkInputDate(this.configuration.component[i]);
684
+ // }
685
+ // }
686
+ // }
687
+ // if(this.dateWrong) return;
688
+ /** @type {?} */
689
+ let order = null;
690
+ if (this.configuration.orderby != null) {
691
+ order = {
692
+ key: this.configuration.orderby.key,
693
+ value: this.configuration.orderby.value
694
+ };
695
+ }
696
+ this.pageNow = 1;
697
+ this.search(this.apiUrl, this.pageNow, this.pageSize, order, this.arrCrit);
698
+ }
699
+ /**
700
+ * @return {?}
701
+ */
702
+ reset() {
703
+ this.searchForm.resetForm({
704
+ ExportType: this.ExportTypeList[0].key
705
+ });
706
+ this.initiateForm();
707
+ }
708
+ /**
709
+ * @param {?} apiUrl
710
+ * @param {?} pageNo
711
+ * @param {?} rowPerPage
712
+ * @param {?} orderBy
713
+ * @param {?=} addCrit
714
+ * @return {?}
715
+ */
716
+ search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = new Array()) {
717
+ /** @type {?} */
718
+ let request = new RequestCriteriaObj();
719
+ /** @type {?} */
720
+ let arrCrit = new Array();
721
+ /** @type {?} */
722
+ let IsQueryIn = false;
723
+ /** @type {?} */
724
+ let IsBreak = false;
725
+ // Inject whereQuery for where criteria
726
+ if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {
727
+ this.configuration.querystring.whereQuery = new Array();
728
+ for (let x = 0; x < this.searchInput.whereValue.length; x++) {
729
+ this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);
730
+ }
731
+ }
732
+ if (this.searchInput.fromValue != undefined && this.searchInput.fromValue.length != 0) {
733
+ this.configuration.querystring.fromQuery = new Array();
734
+ for (let x = 0; x < this.searchInput.fromValue.length; x++) {
735
+ this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[x].value);
736
+ }
737
+ }
738
+ request.pageNo = pageNo;
739
+ request.rowPerPage = rowPerPage;
740
+ request.orderBy = orderBy;
741
+ request.queryString = this.configuration.querystring;
742
+ for (let i = 0; i < this.countForm; i++) {
743
+ /** @type {?} */
744
+ let critObj = new CriteriaObj();
745
+ /** @type {?} */
746
+ let component = this.myForm.nativeElement[i];
747
+ // // popup message if required
748
+ // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == "true") {
749
+ // let val = component.value.trim();
750
+ // if (val == "") {
751
+ // IsBreak = true;
752
+ // let label = component.getAttribute('label');
753
+ // this.toastr.warning("Please input " + label);
754
+ // break;
755
+ // }
756
+ // }
757
+ critObj.DataType = component.getAttribute('data-type');
758
+ //Ini khusus kalau dari Drop Down
759
+ if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == "true") {
760
+ IsQueryIn = true;
761
+ }
762
+ else {
763
+ IsQueryIn = false;
764
+ }
765
+ if (component.value != "") {
766
+ if (component.nodeName == 'SELECT') {
767
+ /** @type {?} */
768
+ let ddl = component.options;
769
+ /** @type {?} */
770
+ let text = ddl[ddl.selectedIndex].value.trim();
771
+ if (text == "one") {
772
+ IsBreak = true;
773
+ /** @type {?} */
774
+ let label = component.getAttribute('label');
775
+ this.toastr.warning("Please select " + label);
776
+ break;
777
+ }
778
+ if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
779
+ critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
780
+ }
781
+ if (this.configuration.component[i].type == "taskDefinitionKey" ||
782
+ this.configuration.component[i].type == "processKey")
783
+ continue;
784
+ if (this.configuration.component[i].type == "claim") {
785
+ critObj.propName = component.getAttribute('data-name');
786
+ critObj.restriction = text;
787
+ critObj.value = null;
788
+ arrCrit.push(critObj);
789
+ }
790
+ else {
791
+ if (text != "all" && text != "one") {
792
+ //Kalau Dari Dropdown udah pasti pake Eq
793
+ critObj.restriction = AdInsConstant.RestrictionEq;
794
+ if (component.name != "") {
795
+ critObj.propName = component.name;
796
+ }
797
+ else {
798
+ critObj.propName = component.getAttribute('data-name');
799
+ }
800
+ critObj.value = text;
801
+ arrCrit.push(critObj);
802
+ }
803
+ else if (text == "all" && IsQueryIn == true && component.options.length != 0) {
804
+ /** @type {?} */
805
+ let ddlList = new Array();
806
+ for (let x = 0; x < component.options.length; x++) {
807
+ if (x != 0) {
808
+ ddlList.push(component.options[x].value);
809
+ }
810
+ }
811
+ if (ddlList.length != 0) {
812
+ critObj.restriction = AdInsConstant.RestrictionIn;
813
+ if (component.name != "") {
814
+ critObj.propName = component.name;
815
+ }
816
+ else {
817
+ critObj.propName = component.getAttribute('data-name');
818
+ }
819
+ critObj.listValue = ddlList;
820
+ arrCrit.push(critObj);
821
+ }
822
+ }
823
+ }
824
+ }
825
+ else {
826
+ //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like
827
+ if (component.name != "") {
828
+ critObj.propName = component.name;
829
+ }
830
+ else {
831
+ critObj.propName = component.getAttribute('data-name');
832
+ }
833
+ critObj.value = component.value.trim();
834
+ if (component.value.includes("%")) {
835
+ critObj.restriction = AdInsConstant.RestrictionLike;
836
+ }
837
+ //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya
838
+ else if (component.getAttribute('data-restriction') != "" && component.getAttribute('data-restriction') != null) {
839
+ critObj.restriction = component.getAttribute('data-restriction');
840
+ if (component.getAttribute('data-type') == 'numeric') {
841
+ critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();
842
+ }
843
+ if (critObj.restriction.toUpperCase() == "LIKE") {
844
+ critObj.value = "%" + component.value.trim() + "%";
845
+ critObj.restriction = AdInsConstant.RestrictionLike;
846
+ }
847
+ }
848
+ else {
849
+ critObj.restriction = AdInsConstant.RestrictionEq;
850
+ }
851
+ if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
852
+ critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
853
+ }
854
+ arrCrit.push(critObj);
855
+ }
856
+ }
857
+ }
858
+ if (IsBreak) {
859
+ return;
860
+ }
861
+ if (addCrit != null && addCrit != undefined) {
862
+ if (addCrit.length != 0) {
863
+ for (let i = 0; i < addCrit.length; i++) {
864
+ arrCrit.push(addCrit[i]);
865
+ }
866
+ }
867
+ else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {
868
+ for (let i = 0; i < this.searchInput.addCritInput.length; i++) {
869
+ arrCrit.push(this.searchInput.addCritInput[i]);
870
+ }
871
+ }
872
+ }
873
+ else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {
874
+ for (let i = 0; i < this.searchInput.addCritInput.length; i++) {
875
+ arrCrit.push(this.searchInput.addCritInput[i]);
876
+ }
877
+ }
878
+ request.criteria = arrCrit;
879
+ if (!this.searchInput.isJoinExAPI) {
880
+ request.integrationObj = null;
881
+ }
882
+ else {
883
+ request.integrationObj = this.searchInput.integrationObj;
884
+ }
885
+ this.http.post(apiUrl, request).subscribe((/**
886
+ * @param {?} response
887
+ * @return {?}
888
+ */
889
+ (response) => {
890
+ /** @type {?} */
891
+ let qryPaging = {
892
+ response: response,
893
+ pageNow: pageNo
894
+ };
895
+ console.log(qryPaging);
896
+ this.result.emit(qryPaging);
897
+ this.reqGetAllData.emit(request);
898
+ return response;
899
+ }));
900
+ }
901
+ /**
902
+ * @return {?}
903
+ */
904
+ GenerateReport() {
905
+ this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });
906
+ }
907
+ /**
908
+ * @return {?}
909
+ */
910
+ lessThanFour() {
911
+ if (this.countForm > 3) {
912
+ return false;
913
+ }
914
+ else {
915
+ return true;
916
+ }
917
+ }
918
+ /**
919
+ * @param {?} obj
920
+ * @param {?} url
921
+ * @param {?=} crit
922
+ * @return {?}
923
+ */
924
+ resolveObject(obj, url, crit = null) {
925
+ /** @type {?} */
926
+ const val = this.postJSON(url, crit);
927
+ val.subscribe((/**
928
+ * @param {?} tempData
929
+ * @return {?}
930
+ */
931
+ tempData => {
932
+ obj.itemsUrl = new Array();
933
+ obj.itemsUrl = tempData.ReturnObject;
934
+ if (obj.exclude != undefined && obj.exclude != "") {
935
+ obj.itemsUrl = obj.itemsUrl.filter((/**
936
+ * @param {?} value
937
+ * @return {?}
938
+ */
939
+ (value) => !obj.exclude.includes(value.Key)));
940
+ }
941
+ if (obj.affectedFilter && obj.itemsUrl.length == 1) {
942
+ this.onChangeEvent(obj.itemsUrl[0].Key, obj);
943
+ }
944
+ }));
945
+ }
946
+ /**
947
+ * @param {?} element
948
+ * @return {?}
949
+ */
950
+ transformAmount(element) {
951
+ this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');
952
+ // to show the formatted amount in the textbox.
953
+ element.target.value = this.formattedAmount;
954
+ }
955
+ /**
956
+ * @param {?} element
957
+ * @return {?}
958
+ */
959
+ transformToDecimal(element) {
960
+ element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
961
+ }
962
+ /**
963
+ * @return {?}
964
+ */
965
+ exportAsXLSX() {
966
+ /** @type {?} */
967
+ let request = new RequestCriteriaObj();
968
+ request.pageNo = 1;
969
+ request.rowPerPage = 9999;
970
+ request.orderBy = null;
971
+ request.criteria = [];
972
+ request.queryString = this.configuration.querystring;
973
+ if (!this.searchInput.isJoinExAPI) {
974
+ request.integrationObj = null;
975
+ }
976
+ else {
977
+ request.integrationObj = this.searchInput.integrationObj;
978
+ }
979
+ this.http.post(this.apiUrl, request).subscribe((/**
980
+ * @param {?} response
981
+ * @return {?}
982
+ */
983
+ response => {
984
+ this.ExcelData = response["Data"];
985
+ this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
986
+ }), (/**
987
+ * @param {?} error
988
+ * @return {?}
989
+ */
990
+ (error) => {
991
+ console.log(error);
992
+ }));
993
+ }
994
+ /**
995
+ * @param {?} optValue
996
+ * @param {?} afFilter
997
+ * @return {?}
998
+ */
999
+ onChangeEvent(optValue, afFilter) {
1000
+ /** @type {?} */
1001
+ let jsonComp = this.configuration.component;
1002
+ for (let i = 0; i < afFilter.affectedFilter.length; i++) {
1003
+ for (let j = 0; j < jsonComp.length; j++) {
1004
+ if (jsonComp[j].name == afFilter.affectedFilter[i]) {
1005
+ /** @type {?} */
1006
+ let request = new RequestCriteriaObj();
1007
+ /** @type {?} */
1008
+ let arrayCrit = new Array();
1009
+ if (optValue != "all" && optValue != "one") {
1010
+ /** @type {?} */
1011
+ let critObj = new CriteriaObj();
1012
+ critObj.DataType = afFilter.datatype;
1013
+ if (afFilter.filterPropName != undefined || afFilter.filterPropName != "") {
1014
+ request[afFilter.filterPropName] = optValue;
1015
+ critObj.propName = afFilter.filterPropName;
1016
+ }
1017
+ else {
1018
+ critObj.propName = afFilter.name;
1019
+ request[afFilter.name] = optValue;
1020
+ }
1021
+ critObj.value = optValue;
1022
+ critObj.restriction = AdInsConstant.RestrictionEq;
1023
+ arrayCrit.push(critObj);
1024
+ }
1025
+ request.criteria = arrayCrit;
1026
+ if (jsonComp[j].path != undefined && jsonComp[j].path != "") {
1027
+ if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {
1028
+ for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {
1029
+ if (jsonComp[j].environment == this.searchInput.listEnvironments[y].environment) {
1030
+ jsonComp[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp[j].path;
1031
+ break;
1032
+ }
1033
+ }
1034
+ }
1035
+ else {
1036
+ jsonComp[j].fullpath = jsonComp[j].url;
1037
+ }
1038
+ }
1039
+ else {
1040
+ jsonComp[j].fullpath = jsonComp[j].url;
1041
+ }
1042
+ this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);
1043
+ }
1044
+ }
1045
+ }
1046
+ }
1047
+ /**
1048
+ * @param {?} idx
1049
+ * @param {?} wfKeyFilter
1050
+ * @return {?}
1051
+ */
1052
+ SetProcessKey(idx, wfKeyFilter) {
1053
+ /** @type {?} */
1054
+ let component = this.myForm.nativeElement[idx];
1055
+ /** @type {?} */
1056
+ let ddl = component.options;
1057
+ /** @type {?} */
1058
+ let text = ddl[ddl.selectedIndex].value.trim();
1059
+ if (text) {
1060
+ this.searchInput.integrationObj.requestObj[wfKeyFilter] = text;
1061
+ }
1062
+ }
1063
+ /**
1064
+ * @param {?} condList
1065
+ * @return {?}
1066
+ */
1067
+ switchCase(condList) {
1068
+ /** @type {?} */
1069
+ let condition = false;
1070
+ for (let i = 0; i < condList.conditions.length; i++) {
1071
+ /** @type {?} */
1072
+ let idx = this.searchInput.switchValue.findIndex((/**
1073
+ * @param {?} x
1074
+ * @return {?}
1075
+ */
1076
+ x => x.property == condList.conditions[i].property));
1077
+ if (condList.conditions[i].restriction == "EQ") {
1078
+ if (condList.conditions[i].isUser != true) {
1079
+ if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {
1080
+ condition = true;
1081
+ }
1082
+ else {
1083
+ condition = false;
1084
+ break;
1085
+ }
1086
+ }
1087
+ else {
1088
+ /** @type {?} */
1089
+ let username = localStorage.getItem("Username");
1090
+ if (this.searchInput.switchValue[idx].value == username) {
1091
+ condition = true;
1092
+ }
1093
+ else {
1094
+ condition = false;
1095
+ break;
1096
+ }
1097
+ }
1098
+ }
1099
+ else if (condList.conditions[i].restriction == "NEQ") {
1100
+ if (condList.conditions[i].isUser != true) {
1101
+ if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {
1102
+ condition = true;
1103
+ }
1104
+ else {
1105
+ condition = false;
1106
+ break;
1107
+ }
1108
+ }
1109
+ else {
1110
+ /** @type {?} */
1111
+ let username = localStorage.getItem("Username");
1112
+ if (this.searchInput.switchValue[idx].value != username) {
1113
+ condition = true;
1114
+ }
1115
+ else {
1116
+ condition = false;
1117
+ break;
1118
+ }
1119
+ }
1120
+ }
1121
+ else if (condList.conditions[i].restriction == "GT") {
1122
+ if (condList.conditions[i].isUser != true) {
1123
+ if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {
1124
+ condition = true;
1125
+ }
1126
+ else {
1127
+ condition = false;
1128
+ break;
1129
+ }
1130
+ }
1131
+ else {
1132
+ /** @type {?} */
1133
+ let username = localStorage.getItem("Username");
1134
+ if (this.searchInput.switchValue[idx].value > username) {
1135
+ condition = true;
1136
+ }
1137
+ else {
1138
+ condition = false;
1139
+ break;
1140
+ }
1141
+ }
1142
+ }
1143
+ else if (condList.conditions[i].restriction == "GTE") {
1144
+ if (condList.conditions[i].isUser != true) {
1145
+ if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {
1146
+ condition = true;
1147
+ }
1148
+ else {
1149
+ condition = false;
1150
+ break;
1151
+ }
1152
+ }
1153
+ else {
1154
+ /** @type {?} */
1155
+ let username = localStorage.getItem("Username");
1156
+ if (this.searchInput.switchValue[idx].value >= username) {
1157
+ condition = true;
1158
+ }
1159
+ else {
1160
+ condition = false;
1161
+ break;
1162
+ }
1163
+ }
1164
+ }
1165
+ else if (condList.conditions[i].restriction == "LT") {
1166
+ if (condList.conditions[i].isUser != true) {
1167
+ if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {
1168
+ condition = true;
1169
+ }
1170
+ else {
1171
+ condition = false;
1172
+ break;
1173
+ }
1174
+ }
1175
+ else {
1176
+ /** @type {?} */
1177
+ let username = localStorage.getItem("Username");
1178
+ if (this.searchInput.switchValue[idx].value < username) {
1179
+ condition = true;
1180
+ }
1181
+ else {
1182
+ condition = false;
1183
+ break;
1184
+ }
1185
+ }
1186
+ }
1187
+ else if (condList.conditions[i].restriction == "LTE") {
1188
+ if (condList.conditions[i].isUser != true) {
1189
+ if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {
1190
+ condition = true;
1191
+ }
1192
+ else {
1193
+ condition = false;
1194
+ break;
1195
+ }
1196
+ }
1197
+ else {
1198
+ /** @type {?} */
1199
+ let username = localStorage.getItem("Username");
1200
+ if (this.searchInput.switchValue[idx].value <= username) {
1201
+ condition = true;
1202
+ }
1203
+ else {
1204
+ condition = false;
1205
+ break;
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+ return condition;
1211
+ }
1212
+ /**
1213
+ * @private
1214
+ * @param {?} chipperText
1215
+ * @param {?} chipperKey
1216
+ * @return {?}
1217
+ */
1218
+ DecryptString(chipperText, chipperKey) {
1219
+ if (chipperKey == undefined || chipperKey.trim() == '' ||
1220
+ chipperText == undefined || chipperText.trim() == '')
1221
+ return chipperText;
1222
+ /** @type {?} */
1223
+ let chipperKeyArr = enc.Utf8.parse(chipperKey);
1224
+ /** @type {?} */
1225
+ let iv = lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);
1226
+ /** @type {?} */
1227
+ let decrypted = AES.decrypt(chipperText, chipperKeyArr, { iv: iv });
1228
+ /** @type {?} */
1229
+ let plainText = decrypted.toString(enc.Utf8);
1230
+ return plainText;
1231
+ }
1232
+ /**
1233
+ * @param {?} component
1234
+ * @return {?}
1235
+ */
1236
+ checkInputDate(component) {
1237
+ /** @type {?} */
1238
+ let minDateVal;
1239
+ /** @type {?} */
1240
+ let maxDateVal;
1241
+ /** @type {?} */
1242
+ let label;
1243
+ /** @type {?} */
1244
+ let errorMessage = new Array();
1245
+ /** @type {?} */
1246
+ let MinComponent = this.configuration.component.find((/**
1247
+ * @param {?} x
1248
+ * @return {?}
1249
+ */
1250
+ x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"))) == undefined ? this.configuration.component.find((/**
1251
+ * @param {?} x
1252
+ * @return {?}
1253
+ */
1254
+ x => x.name == component.name && (x.restriction.toUpperCase() == "GT"))) : this.configuration.component.find((/**
1255
+ * @param {?} x
1256
+ * @return {?}
1257
+ */
1258
+ x => x.name == component.name && (x.restriction.toUpperCase() == "GTE")));
1259
+ if (MinComponent != undefined) {
1260
+ minDateVal = this.myForm.nativeElement[MinComponent.id].min == "" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);
1261
+ label = MinComponent.label.split(">", 2);
1262
+ if (minDateVal != null) {
1263
+ if (MinComponent.restriction.toUpperCase() == "GT") {
1264
+ minDateVal.setDate(minDateVal.getDate() - 1);
1265
+ errorMessage.push(" must be greater than ");
1266
+ }
1267
+ else if (MinComponent.restriction.toUpperCase() == "GTE") {
1268
+ errorMessage.push(" must be greater than or equals to ");
1269
+ }
1270
+ }
1271
+ }
1272
+ /** @type {?} */
1273
+ let MaxComponent = this.configuration.component.find((/**
1274
+ * @param {?} x
1275
+ * @return {?}
1276
+ */
1277
+ x => x.name == component.name && (x.restriction.toUpperCase() == "LTE"))) == undefined ? this.configuration.component.find((/**
1278
+ * @param {?} x
1279
+ * @return {?}
1280
+ */
1281
+ x => x.name == component.name && (x.restriction.toUpperCase() == "LT"))) : this.configuration.component.find((/**
1282
+ * @param {?} x
1283
+ * @return {?}
1284
+ */
1285
+ x => x.name == component.name && (x.restriction.toUpperCase() == "LTE")));
1286
+ if (MaxComponent != undefined) {
1287
+ maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == "" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);
1288
+ label = MaxComponent.label.split("<", 2);
1289
+ if (maxDateVal != null) {
1290
+ if (MaxComponent.restriction.toUpperCase() == "LT") {
1291
+ maxDateVal.setDate(maxDateVal.getDate() + 1);
1292
+ errorMessage.push(" must be less than ");
1293
+ }
1294
+ else if (MaxComponent.restriction.toUpperCase() == "LTE") {
1295
+ errorMessage.push(" must be less than or equals to ");
1296
+ }
1297
+ }
1298
+ }
1299
+ if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {
1300
+ this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1301
+ this.dateWrong = true;
1302
+ }
1303
+ else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {
1304
+ this.toastr.warning(label[0] + errorMessage[0] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1305
+ this.dateWrong = true;
1306
+ }
1307
+ else if (minDateVal != null && maxDateVal != null) {
1308
+ if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {
1309
+ this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + " and" + errorMessage[1] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1310
+ this.dateWrong = true;
1311
+ }
1312
+ else {
1313
+ this.dateWrong = false;
1314
+ }
1315
+ }
1316
+ else {
1317
+ this.dateWrong = false;
1318
+ }
1319
+ }
1320
+ }
1321
+ UCSearchComponent.decorators = [
1322
+ { type: Component, args: [{
1323
+ selector: 'lib-UCSearch',
1324
+ 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}}\" 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}}\" [readonly]=\"question.readonly\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair = \"{{question.datepickerPair}}\" 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'}}\" (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 *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}}\" 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 : question.itemsUrl[0].Value}}</label>\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 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 -->",
1325
+ providers: [ExcelService, DatePipe],
1326
+ animations: [
1327
+ trigger('changeDivSize', [
1328
+ state('initial', style({
1329
+ height: '*',
1330
+ opacity: '1',
1331
+ })),
1332
+ state('final', style({
1333
+ height: '0px',
1334
+ opacity: '0',
1335
+ overflow: 'hidden',
1336
+ })),
1337
+ transition('initial=>final', animate('300ms')),
1338
+ transition('final=>initial', animate('300ms'))
1339
+ ]),
1340
+ ],
1341
+ styles: [".ucSearch-title{margin:3px}"]
1342
+ }] }
1343
+ ];
1344
+ /** @nocollapse */
1345
+ UCSearchComponent.ctorParameters = () => [
1346
+ { type: HttpClient },
1347
+ { type: ExcelService },
1348
+ { type: Renderer2 },
1349
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
1350
+ { type: ToastrService },
1351
+ { type: CookieService },
1352
+ { type: DatePipe }
1353
+ ];
1354
+ UCSearchComponent.propDecorators = {
1355
+ content: [{ type: ViewChild, args: ['enjiForm',] }],
1356
+ myForm: [{ type: ViewChild, args: ['formIdSearch',] }],
1357
+ searchInput: [{ type: Input }],
1358
+ pageSize: [{ type: Input }],
1359
+ isReport: [{ type: Input }],
1360
+ result: [{ type: Output }],
1361
+ genRpt: [{ type: Output }],
1362
+ reqGetAllData: [{ type: Output }]
1363
+ };
1364
+
1365
+ /**
1366
+ * @fileoverview added by tsickle
1367
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1368
+ */
1369
+ /** @type {?} */
1370
+ const customCurrencyMaskConfig = {
1371
+ align: "right",
1372
+ allowNegative: false,
1373
+ allowZero: true,
1374
+ decimal: ".",
1375
+ precision: 2,
1376
+ prefix: "",
1377
+ suffix: "",
1378
+ thousands: ",",
1379
+ nullable: false,
1380
+ inputMode: CurrencyMaskInputMode.NATURAL
1381
+ };
1382
+ class UCSearchModule {
1383
+ }
1384
+ UCSearchModule.decorators = [
1385
+ { type: NgModule, args: [{
1386
+ declarations: [UCSearchComponent],
1387
+ imports: [
1388
+ CommonModule,
1389
+ FormsModule,
1390
+ UcShowErrorsModule,
1391
+ UcDirectiveUpperCaseModule,
1392
+ NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
1393
+ TranslateModule.forChild()
1394
+ ],
1395
+ exports: [UCSearchComponent]
1396
+ },] }
1397
+ ];
1398
+
1399
+ /**
1400
+ * @fileoverview added by tsickle
1401
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1402
+ */
1403
+
1404
+ /**
1405
+ * @fileoverview added by tsickle
1406
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1407
+ */
1408
+
1409
+ export { UCSearchService, UCSearchComponent, customCurrencyMaskConfig, UCSearchModule, ExcelService as ɵa };
1410
+
1411
+ //# sourceMappingURL=adins-ucsearch.js.map