@adins/ucsearch 2.15.0 → 3.0.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 (66) hide show
  1. package/README.md +39 -17
  2. package/adins-ucsearch.d.ts +1 -2
  3. package/esm2020/adins-ucsearch.mjs +5 -0
  4. package/esm2020/lib/model/adins-constant.mjs +52 -0
  5. package/esm2020/lib/model/criteria-obj.model.mjs +9 -0
  6. package/esm2020/lib/model/input-search-obj.model.mjs +45 -0
  7. package/esm2020/lib/model/integration-obj.model.mjs +12 -0
  8. package/esm2020/lib/model/key-value-report.model.mjs +15 -0
  9. package/esm2020/lib/model/key-value-uc-search.model.mjs +38 -0
  10. package/esm2020/lib/model/request-criteria-obj.model.mjs +14 -0
  11. package/esm2020/lib/pipe/text-search.pipe.mjs +24 -0
  12. package/esm2020/lib/services/export-file.service.mjs +61 -0
  13. package/esm2020/lib/ucsearch.component.mjs +1057 -0
  14. package/esm2020/lib/ucsearch.module.mjs +55 -0
  15. package/esm2020/lib/ucsearch.service.mjs +14 -0
  16. package/esm2020/public-api.mjs +7 -0
  17. package/fesm2015/adins-ucsearch.mjs +1385 -0
  18. package/fesm2015/adins-ucsearch.mjs.map +1 -0
  19. package/fesm2020/adins-ucsearch.mjs +1374 -0
  20. package/fesm2020/adins-ucsearch.mjs.map +1 -0
  21. package/lib/model/adins-constant.d.ts +21 -0
  22. package/lib/model/input-search-obj.model.d.ts +1 -0
  23. package/lib/pipe/text-search.pipe.d.ts +3 -0
  24. package/lib/services/export-file.service.d.ts +12 -0
  25. package/lib/ucsearch.component.d.ts +16 -13
  26. package/lib/ucsearch.module.d.ts +12 -0
  27. package/lib/ucsearch.service.d.ts +3 -0
  28. package/package.json +24 -13
  29. package/adins-ucsearch.metadata.json +0 -1
  30. package/bundles/adins-ucsearch.umd.js +0 -1931
  31. package/bundles/adins-ucsearch.umd.js.map +0 -1
  32. package/bundles/adins-ucsearch.umd.min.js +0 -2
  33. package/bundles/adins-ucsearch.umd.min.js.map +0 -1
  34. package/esm2015/adins-ucsearch.js +0 -11
  35. package/esm2015/lib/model/adins-constant.js +0 -68
  36. package/esm2015/lib/model/criteria-obj.model.js +0 -31
  37. package/esm2015/lib/model/input-search-obj.model.js +0 -105
  38. package/esm2015/lib/model/integration-obj.model.js +0 -30
  39. package/esm2015/lib/model/key-value-report.model.js +0 -39
  40. package/esm2015/lib/model/key-value-uc-search.model.js +0 -54
  41. package/esm2015/lib/model/request-criteria-obj.model.js +0 -42
  42. package/esm2015/lib/pipe/text-search.pipe.js +0 -33
  43. package/esm2015/lib/services/excel-service/excel-service.js +0 -49
  44. package/esm2015/lib/ucsearch.component.js +0 -1468
  45. package/esm2015/lib/ucsearch.module.js +0 -43
  46. package/esm2015/lib/ucsearch.service.js +0 -18
  47. package/esm2015/public-api.js +0 -11
  48. package/esm5/adins-ucsearch.js +0 -11
  49. package/esm5/lib/model/adins-constant.js +0 -72
  50. package/esm5/lib/model/criteria-obj.model.js +0 -33
  51. package/esm5/lib/model/input-search-obj.model.js +0 -117
  52. package/esm5/lib/model/integration-obj.model.js +0 -32
  53. package/esm5/lib/model/key-value-report.model.js +0 -45
  54. package/esm5/lib/model/key-value-uc-search.model.js +0 -58
  55. package/esm5/lib/model/request-criteria-obj.model.js +0 -44
  56. package/esm5/lib/pipe/text-search.pipe.js +0 -42
  57. package/esm5/lib/services/excel-service/excel-service.js +0 -63
  58. package/esm5/lib/ucsearch.component.js +0 -1633
  59. package/esm5/lib/ucsearch.module.js +0 -47
  60. package/esm5/lib/ucsearch.service.js +0 -21
  61. package/esm5/public-api.js +0 -11
  62. package/fesm2015/adins-ucsearch.js +0 -1641
  63. package/fesm2015/adins-ucsearch.js.map +0 -1
  64. package/fesm5/adins-ucsearch.js +0 -1842
  65. package/fesm5/adins-ucsearch.js.map +0 -1
  66. package/lib/services/excel-service/excel-service.d.ts +0 -5
