@adins/ucsearch 2.11.1 → 2.11.3
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/adins-ucsearch.metadata.json +1 -1
- package/bundles/adins-ucsearch.umd.js +1 -1
- package/bundles/adins-ucsearch.umd.min.js +1 -1
- package/bundles/adins-ucsearch.umd.min.js.map +1 -1
- package/esm2015/lib/ucsearch.component.js +1 -1
- package/esm5/lib/ucsearch.component.js +1 -1
- package/fesm2015/adins-ucsearch.js +1 -1
- package/fesm5/adins-ucsearch.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"UCSearchService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UCSearchComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"lib-UCSearch","providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":22,"character":28}],"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":24,"character":4},"arguments":["changeDivSize",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":25,"character":6},"arguments":["initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":25,"character":23},"arguments":[{"height":"*","opacity":"1"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":29,"character":6},"arguments":["final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":29,"character":21},"arguments":[{"height":"0px","opacity":"0","overflow":"hidden"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":34,"character":6},"arguments":["initial=>final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":34,"character":35},"arguments":["300ms"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":35,"character":6},"arguments":["final=>initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":35,"character":35},"arguments":["300ms"]}]}]]}],"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 <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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> <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> <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> <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> <span translate>Generate\r\n Report</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->","styles":[".ucSearch-title{margin:3px}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:'\\e929';font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:20px;top:10px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],"members":{"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":43,"character":3},"arguments":["enjiForm"]}]}],"myForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":49,"character":3},"arguments":["formIdSearch"]}]}],"searchInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"pageSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"isReport":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"result":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":53,"character":3}}]}],"genRpt":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":54,"character":3}}]}],"reqGetAllData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":55,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":115,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":115,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":114,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":114,"character":96},null,{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":115,"character":56},{"__symbolic":"reference","module":"ngx-cookie","name":"CookieService","line":115,"character":94},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":116,"character":22}]}],"changeState":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"SetRoleOfficeCodes":[{"__symbolic":"method"}],"setDefaultValueMonth":[{"__symbolic":"method"}],"setMonthDDL":[{"__symbolic":"method"}],"setDefaultValueYear":[{"__symbolic":"method"}],"setYearDDL":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"postJSON":[{"__symbolic":"method"}],"searchClick":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"GenerateReport":[{"__symbolic":"method"}],"lessThanFour":[{"__symbolic":"method"}],"resolveObject":[{"__symbolic":"method"}],"transformAmount":[{"__symbolic":"method"}],"transformToDecimal":[{"__symbolic":"method"}],"exportAsXLSX":[{"__symbolic":"method"}],"onChangeEvent":[{"__symbolic":"method"}],"SetProcessKey":[{"__symbolic":"method"}],"switchCase":[{"__symbolic":"method"}],"DecryptString":[{"__symbolic":"method"}],"checkInputDate":[{"__symbolic":"method"}],"selectedOption":[{"__symbolic":"method"}],"isSelected":[{"__symbolic":"method"}]}},"customCurrencyMaskConfig":{"align":"right","allowNegative":false,"allowZero":true,"decimal":".","precision":2,"prefix":"","suffix":"","thousands":",","nullable":false,"inputMode":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"CurrencyMaskInputMode","line":20,"character":13},"member":"NATURAL"}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"},{"__symbolic":"reference","name":"ɵb"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":26,"character":4},{"__symbolic":"reference","module":"@adins/uc-show-errors","name":"UcShowErrorsModule","line":27,"character":4},{"__symbolic":"reference","module":"@adins/uc-directive-upper-case","name":"UcDirectiveUpperCaseModule","line":28,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":29,"character":4},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"customCurrencyMaskConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":30,"character":4},"member":"forChild"}}],"exports":[{"__symbolic":"reference","name":"UCSearchComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"exportAsExcelFile":[{"__symbolic":"method"}],"saveAsExcelFile":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":2,"character":1},"arguments":[{"name":"textSearch"}]}],"members":{"transform":[{"__symbolic":"method"}]}}},"origins":{"UCSearchService":"./lib/ucsearch.service","UCSearchComponent":"./lib/ucsearch.component","customCurrencyMaskConfig":"./lib/ucsearch.module","UCSearchModule":"./lib/ucsearch.module","ɵa":"./lib/services/excel-service/excel-service","ɵb":"./lib/pipe/text-search.pipe"},"importAs":"@adins/ucsearch"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"UCSearchService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UCSearchComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"lib-UCSearch","providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":22,"character":28}],"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":24,"character":4},"arguments":["changeDivSize",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":25,"character":6},"arguments":["initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":25,"character":23},"arguments":[{"height":"*","opacity":"1"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":29,"character":6},"arguments":["final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":29,"character":21},"arguments":[{"height":"0px","opacity":"0","overflow":"hidden"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":34,"character":6},"arguments":["initial=>final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":34,"character":35},"arguments":["300ms"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":35,"character":6},"arguments":["final=>initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":35,"character":35},"arguments":["300ms"]}]}]]}],"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 <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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> <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> <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> <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> <span translate>Generate\r\n Report</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->","styles":[".ucSearch-title{margin:3px}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:'\\e929';font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],"members":{"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":43,"character":3},"arguments":["enjiForm"]}]}],"myForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":49,"character":3},"arguments":["formIdSearch"]}]}],"searchInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"pageSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"isReport":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"result":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":53,"character":3}}]}],"genRpt":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":54,"character":3}}]}],"reqGetAllData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":55,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":115,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":115,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":114,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":114,"character":96},null,{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":115,"character":56},{"__symbolic":"reference","module":"ngx-cookie","name":"CookieService","line":115,"character":94},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":116,"character":22}]}],"changeState":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"SetRoleOfficeCodes":[{"__symbolic":"method"}],"setDefaultValueMonth":[{"__symbolic":"method"}],"setMonthDDL":[{"__symbolic":"method"}],"setDefaultValueYear":[{"__symbolic":"method"}],"setYearDDL":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"postJSON":[{"__symbolic":"method"}],"searchClick":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"GenerateReport":[{"__symbolic":"method"}],"lessThanFour":[{"__symbolic":"method"}],"resolveObject":[{"__symbolic":"method"}],"transformAmount":[{"__symbolic":"method"}],"transformToDecimal":[{"__symbolic":"method"}],"exportAsXLSX":[{"__symbolic":"method"}],"onChangeEvent":[{"__symbolic":"method"}],"SetProcessKey":[{"__symbolic":"method"}],"switchCase":[{"__symbolic":"method"}],"DecryptString":[{"__symbolic":"method"}],"checkInputDate":[{"__symbolic":"method"}],"selectedOption":[{"__symbolic":"method"}],"isSelected":[{"__symbolic":"method"}]}},"customCurrencyMaskConfig":{"align":"right","allowNegative":false,"allowZero":true,"decimal":".","precision":2,"prefix":"","suffix":"","thousands":",","nullable":false,"inputMode":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"CurrencyMaskInputMode","line":20,"character":13},"member":"NATURAL"}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"},{"__symbolic":"reference","name":"ɵb"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":26,"character":4},{"__symbolic":"reference","module":"@adins/uc-show-errors","name":"UcShowErrorsModule","line":27,"character":4},{"__symbolic":"reference","module":"@adins/uc-directive-upper-case","name":"UcDirectiveUpperCaseModule","line":28,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":29,"character":4},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"customCurrencyMaskConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":30,"character":4},"member":"forChild"}}],"exports":[{"__symbolic":"reference","name":"UCSearchComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"exportAsExcelFile":[{"__symbolic":"method"}],"saveAsExcelFile":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":2,"character":1},"arguments":[{"name":"textSearch"}]}],"members":{"transform":[{"__symbolic":"method"}]}}},"origins":{"UCSearchService":"./lib/ucsearch.service","UCSearchComponent":"./lib/ucsearch.component","customCurrencyMaskConfig":"./lib/ucsearch.module","UCSearchModule":"./lib/ucsearch.module","ɵa":"./lib/services/excel-service/excel-service","ɵb":"./lib/pipe/text-search.pipe"},"importAs":"@adins/ucsearch"}
|
|
@@ -1476,7 +1476,7 @@
|
|
|
1476
1476
|
animations.transition('final=>initial', animations.animate('300ms'))
|
|
1477
1477
|
]),
|
|
1478
1478
|
],
|
|
1479
|
-
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:
|
|
1479
|
+
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:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]
|
|
1480
1480
|
}] }
|
|
1481
1481
|
];
|
|
1482
1482
|
/** @nocollapse */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(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/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")):"function"==typeof define&&define.amd?define("@adins/ucsearch",["exports","@angular/common/http","@angular/platform-browser","file-saver","xlsx","@angular/animations","ngx-toastr","ngx-cookie","crypto-js","@angular/common","@angular/forms","ngx-currency","@ngx-translate/core","@adins/uc-show-errors","@adins/uc-directive-upper-case","@angular/core"],t):t((e.adins=e.adins||{},e.adins.ucsearch={}),e.ng.common.http,e.ng.platformBrowser,e.FileSaver,e.XLSX,e.ng.animations,e.ngxToastr,e.ngxCookie,e.CryptoJS,e.ng.common,e.ng.forms,e.ngxCurrency,e.core,e.ucShowErrors,e.ucDirectiveUpperCase,e.ng.core)}(this,function(e,t,n,i,o,r,a,s,l,f,u,c,d,p,m,h){"use strict";var y=(g.decorators=[{type:h.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[]},g.ngInjectableDef=h.defineInjectable({factory:function(){return new g},token:g,providedIn:"root"}),g);function g(){}var v=(q.RestrictionBetween="Between",q.RestrictionLike="Like",q.RestrictionEq="Eq",q.RestrictionNeq="NEQ",q.RestrictionGt="GT",q.RestrictionGte="GTE",q.RestrictionLt="LT",q.RestrictionLte="LTE",q.RestrictionIn="IN",q.RestrictionNotIn="NotIn",q.RestrictionOr="Or",q.RestrictionOrNeq="OrNeq",q.RestrictionIsNull="ISNULL",q.RestrictionIsNotNull="ISNOTNULL",q.RestrictionGTE="GTE",q.RestrictionLTE="LTE",q.showData="10,50,100",q.JoinTypeInner="INNER",q.JoinTypeLeft="LEFT",q);function q(){}var b=function j(){this.baseUrl="",this.apiPath="",this.requestObj=new Object,this.leftColumnToJoin="",this.rightColumnToJoin="",this.joinType=v.JoinTypeInner},I=function A(){this._url="",this.enviromentUrl="",this.title="",this.apiQryPaging="",this.arrCritObj=null,this.addCritInput=new Array,this.listEnvironments=new Array,this.whereValue=new Array,this.fromValue=new Array,this.switchValue=new Array,this.integrationObj=new b,this.isJoinExAPI=!1},D=function N(){this.low=0,this.high=0,this.DataType="Text",this.isCriteriaDataTable=!1},x=function P(){this.includeCount=!0,this.includeData=!0,this.isLoading=!0,this.queryString="",this.rowVersion="",this.integrationObj=new b,this.joinType=v.JoinTypeInner},w=(T.prototype.exportAsExcelFile=function(e,t){var n=o.utils.json_to_sheet(e);console.log("worksheet",n);var i={Sheets:{data:n},SheetNames:["data"]},r=o.write(i,{bookType:"xlsx",type:"array"});this.saveAsExcelFile(r,t)},T.prototype.saveAsExcelFile=function(e,t){var n=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});i.saveAs(n,t+"_export_"+(new Date).getTime()+".xlsx")},T.decorators=[{type:h.Injectable}],T.ctorParameters=function(){return[]},T);function T(){}var F=(E.EXP_TYPE_PDF=0,E.EXP_TYPE_XLS=1,E.EXP_TYPE_XLSX=2,E.EXP_TYPE_DOC=3,E.EXP_TYPE_DOCX=4,E);function E(){}var k=function V(){this.DictOfMonth={},this.ListOfMonth=new Array,this.DictOfMonth={},this.ListOfMonth.push({key:1,value:"January"}),this.DictOfMonth[1]="January",this.ListOfMonth.push({key:2,value:"February"}),this.DictOfMonth[2]="February",this.ListOfMonth.push({key:3,value:"March"}),this.DictOfMonth[3]="March",this.ListOfMonth.push({key:4,value:"April"}),this.DictOfMonth[4]="April",this.ListOfMonth.push({key:5,value:"May"}),this.DictOfMonth[5]="May",this.ListOfMonth.push({key:6,value:"June"}),this.DictOfMonth[6]="June",this.ListOfMonth.push({key:7,value:"July"}),this.DictOfMonth[7]="July",this.ListOfMonth.push({key:8,value:"August"}),this.DictOfMonth[8]="August",this.ListOfMonth.push({key:9,value:"September"}),this.DictOfMonth[9]="September",this.ListOfMonth.push({key:10,value:"October"}),this.DictOfMonth[10]="October",this.ListOfMonth.push({key:11,value:"November"}),this.DictOfMonth[11]="November",this.ListOfMonth.push({key:12,value:"December"}),this.DictOfMonth[12]="December"},C=(Object.defineProperty(M.prototype,"content",{set:function(e){e&&(this.searchForm=e)},enumerable:!0,configurable:!0}),M.prototype.changeState=function(){this.currentState="initial"===this.currentState?"final":"initial",this.isHidden=!1===this.isHidden},M.prototype.ngOnInit=function(){console.log("ucsearch"),this.apiUrl=this.searchInput.enviromentUrl+this.searchInput.apiQryPaging,this.arrCrit=this.searchInput.arrCritObj;var e=this._renderer2.createElement("script");e.text='\n $(document).ready(function(){\n $("#flip").click(function(){\n $("#panel").slideToggle("slow");\n });\n });\n ',this._renderer2.appendChild(this._document.body,e);var t=this.cookieService.get("BusinessDateRaw");this.BisDt=this.DecryptString(t,"AdInsFOU12345678"),this.BusinessDt=new Date(this.BisDt),this.initiateForm()},M.prototype.initiateForm=function(){var h=this;this.getJSON(this.searchInput._url).subscribe(function(t){h.configuration=t,h.exportData=t.exportExcel,t.exportTypeList!=undefined&&0!=t.exportTypeList.length&&(h.ExportTypeList=t.exportTypeList,h.ExportType=h.ExportTypeList[0].key),h.countForm=t.component.length,h.isDataLoaded=!0,h.searchInput.title!=undefined&&""!=h.searchInput.title&&(h.configuration.title=h.searchInput.title);for(var e=0;e<h.countForm;e++){if(1==t.component[e].isFromURL){var n=new x,i=new Array,r=new D;if(r.DataType="text",r.propName=t.component[e].criteriaPropName,r.value=t.component[e].criteriaPropValue,r.restriction="eq",i.push(r),n.criteria=i,n[t.component[e].criteriaPropName]=t.component[e].criteriaPropValue,t.component[e].path!=undefined&&""!=t.component[e].path)if(h.searchInput.listEnvironments!=undefined&&0!=h.searchInput.listEnvironments.length){for(var o=0;o<h.searchInput.listEnvironments.length;o++)if(t.component[e].environment==h.searchInput.listEnvironments[o].environment){t.component[e].fullpath=h.searchInput.listEnvironments[o].url+t.component[e].path;break}}else t.component[e].fullpath=t.component[e].url;else t.component[e].fullpath=t.component[e].url;h.resolveObject(t.component[e],t.component[e].fullpath,n)}if("numeric"==t.component[e].type&&(t.component[e].value=parseFloat(t.component[e].value).toLocaleString("en")),"dropdown"==t.component[e].type&&t.component[e].dtmType!=undefined&&(t.component[e].dtmType.includes("month")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueMonth(t.component[e].value)),t.component[e].items=h.setMonthDDL(t.component[e].dtmType)),t.component[e].dtmType.includes("year")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueYear(t.component[e].value)),t.component[e].items=h.setYearDDL(t.component[e].dtmType))),t.component[e].value||(t.component[e].value="","all"==t.component[e].ddlType&&(t.component[e].value="all"),"one"==t.component[e].ddlType&&(t.component[e].value="one")),"datepicker"==t.component[e].type){if(h.readonly=t.component[e].readonly,t.component[e].value.includes("BD")){var a=new Date;null!=h.BisDt&&(a=new Date(h.BisDt));var s=t.component[e].value.charAt(2),l=new Date;if("-"==s){var u=t.component[e].value.split("-",2),c=parseInt(u[1]);a.setDate(a.getDate()-c)}else"+"==s&&(u=t.component[e].value.split("+",2),c=parseInt(u[1]),a.setDate(a.getDate()+c));l=a;var d=f.formatDate(l,"yyyy-MM-dd","en-US");t.component[e].value=d}if((h.readonly=!1)&&t.component[e].restriction!=undefined&&""!=t.component[e].restriction)if("GT"==t.component[e].restriction.toUpperCase()){var p=new Date(h.datePipe.transform(t.component[e].minDate,"yyyy-MM-dd"));p.setDate(p.getDate()+1),t.component[e].minDate=p}else if("LT"==t.component[e].restriction.toUpperCase()){var m=new Date(h.datePipe.transform(t.component[e].maxDate,"yyyy-MM-dd"));m.setDate(m.getDate()-1),t.component[e].maxDate=m}}}setTimeout(function(){for(var e=0;e<h.countForm;e++)1==t.component[e].isEvent&&1==h.configuration.component[e].itemsUrl.length&&h.onChangeEvent(t.component[e].itemsUrl[0].Key,t.component[e]),"officeRoleCodes"==t.component[e].type&&0<h.configuration.component[e].itemsUrl.length&&h.SetRoleOfficeCodes(e)},1e3)})},M.prototype.SetRoleOfficeCodes=function(e){var t=this.cookieService.get("UserAccess"),n=JSON.parse(this.DecryptString(t,"AdInsFOU12345678")).RoleCode,i=new Array;i.push(n);var r=this.myForm.nativeElement[e].options,o=r[r.selectedIndex].value.trim();if(1==this.configuration.component[e].itemsUrl.length||"all"==this.configuration.component[e].ddlType&&"all"==o)for(var a=0;a<this.configuration.component[e].itemsUrl.length;a++){var s=this.configuration.component[e].itemsUrl[a];i.push(s.Key),i.push(n+"-"+s.Key)}else i.push(o),i.push(n+"-"+o);this.searchInput.integrationObj.requestObj.OfficeRoleCodes=i},M.prototype.setDefaultValueMonth=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setMonth(t.getMonth()-r):"+"==n&&t.setMonth(t.getMonth()+r),t.getMonth()},M.prototype.setMonthDDL=function(e){var t,n=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),i=this.BusinessDt.getMonth(),r=this.BusinessDt.getMonth(),o=n[0],a=parseInt(e.substring(n.index+n[0].length));if(12<=a)return this.ListOfMonth.ListOfMonth;if(("+-"==o||"-+"==o)&&6<=a)return this.ListOfMonth.ListOfMonth;var s=this.ListOfMonth.DictOfMonth;t.push({key:i,value:s[i]});for(var l=0;l<a;l++)o.includes("-")&&(0==--i&&(i=12),t.push({key:i,value:s[i]})),o.includes("+")&&(13==++r&&(r=1),t.push({key:r,value:s[r]}));return t.sort(function(e,t){return e.key-t.key}),t},M.prototype.setDefaultValueYear=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setFullYear(t.getFullYear()-r):"+"==n&&t.setFullYear(t.getFullYear()+r),t.getFullYear()},M.prototype.setYearDDL=function(e){this.ListOfYear=new Array;var t=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),n=this.BusinessDt.getFullYear(),i=this.BusinessDt.getFullYear(),r=parseInt(e.substring(t.index+t[0].length));this.ListOfYear.push({key:this.BusinessDt.getFullYear(),value:this.BusinessDt.getFullYear().toString()});for(var o=0;o<r;o++)"-+"==t[0]||"+-"==t[0]?(n--,i++,this.ListOfYear.push({key:n,value:n.toString()},{key:i,value:i.toString()})):"-"==t[0]?(n--,this.ListOfYear.push({key:n,value:n.toString()})):"+"==t[0]&&(i++,this.ListOfYear.push({key:i,value:i.toString()}));return this.ListOfYear.sort(function(e,t){return e.key-t.key}),this.ListOfYear},M.prototype.getJSON=function(e){return this.http.get(e)},M.prototype.postJSON=function(e,t){return void 0===t&&(t=null),this.http.post(e,t)},M.prototype.searchClick=function(){var e=null;null!=this.configuration.orderby&&(e={key:this.configuration.orderby.key,value:this.configuration.orderby.value}),this.pageNow=1,this.search(this.apiUrl,this.pageNow,this.pageSize,e,this.arrCrit)},M.prototype.reset=function(){this.searchForm.resetForm({ExportType:this.ExportTypeList[0].key}),this.initiateForm()},M.prototype.search=function(e,n,t,i,r){var o=this;void 0===r&&(r=new Array);var a=new x,s=new Array,l=!1,u=!1;if(this.searchInput.whereValue!=undefined&&0!=this.searchInput.whereValue.length){this.configuration.querystring.whereQuery=new Array;for(var c=0;c<this.searchInput.whereValue.length;c++)this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[c].value)}if(this.searchInput.fromValue!=undefined&&0!=this.searchInput.fromValue.length)for(this.configuration.querystring.fromQuery=new Array,c=0;c<this.searchInput.fromValue.length;c++)this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[c].value);a.pageNo=n,a.rowPerPage=t,a.orderBy=i,a.queryString=this.configuration.querystring;for(var d=0;d<this.countForm;d++){var p=new D,m=this.myForm.nativeElement[d];if(p.DataType=m.getAttribute("data-type"),l=null!=m.getAttribute("query-in")&&"true"==m.getAttribute("query-in"),""!=m.value)if("SELECT"==m.nodeName){var h=m.options,f=h[h.selectedIndex].value.trim();if("one"==f){u=!0;var y=m.getAttribute("label");this.toastr.warning("Please select "+y);break}if(""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),"taskDefinitionKey"==this.configuration.component[d].type||"processKey"==this.configuration.component[d].type)continue;if("claim"==this.configuration.component[d].type)p.propName=m.getAttribute("data-name"),p.restriction=f,p.value=null,s.push(p);else if("all"!=f&&"one"!=f)p.restriction=v.RestrictionEq,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=f,s.push(p);else if("all"==f&&1==l&&0!=m.options.length){var g=new Array;for(c=0;c<m.options.length;c++)0!=c&&g.push(m.options[c].value);0!=g.length&&(p.restriction=v.RestrictionIn,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.listValue=g,s.push(p))}}else""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=m.value.trim(),m.value.includes("%")?p.restriction=v.RestrictionLike:""!=m.getAttribute("data-restriction")&&null!=m.getAttribute("data-restriction")?(p.restriction=m.getAttribute("data-restriction"),"numeric"==m.getAttribute("data-type")&&(p.value=parseFloat(m.value.replace(/,/g,"")).toString()),"LIKE"==p.restriction.toUpperCase()&&(p.value="%"+m.value.trim()+"%",p.restriction=v.RestrictionLike)):p.restriction=v.RestrictionEq,""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),s.push(p)}if(!u){if(null!=r&&r!=undefined){if(0!=r.length)for(d=0;d<r.length;d++)s.push(r[d]);else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d])}else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d]);a.criteria=s,this.searchInput.isJoinExAPI?a.integrationObj=this.searchInput.integrationObj:a.integrationObj=null,this.http.post(e,a).subscribe(function(e){var t={response:e,pageNow:n};return console.log(t),o.result.emit(t),o.reqGetAllData.emit(a),e})}},M.prototype.GenerateReport=function(){this.genRpt.emit({ExportType:this.ExportType,ElRef:this.myForm})},M.prototype.lessThanFour=function(){return!(3<this.countForm)},M.prototype.resolveObject=function(t,e,n){var i=this;void 0===n&&(n=null),this.postJSON(e,n).subscribe(function(e){t.itemsUrl=new Array,t.itemsUrl=e.ReturnObject,t.exclude!=undefined&&""!=t.exclude&&(t.itemsUrl=t.itemsUrl.filter(function(e){return!t.exclude.includes(e.Key)})),t.affectedFilter&&1==t.itemsUrl.length&&i.onChangeEvent(t.itemsUrl[0].Key,t)})},M.prototype.transformAmount=function(e){this.formattedAmount=parseFloat(e.target.value).toLocaleString("en"),e.target.value=this.formattedAmount},M.prototype.transformToDecimal=function(e){e.target.value=parseFloat(e.target.value.toString().replace(/,/g,""))},M.prototype.exportAsXLSX=function(){var t=this,e=new x;e.pageNo=1,e.rowPerPage=9999,e.orderBy=null,e.criteria=[],e.queryString=this.configuration.querystring,this.searchInput.isJoinExAPI?e.integrationObj=this.searchInput.integrationObj:e.integrationObj=null,this.http.post(this.apiUrl,e).subscribe(function(e){t.ExcelData=e.Data,t.excelService.exportAsExcelFile(t.ExcelData,"sample")},function(e){console.log(e)})},M.prototype.onChangeEvent=function(e,t){for(var n=this.configuration.component,i=0;i<t.affectedFilter.length;i++)for(var r=0;r<n.length;r++)if(n[r].name==t.affectedFilter[i]){var o=new x,a=new Array;if("all"!=e&&"one"!=e){var s=new D;s.DataType=t.datatype,t.filterPropName!=undefined||""!=t.filterPropName?(o[t.filterPropName]=e,s.propName=t.filterPropName):(s.propName=t.name,o[t.name]=e),s.value=e,s.restriction=v.RestrictionEq,a.push(s)}if(o.criteria=a,n[r].path!=undefined&&""!=n[r].path)if(this.searchInput.listEnvironments!=undefined&&0!=this.searchInput.listEnvironments.length){for(var l=0;l<this.searchInput.listEnvironments.length;l++)if(n[r].environment==this.searchInput.listEnvironments[l].environment){n[r].fullpath=this.searchInput.listEnvironments[l].url+n[r].path;break}}else n[r].fullpath=n[r].url;else n[r].fullpath=n[r].url;this.resolveObject(n[r],n[r].fullpath,o)}},M.prototype.SetProcessKey=function(e,t){var n=this.myForm.nativeElement[e].options,i=n[n.selectedIndex].value.trim();i&&(this.searchInput.integrationObj.requestObj[t]=i)},M.prototype.switchCase=function(i){for(var r=!1,e=function(t){var e=o.searchInput.switchValue.findIndex(function(e){return e.property==i.conditions[t].property});if("EQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value!=i.conditions[t].value)return r=!1,"break";r=!0}else{var n=localStorage.getItem("Username");if(o.searchInput.switchValue[e].value!=n)return r=!1,"break";r=!0}else if("NEQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value==i.conditions[t].value)return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),o.searchInput.switchValue[e].value==n)return r=!1,"break";r=!0}else if("GT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>n))return r=!1,"break";r=!0}else if("GTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>=n))return r=!1,"break";r=!0}else if("LT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<n))return r=!1,"break";r=!0}else if("LTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<=n))return r=!1,"break";r=!0}},o=this,t=0;t<i.conditions.length&&"break"!==e(t);t++);return r},M.prototype.DecryptString=function(e,t){if(t==undefined||""==t.trim()||e==undefined||""==e.trim())return e;var n=l.enc.Utf8.parse(t),i=l.lib.WordArray.create([0,0,0,0]);return l.AES.decrypt(e,n,{iv:i}).toString(l.enc.Utf8)},M.prototype.checkInputDate=function(t){var e,n,i,r=new Array,o=this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"GT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()});o!=undefined&&(e=""==this.myForm.nativeElement[o.id].min?null:new Date(this.myForm.nativeElement[o.id].min),i=o.label.split(">",2),null!=e&&("GT"==o.restriction.toUpperCase()?(e.setDate(e.getDate()-1),r.push(" must be greater than ")):"GTE"==o.restriction.toUpperCase()&&r.push(" must be greater than or equals to ")));var a=this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"LT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()});a!=undefined&&(n=""==this.myForm.nativeElement[a.id].max?null:new Date(this.myForm.nativeElement[a.id].max),i=a.label.split("<",2),null!=n&&("LT"==a.restriction.toUpperCase()?(n.setDate(n.getDate()+1),r.push(" must be less than ")):"LTE"==a.restriction.toUpperCase()&&r.push(" must be less than or equals to "))),null!=e&&null==n&&new Date(this.myForm.nativeElement[o.id].value)<e?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=n&&null==e&&new Date(this.myForm.nativeElement[a.id].value)>n?(this.toastr.warning(i[0]+r[0]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=e&&null!=n&&(new Date(this.myForm.nativeElement[a.id].value)>n||new Date(this.myForm.nativeElement[o.id].value)<e)?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+" and"+r[1]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):this.dateWrong=!1},M.prototype.selectedOption=function(e,t){t.value=e.key,t.descr=e.value,t.isListHide=!0},M.prototype.isSelected=function(e,t){return e.key==t},M.decorators=[{type:h.Component,args:[{selector:"lib-UCSearch",template:'\x3c!-- Basic form layout section start --\x3e\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 \x3c!-- Ini Digunakan untuk Generate Dynamic Component --\x3e\r\n \x3c!-- [hidden]="isHidden" --\x3e\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 \x3c!-- End Hardcode Lookup didalem--\x3e\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 <input type="text" class="form-control search-form-control dds-input"\r\n name="{{\'ddsValue\'+question.name}}" [(ngModel)]="question.value" readonly\r\n (click)="question.isListHide = !question.isListHide; question.searchText=\'\'">\r\n </div>\r\n <div class="dds-list-container" [hidden]="question.isListHide">\r\n <input type="text" class="form-control" name="{{\'searchText\'+question.name}}" [(ngModel)]="question.searchText"\r\n placeholder="FILTER">\r\n <div class="dds-items-container">\r\n \x3c!-- blm tentu bisa --\x3e\r\n <div class="dds-list-item" (click)="selectedOption({key:\'\',value:\'\'},question)">\r\n Select One\r\n </div>\r\n <div class="dds-list-item"\r\n *ngFor="let item of question?.items | textSearch : question.searchText; let i=index"\r\n (click)="selectedOption(item,question)"\r\n [ngClass]="{\'dds-active\': isSelected(item, question.value)}">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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> <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> <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> <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> <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\x3c!-- // Basic form layout section end --\x3e',providers:[w,f.DatePipe],animations:[r.trigger("changeDivSize",[r.state("initial",r.style({height:"*",opacity:"1"})),r.state("final",r.style({height:"0px",opacity:"0",overflow:"hidden"})),r.transition("initial=>final",r.animate("300ms")),r.transition("final=>initial",r.animate("300ms"))])],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:20px;top:10px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],M.ctorParameters=function(){return[{type:t.HttpClient},{type:w},{type:h.Renderer2},{type:undefined,decorators:[{type:h.Inject,args:[n.DOCUMENT]}]},{type:a.ToastrService},{type:s.CookieService},{type:f.DatePipe}]},M.propDecorators={content:[{type:h.ViewChild,args:["enjiForm"]}],myForm:[{type:h.ViewChild,args:["formIdSearch"]}],searchInput:[{type:h.Input}],pageSize:[{type:h.Input}],isReport:[{type:h.Input}],result:[{type:h.Output}],genRpt:[{type:h.Output}],reqGetAllData:[{type:h.Output}]},M);function M(e,t,n,i,r,o,a){this.http=e,this.excelService=t,this._renderer2=n,this._document=i,this.toastr=r,this.cookieService=o,this.datePipe=a,this.searchInput=new I,this.pageSize=10,this.isReport=!1,this.result=new h.EventEmitter,this.genRpt=new h.EventEmitter,this.reqGetAllData=new h.EventEmitter,this.ExportTypeList=[{key:F.EXP_TYPE_PDF,value:"PDF"},{key:F.EXP_TYPE_XLS,value:"Excel 2003"},{key:F.EXP_TYPE_XLSX,value:"Excel 2007"},{key:F.EXP_TYPE_DOC,value:"Document"},{key:F.EXP_TYPE_DOCX,value:"Document XML"}],this.ListOfMonth=new k,this.ListOfYear=new Array,this.ClaimList=[{Key:v.RestrictionIsNotNull,Value:"CLAIMED"},{Key:v.RestrictionIsNull,Value:"UNCLAIMED"}],this.ExportType=0,this.pageNow=1,this.isDataLoaded=!1,this.isHidden=!1,this.BusinessDt=new Date,this.dateWrong=!1,this.readonly=!1,this.currentState="initial",this.countForm=0,this.formattedAmount="",this.amount=0}var L=(O.prototype.transform=function(e,t){return t?e.filter(function(e){return!(!e.value||"string"!=typeof e.value)&&-1<e.value.toLowerCase().indexOf(t.toLowerCase())}):e},O.decorators=[{type:h.Pipe,args:[{name:"textSearch"}]}],O);function O(){}var S={align:"right",allowNegative:!1,allowZero:!0,decimal:".",precision:2,prefix:"",suffix:"",thousands:",",nullable:!1,inputMode:c.CurrencyMaskInputMode.NATURAL},U=(R.decorators=[{type:h.NgModule,args:[{declarations:[C,L],imports:[f.CommonModule,u.FormsModule,p.UcShowErrorsModule,m.UcDirectiveUpperCaseModule,c.NgxCurrencyModule.forRoot(S),d.TranslateModule.forChild()],exports:[C]}]}],R);function R(){}e.UCSearchService=y,e.UCSearchComponent=C,e.customCurrencyMaskConfig=S,e.UCSearchModule=U,e.ɵb=L,e.ɵa=w,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(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/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")):"function"==typeof define&&define.amd?define("@adins/ucsearch",["exports","@angular/common/http","@angular/platform-browser","file-saver","xlsx","@angular/animations","ngx-toastr","ngx-cookie","crypto-js","@angular/common","@angular/forms","ngx-currency","@ngx-translate/core","@adins/uc-show-errors","@adins/uc-directive-upper-case","@angular/core"],t):t((e.adins=e.adins||{},e.adins.ucsearch={}),e.ng.common.http,e.ng.platformBrowser,e.FileSaver,e.XLSX,e.ng.animations,e.ngxToastr,e.ngxCookie,e.CryptoJS,e.ng.common,e.ng.forms,e.ngxCurrency,e.core,e.ucShowErrors,e.ucDirectiveUpperCase,e.ng.core)}(this,function(e,t,n,i,o,r,a,s,l,f,u,c,d,p,m,h){"use strict";var y=(g.decorators=[{type:h.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[]},g.ngInjectableDef=h.defineInjectable({factory:function(){return new g},token:g,providedIn:"root"}),g);function g(){}var v=(q.RestrictionBetween="Between",q.RestrictionLike="Like",q.RestrictionEq="Eq",q.RestrictionNeq="NEQ",q.RestrictionGt="GT",q.RestrictionGte="GTE",q.RestrictionLt="LT",q.RestrictionLte="LTE",q.RestrictionIn="IN",q.RestrictionNotIn="NotIn",q.RestrictionOr="Or",q.RestrictionOrNeq="OrNeq",q.RestrictionIsNull="ISNULL",q.RestrictionIsNotNull="ISNOTNULL",q.RestrictionGTE="GTE",q.RestrictionLTE="LTE",q.showData="10,50,100",q.JoinTypeInner="INNER",q.JoinTypeLeft="LEFT",q);function q(){}var b=function j(){this.baseUrl="",this.apiPath="",this.requestObj=new Object,this.leftColumnToJoin="",this.rightColumnToJoin="",this.joinType=v.JoinTypeInner},I=function A(){this._url="",this.enviromentUrl="",this.title="",this.apiQryPaging="",this.arrCritObj=null,this.addCritInput=new Array,this.listEnvironments=new Array,this.whereValue=new Array,this.fromValue=new Array,this.switchValue=new Array,this.integrationObj=new b,this.isJoinExAPI=!1},D=function N(){this.low=0,this.high=0,this.DataType="Text",this.isCriteriaDataTable=!1},x=function P(){this.includeCount=!0,this.includeData=!0,this.isLoading=!0,this.queryString="",this.rowVersion="",this.integrationObj=new b,this.joinType=v.JoinTypeInner},w=(T.prototype.exportAsExcelFile=function(e,t){var n=o.utils.json_to_sheet(e);console.log("worksheet",n);var i={Sheets:{data:n},SheetNames:["data"]},r=o.write(i,{bookType:"xlsx",type:"array"});this.saveAsExcelFile(r,t)},T.prototype.saveAsExcelFile=function(e,t){var n=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});i.saveAs(n,t+"_export_"+(new Date).getTime()+".xlsx")},T.decorators=[{type:h.Injectable}],T.ctorParameters=function(){return[]},T);function T(){}var F=(E.EXP_TYPE_PDF=0,E.EXP_TYPE_XLS=1,E.EXP_TYPE_XLSX=2,E.EXP_TYPE_DOC=3,E.EXP_TYPE_DOCX=4,E);function E(){}var k=function V(){this.DictOfMonth={},this.ListOfMonth=new Array,this.DictOfMonth={},this.ListOfMonth.push({key:1,value:"January"}),this.DictOfMonth[1]="January",this.ListOfMonth.push({key:2,value:"February"}),this.DictOfMonth[2]="February",this.ListOfMonth.push({key:3,value:"March"}),this.DictOfMonth[3]="March",this.ListOfMonth.push({key:4,value:"April"}),this.DictOfMonth[4]="April",this.ListOfMonth.push({key:5,value:"May"}),this.DictOfMonth[5]="May",this.ListOfMonth.push({key:6,value:"June"}),this.DictOfMonth[6]="June",this.ListOfMonth.push({key:7,value:"July"}),this.DictOfMonth[7]="July",this.ListOfMonth.push({key:8,value:"August"}),this.DictOfMonth[8]="August",this.ListOfMonth.push({key:9,value:"September"}),this.DictOfMonth[9]="September",this.ListOfMonth.push({key:10,value:"October"}),this.DictOfMonth[10]="October",this.ListOfMonth.push({key:11,value:"November"}),this.DictOfMonth[11]="November",this.ListOfMonth.push({key:12,value:"December"}),this.DictOfMonth[12]="December"},C=(Object.defineProperty(M.prototype,"content",{set:function(e){e&&(this.searchForm=e)},enumerable:!0,configurable:!0}),M.prototype.changeState=function(){this.currentState="initial"===this.currentState?"final":"initial",this.isHidden=!1===this.isHidden},M.prototype.ngOnInit=function(){console.log("ucsearch"),this.apiUrl=this.searchInput.enviromentUrl+this.searchInput.apiQryPaging,this.arrCrit=this.searchInput.arrCritObj;var e=this._renderer2.createElement("script");e.text='\n $(document).ready(function(){\n $("#flip").click(function(){\n $("#panel").slideToggle("slow");\n });\n });\n ',this._renderer2.appendChild(this._document.body,e);var t=this.cookieService.get("BusinessDateRaw");this.BisDt=this.DecryptString(t,"AdInsFOU12345678"),this.BusinessDt=new Date(this.BisDt),this.initiateForm()},M.prototype.initiateForm=function(){var h=this;this.getJSON(this.searchInput._url).subscribe(function(t){h.configuration=t,h.exportData=t.exportExcel,t.exportTypeList!=undefined&&0!=t.exportTypeList.length&&(h.ExportTypeList=t.exportTypeList,h.ExportType=h.ExportTypeList[0].key),h.countForm=t.component.length,h.isDataLoaded=!0,h.searchInput.title!=undefined&&""!=h.searchInput.title&&(h.configuration.title=h.searchInput.title);for(var e=0;e<h.countForm;e++){if(1==t.component[e].isFromURL){var n=new x,i=new Array,r=new D;if(r.DataType="text",r.propName=t.component[e].criteriaPropName,r.value=t.component[e].criteriaPropValue,r.restriction="eq",i.push(r),n.criteria=i,n[t.component[e].criteriaPropName]=t.component[e].criteriaPropValue,t.component[e].path!=undefined&&""!=t.component[e].path)if(h.searchInput.listEnvironments!=undefined&&0!=h.searchInput.listEnvironments.length){for(var o=0;o<h.searchInput.listEnvironments.length;o++)if(t.component[e].environment==h.searchInput.listEnvironments[o].environment){t.component[e].fullpath=h.searchInput.listEnvironments[o].url+t.component[e].path;break}}else t.component[e].fullpath=t.component[e].url;else t.component[e].fullpath=t.component[e].url;h.resolveObject(t.component[e],t.component[e].fullpath,n)}if("numeric"==t.component[e].type&&(t.component[e].value=parseFloat(t.component[e].value).toLocaleString("en")),"dropdown"==t.component[e].type&&t.component[e].dtmType!=undefined&&(t.component[e].dtmType.includes("month")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueMonth(t.component[e].value)),t.component[e].items=h.setMonthDDL(t.component[e].dtmType)),t.component[e].dtmType.includes("year")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueYear(t.component[e].value)),t.component[e].items=h.setYearDDL(t.component[e].dtmType))),t.component[e].value||(t.component[e].value="","all"==t.component[e].ddlType&&(t.component[e].value="all"),"one"==t.component[e].ddlType&&(t.component[e].value="one")),"datepicker"==t.component[e].type){if(h.readonly=t.component[e].readonly,t.component[e].value.includes("BD")){var a=new Date;null!=h.BisDt&&(a=new Date(h.BisDt));var s=t.component[e].value.charAt(2),l=new Date;if("-"==s){var u=t.component[e].value.split("-",2),c=parseInt(u[1]);a.setDate(a.getDate()-c)}else"+"==s&&(u=t.component[e].value.split("+",2),c=parseInt(u[1]),a.setDate(a.getDate()+c));l=a;var d=f.formatDate(l,"yyyy-MM-dd","en-US");t.component[e].value=d}if((h.readonly=!1)&&t.component[e].restriction!=undefined&&""!=t.component[e].restriction)if("GT"==t.component[e].restriction.toUpperCase()){var p=new Date(h.datePipe.transform(t.component[e].minDate,"yyyy-MM-dd"));p.setDate(p.getDate()+1),t.component[e].minDate=p}else if("LT"==t.component[e].restriction.toUpperCase()){var m=new Date(h.datePipe.transform(t.component[e].maxDate,"yyyy-MM-dd"));m.setDate(m.getDate()-1),t.component[e].maxDate=m}}}setTimeout(function(){for(var e=0;e<h.countForm;e++)1==t.component[e].isEvent&&1==h.configuration.component[e].itemsUrl.length&&h.onChangeEvent(t.component[e].itemsUrl[0].Key,t.component[e]),"officeRoleCodes"==t.component[e].type&&0<h.configuration.component[e].itemsUrl.length&&h.SetRoleOfficeCodes(e)},1e3)})},M.prototype.SetRoleOfficeCodes=function(e){var t=this.cookieService.get("UserAccess"),n=JSON.parse(this.DecryptString(t,"AdInsFOU12345678")).RoleCode,i=new Array;i.push(n);var r=this.myForm.nativeElement[e].options,o=r[r.selectedIndex].value.trim();if(1==this.configuration.component[e].itemsUrl.length||"all"==this.configuration.component[e].ddlType&&"all"==o)for(var a=0;a<this.configuration.component[e].itemsUrl.length;a++){var s=this.configuration.component[e].itemsUrl[a];i.push(s.Key),i.push(n+"-"+s.Key)}else i.push(o),i.push(n+"-"+o);this.searchInput.integrationObj.requestObj.OfficeRoleCodes=i},M.prototype.setDefaultValueMonth=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setMonth(t.getMonth()-r):"+"==n&&t.setMonth(t.getMonth()+r),t.getMonth()},M.prototype.setMonthDDL=function(e){var t,n=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),i=this.BusinessDt.getMonth(),r=this.BusinessDt.getMonth(),o=n[0],a=parseInt(e.substring(n.index+n[0].length));if(12<=a)return this.ListOfMonth.ListOfMonth;if(("+-"==o||"-+"==o)&&6<=a)return this.ListOfMonth.ListOfMonth;var s=this.ListOfMonth.DictOfMonth;t.push({key:i,value:s[i]});for(var l=0;l<a;l++)o.includes("-")&&(0==--i&&(i=12),t.push({key:i,value:s[i]})),o.includes("+")&&(13==++r&&(r=1),t.push({key:r,value:s[r]}));return t.sort(function(e,t){return e.key-t.key}),t},M.prototype.setDefaultValueYear=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setFullYear(t.getFullYear()-r):"+"==n&&t.setFullYear(t.getFullYear()+r),t.getFullYear()},M.prototype.setYearDDL=function(e){this.ListOfYear=new Array;var t=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),n=this.BusinessDt.getFullYear(),i=this.BusinessDt.getFullYear(),r=parseInt(e.substring(t.index+t[0].length));this.ListOfYear.push({key:this.BusinessDt.getFullYear(),value:this.BusinessDt.getFullYear().toString()});for(var o=0;o<r;o++)"-+"==t[0]||"+-"==t[0]?(n--,i++,this.ListOfYear.push({key:n,value:n.toString()},{key:i,value:i.toString()})):"-"==t[0]?(n--,this.ListOfYear.push({key:n,value:n.toString()})):"+"==t[0]&&(i++,this.ListOfYear.push({key:i,value:i.toString()}));return this.ListOfYear.sort(function(e,t){return e.key-t.key}),this.ListOfYear},M.prototype.getJSON=function(e){return this.http.get(e)},M.prototype.postJSON=function(e,t){return void 0===t&&(t=null),this.http.post(e,t)},M.prototype.searchClick=function(){var e=null;null!=this.configuration.orderby&&(e={key:this.configuration.orderby.key,value:this.configuration.orderby.value}),this.pageNow=1,this.search(this.apiUrl,this.pageNow,this.pageSize,e,this.arrCrit)},M.prototype.reset=function(){this.searchForm.resetForm({ExportType:this.ExportTypeList[0].key}),this.initiateForm()},M.prototype.search=function(e,n,t,i,r){var o=this;void 0===r&&(r=new Array);var a=new x,s=new Array,l=!1,u=!1;if(this.searchInput.whereValue!=undefined&&0!=this.searchInput.whereValue.length){this.configuration.querystring.whereQuery=new Array;for(var c=0;c<this.searchInput.whereValue.length;c++)this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[c].value)}if(this.searchInput.fromValue!=undefined&&0!=this.searchInput.fromValue.length)for(this.configuration.querystring.fromQuery=new Array,c=0;c<this.searchInput.fromValue.length;c++)this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[c].value);a.pageNo=n,a.rowPerPage=t,a.orderBy=i,a.queryString=this.configuration.querystring;for(var d=0;d<this.countForm;d++){var p=new D,m=this.myForm.nativeElement[d];if(p.DataType=m.getAttribute("data-type"),l=null!=m.getAttribute("query-in")&&"true"==m.getAttribute("query-in"),""!=m.value)if("SELECT"==m.nodeName){var h=m.options,f=h[h.selectedIndex].value.trim();if("one"==f){u=!0;var y=m.getAttribute("label");this.toastr.warning("Please select "+y);break}if(""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),"taskDefinitionKey"==this.configuration.component[d].type||"processKey"==this.configuration.component[d].type)continue;if("claim"==this.configuration.component[d].type)p.propName=m.getAttribute("data-name"),p.restriction=f,p.value=null,s.push(p);else if("all"!=f&&"one"!=f)p.restriction=v.RestrictionEq,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=f,s.push(p);else if("all"==f&&1==l&&0!=m.options.length){var g=new Array;for(c=0;c<m.options.length;c++)0!=c&&g.push(m.options[c].value);0!=g.length&&(p.restriction=v.RestrictionIn,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.listValue=g,s.push(p))}}else""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=m.value.trim(),m.value.includes("%")?p.restriction=v.RestrictionLike:""!=m.getAttribute("data-restriction")&&null!=m.getAttribute("data-restriction")?(p.restriction=m.getAttribute("data-restriction"),"numeric"==m.getAttribute("data-type")&&(p.value=parseFloat(m.value.replace(/,/g,"")).toString()),"LIKE"==p.restriction.toUpperCase()&&(p.value="%"+m.value.trim()+"%",p.restriction=v.RestrictionLike)):p.restriction=v.RestrictionEq,""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),s.push(p)}if(!u){if(null!=r&&r!=undefined){if(0!=r.length)for(d=0;d<r.length;d++)s.push(r[d]);else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d])}else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d]);a.criteria=s,this.searchInput.isJoinExAPI?a.integrationObj=this.searchInput.integrationObj:a.integrationObj=null,this.http.post(e,a).subscribe(function(e){var t={response:e,pageNow:n};return console.log(t),o.result.emit(t),o.reqGetAllData.emit(a),e})}},M.prototype.GenerateReport=function(){this.genRpt.emit({ExportType:this.ExportType,ElRef:this.myForm})},M.prototype.lessThanFour=function(){return!(3<this.countForm)},M.prototype.resolveObject=function(t,e,n){var i=this;void 0===n&&(n=null),this.postJSON(e,n).subscribe(function(e){t.itemsUrl=new Array,t.itemsUrl=e.ReturnObject,t.exclude!=undefined&&""!=t.exclude&&(t.itemsUrl=t.itemsUrl.filter(function(e){return!t.exclude.includes(e.Key)})),t.affectedFilter&&1==t.itemsUrl.length&&i.onChangeEvent(t.itemsUrl[0].Key,t)})},M.prototype.transformAmount=function(e){this.formattedAmount=parseFloat(e.target.value).toLocaleString("en"),e.target.value=this.formattedAmount},M.prototype.transformToDecimal=function(e){e.target.value=parseFloat(e.target.value.toString().replace(/,/g,""))},M.prototype.exportAsXLSX=function(){var t=this,e=new x;e.pageNo=1,e.rowPerPage=9999,e.orderBy=null,e.criteria=[],e.queryString=this.configuration.querystring,this.searchInput.isJoinExAPI?e.integrationObj=this.searchInput.integrationObj:e.integrationObj=null,this.http.post(this.apiUrl,e).subscribe(function(e){t.ExcelData=e.Data,t.excelService.exportAsExcelFile(t.ExcelData,"sample")},function(e){console.log(e)})},M.prototype.onChangeEvent=function(e,t){for(var n=this.configuration.component,i=0;i<t.affectedFilter.length;i++)for(var r=0;r<n.length;r++)if(n[r].name==t.affectedFilter[i]){var o=new x,a=new Array;if("all"!=e&&"one"!=e){var s=new D;s.DataType=t.datatype,t.filterPropName!=undefined||""!=t.filterPropName?(o[t.filterPropName]=e,s.propName=t.filterPropName):(s.propName=t.name,o[t.name]=e),s.value=e,s.restriction=v.RestrictionEq,a.push(s)}if(o.criteria=a,n[r].path!=undefined&&""!=n[r].path)if(this.searchInput.listEnvironments!=undefined&&0!=this.searchInput.listEnvironments.length){for(var l=0;l<this.searchInput.listEnvironments.length;l++)if(n[r].environment==this.searchInput.listEnvironments[l].environment){n[r].fullpath=this.searchInput.listEnvironments[l].url+n[r].path;break}}else n[r].fullpath=n[r].url;else n[r].fullpath=n[r].url;this.resolveObject(n[r],n[r].fullpath,o)}},M.prototype.SetProcessKey=function(e,t){var n=this.myForm.nativeElement[e].options,i=n[n.selectedIndex].value.trim();i&&(this.searchInput.integrationObj.requestObj[t]=i)},M.prototype.switchCase=function(i){for(var r=!1,e=function(t){var e=o.searchInput.switchValue.findIndex(function(e){return e.property==i.conditions[t].property});if("EQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value!=i.conditions[t].value)return r=!1,"break";r=!0}else{var n=localStorage.getItem("Username");if(o.searchInput.switchValue[e].value!=n)return r=!1,"break";r=!0}else if("NEQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value==i.conditions[t].value)return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),o.searchInput.switchValue[e].value==n)return r=!1,"break";r=!0}else if("GT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>n))return r=!1,"break";r=!0}else if("GTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>=n))return r=!1,"break";r=!0}else if("LT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<n))return r=!1,"break";r=!0}else if("LTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<=n))return r=!1,"break";r=!0}},o=this,t=0;t<i.conditions.length&&"break"!==e(t);t++);return r},M.prototype.DecryptString=function(e,t){if(t==undefined||""==t.trim()||e==undefined||""==e.trim())return e;var n=l.enc.Utf8.parse(t),i=l.lib.WordArray.create([0,0,0,0]);return l.AES.decrypt(e,n,{iv:i}).toString(l.enc.Utf8)},M.prototype.checkInputDate=function(t){var e,n,i,r=new Array,o=this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"GT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()});o!=undefined&&(e=""==this.myForm.nativeElement[o.id].min?null:new Date(this.myForm.nativeElement[o.id].min),i=o.label.split(">",2),null!=e&&("GT"==o.restriction.toUpperCase()?(e.setDate(e.getDate()-1),r.push(" must be greater than ")):"GTE"==o.restriction.toUpperCase()&&r.push(" must be greater than or equals to ")));var a=this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"LT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()});a!=undefined&&(n=""==this.myForm.nativeElement[a.id].max?null:new Date(this.myForm.nativeElement[a.id].max),i=a.label.split("<",2),null!=n&&("LT"==a.restriction.toUpperCase()?(n.setDate(n.getDate()+1),r.push(" must be less than ")):"LTE"==a.restriction.toUpperCase()&&r.push(" must be less than or equals to "))),null!=e&&null==n&&new Date(this.myForm.nativeElement[o.id].value)<e?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=n&&null==e&&new Date(this.myForm.nativeElement[a.id].value)>n?(this.toastr.warning(i[0]+r[0]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=e&&null!=n&&(new Date(this.myForm.nativeElement[a.id].value)>n||new Date(this.myForm.nativeElement[o.id].value)<e)?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+" and"+r[1]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):this.dateWrong=!1},M.prototype.selectedOption=function(e,t){t.value=e.key,t.descr=e.value,t.isListHide=!0},M.prototype.isSelected=function(e,t){return e.key==t},M.decorators=[{type:h.Component,args:[{selector:"lib-UCSearch",template:'\x3c!-- Basic form layout section start --\x3e\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 \x3c!-- Ini Digunakan untuk Generate Dynamic Component --\x3e\r\n \x3c!-- [hidden]="isHidden" --\x3e\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 \x3c!-- End Hardcode Lookup didalem--\x3e\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 <input type="text" class="form-control search-form-control dds-input"\r\n name="{{\'ddsValue\'+question.name}}" [(ngModel)]="question.value" readonly\r\n (click)="question.isListHide = !question.isListHide; question.searchText=\'\'">\r\n </div>\r\n <div class="dds-list-container" [hidden]="question.isListHide">\r\n <input type="text" class="form-control" name="{{\'searchText\'+question.name}}" [(ngModel)]="question.searchText"\r\n placeholder="FILTER">\r\n <div class="dds-items-container">\r\n \x3c!-- blm tentu bisa --\x3e\r\n <div class="dds-list-item" (click)="selectedOption({key:\'\',value:\'\'},question)">\r\n Select One\r\n </div>\r\n <div class="dds-list-item"\r\n *ngFor="let item of question?.items | textSearch : question.searchText; let i=index"\r\n (click)="selectedOption(item,question)"\r\n [ngClass]="{\'dds-active\': isSelected(item, question.value)}">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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> <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> <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> <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> <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\x3c!-- // Basic form layout section end --\x3e',providers:[w,f.DatePipe],animations:[r.trigger("changeDivSize",[r.state("initial",r.style({height:"*",opacity:"1"})),r.state("final",r.style({height:"0px",opacity:"0",overflow:"hidden"})),r.transition("initial=>final",r.animate("300ms")),r.transition("final=>initial",r.animate("300ms"))])],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:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],M.ctorParameters=function(){return[{type:t.HttpClient},{type:w},{type:h.Renderer2},{type:undefined,decorators:[{type:h.Inject,args:[n.DOCUMENT]}]},{type:a.ToastrService},{type:s.CookieService},{type:f.DatePipe}]},M.propDecorators={content:[{type:h.ViewChild,args:["enjiForm"]}],myForm:[{type:h.ViewChild,args:["formIdSearch"]}],searchInput:[{type:h.Input}],pageSize:[{type:h.Input}],isReport:[{type:h.Input}],result:[{type:h.Output}],genRpt:[{type:h.Output}],reqGetAllData:[{type:h.Output}]},M);function M(e,t,n,i,r,o,a){this.http=e,this.excelService=t,this._renderer2=n,this._document=i,this.toastr=r,this.cookieService=o,this.datePipe=a,this.searchInput=new I,this.pageSize=10,this.isReport=!1,this.result=new h.EventEmitter,this.genRpt=new h.EventEmitter,this.reqGetAllData=new h.EventEmitter,this.ExportTypeList=[{key:F.EXP_TYPE_PDF,value:"PDF"},{key:F.EXP_TYPE_XLS,value:"Excel 2003"},{key:F.EXP_TYPE_XLSX,value:"Excel 2007"},{key:F.EXP_TYPE_DOC,value:"Document"},{key:F.EXP_TYPE_DOCX,value:"Document XML"}],this.ListOfMonth=new k,this.ListOfYear=new Array,this.ClaimList=[{Key:v.RestrictionIsNotNull,Value:"CLAIMED"},{Key:v.RestrictionIsNull,Value:"UNCLAIMED"}],this.ExportType=0,this.pageNow=1,this.isDataLoaded=!1,this.isHidden=!1,this.BusinessDt=new Date,this.dateWrong=!1,this.readonly=!1,this.currentState="initial",this.countForm=0,this.formattedAmount="",this.amount=0}var L=(O.prototype.transform=function(e,t){return t?e.filter(function(e){return!(!e.value||"string"!=typeof e.value)&&-1<e.value.toLowerCase().indexOf(t.toLowerCase())}):e},O.decorators=[{type:h.Pipe,args:[{name:"textSearch"}]}],O);function O(){}var S={align:"right",allowNegative:!1,allowZero:!0,decimal:".",precision:2,prefix:"",suffix:"",thousands:",",nullable:!1,inputMode:c.CurrencyMaskInputMode.NATURAL},U=(R.decorators=[{type:h.NgModule,args:[{declarations:[C,L],imports:[f.CommonModule,u.FormsModule,p.UcShowErrorsModule,m.UcDirectiveUpperCaseModule,c.NgxCurrencyModule.forRoot(S),d.TranslateModule.forChild()],exports:[C]}]}],R);function R(){}e.UCSearchService=y,e.UCSearchComponent=C,e.customCurrencyMaskConfig=S,e.UCSearchModule=U,e.ɵb=L,e.ɵa=w,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=adins-ucsearch.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://@adins/ucsearch/lib/ucsearch.service.ts","ng://@adins/ucsearch/lib/model/adins-constant.ts","ng://@adins/ucsearch/lib/model/integration-obj.model.ts","ng://@adins/ucsearch/lib/model/input-search-obj.model.ts","ng://@adins/ucsearch/lib/model/criteria-obj.model.ts","ng://@adins/ucsearch/lib/model/request-criteria-obj.model.ts","ng://@adins/ucsearch/lib/services/excel-service/excel-service.ts","ng://@adins/ucsearch/lib/model/key-value-report.model.ts","ng://@adins/ucsearch/lib/model/key-value-uc-search.model.ts","ng://@adins/ucsearch/lib/ucsearch.component.ts","ng://@adins/ucsearch/lib/pipe/text-search.pipe.ts","ng://@adins/ucsearch/lib/ucsearch.module.ts"],"names":["UCSearchService","Injectable","args","providedIn","AdInsConstant","RestrictionBetween","RestrictionLike","RestrictionEq","RestrictionNeq","RestrictionGt","RestrictionGte","RestrictionLt","RestrictionLte","RestrictionIn","RestrictionNotIn","RestrictionOr","RestrictionOrNeq","RestrictionIsNull","RestrictionIsNotNull","RestrictionGTE","RestrictionLTE","showData","JoinTypeInner","JoinTypeLeft","IntegrationObj","this","baseUrl","apiPath","requestObj","Object","leftColumnToJoin","rightColumnToJoin","joinType","InputSearchObj","_url","enviromentUrl","title","apiQryPaging","arrCritObj","addCritInput","Array","listEnvironments","whereValue","fromValue","switchValue","integrationObj","isJoinExAPI","CriteriaObj","low","high","DataType","isCriteriaDataTable","RequestCriteriaObj","includeCount","includeData","isLoading","queryString","rowVersion","ExcelService","prototype","exportAsExcelFile","json","excelFileName","worksheet","XLSX.utils","json_to_sheet","console","log","workbook","Sheets","data","SheetNames","excelBuffer","XLSX.write","bookType","type","saveAsExcelFile","buffer","fileName","Blob","FileSaver.saveAs","Date","getTime","ExportTypeConstant","EXP_TYPE_PDF","EXP_TYPE_XLS","EXP_TYPE_XLSX","EXP_TYPE_DOC","EXP_TYPE_DOCX","ListKeyValueMonth","DictOfMonth","ListOfMonth","push","key","value","UCSearchComponent","defineProperty","content","searchForm","changeState","currentState","isHidden","ngOnInit","apiUrl","searchInput","arrCrit","js","_renderer2","createElement","text","appendChild","_document","body","cookieService","get","BisDt","DecryptString","BusinessDt","initiateForm","_this","getJSON","subscribe","configuration","exportData","exportExcel","exportTypeList","undefined","length","ExportTypeList","ExportType","countForm","component","isDataLoaded","i","isFromURL","request","arrayCrit","criteriaObject","propName","criteriaPropName","criteriaPropValue","restriction","criteria","path","y","environment","fullpath","url","resolveObject","parseFloat","toLocaleString","dtmType","includes","setDefaultValueMonth","items","setMonthDDL","setDefaultValueYear","setYearDDL","ddlType","readonly","businessDate","operator","charAt","dateShow","tempMinus","split","numDay","parseInt","setDate","getDate","dateText","formatDate","toUpperCase","minDate","datePipe","transform","maxDate","setTimeout","j","isEvent","itemsUrl","onChangeEvent","Key","SetRoleOfficeCodes","roleCode","JSON","parse","listOfficeRoleCodes","ddl","myForm","nativeElement","options","selectedIndex","trim","index","element","tempValue","numMonth","setMonth","getMonth","month","equation","match","toMin","toMax","tempEquation","minMax","substring","dictOfMonth","q","sort","a","b","numYear","setFullYear","getFullYear","year","ListOfYear","toString","http","postJSON","post","searchClick","order","orderby","pageNow","search","pageSize","reset","resetForm","pageNo","rowPerPage","orderBy","addCrit","IsQueryIn","IsBreak","querystring","whereQuery","x","fromQuery","critObj","getAttribute","nodeName","label","toastr","warning","name","ddlList","listValue","replace","response","qryPaging","result","emit","reqGetAllData","GenerateReport","genRpt","ElRef","lessThanFour","obj","crit","tempData","ReturnObject","exclude","filter","affectedFilter","transformAmount","formattedAmount","target","transformToDecimal","exportAsXLSX","ExcelData","excelService","error","optValue","afFilter","jsonComp","datatype","filterPropName","SetProcessKey","idx","wfKeyFilter","switchCase","condList","condition","this_1","findIndex","property","conditions","isUser","username","localStorage","getItem","chipperText","chipperKey","chipperKeyArr","CryptoJS.enc","Utf8","iv","CryptoJS.lib","WordArray","create","CryptoJS.AES","decrypt","checkInputDate","minDateVal","maxDateVal","errorMessage","MinComponent","find","id","min","MaxComponent","max","dateWrong","selectedOption","item","descr","isListHide","isSelected","Component","selector","template","providers","DatePipe","animations","trigger","state","style","height","opacity","overflow","transition","animate","HttpClient","Renderer2","Inject","DOCUMENT","ToastrService","CookieService","ViewChild","Input","Output","isReport","EventEmitter","ClaimList","Value","amount","TextSearchPipe","toLowerCase","indexOf","Pipe","customCurrencyMaskConfig","align","allowNegative","allowZero","decimal","precision","prefix","suffix","thousands","nullable","inputMode","CurrencyMaskInputMode","NATURAL","UCSearchModule","NgModule","declarations","imports","CommonModule","FormsModule","UcShowErrorsModule","UcDirectiveUpperCaseModule","NgxCurrencyModule","forRoot","TranslateModule","forChild","exports"],"mappings":"8nCAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KCLF,IAAAI,GACkBA,EAAAC,mBAAqB,UACrBD,EAAAE,gBAAkB,OAClBF,EAAAG,cAAgB,KAChBH,EAAAI,eAAiB,MACjBJ,EAAAK,cAAgB,KAChBL,EAAAM,eAAiB,MACjBN,EAAAO,cAAgB,KAChBP,EAAAQ,eAAiB,MACjBR,EAAAS,cAAgB,KAChBT,EAAAU,iBAAmB,QACnBV,EAAAW,cAAgB,KAChBX,EAAAY,iBAAmB,QACnBZ,EAAAa,kBAAoB,SACpBb,EAAAc,qBAAuB,YACvBd,EAAAe,eAAiB,MACjBf,EAAAgB,eAAiB,MACjBhB,EAAAiB,SAAW,YACXjB,EAAAkB,cAAgB,QAChBlB,EAAAmB,aAAe,OACjCnB,GApBA,SAAAA,KCDA,IAAAoB,EAQI,SAAAA,IACIC,KAAKC,QAAU,GACfD,KAAKE,QAAU,GACfF,KAAKG,WAAa,IAAIC,OACtBJ,KAAKK,iBAAmB,GACxBL,KAAKM,kBAAoB,GACzBN,KAAKO,SAAW5B,EAAckB,eCZtCW,EAcI,SAAAA,IACIR,KAAKS,KAAO,GACZT,KAAKU,cAAgB,GACrBV,KAAKW,MAAQ,GACbX,KAAKY,aAAe,GACpBZ,KAAKa,WAAa,KAClBb,KAAKc,aAAe,IAAIC,MACxBf,KAAKgB,iBAAmB,IAAID,MAC5Bf,KAAKiB,WAAa,IAAIF,MACtBf,KAAKkB,UAAY,IAAIH,MACrBf,KAAKmB,YAAc,IAAIJ,MACvBf,KAAKoB,eAAiB,IAAIrB,EAC1BC,KAA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f8N,EAAK9N,SACmC,EAAvD8N,EAAK9N,MAAM+P,cAAcC,QAAQjP,EAAKgP,iBAJxCnM,uBAPZqM,EAAAA,KAAI7V,KAAA,CAAC,CACJoP,KAAM,iBAgBRsG,GAjBA,SAAAA,KCQA,IAAaI,EAA2B,CACtCC,MAAO,QACPC,eAAe,EACfC,WAAW,EACXC,QAAS,IACTC,UAAW,EACXC,OAAQ,GACRC,OAAQ,GACRC,UAAW,IACXC,UAAU,EACVC,UAAWC,EAAAA,sBAAsBC,SAEnCC,uBAACC,EAAAA,SAAQ5W,KAAA,CAAC,CACR6W,aAAc,CAAChR,EAAkB6P,GACjCoB,QAAS,CACPC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,mBACAC,EAAAA,2BACAC,EAAAA,kBAAkBC,QAAQtB,GAC1BuB,EAAAA,gBAAgBC,YAElBC,QAAS,CAAC1R,OAEkB8Q,GAZ9B,SAAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UCSearchService {\r\n\r\n constructor() { }\r\n}\r\n","import { formatDate } from \"@angular/common\";\r\n\r\nexport class AdInsConstant {\r\n public static RestrictionBetween = \"Between\"\r\n public static RestrictionLike = \"Like\";\r\n public static RestrictionEq = \"Eq\";\r\n public static RestrictionNeq = \"NEQ\";\r\n public static RestrictionGt = \"GT\";\r\n public static RestrictionGte = \"GTE\";\r\n public static RestrictionLt = \"LT\";\r\n public static RestrictionLte = \"LTE\";\r\n public static RestrictionIn = \"IN\";\r\n public static RestrictionNotIn = \"NotIn\";\r\n public static RestrictionOr = \"Or\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionOrNeq = \"OrNeq\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionIsNull = \"ISNULL\";\r\n public static RestrictionIsNotNull = \"ISNOTNULL\";\r\n public static RestrictionGTE = \"GTE\";\r\n public static RestrictionLTE = \"LTE\";\r\n public static showData = \"10,50,100\";\r\n public static JoinTypeInner = \"INNER\";\r\n public static JoinTypeLeft = \"LEFT\";\r\n}\r\n","import { AdInsConstant } from \"./adins-constant\";\r\nexport class IntegrationObj {\r\n baseUrl: string;\r\n apiPath: string;\r\n requestObj: Object;\r\n leftColumnToJoin: string;\r\n rightColumnToJoin: string;\r\n joinType: string;\r\n \r\n constructor() {\r\n this.baseUrl = \"\";\r\n this.apiPath = \"\";\r\n this.requestObj = new Object();\r\n this.leftColumnToJoin = \"\";\r\n this.rightColumnToJoin = \"\";\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { CriteriaObj } from \"./criteria-obj.model\";\r\nimport { IntegrationObj } from \"./integration-obj.model\";\r\n \r\nexport class InputSearchObj {\r\n _url: string;\r\n enviromentUrl: string;\r\n title: string;\r\n apiQryPaging: string;\r\n arrCritObj: any;\r\n addCritInput: Array<CriteriaObj>;\r\n listEnvironments: Array<EnvisObj>;\r\n whereValue: Array<WhereValueObj>;\r\n fromValue: Array<FromValueObj>;\r\n switchValue: Array<SwitchValueObj>;\r\n integrationObj: IntegrationObj;\r\n isJoinExAPI: boolean;\r\n \r\n constructor() {\r\n this._url = \"\";\r\n this.enviromentUrl = \"\";\r\n this.title = \"\";\r\n this.apiQryPaging = \"\";\r\n this.arrCritObj = null;\r\n this.addCritInput = new Array<CriteriaObj>();\r\n this.listEnvironments = new Array<EnvisObj>();\r\n this.whereValue = new Array<WhereValueObj>();\r\n this.fromValue = new Array<FromValueObj>();\r\n this.switchValue = new Array<SwitchValueObj>();\r\n this.integrationObj = new IntegrationObj();\r\n this.isJoinExAPI = false;\r\n }\r\n}\r\n\r\nexport class EnviObj {\r\n name: string;\r\n environment: string;\r\n\r\n constructor() {\r\n this.name = \"\";\r\n this.environment = \"\";\r\n }\r\n}\r\n\r\nexport class WhereValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class FromValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class SwitchValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class EnvisObj {\r\n environment: string;\r\n url: string;\r\n\r\n constructor() {\r\n this.environment = \"\";\r\n this.url = \"\";\r\n }\r\n}","export class CriteriaObj { \r\n propName: string;\r\n restriction: string;\r\n value: string;\r\n low: number;\r\n high: number;\r\n DataType: string;\r\n listValue: Array<any>;\r\n isCriteriaDataTable: boolean;\r\n\r\n constructor() {\r\n this.low = 0;\r\n this.high = 0;\r\n this.DataType = 'Text';\r\n this.isCriteriaDataTable = false;\r\n }\r\n\r\n}","import { AdInsConstant } from \"./adins-constant\";\r\nimport { CriteriaObj } from \"./criteria-obj.model\";\r\nimport { IntegrationObj } from \"./integration-obj.model\";\r\n \r\nexport class RequestCriteriaObj{\r\n includeCount:boolean;\r\n includeData:boolean;\r\n pageNo:number;\r\n rowPerPage:number;\r\n orderBy:any;\r\n criteria:CriteriaObj[];\r\n isLoading : boolean;\r\n queryString: any;\r\n rowVersion: any;\r\n integrationObj: IntegrationObj;\r\n joinType: string;\r\n\r\n constructor()\r\n {\r\n this.includeCount=true;\r\n this.includeData=true;\r\n this.isLoading = true;\r\n this.queryString = '';\r\n this.rowVersion = '';\r\n this.integrationObj = new IntegrationObj();\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport * as FileSaver from 'file-saver';\r\nimport * as XLSX from 'xlsx';\r\n\r\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\r\nconst EXCEL_EXTENSION = '.xlsx';\r\n\r\n@Injectable()\r\nexport class ExcelService {\r\n\r\n constructor() { }\r\n\r\n public exportAsExcelFile(json: any[], excelFileName: string): void {\r\n \r\n const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);\r\n console.log('worksheet',worksheet);\r\n const workbook: XLSX.WorkBook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\r\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\r\n //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });\r\n this.saveAsExcelFile(excelBuffer, excelFileName);\r\n }\r\n\r\n private saveAsExcelFile(buffer: any, fileName: string): void {\r\n const data: Blob = new Blob([buffer], {\r\n type: EXCEL_TYPE\r\n });\r\n FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);\r\n }\r\n\r\n}","export class KeyValueReportObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ExportTypeConstant {\r\n public static EXP_TYPE_PDF = 0;\r\n public static EXP_TYPE_XLS = 1;\r\n public static EXP_TYPE_XLSX = 2;\r\n public static EXP_TYPE_DOC = 3;\r\n public static EXP_TYPE_DOCX = 4;\r\n}","export class KeyValueUCSearchObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ListKeyValueMonth {\r\n ListOfMonth: Array<KeyValueUCSearchObj>;\r\n DictOfMonth: { [month: number]: string } = {};\r\n constructor() {\r\n this.ListOfMonth = new Array<KeyValueUCSearchObj>();\r\n this.DictOfMonth = {}\r\n this.ListOfMonth.push({ key: 1, value: \"January\" });\r\n this.DictOfMonth[1]= \"January\";\r\n this.ListOfMonth.push({ key: 2, value: \"February\" });\r\n this.DictOfMonth[2]= \"February\";\r\n this.ListOfMonth.push({ key: 3, value: \"March\" });\r\n this.DictOfMonth[3]= \"March\";\r\n this.ListOfMonth.push({ key: 4, value: \"April\" });\r\n this.DictOfMonth[4]= \"April\";\r\n this.ListOfMonth.push({ key: 5, value: \"May\" });\r\n this.DictOfMonth[5]= \"May\";\r\n this.ListOfMonth.push({ key: 6, value: \"June\" });\r\n this.DictOfMonth[6]= \"June\";\r\n this.ListOfMonth.push({ key: 7, value: \"July\" });\r\n this.DictOfMonth[7]= \"July\";\r\n this.ListOfMonth.push({ key: 8, value: \"August\" });\r\n this.DictOfMonth[8]= \"August\";\r\n this.ListOfMonth.push({ key: 9, value: \"September\" });\r\n this.DictOfMonth[9]= \"September\";\r\n this.ListOfMonth.push({ key: 10, value: \"October\" });\r\n this.DictOfMonth[10]= \"October\";\r\n this.ListOfMonth.push({ key: 11, value: \"November\" });\r\n this.DictOfMonth[11]= \"November\";\r\n this.ListOfMonth.push({ key: 12, value: \"December\" });\r\n this.DictOfMonth[12]= \"December\";\r\n }\r\n}","import { Component, OnInit, Input, ViewChild, ElementRef, Inject, Renderer2, EventEmitter, Output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormGroup, NgForm } from '@angular/forms';\r\nimport { DatePipe, formatDate } from '@angular/common';\r\nimport { InputSearchObj } from './model/input-search-obj.model';\r\nimport { CriteriaObj } from './model/criteria-obj.model';\r\nimport { RequestCriteriaObj } from './model/request-criteria-obj.model';\r\nimport { AdInsConstant } from './model/adins-constant';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { ExcelService } from './services/excel-service/excel-service';\r\nimport { trigger, transition, style, animate, state } from '@angular/animations';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ExportTypeConstant, KeyValueReportObj } from './model/key-value-report.model';\r\nimport { CookieService } from 'ngx-cookie';\r\nimport * as CryptoJS from 'crypto-js';\r\nimport { KeyValueUCSearchObj, ListKeyValueMonth } from './model/key-value-uc-search.model';\r\n\r\n@Component({\r\n selector: 'lib-UCSearch',\r\n templateUrl: './ucsearch.component.html',\r\n styleUrls: ['./ucsearch.component.css'],\r\n providers: [ExcelService, DatePipe],\r\n animations: [\r\n trigger('changeDivSize', [\r\n state('initial', style({\r\n height: '*',\r\n opacity: '1',\r\n })),\r\n state('final', style({\r\n height: '0px',\r\n opacity: '0',\r\n overflow: 'hidden',\r\n })),\r\n transition('initial=>final', animate('300ms')),\r\n transition('final=>initial', animate('300ms'))\r\n ]),\r\n ]\r\n})\r\nexport class UCSearchComponent implements OnInit {\r\n // trus nad, bisa ga kalo misalkan gw mau bikin\r\n // kalo login di cabang IsSelectOne: true\r\n // kalo login di HO, IsSelectOne: false\r\n @ViewChild('enjiForm') set content(content: NgForm) {\r\n if (content) { // initially setter gets called with undefined\r\n this.searchForm = content;\r\n }\r\n }\r\n\r\n @ViewChild('formIdSearch') myForm: ElementRef;\r\n @Input() searchInput: InputSearchObj = new InputSearchObj();\r\n @Input() pageSize: number = 10;\r\n @Input() isReport: boolean = false;\r\n @Output() result: EventEmitter<any> = new EventEmitter();\r\n @Output() genRpt: EventEmitter<{ ExportType: number, ElRef: ElementRef }> = new EventEmitter<{ ExportType: number, ElRef: ElementRef }>();\r\n @Output() reqGetAllData: EventEmitter<any> = new EventEmitter();\r\n ExportTypeList: Array<KeyValueReportObj> = [\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_PDF,\r\n value: \"PDF\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLS,\r\n value: \"Excel 2003\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLSX,\r\n value: \"Excel 2007\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOC,\r\n value: \"Document\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOCX,\r\n value: \"Document XML\"\r\n },\r\n ];\r\n ListOfMonth: ListKeyValueMonth = new ListKeyValueMonth();\r\n ListOfYear: Array<KeyValueUCSearchObj> = new Array<KeyValueUCSearchObj>();\r\n ClaimList: Array<any> = [\r\n {\r\n Key: AdInsConstant.RestrictionIsNotNull,\r\n Value: \"CLAIMED\"\r\n },\r\n {\r\n Key: AdInsConstant.RestrictionIsNull,\r\n Value: \"UNCLAIMED\"\r\n },\r\n ];\r\n\r\n ExportType: number = 0;\r\n\r\n pageNow: any = 1;\r\n configuration: any;\r\n exportData: any;\r\n ExcelData: any;\r\n isDataLoaded: boolean = false;\r\n isHidden: boolean = false;\r\n BisDt: string;\r\n BusinessDt: Date = new Date();\r\n dateWrong: boolean = false;\r\n readonly: boolean = false;\r\n\r\n currentState = 'initial';\r\n\r\n form: FormGroup;\r\n countForm = 0;\r\n formattedAmount = '';\r\n amount = 0;\r\n apiUrl: string;\r\n arrCrit: any;\r\n searchForm: NgForm;\r\n\r\n constructor(private http: HttpClient, private excelService: ExcelService, private _renderer2: Renderer2,\r\n @Inject(DOCUMENT) private _document, public toastr: ToastrService, private cookieService: CookieService,\r\n private datePipe: DatePipe) {\r\n }\r\n\r\n changeState() {\r\n this.currentState = this.currentState === 'initial' ? 'final' : 'initial';\r\n this.isHidden = this.isHidden === false ? true : false;\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"ucsearch\");\r\n this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;\r\n this.arrCrit = this.searchInput.arrCritObj;\r\n let js = this._renderer2.createElement('script');\r\n js.text = `\r\n $(document).ready(function(){\r\n $(\"#flip\").click(function(){\r\n $(\"#panel\").slideToggle(\"slow\");\r\n });\r\n });\r\n `;\r\n this._renderer2.appendChild(this._document.body, js);\r\n\r\n let value = this.cookieService.get('BusinessDateRaw');\r\n this.BisDt = this.DecryptString(value, \"AdInsFOU12345678\");\r\n this.BusinessDt = new Date(this.BisDt);\r\n this.initiateForm();\r\n }\r\n\r\n initiateForm() {\r\n this.getJSON(this.searchInput._url).subscribe(data => {\r\n this.configuration = data;\r\n this.exportData = data.exportExcel;\r\n if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {\r\n this.ExportTypeList = data.exportTypeList;\r\n this.ExportType = this.ExportTypeList[0].key;\r\n }\r\n\r\n this.countForm = data.component.length;\r\n this.isDataLoaded = true;\r\n\r\n if (this.searchInput.title != undefined && this.searchInput.title != \"\") {\r\n this.configuration.title = this.searchInput.title;\r\n }\r\n\r\n for (let i = 0; i < this.countForm; i++) {\r\n //ini kalau datanya di load dari URL\r\n if (data.component[i].isFromURL == true) {\r\n let request = new RequestCriteriaObj();\r\n let arrayCrit = new Array();\r\n let criteriaObject = new CriteriaObj();\r\n criteriaObject.DataType = \"text\";\r\n criteriaObject.propName = data.component[i].criteriaPropName;\r\n criteriaObject.value = data.component[i].criteriaPropValue;\r\n criteriaObject.restriction = \"eq\";\r\n arrayCrit.push(criteriaObject);\r\n request.criteria = arrayCrit;\r\n request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;\r\n\r\n // Pengecekan penggunaan url atau path\r\n if (data.component[i].path != undefined && data.component[i].path != \"\") {\r\n if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (data.component[i].environment == this.searchInput.listEnvironments[y].environment) {\r\n data.component[i].fullpath = this.searchInput.listEnvironments[y].url + data.component[i].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya\r\n //biar tiap function ada state2nya sendiri\r\n this.resolveObject(data.component[i], data.component[i].fullpath, request);\r\n }\r\n\r\n if (data.component[i].type == \"numeric\") {\r\n data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');\r\n }\r\n\r\n //pengecekan ddl\r\n if (data.component[i].type == \"dropdown\") {\r\n if (data.component[i].dtmType != undefined) {\r\n if (data.component[i].dtmType.includes(\"month\")) {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.setDefaultValueMonth(data.component[i].value);\r\n }\r\n data.component[i].items = this.setMonthDDL(data.component[i].dtmType);\r\n }\r\n if (data.component[i].dtmType.includes(\"year\")) {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.setDefaultValueYear(data.component[i].value);\r\n }\r\n data.component[i].items = this.setYearDDL(data.component[i].dtmType);\r\n }\r\n }\r\n }\r\n if (!data.component[i].value) {\r\n data.component[i].value = \"\";\r\n if (data.component[i].ddlType == 'all') data.component[i].value = \"all\";\r\n if (data.component[i].ddlType == 'one') data.component[i].value = \"one\";\r\n }\r\n //pengecekan tanggal\r\n if (data.component[i].type == \"datepicker\") {\r\n this.readonly = data.component[i].readonly\r\n\r\n if (data.component[i].value.includes(\"BD\")) {\r\n let businessDate = new Date();\r\n if (this.BisDt != null) {\r\n businessDate = new Date(this.BisDt);\r\n }\r\n let operator = data.component[i].value.charAt(2);\r\n let dateShow = new Date();\r\n if (operator == \"-\") {\r\n let tempMinus = data.component[i].value.split(\"-\", 2);\r\n let numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() - numDay);\r\n }\r\n else if (operator == \"+\") {\r\n let tempMinus = data.component[i].value.split(\"+\", 2);\r\n let numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() + numDay);\r\n }\r\n dateShow = businessDate;\r\n let dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US')\r\n data.component[i].value = dateText;\r\n }\r\n\r\n if (this.readonly = false) {\r\n if (data.component[i].restriction != undefined && data.component[i].restriction != \"\") {\r\n if (data.component[i].restriction.toUpperCase() == \"GT\") {\r\n let minDate = new Date(this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));\r\n minDate.setDate(minDate.getDate() + 1);\r\n data.component[i].minDate = minDate;\r\n } else if (data.component[i].restriction.toUpperCase() == \"LT\") {\r\n let maxDate = new Date(this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));\r\n maxDate.setDate(maxDate.getDate() - 1);\r\n data.component[i].maxDate = maxDate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n for (let j = 0; j < this.countForm; j++) {\r\n if (data.component[j].isEvent == true && this.configuration.component[j].itemsUrl.length == 1) {\r\n this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);\r\n }\r\n if (data.component[j].type == \"officeRoleCodes\" && this.configuration.component[j].itemsUrl.length > 0) {\r\n this.SetRoleOfficeCodes(j);\r\n }\r\n }\r\n }, 1000);\r\n });\r\n }\r\n\r\n SetRoleOfficeCodes(i: number) {\r\n let value: string = this.cookieService.get(\"UserAccess\");\r\n let userAccess: string = JSON.parse(this.DecryptString(value, \"AdInsFOU12345678\"));\r\n let roleCode: string = userAccess[\"RoleCode\"];\r\n let listOfficeRoleCodes: Array<string> = new Array();\r\n listOfficeRoleCodes.push(roleCode);\r\n let component = this.myForm.nativeElement[i];\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (this.configuration.component[i].itemsUrl.length == 1 || (this.configuration.component[i].ddlType == 'all' && text == 'all')) {\r\n for (let index = 0; index < this.configuration.component[i].itemsUrl.length; index++) {\r\n const element = this.configuration.component[i].itemsUrl[index];\r\n listOfficeRoleCodes.push(element.Key);\r\n listOfficeRoleCodes.push(roleCode + \"-\" + element.Key);\r\n }\r\n } else {\r\n listOfficeRoleCodes.push(text);\r\n listOfficeRoleCodes.push(roleCode + \"-\" + text);\r\n }\r\n\r\n this.searchInput.integrationObj.requestObj[\"OfficeRoleCodes\"] = listOfficeRoleCodes;\r\n }\r\n\r\n setDefaultValueMonth(value) {\r\n let businessDate = new Date(this.BusinessDt);\r\n let operator = value.charAt(2);\r\n let tempValue = value.split(operator, 2);\r\n let numMonth = parseInt(tempValue[1]);\r\n if (!numMonth) numMonth = 1;\r\n if (operator == \"-\") {\r\n businessDate.setMonth(businessDate.getMonth() - numMonth);\r\n }\r\n else if (operator == \"+\") {\r\n businessDate.setMonth(businessDate.getMonth() + numMonth);\r\n }\r\n return businessDate.getMonth();\r\n }\r\n setMonthDDL(month) {\r\n let ListOfMonth: Array<KeyValueUCSearchObj>;\r\n let equation = month.match(\"[\\\\/+][-]|[-][\\\\/+]|\\\\/+|-\");\r\n let toMin: number = this.BusinessDt.getMonth();\r\n let toMax: number = this.BusinessDt.getMonth();\r\n let tempEquation = equation[0];\r\n let minMax: number = parseInt(month.substring(equation.index + equation[0].length));\r\n if (minMax >= 12) return this.ListOfMonth.ListOfMonth;\r\n if ((tempEquation == \"+-\" || tempEquation == \"-+\") && minMax >= 6) return this.ListOfMonth.ListOfMonth;\r\n let dictOfMonth: { [month: number]: string } = this.ListOfMonth.DictOfMonth;\r\n ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });\r\n\r\n for (let q = 0; q < minMax; q++) {\r\n if (tempEquation.includes(\"-\")) {\r\n toMin--;\r\n if (toMin == 0) toMin = 12;\r\n ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });\r\n }\r\n if (tempEquation.includes(\"+\")) {\r\n toMax++;\r\n if (toMax == 13) toMax = 1;\r\n ListOfMonth.push({ key: toMax, value: dictOfMonth[toMax] });\r\n }\r\n }\r\n ListOfMonth.sort((a, b) => {\r\n return a.key - b.key;\r\n });\r\n return ListOfMonth;\r\n }\r\n\r\n setDefaultValueYear(value) {\r\n let businessDate = new Date(this.BusinessDt);\r\n let operator = value.charAt(2);\r\n let tempValue = value.split(operator, 2);\r\n let numYear = parseInt(tempValue[1]);\r\n if (!numYear) numYear = 1;\r\n if (operator == \"-\") {\r\n businessDate.setFullYear(businessDate.getFullYear() - numYear);\r\n }\r\n else if (operator == \"+\") {\r\n businessDate.setFullYear(businessDate.getFullYear() + numYear);\r\n }\r\n return businessDate.getFullYear();\r\n }\r\n setYearDDL(year) {\r\n this.ListOfYear = new Array<KeyValueUCSearchObj>();\r\n let equation = year.match(\"[\\\\/+][-]|[-][\\\\/+]|\\\\/+|-\");\r\n let toMin: number = this.BusinessDt.getFullYear();\r\n let toMax: number = this.BusinessDt.getFullYear();\r\n let minMax: number = parseInt(year.substring(equation.index + equation[0].length));\r\n this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });\r\n\r\n for (let q = 0; q < minMax; q++) {\r\n if (equation[0] == \"-+\" || equation[0] == \"+-\") {\r\n toMin--;\r\n toMax++;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });\r\n } else if (equation[0] == \"-\") {\r\n toMin--;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() });\r\n } else if (equation[0] == \"+\") {\r\n toMax++;\r\n this.ListOfYear.push({ key: toMax, value: toMax.toString() });\r\n }\r\n }\r\n this.ListOfYear.sort((a, b) => {\r\n return a.key - b.key;\r\n });\r\n return this.ListOfYear;\r\n }\r\n\r\n public getJSON(url: string): Observable<any> {\r\n return this.http.get(url);\r\n }\r\n\r\n public postJSON(url: string, criteria: any = null): Observable<any> {\r\n return this.http.post(url, criteria);\r\n }\r\n\r\n searchClick() {\r\n // for(let i=0;i<this.countForm;i++){\r\n // if(this.configuration.component[i].type == \"datepicker\"){\r\n // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){\r\n // this.checkInputDate(this.configuration.component[i]);\r\n // }\r\n // }\r\n // }\r\n // if(this.dateWrong) return;\r\n\r\n let order = null;\r\n if (this.configuration.orderby != null) {\r\n order = {\r\n key: this.configuration.orderby.key,\r\n value: this.configuration.orderby.value\r\n }\r\n }\r\n this.pageNow = 1;\r\n this.search(this.apiUrl, this.pageNow, this.pageSize, order, this.arrCrit);\r\n }\r\n\r\n reset() {\r\n this.searchForm.resetForm({\r\n ExportType: this.ExportTypeList[0].key\r\n });\r\n this.initiateForm();\r\n }\r\n\r\n search(apiUrl: string, pageNo: number, rowPerPage: number, orderBy: any, addCrit: CriteriaObj[] = new Array()) {\r\n let request = new RequestCriteriaObj();\r\n let arrCrit = new Array();\r\n let IsQueryIn = false;\r\n let IsBreak = false;\r\n\r\n // Inject whereQuery for where criteria\r\n if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {\r\n this.configuration.querystring.whereQuery = new Array<any>();\r\n for (let x = 0; x < this.searchInput.whereValue.length; x++) {\r\n this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);\r\n }\r\n }\r\n if (this.searchInput.fromValue != undefined && this.searchInput.fromValue.length != 0) {\r\n this.configuration.querystring.fromQuery = new Array<any>();\r\n for (let x = 0; x < this.searchInput.fromValue.length; x++) {\r\n this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[x].value);\r\n }\r\n }\r\n request.pageNo = pageNo;\r\n request.rowPerPage = rowPerPage;\r\n request.orderBy = orderBy;\r\n request.queryString = this.configuration.querystring;\r\n\r\n for (let i = 0; i < this.countForm; i++) {\r\n let critObj = new CriteriaObj();\r\n let component = this.myForm.nativeElement[i];\r\n\r\n // // popup message if required\r\n // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == \"true\") {\r\n // let val = component.value.trim();\r\n // if (val == \"\") {\r\n // IsBreak = true;\r\n // let label = component.getAttribute('label');\r\n // this.toastr.warning(\"Please input \" + label);\r\n // break;\r\n // }\r\n // }\r\n\r\n critObj.DataType = component.getAttribute('data-type');\r\n //Ini khusus kalau dari Drop Down\r\n if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == \"true\") {\r\n IsQueryIn = true;\r\n }\r\n else {\r\n IsQueryIn = false;\r\n }\r\n if (component.value != \"\") {\r\n if (component.nodeName == 'SELECT') {\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (text == \"one\") {\r\n IsBreak = true;\r\n let label = component.getAttribute('label');\r\n this.toastr.warning(\"Please select \" + label);\r\n break;\r\n }\r\n\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n\r\n if (this.configuration.component[i].type == \"taskDefinitionKey\" ||\r\n this.configuration.component[i].type == \"processKey\")\r\n continue;\r\n\r\n if (this.configuration.component[i].type == \"claim\") {\r\n critObj.propName = component.getAttribute('data-name');\r\n critObj.restriction = text;\r\n critObj.value = null;\r\n arrCrit.push(critObj);\r\n } else {\r\n if (text != \"all\" && text != \"one\") {\r\n //Kalau Dari Dropdown udah pasti pake Eq\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.value = text;\r\n arrCrit.push(critObj);\r\n } else if (text == \"all\" && IsQueryIn == true && component.options.length != 0) {\r\n let ddlList = new Array();\r\n for (let x = 0; x < component.options.length; x++) {\r\n if (x != 0) {\r\n ddlList.push(component.options[x].value);\r\n }\r\n }\r\n if (ddlList.length != 0) {\r\n critObj.restriction = AdInsConstant.RestrictionIn;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.listValue = ddlList;\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.value = component.value.trim();\r\n if (component.value.includes(\"%\")) {\r\n critObj.restriction = AdInsConstant.RestrictionLike;\r\n }\r\n //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya\r\n else if (component.getAttribute('data-restriction') != \"\" && component.getAttribute('data-restriction') != null) {\r\n critObj.restriction = component.getAttribute('data-restriction');\r\n if (component.getAttribute('data-type') == 'numeric') {\r\n critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();\r\n }\r\n if (critObj.restriction.toUpperCase() == \"LIKE\") {\r\n critObj.value = \"%\" + component.value.trim() + \"%\";\r\n critObj.restriction = AdInsConstant.RestrictionLike\r\n }\r\n }\r\n else {\r\n critObj.restriction = AdInsConstant.RestrictionEq\r\n }\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n\r\n if (IsBreak) {\r\n return;\r\n }\r\n\r\n if (addCrit != null && addCrit != undefined) {\r\n if (addCrit.length != 0) {\r\n for (let i = 0; i < addCrit.length; i++) {\r\n arrCrit.push(addCrit[i]);\r\n }\r\n } else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (let i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n }\r\n else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (let i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n\r\n request.criteria = arrCrit;\r\n\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(apiUrl, request).subscribe((response) => {\r\n let qryPaging = {\r\n response: response,\r\n pageNow: pageNo\r\n }\r\n console.log(qryPaging);\r\n this.result.emit(qryPaging);\r\n this.reqGetAllData.emit(request);\r\n return response;\r\n });\r\n }\r\n\r\n GenerateReport() {\r\n this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });\r\n }\r\n\r\n lessThanFour(): boolean {\r\n if (this.countForm > 3) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n resolveObject(obj: any, url: string, crit: RequestCriteriaObj = null) {\r\n const val = this.postJSON(url, crit);\r\n val.subscribe(tempData => {\r\n obj.itemsUrl = new Array();\r\n obj.itemsUrl = tempData.ReturnObject;\r\n\r\n if (obj.exclude != undefined && obj.exclude != \"\") {\r\n obj.itemsUrl = obj.itemsUrl.filter((value) => !obj.exclude.includes(value.Key));\r\n }\r\n\r\n if (obj.affectedFilter && obj.itemsUrl.length == 1) {\r\n this.onChangeEvent(obj.itemsUrl[0].Key, obj);\r\n }\r\n });\r\n }\r\n\r\n transformAmount(element: any) {\r\n this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');\r\n // to show the formatted amount in the textbox.\r\n element.target.value = this.formattedAmount;\r\n }\r\n\r\n transformToDecimal(element: any) {\r\n element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));\r\n }\r\n\r\n exportAsXLSX(): void {\r\n let request = new RequestCriteriaObj();\r\n request.pageNo = 1;\r\n request.rowPerPage = 9999;\r\n request.orderBy = null;\r\n request.criteria = [];\r\n request.queryString = this.configuration.querystring;\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(this.apiUrl, request).subscribe(\r\n response => {\r\n this.ExcelData = response[\"Data\"];\r\n this.excelService.exportAsExcelFile(this.ExcelData, 'sample');\r\n },\r\n (error) => {\r\n console.log(error);\r\n });\r\n }\r\n\r\n onChangeEvent(optValue, afFilter) {\r\n let jsonComp = this.configuration.component;\r\n\r\n for (let i = 0; i < afFilter.affectedFilter.length; i++) {\r\n for (let j = 0; j < jsonComp.length; j++) {\r\n if (jsonComp[j].name == afFilter.affectedFilter[i]) {\r\n let request = new RequestCriteriaObj();\r\n let arrayCrit = new Array();\r\n\r\n if (optValue != \"all\" && optValue != \"one\") {\r\n let critObj = new CriteriaObj();\r\n critObj.DataType = afFilter.datatype;\r\n if (afFilter.filterPropName != undefined || afFilter.filterPropName != \"\") {\r\n request[afFilter.filterPropName] = optValue;\r\n critObj.propName = afFilter.filterPropName;\r\n } else {\r\n critObj.propName = afFilter.name;\r\n request[afFilter.name] = optValue;\r\n }\r\n critObj.value = optValue;\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n arrayCrit.push(critObj);\r\n }\r\n request.criteria = arrayCrit;\r\n if (jsonComp[j].path != undefined && jsonComp[j].path != \"\") {\r\n if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (jsonComp[j].environment == this.searchInput.listEnvironments[y].environment) {\r\n jsonComp[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp[j].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);\r\n }\r\n }\r\n }\r\n }\r\n\r\n SetProcessKey(idx: number, wfKeyFilter: string) {\r\n let component = this.myForm.nativeElement[idx];\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (text) {\r\n this.searchInput.integrationObj.requestObj[wfKeyFilter] = text;\r\n }\r\n }\r\n\r\n switchCase(condList) {\r\n let condition = false;\r\n\r\n for (let i = 0; i < condList.conditions.length; i++) {\r\n let idx = this.searchInput.switchValue.findIndex(x => x.property == condList.conditions[i].property);\r\n if (condList.conditions[i].restriction == \"EQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value == username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NEQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value != username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value > username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value >= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value < username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value <= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return condition;\r\n\r\n }\r\n\r\n private DecryptString(chipperText: string, chipperKey: string) {\r\n if (\r\n chipperKey == undefined || chipperKey.trim() == '' ||\r\n chipperText == undefined || chipperText.trim() == ''\r\n ) return chipperText;\r\n let chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);\r\n let iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);\r\n let decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });\r\n let plainText = decrypted.toString(CryptoJS.enc.Utf8);\r\n return plainText;\r\n }\r\n\r\n checkInputDate(component: any) {\r\n let minDateVal;\r\n let maxDateVal;\r\n let label;\r\n let errorMessage = new Array<string>();\r\n\r\n let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\"));\r\n if (MinComponent != undefined) {\r\n minDateVal = this.myForm.nativeElement[MinComponent.id].min == \"\" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);\r\n label = MinComponent.label.split(\">\", 2);\r\n if (minDateVal != null) {\r\n if (MinComponent.restriction.toUpperCase() == \"GT\") {\r\n minDateVal.setDate(minDateVal.getDate() - 1);\r\n errorMessage.push(\" must be greater than \");\r\n } else if (MinComponent.restriction.toUpperCase() == \"GTE\") {\r\n errorMessage.push(\" must be greater than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\"));\r\n if (MaxComponent != undefined) {\r\n maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == \"\" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);\r\n label = MaxComponent.label.split(\"<\", 2);\r\n if (maxDateVal != null) {\r\n if (MaxComponent.restriction.toUpperCase() == \"LT\") {\r\n maxDateVal.setDate(maxDateVal.getDate() + 1);\r\n errorMessage.push(\" must be less than \");\r\n } else if (MaxComponent.restriction.toUpperCase() == \"LTE\") {\r\n errorMessage.push(\" must be less than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (minDateVal != null && maxDateVal != null) {\r\n if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \" and\" + errorMessage[1] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n }\r\n\r\n selectedOption(item: { key: string, value: string },crit:any) {\r\n crit.value = item.key;\r\n crit.descr = item.value;\r\n crit.isListHide = true;\r\n }\r\n\r\n isSelected(item: { key: string, value: string }, value: string) {\r\n return item.key == value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'textSearch'\r\n})\r\nexport class TextSearchPipe implements PipeTransform {\r\n\r\n transform(items: any[], text?: any): any {\r\n if(!text){\r\n return items;\r\n }\r\n return items.filter((item)=>{\r\n if(item.value && typeof item.value === 'string'){\r\n return item.value.toLowerCase().indexOf(text.toLowerCase())> -1;\r\n }\r\n return false;\r\n })\r\n }\r\n\r\n}","import { NgModule } from '@angular/core';\r\nimport { UCSearchComponent } from './ucsearch.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { UcShowErrorsModule } from '@adins/uc-show-errors';\r\nimport { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';\r\nimport { TextSearchPipe } from './pipe/text-search.pipe';\r\n\r\nexport const customCurrencyMaskConfig = { \r\n align: \"right\",\r\n allowNegative: false,\r\n allowZero: true,\r\n decimal: \".\",\r\n precision: 2,\r\n prefix: \"\",\r\n suffix: \"\",\r\n thousands: \",\",\r\n nullable: false,\r\n inputMode: CurrencyMaskInputMode.NATURAL };\r\n\r\n@NgModule({\r\n declarations: [UCSearchComponent,TextSearchPipe],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n UcShowErrorsModule,\r\n UcDirectiveUpperCaseModule,\r\n NgxCurrencyModule.forRoot(customCurrencyMaskConfig),\r\n TranslateModule.forChild()\r\n ],\r\n exports: [UCSearchComponent]\r\n})\r\nexport class UCSearchModule { }\r\n"]}
|
|
1
|
+
{"version":3,"sources":["ng://@adins/ucsearch/lib/ucsearch.service.ts","ng://@adins/ucsearch/lib/model/adins-constant.ts","ng://@adins/ucsearch/lib/model/integration-obj.model.ts","ng://@adins/ucsearch/lib/model/input-search-obj.model.ts","ng://@adins/ucsearch/lib/model/criteria-obj.model.ts","ng://@adins/ucsearch/lib/model/request-criteria-obj.model.ts","ng://@adins/ucsearch/lib/services/excel-service/excel-service.ts","ng://@adins/ucsearch/lib/model/key-value-report.model.ts","ng://@adins/ucsearch/lib/model/key-value-uc-search.model.ts","ng://@adins/ucsearch/lib/ucsearch.component.ts","ng://@adins/ucsearch/lib/pipe/text-search.pipe.ts","ng://@adins/ucsearch/lib/ucsearch.module.ts"],"names":["UCSearchService","Injectable","args","providedIn","AdInsConstant","RestrictionBetween","RestrictionLike","RestrictionEq","RestrictionNeq","RestrictionGt","RestrictionGte","RestrictionLt","RestrictionLte","RestrictionIn","RestrictionNotIn","RestrictionOr","RestrictionOrNeq","RestrictionIsNull","RestrictionIsNotNull","RestrictionGTE","RestrictionLTE","showData","JoinTypeInner","JoinTypeLeft","IntegrationObj","this","baseUrl","apiPath","requestObj","Object","leftColumnToJoin","rightColumnToJoin","joinType","InputSearchObj","_url","enviromentUrl","title","apiQryPaging","arrCritObj","addCritInput","Array","listEnvironments","whereValue","fromValue","switchValue","integrationObj","isJoinExAPI","CriteriaObj","low","high","DataType","isCriteriaDataTable","RequestCriteriaObj","includeCount","includeData","isLoading","queryString","rowVersion","ExcelService","prototype","exportAsExcelFile","json","excelFileName","worksheet","XLSX.utils","json_to_sheet","console","log","workbook","Sheets","data","SheetNames","excelBuffer","XLSX.write","bookType","type","saveAsExcelFile","buffer","fileName","Blob","FileSaver.saveAs","Date","getTime","ExportTypeConstant","EXP_TYPE_PDF","EXP_TYPE_XLS","EXP_TYPE_XLSX","EXP_TYPE_DOC","EXP_TYPE_DOCX","ListKeyValueMonth","DictOfMonth","ListOfMonth","push","key","value","UCSearchComponent","defineProperty","content","searchForm","changeState","currentState","isHidden","ngOnInit","apiUrl","searchInput","arrCrit","js","_renderer2","createElement","text","appendChild","_document","body","cookieService","get","BisDt","DecryptString","BusinessDt","initiateForm","_this","getJSON","subscribe","configuration","exportData","exportExcel","exportTypeList","undefined","length","ExportTypeList","ExportType","countForm","component","isDataLoaded","i","isFromURL","request","arrayCrit","criteriaObject","propName","criteriaPropName","criteriaPropValue","restriction","criteria","path","y","environment","fullpath","url","resolveObject","parseFloat","toLocaleString","dtmType","includes","setDefaultValueMonth","items","setMonthDDL","setDefaultValueYear","setYearDDL","ddlType","readonly","businessDate","operator","charAt","dateShow","tempMinus","split","numDay","parseInt","setDate","getDate","dateText","formatDate","toUpperCase","minDate","datePipe","transform","maxDate","setTimeout","j","isEvent","itemsUrl","onChangeEvent","Key","SetRoleOfficeCodes","roleCode","JSON","parse","listOfficeRoleCodes","ddl","myForm","nativeElement","options","selectedIndex","trim","index","element","tempValue","numMonth","setMonth","getMonth","month","equation","match","toMin","toMax","tempEquation","minMax","substring","dictOfMonth","q","sort","a","b","numYear","setFullYear","getFullYear","year","ListOfYear","toString","http","postJSON","post","searchClick","order","orderby","pageNow","search","pageSize","reset","resetForm","pageNo","rowPerPage","orderBy","addCrit","IsQueryIn","IsBreak","querystring","whereQuery","x","fromQuery","critObj","getAttribute","nodeName","label","toastr","warning","name","ddlList","listValue","replace","response","qryPaging","result","emit","reqGetAllData","GenerateReport","genRpt","ElRef","lessThanFour","obj","crit","tempData","ReturnObject","exclude","filter","affectedFilter","transformAmount","formattedAmount","target","transformToDecimal","exportAsXLSX","ExcelData","excelService","error","optValue","afFilter","jsonComp","datatype","filterPropName","SetProcessKey","idx","wfKeyFilter","switchCase","condList","condition","this_1","findIndex","property","conditions","isUser","username","localStorage","getItem","chipperText","chipperKey","chipperKeyArr","CryptoJS.enc","Utf8","iv","CryptoJS.lib","WordArray","create","CryptoJS.AES","decrypt","checkInputDate","minDateVal","maxDateVal","errorMessage","MinComponent","find","id","min","MaxComponent","max","dateWrong","selectedOption","item","descr","isListHide","isSelected","Component","selector","template","providers","DatePipe","animations","trigger","state","style","height","opacity","overflow","transition","animate","HttpClient","Renderer2","Inject","DOCUMENT","ToastrService","CookieService","ViewChild","Input","Output","isReport","EventEmitter","ClaimList","Value","amount","TextSearchPipe","toLowerCase","indexOf","Pipe","customCurrencyMaskConfig","align","allowNegative","allowZero","decimal","precision","prefix","suffix","thousands","nullable","inputMode","CurrencyMaskInputMode","NATURAL","UCSearchModule","NgModule","declarations","imports","CommonModule","FormsModule","UcShowErrorsModule","UcDirectiveUpperCaseModule","NgxCurrencyModule","forRoot","TranslateModule","forChild","exports"],"mappings":"8nCAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KCLF,IAAAI,GACkBA,EAAAC,mBAAqB,UACrBD,EAAAE,gBAAkB,OAClBF,EAAAG,cAAgB,KAChBH,EAAAI,eAAiB,MACjBJ,EAAAK,cAA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,CACPC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,mBACAC,EAAAA,2BACAC,EAAAA,kBAAkBC,QAAQtB,GAC1BuB,EAAAA,gBAAgBC,YAElBC,QAAS,CAAC1R,OAEkB8Q,GAZ9B,SAAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UCSearchService {\r\n\r\n constructor() { }\r\n}\r\n","import { formatDate } from \"@angular/common\";\r\n\r\nexport class AdInsConstant {\r\n public static RestrictionBetween = \"Between\"\r\n public static RestrictionLike = \"Like\";\r\n public static RestrictionEq = \"Eq\";\r\n public static RestrictionNeq = \"NEQ\";\r\n public static RestrictionGt = \"GT\";\r\n public static RestrictionGte = \"GTE\";\r\n public static RestrictionLt = \"LT\";\r\n public static RestrictionLte = \"LTE\";\r\n public static RestrictionIn = \"IN\";\r\n public static RestrictionNotIn = \"NotIn\";\r\n public static RestrictionOr = \"Or\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionOrNeq = \"OrNeq\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionIsNull = \"ISNULL\";\r\n public static RestrictionIsNotNull = \"ISNOTNULL\";\r\n public static RestrictionGTE = \"GTE\";\r\n public static RestrictionLTE = \"LTE\";\r\n public static showData = \"10,50,100\";\r\n public static JoinTypeInner = \"INNER\";\r\n public static JoinTypeLeft = \"LEFT\";\r\n}\r\n","import { AdInsConstant } from \"./adins-constant\";\r\nexport class IntegrationObj {\r\n baseUrl: string;\r\n apiPath: string;\r\n requestObj: Object;\r\n leftColumnToJoin: string;\r\n rightColumnToJoin: string;\r\n joinType: string;\r\n \r\n constructor() {\r\n this.baseUrl = \"\";\r\n this.apiPath = \"\";\r\n this.requestObj = new Object();\r\n this.leftColumnToJoin = \"\";\r\n this.rightColumnToJoin = \"\";\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { CriteriaObj } from \"./criteria-obj.model\";\r\nimport { IntegrationObj } from \"./integration-obj.model\";\r\n \r\nexport class InputSearchObj {\r\n _url: string;\r\n enviromentUrl: string;\r\n title: string;\r\n apiQryPaging: string;\r\n arrCritObj: any;\r\n addCritInput: Array<CriteriaObj>;\r\n listEnvironments: Array<EnvisObj>;\r\n whereValue: Array<WhereValueObj>;\r\n fromValue: Array<FromValueObj>;\r\n switchValue: Array<SwitchValueObj>;\r\n integrationObj: IntegrationObj;\r\n isJoinExAPI: boolean;\r\n \r\n constructor() {\r\n this._url = \"\";\r\n this.enviromentUrl = \"\";\r\n this.title = \"\";\r\n this.apiQryPaging = \"\";\r\n this.arrCritObj = null;\r\n this.addCritInput = new Array<CriteriaObj>();\r\n this.listEnvironments = new Array<EnvisObj>();\r\n this.whereValue = new Array<WhereValueObj>();\r\n this.fromValue = new Array<FromValueObj>();\r\n this.switchValue = new Array<SwitchValueObj>();\r\n this.integrationObj = new IntegrationObj();\r\n this.isJoinExAPI = false;\r\n }\r\n}\r\n\r\nexport class EnviObj {\r\n name: string;\r\n environment: string;\r\n\r\n constructor() {\r\n this.name = \"\";\r\n this.environment = \"\";\r\n }\r\n}\r\n\r\nexport class WhereValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class FromValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class SwitchValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class EnvisObj {\r\n environment: string;\r\n url: string;\r\n\r\n constructor() {\r\n this.environment = \"\";\r\n this.url = \"\";\r\n }\r\n}","export class CriteriaObj { \r\n propName: string;\r\n restriction: string;\r\n value: string;\r\n low: number;\r\n high: number;\r\n DataType: string;\r\n listValue: Array<any>;\r\n isCriteriaDataTable: boolean;\r\n\r\n constructor() {\r\n this.low = 0;\r\n this.high = 0;\r\n this.DataType = 'Text';\r\n this.isCriteriaDataTable = false;\r\n }\r\n\r\n}","import { AdInsConstant } from \"./adins-constant\";\r\nimport { CriteriaObj } from \"./criteria-obj.model\";\r\nimport { IntegrationObj } from \"./integration-obj.model\";\r\n \r\nexport class RequestCriteriaObj{\r\n includeCount:boolean;\r\n includeData:boolean;\r\n pageNo:number;\r\n rowPerPage:number;\r\n orderBy:any;\r\n criteria:CriteriaObj[];\r\n isLoading : boolean;\r\n queryString: any;\r\n rowVersion: any;\r\n integrationObj: IntegrationObj;\r\n joinType: string;\r\n\r\n constructor()\r\n {\r\n this.includeCount=true;\r\n this.includeData=true;\r\n this.isLoading = true;\r\n this.queryString = '';\r\n this.rowVersion = '';\r\n this.integrationObj = new IntegrationObj();\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport * as FileSaver from 'file-saver';\r\nimport * as XLSX from 'xlsx';\r\n\r\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\r\nconst EXCEL_EXTENSION = '.xlsx';\r\n\r\n@Injectable()\r\nexport class ExcelService {\r\n\r\n constructor() { }\r\n\r\n public exportAsExcelFile(json: any[], excelFileName: string): void {\r\n \r\n const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);\r\n console.log('worksheet',worksheet);\r\n const workbook: XLSX.WorkBook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\r\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\r\n //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });\r\n this.saveAsExcelFile(excelBuffer, excelFileName);\r\n }\r\n\r\n private saveAsExcelFile(buffer: any, fileName: string): void {\r\n const data: Blob = new Blob([buffer], {\r\n type: EXCEL_TYPE\r\n });\r\n FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);\r\n }\r\n\r\n}","export class KeyValueReportObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ExportTypeConstant {\r\n public static EXP_TYPE_PDF = 0;\r\n public static EXP_TYPE_XLS = 1;\r\n public static EXP_TYPE_XLSX = 2;\r\n public static EXP_TYPE_DOC = 3;\r\n public static EXP_TYPE_DOCX = 4;\r\n}","export class KeyValueUCSearchObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ListKeyValueMonth {\r\n ListOfMonth: Array<KeyValueUCSearchObj>;\r\n DictOfMonth: { [month: number]: string } = {};\r\n constructor() {\r\n this.ListOfMonth = new Array<KeyValueUCSearchObj>();\r\n this.DictOfMonth = {}\r\n this.ListOfMonth.push({ key: 1, value: \"January\" });\r\n this.DictOfMonth[1]= \"January\";\r\n this.ListOfMonth.push({ key: 2, value: \"February\" });\r\n this.DictOfMonth[2]= \"February\";\r\n this.ListOfMonth.push({ key: 3, value: \"March\" });\r\n this.DictOfMonth[3]= \"March\";\r\n this.ListOfMonth.push({ key: 4, value: \"April\" });\r\n this.DictOfMonth[4]= \"April\";\r\n this.ListOfMonth.push({ key: 5, value: \"May\" });\r\n this.DictOfMonth[5]= \"May\";\r\n this.ListOfMonth.push({ key: 6, value: \"June\" });\r\n this.DictOfMonth[6]= \"June\";\r\n this.ListOfMonth.push({ key: 7, value: \"July\" });\r\n this.DictOfMonth[7]= \"July\";\r\n this.ListOfMonth.push({ key: 8, value: \"August\" });\r\n this.DictOfMonth[8]= \"August\";\r\n this.ListOfMonth.push({ key: 9, value: \"September\" });\r\n this.DictOfMonth[9]= \"September\";\r\n this.ListOfMonth.push({ key: 10, value: \"October\" });\r\n this.DictOfMonth[10]= \"October\";\r\n this.ListOfMonth.push({ key: 11, value: \"November\" });\r\n this.DictOfMonth[11]= \"November\";\r\n this.ListOfMonth.push({ key: 12, value: \"December\" });\r\n this.DictOfMonth[12]= \"December\";\r\n }\r\n}","import { Component, OnInit, Input, ViewChild, ElementRef, Inject, Renderer2, EventEmitter, Output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormGroup, NgForm } from '@angular/forms';\r\nimport { DatePipe, formatDate } from '@angular/common';\r\nimport { InputSearchObj } from './model/input-search-obj.model';\r\nimport { CriteriaObj } from './model/criteria-obj.model';\r\nimport { RequestCriteriaObj } from './model/request-criteria-obj.model';\r\nimport { AdInsConstant } from './model/adins-constant';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { ExcelService } from './services/excel-service/excel-service';\r\nimport { trigger, transition, style, animate, state } from '@angular/animations';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ExportTypeConstant, KeyValueReportObj } from './model/key-value-report.model';\r\nimport { CookieService } from 'ngx-cookie';\r\nimport * as CryptoJS from 'crypto-js';\r\nimport { KeyValueUCSearchObj, ListKeyValueMonth } from './model/key-value-uc-search.model';\r\n\r\n@Component({\r\n selector: 'lib-UCSearch',\r\n templateUrl: './ucsearch.component.html',\r\n styleUrls: ['./ucsearch.component.css'],\r\n providers: [ExcelService, DatePipe],\r\n animations: [\r\n trigger('changeDivSize', [\r\n state('initial', style({\r\n height: '*',\r\n opacity: '1',\r\n })),\r\n state('final', style({\r\n height: '0px',\r\n opacity: '0',\r\n overflow: 'hidden',\r\n })),\r\n transition('initial=>final', animate('300ms')),\r\n transition('final=>initial', animate('300ms'))\r\n ]),\r\n ]\r\n})\r\nexport class UCSearchComponent implements OnInit {\r\n // trus nad, bisa ga kalo misalkan gw mau bikin\r\n // kalo login di cabang IsSelectOne: true\r\n // kalo login di HO, IsSelectOne: false\r\n @ViewChild('enjiForm') set content(content: NgForm) {\r\n if (content) { // initially setter gets called with undefined\r\n this.searchForm = content;\r\n }\r\n }\r\n\r\n @ViewChild('formIdSearch') myForm: ElementRef;\r\n @Input() searchInput: InputSearchObj = new InputSearchObj();\r\n @Input() pageSize: number = 10;\r\n @Input() isReport: boolean = false;\r\n @Output() result: EventEmitter<any> = new EventEmitter();\r\n @Output() genRpt: EventEmitter<{ ExportType: number, ElRef: ElementRef }> = new EventEmitter<{ ExportType: number, ElRef: ElementRef }>();\r\n @Output() reqGetAllData: EventEmitter<any> = new EventEmitter();\r\n ExportTypeList: Array<KeyValueReportObj> = [\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_PDF,\r\n value: \"PDF\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLS,\r\n value: \"Excel 2003\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLSX,\r\n value: \"Excel 2007\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOC,\r\n value: \"Document\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOCX,\r\n value: \"Document XML\"\r\n },\r\n ];\r\n ListOfMonth: ListKeyValueMonth = new ListKeyValueMonth();\r\n ListOfYear: Array<KeyValueUCSearchObj> = new Array<KeyValueUCSearchObj>();\r\n ClaimList: Array<any> = [\r\n {\r\n Key: AdInsConstant.RestrictionIsNotNull,\r\n Value: \"CLAIMED\"\r\n },\r\n {\r\n Key: AdInsConstant.RestrictionIsNull,\r\n Value: \"UNCLAIMED\"\r\n },\r\n ];\r\n\r\n ExportType: number = 0;\r\n\r\n pageNow: any = 1;\r\n configuration: any;\r\n exportData: any;\r\n ExcelData: any;\r\n isDataLoaded: boolean = false;\r\n isHidden: boolean = false;\r\n BisDt: string;\r\n BusinessDt: Date = new Date();\r\n dateWrong: boolean = false;\r\n readonly: boolean = false;\r\n\r\n currentState = 'initial';\r\n\r\n form: FormGroup;\r\n countForm = 0;\r\n formattedAmount = '';\r\n amount = 0;\r\n apiUrl: string;\r\n arrCrit: any;\r\n searchForm: NgForm;\r\n\r\n constructor(private http: HttpClient, private excelService: ExcelService, private _renderer2: Renderer2,\r\n @Inject(DOCUMENT) private _document, public toastr: ToastrService, private cookieService: CookieService,\r\n private datePipe: DatePipe) {\r\n }\r\n\r\n changeState() {\r\n this.currentState = this.currentState === 'initial' ? 'final' : 'initial';\r\n this.isHidden = this.isHidden === false ? true : false;\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"ucsearch\");\r\n this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;\r\n this.arrCrit = this.searchInput.arrCritObj;\r\n let js = this._renderer2.createElement('script');\r\n js.text = `\r\n $(document).ready(function(){\r\n $(\"#flip\").click(function(){\r\n $(\"#panel\").slideToggle(\"slow\");\r\n });\r\n });\r\n `;\r\n this._renderer2.appendChild(this._document.body, js);\r\n\r\n let value = this.cookieService.get('BusinessDateRaw');\r\n this.BisDt = this.DecryptString(value, \"AdInsFOU12345678\");\r\n this.BusinessDt = new Date(this.BisDt);\r\n this.initiateForm();\r\n }\r\n\r\n initiateForm() {\r\n this.getJSON(this.searchInput._url).subscribe(data => {\r\n this.configuration = data;\r\n this.exportData = data.exportExcel;\r\n if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {\r\n this.ExportTypeList = data.exportTypeList;\r\n this.ExportType = this.ExportTypeList[0].key;\r\n }\r\n\r\n this.countForm = data.component.length;\r\n this.isDataLoaded = true;\r\n\r\n if (this.searchInput.title != undefined && this.searchInput.title != \"\") {\r\n this.configuration.title = this.searchInput.title;\r\n }\r\n\r\n for (let i = 0; i < this.countForm; i++) {\r\n //ini kalau datanya di load dari URL\r\n if (data.component[i].isFromURL == true) {\r\n let request = new RequestCriteriaObj();\r\n let arrayCrit = new Array();\r\n let criteriaObject = new CriteriaObj();\r\n criteriaObject.DataType = \"text\";\r\n criteriaObject.propName = data.component[i].criteriaPropName;\r\n criteriaObject.value = data.component[i].criteriaPropValue;\r\n criteriaObject.restriction = \"eq\";\r\n arrayCrit.push(criteriaObject);\r\n request.criteria = arrayCrit;\r\n request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;\r\n\r\n // Pengecekan penggunaan url atau path\r\n if (data.component[i].path != undefined && data.component[i].path != \"\") {\r\n if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (data.component[i].environment == this.searchInput.listEnvironments[y].environment) {\r\n data.component[i].fullpath = this.searchInput.listEnvironments[y].url + data.component[i].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya\r\n //biar tiap function ada state2nya sendiri\r\n this.resolveObject(data.component[i], data.component[i].fullpath, request);\r\n }\r\n\r\n if (data.component[i].type == \"numeric\") {\r\n data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');\r\n }\r\n\r\n //pengecekan ddl\r\n if (data.component[i].type == \"dropdown\") {\r\n if (data.component[i].dtmType != undefined) {\r\n if (data.component[i].dtmType.includes(\"month\")) {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.setDefaultValueMonth(data.component[i].value);\r\n }\r\n data.component[i].items = this.setMonthDDL(data.component[i].dtmType);\r\n }\r\n if (data.component[i].dtmType.includes(\"year\")) {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.setDefaultValueYear(data.component[i].value);\r\n }\r\n data.component[i].items = this.setYearDDL(data.component[i].dtmType);\r\n }\r\n }\r\n }\r\n if (!data.component[i].value) {\r\n data.component[i].value = \"\";\r\n if (data.component[i].ddlType == 'all') data.component[i].value = \"all\";\r\n if (data.component[i].ddlType == 'one') data.component[i].value = \"one\";\r\n }\r\n //pengecekan tanggal\r\n if (data.component[i].type == \"datepicker\") {\r\n this.readonly = data.component[i].readonly\r\n\r\n if (data.component[i].value.includes(\"BD\")) {\r\n let businessDate = new Date();\r\n if (this.BisDt != null) {\r\n businessDate = new Date(this.BisDt);\r\n }\r\n let operator = data.component[i].value.charAt(2);\r\n let dateShow = new Date();\r\n if (operator == \"-\") {\r\n let tempMinus = data.component[i].value.split(\"-\", 2);\r\n let numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() - numDay);\r\n }\r\n else if (operator == \"+\") {\r\n let tempMinus = data.component[i].value.split(\"+\", 2);\r\n let numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() + numDay);\r\n }\r\n dateShow = businessDate;\r\n let dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US')\r\n data.component[i].value = dateText;\r\n }\r\n\r\n if (this.readonly = false) {\r\n if (data.component[i].restriction != undefined && data.component[i].restriction != \"\") {\r\n if (data.component[i].restriction.toUpperCase() == \"GT\") {\r\n let minDate = new Date(this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));\r\n minDate.setDate(minDate.getDate() + 1);\r\n data.component[i].minDate = minDate;\r\n } else if (data.component[i].restriction.toUpperCase() == \"LT\") {\r\n let maxDate = new Date(this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));\r\n maxDate.setDate(maxDate.getDate() - 1);\r\n data.component[i].maxDate = maxDate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n for (let j = 0; j < this.countForm; j++) {\r\n if (data.component[j].isEvent == true && this.configuration.component[j].itemsUrl.length == 1) {\r\n this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);\r\n }\r\n if (data.component[j].type == \"officeRoleCodes\" && this.configuration.component[j].itemsUrl.length > 0) {\r\n this.SetRoleOfficeCodes(j);\r\n }\r\n }\r\n }, 1000);\r\n });\r\n }\r\n\r\n SetRoleOfficeCodes(i: number) {\r\n let value: string = this.cookieService.get(\"UserAccess\");\r\n let userAccess: string = JSON.parse(this.DecryptString(value, \"AdInsFOU12345678\"));\r\n let roleCode: string = userAccess[\"RoleCode\"];\r\n let listOfficeRoleCodes: Array<string> = new Array();\r\n listOfficeRoleCodes.push(roleCode);\r\n let component = this.myForm.nativeElement[i];\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (this.configuration.component[i].itemsUrl.length == 1 || (this.configuration.component[i].ddlType == 'all' && text == 'all')) {\r\n for (let index = 0; index < this.configuration.component[i].itemsUrl.length; index++) {\r\n const element = this.configuration.component[i].itemsUrl[index];\r\n listOfficeRoleCodes.push(element.Key);\r\n listOfficeRoleCodes.push(roleCode + \"-\" + element.Key);\r\n }\r\n } else {\r\n listOfficeRoleCodes.push(text);\r\n listOfficeRoleCodes.push(roleCode + \"-\" + text);\r\n }\r\n\r\n this.searchInput.integrationObj.requestObj[\"OfficeRoleCodes\"] = listOfficeRoleCodes;\r\n }\r\n\r\n setDefaultValueMonth(value) {\r\n let businessDate = new Date(this.BusinessDt);\r\n let operator = value.charAt(2);\r\n let tempValue = value.split(operator, 2);\r\n let numMonth = parseInt(tempValue[1]);\r\n if (!numMonth) numMonth = 1;\r\n if (operator == \"-\") {\r\n businessDate.setMonth(businessDate.getMonth() - numMonth);\r\n }\r\n else if (operator == \"+\") {\r\n businessDate.setMonth(businessDate.getMonth() + numMonth);\r\n }\r\n return businessDate.getMonth();\r\n }\r\n setMonthDDL(month) {\r\n let ListOfMonth: Array<KeyValueUCSearchObj>;\r\n let equation = month.match(\"[\\\\/+][-]|[-][\\\\/+]|\\\\/+|-\");\r\n let toMin: number = this.BusinessDt.getMonth();\r\n let toMax: number = this.BusinessDt.getMonth();\r\n let tempEquation = equation[0];\r\n let minMax: number = parseInt(month.substring(equation.index + equation[0].length));\r\n if (minMax >= 12) return this.ListOfMonth.ListOfMonth;\r\n if ((tempEquation == \"+-\" || tempEquation == \"-+\") && minMax >= 6) return this.ListOfMonth.ListOfMonth;\r\n let dictOfMonth: { [month: number]: string } = this.ListOfMonth.DictOfMonth;\r\n ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });\r\n\r\n for (let q = 0; q < minMax; q++) {\r\n if (tempEquation.includes(\"-\")) {\r\n toMin--;\r\n if (toMin == 0) toMin = 12;\r\n ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });\r\n }\r\n if (tempEquation.includes(\"+\")) {\r\n toMax++;\r\n if (toMax == 13) toMax = 1;\r\n ListOfMonth.push({ key: toMax, value: dictOfMonth[toMax] });\r\n }\r\n }\r\n ListOfMonth.sort((a, b) => {\r\n return a.key - b.key;\r\n });\r\n return ListOfMonth;\r\n }\r\n\r\n setDefaultValueYear(value) {\r\n let businessDate = new Date(this.BusinessDt);\r\n let operator = value.charAt(2);\r\n let tempValue = value.split(operator, 2);\r\n let numYear = parseInt(tempValue[1]);\r\n if (!numYear) numYear = 1;\r\n if (operator == \"-\") {\r\n businessDate.setFullYear(businessDate.getFullYear() - numYear);\r\n }\r\n else if (operator == \"+\") {\r\n businessDate.setFullYear(businessDate.getFullYear() + numYear);\r\n }\r\n return businessDate.getFullYear();\r\n }\r\n setYearDDL(year) {\r\n this.ListOfYear = new Array<KeyValueUCSearchObj>();\r\n let equation = year.match(\"[\\\\/+][-]|[-][\\\\/+]|\\\\/+|-\");\r\n let toMin: number = this.BusinessDt.getFullYear();\r\n let toMax: number = this.BusinessDt.getFullYear();\r\n let minMax: number = parseInt(year.substring(equation.index + equation[0].length));\r\n this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });\r\n\r\n for (let q = 0; q < minMax; q++) {\r\n if (equation[0] == \"-+\" || equation[0] == \"+-\") {\r\n toMin--;\r\n toMax++;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });\r\n } else if (equation[0] == \"-\") {\r\n toMin--;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() });\r\n } else if (equation[0] == \"+\") {\r\n toMax++;\r\n this.ListOfYear.push({ key: toMax, value: toMax.toString() });\r\n }\r\n }\r\n this.ListOfYear.sort((a, b) => {\r\n return a.key - b.key;\r\n });\r\n return this.ListOfYear;\r\n }\r\n\r\n public getJSON(url: string): Observable<any> {\r\n return this.http.get(url);\r\n }\r\n\r\n public postJSON(url: string, criteria: any = null): Observable<any> {\r\n return this.http.post(url, criteria);\r\n }\r\n\r\n searchClick() {\r\n // for(let i=0;i<this.countForm;i++){\r\n // if(this.configuration.component[i].type == \"datepicker\"){\r\n // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){\r\n // this.checkInputDate(this.configuration.component[i]);\r\n // }\r\n // }\r\n // }\r\n // if(this.dateWrong) return;\r\n\r\n let order = null;\r\n if (this.configuration.orderby != null) {\r\n order = {\r\n key: this.configuration.orderby.key,\r\n value: this.configuration.orderby.value\r\n }\r\n }\r\n this.pageNow = 1;\r\n this.search(this.apiUrl, this.pageNow, this.pageSize, order, this.arrCrit);\r\n }\r\n\r\n reset() {\r\n this.searchForm.resetForm({\r\n ExportType: this.ExportTypeList[0].key\r\n });\r\n this.initiateForm();\r\n }\r\n\r\n search(apiUrl: string, pageNo: number, rowPerPage: number, orderBy: any, addCrit: CriteriaObj[] = new Array()) {\r\n let request = new RequestCriteriaObj();\r\n let arrCrit = new Array();\r\n let IsQueryIn = false;\r\n let IsBreak = false;\r\n\r\n // Inject whereQuery for where criteria\r\n if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {\r\n this.configuration.querystring.whereQuery = new Array<any>();\r\n for (let x = 0; x < this.searchInput.whereValue.length; x++) {\r\n this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);\r\n }\r\n }\r\n if (this.searchInput.fromValue != undefined && this.searchInput.fromValue.length != 0) {\r\n this.configuration.querystring.fromQuery = new Array<any>();\r\n for (let x = 0; x < this.searchInput.fromValue.length; x++) {\r\n this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[x].value);\r\n }\r\n }\r\n request.pageNo = pageNo;\r\n request.rowPerPage = rowPerPage;\r\n request.orderBy = orderBy;\r\n request.queryString = this.configuration.querystring;\r\n\r\n for (let i = 0; i < this.countForm; i++) {\r\n let critObj = new CriteriaObj();\r\n let component = this.myForm.nativeElement[i];\r\n\r\n // // popup message if required\r\n // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == \"true\") {\r\n // let val = component.value.trim();\r\n // if (val == \"\") {\r\n // IsBreak = true;\r\n // let label = component.getAttribute('label');\r\n // this.toastr.warning(\"Please input \" + label);\r\n // break;\r\n // }\r\n // }\r\n\r\n critObj.DataType = component.getAttribute('data-type');\r\n //Ini khusus kalau dari Drop Down\r\n if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == \"true\") {\r\n IsQueryIn = true;\r\n }\r\n else {\r\n IsQueryIn = false;\r\n }\r\n if (component.value != \"\") {\r\n if (component.nodeName == 'SELECT') {\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (text == \"one\") {\r\n IsBreak = true;\r\n let label = component.getAttribute('label');\r\n this.toastr.warning(\"Please select \" + label);\r\n break;\r\n }\r\n\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n\r\n if (this.configuration.component[i].type == \"taskDefinitionKey\" ||\r\n this.configuration.component[i].type == \"processKey\")\r\n continue;\r\n\r\n if (this.configuration.component[i].type == \"claim\") {\r\n critObj.propName = component.getAttribute('data-name');\r\n critObj.restriction = text;\r\n critObj.value = null;\r\n arrCrit.push(critObj);\r\n } else {\r\n if (text != \"all\" && text != \"one\") {\r\n //Kalau Dari Dropdown udah pasti pake Eq\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.value = text;\r\n arrCrit.push(critObj);\r\n } else if (text == \"all\" && IsQueryIn == true && component.options.length != 0) {\r\n let ddlList = new Array();\r\n for (let x = 0; x < component.options.length; x++) {\r\n if (x != 0) {\r\n ddlList.push(component.options[x].value);\r\n }\r\n }\r\n if (ddlList.length != 0) {\r\n critObj.restriction = AdInsConstant.RestrictionIn;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.listValue = ddlList;\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.value = component.value.trim();\r\n if (component.value.includes(\"%\")) {\r\n critObj.restriction = AdInsConstant.RestrictionLike;\r\n }\r\n //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya\r\n else if (component.getAttribute('data-restriction') != \"\" && component.getAttribute('data-restriction') != null) {\r\n critObj.restriction = component.getAttribute('data-restriction');\r\n if (component.getAttribute('data-type') == 'numeric') {\r\n critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();\r\n }\r\n if (critObj.restriction.toUpperCase() == \"LIKE\") {\r\n critObj.value = \"%\" + component.value.trim() + \"%\";\r\n critObj.restriction = AdInsConstant.RestrictionLike\r\n }\r\n }\r\n else {\r\n critObj.restriction = AdInsConstant.RestrictionEq\r\n }\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n\r\n if (IsBreak) {\r\n return;\r\n }\r\n\r\n if (addCrit != null && addCrit != undefined) {\r\n if (addCrit.length != 0) {\r\n for (let i = 0; i < addCrit.length; i++) {\r\n arrCrit.push(addCrit[i]);\r\n }\r\n } else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (let i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n }\r\n else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (let i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n\r\n request.criteria = arrCrit;\r\n\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(apiUrl, request).subscribe((response) => {\r\n let qryPaging = {\r\n response: response,\r\n pageNow: pageNo\r\n }\r\n console.log(qryPaging);\r\n this.result.emit(qryPaging);\r\n this.reqGetAllData.emit(request);\r\n return response;\r\n });\r\n }\r\n\r\n GenerateReport() {\r\n this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });\r\n }\r\n\r\n lessThanFour(): boolean {\r\n if (this.countForm > 3) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n resolveObject(obj: any, url: string, crit: RequestCriteriaObj = null) {\r\n const val = this.postJSON(url, crit);\r\n val.subscribe(tempData => {\r\n obj.itemsUrl = new Array();\r\n obj.itemsUrl = tempData.ReturnObject;\r\n\r\n if (obj.exclude != undefined && obj.exclude != \"\") {\r\n obj.itemsUrl = obj.itemsUrl.filter((value) => !obj.exclude.includes(value.Key));\r\n }\r\n\r\n if (obj.affectedFilter && obj.itemsUrl.length == 1) {\r\n this.onChangeEvent(obj.itemsUrl[0].Key, obj);\r\n }\r\n });\r\n }\r\n\r\n transformAmount(element: any) {\r\n this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');\r\n // to show the formatted amount in the textbox.\r\n element.target.value = this.formattedAmount;\r\n }\r\n\r\n transformToDecimal(element: any) {\r\n element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));\r\n }\r\n\r\n exportAsXLSX(): void {\r\n let request = new RequestCriteriaObj();\r\n request.pageNo = 1;\r\n request.rowPerPage = 9999;\r\n request.orderBy = null;\r\n request.criteria = [];\r\n request.queryString = this.configuration.querystring;\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(this.apiUrl, request).subscribe(\r\n response => {\r\n this.ExcelData = response[\"Data\"];\r\n this.excelService.exportAsExcelFile(this.ExcelData, 'sample');\r\n },\r\n (error) => {\r\n console.log(error);\r\n });\r\n }\r\n\r\n onChangeEvent(optValue, afFilter) {\r\n let jsonComp = this.configuration.component;\r\n\r\n for (let i = 0; i < afFilter.affectedFilter.length; i++) {\r\n for (let j = 0; j < jsonComp.length; j++) {\r\n if (jsonComp[j].name == afFilter.affectedFilter[i]) {\r\n let request = new RequestCriteriaObj();\r\n let arrayCrit = new Array();\r\n\r\n if (optValue != \"all\" && optValue != \"one\") {\r\n let critObj = new CriteriaObj();\r\n critObj.DataType = afFilter.datatype;\r\n if (afFilter.filterPropName != undefined || afFilter.filterPropName != \"\") {\r\n request[afFilter.filterPropName] = optValue;\r\n critObj.propName = afFilter.filterPropName;\r\n } else {\r\n critObj.propName = afFilter.name;\r\n request[afFilter.name] = optValue;\r\n }\r\n critObj.value = optValue;\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n arrayCrit.push(critObj);\r\n }\r\n request.criteria = arrayCrit;\r\n if (jsonComp[j].path != undefined && jsonComp[j].path != \"\") {\r\n if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (jsonComp[j].environment == this.searchInput.listEnvironments[y].environment) {\r\n jsonComp[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp[j].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);\r\n }\r\n }\r\n }\r\n }\r\n\r\n SetProcessKey(idx: number, wfKeyFilter: string) {\r\n let component = this.myForm.nativeElement[idx];\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (text) {\r\n this.searchInput.integrationObj.requestObj[wfKeyFilter] = text;\r\n }\r\n }\r\n\r\n switchCase(condList) {\r\n let condition = false;\r\n\r\n for (let i = 0; i < condList.conditions.length; i++) {\r\n let idx = this.searchInput.switchValue.findIndex(x => x.property == condList.conditions[i].property);\r\n if (condList.conditions[i].restriction == \"EQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value == username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NEQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value != username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value > username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value >= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value < username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n let username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value <= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return condition;\r\n\r\n }\r\n\r\n private DecryptString(chipperText: string, chipperKey: string) {\r\n if (\r\n chipperKey == undefined || chipperKey.trim() == '' ||\r\n chipperText == undefined || chipperText.trim() == ''\r\n ) return chipperText;\r\n let chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);\r\n let iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);\r\n let decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });\r\n let plainText = decrypted.toString(CryptoJS.enc.Utf8);\r\n return plainText;\r\n }\r\n\r\n checkInputDate(component: any) {\r\n let minDateVal;\r\n let maxDateVal;\r\n let label;\r\n let errorMessage = new Array<string>();\r\n\r\n let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\"));\r\n if (MinComponent != undefined) {\r\n minDateVal = this.myForm.nativeElement[MinComponent.id].min == \"\" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);\r\n label = MinComponent.label.split(\">\", 2);\r\n if (minDateVal != null) {\r\n if (MinComponent.restriction.toUpperCase() == \"GT\") {\r\n minDateVal.setDate(minDateVal.getDate() - 1);\r\n errorMessage.push(\" must be greater than \");\r\n } else if (MinComponent.restriction.toUpperCase() == \"GTE\") {\r\n errorMessage.push(\" must be greater than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\"));\r\n if (MaxComponent != undefined) {\r\n maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == \"\" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);\r\n label = MaxComponent.label.split(\"<\", 2);\r\n if (maxDateVal != null) {\r\n if (MaxComponent.restriction.toUpperCase() == \"LT\") {\r\n maxDateVal.setDate(maxDateVal.getDate() + 1);\r\n errorMessage.push(\" must be less than \");\r\n } else if (MaxComponent.restriction.toUpperCase() == \"LTE\") {\r\n errorMessage.push(\" must be less than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (minDateVal != null && maxDateVal != null) {\r\n if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \" and\" + errorMessage[1] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n }\r\n\r\n selectedOption(item: { key: string, value: string },crit:any) {\r\n crit.value = item.key;\r\n crit.descr = item.value;\r\n crit.isListHide = true;\r\n }\r\n\r\n isSelected(item: { key: string, value: string }, value: string) {\r\n return item.key == value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'textSearch'\r\n})\r\nexport class TextSearchPipe implements PipeTransform {\r\n\r\n transform(items: any[], text?: any): any {\r\n if(!text){\r\n return items;\r\n }\r\n return items.filter((item)=>{\r\n if(item.value && typeof item.value === 'string'){\r\n return item.value.toLowerCase().indexOf(text.toLowerCase())> -1;\r\n }\r\n return false;\r\n })\r\n }\r\n\r\n}","import { NgModule } from '@angular/core';\r\nimport { UCSearchComponent } from './ucsearch.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { UcShowErrorsModule } from '@adins/uc-show-errors';\r\nimport { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';\r\nimport { TextSearchPipe } from './pipe/text-search.pipe';\r\n\r\nexport const customCurrencyMaskConfig = { \r\n align: \"right\",\r\n allowNegative: false,\r\n allowZero: true,\r\n decimal: \".\",\r\n precision: 2,\r\n prefix: \"\",\r\n suffix: \"\",\r\n thousands: \",\",\r\n nullable: false,\r\n inputMode: CurrencyMaskInputMode.NATURAL };\r\n\r\n@NgModule({\r\n declarations: [UCSearchComponent,TextSearchPipe],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n UcShowErrorsModule,\r\n UcDirectiveUpperCaseModule,\r\n NgxCurrencyModule.forRoot(customCurrencyMaskConfig),\r\n TranslateModule.forChild()\r\n ],\r\n exports: [UCSearchComponent]\r\n})\r\nexport class UCSearchModule { }\r\n"]}
|
|
@@ -1153,7 +1153,7 @@ UCSearchComponent.decorators = [
|
|
|
1153
1153
|
transition('final=>initial', animate('300ms'))
|
|
1154
1154
|
]),
|
|
1155
1155
|
],
|
|
1156
|
-
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:
|
|
1156
|
+
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:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]
|
|
1157
1157
|
}] }
|
|
1158
1158
|
];
|
|
1159
1159
|
/** @nocollapse */
|
|
@@ -1267,7 +1267,7 @@ var UCSearchComponent = /** @class */ (function () {
|
|
|
1267
1267
|
transition('final=>initial', animate('300ms'))
|
|
1268
1268
|
]),
|
|
1269
1269
|
],
|
|
1270
|
-
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:
|
|
1270
|
+
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:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]
|
|
1271
1271
|
}] }
|
|
1272
1272
|
];
|
|
1273
1273
|
/** @nocollapse */
|
|
@@ -1356,7 +1356,7 @@ UCSearchComponent.decorators = [
|
|
|
1356
1356
|
transition('final=>initial', animate('300ms'))
|
|
1357
1357
|
]),
|
|
1358
1358
|
],
|
|
1359
|
-
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:
|
|
1359
|
+
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:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]
|
|
1360
1360
|
}] }
|
|
1361
1361
|
];
|
|
1362
1362
|
/** @nocollapse */
|
package/fesm5/adins-ucsearch.js
CHANGED
|
@@ -1496,7 +1496,7 @@ var UCSearchComponent = /** @class */ (function () {
|
|
|
1496
1496
|
transition('final=>initial', animate('300ms'))
|
|
1497
1497
|
]),
|
|
1498
1498
|
],
|
|
1499
|
-
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:
|
|
1499
|
+
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:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]
|
|
1500
1500
|
}] }
|
|
1501
1501
|
];
|
|
1502
1502
|
/** @nocollapse */
|