@magic-xpa/angular 4.701.0-dev471.99 → 4.701.0-dev480.192
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("util"),require("@angular/core"),require("rxjs"),require("@magic-xpa/engine"),require("@magic-xpa/utils"),require("@magic-xpa/mscorelib"),require("@magic-xpa/gui"),require("@angular/forms"),require("rxjs/operators"),require("rxjs/internal/observable/fromEvent"),require("@angular/router"),require("@angular/common"),require("@angular/common/http"),require("@angular/platform-browser"),require("ng-dynamic-component"),require("@angular/material"),require("@angular/cdk/platform")):"function"==typeof define&&define.amd?define("@magic-xpa/angular",["exports","util","@angular/core","rxjs","@magic-xpa/engine","@magic-xpa/utils","@magic-xpa/mscorelib","@magic-xpa/gui","@angular/forms","rxjs/operators","rxjs/internal/observable/fromEvent","@angular/router","@angular/common","@angular/common/http","@angular/platform-browser","ng-dynamic-component","@angular/material","@angular/cdk/platform"],e):e((t["magic-xpa"]=t["magic-xpa"]||{},t["magic-xpa"].angular={}),null,t.ng.core,t.rxjs,null,null,null,null,t.ng.forms,t.rxjs.operators,t.rxjs["internal/observable/fromEvent"],t.ng.router,t.ng.common,t.ng.common.http,t.ng.platformBrowser,null,t.ng.material,t.ng.cdk.platform)}(this,function(t,l,i,o,a,u,p,m,s,r,e,n,c,d,h,g,f,y){"use strict";var v=function(t,e){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function C(t,e){function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function b(t,e,s,c){return new(s=s||Promise)(function(n,o){function r(t){try{a(c.next(t))}catch(e){o(e)}}function i(t){try{a(c["throw"](t))}catch(e){o(e)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((c=c.apply(t,e||[])).next())})}function E(n,o){var r,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},t={next:e(0),"throw":e(1),"return":e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return c([e,t])}}function c(t){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(a=2&t[0]?i["return"]:t[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)a.push(o.value)}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i["return"])&&n.call(i)}finally{if(r)throw r.error}}return a}function I(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(R(arguments[e]));return t}var T=(w.prototype.setClass=function(t,e){var n,o;this.classesMap.has(t)&&(this.removedClass=this.classesMap.get(t)),this.classesMap.set(t,e);var r="";try{for(var i=S(this.classesMap),a=i.next();!a.done;a=i.next())r+=a.value+" "}catch(s){n={error:s}}finally{try{a&&!a.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}this.classes=r},w.prototype.setStyle=function(t,e){this.stylesMap.set(t,e)},w);function w(){this.properties=new Map,this.classesMap=new Map,this.stylesMap=new Map,this.userProperties=new Map,this.customValidators=new Map}var M=(Object.defineProperty(k.prototype,"Values",{get:function(){return this.values},enumerable:!0,configurable:!0}),k.prototype.getControlMetadata=function(t){return this.ControlsProperties.has(t)||this.ControlsProperties.set(t,new T),this.ControlsProperties.get(t)},k.prototype.update=function(t){for(var e in t.ControlsMetaData){this.ControlsProperties.has(e)||this.ControlsProperties.set(e,new T);var n,o=this.ControlsProperties.get(e);for(n in t.ControlsMetaData[e].Properties)o[n]=t.ControlsMetaData[e].Properties[n];o.controlType=t.ControlsMetaData[e].Type}for(e in t.ControlsValues)this.setValue(e,t.ControlsValues[e])},k.prototype.setValue=function(t,e){this.values.set(t,e)},k.prototype.getProperty=function(t,e){return this.ControlsProperties.has(t)&&this.ControlsProperties.get(t).properties.has(e)?this.ControlsProperties.get(t).properties.get(e):""},k.prototype.getValue=function(t){return this.values.get(t)},k);function k(){this.values=new Map,this.ControlsProperties=new Map,this.isCreated=!1,this.isEditing=!1}var P=(O.prototype.getRow=function(t){return this.list[t+this.recordsBeforeCurrentView]},O.prototype.markRowAsCreated=function(t){t<this.list.length&&(this.addRow(t),this.data.get(t).isCreated=!0)},O.prototype.markRowAsNotCreated=function(t){t<this.list.length&&(this.data.get(t).isCreated=!1)},O.prototype.isRowCreated=function(t){return t<this.list.length&&(!(!this.data.has(t)||l.isNullOrUndefined(this.data.get(t)))&&this.data.get(t).isCreated)},O.prototype.startRowEditing=function(t){t<this.list.length&&this.data.has(t)&&(this.data.get(t).isEditing=!0)},O.prototype.stopRowEditing=function(t){t<this.list.length&&this.data.has(t)&&(this.data.get(t).isEditing=!1)},O.prototype.isRowInRowEditing=function(t){return+t<this.list.length&&(!(!this.data.has(+t)||l.isNullOrUndefined(this.data.get(+t)))&&this.data.get(+t).isEditing)},O.prototype.update=function(t){var e,n,o;for(o in t.fullRefresh&&t.rows.length!=this.list.length&&(this.data=new Map,this.list=new Array),t.rows){this.data.has(+o)&&null!==this.data.get(+o)||this.data.set(+o,new M);var r=this.data.get(+o);r.update(t.rows[o]),r.rowId=o}try{for(var i=S(this.data),a=i.next();!a.done;a=i.next()){var s=R(a.value,2),c=s[0],s=s[1];this.list[c]=s}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}},O.prototype.updateSize=function(t){if(this.list.length!=t){if(t<this.list.length)for(var e=t;e<this.list.length;e++)this.data["delete"](e);this.list.length=t}},O.prototype.clearFirstTableRecord=function(t){if(1<=this.list.length)for(var e in t)"1"==t[e]&&this.list[0].ControlsProperties.has(e)&&(this.list[0].ControlsProperties.get(e).properties=new Map)},O.prototype.addRow=function(t){0===t&&this.data.has(t)&&!l.isNullOrUndefined(this.data.get(t))||(this.data.set(t,new M),this.data.get(t).rowId=""+t,this.list[t]=this.data.get(t))},O.prototype.createFirst=function(){this.addRow(0)},O.prototype.fromJson=function(t){t=JSON.parse(t);this.update(t)},O.prototype.setGuiTopIndex=function(t){this.guiTopIndex=t},O.prototype.getGuiTopIndex=function(){return this.guiTopIndex},O);function O(){this.data=new Map,this.list=[],this.recordsBeforeCurrentView=0,this.isEmptyDataView=!1}var D=(_.prototype.startMagicEngine=function(t){var l=this;this.magicBridge.registerExecuteCommandsCallback(function(t){var e,n;if(!l.isStub)try{var o=t;try{for(var r=S(o),i=r.next();!i.done;i=r.next()){var a=i.value;l.refreshDom.next(a)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}}catch(c){console.dir(c),console.log("magic engine not found"),console.log("moving to stub mode"),l.isStub=!0}}),this.magicBridge.registerInteractiveCallback(function(t){l.isStub||l.interactiveCommands.next(t)}),this.magicBridge.Initialize(t)},_.prototype.terminateMagic=function(){return b(this,void 0,void 0,function(){return E(this,function(t){switch(t.label){case 0:return[4,this.magicBridge.TerminateMagic()];case 1:return t.sent(),[2]}})})},_.prototype.insertEvent=function(t){this.isStub||this.magicBridge.insertEvent(t)},_.prototype.GetRangedValue=function(t,e,n){return this.magicBridge.GetRangedValue(t,e,n)},_.prototype.GetControlPictureMask=function(t,e){return this.magicBridge.GetControlPictureMask(t,e)},_.prototype.ValidateControlValue=function(t,e,n){return this.magicBridge.ValidateControlValue(t,e,n)},_.prototype.GetFldRanges=function(t,e){return this.magicBridge.GetFldRanges(t,e)},_.prototype.saveData=function(t){},_.prototype.getIsLoggedIn=function(){return this.isLoggedIn},_.prototype.setIsLoggedIn=function(t){this.isLoggedIn=t},_.prototype.TransCacheExists=function(){return this.magicBridge.TransCacheExists()},_.prototype.TerminateContextUsingFetchAPI=function(){this.magicBridge.TerminateContextUsingFetchAPI()},_.decorators=[{type:i.Injectable}],_);function _(){this.magicBridge=a.MagicBridge,this.isStub=!1,this.isLoggedIn=!1,this.refreshDom=new o.Subject,this.interactiveCommands=new o.Subject}var x=(A.prototype.getData=function(t,e){var n=null,o=this.components.has(t);return!o&&e&&console.log("Error: Component: "+t+" does not exist in components map"),o&&(n=this.components.get(t)),n},A.prototype.getComponent=function(t,e){void 0===e&&(e=!0);e=this.getData(t,e);return e?e.component:null},A.prototype.addComponents=function(t,e){for(var n in t){var o={moduleRef:e,component:t[n]};this.components.set(n,o)}},A.prototype.getModuleRef=function(t){t=this.getData(t,!1);return t?t.moduleRef:null},A.prototype.getLazyLoadModuleData=function(t){return null!=this.lazyLoadModulesMap&&this.lazyLoadModulesMap.hasOwnProperty(t)?this.lazyLoadModulesMap[t]:null},A);function A(){this.components=new Map,this.dialogs=new Map,this.lazyLoadModulesMap=null}var L=(V.magicValueGetStyle=function(t,e){var n="";return l.isNullOrUndefined(e)||((t=V.StylesMap.get(t)).constructor===Map?n=t.get(e):t.constructor===String&&(n=p.NString.Format(t,e))),n},V.StylesMap=new Map([[u.MagicProperties.LineDivider,new Map([[!0,"solid"],[!1,"hidden"]])],[u.MagicProperties.ImageFile,"url('{0}')"],[u.MagicProperties.Wallpaper,"url('{0}')"]]),V.MagicPropertyToHtmlAttributeMap=new Map([[u.MagicProperties.LineDivider,"border-bottom-style"],[u.MagicProperties.ImageFile,"background-image"],[u.MagicProperties.Wallpaper,"background-image"]]),V);function V(){}var N=(F.prototype.Run=function(){try{switch(this.command._commandType){case m.InteractiveCommandType.GET_VALUE:this.onValue();break;case m.InteractiveCommandType.GET_ROWS_IN_PAGE:this.onGetRowsInPage();break;case m.InteractiveCommandType.GET_MAX_ROWS_IN_PAGINATED_TABLE:this.onGetMaxRowsInPaginatedTable();break;case m.InteractiveCommandType.MESSAGE_BOX:this.OnMessageBox();break;case m.InteractiveCommandType.GET_TOP_INDEX:this.OnGetTopIndex();break;case m.InteractiveCommandType.GET_IS_ROW_EDITING:this.OnGetIsRowEditing();break;case m.InteractiveCommandType.SET_TITLE:this.OnSetTitle();break;case m.InteractiveCommandType.REFRESH_PAGE:this.OnRefreshPage()}}catch(t){throw t}},F.executeInteractiveCommand=function(t,e,n){var o=new F;o.task=t,o.command=e,o.overlayService=n,o.Run()},F.prototype.onValue=function(){var t,e=this.task.getGuiRowId(+this.command._line,this.task.isTableControl(this.command.controlName)||this.command._obj2.IsTableChild),n=this.task.getFormControl(e.toString(),this.command.controlName);l.isNullOrUndefined(n)?this.task.isTableControl(this.command.controlName)&&(t=this.task.getValue(this.command.controlName,e.toString())):t=n.value,t=this.task.ConvertValToNative(this.command.controlName,e,t),this.command._mgValue.obj=t},F.prototype.onGetRowsInPage=function(){this.command._intVal1=this.task.tableService.getPageSize(),0==this.task.oldPageSize&&(this.task.oldPageSize=this.command._intVal1)},F.prototype.onGetMaxRowsInPaginatedTable=function(){this.command._intVal1=this.task.tableService.getMaxRowsInTable()},F.prototype.OnMessageBox=function(){this.overlayService.openConfirmationBox(this.command._mgValue.title,this.command._mgValue.str,this.command._mgValue.style)},F.prototype.OnSetTitle=function(){this.task.setTitle(this.command._mgValue.title)},F.prototype.OnRefreshPage=function(){var t=this.command._boolVal,e=this.command._obj1;t?window.location.replace(e):window.location.reload()},F.prototype.OnGetTopIndex=function(){this.command._intVal1=this.task.tableService.getTableTopIndex()},F.prototype.OnGetIsRowEditing=function(){var t=this.command._intVal1,t=this.task.getGuiRowId(t,!0);this.command._boolVal&&(l.isNullOrUndefined(t)||l.isNullOrUndefined(this.task.Records.list[t]))?this.command._boolVal=!1:this.command._boolVal=this.task.Records.list[t].isEditing},F);function F(){}var G=(B.propDecorators={ModalComp:[{type:i.Input}],ModalCompParameters:[{type:i.Input}],onClose:[{type:i.Output}]},B);function B(){}var U,j=(C(H,U=G),H.prototype.ngOnInit=function(){var t=this.componentFactoryResolver.resolveComponentFactory(this.ModalComp);this.componentRef=this.modalbodyViewContainerRef.createComponent(t),Object.assign(this.componentRef.instance,this.ModalCompParameters)},H.prototype.setViewContainerRef=function(t){this.modalbodyViewContainerRef=t},H.prototype.getText=function(){return null===this.componentRef?"":this.componentRef.instance.FormName()},H.prototype.getStyle=function(){var t,e={};return this.componentRef!=undefined&&(t=this.componentRef.instance,e.width=t.Width(),e.height=t.Height(),t.IsCenteredToWindow()?e.margin="auto":(e["margin-left"]=t.X()+"px",e["margin-top"]=t.Y()+"px")),e},H.prototype.getClientAreaStyles=function(){var t,e,n={};return this.componentRef!=undefined&&(this.componentRef.instance,e=this.getShowTitleBar()&&!l.isNullOrUndefined(this.headerElementRef)?this.headerElementRef.nativeElement.offsetHeight+1:0,l.isNullOrUndefined(this.foregroundElementRef)||(t=this.foregroundElementRef.nativeElement.offsetHeight,n.height=t-e+"px",e=this.foregroundElementRef.nativeElement.offsetWidth,n.width=e+"px"),n.overflow="auto"),n},H.prototype.getShowTitleBar=function(){if(this.componentRef!=undefined)return this.componentRef.instance.ShowTitleBar()},H.prototype.OnClose=function(){this.onClose.emit()},H.prototype.OnBackgroundClick=function(){this.componentRef.instance.ShouldCloseOnBackgroundClick()&&this.OnClose()},H.decorators=[{type:i.Component,args:[{selector:"app-magic-overlay-container",template:'\n <div>\n <div class="modal-background" (click)="OnBackgroundClick()">\n <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white" *ngIf="!getShowTitleBar()">X</button>\n </div>\n <div #modalForeground class="modal-foreground" [ngStyle]="getStyle()">\n <div #modalheader class="modal-header" *ngIf="getShowTitleBar()">\n {{getText()}}\n <button (click)="OnClose()" style="float:right" tabindex="-1">X</button>\n </div>\n <div [ngStyle]="getClientAreaStyles()">\n <div #modalbody magicViewContainerRef>\n </div>\n </div>\n </div>\n </div>\n ',styles:[".modal-foreground{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}"]}]}],H.ctorParameters=function(){return[{type:i.Injector},{type:i.ComponentFactoryResolver}]},H.propDecorators={headerElementRef:[{type:i.ViewChild,args:["modalheader",{"static":!1}]}],foregroundElementRef:[{type:i.ViewChild,args:["modalForeground",{"static":!1}]}],ModalComp:[{type:i.Input}],ModalCompParameters:[{type:i.Input}],onClose:[{type:i.Output}]},H);function H(t,e){var n=U.call(this)||this;return n.injector=t,n.componentFactoryResolver=e,n.ModalComp=null,n.ModalCompParameters={},n.onClose=new i.EventEmitter,n.componentRef=null,n}var W=(Y.prototype.getComponent=function(){return j},Y.decorators=[{type:i.Injectable}],Y);function Y(){}var z=(X.prototype.OnClose=function(t){this.onClose.emit(t)},X.decorators=[{type:i.Component,args:[{selector:"mg-base-alert",template:"",styles:[""]}]}],X.propDecorators={title:[{type:i.Input}],message:[{type:i.Input}],onClose:[{type:i.Output}]},X);function X(){this.onClose=new i.EventEmitter}var K=(q.prototype.OnClose=function(){this.onClose.emit()},q.decorators=[{type:i.Component,args:[{selector:"mg-base-alert",template:"",styles:[""]}]}],q.propDecorators={title:[{type:i.Input}],message:[{type:i.Input}],onClose:[{type:i.Output}]},q);function q(){this.onClose=new i.EventEmitter}var $=(J.prototype.ngOnInit=function(){var t,e=this,n=this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);null==n?null!=(t=this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName))?this.loader.load(t.modulePath+"#"+t.moduleName).then(function(t){n=t.create(e.injector),e.loadComponent(n)}):this.loadComponent(null):this.loadComponent(n)},J.prototype.loadComponent=function(t){var e=this;this.Parameters.ModalComp=this.componentListMagicService.getComponent(this.Parameters.MagicFormName,!l.isNullOrUndefined(this.Parameters.MagicFormName)),n=(null!=t?t:this).componentFactoryResolver.resolveComponentFactory(this.Component);var t=this.overlayContentViewContainerRef.createComponent(n),n=J.allowedBaseComps.get(this.OverlayTypeParam);t.instance instanceof n.comp?(Object.assign(t.instance,this.Parameters),t.instance.onClose.subscribe(function(t){e.onClose.emit(t)})):(n="Provided window container should subclass of : "+n.error+"window will not work properly.",alert(n))},J.prototype.setViewContainerRef=function(t){this.overlayContentViewContainerRef=t},J.prototype.GetRootElement=function(){return this.overlayContainerWrapperElementRef.nativeElement},J.prototype.DetectChanges=function(){this.changeDetectorRef.detectChanges()},J.allowedBaseComps=new Map([[m.OverlayType.Overlay,{comp:G,error:"BaseMagicOverlayContainer . Overlay "}],[m.OverlayType.Alert,{comp:K,error:"BaseMagicAlertComponent. Alert "}],[m.OverlayType.ConfirmationBox,{comp:z,error:"BaseMagicConfirmComponent. Confirmation "}]]),J.decorators=[{type:i.Component,args:[{selector:"app-magic-overlay-container-wrapper",template:'\n <div>\n <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" magicFocus></div>\n <div class="overlay-container-wrapper-background" #overlayContainerWrapper>\n <div #overlayContent magicViewContainerRef>\n </div>\n </div>\n <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" ></div>\n </div>\n ',styles:["\n .overlay-container-wrapper-background {\n /* modal background fixed across whole screen */\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "]}]}],J.ctorParameters=function(){return[{type:x},{type:i.NgModuleFactoryLoader},{type:i.Injector},{type:i.ComponentFactoryResolver},{type:i.ChangeDetectorRef}]},J.propDecorators={Component:[{type:i.Input}],Parameters:[{type:i.Input}],OverlayTypeParam:[{type:i.Input}],onClose:[{type:i.Output}],overlayContainerWrapperElementRef:[{type:i.ViewChild,args:["overlayContainerWrapper",{"static":!0}]}]},J);function J(t,e,n,o,r){this.componentListMagicService=t,this.loader=e,this.injector=n,this.componentFactoryResolver=o,this.changeDetectorRef=r,this.Component=null,this.Parameters={},this.onClose=new i.EventEmitter}var Q,Z=(C(tt,Q=K),tt.decorators=[{type:i.Component,args:[{selector:"sample-magic-alert-component",template:'<div>\n <div class="mg-message-background">\n <h2> {{title}}</h2>\n <p>{{message}} </p>\n\n <button (click)="OnClose()">OK</button>\n </div>\n </div>',styles:["\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n "]}]}],tt);function tt(){return null!==Q&&Q.apply(this,arguments)||this}var et,nt=(C(ot,et=z),ot.decorators=[{type:i.Component,args:[{selector:"sample-magic-confirmation-box",template:'<div>\n <div class="mg-message-background">\n <h2> {{title}}</h2>\n {{message}}\n <br>\n <br>\n\n <button (click)="OnClose(true)">OK</button>\n <button class="cancel" (click)="OnClose(false)">Cancel</button>\n </div>\n </div>',styles:["\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n \n button.cancel {\n background-color: #C1C1C1;\n }\n "]}]}],ot);function ot(){return null!==et&&et.apply(this,arguments)||this}var rt=(it.prototype.showDefaultConfirmations=function(){return!0},it.prototype.getAlertComponent=function(){return Z},it.prototype.getConfirmtionComponent=function(){return nt},it.decorators=[{type:i.Injectable}],it);function it(){}var at=(st.isConfirmBox=function(t){t&=15;return t===m.Styles.MSGBOX_BUTTON_OK_CANCEL||t===m.Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE||t===m.Styles.MSGBOX_BUTTON_YES_NO_CANCEL||t===m.Styles.MSGBOX_BUTTON_YES_NO||t===m.Styles.MSGBOX_BUTTON_RETRY_CANCEL},st.convertToExcpectedResultBox=function(t,e){var n=15&t,t=m.Styles.MSGBOX_RESULT_OK;return n===m.Styles.MSGBOX_BUTTON_OK?t=m.Styles.MSGBOX_RESULT_OK:n===m.Styles.MSGBOX_BUTTON_OK_CANCEL?t=e?m.Styles.MSGBOX_RESULT_OK:m.Styles.MSGBOX_RESULT_CANCEL:n===m.Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE?t=e?m.Styles.MSGBOX_RESULT_ABORT:m.Styles.MSGBOX_RESULT_RETRY:n===m.Styles.MSGBOX_BUTTON_YES_NO_CANCEL||n===m.Styles.MSGBOX_BUTTON_YES_NO?t=e?m.Styles.MSGBOX_RESULT_YES:m.Styles.MSGBOX_RESULT_NO:n===m.Styles.MSGBOX_BUTTON_RETRY_CANCEL&&(t=e?m.Styles.MSGBOX_RESULT_RETRY:m.Styles.MSGBOX_RESULT_CANCEL),t},st.showConfirmationBox=function(t,e,n){m.Styles.MSGBOX_RESULT_OK;e=t+"\n\n"+e;return this.isConfirmBox(n)?confirm(e):(alert(e),!0)},st);function st(){}var ct=(lt.prototype.init=function(t,e){this.overlayWindowsContainerViewRef=t,this.overlayWindowFocusManager=new ut(e)},lt.prototype.open=function(t,e,n){var o=this,r=null!=this.componentList.lazyLoadModulesMap&&this.componentList.lazyLoadModulesMap.hasOwnProperty(t)?null:this.componentList.getComponent(t),n={taskIdParam:e,taskDescription:n};this.createModalComponent({MagicFormName:t,ModalComp:r,ModalCompParameters:n},this.overlayContainerMagicProvider.getComponent(),m.OverlayType.Overlay).instance.onClose.subscribe(function(){var t=a.getGuiEventObj("close",null,0);t.TaskID=e,o.engineMagicService.insertEvent(t)})},lt.prototype.close=function(t){this.overlayWindowsContainerViewRef.remove(),this.overlayWindowFocusManager.popDialog();var e=a.getGuiEventObj("dispose",null,0);e.TaskID=t,this.engineMagicService.insertEvent(e)},lt.prototype.openConfirmationBox=function(t,e,n){var o,r,i=this;this.confirmationComponentsMagicProvider.showDefaultConfirmations()?(r=at.showConfirmationBox(t,e,n),this.finishConfirmation(n,r)):(o=at.isConfirmBox(n)?this.confirmationComponentsMagicProvider.getConfirmtionComponent():this.confirmationComponentsMagicProvider.getAlertComponent(),r=at.isConfirmBox(n)?m.OverlayType.ConfirmationBox:m.OverlayType.Alert,this.createModalComponent({title:t,message:e},o,r).instance.onClose.subscribe(function(t){i.overlayWindowsContainerViewRef.remove(),i.overlayWindowFocusManager.popDialog(),i.finishConfirmation(n,t)}))},lt.prototype.finishConfirmation=function(t,e){var n=a.getGuiEventObj("confirmationClosed",null,0);n.keyCode=at.convertToExcpectedResultBox(t,e),this.engineMagicService.insertEvent(n)},lt.prototype.createModalComponent=function(t,e,n){var t={Component:e,Parameters:t,OverlayTypeParam:n},n=this.componentFactoryResolver.resolveComponentFactory($),n=this.overlayWindowsContainerViewRef.createComponent(n);return Object.assign(n.instance,t),this.overlayWindowFocusManager.pushDialog(n.instance.GetRootElement()),n.instance.DetectChanges(),n},lt.decorators=[{type:i.Injectable}],lt.ctorParameters=function(){return[{type:i.ComponentFactoryResolver},{type:x},{type:D},{type:W},{type:rt}]},lt);function lt(t,e,n,o,r){this.componentFactoryResolver=t,this.componentList=e,this.engineMagicService=n,this.overlayContainerMagicProvider=o,this.confirmationComponentsMagicProvider=r,this.overlayWindowFocusManager=null}var ut=(pt.prototype.pushDialog=function(t){0===this.openDialogList.length&&(this.focusListener=this.trapFocus.bind(this),document.addEventListener("focus",this.focusListener,!0)),this.openDialogList.push(new mt(t,document.activeElement instanceof HTMLElement?document.activeElement:null))},pt.prototype.popDialog=function(){var t=this.openDialogList.pop();this.attemptFocus(t.FocusElementOnClose),0===this.openDialogList.length&&(document.removeEventListener("focus",this.focusListener,!0),this.focusListener=null)},pt.prototype.trapFocus=function(t){var e;this.ignoreUtilFocusChanges||0<this.openDialogList.length&&((e=this.openDialogList[this.openDialogList.length-1].RootElement).contains(t.target)?this.lastFocus=t.target:(this.rootMagicElement.contains(t.target)&&(this.focusFirstDescendant(e),this.lastFocus==document.activeElement&&this.focusLastDescendant(e)),this.lastFocus=document.activeElement))},pt.prototype.focusFirstDescendant=function(t){for(var e=0;e<t.childNodes.length;e++){var n=t.childNodes[e];if(this.attemptFocus(n)||this.focusFirstDescendant(n))return!0}return!1},pt.prototype.focusLastDescendant=function(t){for(var e=t.childNodes.length-1;0<=e;e--){var n=t.childNodes[e];if(this.attemptFocus(n)||this.focusLastDescendant(n))return!0}return!1},pt.prototype.attemptFocus=function(t){if(!this.isFocusable(t))return!1;this.ignoreUtilFocusChanges=!0;try{t.focus()}catch(e){}return this.ignoreUtilFocusChanges=!1,document.activeElement===t},pt.prototype.isFocusable=function(t){if(l.isNullOrUndefined(t))return!1;if(0<t.tabIndex||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.tabIndex<0)return!1;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!=t.rel;case"INPUT":return"hidden"!=t.type&&"file"!=t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},pt);function pt(t){this.rootMagicElement=null,this.openDialogList=new Array(0),this.ignoreUtilFocusChanges=!1,this.lastFocus=null,this.focusListener=null,this.rootMagicElement=t}var mt=(Object.defineProperty(dt.prototype,"RootElement",{get:function(){return this.rootElement},enumerable:!0,configurable:!0}),Object.defineProperty(dt.prototype,"FocusElementOnClose",{get:function(){return this.focusElementOnClose},enumerable:!0,configurable:!0}),dt);function dt(t,e){this.rootElement=t,this.focusElementOnClose=e}var ht=(gt.prototype.getIsLoggenIn=function(){return this.magic.getIsLoggedIn()},Object.defineProperty(gt.prototype,"taskId",{get:function(){return this._taskId},set:function(t){this._taskId=t},enumerable:!0,configurable:!0}),Object.defineProperty(gt.prototype,"ScreenControlsData",{get:function(){return this.Records.list[0]},enumerable:!0,configurable:!0}),gt.prototype.settemplate=function(t){this.template=t},gt.prototype.buildScreenModeControls=function(){var t,e,n=new s.FormGroup({});for(t in this.template)"0"==this.template[t]&&(e=new s.FormControl(""),this.setStubValue(0,e,t),n.addControl(t,e));this.ScreenModeControls=n},gt.prototype.isTableControl=function(t){return"1"==this.template[t]},gt.prototype.getMgInputDateFormat=function(){return this.mgInputDateFormat},gt.prototype.getFormControl=function(t,e){var n,t=this.isTableControl(e)?this.formGroups[t]:this.ScreenModeControls;return l.isNullOrUndefined(t)||(t.get(e),n=t.controls[e]),n},gt.prototype.setInputTextValue=function(t,e,n){this.setValue(t,e,this.ConvertValToNative(t,0,n));t=this.getFormControl(e,t);l.isNullOrUndefined(n)||t.setValue(n)},gt.prototype.buildTableRowControls=function(t){var e,n,o=new s.FormGroup({});for(e in this.template)"1"==this.template[e]&&(n=new s.FormControl(""),this.setStubValue(t,n,e),o.addControl(e,n));this.formGroups[t]=o},gt.prototype.updateRecordsBeforeCurrentView=function(t){this.Records.recordsBeforeCurrentView=t},gt.prototype.setIncludesFirst=function(t){this.Records.includesFirst=t},gt.prototype.setIncludesLast=function(t){this.Records.includesLast=t},gt.prototype.markRowAsCreated=function(t){this.Records.markRowAsCreated(t)},gt.prototype.markRowAsNotCreated=function(t){this.Records.markRowAsNotCreated(t)},gt.prototype.startRowEditing=function(t){this.Records.startRowEditing(t)},gt.prototype.stopRowEditing=function(t){this.Records.stopRowEditing(t)},gt.prototype.isRowInRowEditing=function(t){return this.Records.isRowInRowEditing(t)},gt.prototype.setIsEmptyDataView=function(t){this.Records.isEmptyDataView!==t&&(this.Records.isEmptyDataView=t,this.tableService.refreshDataSource(),this.refreshView())},gt.prototype.initTask=function(t,e){var n=this;this.Records.createFirst(),this.oldPageSize=0,this.IsStub()?this.loadData():(this.taskId=t,this.settemplate(e)),this.buildScreenModeControls(),l.isNullOrUndefined(this.subscribeRefreshDom)||this.subscribeRefreshDom.unsubscribe(),l.isNullOrUndefined(this.subscribeInteractiveCommands)||this.subscribeInteractiveCommands.unsubscribe(),this.subscribeRefreshDom=this.magic.refreshDom.pipe(r.filter(function(t){return t.TaskTag===n.taskId})).subscribe(function(t){n.executeCommand(t)}),this.subscribeInteractiveCommands=this.magic.interactiveCommands.pipe(r.filter(function(t){return t.TaskTag===n.taskId})).subscribe(function(t){n.executeInteractiveCommand(t)})},gt.prototype.refreshView=function(){this.detectChanges.next("")},gt.prototype.insertEvent=function(t){t.TaskID=this.taskId,this.magic.insertEvent(t)},gt.prototype.GetControlPictureMask=function(t){return this.magic.GetControlPictureMask(this.taskId,t)},gt.prototype.ValidateControlValue=function(t,e){return this.magic.ValidateControlValue(this.taskId,t,e)},gt.prototype.GetRangedValue=function(t,e){return this.magic.GetRangedValue(this.taskId,t,e)},gt.prototype.GetFldRanges=function(t){return this.magic.GetFldRanges(this.taskId,t)},gt.prototype.getProperty=function(t,e,n){if(l.isNullOrUndefined(n)&&(n="0"),this.IsStub())return this.getPropertyStub(this.Records.list[n],t,e);var o=this.Records.list[n];return l.isNullOrUndefined(o)?void 0:this.Records.list[n].getProperty(t,e)},gt.prototype.getPropertyStub=function(t,e,n){return e in(t=t.ControlsProperties)&&n in t[e].properties?t[e].properties[n]:""},gt.prototype.getStyleStub=function(t,e,n){return(t=t.ControlsProperties)[e].stylesMap.get(n)},gt.prototype.getClasses=function(t,e){return l.isNullOrUndefined(e)&&(e="0"),this.Records.list[e].getControlMetadata(t).classes},gt.prototype.getStyle=function(t,e,n){if(l.isNullOrUndefined(n)&&(n="0"),this.IsStub())return this.getStyleStub(this.Records.list[n],t,e);t=this.Records.list[n].getControlMetadata(t).stylesMap.get(e);return L.magicValueGetStyle(e,t)},gt.prototype.getValue=function(t,e){return l.isNullOrUndefined(e)&&(e="0"),this.Records.list.length>+e?this.Records.list[e].values[t]:""},gt.prototype.setValue=function(t,e,n){return this.Records.list[e].setValue(t,n)},gt.prototype.executeInteractiveCommand=function(t){N.executeInteractiveCommand(this,t,this.overlayWindowService),this.interactiveCommands.next(t)},gt.prototype.handleSetProperty=function(t,e){var n=t.CtrlName,o=t.line||0,o=this.getGuiRowId(o,e);t.Operation===m.HtmlProperties.SelectedRow?t.obj1!==m.GuiConstants.NO_ROW_SELECTED&&(o=this.getGuiRowId(t.obj1,!0),this.Records.list[o].getControlMetadata(n).properties.set(t.Operation,t.line),this.tableService.selectRow(o.toString()),this.OnSelectedRowChanged.emit(o.toString())):(t.Operation===m.HtmlProperties.Enabled&&(e=this.getFormControl(o.toString(),n),l.isNullOrUndefined(e)||(t.obj1?e.enable():e.disable())),this.Records.list[o].getControlMetadata(n).properties.set(t.Operation,t.obj1))},gt.prototype.executeCommand=function(t){var e=t.line||0,n=0,o=t.CtrlName,r=this.isTableControl(o);switch(null!==t.obj&&(r=r||t.obj.IsTableChild),n=this.getGuiRowId(e,r),t.CommandType){case m.CommandType.SET_IS_LOGGED_IN:break;case m.CommandType.SET_TABLE_TOP_INDEX:this.tableService.setTableTopIndex(t.number);break;case m.CommandType.REFRESH_TASK:this.tableService.refreshDataSource(),this.refreshView();break;case m.CommandType.SET_TABLE_ITEMS_COUNT:l.isUndefined(t.number)||this.tableService.updateTableSize(t.number);break;case m.CommandType.SET_RECORDS_BEFORE_CURRENT_VIEW:this.updateRecordsBeforeCurrentView(t.number);break;case m.CommandType.CREATE_TABLE_ROW:n=this.getGuiRowId(t.number,!0),this.buildTableRowControls(n),this.markRowAsCreated(n);break;case m.CommandType.SET_IS_ROW_EDITING:n=this.getGuiRowId(t.line,t.value),this.startRowEditing(n);break;case m.CommandType.SET_NOT_IS_ROW_EDITING:n=this.getGuiRowId(t.line,t.value),this.stopRowEditing(n);break;case m.CommandType.UNDO_CREATE_TABLE_ROW:this.markRowAsNotCreated(this.getGuiRowId(t.number,!0));break;case m.CommandType.SET_TABLE_INCLUDES_FIRST:this.setIncludesFirst(t.Bool1);break;case m.CommandType.SET_TABLE_INCLUDES_LAST:this.setIncludesLast(t.Bool1);break;case m.CommandType.SET_PROPERTY:this.handleSetProperty(t,r);break;case m.CommandType.PROP_SET_USER_PROPERTY:(a=this.Records.list[n].getControlMetadata(o)).userProperties.get(t.Operation)!==t.obj1&&(a.userProperties.set(t.Operation,t.obj1),this.customPropertiesSubject.next({propertyName:o+"~"+t.Operation,value:t.obj1,rowId:n}));break;case m.CommandType.PROP_SET_CUSTOM_VALIDATOR:a=this.Records.list[n].getControlMetadata(o);var i=this.getFormControl(n.toString(),o);null!=i&&(a.customValidators.set(t.Operation,t.obj1),null!=i.validator?i.setValidators([i.validator,this.customValidator(n.toString(),o)]):i.setValidators(this.customValidator(n.toString(),o)));break;case m.CommandType.SET_CLASS:(a=this.Records.list[n].getControlMetadata(o)).setClass(t.Operation,t.obj1);break;case m.CommandType.SET_STYLE:(a=this.Records.list[n].getControlMetadata(o)).setStyle(t.Operation,t.obj1);break;case m.CommandType.SET_ATTRIBUTE:(a=this.Records.list[n].getControlMetadata(o)).dataType=String.fromCharCode(t.number);break;case m.CommandType.SET_VALUE:this.Records.list[n].values[o]=t.value;var a=this.getFormControl(n.toString(),o);l.isNullOrUndefined(a)||a.setValue(this.ConvertValFromNative(o,t.line,t.value));break;case m.CommandType.CREATE_SUB_FORM:this.mgSubformService.addSubformComp(t.CtrlName,t.userDropFormat.toString(),t.str,t.fileName,t.contextID,t.params,t.Bool1);break;case m.CommandType.CLOSE_SUB_FORM:this.mgSubformService.deleteSubformComp(t.CtrlName,t.userDropFormat.toString());break;case m.CommandType.SET_EMPTY_DATAVIEW:this.setIsEmptyDataView(t.Bool1)}this.refreshDom.next(t)},gt.prototype.customValidator=function(l,u){var p=this;return function(t){var e,n,o,r=p.Records.list[l].getControlMetadata(u);try{for(var i=S(r.customValidators.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;if(!r.customValidators.get(s).isValid())return(o={})[s]=!0,o}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}return null}},gt.prototype.ConvertValToNative=function(t,e,n){switch(this.Records.list[0].getControlMetadata(t).dataType){case u.StorageAttribute.BOOLEAN:if("string"!=typeof n)return n;var o=this.GetFldRanges(t),r=o.indexOf(","),i=o.substr(0,r),a=o.substr(r+1);return!!p.NString.Equals(n,i,!0)||!p.NString.Equals(n,a,!0)&&n;case u.StorageAttribute.TIME:if("string"!=typeof n)return n;o=n.indexOf(":",0),r=+n.substr(0,o),i=+n.substr(o+1,2),a=0;5<n.length&&0<=(o=n.indexOf(":",o+1))&&(a=+n.substr(o+1,2)),0<n.indexOf("PM")&&(r+=12);o=new Date;return o.setHours(r),o.setMinutes(i),o.setSeconds(a),o;case u.StorageAttribute.NUMERIC:return null===n?0:n;default:return n}},gt.prototype.ConvertValFromNative=function(t,e,n){switch(this.Records.list[0].getControlMetadata(t).dataType){case u.StorageAttribute.TIME:if(n instanceof Date){var o=new p.StringBuilder,r=9<n.getHours()?"{0}":"0{0}";return o.AppendFormat(r,n.getHours().toString()),o.Append(":"),r=9<n.getMinutes()?"{0}":"0{0}",o.AppendFormat(r,n.getMinutes().toString()),0<n.getSeconds()&&(o.Append(":"),r=9<n.getSeconds()?"{0}":"0{0}",o.AppendFormat(r,n.getSeconds().toString())),o.ToString()}return n;case u.StorageAttribute.BOOLEAN:var i=this.Records.list[0].getControlMetadata(t);if("boolean"==typeof n&&i.rangeValidator){r=this.GetFldRanges(t),o=r.indexOf(","),i=r.substr(0,o),o=r.substr(o+1);return n?i:o}return n;default:return n}},gt.prototype.resize=function(t,e){var n=a.getGuiEventObj("resize","table",0);n.PageSize=t,n.Line=e,this.insertEvent(n)},gt.prototype.onScrollDown=function(){var t;this.Records.includesLast||((t=a.getGuiEventObj("getRows","table",0)).Line=this.formGroups.length,this.insertEvent(t))},gt.prototype.setTitle=function(t){this.mgTitleService.setTitle(t)},gt.prototype.getGuiRowId=function(t,e){return e?t+this.Records.recordsBeforeCurrentView:0},gt.prototype.getDvRowId=function(t){return t-this.Records.recordsBeforeCurrentView},gt.prototype.dispose=function(){this.refreshDom.complete(),this.detectChanges.complete(),this.subscribeInteractiveCommands.unsubscribe(),this.subscribeRefreshDom.unsubscribe(),this.interactiveCommands.complete(),this.customPropertiesSubject.complete(),this.OnSelectedRowChanged.complete()},gt.prototype.onComboboxSelectionChanged=function(t,e,n){n=a.getGuiEventObj("selectionchanged",e,n);if("number"==typeof t)n.Value=t;else if(l.isNullOrUndefined(t.target))n.Value=t.value;else{for(var o=new Array(t.target.selectedOptions.length),r=0;r<t.target.selectedOptions.length;r++)o[r]=t.target.selectedOptions[r].index;n.Value=o.join(",")}this.insertEvent(n)},gt.prototype.onListBoxSelectionChanged=function(t,e){for(var e=a.getGuiEventObj("selectionchanged",e,0),n=l.isNullOrUndefined(t.target)?t.source.selectedOptions.selected:t.target.selectedOptions,o=n.length,r=new Array(o),i=0;i<o;i++)l.isNullOrUndefined(t.target)?r[i]=n[i].value:r[i]=n[i].index;e.Value=r,this.insertEvent(e)},gt.prototype.onCheckChanged=function(t,e,n){void 0===n&&(n=0);n=a.getGuiEventObj("selectionchanged",e,n);"boolean"==typeof t?n.Value=t:"undefined"==typeof t.target?n.Value=t.checked:n.Value=t.target.checked,this.insertEvent(n)},gt.prototype.mgOnTabSelectionChanged=function(t,e){t=a.getGuiEventObj("selectionchanged",t,0);t.Value=e.toString(),this.insertEvent(t)},gt.prototype.mgOnRadioSelectionChanged=function(t,e){var n=this.getFormControl("0",e),e=a.getGuiEventObj("selectionchanged",e,0);"string"!=typeof n.value?e.Value=n.value.index:e.Value=n.value,this.insertEvent(e)},gt.prototype.close=function(){this.insertEvent(a.getGuiEventObj("close",null,0))},gt.prototype.IsStub=function(){return this.magic.isStub},gt.prototype.saveData=function(t){this.magic.saveData(t)},gt.prototype.createData=function(){var t={records:this.Records,template:this.template},t="loadData():any {\n let stubData = "+JSON.stringify(t)+";\n this.loadStubData(stubData);}";console.log(t),this.saveData(t)},gt.prototype.loadStubData=function(t){this.Records=t.records,this.settemplate(t.template),this.taskId="1";for(var e=0;e<this.Records.list.length;e++)this.buildTableRowControls(e)},gt.prototype.loadData=function(){alert("Please, overwrite method loadData")},gt.prototype.setStubValue=function(t,e,n){if(this.IsStub())try{var o=this.Records.list[t].values[n];e.setValue(o)}catch(r){}},gt.decorators=[{type:i.Injectable}],gt.ctorParameters=function(){return[{type:D},{type:ct}]},gt);function gt(t,e){this.magic=t,this.overlayWindowService=e,this.Records=new P,this.formGroups=[],this.refreshDom=new o.Subject,this.detectChanges=new o.Subject,this.interactiveCommands=new o.Subject,this.OnSelectedRowChanged=new i.EventEmitter,this.customPropertiesSubject=new o.Subject,this.oldPageSize=0,this.Records.setGuiTopIndex(0),this.mgInputDateFormat=null}var ft=(yt.prototype.ngOnInit=function(){var e=this;this.rowChangedSubscriber=this._task.OnSelectedRowChanged.pipe(r.filter(function(t){return t===e.rowId})).subscribe(function(t){e.isInView(e.htmlElement)||e.htmlElement.scrollIntoView()})},yt.prototype.isInView=function(t){var e=t.getBoundingClientRect(),t=t.parentElement.getBoundingClientRect();return e.top>=t.top&&e.bottom<=t.bottom},yt.prototype.ngOnDestroy=function(){null!==this.rowChangedSubscriber&&this.rowChangedSubscriber.unsubscribe()},yt.prototype.onClick=function(t){""!=this.rowId&&(this._task.insertEvent(a.getGuiEventObj("click","magicRow",+this.rowId)),event.cancelBubble=!0)},yt.decorators=[{type:i.Directive,args:[{selector:"[magicRow]"}]}],yt.ctorParameters=function(){return[{type:ht},{type:i.ElementRef}]},yt.propDecorators={rowId:[{type:i.Input,args:["magicRow"]}],onClick:[{type:i.HostListener,args:["click",["$event"]]}]},yt);function yt(t,e){this._task=t,this.element=e,this.rowChangedSubscriber=null,this.htmlElement=this.element.nativeElement}var vt=(Object.defineProperty(Ct.prototype,"magic",{set:function(t){this.id=t,this.selector="magic"},enumerable:!0,configurable:!0}),Object.defineProperty(Ct.prototype,"eventsOnly",{set:function(t){console.log("eventsOnly"),this.eventsOnlyVal=!0},enumerable:!0,configurable:!0}),Object.defineProperty(Ct.prototype,"task",{get:function(){return this._task},enumerable:!0,configurable:!0}),Ct.prototype.regEvents=function(){var o=this;this.eventHandlers.focusin=this.OnFocus.bind(this),Object.keys(this.eventHandlers).forEach(function(t){o.focusUnlistener=o.renderer.listen(o.htmlElement,t,o.eventHandlers[t])});["click","mousedown","dblclick"].forEach(function(e){o.renderer.listen(o.htmlElement,e,function(t){o.task.insertEvent(a.getGuiEventObj(e,o.id,+o.rowId)),t.cancelBubble=!0})}),this.renderer.listen(this.htmlElement,"change",function(t){var e=a.getGuiEventObj("selectionchanged",o.id,+o.rowId);event.target.selectedIndex!==undefined&&(e.Value=event.target.selectedIndex.toString(),t.cancelBubble=!0,o.task.insertEvent(e))}),e.fromEvent(this.htmlElement,"input").pipe(r.map(function(t){return t.target.value}),r.debounceTime(200)).subscribe(function(t){var e;o.task.getProperty(o.id,m.HtmlProperties.BindingLevel,o.rowId)!==u.BindingLevel.Character||(e=o.task.Records.list[0].getControlMetadata(o.id).dataType)!==u.StorageAttributeType.Date&&e!=u.StorageAttributeType.Time&&o.task.mgAccessorService.setValueToControl(o.id,t,!0)}),this.renderer.listen(this.htmlElement,"keydown",function(t){var e=a.getGuiEventObj("keydown",o.id,+o.rowId);e.modifiers=m.Modifiers.MODIFIER_NONE,t.altKey&&t.keyCode!==m.GuiConstants.KEY_ALT?e.modifiers=m.Modifiers.MODIFIER_ALT:t.ctrlKey&&t.keyCode!==m.GuiConstants.KEY_CTRL&&(e.modifiers=m.Modifiers.MODIFIER_CTRL);var n=t.keyCode===m.GuiConstants.KEY_PG_UP||t.keyCode===m.GuiConstants.KEY_PG_DOWN||t.keyCode===m.GuiConstants.KEY_LEFT||t.keyCode===m.GuiConstants.KEY_RIGHT||t.keyCode===m.GuiConstants.KEY_UP||t.keyCode===m.GuiConstants.KEY_DOWN||t.keyCode===m.GuiConstants.KEY_ESC||t.keyCode===m.GuiConstants.KEY_HOME||t.keyCode===m.GuiConstants.KEY_END||t.keyCode===m.GuiConstants.KEY_RETURN||t.keyCode>=m.GuiConstants.KEY_F1&&t.keyCode<=m.GuiConstants.KEY_F12;e.modifiers===m.Modifiers.MODIFIER_NONE&&!n||(e.keyCode=t.keyCode,t.keyCode===m.GuiConstants.KEY_ESC&&(t.keyCode!==m.GuiConstants.KEY_ESC||Ct.opened)||(t.cancelBubble=!0),o.task.insertEvent(e))})},Ct.prototype.OnFocus=function(){this.task.insertEvent(a.getGuiEventObj("focus",this.id,+this.rowId)),event.cancelBubble=!0},Ct.prototype.IsSameElement=function(t){var e=t.line;return this.task.isTableControl(t.CtrlName)&&(e=this.task.getGuiRowId(e,!0)),t.CtrlName===this.id&&(e===+this.rowId||0===e&&l.isNullOrUndefined(this.rowId))},Ct.prototype.IsSameComponent=function(t){return t.controlName===this.id},Ct.prototype.regUpdatesUI=function(){var o=this;this.subscribeRefreshDom=this.task.refreshDom.pipe(r.filter(function(t){return o.IsSameElement(t)})).subscribe(function(t){var e=t;l.isNullOrUndefined(o.rowId)&&(o.rowId="0");try{o.eventsOnlyVal||o.handleCommand(e)}catch(n){console.dir(n)}}),this.subscribeInteractiveCommands=this.task.interactiveCommands.pipe(r.filter(function(t){return o.IsSameComponent(t)})).subscribe(function(t){o.handleInteractiveCommands(t)})},Ct.prototype.ngOnInit=function(){this.regEvents(),this.regUpdatesUI()},Ct.prototype.handleCommand=function(t){switch(t.CommandType){case m.CommandType.SET_PROPERTY:this.handleSetProperty(t);break;case m.CommandType.SET_FOCUS:this.focusUnlistener(),this.htmlElement.focus(),this.focusUnlistener=this.renderer.listen(this.htmlElement,"focusin",this.eventHandlers.focusin)}},Ct.prototype.handleInteractiveCommands=function(t){if(t._commandType===m.InteractiveCommandType.CALL_JS){var e=t._str,n=t.arguments,o=this.vcRef._view.component,r="";try{l.isNullOrUndefined(o[e])?console.error("Instance method "+e+" does not exists"):r=o[e].apply(o,n)}catch(i){console.error(i.message)}t.resultString=r}},Ct.prototype.handleSetProperty=function(t){t.Operation===m.HtmlProperties.ReadOnly&&(1!=t.obj1?this.renderer.removeAttribute(this.htmlElement,t.Operation):this.renderer.setAttribute(this.htmlElement,t.Operation,t.str))},Ct.prototype.ngOnDestroy=function(){this.subscribeRefreshDom.unsubscribe()},Ct.opened=!1,Ct.decorators=[{type:i.Directive,args:[{selector:"[magic]"}]}],Ct.ctorParameters=function(){return[{type:ht},{type:i.ElementRef},{type:i.Renderer2},{type:i.ViewContainerRef},{type:ft,decorators:[{type:i.Optional}]}]},Ct.propDecorators={magic:[{type:i.Input,args:["magic"]}],eventsOnly:[{type:i.Input,args:["eventsOnly"]}],rowId:[{type:i.Input}]},Ct);function Ct(t,e,n,o,r){this._task=t,this.element=e,this.renderer=n,this.vcRef=o,this.magicRow=r,this.eventHandlers={},this.eventsOnlyVal=!1,this.htmlElement=this.element.nativeElement,null!=r&&(this.rowId=r.rowId)}var bt,Et=(C(St,bt=vt),Object.defineProperty(St.prototype,"magic",{set:function(t){this.id=t,this.selector="magicnc"},enumerable:!0,configurable:!0}),St.prototype.regEvents=function(){var n=this;if(bt.prototype.regEvents.call(this),this.htmlElement instanceof HTMLSelectElement&&this.htmlElement.addEventListener("change",function(t){var e=a.getGuiEventObj("selectionchanged",n.id,0);e.Value=event.target.selectedIndex.toString(),n.task.insertEvent(e)}),this.isRadio()&&this.htmlElement.addEventListener("change",function(t){n.task.getFormControl("0",n.id);var e=a.getGuiEventObj("selectionchanged",n.id,0);e.Value=t.target.value,n.task.insertEvent(e)}),this.isTabControl())for(var t=this.htmlElement.children[0],e=a.getGuiEventObj("selectionchanged",this.id,0),o=0;o<t.children.length;o++)t.children[o].addEventListener("click",function(t){e.Value=(t.currentTarget.getAttribute("layer")-1).toString(),n.task.insertEvent(e)})},St.prototype.isTabControl=function(){return this.htmlElement instanceof HTMLDivElement&&"magicTabControl"===this.htmlElement.children[0].getAttribute("magicMark")},St.prototype.isRadio=function(){return this.htmlElement instanceof HTMLDivElement&&"magicRadio"===this.htmlElement.children[0].getAttribute("magicMark")},St.prototype.handleCommand=function(t){switch(bt.prototype.handleCommand.call(this,t),t.CommandType){case m.CommandType.SET_CLASS:var e=this._task.Records.list[0].getControlMetadata(this.id);""!=e.removedClass&&(this.htmlElement.classList.remove(e.removedClass),e.removedClass=""),this.htmlElement.classList.add(t.obj1);break;case m.CommandType.SET_VALUE:this.htmlElement instanceof HTMLLabelElement&&(this.htmlElement.innerText=t.value),this.htmlElement instanceof HTMLSelectElement&&(this.htmlElement.value=t.value),this.htmlElement instanceof HTMLAnchorElement&&(this.htmlElement.text=t.value),this.htmlElement instanceof HTMLInputElement&&("checkbox"===this.htmlElement.type?this.htmlElement.checked=t.value:this.htmlElement.value=t.value),this.htmlElement instanceof HTMLButtonElement&&(this.htmlElement.innerHTML=t.value);break;case m.CommandType.SET_PROPERTY:this.handleSetProperty(t);break;case m.CommandType.SET_STYLE:var n=L.magicValueGetStyle(t.Operation,t.obj1),e=L.MagicPropertyToHtmlAttributeMap.get(t.Operation);this.htmlElement.setAttribute("style",e+":"+n)}},St.prototype.handleSetProperty=function(t){var e,n;switch(bt.prototype.handleSetProperty.call(this,t),t.Operation){case m.HtmlProperties.Text:this.htmlElement instanceof HTMLLabelElement&&(this.htmlElement.innerText=t.obj1);break;case m.HtmlProperties.Image:this.htmlElement instanceof HTMLImageElement?this.htmlElement.src=t.obj1:this.htmlElement.setAttribute("src",t.obj1);break;case m.HtmlProperties.ItemsList:if(this.htmlElement instanceof HTMLSelectElement){for(var o=this.htmlElement.length-1;0<=o;o--)this.htmlElement.remove(o);try{for(var r=S(t.obj1),i=r.next();!i.done;i=r.next()){var a=i.value,s=document.createElement("option");s.text=a.displayValue,s.value=a.index,this.htmlElement.add(s)}}catch(p){e={error:p}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}}else if(this.isTabControl()&&0<this.htmlElement.children.length)for(var c=this.htmlElement.children[0],o=0;o<c.children.length;o++)c.children[o]instanceof HTMLButtonElement&&(c.children[o].innerText=t.obj1[o].displayValue);break;case m.HtmlProperties.Visible:this.htmlElement.setAttribute("style","visibility:"+(t.obj1?"visible":"hidden"));break;case m.HtmlProperties.Enabled:!1===t.obj1?this.htmlElement.setAttribute("disabled","true"):this.htmlElement.removeAttribute("disabled");break;case m.HtmlProperties.TabIndex:this.htmlElement.setAttribute(t.Operation,t.obj1);break;case m.HtmlProperties.SelectedValue:if(this.htmlElement instanceof HTMLSelectElement)this.htmlElement.value=t.obj1;else if(this.isTabControl()&&0<this.htmlElement.children.length)for(c=this.htmlElement.children[0],o=0;o<c.children.length;o++){var l=c.children[o],u=l.getAttribute("layer")-1;l instanceof HTMLButtonElement?u==t.obj1?l.classList.add("tab_button_active"):l.classList.remove("tab_button_active"):(u=u==t.obj1?"display: inline":"display: none",l.setAttribute("style",u))}break;case m.HtmlProperties.PlaceHolder:this.htmlElement.setAttribute("placeholder",t.obj1);break;case m.HtmlProperties.Tooltip:this.htmlElement.setAttribute("title",t.obj1);break;case m.HtmlProperties.Password:!1===t.obj1?this.htmlElement.setAttribute("type","text"):this.htmlElement.setAttribute("type","password")}},St.decorators=[{type:i.Directive,args:[{selector:"[magicnc]"}]}],St.ctorParameters=function(){return[{type:ht},{type:i.ElementRef},{type:i.Renderer2},{type:i.ViewContainerRef},{type:ft,decorators:[{type:i.Optional}]}]},St.propDecorators={magic:[{type:i.Input,args:["magicnc"]}]},St);function St(t,e,n,o,r){return bt.call(this,t,e,n,o,r)||this}var Rt=(It.prototype.startCollecting=function(){var e=this;this.count++,u.Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.startCollecting() --- "+this.count),null===this.subscription&&(this.subscription=this.magic.refreshDom.subscribe(function(t){e.commands.push(t)}))},It.prototype.stopCollecting=function(){this.count--,u.Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.stopCollecting() --- "+this.count),0===this.count&&(this.subscription.unsubscribe(),this.subscription=null)},It.prototype.GetCommands=function(e){var n=this,t=this.commands.filter(function(t){return t.TaskTag===e});return t.forEach(function(t){n.commands.Remove(t)}),t},It.decorators=[{type:i.Injectable}],It.ctorParameters=function(){return[{type:D}]},It);function It(t){this.magic=t,this.count=0,this.commands=new p.List,this.subscription=null}var Tt=function(){},wt=(Mt.prototype.AddRouteCommand=function(t){this.pendingRouteCommands.push(t)},Mt.prototype.ExecuteNextCommand=function(){var t=this.pendingRouteCommands.shift();l.isNullOrUndefined(t)||t.callerMgSubformServiceRef.ExecuteRouteCommand(t)},Mt.decorators=[{type:i.Injectable}],Mt);function Mt(){this.pendingRouteCommands=[]}var kt=(Pt.decorators=[{type:i.Component,args:[{selector:"magic-module-entry",template:"<magic-route-outlet></magic-route-outlet>"}]}],Pt);function Pt(){}var Ot=(Dt.prototype.mgGetComp=function(t){if(t in this.subformsDict){t=this.subformsDict[t].formName;if(t)return this.componentList.getComponent(t)}return null},Dt.prototype.mgGetParameters=function(t){return t in this.subformsDict?this.subformsDict[t].parameters:""},Dt.prototype.deleteSubformComp=function(t,e){0<=Object.keys(this.subformsDict).indexOf(t)&&this.subformsDict[t].formName===e&&(this.subformsDict[t]={},this.task.refreshView())},Dt.prototype.addSubformComp=function(t,e,n,o,r,i,a){this.pendingCommandsCollector.startCollecting();var s=!1;l.isNullOrUndefined(r)?(0<=Object.keys(this.subformsDict).indexOf(t)&&this.subformsDict[t].formName===e&&(this.subformsDict[t]={},this.task.refreshView()),this.subformsDict[t]={formName:e,parameters:{taskIdParam:n,taskDescription:o}},s=!0):(a&&(t="primary"),(a=new p.List).push(r),null!==i&&(a=a.concat(i)),a={callerMgSubformServiceRef:this,routerOutletName:t,formName:e,parameters:{taskIdParam:n,taskDescription:o},routeParams:a},null===Dt.currentCallerMgSubformServiceRef?this.ExecuteRouteCommand(a):this.routerCommandsMagicService.AddRouteCommand(a)),s&&this.task.refreshView()},Dt.prototype.ExecuteRouteCommand=function(e){var t,n=e.callerMgSubformServiceRef,o=Dt.getRelativeRoute(n.activatedRoute);n.routesDict[e.routerOutletName]===e.routeParams[0]?n.router.navigate([{outlets:((t={})[e.routerOutletName]=null,t)}],{relativeTo:o}).then(function(t){(Dt.currentCallerMgSubformServiceRef=n).currentRouteDefinition={formName:e.formName,parameters:e.parameters},n.PerformRouterNavigate(e.routerOutletName,e.routeParams)}):((Dt.currentCallerMgSubformServiceRef=n).currentRouteDefinition={formName:e.formName,parameters:e.parameters},0<Dt.routerContainers.length?(o=Dt.routerContainers[0],Dt.routerContainers.shift(),o.initializeComponent()):n.PerformRouterNavigate(e.routerOutletName,e.routeParams))},Dt.prototype.PerformRouterNavigate=function(t,e){var n,o=Dt.getRelativeRoute(this.activatedRoute);this.router.navigate([{outlets:((n={})[t]=e,n)}],{relativeTo:o}).then(function(t){null===t||t||((t=Dt.currentCallerMgSubformServiceRef).currentRouteDefinition=null,Dt.currentCallerMgSubformServiceRef=null,t.pendingCommandsCollector.stopCollecting(),t.routerCommandsMagicService.ExecuteNextCommand())})},Dt.prototype.init=function(){var e=this,t=this.pendingCommandsCollector.GetCommands(this.task.taskId);0<t.length&&(t.forEach(function(t){e.task.executeCommand(t)}),this.task.refreshView()),this.pendingCommandsCollector.stopCollecting()},Dt.prototype.refreshView=function(){this.task.refreshView()},Dt.getRelativeRoute=function(t){return t.component==kt&&(t=t.parent),t},Dt.currentCallerMgSubformServiceRef=null,Dt.routerContainers=new Array,Dt.decorators=[{type:i.Injectable}],Dt.ctorParameters=function(){return[{type:ht},{type:n.ActivatedRoute},{type:x},{type:Rt},{type:n.Router},{type:wt}]},Dt);function Dt(t,e,n,o,r,i){this.task=t,this.activatedRoute=e,this.componentList=n,this.pendingCommandsCollector=o,this.router=r,this.routerCommandsMagicService=i,this.subformsDict={},this.routesDict={},this.currentRouteDefinition=null}var _t=(xt.prototype.ngOnInit=function(){this.activatedRoute.outlet;var t=Ot.currentCallerMgSubformServiceRef,e=Ot.getRelativeRoute(this.activatedRoute);null==t||null===t.currentRouteDefinition?(this.insertRouteEvent(e),Ot.routerContainers.push(this)):this.initializeComponent()},xt.prototype.insertRouteEvent=function(t){var e=a.getGuiEventObj("RouterNavigate",null,0);e.RouterPath=t.snapshot.routeConfig.path,"primary"!==t.snapshot.outlet&&(e.RouterOutletName=t.snapshot.outlet);t=t.routeConfig.path;if(0<t.length){var n=u.StrUtil.tokenize(t,"/:");e.RouterPath=n[0],e.RouterParams=new p.List;for(var o=1;o<n.length;o++)e.RouterParams.push(this.activatedRoute.snapshot.params[n[o]])}this.containerTaskService.insertEvent(e)},xt.prototype.initializeComponent=function(){var e,t,n,o=this,r=Ot.currentCallerMgSubformServiceRef;null!==r.currentRouteDefinition&&(t=this.componentList.getComponent(r.currentRouteDefinition.formName),t=this.componentFactoryResolver.resolveComponentFactory(t),this.componentRef=this.viewContainerRef.createComponent(t),Object.assign(this.componentRef.instance,r.currentRouteDefinition.parameters),e=Ot.getRelativeRoute(this.activatedRoute),t=u.StrUtil.tokenize(e.snapshot.routeConfig.path,"/:"),r.routesDict[e.snapshot.outlet]=t[0],(this.parentMgSubformService=r).currentRouteDefinition=null,n=!(Ot.currentCallerMgSubformServiceRef=null),e.paramMap.subscribe(function(t){n||o.insertRouteEvent(e),n=!1}),this.parentMgSubformService.refreshView(),this.routerCommandsMagicService.ExecuteNextCommand())},xt.prototype.ngOnDestroy=function(){var t;null!=this.componentRef&&(this.componentRef.instance.task.close(),t=Ot.getRelativeRoute(this.activatedRoute),this.parentMgSubformService.routesDict[t.outlet]="")},xt.decorators=[{type:i.Component,args:[{selector:"magic-route-outlet",template:"\n "}]}],xt.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:D},{type:ht},{type:i.ComponentFactoryResolver},{type:i.ViewContainerRef},{type:x},{type:Rt},{type:wt}]},xt);function xt(t,e,n,o,r,i,a,s){this.activatedRoute=t,this.magic=e,this.containerTaskService=n,this.componentFactoryResolver=o,this.viewContainerRef=r,this.componentList=i,this.pendingCommandsCollector=a,this.routerCommandsMagicService=s,this.componentRef=null,this.parentMgSubformService=null}var At=(Lt.DATE_FMT="dd/MMM/yyyy",Lt);function Lt(){}var Vt,Nt=(C(Ft,Vt=c.DatePipe),Ft.prototype.transform=function(t,e){var n=this._task.GetControlPictureMask(e).getMask(),o=null,r=new Gt;return l.isNullOrUndefined(t)||null===n?t="":(null!=(o=r.ConvertMgDateFormatToAngular(n))&&this._task.isTableControl(e)&&(null==this._task.mgInputDateFormat?this._task.mgInputDateFormat=o:o=this._task.mgInputDateFormat),Vt.prototype.transform.call(this,t,o))},Ft.decorators=[{type:i.Pipe,args:[{name:"magicDate"}]}],Ft.ctorParameters=function(){return[{type:ht}]},Ft);function Ft(t){var e=Vt.call(this,"en-US")||this;return e._task=t,e}var Gt=(Bt.prototype.ConvertMgDateFormatToAngular=function(t){var e=new p.StringBuilder;if(null===t)return"dd-mm-yyyy";for(var n=0;n<t.length;)switch(t.charCodeAt(n)){case u.PICInterface.PIC_YYYY:e.Append("yyyy"),n+=4;break;case u.PICInterface.PIC_MMD:e.Append("MM"),n+=2;break;case u.PICInterface.PIC_YY:e.Append("yy"),n+=2;break;case u.PICInterface.PIC_MMM:for(var o=0;n<t.length&&t.charCodeAt(n)==u.PICInterface.PIC_MMM;n++)o++;3==o&&e.Append("MMM"),3<o&&e.Append("MMMM");break;case u.PICInterface.PIC_DD:e.Append("dd"),n+=2;break;case u.PICInterface.PIC_WWW:for(o=0;n<t.length&&t.charCodeAt(n)==u.PICInterface.PIC_WWW;n++)o++;3==o&&e.Append("EEE"),3<o&&e.Append("EEEE");break;default:e.Append(t.charAt(n)),n++}return e.ToString()},Bt);function Bt(){}var Ut=(jt.prototype.ngAfterViewInit=function(){var t;null==this._task.getFormControl(this.magicDir.rowId,this.magicDir.id)||null!=this._task.mgInputDateFormat||(t=this._task.GetControlPictureMask(this.magicDir.id)).getAttr()==u.StorageAttribute.DATE&&this.formatDate(t)},jt.prototype.onFocusEvent=function(t){var e,n,o,r=this._task.getFormControl(this.magicDir.rowId,this.magicDir.id);null!=r&&((e=this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType)!=u.StorageAttribute.NUMERIC&&e!=u.StorageAttribute.ALPHA&&e!=u.StorageAttribute.UNICODE||(n=this._task.GetControlPictureMask(this.magicDir.id),this.isPatternGenerationNeeded(e,n)?(o=this.generatePattern(e,n),null==r.validator?r.setValidators(s.Validators.pattern(o)):r.setValidators([r.validator,s.Validators.pattern(o)])):e!=u.StorageAttribute.ALPHA&&e!=u.StorageAttribute.UNICODE||(null==r.validator?r.setValidators(s.Validators.maxLength(n.getMaskLength())):r.setValidators([r.validator,s.Validators.maxLength(n.getMaskLength())]))))},jt.prototype.onChangeEvent=function(t){var e=this._task.getFormControl(this.magicDir.rowId,this.magicDir.id);switch(this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType){case u.StorageAttribute.ALPHA:case u.StorageAttribute.UNICODE:this.formatAlphaUnicode(e);break;case u.StorageAttribute.BOOLEAN:this.formatBoolean(e)}},jt.prototype.formatDate=function(t){var e=new Gt;this._task.mgInputDateFormat=e.ConvertMgDateFormatToAngular(t.getMask())},jt.prototype.formatAlphaUnicode=function(t){var e=t.value;if(null!==e&&0<e.length){var n=this._task.GetRangedValue(this.magicDir.id,e);null!=n&&(e=n);for(var o=this._task.GetControlPictureMask(this.magicDir.id).getMask(),r=new p.StringBuilder,i=0;i<e.length;i++)switch(o.charCodeAt(i)){case u.PICInterface.PIC_U:r.Append(e.charAt(i).toUpperCase());break;case u.PICInterface.PIC_L:r.Append(e.charAt(i).toLowerCase());break;default:r.Append(e.charAt(i))}t.setValue(r.ToString())}},jt.prototype.formatBoolean=function(t){var e,n=t.value;null!==n&&0<n.length&&((e=this._task.GetRangedValue(this.magicDir.id,n)).toUpperCase().startsWith(n.toUpperCase())?t.setValue(e):t.setValue(n))},jt.prototype.generatePattern=function(t,e){var n="";switch(t){case u.StorageAttribute.NUMERIC:n=this.generatePatternForNumber(e);break;case u.StorageAttribute.ALPHA:case u.StorageAttribute.UNICODE:n=this.generatePatternForAlpha(e)}return n},jt.prototype.generatePatternForNumber=function(t){var e=new p.StringBuilder;return e.Append("^"),t.isNegative()&&e.Append("-?"),t.getWholes()&&e.AppendFormat("\\d{{0},{1}}",0,t.getWholes()),t.getDec()&&e.AppendFormat("(\\.\\d{1,{0}})?",t.getDec()),e.Append("$"),e.ToString()},jt.prototype.isPatternGenerationNeeded=function(t,e){switch(t){case u.StorageAttribute.NUMERIC:return!0;case u.StorageAttribute.ALPHA:case u.StorageAttribute.UNICODE:return 0<e.getMaskChars()}},jt.prototype.generatePatternForAlpha=function(t){var e=0,n=!1,o=!1,r=t.getMask(),i=new p.StringBuilder;i.Append("^");for(var a=0;a<r.length;){switch(!n||r.charCodeAt(a)!=u.PICInterface.PIC_N&&r.charCodeAt(a)!=u.PICInterface.PIC_U&&r.charCodeAt(a)!=u.PICInterface.PIC_L&&r.charCodeAt(a)!=u.PICInterface.PIC_X||(i.Append("("),n=!(o=!0)),e=0,r.charCodeAt(a)){case u.PICInterface.PIC_U:case u.PICInterface.PIC_X:case u.PICInterface.PIC_L:i.Append(".");var s=new p.RefParam(!1),c=u.PICInterface.PIC_U.toString();c+=u.PICInterface.PIC_L.toString(),c+=u.PICInterface.PIC_X.toString(),e=this.getDirectiveCount(r,a,c,s),n=s.value,a+=e;break;case u.PICInterface.PIC_N:i.Append("\\d");s=new p.RefParam(!1),e=this.getDirectiveCount(r,a,u.PICInterface.PIC_L.toString(),s),n=s.value;a+=e;break;default:i.Append(r[a]),a++}0<e&&i.AppendFormat("{{0},{1}}",n?e:0,e),o&&i.Append(")"),o=!1}return i.Append("$"),i.ToString()},jt.prototype.getDirectiveCount=function(t,e,n,o){o.value=!1;for(var r=0;e<t.length&&this.IsPatternMatches(t.charCodeAt(e).toString(),n);)r++,e++;return e<t.length&&(o.value=!0),r},jt.prototype.IsPatternMatches=function(t,e){for(var n=0;n<e.length;n++)if(t==e[n])return!0;return!1},jt.decorators=[{type:i.Directive,args:[{selector:"[mgFormat]"}]}],jt.ctorParameters=function(){return[{type:vt},{type:ht}]},jt.propDecorators={onFocusEvent:[{type:i.HostListener,args:["focus",["$event"]]}],onChangeEvent:[{type:i.HostListener,args:["change",["$event"]]}]},jt);function jt(t,e){this.magicDir=t,this._task=e}var Ht,Wt=(C(Yt,Ht=c.DatePipe),Yt.prototype.transform=function(t,e){var n=this._task.GetControlPictureMask(e).getMask(),o=new p.StringBuilder;if(void 0===t||null===n)return t;for(var r=0;r<n.length;)switch(n.charCodeAt(r)){case u.PICInterface.PIC_HH:o.Append("hh"),r+=2;break;case u.PICInterface.PIC_MMT:o.Append("mm"),r+=2;break;case u.PICInterface.PIC_SS:o.Append("ss"),r+=2;break;default:o.Append(n.charAt(r)),r++}return o.Append(" a"),Ht.prototype.transform.call(this,t,o.ToString())},Yt.decorators=[{type:i.Pipe,args:[{name:"magicTime"}]}],Yt.ctorParameters=function(){return[{type:ht}]},Yt);function Yt(t){var e=Ht.call(this,"en-US")||this;return e._task=t,e}var zt=(Xt.prototype.validate=function(t){var e=this.getControlName(t);this._task.Records.list[0].getControlMetadata(e).rangeValidator=!0;var n=null;return t.dirty&&(n=this._task.ValidateControlValue(e,this._task.ConvertValToNative(e,0,t.value))),null==n?null:{rangevalidator:{errorMsg:n}}},Xt.prototype.getControlName=function(e){var n=e.parent.controls;return Object.keys(n).find(function(t){return e===n[t]})||null},Xt.decorators=[{type:i.Directive,args:[{selector:"[rangevalidator] ",providers:[{provide:s.NG_VALIDATORS,useExisting:Xt,multi:!0}]}]}],Xt.ctorParameters=function(){return[{type:ht},{type:i.ViewContainerRef}]},Xt);function Xt(t,e){this._task=t,this.vcRef=e}var Kt=(Object.defineProperty(qt.prototype,"magic",{set:function(t){this.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(qt.prototype,"Component",{get:function(){return this.mgSub.mgGetComp(this.id)},enumerable:!0,configurable:!0}),Object.defineProperty(qt.prototype,"Parameters",{get:function(){return this.mgSub.mgGetParameters(this.id)},enumerable:!0,configurable:!0}),qt.decorators=[{type:i.Component,args:[{selector:"magic-subform",template:'\n <ndc-dynamic\n *ngIf="Component" \n [ndcDynamicComponent]="Component" \n [ndcDynamicInputs]="Parameters">\n </ndc-dynamic>\n'}]}],qt.ctorParameters=function(){return[{type:i.ViewContainerRef},{type:Ot}]},qt.propDecorators={magic:[{type:i.Input,args:["magic"]}]},qt);function qt(t,e){this.vcRef=t,this.mgSub=e,this.component=null,this.component=this.vcRef._view.component}var $t=(Jt.prototype.checkIsReadOnly=function(t){t=this.task.Records.list[0].getControlMetadata(t);return null===t.properties.get(m.HtmlProperties.ReadOnly)||!0!==t.properties.get(m.HtmlProperties.ReadOnly)},Jt.prototype.getText=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Text,e)},Jt.prototype.getTabpageText=function(t,e){t=this.task.getProperty(t,m.HtmlProperties.ItemsList);return void 0!==t?t[e].displayValue:""},Jt.prototype.getImage=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Image,e)},Jt.prototype.isImageExists=function(t,e){e=this.task.getProperty(t,m.HtmlProperties.Image,e);return!l.isNullOrUndefined(e)},Jt.prototype.getClasses=function(t,e){return this.task.getClasses(t,e)},Jt.prototype.getStyle=function(t,e,n){return this.task.getStyle(t,e,n)},Jt.prototype.getVisible=function(t,e){return this.getProperty(t,m.HtmlProperties.Visible,e)?"visible":"hidden"},Jt.prototype.getMustInput=function(t,e){return this.getProperty(t,m.HtmlProperties.MustInput,e)?"true":"false"},Jt.prototype.isDisabled=function(t,e){return!0!==this.getProperty(t,m.HtmlProperties.Enabled,e)||null},Jt.prototype.getProperty=function(t,e,n){return this.task.getProperty(t,e,n)},Jt.prototype.getTitle=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Tooltip,e)},Jt.prototype.getSelectedValue=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedValue,e)},Jt.prototype.getPlaceholder=function(t,e){return this.task.getProperty(t,m.HtmlProperties.PlaceHolder,e)},Jt.prototype.getType=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Password,e)?"password":"text"},Jt.prototype.getTabIndex=function(t,e){return this.task.getProperty(t,m.HtmlProperties.TabIndex,e)},Jt.prototype.getValue=function(t,e){return this.task.getValue(t,e)},Jt.prototype.getCustomProperty=function(t,e,n){if(-1==t.indexOf("~"))return this.getCustomProperty_1(t,e,n);n=t.split("~")[0],t=t.split("~")[1];return this.getCustomProperty_1(n,t,e)},Jt.prototype.getCustomProperty_1=function(t,e,n){var o;l.isNullOrUndefined(n)&&(n="0");n=this.task.Records.list[n];return l.isNullOrUndefined(n)||(t=n.getControlMetadata(t)).userProperties.has(e)&&(o=t.userProperties.get(e)),o},Jt.prototype.getItemListValues=function(t,e){return this.getProperty(t,m.HtmlProperties.ItemsList,e)},Jt.prototype.getDisplayValue=function(t,e){var n="",o=this.getProperty(t,m.HtmlProperties.ItemsList,e),e=this.task.getValue(t,e);return 0<=e&&e<o.length&&!l.isNullOrUndefined(o[e])&&(n=o[e].displayValue),n},Jt.prototype.isOptionSelected=function(t,e){var n,o,r=this.task.getValue(e,"0");try{for(var i=S(r),a=i.next();!a.done;a=i.next())if(a.value===t)return!0}catch(s){n={error:s}}finally{try{a&&!a.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}return!1},Jt.prototype.isTabPageSelected=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedValue)==e-1},Jt.prototype.isTabPageLayerSelected=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedLayer)==e-1},Jt.prototype.getTabSelectedIndex=function(t){return this.task.getProperty(t,m.HtmlProperties.SelectedValue)},Jt.prototype.ifRowCreated=function(t){if(null==t)return!1;t="number"==typeof t?t.toString():t.rowId,t=this.getFormGroupByRow(t);return!l.isNullOrUndefined(t)},Jt.prototype.getFormGroupByRow=function(t){return this.task.formGroups[t]},Jt.prototype.isRowSelected=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedRow,"0")==e},Jt.prototype.isRowInRowEditing=function(t){var e="number"==typeof t?t.toString():t.rowId;return this.task.isRowInRowEditing(e)},Jt.prototype.isCurrentInRowEditing=function(){var t=this.task.tableService.getSelectedRow();return this.task.isRowInRowEditing(t)},Jt.prototype.guiTopIndex=function(){return this.task.tableService.getTableTopIndex()},Jt.prototype.getErrMsg=function(t,e){var n,o,r=this.task.getFormControl(e,t);if(r.hasError("required"))return"Control must be updated.";if(r.hasError("pattern"))return"Required pattern is : "+r.errors.pattern.requiredPattern;if(r.hasError("rangevalidator"))return r.errors.rangevalidator.errorMsg;if(r.hasError("maxlength"))return"Max length allowed is : "+r.errors.maxlength.requiredLength;if(r.hasError("max"))return"Max value alllowed is : "+r.errors.max.max;var i=this.task.Records.list[e].getControlMetadata(t);try{for(var a=S(i.customValidators.keys()),s=a.next();!s.done;s=a.next()){var c=s.value;if(r.hasError(c))return i.customValidators.get(c).getErrMessage()}}catch(l){n={error:l}}finally{try{s&&!s.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}return"unknown error"},Jt.prototype.setValueToControl=function(t,e,n){void 0===n&&(n=!0);t=a.getGuiEventObj("setexternalvalue",t,0);t.externalValue=e,t.param=n,this.task.insertEvent(t)},Jt.prototype.isDataviewEmpty=function(){return this.task.Records.isEmptyDataView},Jt.prototype.simulateClick=function(t,e){void 0===e&&(e=0),this.task.insertEvent(a.getGuiEventObj("click",t,e))},Jt.prototype.isLoggedIn=function(){return this.task.getIsLoggenIn()},Jt.decorators=[{type:i.Injectable}],Jt.ctorParameters=function(){return[{type:ht}]},Jt);function Jt(t){this.task=t}var Qt=(Object.defineProperty(Zt.prototype,"magic",{set:function(t){this.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(Zt.prototype,"rowId1",{set:function(t){this.rowId=t},enumerable:!0,configurable:!0}),Object.defineProperty(Zt.prototype,"CustomContent",{set:function(t){this.defaultDisplay=t==undefined||this.isEmpty(t.nativeElement),this.changeDetectorRef.detectChanges()},enumerable:!0,configurable:!0}),Zt.prototype.isEmpty=function(t){for(var e=t.childNodes,n=0;n<e.length;n++)if(8!==e.item(n).nodeType&&0!==e.item(n).textContent.trim().length)return!1;return!0},Zt.prototype.HasErrors=function(t){var e,n;if(!l.isUndefined(t)){var o=this._task.getFormControl(this.rowId,t);if(null!==o){if(o.dirty&&(o.hasError("pattern")||o.hasError("required")||o.hasError("rangevalidator")||o.hasError("maxlength")||o.hasError("max")))return!0;if(o.touched&&o.hasError("required"))return!0;var r=this._task.Records.list[this.rowId].getControlMetadata(t);try{for(var i=S(r.customValidators.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;if(o.hasError(s))return!0}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}}}return!1},Zt.decorators=[{type:i.Component,args:[{selector:"mgError",template:'<div *ngIf="HasErrors(id)">\n <div #customContent>\n <ng-content></ng-content>\n </div>\n <span *ngIf="defaultDisplay">\n {{mgService.getErrMsg(id, rowId)}} \n </span>\n </div>\n'}]}],Zt.ctorParameters=function(){return[{type:ht},{type:$t},{type:i.ChangeDetectorRef}]},Zt.propDecorators={magic:[{type:i.Input,args:["magic"]}],rowId1:[{type:i.Input,args:["rowId"]}],CustomContent:[{type:i.ViewChild,args:["customContent",{"static":!1}]}]},Zt);function Zt(t,e,n){this._task=t,this.mgService=e,this.changeDetectorRef=n,this.defaultDisplay=!0,this.rowId="0"}var te=(ee.prototype.onChange=function(t){this.magicDirective.task.onCheckChanged(t,this.magicDirective.id,+this.magicDirective.rowId)},ee.decorators=[{type:i.Directive,args:[{selector:"\n input[type=checkbox][magic]:not([noFormControl])\n"}]}],ee.ctorParameters=function(){return[{type:vt}]},ee.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},ee);function ee(t){this.magicDirective=t}var ne=(oe.prototype.onChange=function(t){this.magicDirective.task.onComboboxSelectionChanged(t,this.magicDirective.id,+this.magicDirective.rowId)},oe.decorators=[{type:i.Directive,args:[{selector:"select[magic]:not([multiple])"}]}],oe.ctorParameters=function(){return[{type:vt}]},oe.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},oe);function oe(t){this.magicDirective=t}var re=(ie.prototype.exitMagic=function(){console.log("Magic application terminated")},ie.decorators=[{type:i.Injectable}],ie);function ie(){}var ae=(se.prototype.intercept=function(t,e){var n=o.interval(se.Delay).subscribe(function(){n.unsubscribe(),se.VisibilityChangeDetectorRef.next(!0)});return e.handle(t).pipe(r.tap(function(t){t instanceof d.HttpResponse&&(se.VisibilityChangeDetectorRef.next(!1),n.unsubscribe())},function(t){se.VisibilityChangeDetectorRef.next(!1),n.unsubscribe()}))},se.Delay=1e3,se.VisibilityChangeDetectorRef=new o.Subject,se.decorators=[{type:i.Injectable}],se.ctorParameters=function(){return[]},se);function se(){}var ce=(le.prototype.onBeforeUnload=function(t){if(this.engineMagicService.TransCacheExists())return this.subscription.unsubscribe(),t.returnValue="Are you sure?";this.engineMagicService.TerminateContextUsingFetchAPI(),this.magicEngineTerminated=!0,this.subscription.unsubscribe()},le.prototype.onUnload=function(t){this.magicEngineTerminated||this.engineMagicService.TerminateContextUsingFetchAPI()},le.prototype.ngAfterViewInit=function(){this.overlayWindowService.init(this.overlayWindowsContainerViewRef,this.rootMagicElementRef.nativeElement),this.engineMagicService.startMagicEngine(this.httpClient)},le.prototype.setViewContainerRef=function(t){this.overlayWindowsContainerViewRef=t},le.prototype.initialize=function(){this.registerUICommands()},le.prototype.setTitle=function(){var t=this.componentList.title;this.titleService.setTitle(t)},le.prototype.setComponent=function(t,e,n,o){this.pendingCommandsCollector.startCollecting(),o?this.overlayWindowService.open(t,e,n):(this.RootComponent=this.componentList.getComponent(t),this.RootComponentParameters={taskIdParam:e,taskDescription:n}),this.changeDetectorRef.detectChanges()},le.prototype.registerUICommands=function(){var e=this;this.engineMagicService.refreshDom.pipe(r.filter(function(t){return"0"===t.TaskTag})).subscribe(function(t){e.executeCommand(t)}),this.engineMagicService.interactiveCommands.pipe(r.filter(function(t){return"0"===t.TaskTag})).subscribe(function(t){N.executeInteractiveCommand(null,t,e.overlayWindowService)})},le.prototype.executeCommand=function(t){switch(t.CommandType){case m.CommandType.OPEN_FORM:this.setComponent(t.str,t.stringList[0],t.stringList[1],t.Bool1);break;case m.CommandType.SET_IS_LOGGED_IN:this.engineMagicService.setIsLoggedIn(t.Bool1);break;case m.CommandType.CLOSE_FORM:null!=this.RootComponent&&t.str===this.RootComponentParameters.taskIdParam?(this.RootComponent=null,this.RootComponentParameters={}):this.overlayWindowService.close(t.str),this.changeDetectorRef.detectChanges();break;case m.CommandType.RELOAD_PAGE:window.location.reload();break;case m.CommandType.EXIT_MAGIC:this.exitMagicService&&this.exitMagicService.exitMagic()}},le.decorators=[{type:i.Component,args:[{selector:"magic-root",providers:[],template:'\n <div #magicRoot>\n <ndc-dynamic\n *ngIf = "RootComponent !== null"\n [ndcDynamicComponent]="RootComponent"\n [ndcDynamicInputs] ="RootComponentParameters">\n </ndc-dynamic>\n\n <div #overlayWindowsContainer magicViewContainerRef>\n </div>\n </div>\n\n <div class="spinner-background" *ngIf="showSpinner">\n <ng-container [ngTemplateOutlet]="SpinnerTemplate ? SpinnerTemplate:defaultSpinner"></ng-container>\n </div>\n\n <ng-template #defaultSpinner>\n <div class="loader"></div>\n </ng-template>\n ',styles:["\n .loader {\n border: 10px solid #cccccc; /* Light grey */\n border-top: 10px solid black; /* Blue */\n border-radius: 50%;\n position: fixed;\n margin: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100px;\n height: 100px;\n animation: spin 2s linear infinite;\n }\n .spinner-background {\n /* background fixed across whole screen */\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n }\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "]}]}],le.ctorParameters=function(){return[{type:D},{type:x},{type:i.ChangeDetectorRef},{type:h.Title},{type:ct},{type:d.HttpClient},{type:ae},{type:Rt},{type:re,decorators:[{type:i.Optional}]}]},le.propDecorators={rootMagicElementRef:[{type:i.ViewChild,args:["magicRoot",{"static":!0}]}],SpinnerTemplate:[{type:i.Input}],onBeforeUnload:[{type:i.HostListener,args:["window:beforeunload",["$event"]]}],onUnload:[{type:i.HostListener,args:["window:unload",["$event"]]}]},le);function le(t,e,n,o,r,i,a,s,c){var l=this;this.engineMagicService=t,this.componentList=e,this.changeDetectorRef=n,this.titleService=o,this.overlayWindowService=r,this.httpClient=i,this.spinnerService=a,this.pendingCommandsCollector=s,this.exitMagicService=c,this.RootComponent=null,this.magicEngineTerminated=!1,this.initialize(),this.setTitle(),this.subscription=ae.VisibilityChangeDetectorRef.subscribe(function(t){l.showSpinner=t,l.changeDetectorRef.detectChanges()})}var ue,pe={provide:s.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return me}),multi:!0},me=(C(de,ue=s.CheckboxControlValueAccessor),de.decorators=[{type:i.Directive,args:[{selector:"\n input[type=checkbox][magic]:not([formControlName]):not([no-form-control]),\n input[type=checkbox][magic]:not([formControl]),\n input[type=checkbox][magic]:not([ngModel])\n ",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[pe]}]}],de);function de(){return null!==ue&&ue.apply(this,arguments)||this}var he,ge={provide:s.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return fe}),multi:!0},fe=(C(ye,he=s.DefaultValueAccessor),ye.decorators=[{type:i.Directive,args:[{selector:"\n input[magic]:not([type=checkbox]):not([formControlName]):not([no-form-control]),\n textarea[magic]:not([formControlName]):not([noFormControl]):not([no-form-control])\n ",host:{"(input)":"$any(this)._handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"$any(this)._compositionStart()","(compositionend)":"$any(this)._compositionEnd($event.target.value)"},providers:[ge],exportAs:"magic"}]}],ye);function ye(){return null!==he&&he.apply(this,arguments)||this}var ve=(Ce.prototype.refreshDataSource=function(){},Ce.prototype.getPageSize=function(){return 10},Ce.prototype.getMaxRowsInTable=function(){return this.task.Records.list.length},Ce.prototype.selectRow=function(t){this.selectedItem=t},Ce.prototype.getSelectedRow=function(){return this.selectedItem},Ce.prototype.selectedRow=function(){return null},Ce.prototype.selectPage=function(t){},Ce.prototype.OpenDialogForControl=function(t){return"MAT-SELECT"!==t.tagName&&"MAT-CHECKBOX"!==t.tagName&&"INPUT"!==t.tagName&&"SELECT"!==t.tagName},Ce.prototype.getDialog=function(){return null},Ce.prototype.onScrollDown=function(){this.task.onScrollDown()},Ce.prototype.sortData=function(t){},Ce.prototype.mgOnPaginateChange=function(t){},Ce.prototype.mgOptionChanged=function(t){},Ce.prototype.updateTableSize=function(t){0===t&&(t=1,this.task.Records.clearFirstTableRecord(this.task.template)),this.task.formGroups.length=t,this.task.Records.updateSize(t),this.task.setIncludesFirst(!1)},Ce.prototype.setTableTopIndex=function(t){this.task.Records.includesFirst||t++,this.task.Records.setGuiTopIndex(t)},Ce.prototype.getTableTopIndex=function(){var t=this.task.Records.getGuiTopIndex();return this.task.Records.includesFirst||t--,t},Ce.decorators=[{type:i.Injectable}],Ce.ctorParameters=function(){return[{type:x},{type:ht}]},Ce);function Ce(t,e){this.componentList=t,this.task=e,this.shouldOpenFieldTextEditor=!0}var be=(Ee.prototype.setTitle=function(t){this.titleService.setTitle(t)},Ee.decorators=[{type:i.Injectable}],Ee.ctorParameters=function(){return[{type:h.Title}]},Ee);function Ee(t){this.titleService=t}var Se=(Re.decorators=[{type:i.Injectable}],Re.ctorParameters=function(){return[{type:ht},{type:Ot},{type:ve},{type:be},{type:$t}]},Re);function Re(t,e,n,o,r){this.task=t,this.subformService=e,this.tableService=n,this.titleService=o,this.mgAccessorService=r,t.tableService=n,t.mgSubformService=e,t.mgTitleService=o,t.mgAccessorService=r}var Ie=(Object.defineProperty(Te.prototype,"task",{get:function(){return this.magicServices.task},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"mgSub",{get:function(){return this.magicServices.subformService},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"tableService",{get:function(){return this.magicServices.tableService},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"mg",{get:function(){return this.magicServices.mgAccessorService},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"taskId",{get:function(){return this.task.taskId},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"screenFormGroup",{get:function(){return this.task.ScreenModeControls},enumerable:!0,configurable:!0}),Te.prototype.ngOnInit=function(){var e=this;this.task.detectChanges.pipe().subscribe(function(t){e.ref.detectChanges()});this.task.initTask(this.taskIdParam,this.taskDescription),this.createFormControlsAccessor(this.screenFormGroup),this.setInputDateFormat(),this.task.customPropertiesSubject.pipe().subscribe(function(t){e.PropertyChanged(t.propertyName,t.rowId,t.value)})},Te.prototype.createFormControlsAccessor=function(t){},Te.prototype.setInputDateFormat=function(){},Te.prototype.PropertyChanged=function(t,e,n){},Te.prototype.ngAfterViewInit=function(){this.mgSub.init()},Te.prototype.ngAfterContentChecked=function(){this.task.oldPageSize!=this.tableService.getPageSize()&&(this.task.resize(this.tableService.getPageSize(),0),this.task.oldPageSize=this.tableService.getPageSize())},Te.prototype.ngOnDestroy=function(){this.task.dispose()},Te.decorators=[{type:i.Component,args:[{selector:"task-magic",providers:[ht,Ot,ve],template:""}]}],Te.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:Se}]},Te.propDecorators={taskIdParam:[{type:i.Input}],taskDescription:[{type:i.Input}]},Te);function Te(t,e){this.ref=t,this.magicServices=e,this.magicProperties=u.MagicProperties}var we=(Me.prototype.onChange=function(t){this.magicDirective.task.onCheckChanged(t,this.magicDirective.id,+this.magicDirective.rowId)},Me.decorators=[{type:i.Directive,args:[{selector:"\n input[type=checkbox][magic]:([noFormControl]) \n "}]}],Me.ctorParameters=function(){return[{type:vt}]},Me.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},Me);function Me(t){this.magicDirective=t}var ke=(Pe.prototype.onChange=function(t){this.magicDirective.task.setInputTextValue(this.magicDirective.id,this.magicDirective.rowId,event.srcElement.value)},Pe.decorators=[{type:i.Directive,args:[{selector:"input[magic]:([noFormControl]):not([type=checkbox]),\n textarea[magic]:([noFormControl]):not([type=checkbox])"}]}],Pe.ctorParameters=function(){return[{type:vt}]},Pe.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},Pe);function Pe(t){this.magicDirective=t}var Oe={provide:s.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return De}),multi:!0},De=(_e.prototype.writeValue=function(t){t?this.renderer.setProperty(this.elementRef.nativeElement,"valueAsDate",new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):this.renderer.setProperty(this.elementRef.nativeElement,"value",null)},_e.prototype.registerOnChange=function(e){this.onChange=function(t){return e(t instanceof Date?new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()):t)}},_e.prototype.registerOnTouched=function(t){this.onTouched=t},_e.prototype.setDisabledState=function(t){this.renderer.setProperty(this.elementRef.nativeElement,"disabled",t)},_e.decorators=[{type:i.Directive,args:[{selector:"[dateInput]",providers:[Oe]}]}],_e.ctorParameters=function(){return[{type:i.Renderer2},{type:i.ElementRef}]},_e.propDecorators={onChange:[{type:i.HostListener,args:["input",["$event.target.valueAsDate"]]}],onTouched:[{type:i.HostListener,args:["blur",[]]}]},_e);function _e(t,e){this.renderer=t,this.elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}var xe=(Object.defineProperty(Ae.prototype,"magic",{set:function(t){this.id=t,this.selector="NonMagicControl"},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"task",{get:function(){return this._task},enumerable:!0,configurable:!0}),Ae.prototype.regEvents=function(){var e=this;this.eventHandlers.focusin=this.OnFocus.bind(this),Object.keys(this.eventHandlers).forEach(function(t){e.focusUnlistener=e.renderer.listen(e.htmlElement,t,e.eventHandlers[t])})},Ae.prototype.OnFocus=function(){this.task.insertEvent(a.getGuiEventObj("focusOnNonMagicControl","",-1)),event.cancelBubble=!0},Ae.prototype.ngOnInit=function(){this.regEvents()},Ae.decorators=[{type:i.Directive,args:[{selector:"[NonMagicControl]"}]}],Ae.ctorParameters=function(){return[{type:ht},{type:i.ElementRef},{type:i.Renderer2},{type:i.ViewContainerRef}]},Ae.propDecorators={magic:[{type:i.Input,args:["NonMagicControl"]}]},Ae);function Ae(t,e,n,o){this._task=t,this.element=e,this.renderer=n,this.vcRef=o,this.eventHandlers={},this.eventsOnlyVal=!1,this.htmlElement=this.element.nativeElement}var Le=(Ve.prototype.ngAfterViewInit=function(){this.hostElement.nativeElement.focus()},Ve.decorators=[{type:i.Directive,args:[{selector:"[magicFocus]"}]}],Ve.ctorParameters=function(){return[{type:i.ElementRef}]},Ve);function Ve(t){this.hostElement=t}var Ne=(Fe.decorators=[{type:i.Directive,args:[{selector:"[magicViewContainerRef]"}]}],Fe.ctorParameters=function(){return[{type:i.ViewContainerRef}]},Fe);function Fe(t){this.vcRef=t,this.vcRef._view.component.setViewContainerRef(t)}var Ge=[vt,te,we,ke,ne,ft,me,fe,De,Ie,j,Z,nt,K,z,$,kt,_t,ce,Kt,Qt,Et,Ut,Nt,Wt,zt,xe,Le,Ne],Be=(Ue.forRoot=function(){return{ngModule:Ue,providers:[D,x,Rt,wt,ct]}},Ue.decorators=[{type:i.NgModule,args:[{declarations:I(Ge),exports:I(Ge),entryComponents:[],imports:[c.CommonModule,s.FormsModule,s.ReactiveFormsModule,n.RouterModule,g.DynamicModule.withComponents([j,$,Z,nt]),d.HttpClientModule],providers:[rt,W,ae,{provide:d.HTTP_INTERCEPTORS,useClass:ae,multi:!0}]}]}],Ue);function Ue(){}var je,He={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"input",monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},We=(C(Ye,je=f.NativeDateAdapter),Ye.prototype.parse=function(t){var e=t,n=0,o=0,r=0,i=this.mgdtfmt,a=0<e.indexOf("/")?"/":"-";if(null==t||""==t)return null;if(null==this.mgdtfmt&&null!=this.task.mgInputDateFormat&&(this.mgdtfmt=this.task.mgInputDateFormat),0<this.mgdtfmt.indexOf("MMM")||0<this.mgdtfmt.indexOf("MMMM"))return new Date(t);e.length;if(null!==i){for(var s=0;s<i.length;)switch(i[s]){case"d":var c=void 0;for(c=-1==(l=e.indexOf(a,0))?e:e.substr(0,l),-1<l&&(e=e.substr(l+1));"d"==i[s];s++);n=Number(c);break;case"M":c=void 0;for(c=-1==(l=e.indexOf(a,0))?e:e.substr(0,l),-1<l&&(e=e.substr(l+1));"M"==i[s];s++);o=0<Number(c)?Number(c)-1:0;break;case"y":var l,c=void 0;for(c=-1==(l=e.indexOf(a,0))?e:e.substr(0,l),-1<l&&(e=e.substr(l+1));"y"==i[s];s++);r=Number(c);break;default:s++}return 0==o&&0==r&&0==n?null:new Date(Date.UTC(r,o,n))}},Ye.prototype.format=function(t,e){return null==this.mgdtfmt&&null!=this.task.mgInputDateFormat&&(this.mgdtfmt=this.task.mgInputDateFormat),"input"===e?(null==this.mgdtfmt&&(this.mgdtfmt="M/d/yyyy"),c.formatDate(t,this.mgdtfmt,this.locale)):t.toDateString()},Ye.decorators=[{type:i.Injectable}],Ye.ctorParameters=function(){return[{type:ht}]},Ye);function Ye(t){var e=je.call(this,"en-US",new y.Platform)||this;return e.task=t,e.mgdtfmt=null,e}var ze=[{provide:f.DateAdapter,useClass:We},{provide:f.MAT_DATE_FORMATS,useValue:He}],Xe=[Se,ht,Ot,be,$t,ze],Ge=I(Xe,[ve]),g=(Ke.addChildren=function(t,e,n){for(var o=0;o<t.children.length;o++)"undefined"!=typeof t.children[o].attributes[n]&&e.push(t.children[o]),this.addChildren(t.children[o],e,n)},Ke.getDistance=function(t,e,n){var o=t.clientLeft,r=t.clientTop,i=o+t.clientWidth,t=r+t.clientHeight,i=e<o?o-e:i<e?e-i:0,t=n<r?r-n:t<n?n-t:0;return i*i+t*t},Ke.getDimentions=function(t){for(var e,n,o=0,r=0,i=t.width,a=t.height;t;)"BODY"==t.tagName?(e=t.scrollLeft||document.documentElement.scrollLeft,n=t.scrollTop||document.documentElement.scrollTop,o+=t.offsetLeft-e+t.clientLeft,r+=t.offsetTop-n+t.clientTop):(o+=t.offsetLeft-t.scrollLeft+t.clientLeft,r+=t.offsetTop-t.scrollTop+t.clientTop),t=t.offsetParent;return{x:o,y:r,width:i,height:a}},Ke);function Ke(){}f=function(){this.taskId="",this.comp=null,this.parameters={}};t.ControlMetadata=T,t.ControlsMetadata=M,t.Records=P,t.HtmlClasses={Color:"color",font:"font",FocusColor:"focuscolor",HintColor:"hintcolor"},t.MagicModule=Be,t.AccessorMagicService=$t,t.CommandsCollectorMagicService=Rt,t.ComponentListMagicService=x,t.ConfirmationComponentsMagicProvider=rt,t.EngineMagicService=D,t.ExitMagicService=re,t.matDateProviders=ze,t.basicMagicProviders=Xe,t.magicProviders=Ge,t.MagicServices=Se,t.MG_FORMATS=He,t.MgDateAdapter=We,t.OverlayContainerMagicProvider=W,t.OverlayWindowService=ct,t.RouteCommand=Tt,t.RouterCommandsMagicService=wt,t.SpinnerService=ae,t.StylesMapManager=L,t.SubformMagicService=Ot,t.TableMagicService=ve,t.TaskMagicService=ht,t.TitleMagicService=be,t.GuiInteractiveExecutor=N,t.LoadOnDemandModuleMagicComponent=kt,t.confirmationBox=at,t.MagicShellComponent=ce,t.ErrorMagicComponent=Qt,t.RouterContainerMagicComponent=_t,t.SubformMagicComponent=Kt,t.TaskBaseMagicComponent=Ie,t.utils=g,t.BaseMagicAlertComponent=K,t.BaseMagicConfirmComponent=z,t.MagicAlertComponent=Z,t.MagicConfirmationBoxComponent=nt,t.MagicFocusDirective=Le,t.MagicDirective=vt,t.MagicViewContainerRef=Ne,t.MgformatMagicDirective=Ut,t.NonMagicControlDirective=xe,t.RangeValidatorMagicDirective=zt,t.CheckboxNoFormControlMagicDirective=we,t.CheckboxMagicDirective=te,t.ComboboxMagicDirective=ne,t.InputNoFormControlMagicDirective=ke,t.NoControlMagicDirective=Et,t.RowMagicDirective=ft,t.CHECKBOX_VALUE_ACCESSOR=pe,t.MagicCheckboxControlValueAccessor=me,t.DATE_VALUE_ACCESSOR=Oe,t.DateValueAccessor=De,t.MAGIC_DEFAULT_VALUE_ACCESSOR=ge,t.MagicDefaultValueAccessor=fe,t.BaseMagicOverlayContainer=G,t.ModalFormDefinition=f,t.MagicOverlayContainerWrapper=$,t.MagicOverlayContainer=j,t.Constants=At,t.DateMagicPipe=Nt,t.MgDateFormatter=Gt,t.TimeMagicPipe=Wt,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("util"),require("@angular/core"),require("rxjs"),require("@magic-xpa/engine"),require("@magic-xpa/utils"),require("@magic-xpa/mscorelib"),require("@magic-xpa/gui"),require("@angular/forms"),require("rxjs/operators"),require("rxjs/internal/observable/fromEvent"),require("@angular/router"),require("@angular/common"),require("@angular/common/http"),require("@angular/platform-browser"),require("ng-dynamic-component"),require("@angular/material"),require("@angular/cdk/platform")):"function"==typeof define&&define.amd?define("@magic-xpa/angular",["exports","util","@angular/core","rxjs","@magic-xpa/engine","@magic-xpa/utils","@magic-xpa/mscorelib","@magic-xpa/gui","@angular/forms","rxjs/operators","rxjs/internal/observable/fromEvent","@angular/router","@angular/common","@angular/common/http","@angular/platform-browser","ng-dynamic-component","@angular/material","@angular/cdk/platform"],e):e((t["magic-xpa"]=t["magic-xpa"]||{},t["magic-xpa"].angular={}),null,t.ng.core,t.rxjs,null,null,null,null,t.ng.forms,t.rxjs.operators,t.rxjs["internal/observable/fromEvent"],t.ng.router,t.ng.common,t.ng.common.http,t.ng.platformBrowser,null,t.ng.material,t.ng.cdk.platform)}(this,function(t,c,i,o,a,l,u,m,s,r,e,n,p,d,h,g,f,y){"use strict";var v=function(t,e){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function C(t,e){function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function b(t,e,s,c){return new(s=s||Promise)(function(n,o){function r(t){try{a(c.next(t))}catch(e){o(e)}}function i(t){try{a(c["throw"](t))}catch(e){o(e)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((c=c.apply(t,e||[])).next())})}function E(n,o){var r,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},t={next:e(0),"throw":e(1),"return":e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return c([e,t])}}function c(t){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(a=2&t[0]?i["return"]:t[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&o>=t.length?void 0:t)&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)a.push(o.value)}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i["return"])&&n.call(i)}finally{if(r)throw r.error}}return a}function I(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(R(arguments[e]));return t}var T=(w.prototype.setClass=function(t,e){var n,o;this.classesMap.has(t)&&(this.removedClass=this.classesMap.get(t)),this.classesMap.set(t,e);var r="";try{for(var i=S(this.classesMap),a=i.next();!a.done;a=i.next())r+=a.value+" "}catch(s){n={error:s}}finally{try{a&&!a.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}this.classes=r},w.prototype.setStyle=function(t,e){this.stylesMap.set(t,e)},w);function w(){this.properties=new Map,this.classesMap=new Map,this.stylesMap=new Map,this.userProperties=new Map,this.customValidators=new Map}var M=(Object.defineProperty(k.prototype,"Values",{get:function(){return this.values},enumerable:!0,configurable:!0}),k.prototype.getControlMetadata=function(t){return this.ControlsProperties.has(t)||this.ControlsProperties.set(t,new T),this.ControlsProperties.get(t)},k.prototype.update=function(t){for(var e in t.ControlsMetaData){this.ControlsProperties.has(e)||this.ControlsProperties.set(e,new T);var n,o=this.ControlsProperties.get(e);for(n in t.ControlsMetaData[e].Properties)o[n]=t.ControlsMetaData[e].Properties[n];o.controlType=t.ControlsMetaData[e].Type}for(e in t.ControlsValues)this.setValue(e,t.ControlsValues[e])},k.prototype.setValue=function(t,e){this.values.set(t,e)},k.prototype.getProperty=function(t,e){return this.ControlsProperties.has(t)&&this.ControlsProperties.get(t).properties.has(e)?this.ControlsProperties.get(t).properties.get(e):""},k.prototype.getValue=function(t){return this.values.get(t)},k);function k(){this.values=new Map,this.ControlsProperties=new Map,this.isCreated=!1,this.isEditing=!1}var P=(O.prototype.getRow=function(t){return this.list[t+this.recordsBeforeCurrentView]},O.prototype.markRowAsCreated=function(t){t<this.list.length&&(this.addRow(t),this.data.get(t).isCreated=!0)},O.prototype.markRowAsNotCreated=function(t){t<this.list.length&&(this.data.get(t).isCreated=!1)},O.prototype.isRowCreated=function(t){return t<this.list.length&&(!(!this.data.has(t)||c.isNullOrUndefined(this.data.get(t)))&&this.data.get(t).isCreated)},O.prototype.startRowEditing=function(t){t<this.list.length&&this.data.has(t)&&(this.data.get(t).isEditing=!0)},O.prototype.stopRowEditing=function(t){t<this.list.length&&this.data.has(t)&&(this.data.get(t).isEditing=!1)},O.prototype.isRowInRowEditing=function(t){return+t<this.list.length&&(!(!this.data.has(+t)||c.isNullOrUndefined(this.data.get(+t)))&&this.data.get(+t).isEditing)},O.prototype.update=function(t){var e,n,o;for(o in t.fullRefresh&&t.rows.length!=this.list.length&&(this.data=new Map,this.list=new Array),t.rows){this.data.has(+o)&&null!==this.data.get(+o)||this.data.set(+o,new M);var r=this.data.get(+o);r.update(t.rows[o]),r.rowId=o}try{for(var i=S(this.data),a=i.next();!a.done;a=i.next()){var s=R(a.value,2),c=s[0],l=s[1];this.list[c]=l}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}},O.prototype.updateSize=function(t){if(this.list.length!=t){if(t<this.list.length)for(var e=t;e<this.list.length;e++)this.data["delete"](e);this.list.length=t}},O.prototype.clearFirstTableRecord=function(t){if(1<=this.list.length)for(var e in t)"1"==t[e]&&this.list[0].ControlsProperties.has(e)&&(this.list[0].ControlsProperties.get(e).properties=new Map)},O.prototype.addRow=function(t){0===t&&this.data.has(t)&&!c.isNullOrUndefined(this.data.get(t))||(this.data.set(t,new M),this.data.get(t).rowId=""+t,this.list[t]=this.data.get(t))},O.prototype.createFirst=function(){this.addRow(0)},O.prototype.fromJson=function(t){t=JSON.parse(t);this.update(t)},O.prototype.setGuiTopIndex=function(t){this.guiTopIndex=t},O.prototype.getGuiTopIndex=function(){return this.guiTopIndex},O);function O(){this.data=new Map,this.list=[],this.recordsBeforeCurrentView=0,this.isEmptyDataView=!1}var D=(_.prototype.startMagicEngine=function(t){var l=this;this.magicBridge.registerExecuteCommandsCallback(function(t){var e,n;if(!l.isStub)try{var o=t;try{for(var r=S(o),i=r.next();!i.done;i=r.next()){var a=i.value;l.refreshDom.next(a)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}}catch(c){console.dir(c),console.log("magic engine not found"),console.log("moving to stub mode"),l.isStub=!0}}),this.magicBridge.registerInteractiveCallback(function(t){l.isStub||l.interactiveCommands.next(t)}),this.magicBridge.Initialize(t)},_.prototype.terminateMagic=function(){return b(this,void 0,void 0,function(){return E(this,function(t){switch(t.label){case 0:return[4,this.magicBridge.TerminateMagic()];case 1:return t.sent(),[2]}})})},_.prototype.insertEvent=function(t){this.isStub||this.magicBridge.insertEvent(t)},_.prototype.GetRangedValue=function(t,e,n){return this.magicBridge.GetRangedValue(t,e,n)},_.prototype.GetControlPictureMask=function(t,e){return this.magicBridge.GetControlPictureMask(t,e)},_.prototype.ValidateControlValue=function(t,e,n){return this.magicBridge.ValidateControlValue(t,e,n)},_.prototype.GetFldRanges=function(t,e){return this.magicBridge.GetFldRanges(t,e)},_.prototype.saveData=function(t){},_.prototype.getIsLoggedIn=function(){return this.isLoggedIn},_.prototype.setIsLoggedIn=function(t){this.isLoggedIn=t},_.prototype.TransCacheExists=function(){return this.magicBridge.TransCacheExists()},_.prototype.TerminateContextUsingFetchAPI=function(){this.magicBridge.TerminateContextUsingFetchAPI()},_.decorators=[{type:i.Injectable}],_);function _(){this.magicBridge=a.MagicBridge,this.isStub=!1,this.isLoggedIn=!1,this.refreshDom=new o.Subject,this.interactiveCommands=new o.Subject}var x=(A.prototype.getData=function(t,e){var n=null,o=this.components.has(t);return!o&&e&&console.log("Error: Component: "+t+" does not exist in components map"),n=o?this.components.get(t):n},A.prototype.getComponent=function(t,e){e=this.getData(t,e=void 0===e?!0:e);return e?e.component:null},A.prototype.addComponents=function(t,e){for(var n in t){var o={moduleRef:e,component:t[n]};this.components.set(n,o)}},A.prototype.getModuleRef=function(t){t=this.getData(t,!1);return t?t.moduleRef:null},A.prototype.getLazyLoadModuleData=function(t){return null!=this.lazyLoadModulesMap&&this.lazyLoadModulesMap.hasOwnProperty(t)?this.lazyLoadModulesMap[t]:null},A);function A(){this.components=new Map,this.dialogs=new Map,this.lazyLoadModulesMap=null}var L=(V.magicValueGetStyle=function(t,e){var n="";return c.isNullOrUndefined(e)||((t=V.StylesMap.get(t)).constructor===Map?n=t.get(e):t.constructor===String&&(n=u.NString.Format(t,e))),n},V.StylesMap=new Map([[l.MagicProperties.LineDivider,new Map([[!0,"solid"],[!1,"hidden"]])],[l.MagicProperties.ImageFile,"url('{0}')"],[l.MagicProperties.Wallpaper,"url('{0}')"]]),V.MagicPropertyToHtmlAttributeMap=new Map([[l.MagicProperties.LineDivider,"border-bottom-style"],[l.MagicProperties.ImageFile,"background-image"],[l.MagicProperties.Wallpaper,"background-image"]]),V);function V(){}var N=(F.prototype.Run=function(){try{switch(this.command._commandType){case m.InteractiveCommandType.GET_VALUE:this.onValue();break;case m.InteractiveCommandType.GET_ROWS_IN_PAGE:this.onGetRowsInPage();break;case m.InteractiveCommandType.GET_MAX_ROWS_IN_PAGINATED_TABLE:this.onGetMaxRowsInPaginatedTable();break;case m.InteractiveCommandType.MESSAGE_BOX:this.OnMessageBox();break;case m.InteractiveCommandType.GET_TOP_INDEX:this.OnGetTopIndex();break;case m.InteractiveCommandType.GET_IS_ROW_EDITING:this.OnGetIsRowEditing();break;case m.InteractiveCommandType.SET_TITLE:this.OnSetTitle();break;case m.InteractiveCommandType.REFRESH_PAGE:this.OnRefreshPage()}}catch(t){throw t}},F.executeInteractiveCommand=function(t,e,n){var o=new F;o.task=t,o.command=e,o.overlayService=n,o.Run()},F.prototype.onValue=function(){var t,e=this.task.getGuiRowId(+this.command._line,this.task.isTableControl(this.command.controlName)||this.command._obj2.IsTableChild),n=this.task.getFormControl(e.toString(),this.command.controlName);c.isNullOrUndefined(n)?this.task.isTableControl(this.command.controlName)&&(t=this.task.getValue(this.command.controlName,e.toString())):t=n.value,t=this.task.ConvertValToNative(this.command.controlName,e,t),this.command._mgValue.obj=t},F.prototype.onGetRowsInPage=function(){this.command._intVal1=this.task.tableService.getPageSize(),0==this.task.oldPageSize&&(this.task.oldPageSize=this.command._intVal1)},F.prototype.onGetMaxRowsInPaginatedTable=function(){this.command._intVal1=this.task.tableService.getMaxRowsInTable()},F.prototype.OnMessageBox=function(){this.overlayService.openConfirmationBox(this.command._mgValue.title,this.command._mgValue.str,this.command._mgValue.style)},F.prototype.OnSetTitle=function(){this.task.setTitle(this.command._mgValue.title)},F.prototype.OnRefreshPage=function(){var t=this.command._boolVal,e=this.command._obj1;t?window.location.replace(e):window.location.reload()},F.prototype.OnGetTopIndex=function(){this.command._intVal1=this.task.tableService.getTableTopIndex()},F.prototype.OnGetIsRowEditing=function(){var t=this.command._intVal1,t=this.task.getGuiRowId(t,!0);this.command._boolVal&&(c.isNullOrUndefined(t)||c.isNullOrUndefined(this.task.Records.list[t]))?this.command._boolVal=!1:this.command._boolVal=this.task.Records.list[t].isEditing},F);function F(){}var G=(B.propDecorators={ModalComp:[{type:i.Input}],ModalCompParameters:[{type:i.Input}],onClose:[{type:i.Output}]},B);function B(){}var U,j=(C(H,U=G),H.prototype.ngOnInit=function(){var t=this.componentFactoryResolver.resolveComponentFactory(this.ModalComp);this.componentRef=this.modalbodyViewContainerRef.createComponent(t),Object.assign(this.componentRef.instance,this.ModalCompParameters)},H.prototype.setViewContainerRef=function(t){this.modalbodyViewContainerRef=t},H.prototype.getText=function(){return null===this.componentRef?"":this.componentRef.instance.FormName()},H.prototype.getStyle=function(){var t,e={};return this.componentRef!=undefined&&(t=this.componentRef.instance,e.width=t.Width(),e.height=t.Height(),t.IsCenteredToWindow()?e.margin="auto":(e["margin-left"]=t.X()+"px",e["margin-top"]=t.Y()+"px")),e},H.prototype.getClientAreaStyles=function(){var t,e,n={};return this.componentRef!=undefined&&(this.componentRef.instance,e=this.getShowTitleBar()&&!c.isNullOrUndefined(this.headerElementRef)?this.headerElementRef.nativeElement.offsetHeight+1:0,c.isNullOrUndefined(this.foregroundElementRef)||(t=this.foregroundElementRef.nativeElement.offsetHeight,n.height=t-e+"px",e=this.foregroundElementRef.nativeElement.offsetWidth,n.width=e+"px"),n.overflow="auto"),n},H.prototype.getShowTitleBar=function(){if(this.componentRef!=undefined)return this.componentRef.instance.ShowTitleBar()},H.prototype.OnClose=function(){this.onClose.emit()},H.prototype.OnBackgroundClick=function(){this.componentRef.instance.ShouldCloseOnBackgroundClick()&&this.OnClose()},H.decorators=[{type:i.Component,args:[{selector:"app-magic-overlay-container",template:'\n <div>\n <div class="modal-background" (click)="OnBackgroundClick()">\n <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white" *ngIf="!getShowTitleBar()">X</button>\n </div>\n <div #modalForeground class="modal-foreground" [ngStyle]="getStyle()">\n <div #modalheader class="modal-header" *ngIf="getShowTitleBar()">\n {{getText()}}\n <button (click)="OnClose()" style="float:right" tabindex="-1">X</button>\n </div>\n <div [ngStyle]="getClientAreaStyles()">\n <div #modalbody magicViewContainerRef>\n </div>\n </div>\n </div>\n </div>\n ',styles:[".modal-foreground{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}"]}]}],H.ctorParameters=function(){return[{type:i.Injector},{type:i.ComponentFactoryResolver}]},H.propDecorators={headerElementRef:[{type:i.ViewChild,args:["modalheader",{"static":!1}]}],foregroundElementRef:[{type:i.ViewChild,args:["modalForeground",{"static":!1}]}],ModalComp:[{type:i.Input}],ModalCompParameters:[{type:i.Input}],onClose:[{type:i.Output}]},H);function H(t,e){var n=U.call(this)||this;return n.injector=t,n.componentFactoryResolver=e,n.ModalComp=null,n.ModalCompParameters={},n.onClose=new i.EventEmitter,n.componentRef=null,n}var W=(Y.prototype.getComponent=function(){return j},Y.decorators=[{type:i.Injectable}],Y);function Y(){}var z=(X.prototype.OnClose=function(t){this.onClose.emit(t)},X.decorators=[{type:i.Component,args:[{selector:"mg-base-alert",template:"",styles:[""]}]}],X.propDecorators={title:[{type:i.Input}],message:[{type:i.Input}],onClose:[{type:i.Output}]},X);function X(){this.onClose=new i.EventEmitter}var K=(q.prototype.OnClose=function(){this.onClose.emit()},q.decorators=[{type:i.Component,args:[{selector:"mg-base-alert",template:"",styles:[""]}]}],q.propDecorators={title:[{type:i.Input}],message:[{type:i.Input}],onClose:[{type:i.Output}]},q);function q(){this.onClose=new i.EventEmitter}var $=(J.prototype.ngOnInit=function(){var t,e=this,n=this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);null==n?null!=(t=this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName))?this.loader.load(t.modulePath+"#"+t.moduleName).then(function(t){n=t.create(e.injector),e.loadComponent(n)}):this.loadComponent(null):this.loadComponent(n)},J.prototype.loadComponent=function(t){var e=this;this.Parameters.ModalComp=this.componentListMagicService.getComponent(this.Parameters.MagicFormName,!c.isNullOrUndefined(this.Parameters.MagicFormName));var n=(null!=t?t:this).componentFactoryResolver.resolveComponentFactory(this.Component),t=this.overlayContentViewContainerRef.createComponent(n),n=J.allowedBaseComps.get(this.OverlayTypeParam);t.instance instanceof n.comp?(Object.assign(t.instance,this.Parameters),t.instance.onClose.subscribe(function(t){e.onClose.emit(t)})):(n="Provided window container should subclass of : "+n.error+"window will not work properly.",alert(n))},J.prototype.setViewContainerRef=function(t){this.overlayContentViewContainerRef=t},J.prototype.GetRootElement=function(){return this.overlayContainerWrapperElementRef.nativeElement},J.prototype.DetectChanges=function(){this.changeDetectorRef.detectChanges()},J.allowedBaseComps=new Map([[m.OverlayType.Overlay,{comp:G,error:"BaseMagicOverlayContainer . Overlay "}],[m.OverlayType.Alert,{comp:K,error:"BaseMagicAlertComponent. Alert "}],[m.OverlayType.ConfirmationBox,{comp:z,error:"BaseMagicConfirmComponent. Confirmation "}]]),J.decorators=[{type:i.Component,args:[{selector:"app-magic-overlay-container-wrapper",template:'\n <div>\n <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" magicFocus></div>\n <div class="overlay-container-wrapper-background" #overlayContainerWrapper>\n <div #overlayContent magicViewContainerRef>\n </div>\n </div>\n <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" ></div>\n </div>\n ',styles:["\n .overlay-container-wrapper-background {\n /* modal background fixed across whole screen */\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "]}]}],J.ctorParameters=function(){return[{type:x},{type:i.NgModuleFactoryLoader},{type:i.Injector},{type:i.ComponentFactoryResolver},{type:i.ChangeDetectorRef}]},J.propDecorators={Component:[{type:i.Input}],Parameters:[{type:i.Input}],OverlayTypeParam:[{type:i.Input}],onClose:[{type:i.Output}],overlayContainerWrapperElementRef:[{type:i.ViewChild,args:["overlayContainerWrapper",{"static":!0}]}]},J);function J(t,e,n,o,r){this.componentListMagicService=t,this.loader=e,this.injector=n,this.componentFactoryResolver=o,this.changeDetectorRef=r,this.Component=null,this.Parameters={},this.onClose=new i.EventEmitter}var Q,Z=(C(tt,Q=K),tt.decorators=[{type:i.Component,args:[{selector:"sample-magic-alert-component",template:'<div>\n <div class="mg-message-background">\n <h2> {{title}}</h2>\n <p>{{message}} </p>\n\n <button (click)="OnClose()">OK</button>\n </div>\n </div>',styles:["\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n "]}]}],tt);function tt(){return null!==Q&&Q.apply(this,arguments)||this}var et,nt=(C(ot,et=z),ot.decorators=[{type:i.Component,args:[{selector:"sample-magic-confirmation-box",template:'<div>\n <div class="mg-message-background">\n <h2> {{title}}</h2>\n {{message}}\n <br>\n <br>\n\n <button (click)="OnClose(true)">OK</button>\n <button class="cancel" (click)="OnClose(false)">Cancel</button>\n </div>\n </div>',styles:["\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n \n button.cancel {\n background-color: #C1C1C1;\n }\n "]}]}],ot);function ot(){return null!==et&&et.apply(this,arguments)||this}var rt=(it.prototype.showDefaultConfirmations=function(){return!0},it.prototype.getAlertComponent=function(){return Z},it.prototype.getConfirmtionComponent=function(){return nt},it.decorators=[{type:i.Injectable}],it);function it(){}var at=(st.isConfirmBox=function(t){t&=15;return t===m.Styles.MSGBOX_BUTTON_OK_CANCEL||t===m.Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE||t===m.Styles.MSGBOX_BUTTON_YES_NO_CANCEL||t===m.Styles.MSGBOX_BUTTON_YES_NO||t===m.Styles.MSGBOX_BUTTON_RETRY_CANCEL},st.convertToExcpectedResultBox=function(t,e){var n=15&t,t=m.Styles.MSGBOX_RESULT_OK;return n===m.Styles.MSGBOX_BUTTON_OK?t=m.Styles.MSGBOX_RESULT_OK:n===m.Styles.MSGBOX_BUTTON_OK_CANCEL?t=e?m.Styles.MSGBOX_RESULT_OK:m.Styles.MSGBOX_RESULT_CANCEL:n===m.Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE?t=e?m.Styles.MSGBOX_RESULT_ABORT:m.Styles.MSGBOX_RESULT_RETRY:n===m.Styles.MSGBOX_BUTTON_YES_NO_CANCEL||n===m.Styles.MSGBOX_BUTTON_YES_NO?t=e?m.Styles.MSGBOX_RESULT_YES:m.Styles.MSGBOX_RESULT_NO:n===m.Styles.MSGBOX_BUTTON_RETRY_CANCEL&&(t=e?m.Styles.MSGBOX_RESULT_RETRY:m.Styles.MSGBOX_RESULT_CANCEL),t},st.showConfirmationBox=function(t,e,n){m.Styles.MSGBOX_RESULT_OK;e=t+"\n\n"+e;return this.isConfirmBox(n)?confirm(e):(alert(e),!0)},st);function st(){}var ct=(lt.prototype.init=function(t,e){this.overlayWindowsContainerViewRef=t,this.overlayWindowFocusManager=new ut(e)},lt.prototype.open=function(t,e,n){var o=this,r=null!=this.componentList.lazyLoadModulesMap&&this.componentList.lazyLoadModulesMap.hasOwnProperty(t)?null:this.componentList.getComponent(t);this.createModalComponent({MagicFormName:t,ModalComp:r,ModalCompParameters:{taskIdParam:e,taskDescription:n}},this.overlayContainerMagicProvider.getComponent(),m.OverlayType.Overlay).instance.onClose.subscribe(function(){var t=a.getGuiEventObj("close",null,0);t.TaskID=e,o.engineMagicService.insertEvent(t)})},lt.prototype.close=function(t){this.overlayWindowsContainerViewRef.remove(),this.overlayWindowFocusManager.popDialog();var e=a.getGuiEventObj("dispose",null,0);e.TaskID=t,this.engineMagicService.insertEvent(e)},lt.prototype.openConfirmationBox=function(t,e,n){var o,r,i=this;this.confirmationComponentsMagicProvider.showDefaultConfirmations()?(r=at.showConfirmationBox(t,e,n),this.finishConfirmation(n,r)):(o=at.isConfirmBox(n)?this.confirmationComponentsMagicProvider.getConfirmtionComponent():this.confirmationComponentsMagicProvider.getAlertComponent(),r=at.isConfirmBox(n)?m.OverlayType.ConfirmationBox:m.OverlayType.Alert,this.createModalComponent({title:t,message:e},o,r).instance.onClose.subscribe(function(t){i.overlayWindowsContainerViewRef.remove(),i.overlayWindowFocusManager.popDialog(),i.finishConfirmation(n,t)}))},lt.prototype.finishConfirmation=function(t,e){var n=a.getGuiEventObj("confirmationClosed",null,0);n.keyCode=at.convertToExcpectedResultBox(t,e),this.engineMagicService.insertEvent(n)},lt.prototype.createModalComponent=function(t,e,n){var t={Component:e,Parameters:t,OverlayTypeParam:n},n=this.componentFactoryResolver.resolveComponentFactory($),n=this.overlayWindowsContainerViewRef.createComponent(n);return Object.assign(n.instance,t),this.overlayWindowFocusManager.pushDialog(n.instance.GetRootElement()),n.instance.DetectChanges(),n},lt.decorators=[{type:i.Injectable}],lt.ctorParameters=function(){return[{type:i.ComponentFactoryResolver},{type:x},{type:D},{type:W},{type:rt}]},lt);function lt(t,e,n,o,r){this.componentFactoryResolver=t,this.componentList=e,this.engineMagicService=n,this.overlayContainerMagicProvider=o,this.confirmationComponentsMagicProvider=r,this.overlayWindowFocusManager=null}var ut=(pt.prototype.pushDialog=function(t){0===this.openDialogList.length&&(this.focusListener=this.trapFocus.bind(this),document.addEventListener("focus",this.focusListener,!0)),this.openDialogList.push(new mt(t,document.activeElement instanceof HTMLElement?document.activeElement:null))},pt.prototype.popDialog=function(){var t=this.openDialogList.pop();this.attemptFocus(t.FocusElementOnClose),0===this.openDialogList.length&&(document.removeEventListener("focus",this.focusListener,!0),this.focusListener=null)},pt.prototype.trapFocus=function(t){var e;this.ignoreUtilFocusChanges||0<this.openDialogList.length&&((e=this.openDialogList[this.openDialogList.length-1].RootElement).contains(t.target)?this.lastFocus=t.target:(this.rootMagicElement.contains(t.target)&&(this.focusFirstDescendant(e),this.lastFocus==document.activeElement&&this.focusLastDescendant(e)),this.lastFocus=document.activeElement))},pt.prototype.focusFirstDescendant=function(t){for(var e=0;e<t.childNodes.length;e++){var n=t.childNodes[e];if(this.attemptFocus(n)||this.focusFirstDescendant(n))return!0}return!1},pt.prototype.focusLastDescendant=function(t){for(var e=t.childNodes.length-1;0<=e;e--){var n=t.childNodes[e];if(this.attemptFocus(n)||this.focusLastDescendant(n))return!0}return!1},pt.prototype.attemptFocus=function(t){if(!this.isFocusable(t))return!1;this.ignoreUtilFocusChanges=!0;try{t.focus()}catch(e){}return this.ignoreUtilFocusChanges=!1,document.activeElement===t},pt.prototype.isFocusable=function(t){if(c.isNullOrUndefined(t))return!1;if(0<t.tabIndex||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.tabIndex<0)return!1;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!=t.rel;case"INPUT":return"hidden"!=t.type&&"file"!=t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},pt);function pt(t){this.rootMagicElement=null,this.openDialogList=new Array(0),this.ignoreUtilFocusChanges=!1,this.lastFocus=null,this.focusListener=null,this.rootMagicElement=t}var mt=(Object.defineProperty(dt.prototype,"RootElement",{get:function(){return this.rootElement},enumerable:!0,configurable:!0}),Object.defineProperty(dt.prototype,"FocusElementOnClose",{get:function(){return this.focusElementOnClose},enumerable:!0,configurable:!0}),dt);function dt(t,e){this.rootElement=t,this.focusElementOnClose=e}var ht=(gt.prototype.getIsLoggenIn=function(){return this.magic.getIsLoggedIn()},Object.defineProperty(gt.prototype,"taskId",{get:function(){return this._taskId},set:function(t){this._taskId=t},enumerable:!0,configurable:!0}),Object.defineProperty(gt.prototype,"ScreenControlsData",{get:function(){return this.Records.list[0]},enumerable:!0,configurable:!0}),gt.prototype.settemplate=function(t){this.template=t},gt.prototype.buildScreenModeControls=function(){var t,e,n=new s.FormGroup({});for(t in this.template)"0"==this.template[t]&&(e=new s.FormControl(""),this.setStubValue(0,e,t),n.addControl(t,e));this.ScreenModeControls=n},gt.prototype.isTableControl=function(t){return"1"==this.template[t]},gt.prototype.getMgInputDateFormat=function(){return this.mgInputDateFormat},gt.prototype.getFormControl=function(t,e){var n,t=this.isTableControl(e)?this.formGroups[t]:this.ScreenModeControls;return c.isNullOrUndefined(t)||(t.get(e),n=t.controls[e]),n},gt.prototype.setInputTextValue=function(t,e,n){this.setValue(t,e,this.ConvertValToNative(t,0,n));t=this.getFormControl(e,t);c.isNullOrUndefined(n)||t.setValue(n)},gt.prototype.buildTableRowControls=function(t){var e,n,o=new s.FormGroup({});for(e in this.template)"1"==this.template[e]&&(n=new s.FormControl(""),this.setStubValue(t,n,e),o.addControl(e,n));this.formGroups[t]=o},gt.prototype.updateRecordsBeforeCurrentView=function(t){this.Records.recordsBeforeCurrentView=t},gt.prototype.setIncludesFirst=function(t){this.Records.includesFirst=t},gt.prototype.setIncludesLast=function(t){this.Records.includesLast=t},gt.prototype.markRowAsCreated=function(t){this.Records.markRowAsCreated(t)},gt.prototype.markRowAsNotCreated=function(t){this.Records.markRowAsNotCreated(t)},gt.prototype.startRowEditing=function(t){this.Records.startRowEditing(t)},gt.prototype.stopRowEditing=function(t){this.Records.stopRowEditing(t)},gt.prototype.isRowInRowEditing=function(t){return this.Records.isRowInRowEditing(t)},gt.prototype.setIsEmptyDataView=function(t){this.Records.isEmptyDataView!==t&&(this.Records.isEmptyDataView=t,this.tableService.refreshDataSource(),this.refreshView())},gt.prototype.initTask=function(t,e){var n=this;this.Records.createFirst(),this.oldPageSize=0,this.IsStub()?this.loadData():(this.taskId=t,this.settemplate(e)),this.buildScreenModeControls(),c.isNullOrUndefined(this.subscribeRefreshDom)||this.subscribeRefreshDom.unsubscribe(),c.isNullOrUndefined(this.subscribeInteractiveCommands)||this.subscribeInteractiveCommands.unsubscribe(),this.subscribeRefreshDom=this.magic.refreshDom.pipe(r.filter(function(t){return t.TaskTag===n.taskId})).subscribe(function(t){n.executeCommand(t)}),this.subscribeInteractiveCommands=this.magic.interactiveCommands.pipe(r.filter(function(t){return t.TaskTag===n.taskId})).subscribe(function(t){n.executeInteractiveCommand(t)})},gt.prototype.refreshView=function(){this.detectChanges.next("")},gt.prototype.insertEvent=function(t){t.TaskID=this.taskId,this.magic.insertEvent(t)},gt.prototype.GetControlPictureMask=function(t){return this.magic.GetControlPictureMask(this.taskId,t)},gt.prototype.ValidateControlValue=function(t,e){return this.magic.ValidateControlValue(this.taskId,t,e)},gt.prototype.GetRangedValue=function(t,e){return this.magic.GetRangedValue(this.taskId,t,e)},gt.prototype.GetFldRanges=function(t){return this.magic.GetFldRanges(this.taskId,t)},gt.prototype.getProperty=function(t,e,n){if(c.isNullOrUndefined(n)&&(n="0"),this.IsStub())return this.getPropertyStub(this.Records.list[n],t,e);var o=this.Records.list[n];return c.isNullOrUndefined(o)?void 0:this.Records.list[n].getProperty(t,e)},gt.prototype.getPropertyStub=function(t,e,n){return e in(t=t.ControlsProperties)&&n in t[e].properties?t[e].properties[n]:""},gt.prototype.getStyleStub=function(t,e,n){return(t=t.ControlsProperties)[e].stylesMap.get(n)},gt.prototype.getClasses=function(t,e){return c.isNullOrUndefined(e)&&(e="0"),this.Records.list[e].getControlMetadata(t).classes},gt.prototype.getStyle=function(t,e,n){if(c.isNullOrUndefined(n)&&(n="0"),this.IsStub())return this.getStyleStub(this.Records.list[n],t,e);t=this.Records.list[n].getControlMetadata(t).stylesMap.get(e);return L.magicValueGetStyle(e,t)},gt.prototype.getValue=function(t,e){return c.isNullOrUndefined(e)&&(e="0"),this.Records.list.length>+e?this.Records.list[e].values[t]:""},gt.prototype.setValue=function(t,e,n){return this.Records.list[e].setValue(t,n)},gt.prototype.executeInteractiveCommand=function(t){N.executeInteractiveCommand(this,t,this.overlayWindowService),this.interactiveCommands.next(t)},gt.prototype.handleSetProperty=function(t,e){var n=t.CtrlName,o=t.line||0,o=this.getGuiRowId(o,e);t.Operation===m.HtmlProperties.SelectedRow?t.obj1!==m.GuiConstants.NO_ROW_SELECTED&&(o=this.getGuiRowId(t.obj1,!0),this.Records.list[o].getControlMetadata(n).properties.set(t.Operation,t.line),this.tableService.selectRow(o.toString()),this.OnSelectedRowChanged.emit(o.toString())):(t.Operation===m.HtmlProperties.Enabled&&(e=this.getFormControl(o.toString(),n),c.isNullOrUndefined(e)||(t.obj1?e.enable():e.disable())),this.Records.list[o].getControlMetadata(n).properties.set(t.Operation,t.obj1))},gt.prototype.executeCommand=function(t){var e=t.line||0,n=0,o=t.CtrlName,r=this.isTableControl(o);switch(null!==t.obj&&(r=r||t.obj.IsTableChild),n=this.getGuiRowId(e,r),t.CommandType){case m.CommandType.SET_IS_LOGGED_IN:break;case m.CommandType.SET_TABLE_TOP_INDEX:this.tableService.setTableTopIndex(t.number);break;case m.CommandType.REFRESH_TASK:this.tableService.refreshDataSource(),this.refreshView();break;case m.CommandType.SET_TABLE_ITEMS_COUNT:c.isUndefined(t.number)||this.tableService.updateTableSize(t.number);break;case m.CommandType.SET_RECORDS_BEFORE_CURRENT_VIEW:this.updateRecordsBeforeCurrentView(t.number);break;case m.CommandType.CREATE_TABLE_ROW:n=this.getGuiRowId(t.number,!0),this.buildTableRowControls(n),this.markRowAsCreated(n);break;case m.CommandType.SET_IS_ROW_EDITING:n=this.getGuiRowId(t.line,t.value),this.startRowEditing(n);break;case m.CommandType.SET_NOT_IS_ROW_EDITING:n=this.getGuiRowId(t.line,t.value),this.stopRowEditing(n);break;case m.CommandType.UNDO_CREATE_TABLE_ROW:this.markRowAsNotCreated(this.getGuiRowId(t.number,!0));break;case m.CommandType.SET_TABLE_INCLUDES_FIRST:this.setIncludesFirst(t.Bool1);break;case m.CommandType.SET_TABLE_INCLUDES_LAST:this.setIncludesLast(t.Bool1);break;case m.CommandType.SET_PROPERTY:this.handleSetProperty(t,r);break;case m.CommandType.PROP_SET_USER_PROPERTY:(i=this.Records.list[n].getControlMetadata(o)).userProperties.get(t.Operation)!==t.obj1&&(i.userProperties.set(t.Operation,t.obj1),this.customPropertiesSubject.next({propertyName:o+"~"+t.Operation,value:t.obj1,rowId:n}));break;case m.CommandType.PROP_SET_CUSTOM_VALIDATOR:var i=this.Records.list[n].getControlMetadata(o),a=this.getFormControl(n.toString(),o);null!=a&&(i.customValidators.set(t.Operation,t.obj1),null!=a.validator?a.setValidators([a.validator,this.customValidator(n.toString(),o)]):a.setValidators(this.customValidator(n.toString(),o)));break;case m.CommandType.SET_CLASS:(i=this.Records.list[n].getControlMetadata(o)).setClass(t.Operation,t.obj1);break;case m.CommandType.SET_STYLE:(i=this.Records.list[n].getControlMetadata(o)).setStyle(t.Operation,t.obj1);break;case m.CommandType.SET_ATTRIBUTE:(i=this.Records.list[n].getControlMetadata(o)).dataType=String.fromCharCode(t.number);break;case m.CommandType.SET_VALUE:this.Records.list[n].values[o]=t.value;i=this.getFormControl(n.toString(),o);c.isNullOrUndefined(i)||i.setValue(this.ConvertValFromNative(o,t.line,t.value));break;case m.CommandType.CREATE_SUB_FORM:this.mgSubformService.addSubformComp(t.CtrlName,t.userDropFormat.toString(),t.str,t.fileName,t.contextID,t.params,t.Bool1);break;case m.CommandType.CLOSE_SUB_FORM:this.mgSubformService.deleteSubformComp(t.CtrlName,t.userDropFormat.toString());break;case m.CommandType.SET_EMPTY_DATAVIEW:this.setIsEmptyDataView(t.Bool1)}this.refreshDom.next(t)},gt.prototype.customValidator=function(l,u){var p=this;return function(t){var e,n,o,r=p.Records.list[l].getControlMetadata(u);try{for(var i=S(r.customValidators.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;if(!r.customValidators.get(s).isValid())return(o={})[s]=!0,o}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}return null}},gt.prototype.ConvertValToNative=function(t,e,n){switch(this.Records.list[0].getControlMetadata(t).dataType){case l.StorageAttribute.BOOLEAN:if("string"!=typeof n)return n;var o=this.GetFldRanges(t),r=o.indexOf(","),i=o.substr(0,r),a=o.substr(r+1);return!!u.NString.Equals(n,i,!0)||!u.NString.Equals(n,a,!0)&&n;case l.StorageAttribute.TIME:if("string"!=typeof n)return n;r=n.indexOf(":",0),o=+n.substr(0,r),i=+n.substr(r+1,2),a=0;5<n.length&&0<=(r=n.indexOf(":",r+1))&&(a=+n.substr(r+1,2)),0<n.indexOf("PM")&&(o+=12);r=new Date;return r.setHours(o),r.setMinutes(i),r.setSeconds(a),r;case l.StorageAttribute.NUMERIC:return null===n?0:n;default:return n}},gt.prototype.ConvertValFromNative=function(t,e,n){switch(this.Records.list[0].getControlMetadata(t).dataType){case l.StorageAttribute.TIME:if(n instanceof Date){var o=new u.StringBuilder,r=9<n.getHours()?"{0}":"0{0}";return o.AppendFormat(r,n.getHours().toString()),o.Append(":"),r=9<n.getMinutes()?"{0}":"0{0}",o.AppendFormat(r,n.getMinutes().toString()),0<n.getSeconds()&&(o.Append(":"),r=9<n.getSeconds()?"{0}":"0{0}",o.AppendFormat(r,n.getSeconds().toString())),o.ToString()}return n;case l.StorageAttribute.BOOLEAN:var i=this.Records.list[0].getControlMetadata(t);if("boolean"==typeof n&&i.rangeValidator){r=this.GetFldRanges(t),o=r.indexOf(","),i=r.substr(0,o),r=r.substr(o+1);return n?i:r}return n;default:return n}},gt.prototype.resize=function(t,e){var n=a.getGuiEventObj("resize","table",0);n.PageSize=t,n.Line=e,this.insertEvent(n)},gt.prototype.onScrollDown=function(){var t;this.Records.includesLast||((t=a.getGuiEventObj("getRows","table",0)).Line=this.formGroups.length,this.insertEvent(t))},gt.prototype.setTitle=function(t){this.mgTitleService.setTitle(t)},gt.prototype.getGuiRowId=function(t,e){return e?t+this.Records.recordsBeforeCurrentView:0},gt.prototype.getDvRowId=function(t){return t-this.Records.recordsBeforeCurrentView},gt.prototype.dispose=function(){this.refreshDom.complete(),this.detectChanges.complete(),this.subscribeInteractiveCommands.unsubscribe(),this.subscribeRefreshDom.unsubscribe(),this.interactiveCommands.complete(),this.customPropertiesSubject.complete(),this.OnSelectedRowChanged.complete()},gt.prototype.onComboboxSelectionChanged=function(t,e,n){n=a.getGuiEventObj("selectionchanged",e,n);if("number"==typeof t)n.Value=t;else if(c.isNullOrUndefined(t.target))n.Value=t.value;else{for(var o=new Array(t.target.selectedOptions.length),r=0;r<t.target.selectedOptions.length;r++)o[r]=t.target.selectedOptions[r].index;n.Value=o.join(",")}this.insertEvent(n)},gt.prototype.onListBoxSelectionChanged=function(t,e){for(var e=a.getGuiEventObj("selectionchanged",e,0),n=c.isNullOrUndefined(t.target)?t.source.selectedOptions.selected:t.target.selectedOptions,o=n.length,r=new Array(o),i=0;i<o;i++)c.isNullOrUndefined(t.target)?r[i]=n[i].value:r[i]=n[i].index;e.Value=r,this.insertEvent(e)},gt.prototype.onCheckChanged=function(t,e,n){n=a.getGuiEventObj("selectionchanged",e,n=void 0===n?0:n);"boolean"==typeof t?n.Value=t:"undefined"==typeof t.target?n.Value=t.checked:n.Value=t.target.checked,this.insertEvent(n)},gt.prototype.mgOnTabSelectionChanged=function(t,e){t=a.getGuiEventObj("selectionchanged",t,0);t.Value=e.toString(),this.insertEvent(t)},gt.prototype.mgOnRadioSelectionChanged=function(t,e){var n=this.getFormControl("0",e),e=a.getGuiEventObj("selectionchanged",e,0);"string"!=typeof n.value?e.Value=n.value.index:e.Value=n.value,this.insertEvent(e)},gt.prototype.close=function(){this.insertEvent(a.getGuiEventObj("close",null,0))},gt.prototype.IsStub=function(){return this.magic.isStub},gt.prototype.saveData=function(t){this.magic.saveData(t)},gt.prototype.createData=function(){var t={records:this.Records,template:this.template},t="loadData():any {\n let stubData = "+JSON.stringify(t)+";\n this.loadStubData(stubData);}";console.log(t),this.saveData(t)},gt.prototype.loadStubData=function(t){this.Records=t.records,this.settemplate(t.template),this.taskId="1";for(var e=0;e<this.Records.list.length;e++)this.buildTableRowControls(e)},gt.prototype.loadData=function(){alert("Please, overwrite method loadData")},gt.prototype.setStubValue=function(t,e,n){if(this.IsStub())try{var o=this.Records.list[t].values[n];e.setValue(o)}catch(r){}},gt.decorators=[{type:i.Injectable}],gt.ctorParameters=function(){return[{type:D},{type:ct}]},gt);function gt(t,e){this.magic=t,this.overlayWindowService=e,this.Records=new P,this.formGroups=[],this.refreshDom=new o.Subject,this.detectChanges=new o.Subject,this.interactiveCommands=new o.Subject,this.OnSelectedRowChanged=new i.EventEmitter,this.customPropertiesSubject=new o.Subject,this.oldPageSize=0,this.Records.setGuiTopIndex(0),this.mgInputDateFormat=null}var ft=(yt.prototype.ngOnInit=function(){var e=this;this.rowChangedSubscriber=this._task.OnSelectedRowChanged.pipe(r.filter(function(t){return t===e.rowId})).subscribe(function(t){e.isInView(e.htmlElement)||e.htmlElement.scrollIntoView()})},yt.prototype.isInView=function(t){var e=t.getBoundingClientRect(),t=t.parentElement.getBoundingClientRect();return e.top>=t.top&&e.bottom<=t.bottom},yt.prototype.ngOnDestroy=function(){null!==this.rowChangedSubscriber&&this.rowChangedSubscriber.unsubscribe()},yt.prototype.onClick=function(t){""!=this.rowId&&(this._task.insertEvent(a.getGuiEventObj("click","magicRow",+this.rowId)),event.cancelBubble=!0)},yt.decorators=[{type:i.Directive,args:[{selector:"[magicRow]"}]}],yt.ctorParameters=function(){return[{type:ht},{type:i.ElementRef}]},yt.propDecorators={rowId:[{type:i.Input,args:["magicRow"]}],onClick:[{type:i.HostListener,args:["click",["$event"]]}]},yt);function yt(t,e){this._task=t,this.element=e,this.rowChangedSubscriber=null,this.htmlElement=this.element.nativeElement}var vt=(Object.defineProperty(Ct.prototype,"magic",{set:function(t){this.id=t,this.selector="magic"},enumerable:!0,configurable:!0}),Object.defineProperty(Ct.prototype,"eventsOnly",{set:function(t){console.log("eventsOnly"),this.eventsOnlyVal=!0},enumerable:!0,configurable:!0}),Object.defineProperty(Ct.prototype,"task",{get:function(){return this._task},enumerable:!0,configurable:!0}),Ct.prototype.regEvents=function(){var o=this;this.eventHandlers.focusin=this.OnFocus.bind(this),Object.keys(this.eventHandlers).forEach(function(t){o.focusUnlistener=o.renderer.listen(o.htmlElement,t,o.eventHandlers[t])});["click","mousedown","dblclick"].forEach(function(e){o.renderer.listen(o.htmlElement,e,function(t){o.task.insertEvent(a.getGuiEventObj(e,o.id,+o.rowId)),t.cancelBubble=!0})}),this.renderer.listen(this.htmlElement,"change",function(t){var e=a.getGuiEventObj("selectionchanged",o.id,+o.rowId);event.target.selectedIndex!==undefined&&(e.Value=event.target.selectedIndex.toString(),t.cancelBubble=!0,o.task.insertEvent(e))}),e.fromEvent(this.htmlElement,"input").pipe(r.map(function(t){return t.target.value}),r.debounceTime(200)).subscribe(function(t){var e;o.task.getProperty(o.id,m.HtmlProperties.BindingLevel,o.rowId)!==l.BindingLevel.Character||(e=o.task.Records.list[0].getControlMetadata(o.id).dataType)!==l.StorageAttributeType.Date&&e!=l.StorageAttributeType.Time&&o.task.mgAccessorService.setValueToControl(o.id,t,!0)}),this.renderer.listen(this.htmlElement,"keydown",function(t){var e=a.getGuiEventObj("keydown",o.id,+o.rowId);e.modifiers=m.Modifiers.MODIFIER_NONE,t.altKey&&t.keyCode!==m.GuiConstants.KEY_ALT?e.modifiers=m.Modifiers.MODIFIER_ALT:t.ctrlKey&&t.keyCode!==m.GuiConstants.KEY_CTRL&&(e.modifiers=m.Modifiers.MODIFIER_CTRL);var n=t.keyCode===m.GuiConstants.KEY_PG_UP||t.keyCode===m.GuiConstants.KEY_PG_DOWN||t.keyCode===m.GuiConstants.KEY_LEFT||t.keyCode===m.GuiConstants.KEY_RIGHT||t.keyCode===m.GuiConstants.KEY_UP||t.keyCode===m.GuiConstants.KEY_DOWN||t.keyCode===m.GuiConstants.KEY_ESC||t.keyCode===m.GuiConstants.KEY_HOME||t.keyCode===m.GuiConstants.KEY_END||t.keyCode===m.GuiConstants.KEY_RETURN||t.keyCode>=m.GuiConstants.KEY_F1&&t.keyCode<=m.GuiConstants.KEY_F12;e.modifiers===m.Modifiers.MODIFIER_NONE&&!n||(e.keyCode=t.keyCode,t.keyCode===m.GuiConstants.KEY_ESC&&(t.keyCode!==m.GuiConstants.KEY_ESC||Ct.opened)||(t.cancelBubble=!0),o.task.insertEvent(e))})},Ct.prototype.OnFocus=function(){this.task.insertEvent(a.getGuiEventObj("focus",this.id,+this.rowId)),event.cancelBubble=!0},Ct.prototype.IsSameElement=function(t){var e=t.line;return this.task.isTableControl(t.CtrlName)&&(e=this.task.getGuiRowId(e,!0)),t.CtrlName===this.id&&(e===+this.rowId||0===e&&c.isNullOrUndefined(this.rowId))},Ct.prototype.IsSameComponent=function(t){return t.controlName===this.id},Ct.prototype.regUpdatesUI=function(){var n=this;this.subscribeRefreshDom=this.task.refreshDom.pipe(r.filter(function(t){return n.IsSameElement(t)})).subscribe(function(t){c.isNullOrUndefined(n.rowId)&&(n.rowId="0");try{n.eventsOnlyVal||n.handleCommand(t)}catch(e){console.dir(e)}}),this.subscribeInteractiveCommands=this.task.interactiveCommands.pipe(r.filter(function(t){return n.IsSameComponent(t)})).subscribe(function(t){n.handleInteractiveCommands(t)})},Ct.prototype.ngOnInit=function(){this.regEvents(),this.regUpdatesUI()},Ct.prototype.handleCommand=function(t){switch(t.CommandType){case m.CommandType.SET_PROPERTY:this.handleSetProperty(t);break;case m.CommandType.SET_FOCUS:this.focusUnlistener(),this.htmlElement.focus(),this.focusUnlistener=this.renderer.listen(this.htmlElement,"focusin",this.eventHandlers.focusin)}},Ct.prototype.handleInteractiveCommands=function(t){if(t._commandType===m.InteractiveCommandType.CALL_JS){var e=t._str,n=t.arguments,o=this.vcRef._view.component,r="";try{c.isNullOrUndefined(o[e])?console.error("Instance method "+e+" does not exists"):r=o[e].apply(o,n)}catch(i){console.error(i.message)}t.resultString=r}},Ct.prototype.handleSetProperty=function(t){t.Operation===m.HtmlProperties.ReadOnly&&(1!=t.obj1?this.renderer.removeAttribute(this.htmlElement,t.Operation):this.renderer.setAttribute(this.htmlElement,t.Operation,t.str))},Ct.prototype.ngOnDestroy=function(){this.subscribeRefreshDom.unsubscribe()},Ct.opened=!1,Ct.decorators=[{type:i.Directive,args:[{selector:"[magic]"}]}],Ct.ctorParameters=function(){return[{type:ht},{type:i.ElementRef},{type:i.Renderer2},{type:i.ViewContainerRef},{type:ft,decorators:[{type:i.Optional}]}]},Ct.propDecorators={magic:[{type:i.Input,args:["magic"]}],eventsOnly:[{type:i.Input,args:["eventsOnly"]}],rowId:[{type:i.Input}]},Ct);function Ct(t,e,n,o,r){this._task=t,this.element=e,this.renderer=n,this.vcRef=o,this.magicRow=r,this.eventHandlers={},this.eventsOnlyVal=!1,this.htmlElement=this.element.nativeElement,null!=r&&(this.rowId=r.rowId)}var bt,Et=(C(St,bt=vt),Object.defineProperty(St.prototype,"magic",{set:function(t){this.id=t,this.selector="magicnc"},enumerable:!0,configurable:!0}),St.prototype.regEvents=function(){var n=this;if(bt.prototype.regEvents.call(this),this.htmlElement instanceof HTMLSelectElement&&this.htmlElement.addEventListener("change",function(t){var e=a.getGuiEventObj("selectionchanged",n.id,0);e.Value=event.target.selectedIndex.toString(),n.task.insertEvent(e)}),this.isRadio()&&this.htmlElement.addEventListener("change",function(t){n.task.getFormControl("0",n.id);var e=a.getGuiEventObj("selectionchanged",n.id,0);e.Value=t.target.value,n.task.insertEvent(e)}),this.isTabControl())for(var t=this.htmlElement.children[0],e=a.getGuiEventObj("selectionchanged",this.id,0),o=0;o<t.children.length;o++)t.children[o].addEventListener("click",function(t){e.Value=(t.currentTarget.getAttribute("layer")-1).toString(),n.task.insertEvent(e)})},St.prototype.isTabControl=function(){return this.htmlElement instanceof HTMLDivElement&&"magicTabControl"===this.htmlElement.children[0].getAttribute("magicMark")},St.prototype.isRadio=function(){return this.htmlElement instanceof HTMLDivElement&&"magicRadio"===this.htmlElement.children[0].getAttribute("magicMark")},St.prototype.handleCommand=function(t){switch(bt.prototype.handleCommand.call(this,t),t.CommandType){case m.CommandType.SET_CLASS:var e=this._task.Records.list[0].getControlMetadata(this.id);""!=e.removedClass&&(this.htmlElement.classList.remove(e.removedClass),e.removedClass=""),this.htmlElement.classList.add(t.obj1);break;case m.CommandType.SET_VALUE:this.htmlElement instanceof HTMLLabelElement&&(this.htmlElement.innerText=t.value),this.htmlElement instanceof HTMLSelectElement&&(this.htmlElement.value=t.value),this.htmlElement instanceof HTMLAnchorElement&&(this.htmlElement.text=t.value),this.htmlElement instanceof HTMLInputElement&&("checkbox"===this.htmlElement.type?this.htmlElement.checked=t.value:this.htmlElement.value=t.value),this.htmlElement instanceof HTMLButtonElement&&(this.htmlElement.innerHTML=t.value);break;case m.CommandType.SET_PROPERTY:this.handleSetProperty(t);break;case m.CommandType.SET_STYLE:var n=L.magicValueGetStyle(t.Operation,t.obj1),e=L.MagicPropertyToHtmlAttributeMap.get(t.Operation);this.htmlElement.setAttribute("style",e+":"+n)}},St.prototype.handleSetProperty=function(t){var e,n;switch(bt.prototype.handleSetProperty.call(this,t),t.Operation){case m.HtmlProperties.Text:this.htmlElement instanceof HTMLLabelElement&&(this.htmlElement.innerText=t.obj1);break;case m.HtmlProperties.Image:this.htmlElement instanceof HTMLImageElement?this.htmlElement.src=t.obj1:this.htmlElement.setAttribute("src",t.obj1);break;case m.HtmlProperties.ItemsList:if(this.htmlElement instanceof HTMLSelectElement){for(var o=this.htmlElement.length-1;0<=o;o--)this.htmlElement.remove(o);try{for(var r=S(t.obj1),i=r.next();!i.done;i=r.next()){var a=i.value,s=document.createElement("option");s.text=a.displayValue,s.value=a.index,this.htmlElement.add(s)}}catch(p){e={error:p}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}}else if(this.isTabControl()&&0<this.htmlElement.children.length)for(var c=this.htmlElement.children[0],o=0;o<c.children.length;o++)c.children[o]instanceof HTMLButtonElement&&(c.children[o].innerText=t.obj1[o].displayValue);break;case m.HtmlProperties.Visible:this.htmlElement.setAttribute("style","visibility:"+(t.obj1?"visible":"hidden"));break;case m.HtmlProperties.Enabled:!1===t.obj1?this.htmlElement.setAttribute("disabled","true"):this.htmlElement.removeAttribute("disabled");break;case m.HtmlProperties.TabIndex:this.htmlElement.setAttribute(t.Operation,t.obj1);break;case m.HtmlProperties.SelectedValue:if(this.htmlElement instanceof HTMLSelectElement)this.htmlElement.value=t.obj1;else if(this.isTabControl()&&0<this.htmlElement.children.length)for(c=this.htmlElement.children[0],o=0;o<c.children.length;o++){var l=c.children[o],u=l.getAttribute("layer")-1;l instanceof HTMLButtonElement?u==t.obj1?l.classList.add("tab_button_active"):l.classList.remove("tab_button_active"):(u=u==t.obj1?"display: inline":"display: none",l.setAttribute("style",u))}break;case m.HtmlProperties.PlaceHolder:this.htmlElement.setAttribute("placeholder",t.obj1);break;case m.HtmlProperties.Tooltip:this.htmlElement.setAttribute("title",t.obj1);break;case m.HtmlProperties.Password:!1===t.obj1?this.htmlElement.setAttribute("type","text"):this.htmlElement.setAttribute("type","password")}},St.decorators=[{type:i.Directive,args:[{selector:"[magicnc]"}]}],St.ctorParameters=function(){return[{type:ht},{type:i.ElementRef},{type:i.Renderer2},{type:i.ViewContainerRef},{type:ft,decorators:[{type:i.Optional}]}]},St.propDecorators={magic:[{type:i.Input,args:["magicnc"]}]},St);function St(t,e,n,o,r){return bt.call(this,t,e,n,o,r)||this}var Rt=(It.prototype.startCollecting=function(){var e=this;this.count++,l.Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.startCollecting() --- "+this.count),null===this.subscription&&(this.subscription=this.magic.refreshDom.subscribe(function(t){e.commands.push(t)}))},It.prototype.stopCollecting=function(){this.count--,l.Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.stopCollecting() --- "+this.count),0===this.count&&(this.subscription.unsubscribe(),this.subscription=null)},It.prototype.GetCommands=function(e){var n=this,t=this.commands.filter(function(t){return t.TaskTag===e});return t.forEach(function(t){n.commands.Remove(t)}),t},It.decorators=[{type:i.Injectable}],It.ctorParameters=function(){return[{type:D}]},It);function It(t){this.magic=t,this.count=0,this.commands=new u.List,this.subscription=null}var Tt=function(){},wt=(Mt.prototype.AddRouteCommand=function(t){this.pendingRouteCommands.push(t)},Mt.prototype.ExecuteNextCommand=function(){var t=this.pendingRouteCommands.shift();c.isNullOrUndefined(t)||t.callerMgSubformServiceRef.ExecuteRouteCommand(t)},Mt.decorators=[{type:i.Injectable}],Mt);function Mt(){this.pendingRouteCommands=[]}var kt=(Pt.decorators=[{type:i.Component,args:[{selector:"magic-module-entry",template:"<magic-route-outlet></magic-route-outlet>"}]}],Pt);function Pt(){}var Ot=(Dt.prototype.mgGetComp=function(t){if(t in this.subformsDict){t=this.subformsDict[t].formName;if(t)return this.componentList.getComponent(t)}return null},Dt.prototype.mgGetParameters=function(t){return t in this.subformsDict?this.subformsDict[t].parameters:""},Dt.prototype.deleteSubformComp=function(t,e){0<=Object.keys(this.subformsDict).indexOf(t)&&this.subformsDict[t].formName===e&&(this.subformsDict[t]={},this.task.refreshView())},Dt.prototype.addSubformComp=function(t,e,n,o,r,i,a){this.pendingCommandsCollector.startCollecting();var s=!1;c.isNullOrUndefined(r)?(0<=Object.keys(this.subformsDict).indexOf(t)&&this.subformsDict[t].formName===e&&(this.subformsDict[t]={},this.task.refreshView()),this.subformsDict[t]={formName:e,parameters:{taskIdParam:n,taskDescription:o}},s=!0):(a&&(t="primary"),(a=new u.List).push(r),a={callerMgSubformServiceRef:this,routerOutletName:t,formName:e,parameters:{taskIdParam:n,taskDescription:o},routeParams:a=null!==i?a.concat(i):a},null===Dt.currentCallerMgSubformServiceRef?this.ExecuteRouteCommand(a):this.routerCommandsMagicService.AddRouteCommand(a)),s&&this.task.refreshView()},Dt.prototype.ExecuteRouteCommand=function(e){var t,n=e.callerMgSubformServiceRef,o=Dt.getRelativeRoute(n.activatedRoute);n.routesDict[e.routerOutletName]===e.routeParams[0]?n.router.navigate([{outlets:((t={})[e.routerOutletName]=null,t)}],{relativeTo:o}).then(function(t){(Dt.currentCallerMgSubformServiceRef=n).currentRouteDefinition={formName:e.formName,parameters:e.parameters},n.PerformRouterNavigate(e.routerOutletName,e.routeParams)}):((Dt.currentCallerMgSubformServiceRef=n).currentRouteDefinition={formName:e.formName,parameters:e.parameters},0<Dt.routerContainers.length?(o=Dt.routerContainers[0],Dt.routerContainers.shift(),o.initializeComponent()):n.PerformRouterNavigate(e.routerOutletName,e.routeParams))},Dt.prototype.PerformRouterNavigate=function(t,e){var n,o=Dt.getRelativeRoute(this.activatedRoute);this.router.navigate([{outlets:((n={})[t]=e,n)}],{relativeTo:o}).then(function(t){null===t||t||((t=Dt.currentCallerMgSubformServiceRef).currentRouteDefinition=null,Dt.currentCallerMgSubformServiceRef=null,t.pendingCommandsCollector.stopCollecting(),t.routerCommandsMagicService.ExecuteNextCommand())})},Dt.prototype.init=function(){var e=this,t=this.pendingCommandsCollector.GetCommands(this.task.taskId);0<t.length&&(t.forEach(function(t){e.task.executeCommand(t)}),this.task.refreshView()),this.pendingCommandsCollector.stopCollecting()},Dt.prototype.refreshView=function(){this.task.refreshView()},Dt.getRelativeRoute=function(t){return t=t.component==kt?t.parent:t},Dt.currentCallerMgSubformServiceRef=null,Dt.routerContainers=new Array,Dt.decorators=[{type:i.Injectable}],Dt.ctorParameters=function(){return[{type:ht},{type:n.ActivatedRoute},{type:x},{type:Rt},{type:n.Router},{type:wt}]},Dt);function Dt(t,e,n,o,r,i){this.task=t,this.activatedRoute=e,this.componentList=n,this.pendingCommandsCollector=o,this.router=r,this.routerCommandsMagicService=i,this.subformsDict={},this.routesDict={},this.currentRouteDefinition=null}var _t=(xt.prototype.ngOnInit=function(){this.activatedRoute.outlet;var t=Ot.currentCallerMgSubformServiceRef,e=Ot.getRelativeRoute(this.activatedRoute);null==t||null===t.currentRouteDefinition?(this.insertRouteEvent(e),Ot.routerContainers.push(this)):this.initializeComponent()},xt.prototype.insertRouteEvent=function(t){var e=a.getGuiEventObj("RouterNavigate",null,0);e.RouterPath=t.snapshot.routeConfig.path,"primary"!==t.snapshot.outlet&&(e.RouterOutletName=t.snapshot.outlet);t=t.routeConfig.path;if(0<t.length){var n=l.StrUtil.tokenize(t,"/:");e.RouterPath=n[0],e.RouterParams=new u.List;for(var o=1;o<n.length;o++)e.RouterParams.push(this.activatedRoute.snapshot.params[n[o]])}this.containerTaskService.insertEvent(e)},xt.prototype.initializeComponent=function(){var e,t,n,o=this,r=Ot.currentCallerMgSubformServiceRef;null!==r.currentRouteDefinition&&(t=this.componentList.getComponent(r.currentRouteDefinition.formName),t=this.componentFactoryResolver.resolveComponentFactory(t),this.componentRef=this.viewContainerRef.createComponent(t),Object.assign(this.componentRef.instance,r.currentRouteDefinition.parameters),e=Ot.getRelativeRoute(this.activatedRoute),t=l.StrUtil.tokenize(e.snapshot.routeConfig.path,"/:"),r.routesDict[e.snapshot.outlet]=t[0],(this.parentMgSubformService=r).currentRouteDefinition=null,n=!(Ot.currentCallerMgSubformServiceRef=null),e.paramMap.subscribe(function(t){n||o.insertRouteEvent(e),n=!1}),this.parentMgSubformService.refreshView(),this.routerCommandsMagicService.ExecuteNextCommand())},xt.prototype.ngOnDestroy=function(){var t;null!=this.componentRef&&(this.componentRef.instance.task.close(),t=Ot.getRelativeRoute(this.activatedRoute),this.parentMgSubformService.routesDict[t.outlet]="")},xt.decorators=[{type:i.Component,args:[{selector:"magic-route-outlet",template:"\n "}]}],xt.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:D},{type:ht},{type:i.ComponentFactoryResolver},{type:i.ViewContainerRef},{type:x},{type:Rt},{type:wt}]},xt);function xt(t,e,n,o,r,i,a,s){this.activatedRoute=t,this.magic=e,this.containerTaskService=n,this.componentFactoryResolver=o,this.viewContainerRef=r,this.componentList=i,this.pendingCommandsCollector=a,this.routerCommandsMagicService=s,this.componentRef=null,this.parentMgSubformService=null}var At=(Lt.DATE_FMT="dd/MMM/yyyy",Lt);function Lt(){}var Vt,Nt=(C(Ft,Vt=p.DatePipe),Ft.prototype.transform=function(t,e){var n=this._task.GetControlPictureMask(e).getMask(),o=null,r=new Gt;return c.isNullOrUndefined(t)||null===n?t="":(null!=(o=r.ConvertMgDateFormatToAngular(n))&&this._task.isTableControl(e)&&(null==this._task.mgInputDateFormat?this._task.mgInputDateFormat=o:o=this._task.mgInputDateFormat),Vt.prototype.transform.call(this,t,o))},Ft.decorators=[{type:i.Pipe,args:[{name:"magicDate"}]}],Ft.ctorParameters=function(){return[{type:ht}]},Ft);function Ft(t){var e=Vt.call(this,"en-US")||this;return e._task=t,e}var Gt=(Bt.prototype.ConvertMgDateFormatToAngular=function(t){var e=new u.StringBuilder;if(null===t)return"dd-mm-yyyy";for(var n=0;n<t.length;)switch(t.charCodeAt(n)){case l.PICInterface.PIC_YYYY:e.Append("yyyy"),n+=4;break;case l.PICInterface.PIC_MMD:e.Append("MM"),n+=2;break;case l.PICInterface.PIC_YY:e.Append("yy"),n+=2;break;case l.PICInterface.PIC_MMM:for(var o=0;n<t.length&&t.charCodeAt(n)==l.PICInterface.PIC_MMM;n++)o++;3==o&&e.Append("MMM"),3<o&&e.Append("MMMM");break;case l.PICInterface.PIC_DD:e.Append("dd"),n+=2;break;case l.PICInterface.PIC_WWW:for(o=0;n<t.length&&t.charCodeAt(n)==l.PICInterface.PIC_WWW;n++)o++;3==o&&e.Append("EEE"),3<o&&e.Append("EEEE");break;default:e.Append(t.charAt(n)),n++}return e.ToString()},Bt);function Bt(){}var Ut=(jt.prototype.ngAfterViewInit=function(){var t;null==this._task.getFormControl(this.magicDir.rowId,this.magicDir.id)||null!=this._task.mgInputDateFormat||(t=this._task.GetControlPictureMask(this.magicDir.id)).getAttr()==l.StorageAttribute.DATE&&this.formatDate(t)},jt.prototype.onFocusEvent=function(t){var e,n,o,r=this._task.getFormControl(this.magicDir.rowId,this.magicDir.id);null!=r&&((e=this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType)!=l.StorageAttribute.NUMERIC&&e!=l.StorageAttribute.ALPHA&&e!=l.StorageAttribute.UNICODE||(n=this._task.GetControlPictureMask(this.magicDir.id),this.isPatternGenerationNeeded(e,n)?(o=this.generatePattern(e,n),null==r.validator?r.setValidators(s.Validators.pattern(o)):r.setValidators([r.validator,s.Validators.pattern(o)])):e!=l.StorageAttribute.ALPHA&&e!=l.StorageAttribute.UNICODE||(null==r.validator?r.setValidators(s.Validators.maxLength(n.getMaskLength())):r.setValidators([r.validator,s.Validators.maxLength(n.getMaskLength())]))))},jt.prototype.onChangeEvent=function(t){var e=this._task.getFormControl(this.magicDir.rowId,this.magicDir.id);switch(this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType){case l.StorageAttribute.ALPHA:case l.StorageAttribute.UNICODE:this.formatAlphaUnicode(e);break;case l.StorageAttribute.BOOLEAN:this.formatBoolean(e)}},jt.prototype.formatDate=function(t){var e=new Gt;this._task.mgInputDateFormat=e.ConvertMgDateFormatToAngular(t.getMask())},jt.prototype.formatAlphaUnicode=function(t){var e=t.value;if(null!==e&&0<e.length){var n=this._task.GetRangedValue(this.magicDir.id,e);null!=n&&(e=n);for(var o=this._task.GetControlPictureMask(this.magicDir.id).getMask(),r=new u.StringBuilder,i=0;i<e.length;i++)switch(o.charCodeAt(i)){case l.PICInterface.PIC_U:r.Append(e.charAt(i).toUpperCase());break;case l.PICInterface.PIC_L:r.Append(e.charAt(i).toLowerCase());break;default:r.Append(e.charAt(i))}t.setValue(r.ToString())}},jt.prototype.formatBoolean=function(t){var e,n=t.value;null!==n&&0<n.length&&((e=this._task.GetRangedValue(this.magicDir.id,n)).toUpperCase().startsWith(n.toUpperCase())?t.setValue(e):t.setValue(n))},jt.prototype.generatePattern=function(t,e){var n="";switch(t){case l.StorageAttribute.NUMERIC:n=this.generatePatternForNumber(e);break;case l.StorageAttribute.ALPHA:case l.StorageAttribute.UNICODE:n=this.generatePatternForAlpha(e)}return n},jt.prototype.generatePatternForNumber=function(t){var e=new u.StringBuilder;return e.Append("^"),t.isNegative()&&e.Append("-?"),t.getWholes()&&e.AppendFormat("\\d{{0},{1}}",0,t.getWholes()),t.getDec()&&e.AppendFormat("(\\.\\d{1,{0}})?",t.getDec()),e.Append("$"),e.ToString()},jt.prototype.isPatternGenerationNeeded=function(t,e){switch(t){case l.StorageAttribute.NUMERIC:return!0;case l.StorageAttribute.ALPHA:case l.StorageAttribute.UNICODE:return 0<e.getMaskChars()}},jt.prototype.generatePatternForAlpha=function(t){var e=0,n=!1,o=!1,r=t.getMask(),i=new u.StringBuilder;i.Append("^");for(var a=0;a<r.length;){switch(!n||r.charCodeAt(a)!=l.PICInterface.PIC_N&&r.charCodeAt(a)!=l.PICInterface.PIC_U&&r.charCodeAt(a)!=l.PICInterface.PIC_L&&r.charCodeAt(a)!=l.PICInterface.PIC_X||(i.Append("("),n=!(o=!0)),e=0,r.charCodeAt(a)){case l.PICInterface.PIC_U:case l.PICInterface.PIC_X:case l.PICInterface.PIC_L:i.Append(".");var s=new u.RefParam(!1),c=l.PICInterface.PIC_U.toString();c+=l.PICInterface.PIC_L.toString(),c+=l.PICInterface.PIC_X.toString(),e=this.getDirectiveCount(r,a,c,s),n=s.value,a+=e;break;case l.PICInterface.PIC_N:i.Append("\\d");s=new u.RefParam(!1),e=this.getDirectiveCount(r,a,l.PICInterface.PIC_L.toString(),s),n=s.value;a+=e;break;default:i.Append(r[a]),a++}0<e&&i.AppendFormat("{{0},{1}}",n?e:0,e),o&&i.Append(")"),o=!1}return i.Append("$"),i.ToString()},jt.prototype.getDirectiveCount=function(t,e,n,o){o.value=!1;for(var r=0;e<t.length&&this.IsPatternMatches(t.charCodeAt(e).toString(),n);)r++,e++;return e<t.length&&(o.value=!0),r},jt.prototype.IsPatternMatches=function(t,e){for(var n=0;n<e.length;n++)if(t==e[n])return!0;return!1},jt.decorators=[{type:i.Directive,args:[{selector:"[mgFormat]"}]}],jt.ctorParameters=function(){return[{type:vt},{type:ht}]},jt.propDecorators={onFocusEvent:[{type:i.HostListener,args:["focus",["$event"]]}],onChangeEvent:[{type:i.HostListener,args:["change",["$event"]]}]},jt);function jt(t,e){this.magicDir=t,this._task=e}var Ht,Wt=(C(Yt,Ht=p.DatePipe),Yt.prototype.transform=function(t,e){var n=this._task.GetControlPictureMask(e).getMask(),o=new u.StringBuilder;if(void 0===t||null===n)return t;for(var r=0;r<n.length;)switch(n.charCodeAt(r)){case l.PICInterface.PIC_HH:o.Append("hh"),r+=2;break;case l.PICInterface.PIC_MMT:o.Append("mm"),r+=2;break;case l.PICInterface.PIC_SS:o.Append("ss"),r+=2;break;default:o.Append(n.charAt(r)),r++}return o.Append(" a"),Ht.prototype.transform.call(this,t,o.ToString())},Yt.decorators=[{type:i.Pipe,args:[{name:"magicTime"}]}],Yt.ctorParameters=function(){return[{type:ht}]},Yt);function Yt(t){var e=Ht.call(this,"en-US")||this;return e._task=t,e}var zt=(Xt.prototype.validate=function(t){var e=this.getControlName(t);this._task.Records.list[0].getControlMetadata(e).rangeValidator=!0;var n=null;return null==(n=t.dirty?this._task.ValidateControlValue(e,this._task.ConvertValToNative(e,0,t.value)):n)?null:{rangevalidator:{errorMsg:n}}},Xt.prototype.getControlName=function(e){var n=e.parent.controls;return Object.keys(n).find(function(t){return e===n[t]})||null},Xt.decorators=[{type:i.Directive,args:[{selector:"[rangevalidator] ",providers:[{provide:s.NG_VALIDATORS,useExisting:Xt,multi:!0}]}]}],Xt.ctorParameters=function(){return[{type:ht},{type:i.ViewContainerRef}]},Xt);function Xt(t,e){this._task=t,this.vcRef=e}var Kt=(Object.defineProperty(qt.prototype,"magic",{set:function(t){this.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(qt.prototype,"Component",{get:function(){return this.mgSub.mgGetComp(this.id)},enumerable:!0,configurable:!0}),Object.defineProperty(qt.prototype,"Parameters",{get:function(){return this.mgSub.mgGetParameters(this.id)},enumerable:!0,configurable:!0}),qt.decorators=[{type:i.Component,args:[{selector:"magic-subform",template:'\n <ndc-dynamic\n *ngIf="Component" \n [ndcDynamicComponent]="Component" \n [ndcDynamicInputs]="Parameters">\n </ndc-dynamic>\n'}]}],qt.ctorParameters=function(){return[{type:i.ViewContainerRef},{type:Ot}]},qt.propDecorators={magic:[{type:i.Input,args:["magic"]}]},qt);function qt(t,e){this.vcRef=t,this.mgSub=e,this.component=null,this.component=this.vcRef._view.component}var $t=(Jt.prototype.checkIsReadOnly=function(t){t=this.task.Records.list[0].getControlMetadata(t);return null===t.properties.get(m.HtmlProperties.ReadOnly)||!0!==t.properties.get(m.HtmlProperties.ReadOnly)},Jt.prototype.getText=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Text,e)},Jt.prototype.getTabpageText=function(t,e){t=this.task.getProperty(t,m.HtmlProperties.ItemsList);return void 0!==t?t[e].displayValue:""},Jt.prototype.getImage=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Image,e)},Jt.prototype.isImageExists=function(t,e){e=this.task.getProperty(t,m.HtmlProperties.Image,e);return!c.isNullOrUndefined(e)},Jt.prototype.getClasses=function(t,e){return this.task.getClasses(t,e)},Jt.prototype.getStyle=function(t,e,n){return this.task.getStyle(t,e,n)},Jt.prototype.getVisible=function(t,e){return this.getProperty(t,m.HtmlProperties.Visible,e)?"visible":"hidden"},Jt.prototype.getMustInput=function(t,e){return this.getProperty(t,m.HtmlProperties.MustInput,e)?"true":"false"},Jt.prototype.isDisabled=function(t,e){return!0!==this.getProperty(t,m.HtmlProperties.Enabled,e)||null},Jt.prototype.getProperty=function(t,e,n){return this.task.getProperty(t,e,n)},Jt.prototype.getTitle=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Tooltip,e)},Jt.prototype.getSelectedValue=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedValue,e)},Jt.prototype.getPlaceholder=function(t,e){return this.task.getProperty(t,m.HtmlProperties.PlaceHolder,e)},Jt.prototype.getType=function(t,e){return this.task.getProperty(t,m.HtmlProperties.Password,e)?"password":"text"},Jt.prototype.getTabIndex=function(t,e){return this.task.getProperty(t,m.HtmlProperties.TabIndex,e)},Jt.prototype.getValue=function(t,e){return this.task.getValue(t,e)},Jt.prototype.getCustomProperty=function(t,e,n){if(-1==t.indexOf("~"))return this.getCustomProperty_1(t,e,n);n=t.split("~")[0],t=t.split("~")[1];return this.getCustomProperty_1(n,t,e)},Jt.prototype.getCustomProperty_1=function(t,e,n){var o;c.isNullOrUndefined(n)&&(n="0");n=this.task.Records.list[n];return c.isNullOrUndefined(n)||(n=n.getControlMetadata(t)).userProperties.has(e)&&(o=n.userProperties.get(e)),o},Jt.prototype.getItemListValues=function(t,e){return this.getProperty(t,m.HtmlProperties.ItemsList,e)},Jt.prototype.getDisplayValue=function(t,e){var n="",o=this.getProperty(t,m.HtmlProperties.ItemsList,e),e=this.task.getValue(t,e);return n=0<=e&&e<o.length&&!c.isNullOrUndefined(o[e])?o[e].displayValue:n},Jt.prototype.isOptionSelected=function(t,e){var n,o,e=this.task.getValue(e,"0");try{for(var r=S(e),i=r.next();!i.done;i=r.next())if(i.value===t)return!0}catch(a){n={error:a}}finally{try{i&&!i.done&&(o=r["return"])&&o.call(r)}finally{if(n)throw n.error}}return!1},Jt.prototype.isTabPageSelected=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedValue)==e-1},Jt.prototype.isTabPageLayerSelected=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedLayer)==e-1},Jt.prototype.getTabSelectedIndex=function(t){return this.task.getProperty(t,m.HtmlProperties.SelectedValue)},Jt.prototype.ifRowCreated=function(t){if(null==t)return!1;t="number"==typeof t?t.toString():t.rowId,t=this.getFormGroupByRow(t);return!c.isNullOrUndefined(t)},Jt.prototype.getFormGroupByRow=function(t){return this.task.formGroups[t]},Jt.prototype.isRowSelected=function(t,e){return this.task.getProperty(t,m.HtmlProperties.SelectedRow,"0")==e},Jt.prototype.isRowInRowEditing=function(t){var e="number"==typeof t?t.toString():t.rowId;return this.task.isRowInRowEditing(e)},Jt.prototype.isCurrentInRowEditing=function(){var t=this.task.tableService.getSelectedRow();return this.task.isRowInRowEditing(t)},Jt.prototype.guiTopIndex=function(){return this.task.tableService.getTableTopIndex()},Jt.prototype.getErrMsg=function(t,e){var n,o,r=this.task.getFormControl(e,t);if(r.hasError("required"))return"Control must be updated.";if(r.hasError("pattern"))return"Required pattern is : "+r.errors.pattern.requiredPattern;if(r.hasError("rangevalidator"))return r.errors.rangevalidator.errorMsg;if(r.hasError("maxlength"))return"Max length allowed is : "+r.errors.maxlength.requiredLength;if(r.hasError("max"))return"Max value alllowed is : "+r.errors.max.max;var i=this.task.Records.list[e].getControlMetadata(t);try{for(var a=S(i.customValidators.keys()),s=a.next();!s.done;s=a.next()){var c=s.value;if(r.hasError(c))return i.customValidators.get(c).getErrMessage()}}catch(l){n={error:l}}finally{try{s&&!s.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}return"unknown error"},Jt.prototype.setValueToControl=function(t,e,n){void 0===n&&(n=!0);t=a.getGuiEventObj("setexternalvalue",t,0);t.externalValue=e,t.param=n,this.task.insertEvent(t)},Jt.prototype.isDataviewEmpty=function(){return this.task.Records.isEmptyDataView},Jt.prototype.simulateClick=function(t,e){this.task.insertEvent(a.getGuiEventObj("click",t,e=void 0===e?0:e))},Jt.prototype.isLoggedIn=function(){return this.task.getIsLoggenIn()},Jt.decorators=[{type:i.Injectable}],Jt.ctorParameters=function(){return[{type:ht}]},Jt);function Jt(t){this.task=t}var Qt=(Object.defineProperty(Zt.prototype,"magic",{set:function(t){this.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(Zt.prototype,"rowId1",{set:function(t){this.rowId=t},enumerable:!0,configurable:!0}),Object.defineProperty(Zt.prototype,"CustomContent",{set:function(t){this.defaultDisplay=t==undefined||this.isEmpty(t.nativeElement),this.changeDetectorRef.detectChanges()},enumerable:!0,configurable:!0}),Zt.prototype.isEmpty=function(t){for(var e=t.childNodes,n=0;n<e.length;n++)if(8!==e.item(n).nodeType&&0!==e.item(n).textContent.trim().length)return!1;return!0},Zt.prototype.HasErrors=function(t){var e,n;if(!c.isUndefined(t)){var o=this._task.getFormControl(this.rowId,t);if(null!==o){if(o.dirty&&(o.hasError("pattern")||o.hasError("required")||o.hasError("rangevalidator")||o.hasError("maxlength")||o.hasError("max")))return!0;if(o.touched&&o.hasError("required"))return!0;t=this._task.Records.list[this.rowId].getControlMetadata(t);try{for(var r=S(t.customValidators.keys()),i=r.next();!i.done;i=r.next()){var a=i.value;if(o.hasError(a))return!0}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}}}return!1},Zt.decorators=[{type:i.Component,args:[{selector:"mgError",template:'<div *ngIf="HasErrors(id)">\n <div #customContent>\n <ng-content></ng-content>\n </div>\n <span *ngIf="defaultDisplay">\n {{mgService.getErrMsg(id, rowId)}} \n </span>\n </div>\n'}]}],Zt.ctorParameters=function(){return[{type:ht},{type:$t},{type:i.ChangeDetectorRef}]},Zt.propDecorators={magic:[{type:i.Input,args:["magic"]}],rowId1:[{type:i.Input,args:["rowId"]}],CustomContent:[{type:i.ViewChild,args:["customContent",{"static":!1}]}]},Zt);function Zt(t,e,n){this._task=t,this.mgService=e,this.changeDetectorRef=n,this.defaultDisplay=!0,this.rowId="0"}var te=(ee.prototype.onChange=function(t){this.magicDirective.task.onCheckChanged(t,this.magicDirective.id,+this.magicDirective.rowId)},ee.decorators=[{type:i.Directive,args:[{selector:"\n input[type=checkbox][magic]:not([noFormControl])\n"}]}],ee.ctorParameters=function(){return[{type:vt}]},ee.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},ee);function ee(t){this.magicDirective=t}var ne=(oe.prototype.onChange=function(t){this.magicDirective.task.onComboboxSelectionChanged(t,this.magicDirective.id,+this.magicDirective.rowId)},oe.decorators=[{type:i.Directive,args:[{selector:"select[magic]:not([multiple])"}]}],oe.ctorParameters=function(){return[{type:vt}]},oe.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},oe);function oe(t){this.magicDirective=t}var re=(ie.prototype.exitMagic=function(){console.log("Magic application terminated")},ie.decorators=[{type:i.Injectable}],ie);function ie(){}var ae=(se.prototype.intercept=function(t,e){var n=o.interval(se.Delay).subscribe(function(){n.unsubscribe(),se.VisibilityChangeDetectorRef.next(!0)});return e.handle(t).pipe(r.tap(function(t){t instanceof d.HttpResponse&&(se.VisibilityChangeDetectorRef.next(!1),n.unsubscribe())},function(t){se.VisibilityChangeDetectorRef.next(!1),n.unsubscribe()}))},se.Delay=1e3,se.VisibilityChangeDetectorRef=new o.Subject,se.decorators=[{type:i.Injectable}],se.ctorParameters=function(){return[]},se);function se(){}var ce=(le.prototype.onBeforeUnload=function(t){if(this.engineMagicService.TransCacheExists())return this.subscription.unsubscribe(),t.returnValue="Are you sure?";this.engineMagicService.TerminateContextUsingFetchAPI(),this.magicEngineTerminated=!0,this.subscription.unsubscribe()},le.prototype.onUnload=function(t){this.magicEngineTerminated||this.engineMagicService.TerminateContextUsingFetchAPI()},le.prototype.ngAfterViewInit=function(){this.overlayWindowService.init(this.overlayWindowsContainerViewRef,this.rootMagicElementRef.nativeElement),this.engineMagicService.startMagicEngine(this.httpClient)},le.prototype.setViewContainerRef=function(t){this.overlayWindowsContainerViewRef=t},le.prototype.initialize=function(){this.registerUICommands()},le.prototype.setTitle=function(){var t=this.componentList.title;this.titleService.setTitle(t)},le.prototype.setComponent=function(t,e,n,o){this.pendingCommandsCollector.startCollecting(),o?this.overlayWindowService.open(t,e,n):(this.RootComponent=this.componentList.getComponent(t),this.RootComponentParameters={taskIdParam:e,taskDescription:n}),this.changeDetectorRef.detectChanges()},le.prototype.registerUICommands=function(){var e=this;this.engineMagicService.refreshDom.pipe(r.filter(function(t){return"0"===t.TaskTag})).subscribe(function(t){e.executeCommand(t)}),this.engineMagicService.interactiveCommands.pipe(r.filter(function(t){return"0"===t.TaskTag})).subscribe(function(t){N.executeInteractiveCommand(null,t,e.overlayWindowService)})},le.prototype.executeCommand=function(t){switch(t.CommandType){case m.CommandType.OPEN_FORM:this.setComponent(t.str,t.stringList[0],t.stringList[1],t.Bool1);break;case m.CommandType.SET_IS_LOGGED_IN:this.engineMagicService.setIsLoggedIn(t.Bool1);break;case m.CommandType.CLOSE_FORM:null!=this.RootComponent&&t.str===this.RootComponentParameters.taskIdParam?(this.RootComponent=null,this.RootComponentParameters={}):this.overlayWindowService.close(t.str),this.changeDetectorRef.detectChanges();break;case m.CommandType.RELOAD_PAGE:window.location.reload();break;case m.CommandType.EXIT_MAGIC:this.exitMagicService&&this.exitMagicService.exitMagic()}},le.decorators=[{type:i.Component,args:[{selector:"magic-root",providers:[],template:'\n <div #magicRoot>\n <ndc-dynamic\n *ngIf = "RootComponent !== null"\n [ndcDynamicComponent]="RootComponent"\n [ndcDynamicInputs] ="RootComponentParameters">\n </ndc-dynamic>\n\n <div #overlayWindowsContainer magicViewContainerRef>\n </div>\n </div>\n\n <div class="spinner-background" *ngIf="showSpinner">\n <ng-container [ngTemplateOutlet]="SpinnerTemplate ? SpinnerTemplate:defaultSpinner"></ng-container>\n </div>\n\n <ng-template #defaultSpinner>\n <div class="loader"></div>\n </ng-template>\n ',styles:["\n .loader {\n border: 10px solid #cccccc; /* Light grey */\n border-top: 10px solid black; /* Blue */\n border-radius: 50%;\n position: fixed;\n margin: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100px;\n height: 100px;\n animation: spin 2s linear infinite;\n }\n .spinner-background {\n /* background fixed across whole screen */\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n }\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "]}]}],le.ctorParameters=function(){return[{type:D},{type:x},{type:i.ChangeDetectorRef},{type:h.Title},{type:ct},{type:d.HttpClient},{type:ae},{type:Rt},{type:re,decorators:[{type:i.Optional}]}]},le.propDecorators={rootMagicElementRef:[{type:i.ViewChild,args:["magicRoot",{"static":!0}]}],SpinnerTemplate:[{type:i.Input}],onBeforeUnload:[{type:i.HostListener,args:["window:beforeunload",["$event"]]}],onUnload:[{type:i.HostListener,args:["window:unload",["$event"]]}]},le);function le(t,e,n,o,r,i,a,s,c){var l=this;this.engineMagicService=t,this.componentList=e,this.changeDetectorRef=n,this.titleService=o,this.overlayWindowService=r,this.httpClient=i,this.spinnerService=a,this.pendingCommandsCollector=s,this.exitMagicService=c,this.RootComponent=null,this.magicEngineTerminated=!1,this.initialize(),this.setTitle(),this.subscription=ae.VisibilityChangeDetectorRef.subscribe(function(t){l.showSpinner=t,l.changeDetectorRef.detectChanges()})}var ue,pe={provide:s.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return me}),multi:!0},me=(C(de,ue=s.CheckboxControlValueAccessor),de.decorators=[{type:i.Directive,args:[{selector:"\n input[type=checkbox][magic]:not([formControlName]):not([no-form-control]),\n input[type=checkbox][magic]:not([formControl]),\n input[type=checkbox][magic]:not([ngModel])\n ",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[pe]}]}],de);function de(){return null!==ue&&ue.apply(this,arguments)||this}var he,ge={provide:s.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return fe}),multi:!0},fe=(C(ye,he=s.DefaultValueAccessor),ye.decorators=[{type:i.Directive,args:[{selector:"\n input[magic]:not([type=checkbox]):not([formControlName]):not([no-form-control]),\n textarea[magic]:not([formControlName]):not([noFormControl]):not([no-form-control])\n ",host:{"(input)":"$any(this)._handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"$any(this)._compositionStart()","(compositionend)":"$any(this)._compositionEnd($event.target.value)"},providers:[ge],exportAs:"magic"}]}],ye);function ye(){return null!==he&&he.apply(this,arguments)||this}var ve=(Ce.prototype.refreshDataSource=function(){},Ce.prototype.getPageSize=function(){return 10},Ce.prototype.getMaxRowsInTable=function(){return this.task.Records.list.length},Ce.prototype.selectRow=function(t){this.selectedItem=t},Ce.prototype.getSelectedRow=function(){return this.selectedItem},Ce.prototype.selectedRow=function(){return null},Ce.prototype.selectPage=function(t){},Ce.prototype.OpenDialogForControl=function(t){return"MAT-SELECT"!==t.tagName&&"MAT-CHECKBOX"!==t.tagName&&"INPUT"!==t.tagName&&"SELECT"!==t.tagName},Ce.prototype.getDialog=function(){return null},Ce.prototype.onScrollDown=function(){this.task.onScrollDown()},Ce.prototype.sortData=function(t){},Ce.prototype.mgOnPaginateChange=function(t){},Ce.prototype.mgOptionChanged=function(t){},Ce.prototype.updateTableSize=function(t){0===t&&(t=1,this.task.Records.clearFirstTableRecord(this.task.template)),this.task.formGroups.length=t,this.task.Records.updateSize(t),this.task.setIncludesFirst(!1)},Ce.prototype.setTableTopIndex=function(t){this.task.Records.includesFirst||t++,this.task.Records.setGuiTopIndex(t)},Ce.prototype.getTableTopIndex=function(){var t=this.task.Records.getGuiTopIndex();return this.task.Records.includesFirst||t--,t},Ce.decorators=[{type:i.Injectable}],Ce.ctorParameters=function(){return[{type:x},{type:ht}]},Ce);function Ce(t,e){this.componentList=t,this.task=e,this.shouldOpenFieldTextEditor=!0}var be=(Ee.prototype.setTitle=function(t){this.titleService.setTitle(t)},Ee.decorators=[{type:i.Injectable}],Ee.ctorParameters=function(){return[{type:h.Title}]},Ee);function Ee(t){this.titleService=t}var Se=(Re.decorators=[{type:i.Injectable}],Re.ctorParameters=function(){return[{type:ht},{type:Ot},{type:ve},{type:be},{type:$t}]},Re);function Re(t,e,n,o,r){this.task=t,this.subformService=e,this.tableService=n,this.titleService=o,this.mgAccessorService=r,t.tableService=n,t.mgSubformService=e,t.mgTitleService=o,t.mgAccessorService=r}var Ie=(Object.defineProperty(Te.prototype,"task",{get:function(){return this.magicServices.task},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"mgSub",{get:function(){return this.magicServices.subformService},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"tableService",{get:function(){return this.magicServices.tableService},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"mg",{get:function(){return this.magicServices.mgAccessorService},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"taskId",{get:function(){return this.task.taskId},enumerable:!0,configurable:!0}),Object.defineProperty(Te.prototype,"screenFormGroup",{get:function(){return this.task.ScreenModeControls},enumerable:!0,configurable:!0}),Te.prototype.ngOnInit=function(){var e=this;this.task.detectChanges.pipe().subscribe(function(t){e.ref.detectChanges()});this.task.initTask(this.taskIdParam,this.taskDescription),this.createFormControlsAccessor(this.screenFormGroup),this.setInputDateFormat(),this.task.customPropertiesSubject.pipe().subscribe(function(t){e.PropertyChanged(t.propertyName,t.rowId,t.value)})},Te.prototype.createFormControlsAccessor=function(t){},Te.prototype.setInputDateFormat=function(){},Te.prototype.PropertyChanged=function(t,e,n){},Te.prototype.ngAfterViewInit=function(){this.mgSub.init()},Te.prototype.ngAfterContentChecked=function(){this.task.oldPageSize!=this.tableService.getPageSize()&&(this.task.resize(this.tableService.getPageSize(),0),this.task.oldPageSize=this.tableService.getPageSize())},Te.prototype.ngOnDestroy=function(){this.task.dispose()},Te.decorators=[{type:i.Component,args:[{selector:"task-magic",providers:[ht,Ot,ve],template:""}]}],Te.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:Se}]},Te.propDecorators={taskIdParam:[{type:i.Input}],taskDescription:[{type:i.Input}]},Te);function Te(t,e){this.ref=t,this.magicServices=e,this.magicProperties=l.MagicProperties}var we=(Me.prototype.onChange=function(t){this.magicDirective.task.onCheckChanged(t,this.magicDirective.id,+this.magicDirective.rowId)},Me.decorators=[{type:i.Directive,args:[{selector:"\n input[type=checkbox][magic]:([noFormControl]) \n "}]}],Me.ctorParameters=function(){return[{type:vt}]},Me.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},Me);function Me(t){this.magicDirective=t}var ke=(Pe.prototype.onChange=function(t){this.magicDirective.task.setInputTextValue(this.magicDirective.id,this.magicDirective.rowId,event.srcElement.value)},Pe.decorators=[{type:i.Directive,args:[{selector:"input[magic]:([noFormControl]):not([type=checkbox]),\n textarea[magic]:([noFormControl]):not([type=checkbox])"}]}],Pe.ctorParameters=function(){return[{type:vt}]},Pe.propDecorators={onChange:[{type:i.HostListener,args:["change",["$event"]]}]},Pe);function Pe(t){this.magicDirective=t}var Oe={provide:s.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return De}),multi:!0},De=(_e.prototype.writeValue=function(t){t?this.renderer.setProperty(this.elementRef.nativeElement,"valueAsDate",new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):this.renderer.setProperty(this.elementRef.nativeElement,"value",null)},_e.prototype.registerOnChange=function(e){this.onChange=function(t){return e(t instanceof Date?new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()):t)}},_e.prototype.registerOnTouched=function(t){this.onTouched=t},_e.prototype.setDisabledState=function(t){this.renderer.setProperty(this.elementRef.nativeElement,"disabled",t)},_e.decorators=[{type:i.Directive,args:[{selector:"[dateInput]",providers:[Oe]}]}],_e.ctorParameters=function(){return[{type:i.Renderer2},{type:i.ElementRef}]},_e.propDecorators={onChange:[{type:i.HostListener,args:["input",["$event.target.valueAsDate"]]}],onTouched:[{type:i.HostListener,args:["blur",[]]}]},_e);function _e(t,e){this.renderer=t,this.elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}var xe=(Object.defineProperty(Ae.prototype,"magic",{set:function(t){this.id=t,this.selector="NonMagicControl"},enumerable:!0,configurable:!0}),Object.defineProperty(Ae.prototype,"task",{get:function(){return this._task},enumerable:!0,configurable:!0}),Ae.prototype.regEvents=function(){var e=this;this.eventHandlers.focusin=this.OnFocus.bind(this),Object.keys(this.eventHandlers).forEach(function(t){e.focusUnlistener=e.renderer.listen(e.htmlElement,t,e.eventHandlers[t])})},Ae.prototype.OnFocus=function(){this.task.insertEvent(a.getGuiEventObj("focusOnNonMagicControl","",-1)),event.cancelBubble=!0},Ae.prototype.ngOnInit=function(){this.regEvents()},Ae.decorators=[{type:i.Directive,args:[{selector:"[NonMagicControl]"}]}],Ae.ctorParameters=function(){return[{type:ht},{type:i.ElementRef},{type:i.Renderer2},{type:i.ViewContainerRef}]},Ae.propDecorators={magic:[{type:i.Input,args:["NonMagicControl"]}]},Ae);function Ae(t,e,n,o){this._task=t,this.element=e,this.renderer=n,this.vcRef=o,this.eventHandlers={},this.eventsOnlyVal=!1,this.htmlElement=this.element.nativeElement}var Le=(Ve.prototype.ngAfterViewInit=function(){this.hostElement.nativeElement.focus()},Ve.decorators=[{type:i.Directive,args:[{selector:"[magicFocus]"}]}],Ve.ctorParameters=function(){return[{type:i.ElementRef}]},Ve);function Ve(t){this.hostElement=t}var Ne=(Fe.decorators=[{type:i.Directive,args:[{selector:"[magicViewContainerRef]"}]}],Fe.ctorParameters=function(){return[{type:i.ViewContainerRef}]},Fe);function Fe(t){this.vcRef=t,this.vcRef._view.component.setViewContainerRef(t)}var Ge=[vt,te,we,ke,ne,ft,me,fe,De,Ie,j,Z,nt,K,z,$,kt,_t,ce,Kt,Qt,Et,Ut,Nt,Wt,zt,xe,Le,Ne],Be=(Ue.forRoot=function(){return{ngModule:Ue,providers:[D,x,Rt,wt,ct]}},Ue.decorators=[{type:i.NgModule,args:[{declarations:I(Ge),exports:I(Ge),entryComponents:[],imports:[p.CommonModule,s.FormsModule,s.ReactiveFormsModule,n.RouterModule,g.DynamicModule.withComponents([j,$,Z,nt]),d.HttpClientModule],providers:[rt,W,ae,{provide:d.HTTP_INTERCEPTORS,useClass:ae,multi:!0}]}]}],Ue);function Ue(){}var je,He={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"input",monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},We=(C(Ye,je=f.NativeDateAdapter),Ye.prototype.parse=function(t){var e=t,n=0,o=0,r=0,i=this.mgdtfmt,a=0<e.indexOf("/")?"/":"-";if(null==t||""==t)return null;if(null==this.mgdtfmt&&null!=this.task.mgInputDateFormat&&(this.mgdtfmt=this.task.mgInputDateFormat),0<this.mgdtfmt.indexOf("MMM")||0<this.mgdtfmt.indexOf("MMMM"))return new Date(t);e.length;if(null!==i){for(var s=0;s<i.length;)switch(i[s]){case"d":var c=void 0;for(c=-1==(l=e.indexOf(a,0))?e:e.substr(0,l),-1<l&&(e=e.substr(l+1));"d"==i[s];s++);n=Number(c);break;case"M":c=void 0;for(c=-1==(l=e.indexOf(a,0))?e:e.substr(0,l),-1<l&&(e=e.substr(l+1));"M"==i[s];s++);o=0<Number(c)?Number(c)-1:0;break;case"y":var l,c=void 0;for(c=-1==(l=e.indexOf(a,0))?e:e.substr(0,l),-1<l&&(e=e.substr(l+1));"y"==i[s];s++);r=Number(c);break;default:s++}return 0==o&&0==r&&0==n?null:new Date(Date.UTC(r,o,n))}},Ye.prototype.format=function(t,e){return null==this.mgdtfmt&&null!=this.task.mgInputDateFormat&&(this.mgdtfmt=this.task.mgInputDateFormat),"input"===e?(null==this.mgdtfmt&&(this.mgdtfmt="M/d/yyyy"),p.formatDate(t,this.mgdtfmt,this.locale)):t.toDateString()},Ye.decorators=[{type:i.Injectable}],Ye.ctorParameters=function(){return[{type:ht}]},Ye);function Ye(t){var e=je.call(this,"en-US",new y.Platform)||this;return e.task=t,e.mgdtfmt=null,e}var ze=[{provide:f.DateAdapter,useClass:We},{provide:f.MAT_DATE_FORMATS,useValue:He}],Xe=[Se,ht,Ot,be,$t,ze],Ge=I(Xe,[ve]),g=(Ke.addChildren=function(t,e,n){for(var o=0;o<t.children.length;o++)"undefined"!=typeof t.children[o].attributes[n]&&e.push(t.children[o]),this.addChildren(t.children[o],e,n)},Ke.getDistance=function(t,e,n){var o=t.clientLeft,r=t.clientTop,i=o+t.clientWidth,t=r+t.clientHeight,i=e<o?o-e:i<e?e-i:0,t=n<r?r-n:t<n?n-t:0;return i*i+t*t},Ke.getDimentions=function(t){for(var e,n,o=0,r=0,i=t.width,a=t.height;t;)"BODY"==t.tagName?(e=t.scrollLeft||document.documentElement.scrollLeft,n=t.scrollTop||document.documentElement.scrollTop,o+=t.offsetLeft-e+t.clientLeft,r+=t.offsetTop-n+t.clientTop):(o+=t.offsetLeft-t.scrollLeft+t.clientLeft,r+=t.offsetTop-t.scrollTop+t.clientTop),t=t.offsetParent;return{x:o,y:r,width:i,height:a}},Ke);function Ke(){}f=function(){this.taskId="",this.comp=null,this.parameters={}};t.ControlMetadata=T,t.ControlsMetadata=M,t.Records=P,t.HtmlClasses={Color:"color",font:"font",FocusColor:"focuscolor",HintColor:"hintcolor"},t.MagicModule=Be,t.AccessorMagicService=$t,t.CommandsCollectorMagicService=Rt,t.ComponentListMagicService=x,t.ConfirmationComponentsMagicProvider=rt,t.EngineMagicService=D,t.ExitMagicService=re,t.matDateProviders=ze,t.basicMagicProviders=Xe,t.magicProviders=Ge,t.MagicServices=Se,t.MG_FORMATS=He,t.MgDateAdapter=We,t.OverlayContainerMagicProvider=W,t.OverlayWindowService=ct,t.RouteCommand=Tt,t.RouterCommandsMagicService=wt,t.SpinnerService=ae,t.StylesMapManager=L,t.SubformMagicService=Ot,t.TableMagicService=ve,t.TaskMagicService=ht,t.TitleMagicService=be,t.GuiInteractiveExecutor=N,t.LoadOnDemandModuleMagicComponent=kt,t.confirmationBox=at,t.MagicShellComponent=ce,t.ErrorMagicComponent=Qt,t.RouterContainerMagicComponent=_t,t.SubformMagicComponent=Kt,t.TaskBaseMagicComponent=Ie,t.utils=g,t.BaseMagicAlertComponent=K,t.BaseMagicConfirmComponent=z,t.MagicAlertComponent=Z,t.MagicConfirmationBoxComponent=nt,t.MagicFocusDirective=Le,t.MagicDirective=vt,t.MagicViewContainerRef=Ne,t.MgformatMagicDirective=Ut,t.NonMagicControlDirective=xe,t.RangeValidatorMagicDirective=zt,t.CheckboxNoFormControlMagicDirective=we,t.CheckboxMagicDirective=te,t.ComboboxMagicDirective=ne,t.InputNoFormControlMagicDirective=ke,t.NoControlMagicDirective=Et,t.RowMagicDirective=ft,t.CHECKBOX_VALUE_ACCESSOR=pe,t.MagicCheckboxControlValueAccessor=me,t.DATE_VALUE_ACCESSOR=Oe,t.DateValueAccessor=De,t.MAGIC_DEFAULT_VALUE_ACCESSOR=ge,t.MagicDefaultValueAccessor=fe,t.BaseMagicOverlayContainer=G,t.ModalFormDefinition=f,t.MagicOverlayContainerWrapper=$,t.MagicOverlayContainer=j,t.Constants=At,t.DateMagicPipe=Nt,t.MgDateFormatter=Gt,t.TimeMagicPipe=Wt,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=magic-xpa-angular.umd.min.js.map
|