mmhglobal-dynamicform 1.2.2 → 1.2.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/README.md +5 -0
- package/bundles/mmhglobal-dynamicform.umd.js +38 -36
- package/bundles/mmhglobal-dynamicform.umd.js.map +1 -1
- package/bundles/mmhglobal-dynamicform.umd.min.js +1 -1
- package/bundles/mmhglobal-dynamicform.umd.min.js.map +1 -1
- package/esm2015/lib/services/main.service.js +5 -16
- package/esm2015/lib/zgrid/zgrid.component.js +18 -9
- package/esm2015/lib/zselectmultiple/zselectmultiple.component.js +17 -12
- package/esm2015/lib/ztree/ztree.component.js +1 -1
- package/fesm2015/mmhglobal-dynamicform.js +38 -35
- package/fesm2015/mmhglobal-dynamicform.js.map +1 -1
- package/mmhglobal-dynamicform.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var B=function(e,t){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}function q(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((n=n.apply(e,t||[])).next())}))}function _(e,t){var o,n,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}Object.create;function U(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}Object.create;var J=function(){function e(e,t,o,n,r,i,a){this.router=e,this.alertService=t,this.authService=o,this.fieldService=n,this.resourceApiService=r,this.toastService=i,this.webApiService=a}return Object.defineProperty(e.prototype,"debug",{get:function(){return this.scope.group._debug},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this.scope.group},enumerable:!1,configurable:!0}),e.prototype.onInitDebugger=function(e,t){e._debug=new a.ZGroup(!0),e._isDebugging=!0,e._debug.zData={collectedActivities:[],activityCount:0,collectedWorkflowButtons:[],workflowButtonCount:0},e._debug.zComponents={},e.isListForm=!1,this.mainService=t},e.prototype.onStartDebugger=function(e,t){var o=this;this.scope=t,t.group._debug||(t.group._debug={});var n=t.group._debug;return t.form=t.toFormGroup(e),n.form=t.form,t.subscription&&t.subscription.unsubscribe(),Object.assign(n,{zModel:{},subject:new r.BehaviorSubject(null),isEdit:!0,isNew:!1,_debug:t.group._debug,_group:t.group,resourceURL:this.resourceApiService.getURL("field"),treeItemTemplate:this.treeItemTemplate,onItemClick:this.onItemClick,onTreeNodeChange:this.onTreeNodeChange,onAddNode:this.onAddNode,onRemoveNode:this.onRemoveNode,treeNodesExpandAll:this.treeNodesExpandAll,treeNodesCollapseAll:this.treeNodesCollapseAll,refreshTreeModel:this.refreshTreeModel,addNode:this.addNode,refreshActivityLogData:this.LoadGridData.bind(this),GoToFieldElement:this.gotoFieldElement.bind(this),ListWatchName:this.listWatchName,onChangeWatchName:this.onChangeWatchName.bind(this),getWatchName:this.getWatchName.bind(this),fieldElementonEditorCodeChange:this.fieldElementonEditorCodeChange.bind(this),gridActivityLogColumnFields:this.fieldService.getFormFieldCode("debugActivityLog","FormField",this.group,"debugActivityLogField"),gridActivityLogOnItemClick:this.gridActivityLogOnItemClick.bind(this),updateModel:this.updateModel.bind(this),refreshWorkflowButtonData:this.loadWorkflowData.bind(this),gridWorkflowButtonColumnFields:this.fieldService.getFormFieldCode("debugWorkflowButton","FormField",this.group,"debugWorkflowButtonField"),gridWorkflowButtonOnItemClick:this.gridWorkflowButtonOnItemClick.bind(this)}),n.zData||(n.zData={collectedActivities:[],activityCount:0}),t.subscription=n.subject.subscribe((function(e){return o.subjectEvent(e,n,o)})),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,e,this.authService),this.loadDebugZModel(t)},e.prototype.loadDebugZModel=function(e){e.group._debug;var t=[];t.push(this.getProjectId());var o=e.group.isListForm?"ListField":"FormField",n=e.group.fieldName,i=this.getFieldzModel(o,n);return t.push(i),r.forkJoin(t)},e.prototype.getProjectId=function(){var e=this.debug,t=this.resourceApiService.getURL("projectsURL");return this.webApiService.getApi(t,{},e.zData,"ProjectOptions",null,e,!1)},e.prototype.getFieldzModel=function(e,t){return"FormField"===e?this.getFormFieldzModel(t):this.getListFieldzModel(t)},e.prototype.getFormFieldzModel=function(e){var t=this.debug,o=this.resourceApiService.getURL("field");return this.webApiService.httpGet$(o,{name:e,type:"FormField"}).pipe(i.tap((function(e){Object.assign(t.zModel,e),t.form.patchValue(t.zModel),t.form.markAsPristine();var o=JSON.parse(t.zModel.Code);Object.assign(t,{treeModel:a.ZComponentHelper.convertTreeModel(o)})})))},e.prototype.getListFieldzModel=function(e){var t=this,o=this.debug,n=this.resourceApiService.getURL("fieldsMapping"),r=this.resourceApiService.getURL("field");return this.webApiService.httpGet$(n,{name:e}).pipe(i.switchMap((function(e){return t.webApiService.httpGet$(r,{id:e.FieldElementMasterId})})),i.tap((function(e){Object.assign(o.zModel,e),o.form.patchValue(o.zModel),o.form.markAsPristine();var t=JSON.parse(o.zModel.Code);Object.assign(o,{treeModel:a.ZComponentHelper.convertTreeModel(t)})})))},e.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&!e.target.startsWith("modalGroup.")){var n;try{n=a.ZComponentHelper.getGroupEvalValue.call(o,e.target)}catch(t){console.warn("Error when getGroupValue: ",e.target," > Error: ",t)}if("function"==typeof n)n.bind(o)(e,t,o);else if("string"==typeof n){if(e.type.endsWith("onNavigateTo")){var r=e.target.replace("/:id","/"+e.data);return void this.router.navigate([r])}if("zgrid-cellClick"===e.type){var i=n.slice(4);this.mainService.showzModal(e.columnFields$||i,t,"",{},e.data.Id)}}else if("object"==typeof n){if("zgrid-cellClick"===e.type){if(n.navigateUrl){var l=n.navigateUrl.replace(":id",e.data.Id);return void this.router.navigate([l])}if(n.formHeader)return void this.mainService.showzModal(e.columnFields$||n.ctrlName,t,n.formHeader,{},e.data.Id);console.warn("Invalid callFunc type: ",n," event.Target: ",e.target)}}else console.warn("Function not defined in group for: ",e.target,", Event: ",e)}},e.prototype.gridActivityLogOnItemClick=function(e){var t=this,o=e.dataItem;switch(o.type){case"ListField":case"FormField":this.getFieldzModel(o.type,o.activityName).subscribe((function(){t.selectTab(0)}));break;case"ResourceServerAPI":var n="_debug.zData.collectedActivities["+(o.index-1)+"].reference";this.setWatchNameValue(n),this.selectTab(1);break;case"HttpGet$":case"HttpPost$":case"HttpPut$":case"HttpDelete$":this.setWatchNameValue("_debug.zData.collectedActivities["+(o.index-1)+"]"),this.selectTab(1)}},e.prototype.selectTab=function(e){a.ZComponentHelper.getComponent(this.debug,"ztab_debuggerTabs").selectTab(e)},e.prototype.setWatchNameValue=function(e){this.debug.zModel.DebugWatchName=e,a.ZComponentHelper.setModelValue("WatchName",e,this.debug,!0)},e.prototype.LoadGridData=function(){var e=a.ZComponentHelper.getComponent(this.debug,"zgrid_ActivityLogGrid");e&&e.setData(this.debug.zData.collectedActivities)},e.prototype.listWatchName=function(e,t,o,n,i,a){var l,s=[{Name:"group.zModel"},{Name:"group.zData"},{Name:"group.fields"},{Name:"group.form.value"},{Name:"group.backNavigationPage"},{Name:"group.parentReferenceField"},{Name:"group.parentReferenceId"},{Name:"Object.keys(group.zComponents)"},{Name:"group.gridOptions.zgrid.grid.data"}];return t&&(l=s.filter((function(e){return-1!==e.Name.toLowerCase().indexOf(t.toLowerCase())}))),0===o&&t?r.of({dataSet:l}):0===o?r.of({dataSet:s}):r.of({dataSet:[]})},e.prototype.getWatchName=function(){return this.debug.zModel.DebugWatchName},e.prototype.onChangeWatchName=function(e,t,o){var n=e.data.value;n&&(this.debug.zModel.DebugWatchName=n.replace("group","_group"))},e.prototype.fieldElementonEditorCodeChange=function(e){this.refreshTreeModel()},e.prototype.treeNodesExpandAll=function(){this.debug.zComponents.ztree_debugZTree.expandAll()},e.prototype.treeNodesCollapseAll=function(){this.debug.zComponents.ztree_debugZTree.collapseAll()},e.prototype.refreshTreeModel=function(){try{var e=JSON.parse(this.debug.zModel.Code);this.debug.treeModel=a.ZComponentHelper.convertTreeModel(e)}catch(e){}},e.prototype.treeItemTemplate=function(e){var t;return e.dataItem.Name+" - ["+e.dataItem.Type+"] = "+("string"==typeof(t=e.dataItem)._DataValue?t._DataValue:"...")},e.prototype.onItemClick=function(e){return q(this,void 0,void 0,(function(){var t,o,n,r=this;return _(this,(function(i){switch(i.label){case 0:return console.log("onItemClick data received: ",e),t=this.fieldService.getFormFieldCode("mvEditFieldNodeForm","FormField",null,null),(o=Object.assign({},e.data)).Value=o._DataValue,delete o._DataValue,n={nodeModel:JSON.stringify(o,null,2)},[4,this.mainService.showzModal(t,this.debug._group,"Field Element Info",n)];case 1:return i.sent().subscribe((function(t){if("cancel"!==t.responseType){var o=JSON.parse(t.data.nodeModel);o.Value&&(o._DataValue=o.Value,o.Value=null),r.updateTreeNode(o,r.debug.treeModel,e.event);var n=JSON.parse(JSON.stringify(r.debug.treeModel)),i=a.ZComponentHelper.revertTreeModel(n),l=JSON.stringify(i,null,2);a.ZComponentHelper.setModelValue("Code",l,r.debug),r.updateModel()}})),[2]}}))}))},e.prototype.updateTreeNode=function(e,t,o){var n=o.split("_");if(n.length>1){var r=n.slice(1).join("_");this.updateTreeNode(e,t[+n[0]].Value,r)}else t[+n[0]].Value&&(e.Value=t[+n[0]].Value),t[+n[0]]=e},e.prototype.insertTreeNode=function(e,t,o){var n=o.split("_");if(n.length>1){var r=n.slice(1).join("_");this.insertTreeNode(e,t[+n[0]].Value,r)}else n[0]?(Array.isArray(t[+n[0]].Value)||(t[+n[0]].Value=[]),t[+n[0]].Value.push(e)):t.push(e)},e.prototype.removeTreeNode=function(e,t){var o=t.split("_");if(o.length>1){var n=o.slice(1).join("_");this.removeTreeNode(e[+o[0]].Value,n)}else e.splice(+o[0],1)},e.prototype.onTreeNodeChange=function(e){console.log("onTreeNodeChange: ",e);var t=JSON.stringify(e.data);a.ZComponentHelper.setModelValue("Code",t,this.debug)},e.prototype.addNode=function(){this.onAddNode({data:{},rowData:{},event:"",target:"",type:"",columnFields$:null})},e.prototype.onAddNode=function(e){return q(this,void 0,void 0,(function(){var t,o,n,r=this;return _(this,(function(i){switch(i.label){case 0:return console.log("onAddNode is called",e),t=this.fieldService.getFormFieldCode("mvEditFieldNodeForm","FormField",null,null),o={Name:"Name",DisplayName:"Name",Value:"Name",Type:"text",gridColVisible:!0,width:150,minWidth:100,enableFiltering:!0,enableSorting:!0,pinnedLeft:!1,PlaceHolder:"Name",IsRequired:!1,MinLength:2,MaxLength:50,Label:"Name:",DivClass:"col-xs-12 col-sm-6 col-md-6 col-lg-3",ReadOnly:!1,ShowLabel:!0,Visible:!0},n={nodeModel:JSON.stringify(o,null,2)},[4,this.mainService.showzModal(t,this.debug,"Add Field Element Item",n)];case 1:return i.sent().subscribe((function(t){if("cancel"!==t.responseType){var o=JSON.parse(t.data.nodeModel);o.Value&&(o._DataValue=o.Value,o.Value=null),r.insertTreeNode(o,r.debug.treeModel,e.event);var n=JSON.parse(JSON.stringify(r.debug.treeModel)),i=a.ZComponentHelper.revertTreeModel(n),l=JSON.stringify(i,null,2);a.ZComponentHelper.setModelValue("Code",l,r.debug),r.updateModel()}})),[2]}}))}))},e.prototype.onRemoveNode=function(e){var t=this;this.alertService.show("Remove Node","Are you sure?",[{text:"No",cssClass:"secondary"},{text:"Yes",cssClass:"primary"}]).subscribe((function(o){if("Yes"===o){console.log("Remove Node",e),t.removeTreeNode(t.debug.treeModel,e.event);var n=JSON.parse(JSON.stringify(t.debug.treeModel)),r=a.ZComponentHelper.revertTreeModel(n),i=JSON.stringify(r,null,2);a.ZComponentHelper.setModelValue("Code",i,t.debug)}}))},e.prototype.gotoFieldElement=function(){this.router.navigate(["admin/field"])},e.prototype.updateModel=function(){var e=this,t=this.debug,o=this.debug.form;if(o.dirty)if(o.valid)r.of(t.zModel).pipe(i.tap((function(){Object.assign(t.zModel,o.value)})),i.switchMap((function(){return e.webApiService.httpPut$(t.resourceURL+"/"+t.zModel.Id,t.zModel).pipe(i.map((function(t){return e.handleSuccess(t,"Record is updated successfully.")})))})),i.switchMap((function(e){return console.log("After Debug Form updated, zModel:",e),e&&e.Data&&(Object.assign(t.zModel,e.Data),o.patchValue(e.Data)),o.markAsPristine(),r.of([])}))).subscribe();else{var n=a.ZComponentHelper.getFormGroupErrors(o,this.alertService);console.warn("Debug Form Validation got error(s):",n)}else console.warn("Debug Form is not dirty hence record is not save.")},e.prototype.loadWorkflowData=function(){var e=a.ZComponentHelper.getComponent(this.debug,"zgrid_WorkflowButtonGrid");e&&e.setData(this.debug.zData.collectedWorkflowButtons)},e.prototype.gridWorkflowButtonOnItemClick=function(e){var t=this,o=Object.assign({},e.dataItem),n=o.refField,r=o.refAttribute,a=(new s.HttpParams).set("ButtonId",n.Id);this.webApiService.httpPost$(this.resourceApiService.getURL("e1wfs_wfc_getmappedButtonInfoURL"),a).pipe(i.map((function(e){return q(t,void 0,void 0,(function(){var t,o,i,a,l,s,p,d,c;return _(this,(function(u){switch(u.label){case 0:return t=[],o=[],i=[],e.MappedRoleList&&(t=e.MappedRoleList),e.MappedStatusList&&e.MappedStatusList.forEach((function(e){o.push(e.Name+" ("+e.Code+")")})),e.MappedParentStatusList&&e.MappedParentStatusList.forEach((function(e){i.push(e.Name+" ("+e.Code+")")})),a={mappedRoleInfo:t.length>0?t:"N.A.",mappedStatusInfo:o.length>0?o:"N.A.",mappedParentStatusInfo:i.length>0?i:"N.A."},l={WorkflowId:n.WorkflowId,ButtonId:n.Id,ButtonName:n.Name,ButtonCode:n.Code,ButtonTypeId:n.Type.Id,ButtonTypeName:n.Type.Name,ButtonTypeCode:n.Type.Code,ButtonVisible:r.Visible,ButtonClickEvent:r.ClickEvent,ButtonURL:r.URL,ButtonIcon:r.Icon},s={GotoStatusId:"N.A.",GotoStatusName:"N.A.",GotoStatusCode:"N.A."},n.Status&&(p=n.Status,s={GotoStatusId:p.Id,GotoStatusName:p.Name,GotoStatusCode:p.Code}),d=Object.assign(l,s,a),c=this.fieldService.getFormFieldCode("mvWorkflowButtonDebugForm","FormField",null,null),[4,this.mainService.showzModal(c,this.debug._group,"Workflow Button Info",d)];case 1:return u.sent().subscribe((function(e){e.responseType})),[2]}}))}))}))).subscribe()},e.prototype.handleSuccess=function(e,t){var o=this;return null==e?this.toastService.show(t):void 0!==e.Data&&void 0!==e.ProcessingStatus?!0===e.ProcessingStatus&&(Array.isArray(e.Data)?e.Data.map((function(e){return o.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t+" : "+e.CostCode,null)})):this.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t,null)):this.toastService.show(t),e},e.prototype.handleError=function(e){return this.webApiService.handleError(e)},e}();J.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new J(t.ɵɵinject(o.Router),t.ɵɵinject(a.AlertService),t.ɵɵinject(a.AuthService),t.ɵɵinject(a.FieldService),t.ɵɵinject(a.ResourceApiService),t.ɵɵinject(a.ToastService),t.ɵɵinject(a.WebApiService))},token:J,providedIn:"root"}),J.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],J.ctorParameters=function(){return[{type:o.Router},{type:a.AlertService},{type:a.AuthService},{type:a.FieldService},{type:a.ResourceApiService},{type:a.ToastService},{type:a.WebApiService}]};var K=function(e){function t(t,o,n,r,i,l,s,p){var d=e.call(this,t)||this;return d.dialog=t,d.modalCtrl=o,d.zcoreService=n,d.webApiService=r,d.resourceApiService=i,d.fieldService=l,d.platform=s,d.alertService=p,d.group=new a.ZGroup(!0),d}return j(t,e),t.prototype.ngOnInit=function(){l.ZmodalHelper.onInit_ModalForm(this)},t.prototype.ngOnDestroy=function(){l.ZmodalHelper.onDestroy_ModalForm(this)},t.prototype.onCancel=function(e){l.ZmodalHelper.onCancel(this,e)},t.prototype.onConfirm=function(e){l.ZmodalHelper.onConfirm(this,e)},t.prototype.onInitClose=function(e){l.ZmodalHelper.onInitClose(this,e)},t.prototype.isSITEnvironment=function(){return this.zcoreService.isDebugSession()},t.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&e.target.startsWith("modalGroup")){console.log(">> SubjectEvent",e);var n=a.ZComponentHelper.getGroupEvalValue.call(this,e.target,t);if("function"==typeof n){var r=this.group.form;if(Object.assign(this.group.zModel,r.value),e.data=this.group.zModel,e.target.startsWith("modalGroup.modalAnswer")||e.target.startsWith("modalGroup.modalClose")||e.target.startsWith("modalGroup.modalCancel"))n.bind(this)(e);else n.bind(t.ctrlScope)(e)}else console.warn("Function not defined in group for: ",n,", Event: ",e)}},t.prototype.getModel$=function(e,t){var o=t||e.referenceId;return this.webApiService.httpGet$(e.resourceURL+"/"+o,null)},t.prototype.getGridStyle=function(){if(!this.isMobileScreen)return{"height.px":500,"width.px":700}},t.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},t}(p.DialogContentBase);K.decorators=[{type:t.Component,args:[{selector:"app-zmodal",template:'<ion-header *ngIf="isMobileScreen()">\r\n <ion-toolbar>\r\n <ion-buttons slot="start">\r\n <ion-button (click)="onCancel()">\r\n \x3c!-- <ion-icon name="close"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times\'" size="lg"></fa-icon>\r\n </ion-button>\r\n </ion-buttons>\r\n <ion-title>\r\n {{ modalParams.formHeader }}\r\n </ion-title>\r\n <ion-buttons slot="primary" *ngIf="!group.isLoading">\r\n <app-uiactionbutton [group]="group"></app-uiactionbutton>\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content appScrollbarTheme [ngStyle]="getGridStyle()">\r\n <ion-grid>\r\n <ion-row *ngIf="group.isLoading" class="ion-text-center">\r\n <ion-col class="ion-margin ion-padding">\r\n <ion-spinner></ion-spinner>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="!group.isLoading">\r\n <ion-col>\r\n <app-zform [group]="group"></app-zform>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="isSITEnvironment() && !group.isLoading">\r\n <ion-col>\r\n <pre style="font-size: x-small;">{{group.zModel | json}}</pre>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n</ion-content>\r\n\r\n',styles:[""]}]}],K.ctorParameters=function(){return[{type:p.DialogRef},{type:n.ModalController},{type:a.ZCoreService},{type:a.WebApiService},{type:a.ResourceApiService},{type:a.FieldService},{type:n.Platform},{type:a.AlertService}]},K.propDecorators={modalParams:[{type:t.Input}]};var Y=function(){function e(e,t,o){this.webApiService=e,this.zcoreService=t,this.fieldService=o,this.group=new a.ZGroup(!0)}return e.prototype.ngOnInit=function(){l.ZmodalHelper.onInit_ModalForm(this)},e.prototype.ngOnDestroy=function(){l.ZmodalHelper.onDestroy_ModalForm(this)},e.prototype.onCancel=function(e){l.ZmodalHelper.onCancel(this,e)},e.prototype.onConfirm=function(e){l.ZmodalHelper.onConfirm(this,e)},e.prototype.onInitClose=function(e){l.ZmodalHelper.onInitClose(this,e)},e.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&e.target.startsWith("modalGroup")){console.log(">> SubjectEvent",e);var n=a.ZComponentHelper.getGroupEvalValue.call(this,e.target,t);if("function"==typeof n){var r=this.group.form;if(Object.assign(this.group.zModel,r.value),e.data=this.group.zModel,e.target.startsWith("modalGroup.modalAnswer")||e.target.startsWith("modalGroup.modalCancel"))n.bind(this)(e);else n.bind(t.ctrlScope)(e)}else console.warn("Function not defined in group for: ",n,", Event: ",e)}},e.prototype.getModel$=function(e,t){var o=t||e.referenceId;return this.webApiService.httpGet$(e.resourceURL+"/"+o,null)},e.prototype.getGridStyle=function(){if(!this.isMobileScreen)return{"height.px":500,"width.px":700}},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isSITEnvironment=function(){return this.zcoreService.isDebugSession()},e}();Y.decorators=[{type:t.Component,args:[{selector:"app-zmodal",template:'<ion-header *ngIf="isMobileScreen()">\r\n <ion-toolbar>\r\n <ion-buttons slot="start">\r\n <ion-button (click)="onCancel()">\r\n \x3c!-- <ion-icon name="close"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times\'" size="lg"></fa-icon>\r\n </ion-button>\r\n </ion-buttons>\r\n <ion-title>\r\n {{ modalParams.formHeader }}\r\n </ion-title>\r\n <ion-buttons slot="primary" *ngIf="!group.isLoading">\r\n <app-uiactionbutton [group]="group"></app-uiactionbutton>\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content appScrollbarTheme [ngStyle]="getGridStyle()">\r\n <ion-grid>\r\n <ion-row *ngIf="group.isLoading" class="ion-text-center">\r\n <ion-col class="ion-margin ion-padding">\r\n <ion-spinner></ion-spinner>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="!group.isLoading">\r\n <ion-col>\r\n <app-zform [group]="group"></app-zform>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="isSITEnvironment() && !group.isLoading">\r\n <ion-col>\r\n <pre style="font-size: x-small;">{{group.zModel | json}}</pre>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n</ion-content>\r\n\r\n',styles:[""]}]}],Y.ctorParameters=function(){return[{type:a.WebApiService},{type:a.ZCoreService},{type:a.FieldService}]},Y.propDecorators={modalParams:[{type:t.Input}]};var Q=function(){function e(e,t,o,n,r,i,a,l,s,p,d,c){this.router=e,this.modalCtrl=t,this.navController=o,this.alertService=n,this.cacheService=r,this.fieldService=i,this.resourceApiService=a,this.toastService=l,this.webApiService=s,this.zcoreService=p,this.modalService=d,this.debugService=c,console.log("MainService constructor"),this.oauthEnvironmentUrl=this.zcoreService.getEnvironment().e1OauthUrl+"/"}return e.prototype.startUp=function(){console.log("At main.service (StartUp) ...")},e.prototype.setGroup=function(e){this.group=e,this.fieldService.setGroup(e),this.resourceApiService.setGroup(e),this.webApiService.setGroup(e),(this.zcoreService.isDebugSession()||!1)&&this.debugService.onInitDebugger(e,this)},e.prototype.getResourceServerData=function(){return this.resourceApiService.loadData()},e.prototype.getGroupFields=function(e,t,o,n){return this.fieldService.getFormFieldCode(e,t,o,n)},e.prototype.initializeGroup=function(e,t,o,n){var i=this;n.subscription&&n.subscription.unsubscribe();var a=e.resourceURLName||t;return e.resourceURLName=a,Object.assign(e,{resourceURL:this.resourceApiService.getURL(a),gridColumnFields:this.fieldService.getFormFieldCode(t,"FormField",null,null),ctrlScope:n,pageName:o,ctrlName:t,editModelURL:t.toLowerCase(),isLoading:!0,fields:[],zModel:{},zComponents:{},zData:{},subject:new r.BehaviorSubject(null),cancelButtonName:"Close",zButtonsCount:0,backNavigation:this.backNavigation.bind(this),historyBack:this.historyBack.bind(this),refreshPage:this.refreshPage,refreshGrid:this.refreshGrid.bind(this),updateModel:this.updateModel.bind(this),createModel:this.createModel.bind(this),cloneNewModel:this.cloneNewModel.bind(this),deleteModel:this.deleteModel.bind(this),newModel:this.newModel.bind(this)}),n.subscription=e.subject.subscribe((function(t){return i.subjectEvent(t,e,n)})),n.subscription},e.prototype.getModel$=function(e,t){var o=this,n=t||e.referenceId;return this.webApiService.httpGet$(e.resourceURL+"/"+n,null).pipe(i.tap((function(t){e.zModel=t,e.parentReferenceField&&-1!==Object.keys(t).indexOf(e.parentReferenceField)&&!e.backNavigationPage.endsWith(".edit")&&(e.backNavigationPage=e.backNavigationPage+"/"+t[e.parentReferenceField].toString()+"/edit")})),i.switchMap((function(){return e.afterGetModelSuccess?o.afterGetModelSuccess(e):r.of([])})))},e.prototype.canExit=function(e){return!e||!e.dirty||(!!e.skipDirtyCheck||this.alertService.show("Data not save yet","Are you sure want to discard the changes?",["Cancel","Discard Changes"]).pipe(i.switchMap((function(e){return"Discard Changes"===e?r.of(!0):r.of(!1)}))))},e.prototype.closeModalForm=function(){this.modalCtrl.dismiss()},e.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&!e.target.startsWith("modalGroup.")){var n;console.log(">> SubjectEvent",e);try{n=a.ZComponentHelper.getGroupEvalValue.call(t.ctrlScope,e.target,t)}catch(t){console.warn("Error when getGroupValue: ",e.target," > Error: ",t)}if("function"==typeof n)n.bind(o)(e,t,o);else if("string"==typeof n){if(e.type.endsWith("onNavigateTo")){var r=e.target.replace("/:id","/"+e.data);return void this.router.navigate([r])}if("zgrid-cellClick"===e.type){var i=n.slice(4);this.modalService.show(e.columnFields$||i,t,"",{},e.data.Id)}}else if("object"==typeof n){if("zgrid-cellClick"===e.type){if(n.navigateUrl){var l=n.navigateUrl.replace(":id",e.data.Id);return void this.router.navigate([l])}var s={};if(s.controllerName=n.ctrlName,s.referId=e.data.Id,s.colFields$=e.columnFields$,s.parentGroup=o.group,s.formHeader=n.formHeader,n.formHeader)return void this.modalService.show(e.columnFields$||n.ctrlName,t,n.formHeader,{},e.data.Id);console.warn("Invalid callFunc type: ",n," event.Target: ",e.target)}}else console.warn("Function not defined in group for: ",e.target,", Event: ",e)}},e.prototype.handleSuccess=function(e,t){var o=this;return this.group.isTriggered=!1,null==e?this.toastService.show(t):void 0!==e.Data&&void 0!==e.ProcessingStatus?!0===e.ProcessingStatus&&(Array.isArray(e.Data)?e.Data.map((function(e){return o.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t+" : "+e.CostCode,null)})):this.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t,null)):this.toastService.show(t),e},e.prototype.handleError=function(e){return this.group.isTriggered=!1,this.webApiService.handleError(e)},e.prototype.backNavigation=function(e,t,o){var n=this;t.beforeBackNavigationPage?t.beforeBackNavigationPage(t).subscribe((function(){t.isTriggered=!1,n.router.navigate([t.backNavigationPage])})):(t.isTriggered=!1,this.router.navigate([t.backNavigationPage]))},e.prototype.historyBack=function(){this.group.isTriggered=!1,this.navController.pop()},e.prototype.refreshGrid=function(e,t,o,n){if(n=n||"gridOptions",e&&e.target){var r=e.target.trim().replace("(","").replace(")","").replace("group.refreshGrid","");r.length>0&&(n=r)}var i=t[n];i&&i.getData(),t.isTriggered=!1},e.prototype.refreshPage=function(){this.group&&(this.group.isTriggered=!1),location.reload()},e.prototype.getCloneNewCacheZModel=function(e){var t=this.cacheService.getCache("cloneNewModel");t&&(this.cacheService.clearCache("cloneNewModel"),e.zModel=t,e.zModel.Id=0),e.isTriggered=!1},e.prototype.newModel=function(e,t){var o=this,n=t;e&&e.data&&e.data.SubType&&(n=t["_"+e.data.SubType]),r.of([]).pipe(i.switchMap((function(e){return console.log("Before new, zModel:",e),o.beforeNewModel(n)})),i.tap((function(){var e=t.parentReferenceId||"0";console.log("current url: ",o.router.url);var n=o.router.url.split("/"),r=n[n.length-1];if("edit"===r){var i=n.slice(0,n.length-2);i.push(e),i.push("new"),o.cacheService.getCache("cloneNewModel")?o.router.navigate(i):o.router.navigateByUrl(o.group.backNavigationPage,{skipLocationChange:!0}).then((function(){o.group.zModel={},o.group.isEdit=!1,o.group.isNew=!0,o.group.isTriggered=!1,o.router.navigate(i)}))}else"new"===r?(t.zModel={},t.form.reset(),t.isEdit=!1,t.isNew=!0,t.isTriggered=!1,t.zModel[t.parentReferenceField]=t.parentReferenceId.toString()):(t.isTriggered=!1,o.router.navigate([t.editModelURL,e,"new"],{relativeTo:t.ctrlScope.activatedRoute}))}))).subscribe()},e.prototype.createModel=function(e,t){var o=this,n=null,l=t.form,s=t;if(e&&e.data&&e.data.SubType&&(l=t["_"+e.data.SubType].form,s=t["_"+e.data.SubType]),l.dirty)if(l.valid)r.of(s.zModel).pipe(i.switchMap((function(e){return console.log("Before create, zModel:",e),o.beforeCreateModel(s)})),i.tap((function(){Object.assign(s.zModel,l.value)})),i.switchMap((function(){var e=Object.assign({},s.zModel);return a.ZComponentHelper.removeNullFields(e),o.webApiService.httpPost$(s.resourceURL,e).pipe(i.tap((function(e){return n=e,e})),i.map((function(e){return o.handleSuccess(e,"Record is created successfully.")})))})),i.switchMap((function(e){return console.log("After created, zModel:",e),e&&(e.Data?(Object.assign(s.zModel,e.Data),l.patchValue(e.Data)):e.Id&&(Object.assign(s.zModel,e),l.patchValue(e)),s.referenceId=s.zModel.Id,l.markAsPristine()),o.afterCreateModel(s)})),i.tap((function(e){null==n.ProcessingStatus||1==n.ProcessingStatus?(e&&0!==s.zModel.Id&&(s.isNew=!1,s.isEdit=!0,s.isTriggered=!1,s.cancelButtonName="Close",Object.assign(s.zModel,e),l.patchValue(e)),l.markAsPristine()):l.markAsDirty()}))).subscribe();else{var p=a.ZComponentHelper.getFormGroupErrors(l,this.alertService,t);console.warn("Form Validation got error(s):",p)}else console.warn("Form is not dirty hence record is not save.")},e.prototype.updateModel=function(e,t){var o=this,n=t.form,l=t;if(e&&e.data&&e.data.SubType&&(n=t["_"+e.data.SubType].form,l=t["_"+e.data.SubType]),n.dirty)if(n.valid)r.of(l.zModel).pipe(i.switchMap((function(e){return console.log("Before update, zModel:",e),o.beforeUpdateModel(l)})),i.tap((function(){Object.assign(l.zModel,n.value)})),i.switchMap((function(){return o.webApiService.httpPut$(l.resourceURL+"/"+l.zModel.Id,l.zModel).pipe(i.map((function(e){return o.handleSuccess(e,"Record is updated successfully.")})))})),i.switchMap((function(e){return console.log("After updated, zModel:",e),e&&e.Data?(Object.assign(l.zModel,e.Data),n.patchValue(e.Data)):e&&e.Id&&(Object.assign(l.zModel,e),n.patchValue(e)),t.isTriggered=!1,l.isTriggered=!1,n.markAsPristine(),o.afterUpdateModel(l)}))).subscribe();else{var s=a.ZComponentHelper.getFormGroupErrors(n,this.alertService,t);console.warn("Form Validation got error(s):",s)}else console.warn("Form is not dirty hence record is not save.")},e.prototype.cloneNewModel=function(e,t){var o=t;e&&e.data&&e.data.SubType&&(o=t["_"+e.data.SubType]),Object.assign(o.zModel,o.form.value),o.zModel.Id=0;["WFS_DocumentId","WFS_StatusCode","WFS_StatusName"].forEach((function(e){o.zModel.hasOwnProperty(e)&&(o.zModel[e]=null)})),this.cacheService.setCache("cloneNewModel",t.zModel),this.newModel(null,t),t.isTriggered=!1,o.isTriggered=!1},e.prototype.deleteModel=function(e,t){var o=this,n=t.form,a=t;e&&e.data&&e.data.SubType&&(n=t["_"+e.data.SubType].form,a=t["_"+e.data.SubType]),r.of(a.zModel).pipe(i.switchMap((function(e){return console.log("Before delete, zModel:",e),o.beforeDeleteModel(a)})),i.switchMap((function(){return t.isTriggered=!1,a.isTriggered=!1,o.alertService.show("Delete Record","Are you sure?",[{text:"No",cssClass:"secondary"},{text:"Yes",cssClass:"primary"}])})),i.switchMap((function(e){return"Yes"===e?(Object.assign(a.zModel,n.value),a.zModel.Disabled=!0,o.webApiService.httpPut$(a.resourceURL+"/"+a.zModel.Id,a.zModel).pipe(i.map((function(e){return o.handleSuccess(e,"Record is deleted successfully.")})),i.switchMap((function(e){return console.log("After deleted, zModel:",e),o.afterDeleteModel(a)})),i.tap((function(e){o.historyBack()})))):r.of([])}))).subscribe()},e.prototype.beforeUpdateModel=function(e){return e.beforeUpdateModel?e.beforeUpdateModel(e):(console.warn("group.beforeUpdateModel is undefined"),r.of({}))},e.prototype.beforeDeleteModel=function(e){return e.beforeDeleteModel?e.beforeDeleteModel(e):(console.warn("group.beforeUpdateModel is undefined"),r.of({}))},e.prototype.beforeNewModel=function(e){return e.beforeNewModel?e.beforeNewModel(e):(console.warn("group.beforeNewodel is undefined"),r.of({}))},e.prototype.beforeCreateModel=function(e){return e.beforeCreateModel?e.beforeCreateModel(e):(console.warn("group.beforeUpdateModel is undefined"),r.of({}))},e.prototype.beforePageInitialise=function(e){return e.beforePageInitialise?e.beforePageInitialise(e):(console.warn("group.beforePageInitialise is undefined"),r.of({}))},e.prototype.afterGetModelSuccess=function(e){return e.zModel.Id?e.afterGetModelSuccess?e.afterGetModelSuccess(e):(console.warn("group.afterGetModelSuccess is not defined"),r.of({})):(console.warn("zModel.Id is not defined",e.zModel),r.of({}))},e.prototype.afterNewModel=function(e){return e.afterNewModel?e.afterNewModel(e):(console.warn("group.afterNewModel is not defined"),r.of({}))},e.prototype.afterCreateModel=function(e){return e.afterCreateModel?e.afterCreateModel(e):(console.warn("group.afterCreateModel is not defined"),r.of({}))},e.prototype.afterUpdateModel=function(e){return e.afterUpdateModel?e.afterUpdateModel(e):(console.warn("group.afterUpdateModel is not defined"),r.of({}))},e.prototype.afterDeleteModel=function(e){return e.afterDeleteModel?e.afterDeleteModel(e):(console.warn("group.afterDeleteModel is not defined"),r.of({}))},e.prototype.afterPageInitialise=function(e){return e.afterPageInitialise?e.afterPageInitialise(e):(console.warn("group.afterPageInitialise is undefined"),r.of({}))},e.prototype.showzModal=function(e,t,o,n,r,i,a){return q(this,void 0,void 0,(function(){var l,s;return _(this,(function(p){switch(p.label){case 0:return l=K,s=Y,t&&(t.isTriggered=!1),[4,this.modalService.show(e,t,o,l,s,n,r,i,a)];case 1:return[2,p.sent()]}}))}))},e.prototype.cookieStorePost=function(e,t){var o=this.oauthEnvironmentUrl+"api/CookieStores",n={Name:e,Value:JSON.stringify(t)};return this.webApiService.httpPost$(o,n).pipe(i.map((function(e){if(e)return console.log("grid config saved("+e.status+"): ",e),e})))},e.prototype.cookieStoreGet=function(e,t){var o=this.oauthEnvironmentUrl+"api/CookieStores/?name="+e;return this.webApiService.httpGet$(o,{headers:t}).pipe(i.map((function(e){if(e)return e})))},e.prototype.cookieStoreDeleteMultiple=function(e){var t=this.oauthEnvironmentUrl+"Admin/DeleteMultipleCookies",o={containName:e};return this.webApiService.httpPost$(t,o).pipe(i.map((function(e){if(e)return e})))},e}();Q.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Q(t.ɵɵinject(o.Router),t.ɵɵinject(n.ModalController),t.ɵɵinject(n.NavController),t.ɵɵinject(a.AlertService),t.ɵɵinject(a.CacheService),t.ɵɵinject(a.FieldService),t.ɵɵinject(a.ResourceApiService),t.ɵɵinject(a.ToastService),t.ɵɵinject(a.WebApiService),t.ɵɵinject(a.ZCoreService),t.ɵɵinject(l.ModalService),t.ɵɵinject(J))},token:Q,providedIn:"root"}),Q.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:o.Router},{type:n.ModalController},{type:n.NavController},{type:a.AlertService},{type:a.CacheService},{type:a.FieldService},{type:a.ResourceApiService},{type:a.ToastService},{type:a.WebApiService},{type:a.ZCoreService},{type:l.ModalService},{type:J}]};var X=function(){function e(e){this.el=e,this.stylesheet="\n ::-webkit-scrollbar {\n width: 5px;\n }\n ::-webkit-scrollbar-track {\n background: var(--ion-color-light);\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background: var(--ion-color-light-shade);\n border: 0 solid #020202;\n }\n ::-webkit-scrollbar-thumb:hover {\n }\n "}return e.prototype.ngOnInit=function(){var e=this.el.nativeElement.shadowRoot.querySelector("style");if(e)e.append(this.stylesheet);else{var t=document.createElement("style");t.append(this.stylesheet),this.el.nativeElement.shadowRoot.appendChild(t)}},e}();X.decorators=[{type:t.Directive,args:[{selector:"[appScrollbarTheme]"}]}],X.ctorParameters=function(){return[{type:t.ElementRef}]};var ee=function(e){this.viewContainerRef=e};ee.decorators=[{type:t.Directive,args:[{selector:"[fieldelement]"}]}],ee.ctorParameters=function(){return[{type:t.ViewContainerRef}]};var te=function(e){function t(t,o,n,r,i,a){var l=e.call(this,t)||this;return l.webapiService=o,l.authService=n,l.storageService=r,l.router=i,l.zGridStatePersistingService=a,l.state={skip:0,take:10},l.gridColumns=[],l.usableColumns=[],l.resourceURL=null,l.paginationApiPostUrl=null,l.dataSource=null,l}return j(t,e),Object.defineProperty(t.prototype,"field",{get:function(){return this.zgridbinding.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grp",{get:function(){return this.zgridbinding.group},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridSubject",{get:function(){return this.zgridbinding.gridSubject},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.zgridbinding.params},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getData",{get:function(){return this.grid.data},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.field.SkipDirective){if(e.prototype.ngOnInit.call(this),this.grid.loading=!0,this.state.take=this.field.PageSize||20,this.pageSize=this.state.take,this.dataSource=this.field.DataSource?this.field.DataSource:null,!this.dataSource){if(this.resourceURL=a.ZComponentHelper.getGroupValue(this.field.ResourceURL,this.grp),!this.resourceURL)return this.grid.loading=!1,void("ActivityLogGrid"!==this.zgridbinding.data.Name&&console.warn("No initialise for Field.ResourceURL: ",this.field.ResourceURL));var t=this.resourceURL.split("/api/");if(t[1])t[1]="Page"+t[1],this.paginationApiPostUrl=t.join("/api/");else{var o=this.resourceURL.split("/");o[o.length-2]="Page"+o[o.length-2],this.paginationApiPostUrl=o.join("/")}this.setFilterParamsByParentRefId()}this.gridSubject.next(this),this.generateGridColumns()}},t.prototype.setFilterParamsByParentRefId=function(){var e=this.getFieldReferenceId()||this.grp.referenceId,t=this.field.ReferenceField||this.grp.parentReferenceField;if(e&&t){var o={key:t,ops:"=",value:e};this.params.filterParams.push(o)}},t.prototype.getFieldReferenceId=function(){var e=null;return this.field.ReferenceId&&(e=a.ZComponentHelper.getGroupValue(this.field.ReferenceId,this.grp)),e},t.prototype.ngOnDestroy=function(){this.serviceSubscription&&this.serviceSubscription.unsubscribe(),e.prototype.ngOnDestroy.call(this)},t.prototype.generateGridColumns=function(){var e=this;a.ZComponentHelper.getGroupValue(this.field.ColumnFields,this.grp).pipe(i.tap((function(t){var o=e.getGridSettings(),n=e.field.FieldElementName;a.ZComponentHelper.getGridColumns(t,e.gridColumns,e.zgridbinding.group,e.authService,n,o,e.usableColumns),e.getFilterParamsColumns(),e.getFilter(),e.getFilterParams(),e.getSorting(),e.getGrantType(),e.setHiddenColumn(o),e.params.referId=e.getFieldReferenceId()||e.grp.referenceId||null}))).subscribe((function(){e.getDataBinding()}))},t.prototype.getFilterParamsColumns=function(){var e=[];this.gridColumns.forEach((function(t){t.valueExpr?e.push(t.valueExpr+" as "+t.field):e.push(t.field)})),e.length>0&&-1===e.indexOf("Id")&&e.push("Id");var t=[];t.push(e.join(",")),this.usableColumns.length>0&&t.push(this.usableColumns.join(",")),this.params.columns=t.join(",")},t.prototype.getFilter=function(){var e=this;(this.params.filters&&this.field.Filters?this.params.filters=this.params.filters+" && "+this.field.Filters:!this.params.filters&&this.field.Filters&&(this.params.filters=this.field.Filters),this.field.Filters&&-1!==this.field.Filters.indexOf("group."))&&this.field.Filters.split(" ").filter((function(e){return-1!==e.trim().indexOf("group.")})).forEach((function(t){var o=a.ZComponentHelper.getGroupValue(t,e.grp);e.params.filters=e.params.filters.replace(t,o)}))},t.prototype.getFilterParams=function(){this.field.FilterParams&&(-1!==this.field.FilterParams.indexOf("group.")?this.params.filterParams=a.ZComponentHelper.getGroupValue(this.field.FilterParams,this.grp):this.params.filterParams=this.field.FilterParams)},t.prototype.getSorting=function(){this.field.SortOrder&&(-1!==this.field.SortOrder.indexOf("group.")?this.params.sortOrder=a.ZComponentHelper.getGroupValue(this.field.SortOrder,this.grp):this.params.sortOrder=this.field.SortOrder)},t.prototype.getGrantType=function(){this.field.GrantType&&(this.params.grantType=a.ZComponentHelper.getGroupValue(this.field.GrantType.toString(),this.grp))},t.prototype.setHiddenColumn=function(e){var t=this;if(this.gridColumns&&e){var o=e.filter((function(e){return 1==e.hidden}));Object.values(o).forEach((function(e){t.gridColumns.find((function(t){return t.field===e.field}))&&(t.gridColumns.find((function(t){return t.field===e.field})).hidden=e.hidden)}))}},t.prototype.getDataBinding=function(){var e=this;if(this.grid.loading=!0,this.dataSource){var t=a.ZComponentHelper.getGroupValue(this.field.DataSource,this.grp);t&&(this.grid.data={data:t,total:t.length},this.grid.pageSize=t.length),this.gridSubject.next(this),this.grid.loading=!1}else this.params.pageSize=this.state.take,this.field.ExternalPagination?this.webapiService.postApi(this.paginationApiPostUrl,this.params,null,null,null,null,!0).subscribe((function(t){e.aggregateHandling(t.dataSet),e.grid.data={data:t.dataSet,total:t.totalCount},e.grid.loading=!1,e.gridSubject.next(e),e.notifyDataChange()})):this.webapiService.getApi(this.resourceURL,null,null,null,null,null,!0).subscribe((function(t){var o=null,n=0;t.dataSet?(o=t.dataSet,n=t.totalCount):(o=t,n=t.length),e.aggregateHandling(o),e.grid.data={data:o,total:n},e.grid.pageSize=n,e.grid.loading=!1,e.gridSubject.next(e),e.notifyDataChange()}))},t.prototype.clearData=function(){this.grid.data={data:[],total:0}},t.prototype.aggregateHandling=function(e){this.gridColumns.filter((function(e){return e.aggregateType})).forEach((function(t){var o=t.field,n=null;switch(t.aggregateType.slice(0,-1).toLowerCase()){case"total":case"sum":n=e.reduce((function(e,t){return e+t[o]}),0);break;case"average":n=e.reduce((function(e,t){return e+t[o]}),0)/e.length;break;case"count":n=e.length;break;case"max":n=e.reduce((function(e,t){return e[o]>t[o]?e:t}))[o];break;case"min":n=e.reduce((function(e,t){return e[o]<t[o]?e:t}))[o]}t.aggregateValue=n}))},t.prototype.aggregateResetValue=function(){this.gridColumns.filter((function(e){return e.aggregateType})).forEach((function(e){e.aggregateValue=0}))},t.prototype.pageChange=function(e){this.params.pageNo=e.skip/this.params.pageSize,this.state.skip=e.skip,this.getDataBinding()},t.prototype.sortChange=function(e){var t=this;this.sort=e,this.params.sortColumnNames=[],this.params.sortOrders=[],e.forEach((function(e){if(e.dir){t.params.sortOrders.push(e.dir);var o=t.gridColumns.find((function(t){return t.field===e.field}));void 0!==o.valueExpr?t.params.sortColumnNames.push(o.valueExpr):t.params.sortColumnNames.push(e.field)}})),this.getDataBinding()},t.prototype.filterChange=function(e){var t=this;this.params.pageNo=0,this.params.filterParams=[],this.setFilterParamsByParentRefId(),console.log(e),e&&e.filters.length>0&&e.filters.forEach((function(e){var o=t.gridColumns.find((function(t){return t.field===e.field}));e.filters?e.filters.forEach((function(e){null===e.value&&(e.value=""),t.params.filterParams.push({key:e.field,ops:t.mapFilterOperator(e.operator),value:e.value})})):(null===e.value&&(e.value=""),t.params.filterParams.push({key:void 0!==o.valueExpr?"("+o.valueExpr+")":e.field,ops:t.mapFilterOperator(e.operator),value:e.value}))})),this.setGridSessionFilter(this.grp,this),this.getDataBinding()},t.prototype.dataStateChange=function(e){this.skip=e.skip,this.pageSize=e.take,this.state.skip=e.skip,this.state.take=e.take,this.grid.loading=!0,this.aggregateResetValue()},t.prototype.mapFilterOperator=function(e){switch(e){case"eq":return"eq";case"neq":return"neq";case"lt":return"lt";case"lte":return"lte";case"gt":return"gt";case"gte":return"gte";case"startswith":return"startswith";case"endswith":return"endswith";case"isnull":return"isnull";case"isnotnull":return"isnotnull";case"contains":if(!this.field.FilterContainsUsingEqual)return"contains";default:return"=="}},t.prototype.getGridSettings=function(){var e="ionic-field::"+this.authService.e1Token.userName+"::"+this.field.Name+"::"+this.router.url,t=this.zGridStatePersistingService.get(e);if(t){var o=JSON.parse(t.Value);if(o)return o.gridSettings.columnsConfig.sort((function(e,t){return e.orderIndex-t.orderIndex}))}},t.prototype.beforeGridGetData=function(e,t){return console.warn("beforeDataBinding triggered"),e.beforeGridGetData?e.beforeGridGetData(e,t):(console.warn("group.beforeDataBinding is undefined"),r.of(!0))},t.prototype.getGridSessionFilter=function(e,t){var o=this;if(!e.GridStorageKey)return r.of([]);var n=e.GridStorageKey;if(this.storageService){var a=new r.Subject;return r.of(!0).pipe(i.switchMap((function(){return o.storageService.get(n)})),i.tap((function(e){if(e&&e.value&&"null"!==e.value){var t=JSON.parse(e.value);o.state.filter=JSON.parse(t.StateFilter),o.params.filterParams=JSON.parse(t.FilterParams),o.state.filter.filters.forEach((function(e){e.field.includes("UTC")&&(e.value=new Date(e.value))})),a.next()}else a.next()}))).subscribe(),a.asObservable()}return r.of([])},t.prototype.setGridSessionFilter=function(e,t){if(!e.GridStorageKey)return null;var o=e.GridStorageKey;if(t.state.filter&&this.storageService&&this.field.SaveFilter){var n={StateFilter:JSON.stringify(t.state.filter),FilterParams:JSON.stringify(t.params.filterParams)};this.storageService.set(o,JSON.stringify(n))}},t}(d.DataBindingDirective);te.decorators=[{type:t.Directive,args:[{selector:"[zgridbinding]"}]}],te.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[d.GridComponent]}]},{type:a.WebApiService},{type:a.AuthService},{type:a.StorageSessionService},{type:o.Router},{type:a.ZGridStatePersistingService}]},te.propDecorators={zgridbinding:[{type:t.Input}]};var oe=function(e){this.element=e};oe.decorators=[{type:t.Directive,args:[{selector:"[popupAnchor]",exportAs:"popupAnchor"}]}],oe.ctorParameters=function(){return[{type:t.ElementRef}]};var ne=function(){function e(){}return e.prototype.onFocus=function(){this.openOnFocus&&(this.openOnFocus.readonly||this.openOnFocus.toggle(!0))},e.prototype.onBlur=function(){this.openOnFocus&&this.openOnFocus.toggle(!1)},e}();ne.decorators=[{type:t.Directive,args:[{selector:"kendo-combobox[openOnFocus]"}]}],ne.propDecorators={openOnFocus:[{type:t.Input}],onFocus:[{type:t.HostListener,args:["focus"]}],onBlur:[{type:t.HostListener,args:["blur"]}]};var re=function(){function e(){}return e.prototype.transform=function(e){if(!e)return e;try{return new Date(e)}catch(e){return console.log("DateParserFilter error: ",e),null}},e}();re.decorators=[{type:t.Pipe,args:[{name:"dateParser",pure:!0}]}];var ie=function(){function e(){}return e.prototype.transform=function(e){if(e){if("string"==typeof e)try{var t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return e}if("object"==typeof e||Array.isArray(e))try{return JSON.stringify(e,null,2)}catch(e){return"problem - [Circular structure to JSON]"}}},e.prototype.safeStringify=function(e){var t=[];return JSON.stringify(e,(function(e,o){if("object"==typeof o&&null!==o){if(t.includes(o))return;t.push(o)}return o}),2)},e}();ie.decorators=[{type:t.Pipe,args:[{name:"editorfilter",pure:!1}]}];var ae=function(){function e(){}return e.prototype.transform=function(e,t){return e&&t?("2"==t?Object.values(e).forEach((function(e){e.DivClass="col-sm-6"})):"3"==t&&Object.values(e).forEach((function(e){e.DivClass="col-sm-12"})),e):e},e}();ae.decorators=[{type:t.Pipe,args:[{name:"divzlayout",pure:!0}]}];var le=function(){function e(){this.viewerToolTipOpening=null,this.resourceURL=null,this.ReportSource=null,this.ready=null,this.exportBegin=null,this.exportEnd=null,this.onRenderingEnd=null,this.viewerContainerStyle=null,this.isVisible=null,this.paramToResizeReportViewer=null,this.resizeReportView=null,this.largeMenuBound=!1,this.sideMenuBound=!1,this.reportSource="",this.hideOptions=[]}return e.prototype.update=function(e){this.reportSource=e,this.hideUnwantedOptions()},e.prototype.bindEvents=function(e){var t=this;this.exportOption(e);var o=$(".trv-side-menu").children("ul").data("kendoPanelBar"),n=$(".trv-menu-large").data("kendoMenu"),r=$(".trv-menu-small");8==this.hideOptions.length&&$("[data-command*='telerik_ReportViewer_export']").hide();!this.largeMenuBound&&n&&(n.bind("open",(function(){t.hideUnwantedOptions()})),this.largeMenuBound=!0),!this.sideMenuBound&&r&&(o&&o.bind("expand",(function(){t.hideUnwantedOptions()})),this.sideMenuBound=!0)},e.prototype.exportOption=function(e){var t=e.data;t.EnableExportPDF&&(this.hideOptions=this.hideOptions.filter((function(e){return"PDF"!==e}))),t.EnableExportCSV&&(this.hideOptions=this.hideOptions.filter((function(e){return"CSV"!==e}))),t.EnableExportExcel&&(this.hideOptions=this.hideOptions.filter((function(e){return"XLS"!==e})),this.hideOptions=this.hideOptions.filter((function(e){return"XLSX"!==e}))),t.EnableExportRTF&&(this.hideOptions=this.hideOptions.filter((function(e){return"RTF"!==e}))),t.EnableExportTIFF&&(this.hideOptions=this.hideOptions.filter((function(e){return"IMAGE"!==e}))),t.EnableExportMHTML&&(this.hideOptions=this.hideOptions.filter((function(e){return"MHTML"!==e}))),t.EnableExportXPS&&(this.hideOptions=this.hideOptions.filter((function(e){return"XPS"!==e})))},e.prototype.hideUnwantedOptions=function(){$("[data-command-parameter]").show(),$.each(this.hideOptions,(function(e,t){var o=$('[data-command-parameter="'+t+'"]');o&&o.length&&o.hide()}))},e.prototype.resizeViewer=function(){return null},e}();le.decorators=[{type:t.Component,args:[{selector:"app-zreport",template:'<div *ngIf="isVisible" width="100%" height="800px">\r\n <tr-viewer #ReportViewer\r\n [containerStyle]="viewerContainerStyle"\r\n [serviceUrl]="resourceURL"\r\n [reportSource]="ReportSource"\r\n [viewMode]="\'INTERACTIVE\'"\r\n [scaleMode]="\'SPECIFIC\'"\r\n [pageMode]="\'SINGLE_PAGE\'"\r\n [scale]="1.0"\r\n [ready]="ready(this)"\r\n [exportBegin]="exportBegin(this)"\r\n [exportEnd]="exportEnd(this)"\r\n [viewerToolTipOpening]="viewerToolTipOpening"\r\n [enableAccessibility]="false"\r\n [pageReady] = "resizeReportView()"\r\n [renderingEnd]="onRenderingEnd">\r\n </tr-viewer>\r\n</div>\r\n',styles:[""]}]}];var se=function(){function e(){}return e.prototype.transform=function(e,t){return e&&t?e.filter((function(e){return-1!==(e.TabArea+"").indexOf(t)})):e},e}();se.decorators=[{type:t.Pipe,args:[{name:"tabfilter",pure:!0}]}];var pe=function(e){function t(t){return e.call(this,t)||this}return j(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return(this.findByOperator("gte")||{}).value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return(this.findByOperator("lte")||{}).value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFilter",{get:function(){return this.filtersByField(this.field).length>0},enumerable:!1,configurable:!0}),t.prototype.clearFilter=function(){this.filterService.filter(this.removeFilter(this.field))},t.prototype.filterRange=function(e,t){var o;this.filter=this.removeFilter(this.field);var n=[];e&&n.push({field:this.field,operator:"gte",value:e}),t&&n.push({field:this.field,operator:"lte",value:t});var r=this.filter||{logic:"and",filters:[]};n.length&&(o=r.filters).push.apply(o,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(W(arguments[t]));return e}(n)),this.filterService.filter(r)},t.prototype.findByOperator=function(e){return this.filtersByField(this.field).filter((function(t){return t.operator===e}))[0]},t}(d.BaseFilterCellComponent);pe.decorators=[{type:t.Component,args:[{selector:"date-range-filter-cell",template:'\n <kendo-daterange >\n <kendo-dateinput\n class="range-filter"\n kendoDateRangeStartInput\n [format]="\'dd-MM-yyyy\'"\n placeholder="dd-MM-yyyy"\n [value]="start"\n (valueChange)="filterRange($event, end)"\n style="width:84px">\n </kendo-dateinput>\n -\n <kendo-dateinput\n class="range-filter"\n kendoDateRangeEndInput\n [format]="\'dd-MM-yyyy\'"\n placeholder="dd-MM-yyyy"\n [value]="end"\n (valueChange)="filterRange(start, $event)"\n style="width:85px">\n </kendo-dateinput>\n </kendo-daterange>\n <button\n *ngIf="hasFilter"\n class="k-button k-button-icon"\n title="Clear"\n (click)="clearFilter()">\n <span class="k-icon k-i-filter-clear" style="width:15px"></span>\n </button>\n ',styles:["\n kendo-daterange > kendo-dateinput.range-filter {\n display: inline-block;\n }\n .k-button {\n margin-left: 4px;\n }\n "]}]}],pe.ctorParameters=function(){return[{type:d.FilterService}]},pe.propDecorators={filter:[{type:t.Input}],field:[{type:t.Input}]};var de=function(){function e(e){this.toolbarService=e,this.local={},this.showCalendar=!1}return e.prototype.today=function(){this.toolbarService.navigate({type:"today"})},e.prototype.next=function(e){this.toolbarService.navigate({type:"next"})},e.prototype.prev=function(e){this.toolbarService.navigate({type:"prev"})},e.prototype.onChange_Calendar=function(e){var t=this;this.local.inProgress=!0,this.toolbarService.navigate({type:"select-date",date:e}),this.toggleCalendar(),r.of([]).pipe(i.take(1),i.delay(1e3)).subscribe((function(){return t.local.inProgress=!1}))},e.prototype.onBlur_Calendar=function(){this.toggleCalendar()},e.prototype.toggleCalendar=function(e){this.showCalendar=!1!==e&&!this.showCalendar},e.prototype.keydown=function(e){27===e.keyCode&&!0===this.showCalendar&&this.toggleCalendar(!1)},e.prototype.documentClick=function(e){"k-nav-current"===e.target.className?this.toggleCalendar():!0===this.showCalendar&&this.toggleCalendar(!1)},e}();de.decorators=[{type:t.Component,args:[{selector:"zschedulertoolbar",template:'\n <div class="k-scheduler-navigation">\n <button class="k-nav-today" (click)="today()">\n Today\n </button>\n <button class="k-nav-prev" (click)="prev($event)">\n <span class="k-icon k-i-arrow-60-left"></span>\n </button> \n <span>\n <a class="k-nav-current" #anchor\n >\n \x3c!-- <span class="k-icon k-i-calendar"></span> --\x3e\n {{ selectedDate | kendoDate: "dd-MMM-yyyy" }}\n </a>\n </span> \n <button class="k-nav-next" (click)="next($event)">\n <span class="k-icon k-i-arrow-60-right"></span>\n </button>\n </div>\n <kendo-popup\n style="margin:15px 0px 0px 0px;"\n [anchor]="anchor"\n (anchorViewportLeave)="showCalendar = false"\n *ngIf="showCalendar"\n >\n <kendo-calendar\n [focusedDate]="selectedDate"\n (blur)="onBlur_Calendar()"\n (valueChange)="onChange_Calendar($event)"\n ></kendo-calendar>\n </kendo-popup>\n ',styles:[":host{margin:5px 0}"]}]}],de.ctorParameters=function(){return[{type:D.ToolbarService}]},de.propDecorators={local:[{type:t.Input}],selectedDate:[{type:t.Input}],keydown:[{type:t.HostListener,args:["keydown",["$event"]]}],documentClick:[{type:t.HostListener,args:["document:click",["$event"]]}]};var ce=function(){function e(e,t){this.mainService=e,this.activatedRoute=t,this.group=new a.ZGroup(!0),e.setGroup(this.group)}return e.prototype.canExit=function(){return this.mainService.canExit(this.group.form)},e.prototype.pageOnInit=function(e,t,o,n){var a=this;return this.group._projectName=n,this.mainService.getResourceServerData().pipe(i.switchMap((function(e){return a.group.isListForm=o,a.activatedRoute.paramMap})),i.tap((function(o){var n=o.get("act");a.group.isNew="new"===n,a.group.isEdit="edit"===n,"edit"===n?a.group.referenceId=o.get("id"):"new"===n&&(a.group.parentReferenceId=o.get("parentreferenceid")||o.get("id"),a.group.backNavigationPage=a.group.backNavigationPage+"/"+a.group.parentReferenceId.toString()+"/edit"),n&&(a.group.actName=n),a.mainService.initializeGroup(a.group,e,t,a),"new"===n&&a.group.parentReferenceField&&a.group.parentReferenceId&&(a.group.zModel[a.group.parentReferenceField]=a.group.parentReferenceId.toString())})),i.switchMap((function(){var t=o?"ListField":"FormField",n=a.group.fieldName?a.group.fieldName:e;return a.group.fieldName=n,a.mainService.getGroupFields(n,t,a.group,"fields")})),i.switchMap((function(e){return a.mainService.beforePageInitialise(a.group)})),i.switchMap((function(e){return"new"===a.group.actName?(a.mainService.getCloneNewCacheZModel(a.group),a.mainService.afterNewModel(a.group)):r.of(e)})),i.switchMap((function(){return a.group.referenceId&&"0"!==a.group.referenceId?"function"==typeof a.group.getModel?a.group.getModel(a.group,a.group.referenceId):a.mainService.getModel$(a.group,a.group.referenceId):r.of({})})),i.switchMap((function(e){return a.group.parentReferenceField&&(a.group.parentReferenceId=a.group.zModel[a.group.parentReferenceField]),a.mainService.afterPageInitialise(a.group)})))},e.prototype.pageDestroy=function(){console.log(this.group.pageName+" ngOnDestroy."),this.subscription&&this.subscription.unsubscribe()},e}();ce.decorators=[{type:t.Component,args:[{template:""}]}],ce.ctorParameters=function(){return[{type:Q},{type:o.ActivatedRoute}]};var ue=function(){function e(e,t,o){this.router=e,this.zcoreService=t,this.authService=o}return e.prototype.ngOnInit=function(){var e=this.zcoreService.getEnvironment();this.profileImgUrl=e.e1OauthUrl+"/api/ProfileImage?id="+this.authService.e1Token.myProfile.UserName+"&size=80x80";var t=this.authService.e1Token.myProfile;t&&(this.username=t.UserName,this.userDisplayName=t.LastName),this.topFormHeader&&(this.formHeader=this.topFormHeader)},e.prototype.bindFormHeader=function(){return!this.topFormHeader},e.prototype.onLogout=function(){this.authService.logout(),this.router.navigateByUrl("/auth")},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e}();ue.decorators=[{type:t.Component,args:[{selector:"app-uiheader",template:'<ion-header>\r\n <ion-toolbar>\r\n <app-uimenubutton slot="start" [group]="group"></app-uimenubutton>\r\n \r\n <ion-title class="toolbar-title">\r\n <div *ngIf="!bindFormHeader()">\r\n {{ formHeader }}\r\n </div>\r\n <div *ngIf="bindFormHeader()">\r\n {{ group.formHeader }}\r\n </div>\r\n </ion-title>\r\n\r\n <div slot="end" *ngIf="!isMobileScreen()" class="end-panel">\r\n <ion-avatar class="profile-avatar">\r\n <img src="{{profileImgUrl}}" [routerLink]="[\'userProfile\']">\r\n </ion-avatar>\r\n <ion-label class="profile-username">{{userDisplayName}}</ion-label>\r\n\r\n <div class="profile-vl"></div>\r\n\r\n \x3c!--<fa-icon slot="end" class="fa-lg" [icon]="[\'fas\', \'sign-out-alt\']" (click)="onLogout()" style="cursor: pointer;"></fa-icon>--\x3e\r\n\r\n <ion-button (click)="onLogout()" fill="none" size="small">\r\n <fa-icon [icon]="[\'fas\', \'sign-out-alt\']" style="margin-right: 5px;"></fa-icon> logout\r\n </ion-button>\r\n </div>\r\n\r\n <div *ngIf="group">\r\n <ion-buttons slot="primary" *ngIf="!group.isLoading">\r\n <app-uiactionbutton [group]="group"></app-uiactionbutton>\r\n \x3c!-- <ion-button (click)="onAction()" [disabled]="false">\r\n <ion-icon name="checkmark" slot="icon-only"></ion-icon>\r\n </ion-button> --\x3e\r\n </ion-buttons>\r\n </div>\r\n\r\n </ion-toolbar>\r\n</ion-header>\r\n',styles:[".title-md{padding-inline-start:10px;padding-top:3px;font-size:18px}ion-toolbar{--background:var(--z-page-header-backgroundcolor);--color:var(--ion-toolbar-color,var(--ion-text-color,#fff));--border-color:var(--ion-toolbar-border-color,var(--ion-border-color,var(--ion-color-step-150,#256b12)))}.end-panel{display:flex;padding-right:10px;align-items:stretch}.profile-avatar{width:2.5rem;height:1.7rem}.profile-avatar,.profile-username{margin:auto;padding-right:10px}.profile-vl{margin:auto;border-left:2px solid;height:2rem;border-radius:1px}.profile-button{width:2.5rem;height:2.5rem;border-radius:12px;box-shadow:0 8px 15px rgba(0,0,0,.1);background-color:var(--z-page-header-backgroundcolor);border:none}.toolbar-title{text-shadow:.5px .5px hsla(0,0%,100%,.48)}"]}]}],ue.ctorParameters=function(){return[{type:o.Router},{type:a.ZCoreService},{type:a.AuthService}]},ue.propDecorators={group:[{type:t.Input}],topFormHeader:[{type:t.Input}]};var ge=function(){function e(e){this.zcoreService=e}return e.prototype.ngOnInit=function(){console.log(this.group)},e.prototype.isSITEnvironment=function(){return this.zcoreService.isDebugSession()&&!this.isFieldElement()},e.prototype.isFieldElement=function(){return"field"===this.group.fieldName},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e}();ge.decorators=[{type:t.Component,args:[{selector:"app-uicontent",template:'<ion-grid>\r\n <ion-row *ngIf="group.isLoading" class="ion-text-center">\r\n <ion-col class="ion-margin ion-padding">\r\n <ion-spinner></ion-spinner>\r\n\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="!group.isLoading">\r\n <ion-col>\r\n <app-zform [group]="group"></app-zform>\r\n </ion-col>\r\n \x3c!-- <pre style="font-size: x-small;">{{group.zModel | json}}</pre> --\x3e\r\n </ion-row>\r\n <ion-row *ngIf="isSITEnvironment() && !group.isLoading" style="padding-top: 50px;">\r\n <ion-col>\r\n <app-zform [group]="group" fieldName="debug"></app-zform>\r\n </ion-col>\r\n </ion-row>\r\n \x3c!-- require for mobile screen --\x3e\r\n <div *ngIf="!isSITEnvironment() && !group.isLoading && isMobileScreen()" style="height: 150px;"></div>\r\n</ion-grid>\r\n',styles:[""]}]}],ge.ctorParameters=function(){return[{type:a.ZCoreService}]},ge.propDecorators={group:[{type:t.Input}]};var he=function(){function e(){}return e.prototype.ngOnInit=function(){this.items&&this.items.length>0&&console.error("Pls stop use hardcode submenu. Now the submenu can define in e1 Menu Relationship.")},e.prototype.CheckisCategory=function(e){return void 0!==e.category},e.prototype.isCategory=function(){var e=!1;return this.items.length>0&&this.CheckisCategory(this.items[0])&&(e=!0),e},e}();he.decorators=[{type:t.Component,args:[{selector:"app-uimenucontent",template:'<div *ngIf="this.isCategory()">\r\n <ion-row *ngFor="let cat of items">\r\n <kendo-panelbar keepItemContent="true" style="width: 100%;padding:10px;">\r\n <kendo-panelbar-item [title]="[cat.category]" [expanded]="true" icon="folder" >\r\n <ng-template kendoPanelBarContent>\r\n <div class="ion-row" style="padding: 6px 12px;">\r\n <ion-grid>\r\n <ion-row>\r\n <ion-col sizeXs="4" sizeMd="3" sizeXl="2" *ngFor="let item of cat.content">\r\n <div class="menu-btn ion-activatable ripple-parent" [routerLink]="[item.url]">\r\n <ion-label class="menu-btn-label menu-btn-icon">\r\n \x3c!-- <ion-icon [name]="item.icon"></ion-icon> --\x3e\r\n <fa-icon [icon]="item.icon" style=""></fa-icon>\r\n </ion-label>\r\n <ion-label class="menu-btn-label">{{ item.title }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n </div>\r\n </ng-template>\r\n </kendo-panelbar-item>\r\n </kendo-panelbar>\r\n </ion-row>\r\n</div>\r\n<ion-grid *ngIf="!this.isCategory()">\r\n <ion-row>\r\n <ion-col sizeXs="4" sizeMd="3" sizeXl="2" *ngFor="let item of items">\r\n <div class="menu-btn ion-activatable ripple-parent" [routerLink]="[item.url]">\r\n <ion-label class="menu-btn-label menu-btn-icon">\r\n \x3c!-- <ion-icon [name]="item.icon"></ion-icon> --\x3e\r\n <fa-icon [icon]="item.icon" style=""></fa-icon>\r\n </ion-label>\r\n <ion-label class="menu-btn-label">{{ item.title }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n </ion-col>\r\n </ion-row>\r\n</ion-grid>\r\n\r\n\r\n\r\n\r\n',styles:[".menu-btn{display:flex;flex-flow:column;justify-content:center;align-items:stretch;background-color:#fff;padding:10px 5px;border:1px solid #ccc;border-radius:5px;min-height:100px;cursor:pointer}.menu-btn:hover{color:#fff;background-color:rgba(0,0,0,.4)}.ripple-parent{position:relative;overflow:hidden}.menu-btn-label{flex:1;text-align:center}.menu-btn-icon{zoom:2}"]}]}],he.ctorParameters=function(){return[]},he.propDecorators={items:[{type:t.Input}]};var fe=function(){function e(e,t){this.menuCtrl=e,this.router=t}return e.prototype.ngOnInit=function(){},e.prototype.toggleMenu=function(){this.menuCtrl.toggle()},e.prototype.backNavigate=function(){var e=this;this.group.beforeBackNavigationPage?this.group.beforeBackNavigationPage(this.group).subscribe((function(){e.router.navigate([e.group.backNavigationPage])})):this.router.navigate([this.group.backNavigationPage])},e}();fe.decorators=[{type:t.Component,args:[{selector:"app-uimenubutton",template:'\x3c!--<ion-buttons *ngIf="!group || !group.backNavigationPage" (click)="toggleMenu()" class="ion-activatable ripple-parent">\r\n <fa-icon [icon]="\'bars\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-buttons>\r\n<ion-buttons *ngIf="group && group.backNavigationPage" (click)="backNavigate()" class="ion-activatable ripple-parent">\r\n <fa-icon [icon]="\'arrow-left\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-buttons>--\x3e\r\n\r\n<ion-buttons (click)="toggleMenu()" class="ion-activatable ripple-parent">\r\n <fa-icon [icon]="\'bars\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-buttons>\r\n',styles:[":host ion-buttons{width:48px;height:53px;justify-content:center;cursor:pointer}:host ion-buttons fa-icon{text-align:center;justify-content:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;font-kerning:none;text-decoration:none;font-size:21px}:host ion-buttons:hover{color:#fff;background-color:rgba(0,0,0,.4);border-radius:5px}"]}]}],fe.ctorParameters=function(){return[{type:n.MenuController},{type:o.Router}]},fe.propDecorators={group:[{type:t.Input}]};var me=function(){function e(e,t,o,n){this.router=e,this.menuService=t,this.authService=o,this.zcoreService=n,this.colorArray=[{stroke:"#F59600",color:"#F59600"},{stroke:"#F5C800",color:"#F5C800"},{stroke:"#F5EF00",color:"#F5EF00"},{stroke:"#8FE300",color:"#8FE300"},{stroke:"#00B33D",color:"#00B33D"},{stroke:"#095D9D",color:"#095D9D"},{stroke:"#2116AA",color:"#2116AA"},{stroke:"#6509A4",color:"#6509A4"},{stroke:"#C4006F",color:"#C4006F"},{stroke:"#F52B00",color:"#F52B00"}]}return e.prototype.ngOnInit=function(){},e.prototype.getDivClass=function(e){return"dropdown-submenu"===e.Type?"flex-show":"col-xs-4 col-sm-4 col-md-3 col-xl-2"},e.prototype.getMenuList=function(e){return"dropdown-submenu"===e.Type?this.menuService.getMenuFolder(e.URL):null},e.prototype.menuOnClick=function(e,t){var o=this.zcoreService.getEnvironment().startUpPage;if(t&&"launcher"==o.toLocaleLowerCase())return a.ZComponentHelper.openAppClientPath(e,t,this.authService),!1;this.router.navigate([e])},e.prototype.setMapInput=function(e,t){var o=document.createElement("input");return o.type="hidden",o.name=e,o.setAttribute("value",t),o},e}();me.decorators=[{type:t.Component,args:[{selector:"app-uiappmenucontent",template:'<ion-grid>\r\n <ion-row>\r\n <ion-col [ngClass]="getDivClass(item)" *ngFor="let item of items; index as i">\r\n <div *ngIf="item.Type !== \'dropdown-submenu\'" class="menu-btn ion-activatable ripple-parent" (click)="menuOnClick(item.URL, item.AppClientPath)">\r\n <ion-label class="menu-btn-label menu-btn-icon">\r\n \x3c!-- <fa-icon [icon]="item.Icon"></fa-icon> --\x3e\r\n <fa-stack size="1x">\r\n <fa-icon [icon]="[\'fas\', \'square\']" stackItemSize="2x"\r\n [styles]="colorArray[i%10]"></fa-icon>\r\n <fa-icon [icon]="[\'fas\', item.Icon ]" [inverse]="true" stackItemSize="1x"\r\n transform="grow-2"></fa-icon>\r\n </fa-stack>\r\n <ion-badge color="danger" class="pending-counter"\r\n *ngIf="item[\'PendingCounter\'] && item[\'PendingCounter\'] > 0">\r\n {{item[\'PendingCounter\']}}\r\n </ion-badge>\r\n </ion-label>\r\n <ion-label class="menu-btn-label">{{ item.Label }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n <kendo-panelbar *ngIf="item.Type === \'dropdown-submenu\'" keepItemContent="true">\r\n <kendo-panelbar-item [title]="item.Label" [expanded]="true" icon="folder">\r\n <ng-template kendoPanelBarContent>\r\n <app-uiappmenucontent [items]="getMenuList(item)"></app-uiappmenucontent>\r\n </ng-template>\r\n </kendo-panelbar-item>\r\n </kendo-panelbar>\r\n </ion-col>\r\n </ion-row>\r\n</ion-grid>\r\n',styles:[".menu-btn{display:flex;flex-flow:column;justify-content:center;align-items:stretch;background-color:#fff;padding:10px 5px;border:1px solid #ccc;border-radius:5px;min-height:100px;cursor:pointer}.menu-btn:hover{color:#fff;background-color:rgba(0,0,0,.4)}.ripple-parent{position:relative;overflow:hidden}.menu-btn-label{flex:1;text-align:center;font-size:12px}.menu-btn-icon{zoom:2}.pending-counter{background-color:#ff243a;border-radius:1em;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:2px;text-overflow:ellipsis;top:2px;transform:scale(.25);transform-origin:top right;display:inline-block;position:absolute;text-align:center;font-size:2.2em}"]}]}],me.ctorParameters=function(){return[{type:o.Router},{type:a.MenuService},{type:a.AuthService},{type:a.ZCoreService}]},me.propDecorators={items:[{type:t.Input}]};var be=function(){function e(e,t,o,n,r){var i=this;this.fieldService=e,this.webApiService=t,this.resourceApiService=o,this.workflowService=n,this.actionSheetCtrl=r,this.topRightActionButton=[],this.isWorkflowButton=!1,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){i.componentProperties.isReadOnly=!e},this.setVisible=function(e){i.componentProperties.isVisible=e,i.data.Visible=e},this.setRequire=function(e){i.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,i.group,i.data.Value,i.componentProperties,u.Validators.required)},this.e1wfs_wfcGetWorkflowButtonURL=this.resourceApiService.getURL("e1wfs_wfcGetWorkflowButtonURL"),this.e1wfs_wfc_getWorkflowInitialStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getWorkflowInitialStatusURL"),this.e1wfs_wfc_getDocumentStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getDocumentStatusURL")}return e.prototype.ngOnInit=function(){var e=this;(this.data=this.getFirstzButton(this.group.fields),this.data)&&(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.isNullUndefinedEmpty(this.data.WorkflowCode)?this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null).subscribe((function(t){e.actionBtnList=t,e.reloadButtonList()})):(this.isWorkflowButton=!0,this.loadWorkflowButton()))},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFirstzButton=function(e){for(var t=0;t<e.length-1;t++){if("zbuttons"===e[t].Type||"zworkflowbuttons"===e[t].Type)return e[t];Array.isArray(e[t].Value)&&this.getFirstzButton(e[t].Value)}return null},e.prototype.onAction=function(){this.isWorkflowButton,this.actionSheetCtrl.create({header:"Choose an Action",buttons:this.topRightActionButton}).then((function(e){e.present()}))},e.prototype.reloadButtonList=function(){var e=this;this.topRightActionButton=[],this.actionBtnList.forEach((function(t){if(!1!==a.ZComponentHelper.getGroupEvalValue.call(e,t.Visible,e.group)){var o=e.getButtonLabel(t),n=e.getButtonRole(t,o);e.topRightActionButton.push({text:o,handler:function(){e.buttonClick(t)},role:n})}}))},e.prototype.buttonClick=function(e){this.group.DismissType=e.DismissType,this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:null})},e.prototype.getButtonLabel=function(e){var t=e.Label;t||(t=e.Name);var o=t.match(/^{{.*}}$/gi);return o?(o=o[0].slice(2,-2),a.ZComponentHelper.getGroupValue(o,this.group)):t},e.prototype.getButtonRole=function(e,t){var o=t.toLowerCase();return-1!==o.indexOf("cancel")||-1!==o.indexOf("close")?"cancel":null},e.prototype.loadWorkflowButton=function(){var e=this;this.topRightActionButton=[];var t=null;this.group.zModel&&(t=this.group.zModel.WFS_DocumentId),this.workflowService.appendWFS_DocumentsInfo(this.data.WorkflowCode,t);try{if(this.workflowService.getWorkflowButtonsField(this.data.WorkflowCode,this.e1wfs_wfcGetWorkflowButtonURL,String(!1)).subscribe((function(t){t.forEach((function(t){var o=e.getButtonLabel(t),n=JSON.parse(t.Attributes),r=n.Label||o;e.isBtnVisible(t.Visible)&&e.topRightActionButton.push({text:r,fieldAttribute:t,iconName:n.Icon,handler:function(o){e.workflowButtonClick(t)}})}))})),!this.data.DisableSyncWorkflowStatus){if(!this.group.zModel.WFS_StatusName){var o={WorkflowMasterCode:this.data.WorkflowCode};return this.webApiService.httpPost$(this.e1wfs_wfc_getWorkflowInitialStatusURL,o).pipe(i.map((function(t){t.Data&&(a.ZComponentHelper.presetModelValue("WFS_StatusId",t.Data.Id,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusName",t.Data.Name,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusCode",t.Data.Code,e.group),e.workflowService.setCurrentDocumentStatus(t.Data))}))).subscribe()}var n={WorkflowMasterCode:this.data.WorkflowCode,DocumentId:t};this.webApiService.httpPost$(this.e1wfs_wfc_getDocumentStatusURL,n).pipe(i.map((function(t){e.workflowService.setCurrentDocumentStatus(t),t.Data&&e.workflowService.setCurrentDocumentStatus(t.Data)}))).subscribe()}}catch(e){console.error("error: ",e)}},e.prototype.workflowButtonClick=function(e){var t=this,o=JSON.parse(e.Attributes);switch(e.TypeCode.toUpperCase()){case"FUNCTION":console.log("Functional Button: ",e.Name),this.workflowService.functionalButton_OnClick(o,this.group);break;case"GOTO":console.log("GOTO Button: ",e.Name),this.workflowService.gotoButton_Onclick(e,this.data,o,this.group,!1).subscribe((function(e){t.loadWorkflowButton(),e&&t.workflowService.triggerSendEmail(t.group).subscribe()}));break;default:console.log("Invalid Button Type. ",e.Name)}},e}();be.decorators=[{type:t.Component,args:[{selector:"app-uiactionbutton",template:'<ion-button (click)="onAction()" [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)" \r\n *ngIf="isMobileScreen() && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n class="ion-activatable ripple-parent">\r\n \x3c!-- <ion-icon name="more" slot="icon-only"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'ellipsis-v\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-button>',styles:[":host ion-button{width:48px;height:48px;justify-content:center;margin-right:4px;cursor:pointer}:host ion-button fa-icon{text-align:center;justify-content:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;font-kerning:none;text-decoration:none;font-size:21px}:host ion-button:hover{color:#fff;background-color:rgba(0,0,0,.4);border-radius:20px}"]}]}],be.ctorParameters=function(){return[{type:a.FieldService},{type:a.WebApiService},{type:a.ResourceApiService},{type:a.WorkflowService},{type:n.ActionSheetController}]},be.propDecorators={group:[{type:t.Input}]};var ve=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.getValidationError=function(e,t){return a.ZComponentHelper.getValidationError(e,t)},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIconClass=function(){return this.isMobileScreen()?"k-icon k-i-warning":"k-icon k-i-warning validation_icon"},e}();ve.decorators=[{type:t.Component,args:[{selector:"app-uivalidationmessage",template:'<div *ngIf="form.get(data.Value).invalid && (form.get(data.Value).dirty || form.get(data.Value).touched)"\r\n class="divvalidation">\r\n <div kendoTooltip\r\n position="left"\r\n showOn="hover">\r\n <span #warning\r\n [class]="getIconClass()"\r\n [title]="getValidationError(form, data)"></span>\r\n </div>\r\n</div>\r\n',styles:[".divvalidation{flex-basis:2rem;align-self:stretch;color:red}.validation_icon{padding-top:10px;padding-left:2px}"]}]}],ve.ctorParameters=function(){return[]},ve.propDecorators={group:[{type:t.Input}],data:[{type:t.Input}],form:[{type:t.Input}]};var ye=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setData=function(t){e.dataSource=t}}return e.prototype.ngOnInit=function(){this.data.ListType=this.data.ListType?this.data.ListType:"ul",this.setupDataSource(),a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this)},e.prototype.setupDataSource=function(){this.data.DataSource?-1!==this.data.DataSource.indexOf("group.")?this.dataSource=a.ZComponentHelper.getGroupValue(this.data.DataSource,this.group):this.dataSource=this.data.DataSource:console.error("No data source found for zhip")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.isVisible=function(){return null===this.componentProperties.isVisible?a.ZComponentHelper.isVisible.call(this,this.data):this.componentProperties.isVisible},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)+" "+t.DivClass},e}();ye.decorators=[{type:t.Component,args:[{selector:"app-zbullet",template:'<ion-item [formGroup]="form" *ngIf="componentProperties.isVisible" [ngClass]="getClass(form, data)">\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;" class="listContainer">\r\n <ul *ngIf="data.ListType === \'ul\'" [style.list-style-type]="data.BulletStyle ? data.BulletStyle : \'disc\'">\r\n <li *ngFor="let item of dataSource">\r\n <ion-label class="ion-text-wrap" Position="Fixed" [color]="item.Color ? item.Color : \'black\'">\r\n {{item.Label}}\r\n </ion-label>\r\n </li>\r\n </ul>\r\n <ol *ngIf="data.ListType === \'ol\'">\r\n <li *ngFor="let item of dataSource">\r\n <ion-label class="ion-text-wrap" Position="Fixed" [color]="item.Color ? item.Color : \'black\'">\r\n {{item.Label}}\r\n </ion-label>\r\n </li>\r\n </ol>\r\n \x3c!-- <dl *ngIf="data.ListType === \'dl\'">\r\n <dd *ngFor="let item of dataSource">\r\n <ion-label class="ion-text-wrap" Position="Fixed" [color]="item.Color ? item.Color : \'black\'">\r\n {{item.Label}}\r\n </ion-label>\r\n </dd>\r\n </dl> --\x3e\r\n </span>\r\n </div>\r\n</ion-item>',styles:[".subtitle{font-weight:700;text-decoration:underline}.listContainer li{font-size:12px;white-space:pre-wrap!important}.mediumFont .listContainer li{font-size:15px;white-space:pre-wrap!important}"]}]}],ye.ctorParameters=function(){return[]},ye.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ce=function(){function e(e){var t=this;this.fieldService=e,this.items=[],this.FirstZbtn=!1,this.componentProperties=new a.ZComponentProperties,this.expand="",this.setEnable=function(e){var o=t.group.form.controls[t.data.Value];e?o.enable():o.disable(),t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this);var t=this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null);this.group.zButtonsCount++,1===this.group.zButtonsCount&&(this.FirstZbtn=!0),this.expand=this.data.Expand||"";try{t.subscribe((function(t){t.forEach((function(t){e.data.SubType&&(t.Name=e.data.SubType+"_"+t.Name);var o=e.getButtonLabel(t),n=null;""!=t.Disabled&&t.Disabled&&(n="true"===t.Disabled||a.ZComponentHelper.getGroupEvalValue.call(e,t.Disabled));var r=t.Fill?t.Fill:"outline",i=t.Color?t.Color:"dark";e.items.push({name:t.Name,text:o,icon:a.ZComponentHelper.getIcon(t.Icon),visible:t.Visible,disabled:n,clickEvent:t.ClickEvent,iconName:t.Icon,dismissType:t.DismissType,disableTriggerTimer:t.DisableTriggerTimer,fill:r,color:i,SubType:e.data.SubType,click:function(o){e.buttonClick(t)}})}))}))}catch(e){console.error("error: ",e)}},e.prototype.setLabelText=function(e,t){var o=this.items.find((function(e){return e.name===t}));o&&(o.text=e)},e.prototype.buttonClick=function(e){this.group.isTriggered=!0;var t=this.group;this.data.DisableTriggerTimer||setTimeout((function(){t.isTriggered=!1}),500),this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:null})},e.prototype.BtnClick=function(e){this.group.isTriggered=!0;var t=this.group;e.disableTriggerTimer||setTimeout((function(){t.isTriggered=!1}),500),this.group.DismissType=e.dismissType,this.group.subject.next({type:"buttonClick",target:e.clickEvent,data:e})},e.prototype.getButtonLabel=function(e){if(e.Label){var t=e.Label.match(/^{{.*}}$/gi);return t?(t=t[0].slice(2,-2),a.ZComponentHelper.getGroupValue(t,this.group)):e.Label}return null},e.prototype.getButtonRole=function(e,t){var o=t.toLowerCase();return-1!==o.indexOf("cancel")||-1!==o.indexOf("close")?"cancel":null},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e}();Ce.decorators=[{type:t.Component,args:[{selector:"app-zbuttons",template:'\x3c!-- <p>\r\n zbuttons {{data.Value}}\r\n</p> --\x3e\r\n<div *ngIf="data.AlignButton" style="padding-top: 13px"></div>\r\n<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && items.length > 0">\r\n\r\n <div class="ion-margin-vertical" *ngIf="isMobileScreen() && items.length > 1 && FirstZbtn === false">\r\n <kendo-dropdownbutton [data]="items" size="large" [look]="\'outline\'" class="ion-activatable ripple-parent">\r\n Actions\r\n <ng-template kendoDropDownButtonItemTemplate let-dataItem>\r\n \x3c!-- <span class="k-icon k-i-{{ dataItem.icon }}"></span> --\x3e\r\n <span>{{ dataItem.text }}</span>\r\n </ng-template>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </kendo-dropdownbutton>\r\n </div>\r\n\r\n <div *ngIf="!isMobileScreen() || items.length === 1 " style="padding: 10px 0px;" [class]="data.DivClass">\r\n \x3c!-- <button *ngFor="let item of items; let i = index" (click)="BtnClick(item.clickEvent)"\r\n kendoButton [togglable]="true" [icon]="item.icon" [hidden]="!isBtnVisible(item.visible)"\r\n style="margin-right: 5px;">{{item.text}}</button> --\x3e\r\n <ion-button *ngFor="let item of items; let i = index"\r\n [fill]="item.fill"\r\n [color]="item.color"\r\n size="small"\r\n strong="false"\r\n class="button-container"\r\n (click)="BtnClick(item)"\r\n [expand]="expand"\r\n [hidden]="!isBtnVisible(item.visible)"\r\n [disabled]="group.isTriggered || item.disabled">\r\n <fa-icon [icon]="getFontAwesome(item.icon)"></fa-icon>\r\n <div *ngIf="item.text" style="padding-right: 5px;"></div>\r\n <span class="ion-text-capitalize">{{item.text}}</span>\r\n </ion-button>\r\n </div>\r\n</div>\r\n',styles:[".ripple-parent{position:relative;overflow:hidden}:host ::ng-deep span.ion-text-capitalize{font-weight:600}.button-container,.button:hover{font-size:12px;height:30px}.button:hover{border-radius:5px}"]}]}],Ce.ctorParameters=function(){return[{type:a.FieldService}]},Ce.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Se=function(){function e(e){var t=this;this.authService=e,this.componentProperties=new a.ZComponentProperties,this.options={Title:"",Icon:"Folder"},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setData=function(e){t.getFieldDeclarationForSetup(t.data,t.options)},this.setEnable=function(e){var o=t.group.form.controls[t.data.Value];e?o.enable():o.disable(),t.componentProperties.isReadOnly=!e}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.data,this.authService),this.getFieldDeclarationForSetup(this.data,this.options)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.getFieldDeclarationForSetup=function(e,t){t.Title=e.Title.includes("group.")?a.ZComponentHelper.getGroupEvalValue.call(this,e.Title):e.Title},e}();Se.decorators=[{type:t.Component,args:[{selector:"app-zcard",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="margin: 10px 0 6px 0;">\r\n <kendo-panelbar keepItemContent="true" *ngIf="!data.DisableCollapse">\r\n <kendo-panelbar-item [expanded]="!data.DefaultCollapse" [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)">\r\n <ng-template kendoPanelBarItemTitle>\r\n <span *ngIf="data.Icon">\r\n <fa-icon [icon]="data.Icon" class="zcard-header-icon"></fa-icon>\r\n </span>\r\n <span *ngIf="!data.Icon">\r\n <i class="fas fa-folder" style="color: #000000"></i>\r\n </span>\r\n <ion-label class="zcard-header-title">{{options.Title}}</ion-label>\r\n </ng-template>\r\n <ng-template kendoPanelBarContent>\r\n <div class="ion-row" style="padding: 6px 12px;">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of data.Value"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </ng-template>\r\n </kendo-panelbar-item>\r\n </kendo-panelbar>\r\n\r\n <kendo-card *ngIf="data.DisableCollapse" width="100%">\r\n <kendo-card-header>\r\n <div>\r\n <span *ngIf="data.Icon">\r\n <fa-icon [icon]="data.Icon" class="zcard-header-icon"></fa-icon>\r\n </span>\r\n <span *ngIf="!data.Icon">\r\n <i class="fas fa-folder" style="color: #000000"></i>\r\n </span>\r\n <ion-label class="card-header-title">{{options.Title}}</ion-label>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body>\r\n <div class="ion-row">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of data.Value"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </kendo-card-body>\r\n </kendo-card>\r\n</div>\r\n',styles:[".zcard-header-icon{color:#fff!important;padding-right:3px;font-size:11pt}:host ::ng-deep kendo-card-header{background-color:#5596e6;color:#fff}.card-header-title{font-weight:500;font-size:10.5pt}"]}]}],Se.ctorParameters=function(){return[{type:a.AuthService}]},Se.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var ke=function(){function e(){var e=this;this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.series=[],this.categories=[],this.options={title:"Chart Title Here",renderAs:"canvas",pannable:!1,zoomable:!1,categoryAxis:{categories:this.categories,max:10,maxDivisions:null,labels:{rotation:"auto"}},labels:{visible:!1,background:"transparent"},series:this.series,dataType:"bar",dataStyle:"smooth",legendPosition:"bottom",legendOrientation:"horizontal",tooltipFormat:"{0}%",aggregateType:"sum",dataField:null,categoryField:null,color:"#05A2FE"},this.setData=function(t){e.getFieldDeclarationForSetup(e.data,e.options)},this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Options){var e=typeof this.data.Options;if("object"===e)Object.assign(this.options,this.data.Options);else if("string"===e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options);"object"==typeof t&&Object.assign(this.options,t)}}this.data.Options&&this.data.Options.categoryAxis&&this.data.Options.categoryAxis.categories&&"string"==typeof this.data.Options.categoryAxis.categories&&(this.options.categoryAxis.categories=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options.categoryAxis.categories)),this.data.Options&&this.data.Options.series&&"string"==typeof this.data.Options.series&&(this.options.series=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options.series)),this.getFieldDeclarationForSetup(this.data,this.options),this.isLoading=!1},e.prototype.getFieldDeclarationForSetup=function(e,t){t.title=e.Title||t.title,t.renderAs=e.RenderAs||t.renderAs,t.pannable=e.Pannable||t.pannable,t.zoomable=e.Zoomable||t.zoomable,t.categoryAxis.categories=a.ZComponentHelper.getGroupEvalValue.call(this,e.Categories)||[],t.categoryAxis.max=e.Max||t.categoryAxis.max,t.categoryAxis.maxDivisions=e.MaxDivisions||t.categoryAxis.maxDivisions,t.categoryAxis.labels.rotation=e.Rotation||t.categoryAxis.labels.rotation,t.series=a.ZComponentHelper.getGroupEvalValue.call(this,e.Series)||[],t.dataType=e.DataType||t.dataType,t.dataStyle=e.DataStyle||t.dataStyle,t.legendPosition=e.LegendPosition||t.legendPosition,t.legendOrientation=e.LegendOrientation||t.legendOrientation,t.tooltipFormat=e.TooltipFormat||t.tooltipFormat,t.aggregateType=e.AggregateType||t.aggregateType,t.dataField=e.DataField||t.dataField,t.categoryField=e.CategoryField||t.categoryField},e.prototype.onRender=function(e){},e.prototype.onAxisLabelClick=function(e){},e.prototype.onLegendItemClick=function(e){},e.prototype.onLegendItemHover=function(e){},e.prototype.onPlotAreaClick=function(e){},e.prototype.onPlotAreaHover=function(e){},e.prototype.onSeriesClick=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);if("function"==typeof t)return t.bind(this.group.ctrlScope)(e)},e.prototype.onSeriesHover=function(e){},e}();ke.decorators=[{type:t.Component,args:[{selector:"app-zchart",template:'<div *ngIf="!isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <kendo-chart [renderAs]="options.renderAs" [pannable]="options.pannable" [zoomable]="options.zoomable"\r\n [categoryAxis]="options.categoryAxis"\r\n (render)="onRender($event)"\r\n (axisLabelClick)="onAxisLabelClick($event)"\r\n (legendItemClick)="onLegendItemClick($event)"\r\n (legendItemHover)="onLegendItemHover($event)"\r\n (plotAreaClick)="onPlotAreaClick($event)"\r\n (plotAreaHover)="onPlotAreaHover($event)"\r\n (seriesClick)="onSeriesClick($event)"\r\n (seriesHover)="onSeriesHover($event)">\r\n <kendo-chart-title [text]="options.title"></kendo-chart-title>\r\n <kendo-chart-legend [position]="options.legendPosition" [orientation]="options.legendOrientation"></kendo-chart-legend>\r\n <kendo-chart-tooltip [format]="options.tooltipFormat"></kendo-chart-tooltip>\r\n <kendo-chart-series>\r\n <kendo-chart-series-item *ngFor="let item of options.series"\r\n [aggregate]="options.aggregateType"\r\n [type]="item.type || options.dataType" [style]="item.style || options.dataStyle" \r\n [color]="item.color || options.color"\r\n [labels]="item.labels || options.labels" \r\n [field]="options.dataField" [categoryField]="options.categoryField"\r\n [data]="item.data" [name]="item.name">\r\n </kendo-chart-series-item>\r\n </kendo-chart-series>\r\n </kendo-chart>\r\n</div>',styles:[""]}]}],ke.ctorParameters=function(){return[]},ke.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var we=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.showTooltipsInfoIcon=!1,this.showTooltipsInfoBySide=!1,this.tooltipsInfo=null,this.tooltipsDisplayText=null,this.useKendoSwitch=!1,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.tooltipsInfo=this.data.TooltipsInfo,this.tooltipsInfo&&(null==this.tooltipsInfo.Icon&&null==this.tooltipsInfo.Icon||this.isMobileScreen()||(this.showTooltipsInfoIcon=!0,this.setTooltipsInfoIcon()),this.tooltipsInfo.SideBySide&&(this.showTooltipsInfoBySide=!0),this.setTooltipsDisplayText()),this.useKendoSwitch=!!this.data.UseKendoSwitch&&this.data.UseKendoSwitch},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.onSwitchChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,data:{value:e,field:this.data}})},e.prototype.onChange=function(e){if(this.data.OnChange){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnChange);if("function"==typeof t)t.bind(this.group.ctrlScope)(e)}},e.prototype.getLabelStyle=function(){return{order:this.data.LabelOrder&&"end"===this.data.LabelOrder&&"stacked"!==this.data.LabelPosition?2:0,"white-space":"normal"}},e.prototype.getCheckboxClass=function(){var e=[];return this.data.LabelDivClass&&this.data.LabelDivClass.split(" ").forEach((function(t){if(-1!==t.indexOf("col")){var o=t.split("-");o[o.length-1]=(12-parseInt(o[o.length-1])).toString(),e.push(o.join("-"))}else e.push(t)})),e.join(" ")},e.prototype.getClass=function(e,t){return"ionItem "+this.data.Class},e.prototype.setTooltipsInfoColor=function(){return this.tooltipsInfo&&this.tooltipsInfo.TextColor?this.tooltipsInfo.TextColor:"#acacac"},e.prototype.setTooltipsInfoIcon=function(e){this.showTooltipsInfoIcon&&(""!=this.tooltipsInfo.Icon?this.tooltipsDisplayIcon=e||this.tooltipsInfo.Icon:this.tooltipsDisplayIcon="question-circle")},e.prototype.setTooltipsDisplayText=function(e){this.tooltipsInfo?this.tooltipsDisplayText=e||this.tooltipsInfo.DisplayText:this.tooltipsDisplayText="<Display text error>"},e.prototype.setTooltipsInfoSideBySide=function(){return this.tooltipsInfo?this.tooltipsInfo.SideBySide&&!this.showTooltipsInfoIcon?"tooltipsinfo-right":"":"notooltipsinfo-adjustment"},e}();we.decorators=[{type:t.Component,args:[{selector:"app-zcheckbox",template:'<ion-item [ngClass]="getClass(form, data)" [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n [attr.for]="data.Value"\r\n [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'"\r\n [ngStyle]="getLabelStyle()"\r\n [ngClass]="data.LabelDivClass">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n color="danger">\r\n *\r\n </ion-text>\r\n <span kendoTooltip\r\n *ngIf="!isMobileScreen() && tooltipsInfo && showTooltipsInfoIcon"\r\n [title]="tooltipsDisplayText">\r\n <fa-icon [icon]="tooltipsDisplayIcon"\r\n class="tooltipsinfo-icon">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <div class="ion-row divcheckbox" [ngClass]="getCheckboxClass()">\r\n <div *ngIf="useKendoSwitch">\r\n <span>\r\n <kendo-switch [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (valueChange)="onSwitchChange($event)"\r\n style="margin: 7px 0 0 0; width: 100%"></kendo-switch>\r\n </span>\r\n </div>\r\n <div *ngIf="!useKendoSwitch" [class]="setTooltipsInfoSideBySide()">\r\n \x3c!--<input kendoCheckBox\r\n type="checkbox"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (valueChange)="onChange($event)" />--\x3e\r\n <ion-checkbox style="margin: 8px 0;"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n color="primary"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (ionChange)="onChange($event)"></ion-checkbox>\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon"\r\n [text]="tooltipsDisplayText"\r\n class="tooltipsinfo-text"\r\n [style.color]="setTooltipsInfoColor()">\r\n </kendo-label>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n </div>\r\n</ion-item>\r\n',styles:[".ionItem{display:flex;flex-flow:row wrap}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}:host ::ng-deep ion-item .k-checkbox{margin:6px 0 0 1.5px;height:22px;width:22px}:host ::ng-deep ion-item .k-checkbox.k-checked,:host ::ng-deep ion-item .k-checkbox:checked{margin:6px 0 0 1.5px;height:22px;width:22px;background-color:#3880ff;border:0;outline:0}:host ::ng-deep ion-item .divcheckbox{justify-content:space-between;order:1}:host ::ng-deep ion-item .notooltipsinfo-adjustment{display:grid;grid-template-columns:.1fr;grid-gap:0;padding-top:1px}:host ::ng-deep ion-item .tooltipsinfo-text{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin:6px 0;float:right}:host ::ng-deep ion-item .tooltipsinfo-right{display:grid;grid-template-columns:.1fr .9fr;grid-gap:5px}:host ::ng-deep ion-item .tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]}]}],we.ctorParameters=function(){return[]},we.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var xe=function(){function e(e){var t=this;this.authService=e,this.icon="k-icon k-i-cancel",this.selectedIcon="k-icon k-i-check-circle",this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){this.setupDataSource(),a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this)},e.prototype.setupDataSource=function(){var e=this;this.data.DataSource?(-1!==this.data.DataSource.indexOf("group.")?this.dataSource=a.ZComponentHelper.getGroupValue(this.data.DataSource,this.group):this.dataSource=this.data.DataSource,Array.isArray(this.dataSource)&&this.dataSource.forEach((function(t){t.Label=t.Label?t.Label:t.Value,t.Icon=t.Selected?null:t.Icon?t.Icon:e.icon,t.SelectedIcon=t.SelectedIcon?t.SelectedIcon:e.selectedIcon,t._Icon=t.Icon?t.Icon:e.icon,t._Selected=t.Selected}))):console.error("No data source found for zhip")},e.prototype.getClass=function(){return this.data.DivClass},e.prototype.getChipClass=function(e){return e.Class?e.Class:""},e.prototype.chipListChangeSelection=function(e){var t,o,n=0,r=function(t){e.includes(n)?t.Icon=null:t.Icon=i.dataSource.find((function(e){return e.Value===t.Value}))._Icon,n++},i=this;try{for(var a=U(this.dataSource),l=a.next();!l.done;l=a.next()){r(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},e.prototype.chipChangeSelection=function(e){this.dataSource.find((function(t){return t.Value===e.Value}))._Selected=!e._Selected,this.data.OnChange&&this.group.subject.next({type:"onChange",target:this.data.OnChange,data:{value:this.dataSource,selectedItem:e,field:this.data}})},e.prototype.getDataValue=function(){return this.dataSource},e.prototype.mouseover=function(e,t){this.data.OnHover&&this.group.subject.next({type:"onHover",target:this.data.OnHover,data:{value:this.dataSource,selectedItem:t,field:this.data}}),this.data.IsShowToolTip&&this.showTooltip(e)},e.prototype.showTooltip=function(e){var t=e.target;this.tooltipDir.toggle(t)},e}();xe.decorators=[{type:t.Component,args:[{selector:"app-zchip",template:'<div\r\n *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n style="margin: 10px 0 6px 0;" [ngClass]="getClass()">\r\n <ng-template #template let-anchor>\r\n <span>{{ anchor.nativeElement.innerText }}</span>\r\n </ng-template>\r\n <div kendoTooltip [tooltipTemplate]="template">\r\n <kendo-chip-list [selection]="data.Multiple ? \'multiple\' : \'single\'"\r\n (selectedChange)="chipListChangeSelection($event)">\r\n <kendo-chip *ngFor="let chip of dataSource" [label]="chip.Label" [selected]="chip.Selected"\r\n (mouseover)="mouseover($event, chip)" [ngClass]="getChipClass(chip)" [icon]="chip.Icon"\r\n [selectedIcon]="chip.SelectedIcon" (click)="chipChangeSelection(chip)" >\r\n </kendo-chip>\r\n </kendo-chip-list>\r\n </div>\r\n</div>\r\n',styles:[".medium kendo-chip{padding:20px;margin:5px;font-size:15px;min-height:50px;height:55px;max-height:60px;min-width:280px;max-width:320px}.mediumHeight kendo-chip-list{max-height:400px;border:1px solid #000;padding:5px 15px;overflow-x:auto;border-radius:10px}.vertical kendo-chip-list{display:flex;flex-direction:column}.customColor .k-chip-filled.k-chip-selected{background-color:#bafff6;color:#000;font-weight:600}.customColor .k-chip-filled.k-chip-selected:hover{background-color:#9afcf0}.customColor .k-chip-filled.k-chip-has-icon:hover{background-color:#b5b5b5;color:#000}.customColor .chip-pointing{border:3px solid #1a63d9!important}"]}]}],xe.ctorParameters=function(){return[{type:a.AuthService}]},xe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],tooltipDir:[{type:t.ViewChild,args:[M.TooltipDirective,{static:!1}]}]};var Ie=function(){function e(){var e=this;this.code="",this.theme="eclipse",this.mode="javascript",this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.widthReduce=this.data.WidthReduce||60,this.heightReduce=this.data.HeightReduce||560,"textareajson"===this.data.Type?this.mode="json":"textareahtml"===this.data.Type&&(this.mode="html"),console.log("zcodeeditor OnInit")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.getValue=function(){var e;e=-1!==this.data.Value.indexOf(".")?this.data.Value:"group.zModel."+this.data.Value;var t=a.ZComponentHelper.getEvalValue.call(this,e);if("function"!=typeof t)return t;var o=t();if(o)try{var n=a.ZComponentHelper.getEvalValue.call(this,o,!0);return"boolean"==typeof n?n.toString():void 0===n?"undefined":null===n?"null":n}catch(e){return}},e.prototype.getEditorStyle=function(){return{"height.px":this.getEditorHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getEditorHeight=function(){var e=window.innerHeight-this.heightReduce;return e<180?180:e},e.prototype.onTextChange=function(e){var t=this;this.subscription&&this.subscription.unsubscribe(),this.subscription=r.of([]).pipe(i.delay(500)).subscribe((function(){a.ZComponentHelper.setModelValue(t.data.Value,e,t.group,!0),t.group.subject.next({type:"zcodeeditor-TextChanged",target:t.data.OnChange,data:e})}))},e}();Ie.decorators=[{type:t.Component,args:[{selector:"app-zcodeeditor",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label *ngIf="data.ShowLabel" position="stacked" style="margin-bottom: 10px;">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div>\r\n \x3c!-- <div ace-editor\r\n [(text)]="text"\r\n ></div> --\x3e\r\n <ace-editor [readOnly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)" #editor [ngStyle]="getEditorStyle()" (textChanged)="onTextChange($event)" [text]="getValue() | editorfilter" [theme]="theme" [mode]="mode"></ace-editor>\r\n\r\n \x3c!-- <ngx-monaco-editor #editor [options]="editorOptions" [(ngModel)]="code" (onInit)="onInit($event)"></ngx-monaco-editor> --\x3e\r\n </div>\r\n\r\n</div>',styles:[""]}]}],Ie.ctorParameters=function(){return[]},Ie.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],editor:[{type:t.ViewChild,args:["editor"]}]};var Fe=function(){function e(){var e=this;this.range={start:null,end:null},this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this);var e=this.data.Value.split(","),t=e[0].trim(),o=e[1].trim(),n=(a.ZComponentHelper.getGroupEvalValue.call(this,t),a.ZComponentHelper.getGroupEvalValue.call(this,o),a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options));n&&n.min&&n.max&&this.setNewRange(new Date(n.min),new Date(n.max))},e.prototype.setNewRange=function(e,t){this.zdaterange.setRange({start:e,end:t})},e}();Fe.decorators=[{type:t.Component,args:[{selector:"app-zdaterange",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <kendo-daterange #zdaterange class="ion-row">\r\n \x3c!-- <label style="flex: 1;"> --\x3e\r\n \x3c!-- <span class="label">Start</span> --\x3e\r\n <kendo-dateinput style="flex: 1;" kendoDateRangeStartInput [(value)]="range.start" \r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"></kendo-dateinput>\r\n \x3c!-- </label> --\x3e\r\n \x3c!-- <label style="flex: 1;"> --\x3e\r\n \x3c!-- <span class="label">End</span> --\x3e\r\n \x3c!-- <kendo-dateinput style="flex: 1;" kendoDateRangeEndInput [(value)]="range.end"></kendo-dateinput> --\x3e\r\n \x3c!-- </label> --\x3e\r\n\r\n <kendo-daterange-popup [animate]="false"></kendo-daterange-popup>\r\n </kendo-daterange>\r\n </span>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-dateinput{color:var(--z-text-color)}"]}]}],Fe.ctorParameters=function(){return[]},Fe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],zdaterange:[{type:t.ViewChild,args:["zdaterange"]}]};var Ve=function(){function e(){var e=this;this.dateFormat="DD-MMM-YYYY",this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)},this.SetDateRange=function(t,o){isNaN(Date.parse(t))||(e.data.MinDate=new Date(t)),isNaN(Date.parse(o))||(e.data.MaxDate=new Date(o))}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),"ztime"===this.data.Type&&(this.dateFormat="HH:mm"),"zuidatetime"===this.data.Type&&(this.dateFormat="DD-MMM-YYYY h:mm A"),"zuitime"===this.data.Type&&(this.dateFormat="HH:mm:ss"),"zshortdate"===this.data.Type&&(this.dateFormat="MMM-YYYY")},e.prototype.toKendoDateFormat=function(){return this.dateFormat.replace("DD","dd").replace("YYYY","yyyy").replace("h","H").replace("A","a")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly,this.group);return"function"==typeof e?e():e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getDateValue=function(){var e=this.form.controls[this.data.Value].value;return e?new Date(e):null},e.prototype.GetDate=function(e){var t=new Date(e).toISOString();a.ZComponentHelper.setModelValue(this.data.Value,t,this.group)},e.prototype.onChange=function(e){null===e?a.ZComponentHelper.setModelValue(this.data.Value,e,this.group):(a.ZComponentHelper.setModelValue(this.data.Value,e.toISOString(),this.group),this.form.controls[this.data.Value].setValue(e.toISOString()));this.group.subject.next({type:"onChange",target:this.data.OnChange,data:e})},e.prototype.handlePreventableEvent=function(e,t,o){var n=this;setTimeout((function(){n.dateAppendEvent(n),n.timeAppendEvent(n)}),500)},e.prototype.dateAppendEvent=function(e){for(var t=$("tbody.k-calendar-tbody").find("td.k-calendar-td"),o=function(){var o=t[n];""!=o.title&&o.addEventListener("click",(function(){if(!isNaN(Date.parse(o.title))){var t=new Date(o.title).toISOString();a.ZComponentHelper.setModelValue(e.data.Value,t,e.group)}setTimeout((function(){e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}),500)}))},n=0;n<t.length;n++)o();$("span.k-today")[0].addEventListener("click",(function(){var t=(new Date).toJSON().slice(0,10).replace(/-/g,"/");e.setDateTimeToModel(e,t),e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}))},e.prototype.timeAppendEvent=function(e){$("button.k-button.k-time-tab")[0].addEventListener("click",(function(){e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}))},e.prototype.nowOnClick=function(e){var t=$("button.k-button.k-bare.k-time-now")[0];t&&t.addEventListener("click",(function(t){var o=e.currentDateTimeValue(e),n=new Date;o.setHours(n.getHours()),o.setMinutes(n.getMinutes()),o.setSeconds(n.getSeconds()),e.setDateTimeToModel(e,o)}))},e.prototype.hoursOnClick=function(e){var t=$("div.k-time-list-wrapper").find("ul");if(t.length>0)for(var o=t[0].children,n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){var o=t.currentTarget.textContent,n=e.currentDateTimeValue(e);n.setHours(o),e.setDateTimeToModel(e,n)}))},e.prototype.minutesOnClick=function(e){var t=$("div.k-time-list-wrapper").find("ul");if(t.length>0)for(var o=t[1].children,n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){var o=t.currentTarget.textContent,n=e.currentDateTimeValue(e);n.setMinutes(o),e.setDateTimeToModel(e,n)}))},e.prototype.ampmOnClick=function(e){var t=$("div.k-time-list-wrapper").find("ul");if(t.length>0)for(var o=t[2].children,n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){var o=t.currentTarget.textContent,n=e.currentDateTimeValue(e),r=n.getHours();"am"==o.toLowerCase()?r-=12:r+=12,n.setHours(r),e.setDateTimeToModel(e,n)}))},e.prototype.currentDateTimeValue=function(e){var t=a.ZComponentHelper.getZModelValue(e.data.Value,e.group,e.group.zModel),o=new Date;return""!=t&&null!=t&&(o=new Date(t)),o},e.prototype.setDateTimeToModel=function(e,t){var o=new Date(t).toISOString();a.ZComponentHelper.setModelValue(e.data.Value,o,e.group),setTimeout((function(){e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}),500)},e}();Ve.decorators=[{type:t.Component,args:[{selector:"app-zdatetime",template:'<ion-item [ngClass]="data.Class" [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="componentProperties.isRequired" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-datetime *ngIf="isMobileScreen()"\r\n style="padding: 8px 0px;"\r\n [required]="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n [placeholder]="data.PlaceHolder"\r\n [id]="data.Value"\r\n [displayFormat]="dateFormat"\r\n [pickerFormat]="dateFormat"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [formControlName]="data.Value"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)">\r\n </ion-datetime>\r\n <kendo-datepicker *ngIf="!isMobileScreen() && dateFormat===\'MMM-YYYY\'"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n [min]="data.MinDate"\r\n [max]="data.MaxDate"\r\n [activeView]="\'year\'"\r\n [bottomView]="\'year\'"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder">\r\n </kendo-datepicker>\r\n <kendo-datepicker *ngIf="!isMobileScreen() && dateFormat===\'DD-MMM-YYYY\'"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n [min]="data.MinDate"\r\n [max]="data.MaxDate"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder"></kendo-datepicker>\r\n <kendo-datetimepicker *ngIf="!isMobileScreen() && dateFormat===\'DD-MMM-YYYY h:mm A\'"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n (open)="handlePreventableEvent($event, \'open\', false)"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder">\r\n <ng-template kendoCalendarMonthCellTemplate let-date>\r\n <span (click)="GetDate(date)">{{date.getDate()}}</span>\r\n </ng-template>\r\n </kendo-datetimepicker>\r\n <kendo-timepicker *ngIf="!isMobileScreen() && (dateFormat===\'HH:mm:ss\' || dateFormat===\'HH:mm\')"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder"></kendo-timepicker>\r\n </span>\r\n <app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>\r\n',styles:[".gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-datepicker{color:var(--z-text-color)}"]}]}],Ve.ctorParameters=function(){return[]},Ve.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Pe=function(){function e(e){var t=this;this.authService=e,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.data,this.authService)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e}();Pe.decorators=[{type:t.Component,args:[{selector:"app-zdiv",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" class="ion-row">\r\n <app-zformcontrol \r\n [ngClass]="group[field.isVisibleField] ? field.DivClass : \r\n ((field.Visible === true) ? field.DivClass : \'flex-hide\')" \r\n *ngFor="let field of data.Value | divzlayout: data.zlayout" [field]="field"\r\n [group]="group" [form]="form" id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n</div>',styles:[""]}]}],Pe.ctorParameters=function(){return[{type:a.AuthService}]},Pe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Te=function(){function e(e,t,o){this.authService=e,this.fieldService=t,this.debugService=o,this.isLoading=!0,this.fieldIndex=[]}return e.prototype.ngOnInit=function(){var e=this;this.fieldName?this.fieldService.getFormFieldCode(this.fieldName,"FormField",this,"fields").pipe(i.switchMap((function(t){if("debug"===e.fieldName)return e.debugService.onStartDebugger(t,e);e.group.fields=t,e.onInitNormal()})),i.switchMap((function(){return e.isLoading=!1,e.group._isDebugging&&e.group._debug.isLoading&&(e.group._debug.isLoading=!1),r.of([])})),i.delay(500)).subscribe((function(){e.debugService.LoadGridData(),e.debugService.loadWorkflowData()})):(this.onInitNormal(),this.isLoading=!1)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.getGroup=function(){return"debug"!==this.fieldName?this.group:this.group._debug},e.prototype.onInitNormal=function(){this.form=this.toFormGroup(this.group.fields),this.group.form=this.form,this.fields=this.group.fields,a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.fields,this.authService)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.toFormGroup=function(e){var t={};return this.getFormControls(e,t),new u.FormGroup(t)},e.prototype.addToFieldIndex=function(e){e.Name||console.error("Field Name undefined: ",e),e.Name&&!this.fieldIndex.includes(e.Name)?this.fieldIndex.push(e.Name):console.error("Field Name Duplication: "+e.Name+"; ",e)},e.prototype.getFormControls=function(e,t){var o=this;e.forEach((function(e){if(o.addToFieldIndex(e),"string"==typeof e.Value&&-1!==e.Value.indexOf("."))-1===["zgrid","ztree","zimg","textareajson"].indexOf(e.Type)&&console.warn("FormControl - invalid field value",e.Value);else if(Array.isArray(e.Value))o.getFormControls(e.Value,t);else{var n=a.ZComponentHelper.isFormControl(e),r=a.ZComponentHelper.isVisibleFormControl(o,e),i=a.ZComponentHelper.isRequiredFormControl(o,e);if(!0===n){var l=a.ZComponentHelper.getValidators(e,r,i);if(t[e.Value]=new u.FormControl(o.group.zModel[e.Value],l),a.ZComponentHelper.hasCCField(e.Type)){var s=a.ZComponentHelper.getCCValidators(e,r,i);t[e.CCValue]=new u.FormControl(o.group.zModel[e.CCValue],s)}}}}))},e.prototype.getReadOnlyValue=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,e.ReadOnly);return"function"==typeof t?t():t},e.prototype.trackByFn=function(e,t){return e},e}();Te.decorators=[{type:t.Component,args:[{selector:"app-zform",template:'<div class="e1-form">\r\n \x3c!--<div class="k-overlay" *ngIf="isLoading"></div>--\x3e\r\n <form [formGroup]="form" autocomplete="off" *ngIf="!isLoading">\r\n <ion-grid>\r\n <ion-row id="dynamic-form-host" class="ion-align-items-start">\r\n <app-zformcontrol *ngFor="let field of fields; trackBy: trackByFn"\r\n [ngClass]="group[field[\'isVisibleField\']] ? field.DivClass :\r\n ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n [field]="field"\r\n [group]="getGroup()"\r\n [form]="form"\r\n id="{{field.Type}}-{{field.Name}}"></app-zformcontrol>\r\n </ion-row>\r\n </ion-grid>\r\n </form>\r\n</div>\r\n',styles:["#dynamic-form-host app-zformcontrol{overflow-x:auto;overflow-y:hidden}"]}]}],Te.ctorParameters=function(){return[{type:a.AuthService},{type:a.FieldService},{type:J}]},Te.propDecorators={group:[{type:t.Input}],fieldName:[{type:t.Input}]};var ze=function(){function e(){this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.value=0,this.title="",this.color=[],this.majorTicks=[{visible:!0,color:"#0000ff"}],this.minorTicks=[{visible:!0,color:"#0000ff"}],this.startAngle=0,this.endAngle=180,this.minValue=0,this.maxValue=200,this.options={value:this.value,title:this.title,scaleMax:50,colors:this.color,transitions:!1,majorTicks:this.majorTicks,minorTicks:this.minorTicks,minValue:this.minValue,maxValue:this.maxValue,reverse:!1,startAngle:this.startAngle,endAngle:this.endAngle,rangePlaceholderColor:"#e6e5e5",labelsColor:"#0000ff",rangeFrom:0,rangeTo:100,rangeColor:"#ff6358",rangeLineCap:"round",showLabels:!0,rangeSize:10}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Options){var e=typeof this.data.Options;if("object"===e)Object.assign(this.options,this.data.Options);else if("string"===e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options);"object"==typeof t&&Object.assign(this.options,t)}}this.getFieldDeclarationForSetup(this.data,this.options),this.isLoading=!1},e.prototype.getFieldDeclarationForSetup=function(e,t){t.value=a.ZComponentHelper.getGroupEvalValue.call(this,e.Value)||t.value,t.title=a.ZComponentHelper.getGroupEvalValue.call(this,e.Title)||t.title,t.scaleMax=e.Max||t.scaleMax,t.minValue=a.ZComponentHelper.getGroupEvalValue.call(this,e.MinValue)||t.minValue,t.maxValue=a.ZComponentHelper.getGroupEvalValue.call(this,e.MaxValue)||t.maxValue,t.colors=a.ZComponentHelper.getGroupEvalValue.call(this,e.Color)||t.colors,t.transitions=e.Transitions||t.transitions,t.majorTicks=a.ZComponentHelper.getGroupEvalValue.call(this,e.MajorTicks)||t.majorTicks,t.showLabels=e.ShowLabels||t.showLabels,t.style=e.Style||t.style,t.minorTicks=a.ZComponentHelper.getGroupEvalValue.call(this,e.MinorTicks)||t.minorTicks,t.reverse=e.Reverse||t.reverse,t.startAngle=a.ZComponentHelper.getGroupEvalValue.call(this,e.StartAngle)||t.startAngle,t.endAngle=a.ZComponentHelper.getGroupEvalValue.call(this,e.EndAngle)||t.endAngle,t.rangePlaceholderColor=e.RangePlaceholderColor||t.rangePlaceholderColor,t.rangeFrom=a.ZComponentHelper.getGroupEvalValue.call(this,e.RangeFrom)||t.rangeFrom,t.rangeTo=a.ZComponentHelper.getGroupEvalValue.call(this,e.RangeTo)||t.rangeTo,t.rangeColor=e.RangeColor||t.rangeColor,t.rangeLineCap=e.RangeLineCap||t.rangeLineCap,t.rangeSize=e.RangeSize||t.rangeSize,t.GaugeAlignment=a.ZComponentHelper.getGroupEvalValue.call(this,e.GaugeAlignment)||t.GaugeAlignment,t.paddingValue="NaN"===t.value.toString()?t.GaugeAlignment:"0%"},e.prototype.alignment=function(){return{"padding-right":this.options.paddingValue}},e.prototype.setEnable=function(e){this.componentProperties.isReadOnly=!e},e.prototype.setVisible=function(e){this.componentProperties.isVisible=e,this.data.Visible=e},e.prototype.setRequire=function(e){this.componentProperties.isRequired=e},e.prototype.setData=function(e){this.getFieldDeclarationForSetup(this.data,this.options)},e}();ze.decorators=[{type:t.Component,args:[{selector:"app-zgauge",template:'<div *ngIf="!isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="text-align: center;">\r\n <div id="marketShareContainer" class="ion-row" class="col-xs-12 stats-graph">\r\n <h6 style="color: gray;">{{ options.title }}</h6>\r\n </div>\r\n <div [ngStyle]=\'alignment()\'>\r\n <kendo-arcgauge [value]="options.value" [transitions]="options.transitions" [colors]="options.colors" style="margin-top:50px;width:90% ;height:100%; min-width: 330px;">\r\n <kendo-arcgauge-scale\r\n [majorTicks]="{ visible: true, color: \'#0000ff\' }"\r\n [minorTicks]="{ visible: true, color: \'#0000ff\' }"\r\n [reverse]="options.reverse"\r\n [startAngle]="0"\r\n [endAngle]="180"\r\n [min]="options.minValue"\r\n [max]="options.maxValue"\r\n [rangePlaceholderColor]="options.rangePlaceholderColor"\r\n [rangeSize]="options.rangeSize"\r\n [rangeLineCap]="options.rangeLineCap">\r\n <kendo-arcgauge-scale-labels format="l" [color]="options.labelsColor" [visible]="options.showLabels">\r\n </kendo-arcgauge-scale-labels>\r\n </kendo-arcgauge-scale>\r\n <ng-template kendoArcGaugeCenterTemplate let-value="value" let-color="color">\r\n <span [style.color]="color">{{ value }}</span>\r\n </ng-template>\r\n </kendo-arcgauge>\r\n </div>\r\n</div>\r\n',styles:[""]}]}],ze.ctorParameters=function(){return[]},ze.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var De=function(){function e(e,t,o,n,i,l,s,p,d,c){var g=this;this.activatedRoute=e,this.router=t,this.formBuilder=o,this.authService=n,this.webApiService=i,this.zGridStatePersistingService=l,this.toastService=s,this.zcoreService=p,this.storageService=d,this.mainService=c,this.zgrid=null,this.oauthUrl=null,this.mySelection=[],this.componentProperties=new a.ZComponentProperties,this._state={skip:0,take:10},this.params={referId:null,pageNo:0,pageSize:20,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:"",filters:"",columns:"",grantType:4},this.gridSubject=new r.Subject,this.gridDefaultStateExist=!1,this.isNew=!0,this.setData=function(e){g.gridData={data:e,total:e?e.length:0},g.gData=e,g.zgrid&&(g.zgrid.grid.pageSize=e.length),g.data.ShowRecordNumber&&g.gridData.data&&g.gridData.data.forEach((function(e,t){e.GridNo=t+1})),g.gData&&g.createFormControls()},this.setEnable=function(e){g.componentProperties.isReadOnly=!e},this.setVisible=function(e){g.componentProperties.isVisible=e,g.data.Visible=e},this.setRequire=function(e){g.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,g.group,g.data.Value,g.componentProperties,u.Validators.required)},this.oauthUrl=this.zcoreService.getEnvironment().e1OauthUrl+"/",this.allResults=this.allResults.bind(this),this.refreshData=this.refreshData.bind(this),this.clearData=this.clearData.bind(this),this.saveGridSettings=this.saveGridSettings.bind(this),this.restoreGridSettings=this.restoreGridSettings.bind(this)}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.gridStorageKey="ionic-field::"+this.authService.e1Token.userName+"::"+this.data.Name+"::"+this.router.url,r.of(!0).pipe(i.switchMap((function(){if(e.columns=[],e.widthReduce=e.data.WidthReduce||60,e.heightReduce=e.data.HeightReduce||560,e._state.take=e.data.PageSize||20,e.pageSizes=[20,50,100,200,500],e.previousNext=e.data.EnablePreviousNextButton||!1,(!1===e.data.PageSizes||a.ZComponentHelper.isMobileScreen())&&(e.pageSizes=!1),e.data.SelectOptions&&(e.selectableSettings={mode:"single"===e.data.SelectOptions?"single":"multiple"}),e.data.Value.startsWith("group.")){var t=e.data.Value.slice(6);e.group[t]=e}return e.subscription&&e.subscription.unsubscribe(),e.data.ResourceURL||e.generateGridColumns().subscribe((function(){if(e.data.DataSource&&e.data.SkipDirective){var t=a.ZComponentHelper.getGroupValue(e.data.DataSource,e.group);e.setData(t)}})),e.subscription=e.gridSubject.subscribe((function(t){e.zgrid=t,e._state=e.zgrid.state,e.columns=e.zgrid.gridColumns,e.zgrid&&e.zgrid.grid.data&&(e.gridData=Object.assign({},e.zgrid.grid.data),e.createFormControls())})),e.stateExist(),e.data.SaveFilter&&e.setGridSessionKey(e.group),r.of(!0)})),i.tap((function(){e.gridCallback(e.group)}))).subscribe()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.stateExist=function(){var e=this.zGridStatePersistingService.get(this.gridStorageKey);this.gridDefaultStateExist=!!e},e.prototype.dataStateChange=function(e){this.zgrid?this.zgrid.dataStateChange(e):(this.gridData=G.process(this.gData,e),this.createFormControls())},e.prototype.filterable=function(e){return!1!==e},e.prototype.sortable=function(e){return!1!==e},e.prototype.locked=function(e){return 1==e.pinnedLeft},e.prototype.getGridStyle=function(){return{"height.px":this.getGridHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getGridHeight=function(){var e=window.innerHeight-this.heightReduce;return e<250?250:e},e.prototype.isSelectOption=function(){var e=!1;return this.data.SelectOptions&&(this.selectableSettings={checkboxOnly:!1,mode:"multiple"==this.data.SelectOptions?"multiple":"single"},e=!0),e},e.prototype.setColumns=function(e,t){this.group[e]=this.wrapColumnNamesInFieldElement(t),this.generateGridColumns().subscribe()},e.prototype.wrapColumnNamesInFieldElement=function(e){return r.of(e.map((function(e){var t=e.Hidden;return{Name:e.Name,Value:e.Code,Type:e.Type,gridColVisible:!t,width:100+4*e.Name.length,enableFiltering:!1,enableSorting:!0,enablePinning:!0,DivClass:"col-xs-12 col-sm-6",IsEditableInGrid:e.Editable}})))},e.prototype.generateGridColumns=function(){var e=this,t=this.getGridSettings(),o=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);return this.data.ColumnFields||console.warn("Invalid/Empty grid("+this.data.Name+") columnField"),o.pipe(i.tap((function(o){o||console.warn("Invalid/Empty grid("+e.data.Name+") data to generate column");var n=e.data.FieldElementName;e.columns=[],a.ZComponentHelper.getGridColumns(o,e.columns,e.group,e.authService,n,t,null,e.data)})))},e.prototype.editModel=function(e){if(this.data.EditClickURL){var t=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);this.group.subject.next({type:"zgrid-cellClick",target:this.data.EditClickURL,data:e,columnFields$:t})}else this.router.navigate([this.group.editModelURL,e.Id,"edit"],{relativeTo:this.activatedRoute})},e.prototype.gridCallback=function(e){if(this.data.AfterloadCallback){var t=Object.assign({},this);this.group.subject.next({type:"zgrid-AfterloadCallback",target:this.data.AfterloadCallback,data:t})}},e.prototype.getData=function(){this.zgrid&&this.zgrid.getDataBinding(),this.data.SkipDirective&&(this.gridData=G.process(this.gData,this.state),this.createFormControls())},e.prototype.getGridData=function(){return this.gData},e.prototype.getFormControl=function(e,t){var o=this.inlineEditedFormGroups.get("items").at(e);return o?o.get(t):null},e.prototype.createFormControls=function(){var e=this;if(this.columns){if(void 0===this.columns.find((function(e){return e.isEditableInGrid})))return;this.inlineEditedFormGroups=new u.FormGroup({items:new u.FormArray([])}),Array.isArray(this.gridData.data)&&this.gridData.data.forEach((function(t){var o={};e.columns.forEach((function(e){o[e.field]=new u.FormControl(t[e.field])}));var n=new u.FormGroup(o);e.inlineEditedFormGroups.get("items").push(n)}))}},e.prototype.createFormGroup=function(e,t){var o;return this.formBuilder.group(((o={})[t]=e[t],o))},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(this.data.Value,this.group)},e.prototype.onBtnClick=function(e,t,o,n){this.onNavigateTo(e,t,o,n)},e.prototype.cellClickHandler=function(e){var t=this,o=!!this.data.DisableCellClickHandler&&this.data.DisableCellClickHandler,n="CommandColumnComponent"==e.column.constructor.name;if(!o&&!n)if(!!this.data.InCellEditable&&this.data.InCellEditable)this.editableColumns=this.columns.filter((function(e){return!0===e.isEditableInDataItem})),this.editableColumns&&this.editableColumns.map((function(o){return e.sender.editCell(e.rowIndex,e.columnIndex,t.createFormGroup(e.dataItem,o.field))}));else{if(console.log("cellClick event: ",e),this.data.OnItemClick){var r=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);if("function"==typeof r)r.bind(this.group.ctrlScope)(e);return}this.editModel(e.dataItem)}},e.prototype.editCellCloseHandler=function(e){var t=e.formGroup,o=e.dataItem;t.valid?t.dirty&&(this.editableColumns=this.columns.filter((function(e){return!0===e.isEditableInDataItem})),this.editableColumns.map((function(e){var n;return Object.assign(o,((n={})[e.field]=t.value[e.field],n))})),this.mySelection.map((function(e){return e.Id===o.Id?Object.assign(e,o):null}))):e.preventDefault()},e.prototype.onNavigateTo=function(e,t,o,n){a.ZComponentHelper.getGroupEvalValue.call(this,t.Click)&&(e.stopPropagation(),this.group.subject.next({type:"zgrid-onNavigateTo",target:t.Click,rowData:o,data:n}))},e.prototype.showTooltip=function(e){var t=e.target,o=!1;t.classList.forEach((function(e){"k-command-cell"==e&&(o=!0)})),("TD"===t.nodeName||"TH"===t.nodeName)&&t.offsetWidth<t.scrollWidth&&!o?this.tooltipDir.toggle(t):this.tooltipDir.hide()},e.prototype.rowSelectionKey=function(e){return e.dataItem},e.prototype.getSeletectedValues=function(){return this.mySelection},e.prototype.refreshGrid=function(e,t,o){var n=e.target.trim().split(".")[1];if(n){var r=t[n];r?r.getData():console.log("Unable to find grid value: "+n)}else console.log("Invalid refreshGrid event: ",e)},e.prototype.refreshData=function(){this.getData()},e.prototype.clearData=function(){this.zgrid.clearData()},e.prototype.allResults=function(){var e=this.zgrid,t=this.zgrid.grid.data,o=e.paginationApiPostUrl,n=Object.assign({},this.params);return n.pageNo=0,n.pageSize=t.total,this.webApiService.httpPost$(o,n).pipe(i.map((function(e){return{data:G.process(e.dataSet,{}).data}})))},e.prototype.getClass=function(e,t){var o="gridCell ";return"number"!==t.fieldType&&"currency"!==t.fieldType&&"znumeric"!==t.fieldType||(o+="rightAligned "),e[t.field+"_Class"]&&(o+=e[t.field+"_Class"]+" "),t.Class&&(o+=t.Class+" "),o},e.prototype.getFormat=function(e,t){var o="";if(void 0===e.FormatOptions)o=t||"";else{var n=e.FormatOptions.split("."),r=0;n.length>1&&(r=n[1].length),0!==r&&(o="1."+r+"-"+r)}return o},e.prototype.setHeaderText=function(e,t){this.columns.forEach((function(o){o.Name===e&&(o.title=t)}))},e.prototype.setGridIsLoading=function(e){this.isLoading=e},e.prototype.setGridSessionKey=function(e){e.GridStorageKey||(e.GridStorageKey="zgrid_"+e.resourceURL+"_"+this.data.Value+"::"+this.authService.e1Token.userName)},e.prototype.trackBy=function(e,t){return e},e.prototype.saveGridSettings=function(){var e=this,t=this.zgrid.grid.columns;r.of(this.columns).pipe(i.switchMap((function(){var o=t.toArray().map((function(e){return Object.keys(e).filter((function(e){return!e.toLowerCase().includes("template")})).reduce((function(t,o){var n;return Object.assign(Object.assign({},t),((n={})[o]=e[o],n))}),{})}));o.forEach((function(e){delete e.headerStyle,delete e.__ngContext__}));var n={columnsConfig:o},r=e.zGridStatePersistingService.get(e.gridStorageKey),i=null;return r&&r[0]?(i=r.find((function(t){return t.dataFormFields===e.gridStorageKey})))&&(i.gridSettings=n):r=[],i||(i={dataFormFields:e.gridStorageKey,gridSettings:n},r.push(i)),r})),i.concatMap((function(t){return e.zGridStatePersistingService.set(e.gridStorageKey,t),e.mainService.cookieStorePost(e.gridStorageKey,t)})),i.tap((function(t){e.stateExist()})),i.tap((function(){e.toastService.show("Grid Setting Saved","top",!0,2e3,"success")}))).subscribe()},e.prototype.restoreGridSettings=function(){var e=this;r.of(!0).pipe(i.switchMap((function(){return e.zGridStatePersistingService.remove(e.gridStorageKey),r.of(!0)})),i.switchMap((function(){return e.mainService.cookieStoreDeleteMultiple(e.gridStorageKey)})),i.concatMap((function(){return e.generateGridColumns()})),i.tap((function(){e.stateExist(),e.toastService.show("Grid Setting Restored","top",!0,2e3,"success")}))).subscribe()},e.prototype.getGridSettings=function(){var e="ionic-field::"+this.authService.e1Token.userName+"::"+this.data.Name+"::"+this.router.url,t=this.zGridStatePersistingService.get(e);if(t){var o=JSON.parse(t.Value);if(o)return o.gridSettings.columnsConfig.sort((function(e,t){return e.orderIndex-t.orderIndex}))}},e.prototype.getInlineField=function(e){return this.columns.find((function(t){return t.Value===e}))},e.prototype.getInlineForm=function(e){return this.inlineEditedFormGroups.get("items").at(e)},e.prototype.getFormControlData=function(e){return this.inlineEditedFormGroups.value.items},e.prototype.beforeGridGetData=function(e,t){return console.warn("beforeDataBinding triggered"),e.beforeGridGetData?e.beforeGridGetData(e,t):(console.warn("group.beforeDataBinding is undefined"),r.of(!0))},e.prototype.getGridSessionFilter=function(e,t){return q(this,void 0,void 0,(function(){var t,o=this;return _(this,(function(n){switch(n.label){case 0:return e.GridStorageKey?(t=e.GridStorageKey,this.storageService?[4,this.storageService.get(t).then((function(e){if(e&&e.value&&"null"!==e.value){var t=JSON.parse(e.value);return o.state.filter=JSON.parse(t.StateFilter),o.params.filterParams=JSON.parse(t.FilterParams),o.state.filter.filters.forEach((function(e){e.field.includes("UTC")&&(e.value=new Date(e.value))})),e}return null}))]:[3,2]):[2,null];case 1:return n.sent(),[3,3];case 2:return[2,null];case 3:return[2]}}))}))},e.prototype.setGridSessionFilter=function(e,t){if(!e.GridStorageKey)return null;var o=e.GridStorageKey,n={};t.state.filter&&this.storageService&&this.data.SaveFilter&&(n={StateFilter:JSON.stringify(t.state.filter),FilterParams:JSON.stringify(t.params.filterParams)},this.storageService.set(o,JSON.stringify(n)))},e.prototype.filterChange=function(e){this.zgrid&&this.zgrid.filterChange(e)},e.prototype.pageChange=function(e){this.zgrid&&this.zgrid.pageChange(e)},e.prototype.sortChange=function(e){this.zgrid&&this.zgrid.sortChange(e)},e.prototype.inCellCheckBoxOnChange=function(e,t,o){var n=e.detail.checked;this.gData[t][o.Value]=n},e.prototype.columnsOrderChanged=function(e){this.zgrid,this.zgrid.grid.data;if(this.zgrid)this.zgrid},e.prototype.addHandler=function(e){var t=e.sender;this.isNew=!0,this.closeEditor(t);var o={};this.zgrid.gridColumns.forEach((function(e){var t=[];e.IsRequired&&t.push(u.Validators.required),e.ValidatorPattern&&t.push(u.Validators.pattern(e.ValidatorPattern)),o[e.Value]=new u.FormControl(null,t)})),this.formGroup=new u.FormGroup(o),t.addRow(this.formGroup)},e.prototype.saveHandler=function(e){var t=e.sender,o=e.rowIndex,n=e.formGroup,r=e.isNew,i=this.gData?this.gData:[];if(n.valid){var a=!1,l=this.data.UniqueKey;l&&i.forEach((function(e){e[l]===n.value[l]&&(a=!0)})),a||(r?i.push(n.value):i[o]=n.value,this.setData(i),t.closeRow(o))}},e.prototype.cancelHandler=function(e){var t=e.sender,o=e.rowIndex;t.closeRow(o)},e.prototype.editHandler=function(e){var t=e.sender,o=e.rowIndex,n=e.dataItem;this.isNew=!1,this.closeEditor(t);var r={};this.zgrid.gridColumns.forEach((function(e){var t=[];e.IsRequired&&t.push(u.Validators.required),e.ValidatorPattern&&t.push(u.Validators.pattern(e.ValidatorPattern)),r[e.Value]=new u.FormControl(n[e.Value],t)})),this.formGroup=new u.FormGroup(r),this.editedRowIndex=o,t.editRow(o,this.formGroup)},e.prototype.removeHandler=function(e){var t=e.sender,o=e.dataItem,n=this.getItemIndex(o,this.gData,this.data.UniqueKey);this.gData.splice(n,1),t.cancelCell()},e.prototype.closeEditor=function(e,t){void 0===t&&(t=this.editedRowIndex),e.closeRow(t),this.editedRowIndex=void 0,this.formGroup=void 0},e.prototype.getItemIndex=function(e,t,o){for(var n=0;n<t.length;n++)if(t[n][o]===e[o])return n;return-1},e}();De.decorators=[{type:t.Component,args:[{selector:"app-zgrid",template:'\x3c!--\r\n<div style="margin: 10px">\r\n <div class="card">\r\n <div class="card-block k-form">\r\n <fieldset>\r\n <legend>Binding types</legend>\r\n <div class="k-form-field">\r\n <span>Bind the data to:</span>\r\n <input [(ngModel)]="bindingType" type="radio" name="mode" id="array" value="array" class="k-radio"\r\n (change)="changeBindingType($event)">\r\n <label class="k-radio-label" for="array">Array object</label>\r\n <input [(ngModel)]="bindingType" type="radio" name="mode" id="gridDataResult" value="gridDataResult" class="k-radio"\r\n (change)="changeBindingType($event)">\r\n <label class="k-radio-label" for="gridDataResult">GridDataResult object</label>\r\n <input [(ngModel)]="bindingType" type="radio" name="mode" id="async" value="async" class="k-radio"\r\n (change)="changeBindingType($event)">\r\n <label class="k-radio-label" for="async">Asynchronous source</label>\r\n </div>\r\n </fieldset>\r\n </div>\r\n </div>\r\n</div> --\x3e\r\n<div style="margin: 10px 0 6px 0;">\r\n <div *ngIf="data.Title" class="gridTitle">{{data.Title}}</div>\r\n <ng-template #template let-anchor>\r\n <span>{{ anchor.nativeElement.innerText }}</span>\r\n </ng-template>\r\n <div kendoTooltip\r\n showOn="none"\r\n [tooltipTemplate]="template"\r\n filter=".k-grid td"\r\n (mouseover)="showTooltip($event)"> \r\n <kendo-grid [zgridbinding]="{data: data, group: group, params: params, gridSubject: gridSubject}" [ngClass]="data.Class"\r\n [data]="gridData"\r\n [pageSize]="state.take"\r\n [pageable]="{responsive: true, buttonCount: 3, pageSizes: pageSizes, previousNext: previousNext}"\r\n [skip]="state.skip"\r\n [sort]="state.sort"\r\n [sortable]="{allowUnsort: true,mode: \'multiple\'}"\r\n [filter]="state.filter"\r\n [filterable]="data.enableFiltering !== false"\r\n [resizable]="true"\r\n [reorderable]="true"\r\n [columnMenu]="data.DisableGridColumnMenu ? false : { filter: true }"\r\n [hidden]="!(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n (cellClick)="cellClickHandler($event)"\r\n (cellClose)="editCellCloseHandler($event)"\r\n (dataStateChange)="dataStateChange($event)"\r\n (pageChange)="pageChange($event)"\r\n (sortChange)="sortChange($event)"\r\n (filterChange)="filterChange($event)"\r\n (columnReorder)="columnsOrderChanged($event)"\r\n [kendoGridSelectBy]="rowSelectionKey"\r\n [selectable]="selectableSettings"\r\n [selectedKeys]="mySelection"\r\n [ngStyle]="getGridStyle()"\r\n [trackBy]="trackBy"\r\n (cancel)="cancelHandler($event)"\r\n (save)="saveHandler($event)"\r\n (remove)="removeHandler($event)"\r\n (edit)="editHandler($event)"\r\n (add)="addHandler($event)">\r\n <ng-template kendoGridToolbarTemplate *ngIf="data.AllowRefreshButton || data.AllowExport || data.AllowSaveState || data.EnableGridCommand">\r\n <button type="button" kendoButton (click)="refreshData()" *ngIf="data.AllowRefreshButton"><span class="k-icon k-i-refresh-sm"></span> Refresh</button>\r\n <button type="button" kendoGridExcelCommand *ngIf="data.AllowExport"><span class="k-icon k-i-file-excel"></span> Export Data to Excel</button>\r\n <button type="button" kendoButton (click)="saveGridSettings()" *ngIf="data.AllowSaveState"><span class="k-icon k-i-star"></span> Save Setting</button>\r\n <button type="button" kendoButton (click)="restoreGridSettings()" *ngIf="gridDefaultStateExist"><span class="k-icon k-i-star-outline"></span> Restore Setting</button>\r\n <button type="button" kendoGridAddCommand *ngIf="data.EnableGridCommand "><span class="k-icon k-i-add"></span>Add New</button>\r\n </ng-template>\r\n <kendo-grid-checkbox-column *ngIf="!!data.SelectOptions" [width]="60" showSelectAll="true" [columnMenu]="true"></kendo-grid-checkbox-column>\r\n <kendo-grid-column *ngFor="let col of columns"\r\n [field]="col.field"\r\n [title]="col.title"\r\n [width]="col.width"\r\n [minResizableWidth]="col.minResizableWidth"\r\n [filter]="col.filter"\r\n [filterable]="filterable(col.enableFiltering)"\r\n [sortable]="sortable(col.enableSorting)"\r\n [headerStyle]="{\'white-space\': \'initial\'}"\r\n [hidden]="col.hidden"\r\n [format]="col.format"\r\n [class]="col.Class"\r\n [locked]="locked(col)"\r\n [columnMenu]="!col.disableColumnMenu"\r\n [editor]="col.editorType">\r\n <div [ngSwitch]="true">\r\n <div *ngSwitchCase="col.fieldType === \'number\'\r\n || col.fieldType === \'currency\'\r\n || col.fieldType === \'znumeric\'">\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column">\r\n <kendo-grid-numeric-filter-cell [column]="column" [filter]="filter" operator="eq">\r\n <kendo-filter-eq-operator></kendo-filter-eq-operator>\r\n <kendo-filter-neq-operator></kendo-filter-neq-operator>\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-grid-numeric-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngSwitchCase="col.fieldType == \'zdate\'\r\n || col.fieldType === \'ztime\'\r\n || col.fieldType === \'zdatetime\'\r\n || col.fieldType === \'zuidatetime\'">\r\n <div *ngIf="col.filterByDateRange === true">\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column" operator="lte">\r\n <date-range-filter-cell class="date-range-filter"\r\n [filter]="filter"\r\n [field]="col.field">\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </date-range-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngIf="col.filterByDateRange === false">\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column">\r\n <kendo-grid-date-filter-cell [column]="column" [filter]="filter" operator="lte">\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-grid-date-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column">\r\n <kendo-grid-string-filter-cell [column]="column" [filter]="filter" operator="contains">\r\n <kendo-filter-contains-operator></kendo-filter-contains-operator>\r\n <kendo-filter-eq-operator></kendo-filter-eq-operator>\r\n <kendo-filter-neq-operator></kendo-filter-neq-operator>\r\n <kendo-filter-startswith-operator></kendo-filter-startswith-operator>\r\n <kendo-filter-endswith-operator></kendo-filter-endswith-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-grid-string-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n \x3c!-- Grid Edit Template --\x3e\r\n <ng-template kendoGridEditTemplate *ngIf="data.EnableGridCommand " let-dataItem="dataItem" let-column="col" let-formGroup="formGroup" let-isNew="isNew">\r\n <div [ngSwitch]="col.fieldType">\r\n <div *ngSwitchCase="\'number\'">\r\n <kendo-numerictextbox #cellAnchor [formControl]="formGroup.get(col.field)"></kendo-numerictextbox>\r\n <kendo-popup [anchor]="cellAnchor.numericInput"\r\n *ngIf="formGroup.get(col.field).invalid && !(isNew && formGroup.get(col.field).untouched)"\r\n popupClass="k-widget k-tooltip k-tooltip-validation k-invalid-msg"\r\n style="padding-left: 2px; opacity: 0.5;">\r\n <span class="k-icon k-i-warning"></span>\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.required">\r\n {{ col.Name }} required.\r\n </ion-label>\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.pattern">\r\n {{ col.ValidatorMessage ? col.ValidatorMessage : "Please check the input value." }}\r\n </ion-label>\r\n </kendo-popup>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <kendo-textbox #cellAnchor [formControl]="formGroup.get(col.field)"></kendo-textbox>\r\n <kendo-popup [anchor]="cellAnchor.input"\r\n *ngIf="formGroup.get(col.field).invalid && !(isNew && formGroup.get(col.field).untouched)"\r\n popupClass="k-widget k-tooltip k-tooltip-validation k-invalid-msg"\r\n style="padding-left: 2px; opacity: 0.5;">\r\n <span class="k-icon k-i-warning"></span>\r\n \x3c!--<ion-label style="padding-top: 1px; padding-left: 3px;">{{ col.Name }} is required.</ion-label>--\x3e\r\n\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.required">\r\n {{ col.Name }} required.\r\n </ion-label>\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.pattern">\r\n {{ col.ValidatorMessage ? col.ValidatorMessage : "Please check the input value." }}\r\n </ion-label>\r\n </kendo-popup>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">\r\n <div style="margin: 1px 0;" *ngIf="!col.clickableIcons && col.isEditableInGrid !== true" [ngSwitch]="col.fieldType"\r\n [ngClass]="getClass(dataItem, col)">\r\n <span *ngSwitchCase="\'zdate\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'ztime\'">\r\n {{ dataItem[col.field] | date: \'HH:mm\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zshortdate\'">\r\n {{ dataItem[col.field] | date: \'MMM yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zdatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zuidatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'number\'">\r\n {{ dataItem[col.field] | number }}\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n {{ dataItem[col.field] | number: getFormat(col, \'1.2-2\') }}\r\n </span>\r\n <span *ngSwitchCase="\'znumeric\'">\r\n {{ dataItem[col.field] | number: getFormat(col) }}\r\n </span>\r\n <span *ngSwitchCase="\'url\'" style="color: blue; cursor: pointer; text-decoration:underline;">\r\n {{ dataItem[col.field] }}\r\n </span>\r\n <span *ngSwitchDefault>\r\n {{ dataItem[col.field]}}\r\n </span>\r\n </div>\r\n \x3c!-- <span *ngIf="!!col.navigateTo" (click)="onNavigateTo($event, col, dataItem, dataItem[col.field])">\r\n <ion-button color="light" size="small">\r\n {{ col.ClickableIcons }}\r\n <ion-icon slot= "end" name="arrow-forward"></ion-icon>\r\n </ion-button>\r\n </span> --\x3e\r\n <div style="margin: 5px 0;" *ngIf="col.isEditableInGrid === true && inlineEditedFormGroups" [ngSwitch]="col.fieldType" [formGroup]="inlineEditedFormGroups"\r\n [ngClass]="getClass(dataItem, col)">\r\n <span *ngSwitchCase="\'number\'">\r\n <input type="number" [formControl]="this.getFormControl(rowIndex, col.field)" />\r\n </span>\r\n <span *ngSwitchCase="\'checkbox\'">\r\n <ion-checkbox [disabled]="(!!col.ReadOnly ? col.ReadOnly : false)" [formControl]="this.getFormControl(rowIndex, col.field)" color="primary" (ionChange)="inCellCheckBoxOnChange($event, rowIndex, col)"></ion-checkbox>\r\n </span>\r\n <span *ngSwitchCase="\'zuiselectmultiple\'">\r\n <app-zselectmultiple style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(rowIndex)"></app-zselectmultiple>\r\n </span>\r\n <span *ngSwitchCase="\'textarea\'">\r\n <app-ztextarea style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(rowIndex)"></app-ztextarea>\r\n </span>\r\n <span *ngSwitchCase="[\'zuidatetime\',\'zdate\', \'ztime\',\'zdatetime\',\'zshortdate\'].includes(col.fieldType) ? col.fieldType : \'\'">\r\n <app-zdatetime style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(rowIndex)"></app-zdatetime>\r\n </span>\r\n <span *ngSwitchDefault>\r\n <input style="width: 100%;" type="text" [formControl]="this.getFormControl(rowIndex, col.field)" />\r\n </span>\r\n </div>\r\n <span style="margin-top: 10px;" *ngFor="let icon of col.clickableIcons">\r\n <span [ngClass]="icon.Class ? icon.Class : \'\'" *ngIf="!!icon && (!!dataItem.WFS_StatusCode && !!icon)\r\n ? dataItem.WFS_StatusCode !== icon.WFS_StatusCode\r\n : true;\r\n else disabledButton" (click)="onBtnClick($event, icon, dataItem, dataItem[col.field])">\r\n {{icon.Name || dataItem[col.field]}} <fa-icon [icon]="icon.Icon" style="padding: 4px 6px;">\r\n </fa-icon>\r\n </span>\r\n <ng-template #disabledButton>\r\n </ng-template>\r\n </span>\r\n \x3c!-- <strong>{{ dataItem[col.field] }}</strong> --\x3e\r\n \x3c!-- <span class="{{dataItem.Discontinued ? \'discontinued\' : \'active\'}}">\r\n {{dataItem.Discontinued ? "discontinued" : "active"}}\r\n </span> --\x3e\r\n </ng-template>\r\n <ng-template kendoGridFooterTemplate let-column let-columnIndex="columnIndex" *ngIf="data.EnableAggregate">\r\n <div style="margin: 5px 0;" [ngSwitch]="col.fieldType">\r\n {{col.aggregateType}}\r\n <span *ngSwitchCase="\'zdate\'">\r\n {{ col.aggregateValue | date: \'dd/MM/yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'ztime\'">\r\n {{ col.aggregateValue | date: \'HH:mm\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zshortdate\'">\r\n {{ col.aggregateValue | date: \'MMM yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zdatetime\'">\r\n {{ col.aggregateValue | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zuidatetime\'">\r\n {{ col.aggregateValue | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'number\'">\r\n {{ col.aggregateValue | number }}\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n {{ col.aggregateValue | number: getFormat(col, \'1.2.2\') }}\r\n </span>\r\n <span *ngSwitchCase="\'znumeric\'">\r\n {{ col.aggregateValue | number: getFormat(col) }}\r\n </span>\r\n <span *ngSwitchCase="\'url\'" style="color: blue; cursor: pointer; text-decoration:underline;">\r\n {{ col.aggregateValue }}\r\n </span>\r\n <span *ngSwitchDefault>\r\n {{ col.aggregateValue }}\r\n </span>\r\n </div>\r\n </ng-template>\r\n </kendo-grid-column>\r\n <kendo-grid-command-column *ngIf="data.EnableGridCommand" width="180" [columnMenu]="false">\r\n <ng-template kendoGridCellTemplate let-isNew="isNew">\r\n <button kendoGridSaveCommand>\r\n {{ isNew ? \'Save\' : \'Update\' }}\r\n </button>\r\n <button kendoGridCancelCommand [primary]="true">\r\n {{ isNew ? \'Discard changes\' : \'Cancel\' }}\r\n </button>\r\n <button kendoGridEditCommand>\r\n {{ "Edit" }}\r\n </button>\r\n <button kendoGridRemoveCommand>\r\n {{ "Remove" }}\r\n </button>\r\n </ng-template>\r\n </kendo-grid-command-column>\r\n <kendo-grid-excel fileName="Export.xlsx" [fetchData]="allResults"></kendo-grid-excel>\r\n </kendo-grid>\r\n <div *ngIf="isLoading" class="k-i-loading"></div>\r\n </div>\r\n</div>\r\n',styles:[":host ::ng-deep kendo-grid .k-grid-content{white-space:nowrap}:host ::ng-deep kendo-grid .k-toolbar{background-color:#e3ecf8}:host ::ng-deep kendo-grid .k-grid-header{background-color:#e3ecf8;font-weight:600}:host ::ng-deep kendo-grid .k-button{border-radius:5px;box-shadow:0 2px 2px rgba(0,0,0,.1);background-color:#c9daf2}:host ::ng-deep kendo-grid .k-grid-header .k-grid-filter:hover,:host ::ng-deep kendo-grid .k-grid-header .k-header-column-menu:hover,:host ::ng-deep kendo-grid .k-grid-header .k-hierarchy-cell .k-icon:hover{background-color:#c9daf2}:host ::ng-deep kendo-grid .k-grid .k-grid-filter,:host ::ng-deep kendo-grid .k-grid .k-header-column-menu,:host ::ng-deep kendo-grid .k-grid .k-hierarchy-cell .k-icon{color:#132842}:host ::ng-deep kendo-grid .k-dropdown .k-dropdown-wrap,:host ::ng-deep kendo-grid .k-dropdowntree .k-dropdown-wrap{border-radius:2px;background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-grid tr.k-alt{background-color:rgba(232,238,246,.5)}:host ::ng-deep kendo-grid tbody tr.k-state-hover,:host ::ng-deep kendo-grid tbody tr:hover{background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-grid .k-pager-wrap{background-color:#e3ecf8}:host ::ng-deep kendo-grid .k-pager-numbers .k-link.k-state-selected{color:#ff5e5b;background-color:rgba(255,94,91,.4)}:host ::ng-deep kendo-grid .k-pager-numbers .k-link.k-state-hover,:host ::ng-deep kendo-grid .k-pager-numbers .k-link:hover{color:#ff5e5b;background-color:rgba(255,94,91,.15)}.cellWrapText .gridCell{white-space:pre-line!important}.rightAligned{text-align:right}.centerAligned{text-align:center}.gridTitle{margin:20px 10px 5px;font-size:18px;font-weight:700}.gridCell.primary{color:var(--ion-color-primary)}.gridCell.secondary{color:var(--ion-color-secondary)}.gridCell.tertiary{color:var(--ion-color-tertiary)}.gridCell.success{color:var(--ion-color-success-shade)}.gridCell.warning{color:var(--ion-color-warning)}.gridCell.danger{color:var(--ion-color-danger)}.gridCell.dark{color:var(--ion-color-dark)}.gridCell.medium{color:var(--ion-color-medium)}.gridCell.light{color:var(--ion-color-light)}.k-i-loading{position:absolute;top:100px;left:0;right:0;bottom:0;font-size:45px;background-color:hsla(0,0%,100%,.3);color:#0f4800}"]}]}],De.ctorParameters=function(){return[{type:o.ActivatedRoute},{type:o.Router},{type:u.FormBuilder},{type:a.AuthService},{type:a.WebApiService},{type:a.ZGridStatePersistingService},{type:a.ToastService},{type:a.ZCoreService},{type:a.StorageSessionService},{type:Q}]},De.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],tooltipDir:[{type:t.ViewChild,args:[M.TooltipDirective]}]};var Re=function(){function e(e){var t=this;this.attachmentService=e,this.imgWidth=null,this.imgHeight=null,this.imgSrc=null,this.randomNumber=Math.random(),this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){return q(this,void 0,void 0,(function(){var e,t,o;return _(this,(function(n){switch(n.label){case 0:return a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Size&&-1!==this.data.Size.toLowerCase().indexOf("x")&&(e=this.data.Size.toLowerCase().split("x"),this.imgWidth=e[0],this.imgHeight=e[1]),this.Guid=this.getGroupValue(this.data.Guid,this.group),this.FileName=this.getGroupValue(this.data.FileName,this.group),null==this.Guid||null==this.FileName?[3,3]:[4,this.attachmentService.getImageBlob(this.FileName,this.Guid)];case 1:return t=n.sent(),o=this,[4,this.attachmentService.convertBlobToBase64(t)];case 2:o.Image=n.sent(),n.label=3;case 3:return[2]}}))}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.onDataSourceChange=function(){var e=this.getGroupValue(this.data.Value,this.group),t=this.getGroupValue(this.data.SourceUrl,this.group);if(e&&t)return t+"?id="+e+"&size="+this.data.Size},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(e,t)},e.prototype.getImgStyle=function(){},e.prototype.onIconClick=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick,this.group);if("function"==typeof e)return e();e?"function"==typeof e||console.warn("ZImg OnItemClick property is not a function: ",e):console.warn("ZImg OnItemClick property is invalid: ",e)},e.prototype.getIconName=function(){return a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Icon,this.group)},e}();Re.decorators=[{type:t.Component,args:[{selector:"app-zimg",template:'<ion-item>\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">{{data.Label}} <ion-text\r\n *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <img *ngIf="!!getGroupValue(data.Value, group)" [src]="onDataSourceChange()" [width]="imgWidth" [height]="imgHeight" style="border-radius: 50%; margin: 5px auto" />\r\n <img *ngIf="this.Guid !==undefined && this.Guid !==FileName" [src]="this.Image" [width]="imgWidth" [height]="imgHeight" style="border-radius: 50%; margin: 5px auto" />\r\n \r\n <div *ngIf="!getGroupValue(data.Value, group)" (click)="onIconClick()">\r\n <ion-icon name="getIconName()" style="zoom:4.0;">\r\n </ion-icon>\r\n </div>\r\n</ion-item>',styles:[""]}]}],Re.ctorParameters=function(){return[{type:a.AttachmentService}]},Re.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Oe=function(){function e(e,t,o,n,r,i){this.activatedRoute=e,this.resourceApiService=t,this.authService=o,this.zGridStatePersistingService=n,this.webapiService=r,this.router=i,this.zgrid=null,this.scrollViewCards={data:[],total:0},this.responseData={data:[],total:0},this.params={referId:null,pageNo:0,pageSize:20,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:"",filters:"",columns:"",grantType:4},this.gridColumns=[],this.usableColumns=[],this.dataSource=null,this.state={skip:0,take:10},this.paginationApiPostUrl=null,this.resourceURL=null,this.filterItems=[],this.progressStyles={color:"",background:"green"},this.loadingPanelVisible=!1,this.label={visible:!0,format:"percent",position:"center"}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.dataSource=this.field.DataSource?this.field.DataSource:null,this.filterItems=this.group.filterItems,!this.dataSource){if(this.resourceURL=a.ZComponentHelper.getGroupValue(this.field.ResourceURL,this.grp),!this.resourceURL)return;var e=this.resourceURL.split("/api/");if(e[1])e[1]="Page"+e[1],this.paginationApiPostUrl=e.join("/api/");else{var t=this.resourceURL.split("/");t[t.length-2]="Page"+t[t.length-2],this.paginationApiPostUrl=t.join("/")}this.setFilterParamsByParentRefId()}this.generateGridColumns()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.getData=function(){this.zgrid&&this.zgrid.getDataBinding()},e.prototype.generateGridColumns=function(){var e=this;this.loadingPanelVisible=!0,a.ZComponentHelper.getGroupValue(this.field.ColumnFields,this.grp).pipe(i.tap((function(t){var o=e.getGridSettings(),n=e.field.FieldElementName;a.ZComponentHelper.getGridColumns(t,e.gridColumns,e.group,e.authService,n,o,e.usableColumns),e.getFilterParamsColumns(),e.getFilter()})),i.tap((function(){e.getDataBinding()}))).subscribe((function(){}))},e.prototype.getDataBinding=function(){var e,t=this;if(this.dataSource)a.ZComponentHelper.getGroupValue(this.field.DataSource,this.grp);else this.param.pageSize=null!==(e=this.field.PageSize)&&void 0!==e?e:50,this.field.ExternalPagination?this.webapiService.postApi(this.paginationApiPostUrl,this.param,null,null,null,null,!0).subscribe((function(e){i.delay(2500),t.responseData={data:e.dataSet,total:e.totalCount},t.scrollViewCards={data:e.dataSet,total:e.totalCount},e.dataSet.length>0&&t.getRecordsSummary(),t.data.ResourceURLAlt&&t.getNewSurvey(),t.loadingPanelVisible=!1})):this.webapiService.getApi(this.resourceURL,null,null,null,null,null,!0).subscribe((function(e){e.dataSet?(e.dataSet,e.totalCount):(e,e.length),t.loadingPanelVisible=!1}))},e.prototype.getRecordsSummary=function(){var e=this,t=[];this.responseData.data.forEach((function(e){t.push(e.Id)})),this.webapiService.postApi(this.resourceApiService.getURL("ppsapsurveysummaryinfoURL"),t,null,null,null,null,!0).subscribe((function(t){e.responseData.data.forEach((function(e){t.forEach((function(t){t.SurveyId==e.Id&&(e.value=Number.isNaN(t.TotalTakenQuestions/t.TotalQuestions*100)?0:Math.round(t.TotalTakenQuestions/t.TotalQuestions*100))}))}))}))},e.prototype.getNewSurvey=function(){var e,t=this,o={columns:"PartnerMillId,SurveyTemplateId,WFS_StatusCode,WFS_StatusName",pageSize:null!==(e=this.field.PageSize)&&void 0!==e?e:50};this.webapiService.postApi(this.resourceApiService.getPageUrl(this.data.ResourceURLAlt),o,null,null,null,null,!0).subscribe((function(e){e.dataSet.forEach((function(e){e.value=0,t.scrollViewCards.data.push(e),t.scrollViewCards.total+=1}))}))},Object.defineProperty(e.prototype,"field",{get:function(){return this.data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grp",{get:function(){return this.group},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"param",{get:function(){return this.params},enumerable:!1,configurable:!0}),e.prototype.getGridSettings=function(){var e="ionic-field::"+this.authService.e1Token.userName,t=this.field.Name+"::"+this.field.Value,o=this.zGridStatePersistingService.get(e);if(o&&o[0]){var n=o.find((function(e){return e.dataFormFields===t}));if(n)return n.gridSettings.columnsConfig.sort((function(e,t){return e.orderIndex-t.orderIndex}))}},e.prototype.setFilterParamsByParentRefId=function(){var e=this.getFieldReferenceId()||this.grp.referenceId,t=this.field.ReferenceField||this.grp.parentReferenceField;if(e&&this.grp.parentReferenceField){var o={key:t,ops:"=",value:e};this.params.filterParams.push(o)}},e.prototype.getFieldReferenceId=function(){var e=null;return this.field.ReferenceId&&(e=a.ZComponentHelper.getGroupValue(this.field.ReferenceId,this.grp)),e},e.prototype.getFilterParamsColumns=function(){var e=[];this.gridColumns.forEach((function(t){t.valueExpr?e.push(t.valueExpr+" as "+t.field):e.push(t.field)})),e.length>0&&-1===e.indexOf("Id")&&e.push("Id");var t=[];t.push(e.join(",")),this.usableColumns.length>0&&t.push(this.usableColumns.join(",")),this.params.columns=t.join(",")},e.prototype.start=function(e){var t=this;if(this.group,this.group.isLoading=!0,"New"==e.WFS_StatusName){var o={UserId:this.group.PSAPUSERID,SurveyMillId:e.Id};this.webapiService.postApi(this.resourceApiService.getURL("ppsapsurveycreateURL"),o,null,null,null,null,!0).subscribe((function(o){if(t.group.isLoading=!1,t.data.EditClickURL){var n=a.ZComponentHelper.getGroupValue(t.data.ColumnFields,t.group);t.group.subject.next({type:"zgrid-cellClick",target:t.data.EditClickURL,data:e,columnFields$:n})}else t.router.navigate([t.group.editModelURL,o.Id,"edit"],{relativeTo:t.activatedRoute})}))}else if(this.group.isLoading=!1,this.data.EditClickURL){var n=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);this.group.subject.next({type:"zgrid-cellClick",target:this.data.EditClickURL,data:e,columnFields$:n})}else this.router.navigate([this.group.editModelURL,e.Id,"edit"],{relativeTo:this.activatedRoute})},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e.prototype.getFilter=function(){var e=this;(this.params.filters&&this.field.Filters?this.params.filters=this.params.filters+" && "+this.field.Filters:!this.params.filters&&this.field.Filters&&(this.params.filters=this.field.Filters),this.field.Filters&&-1!==this.field.Filters.indexOf("group."))&&this.field.Filters.split(" ").filter((function(e){return-1!==e.trim().indexOf("group.")})).forEach((function(t){var o=a.ZComponentHelper.getGroupValue(t,e.grp);e.params.filters=e.params.filters.replace(t,o)}))},e.prototype.valueChange=function(e){if(e.length<1)return this.scrollViewCards.data=this.responseData.data,void(this.scrollViewCards.total=this.responseData.total);this.scrollViewCards.data=this.responseData.data.filter((function(t){return e.includes(t.WFS_StatusName)})),this.scrollViewCards.total=this.responseData.data.filter((function(t){return e.includes(t.WFS_StatusName)})).length},e}();Oe.decorators=[{type:t.Component,args:[{selector:"app-zkcard",template:'\x3c!--<kendo-multiselect [data]="filterItems" [value]="value" [placeholder]="\'Survey Status\'" [filterable]="true"\r\n (valueChange)="valueChange($event)"></kendo-multiselect>\r\n --\x3e\r\n<div class="survey-card-list">\r\n <div *ngFor="let card of scrollViewCards.data">\r\n \x3c!--<scrollview-card [card]="card"></scrollview-card>--\x3e\r\n <kendo-card class="custom-card-draft" *ngIf="card.WFS_StatusName == \'Draft\'" [width]="\'250px\'">\r\n <kendo-card-header class="k-hbox">\r\n <div>\r\n <h1 kendoCardTitle>{{ card.SurveyTemplateName }}</h1>\r\n <p kendoCardSubtitle>Survey Doc No: {{card.DocumentNo}}</p>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body class="card-body">\r\n Mill Name: {{card.PartnerMillName}}\r\n <br />\r\n Survey Status: {{card.WFS_StatusName}}\r\n </kendo-card-body>\r\n <kendo-card-footer>\r\n Survey Progression:\r\n <kendo-progressbar style="width: 210px; border-radius:10px" [value]="card.value" [label]="label" [progressCssStyle]="progressStyles">\r\n </kendo-progressbar>\r\n\r\n <kendo-card-actions class="k-hbox-actionBtn" orientation="horizontal" [layout]="\'end\'">\r\n <button class="k-button k-navigation"\r\n (click)="start(card)">\r\n <div style="justify-content:space-between">\r\n <span> Continue </span>\r\n <fa-icon [icon]="getFontAwesome(\'play\')"></fa-icon>\r\n </div>\r\n </button>\r\n </kendo-card-actions>\r\n </kendo-card-footer>\r\n </kendo-card>\r\n\r\n <kendo-card class="custom-card-submit" *ngIf="card.WFS_StatusName == \'Submitted\'" [width]="\'250px\'">\r\n <kendo-card-header class="k-hbox">\r\n <div>\r\n <h1 kendoCardTitle>{{ card.SurveyTemplateName }}</h1>\r\n <p kendoCardSubtitle>Survey Doc No: {{card.DocumentNo}}</p>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body class="card-body">\r\n Mill Name: {{card.PartnerMillName}}\r\n <br />\r\n Survey Status: {{card.WFS_StatusName}}\r\n </kendo-card-body>\r\n <kendo-card-footer>\r\n Survey Progression:\r\n <kendo-progressbar style="width: 210px; border-radius:10px" [value]="card.value" [label]="label" [progressCssStyle]="progressStyles">\r\n </kendo-progressbar>\r\n <kendo-card-actions class="k-hbox-actionBtn" orientation="horizontal" [layout]="\'end\'">\r\n <button class="k-button k-navigation"\r\n (click)="start(card)">\r\n <div style="justify-content:space-between">\r\n <span> View </span>\r\n <fa-icon [icon]="getFontAwesome(\'file-alt\')"></fa-icon>\r\n </div>\r\n </button>\r\n </kendo-card-actions>\r\n </kendo-card-footer>\r\n </kendo-card>\r\n\r\n <kendo-card class="custom-card-new" *ngIf="card.WFS_StatusName == \'New\'" [width]="\'250px\'">\r\n <kendo-card-header class="k-hbox">\r\n <div>\r\n <h1 kendoCardTitle>{{ card.SurveyTemplateName }}</h1>\r\n <p kendoCardSubtitle>{{card.DocumentNo}}</p>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body class="card-body">\r\n Mill Name: {{card.PartnerMillName}}\r\n <br />\r\n Survey Status: {{card.WFS_StatusName}}\r\n </kendo-card-body>\r\n <kendo-card-footer>\r\n Survey Progression: \r\n <kendo-progressbar style="width: 210px; border-radius:10px" [value]="card.value" [label]="label" [progressCssStyle]="progressStyles">\r\n </kendo-progressbar>\r\n <kendo-card-actions class="k-hbox-actionBtn" orientation="horizontal" [layout]="\'end\'">\r\n <button class="k-button k-navigation"\r\n (click)="start(card)">\r\n <div style="justify-content:space-between">\r\n <span> Start </span>\r\n <fa-icon [icon]="getFontAwesome(\'play\')"></fa-icon>\r\n </div>\r\n </button>\r\n </kendo-card-actions>\r\n </kendo-card-footer>\r\n </kendo-card>\r\n </div>\r\n</div>\r\n',styles:[".survey-card-list{display:flex;flex-wrap:wrap;background-color:#f0dcd9;align-items:center;border-radius:10px}.custom-card-submit{margin:20px;border:3px solid green;border-radius:15px}.custom-card-draft,.custom-card-new{margin:20px;border:3px solid orange;border-radius:15px}"]}]}],Oe.ctorParameters=function(){return[{type:o.ActivatedRoute},{type:a.ResourceApiService},{type:a.AuthService},{type:a.ZGridStatePersistingService},{type:a.WebApiService},{type:o.Router}]};var Me=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.labelText="",this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setData=function(t){e.labelText=t}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.labelText=a.ZComponentHelper.getGroupValue(this.data.Label.toString(),this.group)},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.isVisible=function(){return null===this.componentProperties.isVisible?a.ZComponentHelper.isVisible.call(this,this.data):this.componentProperties.isVisible},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)+" "+t.DivClass},e}();Me.decorators=[{type:t.Component,args:[{selector:"app-zlabel",template:'<ion-item [formGroup]="form" *ngIf="componentProperties.isVisible" [ngClass]="getClass(form, data)">\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-label class="ion-text-wrap label" Position="Fixed" [color]="data.Color">{{labelText}}</ion-label>\r\n </span>\r\n </div>\r\n</ion-item>\r\n',styles:[".subtitle{font-weight:700;text-decoration:underline}.mediumFont .label,.subtitle .label{font-size:15px}.label{font-size:12px;white-space:pre-wrap!important}.boldFont .label{font-weight:700}.underlineFont .label{text-decoration:underline}"]}]}],Me.ctorParameters=function(){return[]},Me.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ae=function(){function e(e,t,o){var n=this;this.fieldService=e,this.resourceApiService=t,this.workflowService=o,this.componentProperties=new a.ZComponentProperties,this.positionMode="fixed",this.bottomEnd={vertical:"bottom",horizontal:"end"},this.items=[],this.dialOpen=!1,this.isWorkflowButton=!1,this.buttonColor="info",this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.events=[],this.e1wfs_wfcGetWorkflowButtonURL=this.resourceApiService.getURL("e1wfs_wfcGetWorkflowButtonURL"),this.e1wfs_wfc_getWorkflowInitialStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getWorkflowInitialStatusURL"),this.e1wfs_wfc_getDocumentStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getDocumentStatusURL")}return e.prototype.ngOnInit=function(){var e=this;if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data=this.getFirstzButton(this.group.fields),this.data)if(a.ZComponentHelper.isNullUndefinedEmpty(this.data.WorkflowCode)){var t=this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null);try{t.subscribe((function(t){t.forEach((function(t){var o=e.getButtonLabel(t);e.isBtnVisible(t.Visible)&&e.items.push({label:o,icon:a.ZComponentHelper.getIcon(t.Icon),clickEvent:t.ClickEvent,click:function(o){e.buttonClick(t)}})}))}))}catch(e){console.error("error: ",e)}}else this.isWorkflowButton=!0,this.loadWorkflowButton()},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFirstzButton=function(e){for(var t=0;t<e.length-1;t++){if("zbuttons"===e[t].Type||"zworkflowbuttons"===e[t].Type)return e[t];Array.isArray(e[t].Value)&&this.getFirstzButton(e[t].Value)}return null},e.prototype.getButtonLabel=function(e){var t=e.Label;t||(t=e.Name);var o=t.match(/^{{.*}}$/gi);return o?(o=o[0].slice(2,-2),a.ZComponentHelper.getGroupValue(o,this.group)):t},e.prototype.buttonClick=function(e){this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:null})},e.prototype.onBlur=function(){},e.prototype.onFocus=function(){this.isWorkflowButton&&this.loadWorkflowButton()},e.prototype.onOpen=function(e){this.dialOpen=!0,console.log("open")},e.prototype.onClose=function(e){this.dialOpen=!1,console.log("close")},e.prototype.onDialItemClick=function(e){e.item.click()},e.prototype.loadWorkflowButton=function(){var e=this;this.items=[];var t=null;this.group.zModel&&(t=this.group.zModel.WFS_DocumentId),this.workflowService.appendWFS_DocumentsInfo(this.data.WorkflowCode,t);try{this.workflowService.getWorkflowButtonsField(this.data.WorkflowCode,this.e1wfs_wfcGetWorkflowButtonURL,String(!1)).subscribe((function(t){t.forEach((function(t){var o=e.getButtonLabel(t),n=JSON.parse(t.Attributes),r=n.Label||o;e.isBtnVisible(t.Visible)&&e.items.push({label:r,fieldAttribute:t,icon:a.ZComponentHelper.getIcon(n.Icon),clickEvent:t.ClickEvent,click:function(o){e.workflowButtonClick(t)}})}))}))}catch(e){console.error("error: ",e)}},e.prototype.workflowButtonClick=function(e){var t=this,o=JSON.parse(e.Attributes);switch(e.TypeCode.toUpperCase()){case"FUNCTION":console.log("Functional Button: ",e.Name),this.workflowService.functionalButton_OnClick(o,this.group);break;case"GOTO":console.log("GOTO Button: ",e.Name),this.workflowService.gotoButton_Onclick(e,this.data,o,this.group,!1).subscribe((function(e){t.loadWorkflowButton(),e&&t.workflowService.triggerSendEmail(t.group).subscribe()}));break;default:console.log("Invalid Button Type. ",e.Name)}},e}();Ae.decorators=[{type:t.Component,args:[{selector:"app-zmfb",template:'<div class="zmfb-wrap">\r\n <div class="k-overlay" *ngIf="dialOpen"></div>\r\n <kendo-floatingactionbutton icon="plus"\r\n [themeColor]="buttonColor"\r\n [positionMode]="positionMode"\r\n [align]="bottomEnd"\r\n [dialItems]="items"\r\n (blur)="onBlur()"\r\n (focus)="onFocus()"\r\n (open)="onOpen($event)"\r\n (close)="onClose($event)"\r\n (dialItemClick)="onDialItemClick($event)">\r\n <ng-template kendoDialItemTemplate let-item let-isFocused="isFocused">\r\n <span class="k-fab-item-text">\r\n <span>{{ item.label }}</span>\r\n </span>\r\n <kendo-avatar shape="circle" [themeColor]="buttonColor">\r\n <span class="k-icon k-i-{{ item.icon }}"></span>\r\n </kendo-avatar> \r\n </ng-template>\r\n </kendo-floatingactionbutton>\r\n</div>\r\n',styles:[".button-item{padding:8px 10px;width:100%;display:flex;align-items:center;background-color:#fff}.button-details{margin-left:8px;display:flex;flex-direction:column;align-items:flex-start}.custom-focused-class{box-shadow:inset 0 0 8px rgba(0,0,0,.2)}.zmfb-wrap{display:flex;justify-content:center;margin-top:60px}@media only screen and (max-device-width:768px){.k-bottom-end,.k-pos-bottom-end{padding-bottom:16vh}}"]}]}],Ae.ctorParameters=function(){return[{type:a.FieldService},{type:a.ResourceApiService},{type:a.WorkflowService}]},Ae.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ne=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.RightAlign){var e=this;setTimeout((function(){var t=$("#"+e.data.Value).find("input");t.length>0&&(t[0].style.textAlign="right")}),750)}},e.prototype.valueHandler=function(){var e=this.form.get(this.data.Value).value;if(""!=e)return+e},e.prototype.onChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:{value:e,field:this.data}})},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getStyle=function(e){var t="";return t+=e?"right":"left"},e.prototype.autocorrectHandler=function(){return this.data.AutoCorrect?"on":"off"},e.prototype.inputmodeHandler=function(){return"decimal"},e.prototype.getKendoStyle=function(){return(this.componentProperties.isReadOnlyField?this.group[this.componentProperties.isReadOnlyField]:this.componentProperties.isReadOnly)?{margin:"7px 0 0 0",width:"100%","background-color":"#eaeaea",color:"#545454"}:{margin:"7px 0 0 0",width:"100%"}},e}();Ne.decorators=[{type:t.Component,args:[{selector:"app-znumeric",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" [ngClass]="getIon_InvalidClass(form, data)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label> \r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-input *ngIf="isMobileScreen()"\r\n #znumericField\r\n [id]="data.Value"\r\n type="number"\r\n [autocorrect]="autocorrectHandler()"\r\n [min]="data.MinValue"\r\n [max]="data.MaxValue"\r\n [step]="data.StepValue"\r\n [value]="valueHandler()"\r\n [inputmode]="inputmodeHandler()"\r\n [formControlName]="data.Value"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [placeholder]="data.PlaceHolder"\r\n [ngStyle]="{\'text-align\': getStyle(data.RightAlign ? true : false)}">\r\n </ion-input>\r\n \x3c!-- (ionChange)="onChange($event)"\r\n (keyup)="handleMobileKeyUp($event)"\r\n (ionInput)="handleMobileInput($event)"--\x3e\r\n <kendo-numerictextbox *ngIf="!isMobileScreen()"\r\n [spinners]="data.ShowSpinners"\r\n [autoCorrect]="data.AutoCorrect"\r\n [min]="data.MinValue"\r\n [max]="data.MaxValue"\r\n [step]="data.StepValue"\r\n [format]="data.FormatOptions"\r\n [id]="data.Value"\r\n [placeholder]="data.PlaceHolder"\r\n [value]="valueHandler()"\r\n [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (valueChange)="onChange($event)"\r\n [ngStyle]="getKendoStyle()">\r\n </kendo-numerictextbox>\r\n </span> \r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-numerictextbox{color:var(--z-text-color)}"]}]}],Ne.ctorParameters=function(){return[]},Ne.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ee=function(){function e(e,t,o){var n=this;this.resourceApiService=e,this.webApiService=t,this.cacheService=o,this.items=[],this.infinitezData=[],this.infiniteSearchText=null,this.toggleSelectable=!0,this.itemValueField=null,this.itemTextField=null,this.itemDataField=null,this.itemTemplate="{{item[itemTextField]}}",this.infiniteScrollPageNo=0,this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.dataInfo={itemsResourceURL:"",optionFilters:"",totalCount:0},this.setEnable=function(e){var t=n.group.form.controls[n.data.Value];e?t.enable():t.disable(),n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required),a.ZComponentHelper.hasCCField(n.data.Type)&&a.ZComponentHelper.changeValidator(e,n.group,n.data.CCValue,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnDestroy=function(){this.debounceSub&&this.debounceSub.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.isLoading=!0,a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setSelectMultipleTextValue(this.data.CCSelectOptions,this);var t,o=this.data.CCValue;if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$&&this.group.zModel&&this.group.zModel[o]){var n=this.group.zModel[o];(t=a.ZComponentHelper.getInfiniteData(null,"",this,n.toString()))?t.subscribe((function(t){console.log(e.data.Name," - initial zData load: ",t),e.isLoading=!1})):this.isLoading=!1,a.ZComponentHelper.isMobileScreen()||this.handleFilter(null,!0)}else this.data.CCOptionResourceURL?this.lazyLoadDataOptions().subscribe((function(){e.isLoading=!1})):this.isLoading=!1},e.prototype.lazyLoadDataOptions=function(){var e=this.resourceApiService.getURL(this.data.CCOptionResourceURL),t=new a.ZSelectPostApiParams;return t.sorts=this.data.CCOptionSort,t.columns=this.data.CCOptionColumns,t.filters=this.data.CCOptionFilter,a.ZComponentHelper.getDataOptions(this.data.CCOptionName,t,this.group,e,this.cacheService,this.webApiService,this.data.DisableCache)},e.prototype.getItemsData=function(){if(this.data.HasInfiniteScroll)return this.infinitezData;var e=this.data.CCOptionName||this.itemDataField||"group.zData."+this.data.Name;return Array.isArray(this.data.CCSelectOptions)&&!this.group.zData[e.slice(12)]&&(this.group.zData[e.slice(12)]=this.data.CCSelectOptions,this.itemDataField=e),e.startsWith("zData.")?this.group.zData[e.slice(6)]||[]:e.startsWith("group.zData.")?this.group.zData[e.slice(12)]||[]:e.startsWith("group.")?this.group[e.slice(6)]||[]:e?this.group[e]||[]:void console.warn(this.data.Name," - Invalid setting for OptionName: ",e)},e.prototype.onChangeEvent=function(e){if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$){this.itemTextField.toString();var t=this.itemValueField.toString(),o=[];e&&(o=this.infinitezData.filter((function(o){return o[t]===e})),this.modelzData=o.slice()),this.itemDataField.startsWith("group.zData.")?this.group.zData[this.itemDataField.slice(12)]=o:this.itemDataField.startsWith("group.")&&(this.group[this.itemDataField.slice(6)]=o)}this.group.subject.next({type:"onChange",target:this.data.CCOnChange,event:event,data:{value:e,field:this.data}})},e.prototype.onValueChange=function(e){a.ZComponentHelper.setModelValue(this.data.CCValue,e,this.group),this.onChangeEvent(e)},e.prototype.onChange=function(e){console.log("zselectmultiple (onChange): ",e.value),a.ZComponentHelper.setModelValue(this.data.CCValue,e.value,this.group);var t=this.form.controls[this.data.CCValue];this.handleClose(),!this.data.CCIsRequired||null!==e.value&&0!==e.value.length?t.setErrors(null):t.setErrors({required:!0}),this.onChangeEvent(e.value)},e.prototype.clearItems=function(){this.selectComponent.clear(),this.selectComponent.close()},e.prototype.toggleItems=function(){this.selectComponent.toggleItems(this.toggleSelectable),this.toggleSelectable=!this.toggleSelectable},e.prototype.confirmItems=function(){this.selectComponent.confirm(),this.selectComponent.close()},e.prototype.onSearch=function(e){var t=e.component;if(t&&(t.startSearch(),t.enableInfiniteScroll()),this.data.HasInfiniteScroll)null!==e.text&&e.text!==this.infiniteSearchText&&(this.infiniteScrollPageNo=0),this.getInfiniteData(e);else{this.infiniteScrollPageNo=0,t&&(t.items=[]);var o={referId:null,pageNo:0,pageSize:15,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:""},n=this.data.SearchFields?this.data.SearchFields:this.itemTextField,r=a.ZComponentHelper.filterSearchItems(this.getItemsData(),e.text,n,o.pageNo,o.pageSize);if(t){var i=t.items.concat(r);t.items=i,t.endInfiniteScroll(),t.endSearch(),this.isLoading=!1}}},e.prototype.getInfiniteData=function(e){a.ZComponentHelper.getInfiniteData(e.component,e.text,this)},e.prototype.handleFilter=function(e,t){var o=this;this.debounceSub&&this.debounceSub.unsubscribe(),this.debounceSub=r.of([]).pipe(i.delay(500)).subscribe((function(){o.isLoading=!0,o.onSearch({component:null,text:e})}))},e.prototype.handleOpen=function(){this.data.HasInfiniteScroll&&this.handleFilter(null)},e.prototype.handleClose=function(){},e.prototype.handleBlur=function(){},e.prototype.getItemTemplate=function(e,t,o,n,r){return this.data.ItemTemplate?a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ItemTemplate)({item:e,data:t,group:o,itemValueField:n,itemTextField:r}):r?e[r]:Object.values(e).join(", ")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e.bind(this.group.ctrlScope)(this.group):e},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(e,t)},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.onAddItem=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnAddItem);if("function"==typeof t)return t.bind(this.group.ctrlScope)();console.warn("Invalid declaration of OnAddItem: ",t)},e}();Ee.decorators=[{type:t.Component,args:[{selector:"app-zpostselectinput",template:'<ion-item [ngClass]="getIon_InvalidClass(form, data)" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()">\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%" *ngIf="!isLoading">\r\n <span style="flex-basis: 35%;">\r\n <ionic-selectable #selectComponent item-content\r\n [id]="data.CCValue" headerColor="primary" clearButtonText="Clear"\r\n [canClear]="true" searchFailText="Nothing found :(" [canSearch]="!data[\'disable-search\']" \r\n [placeholder]="data.CCPlaceHolder" [(ngModel)]="group.zModel[data.CCValue]" \r\n [shouldFocusSearchbar]="!data[\'disable-search\']" [hasInfiniteScroll]="!!data.HasInfiniteScroll"\r\n (onSearch)="onSearch($event)" (onInfiniteScroll)="getInfiniteData($event)" [isMultiple]="data.Multiple"\r\n [isEnabled]="!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)" [items]="getItemsData()"\r\n [itemValueField]="itemValueField" [itemTextField]="itemTextField" [shouldStoreItemValue]="true"\r\n [canAddItem]="!!data.OnAddItem" (onAddItem)="onAddItem($event)"\r\n (onChange)="onChange($event)">\r\n\r\n <ng-template ionicSelectableItemIconTemplate let-item="item" let-isItemSelected="isItemSelected">\r\n <fa-icon slot="start" class="isItemSelected" [icon]="[\'far\', isItemSelected ? \'check-circle\': \'circle\']" size="sm" [styles]="{\'color\': isItemSelected ? \'dodgerBlue\' : \'lightGray\'}"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n \x3c!-- <ion-icon name="close-circle"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times-circle\'" size="md"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item="item">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <ng-template zselectitemelement [item]="item"></ng-template> --\x3e\r\n </ng-template>\r\n </ionic-selectable>\r\n </span>\r\n <span style="flex-basis: 60%; margin-left: 5px;" [formGroup]="form">\r\n <ion-input [id]="data.Value" [placeholder]="data.PlaceHolder" [type]="\'text\'" [formControlName]="data.Value"\r\n [readonly]="data.ReadOnly" [inputmode]="\'text\'"></ion-input>\r\n </span>\r\n <app-uivalidationmessage style="flex-basis: 5%;" [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()" [ngClass]="getIon_InvalidClass(form, data)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex-basis: 35%;">\r\n <kendo-combobox [id]="data.CCValue"\r\n [data]="getItemsData()" [valueField]="itemValueField" [textField]="itemTextField"\r\n [formControlName]="data.CCValue" [valuePrimitive]="true"\r\n [placeholder]="data.CCPlaceHolder"\r\n (valueChange)="onValueChange($event)"\r\n [filterable]="!!data.HasInfiniteScroll"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (filterChange)="handleFilter($event)"\r\n (open)="handleOpen()"\r\n (close)="handleClose()"\r\n (blur)="handleBlur()"\r\n style="margin-top: 7px; width: 100%;"\r\n [loading]="isLoading">\r\n </kendo-combobox>\r\n </span>\r\n <span style="flex-basis: 60%; margin-left: 5px;" [formGroup]="form">\r\n <input kendoTextBox [id]="data.Value" [placeholder]="data.PlaceHolder" type="text"\r\n [formControlName]="data.Value" \r\n style="margin: 7px 0 0 0; width: 100%"\r\n />\r\n </span>\r\n <app-uivalidationmessage style="flex-basis: 5%;"\r\n [group]="group" [data]="data" [form]="form">\r\n </app-uivalidationmessage>\r\n </div>\r\n</ion-item>',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}"]}]}],Ee.ctorParameters=function(){return[{type:a.ResourceApiService},{type:a.WebApiService},{type:a.CacheService}]},Ee.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],selectComponent:[{type:t.ViewChild,args:["selectComponent",{static:!0}]}]};var Le=function(){function e(e,t,o){this.fieldService=e,this.resourceApiService=t,this.webApiService=o,this.qbItems={},this.componentProperties=new a.ZComponentProperties,this.currentConfig={fields:{},allowEmptyRulesets:!0},this.allowRuleset=!0,this.allowCollapse=!1,this.persistValueOnFieldChange=!1,this.isDisabled=!1,this.bootstrapClassNames={arrowIcon:"fa fa-chevron-right px-2",button:"btn",buttonGroup:"btn-group",rightAlign:"order-12 ml-auto",switchRow:"d-flex px-2",switchGroup:"d-flex align-items-center",switchRadio:"custom-control-input",switchLabel:"custom-control-label",switchControl:"custom-control custom-radio custom-control-inline",row:"row p-2 m-1",rule:"border",ruleSet:"border",invalidRuleSet:"alert alert-danger",emptyWarning:"text-danger mx-auto",operatorControl:"form-control",operatorControlSize:"col-auto pr-0",fieldControl:"form-control",fieldControlSize:"col-auto pr-0",entityControl:"form-control",entityControlSize:"col-auto pr-0",inputControl:"form-control",inputControlSize:"col-auto"},this.conditionList=["AND","OR"]}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),!0===this.data.AllowCollapse&&(this.allowCollapse=this.data.AllowCollapse),!1===this.data.AllowRuleset&&(this.allowRuleset=this.data.AllowRuleset),this.fields=this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null);try{if(this.fields.subscribe((function(t){t.forEach((function(t){var o=[];if("category"==t.Type||"multiselect"==t.Type)if(t.ValueOptions)t.ValueOptions.forEach((function(e){o.push({name:e.Name,value:e.Value})}));else{var n=t.SelectOptions,r=Object.assign({},a.DefaultPageSettingParams);r.pageSize=n.PageSize,r.columns=n.Columns,r.filters+=n.Filters,r.sortColumnName=n.SortColumnName,r.sortOrder=n.SortOrder,e.webApiService.httpPost$(e.resourceApiService.getPageUrl(n.ResourceURL),r).pipe(i.map((function(r){r.dataSet.forEach((function(e){o.push({name:e[n.Name],value:e[n.Value]})})),e.qbItems[t.Value].options=o}))).subscribe()}e.qbItems[t.Value]={name:t.Name,value:t.Value,type:t.Type,operatorList:t.Operators,options:o,nullable:t.IsNullable,defaultValue:t.DefaultValue?t.DefaultValue:null}})),e.currentConfig={fields:e.qbItems,allowEmptyRulesets:!0}})),this.data.DefaultQuery){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.DefaultQuery,this.group);t&&this.setQueryValue(t)}}catch(e){console.error("error: ",e)}},e.prototype.completeRule=function(e,t){this.isDisabled=e;var o=this.data.Type+"_"+this.data.Value;(this.group[o]=this.queryBuilder.value,t&&(this.group[o]=t),e||(this.group[o]=[]),this.group.zModel&&a.ZComponentHelper.setModelValue(this.data.Value,this.group[o],this.group),this.data.OnApplyClick&&!t)&&a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnApplyClick,this.group).bind(this)(this.group,this.group[o],this.fields)},e.prototype.getOperators=function(e,t){return this.qbItems[t.field].operatorList?this.qbItems[t.field].operatorList:e},e.prototype.getOptionList=function(e,t){return this.qbItems[t.field].options?this.qbItems[t.field].options:e},e.prototype.setQueryValue=function(e){if(e){var t=He(JSON.parse(e));this.queryCtrl=t,this.completeRule(!0,t)}},e}();function He(e){var t={};return e.condition?(t.condition=e.condition,t.rules=e.rules.map((function(e){return He(e)}))):(t.field=e.field,t.type=e.type,t.operator=e.operator,t.value=e.value instanceof Array?"date"===e.type?new Date(e.value):e.value:["date"===e.type?new Date(e.value):e.value]),t}Le.decorators=[{type:t.Component,args:[{selector:"app-zquerybuilder",template:'<ion-item *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value"\r\n *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="qbcontainer">\r\n <query-builder [(ngModel)]=\'queryCtrl\'\r\n [(config)]=\'currentConfig\'\r\n [allowRuleset]=\'allowRuleset\'\r\n [allowCollapse]=\'allowCollapse\'\r\n [persistValueOnFieldChange]=\'persistValueOnFieldChange\'>\r\n \x3c!--AND OR Swtich--\x3e\r\n <ng-container *querySwitchGroup="let ruleset; let onChange=onChange">\r\n <kendo-dropdownlist [(ngModel)]="ruleset.condition"\r\n (ngModelChange)="onChange($event, rule)"\r\n [data]="conditionList"\r\n [disabled]="isDisabled"\r\n style="text-transform: uppercase;">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--Rule RuleSet Remove Rule Set Button--\x3e\r\n <ng-container *queryButtonGroup="let ruleset; let addRule=addRule; let addRuleSet=addRuleSet; let removeRuleSet=removeRuleSet">\r\n \x3c!--Add Rule Button--\x3e\r\n <ion-button fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="addRule()"\r\n [disabled]="isDisabled"\r\n class="buttonadd">\r\n <fa-icon [icon]="\'plus\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Add</span>\r\n </ion-button>\r\n \x3c!--Add RuleSet Button--\x3e\r\n <ion-button *ngIf="addRuleSet"\r\n fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="addRuleSet()"\r\n [disabled]="isDisabled"\r\n class="buttonadd">\r\n <fa-icon [icon]="\'plus\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Add Rule Set</span>\r\n </ion-button>\r\n \x3c!--Remove RuleSet Button--\x3e\r\n <ion-button *ngIf="removeRuleSet"\r\n fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="removeRuleSet()"\r\n [disabled]="isDisabled"\r\n class="buttonremove">\r\n <fa-icon [icon]="\'times\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Remove Rule Set</span>\r\n </ion-button>\r\n </ng-container>\r\n \x3c!--Remove Rule Button--\x3e\r\n <ng-container *queryRemoveButton="let rule; let removeRule=removeRule">\r\n <ion-button fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="removeRule(rule)"\r\n [disabled]="isDisabled"\r\n class="buttonremove">\r\n <fa-icon [icon]="\'minus\'"\r\n style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Remove Rule</span>\r\n </ion-button>\r\n </ng-container>\r\n \x3c!--Name dropdown--\x3e\r\n <ng-container *queryField="let rule; let fields=fields; let onChange=onChange; let getFields=getFields">\r\n <kendo-dropdownlist [(ngModel)]="rule.field"\r\n (ngModelChange)="onChange($event, rule)"\r\n [data]="getFields(rule.entity)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [disabled]="isDisabled"\r\n style="padding-right:10px;">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--Operator dropdown--\x3e\r\n <ng-container *queryOperator="let rule; let operators=operators; let onChange=onChange" style="padding:10px">\r\n <kendo-dropdownlist [(ngModel)]="rule.operator"\r\n (ngModelChange)="onChange($event, rule)"\r\n [data]="getOperators(operators, rule)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [disabled]="isDisabled"\r\n style="padding-right:10px;">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--Text Field--\x3e\r\n <ng-container *queryInput="let rule; let field=field; type: \'string\'; let onChange=onChange">\r\n <kendo-textbox [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [clearButton]="true"\r\n [disabled]="isDisabled"\r\n class="customTextbox">\r\n </kendo-textbox>\r\n </ng-container>\r\n \x3c!--TextArea Field--\x3e\r\n <ng-container *queryInput="let rule; type: \'textarea\'; let onChange=onChange">\r\n <kendo-textarea [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [rows]="5"\r\n [cols]="40"\r\n resizable="none"\r\n [disabled]="isDisabled">\r\n </kendo-textarea>\r\n </ng-container>\r\n \x3c!--Number Field--\x3e\r\n <ng-container *queryInput="let rule; let field=field; type: \'number\'; let onChange=onChange">\r\n <kendo-numerictextbox [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [value]="value"\r\n [decimals]="0"\r\n [disabled]="isDisabled">\r\n </kendo-numerictextbox>\r\n </ng-container>\r\n \x3c!--Date Field--\x3e\r\n <ng-container *queryInput="let rule; type: \'date\'; let onChange=onChange">\r\n <kendo-datepicker [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n calendarType="classic"\r\n [value]="value"\r\n [disabled]="isDisabled">\r\n </kendo-datepicker>\r\n </ng-container>\r\n \x3c!--Category Field--\x3e\r\n <ng-container *queryInput="let rule; let options=options; type: \'category\'; let onChange=onChange">\r\n <kendo-dropdownlist [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [data]="getOptionList(options, rule)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [disabled]="isDisabled">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--DropDown MultiSelect Field--\x3e\r\n <ng-container *queryInput="let rule; let options=options; type: \'multiselect\'; let onChange=onChange">\r\n <kendo-multiselect [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [data]="getOptionList(options, rule)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [autoClose]="false"\r\n style="width:30%"\r\n [disabled]="isDisabled">\r\n </kendo-multiselect>\r\n </ng-container>\r\n \x3c!--Boolean Field--\x3e\r\n <ng-container *queryInput="let rule; type: \'boolean\'; let onChange=onChange">\r\n <input type="checkbox"\r\n [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n class="customCheckBox"\r\n [disabled]="isDisabled"\r\n kendoCheckBox />\r\n </ng-container>\r\n </query-builder>\r\n <br>\r\n <div *ngIf="data.ShowQueryResult">\r\n <div>\r\n <label>Query Result</label>\r\n </div>\r\n <textarea class="output"\r\n resizable="none"\r\n [rows]="10"\r\n [cols]="40">{{queryCtrl | json}}</textarea>\r\n <br>\r\n </div>\r\n <div style="width:100%" slot="end">\r\n <ion-button *ngIf="!isDisabled"\r\n strong="false"\r\n (click)="completeRule(true, null)"\r\n class="buttonapply">\r\n <fa-icon [icon]="\'save\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Apply</span>\r\n </ion-button>\r\n <ion-button *ngIf="isDisabled"\r\n strong="false"\r\n (click)="completeRule(false, null)"\r\n class="buttonapply">\r\n <fa-icon [icon]="\'save\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Undo Apply</span>\r\n </ion-button>\r\n </div>\r\n </div>\r\n</ion-item>\r\n',styles:[".qbcontainer{border-radius:5px;border:1px solid rgba(0,0,0,.08);padding:10px;margin:10px 0;width:100%}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}:host ::ng-deep query-builder .k-dropdown .k-dropdown-wrap,:host ::ng-deep query-builder .k-dropdowntree .k-dropdown-wrap{background-color:#fff}:host ::ng-deep query-builder .customTextbox{width:calc(100% - 440px);min-width:230px}:host ::ng-deep query-builder .customCheckBox{width:27px;height:27px}:host ::ng-deep query-builder .buttonadd{background-color:#479400;color:#fff;border-color:#479400}:host ::ng-deep query-builder .buttonremove{background-color:#f04141;color:#fff;border-color:#f04141;margin-top:0}.buttonapply{background-color:#5596e6;color:#fff;border-color:#5596e6}"]}]}],Le.ctorParameters=function(){return[{type:a.FieldService},{type:a.ResourceApiService},{type:a.WebApiService}]},Le.propDecorators={queryBuilder:[{type:t.ViewChild,args:[m.QueryBuilderComponent,{static:!1}]}],classNames:[{type:t.Input}],data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ze=function(){function e(e){var t;this.resourceApiService=e,this.componentProperties=new a.ZComponentProperties,this.title="Report Viewer",this.viewerContainerStyle=((t={position:"relative",width:"100%",height:"800px"})["font-family"]="ms sans serif",t),this.resourceURL=null,this.ReportSource=null,this.isVisible=!0,this.paramToResizeReportViewer=!1}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.resizeReportView=this.onPageReady.bind(this),this.resourceURL=this.resourceApiService.getURL(this.data.ResourceURL),this.resourceURL||(this.resourceURL=this.resourceApiService.getURL("e1wfs_wfm_workflowMasterReportURL")),this.data.IsAutoGenerateReport&&(this.ReportSource=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReportSource))},e.prototype.generateReport=function(){var e=this.group.ReportSource;this.resourceURL=e.url,this.viewer.setReportSource(e),this.viewer.refreshReport(),this.data.AutoResize?this.paramToResizeReportViewer=!0:this.paramToResizeReportViewer=!1;$("#trv-main-menu-export-command").on("mouseover",(function(){setTimeout((function(){}),300)}))},e.prototype.ready=function(e){},e.prototype.viewerToolTipOpening=function(e){},e.prototype.onRenderingEnd=function(e,t){},e.prototype.exportBegin=function(e){},e.prototype.exportEnd=function(e){},e.prototype.onPageReady=function(e,t){if(this.paramToResizeReportViewer){var o=$(".trv-pages-area .trv-page-wrapper").height()+$(".trv-nav").outerHeight()+20,n=$("#reportViewer1");if(n.height()!==o){n.height(o);var r=$(".trv-document-map-splitter").data("kendoSplitter");void 0!==r&&r.resize(!0);var i=$(".trv-parameters-splitter").data("kendoSplitter");void 0!==i&&i.resize(!0)}}},e}();Ze.decorators=[{type:t.Component,args:[{selector:"app-zreport",template:'<div *ngIf="isVisible" width="100%" height="800px">\r\n <tr-viewer #ReportViewer\r\n [containerStyle]="viewerContainerStyle"\r\n [serviceUrl]="resourceURL"\r\n [reportSource]="ReportSource"\r\n [viewMode]="\'INTERACTIVE\'"\r\n [scaleMode]="\'SPECIFIC\'"\r\n [pageMode]="\'SINGLE_PAGE\'"\r\n [scale]="1.0"\r\n [ready]="ready(this)"\r\n [exportBegin]="exportBegin(this)"\r\n [exportEnd]="exportEnd(this)"\r\n [viewerToolTipOpening]="viewerToolTipOpening"\r\n [enableAccessibility]="false"\r\n [pageReady] = "resizeReportView()"\r\n [renderingEnd]="onRenderingEnd">\r\n </tr-viewer>\r\n</div>\r\n',encapsulation:t.ViewEncapsulation.None,styles:[""]}]}],Ze.ctorParameters=function(){return[{type:a.ResourceApiService}]},Ze.propDecorators={viewer:[{type:t.ViewChild,args:["ReportViewer"]}],data:[{type:t.Input}],group:[{type:t.Input}]};var Ge=function(){function e(e,t,o){var n=this;this.changeDetector=e,this.storageService=t,this.authService=o,this.isLoading=!0,this.events=[],this.selectedDate=new Date,this.local={inProgress:!1,ctrlScope:null},this.selectedViewIndex=3,this.componentProperties=new a.ZComponentProperties,this.getEventStyles=function(e){if(e&&e.event&&e.event.dataItem){var t=e.event.dataItem.backgroundColor,o=e.event.dataItem.borderColor;return t&&o?{backgroundColor:t,bordercolor:o,color:"white"}:{backgroundColor:"#ff7c73",bordercolor:"#ff7c73",color:"white"}}},this.getSlotClass=function(e){e.start.getHours();return e.resources=n.events,{args:e}},this.setData=function(e){n.selectedViewIndex=e||n.selectedViewIndex,n.getItems()},this.setEnable=function(e){n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.local.ctrlScope=this.group.ctrlScope,this.data.SaveFilter&&(this.setSchedulerSessionKey(this.group),this.getSchedulerSessionFilter(this.group)),this.getItems()},e.prototype.ngAfterViewInit=function(){},e.prototype.getItems=function(){var e=this.data.Value;if(Array.isArray(e))return e;var t=a.ZComponentHelper.getGroupEvalValue.call(this,e);if(!t)return console.warn("Invalid field.Value setting ",this.data.Value),[];this.events=t,this.events&&(this.isLoading=!1)},e.prototype.onDateChange=function(e){this.local.inProgress||(this.group.selectedDate=e.selectedDate,console.log("zschedule component date-change selection: ",e.dateRange),this.group.subject.next({type:"zscheduler-onDateChange",target:this.data.CalendarOptions+".dateClick",event:e.dateRange}),this.changeDetector.detectChanges())},e.prototype.onSlotDblClick=function(e){var t=this,o=e.sender,n=e.start,a=e.end,l=e.isAllDay;console.log("zscheduler component slot-double-click: ",o,n,a,l),"month"!==o.selectedView.name&&"week"!==o.selectedView.name||(this.local.inProgress=!0,this.selectedViewIndex=3,this.selectedDate=n,r.of([]).pipe(i.take(1),i.delay(1e3)).subscribe((function(){return t.local.inProgress=!1})))},e.prototype.onEventDblClick=function(e){var t=e.sender,o=e.event;if(console.log("zscheduler component event-double-click: ",t,o),this.data.OnItemClick){this.beforeSchedulerGetData(this.group),this.setSchedulerSessionFilter(this.group);var n=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);"function"==typeof n&&n.bind(this.group.ctrlScope)(o)}else;},e.prototype.setSchedulerSessionKey=function(e){e.SchedulerStorageKey||(e.SchedulerStorageKey="zgrid_"+e.resourceURL+"_"+this.data.Value+"::"+this.authService.e1Token.userName)},e.prototype.beforeSchedulerGetData=function(e){return console.warn("beforeDateRangeBinding triggered"),e.beforeSchedulerGetData?e.beforeSchedulerGetData(e):(console.warn("group.beforeDateRangeBinding is undefined"),r.of(!0))},e.prototype.setSchedulerSessionFilter=function(e){return q(this,void 0,void 0,(function(){var t,o;return _(this,(function(n){return e.SchedulerStorageKey?(t=e.SchedulerStorageKey,o={},e&&this.storageService&&this.data.SaveFilter&&(o={SelectedDate:JSON.stringify(e.selectedDate)},this.storageService.set(t,JSON.stringify(o))),[2]):[2,null]}))}))},e.prototype.getSchedulerSessionFilter=function(e){return q(this,void 0,void 0,(function(){var t,o=this;return _(this,(function(n){switch(n.label){case 0:return e.SchedulerStorageKey?(t=e.SchedulerStorageKey,this.storageService?[4,this.storageService.get(t).then((function(e){if(e&&e.value&&"null"!==e.value){var t=JSON.parse(e.value);return o.selectedDate=new Date(JSON.parse(t.SelectedDate)),e}return null}))]:[3,2]):[2,null];case 1:return n.sent(),[3,3];case 2:return[2,null];case 3:return[2]}}))}))},e}();Ge.decorators=[{type:t.Component,args:[{selector:"app-zscheduler",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <kendo-scheduler *ngIf="!isLoading" [kendoSchedulerBinding]="events" [selectedDate]="selectedDate" (dateChange)="onDateChange($event)"\r\n [selectedViewIndex]="selectedViewIndex" [eventStyles]="getEventStyles" [slotClass]="getSlotClass" \r\n (slotDblClick)="onSlotDblClick($event)" (eventDblClick)="onEventDblClick($event)" scrollTime="08:00"\r\n [style.height]="(!!data.Height ? [data.Height] : \'600px\')">\r\n \x3c!-- [style.font-size]="(!!data.FontSize ? [data.FontSize] : \'12px\')"> --\x3e\r\n \r\n \x3c!--Note: line-height same with [eventHeight]--\x3e\r\n <ng-template kendoSchedulerEventTemplate let-event>\r\n <span style="margin-left: -5px;line-height: 25px;">{{ event.title }}</span>\r\n </ng-template>\r\n\r\n <ng-template kendoSchedulerToolbarTemplate let-selectedDate="selectedDate">\r\n <zschedulertoolbar [local]="local" [selectedDate]="selectedDate">\r\n </zschedulertoolbar>\r\n <ul kendoSchedulerToolbarViewSelector></ul>\r\n </ng-template>\r\n\r\n <ng-template kendoSchedulerAllDaySlotTemplate let-date="date">\r\n <strong>{{ date | kendoDate: \'dd-MMM-yyyy\' }}</strong>\r\n </ng-template>\r\n <ng-template kendoSchedulerDateHeaderTemplate let-date="date">\r\n <strong>{{ date | kendoDate: "ccc" }}</strong>\r\n </ng-template>\r\n\r\n \r\n \x3c!-- <kendo-scheduler-day-view startTime="08:00">\r\n </kendo-scheduler-day-view>\r\n\r\n <kendo-scheduler-week-view startTime="08:00">\r\n </kendo-scheduler-week-view> --\x3e\r\n\r\n <kendo-scheduler-day-view>\r\n </kendo-scheduler-day-view>\r\n\r\n <kendo-scheduler-week-view>\r\n </kendo-scheduler-week-view>\r\n\r\n <kendo-scheduler-month-view [eventHeight]="25"> \r\n </kendo-scheduler-month-view>\r\n\r\n \x3c!-- <kendo-scheduler-timeline-view>\r\n </kendo-scheduler-timeline-view> --\x3e\r\n\r\n <kendo-scheduler-agenda-view>\r\n </kendo-scheduler-agenda-view>\r\n </kendo-scheduler>\r\n\r\n</ion-item>',styles:["ion-item{--padding-start:0px;--inner-padding-end:0px}"]}]}],Ge.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:a.StorageSessionService},{type:a.AuthService}]},Ge.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],ngStyle:[{type:t.Input}]};var Be=function(){function e(e,t,o){var n=this;this.resourceApiService=e,this.webApiService=t,this.cacheService=o,this.showTooltipsInfoIcon=!1,this.showTooltipsInfoBySide=!1,this.tooltipsInfo=null,this.tooltipsDisplayText=null,this.items=[],this.infinitezData=[],this.infiniteSearchText=null,this.toggleSelectable=!0,this.itemValueField=null,this.itemTextField=null,this.itemDataField=null,this.itemTemplate="{{item[itemTextField]}}",this.infiniteScrollPageNo=0,this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.allowCustomValue=!1,this.autoClose=!0,this.dataInfo={itemsResourceURL:"",optionFilters:"",totalCount:0},this.virtual={itemHeight:28,pageSize:15},this.setEnable=function(e){var t=n.group.form.controls[n.data.Value];e?t.enable():t.disable(),n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnDestroy=function(){this.debounceSub&&this.debounceSub.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.isLoading=!0,a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setSelectMultipleTextValue(this.data.SelectOptions,this),this.tooltipsInfo=this.data.TooltipsInfo,this.tooltipsInfo&&(null==this.tooltipsInfo.Icon&&null==this.tooltipsInfo.Icon||this.isMobileScreen()||(this.showTooltipsInfoIcon=!0,this.setTooltipsInfoIcon()),this.tooltipsInfo.SideBySide&&(this.showTooltipsInfoBySide=!0),this.setTooltipsDisplayText()),!1===this.data.AutoClose&&(this.autoClose=this.data.AutoClose),this.iconList=this.data.ClickableIcons,this.iconList&&this.iconList.length>0&&this.iconList.forEach((function(t){void 0===t.Tooltip?t.Tooltip="":t.Tooltip=a.ZComponentHelper.getGroupEvalValue.call(e,t.Tooltip),void 0===t.Position&&(t.Position="top")})),this.buttonList=this.data.ButtonList,this.buttonList&&this.buttonList.forEach((function(t){t.tooltip&&(t.tooltip=a.ZComponentHelper.getGroupEvalValue.call(e,t.tooltip))})),this.allowCustomValue=this.data.AllowCustomValue||!1;var t=this.data.Value,o=this.data,n=this.group.zModel;if(o.HasInfiniteScroll&&o.InfiniteScroll$){var r=null;n&&n[t]&&(r=n[t].toString());var i=a.ZComponentHelper.getInfiniteData(null,"",this,r);i?i.subscribe((function(t){console.log(o.Name," - initial zData load: ",t),e.group&&e.group.afterLoadzDataOptions&&e.group.afterLoadzDataOptions(e.group),e.isLoading=!1})):this.isLoading=!1,a.ZComponentHelper.isMobileScreen()||this.handleFilter(null,!0)}else{var l=a.ZComponentHelper.getGroupEvalValue.call(this,o.IsRequired);if(this.data.OptionResourceURL)this.lazyLoadDataOptions().subscribe((function(o){var r=o.dataSet?o.dataSet:o;r&&1===r.length&&!e.data.DisableAutoFirstSelection&&e.autoSelectFirstOption(l,r[0],t,n.Id),e.group&&e.group.afterLoadzDataOptions&&e.group.afterLoadzDataOptions(e.group),e.isLoading=!1}));else{var s=a.ZComponentHelper.getGroupEvalValue.call(this,this.itemDataField);if(s&&1===s.length&&!this.data.DisableAutoFirstSelection){var p=this;setTimeout((function(){p.autoSelectFirstOption(l,s[0],t,p.group.zModel.Id),this.group&&this.group.afterLoadzDataOptions&&this.group.afterLoadzDataOptions(this.group)}),100)}this.isLoading=!1}}},e.prototype.autoSelectFirstOption=function(e,t,o,n){var r;if(a.ZComponentHelper.isNullUndefinedEmpty(n)&&e){var i=t.Id;this.data.Multiple&&(i=[i]),a.ZComponentHelper.setModelValue(o,i,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:(r={},r.value=i,r.field=this.data,r)}),this.form.markAsPristine()}},e.prototype.lazyLoadDataOptions=function(){var e=this.resourceApiService.getURL(this.data.OptionResourceURL),t=new a.ZSelectPostApiParams;return t.sorts=this.data.OptionSort,t.columns=this.data.OptionColumns,t.filters=this.data.OptionFilter,a.ZComponentHelper.getDataOptions(this.data.OptionName,t,this.group,e,this.cacheService,this.webApiService,this.data.DisableCache)},e.prototype.getInfiniteData=function(e){a.ZComponentHelper.getInfiniteData(e.component,e.text,this)},e.prototype.getItemsData=function(){if(this.data.HasInfiniteScroll)return this.infinitezData;var e=this.data.OptionName||this.itemDataField||"group.zData."+this.data.Name;return Array.isArray(this.data.SelectOptions)&&!this.group.zData[e.slice(12)]&&(this.group.zData[e.slice(12)]=this.data.SelectOptions,this.itemDataField=e),e.startsWith("zData.")?this.group.zData[e.slice(6)]||[]:e.startsWith("group.zData.")?this.group.zData[e.slice(12)]||[]:e.startsWith("group.")?this.group[e.slice(6)]||[]:e?this.group[e]||[]:void console.warn(this.data.Name," - Invalid setting for OptionName: ",e)},e.prototype.onSearch=function(e){var t=e.component;if(t&&(t.startSearch(),t.enableInfiniteScroll()),this.data.HasInfiniteScroll)null!==e.text&&e.text!==this.infiniteSearchText&&(this.infiniteScrollPageNo=0,this.modelzData=[]),this.getInfiniteData(e);else{this.infiniteScrollPageNo=0,t&&(t.items=[]);var o={referId:null,pageNo:0,pageSize:20,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:""},n=this.data.SearchFields?this.data.SearchFields:this.itemTextField,r=a.ZComponentHelper.filterSearchItems(this.getItemsData(),e.text,n,o.pageNo,o.pageSize);if(t){var i=t.items.concat(r);t.items=i,t.endInfiniteScroll(),t.endSearch(),this.isLoading=!1}}},e.prototype.handleFilter=function(e,t){var o=this;this.debounceSub&&this.debounceSub.unsubscribe(),this.debounceSub=r.of([]).pipe(i.delay(500)).subscribe((function(){o.isLoading=!0,o.onSearch({component:null,text:e}),o.group&&o.group.afterLoadzDataOptions&&o.group.afterLoadzDataOptions(o.group)}))},e.prototype.handleOpen=function(){this.data.HasInfiniteScroll&&this.handleFilter(null)},e.prototype.handleClose=function(){},e.prototype.handleBlur=function(){},e.prototype.getItemTemplate=function(e,t,o,n,r){return this.data.ItemTemplate?a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ItemTemplate)({item:e,data:t,group:o,itemValueField:n,itemTextField:r}):r?e[r]:Object.values(e).join(", ")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e.bind(this.group.ctrlScope)(this.group):e},e.prototype.getIsRequiredValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.IsRequired);return"function"==typeof e?e.bind(this.group.ctrlScope)(this.group):e},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(e,t)},e.prototype.getClass=function(e,t){var o=this.getIon_InvalidClass(e,t);return(o||"")+" "+this.data.Class},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.onAddItem=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnAddItem);if("function"==typeof t)return t.bind(this.group.ctrlScope)();console.warn("Invalid declaration of OnAddItem: ",t)},e.prototype.clearData=function(){a.ZComponentHelper.setModelValue(this.data.Value,"",this.group)},e.prototype.clearItems=function(){this.selectComponent.clear(),this.selectComponent.close()},e.prototype.confirmItems=function(){this.selectComponent.confirm(),this.selectComponent.close()},e.prototype.toggleItems=function(){this.selectComponent.toggleItems(this.toggleSelectable),this.toggleSelectable=!this.toggleSelectable},e.prototype.onIconClick=function(e){this.onNavigateTo(e)},e.prototype.onNavigateTo=function(e){a.ZComponentHelper.getGroupEvalValue.call(this,e)&&this.group.subject.next({type:"ztext-onNavigateTo",target:e,data:this.group.zModel[this.data.Value]})},e.prototype.disableOpenOnFocus=function(e){return this.data.DisableOpenOnFocus?null:e},e.prototype.onChangeEvent=function(e){if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$){this.itemTextField.toString();var t=this.itemValueField.toString(),o=[];e&&(o=this.infinitezData.filter((function(o){return o[t]===e})),this.modelzData=o.slice()),this.itemDataField.startsWith("group.zData.")?this.group.zData[this.itemDataField.slice(12)]=o:this.itemDataField.startsWith("group.")&&(this.group[this.itemDataField.slice(6)]=o)}this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:{value:e,field:this.data}})},e.prototype.onValueChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.onChangeEvent(e)},e.prototype.onChange=function(e){console.log("zselectmultiple (onChange): ",e.value),a.ZComponentHelper.setModelValue(this.data.Value,e.value,this.group);var t=this.form.controls[this.data.Value];this.handleClose(),!this.getIsRequiredValue()||null!==e.value&&0!==e.value.length?t.setErrors(null):t.setErrors({required:!0}),this.onChangeEvent(e.value)},e.prototype.setLabelText=function(e){this.data.Label=e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.setTooltipsInfoClass=function(){return this.tooltipsInfo&&!this.showTooltipsInfoIcon&&this.showTooltipsInfoBySide?"tooltipsinfo-text":"tooltipsinfo-text-wide"},e.prototype.setTooltipsInfoColor=function(){return this.tooltipsInfo&&this.tooltipsInfo.TextColor?this.tooltipsInfo.TextColor:"#acacac"},e.prototype.setTooltipsInfoIcon=function(e){this.showTooltipsInfoIcon&&(""!=this.tooltipsInfo.Icon?this.tooltipsDisplayIcon=e||this.tooltipsInfo.Icon:this.tooltipsDisplayIcon="question-circle")},e.prototype.setTooltipsDisplayText=function(e){this.tooltipsInfo?this.tooltipsDisplayText=e||this.tooltipsInfo.DisplayText:this.tooltipsDisplayText="<Display text error>"},e.prototype.setTooltipsInfoSideBySide=function(){return this.tooltipsInfo&&this.showTooltipsInfoBySide&&!this.showTooltipsInfoIcon?"ion-row divselectmultiple tooltipsinfo-right":"ion-row divselectmultiple"},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e}();Be.decorators=[{type:t.Component,args:[{selector:"app-zselectmultiple",template:'<ion-item [ngClass]="getClass(form, data)" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()">\r\n\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="componentProperties.isRequired" color="danger">*</ion-text>\r\n </ion-label>\r\n\r\n <kendo-label *ngIf="data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n <div [class]="setTooltipsInfoSideBySide()" *ngIf="!isLoading">\r\n <div style="flex-grow: 1;">\r\n <ionic-selectable #selectComponent item-content\r\n searchFailText="Nothing found :("\r\n headerColor="primary"\r\n clearButtonText="Clear"\r\n [(ngModel)]="group.zModel[data.Value]"\r\n [id]="data.Value"\r\n [items]="getItemsData()"\r\n [itemValueField]="itemValueField"\r\n [itemTextField]="itemTextField"\r\n [canAddItem]="!!data.OnAddItem"\r\n [canClear]="true"\r\n [placeholder]="data.PlaceHolder"\r\n [canSearch]="!data[\'disable-search\']"\r\n [shouldFocusSearchbar]="!data[\'disable-search\']"\r\n [hasInfiniteScroll]="!!data.HasInfiniteScroll"\r\n [isMultiple]="data.Multiple"\r\n [isEnabled]="!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [shouldStoreItemValue]="true"\r\n (onSearch)="onSearch($event)"\r\n (onInfiniteScroll)="getInfiniteData($event)"\r\n (onAddItem)="onAddItem($event)"\r\n (onChange)="onChange($event)">\r\n\r\n <ng-template ionicSelectableItemIconTemplate\r\n let-item="item"\r\n let-isItemSelected="isItemSelected">\r\n <fa-icon slot="start"\r\n class="isItemSelected"\r\n size="sm"\r\n [icon]="[\'far\', isItemSelected ? \'check-circle\': \'circle\']"\r\n [styles]="{\'color\': isItemSelected ? \'dodgerBlue\' : \'lightGray\'}"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n \x3c!-- <ion-icon name="close-circle"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times-circle\'" size="md"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf="getIsRequiredValue()" color="danger">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item="item">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <ng-template zselectitemelement [item]="item"></ng-template> --\x3e\r\n </ng-template>\r\n\r\n \x3c!--<ng-template ionicSelectableFooterTemplate>\r\n <ion-toolbar>\r\n <ion-row>\r\n <ion-col>\r\n <ion-button expand="full" ng-reflect-disabled="false" ng-reflect-expand="full" class="button button-full button-solid ion-activatable ion-focusable hydrated" (click)="clearItems()">\r\n Clear\r\n </ion-button>\r\n </ion-col>\r\n <ion-col>\r\n <ion-button expand="full" ng-reflect-disabled="false" ng-reflect-expand="full" class="button button-full button-solid ion-activatable ion-focusable hydrated" (click)="confirmItems()">\r\n OK\r\n </ion-button>\r\n </ion-col>\r\n </ion-row>\r\n </ion-toolbar>\r\n </ng-template>--\x3e\r\n </ionic-selectable>\r\n </div>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n \x3c!-- side by side and desktop tooltipsinfo --\x3e\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon && showTooltipsInfoBySide"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n\r\n<ion-item [ngClass]="getClass(form, data)" [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n <span kendoTooltip\r\n *ngIf="data.TooltipsInfo && showTooltipsInfoIcon"\r\n [title]="tooltipsDisplayText">\r\n <fa-icon [icon]="tooltipsDisplayIcon"\r\n class="tooltipsinfo-icon">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n \x3c!-- mobile tooltipsinfo below label--\x3e\r\n <div [class]="setTooltipsInfoSideBySide()">\r\n <div style="flex: 1;">\r\n <kendo-combobox *ngIf="!data.Multiple"\r\n #comboboxComponent\r\n [data]="getItemsData()"\r\n [valueField]="itemValueField"\r\n [textField]="itemTextField"\r\n [formControlName]="data.Value"\r\n [valuePrimitive]="true"\r\n [placeholder]="data.PlaceHolder"\r\n [allowCustom]="allowCustomValue"\r\n [suggest]="true"\r\n [filterable]="!!data.HasInfiniteScroll"\r\n [openOnFocus]="disableOpenOnFocus(comboboxComponent)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n [loading]="isLoading"\r\n (valueChange)="onValueChange($event)"\r\n (filterChange)="handleFilter($event)"\r\n [virtual]="virtual"\r\n (open)="handleOpen()"\r\n (close)="handleClose()"\r\n (blur)="handleBlur()"\r\n style="margin-top: 7px; width: 100%;">\r\n <ng-template kendoComboBoxItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <span class="template">{{ dataItem.value }}</span> {{ dataItem.text }} --\x3e\r\n </ng-template>\r\n <ng-template kendoTextBoxSuffixTemplate>\r\n\r\n \x3c!-- For Validation feature --\x3e\r\n <app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"\r\n class="validation-icon"></app-uivalidationmessage>\r\n </ng-template>\r\n </kendo-combobox>\r\n <kendo-multiselect *ngIf="data.Multiple"\r\n [data]="getItemsData()"\r\n [valueField]="itemValueField"\r\n [textField]="itemTextField"\r\n [formControlName]="data.Value"\r\n [valuePrimitive]="true"\r\n [placeholder]="data.PlaceHolder"\r\n [allowCustom]="allowCustomValue"\r\n [filterable]="!!data.HasInfiniteScroll"\r\n [checkboxes]="data.EnableCheckbox"\r\n [loading]="isLoading"\r\n [autoClose]="autoClose"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n (valueChange)="onValueChange($event)"\r\n (filterChange)="handleFilter($event)"\r\n (open)="handleOpen()"\r\n (close)="handleClose()"\r\n (blur)="handleBlur()"\r\n style="margin-top: 7px; width: 100%;">\r\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <span class="template">{{ dataItem.value }}</span> {{ dataItem.text }} --\x3e\r\n </ng-template>\r\n </kendo-multiselect>\r\n </div>\r\n\r\n <div *ngFor="let item of iconList">\r\n <div kendoTooltip style="text-align: center; padding-top: 10px;"\r\n showOn="hover"\r\n [tooltipWidth]="item.Width"\r\n [position]="item.Position">\r\n <span *ngIf="!!item && item.Color"\r\n (click)="onIconClick(item.Click)"\r\n [title]="item.Tooltip"\r\n style="margin-top: 10px;">\r\n <fa-icon [icon]="item.Icon"\r\n [ngStyle]="{\'padding\': \'4px 6px\', \'color\': (item.Color ? item.Color : \'black\')}"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <ion-button *ngFor="let button of buttonList; let i = button"\r\n fill="outline"\r\n color="dark"\r\n size="small"\r\n strong="false"\r\n class="button-container"\r\n style="margin-top: 7px;"\r\n (click)="onIconClick(button.click)"\r\n [hidden]="!button.visible"\r\n [disabled]="group.isTriggered || button.disabled">\r\n <fa-icon *ngIf="button.icon" [icon]="getFontAwesome(button.icon)" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">{{ button.text }}</span>\r\n </ion-button>\r\n\r\n <app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"></app-uivalidationmessage>\r\n\r\n \x3c!-- side by side and desktop tooltipsinfo --\x3e\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n\r\n </div>\r\n</ion-item>\r\n',styles:["fa-icon.isItemSelected{display:inline-block;width:1em;height:1em;contain:strict;fill:currentcolor;box-sizing:initial!important;font-size:20px;margin-top:10px;margin-bottom:14px;margin-right:unset;margin-inline-end:20px}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divselectmultiple{justify-content:space-between;width:100%;color:#000}.tooltipsinfo-text{margin-left:5px}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:1.2fr .05fr 1fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]}]}],Be.ctorParameters=function(){return[{type:a.ResourceApiService},{type:a.WebApiService},{type:a.CacheService}]},Be.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],iconList:[{type:t.Input}],buttonList:[{type:t.Input}],selectComponent:[{type:t.ViewChild,args:["selectComponent"]}]};var je=function(){function e(e){var t=this;this.authService=e,this.state={lastSelectedTabIndex:0,currentTabs:Array(),allTabs:Array()},this.componentProperties=new a.ZComponentProperties,this.selectTab=function(e){t.state.lastSelectedTabIndex=e},this.setTabsVisible=function(e,o){t.state.allTabs.length<=Math.max.apply(null,e)||Math.min.apply(null,e)<0?console.log("Invalid Tab index : "+e.join(",")):(e.forEach((function(e){t.state.allTabs[e].Visible=o})),t.refreshCurrentTabs())},this.setTabCounter=function(e,o){(t.data.Label?t.data.Label:t.data.TabItems).length<=e||e<0?console.log("Invalid Tab index : "+e):t.state.currentTabs[e].Counter=o},this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.data,this.authService),this.setCurrentTabs(),this.restoreTabSelection()},e.prototype.setCurrentTabs=function(){var e,t;if(this.state.currentTabs=new Array,Array.isArray(this.data.Label)){var o=!1;for(var n in this.data.Icon&&Array.isArray(this.data.Icon)&&this.data.Icon.length===this.data.Label.length&&(o=!0),this.data.Label)this.state.currentTabs.push({Label:this.data.Label[n],Icon:o?this.data.Icon[n]:null,Visible:!0,Index:parseInt(n)});this.state.allTabs=this.state.currentTabs,this.data.TabVisibleFalseIndex&&this.setTabsVisible(this.data.TabVisibleFalseIndex,!1)}else if(this.data.TabItems){var r=0;try{for(var i=U(this.data.TabItems),l=i.next();!l.done;l=i.next()){var s=l.value;this.state.currentTabs.push({Label:s.Label,Icon:s.Icon?s.Icon:null,Visible:a.ZComponentHelper.getGroupValue(s.Visible,this.group),Counter:"string"==typeof s.Counter?a.ZComponentHelper.getGroupValue(s.Counter,this.group):s.Counter,Index:r++})}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.state.allTabs=this.state.currentTabs}},e.prototype.refreshCurrentTabs=function(){var e=this,t=this.state.allTabs;if(Array.isArray(this.data.Label)){this.state.currentTabs=new Array;var o=!1;this.data.Icon&&Array.isArray(this.data.Icon)&&this.data.Icon.length===this.data.Label.length&&(o=!0);var n=function(n){var i=t.filter((function(t){return t.Label==e.data.Label[n]}));i.length>0&&i[0].Visible&&r.state.currentTabs.push({Label:r.data.Label[n],Icon:o?r.data.Icon[n]:null,Visible:!0,Index:parseInt(n)})},r=this;for(var i in this.data.Label)n(i)}else Object.assign(this.state.currentTabs,this.state.allTabs)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.getSelectedTab=function(e){return this.state.lastSelectedTabIndex===e},e.prototype.setSelectTab=function(e){this.state.lastSelectedTabIndex=e},e.prototype.restoreTabSelection=function(){if(!1!==this.data.AllowSaveState){var e="tabSelections"in this.group?this.group.tabSelections:null;null!==e&&e.has(this.data.Name)?this.state.lastSelectedTabIndex=e.get(this.data.Name):null===e?(e=new Map,this.group.tabSelections=e,e.set(this.data.Name,0)):e.has(this.data.Name)||e.set(this.data.Name,0)}},e.prototype.onTabSelect=function(e){this.state.lastSelectedTabIndex=e.index,this.saveState(e);var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ClickEvent);"function"==typeof t&&t.bind(this.group.ctrlScope)(e)},e.prototype.saveState=function(e){!1!==this.data.AllowSaveState&&this.group.tabSelections.set(this.data.Name,e.index)},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e}();je.decorators=[{type:t.Component,args:[{selector:"app-ztab",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="margin: 10px 0 6px 0;"> \r\n <kendo-tabstrip #kendoTabStripInstance [keepTabContent]="true" (tabSelect)="onTabSelect($event)">\r\n <kendo-tabstrip-tab *ngFor="let tab of state.currentTabs; let i = index" [selected]="getSelectedTab(i)" [disabled]="!tab.Visible">\r\n <ng-template kendoTabTitle *ngIf="tab.Visible" >\r\n <fa-icon *ngIf="!!tab.Icon" [icon]="getFontAwesome(tab.Icon)" style="padding-right: 5px;"></fa-icon>\r\n {{tab.Label}}\r\n <ion-badge class="tab-item-counter" color="danger" *ngIf="!!tab.Counter">{{tab.Counter}}</ion-badge>\r\n </ng-template>\r\n <ng-template kendoTabContent> \r\n <div class="ion-row">\r\n <app-zformcontrol \r\n [ngClass]="group[field.isVisibleField] ? field.DivClass : \r\n ((field.Visible === true) ? field.DivClass : \'flex-hide\')" \r\n *ngFor="let field of data.Value | tabfilter: tab.Index + \'\'"\r\n [field]="field" [group]="group" [form]="form" id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </ng-template>\r\n </kendo-tabstrip-tab>\r\n </kendo-tabstrip>\r\n</div>',styles:[".tab-item-counter{margin-left:4px}"]}]}],je.ctorParameters=function(){return[{type:a.AuthService}]},je.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],tabstrip:[{type:t.ViewChild,args:["kendoTabStripInstance"]}]};var qe=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.showTooltipsInfoIcon=!1,this.showTooltipsInfoBySide=!1,this.tooltipsInfo=null,this.tooltipsDisplayText=null,this.clearButtonIcon="time-circle",this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.adornmentList=this.data.AdornmentList,this.data.OnClick&&!this.data.ReadOnly&&(this.componentProperties.isReadOnly=!0),this.componentProperties.isReadOnly||(this.showClearButton=this.data.ClearButton),this.tooltipsInfo=this.data.TooltipsInfo,this.tooltipsInfo&&(null==this.tooltipsInfo.Icon&&null==this.tooltipsInfo.Icon||this.isMobileScreen()||(this.showTooltipsInfoIcon=!0,this.setTooltipsInfoIcon()),this.tooltipsInfo.SideBySide&&(this.showTooltipsInfoBySide=!0),this.setTooltipsDisplayText()),this.iconList=this.data.ClickableIcons,this.iconList&&this.iconList.length>0&&this.iconList.forEach((function(t){void 0===t.Tooltip?t.Tooltip="":-1!==t.Tooltip.indexOf("group.")&&(t.Tooltip=a.ZComponentHelper.getGroupEvalValue.call(e,t.Tooltip)),void 0===t.Position&&(t.Position="top")}))},e.prototype.mapInputType=function(e){switch(e){case"date":return"date";case"ztext":return"text";case"number":case"currency":return"number";case"email":return"email";case"password":return"password";case"search":return"search";case"tel":return"tel";case"text":return"text";case"time":return"time";case"url":return"url";default:return"text"}},e.prototype.mapInputMode=function(e){switch(e){case"date":return"none";case"ztext":return"text";case"number":case"currency":return"decimal";case"email":return"email";case"password":return"text";case"search":return"search";case"tel":return"tel";case"text":return"text";case"time":return"none";case"url":return"url";default:return"text"}},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getStyle=function(e){var t="";return t+=e?"right":"left"},e.prototype.setTextboxClass=function(){return this.data.OnClick&&!this.data.ReadOnly?"notmobile-textbox-onfocus":"notmobile-textbox"},e.prototype.textboxOnClick=function(){this.group.subject.next({type:"ztext-OnClick",target:this.data.OnClick,event:event,data:{value:event.OnClick,field:this.data}})},e.prototype.onChange=function(e){a.ZComponentHelper.setComponentModelValue(this.data,e.target.value,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,event:e,data:{value:e.data,field:this.data}})},e.prototype.onIconClick=function(e){this.onNavigateTo(e)},e.prototype.onNavigateTo=function(e){a.ZComponentHelper.getGroupEvalValue.call(this,e)&&this.group.subject.next({type:"ztext-onNavigateTo",target:e,data:this.group.zModel[this.data.Value]})},e.prototype.getAdornmentBackgroundColor=function(e){return e.BackgroundColor?e.BackgroundColor+"!important":"transparent !important"},e.prototype.adornmentLook=function(e){return e.AdornmentLook?e.AdornmentLook:"clear"},e.prototype.onAdornmentClick=function(e){e.OnClick&&this.group.subject.next({type:"ztext-adornment",target:e.OnClick,data:e})},e.prototype.readOnlyOnClear=function(){a.ZComponentHelper.setModelValue(this.data.Value,null,this.group)},e.prototype.setTooltipsInfoClass=function(){return this.tooltipsInfo&&!this.showTooltipsInfoIcon&&this.showTooltipsInfoBySide?"tooltipsinfo-text":"tooltipsinfo-text-wide"},e.prototype.setTooltipsInfoColor=function(){return this.tooltipsInfo&&this.tooltipsInfo.TextColor?this.tooltipsInfo.TextColor:"#acacac"},e.prototype.setTooltipsInfoIcon=function(e){this.showTooltipsInfoIcon&&(""!=this.tooltipsInfo.Icon?this.tooltipsDisplayIcon=e||this.tooltipsInfo.Icon:this.tooltipsDisplayIcon="question-circle")},e.prototype.setTooltipsDisplayText=function(e){this.tooltipsInfo?this.tooltipsDisplayText=e||this.tooltipsInfo.DisplayText:this.tooltipsDisplayText="<Display text error>"},e.prototype.setTooltipsInfoSideBySide=function(){return this.tooltipsInfo&&this.showTooltipsInfoBySide&&!this.showTooltipsInfoIcon&&this.adornmentList.length<1?"ion-row divtextbox tooltipsinfo-right":"ion-row divtextbox"},e}();qe.decorators=[{type:t.Component,args:[{selector:"app-ztext",template:'<ion-item [formGroup]="form"\r\n *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n [ngClass]="getIon_InvalidClass(form, data)">\r\n <ion-label [attr.for]="data.Value"\r\n *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n \x3c!-- add icon for tooltips --\x3e\r\n <span kendoTooltip\r\n *ngIf="data.TooltipsInfo && showTooltipsInfoIcon"\r\n [title]="tooltipsDisplayText">\r\n <fa-icon [icon]="tooltipsDisplayIcon"\r\n class="tooltipsinfo-icon">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n \x3c!-- mobile tooltipsinfo below label--\x3e\r\n <kendo-label *ngIf="data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide && isMobileScreen()"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n \x3c!-- <ion-input [name]="data.Name" [required]="data.IsRequired" [placeholder]="data.PlaceHolder" [type]="mapInputType(data.Type)"\r\n [(ngModel)]="group.zModel[data.Value]" [minlength]="data.MinLength" [maxlength]="data.MaxLength"\r\n [readonly]="data.ReadOnly" [inputmode]="mapInputMode(data.Type)"></ion-input> --\x3e\r\n <div [class]="setTooltipsInfoSideBySide()">\r\n <div style="flex: 1;">\r\n <ion-input *ngIf="isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [type]="mapInputType(data.Type)"\r\n [placeholder]="data.PlaceHolder"\r\n clearOnEdit\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngStyle]="{\'text-align\': getStyle(data.RightAlign ? true : false)}"\r\n [inputmode]="mapInputMode(data.Type)"\r\n (click)=\'textboxOnClick()\'\r\n (ionChange)="onChange($event)">\r\n </ion-input>\r\n <kendo-textbox *ngIf="!isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [type]="mapInputType(data.Type)"\r\n [placeholder]="data.PlaceHolder"\r\n [clearButton]="showClearButton"\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n [ngStyle]="{\'text-align\': getStyle(data.RightAlign ? true : false)}"\r\n (input)="onChange($event)"\r\n (click)="textboxOnClick()"\r\n [class]="setTextboxClass()">\r\n\r\n <ng-template kendoTextBoxSuffixTemplate\r\n *ngIf="adornmentList">\r\n \x3c!-- For Validation feature --\x3e\r\n \x3c!--<app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"\r\n class="validation-icon"></app-uivalidationmessage>--\x3e\r\n <button kendoButton\r\n *ngIf="data.OnClick"\r\n look="clear"\r\n icon="close-circle"\r\n class="textbox-clearbutton"\r\n (click)="readOnlyOnClear()"></button>\r\n \x3c!-- For Adornments feature --\x3e\r\n <div *ngFor="let adornment of adornmentList">\r\n <kendo-textbox-separator *ngIf="!adornment.HideSeperator"\r\n class="textbox-separator"></kendo-textbox-separator>\r\n <button kendoButton\r\n [look]="adornmentLook(adornment)"\r\n [icon]="adornment.Icon"\r\n (click)="onAdornmentClick(adornment)"\r\n [style.background-color]="getAdornmentBackgroundColor(adornment)"></button>\r\n </div>\r\n </ng-template>\r\n </kendo-textbox>\r\n </div>\r\n \x3c!-- For Validation feature pending change to inner textbox --\x3e\r\n <app-uivalidationmessage *ngIf="!isMobileScreen()"\r\n [group]="group"\r\n [data]="data"\r\n [form]="form" ></app-uivalidationmessage>\r\n\r\n \x3c!-- For Mobile Validation feature --\x3e\r\n <app-uivalidationmessage *ngIf="isMobileScreen()"\r\n [group]="group"\r\n [data]="data"\r\n [form]="form"\r\n class="validation-icon-mobile"></app-uivalidationmessage>\r\n\r\n \x3c!-- mobile section for Adornments feature --\x3e\r\n <div *ngFor="let adornment of adornmentList">\r\n <button kendoButton\r\n *ngIf="isMobileScreen()"\r\n [look]="adornmentLook(adornment)"\r\n [icon]="adornment.Icon"\r\n (click)="onAdornmentClick(adornment)"\r\n [style.background-color]="getAdornmentBackgroundColor(adornment)"\r\n class="adornments-icon-mobile"></button>\r\n </div>\r\n\r\n \x3c!-- Icon button feature --\x3e\r\n <div *ngFor="let item of iconList">\r\n <div kendoTooltip\r\n class="icon-button"\r\n showOn="hover"\r\n [tooltipWidth]="item.Width"\r\n [position]="item.Position">\r\n\r\n <span *ngIf="!!item "\r\n (click)="onIconClick(item.Click)"\r\n [title]="item.Tooltip"\r\n style="margin-top: 10px;">\r\n\r\n <fa-icon [icon]="item.Icon"\r\n [ngStyle]="{\'padding\': \'4px 6px\', \'color\': (item.Color ? item.Color : \'black\')}"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n \x3c!-- side by side and desktop tooltipsinfo --\x3e\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n </div>\r\n</ion-item>\r\n',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divtextbox{justify-content:space-between;width:100%}.k-textbox{color:var(--z-text-color)}.notmobile-textbox{margin:7px 0 0;width:100%}.notmobile-textbox-onfocus{margin:7px 0 0;width:100%;color:var(--z-text-color)!important;background-color:#fff!important}.validation-icon{margin-top:0;margin-right:5px}.validation-icon-mobile{margin-top:5px;margin-right:5px}.textbox-separator{margin-top:0}.textbox-clearbutton{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;outline:0;cursor:pointer;opacity:.5}.textbox-clearbutton:hover{opacity:1!important}.icon-button{text-align:center;padding-top:10px}.adornments-icon-mobile{margin-bottom:0;margin-left:5px;width:28px;height:28px}.tooltipsinfo-text{margin-left:5px;width:50%}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:3fr 1fr 2fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]}]}],qe.ctorParameters=function(){return[]},qe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],iconList:[{type:t.Input}],adornmentList:[{type:t.Input}]};var _e=function(){function e(){var e=this;this.itemValueField=null,this.itemTextField=null,this.itemDataField=null,this.itemTemplate="{{item[itemTextField]}}",this.infinitezData=[],this.infiniteSearchText=null,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this)},e.prototype.onValueChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.onChangeEvent(e)},e.prototype.onChangeEvent=function(e){if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$){this.itemTextField.toString();var t=this.itemValueField.toString(),o=[];e&&(o=this.infinitezData.filter((function(o){return o[t]===e})),this.modelzData=o.slice()),this.itemDataField.startsWith("group.zData.")?this.group.zData[this.itemDataField.slice(12)]=o:this.itemDataField.startsWith("group.")&&(this.group[this.itemDataField.slice(6)]=o)}this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:{value:e,field:this.data}})},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly,this.group);return"function"==typeof e?e():e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getClass=function(e,t){var o=this.getIon_InvalidClass(e,t);return(o||"")+" "+this.data.Class},e.prototype.onClick=function(){this.data.OnItemClick&&this.group.subject.next({type:"ztextarea-onClick",target:this.data.OnItemClick,data:this.form.value})},e}();_e.decorators=[{type:t.Component,args:[{selector:"app-ztextarea",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" [ngClass]="getClass(form, data)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-textarea *ngIf="isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [placeholder]="data.PlaceHolder"\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [rows]="data.textAreaRows"></ion-textarea>\r\n <textarea kendoTextArea *ngIf="!isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [placeholder]="data.PlaceHolder"\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [rows]="data.textAreaRows"\r\n [autoSize]="!data.textAreaRows"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n style="margin: 7px 0 0 0; width: 100%"\r\n (valueChange)="onValueChange($event)"\r\n (click)="onClick()"></textarea>\r\n </span>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>\r\n',styles:[".gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-textarea{color:var(--z-text-color)}"]}]}],_e.ctorParameters=function(){return[]},_e.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ue=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.value="",this.labelText="",this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.widthReduce=this.data.WidthReduce||60,this.heightReduce=this.data.HeightReduce||560},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.ngOnDestroy=function(){},e.prototype.getCompStyle=function(){return{"height.px":this.getCompHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getCompHeight=function(){var e=window.innerHeight-this.heightReduce;return e<250?250:e},e}();Ue.decorators=[{type:t.Component,args:[{selector:"app-ztexteditor",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n [ngClass]="getIon_InvalidClass(form, data)">\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <div *ngIf="data.Title" class="title">{{data.Title}}</div>\r\n\r\n <ion-label [attr.for]="data.Value"\r\n *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n position="stacked"\r\n style="margin-bottom:10px;">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n color="danger">\r\n *\r\n </ion-text>\r\n </ion-label>\r\n\r\n <span style="flex: 1;">\r\n <kendo-editor [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [value]="value"\r\n [ngStyle]="getCompStyle()"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)">\r\n <kendo-toolbar *ngIf="data.ToolBarStyle === \'hidden\'">\r\n </kendo-toolbar>\r\n <kendo-toolbar *ngIf="data.ToolBarStyle === \'full\'">\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorUndoButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorRedoButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorStrikethroughButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorSubscriptButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorSuperscriptButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\r\n <kendo-toolbar-dropdownlist kendoEditorFontSize></kendo-toolbar-dropdownlist>\r\n <kendo-toolbar-dropdownlist kendoEditorFontFamily></kendo-toolbar-dropdownlist>\r\n <kendo-toolbar-colorpicker kendoEditorForeColor></kendo-toolbar-colorpicker>\r\n <kendo-toolbar-colorpicker kendoEditorBackColor></kendo-toolbar-colorpicker>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-editor-insert-table-button></kendo-editor-insert-table-button>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorAddColumnBeforeButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAddColumnAfterButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAddRowBeforeButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAddRowAfterButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorDeleteColumnButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorDeleteRowButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorDeleteTableButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorInsertFileButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorViewSourceButton></kendo-toolbar-button>\r\n </kendo-toolbar>\r\n </kendo-editor>\r\n </span>\r\n </div>\r\n</ion-item>\r\n',styles:[".title{margin:20px 10px 5px;font-size:18px;font-weight:700}"]}]}],Ue.ctorParameters=function(){return[]},Ue.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var We=function(){function e(){var e=this;this.items=[],this.originalItemList=null,this.isNodeDrop=!1,this.nodeCounter=1,this.clickActName=null,this.state={expandedkeys:[]},this.itemIndex=[],this.selectedKeys=[],this.absoluteText=!1,this.componentProperties=new a.ZComponentProperties,this.isExpanded=function(t,o){return e.state.expandedkeys.indexOf(o)>-1},this.expandNode=function(t,o,n){e.itemIndex=[];var r=e.getItems();e.searchNodeIndex(r,o,"",t);var i=e.itemIndex;n&&(e.selectedKeys=i);var a=[];i.forEach((function(e){var t=e.split("_"),o="";t.forEach((function(e){o=o.concat("_").concat(e),a.push(o.substring(1))}))})),e.state.expandedkeys=e.state.expandedkeys.concat(a)},this.collapseNode=function(t,o,n){e.itemIndex=[];var r=e.getItems();e.searchNodeIndex(r,o,"",t);var i=e.itemIndex,a=[];n?i.forEach((function(e){var t=e.split("_"),o="";t.forEach((function(e){o=o.concat("_").concat(e),a.push(o.substring(1))}))})):a=i,e.state.expandedkeys=e.state.expandedkeys.filter((function(e){return!a.includes(e)}))},this.expandAll=function(){var t=e.getItems();t&&e.expandAllNode(t,"")},this.collapseAll=function(){e.state.expandedkeys=[]},this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.TreeviewExpandAll&&this.expandAll(),(this.data.OnAddNode||this.data.OnRemoveNode)&&(this.absoluteText=!0)},e.prototype.ngAfterViewInit=function(){a.ZComponentHelper.registerComponent(this)},e.prototype.getItems=function(){var e=this.data.Value;if(e)return this.nodeCounter=1,a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Value);console.warn("ztree field Value is not set correctly. ",e)},e.prototype.searchNodeIndex=function(e,t,o,n){var r=this;o&&(o+="_"),e.forEach((function(e,i){if(e[n]!==Number(t)&&e[n]!==t||(r.itemIndex=r.itemIndex.concat(o+""+i)),Array.isArray(e.Value)){var a=o+""+i;r.searchNodeIndex(e.Value,t,a,n)}}))},e.prototype.expandAllNode=function(e,t){var o=this;t&&(t+="_"),e.forEach((function(e,n){if(Array.isArray(e.Value)){var r=t+""+n;o.state.expandedkeys=o.state.expandedkeys.concat(r),o.expandAllNode(e.Value,r)}}))},e.prototype.handleCollapse=function(e){this.state.expandedkeys=this.state.expandedkeys.filter((function(t){return t!==e.index}))},e.prototype.handleExpand=function(e){this.state.expandedkeys=this.state.expandedkeys.concat(e.index)},e.prototype.getTemplate=function(e,t,o){if(t.ItemTemplate){var n=a.ZComponentHelper.getGroupEvalValue.call(this,t.ItemTemplate);return n?n({dataItem:e,data:t,group:o}):void console.warn("The ("+t.ItemTemplate+") is not defined correctly. Value contains: ",n)}return Object.values(e).filter((function(e){return"string"==typeof e})).join(", ")},e.prototype.convertToTreeItems=function(e){var t=[],o={},n=[];return e.forEach((function(e){if(e.ParentId)if(o[e.ParentId]){var r=o[e.ParentId];r.Value||(r.Value=[]),r.Value.push(e),o[e.Id]=e}else n.push(e);else t.push(e),o[e.Id]=e})),n.length>0&&n.forEach((function(e){o[e.ParentId]&&(o[e.ParentId].Value.push(e),o[e.Id]=e)})),t},e.prototype.onSelectionChange=function(e){var t;if(this.clickActName)switch(this.clickActName){case"AddNode":t=this.data.OnAddNode;break;case"RemoveNode":t=this.data.OnRemoveNode}else t=this.data.OnItemClick;this.clickActName=null,this.group.subject.next({type:"ztree_onSelectionChange",target:t,data:e.dataItem,event:e.index})},e.prototype.onAddNode=function(e,t,o,n){this.clickActName="AddNode"},e.prototype.onRemoveNode=function(e,t,o,n){this.clickActName="RemoveNode"},e.prototype.onEditNode=function(e){if(this.data.OnEditNode){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnEditNode);"function"==typeof t&&t.bind(this.group.ctrlScope)(e)}else;},e.prototype.handleNodeDrop=function(e){if(!1!==this.data.Draggable){this.isNodeDrop=!0;var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnDrop);if("function"==typeof t)t.bind(this)(e)}else e.setValid(!1)},e.prototype.handleNodeDragEnd=function(e){if(this.isNodeDrop){this.isNodeDrop=!1;var t=this.getItems(),o=[];this.updateChangeToDataSet(t,o),a.ZComponentHelper.setModelValue(this.data.Value,o,this.group),this.group.subject.next({type:"ztree-onTreeNodeDragEnd",target:this.data.OnChange,data:o})}},e.prototype.updateChangeToDataSet=function(e,t){var o=this;e.forEach((function(e){var n;Array.isArray(e.Value)?((n=JSON.parse(JSON.stringify(e))).Value=[],t.push(n),o.updateChangeToDataSet(e.Value,n.Value)):((n=Object.assign({},e)).Value=n._DataValue,delete n._DataValue,t.push(n))}))},e.prototype.handleFilter=function(e){0==this.items.length&&(this.items=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Value),null==this.originalItemList&&(this.originalItemList=this.items.map((function(e){return Object.assign({},e)})))),this.items=this.originalItemList.map((function(e){return Object.assign({},e)}));var t=this.search(this.items,e),o=this.filterPrefix(this.data.Value);this.group[o]=t},e.prototype.filterPrefix=function(e){return e.startsWith("zData.")?e.slice(6):e.startsWith("group.zData.")?e.slice(12):e.startsWith("group.")?e.slice(6):e||void 0},e.prototype.search=function(e,t){var o=this;return e.reduce((function(e,n){if(o.contains(n.Name,t))e.push(n);else if(n.Value&&n.Value.length>0){var r=o.search(n.Value,t);if(r.length>0){var i=n;i.Value=r,e.push(i)}}return e}),[])},e.prototype.contains=function(e,t){return e.toLowerCase().indexOf((t||"").toLowerCase())>=0},e}();We.decorators=[{type:t.Component,args:[{selector:"app-ztree",template:'<div style="width:100%"\r\n *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <kendo-treeview [nodes]="getItems()"\r\n kendoTreeViewExpandable\r\n kendoTreeViewSelectable\r\n kendoTreeViewDragAndDrop\r\n kendoTreeViewDragAndDropEditing\r\n [isExpanded]="isExpanded"\r\n (collapse)="handleCollapse($event)"\r\n (expand)="handleExpand($event)"\r\n (nodeDrop)="handleNodeDrop($event)"\r\n (nodeDragEnd)="handleNodeDragEnd($event)"\r\n (selectionChange)="onSelectionChange($event)"\r\n [selectedKeys]="selectedKeys"\r\n kendoTreeViewHierarchyBinding\r\n childrenField="Value"\r\n [filterable]="data.Filterable"\r\n textField="Name"\r\n (filterChange)="handleFilter($event)">\r\n\r\n <ng-template kendoTreeViewNodeTemplate let-dataItem #nodetemplate>\r\n\r\n <ion-button *ngIf="!!data.OnAddNode"\r\n (click)="onAddNode($event, dataItem, data, group)"\r\n style="zoom: 0.6; margin: 0 0 0 2px;" mat-raised-button color="primary" size="medium"\r\n [hidden]="(!!dataItem.OnAddNodeVisible)"> \r\n <fa-icon [icon]="\'plus\'"></fa-icon>\r\n </ion-button>\r\n <ion-button *ngIf="!!data.OnRemoveNode" (click)="onRemoveNode($event, dataItem, data, group)"\r\n style="zoom: 0.6; margin: 0 15px 0 10px;" color="danger" mat-raised-button size="medium"\r\n [hidden]="(!!dataItem.OnRemoveNodeVisible)"> \r\n <fa-icon [icon]="\'minus\'"></fa-icon>\r\n </ion-button>\r\n\r\n <ion-label *ngIf="absoluteText" style="position: absolute; top: 14px;">\r\n {{ getTemplate(dataItem, data, group) }}\r\n </ion-label>\r\n\r\n <ion-label *ngIf="!absoluteText">\r\n {{ getTemplate(dataItem, data, group) }}\r\n </ion-label>\r\n </ng-template>\r\n </kendo-treeview>\r\n</div>\r\n',styles:[":host{--ion-color-primary:#479400;--ion-color-primary-rgb:56,128,255;--ion-color-primary-contrast:#fff;--ion-color-primary-contrast-rgb:255,255,255;--ion-color-primary-shade:#3171e0;--ion-color-primary-tint:#4c8dff}:host ::ng-deep kendo-treeview .k-treeview-leaf{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:3px;border:1px solid #c8dbf5;background-color:#e3ecf8;color:#0a45ab;font-size:13px;cursor:pointer}:host ::ng-deep kendo-treeview .k-treeview-leaf.k-state-selected{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:3px;background-color:#a9c3e8;color:#0a45ab;font-size:13px;cursor:pointer}:host ::ng-deep kendo-treeview .k-treeview-leaf.k-state-hover,:host ::ng-deep kendo-treeview .k-treeview-leaf:hover{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:3px;background-color:#c9daf2;color:#0a45ab;font-size:13px;cursor:pointer}"]}]}],We.ctorParameters=function(){return[]},We.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],nodetemplate:[{type:t.ViewChild,args:["nodetemplate",{static:!0}]}]};var $e=function(e,t,o,n,r,i,a,l,s,p,d,c,u,g,h){this.sortable=e,this.resizable=t,this.filterable=o,this.reorderable=n,this.columnMenu=r,this.scrollable=i,this.refresh=a,this.autoBind=l,this.dataSource=s,this.dataBound=p,this.idField=d,this.parentIdField=c,this.columns=u,this.aggregate=g,this.pageAble=h},Je=function(){function e(e,t,o,n,i){var l=this;this.fieldService=e,this.webapiService=t,this.activatedRoute=o,this.router=n,this.authService=i,this.ztreelist=null,this.idField="Id",this.parentIdField="ParentId",this.options=new $e,this.componentProperties=new a.ZComponentProperties,this.pageSize=20,this.inlineEditedFormGroups=[],this.treelistSubject=new r.Subject,this.setEnable=function(e){var t=l.group.form.controls[l.data.Value];e?t.enable():t.disable(),l.componentProperties.isReadOnly=!e},this.setVisible=function(e){l.componentProperties.isVisible=e,l.data.Visible=e},this.setRequire=function(e){l.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,l.group,l.data.Value,l.componentProperties,u.Validators.required)},this.setData=function(e){l.dataSource=e,l.createFormControlsForInlineEdit(e),e&&l.inlineEditedFormGroups&&l.inlineEditedFormGroups.length>0&&e.forEach((function(e){var t=l.inlineEditedFormGroups.find((function(t){return t[l.idField]===e[l.idField]})),o=t.Fg;if(t&&o){Object.keys(o.controls);Object.keys(o.controls).forEach((function(t){var n=o.controls[t];n&&n.setValue(e[t])}))}}))}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.widthReduce=this.data.WidthReduce||60,this.heightReduce=this.data.HeightReduce||560,this.pageSize=this.data.PageSize||20,this.data.Options?this.setLocalOptions():this.setFieldElementOptions()},e.prototype.ngOnDestroy=function(){},e.prototype.getGridStyle=function(){return{"height.px":this.getGridHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getGridHeight=function(){var e=window.innerHeight-this.heightReduce;return e<180?180:e},e.prototype.isButtonHidden=function(e,t){return e.visible?a.ZComponentHelper.getGroupEvalValue.call(this,e.visible,t.viewItem.data):!(!e.hiddenParam||"undefined"===e.hiddenValue)&&(null===t.viewItem.data[e.hiddenParam]||t.viewItem.data[e.hiddenParam]===e.hiddenValue)},e.prototype.buttonClick=function(e,t){e.edit?e.edit(t):this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:t})},e.prototype.onNavigateTo=function(e,t,o,n){e.stopPropagation(),this.group.subject.next({type:"zgrid-onNavigateTo",target:t.navigateTo,data:n})},e.prototype.isColumnsVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.setLocalOptions=function(){var e=a.ZComponentHelper.getGroupValue(this.data.Options,this.group);if(e){this.options=e,this.options.idField=this.options.idField||this.idField,this.options.parentIdField=this.options.parentIdField||this.parentIdField;this.authService.SystemLocaleTranslation;this.options.dataSource&&"string"==typeof this.options.dataSource?this.options.dataSource.startsWith("group.")?this.dataSource=a.ZComponentHelper.getGroupValue(this.options.dataSource,this.group):console.error(this.data.Name+" - has invalid dataSource"):console.error(this.data.Name+" - dataSource property is not declared.")}else console.warn("No initialise for Field.Options: ",this.data.Options)},e.prototype.setFieldElementOptions=function(){var e=this;this.options.sortable=!0,this.options.resizable=!0,this.options.filterable=!0,this.options.resizable=!0,this.options.columnMenu=!this.data.DisableGridColumnMenu,this.options.scrollable=!0,this.options.idField=this.data.idField||this.idField,this.options.parentIdField=this.data.parentIdField||this.parentIdField,this.options.columns=[],this.options.aggregate=[],this.options.pageAble=!!this.data.PageSize;var t=[];this.fieldService.getFormFieldCode(this.data.ColumnFieldCode,"FormField",null,null).pipe(i.switchMap((function(o){return t=o,e.getButtonsFromZButtons(o)})),i.tap((function(o){e.setTreeListColumns(t,o)})),i.switchMap((function(){return e.getDataBinding()})),i.tap((function(t){e.createFormControlsForInlineEdit(t)}))).subscribe((function(t){t&&(e.dataSource=t)}))},e.prototype.getButtonsFromZButtons=function(e){var t=this,o=[],n=[];return e.forEach((function(e){"zbuttons"===e.Type&&a.ZComponentHelper.getGroupValue(e.gridColVisible,t.group)&&n.push(t.fieldService.getFormFieldCode(e.Value,"FormField",null,null).pipe(i.switchMap((function(t){return r.of({field:e,buttons:t})}))))})),0===n.length?r.of([]):r.forkJoin(n).pipe(i.tap((function(e){e.forEach((function(e){return e.buttons.forEach((function(t){o.push({zbuttonsName:e.field.Value,name:t.Value,class:t.Class,text:t.Label,icon:t.Icon,visible:t.Visible,hiddenParam:t.hiddenParam,hiddenValue:t.hiddenValue,edit:t.edit,ClickEvent:t.ClickEvent,ShowLabel:t.ShowLabel,color:t.Color})}))}))})),i.switchMap((function(){return r.of(o)})))},e.prototype.setTreeListColumns=function(e,t){var o=this;e.forEach((function(e){if(Array.isArray(e.Value)&&o.setTreeListColumns(e.Value,t),!0===a.ZComponentHelper.getGroupValue(e.gridColVisible,o.group))if("zbuttons"===e.Type)o.insertCommand(e,t);else if(e.AggregateType&&""!==e.AggregateType){var n="";n="sum"===e.AggregateType?"Total: ":e.AggregateType+": ",o.insertFooterTemplateField(e,n),o.options.aggregate.push({field:e.Value,aggregate:e.AggregateType})}else o.insertField(e)}))},e.prototype.insertField=function(e){var t=e.Name;t.toString().startsWith("group.")&&(t=a.ZComponentHelper.getGroupValue(t.toString(),this.group)),this.options.columns.push(Object.assign(e,{field:e.Value,title:t,width:e.width,visible:!0,fieldType:e.Type,navigateTo:e.NavigateTo,command:null,class:e.DivClass,footerTemplate:!1,aggregateType:"",aggregateTitle:"",isEditableInGrid:e.IsEditableInGrid}))},e.prototype.insertCommand=function(e,t){var o=e.Name;o.toString().startsWith("group.")&&(o=a.ZComponentHelper.getGroupValue(o.toString(),this.group)),this.options.columns.push({field:e.Name,title:o,width:e.width,visible:e.Visible,fieldType:e.Type,navigateTo:e.NavigateTo,command:t.filter((function(t){return t.zbuttonsName===e.Value})),class:e.DivClass,footerTemplate:!1,aggregateType:"",aggregateTitle:"",isEditableInGrid:e.IsEditableInGrid})},e.prototype.insertFooterTemplateField=function(e,t){var o=e.Name;o.toString().startsWith("group.")&&(o=a.ZComponentHelper.getGroupValue(o.toString(),this.group)),this.options.columns.push({field:e.Value,title:o,width:e.width,visible:!0,fieldType:e.Type,navigateTo:e.NavigateTo,command:null,class:e.DivClass,footerTemplate:!0,aggregateType:e.AggregateType,aggregateTitle:t,isEditableInGrid:e.IsEditableInGrid})},e.prototype.getDataBinding=function(){if(this.data.DataSource)return r.of(a.ZComponentHelper.getGroupValue(this.data.DataSource,this.group));var e=this.getResouceURL();return e?this.webapiService.getApi(e,null,null,null,null,null,!0):r.of([])},e.prototype.getResouceURL=function(){return a.ZComponentHelper.getGroupValue(this.data.ResourceURL,this.group)},e.prototype.cellClickHandler=function(e){if(!this.data.DisableCellClickHandler)if(console.log("cellClick event: ",e),this.data.OnItemClick){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);"function"==typeof t&&t.bind(this.group.ctrlScope)(e)}else this.editModel(e.dataItem)},e.prototype.editModel=function(e){if(this.data.EditClickURL){var t=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);this.group.subject.next({type:"zgrid-cellClick",target:this.data.EditClickURL,data:e,columnFields$:t})}else this.router.navigate([this.group.editModelURL,e.Id,"edit"],{relativeTo:this.activatedRoute})},e.prototype.createFormControlsForInlineEdit=function(e){var t=this;void 0!==this.options.columns.find((function(e){return e.isEditableInGrid}))&&e&&(this.inlineEditedFormGroups=[],e.forEach((function(e){var o={};t.options.columns.forEach((function(t){o[t.field]=new u.FormControl(e[t.field])}));var n=new u.FormGroup(o);t.inlineEditedFormGroups.push({Id:e[t.idField],Fg:n})})))},e.prototype.getInlineField=function(e){return this.options.columns.find((function(t){return t.Value===e}))},e.prototype.getInlineForm=function(e){var t=this;return this.inlineEditedFormGroups.find((function(o){return o.Id===e[t.idField]})).Fg},e.prototype.isInlineEditColVisible=function(e,t){return!(!1===e[t.Value+"_Visible"])},e.prototype.getFormat=function(e){var t="",o=e.FormatOptions.split("."),n=0;return o.length>1&&(n=o[1].length),0!==n&&(t="1."+n+"-"+n),t},e.prototype.setHeaderText=function(e,t){this.options.columns.forEach((function(o){o.Name!==e&&o.field!==e||(o.title=t)}))},e.prototype.getColClass=function(e,t){var o="gridCell ";return"number"!==t.fieldType&&"currency"!==t.fieldType&&"znumeric"!==t.fieldType||(o+="rightAligned "),e[t.field+"_Class"]&&(o+=e[t.field+"_Class"]+" "),t.Class&&(o+=t.Class+" "),o},e.prototype.setGridIsLoading=function(e){this.isLoading=e},e.prototype.onFilterChange=function(e){this.ztreelist},e.prototype.mapFilterOperator=function(e){switch(e){case"eq":return"eq";case"neq":return"neq";case"lt":return"lt";case"lte":return"lte";case"gt":return"gt";case"gte":return"gte";case"startswith":return"startswith";case"endswith":return"endswith";case"isnull":return"isnull";case"isnotnull":return"isnotnull";default:return"=="}},e.prototype.filterable=function(e){return!1!==e},e.prototype.sortable=function(e){return!1!==e},e}();Je.decorators=[{type:t.Component,args:[{selector:"app-ztreelist",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="margin: 10px 0 6px 0;">\r\n <div *ngIf="data.Title" class="treelistTitle">{{data.Title}}</div>\r\n <kendo-treelist [kendoTreeListFlatBinding]="dataSource" [ngStyle]="getGridStyle()" [idField]="options.idField" [parentIdField]="options.parentIdField"\r\n (cellClick)="cellClickHandler($event)"\r\n [sortable]="options.sortable"\r\n [resizable]="options.resizable"\r\n [filterable]="false"\r\n [reorderable]="false"\r\n [columnMenu]="options.columnMenu"\r\n [scrollable]="options.scrollable"\r\n [aggregate]="options.aggregate"\r\n [pageable]="options.pageAble"\r\n [pageSize]="data.PageSize"\r\n [initiallyExpanded]="data.DefaultCollapse === false"\r\n (filterChange)="onFilterChange($event)"\r\n kendoTreeListExpandable\r\n treelist>\r\n\r\n \x3c!--\r\n [filterable]="options.filterable"\r\n [reorderable]="options.resizable"\r\n --\x3e\r\n <ng-container *ngFor="let col of options.columns; index as i">\r\n <kendo-treelist-column *ngIf="!col.command"\r\n [class]="col.class"\r\n [expandable]="i===0"\r\n [field]="col.field"\r\n [title]="col.title || col.field"\r\n [width]="col.width || 250"\r\n [filterable]="filterable(col.enableFiltering)"\r\n [sortable]="sortable(col.enableSorting)"\r\n [hidden]="!isColumnsVisible(col.visible)">\r\n <div [ngSwitch]="true">\r\n <div *ngSwitchCase="col.fieldType === \'number\'\r\n || col.fieldType === \'currency\'\r\n || col.fieldType === \'znumeric\'">\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">\r\n <kendo-treelist-numeric-filter-cell [column]="column" [filter]="filter" operator="eq">\r\n <kendo-filter-eq-operator></kendo-filter-eq-operator>\r\n <kendo-filter-neq-operator></kendo-filter-neq-operator>\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-treelist-numeric-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngSwitchCase="col.fieldType == \'zdate\'\r\n || col.fieldType === \'zdatetime\'\r\n || col.fieldType === \'zuidatetime\'">\r\n <div *ngIf="col.filterByDateRange === true">\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column" operator="lte">\r\n <date-range-filter-cell class="date-range-filter"\r\n [filter]="filter"\r\n [field]="col.field">\r\n <kendo-treelist-filter-lt-operator></kendo-treelist-filter-lt-operator>\r\n <kendo-treelist-filter-lte-operator></kendo-treelist-filter-lte-operator>\r\n <kendo-treelist-filter-gt-operator></kendo-treelist-filter-gt-operator>\r\n <kendo-treelist-filter-gte-operator></kendo-treelist-filter-gte-operator>\r\n <kendo-treelist-filter-isnull-operator></kendo-treelist-filter-isnull-operator>\r\n <kendo-treelist-filter-isnotnull-operator></kendo-treelist-filter-isnotnull-operator>\r\n </date-range-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngIf="col.filterByDateRange === false">\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">\r\n <kendo-treelist-date-filter-cell [column]="column" [filter]="filter" operator="lte">\r\n <kendo-treelist-filter-lt-operator></kendo-treelist-filter-lt-operator>\r\n <kendo-treelist-filter-lte-operator></kendo-treelist-filter-lte-operator>\r\n <kendo-treelist-filter-gt-operator></kendo-treelist-filter-gt-operator>\r\n <kendo-treelist-filter-gte-operator></kendo-treelist-filter-gte-operator>\r\n <kendo-treelist-filter-isnull-operator></kendo-treelist-filter-isnull-operator>\r\n <kendo-treelist-filter-isnotnull-operator></kendo-treelist-filter-isnotnull-operator>\r\n </kendo-treelist-date-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">\r\n <kendo-treelist-string-filter-cell [column]="column" [filter]="filter" operator="contains">\r\n <kendo-treelist-filter-contains-operator></kendo-treelist-filter-contains-operator>\r\n <kendo-treelist-filter-eq-operator></kendo-treelist-filter-eq-operator>\r\n <kendo-treelist-filter-neq-operator></kendo-treelist-filter-neq-operator>\r\n <kendo-treelist-filter-startswith-operator></kendo-treelist-filter-startswith-operator>\r\n <kendo-treelist-filter-endswith-operator></kendo-treelist-filter-endswith-operator>\r\n <kendo-treelist-filter-isnull-operator></kendo-treelist-filter-isnull-operator>\r\n <kendo-treelist-filter-isnotnull-operator></kendo-treelist-filter-isnotnull-operator>\r\n </kendo-treelist-string-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ng-template kendoTreeListCellTemplate let-dataItem let-rowIndex="rowIndex" let-cellContext="cellContext">\r\n <div style="margin: 7px 0;display: inline;" [style.color]="(!!dataItem.Color ? [dataItem.Color] : \'black\')" *ngIf="!col.navigateTo && col.isEditableInGrid !== true" [ngSwitch]="col.fieldType" [ngClass]="getColClass(dataItem, col)">\r\n <span *ngSwitchCase="\'zdate\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zshortdate\'">\r\n {{ dataItem[col.field] | date: \'MMM yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zdatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zuidatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'number\'">\r\n <div style="text-align:right;">{{ dataItem[col.field] | number }} </div>\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n <div style="text-align:right;">{{ dataItem[col.field] | number: \'1.2-2\' }}</div>\r\n </span>\r\n <span *ngSwitchCase="\'znumeric\'">\r\n <div style="text-align:right;">{{ dataItem[col.field] | number: getFormat(col) }}</div>\r\n </span>\r\n <span *ngSwitchCase="\'url\'" style="color: blue; cursor: pointer; text-decoration:underline;">\r\n {{ dataItem[col.field] }}\r\n </span>\r\n <span *ngSwitchDefault>\r\n {{ dataItem[col.field]}}\r\n </span>\r\n </div>\r\n <div style="margin: 7px 0;display: inline;" [style.color]="(!!dataItem.Color ? [dataItem.Color] : \'black\')" *ngIf="!col.navigateTo && col.isEditableInGrid === true && isInlineEditColVisible(dataItem, col)" [ngSwitch]="col.fieldType" [ngClass]="getColClass(dataItem, col)">\r\n <span *ngSwitchCase="\'checkbox\'">\r\n <app-zcheckbox style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(dataItem)" (click)="buttonClick(col, cellContext)"></app-zcheckbox>\r\n </span>\r\n <span *ngSwitchCase="\'zuiselectmultiple\'">\r\n <app-zselectmultiple style="width: 100%;" [data]="getInlineField(col.field)" [group]="group" [form]="getInlineForm(dataItem)"></app-zselectmultiple>\r\n </span>\r\n <span *ngSwitchCase="\'textarea\'">\r\n <app-ztextarea style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(dataItem)"></app-ztextarea>\r\n </span>\r\n <span *ngSwitchCase="[\'zuidatetime\',\'zdate\',\'zdatetime\',\'zshortdate\'].includes(col.fieldType) ? col.fieldType : \'\'">\r\n <app-zdatetime style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(dataItem)"></app-zdatetime>\r\n </span>\r\n </div>\r\n <span *ngIf="!!col.navigateTo" (click)="onNavigateTo($event, col, dataItem, dataItem[col.field])">\r\n <ion-button color="light" size="small">\r\n {{ dataItem[col.field] }}\r\n \x3c!-- <ion-icon slot= "end" name="arrow-forward"></ion-icon> --\x3e\r\n <fa-icon slot="end" [icon]="\'arrow-right\'"></fa-icon>\r\n </ion-button>\r\n </span> \r\n </ng-template>\r\n <ng-template *ngIf="col.footerTemplate" kendoTreeListFooterTemplate let-aggregates="aggregates">\r\n <div *ngIf="!col.navigateTo" [ngSwitch]="col.fieldType" [ngClass]="{\'rightAligned\': col.fieldType === \'number\' || col.fieldType === \'currency\'}">\r\n <span *ngSwitchCase="\'number\'">\r\n <b>\r\n {{ col.aggregateTitle | titlecase }} {{ aggregates[col.field][col.aggregateType] | number }}\r\n </b>\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n <b>\r\n {{ col.aggregateTitle | titlecase }} {{ aggregates[col.field][col.aggregateType] | number: \'1.2-2\' }}\r\n </b>\r\n </span>\r\n </div>\r\n </ng-template>\r\n </kendo-treelist-column>\r\n <kendo-treelist-command-column *ngIf="!!col.command" [title]="col.title || col.field" [width]="col.width || 250">\r\n <ng-template kendoTreeListCellTemplate let-cellContext="cellContext">\r\n <div [ngClass]="col.class">\r\n <button *ngFor="let col2 of col.command; index as i" type="button" [kendoTreeListEditCommand]="cellContext"\r\n [title]="col2.text" (click)="buttonClick(col2, cellContext)"\r\n [hidden]="isButtonHidden(col2, cellContext)">\r\n <fa-icon [icon]="col2.icon" [style.color]="(!!col2.color ? [col2.color] : \'black\')">\r\n </fa-icon>\r\n <div *ngIf="col2.ShowLabel === undefined || col2.ShowLabel">{{col2.text}}</div>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </kendo-treelist-command-column>\r\n </ng-container>\r\n\r\n \x3c!-- <kendo-treelist-command-column width="140">\r\n <ng-template kendoTreeListCellTemplate let-isNew="isNew" let-cellContext="cellContext">\r\n <button [kendoTreeListAddCommand]="cellContext"\r\n icon="filter-add-expression" title="Add Child">\r\n </button>\r\n <button [kendoTreeListCancelCommand]="cellContext"\r\n icon="cancel" title="{{ isNew ? \'Discard changes\' : \'Cancel\' }}">\r\n </button>\r\n </ng-template>\r\n </kendo-treelist-command-column> --\x3e\r\n </kendo-treelist>\r\n</div>\r\n',styles:[":host ::ng-deep kendo-treelist .k-grid-content{white-space:nowrap}:host ::ng-deep kendo-treelist .k-toolbar{background-color:#e3ecf8}:host ::ng-deep kendo-treelist .k-grid-add-row,:host ::ng-deep kendo-treelist .k-grid-footer,:host ::ng-deep kendo-treelist .k-grid-header,:host ::ng-deep kendo-treelist .k-grouping-header{background-color:#e3ecf8;font-weight:600}:host ::ng-deep kendo-treelist .k-button{border-radius:5px;box-shadow:0 2px 2px rgba(0,0,0,.1);background-color:#c9daf2}:host ::ng-deep kendo-treelist .k-grid-header .k-grid-filter:hover,:host ::ng-deep kendo-treelist .k-grid-header .k-header-column-menu:hover,:host ::ng-deep kendo-treelist .k-grid-header .k-hierarchy-cell .k-icon:hover{background-color:#c9daf2}:host ::ng-deep kendo-treelist .k-grid .k-grid-filter,:host ::ng-deep kendo-treelist .k-grid .k-header-column-menu,:host ::ng-deep kendo-treelist .k-grid .k-hierarchy-cell .k-icon{color:#132842}:host ::ng-deep kendo-treelist .k-dropdown .k-dropdown-wrap,:host ::ng-deep kendo-treelist .k-dropdowntree .k-dropdown-wrap{border-radius:2px;background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-treelist tr.k-alt{background-color:rgba(232,238,246,.5)}:host ::ng-deep kendo-treelist tbody tr.k-state-hover,:host ::ng-deep kendo-treelist tbody tr:hover{background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-treelist .k-pager-wrap{background-color:#e3ecf8}:host ::ng-deep kendo-treelist .k-pager-numbers .k-link.k-state-selected{color:#ff5e5b;background-color:rgba(255,94,91,.4)}:host ::ng-deep kendo-treelist .k-pager-numbers .k-link.k-state-hover,:host ::ng-deep kendo-treelist .k-pager-numbers .k-link:hover{color:#ff5e5b;background-color:rgba(255,94,91,.15)}.cellWrapText .gridCell{white-space:pre-line!important}.treelistTitle{margin:20px 10px 5px;font-size:18px;font-weight:700}.rightAligned{text-align:right;display:table!important;margin:0 0 0 auto!important}.centerAligned{text-align:center;display:table!important;margin:0 auto!important}.k-i-loading{position:absolute;top:100px;left:0;right:0;bottom:0;font-size:45px;background-color:hsla(0,0%,100%,.3);color:#0f4800}"]}]}],Je.ctorParameters=function(){return[{type:a.FieldService},{type:a.WebApiService},{type:o.ActivatedRoute},{type:o.Router},{type:a.AuthService}]},Je.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ke=function(){function e(){var e=this;this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.title="Undefined",this.icon="address-card",this.color="#000000",this.value=0,this.options={title:this.title,icon:this.icon,color:this.color,value:this.value},this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t},this.setData=function(t){t||(e.options.value=0),e.getFieldDeclarationForSetup(e.data,e.options)}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Options){var e=typeof this.data.Options;if("object"===e)Object.assign(this.options,this.data.Options);else if("string"===e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options);"object"==typeof t&&Object.assign(this.options,t)}}this.getFieldDeclarationForSetup(this.data,this.options),this.isLoading=!1},e.prototype.getFieldDeclarationForSetup=function(e,t){t.title=a.ZComponentHelper.getGroupEvalValue.call(this,e.Title)||t.title,t.icon=a.ZComponentHelper.getGroupEvalValue.call(this,e.Icon)||t.icon,t.color=a.ZComponentHelper.getGroupEvalValue.call(this,e.Color)||t.color,t.value=a.ZComponentHelper.getGroupEvalValue.call(this,e.Value)||t.value},e}();Ke.decorators=[{type:t.Component,args:[{selector:"app-ztrendcard",template:'<div *ngIf="!isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="text-align: center;">\r\n <ion-grid>\r\n <ion-row>\r\n <ion-col>\r\n \x3c!-- <div class="trend-btn ion-activatable ripple-parent" [routerLink]="[item.URL]"> --\x3e\r\n <div class="trend-btn ion-activatable ripple-parent">\r\n <ion-label>\r\n <ion-grid style="width: 100%;">\r\n <ion-row>\r\n <ion-col class="trend-btn-icon" sizeLg="4" sizeXs="4" sizeMd="4" sizeXl="4">\r\n <fa-icon [icon]="options.icon" [style.color]="options.color"></fa-icon>\r\n </ion-col>\r\n <ion-col class="trend-btn-value" sizeLg="4" sizeXs="4" sizeMd="4" sizeXl="4">\r\n <ion-label>{{ options.value }}</ion-label><br/>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n </ion-label>\r\n <ion-label class="trend-btn-label">{{ options.title }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n</div>\r\n<div style="padding-bottom: 10px;"></div>\r\n\r\n\r\n\r\n\r\n\r\n',styles:[".trend-btn{display:flex;flex-flow:column;justify-content:center;align-items:stretch;background-color:#fff;padding:8px 0;border:1px solid #ccc;border-radius:5px;min-height:100px;cursor:pointer}.ripple-parent{position:relative;overflow:hidden}.trend-btn-label{text-align:right;font-size:14px;padding-right:20px}.trend-btn-value{text-align:right;zoom:2;vertical-align:middle;padding-top:10px}.trend-btn-icon{text-align:center;zoom:2.5}"]}]}],Ke.ctorParameters=function(){return[]},Ke.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ye=function(){function e(e,t,o,n,r,i){var l=this;this.alertService=e,this.authService=t,this.fieldService=o,this.resourceApiService=n,this.toastService=r,this.webApiService=i,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){l.componentProperties.isReadOnly=!e},this.setVisible=function(e){l.componentProperties.isVisible=e,l.data.Visible=e},this.setRequire=function(e){l.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,l.group,l.data.Value,l.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.initialDataValue=this.data.Value,a.ZComponentHelper.isNullUndefinedEmpty(this.data.Value)?this.loadEmptyForm():this.loadZudfForm()},e.prototype.loadEmptyForm=function(){var e=this;r.of(!0).pipe(i.tap((function(){e.data.SubType="zudf",e.data.Value=[]})),i.tap((function(){e.group["_zudf_"+e.data.Name]||(e.group["_zudf_"+e.data.Name]=new a.ZGroup);var t=e.group["_zudf_"+e.data.Name];t.zModel={},e.form=e.toFormGroup(e.data.Value),t.form=e.form})),i.tap((function(){e.formField=e.data.Value}))).subscribe((function(){a.ZComponentHelper.setFieldsDivClass(e.group._projectName,e.group.fieldName,e.data,e.authService)}))},e.prototype.loadZudfForm=function(){var e=this;r.of(!0).pipe(i.concatMap((function(t){var o=new r.AsyncSubject;return e.fieldService.getFormFieldCode(e.data.Value,"FormField",e,"fields").pipe(i.map((function(t){e.appendPrefix(t,"zudf_"+e.data.Name),e.data.Value=t,o.next(!0),o.complete()}))).subscribe(),o.asObservable()})),i.tap((function(){e.group["_zudf_"+e.data.Name]||(e.group["_zudf_"+e.data.Name]=new a.ZGroup);var t=e.group["_zudf_"+e.data.Name];t.zModel={},e.form=e.toFormGroup(e.data.Value),t.form=e.form})),i.tap((function(){e.formField=e.data.Value}))).subscribe((function(){a.ZComponentHelper.setFieldsDivClass(e.group._projectName,e.group.fieldName,e.data,e.authService),e.data.DisableReplaceValue&&(e.data.Value=e.initialDataValue)}))},e.prototype.getFormFieldzModel=function(){var e=this.group["_zudf_"+this.data.Name].form,t=this.group["_zudf_"+this.data.Name].zModel;this.resourceApiService.getURL("field");Object.assign(t,{parentFormId:5722,zudf_Name:"test"}),e.patchValue(t),e.markAsPristine()},e.prototype.toFormGroup=function(e){var t={};return this.getFormControls(e,t),new u.FormGroup(t)},e.prototype.getFormControls=function(e,t){var o=this;e.forEach((function(e){if("string"==typeof e.Value&&-1!==e.Value.indexOf("."))-1===["zgrid","ztree","zimg","textareajson"].indexOf(e.Type)&&console.warn("FormControl - invalid field value",e.Value);else if(Array.isArray(e.Value))o.getFormControls(e.Value,t);else{var n=a.ZComponentHelper.isFormControl(e),r=a.ZComponentHelper.isVisibleFormControl(o,e),i=a.ZComponentHelper.isRequiredFormControl(o,e);if(!0===n){var l=a.ZComponentHelper.getValidators(e,r,i);if(t[e.Value]=new u.FormControl(o.group["_zudf_"+o.data.Name].zModel[e.Value],l),a.ZComponentHelper.hasCCField(e.Type)){var s=a.ZComponentHelper.getCCValidators(e,r,i);t[e.CCValue]=new u.FormControl(o.group["_zudf_"+o.data.Name].zModel[e.CCValue],s)}}}}))},e.prototype.appendPrefix=function(e,t){var o=this;e.forEach((function(e){Array.isArray(e.Value)?o.appendPrefix(e.Value,t):(e.Name=t+"_"+e.Name,"zbuttons"!=e.Type&&(e.Value=t+"_"+e.Value),e.SubType=t)}))},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.appendFormControl=function(e,t,o){this.form.addControl(e,t),this.formField.push(o)},e.prototype.clearFormControl=function(){var e=this;this.formField.forEach((function(t){e.form.removeControl(t.Value)})),this.data.Value=this.initialDataValue,this.formField=[]},e}();Ye.decorators=[{type:t.Component,args:[{selector:"app-zudf",template:'<div style="padding: 15px" *ngIf="data.Title && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" class="ion-row">\r\n <kendo-card *ngIf="data.Title" width="100%" >\r\n <kendo-card-header >\r\n <div>\r\n <ion-label class="card-header-title">{{data.Title}}</ion-label>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body>\r\n <div class="ion-row">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of formField | divzlayout: data.zlayout"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="zudf{{data.Name}}-{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </kendo-card-body> \r\n </kendo-card>\r\n</div>\r\n\r\n<div *ngIf="!data.Title && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" class="ion-row">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of formField | divzlayout: data.zlayout"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="zudf{{data.Name}}-{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n</div>\r\n',styles:[".card-header-title{color:#fff!important;font-weight:500;font-size:11pt}"]}]}],Ye.ctorParameters=function(){return[{type:a.AlertService},{type:a.AuthService},{type:a.FieldService},{type:a.ResourceApiService},{type:a.ToastService},{type:a.WebApiService}]},Ye.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Qe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Qe.decorators=[{type:t.Component,args:[{selector:"app-zunknown",template:"<p>\r\n Unknown field Type => {{ data.Type}} >> {{data.Name}}\r\n</p>\r\n",styles:[""]}]}],Qe.ctorParameters=function(){return[]},Qe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Xe=function(){},et=function(){function e(e,t,o,n){var r=this;this.authService=e,this.compressImage=t,this.zcoreService=o,this.ngZone=n,this.componentProperties=new a.ZComponentProperties,this.uploadAttachmentUrl=null,this.uploadSaveUrl="/Attachment/Chunk_Upload_Save",this.uploadRemoveUrl="/Attachment/Chunk_Upload_Remove",this.downloadFileUrl="/Attachment/downloadFile",this.getImageUrl="/Attachment/getImage",this.isAutoUpload=!1,this.isMultiple=!1,this.imagePreviews=[],this.uid=[],this.showFileList=!0,this.fileList=[],this.restrictions={minFileSize:1,maxFileSize:4194304,allowedExtensions:["jpg","jpeg","png","bmp","pdf","txt","docx","doc","xlsx","xls","ppt","pptx","csv"]},this.chunkSettings={size:102400,maxAutoRetries:3},this.setEnable=function(e){var t=r.group.form.controls[r.data.Value];e?t.enable():t.disable(),r.componentProperties.isReadOnly=!e},this.setVisible=function(e){r.componentProperties.isVisible=e,r.data.Visible=e},this.setRequire=function(e){r.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,r.group,r.data.Value,r.componentProperties,u.Validators.required)},this.uploadAttachmentUrl=this.zcoreService.getEnvironment().uploadAttachmentUrl,this.uploadSaveUrl=this.uploadAttachmentUrl+this.uploadSaveUrl,this.uploadRemoveUrl=this.uploadAttachmentUrl+this.uploadRemoveUrl}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.SelectOptions&&(this.restrictions.allowedExtensions=this.data.SelectOptions),this.data.MinFileSize&&(this.restrictions.minFileSize=this.data.MinFileSize),this.data.MaxFileSize&&(this.restrictions.maxFileSize=this.data.MaxFileSize),this.isAutoUpload=this.data.AutoUpload||!1,this.data.AllowRemove||(this.uploadRemoveUrl=""),this.data.Multiple&&(this.isMultiple=this.data.Multiple)},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.onSuccess=function(e){if("remove"!==e.operation||e.response.type!==s.HttpEventType.Sent&&e.response.type!==s.HttpEventType.UploadProgress){Array.isArray(this.group.zModel[this.data.Value])||(this.group.zModel[this.data.Value]=[]);var t=e.files[0],o=this.group.zModel[this.data.Value].findIndex((function(e){return e.name===t.name&&e.uid===t.uid}));"upload"===e.operation?(t.myUid=t.uid,delete t.httpSubscription,-1!==o?this.group.zModel[this.data.Value][o]=t:this.group.zModel[this.data.Value].push(t)):"remove"===e.operation&&-1!==o&&this.group.zModel[this.data.Value].splice(o,1),this.group.subject.next({type:"zupload-onSuccess",target:this.data.OnSuccess,event:e,data:{value:e.files[0],field:this.data}})}},e.prototype.compressionConfigHandler=function(e){return e.FileSizeMaxSize&&(e.FileSizeMaxSizeByte=this.convertSizeToByte(e.FileSizeMaxSize)),e.FileSizeMinSize?e.FileSizeMinSizeByte=this.convertSizeToByte(e.FileSizeMinSize):e.FileSizeMinSizeByte=0,e},e.prototype.convertSizeToByte=function(e){var t=0,o=0,n="b",r=e.replace(/ /g,""),i=r.substr(r.length-1);if(isNaN(parseFloat(i))){var a=r.substr(r.length-2).slice(0,-1);switch(isNaN(parseFloat(a))?(n=a+n,t=parseFloat(r.slice(0,-2))):t=parseFloat(r.slice(0,-1)),n.toLowerCase()){case"b":o=t;break;case"kb":o=1024*t;break;case"mb":o=1048576*t;break;case"gb":o=1073741824*t}}else o=parseFloat(r);return o},e.prototype.uploadEventHandler=function(e){var t=this;e.files.forEach((function(e){if(e.rawFile&&e.rawFile.type.includes("image")&&!e.validationErrors){var o=new FileReader;o.onload=function(n){t.data.EnableImagePreview&&(t.uid.includes(e.uid)||(t.uid.push(e.uid),t.imagePreviews.push(Object.assign(Object.assign({},e),{src:o.result}))))},o.readAsDataURL(e.rawFile)}}));var o=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.UploadMetaData);o instanceof a.UploadMetaData||(console.error("UploadMetaData defined at "+this.data.UploadMetaData+" is invalid: ",o),o=new a.UploadMetaData(null,"0"));var n=JSON.stringify(o);e.data={additional:n},e.headers=e.headers.append("Authorization","Bearer "+this.authService.e1AccessToken)},e.prototype.onRemove=function(e){var t=this,o=this.fileList.findIndex((function(t){return t.uid===e.files[0].uid}));if(o>=0&&(this.fileList.splice(o,1),this.group["zupload_"+this.data.Value]=this.fileList),this.data.FileRemovedEvent)this.group.subject.next({type:"zupload-fileRemovedEvent",target:this.data.FileRemovedEvent,data:e});else{var n=e.files[0];e.data={id:n.myUid},e.headers=e.headers.append("Authorization","Bearer "+this.authService.e1AccessToken),this.data.EnableImagePreview&&e.files.forEach((function(e){t.imagePreviews=t.imagePreviews.filter((function(t){return t.uid!==e.uid}))}))}},e.prototype.onChange=function(e){this.data.FileChangedEvent&&this.group.subject.next({type:"zupload-fileChangedEvent",target:this.data.FileChangedEvent,data:e})},e.prototype.selectEventHandler=function(e){var t=this,o=this;this.data.SelectFileOnly?e.files.forEach((function(e){return q(t,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return e.rawFile?((t=new FileReader).onload=function(t){var n=Object.assign({},e);n.file=t.target.result,o.fileList.push(n),o.group["zupload_"+o.data.Value]=o.fileList,o.data.FileSelectedEvent&&o.group.subject.next({type:"zupload-fileSelectedEvent",target:o.data.FileSelectedEvent,data:o.fileList})},[4,t.readAsDataURL(e.rawFile)]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))})):this.data.AutoUpload||(!0===!!this.data.Compression&&e.files.forEach((function(e){if(e.rawFile&&e.rawFile.type.includes("image")&&!e.validationErrors){var n=t.compressionConfigHandler(t.data.Compression);e.size>n.FileSizeMinSizeByte&&o.compressImage.compress(e.rawFile,n).pipe(i.take(1)).subscribe((function(n){t.ngZone.run((function(){e.rawFile=n,e.size=n.size;var t=Object.assign({},e);o.fileList.push(t),(new FileReader).readAsDataURL(e.rawFile)})),console.log("Compressed file size: "+(e.rawFile.size/1024).toFixed(2)+"KB")}))}})),o.group["zupload_"+o.data.Value]=e.files)},e.prototype.clearFiles=function(){this.uploadComponent.clearFiles(),this.group["zupload_"+this.data.Value]=this.fileList},e}();et.decorators=[{type:t.Component,args:[{selector:"app-zupload",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" [ngClass]="getIon_InvalidClass(form, data)" style="margin-left: -15px;">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked" style="margin-bottom: 10px;">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <kendo-upload #uploadComponent\r\n *ngIf="!data.SelectFileOnly"\r\n [id]="data.Value"\r\n [autoUpload]="isAutoUpload"\r\n [saveUrl]="uploadSaveUrl"\r\n [removeUrl]="uploadRemoveUrl"\r\n [restrictions]="restrictions"\r\n [formControlName]="data.Value"\r\n [multiple]="isMultiple"\r\n [chunkable]="chunkSettings"\r\n [showFileList]="showFileList"\r\n (select)="selectEventHandler($event)"\r\n (remove)="onRemove($event)" \r\n (success)="onSuccess($event)"\r\n (upload)="uploadEventHandler($event)">\r\n </kendo-upload>\r\n\r\n <kendo-fileselect #uploadComponent\r\n *ngIf="data.SelectFileOnly"\r\n [id]="data.Value"\r\n (select)="selectEventHandler($event)"\r\n (remove)="onRemove($event)" \r\n (valueChange)="onChange($event)"\r\n [restrictions]="restrictions" >\r\n </kendo-fileselect>\r\n </span>\r\n </div>\r\n</ion-item>\r\n<br />\r\n\x3c!--<div class="wrap" *ngIf="data.EnableCompression">\r\n <ion-label>Enable Compression: </ion-label>\r\n <ion-checkbox style="margin: -5px 0;" color="primary" (ionChange)="toogleEnableCompression($event)"></ion-checkbox>\r\n</div>--\x3e\r\n<ion-label *ngIf="imagePreviews.length" position="stacked">\r\n Image Preview:\r\n</ion-label>\r\n<div *ngIf="imagePreviews.length" >\r\n <img *ngFor="let image of imagePreviews"\r\n [src]="image.src"\r\n alt="image preview"\r\n height="100"\r\n style="margin: 5px; border: 1px solid gray;"/>\r\n</div>\r\n',styles:[""]}]}],et.ctorParameters=function(){return[{type:a.AuthService},{type:a.CompressImageService},{type:a.ZCoreService},{type:t.NgZone}]},et.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],uploadComponent:[{type:t.ViewChild,args:["uploadComponent"]}]};var tt=function(){function e(e,t,o){var n=this;this.webApiService=e,this.resourceApiService=t,this.workflowService=o,this.componentProperties=new a.ZComponentProperties,this.e1wfs_wfcGetWorkflowButtonURL=this.resourceApiService.getURL("e1wfs_wfcGetWorkflowButtonURL"),this.e1wfs_wfc_getWorkflowInitialStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getWorkflowInitialStatusURL"),this.e1wfs_wfc_getDocumentStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getDocumentStatusURL"),this.items=[],this.dataFormFields={},this.FirstZbtn=!1,this.isLoading=!0,this.isLocalHostAPI=!1,this.setEnable=function(e){n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.group.resourceURL&&(this.isLocalHostAPI=!!this.group.resourceURL.toLowerCase().includes("localhost")),this.loadButton()},e.prototype.loadButton=function(){var e=this;this.items=[];var t=null;this.group.zModel&&(t=this.group.zModel.WFS_DocumentId),this.workflowService.appendWFS_DocumentsInfo(this.data.WorkflowCode,t),this.group.zButtonsCount++,1===this.group.zButtonsCount&&(this.FirstZbtn=!0);try{r.of(!0).pipe(i.concatMap((function(){return e.workflowService.getWorkflowButtonsField(e.data.WorkflowCode,e.e1wfs_wfcGetWorkflowButtonURL,String(e.isLocalHostAPI))})),i.tap((function(t){t?t.forEach((function(t){var o=e.getButtonLabel(t),n=JSON.parse(t.Attributes),r=n.Label||o;e.items.push({text:r,icon:a.ZComponentHelper.getIcon(n.Icon),visible:n.Visible,fieldAttribute:t,iconName:n.Icon,click:function(o){e.buttonClick(t)}})})):console.warn("unable to get workflow button. data returned null.")})),i.map((function(){if(!e.data.DisableSyncWorkflowStatus){if(!e.group.zModel.WFS_StatusName){var o={WorkflowMasterCode:e.data.WorkflowCode};return e.webApiService.httpPost$(e.e1wfs_wfc_getWorkflowInitialStatusURL,o).pipe(i.map((function(t){t.Data&&(a.ZComponentHelper.presetModelValue("WFS_StatusId",t.Data.Id,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusName",t.Data.Name,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusCode",t.Data.Code,e.group),e.workflowService.setCurrentDocumentStatus(t.Data))})))}var n={WorkflowMasterCode:e.data.WorkflowCode,DocumentId:t};e.webApiService.httpPost$(e.e1wfs_wfc_getDocumentStatusURL,n).pipe(i.map((function(t){e.workflowService.setCurrentDocumentStatus(t),t.Data&&e.workflowService.setCurrentDocumentStatus(t.Data)})))}}))).subscribe()}catch(e){console.error("error: ",e)}},e.prototype.buttonClick=function(e){var t=this,o=JSON.parse(e.Attributes);switch(e.TypeCode.toUpperCase()){case"FUNCTION":this.group.isTriggered=!0;var n=this.group;o.DisableTriggerTimer||setTimeout((function(){n.isTriggered=!1}),500),console.log("Functional Button: ",e.Name),this.workflowService.functionalButton_OnClick(o,this.group);break;case"GOTO":this.group.isTriggered=!0,console.log("GOTO Button: ",e.Name),this.workflowService.gotoButton_Onclick(e,this.data,o,this.group,this.isLocalHostAPI).subscribe((function(e){t.loadButton(),t.group.isTriggered=!1,e&&t.workflowService.triggerSendEmail(t.group).subscribe()}));break;default:console.log("Invalid Button Type. ",e.Name)}},e.prototype.getButtonLabel=function(e){var t=e.Name.match(/^{{.*}}$/gi);return t?(t=t[0].slice(2,-2),a.ZComponentHelper.getGroupValue(t,this.group)):e.Name},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFontAwesome=function(e){return""==e&&(e="help"),a.ZComponentHelper.getFontAwesome(e)},e}();tt.decorators=[{type:t.Component,args:[{selector:"app-zworkflowbuttons",template:'<div *ngIf="!group.isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && items.length > 0">\r\n\r\n <div class="ion-margin-vertical" *ngIf="isMobileScreen() && items.length > 1 && FirstZbtn === false">\r\n <kendo-dropdownbutton [data]="items" size="large" [look]="\'outline\'" class="ion-activatable ripple-parent">\r\n Actions\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </kendo-dropdownbutton>\r\n </div>\r\n\r\n <div *ngIf="!isMobileScreen() || items.length === 1 " style="padding: 10px 0px;" [class]="data.DivClass">\r\n \x3c!-- <button *ngFor="let item of items; let i = index" (click)="buttonClick(item.fieldAttribute)"\r\n kendoButton [togglable]="true" [icon]="item.icon" [hidden]="!isBtnVisible(item.visible)"\r\n style="margin-right: 5px;">\r\n {{item.text}}\r\n </button> --\x3e\r\n <ion-button fill="outline"\r\n color="dark"\r\n size="small"\r\n strong="false"\r\n *ngFor="let item of items; let i = index"\r\n class="button-container"\r\n (click)="buttonClick(item.fieldAttribute)"\r\n [hidden]="!isBtnVisible(item.visible)"\r\n [disabled]="group.isTriggered">\r\n <fa-icon [icon]="getFontAwesome(item.icon)" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">{{item.text}}</span>\r\n </ion-button>\r\n </div>\r\n</div>\r\n',styles:[".ripple-parent{position:relative;overflow:hidden}:host ::ng-deep span.ion-text-capitalize{font-weight:600}.button-container,.button:hover{font-size:12px;height:30px}.button:hover{border-radius:5px}"]}]}],tt.ctorParameters=function(){return[{type:a.WebApiService},{type:a.ResourceApiService},{type:a.WorkflowService}]},tt.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var ot=function(){function e(){}return e.prototype.mapByName=function(e){var t=e.toLocaleLowerCase();return{zbullet:ye,zbuttons:Ce,zcard:Se,zchart:ke,checkbox:we,zchip:xe,textareajson:Ie,textareahtml:Ie,zdate:Ve,zdatetime:Ve,zshortdate:Ve,zuidatetime:Ve,zuitime:Ve,zdiv:Pe,zgauge:ze,zgrid:De,zimg:Re,zkcard:Oe,zlabel:Me,zmfb:Ae,znumeric:Ne,post_select_input:Ee,pre_select_input:Ee,zphone_countrycode:Ee,zquerybuilder:Le,zreport:Ze,zcalendar:Ge,zuiselectmultiple:Be,zuiselectmultiple_button:Be,select:Be,ztab:je,number:qe,numeric:qe,date:qe,email:qe,password:qe,search:qe,tel:qe,text:qe,url:qe,currency:qe,textarea:_e,ztexteditor:Ue,ztree:We,ktree_list:Je,ztrendcard:Ke,unknown:Qe,zudf:Ye,zupload:et,zworkflowbuttons:tt}[t]},e.prototype.isSkipComponentType=function(e){return a.ZComponentHelper.isSkipComponentType(e)},e.prototype.loadComponent=function(e,t,o,n,r){if(!this.isSkipComponentType(o.Type)){var i,a=this.mapByName(o.Type);i=a?e.resolveComponentFactory(a):e.resolveComponentFactory(this.mapByName("unknown"));var l=t.viewContainerRef;l.clear(),r||console.warn("FormGroup is empty!");var s=l.createComponent(i);s.instance.data=o,s.instance.group=n,s.instance.form=r}},e.prototype.appendComponentToDynamicForm=function(e,t,o,n,r,i){if(!this.isSkipComponentType(n.Type)){var a,l=this.mapByName(n.Type);a=l?e.resolveComponentFactory(l).create(t):e.resolveComponentFactory(this.mapByName("unknown")).create(t),o.attachView(a.hostView);var s=a.hostView.rootNodes[0];return document.querySelector("#"+i).appendChild(s),a.instance.data=n,a.instance.group=r,a}},e}();ot.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new ot},token:ot,providedIn:"root"}),ot.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ot.ctorParameters=function(){return[]};var nt=function(){function e(e,t){this.componentFactoryResolver=e,this.zcomponentService=t}return e.prototype.ngOnInit=function(){this.zcomponentService.loadComponent(this.componentFactoryResolver,this.fieldElement,this.field,this.group,this.form)},e.prototype.ngOnDestroy=function(){},e}();nt.decorators=[{type:t.Component,args:[{selector:"app-zformcontrol",template:'\x3c!-- <ion-col size=12 sizeSm="12" sizeMd="6" sizeLg="4" sizeXl="3" fieldelement></ion-col> --\x3e\r\n<span fieldelement></span>',styles:[""]}]}],nt.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:ot}]},nt.propDecorators={field:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],fieldElement:[{type:t.ViewChild,args:[ee,{static:!0}]}]};var rt=function(){};rt.decorators=[{type:t.NgModule,args:[{declarations:[X,ee,te,oe,ne,re,ie,ae,le,se,pe,de,ue,ge,ce,be,he,fe,me,ve,ye,Ce,Se,ke,we,xe,Ie,Fe,Ve,Pe,Te,nt,ze,De,Re,Oe,Me,Ae,K,Y,Ne,Ee,Le,Ze,Ge,Be,je,qe,_e,Ue,We,Je,Ke,Qe,Ye,et,tt],imports:[n.IonicModule,g.IonicSelectableModule,c.CommonModule,o.RouterModule,u.FormsModule,u.ReactiveFormsModule,h.AceEditorModule,f.FontAwesomeModule,m.QueryBuilderModule,b.ArcGaugeModule,v.ButtonsModule,y.ChartsModule,C.CalendarModule,C.DateInputsModule,S.DropDownsModule,k.EditorModule,d.GridModule,d.ExcelModule,w.IndicatorsModule,x.IntlModule,I.InputsModule,I.SwitchModule,I.TextBoxModule,F.LabelModule,V.LayoutModule,V.PanelBarModule,V.TabStripModule,P.PopupModule,T.ProgressBarModule,z.TelerikReportingModule,D.SchedulerModule,R.TreeListModule,O.TreeViewModule,M.TooltipModule,A.UploadModule,A.UploadsModule,a.ZCoreModule,l.MmhglobalZmodalModule],exports:[X,ee,te,oe,ne,re,ie,ae,le,se,pe,de,ue,ge,ce,he,fe,me,be,ve,ye,Ce,Se,ke,we,xe,Ie,Fe,Ve,Pe,Te,nt,ze,De,Re,Oe,Me,Ae,K,Y,Ne,Ee,Le,Ze,Ge,Be,je,qe,_e,Ue,We,Je,Ke,Qe,Ye,et,tt],entryComponents:[pe,de,ue,ge,ce,he,fe,me,be,ve,ye,Ce,Se,ke,we,xe,Ie,Fe,Ve,Pe,Te,nt,ze,De,Re,Oe,Me,Ae,K,Y,Ne,Ee,Le,Ze,Ge,Be,je,qe,_e,Ue,We,Je,Ke,Qe,Ye,et,tt],providers:[l.ModalService],schemas:[t.CUSTOM_ELEMENTS_SCHEMA]}]}],e.DateParserFilter=re,e.DateRangeFilterCellComponent=pe,e.DivzLayout=ae,e.EditorFilter=ie,e.ExportOptions=le,e.FieldElementDirective=ee,e.MainService=Q,e.MmhglobalDynamicformModule=rt,e.MyFileInfo=Xe,e.OpenOnFocusDirective=ne,e.ScrollbarThemeDirective=X,e.TabFilter=se,e.UiactionbuttonComponent=be,e.UiappmenucontentComponent=me,e.UicontentComponent=ge,e.UiheaderComponent=ue,e.UimenubuttonComponent=fe,e.UimenucontentComponent=he,e.UipageComponent=ce,e.UivalidationmessageComponent=ve,e.ZBulletComponent=ye,e.ZChipComponent=xe,e.ZGridBindingDirective=te,e.ZGridPopupAnchorDirective=oe,e.ZSchedulerToolBarComponent=de,e.ZTreeListOptions=$e,e.ZbuttonsComponent=Ce,e.ZcardComponent=Se,e.ZchartComponent=ke,e.ZcheckboxComponent=we,e.ZcodeeditorComponent=Ie,e.ZdaterangeComponent=Fe,e.ZdatetimeComponent=Ve,e.ZdivComponent=Pe,e.ZformComponent=Te,e.ZformcontrolComponent=nt,e.ZgaugeComponent=ze,e.ZgridComponent=De,e.ZimgComponent=Re,e.ZkcardComponent=Oe,e.ZlabelComponent=Me,e.ZmfbComponent=Ae,e.ZmodalComponent=K,e.ZmodalMobileComponent=Y,e.ZnumericComponent=Ne,e.ZpostselectinputComponent=Ee,e.ZquerybuilderComponent=Le,e.ZreportComponent=Ze,e.ZschedulerComponent=Ge,e.ZselectmultipleComponent=Be,e.ZtabComponent=je,e.ZtextComponent=qe,e.ZtextareaComponent=_e,e.ZtexteditorComponent=Ue,e.ZtreeComponent=We,e.ZtreelistComponent=Je,e.ZtrendcardComponent=Ke,e.ZudfComponent=Ye,e.ZunknownComponent=Qe,e.ZuploadComponent=et,e.ZworkflowbuttonsComponent=tt,e.refreshGrid=function(e){var t=e.gridOptions;t&&t.getData(),e.isTriggered=!1},e.toQueryRule=He,e.ɵa=J,e.ɵb=ot,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var B=function(e,t){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}function q(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((n=n.apply(e,t||[])).next())}))}function _(e,t){var o,n,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}Object.create;function U(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}Object.create;var J=function(){function e(e,t,o,n,r,i,a){this.router=e,this.alertService=t,this.authService=o,this.fieldService=n,this.resourceApiService=r,this.toastService=i,this.webApiService=a}return Object.defineProperty(e.prototype,"debug",{get:function(){return this.scope.group._debug},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this.scope.group},enumerable:!1,configurable:!0}),e.prototype.onInitDebugger=function(e,t){e._debug=new a.ZGroup(!0),e._isDebugging=!0,e._debug.zData={collectedActivities:[],activityCount:0,collectedWorkflowButtons:[],workflowButtonCount:0},e._debug.zComponents={},e.isListForm=!1,this.mainService=t},e.prototype.onStartDebugger=function(e,t){var o=this;this.scope=t,t.group._debug||(t.group._debug={});var n=t.group._debug;return t.form=t.toFormGroup(e),n.form=t.form,t.subscription&&t.subscription.unsubscribe(),Object.assign(n,{zModel:{},subject:new r.BehaviorSubject(null),isEdit:!0,isNew:!1,_debug:t.group._debug,_group:t.group,resourceURL:this.resourceApiService.getURL("field"),treeItemTemplate:this.treeItemTemplate,onItemClick:this.onItemClick,onTreeNodeChange:this.onTreeNodeChange,onAddNode:this.onAddNode,onRemoveNode:this.onRemoveNode,treeNodesExpandAll:this.treeNodesExpandAll,treeNodesCollapseAll:this.treeNodesCollapseAll,refreshTreeModel:this.refreshTreeModel,addNode:this.addNode,refreshActivityLogData:this.LoadGridData.bind(this),GoToFieldElement:this.gotoFieldElement.bind(this),ListWatchName:this.listWatchName,onChangeWatchName:this.onChangeWatchName.bind(this),getWatchName:this.getWatchName.bind(this),fieldElementonEditorCodeChange:this.fieldElementonEditorCodeChange.bind(this),gridActivityLogColumnFields:this.fieldService.getFormFieldCode("debugActivityLog","FormField",this.group,"debugActivityLogField"),gridActivityLogOnItemClick:this.gridActivityLogOnItemClick.bind(this),updateModel:this.updateModel.bind(this),refreshWorkflowButtonData:this.loadWorkflowData.bind(this),gridWorkflowButtonColumnFields:this.fieldService.getFormFieldCode("debugWorkflowButton","FormField",this.group,"debugWorkflowButtonField"),gridWorkflowButtonOnItemClick:this.gridWorkflowButtonOnItemClick.bind(this)}),n.zData||(n.zData={collectedActivities:[],activityCount:0}),t.subscription=n.subject.subscribe((function(e){return o.subjectEvent(e,n,o)})),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,e,this.authService),this.loadDebugZModel(t)},e.prototype.loadDebugZModel=function(e){e.group._debug;var t=[];t.push(this.getProjectId());var o=e.group.isListForm?"ListField":"FormField",n=e.group.fieldName,i=this.getFieldzModel(o,n);return t.push(i),r.forkJoin(t)},e.prototype.getProjectId=function(){var e=this.debug,t=this.resourceApiService.getURL("projectsURL");return this.webApiService.getApi(t,{},e.zData,"ProjectOptions",null,e,!1)},e.prototype.getFieldzModel=function(e,t){return"FormField"===e?this.getFormFieldzModel(t):this.getListFieldzModel(t)},e.prototype.getFormFieldzModel=function(e){var t=this.debug,o=this.resourceApiService.getURL("field");return this.webApiService.httpGet$(o,{name:e,type:"FormField"}).pipe(i.tap((function(e){Object.assign(t.zModel,e),t.form.patchValue(t.zModel),t.form.markAsPristine();var o=JSON.parse(t.zModel.Code);Object.assign(t,{treeModel:a.ZComponentHelper.convertTreeModel(o)})})))},e.prototype.getListFieldzModel=function(e){var t=this,o=this.debug,n=this.resourceApiService.getURL("fieldsMapping"),r=this.resourceApiService.getURL("field");return this.webApiService.httpGet$(n,{name:e}).pipe(i.switchMap((function(e){return t.webApiService.httpGet$(r,{id:e.FieldElementMasterId})})),i.tap((function(e){Object.assign(o.zModel,e),o.form.patchValue(o.zModel),o.form.markAsPristine();var t=JSON.parse(o.zModel.Code);Object.assign(o,{treeModel:a.ZComponentHelper.convertTreeModel(t)})})))},e.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&!e.target.startsWith("modalGroup.")){var n;try{n=a.ZComponentHelper.getGroupEvalValue.call(o,e.target)}catch(t){console.warn("Error when getGroupValue: ",e.target," > Error: ",t)}if("function"==typeof n)n.bind(o)(e,t,o);else if("string"==typeof n){if(e.type.endsWith("onNavigateTo")){var r=e.target.replace("/:id","/"+e.data);return void this.router.navigate([r])}if("zgrid-cellClick"===e.type){var i=n.slice(4);this.mainService.showzModal(e.columnFields$||i,t,"",{},e.data.Id)}}else if("object"==typeof n){if("zgrid-cellClick"===e.type){if(n.navigateUrl){var l=n.navigateUrl.replace(":id",e.data.Id);return void this.router.navigate([l])}if(n.formHeader)return void this.mainService.showzModal(e.columnFields$||n.ctrlName,t,n.formHeader,{},e.data.Id);console.warn("Invalid callFunc type: ",n," event.Target: ",e.target)}}else console.warn("Function not defined in group for: ",e.target,", Event: ",e)}},e.prototype.gridActivityLogOnItemClick=function(e){var t=this,o=e.dataItem;switch(o.type){case"ListField":case"FormField":this.getFieldzModel(o.type,o.activityName).subscribe((function(){t.selectTab(0)}));break;case"ResourceServerAPI":var n="_debug.zData.collectedActivities["+(o.index-1)+"].reference";this.setWatchNameValue(n),this.selectTab(1);break;case"HttpGet$":case"HttpPost$":case"HttpPut$":case"HttpDelete$":this.setWatchNameValue("_debug.zData.collectedActivities["+(o.index-1)+"]"),this.selectTab(1)}},e.prototype.selectTab=function(e){a.ZComponentHelper.getComponent(this.debug,"ztab_debuggerTabs").selectTab(e)},e.prototype.setWatchNameValue=function(e){this.debug.zModel.DebugWatchName=e,a.ZComponentHelper.setModelValue("WatchName",e,this.debug,!0)},e.prototype.LoadGridData=function(){var e=a.ZComponentHelper.getComponent(this.debug,"zgrid_ActivityLogGrid");e&&e.setData(this.debug.zData.collectedActivities)},e.prototype.listWatchName=function(e,t,o,n,i,a){var l,s=[{Name:"group.zModel"},{Name:"group.zData"},{Name:"group.fields"},{Name:"group.form.value"},{Name:"group.backNavigationPage"},{Name:"group.parentReferenceField"},{Name:"group.parentReferenceId"},{Name:"Object.keys(group.zComponents)"},{Name:"group.gridOptions.zgrid.grid.data"}];return t&&(l=s.filter((function(e){return-1!==e.Name.toLowerCase().indexOf(t.toLowerCase())}))),0===o&&t?r.of({dataSet:l}):0===o?r.of({dataSet:s}):r.of({dataSet:[]})},e.prototype.getWatchName=function(){return this.debug.zModel.DebugWatchName},e.prototype.onChangeWatchName=function(e,t,o){var n=e.data.value;n&&(this.debug.zModel.DebugWatchName=n.replace("group","_group"))},e.prototype.fieldElementonEditorCodeChange=function(e){this.refreshTreeModel()},e.prototype.treeNodesExpandAll=function(){this.debug.zComponents.ztree_debugZTree.expandAll()},e.prototype.treeNodesCollapseAll=function(){this.debug.zComponents.ztree_debugZTree.collapseAll()},e.prototype.refreshTreeModel=function(){try{var e=JSON.parse(this.debug.zModel.Code);this.debug.treeModel=a.ZComponentHelper.convertTreeModel(e)}catch(e){}},e.prototype.treeItemTemplate=function(e){var t;return e.dataItem.Name+" - ["+e.dataItem.Type+"] = "+("string"==typeof(t=e.dataItem)._DataValue?t._DataValue:"...")},e.prototype.onItemClick=function(e){return q(this,void 0,void 0,(function(){var t,o,n,r=this;return _(this,(function(i){switch(i.label){case 0:return console.log("onItemClick data received: ",e),t=this.fieldService.getFormFieldCode("mvEditFieldNodeForm","FormField",null,null),(o=Object.assign({},e.data)).Value=o._DataValue,delete o._DataValue,n={nodeModel:JSON.stringify(o,null,2)},[4,this.mainService.showzModal(t,this.debug._group,"Field Element Info",n)];case 1:return i.sent().subscribe((function(t){if("cancel"!==t.responseType){var o=JSON.parse(t.data.nodeModel);o.Value&&(o._DataValue=o.Value,o.Value=null),r.updateTreeNode(o,r.debug.treeModel,e.event);var n=JSON.parse(JSON.stringify(r.debug.treeModel)),i=a.ZComponentHelper.revertTreeModel(n),l=JSON.stringify(i,null,2);a.ZComponentHelper.setModelValue("Code",l,r.debug),r.updateModel()}})),[2]}}))}))},e.prototype.updateTreeNode=function(e,t,o){var n=o.split("_");if(n.length>1){var r=n.slice(1).join("_");this.updateTreeNode(e,t[+n[0]].Value,r)}else t[+n[0]].Value&&(e.Value=t[+n[0]].Value),t[+n[0]]=e},e.prototype.insertTreeNode=function(e,t,o){var n=o.split("_");if(n.length>1){var r=n.slice(1).join("_");this.insertTreeNode(e,t[+n[0]].Value,r)}else n[0]?(Array.isArray(t[+n[0]].Value)||(t[+n[0]].Value=[]),t[+n[0]].Value.push(e)):t.push(e)},e.prototype.removeTreeNode=function(e,t){var o=t.split("_");if(o.length>1){var n=o.slice(1).join("_");this.removeTreeNode(e[+o[0]].Value,n)}else e.splice(+o[0],1)},e.prototype.onTreeNodeChange=function(e){console.log("onTreeNodeChange: ",e);var t=JSON.stringify(e.data);a.ZComponentHelper.setModelValue("Code",t,this.debug)},e.prototype.addNode=function(){this.onAddNode({data:{},rowData:{},event:"",target:"",type:"",columnFields$:null})},e.prototype.onAddNode=function(e){return q(this,void 0,void 0,(function(){var t,o,n,r=this;return _(this,(function(i){switch(i.label){case 0:return console.log("onAddNode is called",e),t=this.fieldService.getFormFieldCode("mvEditFieldNodeForm","FormField",null,null),o={Name:"Name",DisplayName:"Name",Value:"Name",Type:"text",gridColVisible:!0,width:150,minWidth:100,enableFiltering:!0,enableSorting:!0,pinnedLeft:!1,PlaceHolder:"Name",IsRequired:!1,MinLength:2,MaxLength:50,Label:"Name:",DivClass:"col-xs-12 col-sm-6 col-md-6 col-lg-3",ReadOnly:!1,ShowLabel:!0,Visible:!0},n={nodeModel:JSON.stringify(o,null,2)},[4,this.mainService.showzModal(t,this.debug,"Add Field Element Item",n)];case 1:return i.sent().subscribe((function(t){if("cancel"!==t.responseType){var o=JSON.parse(t.data.nodeModel);o.Value&&(o._DataValue=o.Value,o.Value=null),r.insertTreeNode(o,r.debug.treeModel,e.event);var n=JSON.parse(JSON.stringify(r.debug.treeModel)),i=a.ZComponentHelper.revertTreeModel(n),l=JSON.stringify(i,null,2);a.ZComponentHelper.setModelValue("Code",l,r.debug),r.updateModel()}})),[2]}}))}))},e.prototype.onRemoveNode=function(e){var t=this;this.alertService.show("Remove Node","Are you sure?",[{text:"No",cssClass:"secondary"},{text:"Yes",cssClass:"primary"}]).subscribe((function(o){if("Yes"===o){console.log("Remove Node",e),t.removeTreeNode(t.debug.treeModel,e.event);var n=JSON.parse(JSON.stringify(t.debug.treeModel)),r=a.ZComponentHelper.revertTreeModel(n),i=JSON.stringify(r,null,2);a.ZComponentHelper.setModelValue("Code",i,t.debug)}}))},e.prototype.gotoFieldElement=function(){this.router.navigate(["admin/field"])},e.prototype.updateModel=function(){var e=this,t=this.debug,o=this.debug.form;if(o.dirty)if(o.valid)r.of(t.zModel).pipe(i.tap((function(){Object.assign(t.zModel,o.value)})),i.switchMap((function(){return e.webApiService.httpPut$(t.resourceURL+"/"+t.zModel.Id,t.zModel).pipe(i.map((function(t){return e.handleSuccess(t,"Record is updated successfully.")})))})),i.switchMap((function(e){return console.log("After Debug Form updated, zModel:",e),e&&e.Data&&(Object.assign(t.zModel,e.Data),o.patchValue(e.Data)),o.markAsPristine(),r.of([])}))).subscribe();else{var n=a.ZComponentHelper.getFormGroupErrors(o,this.alertService);console.warn("Debug Form Validation got error(s):",n)}else console.warn("Debug Form is not dirty hence record is not save.")},e.prototype.loadWorkflowData=function(){var e=a.ZComponentHelper.getComponent(this.debug,"zgrid_WorkflowButtonGrid");e&&e.setData(this.debug.zData.collectedWorkflowButtons)},e.prototype.gridWorkflowButtonOnItemClick=function(e){var t=this,o=Object.assign({},e.dataItem),n=o.refField,r=o.refAttribute,a=(new s.HttpParams).set("ButtonId",n.Id);this.webApiService.httpPost$(this.resourceApiService.getURL("e1wfs_wfc_getmappedButtonInfoURL"),a).pipe(i.map((function(e){return q(t,void 0,void 0,(function(){var t,o,i,a,l,s,p,d,c;return _(this,(function(u){switch(u.label){case 0:return t=[],o=[],i=[],e.MappedRoleList&&(t=e.MappedRoleList),e.MappedStatusList&&e.MappedStatusList.forEach((function(e){o.push(e.Name+" ("+e.Code+")")})),e.MappedParentStatusList&&e.MappedParentStatusList.forEach((function(e){i.push(e.Name+" ("+e.Code+")")})),a={mappedRoleInfo:t.length>0?t:"N.A.",mappedStatusInfo:o.length>0?o:"N.A.",mappedParentStatusInfo:i.length>0?i:"N.A."},l={WorkflowId:n.WorkflowId,ButtonId:n.Id,ButtonName:n.Name,ButtonCode:n.Code,ButtonTypeId:n.Type.Id,ButtonTypeName:n.Type.Name,ButtonTypeCode:n.Type.Code,ButtonVisible:r.Visible,ButtonClickEvent:r.ClickEvent,ButtonURL:r.URL,ButtonIcon:r.Icon},s={GotoStatusId:"N.A.",GotoStatusName:"N.A.",GotoStatusCode:"N.A."},n.Status&&(p=n.Status,s={GotoStatusId:p.Id,GotoStatusName:p.Name,GotoStatusCode:p.Code}),d=Object.assign(l,s,a),c=this.fieldService.getFormFieldCode("mvWorkflowButtonDebugForm","FormField",null,null),[4,this.mainService.showzModal(c,this.debug._group,"Workflow Button Info",d)];case 1:return u.sent().subscribe((function(e){e.responseType})),[2]}}))}))}))).subscribe()},e.prototype.handleSuccess=function(e,t){var o=this;return null==e?this.toastService.show(t):void 0!==e.Data&&void 0!==e.ProcessingStatus?!0===e.ProcessingStatus&&(Array.isArray(e.Data)?e.Data.map((function(e){return o.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t+" : "+e.CostCode,null)})):this.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t,null)):this.toastService.show(t),e},e.prototype.handleError=function(e){return this.webApiService.handleError(e)},e}();J.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new J(t.ɵɵinject(o.Router),t.ɵɵinject(a.AlertService),t.ɵɵinject(a.AuthService),t.ɵɵinject(a.FieldService),t.ɵɵinject(a.ResourceApiService),t.ɵɵinject(a.ToastService),t.ɵɵinject(a.WebApiService))},token:J,providedIn:"root"}),J.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],J.ctorParameters=function(){return[{type:o.Router},{type:a.AlertService},{type:a.AuthService},{type:a.FieldService},{type:a.ResourceApiService},{type:a.ToastService},{type:a.WebApiService}]};var K=function(e){function t(t,o,n,r,i,l,s,p){var d=e.call(this,t)||this;return d.dialog=t,d.modalCtrl=o,d.zcoreService=n,d.webApiService=r,d.resourceApiService=i,d.fieldService=l,d.platform=s,d.alertService=p,d.group=new a.ZGroup(!0),d}return j(t,e),t.prototype.ngOnInit=function(){l.ZmodalHelper.onInit_ModalForm(this)},t.prototype.ngOnDestroy=function(){l.ZmodalHelper.onDestroy_ModalForm(this)},t.prototype.onCancel=function(e){l.ZmodalHelper.onCancel(this,e)},t.prototype.onConfirm=function(e){l.ZmodalHelper.onConfirm(this,e)},t.prototype.onInitClose=function(e){l.ZmodalHelper.onInitClose(this,e)},t.prototype.isSITEnvironment=function(){return this.zcoreService.isDebugSession()},t.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&e.target.startsWith("modalGroup")){console.log(">> SubjectEvent",e);var n=a.ZComponentHelper.getGroupEvalValue.call(this,e.target,t);if("function"==typeof n){var r=this.group.form;if(Object.assign(this.group.zModel,r.value),e.data=this.group.zModel,e.target.startsWith("modalGroup.modalAnswer")||e.target.startsWith("modalGroup.modalClose")||e.target.startsWith("modalGroup.modalCancel"))n.bind(this)(e);else n.bind(t.ctrlScope)(e)}else console.warn("Function not defined in group for: ",n,", Event: ",e)}},t.prototype.getModel$=function(e,t){var o=t||e.referenceId;return this.webApiService.httpGet$(e.resourceURL+"/"+o,null)},t.prototype.getGridStyle=function(){if(!this.isMobileScreen)return{"height.px":500,"width.px":700}},t.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},t}(p.DialogContentBase);K.decorators=[{type:t.Component,args:[{selector:"app-zmodal",template:'<ion-header *ngIf="isMobileScreen()">\r\n <ion-toolbar>\r\n <ion-buttons slot="start">\r\n <ion-button (click)="onCancel()">\r\n \x3c!-- <ion-icon name="close"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times\'" size="lg"></fa-icon>\r\n </ion-button>\r\n </ion-buttons>\r\n <ion-title>\r\n {{ modalParams.formHeader }}\r\n </ion-title>\r\n <ion-buttons slot="primary" *ngIf="!group.isLoading">\r\n <app-uiactionbutton [group]="group"></app-uiactionbutton>\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content appScrollbarTheme [ngStyle]="getGridStyle()">\r\n <ion-grid>\r\n <ion-row *ngIf="group.isLoading" class="ion-text-center">\r\n <ion-col class="ion-margin ion-padding">\r\n <ion-spinner></ion-spinner>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="!group.isLoading">\r\n <ion-col>\r\n <app-zform [group]="group"></app-zform>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="isSITEnvironment() && !group.isLoading">\r\n <ion-col>\r\n <pre style="font-size: x-small;">{{group.zModel | json}}</pre>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n</ion-content>\r\n\r\n',styles:[""]}]}],K.ctorParameters=function(){return[{type:p.DialogRef},{type:n.ModalController},{type:a.ZCoreService},{type:a.WebApiService},{type:a.ResourceApiService},{type:a.FieldService},{type:n.Platform},{type:a.AlertService}]},K.propDecorators={modalParams:[{type:t.Input}]};var Y=function(){function e(e,t,o){this.webApiService=e,this.zcoreService=t,this.fieldService=o,this.group=new a.ZGroup(!0)}return e.prototype.ngOnInit=function(){l.ZmodalHelper.onInit_ModalForm(this)},e.prototype.ngOnDestroy=function(){l.ZmodalHelper.onDestroy_ModalForm(this)},e.prototype.onCancel=function(e){l.ZmodalHelper.onCancel(this,e)},e.prototype.onConfirm=function(e){l.ZmodalHelper.onConfirm(this,e)},e.prototype.onInitClose=function(e){l.ZmodalHelper.onInitClose(this,e)},e.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&e.target.startsWith("modalGroup")){console.log(">> SubjectEvent",e);var n=a.ZComponentHelper.getGroupEvalValue.call(this,e.target,t);if("function"==typeof n){var r=this.group.form;if(Object.assign(this.group.zModel,r.value),e.data=this.group.zModel,e.target.startsWith("modalGroup.modalAnswer")||e.target.startsWith("modalGroup.modalCancel"))n.bind(this)(e);else n.bind(t.ctrlScope)(e)}else console.warn("Function not defined in group for: ",n,", Event: ",e)}},e.prototype.getModel$=function(e,t){var o=t||e.referenceId;return this.webApiService.httpGet$(e.resourceURL+"/"+o,null)},e.prototype.getGridStyle=function(){if(!this.isMobileScreen)return{"height.px":500,"width.px":700}},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isSITEnvironment=function(){return this.zcoreService.isDebugSession()},e}();Y.decorators=[{type:t.Component,args:[{selector:"app-zmodal",template:'<ion-header *ngIf="isMobileScreen()">\r\n <ion-toolbar>\r\n <ion-buttons slot="start">\r\n <ion-button (click)="onCancel()">\r\n \x3c!-- <ion-icon name="close"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times\'" size="lg"></fa-icon>\r\n </ion-button>\r\n </ion-buttons>\r\n <ion-title>\r\n {{ modalParams.formHeader }}\r\n </ion-title>\r\n <ion-buttons slot="primary" *ngIf="!group.isLoading">\r\n <app-uiactionbutton [group]="group"></app-uiactionbutton>\r\n </ion-buttons>\r\n </ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content appScrollbarTheme [ngStyle]="getGridStyle()">\r\n <ion-grid>\r\n <ion-row *ngIf="group.isLoading" class="ion-text-center">\r\n <ion-col class="ion-margin ion-padding">\r\n <ion-spinner></ion-spinner>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="!group.isLoading">\r\n <ion-col>\r\n <app-zform [group]="group"></app-zform>\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="isSITEnvironment() && !group.isLoading">\r\n <ion-col>\r\n <pre style="font-size: x-small;">{{group.zModel | json}}</pre>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n</ion-content>\r\n\r\n',styles:[""]}]}],Y.ctorParameters=function(){return[{type:a.WebApiService},{type:a.ZCoreService},{type:a.FieldService}]},Y.propDecorators={modalParams:[{type:t.Input}]};var Q=function(){function e(e,t,o,n,r,i,a,l,s,p,d,c){this.router=e,this.modalCtrl=t,this.navController=o,this.alertService=n,this.cacheService=r,this.fieldService=i,this.resourceApiService=a,this.toastService=l,this.webApiService=s,this.zcoreService=p,this.modalService=d,this.debugService=c,console.log("MainService constructor"),this.oauthEnvironmentUrl=this.zcoreService.getEnvironment().e1OauthUrl+"/"}return e.prototype.startUp=function(){console.log("At main.service (StartUp) ...")},e.prototype.setGroup=function(e){this.group=e,this.fieldService.setGroup(e),this.resourceApiService.setGroup(e),this.webApiService.setGroup(e),(this.zcoreService.isDebugSession()||!1)&&this.debugService.onInitDebugger(e,this)},e.prototype.getResourceServerData=function(){return this.resourceApiService.loadData()},e.prototype.getGroupFields=function(e,t,o,n){return this.fieldService.getFormFieldCode(e,t,o,n)},e.prototype.initializeGroup=function(e,t,o,n){var i=this;n.subscription&&n.subscription.unsubscribe();var a=e.resourceURLName||t;return e.resourceURLName=a,Object.assign(e,{resourceURL:this.resourceApiService.getURL(a),gridColumnFields:this.fieldService.getFormFieldCode(t,"FormField",null,null),ctrlScope:n,pageName:o,ctrlName:t,editModelURL:t.toLowerCase(),isLoading:!0,fields:[],zModel:{},zComponents:{},zData:{},subject:new r.BehaviorSubject(null),cancelButtonName:"Close",zButtonsCount:0,backNavigation:this.backNavigation.bind(this),historyBack:this.historyBack.bind(this),refreshPage:this.refreshPage,refreshGrid:this.refreshGrid.bind(this),updateModel:this.updateModel.bind(this),createModel:this.createModel.bind(this),cloneNewModel:this.cloneNewModel.bind(this),deleteModel:this.deleteModel.bind(this),newModel:this.newModel.bind(this)}),n.subscription=e.subject.subscribe((function(t){return i.subjectEvent(t,e,n)})),n.subscription},e.prototype.getModel$=function(e,t){var o=this,n=t||e.referenceId;return this.webApiService.httpGet$(e.resourceURL+"/"+n,null).pipe(i.tap((function(t){e.zModel=t,e.parentReferenceField&&-1!==Object.keys(t).indexOf(e.parentReferenceField)&&!e.backNavigationPage.endsWith(".edit")&&(e.backNavigationPage=e.backNavigationPage+"/"+t[e.parentReferenceField].toString()+"/edit")})),i.switchMap((function(){return e.afterGetModelSuccess?o.afterGetModelSuccess(e):r.of([])})))},e.prototype.canExit=function(e){return!e||!e.dirty||(!!e.skipDirtyCheck||this.alertService.show("Data not save yet","Are you sure want to discard the changes?",["Cancel","Discard Changes"]).pipe(i.switchMap((function(e){return"Discard Changes"===e?r.of(!0):r.of(!1)}))))},e.prototype.closeModalForm=function(){this.modalCtrl.dismiss()},e.prototype.subjectEvent=function(e,t,o){if(e&&e.target&&!e.target.startsWith("modalGroup.")){var n;console.log(">> SubjectEvent",e);try{n=a.ZComponentHelper.getGroupEvalValue.call(t.ctrlScope,e.target,t)}catch(t){console.warn("Error when getGroupValue: ",e.target," > Error: ",t)}if("function"==typeof n)n.bind(o)(e,t,o);else if("string"==typeof n){if(e.type.endsWith("onNavigateTo")){var r=e.target.replace("/:id","/"+e.data);return void this.router.navigate([r])}if("zgrid-cellClick"===e.type){var i=n.slice(4);this.modalService.show(e.columnFields$||i,t,"",{},e.data.Id)}}else if("object"==typeof n){if("zgrid-cellClick"===e.type){if(n.navigateUrl){var l=n.navigateUrl.replace(":id",e.data.Id);return void this.router.navigate([l])}var s={};if(s.controllerName=n.ctrlName,s.referId=e.data.Id,s.colFields$=e.columnFields$,s.parentGroup=o.group,s.formHeader=n.formHeader,n.formHeader)return void this.modalService.show(e.columnFields$||n.ctrlName,t,n.formHeader,{},e.data.Id);console.warn("Invalid callFunc type: ",n," event.Target: ",e.target)}}else console.warn("Function not defined in group for: ",e.target,", Event: ",e)}},e.prototype.handleSuccess=function(e,t){if(this.group.isTriggered=!1,e)return e.ProcessingStatus&&this.webApiService.showHttpResponseMessage(a.MESSAGETYPE.Success,t,null),e},e.prototype.handleError=function(e){return this.group.isTriggered=!1,this.webApiService.handleError(e)},e.prototype.backNavigation=function(e,t,o){var n=this;t.beforeBackNavigationPage?t.beforeBackNavigationPage(t).subscribe((function(){t.isTriggered=!1,n.router.navigate([t.backNavigationPage])})):(t.isTriggered=!1,this.router.navigate([t.backNavigationPage]))},e.prototype.historyBack=function(){this.group.isTriggered=!1,this.navController.pop()},e.prototype.refreshGrid=function(e,t,o,n){if(n=n||"gridOptions",e&&e.target){var r=e.target.trim().replace("(","").replace(")","").replace("group.refreshGrid","");r.length>0&&(n=r)}var i=t[n];i&&i.getData(),t.isTriggered=!1},e.prototype.refreshPage=function(){this.group&&(this.group.isTriggered=!1),location.reload()},e.prototype.getCloneNewCacheZModel=function(e){var t=this.cacheService.getCache("cloneNewModel");t&&(this.cacheService.clearCache("cloneNewModel"),e.zModel=t,e.zModel.Id=0),e.isTriggered=!1},e.prototype.newModel=function(e,t){var o=this,n=t;e&&e.data&&e.data.SubType&&(n=t["_"+e.data.SubType]),r.of([]).pipe(i.switchMap((function(e){return console.log("Before new, zModel:",e),o.beforeNewModel(n)})),i.tap((function(){var e=t.parentReferenceId||"0";console.log("current url: ",o.router.url);var n=o.router.url.split("/"),r=n[n.length-1];if("edit"===r){var i=n.slice(0,n.length-2);i.push(e),i.push("new"),o.cacheService.getCache("cloneNewModel")?o.router.navigate(i):o.router.navigateByUrl(o.group.backNavigationPage,{skipLocationChange:!0}).then((function(){o.group.zModel={},o.group.isEdit=!1,o.group.isNew=!0,o.group.isTriggered=!1,o.router.navigate(i)}))}else"new"===r?(t.zModel={},t.form.reset(),t.isEdit=!1,t.isNew=!0,t.isTriggered=!1,t.zModel[t.parentReferenceField]=t.parentReferenceId.toString()):(t.isTriggered=!1,o.router.navigate([t.editModelURL,e,"new"],{relativeTo:t.ctrlScope.activatedRoute}))}))).subscribe()},e.prototype.createModel=function(e,t){var o=this,n=null,l=t.form,s=t;if(e&&e.data&&e.data.SubType&&(l=t["_"+e.data.SubType].form,s=t["_"+e.data.SubType]),l.dirty)if(l.valid)r.of(s.zModel).pipe(i.switchMap((function(e){return console.log("Before create, zModel:",e),o.beforeCreateModel(s)})),i.tap((function(){Object.assign(s.zModel,l.value)})),i.switchMap((function(){var e=Object.assign({},s.zModel);return a.ZComponentHelper.removeNullFields(e),o.webApiService.httpPost$(s.resourceURL,e).pipe(i.tap((function(e){return n=e,e})),i.map((function(e){return o.handleSuccess(e,"Record is created successfully.")})))})),i.switchMap((function(e){return console.log("After created, zModel:",e),e&&(e.Data?(Object.assign(s.zModel,e.Data),l.patchValue(e.Data)):e.Id&&(Object.assign(s.zModel,e),l.patchValue(e)),s.referenceId=s.zModel.Id,l.markAsPristine()),o.afterCreateModel(s)})),i.tap((function(e){null==n.ProcessingStatus||1==n.ProcessingStatus?(e&&0!==s.zModel.Id&&(s.isNew=!1,s.isEdit=!0,s.isTriggered=!1,s.cancelButtonName="Close",Object.assign(s.zModel,e),l.patchValue(e)),l.markAsPristine()):l.markAsDirty()}))).subscribe();else{var p=a.ZComponentHelper.getFormGroupErrors(l,this.alertService,t);console.warn("Form Validation got error(s):",p)}else console.warn("Form is not dirty hence record is not save.")},e.prototype.updateModel=function(e,t){var o=this,n=t.form,l=t;if(e&&e.data&&e.data.SubType&&(n=t["_"+e.data.SubType].form,l=t["_"+e.data.SubType]),n.dirty)if(n.valid)r.of(l.zModel).pipe(i.switchMap((function(e){return console.log("Before update, zModel:",e),o.beforeUpdateModel(l)})),i.tap((function(){Object.assign(l.zModel,n.value)})),i.switchMap((function(){return o.webApiService.httpPut$(l.resourceURL+"/"+l.zModel.Id,l.zModel).pipe(i.map((function(e){return o.handleSuccess(e,"Record is updated successfully.")})))})),i.switchMap((function(e){return console.log("After updated, zModel:",e),e&&e.Data?(Object.assign(l.zModel,e.Data),n.patchValue(e.Data)):e&&e.Id&&(Object.assign(l.zModel,e),n.patchValue(e)),t.isTriggered=!1,l.isTriggered=!1,n.markAsPristine(),o.afterUpdateModel(l)}))).subscribe();else{var s=a.ZComponentHelper.getFormGroupErrors(n,this.alertService,t);console.warn("Form Validation got error(s):",s)}else console.warn("Form is not dirty hence record is not save.")},e.prototype.cloneNewModel=function(e,t){var o=t;e&&e.data&&e.data.SubType&&(o=t["_"+e.data.SubType]),Object.assign(o.zModel,o.form.value),o.zModel.Id=0;["WFS_DocumentId","WFS_StatusCode","WFS_StatusName"].forEach((function(e){o.zModel.hasOwnProperty(e)&&(o.zModel[e]=null)})),this.cacheService.setCache("cloneNewModel",t.zModel),this.newModel(null,t),t.isTriggered=!1,o.isTriggered=!1},e.prototype.deleteModel=function(e,t){var o=this,n=t.form,a=t;e&&e.data&&e.data.SubType&&(n=t["_"+e.data.SubType].form,a=t["_"+e.data.SubType]),r.of(a.zModel).pipe(i.switchMap((function(e){return console.log("Before delete, zModel:",e),o.beforeDeleteModel(a)})),i.switchMap((function(){return t.isTriggered=!1,a.isTriggered=!1,o.alertService.show("Delete Record","Are you sure?",[{text:"No",cssClass:"secondary"},{text:"Yes",cssClass:"primary"}])})),i.switchMap((function(e){return"Yes"===e?(Object.assign(a.zModel,n.value),a.zModel.Disabled=!0,o.webApiService.httpPut$(a.resourceURL+"/"+a.zModel.Id,a.zModel).pipe(i.map((function(e){return o.handleSuccess(e,"Record is deleted successfully.")})),i.switchMap((function(e){return console.log("After deleted, zModel:",e),o.afterDeleteModel(a)})),i.tap((function(e){o.historyBack()})))):r.of([])}))).subscribe()},e.prototype.beforeUpdateModel=function(e){return e.beforeUpdateModel?e.beforeUpdateModel(e):(console.warn("group.beforeUpdateModel is undefined"),r.of({}))},e.prototype.beforeDeleteModel=function(e){return e.beforeDeleteModel?e.beforeDeleteModel(e):(console.warn("group.beforeUpdateModel is undefined"),r.of({}))},e.prototype.beforeNewModel=function(e){return e.beforeNewModel?e.beforeNewModel(e):(console.warn("group.beforeNewodel is undefined"),r.of({}))},e.prototype.beforeCreateModel=function(e){return e.beforeCreateModel?e.beforeCreateModel(e):(console.warn("group.beforeUpdateModel is undefined"),r.of({}))},e.prototype.beforePageInitialise=function(e){return e.beforePageInitialise?e.beforePageInitialise(e):(console.warn("group.beforePageInitialise is undefined"),r.of({}))},e.prototype.afterGetModelSuccess=function(e){return e.zModel.Id?e.afterGetModelSuccess?e.afterGetModelSuccess(e):(console.warn("group.afterGetModelSuccess is not defined"),r.of({})):(console.warn("zModel.Id is not defined",e.zModel),r.of({}))},e.prototype.afterNewModel=function(e){return e.afterNewModel?e.afterNewModel(e):(console.warn("group.afterNewModel is not defined"),r.of({}))},e.prototype.afterCreateModel=function(e){return e.afterCreateModel?e.afterCreateModel(e):(console.warn("group.afterCreateModel is not defined"),r.of({}))},e.prototype.afterUpdateModel=function(e){return e.afterUpdateModel?e.afterUpdateModel(e):(console.warn("group.afterUpdateModel is not defined"),r.of({}))},e.prototype.afterDeleteModel=function(e){return e.afterDeleteModel?e.afterDeleteModel(e):(console.warn("group.afterDeleteModel is not defined"),r.of({}))},e.prototype.afterPageInitialise=function(e){return e.afterPageInitialise?e.afterPageInitialise(e):(console.warn("group.afterPageInitialise is undefined"),r.of({}))},e.prototype.showzModal=function(e,t,o,n,r,i,a){return q(this,void 0,void 0,(function(){var l,s;return _(this,(function(p){switch(p.label){case 0:return l=K,s=Y,t&&(t.isTriggered=!1),[4,this.modalService.show(e,t,o,l,s,n,r,i,a)];case 1:return[2,p.sent()]}}))}))},e.prototype.cookieStorePost=function(e,t){var o=this.oauthEnvironmentUrl+"api/CookieStores",n={Name:e,Value:JSON.stringify(t)};return this.webApiService.httpPost$(o,n).pipe(i.map((function(e){if(e)return console.log("grid config saved("+e.status+"): ",e),e})))},e.prototype.cookieStoreGet=function(e,t){var o=this.oauthEnvironmentUrl+"api/CookieStores/?name="+e;return this.webApiService.httpGet$(o,{headers:t}).pipe(i.map((function(e){if(e)return e})))},e.prototype.cookieStoreDeleteMultiple=function(e){var t=this.oauthEnvironmentUrl+"Admin/DeleteMultipleCookies",o={containName:e};return this.webApiService.httpPost$(t,o).pipe(i.map((function(e){if(e)return e})))},e}();Q.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Q(t.ɵɵinject(o.Router),t.ɵɵinject(n.ModalController),t.ɵɵinject(n.NavController),t.ɵɵinject(a.AlertService),t.ɵɵinject(a.CacheService),t.ɵɵinject(a.FieldService),t.ɵɵinject(a.ResourceApiService),t.ɵɵinject(a.ToastService),t.ɵɵinject(a.WebApiService),t.ɵɵinject(a.ZCoreService),t.ɵɵinject(l.ModalService),t.ɵɵinject(J))},token:Q,providedIn:"root"}),Q.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:o.Router},{type:n.ModalController},{type:n.NavController},{type:a.AlertService},{type:a.CacheService},{type:a.FieldService},{type:a.ResourceApiService},{type:a.ToastService},{type:a.WebApiService},{type:a.ZCoreService},{type:l.ModalService},{type:J}]};var X=function(){function e(e){this.el=e,this.stylesheet="\n ::-webkit-scrollbar {\n width: 5px;\n }\n ::-webkit-scrollbar-track {\n background: var(--ion-color-light);\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background: var(--ion-color-light-shade);\n border: 0 solid #020202;\n }\n ::-webkit-scrollbar-thumb:hover {\n }\n "}return e.prototype.ngOnInit=function(){var e=this.el.nativeElement.shadowRoot.querySelector("style");if(e)e.append(this.stylesheet);else{var t=document.createElement("style");t.append(this.stylesheet),this.el.nativeElement.shadowRoot.appendChild(t)}},e}();X.decorators=[{type:t.Directive,args:[{selector:"[appScrollbarTheme]"}]}],X.ctorParameters=function(){return[{type:t.ElementRef}]};var ee=function(e){this.viewContainerRef=e};ee.decorators=[{type:t.Directive,args:[{selector:"[fieldelement]"}]}],ee.ctorParameters=function(){return[{type:t.ViewContainerRef}]};var te=function(e){function t(t,o,n,r,i,a){var l=e.call(this,t)||this;return l.webapiService=o,l.authService=n,l.storageService=r,l.router=i,l.zGridStatePersistingService=a,l.state={skip:0,take:10},l.gridColumns=[],l.usableColumns=[],l.resourceURL=null,l.paginationApiPostUrl=null,l.dataSource=null,l}return j(t,e),Object.defineProperty(t.prototype,"field",{get:function(){return this.zgridbinding.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grp",{get:function(){return this.zgridbinding.group},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridSubject",{get:function(){return this.zgridbinding.gridSubject},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.zgridbinding.params},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getData",{get:function(){return this.grid.data},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.field.SkipDirective){if(e.prototype.ngOnInit.call(this),this.grid.loading=!0,this.state.take=this.field.PageSize||20,this.pageSize=this.state.take,this.dataSource=this.field.DataSource?this.field.DataSource:null,!this.dataSource){if(this.resourceURL=a.ZComponentHelper.getGroupValue(this.field.ResourceURL,this.grp),!this.resourceURL)return this.grid.loading=!1,void("ActivityLogGrid"!==this.zgridbinding.data.Name&&console.warn("No initialise for Field.ResourceURL: ",this.field.ResourceURL));var t=this.resourceURL.split("/api/");if(t[1])t[1]="Page"+t[1],this.paginationApiPostUrl=t.join("/api/");else{var o=this.resourceURL.split("/");o[o.length-2]="Page"+o[o.length-2],this.paginationApiPostUrl=o.join("/")}this.setFilterParamsByParentRefId()}this.gridSubject.next(this),this.generateGridColumns()}},t.prototype.setFilterParamsByParentRefId=function(){var e=this.getFieldReferenceId()||this.grp.referenceId,t=this.field.ReferenceField||this.grp.parentReferenceField;if(e&&t){var o={key:t,ops:"=",value:e};this.params.filterParams.push(o)}},t.prototype.getFieldReferenceId=function(){var e=null;return this.field.ReferenceId&&(e=a.ZComponentHelper.getGroupValue(this.field.ReferenceId,this.grp)),e},t.prototype.ngOnDestroy=function(){this.serviceSubscription&&this.serviceSubscription.unsubscribe(),e.prototype.ngOnDestroy.call(this)},t.prototype.generateGridColumns=function(){var e=this;a.ZComponentHelper.getGroupValue(this.field.ColumnFields,this.grp).pipe(i.tap((function(t){var o=e.getGridSettings(),n=e.field.FieldElementName;a.ZComponentHelper.getGridColumns(t,e.gridColumns,e.zgridbinding.group,e.authService,n,o,e.usableColumns),e.getFilterParamsColumns(),e.getFilter(),e.getFilterParams(),e.getSorting(),e.getGrantType(),e.setHiddenColumn(o),e.params.referId=e.getFieldReferenceId()||e.grp.referenceId||null}))).subscribe((function(){e.getDataBinding()}))},t.prototype.getFilterParamsColumns=function(){var e=[];this.gridColumns.forEach((function(t){t.valueExpr?e.push(t.valueExpr+" as "+t.field):e.push(t.field)})),e.length>0&&-1===e.indexOf("Id")&&e.push("Id");var t=[];t.push(e.join(",")),this.usableColumns.length>0&&t.push(this.usableColumns.join(",")),this.params.columns=t.join(",")},t.prototype.getFilter=function(){var e=this;(this.params.filters&&this.field.Filters?this.params.filters=this.params.filters+" && "+this.field.Filters:!this.params.filters&&this.field.Filters&&(this.params.filters=this.field.Filters),this.field.Filters&&-1!==this.field.Filters.indexOf("group."))&&this.field.Filters.split(" ").filter((function(e){return-1!==e.trim().indexOf("group.")})).forEach((function(t){var o=a.ZComponentHelper.getGroupValue(t,e.grp);e.params.filters=e.params.filters.replace(t,o)}))},t.prototype.getFilterParams=function(){this.field.FilterParams&&(-1!==this.field.FilterParams.indexOf("group.")?this.params.filterParams=a.ZComponentHelper.getGroupValue(this.field.FilterParams,this.grp):this.params.filterParams=this.field.FilterParams)},t.prototype.getSorting=function(){this.field.SortOrder&&(-1!==this.field.SortOrder.indexOf("group.")?this.params.sortOrder=a.ZComponentHelper.getGroupValue(this.field.SortOrder,this.grp):this.params.sortOrder=this.field.SortOrder)},t.prototype.getGrantType=function(){this.field.GrantType&&(this.params.grantType=a.ZComponentHelper.getGroupValue(this.field.GrantType.toString(),this.grp))},t.prototype.setHiddenColumn=function(e){var t=this;if(this.gridColumns&&e){var o=e.filter((function(e){return 1==e.hidden}));Object.values(o).forEach((function(e){t.gridColumns.find((function(t){return t.field===e.field}))&&(t.gridColumns.find((function(t){return t.field===e.field})).hidden=e.hidden)}))}},t.prototype.getDataBinding=function(){var e=this;if(this.grid.loading=!0,this.dataSource){var t=a.ZComponentHelper.getGroupValue(this.field.DataSource,this.grp);t&&(this.grid.data={data:t,total:t.length},this.grid.pageSize=t.length),this.gridSubject.next(this),this.grid.loading=!1}else this.params.pageSize=this.state.take,this.field.ExternalPagination?this.webapiService.postApi(this.paginationApiPostUrl,this.params,null,null,null,null,!0).subscribe((function(t){e.aggregateHandling(t.dataSet),e.grid.data={data:t.dataSet,total:t.totalCount},e.grid.loading=!1,e.gridSubject.next(e),e.notifyDataChange()})):this.webapiService.getApi(this.resourceURL,null,null,null,null,null,!0).subscribe((function(t){var o=null,n=0;t.dataSet?(o=t.dataSet,n=t.totalCount):(o=t,n=t.length),e.aggregateHandling(o),e.grid.data={data:o,total:n},e.grid.pageSize=n,e.grid.loading=!1,e.gridSubject.next(e),e.notifyDataChange()}))},t.prototype.clearData=function(){this.grid.data={data:[],total:0}},t.prototype.aggregateHandling=function(e){this.gridColumns.filter((function(e){return e.aggregateType})).forEach((function(t){var o=t.field,n=null;switch(t.aggregateType.slice(0,-1).toLowerCase()){case"total":case"sum":n=e.reduce((function(e,t){return e+t[o]}),0);break;case"average":n=e.reduce((function(e,t){return e+t[o]}),0)/e.length;break;case"count":n=e.length;break;case"max":n=e.reduce((function(e,t){return e[o]>t[o]?e:t}))[o];break;case"min":n=e.reduce((function(e,t){return e[o]<t[o]?e:t}))[o]}t.aggregateValue=n}))},t.prototype.aggregateResetValue=function(){this.gridColumns.filter((function(e){return e.aggregateType})).forEach((function(e){e.aggregateValue=0}))},t.prototype.pageChange=function(e){this.params.pageNo=e.skip/this.params.pageSize,this.state.skip=e.skip,this.getDataBinding()},t.prototype.sortChange=function(e){var t=this;this.sort=e,this.params.sortColumnNames=[],this.params.sortOrders=[],e.forEach((function(e){if(e.dir){t.params.sortOrders.push(e.dir);var o=t.gridColumns.find((function(t){return t.field===e.field}));void 0!==o.valueExpr?t.params.sortColumnNames.push(o.valueExpr):t.params.sortColumnNames.push(e.field)}})),this.getDataBinding()},t.prototype.filterChange=function(e){var t=this;this.params.pageNo=0,this.params.filterParams=[],this.setFilterParamsByParentRefId(),console.log(e),e&&e.filters.length>0&&e.filters.forEach((function(e){var o=t.gridColumns.find((function(t){return t.field===e.field}));e.filters?e.filters.forEach((function(e){null===e.value&&(e.value=""),t.params.filterParams.push({key:e.field,ops:t.mapFilterOperator(e.operator),value:e.value})})):(null===e.value&&(e.value=""),t.params.filterParams.push({key:void 0!==o.valueExpr?"("+o.valueExpr+")":e.field,ops:t.mapFilterOperator(e.operator),value:e.value}))})),this.setGridSessionFilter(this.grp,this),this.getDataBinding()},t.prototype.dataStateChange=function(e){this.skip=e.skip,this.pageSize=e.take,this.state.skip=e.skip,this.state.take=e.take,this.grid.loading=!0,this.aggregateResetValue()},t.prototype.mapFilterOperator=function(e){switch(e){case"eq":return"eq";case"neq":return"neq";case"lt":return"lt";case"lte":return"lte";case"gt":return"gt";case"gte":return"gte";case"startswith":return"startswith";case"endswith":return"endswith";case"isnull":return"isnull";case"isnotnull":return"isnotnull";case"contains":if(!this.field.FilterContainsUsingEqual)return"contains";default:return"=="}},t.prototype.getGridSettings=function(){var e="ionic-field::"+this.authService.e1Token.userName+"::"+this.field.Name+"::"+this.router.url,t=this.zGridStatePersistingService.get(e);if(t){var o=JSON.parse(t.Value);if(o)return o.gridSettings.columnsConfig.sort((function(e,t){return e.orderIndex-t.orderIndex}))}},t.prototype.beforeGridGetData=function(e,t){return console.warn("beforeDataBinding triggered"),e.beforeGridGetData?e.beforeGridGetData(e,t):(console.warn("group.beforeDataBinding is undefined"),r.of(!0))},t.prototype.getGridSessionFilter=function(e,t){var o=this;if(!e.GridStorageKey)return r.of([]);var n=e.GridStorageKey;if(this.storageService){var a=new r.Subject;return r.of(!0).pipe(i.switchMap((function(){return o.storageService.get(n)})),i.tap((function(e){if(e&&e.value&&"null"!==e.value){var t=JSON.parse(e.value);o.state.filter=JSON.parse(t.StateFilter),o.params.filterParams=JSON.parse(t.FilterParams),o.state.filter.filters.forEach((function(e){e.field.includes("UTC")&&(e.value=new Date(e.value))})),a.next()}else a.next()}))).subscribe(),a.asObservable()}return r.of([])},t.prototype.setGridSessionFilter=function(e,t){if(!e.GridStorageKey)return null;var o=e.GridStorageKey;if(t.state.filter&&this.storageService&&this.field.SaveFilter){var n={StateFilter:JSON.stringify(t.state.filter),FilterParams:JSON.stringify(t.params.filterParams)};this.storageService.set(o,JSON.stringify(n))}},t}(d.DataBindingDirective);te.decorators=[{type:t.Directive,args:[{selector:"[zgridbinding]"}]}],te.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[d.GridComponent]}]},{type:a.WebApiService},{type:a.AuthService},{type:a.StorageSessionService},{type:o.Router},{type:a.ZGridStatePersistingService}]},te.propDecorators={zgridbinding:[{type:t.Input}]};var oe=function(e){this.element=e};oe.decorators=[{type:t.Directive,args:[{selector:"[popupAnchor]",exportAs:"popupAnchor"}]}],oe.ctorParameters=function(){return[{type:t.ElementRef}]};var ne=function(){function e(){}return e.prototype.onFocus=function(){this.openOnFocus&&(this.openOnFocus.readonly||this.openOnFocus.toggle(!0))},e.prototype.onBlur=function(){this.openOnFocus&&this.openOnFocus.toggle(!1)},e}();ne.decorators=[{type:t.Directive,args:[{selector:"kendo-combobox[openOnFocus]"}]}],ne.propDecorators={openOnFocus:[{type:t.Input}],onFocus:[{type:t.HostListener,args:["focus"]}],onBlur:[{type:t.HostListener,args:["blur"]}]};var re=function(){function e(){}return e.prototype.transform=function(e){if(!e)return e;try{return new Date(e)}catch(e){return console.log("DateParserFilter error: ",e),null}},e}();re.decorators=[{type:t.Pipe,args:[{name:"dateParser",pure:!0}]}];var ie=function(){function e(){}return e.prototype.transform=function(e){if(e){if("string"==typeof e)try{var t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return e}if("object"==typeof e||Array.isArray(e))try{return JSON.stringify(e,null,2)}catch(e){return"problem - [Circular structure to JSON]"}}},e.prototype.safeStringify=function(e){var t=[];return JSON.stringify(e,(function(e,o){if("object"==typeof o&&null!==o){if(t.includes(o))return;t.push(o)}return o}),2)},e}();ie.decorators=[{type:t.Pipe,args:[{name:"editorfilter",pure:!1}]}];var ae=function(){function e(){}return e.prototype.transform=function(e,t){return e&&t?("2"==t?Object.values(e).forEach((function(e){e.DivClass="col-sm-6"})):"3"==t&&Object.values(e).forEach((function(e){e.DivClass="col-sm-12"})),e):e},e}();ae.decorators=[{type:t.Pipe,args:[{name:"divzlayout",pure:!0}]}];var le=function(){function e(){this.viewerToolTipOpening=null,this.resourceURL=null,this.ReportSource=null,this.ready=null,this.exportBegin=null,this.exportEnd=null,this.onRenderingEnd=null,this.viewerContainerStyle=null,this.isVisible=null,this.paramToResizeReportViewer=null,this.resizeReportView=null,this.largeMenuBound=!1,this.sideMenuBound=!1,this.reportSource="",this.hideOptions=[]}return e.prototype.update=function(e){this.reportSource=e,this.hideUnwantedOptions()},e.prototype.bindEvents=function(e){var t=this;this.exportOption(e);var o=$(".trv-side-menu").children("ul").data("kendoPanelBar"),n=$(".trv-menu-large").data("kendoMenu"),r=$(".trv-menu-small");8==this.hideOptions.length&&$("[data-command*='telerik_ReportViewer_export']").hide();!this.largeMenuBound&&n&&(n.bind("open",(function(){t.hideUnwantedOptions()})),this.largeMenuBound=!0),!this.sideMenuBound&&r&&(o&&o.bind("expand",(function(){t.hideUnwantedOptions()})),this.sideMenuBound=!0)},e.prototype.exportOption=function(e){var t=e.data;t.EnableExportPDF&&(this.hideOptions=this.hideOptions.filter((function(e){return"PDF"!==e}))),t.EnableExportCSV&&(this.hideOptions=this.hideOptions.filter((function(e){return"CSV"!==e}))),t.EnableExportExcel&&(this.hideOptions=this.hideOptions.filter((function(e){return"XLS"!==e})),this.hideOptions=this.hideOptions.filter((function(e){return"XLSX"!==e}))),t.EnableExportRTF&&(this.hideOptions=this.hideOptions.filter((function(e){return"RTF"!==e}))),t.EnableExportTIFF&&(this.hideOptions=this.hideOptions.filter((function(e){return"IMAGE"!==e}))),t.EnableExportMHTML&&(this.hideOptions=this.hideOptions.filter((function(e){return"MHTML"!==e}))),t.EnableExportXPS&&(this.hideOptions=this.hideOptions.filter((function(e){return"XPS"!==e})))},e.prototype.hideUnwantedOptions=function(){$("[data-command-parameter]").show(),$.each(this.hideOptions,(function(e,t){var o=$('[data-command-parameter="'+t+'"]');o&&o.length&&o.hide()}))},e.prototype.resizeViewer=function(){return null},e}();le.decorators=[{type:t.Component,args:[{selector:"app-zreport",template:'<div *ngIf="isVisible" width="100%" height="800px">\r\n <tr-viewer #ReportViewer\r\n [containerStyle]="viewerContainerStyle"\r\n [serviceUrl]="resourceURL"\r\n [reportSource]="ReportSource"\r\n [viewMode]="\'INTERACTIVE\'"\r\n [scaleMode]="\'SPECIFIC\'"\r\n [pageMode]="\'SINGLE_PAGE\'"\r\n [scale]="1.0"\r\n [ready]="ready(this)"\r\n [exportBegin]="exportBegin(this)"\r\n [exportEnd]="exportEnd(this)"\r\n [viewerToolTipOpening]="viewerToolTipOpening"\r\n [enableAccessibility]="false"\r\n [pageReady] = "resizeReportView()"\r\n [renderingEnd]="onRenderingEnd">\r\n </tr-viewer>\r\n</div>\r\n',styles:[""]}]}];var se=function(){function e(){}return e.prototype.transform=function(e,t){return e&&t?e.filter((function(e){return-1!==(e.TabArea+"").indexOf(t)})):e},e}();se.decorators=[{type:t.Pipe,args:[{name:"tabfilter",pure:!0}]}];var pe=function(e){function t(t){return e.call(this,t)||this}return j(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return(this.findByOperator("gte")||{}).value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return(this.findByOperator("lte")||{}).value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFilter",{get:function(){return this.filtersByField(this.field).length>0},enumerable:!1,configurable:!0}),t.prototype.clearFilter=function(){this.filterService.filter(this.removeFilter(this.field))},t.prototype.filterRange=function(e,t){var o;this.filter=this.removeFilter(this.field);var n=[];e&&n.push({field:this.field,operator:"gte",value:e}),t&&n.push({field:this.field,operator:"lte",value:t});var r=this.filter||{logic:"and",filters:[]};n.length&&(o=r.filters).push.apply(o,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(W(arguments[t]));return e}(n)),this.filterService.filter(r)},t.prototype.findByOperator=function(e){return this.filtersByField(this.field).filter((function(t){return t.operator===e}))[0]},t}(d.BaseFilterCellComponent);pe.decorators=[{type:t.Component,args:[{selector:"date-range-filter-cell",template:'\n <kendo-daterange >\n <kendo-dateinput\n class="range-filter"\n kendoDateRangeStartInput\n [format]="\'dd-MM-yyyy\'"\n placeholder="dd-MM-yyyy"\n [value]="start"\n (valueChange)="filterRange($event, end)"\n style="width:84px">\n </kendo-dateinput>\n -\n <kendo-dateinput\n class="range-filter"\n kendoDateRangeEndInput\n [format]="\'dd-MM-yyyy\'"\n placeholder="dd-MM-yyyy"\n [value]="end"\n (valueChange)="filterRange(start, $event)"\n style="width:85px">\n </kendo-dateinput>\n </kendo-daterange>\n <button\n *ngIf="hasFilter"\n class="k-button k-button-icon"\n title="Clear"\n (click)="clearFilter()">\n <span class="k-icon k-i-filter-clear" style="width:15px"></span>\n </button>\n ',styles:["\n kendo-daterange > kendo-dateinput.range-filter {\n display: inline-block;\n }\n .k-button {\n margin-left: 4px;\n }\n "]}]}],pe.ctorParameters=function(){return[{type:d.FilterService}]},pe.propDecorators={filter:[{type:t.Input}],field:[{type:t.Input}]};var de=function(){function e(e){this.toolbarService=e,this.local={},this.showCalendar=!1}return e.prototype.today=function(){this.toolbarService.navigate({type:"today"})},e.prototype.next=function(e){this.toolbarService.navigate({type:"next"})},e.prototype.prev=function(e){this.toolbarService.navigate({type:"prev"})},e.prototype.onChange_Calendar=function(e){var t=this;this.local.inProgress=!0,this.toolbarService.navigate({type:"select-date",date:e}),this.toggleCalendar(),r.of([]).pipe(i.take(1),i.delay(1e3)).subscribe((function(){return t.local.inProgress=!1}))},e.prototype.onBlur_Calendar=function(){this.toggleCalendar()},e.prototype.toggleCalendar=function(e){this.showCalendar=!1!==e&&!this.showCalendar},e.prototype.keydown=function(e){27===e.keyCode&&!0===this.showCalendar&&this.toggleCalendar(!1)},e.prototype.documentClick=function(e){"k-nav-current"===e.target.className?this.toggleCalendar():!0===this.showCalendar&&this.toggleCalendar(!1)},e}();de.decorators=[{type:t.Component,args:[{selector:"zschedulertoolbar",template:'\n <div class="k-scheduler-navigation">\n <button class="k-nav-today" (click)="today()">\n Today\n </button>\n <button class="k-nav-prev" (click)="prev($event)">\n <span class="k-icon k-i-arrow-60-left"></span>\n </button> \n <span>\n <a class="k-nav-current" #anchor\n >\n \x3c!-- <span class="k-icon k-i-calendar"></span> --\x3e\n {{ selectedDate | kendoDate: "dd-MMM-yyyy" }}\n </a>\n </span> \n <button class="k-nav-next" (click)="next($event)">\n <span class="k-icon k-i-arrow-60-right"></span>\n </button>\n </div>\n <kendo-popup\n style="margin:15px 0px 0px 0px;"\n [anchor]="anchor"\n (anchorViewportLeave)="showCalendar = false"\n *ngIf="showCalendar"\n >\n <kendo-calendar\n [focusedDate]="selectedDate"\n (blur)="onBlur_Calendar()"\n (valueChange)="onChange_Calendar($event)"\n ></kendo-calendar>\n </kendo-popup>\n ',styles:[":host{margin:5px 0}"]}]}],de.ctorParameters=function(){return[{type:D.ToolbarService}]},de.propDecorators={local:[{type:t.Input}],selectedDate:[{type:t.Input}],keydown:[{type:t.HostListener,args:["keydown",["$event"]]}],documentClick:[{type:t.HostListener,args:["document:click",["$event"]]}]};var ce=function(){function e(e,t){this.mainService=e,this.activatedRoute=t,this.group=new a.ZGroup(!0),e.setGroup(this.group)}return e.prototype.canExit=function(){return this.mainService.canExit(this.group.form)},e.prototype.pageOnInit=function(e,t,o,n){var a=this;return this.group._projectName=n,this.mainService.getResourceServerData().pipe(i.switchMap((function(e){return a.group.isListForm=o,a.activatedRoute.paramMap})),i.tap((function(o){var n=o.get("act");a.group.isNew="new"===n,a.group.isEdit="edit"===n,"edit"===n?a.group.referenceId=o.get("id"):"new"===n&&(a.group.parentReferenceId=o.get("parentreferenceid")||o.get("id"),a.group.backNavigationPage=a.group.backNavigationPage+"/"+a.group.parentReferenceId.toString()+"/edit"),n&&(a.group.actName=n),a.mainService.initializeGroup(a.group,e,t,a),"new"===n&&a.group.parentReferenceField&&a.group.parentReferenceId&&(a.group.zModel[a.group.parentReferenceField]=a.group.parentReferenceId.toString())})),i.switchMap((function(){var t=o?"ListField":"FormField",n=a.group.fieldName?a.group.fieldName:e;return a.group.fieldName=n,a.mainService.getGroupFields(n,t,a.group,"fields")})),i.switchMap((function(e){return a.mainService.beforePageInitialise(a.group)})),i.switchMap((function(e){return"new"===a.group.actName?(a.mainService.getCloneNewCacheZModel(a.group),a.mainService.afterNewModel(a.group)):r.of(e)})),i.switchMap((function(){return a.group.referenceId&&"0"!==a.group.referenceId?"function"==typeof a.group.getModel?a.group.getModel(a.group,a.group.referenceId):a.mainService.getModel$(a.group,a.group.referenceId):r.of({})})),i.switchMap((function(e){return a.group.parentReferenceField&&(a.group.parentReferenceId=a.group.zModel[a.group.parentReferenceField]),a.mainService.afterPageInitialise(a.group)})))},e.prototype.pageDestroy=function(){console.log(this.group.pageName+" ngOnDestroy."),this.subscription&&this.subscription.unsubscribe()},e}();ce.decorators=[{type:t.Component,args:[{template:""}]}],ce.ctorParameters=function(){return[{type:Q},{type:o.ActivatedRoute}]};var ue=function(){function e(e,t,o){this.router=e,this.zcoreService=t,this.authService=o}return e.prototype.ngOnInit=function(){var e=this.zcoreService.getEnvironment();this.profileImgUrl=e.e1OauthUrl+"/api/ProfileImage?id="+this.authService.e1Token.myProfile.UserName+"&size=80x80";var t=this.authService.e1Token.myProfile;t&&(this.username=t.UserName,this.userDisplayName=t.LastName),this.topFormHeader&&(this.formHeader=this.topFormHeader)},e.prototype.bindFormHeader=function(){return!this.topFormHeader},e.prototype.onLogout=function(){this.authService.logout(),this.router.navigateByUrl("/auth")},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e}();ue.decorators=[{type:t.Component,args:[{selector:"app-uiheader",template:'<ion-header>\r\n <ion-toolbar>\r\n <app-uimenubutton slot="start" [group]="group"></app-uimenubutton>\r\n \r\n <ion-title class="toolbar-title">\r\n <div *ngIf="!bindFormHeader()">\r\n {{ formHeader }}\r\n </div>\r\n <div *ngIf="bindFormHeader()">\r\n {{ group.formHeader }}\r\n </div>\r\n </ion-title>\r\n\r\n <div slot="end" *ngIf="!isMobileScreen()" class="end-panel">\r\n <ion-avatar class="profile-avatar">\r\n <img src="{{profileImgUrl}}" [routerLink]="[\'userProfile\']">\r\n </ion-avatar>\r\n <ion-label class="profile-username">{{userDisplayName}}</ion-label>\r\n\r\n <div class="profile-vl"></div>\r\n\r\n \x3c!--<fa-icon slot="end" class="fa-lg" [icon]="[\'fas\', \'sign-out-alt\']" (click)="onLogout()" style="cursor: pointer;"></fa-icon>--\x3e\r\n\r\n <ion-button (click)="onLogout()" fill="none" size="small">\r\n <fa-icon [icon]="[\'fas\', \'sign-out-alt\']" style="margin-right: 5px;"></fa-icon> logout\r\n </ion-button>\r\n </div>\r\n\r\n <div *ngIf="group">\r\n <ion-buttons slot="primary" *ngIf="!group.isLoading">\r\n <app-uiactionbutton [group]="group"></app-uiactionbutton>\r\n \x3c!-- <ion-button (click)="onAction()" [disabled]="false">\r\n <ion-icon name="checkmark" slot="icon-only"></ion-icon>\r\n </ion-button> --\x3e\r\n </ion-buttons>\r\n </div>\r\n\r\n </ion-toolbar>\r\n</ion-header>\r\n',styles:[".title-md{padding-inline-start:10px;padding-top:3px;font-size:18px}ion-toolbar{--background:var(--z-page-header-backgroundcolor);--color:var(--ion-toolbar-color,var(--ion-text-color,#fff));--border-color:var(--ion-toolbar-border-color,var(--ion-border-color,var(--ion-color-step-150,#256b12)))}.end-panel{display:flex;padding-right:10px;align-items:stretch}.profile-avatar{width:2.5rem;height:1.7rem}.profile-avatar,.profile-username{margin:auto;padding-right:10px}.profile-vl{margin:auto;border-left:2px solid;height:2rem;border-radius:1px}.profile-button{width:2.5rem;height:2.5rem;border-radius:12px;box-shadow:0 8px 15px rgba(0,0,0,.1);background-color:var(--z-page-header-backgroundcolor);border:none}.toolbar-title{text-shadow:.5px .5px hsla(0,0%,100%,.48)}"]}]}],ue.ctorParameters=function(){return[{type:o.Router},{type:a.ZCoreService},{type:a.AuthService}]},ue.propDecorators={group:[{type:t.Input}],topFormHeader:[{type:t.Input}]};var ge=function(){function e(e){this.zcoreService=e}return e.prototype.ngOnInit=function(){console.log(this.group)},e.prototype.isSITEnvironment=function(){return this.zcoreService.isDebugSession()&&!this.isFieldElement()},e.prototype.isFieldElement=function(){return"field"===this.group.fieldName},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e}();ge.decorators=[{type:t.Component,args:[{selector:"app-uicontent",template:'<ion-grid>\r\n <ion-row *ngIf="group.isLoading" class="ion-text-center">\r\n <ion-col class="ion-margin ion-padding">\r\n <ion-spinner></ion-spinner>\r\n\r\n </ion-col>\r\n </ion-row>\r\n <ion-row *ngIf="!group.isLoading">\r\n <ion-col>\r\n <app-zform [group]="group"></app-zform>\r\n </ion-col>\r\n \x3c!-- <pre style="font-size: x-small;">{{group.zModel | json}}</pre> --\x3e\r\n </ion-row>\r\n <ion-row *ngIf="isSITEnvironment() && !group.isLoading" style="padding-top: 50px;">\r\n <ion-col>\r\n <app-zform [group]="group" fieldName="debug"></app-zform>\r\n </ion-col>\r\n </ion-row>\r\n \x3c!-- require for mobile screen --\x3e\r\n <div *ngIf="!isSITEnvironment() && !group.isLoading && isMobileScreen()" style="height: 150px;"></div>\r\n</ion-grid>\r\n',styles:[""]}]}],ge.ctorParameters=function(){return[{type:a.ZCoreService}]},ge.propDecorators={group:[{type:t.Input}]};var he=function(){function e(){}return e.prototype.ngOnInit=function(){this.items&&this.items.length>0&&console.error("Pls stop use hardcode submenu. Now the submenu can define in e1 Menu Relationship.")},e.prototype.CheckisCategory=function(e){return void 0!==e.category},e.prototype.isCategory=function(){var e=!1;return this.items.length>0&&this.CheckisCategory(this.items[0])&&(e=!0),e},e}();he.decorators=[{type:t.Component,args:[{selector:"app-uimenucontent",template:'<div *ngIf="this.isCategory()">\r\n <ion-row *ngFor="let cat of items">\r\n <kendo-panelbar keepItemContent="true" style="width: 100%;padding:10px;">\r\n <kendo-panelbar-item [title]="[cat.category]" [expanded]="true" icon="folder" >\r\n <ng-template kendoPanelBarContent>\r\n <div class="ion-row" style="padding: 6px 12px;">\r\n <ion-grid>\r\n <ion-row>\r\n <ion-col sizeXs="4" sizeMd="3" sizeXl="2" *ngFor="let item of cat.content">\r\n <div class="menu-btn ion-activatable ripple-parent" [routerLink]="[item.url]">\r\n <ion-label class="menu-btn-label menu-btn-icon">\r\n \x3c!-- <ion-icon [name]="item.icon"></ion-icon> --\x3e\r\n <fa-icon [icon]="item.icon" style=""></fa-icon>\r\n </ion-label>\r\n <ion-label class="menu-btn-label">{{ item.title }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n </div>\r\n </ng-template>\r\n </kendo-panelbar-item>\r\n </kendo-panelbar>\r\n </ion-row>\r\n</div>\r\n<ion-grid *ngIf="!this.isCategory()">\r\n <ion-row>\r\n <ion-col sizeXs="4" sizeMd="3" sizeXl="2" *ngFor="let item of items">\r\n <div class="menu-btn ion-activatable ripple-parent" [routerLink]="[item.url]">\r\n <ion-label class="menu-btn-label menu-btn-icon">\r\n \x3c!-- <ion-icon [name]="item.icon"></ion-icon> --\x3e\r\n <fa-icon [icon]="item.icon" style=""></fa-icon>\r\n </ion-label>\r\n <ion-label class="menu-btn-label">{{ item.title }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n </ion-col>\r\n </ion-row>\r\n</ion-grid>\r\n\r\n\r\n\r\n\r\n',styles:[".menu-btn{display:flex;flex-flow:column;justify-content:center;align-items:stretch;background-color:#fff;padding:10px 5px;border:1px solid #ccc;border-radius:5px;min-height:100px;cursor:pointer}.menu-btn:hover{color:#fff;background-color:rgba(0,0,0,.4)}.ripple-parent{position:relative;overflow:hidden}.menu-btn-label{flex:1;text-align:center}.menu-btn-icon{zoom:2}"]}]}],he.ctorParameters=function(){return[]},he.propDecorators={items:[{type:t.Input}]};var fe=function(){function e(e,t){this.menuCtrl=e,this.router=t}return e.prototype.ngOnInit=function(){},e.prototype.toggleMenu=function(){this.menuCtrl.toggle()},e.prototype.backNavigate=function(){var e=this;this.group.beforeBackNavigationPage?this.group.beforeBackNavigationPage(this.group).subscribe((function(){e.router.navigate([e.group.backNavigationPage])})):this.router.navigate([this.group.backNavigationPage])},e}();fe.decorators=[{type:t.Component,args:[{selector:"app-uimenubutton",template:'\x3c!--<ion-buttons *ngIf="!group || !group.backNavigationPage" (click)="toggleMenu()" class="ion-activatable ripple-parent">\r\n <fa-icon [icon]="\'bars\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-buttons>\r\n<ion-buttons *ngIf="group && group.backNavigationPage" (click)="backNavigate()" class="ion-activatable ripple-parent">\r\n <fa-icon [icon]="\'arrow-left\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-buttons>--\x3e\r\n\r\n<ion-buttons (click)="toggleMenu()" class="ion-activatable ripple-parent">\r\n <fa-icon [icon]="\'bars\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-buttons>\r\n',styles:[":host ion-buttons{width:48px;height:53px;justify-content:center;cursor:pointer}:host ion-buttons fa-icon{text-align:center;justify-content:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;font-kerning:none;text-decoration:none;font-size:21px}:host ion-buttons:hover{color:#fff;background-color:rgba(0,0,0,.4);border-radius:5px}"]}]}],fe.ctorParameters=function(){return[{type:n.MenuController},{type:o.Router}]},fe.propDecorators={group:[{type:t.Input}]};var me=function(){function e(e,t,o,n){this.router=e,this.menuService=t,this.authService=o,this.zcoreService=n,this.colorArray=[{stroke:"#F59600",color:"#F59600"},{stroke:"#F5C800",color:"#F5C800"},{stroke:"#F5EF00",color:"#F5EF00"},{stroke:"#8FE300",color:"#8FE300"},{stroke:"#00B33D",color:"#00B33D"},{stroke:"#095D9D",color:"#095D9D"},{stroke:"#2116AA",color:"#2116AA"},{stroke:"#6509A4",color:"#6509A4"},{stroke:"#C4006F",color:"#C4006F"},{stroke:"#F52B00",color:"#F52B00"}]}return e.prototype.ngOnInit=function(){},e.prototype.getDivClass=function(e){return"dropdown-submenu"===e.Type?"flex-show":"col-xs-4 col-sm-4 col-md-3 col-xl-2"},e.prototype.getMenuList=function(e){return"dropdown-submenu"===e.Type?this.menuService.getMenuFolder(e.URL):null},e.prototype.menuOnClick=function(e,t){var o=this.zcoreService.getEnvironment().startUpPage;if(t&&"launcher"==o.toLocaleLowerCase())return a.ZComponentHelper.openAppClientPath(e,t,this.authService),!1;this.router.navigate([e])},e.prototype.setMapInput=function(e,t){var o=document.createElement("input");return o.type="hidden",o.name=e,o.setAttribute("value",t),o},e}();me.decorators=[{type:t.Component,args:[{selector:"app-uiappmenucontent",template:'<ion-grid>\r\n <ion-row>\r\n <ion-col [ngClass]="getDivClass(item)" *ngFor="let item of items; index as i">\r\n <div *ngIf="item.Type !== \'dropdown-submenu\'" class="menu-btn ion-activatable ripple-parent" (click)="menuOnClick(item.URL, item.AppClientPath)">\r\n <ion-label class="menu-btn-label menu-btn-icon">\r\n \x3c!-- <fa-icon [icon]="item.Icon"></fa-icon> --\x3e\r\n <fa-stack size="1x">\r\n <fa-icon [icon]="[\'fas\', \'square\']" stackItemSize="2x"\r\n [styles]="colorArray[i%10]"></fa-icon>\r\n <fa-icon [icon]="[\'fas\', item.Icon ]" [inverse]="true" stackItemSize="1x"\r\n transform="grow-2"></fa-icon>\r\n </fa-stack>\r\n <ion-badge color="danger" class="pending-counter"\r\n *ngIf="item[\'PendingCounter\'] && item[\'PendingCounter\'] > 0">\r\n {{item[\'PendingCounter\']}}\r\n </ion-badge>\r\n </ion-label>\r\n <ion-label class="menu-btn-label">{{ item.Label }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n <kendo-panelbar *ngIf="item.Type === \'dropdown-submenu\'" keepItemContent="true">\r\n <kendo-panelbar-item [title]="item.Label" [expanded]="true" icon="folder">\r\n <ng-template kendoPanelBarContent>\r\n <app-uiappmenucontent [items]="getMenuList(item)"></app-uiappmenucontent>\r\n </ng-template>\r\n </kendo-panelbar-item>\r\n </kendo-panelbar>\r\n </ion-col>\r\n </ion-row>\r\n</ion-grid>\r\n',styles:[".menu-btn{display:flex;flex-flow:column;justify-content:center;align-items:stretch;background-color:#fff;padding:10px 5px;border:1px solid #ccc;border-radius:5px;min-height:100px;cursor:pointer}.menu-btn:hover{color:#fff;background-color:rgba(0,0,0,.4)}.ripple-parent{position:relative;overflow:hidden}.menu-btn-label{flex:1;text-align:center;font-size:12px}.menu-btn-icon{zoom:2}.pending-counter{background-color:#ff243a;border-radius:1em;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:2px;text-overflow:ellipsis;top:2px;transform:scale(.25);transform-origin:top right;display:inline-block;position:absolute;text-align:center;font-size:2.2em}"]}]}],me.ctorParameters=function(){return[{type:o.Router},{type:a.MenuService},{type:a.AuthService},{type:a.ZCoreService}]},me.propDecorators={items:[{type:t.Input}]};var be=function(){function e(e,t,o,n,r){var i=this;this.fieldService=e,this.webApiService=t,this.resourceApiService=o,this.workflowService=n,this.actionSheetCtrl=r,this.topRightActionButton=[],this.isWorkflowButton=!1,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){i.componentProperties.isReadOnly=!e},this.setVisible=function(e){i.componentProperties.isVisible=e,i.data.Visible=e},this.setRequire=function(e){i.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,i.group,i.data.Value,i.componentProperties,u.Validators.required)},this.e1wfs_wfcGetWorkflowButtonURL=this.resourceApiService.getURL("e1wfs_wfcGetWorkflowButtonURL"),this.e1wfs_wfc_getWorkflowInitialStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getWorkflowInitialStatusURL"),this.e1wfs_wfc_getDocumentStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getDocumentStatusURL")}return e.prototype.ngOnInit=function(){var e=this;(this.data=this.getFirstzButton(this.group.fields),this.data)&&(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.isNullUndefinedEmpty(this.data.WorkflowCode)?this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null).subscribe((function(t){e.actionBtnList=t,e.reloadButtonList()})):(this.isWorkflowButton=!0,this.loadWorkflowButton()))},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFirstzButton=function(e){for(var t=0;t<e.length-1;t++){if("zbuttons"===e[t].Type||"zworkflowbuttons"===e[t].Type)return e[t];Array.isArray(e[t].Value)&&this.getFirstzButton(e[t].Value)}return null},e.prototype.onAction=function(){this.isWorkflowButton,this.actionSheetCtrl.create({header:"Choose an Action",buttons:this.topRightActionButton}).then((function(e){e.present()}))},e.prototype.reloadButtonList=function(){var e=this;this.topRightActionButton=[],this.actionBtnList.forEach((function(t){if(!1!==a.ZComponentHelper.getGroupEvalValue.call(e,t.Visible,e.group)){var o=e.getButtonLabel(t),n=e.getButtonRole(t,o);e.topRightActionButton.push({text:o,handler:function(){e.buttonClick(t)},role:n})}}))},e.prototype.buttonClick=function(e){this.group.DismissType=e.DismissType,this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:null})},e.prototype.getButtonLabel=function(e){var t=e.Label;t||(t=e.Name);var o=t.match(/^{{.*}}$/gi);return o?(o=o[0].slice(2,-2),a.ZComponentHelper.getGroupValue(o,this.group)):t},e.prototype.getButtonRole=function(e,t){var o=t.toLowerCase();return-1!==o.indexOf("cancel")||-1!==o.indexOf("close")?"cancel":null},e.prototype.loadWorkflowButton=function(){var e=this;this.topRightActionButton=[];var t=null;this.group.zModel&&(t=this.group.zModel.WFS_DocumentId),this.workflowService.appendWFS_DocumentsInfo(this.data.WorkflowCode,t);try{if(this.workflowService.getWorkflowButtonsField(this.data.WorkflowCode,this.e1wfs_wfcGetWorkflowButtonURL,String(!1)).subscribe((function(t){t.forEach((function(t){var o=e.getButtonLabel(t),n=JSON.parse(t.Attributes),r=n.Label||o;e.isBtnVisible(t.Visible)&&e.topRightActionButton.push({text:r,fieldAttribute:t,iconName:n.Icon,handler:function(o){e.workflowButtonClick(t)}})}))})),!this.data.DisableSyncWorkflowStatus){if(!this.group.zModel.WFS_StatusName){var o={WorkflowMasterCode:this.data.WorkflowCode};return this.webApiService.httpPost$(this.e1wfs_wfc_getWorkflowInitialStatusURL,o).pipe(i.map((function(t){t.Data&&(a.ZComponentHelper.presetModelValue("WFS_StatusId",t.Data.Id,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusName",t.Data.Name,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusCode",t.Data.Code,e.group),e.workflowService.setCurrentDocumentStatus(t.Data))}))).subscribe()}var n={WorkflowMasterCode:this.data.WorkflowCode,DocumentId:t};this.webApiService.httpPost$(this.e1wfs_wfc_getDocumentStatusURL,n).pipe(i.map((function(t){e.workflowService.setCurrentDocumentStatus(t),t.Data&&e.workflowService.setCurrentDocumentStatus(t.Data)}))).subscribe()}}catch(e){console.error("error: ",e)}},e.prototype.workflowButtonClick=function(e){var t=this,o=JSON.parse(e.Attributes);switch(e.TypeCode.toUpperCase()){case"FUNCTION":console.log("Functional Button: ",e.Name),this.workflowService.functionalButton_OnClick(o,this.group);break;case"GOTO":console.log("GOTO Button: ",e.Name),this.workflowService.gotoButton_Onclick(e,this.data,o,this.group,!1).subscribe((function(e){t.loadWorkflowButton(),e&&t.workflowService.triggerSendEmail(t.group).subscribe()}));break;default:console.log("Invalid Button Type. ",e.Name)}},e}();be.decorators=[{type:t.Component,args:[{selector:"app-uiactionbutton",template:'<ion-button (click)="onAction()" [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)" \r\n *ngIf="isMobileScreen() && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n class="ion-activatable ripple-parent">\r\n \x3c!-- <ion-icon name="more" slot="icon-only"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'ellipsis-v\'"></fa-icon>\r\n <ion-ripple-effect type="unbounded"></ion-ripple-effect>\r\n</ion-button>',styles:[":host ion-button{width:48px;height:48px;justify-content:center;margin-right:4px;cursor:pointer}:host ion-button fa-icon{text-align:center;justify-content:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;font-kerning:none;text-decoration:none;font-size:21px}:host ion-button:hover{color:#fff;background-color:rgba(0,0,0,.4);border-radius:20px}"]}]}],be.ctorParameters=function(){return[{type:a.FieldService},{type:a.WebApiService},{type:a.ResourceApiService},{type:a.WorkflowService},{type:n.ActionSheetController}]},be.propDecorators={group:[{type:t.Input}]};var ve=function(){function e(){}return e.prototype.ngOnInit=function(){},e.prototype.getValidationError=function(e,t){return a.ZComponentHelper.getValidationError(e,t)},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIconClass=function(){return this.isMobileScreen()?"k-icon k-i-warning":"k-icon k-i-warning validation_icon"},e}();ve.decorators=[{type:t.Component,args:[{selector:"app-uivalidationmessage",template:'<div *ngIf="form.get(data.Value).invalid && (form.get(data.Value).dirty || form.get(data.Value).touched)"\r\n class="divvalidation">\r\n <div kendoTooltip\r\n position="left"\r\n showOn="hover">\r\n <span #warning\r\n [class]="getIconClass()"\r\n [title]="getValidationError(form, data)"></span>\r\n </div>\r\n</div>\r\n',styles:[".divvalidation{flex-basis:2rem;align-self:stretch;color:red}.validation_icon{padding-top:10px;padding-left:2px}"]}]}],ve.ctorParameters=function(){return[]},ve.propDecorators={group:[{type:t.Input}],data:[{type:t.Input}],form:[{type:t.Input}]};var ye=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setData=function(t){e.dataSource=t}}return e.prototype.ngOnInit=function(){this.data.ListType=this.data.ListType?this.data.ListType:"ul",this.setupDataSource(),a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this)},e.prototype.setupDataSource=function(){this.data.DataSource?-1!==this.data.DataSource.indexOf("group.")?this.dataSource=a.ZComponentHelper.getGroupValue(this.data.DataSource,this.group):this.dataSource=this.data.DataSource:console.error("No data source found for zhip")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.isVisible=function(){return null===this.componentProperties.isVisible?a.ZComponentHelper.isVisible.call(this,this.data):this.componentProperties.isVisible},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)+" "+t.DivClass},e}();ye.decorators=[{type:t.Component,args:[{selector:"app-zbullet",template:'<ion-item [formGroup]="form" *ngIf="componentProperties.isVisible" [ngClass]="getClass(form, data)">\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;" class="listContainer">\r\n <ul *ngIf="data.ListType === \'ul\'" [style.list-style-type]="data.BulletStyle ? data.BulletStyle : \'disc\'">\r\n <li *ngFor="let item of dataSource">\r\n <ion-label class="ion-text-wrap" Position="Fixed" [color]="item.Color ? item.Color : \'black\'">\r\n {{item.Label}}\r\n </ion-label>\r\n </li>\r\n </ul>\r\n <ol *ngIf="data.ListType === \'ol\'">\r\n <li *ngFor="let item of dataSource">\r\n <ion-label class="ion-text-wrap" Position="Fixed" [color]="item.Color ? item.Color : \'black\'">\r\n {{item.Label}}\r\n </ion-label>\r\n </li>\r\n </ol>\r\n \x3c!-- <dl *ngIf="data.ListType === \'dl\'">\r\n <dd *ngFor="let item of dataSource">\r\n <ion-label class="ion-text-wrap" Position="Fixed" [color]="item.Color ? item.Color : \'black\'">\r\n {{item.Label}}\r\n </ion-label>\r\n </dd>\r\n </dl> --\x3e\r\n </span>\r\n </div>\r\n</ion-item>',styles:[".subtitle{font-weight:700;text-decoration:underline}.listContainer li{font-size:12px;white-space:pre-wrap!important}.mediumFont .listContainer li{font-size:15px;white-space:pre-wrap!important}"]}]}],ye.ctorParameters=function(){return[]},ye.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ce=function(){function e(e){var t=this;this.fieldService=e,this.items=[],this.FirstZbtn=!1,this.componentProperties=new a.ZComponentProperties,this.expand="",this.setEnable=function(e){var o=t.group.form.controls[t.data.Value];e?o.enable():o.disable(),t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this);var t=this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null);this.group.zButtonsCount++,1===this.group.zButtonsCount&&(this.FirstZbtn=!0),this.expand=this.data.Expand||"";try{t.subscribe((function(t){t.forEach((function(t){e.data.SubType&&(t.Name=e.data.SubType+"_"+t.Name);var o=e.getButtonLabel(t),n=null;""!=t.Disabled&&t.Disabled&&(n="true"===t.Disabled||a.ZComponentHelper.getGroupEvalValue.call(e,t.Disabled));var r=t.Fill?t.Fill:"outline",i=t.Color?t.Color:"dark";e.items.push({name:t.Name,text:o,icon:a.ZComponentHelper.getIcon(t.Icon),visible:t.Visible,disabled:n,clickEvent:t.ClickEvent,iconName:t.Icon,dismissType:t.DismissType,disableTriggerTimer:t.DisableTriggerTimer,fill:r,color:i,SubType:e.data.SubType,click:function(o){e.buttonClick(t)}})}))}))}catch(e){console.error("error: ",e)}},e.prototype.setLabelText=function(e,t){var o=this.items.find((function(e){return e.name===t}));o&&(o.text=e)},e.prototype.buttonClick=function(e){this.group.isTriggered=!0;var t=this.group;this.data.DisableTriggerTimer||setTimeout((function(){t.isTriggered=!1}),500),this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:null})},e.prototype.BtnClick=function(e){this.group.isTriggered=!0;var t=this.group;e.disableTriggerTimer||setTimeout((function(){t.isTriggered=!1}),500),this.group.DismissType=e.dismissType,this.group.subject.next({type:"buttonClick",target:e.clickEvent,data:e})},e.prototype.getButtonLabel=function(e){if(e.Label){var t=e.Label.match(/^{{.*}}$/gi);return t?(t=t[0].slice(2,-2),a.ZComponentHelper.getGroupValue(t,this.group)):e.Label}return null},e.prototype.getButtonRole=function(e,t){var o=t.toLowerCase();return-1!==o.indexOf("cancel")||-1!==o.indexOf("close")?"cancel":null},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e}();Ce.decorators=[{type:t.Component,args:[{selector:"app-zbuttons",template:'\x3c!-- <p>\r\n zbuttons {{data.Value}}\r\n</p> --\x3e\r\n<div *ngIf="data.AlignButton" style="padding-top: 13px"></div>\r\n<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && items.length > 0">\r\n\r\n <div class="ion-margin-vertical" *ngIf="isMobileScreen() && items.length > 1 && FirstZbtn === false">\r\n <kendo-dropdownbutton [data]="items" size="large" [look]="\'outline\'" class="ion-activatable ripple-parent">\r\n Actions\r\n <ng-template kendoDropDownButtonItemTemplate let-dataItem>\r\n \x3c!-- <span class="k-icon k-i-{{ dataItem.icon }}"></span> --\x3e\r\n <span>{{ dataItem.text }}</span>\r\n </ng-template>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </kendo-dropdownbutton>\r\n </div>\r\n\r\n <div *ngIf="!isMobileScreen() || items.length === 1 " style="padding: 10px 0px;" [class]="data.DivClass">\r\n \x3c!-- <button *ngFor="let item of items; let i = index" (click)="BtnClick(item.clickEvent)"\r\n kendoButton [togglable]="true" [icon]="item.icon" [hidden]="!isBtnVisible(item.visible)"\r\n style="margin-right: 5px;">{{item.text}}</button> --\x3e\r\n <ion-button *ngFor="let item of items; let i = index"\r\n [fill]="item.fill"\r\n [color]="item.color"\r\n size="small"\r\n strong="false"\r\n class="button-container"\r\n (click)="BtnClick(item)"\r\n [expand]="expand"\r\n [hidden]="!isBtnVisible(item.visible)"\r\n [disabled]="group.isTriggered || item.disabled">\r\n <fa-icon [icon]="getFontAwesome(item.icon)"></fa-icon>\r\n <div *ngIf="item.text" style="padding-right: 5px;"></div>\r\n <span class="ion-text-capitalize">{{item.text}}</span>\r\n </ion-button>\r\n </div>\r\n</div>\r\n',styles:[".ripple-parent{position:relative;overflow:hidden}:host ::ng-deep span.ion-text-capitalize{font-weight:600}.button-container,.button:hover{font-size:12px;height:30px}.button:hover{border-radius:5px}"]}]}],Ce.ctorParameters=function(){return[{type:a.FieldService}]},Ce.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Se=function(){function e(e){var t=this;this.authService=e,this.componentProperties=new a.ZComponentProperties,this.options={Title:"",Icon:"Folder"},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setData=function(e){t.getFieldDeclarationForSetup(t.data,t.options)},this.setEnable=function(e){var o=t.group.form.controls[t.data.Value];e?o.enable():o.disable(),t.componentProperties.isReadOnly=!e}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.data,this.authService),this.getFieldDeclarationForSetup(this.data,this.options)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.getFieldDeclarationForSetup=function(e,t){t.Title=e.Title.includes("group.")?a.ZComponentHelper.getGroupEvalValue.call(this,e.Title):e.Title},e}();Se.decorators=[{type:t.Component,args:[{selector:"app-zcard",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="margin: 10px 0 6px 0;">\r\n <kendo-panelbar keepItemContent="true" *ngIf="!data.DisableCollapse">\r\n <kendo-panelbar-item [expanded]="!data.DefaultCollapse" [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)">\r\n <ng-template kendoPanelBarItemTitle>\r\n <span *ngIf="data.Icon">\r\n <fa-icon [icon]="data.Icon" class="zcard-header-icon"></fa-icon>\r\n </span>\r\n <span *ngIf="!data.Icon">\r\n <i class="fas fa-folder" style="color: #000000"></i>\r\n </span>\r\n <ion-label class="zcard-header-title">{{options.Title}}</ion-label>\r\n </ng-template>\r\n <ng-template kendoPanelBarContent>\r\n <div class="ion-row" style="padding: 6px 12px;">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of data.Value"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </ng-template>\r\n </kendo-panelbar-item>\r\n </kendo-panelbar>\r\n\r\n <kendo-card *ngIf="data.DisableCollapse" width="100%">\r\n <kendo-card-header>\r\n <div>\r\n <span *ngIf="data.Icon">\r\n <fa-icon [icon]="data.Icon" class="zcard-header-icon"></fa-icon>\r\n </span>\r\n <span *ngIf="!data.Icon">\r\n <i class="fas fa-folder" style="color: #000000"></i>\r\n </span>\r\n <ion-label class="card-header-title">{{options.Title}}</ion-label>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body>\r\n <div class="ion-row">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of data.Value"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </kendo-card-body>\r\n </kendo-card>\r\n</div>\r\n',styles:[".zcard-header-icon{color:#fff!important;padding-right:3px;font-size:11pt}:host ::ng-deep kendo-card-header{background-color:#5596e6;color:#fff}.card-header-title{font-weight:500;font-size:10.5pt}"]}]}],Se.ctorParameters=function(){return[{type:a.AuthService}]},Se.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var ke=function(){function e(){var e=this;this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.series=[],this.categories=[],this.options={title:"Chart Title Here",renderAs:"canvas",pannable:!1,zoomable:!1,categoryAxis:{categories:this.categories,max:10,maxDivisions:null,labels:{rotation:"auto"}},labels:{visible:!1,background:"transparent"},series:this.series,dataType:"bar",dataStyle:"smooth",legendPosition:"bottom",legendOrientation:"horizontal",tooltipFormat:"{0}%",aggregateType:"sum",dataField:null,categoryField:null,color:"#05A2FE"},this.setData=function(t){e.getFieldDeclarationForSetup(e.data,e.options)},this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Options){var e=typeof this.data.Options;if("object"===e)Object.assign(this.options,this.data.Options);else if("string"===e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options);"object"==typeof t&&Object.assign(this.options,t)}}this.data.Options&&this.data.Options.categoryAxis&&this.data.Options.categoryAxis.categories&&"string"==typeof this.data.Options.categoryAxis.categories&&(this.options.categoryAxis.categories=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options.categoryAxis.categories)),this.data.Options&&this.data.Options.series&&"string"==typeof this.data.Options.series&&(this.options.series=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options.series)),this.getFieldDeclarationForSetup(this.data,this.options),this.isLoading=!1},e.prototype.getFieldDeclarationForSetup=function(e,t){t.title=e.Title||t.title,t.renderAs=e.RenderAs||t.renderAs,t.pannable=e.Pannable||t.pannable,t.zoomable=e.Zoomable||t.zoomable,t.categoryAxis.categories=a.ZComponentHelper.getGroupEvalValue.call(this,e.Categories)||[],t.categoryAxis.max=e.Max||t.categoryAxis.max,t.categoryAxis.maxDivisions=e.MaxDivisions||t.categoryAxis.maxDivisions,t.categoryAxis.labels.rotation=e.Rotation||t.categoryAxis.labels.rotation,t.series=a.ZComponentHelper.getGroupEvalValue.call(this,e.Series)||[],t.dataType=e.DataType||t.dataType,t.dataStyle=e.DataStyle||t.dataStyle,t.legendPosition=e.LegendPosition||t.legendPosition,t.legendOrientation=e.LegendOrientation||t.legendOrientation,t.tooltipFormat=e.TooltipFormat||t.tooltipFormat,t.aggregateType=e.AggregateType||t.aggregateType,t.dataField=e.DataField||t.dataField,t.categoryField=e.CategoryField||t.categoryField},e.prototype.onRender=function(e){},e.prototype.onAxisLabelClick=function(e){},e.prototype.onLegendItemClick=function(e){},e.prototype.onLegendItemHover=function(e){},e.prototype.onPlotAreaClick=function(e){},e.prototype.onPlotAreaHover=function(e){},e.prototype.onSeriesClick=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);if("function"==typeof t)return t.bind(this.group.ctrlScope)(e)},e.prototype.onSeriesHover=function(e){},e}();ke.decorators=[{type:t.Component,args:[{selector:"app-zchart",template:'<div *ngIf="!isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <kendo-chart [renderAs]="options.renderAs" [pannable]="options.pannable" [zoomable]="options.zoomable"\r\n [categoryAxis]="options.categoryAxis"\r\n (render)="onRender($event)"\r\n (axisLabelClick)="onAxisLabelClick($event)"\r\n (legendItemClick)="onLegendItemClick($event)"\r\n (legendItemHover)="onLegendItemHover($event)"\r\n (plotAreaClick)="onPlotAreaClick($event)"\r\n (plotAreaHover)="onPlotAreaHover($event)"\r\n (seriesClick)="onSeriesClick($event)"\r\n (seriesHover)="onSeriesHover($event)">\r\n <kendo-chart-title [text]="options.title"></kendo-chart-title>\r\n <kendo-chart-legend [position]="options.legendPosition" [orientation]="options.legendOrientation"></kendo-chart-legend>\r\n <kendo-chart-tooltip [format]="options.tooltipFormat"></kendo-chart-tooltip>\r\n <kendo-chart-series>\r\n <kendo-chart-series-item *ngFor="let item of options.series"\r\n [aggregate]="options.aggregateType"\r\n [type]="item.type || options.dataType" [style]="item.style || options.dataStyle" \r\n [color]="item.color || options.color"\r\n [labels]="item.labels || options.labels" \r\n [field]="options.dataField" [categoryField]="options.categoryField"\r\n [data]="item.data" [name]="item.name">\r\n </kendo-chart-series-item>\r\n </kendo-chart-series>\r\n </kendo-chart>\r\n</div>',styles:[""]}]}],ke.ctorParameters=function(){return[]},ke.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var we=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.showTooltipsInfoIcon=!1,this.showTooltipsInfoBySide=!1,this.tooltipsInfo=null,this.tooltipsDisplayText=null,this.useKendoSwitch=!1,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.tooltipsInfo=this.data.TooltipsInfo,this.tooltipsInfo&&(null==this.tooltipsInfo.Icon&&null==this.tooltipsInfo.Icon||this.isMobileScreen()||(this.showTooltipsInfoIcon=!0,this.setTooltipsInfoIcon()),this.tooltipsInfo.SideBySide&&(this.showTooltipsInfoBySide=!0),this.setTooltipsDisplayText()),this.useKendoSwitch=!!this.data.UseKendoSwitch&&this.data.UseKendoSwitch},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.onSwitchChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,data:{value:e,field:this.data}})},e.prototype.onChange=function(e){if(this.data.OnChange){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnChange);if("function"==typeof t)t.bind(this.group.ctrlScope)(e)}},e.prototype.getLabelStyle=function(){return{order:this.data.LabelOrder&&"end"===this.data.LabelOrder&&"stacked"!==this.data.LabelPosition?2:0,"white-space":"normal"}},e.prototype.getCheckboxClass=function(){var e=[];return this.data.LabelDivClass&&this.data.LabelDivClass.split(" ").forEach((function(t){if(-1!==t.indexOf("col")){var o=t.split("-");o[o.length-1]=(12-parseInt(o[o.length-1])).toString(),e.push(o.join("-"))}else e.push(t)})),e.join(" ")},e.prototype.getClass=function(e,t){return"ionItem "+this.data.Class},e.prototype.setTooltipsInfoColor=function(){return this.tooltipsInfo&&this.tooltipsInfo.TextColor?this.tooltipsInfo.TextColor:"#acacac"},e.prototype.setTooltipsInfoIcon=function(e){this.showTooltipsInfoIcon&&(""!=this.tooltipsInfo.Icon?this.tooltipsDisplayIcon=e||this.tooltipsInfo.Icon:this.tooltipsDisplayIcon="question-circle")},e.prototype.setTooltipsDisplayText=function(e){this.tooltipsInfo?this.tooltipsDisplayText=e||this.tooltipsInfo.DisplayText:this.tooltipsDisplayText="<Display text error>"},e.prototype.setTooltipsInfoSideBySide=function(){return this.tooltipsInfo?this.tooltipsInfo.SideBySide&&!this.showTooltipsInfoIcon?"tooltipsinfo-right":"":"notooltipsinfo-adjustment"},e}();we.decorators=[{type:t.Component,args:[{selector:"app-zcheckbox",template:'<ion-item [ngClass]="getClass(form, data)" [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n [attr.for]="data.Value"\r\n [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'"\r\n [ngStyle]="getLabelStyle()"\r\n [ngClass]="data.LabelDivClass">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n color="danger">\r\n *\r\n </ion-text>\r\n <span kendoTooltip\r\n *ngIf="!isMobileScreen() && tooltipsInfo && showTooltipsInfoIcon"\r\n [title]="tooltipsDisplayText">\r\n <fa-icon [icon]="tooltipsDisplayIcon"\r\n class="tooltipsinfo-icon">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <div class="ion-row divcheckbox" [ngClass]="getCheckboxClass()">\r\n <div *ngIf="useKendoSwitch">\r\n <span>\r\n <kendo-switch [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (valueChange)="onSwitchChange($event)"\r\n style="margin: 7px 0 0 0; width: 100%"></kendo-switch>\r\n </span>\r\n </div>\r\n <div *ngIf="!useKendoSwitch" [class]="setTooltipsInfoSideBySide()">\r\n \x3c!--<input kendoCheckBox\r\n type="checkbox"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (valueChange)="onChange($event)" />--\x3e\r\n <ion-checkbox style="margin: 8px 0;"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n color="primary"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (ionChange)="onChange($event)"></ion-checkbox>\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon"\r\n [text]="tooltipsDisplayText"\r\n class="tooltipsinfo-text"\r\n [style.color]="setTooltipsInfoColor()">\r\n </kendo-label>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n </div>\r\n</ion-item>\r\n',styles:[".ionItem{display:flex;flex-flow:row wrap}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}:host ::ng-deep ion-item .k-checkbox{margin:6px 0 0 1.5px;height:22px;width:22px}:host ::ng-deep ion-item .k-checkbox.k-checked,:host ::ng-deep ion-item .k-checkbox:checked{margin:6px 0 0 1.5px;height:22px;width:22px;background-color:#3880ff;border:0;outline:0}:host ::ng-deep ion-item .divcheckbox{justify-content:space-between;order:1}:host ::ng-deep ion-item .notooltipsinfo-adjustment{display:grid;grid-template-columns:.1fr;grid-gap:0;padding-top:1px}:host ::ng-deep ion-item .tooltipsinfo-text{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin:6px 0;float:right}:host ::ng-deep ion-item .tooltipsinfo-right{display:grid;grid-template-columns:.1fr .9fr;grid-gap:5px}:host ::ng-deep ion-item .tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]}]}],we.ctorParameters=function(){return[]},we.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var xe=function(){function e(e){var t=this;this.authService=e,this.icon="k-icon k-i-cancel",this.selectedIcon="k-icon k-i-check-circle",this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){this.setupDataSource(),a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this)},e.prototype.setupDataSource=function(){var e=this;this.data.DataSource?(-1!==this.data.DataSource.indexOf("group.")?this.dataSource=a.ZComponentHelper.getGroupValue(this.data.DataSource,this.group):this.dataSource=this.data.DataSource,Array.isArray(this.dataSource)&&this.dataSource.forEach((function(t){t.Label=t.Label?t.Label:t.Value,t.Icon=t.Selected?null:t.Icon?t.Icon:e.icon,t.SelectedIcon=t.SelectedIcon?t.SelectedIcon:e.selectedIcon,t._Icon=t.Icon?t.Icon:e.icon,t._Selected=t.Selected}))):console.error("No data source found for zhip")},e.prototype.getClass=function(){return this.data.DivClass},e.prototype.getChipClass=function(e){return e.Class?e.Class:""},e.prototype.chipListChangeSelection=function(e){var t,o,n=0,r=function(t){e.includes(n)?t.Icon=null:t.Icon=i.dataSource.find((function(e){return e.Value===t.Value}))._Icon,n++},i=this;try{for(var a=U(this.dataSource),l=a.next();!l.done;l=a.next()){r(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},e.prototype.chipChangeSelection=function(e){this.dataSource.find((function(t){return t.Value===e.Value}))._Selected=!e._Selected,this.data.OnChange&&this.group.subject.next({type:"onChange",target:this.data.OnChange,data:{value:this.dataSource,selectedItem:e,field:this.data}})},e.prototype.getDataValue=function(){return this.dataSource},e.prototype.mouseover=function(e,t){this.data.OnHover&&this.group.subject.next({type:"onHover",target:this.data.OnHover,data:{value:this.dataSource,selectedItem:t,field:this.data}}),this.data.IsShowToolTip&&this.showTooltip(e)},e.prototype.showTooltip=function(e){var t=e.target;this.tooltipDir.toggle(t)},e}();xe.decorators=[{type:t.Component,args:[{selector:"app-zchip",template:'<div\r\n *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n style="margin: 10px 0 6px 0;" [ngClass]="getClass()">\r\n <ng-template #template let-anchor>\r\n <span>{{ anchor.nativeElement.innerText }}</span>\r\n </ng-template>\r\n <div kendoTooltip [tooltipTemplate]="template">\r\n <kendo-chip-list [selection]="data.Multiple ? \'multiple\' : \'single\'"\r\n (selectedChange)="chipListChangeSelection($event)">\r\n <kendo-chip *ngFor="let chip of dataSource" [label]="chip.Label" [selected]="chip.Selected"\r\n (mouseover)="mouseover($event, chip)" [ngClass]="getChipClass(chip)" [icon]="chip.Icon"\r\n [selectedIcon]="chip.SelectedIcon" (click)="chipChangeSelection(chip)" >\r\n </kendo-chip>\r\n </kendo-chip-list>\r\n </div>\r\n</div>\r\n',styles:[".medium kendo-chip{padding:20px;margin:5px;font-size:15px;min-height:50px;height:55px;max-height:60px;min-width:280px;max-width:320px}.mediumHeight kendo-chip-list{max-height:400px;border:1px solid #000;padding:5px 15px;overflow-x:auto;border-radius:10px}.vertical kendo-chip-list{display:flex;flex-direction:column}.customColor .k-chip-filled.k-chip-selected{background-color:#bafff6;color:#000;font-weight:600}.customColor .k-chip-filled.k-chip-selected:hover{background-color:#9afcf0}.customColor .k-chip-filled.k-chip-has-icon:hover{background-color:#b5b5b5;color:#000}.customColor .chip-pointing{border:3px solid #1a63d9!important}"]}]}],xe.ctorParameters=function(){return[{type:a.AuthService}]},xe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],tooltipDir:[{type:t.ViewChild,args:[M.TooltipDirective,{static:!1}]}]};var Ie=function(){function e(){var e=this;this.code="",this.theme="eclipse",this.mode="javascript",this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.widthReduce=this.data.WidthReduce||60,this.heightReduce=this.data.HeightReduce||560,"textareajson"===this.data.Type?this.mode="json":"textareahtml"===this.data.Type&&(this.mode="html"),console.log("zcodeeditor OnInit")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.getValue=function(){var e;e=-1!==this.data.Value.indexOf(".")?this.data.Value:"group.zModel."+this.data.Value;var t=a.ZComponentHelper.getEvalValue.call(this,e);if("function"!=typeof t)return t;var o=t();if(o)try{var n=a.ZComponentHelper.getEvalValue.call(this,o,!0);return"boolean"==typeof n?n.toString():void 0===n?"undefined":null===n?"null":n}catch(e){return}},e.prototype.getEditorStyle=function(){return{"height.px":this.getEditorHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getEditorHeight=function(){var e=window.innerHeight-this.heightReduce;return e<180?180:e},e.prototype.onTextChange=function(e){var t=this;this.subscription&&this.subscription.unsubscribe(),this.subscription=r.of([]).pipe(i.delay(500)).subscribe((function(){a.ZComponentHelper.setModelValue(t.data.Value,e,t.group,!0),t.group.subject.next({type:"zcodeeditor-TextChanged",target:t.data.OnChange,data:e})}))},e}();Ie.decorators=[{type:t.Component,args:[{selector:"app-zcodeeditor",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label *ngIf="data.ShowLabel" position="stacked" style="margin-bottom: 10px;">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div>\r\n \x3c!-- <div ace-editor\r\n [(text)]="text"\r\n ></div> --\x3e\r\n <ace-editor [readOnly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)" #editor [ngStyle]="getEditorStyle()" (textChanged)="onTextChange($event)" [text]="getValue() | editorfilter" [theme]="theme" [mode]="mode"></ace-editor>\r\n\r\n \x3c!-- <ngx-monaco-editor #editor [options]="editorOptions" [(ngModel)]="code" (onInit)="onInit($event)"></ngx-monaco-editor> --\x3e\r\n </div>\r\n\r\n</div>',styles:[""]}]}],Ie.ctorParameters=function(){return[]},Ie.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],editor:[{type:t.ViewChild,args:["editor"]}]};var Fe=function(){function e(){var e=this;this.range={start:null,end:null},this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this);var e=this.data.Value.split(","),t=e[0].trim(),o=e[1].trim(),n=(a.ZComponentHelper.getGroupEvalValue.call(this,t),a.ZComponentHelper.getGroupEvalValue.call(this,o),a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options));n&&n.min&&n.max&&this.setNewRange(new Date(n.min),new Date(n.max))},e.prototype.setNewRange=function(e,t){this.zdaterange.setRange({start:e,end:t})},e}();Fe.decorators=[{type:t.Component,args:[{selector:"app-zdaterange",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <kendo-daterange #zdaterange class="ion-row">\r\n \x3c!-- <label style="flex: 1;"> --\x3e\r\n \x3c!-- <span class="label">Start</span> --\x3e\r\n <kendo-dateinput style="flex: 1;" kendoDateRangeStartInput [(value)]="range.start" \r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"></kendo-dateinput>\r\n \x3c!-- </label> --\x3e\r\n \x3c!-- <label style="flex: 1;"> --\x3e\r\n \x3c!-- <span class="label">End</span> --\x3e\r\n \x3c!-- <kendo-dateinput style="flex: 1;" kendoDateRangeEndInput [(value)]="range.end"></kendo-dateinput> --\x3e\r\n \x3c!-- </label> --\x3e\r\n\r\n <kendo-daterange-popup [animate]="false"></kendo-daterange-popup>\r\n </kendo-daterange>\r\n </span>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-dateinput{color:var(--z-text-color)}"]}]}],Fe.ctorParameters=function(){return[]},Fe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],zdaterange:[{type:t.ViewChild,args:["zdaterange"]}]};var Ve=function(){function e(){var e=this;this.dateFormat="DD-MMM-YYYY",this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)},this.SetDateRange=function(t,o){isNaN(Date.parse(t))||(e.data.MinDate=new Date(t)),isNaN(Date.parse(o))||(e.data.MaxDate=new Date(o))}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),"ztime"===this.data.Type&&(this.dateFormat="HH:mm"),"zuidatetime"===this.data.Type&&(this.dateFormat="DD-MMM-YYYY h:mm A"),"zuitime"===this.data.Type&&(this.dateFormat="HH:mm:ss"),"zshortdate"===this.data.Type&&(this.dateFormat="MMM-YYYY")},e.prototype.toKendoDateFormat=function(){return this.dateFormat.replace("DD","dd").replace("YYYY","yyyy").replace("h","H").replace("A","a")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly,this.group);return"function"==typeof e?e():e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getDateValue=function(){var e=this.form.controls[this.data.Value].value;return e?new Date(e):null},e.prototype.GetDate=function(e){var t=new Date(e).toISOString();a.ZComponentHelper.setModelValue(this.data.Value,t,this.group)},e.prototype.onChange=function(e){null===e?a.ZComponentHelper.setModelValue(this.data.Value,e,this.group):(a.ZComponentHelper.setModelValue(this.data.Value,e.toISOString(),this.group),this.form.controls[this.data.Value].setValue(e.toISOString()));this.group.subject.next({type:"onChange",target:this.data.OnChange,data:e})},e.prototype.handlePreventableEvent=function(e,t,o){var n=this;setTimeout((function(){n.dateAppendEvent(n),n.timeAppendEvent(n)}),500)},e.prototype.dateAppendEvent=function(e){for(var t=$("tbody.k-calendar-tbody").find("td.k-calendar-td"),o=function(){var o=t[n];""!=o.title&&o.addEventListener("click",(function(){if(!isNaN(Date.parse(o.title))){var t=new Date(o.title).toISOString();a.ZComponentHelper.setModelValue(e.data.Value,t,e.group)}setTimeout((function(){e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}),500)}))},n=0;n<t.length;n++)o();$("span.k-today")[0].addEventListener("click",(function(){var t=(new Date).toJSON().slice(0,10).replace(/-/g,"/");e.setDateTimeToModel(e,t),e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}))},e.prototype.timeAppendEvent=function(e){$("button.k-button.k-time-tab")[0].addEventListener("click",(function(){e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}))},e.prototype.nowOnClick=function(e){var t=$("button.k-button.k-bare.k-time-now")[0];t&&t.addEventListener("click",(function(t){var o=e.currentDateTimeValue(e),n=new Date;o.setHours(n.getHours()),o.setMinutes(n.getMinutes()),o.setSeconds(n.getSeconds()),e.setDateTimeToModel(e,o)}))},e.prototype.hoursOnClick=function(e){var t=$("div.k-time-list-wrapper").find("ul");if(t.length>0)for(var o=t[0].children,n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){var o=t.currentTarget.textContent,n=e.currentDateTimeValue(e);n.setHours(o),e.setDateTimeToModel(e,n)}))},e.prototype.minutesOnClick=function(e){var t=$("div.k-time-list-wrapper").find("ul");if(t.length>0)for(var o=t[1].children,n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){var o=t.currentTarget.textContent,n=e.currentDateTimeValue(e);n.setMinutes(o),e.setDateTimeToModel(e,n)}))},e.prototype.ampmOnClick=function(e){var t=$("div.k-time-list-wrapper").find("ul");if(t.length>0)for(var o=t[2].children,n=0;n<o.length;n++)o[n].addEventListener("click",(function(t){var o=t.currentTarget.textContent,n=e.currentDateTimeValue(e),r=n.getHours();"am"==o.toLowerCase()?r-=12:r+=12,n.setHours(r),e.setDateTimeToModel(e,n)}))},e.prototype.currentDateTimeValue=function(e){var t=a.ZComponentHelper.getZModelValue(e.data.Value,e.group,e.group.zModel),o=new Date;return""!=t&&null!=t&&(o=new Date(t)),o},e.prototype.setDateTimeToModel=function(e,t){var o=new Date(t).toISOString();a.ZComponentHelper.setModelValue(e.data.Value,o,e.group),setTimeout((function(){e.hoursOnClick(e),e.minutesOnClick(e),e.ampmOnClick(e),e.nowOnClick(e)}),500)},e}();Ve.decorators=[{type:t.Component,args:[{selector:"app-zdatetime",template:'<ion-item [ngClass]="data.Class" [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="componentProperties.isRequired" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-datetime *ngIf="isMobileScreen()"\r\n style="padding: 8px 0px;"\r\n [required]="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n [placeholder]="data.PlaceHolder"\r\n [id]="data.Value"\r\n [displayFormat]="dateFormat"\r\n [pickerFormat]="dateFormat"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [formControlName]="data.Value"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)">\r\n </ion-datetime>\r\n <kendo-datepicker *ngIf="!isMobileScreen() && dateFormat===\'MMM-YYYY\'"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n [min]="data.MinDate"\r\n [max]="data.MaxDate"\r\n [activeView]="\'year\'"\r\n [bottomView]="\'year\'"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder">\r\n </kendo-datepicker>\r\n <kendo-datepicker *ngIf="!isMobileScreen() && dateFormat===\'DD-MMM-YYYY\'"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n [min]="data.MinDate"\r\n [max]="data.MaxDate"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder"></kendo-datepicker>\r\n <kendo-datetimepicker *ngIf="!isMobileScreen() && dateFormat===\'DD-MMM-YYYY h:mm A\'"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n (open)="handlePreventableEvent($event, \'open\', false)"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder">\r\n <ng-template kendoCalendarMonthCellTemplate let-date>\r\n <span (click)="GetDate(date)">{{date.getDate()}}</span>\r\n </ng-template>\r\n </kendo-datetimepicker>\r\n <kendo-timepicker *ngIf="!isMobileScreen() && (dateFormat===\'HH:mm:ss\' || dateFormat===\'HH:mm\')"\r\n [id]="data.Value"\r\n [value]="form.get(data.Value).value | dateParser"\r\n (valueChange)="onChange($event)"\r\n style="margin-top: 7px; width: 100%;"\r\n [class.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [format]="toKendoDateFormat()"\r\n [placeholder]="data.PlaceHolder"></kendo-timepicker>\r\n </span>\r\n <app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>\r\n',styles:[".gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-datepicker{color:var(--z-text-color)}"]}]}],Ve.ctorParameters=function(){return[]},Ve.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Pe=function(){function e(e){var t=this;this.authService=e,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.data,this.authService)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e}();Pe.decorators=[{type:t.Component,args:[{selector:"app-zdiv",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" class="ion-row">\r\n <app-zformcontrol \r\n [ngClass]="group[field.isVisibleField] ? field.DivClass : \r\n ((field.Visible === true) ? field.DivClass : \'flex-hide\')" \r\n *ngFor="let field of data.Value | divzlayout: data.zlayout" [field]="field"\r\n [group]="group" [form]="form" id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n</div>',styles:[""]}]}],Pe.ctorParameters=function(){return[{type:a.AuthService}]},Pe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Te=function(){function e(e,t,o){this.authService=e,this.fieldService=t,this.debugService=o,this.isLoading=!0,this.fieldIndex=[]}return e.prototype.ngOnInit=function(){var e=this;this.fieldName?this.fieldService.getFormFieldCode(this.fieldName,"FormField",this,"fields").pipe(i.switchMap((function(t){if("debug"===e.fieldName)return e.debugService.onStartDebugger(t,e);e.group.fields=t,e.onInitNormal()})),i.switchMap((function(){return e.isLoading=!1,e.group._isDebugging&&e.group._debug.isLoading&&(e.group._debug.isLoading=!1),r.of([])})),i.delay(500)).subscribe((function(){e.debugService.LoadGridData(),e.debugService.loadWorkflowData()})):(this.onInitNormal(),this.isLoading=!1)},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.getGroup=function(){return"debug"!==this.fieldName?this.group:this.group._debug},e.prototype.onInitNormal=function(){this.form=this.toFormGroup(this.group.fields),this.group.form=this.form,this.fields=this.group.fields,a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.fields,this.authService)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.toFormGroup=function(e){var t={};return this.getFormControls(e,t),new u.FormGroup(t)},e.prototype.addToFieldIndex=function(e){e.Name||console.error("Field Name undefined: ",e),e.Name&&!this.fieldIndex.includes(e.Name)?this.fieldIndex.push(e.Name):console.error("Field Name Duplication: "+e.Name+"; ",e)},e.prototype.getFormControls=function(e,t){var o=this;e.forEach((function(e){if(o.addToFieldIndex(e),"string"==typeof e.Value&&-1!==e.Value.indexOf("."))-1===["zgrid","ztree","zimg","textareajson"].indexOf(e.Type)&&console.warn("FormControl - invalid field value",e.Value);else if(Array.isArray(e.Value))o.getFormControls(e.Value,t);else{var n=a.ZComponentHelper.isFormControl(e),r=a.ZComponentHelper.isVisibleFormControl(o,e),i=a.ZComponentHelper.isRequiredFormControl(o,e);if(!0===n){var l=a.ZComponentHelper.getValidators(e,r,i);if(t[e.Value]=new u.FormControl(o.group.zModel[e.Value],l),a.ZComponentHelper.hasCCField(e.Type)){var s=a.ZComponentHelper.getCCValidators(e,r,i);t[e.CCValue]=new u.FormControl(o.group.zModel[e.CCValue],s)}}}}))},e.prototype.getReadOnlyValue=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,e.ReadOnly);return"function"==typeof t?t():t},e.prototype.trackByFn=function(e,t){return e},e}();Te.decorators=[{type:t.Component,args:[{selector:"app-zform",template:'<div class="e1-form">\r\n \x3c!--<div class="k-overlay" *ngIf="isLoading"></div>--\x3e\r\n <form [formGroup]="form" autocomplete="off" *ngIf="!isLoading">\r\n <ion-grid>\r\n <ion-row id="dynamic-form-host" class="ion-align-items-start">\r\n <app-zformcontrol *ngFor="let field of fields; trackBy: trackByFn"\r\n [ngClass]="group[field[\'isVisibleField\']] ? field.DivClass :\r\n ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n [field]="field"\r\n [group]="getGroup()"\r\n [form]="form"\r\n id="{{field.Type}}-{{field.Name}}"></app-zformcontrol>\r\n </ion-row>\r\n </ion-grid>\r\n </form>\r\n</div>\r\n',styles:["#dynamic-form-host app-zformcontrol{overflow-x:auto;overflow-y:hidden}"]}]}],Te.ctorParameters=function(){return[{type:a.AuthService},{type:a.FieldService},{type:J}]},Te.propDecorators={group:[{type:t.Input}],fieldName:[{type:t.Input}]};var ze=function(){function e(){this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.value=0,this.title="",this.color=[],this.majorTicks=[{visible:!0,color:"#0000ff"}],this.minorTicks=[{visible:!0,color:"#0000ff"}],this.startAngle=0,this.endAngle=180,this.minValue=0,this.maxValue=200,this.options={value:this.value,title:this.title,scaleMax:50,colors:this.color,transitions:!1,majorTicks:this.majorTicks,minorTicks:this.minorTicks,minValue:this.minValue,maxValue:this.maxValue,reverse:!1,startAngle:this.startAngle,endAngle:this.endAngle,rangePlaceholderColor:"#e6e5e5",labelsColor:"#0000ff",rangeFrom:0,rangeTo:100,rangeColor:"#ff6358",rangeLineCap:"round",showLabels:!0,rangeSize:10}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Options){var e=typeof this.data.Options;if("object"===e)Object.assign(this.options,this.data.Options);else if("string"===e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options);"object"==typeof t&&Object.assign(this.options,t)}}this.getFieldDeclarationForSetup(this.data,this.options),this.isLoading=!1},e.prototype.getFieldDeclarationForSetup=function(e,t){t.value=a.ZComponentHelper.getGroupEvalValue.call(this,e.Value)||t.value,t.title=a.ZComponentHelper.getGroupEvalValue.call(this,e.Title)||t.title,t.scaleMax=e.Max||t.scaleMax,t.minValue=a.ZComponentHelper.getGroupEvalValue.call(this,e.MinValue)||t.minValue,t.maxValue=a.ZComponentHelper.getGroupEvalValue.call(this,e.MaxValue)||t.maxValue,t.colors=a.ZComponentHelper.getGroupEvalValue.call(this,e.Color)||t.colors,t.transitions=e.Transitions||t.transitions,t.majorTicks=a.ZComponentHelper.getGroupEvalValue.call(this,e.MajorTicks)||t.majorTicks,t.showLabels=e.ShowLabels||t.showLabels,t.style=e.Style||t.style,t.minorTicks=a.ZComponentHelper.getGroupEvalValue.call(this,e.MinorTicks)||t.minorTicks,t.reverse=e.Reverse||t.reverse,t.startAngle=a.ZComponentHelper.getGroupEvalValue.call(this,e.StartAngle)||t.startAngle,t.endAngle=a.ZComponentHelper.getGroupEvalValue.call(this,e.EndAngle)||t.endAngle,t.rangePlaceholderColor=e.RangePlaceholderColor||t.rangePlaceholderColor,t.rangeFrom=a.ZComponentHelper.getGroupEvalValue.call(this,e.RangeFrom)||t.rangeFrom,t.rangeTo=a.ZComponentHelper.getGroupEvalValue.call(this,e.RangeTo)||t.rangeTo,t.rangeColor=e.RangeColor||t.rangeColor,t.rangeLineCap=e.RangeLineCap||t.rangeLineCap,t.rangeSize=e.RangeSize||t.rangeSize,t.GaugeAlignment=a.ZComponentHelper.getGroupEvalValue.call(this,e.GaugeAlignment)||t.GaugeAlignment,t.paddingValue="NaN"===t.value.toString()?t.GaugeAlignment:"0%"},e.prototype.alignment=function(){return{"padding-right":this.options.paddingValue}},e.prototype.setEnable=function(e){this.componentProperties.isReadOnly=!e},e.prototype.setVisible=function(e){this.componentProperties.isVisible=e,this.data.Visible=e},e.prototype.setRequire=function(e){this.componentProperties.isRequired=e},e.prototype.setData=function(e){this.getFieldDeclarationForSetup(this.data,this.options)},e}();ze.decorators=[{type:t.Component,args:[{selector:"app-zgauge",template:'<div *ngIf="!isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="text-align: center;">\r\n <div id="marketShareContainer" class="ion-row" class="col-xs-12 stats-graph">\r\n <h6 style="color: gray;">{{ options.title }}</h6>\r\n </div>\r\n <div [ngStyle]=\'alignment()\'>\r\n <kendo-arcgauge [value]="options.value" [transitions]="options.transitions" [colors]="options.colors" style="margin-top:50px;width:90% ;height:100%; min-width: 330px;">\r\n <kendo-arcgauge-scale\r\n [majorTicks]="{ visible: true, color: \'#0000ff\' }"\r\n [minorTicks]="{ visible: true, color: \'#0000ff\' }"\r\n [reverse]="options.reverse"\r\n [startAngle]="0"\r\n [endAngle]="180"\r\n [min]="options.minValue"\r\n [max]="options.maxValue"\r\n [rangePlaceholderColor]="options.rangePlaceholderColor"\r\n [rangeSize]="options.rangeSize"\r\n [rangeLineCap]="options.rangeLineCap">\r\n <kendo-arcgauge-scale-labels format="l" [color]="options.labelsColor" [visible]="options.showLabels">\r\n </kendo-arcgauge-scale-labels>\r\n </kendo-arcgauge-scale>\r\n <ng-template kendoArcGaugeCenterTemplate let-value="value" let-color="color">\r\n <span [style.color]="color">{{ value }}</span>\r\n </ng-template>\r\n </kendo-arcgauge>\r\n </div>\r\n</div>\r\n',styles:[""]}]}],ze.ctorParameters=function(){return[]},ze.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var De=function(){function e(e,t,o,n,i,l,s,p,d,c){var g=this;this.activatedRoute=e,this.router=t,this.formBuilder=o,this.authService=n,this.webApiService=i,this.zGridStatePersistingService=l,this.toastService=s,this.zcoreService=p,this.storageService=d,this.mainService=c,this.zgrid=null,this.oauthUrl=null,this.mySelection=[],this.componentProperties=new a.ZComponentProperties,this._state={skip:0,take:10},this.params={referId:null,pageNo:0,pageSize:20,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:"",filters:"",columns:"",grantType:4},this.gridSubject=new r.Subject,this.gridDefaultStateExist=!1,this.isNew=!0,this.setData=function(e){g.gridData={data:e,total:e?e.length:0},g.gData=e,g.zgrid&&(g.zgrid.grid.pageSize=e.length),g.data.ShowRecordNumber&&g.gridData.data&&g.gridData.data.forEach((function(e,t){e.GridNo=t+1})),g.gData&&g.createFormControls()},this.setEnable=function(e){g.componentProperties.isReadOnly=!e},this.setVisible=function(e){g.componentProperties.isVisible=e,g.data.Visible=e},this.setRequire=function(e){g.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,g.group,g.data.Value,g.componentProperties,u.Validators.required)},this.oauthUrl=this.zcoreService.getEnvironment().e1OauthUrl+"/",this.allResults=this.allResults.bind(this),this.refreshData=this.refreshData.bind(this),this.clearData=this.clearData.bind(this),this.saveGridSettings=this.saveGridSettings.bind(this),this.restoreGridSettings=this.restoreGridSettings.bind(this)}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.gridStorageKey="ionic-field::"+this.authService.e1Token.userName+"::"+this.data.Name+"::"+this.router.url,r.of(!0).pipe(i.switchMap((function(){if(e.columns=[],e.widthReduce=e.data.WidthReduce||60,e.heightReduce=e.data.HeightReduce||560,e._state.take=e.data.PageSize||20,e.pageSizes=[20,50,100,200,500],e.previousNext=e.data.EnablePreviousNextButton||!1,(!1===e.data.PageSizes||a.ZComponentHelper.isMobileScreen())&&(e.pageSizes=!1),e.data.SelectOptions&&(e.selectableSettings={mode:"single"===e.data.SelectOptions?"single":"multiple"}),e.data.Value.startsWith("group.")){var t=e.data.Value.slice(6);e.group[t]=e}return e.subscription&&e.subscription.unsubscribe(),e.data.ResourceURL||e.generateGridColumns().subscribe((function(){if(e.data.DataSource&&e.data.SkipDirective){var t=a.ZComponentHelper.getGroupValue(e.data.DataSource,e.group);e.setData(t)}})),e.subscription=e.gridSubject.subscribe((function(t){e.zgrid=t,e._state=e.zgrid.state,e.columns=e.zgrid.gridColumns,e.zgrid&&e.zgrid.grid.data&&(e.gridData=Object.assign({},e.zgrid.grid.data),e.createFormControls())})),e.stateExist(),e.data.SaveFilter&&e.setGridSessionKey(e.group),r.of(!0)})),i.tap((function(){e.gridCallback(e.group)}))).subscribe()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.stateExist=function(){var e=this.zGridStatePersistingService.get(this.gridStorageKey);this.gridDefaultStateExist=!!e},e.prototype.dataStateChange=function(e){this.zgrid?this.zgrid.dataStateChange(e):(this.gridData=G.process(this.gData,e),this.createFormControls())},e.prototype.filterable=function(e){return!1!==e},e.prototype.sortable=function(e){return!1!==e},e.prototype.locked=function(e){return 1==e.pinnedLeft},e.prototype.getGridStyle=function(){return{"height.px":this.getGridHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getGridHeight=function(){var e=window.innerHeight-this.heightReduce;return e<250?250:e},e.prototype.isSelectOption=function(){var e=!1;return this.data.SelectOptions&&(this.selectableSettings={checkboxOnly:!1,mode:"multiple"==this.data.SelectOptions?"multiple":"single"},e=!0),e},e.prototype.setColumns=function(e,t){this.group[e]=this.wrapColumnNamesInFieldElement(t),this.generateGridColumns().subscribe()},e.prototype.wrapColumnNamesInFieldElement=function(e){return r.of(e.map((function(e){var t=e.Hidden;return{Name:e.Name,Value:e.Code,Type:e.Type,gridColVisible:!t,width:100+4*e.Name.length,enableFiltering:!1,enableSorting:!0,enablePinning:!0,DivClass:"col-xs-12 col-sm-6",IsEditableInGrid:e.Editable}})))},e.prototype.generateGridColumns=function(){var e=this,t=this.getGridSettings(),o=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);return this.data.ColumnFields||console.warn("Invalid/Empty grid("+this.data.Name+") columnField"),o.pipe(i.tap((function(o){o||console.warn("Invalid/Empty grid("+e.data.Name+") data to generate column");var n=e.data.FieldElementName;e.columns=[],a.ZComponentHelper.getGridColumns(o,e.columns,e.group,e.authService,n,t,null,e.data)})))},e.prototype.editModel=function(e){if(this.data.EditClickURL){var t=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);this.group.subject.next({type:"zgrid-cellClick",target:this.data.EditClickURL,data:e,columnFields$:t})}else this.router.navigate([this.group.editModelURL,e.Id,"edit"],{relativeTo:this.activatedRoute})},e.prototype.gridCallback=function(e){if(this.data.AfterloadCallback){var t=Object.assign({},this);this.group.subject.next({type:"zgrid-AfterloadCallback",target:this.data.AfterloadCallback,data:t})}},e.prototype.getData=function(){this.zgrid&&this.zgrid.getDataBinding(),this.data.SkipDirective&&(this.gridData=G.process(this.gData,this.state),this.createFormControls())},e.prototype.getGridData=function(){return this.gData},e.prototype.getFormControl=function(e,t){var o=this.inlineEditedFormGroups.get("items").at(e);return o?o.get(t):null},e.prototype.createFormControls=function(){var e=this;if(this.columns){if(void 0===this.columns.find((function(e){return e.isEditableInGrid})))return;this.inlineEditedFormGroups=new u.FormGroup({items:new u.FormArray([])}),Array.isArray(this.gridData.data)&&this.gridData.data.forEach((function(t){var o={};e.columns.forEach((function(e){o[e.field]=new u.FormControl(t[e.field])}));var n=new u.FormGroup(o);e.inlineEditedFormGroups.get("items").push(n)}))}},e.prototype.createFormGroup=function(e,t){var o;return this.formBuilder.group(((o={})[t]=e[t],o))},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(this.data.Value,this.group)},e.prototype.onBtnClick=function(e,t,o,n){this.onNavigateTo(e,t,o,n)},e.prototype.cellClickHandler=function(e){var t=this,o=!!this.data.DisableCellClickHandler&&this.data.DisableCellClickHandler,n="CommandColumnComponent"==e.column.constructor.name;if(!o&&!n)if(!!this.data.InCellEditable&&this.data.InCellEditable)this.editableColumns=this.columns.filter((function(e){return!0===e.isEditableInDataItem})),this.editableColumns&&this.editableColumns.map((function(o){return e.sender.editCell(e.rowIndex,e.columnIndex,t.createFormGroup(e.dataItem,o.field))}));else{if(console.log("cellClick event: ",e),this.data.OnItemClick){var r=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);if("function"==typeof r)r.bind(this.group.ctrlScope)(e);return}this.editModel(e.dataItem)}},e.prototype.editCellCloseHandler=function(e){var t=e.formGroup,o=e.dataItem;t.valid?t.dirty&&(this.editableColumns=this.columns.filter((function(e){return!0===e.isEditableInDataItem})),this.editableColumns.map((function(e){var n;return Object.assign(o,((n={})[e.field]=t.value[e.field],n))})),this.mySelection.map((function(e){return e.Id===o.Id?Object.assign(e,o):null}))):e.preventDefault()},e.prototype.onNavigateTo=function(e,t,o,n){a.ZComponentHelper.getGroupEvalValue.call(this,t.Click)&&(e.stopPropagation(),this.group.subject.next({type:"zgrid-onNavigateTo",target:t.Click,rowData:o,data:n}))},e.prototype.showTooltip=function(e){var t=e.target,o=!1;t.classList.forEach((function(e){"k-command-cell"==e&&(o=!0)})),("TD"===t.nodeName||"TH"===t.nodeName)&&t.offsetWidth<t.scrollWidth&&!o?this.tooltipDir.toggle(t):this.tooltipDir.hide()},e.prototype.rowSelectionKey=function(e){return e.dataItem},e.prototype.getSeletectedValues=function(){return this.mySelection},e.prototype.refreshGrid=function(e,t,o){var n=e.target.trim().split(".")[1];if(n){var r=t[n];r?r.getData():console.log("Unable to find grid value: "+n)}else console.log("Invalid refreshGrid event: ",e)},e.prototype.refreshData=function(){this.getData()},e.prototype.clearData=function(){this.zgrid.clearData()},e.prototype.allResults=function(){var e=this.zgrid,t=this.zgrid.grid.data,o=e.paginationApiPostUrl,n=Object.assign({},this.params);return n.pageNo=0,n.pageSize=t.total,this.webApiService.httpPost$(o,n).pipe(i.map((function(e){return{data:G.process(e.dataSet,{}).data}})))},e.prototype.getClass=function(e,t){var o="gridCell ";return"number"!==t.fieldType&&"currency"!==t.fieldType&&"znumeric"!==t.fieldType||(o+="rightAligned "),e[t.field+"_Class"]&&(o+=e[t.field+"_Class"]+" "),t.Class&&(o+=t.Class+" "),o},e.prototype.getFormat=function(e,t){var o="";if(void 0===e.FormatOptions)o=t||"";else{var n=e.FormatOptions.split("."),r=0;n.length>1&&(r=n[1].length),0!==r&&(o="1."+r+"-"+r)}return o},e.prototype.setHeaderText=function(e,t){this.columns.forEach((function(o){o.Name===e&&(o.title=t)}))},e.prototype.setGridIsLoading=function(e){this.isLoading=e},e.prototype.setGridSessionKey=function(e){e.GridStorageKey||(e.GridStorageKey="zgrid_"+e.resourceURL+"_"+this.data.Value+"::"+this.authService.e1Token.userName)},e.prototype.trackBy=function(e,t){return e},e.prototype.saveGridSettings=function(){var e=this,t=this.zgrid.grid.columns;r.of(this.columns).pipe(i.switchMap((function(){var o=t.toArray().map((function(e){return Object.keys(e).filter((function(e){return!e.toLowerCase().includes("template")})).reduce((function(t,o){var n;return Object.assign(Object.assign({},t),((n={})[o]=e[o],n))}),{})}));o.forEach((function(e){delete e.headerStyle,delete e.__ngContext__}));var n={columnsConfig:o},r=e.zGridStatePersistingService.get(e.gridStorageKey),i=null;return r&&r[0]?(i=r.find((function(t){return t.dataFormFields===e.gridStorageKey})))&&(i.gridSettings=n):r=[],i||(i={dataFormFields:e.gridStorageKey,gridSettings:n},r.push(i)),r})),i.concatMap((function(t){return e.zGridStatePersistingService.set(e.gridStorageKey,t),e.mainService.cookieStorePost(e.gridStorageKey,t)})),i.tap((function(t){e.stateExist()})),i.tap((function(){e.toastService.show("Grid Setting Saved","top",!0,2e3,"success")}))).subscribe()},e.prototype.restoreGridSettings=function(){var e=this;r.of(!0).pipe(i.switchMap((function(){return e.zGridStatePersistingService.remove(e.gridStorageKey),r.of(!0)})),i.switchMap((function(){return e.mainService.cookieStoreDeleteMultiple(e.gridStorageKey)})),i.concatMap((function(){return e.generateGridColumns()})),i.tap((function(){e.stateExist(),e.toastService.show("Grid Setting Restored","top",!0,2e3,"success")}))).subscribe()},e.prototype.getGridSettings=function(){var e="ionic-field::"+this.authService.e1Token.userName+"::"+this.data.Name+"::"+this.router.url,t=this.zGridStatePersistingService.get(e);if(t){var o=JSON.parse(t.Value);if(o)return o.gridSettings.columnsConfig.sort((function(e,t){return e.orderIndex-t.orderIndex}))}},e.prototype.getInlineField=function(e){return this.columns.find((function(t){return t.Value===e}))},e.prototype.getInlineForm=function(e){return this.inlineEditedFormGroups.get("items").at(e)},e.prototype.getFormControlData=function(e){return this.inlineEditedFormGroups.value.items},e.prototype.beforeGridGetData=function(e,t){return console.warn("beforeDataBinding triggered"),e.beforeGridGetData?e.beforeGridGetData(e,t):(console.warn("group.beforeDataBinding is undefined"),r.of(!0))},e.prototype.getGridSessionFilter=function(e,t){return q(this,void 0,void 0,(function(){var t,o=this;return _(this,(function(n){switch(n.label){case 0:return e.GridStorageKey?(t=e.GridStorageKey,this.storageService?[4,this.storageService.get(t).then((function(e){if(e&&e.value&&"null"!==e.value){var t=JSON.parse(e.value);return o.state.filter=JSON.parse(t.StateFilter),o.params.filterParams=JSON.parse(t.FilterParams),o.state.filter.filters.forEach((function(e){e.field.includes("UTC")&&(e.value=new Date(e.value))})),e}return null}))]:[3,2]):[2,null];case 1:return n.sent(),[3,3];case 2:return[2,null];case 3:return[2]}}))}))},e.prototype.setGridSessionFilter=function(e,t){if(!e.GridStorageKey)return null;var o=e.GridStorageKey,n={};t.state.filter&&this.storageService&&this.data.SaveFilter&&(n={StateFilter:JSON.stringify(t.state.filter),FilterParams:JSON.stringify(t.params.filterParams)},this.storageService.set(o,JSON.stringify(n)))},e.prototype.filterChange=function(e){this.zgrid&&this.zgrid.filterChange(e)},e.prototype.pageChange=function(e){this.zgrid&&this.zgrid.pageChange(e)},e.prototype.sortChange=function(e){this.zgrid&&this.zgrid.sortChange(e)},e.prototype.inCellCheckBoxOnChange=function(e,t,o){var n=e.detail.checked;this.gData[t][o.Value]=n},e.prototype.columnsOrderChanged=function(e){this.zgrid,this.zgrid.grid.data;if(this.zgrid)this.zgrid},e.prototype.addHandler=function(e){var t=e.sender;this.isNew=!0,this.closeEditor(t);var o={};this.zgrid.gridColumns.forEach((function(e){var t=[];e.IsRequired&&t.push(u.Validators.required),e.ValidatorPattern&&t.push(u.Validators.pattern(e.ValidatorPattern)),o[e.Value]=new u.FormControl(null,t)})),this.formGroup=new u.FormGroup(o),t.addRow(this.formGroup)},e.prototype.saveHandler=function(e){var t=e.sender,o=e.rowIndex,n=e.formGroup,r=e.isNew,i=this.gData?this.gData:this.gridData?this.gridData.data:[];if(n.valid){var a,l=this.data.UniqueKey;if(l){var s=n.value[l];(r||!r&&i[o][l]!=s)&&i.forEach((function(e){e[l]!==s||(a=!0)}))}a?this.toastService.show("Error occur: Duplicated unique field entry.","top",!0,3e3,"danger"):(r?i.push(n.value):i[o]=n.value,this.setData(i),t.closeRow(o))}},e.prototype.cancelHandler=function(e){var t=e.sender,o=e.rowIndex;t.closeRow(o)},e.prototype.editHandler=function(e){var t=e.sender,o=e.rowIndex,n=e.dataItem;this.isNew=!1,this.closeEditor(t);var r={};this.zgrid.gridColumns.forEach((function(e){var t=[];e.IsRequired&&t.push(u.Validators.required),e.ValidatorPattern&&t.push(u.Validators.pattern(e.ValidatorPattern)),r[e.Value]=new u.FormControl(n[e.Value],t)})),this.formGroup=new u.FormGroup(r),this.editedRowIndex=o,t.editRow(o,this.formGroup)},e.prototype.removeHandler=function(e){var t=e.sender,o=e.dataItem,n=this.getItemIndex(o,this.gData,this.data.UniqueKey);this.gData.splice(n,1),t.cancelCell()},e.prototype.closeEditor=function(e,t){void 0===t&&(t=this.editedRowIndex),e.closeRow(t),this.editedRowIndex=void 0,this.formGroup=void 0},e.prototype.getItemIndex=function(e,t,o){for(var n=0;n<t.length;n++)if(t[n][o]===e[o])return n;return-1},e}();De.decorators=[{type:t.Component,args:[{selector:"app-zgrid",template:'\x3c!--\r\n<div style="margin: 10px">\r\n <div class="card">\r\n <div class="card-block k-form">\r\n <fieldset>\r\n <legend>Binding types</legend>\r\n <div class="k-form-field">\r\n <span>Bind the data to:</span>\r\n <input [(ngModel)]="bindingType" type="radio" name="mode" id="array" value="array" class="k-radio"\r\n (change)="changeBindingType($event)">\r\n <label class="k-radio-label" for="array">Array object</label>\r\n <input [(ngModel)]="bindingType" type="radio" name="mode" id="gridDataResult" value="gridDataResult" class="k-radio"\r\n (change)="changeBindingType($event)">\r\n <label class="k-radio-label" for="gridDataResult">GridDataResult object</label>\r\n <input [(ngModel)]="bindingType" type="radio" name="mode" id="async" value="async" class="k-radio"\r\n (change)="changeBindingType($event)">\r\n <label class="k-radio-label" for="async">Asynchronous source</label>\r\n </div>\r\n </fieldset>\r\n </div>\r\n </div>\r\n</div> --\x3e\r\n<div style="margin: 10px 0 6px 0;">\r\n <div *ngIf="data.Title" class="gridTitle">{{data.Title}}</div>\r\n <ng-template #template let-anchor>\r\n <span>{{ anchor.nativeElement.innerText }}</span>\r\n </ng-template>\r\n <div kendoTooltip\r\n showOn="none"\r\n [tooltipTemplate]="template"\r\n filter=".k-grid td"\r\n (mouseover)="showTooltip($event)"> \r\n <kendo-grid [zgridbinding]="{data: data, group: group, params: params, gridSubject: gridSubject}" [ngClass]="data.Class"\r\n [data]="gridData"\r\n [pageSize]="state.take"\r\n [pageable]="{responsive: true, buttonCount: 3, pageSizes: pageSizes, previousNext: previousNext}"\r\n [skip]="state.skip"\r\n [sort]="state.sort"\r\n [sortable]="{allowUnsort: true,mode: \'multiple\'}"\r\n [filter]="state.filter"\r\n [filterable]="data.enableFiltering !== false"\r\n [resizable]="true"\r\n [reorderable]="true"\r\n [columnMenu]="data.DisableGridColumnMenu ? false : { filter: true }"\r\n [hidden]="!(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n (cellClick)="cellClickHandler($event)"\r\n (cellClose)="editCellCloseHandler($event)"\r\n (dataStateChange)="dataStateChange($event)"\r\n (pageChange)="pageChange($event)"\r\n (sortChange)="sortChange($event)"\r\n (filterChange)="filterChange($event)"\r\n (columnReorder)="columnsOrderChanged($event)"\r\n [kendoGridSelectBy]="rowSelectionKey"\r\n [selectable]="selectableSettings"\r\n [selectedKeys]="mySelection"\r\n [ngStyle]="getGridStyle()"\r\n [trackBy]="trackBy"\r\n (cancel)="cancelHandler($event)"\r\n (save)="saveHandler($event)"\r\n (remove)="removeHandler($event)"\r\n (edit)="editHandler($event)"\r\n (add)="addHandler($event)">\r\n <ng-template kendoGridToolbarTemplate *ngIf="data.AllowRefreshButton || data.AllowExport || data.AllowSaveState || data.EnableGridCommand">\r\n <button type="button" kendoButton (click)="refreshData()" *ngIf="data.AllowRefreshButton"><span class="k-icon k-i-refresh-sm"></span> Refresh</button>\r\n <button type="button" kendoGridExcelCommand *ngIf="data.AllowExport"><span class="k-icon k-i-file-excel"></span> Export Data to Excel</button>\r\n <button type="button" kendoButton (click)="saveGridSettings()" *ngIf="data.AllowSaveState"><span class="k-icon k-i-star"></span> Save Setting</button>\r\n <button type="button" kendoButton (click)="restoreGridSettings()" *ngIf="gridDefaultStateExist"><span class="k-icon k-i-star-outline"></span> Restore Setting</button>\r\n <button type="button" kendoGridAddCommand *ngIf="data.EnableGridCommand "><span class="k-icon k-i-add"></span>Add New</button>\r\n </ng-template>\r\n <kendo-grid-checkbox-column *ngIf="!!data.SelectOptions" [width]="60" showSelectAll="true" [columnMenu]="true"></kendo-grid-checkbox-column>\r\n <kendo-grid-column *ngFor="let col of columns"\r\n [field]="col.field"\r\n [title]="col.title"\r\n [width]="col.width"\r\n [minResizableWidth]="col.minResizableWidth"\r\n [filter]="col.filter"\r\n [filterable]="filterable(col.enableFiltering)"\r\n [sortable]="sortable(col.enableSorting)"\r\n [headerStyle]="{\'white-space\': \'initial\'}"\r\n [hidden]="col.hidden"\r\n [format]="col.format"\r\n [class]="col.Class"\r\n [locked]="locked(col)"\r\n [columnMenu]="!col.disableColumnMenu"\r\n [editor]="col.editorType">\r\n <div [ngSwitch]="true">\r\n <div *ngSwitchCase="col.fieldType === \'number\'\r\n || col.fieldType === \'currency\'\r\n || col.fieldType === \'znumeric\'">\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column">\r\n <kendo-grid-numeric-filter-cell [column]="column" [filter]="filter" operator="eq">\r\n <kendo-filter-eq-operator></kendo-filter-eq-operator>\r\n <kendo-filter-neq-operator></kendo-filter-neq-operator>\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-grid-numeric-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngSwitchCase="col.fieldType == \'zdate\'\r\n || col.fieldType === \'ztime\'\r\n || col.fieldType === \'zdatetime\'\r\n || col.fieldType === \'zuidatetime\'">\r\n <div *ngIf="col.filterByDateRange === true">\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column" operator="lte">\r\n <date-range-filter-cell class="date-range-filter"\r\n [filter]="filter"\r\n [field]="col.field">\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </date-range-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngIf="col.filterByDateRange === false">\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column">\r\n <kendo-grid-date-filter-cell [column]="column" [filter]="filter" operator="lte">\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-grid-date-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <ng-template kendoGridFilterCellTemplate let-filter let-column="column">\r\n <kendo-grid-string-filter-cell [column]="column" [filter]="filter" operator="contains">\r\n <kendo-filter-contains-operator></kendo-filter-contains-operator>\r\n <kendo-filter-eq-operator></kendo-filter-eq-operator>\r\n <kendo-filter-neq-operator></kendo-filter-neq-operator>\r\n <kendo-filter-startswith-operator></kendo-filter-startswith-operator>\r\n <kendo-filter-endswith-operator></kendo-filter-endswith-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-grid-string-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n \x3c!-- Grid Edit Template --\x3e\r\n <ng-template kendoGridEditTemplate *ngIf="data.EnableGridCommand " let-dataItem="dataItem" let-column="col" let-formGroup="formGroup" let-isNew="isNew">\r\n <div [ngSwitch]="col.fieldType">\r\n <div *ngSwitchCase="\'number\'">\r\n <kendo-numerictextbox #cellAnchor [formControl]="formGroup.get(col.field)"></kendo-numerictextbox>\r\n <kendo-popup [anchor]="cellAnchor.numericInput"\r\n *ngIf="formGroup.get(col.field).invalid && !(isNew && formGroup.get(col.field).untouched)"\r\n popupClass="k-widget k-tooltip k-tooltip-validation k-invalid-msg"\r\n style="padding-left: 2px; opacity: 0.5;">\r\n <span class="k-icon k-i-warning"></span>\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.required">\r\n {{ col.Name }} required.\r\n </ion-label>\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.pattern">\r\n {{ col.ValidatorMessage ? col.ValidatorMessage : "Please check the input value." }}\r\n </ion-label>\r\n </kendo-popup>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <kendo-textbox #cellAnchor [formControl]="formGroup.get(col.field)"></kendo-textbox>\r\n <kendo-popup [anchor]="cellAnchor.input"\r\n *ngIf="formGroup.get(col.field).invalid && !(isNew && formGroup.get(col.field).untouched)"\r\n popupClass="k-widget k-tooltip k-tooltip-validation k-invalid-msg"\r\n style="padding-left: 2px; opacity: 0.5;">\r\n <span class="k-icon k-i-warning"></span>\r\n \x3c!--<ion-label style="padding-top: 1px; padding-left: 3px;">{{ col.Name }} is required.</ion-label>--\x3e\r\n\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.required">\r\n {{ col.Name }} required.\r\n </ion-label>\r\n <ion-label style="padding-top: 1px; padding-left: 3px;"\r\n *ngIf="formGroup.get(col.field).invalid && !formGroup.get(col.field).untouched && formGroup.get(col.field).errors?.pattern">\r\n {{ col.ValidatorMessage ? col.ValidatorMessage : "Please check the input value." }}\r\n </ion-label>\r\n </kendo-popup>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">\r\n <div style="margin: 1px 0;" *ngIf="!col.clickableIcons && col.isEditableInGrid !== true" [ngSwitch]="col.fieldType"\r\n [ngClass]="getClass(dataItem, col)">\r\n <span *ngSwitchCase="\'zdate\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'ztime\'">\r\n {{ dataItem[col.field] | date: \'HH:mm\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zshortdate\'">\r\n {{ dataItem[col.field] | date: \'MMM yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zdatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zuidatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'number\'">\r\n {{ dataItem[col.field] | number }}\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n {{ dataItem[col.field] | number: getFormat(col, \'1.2-2\') }}\r\n </span>\r\n <span *ngSwitchCase="\'znumeric\'">\r\n {{ dataItem[col.field] | number: getFormat(col) }}\r\n </span>\r\n <span *ngSwitchCase="\'url\'" style="color: blue; cursor: pointer; text-decoration:underline;">\r\n {{ dataItem[col.field] }}\r\n </span>\r\n <span *ngSwitchDefault>\r\n {{ dataItem[col.field]}}\r\n </span>\r\n </div>\r\n \x3c!-- <span *ngIf="!!col.navigateTo" (click)="onNavigateTo($event, col, dataItem, dataItem[col.field])">\r\n <ion-button color="light" size="small">\r\n {{ col.ClickableIcons }}\r\n <ion-icon slot= "end" name="arrow-forward"></ion-icon>\r\n </ion-button>\r\n </span> --\x3e\r\n <div style="margin: 5px 0;" *ngIf="col.isEditableInGrid === true && inlineEditedFormGroups" [ngSwitch]="col.fieldType" [formGroup]="inlineEditedFormGroups"\r\n [ngClass]="getClass(dataItem, col)">\r\n <span *ngSwitchCase="\'number\'">\r\n <input type="number" [formControl]="this.getFormControl(rowIndex, col.field)" />\r\n </span>\r\n <span *ngSwitchCase="\'checkbox\'">\r\n <ion-checkbox [disabled]="(!!col.ReadOnly ? col.ReadOnly : false)" [formControl]="this.getFormControl(rowIndex, col.field)" color="primary" (ionChange)="inCellCheckBoxOnChange($event, rowIndex, col)"></ion-checkbox>\r\n </span>\r\n <span *ngSwitchCase="\'zuiselectmultiple\'">\r\n <app-zselectmultiple style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(rowIndex)"></app-zselectmultiple>\r\n </span>\r\n <span *ngSwitchCase="\'textarea\'">\r\n <app-ztextarea style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(rowIndex)"></app-ztextarea>\r\n </span>\r\n <span *ngSwitchCase="[\'zuidatetime\',\'zdate\', \'ztime\',\'zdatetime\',\'zshortdate\'].includes(col.fieldType) ? col.fieldType : \'\'">\r\n <app-zdatetime style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(rowIndex)"></app-zdatetime>\r\n </span>\r\n <span *ngSwitchDefault>\r\n <input style="width: 100%;" type="text" [formControl]="this.getFormControl(rowIndex, col.field)" />\r\n </span>\r\n </div>\r\n <span style="margin-top: 10px;" *ngFor="let icon of col.clickableIcons">\r\n <span [ngClass]="icon.Class ? icon.Class : \'\'" *ngIf="!!icon && (!!dataItem.WFS_StatusCode && !!icon)\r\n ? dataItem.WFS_StatusCode !== icon.WFS_StatusCode\r\n : true;\r\n else disabledButton" (click)="onBtnClick($event, icon, dataItem, dataItem[col.field])">\r\n {{icon.Name || dataItem[col.field]}} <fa-icon [icon]="icon.Icon" style="padding: 4px 6px;">\r\n </fa-icon>\r\n </span>\r\n <ng-template #disabledButton>\r\n </ng-template>\r\n </span>\r\n \x3c!-- <strong>{{ dataItem[col.field] }}</strong> --\x3e\r\n \x3c!-- <span class="{{dataItem.Discontinued ? \'discontinued\' : \'active\'}}">\r\n {{dataItem.Discontinued ? "discontinued" : "active"}}\r\n </span> --\x3e\r\n </ng-template>\r\n <ng-template kendoGridFooterTemplate let-column let-columnIndex="columnIndex" *ngIf="data.EnableAggregate">\r\n <div style="margin: 5px 0;" [ngSwitch]="col.fieldType">\r\n {{col.aggregateType}}\r\n <span *ngSwitchCase="\'zdate\'">\r\n {{ col.aggregateValue | date: \'dd/MM/yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'ztime\'">\r\n {{ col.aggregateValue | date: \'HH:mm\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zshortdate\'">\r\n {{ col.aggregateValue | date: \'MMM yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zdatetime\'">\r\n {{ col.aggregateValue | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zuidatetime\'">\r\n {{ col.aggregateValue | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'number\'">\r\n {{ col.aggregateValue | number }}\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n {{ col.aggregateValue | number: getFormat(col, \'1.2.2\') }}\r\n </span>\r\n <span *ngSwitchCase="\'znumeric\'">\r\n {{ col.aggregateValue | number: getFormat(col) }}\r\n </span>\r\n <span *ngSwitchCase="\'url\'" style="color: blue; cursor: pointer; text-decoration:underline;">\r\n {{ col.aggregateValue }}\r\n </span>\r\n <span *ngSwitchDefault>\r\n {{ col.aggregateValue }}\r\n </span>\r\n </div>\r\n </ng-template>\r\n </kendo-grid-column>\r\n <kendo-grid-command-column *ngIf="data.EnableGridCommand" width="180" [columnMenu]="false">\r\n <ng-template kendoGridCellTemplate let-isNew="isNew">\r\n <button kendoGridSaveCommand>\r\n {{ isNew ? \'Save\' : \'Update\' }}\r\n </button>\r\n <button kendoGridCancelCommand [primary]="true">\r\n {{ isNew ? \'Discard changes\' : \'Cancel\' }}\r\n </button>\r\n <button kendoGridEditCommand>\r\n {{ "Edit" }}\r\n </button>\r\n <button kendoGridRemoveCommand>\r\n {{ "Remove" }}\r\n </button>\r\n </ng-template>\r\n </kendo-grid-command-column>\r\n <kendo-grid-excel fileName="Export.xlsx" [fetchData]="allResults"></kendo-grid-excel>\r\n </kendo-grid>\r\n <div *ngIf="isLoading" class="k-i-loading"></div>\r\n </div>\r\n</div>\r\n',styles:[":host ::ng-deep kendo-grid .k-grid-content{white-space:nowrap}:host ::ng-deep kendo-grid .k-toolbar{background-color:#e3ecf8}:host ::ng-deep kendo-grid .k-grid-header{background-color:#e3ecf8;font-weight:600}:host ::ng-deep kendo-grid .k-button{border-radius:5px;box-shadow:0 2px 2px rgba(0,0,0,.1);background-color:#c9daf2}:host ::ng-deep kendo-grid .k-grid-header .k-grid-filter:hover,:host ::ng-deep kendo-grid .k-grid-header .k-header-column-menu:hover,:host ::ng-deep kendo-grid .k-grid-header .k-hierarchy-cell .k-icon:hover{background-color:#c9daf2}:host ::ng-deep kendo-grid .k-grid .k-grid-filter,:host ::ng-deep kendo-grid .k-grid .k-header-column-menu,:host ::ng-deep kendo-grid .k-grid .k-hierarchy-cell .k-icon{color:#132842}:host ::ng-deep kendo-grid .k-dropdown .k-dropdown-wrap,:host ::ng-deep kendo-grid .k-dropdowntree .k-dropdown-wrap{border-radius:2px;background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-grid tr.k-alt{background-color:rgba(232,238,246,.5)}:host ::ng-deep kendo-grid tbody tr.k-state-hover,:host ::ng-deep kendo-grid tbody tr:hover{background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-grid .k-pager-wrap{background-color:#e3ecf8}:host ::ng-deep kendo-grid .k-pager-numbers .k-link.k-state-selected{color:#ff5e5b;background-color:rgba(255,94,91,.4)}:host ::ng-deep kendo-grid .k-pager-numbers .k-link.k-state-hover,:host ::ng-deep kendo-grid .k-pager-numbers .k-link:hover{color:#ff5e5b;background-color:rgba(255,94,91,.15)}.cellWrapText .gridCell{white-space:pre-line!important}.rightAligned{text-align:right}.centerAligned{text-align:center}.gridTitle{margin:20px 10px 5px;font-size:18px;font-weight:700}.gridCell.primary{color:var(--ion-color-primary)}.gridCell.secondary{color:var(--ion-color-secondary)}.gridCell.tertiary{color:var(--ion-color-tertiary)}.gridCell.success{color:var(--ion-color-success-shade)}.gridCell.warning{color:var(--ion-color-warning)}.gridCell.danger{color:var(--ion-color-danger)}.gridCell.dark{color:var(--ion-color-dark)}.gridCell.medium{color:var(--ion-color-medium)}.gridCell.light{color:var(--ion-color-light)}.k-i-loading{position:absolute;top:100px;left:0;right:0;bottom:0;font-size:45px;background-color:hsla(0,0%,100%,.3);color:#0f4800}"]}]}],De.ctorParameters=function(){return[{type:o.ActivatedRoute},{type:o.Router},{type:u.FormBuilder},{type:a.AuthService},{type:a.WebApiService},{type:a.ZGridStatePersistingService},{type:a.ToastService},{type:a.ZCoreService},{type:a.StorageSessionService},{type:Q}]},De.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],tooltipDir:[{type:t.ViewChild,args:[M.TooltipDirective]}]};var Re=function(){function e(e){var t=this;this.attachmentService=e,this.imgWidth=null,this.imgHeight=null,this.imgSrc=null,this.randomNumber=Math.random(),this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){return q(this,void 0,void 0,(function(){var e,t,o;return _(this,(function(n){switch(n.label){case 0:return a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Size&&-1!==this.data.Size.toLowerCase().indexOf("x")&&(e=this.data.Size.toLowerCase().split("x"),this.imgWidth=e[0],this.imgHeight=e[1]),this.Guid=this.getGroupValue(this.data.Guid,this.group),this.FileName=this.getGroupValue(this.data.FileName,this.group),null==this.Guid||null==this.FileName?[3,3]:[4,this.attachmentService.getImageBlob(this.FileName,this.Guid)];case 1:return t=n.sent(),o=this,[4,this.attachmentService.convertBlobToBase64(t)];case 2:o.Image=n.sent(),n.label=3;case 3:return[2]}}))}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.onDataSourceChange=function(){var e=this.getGroupValue(this.data.Value,this.group),t=this.getGroupValue(this.data.SourceUrl,this.group);if(e&&t)return t+"?id="+e+"&size="+this.data.Size},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(e,t)},e.prototype.getImgStyle=function(){},e.prototype.onIconClick=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick,this.group);if("function"==typeof e)return e();e?"function"==typeof e||console.warn("ZImg OnItemClick property is not a function: ",e):console.warn("ZImg OnItemClick property is invalid: ",e)},e.prototype.getIconName=function(){return a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Icon,this.group)},e}();Re.decorators=[{type:t.Component,args:[{selector:"app-zimg",template:'<ion-item>\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">{{data.Label}} <ion-text\r\n *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <img *ngIf="!!getGroupValue(data.Value, group)" [src]="onDataSourceChange()" [width]="imgWidth" [height]="imgHeight" style="border-radius: 50%; margin: 5px auto" />\r\n <img *ngIf="this.Guid !==undefined && this.Guid !==FileName" [src]="this.Image" [width]="imgWidth" [height]="imgHeight" style="border-radius: 50%; margin: 5px auto" />\r\n \r\n <div *ngIf="!getGroupValue(data.Value, group)" (click)="onIconClick()">\r\n <ion-icon name="getIconName()" style="zoom:4.0;">\r\n </ion-icon>\r\n </div>\r\n</ion-item>',styles:[""]}]}],Re.ctorParameters=function(){return[{type:a.AttachmentService}]},Re.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Oe=function(){function e(e,t,o,n,r,i){this.activatedRoute=e,this.resourceApiService=t,this.authService=o,this.zGridStatePersistingService=n,this.webapiService=r,this.router=i,this.zgrid=null,this.scrollViewCards={data:[],total:0},this.responseData={data:[],total:0},this.params={referId:null,pageNo:0,pageSize:20,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:"",filters:"",columns:"",grantType:4},this.gridColumns=[],this.usableColumns=[],this.dataSource=null,this.state={skip:0,take:10},this.paginationApiPostUrl=null,this.resourceURL=null,this.filterItems=[],this.progressStyles={color:"",background:"green"},this.loadingPanelVisible=!1,this.label={visible:!0,format:"percent",position:"center"}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.dataSource=this.field.DataSource?this.field.DataSource:null,this.filterItems=this.group.filterItems,!this.dataSource){if(this.resourceURL=a.ZComponentHelper.getGroupValue(this.field.ResourceURL,this.grp),!this.resourceURL)return;var e=this.resourceURL.split("/api/");if(e[1])e[1]="Page"+e[1],this.paginationApiPostUrl=e.join("/api/");else{var t=this.resourceURL.split("/");t[t.length-2]="Page"+t[t.length-2],this.paginationApiPostUrl=t.join("/")}this.setFilterParamsByParentRefId()}this.generateGridColumns()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.getData=function(){this.zgrid&&this.zgrid.getDataBinding()},e.prototype.generateGridColumns=function(){var e=this;this.loadingPanelVisible=!0,a.ZComponentHelper.getGroupValue(this.field.ColumnFields,this.grp).pipe(i.tap((function(t){var o=e.getGridSettings(),n=e.field.FieldElementName;a.ZComponentHelper.getGridColumns(t,e.gridColumns,e.group,e.authService,n,o,e.usableColumns),e.getFilterParamsColumns(),e.getFilter()})),i.tap((function(){e.getDataBinding()}))).subscribe((function(){}))},e.prototype.getDataBinding=function(){var e,t=this;if(this.dataSource)a.ZComponentHelper.getGroupValue(this.field.DataSource,this.grp);else this.param.pageSize=null!==(e=this.field.PageSize)&&void 0!==e?e:50,this.field.ExternalPagination?this.webapiService.postApi(this.paginationApiPostUrl,this.param,null,null,null,null,!0).subscribe((function(e){i.delay(2500),t.responseData={data:e.dataSet,total:e.totalCount},t.scrollViewCards={data:e.dataSet,total:e.totalCount},e.dataSet.length>0&&t.getRecordsSummary(),t.data.ResourceURLAlt&&t.getNewSurvey(),t.loadingPanelVisible=!1})):this.webapiService.getApi(this.resourceURL,null,null,null,null,null,!0).subscribe((function(e){e.dataSet?(e.dataSet,e.totalCount):(e,e.length),t.loadingPanelVisible=!1}))},e.prototype.getRecordsSummary=function(){var e=this,t=[];this.responseData.data.forEach((function(e){t.push(e.Id)})),this.webapiService.postApi(this.resourceApiService.getURL("ppsapsurveysummaryinfoURL"),t,null,null,null,null,!0).subscribe((function(t){e.responseData.data.forEach((function(e){t.forEach((function(t){t.SurveyId==e.Id&&(e.value=Number.isNaN(t.TotalTakenQuestions/t.TotalQuestions*100)?0:Math.round(t.TotalTakenQuestions/t.TotalQuestions*100))}))}))}))},e.prototype.getNewSurvey=function(){var e,t=this,o={columns:"PartnerMillId,SurveyTemplateId,WFS_StatusCode,WFS_StatusName",pageSize:null!==(e=this.field.PageSize)&&void 0!==e?e:50};this.webapiService.postApi(this.resourceApiService.getPageUrl(this.data.ResourceURLAlt),o,null,null,null,null,!0).subscribe((function(e){e.dataSet.forEach((function(e){e.value=0,t.scrollViewCards.data.push(e),t.scrollViewCards.total+=1}))}))},Object.defineProperty(e.prototype,"field",{get:function(){return this.data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grp",{get:function(){return this.group},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"param",{get:function(){return this.params},enumerable:!1,configurable:!0}),e.prototype.getGridSettings=function(){var e="ionic-field::"+this.authService.e1Token.userName,t=this.field.Name+"::"+this.field.Value,o=this.zGridStatePersistingService.get(e);if(o&&o[0]){var n=o.find((function(e){return e.dataFormFields===t}));if(n)return n.gridSettings.columnsConfig.sort((function(e,t){return e.orderIndex-t.orderIndex}))}},e.prototype.setFilterParamsByParentRefId=function(){var e=this.getFieldReferenceId()||this.grp.referenceId,t=this.field.ReferenceField||this.grp.parentReferenceField;if(e&&this.grp.parentReferenceField){var o={key:t,ops:"=",value:e};this.params.filterParams.push(o)}},e.prototype.getFieldReferenceId=function(){var e=null;return this.field.ReferenceId&&(e=a.ZComponentHelper.getGroupValue(this.field.ReferenceId,this.grp)),e},e.prototype.getFilterParamsColumns=function(){var e=[];this.gridColumns.forEach((function(t){t.valueExpr?e.push(t.valueExpr+" as "+t.field):e.push(t.field)})),e.length>0&&-1===e.indexOf("Id")&&e.push("Id");var t=[];t.push(e.join(",")),this.usableColumns.length>0&&t.push(this.usableColumns.join(",")),this.params.columns=t.join(",")},e.prototype.start=function(e){var t=this;if(this.group,this.group.isLoading=!0,"New"==e.WFS_StatusName){var o={UserId:this.group.PSAPUSERID,SurveyMillId:e.Id};this.webapiService.postApi(this.resourceApiService.getURL("ppsapsurveycreateURL"),o,null,null,null,null,!0).subscribe((function(o){if(t.group.isLoading=!1,t.data.EditClickURL){var n=a.ZComponentHelper.getGroupValue(t.data.ColumnFields,t.group);t.group.subject.next({type:"zgrid-cellClick",target:t.data.EditClickURL,data:e,columnFields$:n})}else t.router.navigate([t.group.editModelURL,o.Id,"edit"],{relativeTo:t.activatedRoute})}))}else if(this.group.isLoading=!1,this.data.EditClickURL){var n=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);this.group.subject.next({type:"zgrid-cellClick",target:this.data.EditClickURL,data:e,columnFields$:n})}else this.router.navigate([this.group.editModelURL,e.Id,"edit"],{relativeTo:this.activatedRoute})},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e.prototype.getFilter=function(){var e=this;(this.params.filters&&this.field.Filters?this.params.filters=this.params.filters+" && "+this.field.Filters:!this.params.filters&&this.field.Filters&&(this.params.filters=this.field.Filters),this.field.Filters&&-1!==this.field.Filters.indexOf("group."))&&this.field.Filters.split(" ").filter((function(e){return-1!==e.trim().indexOf("group.")})).forEach((function(t){var o=a.ZComponentHelper.getGroupValue(t,e.grp);e.params.filters=e.params.filters.replace(t,o)}))},e.prototype.valueChange=function(e){if(e.length<1)return this.scrollViewCards.data=this.responseData.data,void(this.scrollViewCards.total=this.responseData.total);this.scrollViewCards.data=this.responseData.data.filter((function(t){return e.includes(t.WFS_StatusName)})),this.scrollViewCards.total=this.responseData.data.filter((function(t){return e.includes(t.WFS_StatusName)})).length},e}();Oe.decorators=[{type:t.Component,args:[{selector:"app-zkcard",template:'\x3c!--<kendo-multiselect [data]="filterItems" [value]="value" [placeholder]="\'Survey Status\'" [filterable]="true"\r\n (valueChange)="valueChange($event)"></kendo-multiselect>\r\n --\x3e\r\n<div class="survey-card-list">\r\n <div *ngFor="let card of scrollViewCards.data">\r\n \x3c!--<scrollview-card [card]="card"></scrollview-card>--\x3e\r\n <kendo-card class="custom-card-draft" *ngIf="card.WFS_StatusName == \'Draft\'" [width]="\'250px\'">\r\n <kendo-card-header class="k-hbox">\r\n <div>\r\n <h1 kendoCardTitle>{{ card.SurveyTemplateName }}</h1>\r\n <p kendoCardSubtitle>Survey Doc No: {{card.DocumentNo}}</p>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body class="card-body">\r\n Mill Name: {{card.PartnerMillName}}\r\n <br />\r\n Survey Status: {{card.WFS_StatusName}}\r\n </kendo-card-body>\r\n <kendo-card-footer>\r\n Survey Progression:\r\n <kendo-progressbar style="width: 210px; border-radius:10px" [value]="card.value" [label]="label" [progressCssStyle]="progressStyles">\r\n </kendo-progressbar>\r\n\r\n <kendo-card-actions class="k-hbox-actionBtn" orientation="horizontal" [layout]="\'end\'">\r\n <button class="k-button k-navigation"\r\n (click)="start(card)">\r\n <div style="justify-content:space-between">\r\n <span> Continue </span>\r\n <fa-icon [icon]="getFontAwesome(\'play\')"></fa-icon>\r\n </div>\r\n </button>\r\n </kendo-card-actions>\r\n </kendo-card-footer>\r\n </kendo-card>\r\n\r\n <kendo-card class="custom-card-submit" *ngIf="card.WFS_StatusName == \'Submitted\'" [width]="\'250px\'">\r\n <kendo-card-header class="k-hbox">\r\n <div>\r\n <h1 kendoCardTitle>{{ card.SurveyTemplateName }}</h1>\r\n <p kendoCardSubtitle>Survey Doc No: {{card.DocumentNo}}</p>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body class="card-body">\r\n Mill Name: {{card.PartnerMillName}}\r\n <br />\r\n Survey Status: {{card.WFS_StatusName}}\r\n </kendo-card-body>\r\n <kendo-card-footer>\r\n Survey Progression:\r\n <kendo-progressbar style="width: 210px; border-radius:10px" [value]="card.value" [label]="label" [progressCssStyle]="progressStyles">\r\n </kendo-progressbar>\r\n <kendo-card-actions class="k-hbox-actionBtn" orientation="horizontal" [layout]="\'end\'">\r\n <button class="k-button k-navigation"\r\n (click)="start(card)">\r\n <div style="justify-content:space-between">\r\n <span> View </span>\r\n <fa-icon [icon]="getFontAwesome(\'file-alt\')"></fa-icon>\r\n </div>\r\n </button>\r\n </kendo-card-actions>\r\n </kendo-card-footer>\r\n </kendo-card>\r\n\r\n <kendo-card class="custom-card-new" *ngIf="card.WFS_StatusName == \'New\'" [width]="\'250px\'">\r\n <kendo-card-header class="k-hbox">\r\n <div>\r\n <h1 kendoCardTitle>{{ card.SurveyTemplateName }}</h1>\r\n <p kendoCardSubtitle>{{card.DocumentNo}}</p>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body class="card-body">\r\n Mill Name: {{card.PartnerMillName}}\r\n <br />\r\n Survey Status: {{card.WFS_StatusName}}\r\n </kendo-card-body>\r\n <kendo-card-footer>\r\n Survey Progression: \r\n <kendo-progressbar style="width: 210px; border-radius:10px" [value]="card.value" [label]="label" [progressCssStyle]="progressStyles">\r\n </kendo-progressbar>\r\n <kendo-card-actions class="k-hbox-actionBtn" orientation="horizontal" [layout]="\'end\'">\r\n <button class="k-button k-navigation"\r\n (click)="start(card)">\r\n <div style="justify-content:space-between">\r\n <span> Start </span>\r\n <fa-icon [icon]="getFontAwesome(\'play\')"></fa-icon>\r\n </div>\r\n </button>\r\n </kendo-card-actions>\r\n </kendo-card-footer>\r\n </kendo-card>\r\n </div>\r\n</div>\r\n',styles:[".survey-card-list{display:flex;flex-wrap:wrap;background-color:#f0dcd9;align-items:center;border-radius:10px}.custom-card-submit{margin:20px;border:3px solid green;border-radius:15px}.custom-card-draft,.custom-card-new{margin:20px;border:3px solid orange;border-radius:15px}"]}]}],Oe.ctorParameters=function(){return[{type:o.ActivatedRoute},{type:a.ResourceApiService},{type:a.AuthService},{type:a.ZGridStatePersistingService},{type:a.WebApiService},{type:o.Router}]};var Me=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.labelText="",this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setData=function(t){e.labelText=t}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.labelText=a.ZComponentHelper.getGroupValue(this.data.Label.toString(),this.group)},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.isVisible=function(){return null===this.componentProperties.isVisible?a.ZComponentHelper.isVisible.call(this,this.data):this.componentProperties.isVisible},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)+" "+t.DivClass},e}();Me.decorators=[{type:t.Component,args:[{selector:"app-zlabel",template:'<ion-item [formGroup]="form" *ngIf="componentProperties.isVisible" [ngClass]="getClass(form, data)">\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-label class="ion-text-wrap label" Position="Fixed" [color]="data.Color">{{labelText}}</ion-label>\r\n </span>\r\n </div>\r\n</ion-item>\r\n',styles:[".subtitle{font-weight:700;text-decoration:underline}.mediumFont .label,.subtitle .label{font-size:15px}.label{font-size:12px;white-space:pre-wrap!important}.boldFont .label{font-weight:700}.underlineFont .label{text-decoration:underline}"]}]}],Me.ctorParameters=function(){return[]},Me.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ae=function(){function e(e,t,o){var n=this;this.fieldService=e,this.resourceApiService=t,this.workflowService=o,this.componentProperties=new a.ZComponentProperties,this.positionMode="fixed",this.bottomEnd={vertical:"bottom",horizontal:"end"},this.items=[],this.dialOpen=!1,this.isWorkflowButton=!1,this.buttonColor="info",this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.events=[],this.e1wfs_wfcGetWorkflowButtonURL=this.resourceApiService.getURL("e1wfs_wfcGetWorkflowButtonURL"),this.e1wfs_wfc_getWorkflowInitialStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getWorkflowInitialStatusURL"),this.e1wfs_wfc_getDocumentStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getDocumentStatusURL")}return e.prototype.ngOnInit=function(){var e=this;if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data=this.getFirstzButton(this.group.fields),this.data)if(a.ZComponentHelper.isNullUndefinedEmpty(this.data.WorkflowCode)){var t=this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null);try{t.subscribe((function(t){t.forEach((function(t){var o=e.getButtonLabel(t);e.isBtnVisible(t.Visible)&&e.items.push({label:o,icon:a.ZComponentHelper.getIcon(t.Icon),clickEvent:t.ClickEvent,click:function(o){e.buttonClick(t)}})}))}))}catch(e){console.error("error: ",e)}}else this.isWorkflowButton=!0,this.loadWorkflowButton()},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFirstzButton=function(e){for(var t=0;t<e.length-1;t++){if("zbuttons"===e[t].Type||"zworkflowbuttons"===e[t].Type)return e[t];Array.isArray(e[t].Value)&&this.getFirstzButton(e[t].Value)}return null},e.prototype.getButtonLabel=function(e){var t=e.Label;t||(t=e.Name);var o=t.match(/^{{.*}}$/gi);return o?(o=o[0].slice(2,-2),a.ZComponentHelper.getGroupValue(o,this.group)):t},e.prototype.buttonClick=function(e){this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:null})},e.prototype.onBlur=function(){},e.prototype.onFocus=function(){this.isWorkflowButton&&this.loadWorkflowButton()},e.prototype.onOpen=function(e){this.dialOpen=!0,console.log("open")},e.prototype.onClose=function(e){this.dialOpen=!1,console.log("close")},e.prototype.onDialItemClick=function(e){e.item.click()},e.prototype.loadWorkflowButton=function(){var e=this;this.items=[];var t=null;this.group.zModel&&(t=this.group.zModel.WFS_DocumentId),this.workflowService.appendWFS_DocumentsInfo(this.data.WorkflowCode,t);try{this.workflowService.getWorkflowButtonsField(this.data.WorkflowCode,this.e1wfs_wfcGetWorkflowButtonURL,String(!1)).subscribe((function(t){t.forEach((function(t){var o=e.getButtonLabel(t),n=JSON.parse(t.Attributes),r=n.Label||o;e.isBtnVisible(t.Visible)&&e.items.push({label:r,fieldAttribute:t,icon:a.ZComponentHelper.getIcon(n.Icon),clickEvent:t.ClickEvent,click:function(o){e.workflowButtonClick(t)}})}))}))}catch(e){console.error("error: ",e)}},e.prototype.workflowButtonClick=function(e){var t=this,o=JSON.parse(e.Attributes);switch(e.TypeCode.toUpperCase()){case"FUNCTION":console.log("Functional Button: ",e.Name),this.workflowService.functionalButton_OnClick(o,this.group);break;case"GOTO":console.log("GOTO Button: ",e.Name),this.workflowService.gotoButton_Onclick(e,this.data,o,this.group,!1).subscribe((function(e){t.loadWorkflowButton(),e&&t.workflowService.triggerSendEmail(t.group).subscribe()}));break;default:console.log("Invalid Button Type. ",e.Name)}},e}();Ae.decorators=[{type:t.Component,args:[{selector:"app-zmfb",template:'<div class="zmfb-wrap">\r\n <div class="k-overlay" *ngIf="dialOpen"></div>\r\n <kendo-floatingactionbutton icon="plus"\r\n [themeColor]="buttonColor"\r\n [positionMode]="positionMode"\r\n [align]="bottomEnd"\r\n [dialItems]="items"\r\n (blur)="onBlur()"\r\n (focus)="onFocus()"\r\n (open)="onOpen($event)"\r\n (close)="onClose($event)"\r\n (dialItemClick)="onDialItemClick($event)">\r\n <ng-template kendoDialItemTemplate let-item let-isFocused="isFocused">\r\n <span class="k-fab-item-text">\r\n <span>{{ item.label }}</span>\r\n </span>\r\n <kendo-avatar shape="circle" [themeColor]="buttonColor">\r\n <span class="k-icon k-i-{{ item.icon }}"></span>\r\n </kendo-avatar> \r\n </ng-template>\r\n </kendo-floatingactionbutton>\r\n</div>\r\n',styles:[".button-item{padding:8px 10px;width:100%;display:flex;align-items:center;background-color:#fff}.button-details{margin-left:8px;display:flex;flex-direction:column;align-items:flex-start}.custom-focused-class{box-shadow:inset 0 0 8px rgba(0,0,0,.2)}.zmfb-wrap{display:flex;justify-content:center;margin-top:60px}@media only screen and (max-device-width:768px){.k-bottom-end,.k-pos-bottom-end{padding-bottom:16vh}}"]}]}],Ae.ctorParameters=function(){return[{type:a.FieldService},{type:a.ResourceApiService},{type:a.WorkflowService}]},Ae.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ne=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.RightAlign){var e=this;setTimeout((function(){var t=$("#"+e.data.Value).find("input");t.length>0&&(t[0].style.textAlign="right")}),750)}},e.prototype.valueHandler=function(){var e=this.form.get(this.data.Value).value;if(""!=e)return+e},e.prototype.onChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:{value:e,field:this.data}})},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getStyle=function(e){var t="";return t+=e?"right":"left"},e.prototype.autocorrectHandler=function(){return this.data.AutoCorrect?"on":"off"},e.prototype.inputmodeHandler=function(){return"decimal"},e.prototype.getKendoStyle=function(){return(this.componentProperties.isReadOnlyField?this.group[this.componentProperties.isReadOnlyField]:this.componentProperties.isReadOnly)?{margin:"7px 0 0 0",width:"100%","background-color":"#eaeaea",color:"#545454"}:{margin:"7px 0 0 0",width:"100%"}},e}();Ne.decorators=[{type:t.Component,args:[{selector:"app-znumeric",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" [ngClass]="getIon_InvalidClass(form, data)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label> \r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-input *ngIf="isMobileScreen()"\r\n #znumericField\r\n [id]="data.Value"\r\n type="number"\r\n [autocorrect]="autocorrectHandler()"\r\n [min]="data.MinValue"\r\n [max]="data.MaxValue"\r\n [step]="data.StepValue"\r\n [value]="valueHandler()"\r\n [inputmode]="inputmodeHandler()"\r\n [formControlName]="data.Value"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [placeholder]="data.PlaceHolder"\r\n [ngStyle]="{\'text-align\': getStyle(data.RightAlign ? true : false)}">\r\n </ion-input>\r\n \x3c!-- (ionChange)="onChange($event)"\r\n (keyup)="handleMobileKeyUp($event)"\r\n (ionInput)="handleMobileInput($event)"--\x3e\r\n <kendo-numerictextbox *ngIf="!isMobileScreen()"\r\n [spinners]="data.ShowSpinners"\r\n [autoCorrect]="data.AutoCorrect"\r\n [min]="data.MinValue"\r\n [max]="data.MaxValue"\r\n [step]="data.StepValue"\r\n [format]="data.FormatOptions"\r\n [id]="data.Value"\r\n [placeholder]="data.PlaceHolder"\r\n [value]="valueHandler()"\r\n [disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (valueChange)="onChange($event)"\r\n [ngStyle]="getKendoStyle()">\r\n </kendo-numerictextbox>\r\n </span> \r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-numerictextbox{color:var(--z-text-color)}"]}]}],Ne.ctorParameters=function(){return[]},Ne.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ee=function(){function e(e,t,o){var n=this;this.resourceApiService=e,this.webApiService=t,this.cacheService=o,this.items=[],this.infinitezData=[],this.infiniteSearchText=null,this.toggleSelectable=!0,this.itemValueField=null,this.itemTextField=null,this.itemDataField=null,this.itemTemplate="{{item[itemTextField]}}",this.infiniteScrollPageNo=0,this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.dataInfo={itemsResourceURL:"",optionFilters:"",totalCount:0},this.setEnable=function(e){var t=n.group.form.controls[n.data.Value];e?t.enable():t.disable(),n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required),a.ZComponentHelper.hasCCField(n.data.Type)&&a.ZComponentHelper.changeValidator(e,n.group,n.data.CCValue,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnDestroy=function(){this.debounceSub&&this.debounceSub.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.isLoading=!0,a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setSelectMultipleTextValue(this.data.CCSelectOptions,this);var t,o=this.data.CCValue;if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$&&this.group.zModel&&this.group.zModel[o]){var n=this.group.zModel[o];(t=a.ZComponentHelper.getInfiniteData(null,"",this,n.toString()))?t.subscribe((function(t){console.log(e.data.Name," - initial zData load: ",t),e.isLoading=!1})):this.isLoading=!1,a.ZComponentHelper.isMobileScreen()||this.handleFilter(null,!0)}else this.data.CCOptionResourceURL?this.lazyLoadDataOptions().subscribe((function(){e.isLoading=!1})):this.isLoading=!1},e.prototype.lazyLoadDataOptions=function(){var e=this.resourceApiService.getURL(this.data.CCOptionResourceURL),t=new a.ZSelectPostApiParams;return t.sorts=this.data.CCOptionSort,t.columns=this.data.CCOptionColumns,t.filters=this.data.CCOptionFilter,a.ZComponentHelper.getDataOptions(this.data.CCOptionName,t,this.group,e,this.cacheService,this.webApiService,this.data.DisableCache)},e.prototype.getItemsData=function(){if(this.data.HasInfiniteScroll)return this.infinitezData;var e=this.data.CCOptionName||this.itemDataField||"group.zData."+this.data.Name;return Array.isArray(this.data.CCSelectOptions)&&!this.group.zData[e.slice(12)]&&(this.group.zData[e.slice(12)]=this.data.CCSelectOptions,this.itemDataField=e),e.startsWith("zData.")?this.group.zData[e.slice(6)]||[]:e.startsWith("group.zData.")?this.group.zData[e.slice(12)]||[]:e.startsWith("group.")?this.group[e.slice(6)]||[]:e?this.group[e]||[]:void console.warn(this.data.Name," - Invalid setting for OptionName: ",e)},e.prototype.onChangeEvent=function(e){if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$){this.itemTextField.toString();var t=this.itemValueField.toString(),o=[];e&&(o=this.infinitezData.filter((function(o){return o[t]===e})),this.modelzData=o.slice()),this.itemDataField.startsWith("group.zData.")?this.group.zData[this.itemDataField.slice(12)]=o:this.itemDataField.startsWith("group.")&&(this.group[this.itemDataField.slice(6)]=o)}this.group.subject.next({type:"onChange",target:this.data.CCOnChange,event:event,data:{value:e,field:this.data}})},e.prototype.onValueChange=function(e){a.ZComponentHelper.setModelValue(this.data.CCValue,e,this.group),this.onChangeEvent(e)},e.prototype.onChange=function(e){console.log("zselectmultiple (onChange): ",e.value),a.ZComponentHelper.setModelValue(this.data.CCValue,e.value,this.group);var t=this.form.controls[this.data.CCValue];this.handleClose(),!this.data.CCIsRequired||null!==e.value&&0!==e.value.length?t.setErrors(null):t.setErrors({required:!0}),this.onChangeEvent(e.value)},e.prototype.clearItems=function(){this.selectComponent.clear(),this.selectComponent.close()},e.prototype.toggleItems=function(){this.selectComponent.toggleItems(this.toggleSelectable),this.toggleSelectable=!this.toggleSelectable},e.prototype.confirmItems=function(){this.selectComponent.confirm(),this.selectComponent.close()},e.prototype.onSearch=function(e){var t=e.component;if(t&&(t.startSearch(),t.enableInfiniteScroll()),this.data.HasInfiniteScroll)null!==e.text&&e.text!==this.infiniteSearchText&&(this.infiniteScrollPageNo=0),this.getInfiniteData(e);else{this.infiniteScrollPageNo=0,t&&(t.items=[]);var o={referId:null,pageNo:0,pageSize:15,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:""},n=this.data.SearchFields?this.data.SearchFields:this.itemTextField,r=a.ZComponentHelper.filterSearchItems(this.getItemsData(),e.text,n,o.pageNo,o.pageSize);if(t){var i=t.items.concat(r);t.items=i,t.endInfiniteScroll(),t.endSearch(),this.isLoading=!1}}},e.prototype.getInfiniteData=function(e){a.ZComponentHelper.getInfiniteData(e.component,e.text,this)},e.prototype.handleFilter=function(e,t){var o=this;this.debounceSub&&this.debounceSub.unsubscribe(),this.debounceSub=r.of([]).pipe(i.delay(500)).subscribe((function(){o.isLoading=!0,o.onSearch({component:null,text:e})}))},e.prototype.handleOpen=function(){this.data.HasInfiniteScroll&&this.handleFilter(null)},e.prototype.handleClose=function(){},e.prototype.handleBlur=function(){},e.prototype.getItemTemplate=function(e,t,o,n,r){return this.data.ItemTemplate?a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ItemTemplate)({item:e,data:t,group:o,itemValueField:n,itemTextField:r}):r?e[r]:Object.values(e).join(", ")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e.bind(this.group.ctrlScope)(this.group):e},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(e,t)},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.onAddItem=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnAddItem);if("function"==typeof t)return t.bind(this.group.ctrlScope)();console.warn("Invalid declaration of OnAddItem: ",t)},e}();Ee.decorators=[{type:t.Component,args:[{selector:"app-zpostselectinput",template:'<ion-item [ngClass]="getIon_InvalidClass(form, data)" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()">\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%" *ngIf="!isLoading">\r\n <span style="flex-basis: 35%;">\r\n <ionic-selectable #selectComponent item-content\r\n [id]="data.CCValue" headerColor="primary" clearButtonText="Clear"\r\n [canClear]="true" searchFailText="Nothing found :(" [canSearch]="!data[\'disable-search\']" \r\n [placeholder]="data.CCPlaceHolder" [(ngModel)]="group.zModel[data.CCValue]" \r\n [shouldFocusSearchbar]="!data[\'disable-search\']" [hasInfiniteScroll]="!!data.HasInfiniteScroll"\r\n (onSearch)="onSearch($event)" (onInfiniteScroll)="getInfiniteData($event)" [isMultiple]="data.Multiple"\r\n [isEnabled]="!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)" [items]="getItemsData()"\r\n [itemValueField]="itemValueField" [itemTextField]="itemTextField" [shouldStoreItemValue]="true"\r\n [canAddItem]="!!data.OnAddItem" (onAddItem)="onAddItem($event)"\r\n (onChange)="onChange($event)">\r\n\r\n <ng-template ionicSelectableItemIconTemplate let-item="item" let-isItemSelected="isItemSelected">\r\n <fa-icon slot="start" class="isItemSelected" [icon]="[\'far\', isItemSelected ? \'check-circle\': \'circle\']" size="sm" [styles]="{\'color\': isItemSelected ? \'dodgerBlue\' : \'lightGray\'}"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n \x3c!-- <ion-icon name="close-circle"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times-circle\'" size="md"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item="item">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <ng-template zselectitemelement [item]="item"></ng-template> --\x3e\r\n </ng-template>\r\n </ionic-selectable>\r\n </span>\r\n <span style="flex-basis: 60%; margin-left: 5px;" [formGroup]="form">\r\n <ion-input [id]="data.Value" [placeholder]="data.PlaceHolder" [type]="\'text\'" [formControlName]="data.Value"\r\n [readonly]="data.ReadOnly" [inputmode]="\'text\'"></ion-input>\r\n </span>\r\n <app-uivalidationmessage style="flex-basis: 5%;" [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()" [ngClass]="getIon_InvalidClass(form, data)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex-basis: 35%;">\r\n <kendo-combobox [id]="data.CCValue"\r\n [data]="getItemsData()" [valueField]="itemValueField" [textField]="itemTextField"\r\n [formControlName]="data.CCValue" [valuePrimitive]="true"\r\n [placeholder]="data.CCPlaceHolder"\r\n (valueChange)="onValueChange($event)"\r\n [filterable]="!!data.HasInfiniteScroll"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n (filterChange)="handleFilter($event)"\r\n (open)="handleOpen()"\r\n (close)="handleClose()"\r\n (blur)="handleBlur()"\r\n style="margin-top: 7px; width: 100%;"\r\n [loading]="isLoading">\r\n </kendo-combobox>\r\n </span>\r\n <span style="flex-basis: 60%; margin-left: 5px;" [formGroup]="form">\r\n <input kendoTextBox [id]="data.Value" [placeholder]="data.PlaceHolder" type="text"\r\n [formControlName]="data.Value" \r\n style="margin: 7px 0 0 0; width: 100%"\r\n />\r\n </span>\r\n <app-uivalidationmessage style="flex-basis: 5%;"\r\n [group]="group" [data]="data" [form]="form">\r\n </app-uivalidationmessage>\r\n </div>\r\n</ion-item>',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}"]}]}],Ee.ctorParameters=function(){return[{type:a.ResourceApiService},{type:a.WebApiService},{type:a.CacheService}]},Ee.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],selectComponent:[{type:t.ViewChild,args:["selectComponent",{static:!0}]}]};var Le=function(){function e(e,t,o){this.fieldService=e,this.resourceApiService=t,this.webApiService=o,this.qbItems={},this.componentProperties=new a.ZComponentProperties,this.currentConfig={fields:{},allowEmptyRulesets:!0},this.allowRuleset=!0,this.allowCollapse=!1,this.persistValueOnFieldChange=!1,this.isDisabled=!1,this.bootstrapClassNames={arrowIcon:"fa fa-chevron-right px-2",button:"btn",buttonGroup:"btn-group",rightAlign:"order-12 ml-auto",switchRow:"d-flex px-2",switchGroup:"d-flex align-items-center",switchRadio:"custom-control-input",switchLabel:"custom-control-label",switchControl:"custom-control custom-radio custom-control-inline",row:"row p-2 m-1",rule:"border",ruleSet:"border",invalidRuleSet:"alert alert-danger",emptyWarning:"text-danger mx-auto",operatorControl:"form-control",operatorControlSize:"col-auto pr-0",fieldControl:"form-control",fieldControlSize:"col-auto pr-0",entityControl:"form-control",entityControlSize:"col-auto pr-0",inputControl:"form-control",inputControlSize:"col-auto"},this.conditionList=["AND","OR"]}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),!0===this.data.AllowCollapse&&(this.allowCollapse=this.data.AllowCollapse),!1===this.data.AllowRuleset&&(this.allowRuleset=this.data.AllowRuleset),this.fields=this.fieldService.getFormFieldCode(this.data.Value,"FormField",null,null);try{if(this.fields.subscribe((function(t){t.forEach((function(t){var o=[];if("category"==t.Type||"multiselect"==t.Type)if(t.ValueOptions)t.ValueOptions.forEach((function(e){o.push({name:e.Name,value:e.Value})}));else{var n=t.SelectOptions,r=Object.assign({},a.DefaultPageSettingParams);r.pageSize=n.PageSize,r.columns=n.Columns,r.filters+=n.Filters,r.sortColumnName=n.SortColumnName,r.sortOrder=n.SortOrder,e.webApiService.httpPost$(e.resourceApiService.getPageUrl(n.ResourceURL),r).pipe(i.map((function(r){r.dataSet.forEach((function(e){o.push({name:e[n.Name],value:e[n.Value]})})),e.qbItems[t.Value].options=o}))).subscribe()}e.qbItems[t.Value]={name:t.Name,value:t.Value,type:t.Type,operatorList:t.Operators,options:o,nullable:t.IsNullable,defaultValue:t.DefaultValue?t.DefaultValue:null}})),e.currentConfig={fields:e.qbItems,allowEmptyRulesets:!0}})),this.data.DefaultQuery){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.DefaultQuery,this.group);t&&this.setQueryValue(t)}}catch(e){console.error("error: ",e)}},e.prototype.completeRule=function(e,t){this.isDisabled=e;var o=this.data.Type+"_"+this.data.Value;(this.group[o]=this.queryBuilder.value,t&&(this.group[o]=t),e||(this.group[o]=[]),this.group.zModel&&a.ZComponentHelper.setModelValue(this.data.Value,this.group[o],this.group),this.data.OnApplyClick&&!t)&&a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnApplyClick,this.group).bind(this)(this.group,this.group[o],this.fields)},e.prototype.getOperators=function(e,t){return this.qbItems[t.field].operatorList?this.qbItems[t.field].operatorList:e},e.prototype.getOptionList=function(e,t){return this.qbItems[t.field].options?this.qbItems[t.field].options:e},e.prototype.setQueryValue=function(e){if(e){var t=He(JSON.parse(e));this.queryCtrl=t,this.completeRule(!0,t)}},e}();function He(e){var t={};return e.condition?(t.condition=e.condition,t.rules=e.rules.map((function(e){return He(e)}))):(t.field=e.field,t.type=e.type,t.operator=e.operator,t.value=e.value instanceof Array?"date"===e.type?new Date(e.value):e.value:["date"===e.type?new Date(e.value):e.value]),t}Le.decorators=[{type:t.Component,args:[{selector:"app-zquerybuilder",template:'<ion-item *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value"\r\n *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="qbcontainer">\r\n <query-builder [(ngModel)]=\'queryCtrl\'\r\n [(config)]=\'currentConfig\'\r\n [allowRuleset]=\'allowRuleset\'\r\n [allowCollapse]=\'allowCollapse\'\r\n [persistValueOnFieldChange]=\'persistValueOnFieldChange\'>\r\n \x3c!--AND OR Swtich--\x3e\r\n <ng-container *querySwitchGroup="let ruleset; let onChange=onChange">\r\n <kendo-dropdownlist [(ngModel)]="ruleset.condition"\r\n (ngModelChange)="onChange($event, rule)"\r\n [data]="conditionList"\r\n [disabled]="isDisabled"\r\n style="text-transform: uppercase;">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--Rule RuleSet Remove Rule Set Button--\x3e\r\n <ng-container *queryButtonGroup="let ruleset; let addRule=addRule; let addRuleSet=addRuleSet; let removeRuleSet=removeRuleSet">\r\n \x3c!--Add Rule Button--\x3e\r\n <ion-button fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="addRule()"\r\n [disabled]="isDisabled"\r\n class="buttonadd">\r\n <fa-icon [icon]="\'plus\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Add</span>\r\n </ion-button>\r\n \x3c!--Add RuleSet Button--\x3e\r\n <ion-button *ngIf="addRuleSet"\r\n fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="addRuleSet()"\r\n [disabled]="isDisabled"\r\n class="buttonadd">\r\n <fa-icon [icon]="\'plus\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Add Rule Set</span>\r\n </ion-button>\r\n \x3c!--Remove RuleSet Button--\x3e\r\n <ion-button *ngIf="removeRuleSet"\r\n fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="removeRuleSet()"\r\n [disabled]="isDisabled"\r\n class="buttonremove">\r\n <fa-icon [icon]="\'times\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Remove Rule Set</span>\r\n </ion-button>\r\n </ng-container>\r\n \x3c!--Remove Rule Button--\x3e\r\n <ng-container *queryRemoveButton="let rule; let removeRule=removeRule">\r\n <ion-button fill="outline"\r\n size="small"\r\n strong="false"\r\n (click)="removeRule(rule)"\r\n [disabled]="isDisabled"\r\n class="buttonremove">\r\n <fa-icon [icon]="\'minus\'"\r\n style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Remove Rule</span>\r\n </ion-button>\r\n </ng-container>\r\n \x3c!--Name dropdown--\x3e\r\n <ng-container *queryField="let rule; let fields=fields; let onChange=onChange; let getFields=getFields">\r\n <kendo-dropdownlist [(ngModel)]="rule.field"\r\n (ngModelChange)="onChange($event, rule)"\r\n [data]="getFields(rule.entity)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [disabled]="isDisabled"\r\n style="padding-right:10px;">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--Operator dropdown--\x3e\r\n <ng-container *queryOperator="let rule; let operators=operators; let onChange=onChange" style="padding:10px">\r\n <kendo-dropdownlist [(ngModel)]="rule.operator"\r\n (ngModelChange)="onChange($event, rule)"\r\n [data]="getOperators(operators, rule)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [disabled]="isDisabled"\r\n style="padding-right:10px;">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--Text Field--\x3e\r\n <ng-container *queryInput="let rule; let field=field; type: \'string\'; let onChange=onChange">\r\n <kendo-textbox [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [clearButton]="true"\r\n [disabled]="isDisabled"\r\n class="customTextbox">\r\n </kendo-textbox>\r\n </ng-container>\r\n \x3c!--TextArea Field--\x3e\r\n <ng-container *queryInput="let rule; type: \'textarea\'; let onChange=onChange">\r\n <kendo-textarea [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [rows]="5"\r\n [cols]="40"\r\n resizable="none"\r\n [disabled]="isDisabled">\r\n </kendo-textarea>\r\n </ng-container>\r\n \x3c!--Number Field--\x3e\r\n <ng-container *queryInput="let rule; let field=field; type: \'number\'; let onChange=onChange">\r\n <kendo-numerictextbox [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [value]="value"\r\n [decimals]="0"\r\n [disabled]="isDisabled">\r\n </kendo-numerictextbox>\r\n </ng-container>\r\n \x3c!--Date Field--\x3e\r\n <ng-container *queryInput="let rule; type: \'date\'; let onChange=onChange">\r\n <kendo-datepicker [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n calendarType="classic"\r\n [value]="value"\r\n [disabled]="isDisabled">\r\n </kendo-datepicker>\r\n </ng-container>\r\n \x3c!--Category Field--\x3e\r\n <ng-container *queryInput="let rule; let options=options; type: \'category\'; let onChange=onChange">\r\n <kendo-dropdownlist [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [data]="getOptionList(options, rule)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [disabled]="isDisabled">\r\n </kendo-dropdownlist>\r\n </ng-container>\r\n \x3c!--DropDown MultiSelect Field--\x3e\r\n <ng-container *queryInput="let rule; let options=options; type: \'multiselect\'; let onChange=onChange">\r\n <kendo-multiselect [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n [data]="getOptionList(options, rule)"\r\n textField="name"\r\n valueField="value"\r\n [value]="value"\r\n [valuePrimitive]="true"\r\n [autoClose]="false"\r\n style="width:30%"\r\n [disabled]="isDisabled">\r\n </kendo-multiselect>\r\n </ng-container>\r\n \x3c!--Boolean Field--\x3e\r\n <ng-container *queryInput="let rule; type: \'boolean\'; let onChange=onChange">\r\n <input type="checkbox"\r\n [(ngModel)]="rule.value"\r\n (ngModelChange)="onChange()"\r\n class="customCheckBox"\r\n [disabled]="isDisabled"\r\n kendoCheckBox />\r\n </ng-container>\r\n </query-builder>\r\n <br>\r\n <div *ngIf="data.ShowQueryResult">\r\n <div>\r\n <label>Query Result</label>\r\n </div>\r\n <textarea class="output"\r\n resizable="none"\r\n [rows]="10"\r\n [cols]="40">{{queryCtrl | json}}</textarea>\r\n <br>\r\n </div>\r\n <div style="width:100%" slot="end">\r\n <ion-button *ngIf="!isDisabled"\r\n strong="false"\r\n (click)="completeRule(true, null)"\r\n class="buttonapply">\r\n <fa-icon [icon]="\'save\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Apply</span>\r\n </ion-button>\r\n <ion-button *ngIf="isDisabled"\r\n strong="false"\r\n (click)="completeRule(false, null)"\r\n class="buttonapply">\r\n <fa-icon [icon]="\'save\'" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">Undo Apply</span>\r\n </ion-button>\r\n </div>\r\n </div>\r\n</ion-item>\r\n',styles:[".qbcontainer{border-radius:5px;border:1px solid rgba(0,0,0,.08);padding:10px;margin:10px 0;width:100%}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}:host ::ng-deep query-builder .k-dropdown .k-dropdown-wrap,:host ::ng-deep query-builder .k-dropdowntree .k-dropdown-wrap{background-color:#fff}:host ::ng-deep query-builder .customTextbox{width:calc(100% - 440px);min-width:230px}:host ::ng-deep query-builder .customCheckBox{width:27px;height:27px}:host ::ng-deep query-builder .buttonadd{background-color:#479400;color:#fff;border-color:#479400}:host ::ng-deep query-builder .buttonremove{background-color:#f04141;color:#fff;border-color:#f04141;margin-top:0}.buttonapply{background-color:#5596e6;color:#fff;border-color:#5596e6}"]}]}],Le.ctorParameters=function(){return[{type:a.FieldService},{type:a.ResourceApiService},{type:a.WebApiService}]},Le.propDecorators={queryBuilder:[{type:t.ViewChild,args:[m.QueryBuilderComponent,{static:!1}]}],classNames:[{type:t.Input}],data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ze=function(){function e(e){var t;this.resourceApiService=e,this.componentProperties=new a.ZComponentProperties,this.title="Report Viewer",this.viewerContainerStyle=((t={position:"relative",width:"100%",height:"800px"})["font-family"]="ms sans serif",t),this.resourceURL=null,this.ReportSource=null,this.isVisible=!0,this.paramToResizeReportViewer=!1}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.resizeReportView=this.onPageReady.bind(this),this.resourceURL=this.resourceApiService.getURL(this.data.ResourceURL),this.resourceURL||(this.resourceURL=this.resourceApiService.getURL("e1wfs_wfm_workflowMasterReportURL")),this.data.IsAutoGenerateReport&&(this.ReportSource=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReportSource))},e.prototype.generateReport=function(){var e=this.group.ReportSource;this.resourceURL=e.url,this.viewer.setReportSource(e),this.viewer.refreshReport(),this.data.AutoResize?this.paramToResizeReportViewer=!0:this.paramToResizeReportViewer=!1;$("#trv-main-menu-export-command").on("mouseover",(function(){setTimeout((function(){}),300)}))},e.prototype.ready=function(e){},e.prototype.viewerToolTipOpening=function(e){},e.prototype.onRenderingEnd=function(e,t){},e.prototype.exportBegin=function(e){},e.prototype.exportEnd=function(e){},e.prototype.onPageReady=function(e,t){if(this.paramToResizeReportViewer){var o=$(".trv-pages-area .trv-page-wrapper").height()+$(".trv-nav").outerHeight()+20,n=$("#reportViewer1");if(n.height()!==o){n.height(o);var r=$(".trv-document-map-splitter").data("kendoSplitter");void 0!==r&&r.resize(!0);var i=$(".trv-parameters-splitter").data("kendoSplitter");void 0!==i&&i.resize(!0)}}},e}();Ze.decorators=[{type:t.Component,args:[{selector:"app-zreport",template:'<div *ngIf="isVisible" width="100%" height="800px">\r\n <tr-viewer #ReportViewer\r\n [containerStyle]="viewerContainerStyle"\r\n [serviceUrl]="resourceURL"\r\n [reportSource]="ReportSource"\r\n [viewMode]="\'INTERACTIVE\'"\r\n [scaleMode]="\'SPECIFIC\'"\r\n [pageMode]="\'SINGLE_PAGE\'"\r\n [scale]="1.0"\r\n [ready]="ready(this)"\r\n [exportBegin]="exportBegin(this)"\r\n [exportEnd]="exportEnd(this)"\r\n [viewerToolTipOpening]="viewerToolTipOpening"\r\n [enableAccessibility]="false"\r\n [pageReady] = "resizeReportView()"\r\n [renderingEnd]="onRenderingEnd">\r\n </tr-viewer>\r\n</div>\r\n',encapsulation:t.ViewEncapsulation.None,styles:[""]}]}],Ze.ctorParameters=function(){return[{type:a.ResourceApiService}]},Ze.propDecorators={viewer:[{type:t.ViewChild,args:["ReportViewer"]}],data:[{type:t.Input}],group:[{type:t.Input}]};var Ge=function(){function e(e,t,o){var n=this;this.changeDetector=e,this.storageService=t,this.authService=o,this.isLoading=!0,this.events=[],this.selectedDate=new Date,this.local={inProgress:!1,ctrlScope:null},this.selectedViewIndex=3,this.componentProperties=new a.ZComponentProperties,this.getEventStyles=function(e){if(e&&e.event&&e.event.dataItem){var t=e.event.dataItem.backgroundColor,o=e.event.dataItem.borderColor;return t&&o?{backgroundColor:t,bordercolor:o,color:"white"}:{backgroundColor:"#ff7c73",bordercolor:"#ff7c73",color:"white"}}},this.getSlotClass=function(e){e.start.getHours();return e.resources=n.events,{args:e}},this.setData=function(e){n.selectedViewIndex=e||n.selectedViewIndex,n.getItems()},this.setEnable=function(e){n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.local.ctrlScope=this.group.ctrlScope,this.data.SaveFilter&&(this.setSchedulerSessionKey(this.group),this.getSchedulerSessionFilter(this.group)),this.getItems()},e.prototype.ngAfterViewInit=function(){},e.prototype.getItems=function(){var e=this.data.Value;if(Array.isArray(e))return e;var t=a.ZComponentHelper.getGroupEvalValue.call(this,e);if(!t)return console.warn("Invalid field.Value setting ",this.data.Value),[];this.events=t,this.events&&(this.isLoading=!1)},e.prototype.onDateChange=function(e){this.local.inProgress||(this.group.selectedDate=e.selectedDate,console.log("zschedule component date-change selection: ",e.dateRange),this.group.subject.next({type:"zscheduler-onDateChange",target:this.data.CalendarOptions+".dateClick",event:e.dateRange}),this.changeDetector.detectChanges())},e.prototype.onSlotDblClick=function(e){var t=this,o=e.sender,n=e.start,a=e.end,l=e.isAllDay;console.log("zscheduler component slot-double-click: ",o,n,a,l),"month"!==o.selectedView.name&&"week"!==o.selectedView.name||(this.local.inProgress=!0,this.selectedViewIndex=3,this.selectedDate=n,r.of([]).pipe(i.take(1),i.delay(1e3)).subscribe((function(){return t.local.inProgress=!1})))},e.prototype.onEventDblClick=function(e){var t=e.sender,o=e.event;if(console.log("zscheduler component event-double-click: ",t,o),this.data.OnItemClick){this.beforeSchedulerGetData(this.group),this.setSchedulerSessionFilter(this.group);var n=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);"function"==typeof n&&n.bind(this.group.ctrlScope)(o)}else;},e.prototype.setSchedulerSessionKey=function(e){e.SchedulerStorageKey||(e.SchedulerStorageKey="zgrid_"+e.resourceURL+"_"+this.data.Value+"::"+this.authService.e1Token.userName)},e.prototype.beforeSchedulerGetData=function(e){return console.warn("beforeDateRangeBinding triggered"),e.beforeSchedulerGetData?e.beforeSchedulerGetData(e):(console.warn("group.beforeDateRangeBinding is undefined"),r.of(!0))},e.prototype.setSchedulerSessionFilter=function(e){return q(this,void 0,void 0,(function(){var t,o;return _(this,(function(n){return e.SchedulerStorageKey?(t=e.SchedulerStorageKey,o={},e&&this.storageService&&this.data.SaveFilter&&(o={SelectedDate:JSON.stringify(e.selectedDate)},this.storageService.set(t,JSON.stringify(o))),[2]):[2,null]}))}))},e.prototype.getSchedulerSessionFilter=function(e){return q(this,void 0,void 0,(function(){var t,o=this;return _(this,(function(n){switch(n.label){case 0:return e.SchedulerStorageKey?(t=e.SchedulerStorageKey,this.storageService?[4,this.storageService.get(t).then((function(e){if(e&&e.value&&"null"!==e.value){var t=JSON.parse(e.value);return o.selectedDate=new Date(JSON.parse(t.SelectedDate)),e}return null}))]:[3,2]):[2,null];case 1:return n.sent(),[3,3];case 2:return[2,null];case 3:return[2]}}))}))},e}();Ge.decorators=[{type:t.Component,args:[{selector:"app-zscheduler",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel" position="stacked">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <kendo-scheduler *ngIf="!isLoading" [kendoSchedulerBinding]="events" [selectedDate]="selectedDate" (dateChange)="onDateChange($event)"\r\n [selectedViewIndex]="selectedViewIndex" [eventStyles]="getEventStyles" [slotClass]="getSlotClass" \r\n (slotDblClick)="onSlotDblClick($event)" (eventDblClick)="onEventDblClick($event)" scrollTime="08:00"\r\n [style.height]="(!!data.Height ? [data.Height] : \'600px\')">\r\n \x3c!-- [style.font-size]="(!!data.FontSize ? [data.FontSize] : \'12px\')"> --\x3e\r\n \r\n \x3c!--Note: line-height same with [eventHeight]--\x3e\r\n <ng-template kendoSchedulerEventTemplate let-event>\r\n <span style="margin-left: -5px;line-height: 25px;">{{ event.title }}</span>\r\n </ng-template>\r\n\r\n <ng-template kendoSchedulerToolbarTemplate let-selectedDate="selectedDate">\r\n <zschedulertoolbar [local]="local" [selectedDate]="selectedDate">\r\n </zschedulertoolbar>\r\n <ul kendoSchedulerToolbarViewSelector></ul>\r\n </ng-template>\r\n\r\n <ng-template kendoSchedulerAllDaySlotTemplate let-date="date">\r\n <strong>{{ date | kendoDate: \'dd-MMM-yyyy\' }}</strong>\r\n </ng-template>\r\n <ng-template kendoSchedulerDateHeaderTemplate let-date="date">\r\n <strong>{{ date | kendoDate: "ccc" }}</strong>\r\n </ng-template>\r\n\r\n \r\n \x3c!-- <kendo-scheduler-day-view startTime="08:00">\r\n </kendo-scheduler-day-view>\r\n\r\n <kendo-scheduler-week-view startTime="08:00">\r\n </kendo-scheduler-week-view> --\x3e\r\n\r\n <kendo-scheduler-day-view>\r\n </kendo-scheduler-day-view>\r\n\r\n <kendo-scheduler-week-view>\r\n </kendo-scheduler-week-view>\r\n\r\n <kendo-scheduler-month-view [eventHeight]="25"> \r\n </kendo-scheduler-month-view>\r\n\r\n \x3c!-- <kendo-scheduler-timeline-view>\r\n </kendo-scheduler-timeline-view> --\x3e\r\n\r\n <kendo-scheduler-agenda-view>\r\n </kendo-scheduler-agenda-view>\r\n </kendo-scheduler>\r\n\r\n</ion-item>',styles:["ion-item{--padding-start:0px;--inner-padding-end:0px}"]}]}],Ge.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:a.StorageSessionService},{type:a.AuthService}]},Ge.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],ngStyle:[{type:t.Input}]};var Be=function(){function e(e,t,o){var n=this;this.resourceApiService=e,this.webApiService=t,this.cacheService=o,this.showTooltipsInfoIcon=!1,this.showTooltipsInfoBySide=!1,this.tooltipsInfo=null,this.tooltipsDisplayText=null,this.items=[],this.infinitezData=[],this.infiniteSearchText=null,this.toggleSelectable=!0,this.itemValueField=null,this.itemTextField=null,this.itemDataField=null,this.itemTemplate="{{item[itemTextField]}}",this.infiniteScrollPageNo=0,this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.allowCustomValue=!1,this.autoClose=!0,this.dataInfo={itemsResourceURL:"",optionFilters:"",totalCount:0},this.virtual={itemHeight:28,pageSize:15},this.setEnable=function(e){var t=n.group.form.controls[n.data.Value];e?t.enable():t.disable(),n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnDestroy=function(){this.debounceSub&&this.debounceSub.unsubscribe()},e.prototype.ngOnInit=function(){var e=this;this.isLoading=!0,a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setSelectMultipleTextValue(this.data.SelectOptions,this),this.tooltipsInfo=this.data.TooltipsInfo,this.tooltipsInfo&&(null==this.tooltipsInfo.Icon&&null==this.tooltipsInfo.Icon||this.isMobileScreen()||(this.showTooltipsInfoIcon=!0,this.setTooltipsInfoIcon()),this.tooltipsInfo.SideBySide&&(this.showTooltipsInfoBySide=!0),this.setTooltipsDisplayText()),!1===this.data.AutoClose&&(this.autoClose=this.data.AutoClose),this.iconList=this.data.ClickableIcons,this.iconList&&this.iconList.length>0&&this.iconList.forEach((function(t){void 0===t.Tooltip?t.Tooltip="":t.Tooltip=a.ZComponentHelper.getGroupEvalValue.call(e,t.Tooltip),void 0===t.Position&&(t.Position="top")})),this.buttonList=this.data.ButtonList,this.buttonList&&this.buttonList.forEach((function(t){t.tooltip&&(t.tooltip=a.ZComponentHelper.getGroupEvalValue.call(e,t.tooltip))})),this.allowCustomValue=this.data.AllowCustomValue||!1;var t=this.data.Value,o=this.data,n=this.group.zModel;if(o.HasInfiniteScroll&&o.InfiniteScroll$){var r=null;n&&n[t]&&(r=n[t].toString());var i=a.ZComponentHelper.getInfiniteData(null,"",this,r);i?i.subscribe((function(t){console.log(o.Name," - initial zData load: ",t),e.group&&e.group.afterLoadzDataOptions&&e.group.afterLoadzDataOptions(e.group),e.isLoading=!1})):this.isLoading=!1,a.ZComponentHelper.isMobileScreen()||this.handleFilter(null,!0)}else{var l=a.ZComponentHelper.getGroupEvalValue.call(this,o.IsRequired);if(this.data.OptionResourceURL)this.lazyLoadDataOptions().subscribe((function(o){var r=o.dataSet?o.dataSet:o;r&&1===r.length&&!e.data.DisableAutoFirstSelection&&e.autoSelectFirstOption(l,r[0],t,n.Id),e.group&&e.group.afterLoadzDataOptions&&e.group.afterLoadzDataOptions(e.group),e.isLoading=!1}));else{if(Array.isArray(this.data.SelectOptions)&&this.data.SelectOptions);else{var s=a.ZComponentHelper.getGroupEvalValue.call(this,this.itemDataField);if(s&&1===s.length&&!this.data.DisableAutoFirstSelection){var p=this;setTimeout((function(){p.autoSelectFirstOption(l,s[0],t,p.group.zModel.Id),this.group&&this.group.afterLoadzDataOptions&&this.group.afterLoadzDataOptions(this.group)}),100)}}this.isLoading=!1}}},e.prototype.autoSelectFirstOption=function(e,t,o,n){var r;if(a.ZComponentHelper.isNullUndefinedEmpty(n)&&e){var i=t.Id;this.data.Multiple&&(i=[i]),a.ZComponentHelper.setModelValue(o,i,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:(r={},r.value=i,r.field=this.data,r)}),this.form.markAsPristine()}},e.prototype.lazyLoadDataOptions=function(){var e=this.resourceApiService.getURL(this.data.OptionResourceURL),t=new a.ZSelectPostApiParams;return t.sorts=this.data.OptionSort,t.columns=this.data.OptionColumns,t.filters=this.data.OptionFilter,a.ZComponentHelper.getDataOptions(this.data.OptionName,t,this.group,e,this.cacheService,this.webApiService,this.data.DisableCache)},e.prototype.getInfiniteData=function(e){a.ZComponentHelper.getInfiniteData(e.component,e.text,this)},e.prototype.getItemsData=function(){if(this.data.HasInfiniteScroll)return this.infinitezData;var e=this.data.OptionName||this.itemDataField||"group.zData."+this.data.Name;return Array.isArray(this.data.SelectOptions)&&!this.group.zData[e.slice(12)]&&(this.group.zData[e.slice(12)]=this.data.SelectOptions,this.itemDataField=e),e.startsWith("zData.")?this.group.zData[e.slice(6)]||[]:e.startsWith("group.zData.")?this.group.zData[e.slice(12)]||[]:e.startsWith("group.")?this.group[e.slice(6)]||[]:e?this.group[e]||[]:void console.warn(this.data.Name," - Invalid setting for OptionName: ",e)},e.prototype.onSearch=function(e){var t=e.component;if(t&&(t.startSearch(),t.enableInfiniteScroll()),this.data.HasInfiniteScroll)null!==e.text&&e.text!==this.infiniteSearchText&&(this.infiniteScrollPageNo=0,this.modelzData=[]),this.getInfiniteData(e);else{this.infiniteScrollPageNo=0,t&&(t.items=[]);var o={referId:null,pageNo:0,pageSize:20,sortColumnName:"",sortOrder:"",sortColumnNames:[],sortOrders:[],filterParams:[],parameters:""},n=this.data.SearchFields?this.data.SearchFields:this.itemTextField,r=a.ZComponentHelper.filterSearchItems(this.getItemsData(),e.text,n,o.pageNo,o.pageSize);if(t){var i=t.items.concat(r);t.items=i,t.endInfiniteScroll(),t.endSearch(),this.isLoading=!1}}},e.prototype.handleFilter=function(e,t){var o=this;this.debounceSub&&this.debounceSub.unsubscribe(),this.debounceSub=r.of([]).pipe(i.delay(500)).subscribe((function(){o.isLoading=!0,o.onSearch({component:null,text:e}),o.group&&o.group.afterLoadzDataOptions&&o.group.afterLoadzDataOptions(o.group)}))},e.prototype.handleOpen=function(){this.data.HasInfiniteScroll&&this.handleFilter(null)},e.prototype.handleClose=function(){},e.prototype.handleBlur=function(){},e.prototype.getItemTemplate=function(e,t,o,n,r){return this.data.ItemTemplate?a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ItemTemplate)({item:e,data:t,group:o,itemValueField:n,itemTextField:r}):r?e[r]:Object.values(e).join(", ")},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e.bind(this.group.ctrlScope)(this.group):e},e.prototype.getIsRequiredValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.IsRequired);return"function"==typeof e?e.bind(this.group.ctrlScope)(this.group):e},e.prototype.getGroupValue=function(e,t){return a.ZComponentHelper.getGroupValue(e,t)},e.prototype.getClass=function(e,t){var o=this.getIon_InvalidClass(e,t);return(o||"")+" "+this.data.Class},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.onAddItem=function(e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnAddItem);if("function"==typeof t)return t.bind(this.group.ctrlScope)();console.warn("Invalid declaration of OnAddItem: ",t)},e.prototype.clearData=function(){a.ZComponentHelper.setModelValue(this.data.Value,"",this.group)},e.prototype.clearItems=function(){this.selectComponent.clear(),this.selectComponent.close()},e.prototype.confirmItems=function(){this.selectComponent.confirm(),this.selectComponent.close()},e.prototype.toggleItems=function(){this.selectComponent.toggleItems(this.toggleSelectable),this.toggleSelectable=!this.toggleSelectable},e.prototype.onIconClick=function(e){this.onNavigateTo(e)},e.prototype.onNavigateTo=function(e){a.ZComponentHelper.getGroupEvalValue.call(this,e)&&this.group.subject.next({type:"ztext-onNavigateTo",target:e,data:this.group.zModel[this.data.Value]})},e.prototype.disableOpenOnFocus=function(e){return this.data.DisableOpenOnFocus?null:e},e.prototype.onChangeEvent=function(e){if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$){this.itemTextField.toString();var t=this.itemValueField.toString(),o=[];e&&(o=this.infinitezData.filter((function(o){return o[t]===e})),this.modelzData=o.slice()),this.itemDataField.startsWith("group.zData.")?this.group.zData[this.itemDataField.slice(12)]=o:this.itemDataField.startsWith("group.")&&(this.group[this.itemDataField.slice(6)]=o)}this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:{value:e,field:this.data}})},e.prototype.onValueChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.onChangeEvent(e)},e.prototype.onChange=function(e){console.log("zselectmultiple (onChange): ",e.value),a.ZComponentHelper.setModelValue(this.data.Value,e.value,this.group);var t=this.form.controls[this.data.Value];this.handleClose(),!this.getIsRequiredValue()||null!==e.value&&0!==e.value.length?t.setErrors(null):t.setErrors({required:!0}),this.onChangeEvent(e.value)},e.prototype.setLabelText=function(e){this.data.Label=e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.setTooltipsInfoClass=function(){return this.tooltipsInfo&&!this.showTooltipsInfoIcon&&this.showTooltipsInfoBySide?"tooltipsinfo-text":"tooltipsinfo-text-wide"},e.prototype.setTooltipsInfoColor=function(){return this.tooltipsInfo&&this.tooltipsInfo.TextColor?this.tooltipsInfo.TextColor:"#acacac"},e.prototype.setTooltipsInfoIcon=function(e){this.showTooltipsInfoIcon&&(""!=this.tooltipsInfo.Icon?this.tooltipsDisplayIcon=e||this.tooltipsInfo.Icon:this.tooltipsDisplayIcon="question-circle")},e.prototype.setTooltipsDisplayText=function(e){this.tooltipsInfo?this.tooltipsDisplayText=e||this.tooltipsInfo.DisplayText:this.tooltipsDisplayText="<Display text error>"},e.prototype.setTooltipsInfoSideBySide=function(){return this.tooltipsInfo&&this.showTooltipsInfoBySide&&!this.showTooltipsInfoIcon?"ion-row divselectmultiple tooltipsinfo-right":"ion-row divselectmultiple"},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e}();Be.decorators=[{type:t.Component,args:[{selector:"app-zselectmultiple",template:'<ion-item [ngClass]="getClass(form, data)" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()">\r\n\r\n <ion-label *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="componentProperties.isRequired" color="danger">*</ion-text>\r\n </ion-label>\r\n\r\n <kendo-label *ngIf="data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n <div [class]="setTooltipsInfoSideBySide()" *ngIf="!isLoading">\r\n <div style="flex-grow: 1;">\r\n <ionic-selectable #selectComponent item-content\r\n searchFailText="Nothing found :("\r\n headerColor="primary"\r\n clearButtonText="Clear"\r\n [(ngModel)]="group.zModel[data.Value]"\r\n [id]="data.Value"\r\n [items]="getItemsData()"\r\n [itemValueField]="itemValueField"\r\n [itemTextField]="itemTextField"\r\n [canAddItem]="!!data.OnAddItem"\r\n [canClear]="true"\r\n [placeholder]="data.PlaceHolder"\r\n [canSearch]="!data[\'disable-search\']"\r\n [shouldFocusSearchbar]="!data[\'disable-search\']"\r\n [hasInfiniteScroll]="!!data.HasInfiniteScroll"\r\n [isMultiple]="data.Multiple"\r\n [isEnabled]="!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [shouldStoreItemValue]="true"\r\n (onSearch)="onSearch($event)"\r\n (onInfiniteScroll)="getInfiniteData($event)"\r\n (onAddItem)="onAddItem($event)"\r\n (onChange)="onChange($event)">\r\n\r\n <ng-template ionicSelectableItemIconTemplate\r\n let-item="item"\r\n let-isItemSelected="isItemSelected">\r\n <fa-icon slot="start"\r\n class="isItemSelected"\r\n size="sm"\r\n [icon]="[\'far\', isItemSelected ? \'check-circle\': \'circle\']"\r\n [styles]="{\'color\': isItemSelected ? \'dodgerBlue\' : \'lightGray\'}"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n \x3c!-- <ion-icon name="close-circle"></ion-icon> --\x3e\r\n <fa-icon [icon]="\'times-circle\'" size="md"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf="getIsRequiredValue()" color="danger">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item="item">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <ng-template zselectitemelement [item]="item"></ng-template> --\x3e\r\n </ng-template>\r\n\r\n \x3c!--<ng-template ionicSelectableFooterTemplate>\r\n <ion-toolbar>\r\n <ion-row>\r\n <ion-col>\r\n <ion-button expand="full" ng-reflect-disabled="false" ng-reflect-expand="full" class="button button-full button-solid ion-activatable ion-focusable hydrated" (click)="clearItems()">\r\n Clear\r\n </ion-button>\r\n </ion-col>\r\n <ion-col>\r\n <ion-button expand="full" ng-reflect-disabled="false" ng-reflect-expand="full" class="button button-full button-solid ion-activatable ion-focusable hydrated" (click)="confirmItems()">\r\n OK\r\n </ion-button>\r\n </ion-col>\r\n </ion-row>\r\n </ion-toolbar>\r\n </ng-template>--\x3e\r\n </ionic-selectable>\r\n </div>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n \x3c!-- side by side and desktop tooltipsinfo --\x3e\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon && showTooltipsInfoBySide"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n\r\n<ion-item [ngClass]="getClass(form, data)" [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n <span kendoTooltip\r\n *ngIf="data.TooltipsInfo && showTooltipsInfoIcon"\r\n [title]="tooltipsDisplayText">\r\n <fa-icon [icon]="tooltipsDisplayIcon"\r\n class="tooltipsinfo-icon">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n \x3c!-- mobile tooltipsinfo below label--\x3e\r\n <div [class]="setTooltipsInfoSideBySide()">\r\n <div style="flex: 1;">\r\n <kendo-combobox *ngIf="!data.Multiple"\r\n #comboboxComponent\r\n [data]="getItemsData()"\r\n [valueField]="itemValueField"\r\n [textField]="itemTextField"\r\n [formControlName]="data.Value"\r\n [valuePrimitive]="true"\r\n [placeholder]="data.PlaceHolder"\r\n [allowCustom]="allowCustomValue"\r\n [suggest]="true"\r\n [filterable]="!!data.HasInfiniteScroll"\r\n [openOnFocus]="disableOpenOnFocus(comboboxComponent)"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n [loading]="isLoading"\r\n (valueChange)="onValueChange($event)"\r\n (filterChange)="handleFilter($event)"\r\n [virtual]="virtual"\r\n (open)="handleOpen()"\r\n (close)="handleClose()"\r\n (blur)="handleBlur()"\r\n style="margin-top: 7px; width: 100%;">\r\n <ng-template kendoComboBoxItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <span class="template">{{ dataItem.value }}</span> {{ dataItem.text }} --\x3e\r\n </ng-template>\r\n <ng-template kendoTextBoxSuffixTemplate>\r\n\r\n \x3c!-- For Validation feature --\x3e\r\n <app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"\r\n class="validation-icon"></app-uivalidationmessage>\r\n </ng-template>\r\n </kendo-combobox>\r\n <kendo-multiselect *ngIf="data.Multiple"\r\n [data]="getItemsData()"\r\n [valueField]="itemValueField"\r\n [textField]="itemTextField"\r\n [formControlName]="data.Value"\r\n [valuePrimitive]="true"\r\n [placeholder]="data.PlaceHolder"\r\n [allowCustom]="allowCustomValue"\r\n [filterable]="!!data.HasInfiniteScroll"\r\n [checkboxes]="data.EnableCheckbox"\r\n [loading]="isLoading"\r\n [autoClose]="autoClose"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n (valueChange)="onValueChange($event)"\r\n (filterChange)="handleFilter($event)"\r\n (open)="handleOpen()"\r\n (close)="handleClose()"\r\n (blur)="handleBlur()"\r\n style="margin-top: 7px; width: 100%;">\r\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n \x3c!-- <span class="template">{{ dataItem.value }}</span> {{ dataItem.text }} --\x3e\r\n </ng-template>\r\n </kendo-multiselect>\r\n </div>\r\n\r\n <div *ngFor="let item of iconList">\r\n <div kendoTooltip style="text-align: center; padding-top: 10px;"\r\n showOn="hover"\r\n [tooltipWidth]="item.Width"\r\n [position]="item.Position">\r\n <span *ngIf="!!item && item.Color"\r\n (click)="onIconClick(item.Click)"\r\n [title]="item.Tooltip"\r\n style="margin-top: 10px;">\r\n <fa-icon [icon]="item.Icon"\r\n [ngStyle]="{\'padding\': \'4px 6px\', \'color\': (item.Color ? item.Color : \'black\')}"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <ion-button *ngFor="let button of buttonList; let i = button"\r\n fill="outline"\r\n color="dark"\r\n size="small"\r\n strong="false"\r\n class="button-container"\r\n style="margin-top: 7px;"\r\n (click)="onIconClick(button.click)"\r\n [hidden]="!button.visible"\r\n [disabled]="group.isTriggered || button.disabled">\r\n <fa-icon *ngIf="button.icon" [icon]="getFontAwesome(button.icon)" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">{{ button.text }}</span>\r\n </ion-button>\r\n\r\n <app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"></app-uivalidationmessage>\r\n\r\n \x3c!-- side by side and desktop tooltipsinfo --\x3e\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n\r\n </div>\r\n</ion-item>\r\n',styles:["fa-icon.isItemSelected{display:inline-block;width:1em;height:1em;contain:strict;fill:currentcolor;box-sizing:initial!important;font-size:20px;margin-top:10px;margin-bottom:14px;margin-right:unset;margin-inline-end:20px}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divselectmultiple{justify-content:space-between;width:100%;color:#000}.tooltipsinfo-text{margin-left:5px}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:1.2fr .05fr 1fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]}]}],Be.ctorParameters=function(){return[{type:a.ResourceApiService},{type:a.WebApiService},{type:a.CacheService}]},Be.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],iconList:[{type:t.Input}],buttonList:[{type:t.Input}],selectComponent:[{type:t.ViewChild,args:["selectComponent"]}]};var je=function(){function e(e){var t=this;this.authService=e,this.state={lastSelectedTabIndex:0,currentTabs:Array(),allTabs:Array()},this.componentProperties=new a.ZComponentProperties,this.selectTab=function(e){t.state.lastSelectedTabIndex=e},this.setTabsVisible=function(e,o){t.state.allTabs.length<=Math.max.apply(null,e)||Math.min.apply(null,e)<0?console.log("Invalid Tab index : "+e.join(",")):(e.forEach((function(e){t.state.allTabs[e].Visible=o})),t.refreshCurrentTabs())},this.setTabCounter=function(e,o){(t.data.Label?t.data.Label:t.data.TabItems).length<=e||e<0?console.log("Invalid Tab index : "+e):t.state.currentTabs[e].Counter=o},this.setEnable=function(e){t.componentProperties.isReadOnly=!e},this.setVisible=function(e){t.componentProperties.isVisible=e,t.data.Visible=e},this.setRequire=function(e){t.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,t.group,t.data.Value,t.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),a.ZComponentHelper.setFieldsDivClass(this.group._projectName,this.group.fieldName,this.data,this.authService),this.setCurrentTabs(),this.restoreTabSelection()},e.prototype.setCurrentTabs=function(){var e,t;if(this.state.currentTabs=new Array,Array.isArray(this.data.Label)){var o=!1;for(var n in this.data.Icon&&Array.isArray(this.data.Icon)&&this.data.Icon.length===this.data.Label.length&&(o=!0),this.data.Label)this.state.currentTabs.push({Label:this.data.Label[n],Icon:o?this.data.Icon[n]:null,Visible:!0,Index:parseInt(n)});this.state.allTabs=this.state.currentTabs,this.data.TabVisibleFalseIndex&&this.setTabsVisible(this.data.TabVisibleFalseIndex,!1)}else if(this.data.TabItems){var r=0;try{for(var i=U(this.data.TabItems),l=i.next();!l.done;l=i.next()){var s=l.value;this.state.currentTabs.push({Label:s.Label,Icon:s.Icon?s.Icon:null,Visible:a.ZComponentHelper.getGroupValue(s.Visible,this.group),Counter:"string"==typeof s.Counter?a.ZComponentHelper.getGroupValue(s.Counter,this.group):s.Counter,Index:r++})}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.state.allTabs=this.state.currentTabs}},e.prototype.refreshCurrentTabs=function(){var e=this,t=this.state.allTabs;if(Array.isArray(this.data.Label)){this.state.currentTabs=new Array;var o=!1;this.data.Icon&&Array.isArray(this.data.Icon)&&this.data.Icon.length===this.data.Label.length&&(o=!0);var n=function(n){var i=t.filter((function(t){return t.Label==e.data.Label[n]}));i.length>0&&i[0].Visible&&r.state.currentTabs.push({Label:r.data.Label[n],Icon:o?r.data.Icon[n]:null,Visible:!0,Index:parseInt(n)})},r=this;for(var i in this.data.Label)n(i)}else Object.assign(this.state.currentTabs,this.state.allTabs)},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.getSelectedTab=function(e){return this.state.lastSelectedTabIndex===e},e.prototype.setSelectTab=function(e){this.state.lastSelectedTabIndex=e},e.prototype.restoreTabSelection=function(){if(!1!==this.data.AllowSaveState){var e="tabSelections"in this.group?this.group.tabSelections:null;null!==e&&e.has(this.data.Name)?this.state.lastSelectedTabIndex=e.get(this.data.Name):null===e?(e=new Map,this.group.tabSelections=e,e.set(this.data.Name,0)):e.has(this.data.Name)||e.set(this.data.Name,0)}},e.prototype.onTabSelect=function(e){this.state.lastSelectedTabIndex=e.index,this.saveState(e);var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ClickEvent);"function"==typeof t&&t.bind(this.group.ctrlScope)(e)},e.prototype.saveState=function(e){!1!==this.data.AllowSaveState&&this.group.tabSelections.set(this.data.Name,e.index)},e.prototype.getFontAwesome=function(e){return a.ZComponentHelper.getFontAwesome(e)},e}();je.decorators=[{type:t.Component,args:[{selector:"app-ztab",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="margin: 10px 0 6px 0;"> \r\n <kendo-tabstrip #kendoTabStripInstance [keepTabContent]="true" (tabSelect)="onTabSelect($event)">\r\n <kendo-tabstrip-tab *ngFor="let tab of state.currentTabs; let i = index" [selected]="getSelectedTab(i)" [disabled]="!tab.Visible">\r\n <ng-template kendoTabTitle *ngIf="tab.Visible" >\r\n <fa-icon *ngIf="!!tab.Icon" [icon]="getFontAwesome(tab.Icon)" style="padding-right: 5px;"></fa-icon>\r\n {{tab.Label}}\r\n <ion-badge class="tab-item-counter" color="danger" *ngIf="!!tab.Counter">{{tab.Counter}}</ion-badge>\r\n </ng-template>\r\n <ng-template kendoTabContent> \r\n <div class="ion-row">\r\n <app-zformcontrol \r\n [ngClass]="group[field.isVisibleField] ? field.DivClass : \r\n ((field.Visible === true) ? field.DivClass : \'flex-hide\')" \r\n *ngFor="let field of data.Value | tabfilter: tab.Index + \'\'"\r\n [field]="field" [group]="group" [form]="form" id="{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </ng-template>\r\n </kendo-tabstrip-tab>\r\n </kendo-tabstrip>\r\n</div>',styles:[".tab-item-counter{margin-left:4px}"]}]}],je.ctorParameters=function(){return[{type:a.AuthService}]},je.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],tabstrip:[{type:t.ViewChild,args:["kendoTabStripInstance"]}]};var qe=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.showTooltipsInfoIcon=!1,this.showTooltipsInfoBySide=!1,this.tooltipsInfo=null,this.tooltipsDisplayText=null,this.clearButtonIcon="time-circle",this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){var e=this;a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.adornmentList=this.data.AdornmentList,this.data.OnClick&&!this.data.ReadOnly&&(this.componentProperties.isReadOnly=!0),this.componentProperties.isReadOnly||(this.showClearButton=this.data.ClearButton),this.tooltipsInfo=this.data.TooltipsInfo,this.tooltipsInfo&&(null==this.tooltipsInfo.Icon&&null==this.tooltipsInfo.Icon||this.isMobileScreen()||(this.showTooltipsInfoIcon=!0,this.setTooltipsInfoIcon()),this.tooltipsInfo.SideBySide&&(this.showTooltipsInfoBySide=!0),this.setTooltipsDisplayText()),this.iconList=this.data.ClickableIcons,this.iconList&&this.iconList.length>0&&this.iconList.forEach((function(t){void 0===t.Tooltip?t.Tooltip="":-1!==t.Tooltip.indexOf("group.")&&(t.Tooltip=a.ZComponentHelper.getGroupEvalValue.call(e,t.Tooltip)),void 0===t.Position&&(t.Position="top")}))},e.prototype.mapInputType=function(e){switch(e){case"date":return"date";case"ztext":return"text";case"number":case"currency":return"number";case"email":return"email";case"password":return"password";case"search":return"search";case"tel":return"tel";case"text":return"text";case"time":return"time";case"url":return"url";default:return"text"}},e.prototype.mapInputMode=function(e){switch(e){case"date":return"none";case"ztext":return"text";case"number":case"currency":return"decimal";case"email":return"email";case"password":return"text";case"search":return"search";case"tel":return"tel";case"text":return"text";case"time":return"none";case"url":return"url";default:return"text"}},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly);return"function"==typeof e?e():e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getStyle=function(e){var t="";return t+=e?"right":"left"},e.prototype.setTextboxClass=function(){return this.data.OnClick&&!this.data.ReadOnly?"notmobile-textbox-onfocus":"notmobile-textbox"},e.prototype.textboxOnClick=function(){this.group.subject.next({type:"ztext-OnClick",target:this.data.OnClick,event:event,data:{value:event.OnClick,field:this.data}})},e.prototype.onChange=function(e){a.ZComponentHelper.setComponentModelValue(this.data,e.target.value,this.group),this.group.subject.next({type:"onChange",target:this.data.OnChange,event:e,data:{value:e.data,field:this.data}})},e.prototype.onIconClick=function(e){this.onNavigateTo(e)},e.prototype.onNavigateTo=function(e){a.ZComponentHelper.getGroupEvalValue.call(this,e)&&this.group.subject.next({type:"ztext-onNavigateTo",target:e,data:this.group.zModel[this.data.Value]})},e.prototype.getAdornmentBackgroundColor=function(e){return e.BackgroundColor?e.BackgroundColor+"!important":"transparent !important"},e.prototype.adornmentLook=function(e){return e.AdornmentLook?e.AdornmentLook:"clear"},e.prototype.onAdornmentClick=function(e){e.OnClick&&this.group.subject.next({type:"ztext-adornment",target:e.OnClick,data:e})},e.prototype.readOnlyOnClear=function(){a.ZComponentHelper.setModelValue(this.data.Value,null,this.group)},e.prototype.setTooltipsInfoClass=function(){return this.tooltipsInfo&&!this.showTooltipsInfoIcon&&this.showTooltipsInfoBySide?"tooltipsinfo-text":"tooltipsinfo-text-wide"},e.prototype.setTooltipsInfoColor=function(){return this.tooltipsInfo&&this.tooltipsInfo.TextColor?this.tooltipsInfo.TextColor:"#acacac"},e.prototype.setTooltipsInfoIcon=function(e){this.showTooltipsInfoIcon&&(""!=this.tooltipsInfo.Icon?this.tooltipsDisplayIcon=e||this.tooltipsInfo.Icon:this.tooltipsDisplayIcon="question-circle")},e.prototype.setTooltipsDisplayText=function(e){this.tooltipsInfo?this.tooltipsDisplayText=e||this.tooltipsInfo.DisplayText:this.tooltipsDisplayText="<Display text error>"},e.prototype.setTooltipsInfoSideBySide=function(){return this.tooltipsInfo&&this.showTooltipsInfoBySide&&!this.showTooltipsInfoIcon&&this.adornmentList.length<1?"ion-row divtextbox tooltipsinfo-right":"ion-row divtextbox"},e}();qe.decorators=[{type:t.Component,args:[{selector:"app-ztext",template:'<ion-item [formGroup]="form"\r\n *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n [ngClass]="getIon_InvalidClass(form, data)">\r\n <ion-label [attr.for]="data.Value"\r\n *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n [position]="data.LabelPosition ? data.LabelPosition : \'stacked\'">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n \x3c!-- add icon for tooltips --\x3e\r\n <span kendoTooltip\r\n *ngIf="data.TooltipsInfo && showTooltipsInfoIcon"\r\n [title]="tooltipsDisplayText">\r\n <fa-icon [icon]="tooltipsDisplayIcon"\r\n class="tooltipsinfo-icon">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n \x3c!-- mobile tooltipsinfo below label--\x3e\r\n <kendo-label *ngIf="data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide && isMobileScreen()"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n \x3c!-- <ion-input [name]="data.Name" [required]="data.IsRequired" [placeholder]="data.PlaceHolder" [type]="mapInputType(data.Type)"\r\n [(ngModel)]="group.zModel[data.Value]" [minlength]="data.MinLength" [maxlength]="data.MaxLength"\r\n [readonly]="data.ReadOnly" [inputmode]="mapInputMode(data.Type)"></ion-input> --\x3e\r\n <div [class]="setTooltipsInfoSideBySide()">\r\n <div style="flex: 1;">\r\n <ion-input *ngIf="isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [type]="mapInputType(data.Type)"\r\n [placeholder]="data.PlaceHolder"\r\n clearOnEdit\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngStyle]="{\'text-align\': getStyle(data.RightAlign ? true : false)}"\r\n [inputmode]="mapInputMode(data.Type)"\r\n (click)=\'textboxOnClick()\'\r\n (ionChange)="onChange($event)">\r\n </ion-input>\r\n <kendo-textbox *ngIf="!isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [type]="mapInputType(data.Type)"\r\n [placeholder]="data.PlaceHolder"\r\n [clearButton]="showClearButton"\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n [ngStyle]="{\'text-align\': getStyle(data.RightAlign ? true : false)}"\r\n (input)="onChange($event)"\r\n (click)="textboxOnClick()"\r\n [class]="setTextboxClass()">\r\n\r\n <ng-template kendoTextBoxSuffixTemplate\r\n *ngIf="adornmentList">\r\n \x3c!-- For Validation feature --\x3e\r\n \x3c!--<app-uivalidationmessage [group]="group"\r\n [data]="data"\r\n [form]="form"\r\n class="validation-icon"></app-uivalidationmessage>--\x3e\r\n <button kendoButton\r\n *ngIf="data.OnClick"\r\n look="clear"\r\n icon="close-circle"\r\n class="textbox-clearbutton"\r\n (click)="readOnlyOnClear()"></button>\r\n \x3c!-- For Adornments feature --\x3e\r\n <div *ngFor="let adornment of adornmentList">\r\n <kendo-textbox-separator *ngIf="!adornment.HideSeperator"\r\n class="textbox-separator"></kendo-textbox-separator>\r\n <button kendoButton\r\n [look]="adornmentLook(adornment)"\r\n [icon]="adornment.Icon"\r\n (click)="onAdornmentClick(adornment)"\r\n [style.background-color]="getAdornmentBackgroundColor(adornment)"></button>\r\n </div>\r\n </ng-template>\r\n </kendo-textbox>\r\n </div>\r\n \x3c!-- For Validation feature pending change to inner textbox --\x3e\r\n <app-uivalidationmessage *ngIf="!isMobileScreen()"\r\n [group]="group"\r\n [data]="data"\r\n [form]="form" ></app-uivalidationmessage>\r\n\r\n \x3c!-- For Mobile Validation feature --\x3e\r\n <app-uivalidationmessage *ngIf="isMobileScreen()"\r\n [group]="group"\r\n [data]="data"\r\n [form]="form"\r\n class="validation-icon-mobile"></app-uivalidationmessage>\r\n\r\n \x3c!-- mobile section for Adornments feature --\x3e\r\n <div *ngFor="let adornment of adornmentList">\r\n <button kendoButton\r\n *ngIf="isMobileScreen()"\r\n [look]="adornmentLook(adornment)"\r\n [icon]="adornment.Icon"\r\n (click)="onAdornmentClick(adornment)"\r\n [style.background-color]="getAdornmentBackgroundColor(adornment)"\r\n class="adornments-icon-mobile"></button>\r\n </div>\r\n\r\n \x3c!-- Icon button feature --\x3e\r\n <div *ngFor="let item of iconList">\r\n <div kendoTooltip\r\n class="icon-button"\r\n showOn="hover"\r\n [tooltipWidth]="item.Width"\r\n [position]="item.Position">\r\n\r\n <span *ngIf="!!item "\r\n (click)="onIconClick(item.Click)"\r\n [title]="item.Tooltip"\r\n style="margin-top: 10px;">\r\n\r\n <fa-icon [icon]="item.Icon"\r\n [ngStyle]="{\'padding\': \'4px 6px\', \'color\': (item.Color ? item.Color : \'black\')}"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n \x3c!-- side by side and desktop tooltipsinfo --\x3e\r\n <kendo-label *ngIf="tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())"\r\n [text]="tooltipsDisplayText"\r\n [class]="setTooltipsInfoClass()"\r\n [style.color]="setTooltipsInfoColor()"></kendo-label>\r\n </div>\r\n</ion-item>\r\n',styles:[".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divtextbox{justify-content:space-between;width:100%}.k-textbox{color:var(--z-text-color)}.notmobile-textbox{margin:7px 0 0;width:100%}.notmobile-textbox-onfocus{margin:7px 0 0;width:100%;color:var(--z-text-color)!important;background-color:#fff!important}.validation-icon{margin-top:0;margin-right:5px}.validation-icon-mobile{margin-top:5px;margin-right:5px}.textbox-separator{margin-top:0}.textbox-clearbutton{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;outline:0;cursor:pointer;opacity:.5}.textbox-clearbutton:hover{opacity:1!important}.icon-button{text-align:center;padding-top:10px}.adornments-icon-mobile{margin-bottom:0;margin-left:5px;width:28px;height:28px}.tooltipsinfo-text{margin-left:5px;width:50%}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:3fr 1fr 2fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]}]}],qe.ctorParameters=function(){return[]},qe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],iconList:[{type:t.Input}],adornmentList:[{type:t.Input}]};var _e=function(){function e(){var e=this;this.itemValueField=null,this.itemTextField=null,this.itemDataField=null,this.itemTemplate="{{item[itemTextField]}}",this.infinitezData=[],this.infiniteSearchText=null,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(t){var o=e.group.form.controls[e.data.Value];t?o.enable():o.disable(),e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this)},e.prototype.onValueChange=function(e){a.ZComponentHelper.setModelValue(this.data.Value,e,this.group),this.onChangeEvent(e)},e.prototype.onChangeEvent=function(e){if(this.data.HasInfiniteScroll&&this.data.InfiniteScroll$){this.itemTextField.toString();var t=this.itemValueField.toString(),o=[];e&&(o=this.infinitezData.filter((function(o){return o[t]===e})),this.modelzData=o.slice()),this.itemDataField.startsWith("group.zData.")?this.group.zData[this.itemDataField.slice(12)]=o:this.itemDataField.startsWith("group.")&&(this.group[this.itemDataField.slice(6)]=o)}this.group.subject.next({type:"onChange",target:this.data.OnChange,event:event,data:{value:e,field:this.data}})},e.prototype.getReadOnlyValue=function(){var e=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.ReadOnly,this.group);return"function"==typeof e?e():e},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.getClass=function(e,t){var o=this.getIon_InvalidClass(e,t);return(o||"")+" "+this.data.Class},e.prototype.onClick=function(){this.data.OnItemClick&&this.group.subject.next({type:"ztextarea-onClick",target:this.data.OnItemClick,data:this.form.value})},e}();_e.decorators=[{type:t.Component,args:[{selector:"app-ztextarea",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" [ngClass]="getClass(form, data)">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <ion-textarea *ngIf="isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [placeholder]="data.PlaceHolder"\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [attr.disabled]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [rows]="data.textAreaRows"></ion-textarea>\r\n <textarea kendoTextArea *ngIf="!isMobileScreen()"\r\n [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [placeholder]="data.PlaceHolder"\r\n [minlength]="data.MinLength"\r\n [maxlength]="data.MaxLength"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)"\r\n [rows]="data.textAreaRows"\r\n [autoSize]="!data.textAreaRows"\r\n [ngClass]="{\'disabled\' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}"\r\n style="margin: 7px 0 0 0; width: 100%"\r\n (valueChange)="onValueChange($event)"\r\n (click)="onClick()"></textarea>\r\n </span>\r\n <app-uivalidationmessage [group]="group" [data]="data" [form]="form"></app-uivalidationmessage>\r\n </div>\r\n</ion-item>\r\n',styles:[".gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.k-textarea{color:var(--z-text-color)}"]}]}],_e.ctorParameters=function(){return[]},_e.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ue=function(){function e(){var e=this;this.componentProperties=new a.ZComponentProperties,this.value="",this.labelText="",this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.widthReduce=this.data.WidthReduce||60,this.heightReduce=this.data.HeightReduce||560},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.ngOnDestroy=function(){},e.prototype.getCompStyle=function(){return{"height.px":this.getCompHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getCompHeight=function(){var e=window.innerHeight-this.heightReduce;return e<250?250:e},e}();Ue.decorators=[{type:t.Component,args:[{selector:"app-ztexteditor",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)"\r\n [ngClass]="getIon_InvalidClass(form, data)">\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <div *ngIf="data.Title" class="title">{{data.Title}}</div>\r\n\r\n <ion-label [attr.for]="data.Value"\r\n *ngIf="data.ShowLabel === undefined || data.ShowLabel"\r\n position="stacked"\r\n style="margin-bottom:10px;">\r\n {{data.Label}}\r\n <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)"\r\n color="danger">\r\n *\r\n </ion-text>\r\n </ion-label>\r\n\r\n <span style="flex: 1;">\r\n <kendo-editor [id]="data.Value"\r\n [formControlName]="data.Value"\r\n [value]="value"\r\n [ngStyle]="getCompStyle()"\r\n [readonly]="(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)">\r\n <kendo-toolbar *ngIf="data.ToolBarStyle === \'hidden\'">\r\n </kendo-toolbar>\r\n <kendo-toolbar *ngIf="data.ToolBarStyle === \'full\'">\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorUndoButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorRedoButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorStrikethroughButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorSubscriptButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorSuperscriptButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\r\n <kendo-toolbar-dropdownlist kendoEditorFontSize></kendo-toolbar-dropdownlist>\r\n <kendo-toolbar-dropdownlist kendoEditorFontFamily></kendo-toolbar-dropdownlist>\r\n <kendo-toolbar-colorpicker kendoEditorForeColor></kendo-toolbar-colorpicker>\r\n <kendo-toolbar-colorpicker kendoEditorBackColor></kendo-toolbar-colorpicker>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-editor-insert-table-button></kendo-editor-insert-table-button>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorAddColumnBeforeButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAddColumnAfterButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAddRowBeforeButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorAddRowAfterButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorDeleteColumnButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorDeleteRowButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorDeleteTableButton></kendo-toolbar-button>\r\n </kendo-toolbar-buttongroup>\r\n <kendo-toolbar-button kendoEditorInsertFileButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\r\n <kendo-toolbar-button kendoEditorViewSourceButton></kendo-toolbar-button>\r\n </kendo-toolbar>\r\n </kendo-editor>\r\n </span>\r\n </div>\r\n</ion-item>\r\n',styles:[".title{margin:20px 10px 5px;font-size:18px;font-weight:700}"]}]}],Ue.ctorParameters=function(){return[]},Ue.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var We=function(){function e(){var e=this;this.items=[],this.originalItemList=null,this.isNodeDrop=!1,this.nodeCounter=1,this.clickActName=null,this.state={expandedkeys:[]},this.itemIndex=[],this.selectedKeys=[],this.absoluteText=!1,this.componentProperties=new a.ZComponentProperties,this.isExpanded=function(t,o){return e.state.expandedkeys.indexOf(o)>-1},this.expandNode=function(t,o,n){e.itemIndex=[];var r=e.getItems();e.searchNodeIndex(r,o,"",t);var i=e.itemIndex;n&&(e.selectedKeys=i);var a=[];i.forEach((function(e){var t=e.split("_"),o="";t.forEach((function(e){o=o.concat("_").concat(e),a.push(o.substring(1))}))})),e.state.expandedkeys=e.state.expandedkeys.concat(a)},this.collapseNode=function(t,o,n){e.itemIndex=[];var r=e.getItems();e.searchNodeIndex(r,o,"",t);var i=e.itemIndex,a=[];n?i.forEach((function(e){var t=e.split("_"),o="";t.forEach((function(e){o=o.concat("_").concat(e),a.push(o.substring(1))}))})):a=i,e.state.expandedkeys=e.state.expandedkeys.filter((function(e){return!a.includes(e)}))},this.expandAll=function(){var t=e.getItems();t&&e.expandAllNode(t,"")},this.collapseAll=function(){e.state.expandedkeys=[]},this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t,a.ZComponentHelper.changeValidator(t,e.group,e.data.Value,e.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.TreeviewExpandAll&&this.expandAll(),(this.data.OnAddNode||this.data.OnRemoveNode)&&(this.absoluteText=!0)},e.prototype.ngAfterViewInit=function(){a.ZComponentHelper.registerComponent(this)},e.prototype.getItems=function(){var e=this.data.Value;if(e)return this.nodeCounter=1,a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Value);console.warn("ztree field Value is not set correctly. ",e)},e.prototype.searchNodeIndex=function(e,t,o,n){var r=this;o&&(o+="_"),e.forEach((function(e,i){if(e[n]!==Number(t)&&e[n]!==t||(r.itemIndex=r.itemIndex.concat(o+""+i)),Array.isArray(e.Value)){var a=o+""+i;r.searchNodeIndex(e.Value,t,a,n)}}))},e.prototype.expandAllNode=function(e,t){var o=this;t&&(t+="_"),e.forEach((function(e,n){if(Array.isArray(e.Value)){var r=t+""+n;o.state.expandedkeys=o.state.expandedkeys.concat(r),o.expandAllNode(e.Value,r)}}))},e.prototype.handleCollapse=function(e){this.state.expandedkeys=this.state.expandedkeys.filter((function(t){return t!==e.index}))},e.prototype.handleExpand=function(e){this.state.expandedkeys=this.state.expandedkeys.concat(e.index)},e.prototype.getTemplate=function(e,t,o){if(t.ItemTemplate){var n=a.ZComponentHelper.getGroupEvalValue.call(this,t.ItemTemplate);return n?n({dataItem:e,data:t,group:o}):void console.warn("The ("+t.ItemTemplate+") is not defined correctly. Value contains: ",n)}return Object.values(e).filter((function(e){return"string"==typeof e})).join(", ")},e.prototype.convertToTreeItems=function(e){var t=[],o={},n=[];return e.forEach((function(e){if(e.ParentId)if(o[e.ParentId]){var r=o[e.ParentId];r.Value||(r.Value=[]),r.Value.push(e),o[e.Id]=e}else n.push(e);else t.push(e),o[e.Id]=e})),n.length>0&&n.forEach((function(e){o[e.ParentId]&&(o[e.ParentId].Value.push(e),o[e.Id]=e)})),t},e.prototype.onSelectionChange=function(e){var t;if(this.clickActName)switch(this.clickActName){case"AddNode":t=this.data.OnAddNode;break;case"RemoveNode":t=this.data.OnRemoveNode}else t=this.data.OnItemClick;this.clickActName=null,this.group.subject.next({type:"ztree_onSelectionChange",target:t,data:e.dataItem,event:e.index})},e.prototype.onAddNode=function(e,t,o,n){this.clickActName="AddNode"},e.prototype.onRemoveNode=function(e,t,o,n){this.clickActName="RemoveNode"},e.prototype.onEditNode=function(e){if(this.data.OnEditNode){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnEditNode);"function"==typeof t&&t.bind(this.group.ctrlScope)(e)}else;},e.prototype.handleNodeDrop=function(e){if(!1!==this.data.Draggable){this.isNodeDrop=!0;var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnDrop);if("function"==typeof t)t.bind(this)(e)}else e.setValid(!1)},e.prototype.handleNodeDragEnd=function(e){if(this.isNodeDrop){this.isNodeDrop=!1;var t=this.getItems(),o=[];this.updateChangeToDataSet(t,o),a.ZComponentHelper.setModelValue(this.data.Value,o,this.group),this.group.subject.next({type:"ztree-onTreeNodeDragEnd",target:this.data.OnChange,data:o})}},e.prototype.updateChangeToDataSet=function(e,t){var o=this;e.forEach((function(e){var n;Array.isArray(e.Value)?((n=JSON.parse(JSON.stringify(e))).Value=[],t.push(n),o.updateChangeToDataSet(e.Value,n.Value)):((n=Object.assign({},e)).Value=n._DataValue,delete n._DataValue,t.push(n))}))},e.prototype.handleFilter=function(e){0==this.items.length&&(this.items=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Value),null==this.originalItemList&&(this.originalItemList=this.items.map((function(e){return Object.assign({},e)})))),this.items=this.originalItemList.map((function(e){return Object.assign({},e)}));var t=this.search(this.items,e),o=this.filterPrefix(this.data.Value);this.group[o]=t},e.prototype.filterPrefix=function(e){return e.startsWith("zData.")?e.slice(6):e.startsWith("group.zData.")?e.slice(12):e.startsWith("group.")?e.slice(6):e||void 0},e.prototype.search=function(e,t){var o=this;return e.reduce((function(e,n){if(o.contains(n.Name,t))e.push(n);else if(n.Value&&n.Value.length>0){var r=o.search(n.Value,t);if(r.length>0){var i=n;i.Value=r,e.push(i)}}return e}),[])},e.prototype.contains=function(e,t){return e.toLowerCase().indexOf((t||"").toLowerCase())>=0},e}();We.decorators=[{type:t.Component,args:[{selector:"app-ztree",template:'<div style="width:100%"\r\n *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)">\r\n <kendo-treeview [nodes]="getItems()"\r\n kendoTreeViewExpandable\r\n kendoTreeViewSelectable\r\n kendoTreeViewDragAndDrop\r\n kendoTreeViewDragAndDropEditing\r\n [isExpanded]="isExpanded"\r\n (collapse)="handleCollapse($event)"\r\n (expand)="handleExpand($event)"\r\n (nodeDrop)="handleNodeDrop($event)"\r\n (nodeDragEnd)="handleNodeDragEnd($event)"\r\n (selectionChange)="onSelectionChange($event)"\r\n [selectedKeys]="selectedKeys"\r\n kendoTreeViewHierarchyBinding\r\n childrenField="Value"\r\n [filterable]="data.Filterable"\r\n textField="Name"\r\n (filterChange)="handleFilter($event)">\r\n\r\n <ng-template kendoTreeViewNodeTemplate let-dataItem #nodetemplate>\r\n\r\n <ion-button *ngIf="!!data.OnAddNode"\r\n (click)="onAddNode($event, dataItem, data, group)"\r\n style="zoom: 0.6; margin: 0 0 0 2px;" mat-raised-button color="primary" size="medium"\r\n [hidden]="(!!dataItem.OnAddNodeVisible)"> \r\n <fa-icon [icon]="\'plus\'"></fa-icon>\r\n </ion-button>\r\n <ion-button *ngIf="!!data.OnRemoveNode" (click)="onRemoveNode($event, dataItem, data, group)"\r\n style="zoom: 0.6; margin: 0 15px 0 10px;" color="danger" mat-raised-button size="medium"\r\n [hidden]="(!!dataItem.OnRemoveNodeVisible)"> \r\n <fa-icon [icon]="\'minus\'"></fa-icon>\r\n </ion-button>\r\n\r\n <ion-label *ngIf="absoluteText" style="position: absolute; top: 14px;">\r\n {{ getTemplate(dataItem, data, group) }}\r\n </ion-label>\r\n\r\n <ion-label *ngIf="!absoluteText">\r\n {{ getTemplate(dataItem, data, group) }}\r\n </ion-label>\r\n </ng-template>\r\n </kendo-treeview>\r\n</div>\r\n',styles:[":host{--ion-color-primary:#479400;--ion-color-primary-rgb:56,128,255;--ion-color-primary-contrast:#fff;--ion-color-primary-contrast-rgb:255,255,255;--ion-color-primary-shade:#3171e0;--ion-color-primary-tint:#4c8dff}:host ::ng-deep kendo-treeview .k-treeview-leaf{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:3px;border:1px solid #c8dbf5;background-color:#e3ecf8;color:#0a45ab;font-size:13px;cursor:pointer}:host ::ng-deep kendo-treeview .k-treeview-leaf.k-selected{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:3px;background-color:#a9c3e8!important;color:#0a45ab!important;font-size:13px;cursor:pointer}:host ::ng-deep kendo-treeview .k-treeview-leaf.k-state-hover,:host ::ng-deep kendo-treeview .k-treeview-leaf:hover{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:3px;background-color:#c9daf2;color:#0a45ab;font-size:13px;cursor:pointer}"]}]}],We.ctorParameters=function(){return[]},We.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],nodetemplate:[{type:t.ViewChild,args:["nodetemplate",{static:!0}]}]};var $e=function(e,t,o,n,r,i,a,l,s,p,d,c,u,g,h){this.sortable=e,this.resizable=t,this.filterable=o,this.reorderable=n,this.columnMenu=r,this.scrollable=i,this.refresh=a,this.autoBind=l,this.dataSource=s,this.dataBound=p,this.idField=d,this.parentIdField=c,this.columns=u,this.aggregate=g,this.pageAble=h},Je=function(){function e(e,t,o,n,i){var l=this;this.fieldService=e,this.webapiService=t,this.activatedRoute=o,this.router=n,this.authService=i,this.ztreelist=null,this.idField="Id",this.parentIdField="ParentId",this.options=new $e,this.componentProperties=new a.ZComponentProperties,this.pageSize=20,this.inlineEditedFormGroups=[],this.treelistSubject=new r.Subject,this.setEnable=function(e){var t=l.group.form.controls[l.data.Value];e?t.enable():t.disable(),l.componentProperties.isReadOnly=!e},this.setVisible=function(e){l.componentProperties.isVisible=e,l.data.Visible=e},this.setRequire=function(e){l.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,l.group,l.data.Value,l.componentProperties,u.Validators.required)},this.setData=function(e){l.dataSource=e,l.createFormControlsForInlineEdit(e),e&&l.inlineEditedFormGroups&&l.inlineEditedFormGroups.length>0&&e.forEach((function(e){var t=l.inlineEditedFormGroups.find((function(t){return t[l.idField]===e[l.idField]})),o=t.Fg;if(t&&o){Object.keys(o.controls);Object.keys(o.controls).forEach((function(t){var n=o.controls[t];n&&n.setValue(e[t])}))}}))}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.widthReduce=this.data.WidthReduce||60,this.heightReduce=this.data.HeightReduce||560,this.pageSize=this.data.PageSize||20,this.data.Options?this.setLocalOptions():this.setFieldElementOptions()},e.prototype.ngOnDestroy=function(){},e.prototype.getGridStyle=function(){return{"height.px":this.getGridHeight(),"width.px":window.innerWidth-this.widthReduce}},e.prototype.getGridHeight=function(){var e=window.innerHeight-this.heightReduce;return e<180?180:e},e.prototype.isButtonHidden=function(e,t){return e.visible?a.ZComponentHelper.getGroupEvalValue.call(this,e.visible,t.viewItem.data):!(!e.hiddenParam||"undefined"===e.hiddenValue)&&(null===t.viewItem.data[e.hiddenParam]||t.viewItem.data[e.hiddenParam]===e.hiddenValue)},e.prototype.buttonClick=function(e,t){e.edit?e.edit(t):this.group.subject.next({type:"buttonClick",target:e.ClickEvent,data:t})},e.prototype.onNavigateTo=function(e,t,o,n){e.stopPropagation(),this.group.subject.next({type:"zgrid-onNavigateTo",target:t.navigateTo,data:n})},e.prototype.isColumnsVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.setLocalOptions=function(){var e=a.ZComponentHelper.getGroupValue(this.data.Options,this.group);if(e){this.options=e,this.options.idField=this.options.idField||this.idField,this.options.parentIdField=this.options.parentIdField||this.parentIdField;this.authService.SystemLocaleTranslation;this.options.dataSource&&"string"==typeof this.options.dataSource?this.options.dataSource.startsWith("group.")?this.dataSource=a.ZComponentHelper.getGroupValue(this.options.dataSource,this.group):console.error(this.data.Name+" - has invalid dataSource"):console.error(this.data.Name+" - dataSource property is not declared.")}else console.warn("No initialise for Field.Options: ",this.data.Options)},e.prototype.setFieldElementOptions=function(){var e=this;this.options.sortable=!0,this.options.resizable=!0,this.options.filterable=!0,this.options.resizable=!0,this.options.columnMenu=!this.data.DisableGridColumnMenu,this.options.scrollable=!0,this.options.idField=this.data.idField||this.idField,this.options.parentIdField=this.data.parentIdField||this.parentIdField,this.options.columns=[],this.options.aggregate=[],this.options.pageAble=!!this.data.PageSize;var t=[];this.fieldService.getFormFieldCode(this.data.ColumnFieldCode,"FormField",null,null).pipe(i.switchMap((function(o){return t=o,e.getButtonsFromZButtons(o)})),i.tap((function(o){e.setTreeListColumns(t,o)})),i.switchMap((function(){return e.getDataBinding()})),i.tap((function(t){e.createFormControlsForInlineEdit(t)}))).subscribe((function(t){t&&(e.dataSource=t)}))},e.prototype.getButtonsFromZButtons=function(e){var t=this,o=[],n=[];return e.forEach((function(e){"zbuttons"===e.Type&&a.ZComponentHelper.getGroupValue(e.gridColVisible,t.group)&&n.push(t.fieldService.getFormFieldCode(e.Value,"FormField",null,null).pipe(i.switchMap((function(t){return r.of({field:e,buttons:t})}))))})),0===n.length?r.of([]):r.forkJoin(n).pipe(i.tap((function(e){e.forEach((function(e){return e.buttons.forEach((function(t){o.push({zbuttonsName:e.field.Value,name:t.Value,class:t.Class,text:t.Label,icon:t.Icon,visible:t.Visible,hiddenParam:t.hiddenParam,hiddenValue:t.hiddenValue,edit:t.edit,ClickEvent:t.ClickEvent,ShowLabel:t.ShowLabel,color:t.Color})}))}))})),i.switchMap((function(){return r.of(o)})))},e.prototype.setTreeListColumns=function(e,t){var o=this;e.forEach((function(e){if(Array.isArray(e.Value)&&o.setTreeListColumns(e.Value,t),!0===a.ZComponentHelper.getGroupValue(e.gridColVisible,o.group))if("zbuttons"===e.Type)o.insertCommand(e,t);else if(e.AggregateType&&""!==e.AggregateType){var n="";n="sum"===e.AggregateType?"Total: ":e.AggregateType+": ",o.insertFooterTemplateField(e,n),o.options.aggregate.push({field:e.Value,aggregate:e.AggregateType})}else o.insertField(e)}))},e.prototype.insertField=function(e){var t=e.Name;t.toString().startsWith("group.")&&(t=a.ZComponentHelper.getGroupValue(t.toString(),this.group)),this.options.columns.push(Object.assign(e,{field:e.Value,title:t,width:e.width,visible:!0,fieldType:e.Type,navigateTo:e.NavigateTo,command:null,class:e.DivClass,footerTemplate:!1,aggregateType:"",aggregateTitle:"",isEditableInGrid:e.IsEditableInGrid}))},e.prototype.insertCommand=function(e,t){var o=e.Name;o.toString().startsWith("group.")&&(o=a.ZComponentHelper.getGroupValue(o.toString(),this.group)),this.options.columns.push({field:e.Name,title:o,width:e.width,visible:e.Visible,fieldType:e.Type,navigateTo:e.NavigateTo,command:t.filter((function(t){return t.zbuttonsName===e.Value})),class:e.DivClass,footerTemplate:!1,aggregateType:"",aggregateTitle:"",isEditableInGrid:e.IsEditableInGrid})},e.prototype.insertFooterTemplateField=function(e,t){var o=e.Name;o.toString().startsWith("group.")&&(o=a.ZComponentHelper.getGroupValue(o.toString(),this.group)),this.options.columns.push({field:e.Value,title:o,width:e.width,visible:!0,fieldType:e.Type,navigateTo:e.NavigateTo,command:null,class:e.DivClass,footerTemplate:!0,aggregateType:e.AggregateType,aggregateTitle:t,isEditableInGrid:e.IsEditableInGrid})},e.prototype.getDataBinding=function(){if(this.data.DataSource)return r.of(a.ZComponentHelper.getGroupValue(this.data.DataSource,this.group));var e=this.getResouceURL();return e?this.webapiService.getApi(e,null,null,null,null,null,!0):r.of([])},e.prototype.getResouceURL=function(){return a.ZComponentHelper.getGroupValue(this.data.ResourceURL,this.group)},e.prototype.cellClickHandler=function(e){if(!this.data.DisableCellClickHandler)if(console.log("cellClick event: ",e),this.data.OnItemClick){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.OnItemClick);"function"==typeof t&&t.bind(this.group.ctrlScope)(e)}else this.editModel(e.dataItem)},e.prototype.editModel=function(e){if(this.data.EditClickURL){var t=a.ZComponentHelper.getGroupValue(this.data.ColumnFields,this.group);this.group.subject.next({type:"zgrid-cellClick",target:this.data.EditClickURL,data:e,columnFields$:t})}else this.router.navigate([this.group.editModelURL,e.Id,"edit"],{relativeTo:this.activatedRoute})},e.prototype.createFormControlsForInlineEdit=function(e){var t=this;void 0!==this.options.columns.find((function(e){return e.isEditableInGrid}))&&e&&(this.inlineEditedFormGroups=[],e.forEach((function(e){var o={};t.options.columns.forEach((function(t){o[t.field]=new u.FormControl(e[t.field])}));var n=new u.FormGroup(o);t.inlineEditedFormGroups.push({Id:e[t.idField],Fg:n})})))},e.prototype.getInlineField=function(e){return this.options.columns.find((function(t){return t.Value===e}))},e.prototype.getInlineForm=function(e){var t=this;return this.inlineEditedFormGroups.find((function(o){return o.Id===e[t.idField]})).Fg},e.prototype.isInlineEditColVisible=function(e,t){return!(!1===e[t.Value+"_Visible"])},e.prototype.getFormat=function(e){var t="",o=e.FormatOptions.split("."),n=0;return o.length>1&&(n=o[1].length),0!==n&&(t="1."+n+"-"+n),t},e.prototype.setHeaderText=function(e,t){this.options.columns.forEach((function(o){o.Name!==e&&o.field!==e||(o.title=t)}))},e.prototype.getColClass=function(e,t){var o="gridCell ";return"number"!==t.fieldType&&"currency"!==t.fieldType&&"znumeric"!==t.fieldType||(o+="rightAligned "),e[t.field+"_Class"]&&(o+=e[t.field+"_Class"]+" "),t.Class&&(o+=t.Class+" "),o},e.prototype.setGridIsLoading=function(e){this.isLoading=e},e.prototype.onFilterChange=function(e){this.ztreelist},e.prototype.mapFilterOperator=function(e){switch(e){case"eq":return"eq";case"neq":return"neq";case"lt":return"lt";case"lte":return"lte";case"gt":return"gt";case"gte":return"gte";case"startswith":return"startswith";case"endswith":return"endswith";case"isnull":return"isnull";case"isnotnull":return"isnotnull";default:return"=="}},e.prototype.filterable=function(e){return!1!==e},e.prototype.sortable=function(e){return!1!==e},e}();Je.decorators=[{type:t.Component,args:[{selector:"app-ztreelist",template:'<div *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="margin: 10px 0 6px 0;">\r\n <div *ngIf="data.Title" class="treelistTitle">{{data.Title}}</div>\r\n <kendo-treelist [kendoTreeListFlatBinding]="dataSource" [ngStyle]="getGridStyle()" [idField]="options.idField" [parentIdField]="options.parentIdField"\r\n (cellClick)="cellClickHandler($event)"\r\n [sortable]="options.sortable"\r\n [resizable]="options.resizable"\r\n [filterable]="false"\r\n [reorderable]="false"\r\n [columnMenu]="options.columnMenu"\r\n [scrollable]="options.scrollable"\r\n [aggregate]="options.aggregate"\r\n [pageable]="options.pageAble"\r\n [pageSize]="data.PageSize"\r\n [initiallyExpanded]="data.DefaultCollapse === false"\r\n (filterChange)="onFilterChange($event)"\r\n kendoTreeListExpandable\r\n treelist>\r\n\r\n \x3c!--\r\n [filterable]="options.filterable"\r\n [reorderable]="options.resizable"\r\n --\x3e\r\n <ng-container *ngFor="let col of options.columns; index as i">\r\n <kendo-treelist-column *ngIf="!col.command"\r\n [class]="col.class"\r\n [expandable]="i===0"\r\n [field]="col.field"\r\n [title]="col.title || col.field"\r\n [width]="col.width || 250"\r\n [filterable]="filterable(col.enableFiltering)"\r\n [sortable]="sortable(col.enableSorting)"\r\n [hidden]="!isColumnsVisible(col.visible)">\r\n <div [ngSwitch]="true">\r\n <div *ngSwitchCase="col.fieldType === \'number\'\r\n || col.fieldType === \'currency\'\r\n || col.fieldType === \'znumeric\'">\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">\r\n <kendo-treelist-numeric-filter-cell [column]="column" [filter]="filter" operator="eq">\r\n <kendo-filter-eq-operator></kendo-filter-eq-operator>\r\n <kendo-filter-neq-operator></kendo-filter-neq-operator>\r\n <kendo-filter-lt-operator></kendo-filter-lt-operator>\r\n <kendo-filter-lte-operator></kendo-filter-lte-operator>\r\n <kendo-filter-gt-operator></kendo-filter-gt-operator>\r\n <kendo-filter-gte-operator></kendo-filter-gte-operator>\r\n <kendo-filter-isnull-operator></kendo-filter-isnull-operator>\r\n <kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>\r\n </kendo-treelist-numeric-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngSwitchCase="col.fieldType == \'zdate\'\r\n || col.fieldType === \'zdatetime\'\r\n || col.fieldType === \'zuidatetime\'">\r\n <div *ngIf="col.filterByDateRange === true">\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column" operator="lte">\r\n <date-range-filter-cell class="date-range-filter"\r\n [filter]="filter"\r\n [field]="col.field">\r\n <kendo-treelist-filter-lt-operator></kendo-treelist-filter-lt-operator>\r\n <kendo-treelist-filter-lte-operator></kendo-treelist-filter-lte-operator>\r\n <kendo-treelist-filter-gt-operator></kendo-treelist-filter-gt-operator>\r\n <kendo-treelist-filter-gte-operator></kendo-treelist-filter-gte-operator>\r\n <kendo-treelist-filter-isnull-operator></kendo-treelist-filter-isnull-operator>\r\n <kendo-treelist-filter-isnotnull-operator></kendo-treelist-filter-isnotnull-operator>\r\n </date-range-filter-cell>\r\n </ng-template>\r\n </div>\r\n <div *ngIf="col.filterByDateRange === false">\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">\r\n <kendo-treelist-date-filter-cell [column]="column" [filter]="filter" operator="lte">\r\n <kendo-treelist-filter-lt-operator></kendo-treelist-filter-lt-operator>\r\n <kendo-treelist-filter-lte-operator></kendo-treelist-filter-lte-operator>\r\n <kendo-treelist-filter-gt-operator></kendo-treelist-filter-gt-operator>\r\n <kendo-treelist-filter-gte-operator></kendo-treelist-filter-gte-operator>\r\n <kendo-treelist-filter-isnull-operator></kendo-treelist-filter-isnull-operator>\r\n <kendo-treelist-filter-isnotnull-operator></kendo-treelist-filter-isnotnull-operator>\r\n </kendo-treelist-date-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">\r\n <kendo-treelist-string-filter-cell [column]="column" [filter]="filter" operator="contains">\r\n <kendo-treelist-filter-contains-operator></kendo-treelist-filter-contains-operator>\r\n <kendo-treelist-filter-eq-operator></kendo-treelist-filter-eq-operator>\r\n <kendo-treelist-filter-neq-operator></kendo-treelist-filter-neq-operator>\r\n <kendo-treelist-filter-startswith-operator></kendo-treelist-filter-startswith-operator>\r\n <kendo-treelist-filter-endswith-operator></kendo-treelist-filter-endswith-operator>\r\n <kendo-treelist-filter-isnull-operator></kendo-treelist-filter-isnull-operator>\r\n <kendo-treelist-filter-isnotnull-operator></kendo-treelist-filter-isnotnull-operator>\r\n </kendo-treelist-string-filter-cell>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ng-template kendoTreeListCellTemplate let-dataItem let-rowIndex="rowIndex" let-cellContext="cellContext">\r\n <div style="margin: 7px 0;display: inline;" [style.color]="(!!dataItem.Color ? [dataItem.Color] : \'black\')" *ngIf="!col.navigateTo && col.isEditableInGrid !== true" [ngSwitch]="col.fieldType" [ngClass]="getColClass(dataItem, col)">\r\n <span *ngSwitchCase="\'zdate\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zshortdate\'">\r\n {{ dataItem[col.field] | date: \'MMM yyyy\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zdatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'zuidatetime\'">\r\n {{ dataItem[col.field] | date: \'dd/MM/yyyy hh:mm:ss aa\' }}\r\n </span>\r\n <span *ngSwitchCase="\'number\'">\r\n <div style="text-align:right;">{{ dataItem[col.field] | number }} </div>\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n <div style="text-align:right;">{{ dataItem[col.field] | number: \'1.2-2\' }}</div>\r\n </span>\r\n <span *ngSwitchCase="\'znumeric\'">\r\n <div style="text-align:right;">{{ dataItem[col.field] | number: getFormat(col) }}</div>\r\n </span>\r\n <span *ngSwitchCase="\'url\'" style="color: blue; cursor: pointer; text-decoration:underline;">\r\n {{ dataItem[col.field] }}\r\n </span>\r\n <span *ngSwitchDefault>\r\n {{ dataItem[col.field]}}\r\n </span>\r\n </div>\r\n <div style="margin: 7px 0;display: inline;" [style.color]="(!!dataItem.Color ? [dataItem.Color] : \'black\')" *ngIf="!col.navigateTo && col.isEditableInGrid === true && isInlineEditColVisible(dataItem, col)" [ngSwitch]="col.fieldType" [ngClass]="getColClass(dataItem, col)">\r\n <span *ngSwitchCase="\'checkbox\'">\r\n <app-zcheckbox style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(dataItem)" (click)="buttonClick(col, cellContext)"></app-zcheckbox>\r\n </span>\r\n <span *ngSwitchCase="\'zuiselectmultiple\'">\r\n <app-zselectmultiple style="width: 100%;" [data]="getInlineField(col.field)" [group]="group" [form]="getInlineForm(dataItem)"></app-zselectmultiple>\r\n </span>\r\n <span *ngSwitchCase="\'textarea\'">\r\n <app-ztextarea style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(dataItem)"></app-ztextarea>\r\n </span>\r\n <span *ngSwitchCase="[\'zuidatetime\',\'zdate\',\'zdatetime\',\'zshortdate\'].includes(col.fieldType) ? col.fieldType : \'\'">\r\n <app-zdatetime style="width: 100%;" [data]="getInlineField(col.Value)" [group]="group" [form]="getInlineForm(dataItem)"></app-zdatetime>\r\n </span>\r\n </div>\r\n <span *ngIf="!!col.navigateTo" (click)="onNavigateTo($event, col, dataItem, dataItem[col.field])">\r\n <ion-button color="light" size="small">\r\n {{ dataItem[col.field] }}\r\n \x3c!-- <ion-icon slot= "end" name="arrow-forward"></ion-icon> --\x3e\r\n <fa-icon slot="end" [icon]="\'arrow-right\'"></fa-icon>\r\n </ion-button>\r\n </span> \r\n </ng-template>\r\n <ng-template *ngIf="col.footerTemplate" kendoTreeListFooterTemplate let-aggregates="aggregates">\r\n <div *ngIf="!col.navigateTo" [ngSwitch]="col.fieldType" [ngClass]="{\'rightAligned\': col.fieldType === \'number\' || col.fieldType === \'currency\'}">\r\n <span *ngSwitchCase="\'number\'">\r\n <b>\r\n {{ col.aggregateTitle | titlecase }} {{ aggregates[col.field][col.aggregateType] | number }}\r\n </b>\r\n </span>\r\n <span *ngSwitchCase="\'currency\'">\r\n <b>\r\n {{ col.aggregateTitle | titlecase }} {{ aggregates[col.field][col.aggregateType] | number: \'1.2-2\' }}\r\n </b>\r\n </span>\r\n </div>\r\n </ng-template>\r\n </kendo-treelist-column>\r\n <kendo-treelist-command-column *ngIf="!!col.command" [title]="col.title || col.field" [width]="col.width || 250">\r\n <ng-template kendoTreeListCellTemplate let-cellContext="cellContext">\r\n <div [ngClass]="col.class">\r\n <button *ngFor="let col2 of col.command; index as i" type="button" [kendoTreeListEditCommand]="cellContext"\r\n [title]="col2.text" (click)="buttonClick(col2, cellContext)"\r\n [hidden]="isButtonHidden(col2, cellContext)">\r\n <fa-icon [icon]="col2.icon" [style.color]="(!!col2.color ? [col2.color] : \'black\')">\r\n </fa-icon>\r\n <div *ngIf="col2.ShowLabel === undefined || col2.ShowLabel">{{col2.text}}</div>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </kendo-treelist-command-column>\r\n </ng-container>\r\n\r\n \x3c!-- <kendo-treelist-command-column width="140">\r\n <ng-template kendoTreeListCellTemplate let-isNew="isNew" let-cellContext="cellContext">\r\n <button [kendoTreeListAddCommand]="cellContext"\r\n icon="filter-add-expression" title="Add Child">\r\n </button>\r\n <button [kendoTreeListCancelCommand]="cellContext"\r\n icon="cancel" title="{{ isNew ? \'Discard changes\' : \'Cancel\' }}">\r\n </button>\r\n </ng-template>\r\n </kendo-treelist-command-column> --\x3e\r\n </kendo-treelist>\r\n</div>\r\n',styles:[":host ::ng-deep kendo-treelist .k-grid-content{white-space:nowrap}:host ::ng-deep kendo-treelist .k-toolbar{background-color:#e3ecf8}:host ::ng-deep kendo-treelist .k-grid-add-row,:host ::ng-deep kendo-treelist .k-grid-footer,:host ::ng-deep kendo-treelist .k-grid-header,:host ::ng-deep kendo-treelist .k-grouping-header{background-color:#e3ecf8;font-weight:600}:host ::ng-deep kendo-treelist .k-button{border-radius:5px;box-shadow:0 2px 2px rgba(0,0,0,.1);background-color:#c9daf2}:host ::ng-deep kendo-treelist .k-grid-header .k-grid-filter:hover,:host ::ng-deep kendo-treelist .k-grid-header .k-header-column-menu:hover,:host ::ng-deep kendo-treelist .k-grid-header .k-hierarchy-cell .k-icon:hover{background-color:#c9daf2}:host ::ng-deep kendo-treelist .k-grid .k-grid-filter,:host ::ng-deep kendo-treelist .k-grid .k-header-column-menu,:host ::ng-deep kendo-treelist .k-grid .k-hierarchy-cell .k-icon{color:#132842}:host ::ng-deep kendo-treelist .k-dropdown .k-dropdown-wrap,:host ::ng-deep kendo-treelist .k-dropdowntree .k-dropdown-wrap{border-radius:2px;background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-treelist tr.k-alt{background-color:rgba(232,238,246,.5)}:host ::ng-deep kendo-treelist tbody tr.k-state-hover,:host ::ng-deep kendo-treelist tbody tr:hover{background-color:rgba(214,224,239,.5)}:host ::ng-deep kendo-treelist .k-pager-wrap{background-color:#e3ecf8}:host ::ng-deep kendo-treelist .k-pager-numbers .k-link.k-state-selected{color:#ff5e5b;background-color:rgba(255,94,91,.4)}:host ::ng-deep kendo-treelist .k-pager-numbers .k-link.k-state-hover,:host ::ng-deep kendo-treelist .k-pager-numbers .k-link:hover{color:#ff5e5b;background-color:rgba(255,94,91,.15)}.cellWrapText .gridCell{white-space:pre-line!important}.treelistTitle{margin:20px 10px 5px;font-size:18px;font-weight:700}.rightAligned{text-align:right;display:table!important;margin:0 0 0 auto!important}.centerAligned{text-align:center;display:table!important;margin:0 auto!important}.k-i-loading{position:absolute;top:100px;left:0;right:0;bottom:0;font-size:45px;background-color:hsla(0,0%,100%,.3);color:#0f4800}"]}]}],Je.ctorParameters=function(){return[{type:a.FieldService},{type:a.WebApiService},{type:o.ActivatedRoute},{type:o.Router},{type:a.AuthService}]},Je.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ke=function(){function e(){var e=this;this.isLoading=!0,this.componentProperties=new a.ZComponentProperties,this.title="Undefined",this.icon="address-card",this.color="#000000",this.value=0,this.options={title:this.title,icon:this.icon,color:this.color,value:this.value},this.setEnable=function(t){e.componentProperties.isReadOnly=!t},this.setVisible=function(t){e.componentProperties.isVisible=t,e.data.Visible=t},this.setRequire=function(t){e.componentProperties.isRequired=t},this.setData=function(t){t||(e.options.value=0),e.getFieldDeclarationForSetup(e.data,e.options)}}return e.prototype.ngOnInit=function(){if(a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.Options){var e=typeof this.data.Options;if("object"===e)Object.assign(this.options,this.data.Options);else if("string"===e){var t=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.Options);"object"==typeof t&&Object.assign(this.options,t)}}this.getFieldDeclarationForSetup(this.data,this.options),this.isLoading=!1},e.prototype.getFieldDeclarationForSetup=function(e,t){t.title=a.ZComponentHelper.getGroupEvalValue.call(this,e.Title)||t.title,t.icon=a.ZComponentHelper.getGroupEvalValue.call(this,e.Icon)||t.icon,t.color=a.ZComponentHelper.getGroupEvalValue.call(this,e.Color)||t.color,t.value=a.ZComponentHelper.getGroupEvalValue.call(this,e.Value)||t.value},e}();Ke.decorators=[{type:t.Component,args:[{selector:"app-ztrendcard",template:'<div *ngIf="!isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" style="text-align: center;">\r\n <ion-grid>\r\n <ion-row>\r\n <ion-col>\r\n \x3c!-- <div class="trend-btn ion-activatable ripple-parent" [routerLink]="[item.URL]"> --\x3e\r\n <div class="trend-btn ion-activatable ripple-parent">\r\n <ion-label>\r\n <ion-grid style="width: 100%;">\r\n <ion-row>\r\n <ion-col class="trend-btn-icon" sizeLg="4" sizeXs="4" sizeMd="4" sizeXl="4">\r\n <fa-icon [icon]="options.icon" [style.color]="options.color"></fa-icon>\r\n </ion-col>\r\n <ion-col class="trend-btn-value" sizeLg="4" sizeXs="4" sizeMd="4" sizeXl="4">\r\n <ion-label>{{ options.value }}</ion-label><br/>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n </ion-label>\r\n <ion-label class="trend-btn-label">{{ options.title }}</ion-label>\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </div>\r\n </ion-col>\r\n </ion-row>\r\n </ion-grid>\r\n</div>\r\n<div style="padding-bottom: 10px;"></div>\r\n\r\n\r\n\r\n\r\n\r\n',styles:[".trend-btn{display:flex;flex-flow:column;justify-content:center;align-items:stretch;background-color:#fff;padding:8px 0;border:1px solid #ccc;border-radius:5px;min-height:100px;cursor:pointer}.ripple-parent{position:relative;overflow:hidden}.trend-btn-label{text-align:right;font-size:14px;padding-right:20px}.trend-btn-value{text-align:right;zoom:2;vertical-align:middle;padding-top:10px}.trend-btn-icon{text-align:center;zoom:2.5}"]}]}],Ke.ctorParameters=function(){return[]},Ke.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Ye=function(){function e(e,t,o,n,r,i){var l=this;this.alertService=e,this.authService=t,this.fieldService=o,this.resourceApiService=n,this.toastService=r,this.webApiService=i,this.componentProperties=new a.ZComponentProperties,this.setEnable=function(e){l.componentProperties.isReadOnly=!e},this.setVisible=function(e){l.componentProperties.isVisible=e,l.data.Visible=e},this.setRequire=function(e){l.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,l.group,l.data.Value,l.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.initialDataValue=this.data.Value,a.ZComponentHelper.isNullUndefinedEmpty(this.data.Value)?this.loadEmptyForm():this.loadZudfForm()},e.prototype.loadEmptyForm=function(){var e=this;r.of(!0).pipe(i.tap((function(){e.data.SubType="zudf",e.data.Value=[]})),i.tap((function(){e.group["_zudf_"+e.data.Name]||(e.group["_zudf_"+e.data.Name]=new a.ZGroup);var t=e.group["_zudf_"+e.data.Name];t.zModel={},e.form=e.toFormGroup(e.data.Value),t.form=e.form})),i.tap((function(){e.formField=e.data.Value}))).subscribe((function(){a.ZComponentHelper.setFieldsDivClass(e.group._projectName,e.group.fieldName,e.data,e.authService)}))},e.prototype.loadZudfForm=function(){var e=this;r.of(!0).pipe(i.concatMap((function(t){var o=new r.AsyncSubject;return e.fieldService.getFormFieldCode(e.data.Value,"FormField",e,"fields").pipe(i.map((function(t){e.appendPrefix(t,"zudf_"+e.data.Name),e.data.Value=t,o.next(!0),o.complete()}))).subscribe(),o.asObservable()})),i.tap((function(){e.group["_zudf_"+e.data.Name]||(e.group["_zudf_"+e.data.Name]=new a.ZGroup);var t=e.group["_zudf_"+e.data.Name];t.zModel={},e.form=e.toFormGroup(e.data.Value),t.form=e.form})),i.tap((function(){e.formField=e.data.Value}))).subscribe((function(){a.ZComponentHelper.setFieldsDivClass(e.group._projectName,e.group.fieldName,e.data,e.authService),e.data.DisableReplaceValue&&(e.data.Value=e.initialDataValue)}))},e.prototype.getFormFieldzModel=function(){var e=this.group["_zudf_"+this.data.Name].form,t=this.group["_zudf_"+this.data.Name].zModel;this.resourceApiService.getURL("field");Object.assign(t,{parentFormId:5722,zudf_Name:"test"}),e.patchValue(t),e.markAsPristine()},e.prototype.toFormGroup=function(e){var t={};return this.getFormControls(e,t),new u.FormGroup(t)},e.prototype.getFormControls=function(e,t){var o=this;e.forEach((function(e){if("string"==typeof e.Value&&-1!==e.Value.indexOf("."))-1===["zgrid","ztree","zimg","textareajson"].indexOf(e.Type)&&console.warn("FormControl - invalid field value",e.Value);else if(Array.isArray(e.Value))o.getFormControls(e.Value,t);else{var n=a.ZComponentHelper.isFormControl(e),r=a.ZComponentHelper.isVisibleFormControl(o,e),i=a.ZComponentHelper.isRequiredFormControl(o,e);if(!0===n){var l=a.ZComponentHelper.getValidators(e,r,i);if(t[e.Value]=new u.FormControl(o.group["_zudf_"+o.data.Name].zModel[e.Value],l),a.ZComponentHelper.hasCCField(e.Type)){var s=a.ZComponentHelper.getCCValidators(e,r,i);t[e.CCValue]=new u.FormControl(o.group["_zudf_"+o.data.Name].zModel[e.CCValue],s)}}}}))},e.prototype.appendPrefix=function(e,t){var o=this;e.forEach((function(e){Array.isArray(e.Value)?o.appendPrefix(e.Value,t):(e.Name=t+"_"+e.Name,"zbuttons"!=e.Type&&(e.Value=t+"_"+e.Value),e.SubType=t)}))},e.prototype.ComponentIsVisible=function(e){return a.ZComponentHelper.ComponentIsVisible(e,this.group)},e.prototype.appendFormControl=function(e,t,o){this.form.addControl(e,t),this.formField.push(o)},e.prototype.clearFormControl=function(){var e=this;this.formField.forEach((function(t){e.form.removeControl(t.Value)})),this.data.Value=this.initialDataValue,this.formField=[]},e}();Ye.decorators=[{type:t.Component,args:[{selector:"app-zudf",template:'<div style="padding: 15px" *ngIf="data.Title && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" class="ion-row">\r\n <kendo-card *ngIf="data.Title" width="100%" >\r\n <kendo-card-header >\r\n <div>\r\n <ion-label class="card-header-title">{{data.Title}}</ion-label>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body>\r\n <div class="ion-row">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of formField | divzlayout: data.zlayout"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="zudf{{data.Name}}-{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n </div>\r\n </kendo-card-body> \r\n </kendo-card>\r\n</div>\r\n\r\n<div *ngIf="!data.Title && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" class="ion-row">\r\n <app-zformcontrol [ngClass]="group[field.isVisibleField] ? field.DivClass : ((field.Visible === true) ? field.DivClass : \'flex-hide\')"\r\n *ngFor="let field of formField | divzlayout: data.zlayout"\r\n [field]="field"\r\n [group]="group"\r\n [form]="form"\r\n id="zudf{{data.Name}}-{{field.Type}}-{{field.Name}}">\r\n </app-zformcontrol>\r\n</div>\r\n',styles:[".card-header-title{color:#fff!important;font-weight:500;font-size:11pt}"]}]}],Ye.ctorParameters=function(){return[{type:a.AlertService},{type:a.AuthService},{type:a.FieldService},{type:a.ResourceApiService},{type:a.ToastService},{type:a.WebApiService}]},Ye.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Qe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Qe.decorators=[{type:t.Component,args:[{selector:"app-zunknown",template:"<p>\r\n Unknown field Type => {{ data.Type}} >> {{data.Name}}\r\n</p>\r\n",styles:[""]}]}],Qe.ctorParameters=function(){return[]},Qe.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var Xe=function(){},et=function(){function e(e,t,o,n){var r=this;this.authService=e,this.compressImage=t,this.zcoreService=o,this.ngZone=n,this.componentProperties=new a.ZComponentProperties,this.uploadAttachmentUrl=null,this.uploadSaveUrl="/Attachment/Chunk_Upload_Save",this.uploadRemoveUrl="/Attachment/Chunk_Upload_Remove",this.downloadFileUrl="/Attachment/downloadFile",this.getImageUrl="/Attachment/getImage",this.isAutoUpload=!1,this.isMultiple=!1,this.imagePreviews=[],this.uid=[],this.showFileList=!0,this.fileList=[],this.restrictions={minFileSize:1,maxFileSize:4194304,allowedExtensions:["jpg","jpeg","png","bmp","pdf","txt","docx","doc","xlsx","xls","ppt","pptx","csv"]},this.chunkSettings={size:102400,maxAutoRetries:3},this.setEnable=function(e){var t=r.group.form.controls[r.data.Value];e?t.enable():t.disable(),r.componentProperties.isReadOnly=!e},this.setVisible=function(e){r.componentProperties.isVisible=e,r.data.Visible=e},this.setRequire=function(e){r.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,r.group,r.data.Value,r.componentProperties,u.Validators.required)},this.uploadAttachmentUrl=this.zcoreService.getEnvironment().uploadAttachmentUrl,this.uploadSaveUrl=this.uploadAttachmentUrl+this.uploadSaveUrl,this.uploadRemoveUrl=this.uploadAttachmentUrl+this.uploadRemoveUrl}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.data.SelectOptions&&(this.restrictions.allowedExtensions=this.data.SelectOptions),this.data.MinFileSize&&(this.restrictions.minFileSize=this.data.MinFileSize),this.data.MaxFileSize&&(this.restrictions.maxFileSize=this.data.MaxFileSize),this.isAutoUpload=this.data.AutoUpload||!1,this.data.AllowRemove||(this.uploadRemoveUrl=""),this.data.Multiple&&(this.isMultiple=this.data.Multiple)},e.prototype.getIon_InvalidClass=function(e,t){return a.ZComponentHelper.getIon_InvalidClass(e,t)},e.prototype.onSuccess=function(e){if("remove"!==e.operation||e.response.type!==s.HttpEventType.Sent&&e.response.type!==s.HttpEventType.UploadProgress){Array.isArray(this.group.zModel[this.data.Value])||(this.group.zModel[this.data.Value]=[]);var t=e.files[0],o=this.group.zModel[this.data.Value].findIndex((function(e){return e.name===t.name&&e.uid===t.uid}));"upload"===e.operation?(t.myUid=t.uid,delete t.httpSubscription,-1!==o?this.group.zModel[this.data.Value][o]=t:this.group.zModel[this.data.Value].push(t)):"remove"===e.operation&&-1!==o&&this.group.zModel[this.data.Value].splice(o,1),this.group.subject.next({type:"zupload-onSuccess",target:this.data.OnSuccess,event:e,data:{value:e.files[0],field:this.data}})}},e.prototype.compressionConfigHandler=function(e){return e.FileSizeMaxSize&&(e.FileSizeMaxSizeByte=this.convertSizeToByte(e.FileSizeMaxSize)),e.FileSizeMinSize?e.FileSizeMinSizeByte=this.convertSizeToByte(e.FileSizeMinSize):e.FileSizeMinSizeByte=0,e},e.prototype.convertSizeToByte=function(e){var t=0,o=0,n="b",r=e.replace(/ /g,""),i=r.substr(r.length-1);if(isNaN(parseFloat(i))){var a=r.substr(r.length-2).slice(0,-1);switch(isNaN(parseFloat(a))?(n=a+n,t=parseFloat(r.slice(0,-2))):t=parseFloat(r.slice(0,-1)),n.toLowerCase()){case"b":o=t;break;case"kb":o=1024*t;break;case"mb":o=1048576*t;break;case"gb":o=1073741824*t}}else o=parseFloat(r);return o},e.prototype.uploadEventHandler=function(e){var t=this;e.files.forEach((function(e){if(e.rawFile&&e.rawFile.type.includes("image")&&!e.validationErrors){var o=new FileReader;o.onload=function(n){t.data.EnableImagePreview&&(t.uid.includes(e.uid)||(t.uid.push(e.uid),t.imagePreviews.push(Object.assign(Object.assign({},e),{src:o.result}))))},o.readAsDataURL(e.rawFile)}}));var o=a.ZComponentHelper.getGroupEvalValue.call(this,this.data.UploadMetaData);o instanceof a.UploadMetaData||(console.error("UploadMetaData defined at "+this.data.UploadMetaData+" is invalid: ",o),o=new a.UploadMetaData(null,"0"));var n=JSON.stringify(o);e.data={additional:n},e.headers=e.headers.append("Authorization","Bearer "+this.authService.e1AccessToken)},e.prototype.onRemove=function(e){var t=this,o=this.fileList.findIndex((function(t){return t.uid===e.files[0].uid}));if(o>=0&&(this.fileList.splice(o,1),this.group["zupload_"+this.data.Value]=this.fileList),this.data.FileRemovedEvent)this.group.subject.next({type:"zupload-fileRemovedEvent",target:this.data.FileRemovedEvent,data:e});else{var n=e.files[0];e.data={id:n.myUid},e.headers=e.headers.append("Authorization","Bearer "+this.authService.e1AccessToken),this.data.EnableImagePreview&&e.files.forEach((function(e){t.imagePreviews=t.imagePreviews.filter((function(t){return t.uid!==e.uid}))}))}},e.prototype.onChange=function(e){this.data.FileChangedEvent&&this.group.subject.next({type:"zupload-fileChangedEvent",target:this.data.FileChangedEvent,data:e})},e.prototype.selectEventHandler=function(e){var t=this,o=this;this.data.SelectFileOnly?e.files.forEach((function(e){return q(t,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return e.rawFile?((t=new FileReader).onload=function(t){var n=Object.assign({},e);n.file=t.target.result,o.fileList.push(n),o.group["zupload_"+o.data.Value]=o.fileList,o.data.FileSelectedEvent&&o.group.subject.next({type:"zupload-fileSelectedEvent",target:o.data.FileSelectedEvent,data:o.fileList})},[4,t.readAsDataURL(e.rawFile)]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))})):this.data.AutoUpload||(!0===!!this.data.Compression&&e.files.forEach((function(e){if(e.rawFile&&e.rawFile.type.includes("image")&&!e.validationErrors){var n=t.compressionConfigHandler(t.data.Compression);e.size>n.FileSizeMinSizeByte&&o.compressImage.compress(e.rawFile,n).pipe(i.take(1)).subscribe((function(n){t.ngZone.run((function(){e.rawFile=n,e.size=n.size;var t=Object.assign({},e);o.fileList.push(t),(new FileReader).readAsDataURL(e.rawFile)})),console.log("Compressed file size: "+(e.rawFile.size/1024).toFixed(2)+"KB")}))}})),o.group["zupload_"+o.data.Value]=e.files)},e.prototype.clearFiles=function(){this.uploadComponent.clearFiles(),this.group["zupload_"+this.data.Value]=this.fileList},e}();et.decorators=[{type:t.Component,args:[{selector:"app-zupload",template:'<ion-item [formGroup]="form" *ngIf="(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)" [ngClass]="getIon_InvalidClass(form, data)" style="margin-left: -15px;">\r\n <ion-label [attr.for]="data.Value" *ngIf="data.ShowLabel === undefined || data.ShowLabel" position="stacked" style="margin-bottom: 10px;">\r\n {{data.Label}} <ion-text *ngIf="(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)" color="danger">*</ion-text>\r\n </ion-label>\r\n <div class="ion-row" style="justify-content: space-between; width: 100%">\r\n <span style="flex: 1;">\r\n <kendo-upload #uploadComponent\r\n *ngIf="!data.SelectFileOnly"\r\n [id]="data.Value"\r\n [autoUpload]="isAutoUpload"\r\n [saveUrl]="uploadSaveUrl"\r\n [removeUrl]="uploadRemoveUrl"\r\n [restrictions]="restrictions"\r\n [formControlName]="data.Value"\r\n [multiple]="isMultiple"\r\n [chunkable]="chunkSettings"\r\n [showFileList]="showFileList"\r\n (select)="selectEventHandler($event)"\r\n (remove)="onRemove($event)" \r\n (success)="onSuccess($event)"\r\n (upload)="uploadEventHandler($event)">\r\n </kendo-upload>\r\n\r\n <kendo-fileselect #uploadComponent\r\n *ngIf="data.SelectFileOnly"\r\n [id]="data.Value"\r\n (select)="selectEventHandler($event)"\r\n (remove)="onRemove($event)" \r\n (valueChange)="onChange($event)"\r\n [restrictions]="restrictions" >\r\n </kendo-fileselect>\r\n </span>\r\n </div>\r\n</ion-item>\r\n<br />\r\n\x3c!--<div class="wrap" *ngIf="data.EnableCompression">\r\n <ion-label>Enable Compression: </ion-label>\r\n <ion-checkbox style="margin: -5px 0;" color="primary" (ionChange)="toogleEnableCompression($event)"></ion-checkbox>\r\n</div>--\x3e\r\n<ion-label *ngIf="imagePreviews.length" position="stacked">\r\n Image Preview:\r\n</ion-label>\r\n<div *ngIf="imagePreviews.length" >\r\n <img *ngFor="let image of imagePreviews"\r\n [src]="image.src"\r\n alt="image preview"\r\n height="100"\r\n style="margin: 5px; border: 1px solid gray;"/>\r\n</div>\r\n',styles:[""]}]}],et.ctorParameters=function(){return[{type:a.AuthService},{type:a.CompressImageService},{type:a.ZCoreService},{type:t.NgZone}]},et.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],uploadComponent:[{type:t.ViewChild,args:["uploadComponent"]}]};var tt=function(){function e(e,t,o){var n=this;this.webApiService=e,this.resourceApiService=t,this.workflowService=o,this.componentProperties=new a.ZComponentProperties,this.e1wfs_wfcGetWorkflowButtonURL=this.resourceApiService.getURL("e1wfs_wfcGetWorkflowButtonURL"),this.e1wfs_wfc_getWorkflowInitialStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getWorkflowInitialStatusURL"),this.e1wfs_wfc_getDocumentStatusURL=this.resourceApiService.getURL("e1wfs_wfc_getDocumentStatusURL"),this.items=[],this.dataFormFields={},this.FirstZbtn=!1,this.isLoading=!0,this.isLocalHostAPI=!1,this.setEnable=function(e){n.componentProperties.isReadOnly=!e},this.setVisible=function(e){n.componentProperties.isVisible=e,n.data.Visible=e},this.setRequire=function(e){n.componentProperties.isRequired=e,a.ZComponentHelper.changeValidator(e,n.group,n.data.Value,n.componentProperties,u.Validators.required)}}return e.prototype.ngOnInit=function(){a.ZComponentHelper.setComponentProperties(this),a.ZComponentHelper.registerComponent(this),this.group.resourceURL&&(this.isLocalHostAPI=!!this.group.resourceURL.toLowerCase().includes("localhost")),this.loadButton()},e.prototype.loadButton=function(){var e=this;this.items=[];var t=null;this.group.zModel&&(t=this.group.zModel.WFS_DocumentId),this.workflowService.appendWFS_DocumentsInfo(this.data.WorkflowCode,t),this.group.zButtonsCount++,1===this.group.zButtonsCount&&(this.FirstZbtn=!0);try{r.of(!0).pipe(i.concatMap((function(){return e.workflowService.getWorkflowButtonsField(e.data.WorkflowCode,e.e1wfs_wfcGetWorkflowButtonURL,String(e.isLocalHostAPI))})),i.tap((function(t){t?t.forEach((function(t){var o=e.getButtonLabel(t),n=JSON.parse(t.Attributes),r=n.Label||o;e.items.push({text:r,icon:a.ZComponentHelper.getIcon(n.Icon),visible:n.Visible,fieldAttribute:t,iconName:n.Icon,click:function(o){e.buttonClick(t)}})})):console.warn("unable to get workflow button. data returned null.")})),i.map((function(){if(!e.data.DisableSyncWorkflowStatus){if(!e.group.zModel.WFS_StatusName){var o={WorkflowMasterCode:e.data.WorkflowCode};return e.webApiService.httpPost$(e.e1wfs_wfc_getWorkflowInitialStatusURL,o).pipe(i.map((function(t){t.Data&&(a.ZComponentHelper.presetModelValue("WFS_StatusId",t.Data.Id,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusName",t.Data.Name,e.group),a.ZComponentHelper.presetModelValue("WFS_StatusCode",t.Data.Code,e.group),e.workflowService.setCurrentDocumentStatus(t.Data))})))}var n={WorkflowMasterCode:e.data.WorkflowCode,DocumentId:t};e.webApiService.httpPost$(e.e1wfs_wfc_getDocumentStatusURL,n).pipe(i.map((function(t){e.workflowService.setCurrentDocumentStatus(t),t.Data&&e.workflowService.setCurrentDocumentStatus(t.Data)})))}}))).subscribe()}catch(e){console.error("error: ",e)}},e.prototype.buttonClick=function(e){var t=this,o=JSON.parse(e.Attributes);switch(e.TypeCode.toUpperCase()){case"FUNCTION":this.group.isTriggered=!0;var n=this.group;o.DisableTriggerTimer||setTimeout((function(){n.isTriggered=!1}),500),console.log("Functional Button: ",e.Name),this.workflowService.functionalButton_OnClick(o,this.group);break;case"GOTO":this.group.isTriggered=!0,console.log("GOTO Button: ",e.Name),this.workflowService.gotoButton_Onclick(e,this.data,o,this.group,this.isLocalHostAPI).subscribe((function(e){t.loadButton(),t.group.isTriggered=!1,e&&t.workflowService.triggerSendEmail(t.group).subscribe()}));break;default:console.log("Invalid Button Type. ",e.Name)}},e.prototype.getButtonLabel=function(e){var t=e.Name.match(/^{{.*}}$/gi);return t?(t=t[0].slice(2,-2),a.ZComponentHelper.getGroupValue(t,this.group)):e.Name},e.prototype.isMobileScreen=function(){return a.ZComponentHelper.isMobileScreen()},e.prototype.isBtnVisible=function(e){return!1!==e&&!e||a.ZComponentHelper.getGroupEvalValue.call(this,e)},e.prototype.getFontAwesome=function(e){return""==e&&(e="help"),a.ZComponentHelper.getFontAwesome(e)},e}();tt.decorators=[{type:t.Component,args:[{selector:"app-zworkflowbuttons",template:'<div *ngIf="!group.isLoading && (!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && items.length > 0">\r\n\r\n <div class="ion-margin-vertical" *ngIf="isMobileScreen() && items.length > 1 && FirstZbtn === false">\r\n <kendo-dropdownbutton [data]="items" size="large" [look]="\'outline\'" class="ion-activatable ripple-parent">\r\n Actions\r\n <ion-ripple-effect></ion-ripple-effect>\r\n </kendo-dropdownbutton>\r\n </div>\r\n\r\n <div *ngIf="!isMobileScreen() || items.length === 1 " style="padding: 10px 0px;" [class]="data.DivClass">\r\n \x3c!-- <button *ngFor="let item of items; let i = index" (click)="buttonClick(item.fieldAttribute)"\r\n kendoButton [togglable]="true" [icon]="item.icon" [hidden]="!isBtnVisible(item.visible)"\r\n style="margin-right: 5px;">\r\n {{item.text}}\r\n </button> --\x3e\r\n <ion-button fill="outline"\r\n color="dark"\r\n size="small"\r\n strong="false"\r\n *ngFor="let item of items; let i = index"\r\n class="button-container"\r\n (click)="buttonClick(item.fieldAttribute)"\r\n [hidden]="!isBtnVisible(item.visible)"\r\n [disabled]="group.isTriggered">\r\n <fa-icon [icon]="getFontAwesome(item.icon)" style="padding-right: 5px;"></fa-icon>\r\n <span class="ion-text-capitalize">{{item.text}}</span>\r\n </ion-button>\r\n </div>\r\n</div>\r\n',styles:[".ripple-parent{position:relative;overflow:hidden}:host ::ng-deep span.ion-text-capitalize{font-weight:600}.button-container,.button:hover{font-size:12px;height:30px}.button:hover{border-radius:5px}"]}]}],tt.ctorParameters=function(){return[{type:a.WebApiService},{type:a.ResourceApiService},{type:a.WorkflowService}]},tt.propDecorators={data:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}]};var ot=function(){function e(){}return e.prototype.mapByName=function(e){var t=e.toLocaleLowerCase();return{zbullet:ye,zbuttons:Ce,zcard:Se,zchart:ke,checkbox:we,zchip:xe,textareajson:Ie,textareahtml:Ie,zdate:Ve,zdatetime:Ve,zshortdate:Ve,zuidatetime:Ve,zuitime:Ve,zdiv:Pe,zgauge:ze,zgrid:De,zimg:Re,zkcard:Oe,zlabel:Me,zmfb:Ae,znumeric:Ne,post_select_input:Ee,pre_select_input:Ee,zphone_countrycode:Ee,zquerybuilder:Le,zreport:Ze,zcalendar:Ge,zuiselectmultiple:Be,zuiselectmultiple_button:Be,select:Be,ztab:je,number:qe,numeric:qe,date:qe,email:qe,password:qe,search:qe,tel:qe,text:qe,url:qe,currency:qe,textarea:_e,ztexteditor:Ue,ztree:We,ktree_list:Je,ztrendcard:Ke,unknown:Qe,zudf:Ye,zupload:et,zworkflowbuttons:tt}[t]},e.prototype.isSkipComponentType=function(e){return a.ZComponentHelper.isSkipComponentType(e)},e.prototype.loadComponent=function(e,t,o,n,r){if(!this.isSkipComponentType(o.Type)){var i,a=this.mapByName(o.Type);i=a?e.resolveComponentFactory(a):e.resolveComponentFactory(this.mapByName("unknown"));var l=t.viewContainerRef;l.clear(),r||console.warn("FormGroup is empty!");var s=l.createComponent(i);s.instance.data=o,s.instance.group=n,s.instance.form=r}},e.prototype.appendComponentToDynamicForm=function(e,t,o,n,r,i){if(!this.isSkipComponentType(n.Type)){var a,l=this.mapByName(n.Type);a=l?e.resolveComponentFactory(l).create(t):e.resolveComponentFactory(this.mapByName("unknown")).create(t),o.attachView(a.hostView);var s=a.hostView.rootNodes[0];return document.querySelector("#"+i).appendChild(s),a.instance.data=n,a.instance.group=r,a}},e}();ot.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new ot},token:ot,providedIn:"root"}),ot.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ot.ctorParameters=function(){return[]};var nt=function(){function e(e,t){this.componentFactoryResolver=e,this.zcomponentService=t}return e.prototype.ngOnInit=function(){this.zcomponentService.loadComponent(this.componentFactoryResolver,this.fieldElement,this.field,this.group,this.form)},e.prototype.ngOnDestroy=function(){},e}();nt.decorators=[{type:t.Component,args:[{selector:"app-zformcontrol",template:'\x3c!-- <ion-col size=12 sizeSm="12" sizeMd="6" sizeLg="4" sizeXl="3" fieldelement></ion-col> --\x3e\r\n<span fieldelement></span>',styles:[""]}]}],nt.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:ot}]},nt.propDecorators={field:[{type:t.Input}],group:[{type:t.Input}],form:[{type:t.Input}],fieldElement:[{type:t.ViewChild,args:[ee,{static:!0}]}]};var rt=function(){};rt.decorators=[{type:t.NgModule,args:[{declarations:[X,ee,te,oe,ne,re,ie,ae,le,se,pe,de,ue,ge,ce,be,he,fe,me,ve,ye,Ce,Se,ke,we,xe,Ie,Fe,Ve,Pe,Te,nt,ze,De,Re,Oe,Me,Ae,K,Y,Ne,Ee,Le,Ze,Ge,Be,je,qe,_e,Ue,We,Je,Ke,Qe,Ye,et,tt],imports:[n.IonicModule,g.IonicSelectableModule,c.CommonModule,o.RouterModule,u.FormsModule,u.ReactiveFormsModule,h.AceEditorModule,f.FontAwesomeModule,m.QueryBuilderModule,b.ArcGaugeModule,v.ButtonsModule,y.ChartsModule,C.CalendarModule,C.DateInputsModule,S.DropDownsModule,k.EditorModule,d.GridModule,d.ExcelModule,w.IndicatorsModule,x.IntlModule,I.InputsModule,I.SwitchModule,I.TextBoxModule,F.LabelModule,V.LayoutModule,V.PanelBarModule,V.TabStripModule,P.PopupModule,T.ProgressBarModule,z.TelerikReportingModule,D.SchedulerModule,R.TreeListModule,O.TreeViewModule,M.TooltipModule,A.UploadModule,A.UploadsModule,a.ZCoreModule,l.MmhglobalZmodalModule],exports:[X,ee,te,oe,ne,re,ie,ae,le,se,pe,de,ue,ge,ce,he,fe,me,be,ve,ye,Ce,Se,ke,we,xe,Ie,Fe,Ve,Pe,Te,nt,ze,De,Re,Oe,Me,Ae,K,Y,Ne,Ee,Le,Ze,Ge,Be,je,qe,_e,Ue,We,Je,Ke,Qe,Ye,et,tt],entryComponents:[pe,de,ue,ge,ce,he,fe,me,be,ve,ye,Ce,Se,ke,we,xe,Ie,Fe,Ve,Pe,Te,nt,ze,De,Re,Oe,Me,Ae,K,Y,Ne,Ee,Le,Ze,Ge,Be,je,qe,_e,Ue,We,Je,Ke,Qe,Ye,et,tt],providers:[l.ModalService],schemas:[t.CUSTOM_ELEMENTS_SCHEMA]}]}],e.DateParserFilter=re,e.DateRangeFilterCellComponent=pe,e.DivzLayout=ae,e.EditorFilter=ie,e.ExportOptions=le,e.FieldElementDirective=ee,e.MainService=Q,e.MmhglobalDynamicformModule=rt,e.MyFileInfo=Xe,e.OpenOnFocusDirective=ne,e.ScrollbarThemeDirective=X,e.TabFilter=se,e.UiactionbuttonComponent=be,e.UiappmenucontentComponent=me,e.UicontentComponent=ge,e.UiheaderComponent=ue,e.UimenubuttonComponent=fe,e.UimenucontentComponent=he,e.UipageComponent=ce,e.UivalidationmessageComponent=ve,e.ZBulletComponent=ye,e.ZChipComponent=xe,e.ZGridBindingDirective=te,e.ZGridPopupAnchorDirective=oe,e.ZSchedulerToolBarComponent=de,e.ZTreeListOptions=$e,e.ZbuttonsComponent=Ce,e.ZcardComponent=Se,e.ZchartComponent=ke,e.ZcheckboxComponent=we,e.ZcodeeditorComponent=Ie,e.ZdaterangeComponent=Fe,e.ZdatetimeComponent=Ve,e.ZdivComponent=Pe,e.ZformComponent=Te,e.ZformcontrolComponent=nt,e.ZgaugeComponent=ze,e.ZgridComponent=De,e.ZimgComponent=Re,e.ZkcardComponent=Oe,e.ZlabelComponent=Me,e.ZmfbComponent=Ae,e.ZmodalComponent=K,e.ZmodalMobileComponent=Y,e.ZnumericComponent=Ne,e.ZpostselectinputComponent=Ee,e.ZquerybuilderComponent=Le,e.ZreportComponent=Ze,e.ZschedulerComponent=Ge,e.ZselectmultipleComponent=Be,e.ZtabComponent=je,e.ZtextComponent=qe,e.ZtextareaComponent=_e,e.ZtexteditorComponent=Ue,e.ZtreeComponent=We,e.ZtreelistComponent=Je,e.ZtrendcardComponent=Ke,e.ZudfComponent=Ye,e.ZunknownComponent=Qe,e.ZuploadComponent=et,e.ZworkflowbuttonsComponent=tt,e.refreshGrid=function(e){var t=e.gridOptions;t&&t.getData(),e.isTriggered=!1},e.toQueryRule=He,e.ɵa=J,e.ɵb=ot,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=mmhglobal-dynamicform.umd.min.js.map
|