@@ -1,1931 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/platform-browser'), require('file-saver'), require('xlsx'), require('@angular/animations'), require('ngx-toastr'), require('ngx-cookie'), require('crypto-js'), require('@angular/router'), require('@angular/common'), require('@angular/forms'), require('ngx-currency'), require('@ngx-translate/core'), require('@adins/uc-show-errors'), require('@adins/uc-directive-upper-case'), require('@angular/core')) :
3
- typeof define === 'function' && define.amd ? define('@adins/ucsearch', ['exports', '@angular/common/http', '@angular/platform-browser', 'file-saver', 'xlsx', '@angular/animations', 'ngx-toastr', 'ngx-cookie', 'crypto-js', '@angular/router', '@angular/common', '@angular/forms', 'ngx-currency', '@ngx-translate/core', '@adins/uc-show-errors', '@adins/uc-directive-upper-case', '@angular/core'], factory) :
4
- (factory((global.adins = global.adins || {}, global.adins.ucsearch = {}),global.ng.common.http,global.ng.platformBrowser,global.FileSaver,global.XLSX,global.ng.animations,global.ngxToastr,global.ngxCookie,global.CryptoJS,global.ng.router,global.ng.common,global.ng.forms,global.ngxCurrency,global.core,global.ucShowErrors,global.ucDirectiveUpperCase,global.ng.core));
5
- }(this, (function (exports,http,platformBrowser,FileSaver,XLSX,animations,ngxToastr,ngxCookie,CryptoJS,router,common,forms,ngxCurrency,core,ucShowErrors,ucDirectiveUpperCase,i0) { 'use strict';
6
-
7
- /**
8
- * @fileoverview added by tsickle
9
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10
- */
11
- var UCSearchService = /** @class */ (function () {
12
- function UCSearchService() {
13
- }
14
- UCSearchService.decorators = [
15
- { type: i0.Injectable, args: [{
16
- providedIn: 'root'
17
- },] }
18
- ];
19
- /** @nocollapse */
20
- UCSearchService.ctorParameters = function () { return []; };
21
- /** @nocollapse */ UCSearchService.ngInjectableDef = i0.defineInjectable({ factory: function UCSearchService_Factory() { return new UCSearchService(); }, token: UCSearchService, providedIn: "root" });
22
- return UCSearchService;
23
- }());
24
-
25
- /*! *****************************************************************************
26
- Copyright (c) Microsoft Corporation.
27
-
28
- Permission to use, copy, modify, and/or distribute this software for any
29
- purpose with or without fee is hereby granted.
30
-
31
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
32
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
33
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
34
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
35
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
36
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
37
- PERFORMANCE OF THIS SOFTWARE.
38
- ***************************************************************************** */
39
- function __awaiter(thisArg, _arguments, P, generator) {
40
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
- return new (P || (P = Promise))(function (resolve, reject) {
42
- function fulfilled(value) { try {
43
- step(generator.next(value));
44
- }
45
- catch (e) {
46
- reject(e);
47
- } }
48
- function rejected(value) { try {
49
- step(generator["throw"](value));
50
- }
51
- catch (e) {
52
- reject(e);
53
- } }
54
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
55
- step((generator = generator.apply(thisArg, _arguments || [])).next());
56
- });
57
- }
58
- function __generator(thisArg, body) {
59
- var _ = { label: 0, sent: function () { if (t[0] & 1)
60
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
61
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
62
- function verb(n) { return function (v) { return step([n, v]); }; }
63
- function step(op) {
64
- if (f)
65
- throw new TypeError("Generator is already executing.");
66
- while (_)
67
- try {
68
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
69
- return t;
70
- if (y = 0, t)
71
- op = [op[0] & 2, t.value];
72
- switch (op[0]) {
73
- case 0:
74
- case 1:
75
- t = op;
76
- break;
77
- case 4:
78
- _.label++;
79
- return { value: op[1], done: false };
80
- case 5:
81
- _.label++;
82
- y = op[1];
83
- op = [0];
84
- continue;
85
- case 7:
86
- op = _.ops.pop();
87
- _.trys.pop();
88
- continue;
89
- default:
90
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
91
- _ = 0;
92
- continue;
93
- }
94
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
95
- _.label = op[1];
96
- break;
97
- }
98
- if (op[0] === 6 && _.label < t[1]) {
99
- _.label = t[1];
100
- t = op;
101
- break;
102
- }
103
- if (t && _.label < t[2]) {
104
- _.label = t[2];
105
- _.ops.push(op);
106
- break;
107
- }
108
- if (t[2])
109
- _.ops.pop();
110
- _.trys.pop();
111
- continue;
112
- }
113
- op = body.call(thisArg, _);
114
- }
115
- catch (e) {
116
- op = [6, e];
117
- y = 0;
118
- }
119
- finally {
120
- f = t = 0;
121
- }
122
- if (op[0] & 5)
123
- throw op[1];
124
- return { value: op[0] ? op[1] : void 0, done: true };
125
- }
126
- }
127
-
128
- /**
129
- * @fileoverview added by tsickle
130
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
131
- */
132
- var AdInsConstant = /** @class */ (function () {
133
- function AdInsConstant() {
134
- }
135
- AdInsConstant.RestrictionBetween = "Between";
136
- AdInsConstant.RestrictionLike = "Like";
137
- AdInsConstant.RestrictionEq = "Eq";
138
- AdInsConstant.RestrictionNeq = "NEQ";
139
- AdInsConstant.RestrictionGt = "GT";
140
- AdInsConstant.RestrictionGte = "GTE";
141
- AdInsConstant.RestrictionLt = "LT";
142
- AdInsConstant.RestrictionLte = "LTE";
143
- AdInsConstant.RestrictionIn = "IN";
144
- AdInsConstant.RestrictionNotIn = "NotIn";
145
- AdInsConstant.RestrictionOr = "Or"; //pastikan ada 1 criteria sebelumnya
146
- //pastikan ada 1 criteria sebelumnya
147
- AdInsConstant.RestrictionOrNeq = "OrNeq"; //pastikan ada 1 criteria sebelumnya
148
- //pastikan ada 1 criteria sebelumnya
149
- AdInsConstant.RestrictionIsNull = "ISNULL";
150
- AdInsConstant.RestrictionIsNotNull = "ISNOTNULL";
151
- AdInsConstant.RestrictionGTE = "GTE";
152
- AdInsConstant.RestrictionLTE = "LTE";
153
- AdInsConstant.showData = "10,50,100";
154
- AdInsConstant.JoinTypeInner = "INNER";
155
- AdInsConstant.JoinTypeLeft = "LEFT";
156
- return AdInsConstant;
157
- }());
158
-
159
- /**
160
- * @fileoverview added by tsickle
161
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
162
- */
163
- var IntegrationObj = /** @class */ (function () {
164
- function IntegrationObj() {
165
- this.baseUrl = "";
166
- this.apiPath = "";
167
- this.requestObj = new Object();
168
- this.leftColumnToJoin = "";
169
- this.rightColumnToJoin = "";
170
- this.joinType = AdInsConstant.JoinTypeInner;
171
- }
172
- return IntegrationObj;
173
- }());
174
-
175
- /**
176
- * @fileoverview added by tsickle
177
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
178
- */
179
- var InputSearchObj = /** @class */ (function () {
180
- function InputSearchObj() {
181
- this._url = "";
182
- this.enviromentUrl = "";
183
- this.title = "";
184
- this.apiQryPaging = "";
185
- this.arrCritObj = null;
186
- this.addCritInput = new Array();
187
- this.listEnvironments = new Array();
188
- this.whereValue = new Array();
189
- this.fromValue = new Array();
190
- this.switchValue = new Array();
191
- this.integrationObj = new IntegrationObj();
192
- this.isJoinExAPI = false;
193
- }
194
- return InputSearchObj;
195
- }());
196
-
197
- /**
198
- * @fileoverview added by tsickle
199
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
200
- */
201
- var CriteriaObj = /** @class */ (function () {
202
- function CriteriaObj() {
203
- this.low = 0;
204
- this.high = 0;
205
- this.DataType = 'Text';
206
- this.isCriteriaDataTable = false;
207
- }
208
- return CriteriaObj;
209
- }());
210
-
211
- /**
212
- * @fileoverview added by tsickle
213
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
214
- */
215
- var RequestCriteriaObj = /** @class */ (function () {
216
- function RequestCriteriaObj() {
217
- this.includeCount = true;
218
- this.includeData = true;
219
- this.isLoading = true;
220
- this.queryString = '';
221
- this.rowVersion = '';
222
- this.integrationObj = new IntegrationObj();
223
- this.joinType = AdInsConstant.JoinTypeInner;
224
- }
225
- return RequestCriteriaObj;
226
- }());
227
-
228
- /**
229
- * @fileoverview added by tsickle
230
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
231
- */
232
- /** @type {?} */
233
- var EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
234
- /** @type {?} */
235
- var EXCEL_EXTENSION = '.xlsx';
236
- var ExcelService = /** @class */ (function () {
237
- function ExcelService() {
238
- }
239
- /**
240
- * @param {?} json
241
- * @param {?} excelFileName
242
- * @return {?}
243
- */
244
- ExcelService.prototype.exportAsExcelFile = /**
245
- * @param {?} json
246
- * @param {?} excelFileName
247
- * @return {?}
248
- */
249
- function (json, excelFileName) {
250
- /** @type {?} */
251
- var worksheet = XLSX.utils.json_to_sheet(json);
252
- console.log('worksheet', worksheet);
253
- /** @type {?} */
254
- var workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
255
- /** @type {?} */
256
- var excelBuffer = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
257
- //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });
258
- this.saveAsExcelFile(excelBuffer, excelFileName);
259
- };
260
- /**
261
- * @private
262
- * @param {?} buffer
263
- * @param {?} fileName
264
- * @return {?}
265
- */
266
- ExcelService.prototype.saveAsExcelFile = /**
267
- * @private
268
- * @param {?} buffer
269
- * @param {?} fileName
270
- * @return {?}
271
- */
272
- function (buffer, fileName) {
273
- /** @type {?} */
274
- var data = new Blob([buffer], {
275
- type: EXCEL_TYPE
276
- });
277
- FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);
278
- };
279
- ExcelService.decorators = [
280
- { type: i0.Injectable }
281
- ];
282
- /** @nocollapse */
283
- ExcelService.ctorParameters = function () { return []; };
284
- return ExcelService;
285
- }());
286
-
287
- /**
288
- * @fileoverview added by tsickle
289
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
290
- */
291
- var ExportTypeConstant = /** @class */ (function () {
292
- function ExportTypeConstant() {
293
- }
294
- ExportTypeConstant.EXP_TYPE_PDF = 0;
295
- ExportTypeConstant.EXP_TYPE_XLS = 1;
296
- ExportTypeConstant.EXP_TYPE_XLSX = 2;
297
- ExportTypeConstant.EXP_TYPE_DOC = 3;
298
- ExportTypeConstant.EXP_TYPE_DOCX = 4;
299
- ExportTypeConstant.EXP_TYPE_JPDF = 5;
300
- return ExportTypeConstant;
301
- }());
302
-
303
- /**
304
- * @fileoverview added by tsickle
305
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
306
- */
307
- var ListKeyValueMonth = /** @class */ (function () {
308
- function ListKeyValueMonth() {
309
- this.DictOfMonth = {};
310
- this.ListOfMonth = new Array();
311
- this.DictOfMonth = {};
312
- this.ListOfMonth.push({ key: 1, value: "January" });
313
- this.DictOfMonth[1] = "January";
314
- this.ListOfMonth.push({ key: 2, value: "February" });
315
- this.DictOfMonth[2] = "February";
316
- this.ListOfMonth.push({ key: 3, value: "March" });
317
- this.DictOfMonth[3] = "March";
318
- this.ListOfMonth.push({ key: 4, value: "April" });
319
- this.DictOfMonth[4] = "April";
320
- this.ListOfMonth.push({ key: 5, value: "May" });
321
- this.DictOfMonth[5] = "May";
322
- this.ListOfMonth.push({ key: 6, value: "June" });
323
- this.DictOfMonth[6] = "June";
324
- this.ListOfMonth.push({ key: 7, value: "July" });
325
- this.DictOfMonth[7] = "July";
326
- this.ListOfMonth.push({ key: 8, value: "August" });
327
- this.DictOfMonth[8] = "August";
328
- this.ListOfMonth.push({ key: 9, value: "September" });
329
- this.DictOfMonth[9] = "September";
330
- this.ListOfMonth.push({ key: 10, value: "October" });
331
- this.DictOfMonth[10] = "October";
332
- this.ListOfMonth.push({ key: 11, value: "November" });
333
- this.DictOfMonth[11] = "November";
334
- this.ListOfMonth.push({ key: 12, value: "December" });
335
- this.DictOfMonth[12] = "December";
336
- }
337
- return ListKeyValueMonth;
338
- }());
339
-
340
- /**
341
- * @fileoverview added by tsickle
342
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
343
- */
344
- var UCSearchComponent = /** @class */ (function () {
345
- function UCSearchComponent(http$$1, excelService, _renderer2, _document, toastr, cookieService, datePipe, elemRef, route) {
346
- var _this = this;
347
- this.http = http$$1;
348
- this.excelService = excelService;
349
- this._renderer2 = _renderer2;
350
- this._document = _document;
351
- this.toastr = toastr;
352
- this.cookieService = cookieService;
353
- this.datePipe = datePipe;
354
- this.elemRef = elemRef;
355
- this.route = route;
356
- this.searchInput = new InputSearchObj();
357
- this.pageSize = 10;
358
- this.isReport = false;
359
- this.result = new i0.EventEmitter();
360
- this.genRpt = new i0.EventEmitter();
361
- this.reqGetAllData = new i0.EventEmitter();
362
- this.ExportTypeList = [
363
- {
364
- key: ExportTypeConstant.EXP_TYPE_PDF,
365
- value: "PDF"
366
- },
367
- {
368
- key: ExportTypeConstant.EXP_TYPE_XLSX,
369
- value: "Excel 2007"
370
- },
371
- {
372
- key: ExportTypeConstant.EXP_TYPE_DOCX,
373
- value: "Document XML"
374
- },
375
- {
376
- key: ExportTypeConstant.EXP_TYPE_JPDF,
377
- value: "Justify PDF"
378
- }
379
- ];
380
- this.ListOfMonth = new ListKeyValueMonth();
381
- this.ListOfYear = new Array();
382
- this.ClaimList = [
383
- {
384
- Key: AdInsConstant.RestrictionIsNotNull,
385
- Value: "CLAIMED"
386
- },
387
- {
388
- Key: AdInsConstant.RestrictionIsNull,
389
- Value: "UNCLAIMED"
390
- },
391
- ];
392
- this.ExportType = 0;
393
- this.pageNow = 1;
394
- this.isDataLoaded = false;
395
- this.isHidden = false;
396
- this.BusinessDt = new Date();
397
- this.dateWrong = false;
398
- this.readonly = false;
399
- this.currentState = 'initial';
400
- this.countForm = 0;
401
- this.formattedAmount = '';
402
- this.amount = 0;
403
- this.route.queryParams.subscribe(( /**
404
- * @param {?} params
405
- * @return {?}
406
- */function (params) {
407
- _this.queryParam = params;
408
- }));
409
- }
410
- Object.defineProperty(UCSearchComponent.prototype, "content", {
411
- // isListHide: boolean = true;
412
- // @HostListener('document:click', ['$event'])
413
- // onClick(ev: MouseEvent) {
414
- // const clickInside = this.elemRef.nativeElement.contains(ev.target);
415
- // if (!clickInside) {
416
- // this.isListHide = true;
417
- // }
418
- // }
419
- set:
420
- // isListHide: boolean = true;
421
- // @HostListener('document:click', ['$event'])
422
- // onClick(ev: MouseEvent) {
423
- // const clickInside = this.elemRef.nativeElement.contains(ev.target);
424
- // if (!clickInside) {
425
- // this.isListHide = true;
426
- // }
427
- // }
428
- /**
429
- * @param {?} content
430
- * @return {?}
431
- */
432
- function (content) {
433
- if (content) { // initially setter gets called with undefined
434
- this.searchForm = content;
435
- }
436
- },
437
- enumerable: true,
438
- configurable: true
439
- });
440
- /**
441
- * @return {?}
442
- */
443
- UCSearchComponent.prototype.changeState = /**
444
- * @return {?}
445
- */
446
- function () {
447
- this.currentState = this.currentState === 'initial' ? 'final' : 'initial';
448
- this.isHidden = this.isHidden === false ? true : false;
449
- };
450
- /**
451
- * @return {?}
452
- */
453
- UCSearchComponent.prototype.ngOnInit = /**
454
- * @return {?}
455
- */
456
- function () {
457
- return __awaiter(this, void 0, void 0, function () {
458
- var js, value;
459
- return __generator(this, function (_a) {
460
- switch (_a.label) {
461
- case 0:
462
- console.log("ucsearch");
463
- this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;
464
- this.arrCrit = this.searchInput.arrCritObj;
465
- js = this._renderer2.createElement('script');
466
- js.text = "\n $(document).ready(function(){\n $(\"#flip\").click(function(){\n $(\"#panel\").slideToggle(\"slow\");\n });\n });\n ";
467
- this._renderer2.appendChild(this._document.body, js);
468
- value = this.cookieService.get('BusinessDateRaw');
469
- this.BisDt = this.DecryptString(value, "AdInsFOU12345678");
470
- this.BusinessDt = new Date(this.BisDt);
471
- return [4 /*yield*/, this.initiateForm()];
472
- case 1:
473
- _a.sent();
474
- return [2 /*return*/];
475
- }
476
- });
477
- });
478
- };
479
- /**
480
- * @return {?}
481
- */
482
- UCSearchComponent.prototype.initiateForm = /**
483
- * @return {?}
484
- */
485
- function () {
486
- return __awaiter(this, void 0, void 0, function () {
487
- var _this = this;
488
- return __generator(this, function (_a) {
489
- switch (_a.label) {
490
- case 0: return [4 /*yield*/, this.getJSON(this.searchInput._url).subscribe(( /**
491
- * @param {?} data
492
- * @return {?}
493
- */function (data) {
494
- _this.configuration = data;
495
- _this.exportData = data.exportExcel;
496
- if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {
497
- _this.ExportTypeList = data.exportTypeList;
498
- _this.ExportType = _this.ExportTypeList[0].key;
499
- }
500
- _this.countForm = data.component.length;
501
- _this.isDataLoaded = true;
502
- if (_this.searchInput.title != undefined && _this.searchInput.title != "") {
503
- _this.configuration.title = _this.searchInput.title;
504
- }
505
- for (var i = 0; i < _this.countForm; i++) {
506
- //ini kalau datanya di load dari URL
507
- if (data.component[i].isFromURL == true) {
508
- /** @type {?} */
509
- var request = new RequestCriteriaObj();
510
- /** @type {?} */
511
- var arrayCrit = new Array();
512
- /** @type {?} */
513
- var criteriaObject = new CriteriaObj();
514
- criteriaObject.DataType = "text";
515
- criteriaObject.propName = data.component[i].criteriaPropName;
516
- criteriaObject.value = data.component[i].criteriaPropValue;
517
- criteriaObject.restriction = "eq";
518
- arrayCrit.push(criteriaObject);
519
- request.criteria = arrayCrit;
520
- request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;
521
- // Pengecekan penggunaan url atau path
522
- if (data.component[i].path != undefined && data.component[i].path != "") {
523
- if (_this.searchInput.listEnvironments != undefined && _this.searchInput.listEnvironments.length != 0) {
524
- for (var y = 0; y < _this.searchInput.listEnvironments.length; y++) {
525
- if (data.component[i].environment == _this.searchInput.listEnvironments[y].environment) {
526
- data.component[i].fullpath = _this.searchInput.listEnvironments[y].url + data.component[i].path;
527
- break;
528
- }
529
- }
530
- }
531
- else {
532
- data.component[i].fullpath = data.component[i].url;
533
- }
534
- }
535
- else {
536
- data.component[i].fullpath = data.component[i].url;
537
- }
538
- //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya
539
- //biar tiap function ada state2nya sendiri
540
- _this.resolveObject(data.component[i], data.component[i].fullpath, request);
541
- }
542
- if (data.component[i].type == "numeric") {
543
- data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');
544
- }
545
- //pengecekan ddl
546
- if (data.component[i].type == "dropdown") {
547
- if (data.component[i].dtmType != undefined) {
548
- if (data.component[i].dtmType.includes("month")) {
549
- if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
550
- data.component[i].value = _this.setDefaultValueMonth(data.component[i].value);
551
- }
552
- data.component[i].items = _this.setMonthDDL(data.component[i].dtmType);
553
- }
554
- if (data.component[i].dtmType.includes("year")) {
555
- if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
556
- data.component[i].value = _this.setDefaultValueYear(data.component[i].value);
557
- }
558
- data.component[i].items = _this.setYearDDL(data.component[i].dtmType);
559
- }
560
- }
561
- }
562
- // if (data.component[i].type == "dropdownSearch" && !data.component[i].isFromURL && data.component[i].items?.length != 1) {
563
- // if (data.component[i].ddsType == undefined || data.component[i].ddsType == "all") {
564
- // data.component[i].value = "all";
565
- // data.component[i].descr = "All";
566
- // } else if (data.component[i].ddsType == "one") {
567
- // data.component[i].value = "one";
568
- // data.component[i].descr = "Select One";
569
- // }
570
- // }
571
- if (data.component[i].type == "dropdownSearch" && !data.component[i].isFromURL && data.component[i].items.length == 1) {
572
- data.component[i].value = data.component[i].items[0].Key;
573
- data.component[i].descr = data.component[i].items[0].Value;
574
- }
575
- if (data.component[i].type != "dropdownSearch" && !data.component[i].value) {
576
- data.component[i].value = "";
577
- if (data.component[i].ddlType == 'all')
578
- data.component[i].value = "all";
579
- if (data.component[i].ddlType == 'one')
580
- data.component[i].value = "one";
581
- }
582
- //pengecekan tanggal
583
- if (data.component[i].type == "datepicker") {
584
- _this.readonly = data.component[i].readonly;
585
- if (data.component[i].value.includes("BD")) {
586
- /** @type {?} */
587
- var businessDate = new Date();
588
- if (_this.BisDt != null) {
589
- businessDate = new Date(_this.BisDt);
590
- }
591
- /** @type {?} */
592
- var operator = data.component[i].value.charAt(2);
593
- /** @type {?} */
594
- var dateShow = new Date();
595
- if (operator == "-") {
596
- /** @type {?} */
597
- var tempMinus = data.component[i].value.split("-", 2);
598
- /** @type {?} */
599
- var numDay = parseInt(tempMinus[1]);
600
- businessDate.setDate(businessDate.getDate() - numDay);
601
- }
602
- else if (operator == "+") {
603
- /** @type {?} */
604
- var tempMinus = data.component[i].value.split("+", 2);
605
- /** @type {?} */
606
- var numDay = parseInt(tempMinus[1]);
607
- businessDate.setDate(businessDate.getDate() + numDay);
608
- }
609
- dateShow = businessDate;
610
- /** @type {?} */
611
- var dateText = common.formatDate(dateShow, 'yyyy-MM-dd', 'en-US');
612
- data.component[i].value = dateText;
613
- }
614
- if (_this.readonly = false) {
615
- if (data.component[i].restriction != undefined && data.component[i].restriction != "") {
616
- if (data.component[i].restriction.toUpperCase() == "GT") {
617
- /** @type {?} */
618
- var minDate = new Date(_this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));
619
- minDate.setDate(minDate.getDate() + 1);
620
- data.component[i].minDate = minDate;
621
- }
622
- else if (data.component[i].restriction.toUpperCase() == "LT") {
623
- /** @type {?} */
624
- var maxDate = new Date(_this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));
625
- maxDate.setDate(maxDate.getDate() - 1);
626
- data.component[i].maxDate = maxDate;
627
- }
628
- }
629
- }
630
- }
631
- if (data.component[i].type == "textbox") {
632
- _this.configuration.component[i].value = _this.autofill(data.component[i]);
633
- }
634
- }
635
- setTimeout(( /**
636
- * @return {?}
637
- */function () {
638
- for (var j = 0; j < _this.countForm; j++) {
639
- if (data.component[j].isEvent == true && _this.configuration.component[j].itemsUrl.length == 1) {
640
- _this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);
641
- }
642
- if (data.component[j].type == "officeRoleCodes" && _this.configuration.component[j].itemsUrl.length > 0) {
643
- _this.SetRoleOfficeCodes(j);
644
- }
645
- }
646
- }), 1000);
647
- }))];
648
- case 1:
649
- _a.sent();
650
- return [2 /*return*/];
651
- }
652
- });
653
- });
654
- };
655
- /**
656
- * @private
657
- * @param {?} data
658
- * @return {?}
659
- */
660
- UCSearchComponent.prototype.autofill = /**
661
- * @private
662
- * @param {?} data
663
- * @return {?}
664
- */
665
- function (data) {
666
- if (data.value != "")
667
- return data.value;
668
- /** @type {?} */
669
- var autofill = data.autofill;
670
- if (autofill == undefined)
671
- return data.value;
672
- if (this.queryParam[autofill.key] == undefined)
673
- return data.value;
674
- if (autofill.source == "param") {
675
- return this.queryParam[autofill.key];
676
- }
677
- return data.value;
678
- };
679
- /**
680
- * @param {?} i
681
- * @return {?}
682
- */
683
- UCSearchComponent.prototype.SetRoleOfficeCodes = /**
684
- * @param {?} i
685
- * @return {?}
686
- */
687
- function (i) {
688
- /** @type {?} */
689
- var value = this.cookieService.get("UserAccess");
690
- /** @type {?} */
691
- var userAccess = JSON.parse(this.DecryptString(value, "AdInsFOU12345678"));
692
- /** @type {?} */
693
- var roleCode = userAccess["RoleCode"];
694
- /** @type {?} */
695
- var listOfficeRoleCodes = new Array();
696
- listOfficeRoleCodes.push(roleCode);
697
- /** @type {?} */
698
- var component = this.myForm.nativeElement[i];
699
- /** @type {?} */
700
- var ddl = component.options;
701
- /** @type {?} */
702
- var text = ddl[ddl.selectedIndex].value.trim();
703
- if (this.configuration.component[i].itemsUrl.length == 1 || (this.configuration.component[i].ddlType == 'all' && text == 'all')) {
704
- for (var index = 0; index < this.configuration.component[i].itemsUrl.length; index++) {
705
- /** @type {?} */
706
- var element = this.configuration.component[i].itemsUrl[index];
707
- listOfficeRoleCodes.push(element.Key);
708
- listOfficeRoleCodes.push(roleCode + "-" + element.Key);
709
- }
710
- }
711
- else {
712
- listOfficeRoleCodes.push(text);
713
- listOfficeRoleCodes.push(roleCode + "-" + text);
714
- }
715
- this.searchInput.integrationObj.requestObj["OfficeRoleCodes"] = listOfficeRoleCodes;
716
- };
717
- /**
718
- * @param {?} value
719
- * @return {?}
720
- */
721
- UCSearchComponent.prototype.setDefaultValueMonth = /**
722
- * @param {?} value
723
- * @return {?}
724
- */
725
- function (value) {
726
- /** @type {?} */
727
- var businessDate = new Date(this.BusinessDt);
728
- /** @type {?} */
729
- var operator = value.charAt(2);
730
- /** @type {?} */
731
- var tempValue = value.split(operator, 2);
732
- /** @type {?} */
733
- var numMonth = parseInt(tempValue[1]);
734
- if (!numMonth)
735
- numMonth = 1;
736
- if (operator == "-") {
737
- businessDate.setMonth(businessDate.getMonth() - numMonth);
738
- }
739
- else if (operator == "+") {
740
- businessDate.setMonth(businessDate.getMonth() + numMonth);
741
- }
742
- return businessDate.getMonth();
743
- };
744
- /**
745
- * @param {?} month
746
- * @return {?}
747
- */
748
- UCSearchComponent.prototype.setMonthDDL = /**
749
- * @param {?} month
750
- * @return {?}
751
- */
752
- function (month) {
753
- /** @type {?} */
754
- var ListOfMonth;
755
- /** @type {?} */
756
- var equation = month.match("[\\/+][-]|[-][\\/+]|\\/+|-");
757
- /** @type {?} */
758
- var toMin = this.BusinessDt.getMonth();
759
- /** @type {?} */
760
- var toMax = this.BusinessDt.getMonth();
761
- /** @type {?} */
762
- var tempEquation = equation[0];
763
- /** @type {?} */
764
- var minMax = parseInt(month.substring(equation.index + equation[0].length));
765
- if (minMax >= 12)
766
- return this.ListOfMonth.ListOfMonth;
767
- if ((tempEquation == "+-" || tempEquation == "-+") && minMax >= 6)
768
- return this.ListOfMonth.ListOfMonth;
769
- /** @type {?} */
770
- var dictOfMonth = this.ListOfMonth.DictOfMonth;
771
- ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
772
- for (var q = 0; q < minMax; q++) {
773
- if (tempEquation.includes("-")) {
774
- toMin--;
775
- if (toMin == 0)
776
- toMin = 12;
777
- ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
778
- }
779
- if (tempEquation.includes("+")) {
780
- toMax++;
781
- if (toMax == 13)
782
- toMax = 1;
783
- ListOfMonth.push({ key: toMax, value: dictOfMonth[toMax] });
784
- }
785
- }
786
- ListOfMonth.sort(( /**
787
- * @param {?} a
788
- * @param {?} b
789
- * @return {?}
790
- */function (a, b) {
791
- return a.key - b.key;
792
- }));
793
- return ListOfMonth;
794
- };
795
- /**
796
- * @param {?} value
797
- * @return {?}
798
- */
799
- UCSearchComponent.prototype.setDefaultValueYear = /**
800
- * @param {?} value
801
- * @return {?}
802
- */
803
- function (value) {
804
- /** @type {?} */
805
- var businessDate = new Date(this.BusinessDt);
806
- /** @type {?} */
807
- var operator = value.charAt(2);
808
- /** @type {?} */
809
- var tempValue = value.split(operator, 2);
810
- /** @type {?} */
811
- var numYear = parseInt(tempValue[1]);
812
- if (!numYear)
813
- numYear = 1;
814
- if (operator == "-") {
815
- businessDate.setFullYear(businessDate.getFullYear() - numYear);
816
- }
817
- else if (operator == "+") {
818
- businessDate.setFullYear(businessDate.getFullYear() + numYear);
819
- }
820
- return businessDate.getFullYear();
821
- };
822
- /**
823
- * @param {?} year
824
- * @return {?}
825
- */
826
- UCSearchComponent.prototype.setYearDDL = /**
827
- * @param {?} year
828
- * @return {?}
829
- */
830
- function (year) {
831
- this.ListOfYear = new Array();
832
- /** @type {?} */
833
- var equation = year.match("[\\/+][-]|[-][\\/+]|\\/+|-");
834
- /** @type {?} */
835
- var toMin = this.BusinessDt.getFullYear();
836
- /** @type {?} */
837
- var toMax = this.BusinessDt.getFullYear();
838
- /** @type {?} */
839
- var minMax = parseInt(year.substring(equation.index + equation[0].length));
840
- this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });
841
- for (var q = 0; q < minMax; q++) {
842
- if (equation[0] == "-+" || equation[0] == "+-") {
843
- toMin--;
844
- toMax++;
845
- this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });
846
- }
847
- else if (equation[0] == "-") {
848
- toMin--;
849
- this.ListOfYear.push({ key: toMin, value: toMin.toString() });
850
- }
851
- else if (equation[0] == "+") {
852
- toMax++;
853
- this.ListOfYear.push({ key: toMax, value: toMax.toString() });
854
- }
855
- }
856
- this.ListOfYear.sort(( /**
857
- * @param {?} a
858
- * @param {?} b
859
- * @return {?}
860
- */function (a, b) {
861
- return a.key - b.key;
862
- }));
863
- return this.ListOfYear;
864
- };
865
- /**
866
- * @param {?} url
867
- * @return {?}
868
- */
869
- UCSearchComponent.prototype.getJSON = /**
870
- * @param {?} url
871
- * @return {?}
872
- */
873
- function (url) {
874
- return this.http.get(url);
875
- };
876
- /**
877
- * @param {?} url
878
- * @param {?=} criteria
879
- * @return {?}
880
- */
881
- UCSearchComponent.prototype.postJSON = /**
882
- * @param {?} url
883
- * @param {?=} criteria
884
- * @return {?}
885
- */
886
- function (url, criteria) {
887
- if (criteria === void 0) {
888
- criteria = null;
889
- }
890
- return this.http.post(url, criteria);
891
- };
892
- /**
893
- * @param {?=} IsExportExcel
894
- * @return {?}
895
- */
896
- UCSearchComponent.prototype.searchClick = /**
897
- * @param {?=} IsExportExcel
898
- * @return {?}
899
- */
900
- function (IsExportExcel) {
901
- if (IsExportExcel === void 0) {
902
- IsExportExcel = false;
903
- }
904
- /** @type {?} */
905
- var filtered = this.configuration.component.filter(( /**
906
- * @param {?} item
907
- * @param {?} i
908
- * @param {?} arr
909
- * @return {?}
910
- */function (item, i, arr) {
911
- if (item.datepickerPair === undefined || item.datepickerPair === '')
912
- return;
913
- return arr.findIndex(( /**
914
- * @param {?} x
915
- * @return {?}
916
- */function (x) { return (x.datepickerPair === item.datepickerPair); })) === i;
917
- }));
918
- for (var i = 0; i < filtered.length; i++) {
919
- if (filtered[i].type == "numeric" || filtered[i].type == "datepicker") {
920
- if (!this.checkValueGteLte(filtered[i]))
921
- return;
922
- }
923
- }
924
- /** @type {?} */
925
- var order = null;
926
- if (this.configuration.orderby != null) {
927
- order = {
928
- key: this.configuration.orderby.key,
929
- value: this.configuration.orderby.value
930
- };
931
- }
932
- this.pageNow = 1;
933
- /** @type {?} */
934
- var rowPerPage = this.pageSize;
935
- if (IsExportExcel)
936
- rowPerPage = 9999;
937
- this.search(this.apiUrl, this.pageNow, rowPerPage, order, true, this.arrCrit, IsExportExcel);
938
- };
939
- /**
940
- * @return {?}
941
- */
942
- UCSearchComponent.prototype.reset = /**
943
- * @return {?}
944
- */
945
- function () {
946
- return __awaiter(this, void 0, void 0, function () {
947
- return __generator(this, function (_a) {
948
- switch (_a.label) {
949
- case 0:
950
- this.searchForm.resetForm({
951
- ExportType: this.ExportTypeList[0].key
952
- });
953
- return [4 /*yield*/, this.initiateForm()];
954
- case 1:
955
- _a.sent();
956
- return [2 /*return*/];
957
- }
958
- });
959
- });
960
- };
961
- /**
962
- * @param {?} apiUrl
963
- * @param {?} pageNo
964
- * @param {?} rowPerPage
965
- * @param {?} orderBy
966
- * @param {?} isClickSearch
967
- * @param {?=} addCrit
968
- * @param {?=} IsExportExcel
969
- * @param {?=} isAddToTemp
970
- * @param {?=} addToTempCrit
971
- * @return {?}
972
- */
973
- UCSearchComponent.prototype.search = /**
974
- * @param {?} apiUrl
975
- * @param {?} pageNo
976
- * @param {?} rowPerPage
977
- * @param {?} orderBy
978
- * @param {?} isClickSearch
979
- * @param {?=} addCrit
980
- * @param {?=} IsExportExcel
981
- * @param {?=} isAddToTemp
982
- * @param {?=} addToTempCrit
983
- * @return {?}
984
- */
985
- function (apiUrl, pageNo, rowPerPage, orderBy, isClickSearch, addCrit, IsExportExcel, isAddToTemp, addToTempCrit) {
986
- var _this = this;
987
- if (addCrit === void 0) {
988
- addCrit = new Array();
989
- }
990
- if (IsExportExcel === void 0) {
991
- IsExportExcel = false;
992
- }
993
- if (isAddToTemp === void 0) {
994
- isAddToTemp = false;
995
- }
996
- if (addToTempCrit === void 0) {
997
- addToTempCrit = new Array();
998
- }
999
- /** @type {?} */
1000
- var request = new RequestCriteriaObj();
1001
- /** @type {?} */
1002
- var arrCrit = new Array();
1003
- /** @type {?} */
1004
- var IsQueryIn = false;
1005
- /** @type {?} */
1006
- var IsBreak = false;
1007
- // Inject whereQuery for where criteria
1008
- if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {
1009
- this.configuration.querystring.whereQuery = new Array();
1010
- for (var x = 0; x < this.searchInput.whereValue.length; x++) {
1011
- this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);
1012
- }
1013
- }
1014
- if (this.searchInput.fromValue != undefined && this.searchInput.fromValue.length != 0) {
1015
- this.configuration.querystring.fromQuery = new Array();
1016
- for (var x = 0; x < this.searchInput.fromValue.length; x++) {
1017
- this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[x].value);
1018
- }
1019
- }
1020
- request.pageNo = pageNo;
1021
- request.rowPerPage = rowPerPage;
1022
- request.orderBy = orderBy;
1023
- request.queryString = this.configuration.querystring;
1024
- /** @type {?} */
1025
- var formSeq = -1;
1026
- for (var i = 0; i < this.countForm; i++) {
1027
- /** @type {?} */
1028
- var critObj = new CriteriaObj();
1029
- if (this.configuration.component[i].type == "dropdownSearch") {
1030
- formSeq += 3;
1031
- }
1032
- else {
1033
- formSeq++;
1034
- }
1035
- /** @type {?} */
1036
- var component = this.myForm.nativeElement[formSeq];
1037
- // // popup message if required
1038
- // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == "true") {
1039
- // let val = component.value.trim();
1040
- // if (val == "") {
1041
- // IsBreak = true;
1042
- // let label = component.getAttribute('label');
1043
- // this.toastr.warning("Please input " + label);
1044
- // break;
1045
- // }
1046
- // }
1047
- critObj.DataType = component.getAttribute('data-type');
1048
- //Ini khusus kalau dari Drop Down
1049
- if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == "true") {
1050
- IsQueryIn = true;
1051
- }
1052
- else {
1053
- IsQueryIn = false;
1054
- }
1055
- if (component.value != "") {
1056
- if (component.nodeName == 'SELECT') {
1057
- /** @type {?} */
1058
- var ddl = component.options;
1059
- /** @type {?} */
1060
- var text = ddl[ddl.selectedIndex].value.trim();
1061
- if (text == "one") {
1062
- IsBreak = true;
1063
- /** @type {?} */
1064
- var label = component.getAttribute('label');
1065
- this.toastr.warning("Please select " + label);
1066
- break;
1067
- }
1068
- if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
1069
- critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
1070
- }
1071
- if (this.configuration.component[i].type == "taskDefinitionKey" ||
1072
- this.configuration.component[i].type == "processKey")
1073
- continue;
1074
- if (this.configuration.component[i].type == "claim") {
1075
- critObj.propName = component.getAttribute('data-name');
1076
- critObj.restriction = text;
1077
- critObj.value = null;
1078
- if (!isAddToTemp) {
1079
- arrCrit.push(critObj);
1080
- }
1081
- }
1082
- else {
1083
- if (text != "all" && text != "one") {
1084
- //Kalau Dari Dropdown udah pasti pake Eq
1085
- critObj.restriction = AdInsConstant.RestrictionEq;
1086
- if (component.name != "") {
1087
- critObj.propName = component.name;
1088
- }
1089
- else {
1090
- critObj.propName = component.getAttribute('data-name');
1091
- }
1092
- critObj.value = text;
1093
- if (!isAddToTemp) {
1094
- arrCrit.push(critObj);
1095
- }
1096
- }
1097
- else if (text == "all" && IsQueryIn == true && component.options.length != 0) {
1098
- /** @type {?} */
1099
- var ddlList = new Array();
1100
- for (var x = 0; x < component.options.length; x++) {
1101
- if (x != 0) {
1102
- ddlList.push(component.options[x].value);
1103
- }
1104
- }
1105
- if (ddlList.length != 0) {
1106
- critObj.restriction = AdInsConstant.RestrictionIn;
1107
- if (component.name != "") {
1108
- critObj.propName = component.name;
1109
- }
1110
- else {
1111
- critObj.propName = component.getAttribute('data-name');
1112
- }
1113
- critObj.listValue = ddlList;
1114
- if (!isAddToTemp) {
1115
- arrCrit.push(critObj);
1116
- }
1117
- }
1118
- }
1119
- }
1120
- }
1121
- else {
1122
- //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like
1123
- if (component.name != "") {
1124
- critObj.propName = component.name;
1125
- }
1126
- else {
1127
- critObj.propName = component.getAttribute('data-name');
1128
- }
1129
- critObj.value = component.value.trim();
1130
- if (component.value.includes("%")) {
1131
- critObj.restriction = AdInsConstant.RestrictionLike;
1132
- }
1133
- //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya
1134
- else if (component.getAttribute('data-restriction') != "" && component.getAttribute('data-restriction') != null) {
1135
- critObj.restriction = component.getAttribute('data-restriction');
1136
- if (component.getAttribute('data-type') == 'numeric') {
1137
- critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();
1138
- }
1139
- if (critObj.restriction.toUpperCase() == "LIKE") {
1140
- critObj.value = "%" + component.value.trim() + "%";
1141
- critObj.restriction = AdInsConstant.RestrictionLike;
1142
- }
1143
- }
1144
- else {
1145
- critObj.restriction = AdInsConstant.RestrictionEq;
1146
- }
1147
- if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
1148
- critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
1149
- }
1150
- if (!isAddToTemp) {
1151
- arrCrit.push(critObj);
1152
- }
1153
- }
1154
- }
1155
- }
1156
- if (IsBreak) {
1157
- return;
1158
- }
1159
- if (addCrit != null && addCrit != undefined) {
1160
- if (addCrit.length != 0) {
1161
- for (var i = 0; i < addCrit.length; i++) {
1162
- arrCrit.push(addCrit[i]);
1163
- }
1164
- }
1165
- else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {
1166
- for (var i = 0; i < this.searchInput.addCritInput.length; i++) {
1167
- arrCrit.push(this.searchInput.addCritInput[i]);
1168
- }
1169
- }
1170
- }
1171
- else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {
1172
- for (var i = 0; i < this.searchInput.addCritInput.length; i++) {
1173
- arrCrit.push(this.searchInput.addCritInput[i]);
1174
- }
1175
- }
1176
- if (isClickSearch) {
1177
- this.persistCrit = arrCrit;
1178
- }
1179
- request.criteria = this.persistCrit;
1180
- if (isAddToTemp) {
1181
- this.persistAddToTempCrit = addToTempCrit;
1182
- }
1183
- if (this.persistAddToTempCrit !== undefined) {
1184
- request.criteria = request.criteria.concat(this.persistAddToTempCrit);
1185
- }
1186
- // filter duplicate data in array
1187
- request.criteria = this.filterDuplicateData(request.criteria);
1188
- // filter empty value in listValue
1189
- request.criteria = this.filterListValueEmpty(request.criteria);
1190
- request.integrationObj = null;
1191
- if (this.searchInput.isJoinExAPI) {
1192
- request.integrationObj = this.searchInput.integrationObj;
1193
- }
1194
- this.http.post(apiUrl, request).subscribe(( /**
1195
- * @param {?} response
1196
- * @return {?}
1197
- */function (response) {
1198
- if (IsExportExcel) {
1199
- _this.ExcelData = response["Data"];
1200
- /** @type {?} */
1201
- var title = _this.configuration.title != null && _this.configuration.title != "" ? _this.configuration.title : "untitled";
1202
- _this.excelService.exportAsExcelFile(_this.ExcelData, title);
1203
- return;
1204
- }
1205
- /** @type {?} */
1206
- var qryPaging = {
1207
- response: response,
1208
- pageNow: pageNo
1209
- };
1210
- console.log(qryPaging);
1211
- _this.result.emit(qryPaging);
1212
- _this.reqGetAllData.emit(request);
1213
- return response;
1214
- }));
1215
- };
1216
- /**
1217
- * @private
1218
- * @param {?} data
1219
- * @return {?}
1220
- */
1221
- UCSearchComponent.prototype.filterDuplicateData = /**
1222
- * @private
1223
- * @param {?} data
1224
- * @return {?}
1225
- */
1226
- function (data) {
1227
- return data.filter(( /**
1228
- * @param {?} value
1229
- * @param {?} index
1230
- * @return {?}
1231
- */function (value, index) {
1232
- /** @type {?} */
1233
- var _value = JSON.stringify(value);
1234
- return index === data.findIndex(( /**
1235
- * @param {?} obj
1236
- * @return {?}
1237
- */function (obj) {
1238
- return JSON.stringify(obj) === _value;
1239
- }));
1240
- }));
1241
- };
1242
- /**
1243
- * @private
1244
- * @param {?} data
1245
- * @return {?}
1246
- */
1247
- UCSearchComponent.prototype.filterListValueEmpty = /**
1248
- * @private
1249
- * @param {?} data
1250
- * @return {?}
1251
- */
1252
- function (data) {
1253
- return data.filter(( /**
1254
- * @param {?} value
1255
- * @return {?}
1256
- */function (value) {
1257
- if (value.listValue === undefined)
1258
- return value;
1259
- if (value.listValue.length === 0)
1260
- return;
1261
- return value;
1262
- }));
1263
- };
1264
- /**
1265
- * @return {?}
1266
- */
1267
- UCSearchComponent.prototype.GenerateReport = /**
1268
- * @return {?}
1269
- */
1270
- function () {
1271
- this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });
1272
- };
1273
- /**
1274
- * @return {?}
1275
- */
1276
- UCSearchComponent.prototype.lessThanFour = /**
1277
- * @return {?}
1278
- */
1279
- function () {
1280
- if (this.countForm > 3) {
1281
- return false;
1282
- }
1283
- else {
1284
- return true;
1285
- }
1286
- };
1287
- /**
1288
- * @param {?} obj
1289
- * @param {?} url
1290
- * @param {?=} crit
1291
- * @return {?}
1292
- */
1293
- UCSearchComponent.prototype.resolveObject = /**
1294
- * @param {?} obj
1295
- * @param {?} url
1296
- * @param {?=} crit
1297
- * @return {?}
1298
- */
1299
- function (obj, url, crit) {
1300
- var _this = this;
1301
- if (crit === void 0) {
1302
- crit = null;
1303
- }
1304
- /** @type {?} */
1305
- var val = this.postJSON(url, crit);
1306
- val.subscribe(( /**
1307
- * @param {?} tempData
1308
- * @return {?}
1309
- */function (tempData) {
1310
- obj.itemsUrl = new Array();
1311
- obj.itemsUrl = tempData.ReturnObject;
1312
- if (obj.exclude != undefined && obj.exclude != "") {
1313
- obj.itemsUrl = obj.itemsUrl.filter(( /**
1314
- * @param {?} value
1315
- * @return {?}
1316
- */function (value) { return !obj.exclude.includes(value.Key); }));
1317
- }
1318
- if (obj.type == "dropdownSearch" && obj.itemsUrl.length == 1) {
1319
- obj.value = obj.itemsUrl[0].Key;
1320
- obj.descr = obj.itemsUrl[0].Value;
1321
- }
1322
- if (obj.affectedFilter && obj.itemsUrl.length == 1) {
1323
- _this.onChangeEvent(obj.itemsUrl[0].Key, obj);
1324
- }
1325
- }));
1326
- };
1327
- /**
1328
- * @param {?} component
1329
- * @return {?}
1330
- */
1331
- UCSearchComponent.prototype.checkValueGteLte = /**
1332
- * @param {?} component
1333
- * @return {?}
1334
- */
1335
- function (component) {
1336
- //cek yg pakai restriction gte/lte/gt/lt
1337
- /** @type {?} */
1338
- var MinComponent = this.configuration.component.find(( /**
1339
- * @param {?} x
1340
- * @return {?}
1341
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "GTE"); })) == undefined ? this.configuration.component.find(( /**
1342
- * @param {?} x
1343
- * @return {?}
1344
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "GT"); })) : this.configuration.component.find(( /**
1345
- * @param {?} x
1346
- * @return {?}
1347
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "GTE"); }));
1348
- /** @type {?} */
1349
- var MaxComponent = this.configuration.component.find(( /**
1350
- * @param {?} x
1351
- * @return {?}
1352
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "LTE"); })) == undefined ? this.configuration.component.find(( /**
1353
- * @param {?} x
1354
- * @return {?}
1355
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "LT"); })) : this.configuration.component.find(( /**
1356
- * @param {?} x
1357
- * @return {?}
1358
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "LTE"); }));
1359
- if (this.myForm.nativeElement[MinComponent.id].value > this.myForm.nativeElement[MaxComponent.id].value) {
1360
- this.toastr.warning(MinComponent.label + " must be less than " + MaxComponent.label);
1361
- return false;
1362
- }
1363
- return true;
1364
- };
1365
- /**
1366
- * @param {?} element
1367
- * @return {?}
1368
- */
1369
- UCSearchComponent.prototype.transformAmount = /**
1370
- * @param {?} element
1371
- * @return {?}
1372
- */
1373
- function (element) {
1374
- this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');
1375
- // to show the formatted amount in the textbox.
1376
- element.target.value = this.formattedAmount;
1377
- };
1378
- /**
1379
- * @param {?} element
1380
- * @return {?}
1381
- */
1382
- UCSearchComponent.prototype.transformToDecimal = /**
1383
- * @param {?} element
1384
- * @return {?}
1385
- */
1386
- function (element) {
1387
- element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
1388
- };
1389
- /**
1390
- * @return {?}
1391
- */
1392
- UCSearchComponent.prototype.exportAsXLSX = /**
1393
- * @return {?}
1394
- */
1395
- function () {
1396
- this.searchClick(true);
1397
- // let request = new RequestCriteriaObj();
1398
- // request.pageNo = 1;
1399
- // request.rowPerPage = 9999;
1400
- // request.orderBy = null;
1401
- // request.criteria = [];
1402
- // request.queryString = this.configuration.querystring;
1403
- // if (!this.searchInput.isJoinExAPI) {
1404
- // request.integrationObj = null;
1405
- // } else {
1406
- // request.integrationObj = this.searchInput.integrationObj;
1407
- // }
1408
- // this.http.post(this.apiUrl, request).subscribe(
1409
- // response => {
1410
- // this.ExcelData = response["Data"];
1411
- // this.excelService.exportAsExcelFile(this.ExcelData, 'sample');
1412
- // },
1413
- // (error) => {
1414
- // console.log(error);
1415
- // });
1416
- };
1417
- /**
1418
- * @param {?} optValue
1419
- * @param {?} afFilter
1420
- * @return {?}
1421
- */
1422
- UCSearchComponent.prototype.onChangeEvent = /**
1423
- * @param {?} optValue
1424
- * @param {?} afFilter
1425
- * @return {?}
1426
- */
1427
- function (optValue, afFilter) {
1428
- /** @type {?} */
1429
- var jsonComp = this.configuration.component;
1430
- for (var i = 0; i < afFilter.affectedFilter.length; i++) {
1431
- for (var j = 0; j < jsonComp.length; j++) {
1432
- if (jsonComp[j].name == afFilter.affectedFilter[i]) {
1433
- /** @type {?} */
1434
- var request = new RequestCriteriaObj();
1435
- /** @type {?} */
1436
- var arrayCrit = new Array();
1437
- if (optValue != "all" && optValue != "one") {
1438
- /** @type {?} */
1439
- var critObj = new CriteriaObj();
1440
- critObj.DataType = afFilter.datatype;
1441
- if (afFilter.filterPropName != undefined || afFilter.filterPropName != "") {
1442
- request[afFilter.filterPropName] = optValue;
1443
- critObj.propName = afFilter.filterPropName;
1444
- }
1445
- else {
1446
- critObj.propName = afFilter.name;
1447
- request[afFilter.name] = optValue;
1448
- }
1449
- critObj.value = optValue;
1450
- critObj.restriction = AdInsConstant.RestrictionEq;
1451
- arrayCrit.push(critObj);
1452
- }
1453
- request.criteria = arrayCrit;
1454
- if (jsonComp[j].path != undefined && jsonComp[j].path != "") {
1455
- if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {
1456
- for (var y = 0; y < this.searchInput.listEnvironments.length; y++) {
1457
- if (jsonComp[j].environment == this.searchInput.listEnvironments[y].environment) {
1458
- jsonComp[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp[j].path;
1459
- break;
1460
- }
1461
- }
1462
- }
1463
- else {
1464
- jsonComp[j].fullpath = jsonComp[j].url;
1465
- }
1466
- }
1467
- else {
1468
- jsonComp[j].fullpath = jsonComp[j].url;
1469
- }
1470
- this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);
1471
- }
1472
- }
1473
- }
1474
- };
1475
- /**
1476
- * @param {?} idx
1477
- * @param {?} wfKeyFilter
1478
- * @return {?}
1479
- */
1480
- UCSearchComponent.prototype.SetProcessKey = /**
1481
- * @param {?} idx
1482
- * @param {?} wfKeyFilter
1483
- * @return {?}
1484
- */
1485
- function (idx, wfKeyFilter) {
1486
- /** @type {?} */
1487
- var component = this.myForm.nativeElement[idx];
1488
- /** @type {?} */
1489
- var ddl = component.options;
1490
- /** @type {?} */
1491
- var text = ddl[ddl.selectedIndex].value.trim();
1492
- /** @type {?} */
1493
- var listValue = text.split(';');
1494
- /** @type {?} */
1495
- var listWfKey = wfKeyFilter.split(';');
1496
- for (var i = 0; i < listValue.length; i++) {
1497
- this.searchInput.integrationObj.requestObj[listWfKey[i]] = listValue[i];
1498
- }
1499
- };
1500
- /**
1501
- * @param {?} condList
1502
- * @return {?}
1503
- */
1504
- UCSearchComponent.prototype.switchCase = /**
1505
- * @param {?} condList
1506
- * @return {?}
1507
- */
1508
- function (condList) {
1509
- /** @type {?} */
1510
- var condition = false;
1511
- var _loop_1 = function (i) {
1512
- /** @type {?} */
1513
- var idx = this_1.searchInput.switchValue.findIndex(( /**
1514
- * @param {?} x
1515
- * @return {?}
1516
- */function (x) { return x.property == condList.conditions[i].property; }));
1517
- if (condList.conditions[i].restriction == "EQ") {
1518
- if (condList.conditions[i].isUser != true) {
1519
- if (this_1.searchInput.switchValue[idx].value == condList.conditions[i].value) {
1520
- condition = true;
1521
- }
1522
- else {
1523
- condition = false;
1524
- return "break";
1525
- }
1526
- }
1527
- else {
1528
- /** @type {?} */
1529
- var username = localStorage.getItem("Username");
1530
- if (this_1.searchInput.switchValue[idx].value == username) {
1531
- condition = true;
1532
- }
1533
- else {
1534
- condition = false;
1535
- return "break";
1536
- }
1537
- }
1538
- }
1539
- else if (condList.conditions[i].restriction == "NEQ") {
1540
- if (condList.conditions[i].isUser != true) {
1541
- if (this_1.searchInput.switchValue[idx].value != condList.conditions[i].value) {
1542
- condition = true;
1543
- }
1544
- else {
1545
- condition = false;
1546
- return "break";
1547
- }
1548
- }
1549
- else {
1550
- /** @type {?} */
1551
- var username = localStorage.getItem("Username");
1552
- if (this_1.searchInput.switchValue[idx].value != username) {
1553
- condition = true;
1554
- }
1555
- else {
1556
- condition = false;
1557
- return "break";
1558
- }
1559
- }
1560
- }
1561
- else if (condList.conditions[i].restriction == "GT") {
1562
- if (condList.conditions[i].isUser != true) {
1563
- if (this_1.searchInput.switchValue[idx].value > condList.conditions[i].value) {
1564
- condition = true;
1565
- }
1566
- else {
1567
- condition = false;
1568
- return "break";
1569
- }
1570
- }
1571
- else {
1572
- /** @type {?} */
1573
- var username = localStorage.getItem("Username");
1574
- if (this_1.searchInput.switchValue[idx].value > username) {
1575
- condition = true;
1576
- }
1577
- else {
1578
- condition = false;
1579
- return "break";
1580
- }
1581
- }
1582
- }
1583
- else if (condList.conditions[i].restriction == "GTE") {
1584
- if (condList.conditions[i].isUser != true) {
1585
- if (this_1.searchInput.switchValue[idx].value >= condList.conditions[i].value) {
1586
- condition = true;
1587
- }
1588
- else {
1589
- condition = false;
1590
- return "break";
1591
- }
1592
- }
1593
- else {
1594
- /** @type {?} */
1595
- var username = localStorage.getItem("Username");
1596
- if (this_1.searchInput.switchValue[idx].value >= username) {
1597
- condition = true;
1598
- }
1599
- else {
1600
- condition = false;
1601
- return "break";
1602
- }
1603
- }
1604
- }
1605
- else if (condList.conditions[i].restriction == "LT") {
1606
- if (condList.conditions[i].isUser != true) {
1607
- if (this_1.searchInput.switchValue[idx].value < condList.conditions[i].value) {
1608
- condition = true;
1609
- }
1610
- else {
1611
- condition = false;
1612
- return "break";
1613
- }
1614
- }
1615
- else {
1616
- /** @type {?} */
1617
- var username = localStorage.getItem("Username");
1618
- if (this_1.searchInput.switchValue[idx].value < username) {
1619
- condition = true;
1620
- }
1621
- else {
1622
- condition = false;
1623
- return "break";
1624
- }
1625
- }
1626
- }
1627
- else if (condList.conditions[i].restriction == "LTE") {
1628
- if (condList.conditions[i].isUser != true) {
1629
- if (this_1.searchInput.switchValue[idx].value <= condList.conditions[i].value) {
1630
- condition = true;
1631
- }
1632
- else {
1633
- condition = false;
1634
- return "break";
1635
- }
1636
- }
1637
- else {
1638
- /** @type {?} */
1639
- var username = localStorage.getItem("Username");
1640
- if (this_1.searchInput.switchValue[idx].value <= username) {
1641
- condition = true;
1642
- }
1643
- else {
1644
- condition = false;
1645
- return "break";
1646
- }
1647
- }
1648
- }
1649
- };
1650
- var this_1 = this;
1651
- for (var i = 0; i < condList.conditions.length; i++) {
1652
- var state_1 = _loop_1(i);
1653
- if (state_1 === "break")
1654
- break;
1655
- }
1656
- return condition;
1657
- };
1658
- /**
1659
- * @private
1660
- * @param {?} chipperText
1661
- * @param {?} chipperKey
1662
- * @return {?}
1663
- */
1664
- UCSearchComponent.prototype.DecryptString = /**
1665
- * @private
1666
- * @param {?} chipperText
1667
- * @param {?} chipperKey
1668
- * @return {?}
1669
- */
1670
- function (chipperText, chipperKey) {
1671
- if (chipperKey == undefined || chipperKey.trim() == '' ||
1672
- chipperText == undefined || chipperText.trim() == '')
1673
- return chipperText;
1674
- /** @type {?} */
1675
- var chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);
1676
- /** @type {?} */
1677
- var iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);
1678
- /** @type {?} */
1679
- var decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });
1680
- /** @type {?} */
1681
- var plainText = decrypted.toString(CryptoJS.enc.Utf8);
1682
- return plainText;
1683
- };
1684
- /**
1685
- * @param {?} component
1686
- * @return {?}
1687
- */
1688
- UCSearchComponent.prototype.checkInputDate = /**
1689
- * @param {?} component
1690
- * @return {?}
1691
- */
1692
- function (component) {
1693
- /** @type {?} */
1694
- var minDateVal;
1695
- /** @type {?} */
1696
- var maxDateVal;
1697
- /** @type {?} */
1698
- var label;
1699
- /** @type {?} */
1700
- var errorMessage = new Array();
1701
- /** @type {?} */
1702
- var MinComponent = this.configuration.component.find(( /**
1703
- * @param {?} x
1704
- * @return {?}
1705
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "GTE"); })) == undefined ? this.configuration.component.find(( /**
1706
- * @param {?} x
1707
- * @return {?}
1708
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "GT"); })) : this.configuration.component.find(( /**
1709
- * @param {?} x
1710
- * @return {?}
1711
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "GTE"); }));
1712
- if (MinComponent != undefined) {
1713
- minDateVal = this.myForm.nativeElement[MinComponent.id].min == "" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);
1714
- label = MinComponent.label.split(">", 2);
1715
- if (minDateVal != null) {
1716
- if (MinComponent.restriction.toUpperCase() == "GT") {
1717
- minDateVal.setDate(minDateVal.getDate() - 1);
1718
- errorMessage.push(" must be greater than ");
1719
- }
1720
- else if (MinComponent.restriction.toUpperCase() == "GTE") {
1721
- errorMessage.push(" must be greater than or equals to ");
1722
- }
1723
- }
1724
- }
1725
- /** @type {?} */
1726
- var MaxComponent = this.configuration.component.find(( /**
1727
- * @param {?} x
1728
- * @return {?}
1729
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "LTE"); })) == undefined ? this.configuration.component.find(( /**
1730
- * @param {?} x
1731
- * @return {?}
1732
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "LT"); })) : this.configuration.component.find(( /**
1733
- * @param {?} x
1734
- * @return {?}
1735
- */function (x) { return x.name == component.name && (x.restriction.toUpperCase() == "LTE"); }));
1736
- if (MaxComponent != undefined) {
1737
- maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == "" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);
1738
- label = MaxComponent.label.split("<", 2);
1739
- if (maxDateVal != null) {
1740
- if (MaxComponent.restriction.toUpperCase() == "LT") {
1741
- maxDateVal.setDate(maxDateVal.getDate() + 1);
1742
- errorMessage.push(" must be less than ");
1743
- }
1744
- else if (MaxComponent.restriction.toUpperCase() == "LTE") {
1745
- errorMessage.push(" must be less than or equals to ");
1746
- }
1747
- }
1748
- }
1749
- if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {
1750
- this.toastr.warning(label[0] + errorMessage[0] + common.formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1751
- this.dateWrong = true;
1752
- }
1753
- else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {
1754
- this.toastr.warning(label[0] + errorMessage[0] + common.formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1755
- this.dateWrong = true;
1756
- }
1757
- else if (minDateVal != null && maxDateVal != null) {
1758
- if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {
1759
- this.toastr.warning(label[0] + errorMessage[0] + common.formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + " and" + errorMessage[1] + common.formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + ".");
1760
- this.dateWrong = true;
1761
- }
1762
- else {
1763
- this.dateWrong = false;
1764
- }
1765
- }
1766
- else {
1767
- this.dateWrong = false;
1768
- }
1769
- };
1770
- /**
1771
- * @param {?} item
1772
- * @param {?} crit
1773
- * @return {?}
1774
- */
1775
- UCSearchComponent.prototype.selectedOption = /**
1776
- * @param {?} item
1777
- * @param {?} crit
1778
- * @return {?}
1779
- */
1780
- function (item, crit) {
1781
- crit.descr = item.Value;
1782
- crit.isListHide = true;
1783
- };
1784
- UCSearchComponent.decorators = [
1785
- { type: i0.Component, args: [{
1786
- selector: 'lib-UCSearch',
1787
- 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 -->",
1788
- providers: [ExcelService, common.DatePipe],
1789
- animations: [
1790
- animations.trigger('changeDivSize', [
1791
- animations.state('initial', animations.style({
1792
- height: '*',
1793
- opacity: '1',
1794
- })),
1795
- animations.state('final', animations.style({
1796
- height: '0px',
1797
- opacity: '0',
1798
- overflow: 'hidden',
1799
- })),
1800
- animations.transition('initial=>final', animations.animate('300ms')),
1801
- animations.transition('final=>initial', animations.animate('300ms'))
1802
- ]),
1803
- ],
1804
- 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;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:absolute;width:100%;z-index:9}"]
1805
- }] }
1806
- ];
1807
- /** @nocollapse */
1808
- UCSearchComponent.ctorParameters = function () {
1809
- return [
1810
- { type: http.HttpClient },
1811
- { type: ExcelService },
1812
- { type: i0.Renderer2 },
1813
- { type: undefined, decorators: [{ type: i0.Inject, args: [platformBrowser.DOCUMENT,] }] },
1814
- { type: ngxToastr.ToastrService },
1815
- { type: ngxCookie.CookieService },
1816
- { type: common.DatePipe },
1817
- { type: i0.ElementRef },
1818
- { type: router.ActivatedRoute }
1819
- ];
1820
- };
1821
- UCSearchComponent.propDecorators = {
1822
- content: [{ type: i0.ViewChild, args: ['enjiForm',] }],
1823
- myForm: [{ type: i0.ViewChild, args: ['formIdSearch',] }],
1824
- searchInput: [{ type: i0.Input }],
1825
- pageSize: [{ type: i0.Input }],
1826
- isReport: [{ type: i0.Input }],
1827
- result: [{ type: i0.Output }],
1828
- genRpt: [{ type: i0.Output }],
1829
- reqGetAllData: [{ type: i0.Output }]
1830
- };
1831
- return UCSearchComponent;
1832
- }());
1833
-
1834
- /**
1835
- * @fileoverview added by tsickle
1836
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1837
- */
1838
- var TextSearchPipe = /** @class */ (function () {
1839
- function TextSearchPipe() {
1840
- }
1841
- /**
1842
- * @param {?} items
1843
- * @param {?=} text
1844
- * @return {?}
1845
- */
1846
- TextSearchPipe.prototype.transform = /**
1847
- * @param {?} items
1848
- * @param {?=} text
1849
- * @return {?}
1850
- */
1851
- function (items, text) {
1852
- if (!text) {
1853
- return items;
1854
- }
1855
- return items.filter(( /**
1856
- * @param {?} item
1857
- * @return {?}
1858
- */function (item) {
1859
- if (item.Value && typeof item.Value === 'string') {
1860
- return item.Value.toLowerCase().indexOf(text.toLowerCase()) > -1;
1861
- }
1862
- return false;
1863
- }));
1864
- };
1865
- TextSearchPipe.decorators = [
1866
- { type: i0.Pipe, args: [{
1867
- name: 'textSearch'
1868
- },] }
1869
- ];
1870
- return TextSearchPipe;
1871
- }());
1872
-
1873
- /**
1874
- * @fileoverview added by tsickle
1875
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1876
- */
1877
- /** @type {?} */
1878
- var customCurrencyMaskConfig = {
1879
- align: "right",
1880
- allowNegative: false,
1881
- allowZero: true,
1882
- decimal: ".",
1883
- precision: 2,
1884
- prefix: "",
1885
- suffix: "",
1886
- thousands: ",",
1887
- nullable: false,
1888
- inputMode: ngxCurrency.CurrencyMaskInputMode.NATURAL
1889
- };
1890
- var UCSearchModule = /** @class */ (function () {
1891
- function UCSearchModule() {
1892
- }
1893
- UCSearchModule.decorators = [
1894
- { type: i0.NgModule, args: [{
1895
- declarations: [UCSearchComponent, TextSearchPipe],
1896
- imports: [
1897
- common.CommonModule,
1898
- forms.FormsModule,
1899
- ucShowErrors.UcShowErrorsModule,
1900
- ucDirectiveUpperCase.UcDirectiveUpperCaseModule,
1901
- ngxCurrency.NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
1902
- core.TranslateModule.forChild()
1903
- ],
1904
- exports: [UCSearchComponent]
1905
- },] }
1906
- ];
1907
- return UCSearchModule;
1908
- }());
1909
-
1910
- /**
1911
- * @fileoverview added by tsickle
1912
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1913
- */
1914
-
1915
- /**
1916
- * @fileoverview added by tsickle
1917
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1918
- */
1919
-
1920
- exports.UCSearchService = UCSearchService;
1921
- exports.UCSearchComponent = UCSearchComponent;
1922
- exports.customCurrencyMaskConfig = customCurrencyMaskConfig;
1923
- exports.UCSearchModule = UCSearchModule;
1924
- exports.ɵb = TextSearchPipe;
1925
- exports.ɵa = ExcelService;
1926
-
1927
- Object.defineProperty(exports, '__esModule', { value: true });
1928
-
1929
- })));
1930
-
1931
- //# sourceMappingURL=adins-ucsearch.umd.js.map