@adins/ucsearch 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,48 @@
1
- # UCSearch
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project UCSearch` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project UCSearch`.
8
- > Note: Don't forget to add `--project UCSearch` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build UCSearch` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build UCSearch`, go to the dist folder `cd dist/ucsearch` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test UCSearch` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
1
+ # UCSearch
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
4
+
5
+ ## Version
6
+
7
+ Version 1.0.1
8
+ 1. Added ReadMe
9
+
10
+ Version 1.0.2
11
+ 1. Fix InputObj, filter with function
12
+
13
+ ## Input
14
+
15
+ 1. _url : string : mandatory
16
+ url link to the json file for the question
17
+ 2. apiQryPaging : string : mandatory
18
+ API path for query paging method
19
+ 3. environmentUrl : string : mandatory
20
+ base url used for apiQryPaging
21
+ 4. addCritInput : CriteriaObj[] : optional
22
+ additional criteria for query paging
23
+
24
+ ## Output
25
+
26
+ 1. result : EventEmitter<>
27
+ Emitting event after search button clicked
28
+
29
+ ## Code scaffolding
30
+
31
+ Run `ng generate component component-name --project UCSearch` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project UCSearch`.
32
+ > Note: Don't forget to add `--project UCSearch` or else it will be added to the default project in your `angular.json` file.
33
+
34
+ ## Build
35
+
36
+ Run `ng build UCSearch` to build the project. The build artifacts will be stored in the `dist/` directory.
37
+
38
+ ## Publishing
39
+
40
+ After building your library with `ng build UCSearch`, go to the dist folder `cd dist/ucsearch` and run `npm publish`.
41
+
42
+ ## Running unit tests
43
+
44
+ Run `ng test UCSearch` to execute the unit tests via [Karma](https://karma-runner.github.io).
45
+
46
+ ## Further help
47
+
48
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('rxjs/add/operator/map'), require('@angular/platform-browser'), require('@angular/core'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('ucsearch', ['exports', '@angular/common/http', 'rxjs/add/operator/map', '@angular/platform-browser', '@angular/core', '@angular/common'], factory) :
4
- (factory((global.ucsearch = {}),global.ng.common.http,global.rxjs['add/operator/map'],global.ng.platformBrowser,global.ng.core,global.ng.common));
5
- }(this, (function (exports,http,map,platformBrowser,i0,common) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('rxjs/add/operator/map'), require('@angular/platform-browser'), require('file-saver'), require('xlsx'), require('@angular/core'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('ucsearch', ['exports', '@angular/common/http', 'rxjs/add/operator/map', '@angular/platform-browser', 'file-saver', 'xlsx', '@angular/core', '@angular/common'], factory) :
4
+ (factory((global.ucsearch = {}),global.ng.common.http,global.rxjs['add/operator/map'],global.ng.platformBrowser,global.FileSaver,global.XLSX,global.ng.core,global.ng.common));
5
+ }(this, (function (exports,http,map,platformBrowser,FileSaver,XLSX,i0,common) { 'use strict';
6
6
 
7
7
  /**
8
8
  * @fileoverview added by tsickle
@@ -275,20 +275,78 @@
275
275
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
276
276
  */
277
277
 
278
+ /**
279
+ * @fileoverview added by tsickle
280
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
281
+ */
282
+ /** @type {?} */
283
+ var EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
284
+ /** @type {?} */
285
+ var EXCEL_EXTENSION = '.xlsx';
286
+ var ExcelService = /** @class */ (function () {
287
+ function ExcelService() {
288
+ }
289
+ /**
290
+ * @param {?} json
291
+ * @param {?} excelFileName
292
+ * @return {?}
293
+ */
294
+ ExcelService.prototype.exportAsExcelFile = /**
295
+ * @param {?} json
296
+ * @param {?} excelFileName
297
+ * @return {?}
298
+ */
299
+ function (json, excelFileName) {
300
+ /** @type {?} */
301
+ var worksheet = XLSX.utils.json_to_sheet(json);
302
+ console.log('worksheet', worksheet);
303
+ /** @type {?} */
304
+ var workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
305
+ /** @type {?} */
306
+ var excelBuffer = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
307
+ //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });
308
+ this.saveAsExcelFile(excelBuffer, excelFileName);
309
+ };
310
+ /**
311
+ * @private
312
+ * @param {?} buffer
313
+ * @param {?} fileName
314
+ * @return {?}
315
+ */
316
+ ExcelService.prototype.saveAsExcelFile = /**
317
+ * @private
318
+ * @param {?} buffer
319
+ * @param {?} fileName
320
+ * @return {?}
321
+ */
322
+ function (buffer, fileName) {
323
+ /** @type {?} */
324
+ var data = new Blob([buffer], {
325
+ type: EXCEL_TYPE
326
+ });
327
+ FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);
328
+ };
329
+ ExcelService.decorators = [
330
+ { type: i0.Injectable }
331
+ ];
332
+ /** @nocollapse */
333
+ ExcelService.ctorParameters = function () { return []; };
334
+ return ExcelService;
335
+ }());
336
+
278
337
  /**
279
338
  * @fileoverview added by tsickle
280
339
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
281
340
  */
282
341
  var UCSearchComponent = /** @class */ (function () {
283
- function UCSearchComponent(http$$1, decimalPipe, _renderer2, _document) {
342
+ function UCSearchComponent(http$$1, excelService, _renderer2, _document) {
284
343
  this.http = http$$1;
285
- this.decimalPipe = decimalPipe;
344
+ this.excelService = excelService;
286
345
  this._renderer2 = _renderer2;
287
346
  this._document = _document;
347
+ this.result = new i0.EventEmitter();
288
348
  this.pageSize = 10;
289
349
  this.pageNow = 1;
290
- this.addCritInput = null;
291
- this.result = new i0.EventEmitter();
292
350
  this.isDataLoaded = false;
293
351
  this.isHidden = false;
294
352
  this.payLoad = '';
@@ -304,7 +362,7 @@
304
362
  */
305
363
  function () {
306
364
  var _this_1 = this;
307
- this.getJSON(this._url).subscribe(( /**
365
+ this.getJSON(this.searchInput._url).subscribe(( /**
308
366
  * @param {?} data
309
367
  * @return {?}
310
368
  */function (data) {
@@ -316,13 +374,16 @@
316
374
  console.log(_this_1.countForm);
317
375
  _this_1.isDataLoaded = true;
318
376
  /** @type {?} */
319
- var i = 0;
377
+ var request = new RequestCriteriaObj();
378
+ /** @type {?} */
379
+ var arrayCrit = new Array();
380
+ request.criteria = arrayCrit;
320
381
  for (var i = 0; i < _this_1.countForm; i++) {
321
382
  //ini kalau datanya di load dari URL
322
383
  if (data.component[i].isFromURL == true) {
323
384
  //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya
324
385
  //biar tiap function ada state2nya sendiri
325
- _this_1.resolveObject(data.component[i], data.component[i].url);
386
+ _this_1.resolveObject(data.component[i], data.component[i].url, request);
326
387
  }
327
388
  if (data.component[i].type === "numeric") {
328
389
  data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');
@@ -365,8 +426,8 @@
365
426
  * @return {?}
366
427
  */
367
428
  function () {
368
- this.apiUrl = this.enviromentUrl + this.apiQryPaging;
369
- this.arrCrit = this.arrCritObj;
429
+ this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;
430
+ this.arrCrit = this.searchInput.arrCritObj;
370
431
  /** @type {?} */
371
432
  var js = this._renderer2.createElement('script');
372
433
  js.text = "\n $(document).ready(function(){\n $(\"#flip\").click(function(){\n $(\"#panel\").slideToggle(\"slow\");\n });\n });\n ";
@@ -386,14 +447,19 @@
386
447
  };
387
448
  /**
388
449
  * @param {?} url
450
+ * @param {?=} criteria
389
451
  * @return {?}
390
452
  */
391
453
  UCSearchComponent.prototype.postJSON = /**
392
454
  * @param {?} url
455
+ * @param {?=} criteria
393
456
  * @return {?}
394
457
  */
395
- function (url) {
396
- return this.http.post(url, null);
458
+ function (url, criteria) {
459
+ if (criteria === void 0) {
460
+ criteria = null;
461
+ }
462
+ return this.http.post(url, criteria);
397
463
  };
398
464
  /**
399
465
  * @return {?}
@@ -430,6 +496,14 @@
430
496
  this.pageNow = 1;
431
497
  this.search(this.apiUrl, this.pageNow, this.pageSize, null, this.arrCrit);
432
498
  };
499
+ /**
500
+ * @return {?}
501
+ */
502
+ UCSearchComponent.prototype.reset = /**
503
+ * @return {?}
504
+ */
505
+ function () {
506
+ };
433
507
  /**
434
508
  * @param {?} apiUrl
435
509
  * @param {?} pageNo
@@ -508,9 +582,9 @@
508
582
  arrCrit.push(addCrit[i]);
509
583
  }
510
584
  }
511
- else if (this.addCritInput !== null) {
512
- for (var i = 0; i < this.addCritInput.length; i++) {
513
- arrCrit.push(this.addCritInput[i]);
585
+ else if (this.searchInput.addCritInput !== null) {
586
+ for (var i = 0; i < this.searchInput.addCritInput.length; i++) {
587
+ arrCrit.push(this.searchInput.addCritInput[i]);
514
588
  }
515
589
  }
516
590
  request.criteria = arrCrit;
@@ -545,16 +619,21 @@
545
619
  /**
546
620
  * @param {?} obj
547
621
  * @param {?} url
622
+ * @param {?=} crit
548
623
  * @return {?}
549
624
  */
550
625
  UCSearchComponent.prototype.resolveObject = /**
551
626
  * @param {?} obj
552
627
  * @param {?} url
628
+ * @param {?=} crit
553
629
  * @return {?}
554
630
  */
555
- function (obj, url) {
631
+ function (obj, url, crit) {
632
+ if (crit === void 0) {
633
+ crit = null;
634
+ }
556
635
  /** @type {?} */
557
- var val = this.postJSON(this.enviromentUrl + url);
636
+ var val = this.postJSON(this.searchInput.enviromentUrl + url, crit);
558
637
  val.subscribe(( /**
559
638
  * @param {?} tempData
560
639
  * @return {?}
@@ -587,30 +666,90 @@
587
666
  function (element) {
588
667
  element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
589
668
  };
669
+ /**
670
+ * @return {?}
671
+ */
672
+ UCSearchComponent.prototype.exportAsXLSX = /**
673
+ * @return {?}
674
+ */
675
+ function () {
676
+ var _this_1 = this;
677
+ /** @type {?} */
678
+ var request = new RequestCriteriaObj();
679
+ request.pageNo = 1;
680
+ request.rowPerPage = 9999;
681
+ request.orderBy = null;
682
+ request.criteria = [];
683
+ this.http.post(this.apiUrl, request).subscribe(( /**
684
+ * @param {?} response
685
+ * @return {?}
686
+ */function (response) {
687
+ console.log("Success");
688
+ _this_1.ExcelData = response["returnObject"]["data"];
689
+ _this_1.excelService.exportAsExcelFile(_this_1.ExcelData, 'sample');
690
+ console.log(response);
691
+ }), ( /**
692
+ * @param {?} error
693
+ * @return {?}
694
+ */function (error) {
695
+ console.log("Error");
696
+ console.log(error);
697
+ }));
698
+ };
699
+ /**
700
+ * @param {?} optValue
701
+ * @param {?} afFilter
702
+ * @return {?}
703
+ */
704
+ UCSearchComponent.prototype.onChangeEvent = /**
705
+ * @param {?} optValue
706
+ * @param {?} afFilter
707
+ * @return {?}
708
+ */
709
+ function (optValue, afFilter) {
710
+ /** @type {?} */
711
+ var jsonComp = this.configuration.component;
712
+ for (var i = 0; i < afFilter.affectedFilter.length; i++) {
713
+ for (var j = 0; j < jsonComp.length; j++) {
714
+ if (jsonComp[j].name == afFilter.affectedFilter[i]) {
715
+ /** @type {?} */
716
+ var request = new RequestCriteriaObj();
717
+ /** @type {?} */
718
+ var arrayCrit = new Array();
719
+ if (optValue != "All") {
720
+ /** @type {?} */
721
+ var critObj = new CriteriaObj();
722
+ critObj.DataType = afFilter.datatype;
723
+ critObj.propName = afFilter.name;
724
+ critObj.value = optValue;
725
+ critObj.restriction = AdInsConstant.RestrictionEq;
726
+ arrayCrit.push(critObj);
727
+ }
728
+ request.criteria = arrayCrit;
729
+ this.resolveObject(jsonComp[j], jsonComp[j].url, request);
730
+ }
731
+ }
732
+ }
733
+ };
590
734
  UCSearchComponent.decorators = [
591
735
  { type: i0.Component, args: [{
592
736
  selector: 'lib-UCSearch',
593
- 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=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch>\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section\"> {{configuration?.title}} <div id=\"flip\" class=\"btn float-right\"\r\n (click)=\"isHidden = !isHidden\"><i class=\"fa\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-down' : 'fa-chevron-up'\"></i></div>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div id=\"panel\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\"\r\n *ngFor=\"let question of configuration?.component\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"projectinput1\"\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 name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\">\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 name=\"{{question.name}}\" attr.data-type=\"{{question.datatype}}\"\r\n value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type==='numeric'\">\r\n <input type=\"text\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n \r\n <!-- Sementara di Hardcode begini dulu-->\r\n <div *ngIf=\"question.type==='lookupProduct'\">\r\n <!-- <app-lookup></app-lookup> -->\r\n </div>\r\n \r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type==='datepicker'\">\r\n <input type=\"date\" id=\"{{question.id}}\" class=\"form-control search-form-control btn-lookup\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type==='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select id=\"projectinput6\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <select id=\"projectinput6\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n </div>\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 <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData\" type=\"button\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa fa-plus-circle\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"ft-x\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\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 -->"
737
+ 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=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch>\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section\"> {{configuration?.title}} <div id=\"flip\" class=\"btn float-right\"\r\n (click)=\"isHidden = !isHidden\"><i class=\"fa\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-down' : 'fa-chevron-up'\"></i></div>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div id=\"panel\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\"\r\n *ngFor=\"let question of configuration?.component\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"projectinput1\"\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 name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\">\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 name=\"{{question.name}}\" attr.data-type=\"{{question.datatype}}\"\r\n value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type==='numeric'\">\r\n <input type=\"text\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n \r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type==='datepicker'\">\r\n <input type=\"date\" id=\"{{question.id}}\" class=\"form-control search-form-control btn-lookup\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type==='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <select name=\"{{question.name}}\" (change)=\"onChangeEvent($event.target.value, question)\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n <div *ngIf=\"!question.isEvent\">\r\n <select name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa fa-plus-circle\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"ft-x\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\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 -->",
738
+ providers: [ExcelService]
594
739
  }] }
595
740
  ];
596
741
  /** @nocollapse */
597
742
  UCSearchComponent.ctorParameters = function () {
598
743
  return [
599
744
  { type: http.HttpClient },
600
- { type: common.DecimalPipe },
745
+ { type: ExcelService },
601
746
  { type: i0.Renderer2 },
602
747
  { type: undefined, decorators: [{ type: i0.Inject, args: [platformBrowser.DOCUMENT,] }] }
603
748
  ];
604
749
  };
605
750
  UCSearchComponent.propDecorators = {
606
751
  myForm: [{ type: i0.ViewChild, args: ['formIdSearch',] }],
607
- _url: [{ type: i0.Input }],
608
- apiQryPaging: [{ type: i0.Input }],
609
- enviromentUrl: [{ type: i0.Input }],
610
- arrCritObj: [{ type: i0.Input }],
611
- pageSize: [{ type: i0.Input }],
612
- pageNow: [{ type: i0.Input }],
613
- addCritInput: [{ type: i0.Input }],
752
+ searchInput: [{ type: i0.Input }],
614
753
  result: [{ type: i0.Output }]
615
754
  };
616
755
  return UCSearchComponent;
@@ -648,6 +787,7 @@
648
787
  exports.UCSearchService = UCSearchService;
649
788
  exports.UCSearchComponent = UCSearchComponent;
650
789
  exports.UCSearchModule = UCSearchModule;
790
+ exports.ɵa = ExcelService;
651
791
 
652
792
  Object.defineProperty(exports, '__esModule', { value: true });
653
793