@lidorsystems/integralui-web
Version:
IntegralUI Web - Advanced UI Components for Angular
15 lines (12 loc) • 60.8 kB
JavaScript
/*
filename: integralui.core.js
version : 20.2.1
Copyright © 2016-2020 Lidor Systems. All rights reserved.
This file is part of the "IntegralUI Web" Library.
The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License.
A copy of the License should have been installed in the product's root installation directory or it can be found at
http://www.lidorsystems.com/products/web/studio/license-agreement.aspx.
This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language
governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws.
*/
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(t.hasOwnProperty(i))e[i]=t[i]})(t,i)};return function(t,i){e(t,i);function n(){this.constructor=t}t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),integralui_common_service_1=require("../services/integralui.common.service"),integralui_data_service_1=require("../services/integralui.data.service"),i0=require("@angular/core"),i1=require("../services/integralui.common.service"),i2=require("@angular/common"),i3=require("../services/integralui.data.service"),_c0=function(e,t,i){return{display:e,top:t,left:i}},_c1=["content"];function IntegralUIItem_span_2_Template(e,t){if(1&e)i0.ɵɵelement(0,"span",5);if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵstyleProp("display",i.getIconStatus());i0.ɵɵproperty("ngClass",i.icon)}}function IntegralUIItem_img_3_Template(e,t){if(1&e)i0.ɵɵelement(0,"img",6);if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵpropertyInterpolate("src",i.iconUrl,i0.ɵɵsanitizeUrl);i0.ɵɵpropertyInterpolate("width",i.iconSize.width);i0.ɵɵpropertyInterpolate("height",i.iconSize.height)}}function IntegralUIItem_span_4_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",7);i0.ɵɵtext(1);i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵadvance(1);i0.ɵɵtextInterpolate(i.text)}}var _c2=["*"],_c3=["itemElement"],_c4=function(e){return{"iui-list-item-selected":e}};function IntegralUIList_li_2_Template(e,t){if(1&e){var i=i0.ɵɵgetCurrentView();i0.ɵɵelementStart(0,"li",2,3);i0.ɵɵlistener("mousedown",function(e){i0.ɵɵrestoreView(i);var n=t.$implicit;return i0.ɵɵnextContext().itemMouseDown(e,n)})("touchstart",function(e){i0.ɵɵrestoreView(i);var n=t.$implicit;return i0.ɵɵnextContext().itemTouchStart(e,n)});i0.ɵɵelementStart(2,"span");i0.ɵɵtext(3);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var n=t.$implicit,o=i0.ɵɵnextContext();i0.ɵɵproperty("ngClass",i0.ɵɵpureFunction1(2,_c4,n==o.selectedItem));i0.ɵɵadvance(3);i0.ɵɵtextInterpolate(o.getItemText(n))}}function IntegralUIHeaderItem_span_2_Template(e,t){if(1&e)i0.ɵɵelement(0,"span",13);if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵstyleProp("display",i.getIconStatus());i0.ɵɵproperty("ngClass",i.icon)}}function IntegralUIHeaderItem_img_3_Template(e,t){if(1&e)i0.ɵɵelement(0,"img",14);if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵpropertyInterpolate("src",i.iconUrl,i0.ɵɵsanitizeUrl);i0.ɵɵpropertyInterpolate("width",i.iconSize.width);i0.ɵɵpropertyInterpolate("height",i.iconSize.height)}}function IntegralUIHeaderItem_span_4_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",15);i0.ɵɵtext(1);i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵadvance(1);i0.ɵɵtextInterpolate(i.text)}}var _c5=function(e){return{display:e}},_c6=["list"],_c7=function(e,t,i){return{position:e,top:t,opacity:i}},_c8=function(e){return{display:e}},IntegralUIDraggable=function(){function e(e,t){this.elemRef=e;this.elemRenderer=t;this.currentSettings=!1}Object.defineProperty(e.prototype,"settings",{get:function(){return this.currentSettings},set:function(e){if(this.currentSettings!=e){this.currentSettings=e;if(this.elemRef)this.elemRenderer.setAttribute(this.elemRef.nativeElement,"draggable",this.currentSettings.toString())}},enumerable:!0,configurable:!0});e.prototype.ngAfterViewInit=function(){if(this.settings)this.elemRenderer.setAttribute(this.elemRef.nativeElement,"draggable","true")};e.ɵfac=function(t){return new(t||e)(i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i0.Renderer2))};e.ɵdir=i0.ɵɵdefineDirective({type:e,selectors:[["","iuiDraggable",""]],inputs:{settings:["iuiDraggable","settings"]}});return e}();exports.IntegralUIDraggable=IntegralUIDraggable;var IntegralUITemplate=function(){function e(e){this.template=e}e.prototype.getTemplate=function(){return this.template};e.ɵfac=function(t){return new(t||e)(i0.ɵɵdirectiveInject(i0.TemplateRef))};e.ɵdir=i0.ɵɵdefineDirective({type:e,selectors:[["","iuiTemplate",""]],inputs:{settings:["iuiTemplate","settings"]}});return e}();exports.IntegralUITemplate=IntegralUITemplate;var IntegralUIAnchorStyle,IntegralUIAnimationType,IntegralUICheckState,IntegralUIColorFormat,IntegralUIDateFormat,IntegralUIDirection,IntegralUIDragDropDisplayMode,IntegralUIEditorType,IntegralUIExpandMode,IntegralUINumericDisplayMode,IntegralUIItemDisplayMode,IntegralUIObjectState,IntegralUIOrientation,IntegralUIIncrementMode,IntegralUIMoveDirection,IntegralUIPlacement,IntegralUIScrollMode,IntegralUISelectionMode,IntegralUIContentVisibility,IntegralUISortOrder,IntegralUISpeedMode,IntegralUITabDisplayMode,IntegralUITabScrollMode,IntegralUITabStripPlacement,IntegralUIToolItemType,IntegralUIVisibility,IntegralUIWeekDays,IntegralUITemplateOutlet=function(){function e(e){this.containerRef=e}e.prototype.ngOnChanges=function(e){this.removeView();this.createView()};e.prototype.ngOnDestroy=function(){this.removeView()};e.prototype.createView=function(){if(this.iuiTemplateOutlet)this.viewRef=this.containerRef.createEmbeddedView(this.iuiTemplateOutlet,this.iuiTemplateOutletContext)};e.prototype.removeView=function(){if(this.viewRef)this.containerRef.remove(this.containerRef.indexOf(this.viewRef))};e.ɵfac=function(t){return new(t||e)(i0.ɵɵdirectiveInject(i0.ViewContainerRef))};e.ɵdir=i0.ɵɵdefineDirective({type:e,selectors:[["","iuiTemplateOutlet",""]],inputs:{iuiTemplateOutletContext:"iuiTemplateOutletContext",iuiTemplateOutlet:"iuiTemplateOutlet"},features:[i0.ɵɵNgOnChangesFeature]});return e}();exports.IntegralUITemplateOutlet=IntegralUITemplateOutlet;!function(e){e[e.None=0]="None";e[e.Top=1]="Top";e[e.Right=2]="Right";e[e.Bottom=4]="Bottom";e[e.Left=8]="Left"}(IntegralUIAnchorStyle=exports.IntegralUIAnchorStyle||(exports.IntegralUIAnchorStyle={}));!function(e){e[e.None=0]="None";e[e.Fade=1]="Fade";e[e.Slide=2]="Slide"}(IntegralUIAnimationType=exports.IntegralUIAnimationType||(exports.IntegralUIAnimationType={}));!function(e){e[e.Unchecked=0]="Unchecked";e[e.Indeterminate=1]="Indeterminate";e[e.Checked=2]="Checked"}(IntegralUICheckState=exports.IntegralUICheckState||(exports.IntegralUICheckState={}));!function(e){e[e.HEX=0]="HEX";e[e.HSL=1]="HSL";e[e.RGB=2]="RGB"}(IntegralUIColorFormat=exports.IntegralUIColorFormat||(exports.IntegralUIColorFormat={}));!function(e){e[e.Short=0]="Short";e[e.Long=1]="Long";e[e.Custom=2]="Custom"}(IntegralUIDateFormat=exports.IntegralUIDateFormat||(exports.IntegralUIDateFormat={}));!function(e){e[e.None=0]="None";e[e.Above=1]="Above";e[e.Right=2]="Right";e[e.Below=4]="Below";e[e.Left=8]="Left"}(IntegralUIDirection=exports.IntegralUIDirection||(exports.IntegralUIDirection={}));!function(e){e[e.Popup=0]="Popup";e[e.Handle=1]="Handle"}(IntegralUIDragDropDisplayMode=exports.IntegralUIDragDropDisplayMode||(exports.IntegralUIDragDropDisplayMode={}));!function(e){e[e.None=0]="None";e[e.Button=1]="Button";e[e.CheckBox=2]="CheckBox";e[e.Color=3]="Color";e[e.Date=4]="Date";e[e.DropList=5]="DropList";e[e.Image=6]="Image";e[e.Label=7]="Label";e[e.ListScroller=8]="ListScroller";e[e.Numeric=9]="Numeric";e[e.Progress=10]="Progress";e[e.Rating=11]="Rating";e[e.Slider=12]="Slider";e[e.TextBox=13]="TextBox"}(IntegralUIEditorType=exports.IntegralUIEditorType||(exports.IntegralUIEditorType={}));!function(e){e[e.Single=0]="Single";e[e.Multiple=1]="Multiple"}(IntegralUIExpandMode=exports.IntegralUIExpandMode||(exports.IntegralUIExpandMode={}));!function(e){e[e.InBound=0]="InBound";e[e.LeftRight=1]="LeftRight";e[e.UpDown=2]="UpDown"}(IntegralUINumericDisplayMode=exports.IntegralUINumericDisplayMode||(exports.IntegralUINumericDisplayMode={}));!function(e){e[e.Partial=0]="Partial";e[e.Full=1]="Full"}(IntegralUIItemDisplayMode=exports.IntegralUIItemDisplayMode||(exports.IntegralUIItemDisplayMode={}));!function(e){e[e.normal=0]="normal";e[e.hovered=1]="hovered";e[e.selected=2]="selected";e[e.focused=4]="focused";e[e.disabled=8]="disabled"}(IntegralUIObjectState=exports.IntegralUIObjectState||(exports.IntegralUIObjectState={}));!function(e){e[e.Horizontal=0]="Horizontal";e[e.Vertical=1]="Vertical"}(IntegralUIOrientation=exports.IntegralUIOrientation||(exports.IntegralUIOrientation={}));!function(e){e[e.Free=0]="Free";e[e.Partial=1]="Partial";e[e.Full=2]="Full"}(IntegralUIIncrementMode=exports.IntegralUIIncrementMode||(exports.IntegralUIIncrementMode={}));!function(e){e[e.After=0]="After";e[e.At=1]="At";e[e.Before=2]="Before";e[e.Down=3]="Down";e[e.First=4]="First";e[e.Left=5]="Left";e[e.Last=6]="Last";e[e.Right=7]="Right";e[e.Up=8]="Up"}(IntegralUIMoveDirection=exports.IntegralUIMoveDirection||(exports.IntegralUIMoveDirection={}));!function(e){e[e.Top=0]="Top";e[e.Right=1]="Right";e[e.Bottom=2]="Bottom";e[e.Left=3]="Left"}(IntegralUIPlacement=exports.IntegralUIPlacement||(exports.IntegralUIPlacement={}));!function(e){e[e.Horizontal=0]="Horizontal";e[e.Vertical=1]="Vertical"}(IntegralUIScrollMode=exports.IntegralUIScrollMode||(exports.IntegralUIScrollMode={}));!function(e){e[e.None=0]="None";e[e.One=1]="One";e[e.MultiSimple=2]="MultiSimple";e[e.MultiExtended=3]="MultiExtended"}(IntegralUISelectionMode=exports.IntegralUISelectionMode||(exports.IntegralUISelectionMode={}));!function(e){e[e.None=0]="None";e[e.Hover=1]="Hover";e[e.Select=2]="Select";e[e.Both=3]="Both"}(IntegralUIContentVisibility=exports.IntegralUIContentVisibility||(exports.IntegralUIContentVisibility={}));!function(e){e[e.None=0]="None";e[e.Ascending=1]="Ascending";e[e.Descending=2]="Descending"}(IntegralUISortOrder=exports.IntegralUISortOrder||(exports.IntegralUISortOrder={}));!function(e){e[e.VerySlow=0]="VerySlow";e[e.Slow=1]="Slow";e[e.Normal=2]="Normal";e[e.Fast=3]="Fast";e[e.VeryFast=4]="VeryFast"}(IntegralUISpeedMode=exports.IntegralUISpeedMode||(exports.IntegralUISpeedMode={}));!function(e){e[e.AutoSized=0]="AutoSized";e[e.Compressed=1]="Compressed";e[e.Justified=2]="Justified"}(IntegralUITabDisplayMode=exports.IntegralUITabDisplayMode||(exports.IntegralUITabDisplayMode={}));!function(e){e[e.None=0]="None";e[e.InBound=1]="InBound";e[e.OutBound=2]="OutBound"}(IntegralUITabScrollMode=exports.IntegralUITabScrollMode||(exports.IntegralUITabScrollMode={}));!function(e){e[e.Top=0]="Top";e[e.Right=1]="Right";e[e.Middle=2]="Middle";e[e.Bottom=3]="Bottom";e[e.Left=4]="Left"}(IntegralUITabStripPlacement=exports.IntegralUITabStripPlacement||(exports.IntegralUITabStripPlacement={}));!function(e){e[e.Button=0]="Button";e[e.CheckBox=1]="CheckBox";e[e.Date=2]="Date";e[e.DropList=3]="DropList";e[e.Image=4]="Image";e[e.Label=5]="Label";e[e.ListScroller=6]="ListScroller";e[e.Numeric=7]="Numeric";e[e.Progress=8]="Progress";e[e.Rating=9]="Rating";e[e.Separator=10]="Separator";e[e.Slider=11]="Slider";e[e.TextBox=12]="TextBox"}(IntegralUIToolItemType=exports.IntegralUIToolItemType||(exports.IntegralUIToolItemType={}));!function(e){e[e.None=0]="None";e[e.Hover=1]="Hover";e[e.Click=2]="Click";e[e.Always=3]="Always"}(IntegralUIVisibility=exports.IntegralUIVisibility||(exports.IntegralUIVisibility={}));!function(e){e[e.Monday=0]="Monday";e[e.Tuesday=1]="Tuesday";e[e.Wednesday=2]="Wednesday";e[e.Thursday=3]="Thursday";e[e.Friday=4]="Friday";e[e.Saturday=5]="Saturday";e[e.Sunday=6]="Sunday"}(IntegralUIWeekDays=exports.IntegralUIWeekDays||(exports.IntegralUIWeekDays={}));var IntegralUIBaseComponent=function(){function e(e){this.commonService=e;this.ctrlState=IntegralUIObjectState.normal;this.isEnabled=!0;this.options={};this.clientRect={width:0,height:0};this.ctrlSize={width:0,height:0};this.prevClientRect={width:0,height:0};this.generalClassName="";this.defaultStyle={};this.ctrlClass=[];this.allowAnimation=!1;this.enabledChanged=new core_1.EventEmitter;this.sizeChanged=new core_1.EventEmitter;this.styleChanged=new core_1.EventEmitter;this.stateChanged=new core_1.EventEmitter;this.options={currentStyle:null}}Object.defineProperty(e.prototype,"controlStyle",{get:function(){return this.currentControlStyle},set:function(e){if(e)this.currentControlStyle=e},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"data",{get:function(){return this.ctrlData},set:function(e){this.ctrlData=e},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"enabled",{get:function(){return this.isEnabled},set:function(e){if(void 0!=e&&this.isEnabled!=e){this.isEnabled=e;this.enabledChanged.emit(this);if(this.isEnabled)this.state&=~IntegralUIObjectState.disabled;else this.state|=IntegralUIObjectState.disabled}},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"size",{get:function(){return this.ctrlSize},set:function(e){if(e){var t=!1;if(void 0!=e.width&&this.ctrlSize.width!=e.width){this.ctrlSize.width=e.width;t=!0}if(void 0!=e.height&&this.ctrlSize.height!=e.height){this.ctrlSize.height=e.height;t=!0}if(t)this.sizeChanged.emit({size:this.ctrlSize})}},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"state",{get:function(){return this.ctrlState},set:function(e){if(this.ctrlState!=e){this.ctrlState=e;this.updateControlClass();this.processStateChanged();this.stateChanged.emit(this)}},enumerable:!0,configurable:!0});e.prototype.ngOnInit=function(){this.generalClassName="iui-control";this.initStyle()};e.prototype.initStyle=function(){this.defaultStyle={general:{disabled:this.generalClassName+"-disabled",focused:this.generalClassName+"-focused",normal:this.generalClassName,hovered:this.generalClassName+"-hovered",selected:this.generalClassName+"-selected"}};this.updateStyle(this.controlStyle);this.updateControlClass()};e.prototype.processStateChanged=function(){};e.prototype.updateControlClass=function(){this.ctrlClass.length=0;this.ctrlClass.push(this.generalClassName);if(this.options.currentStyle&&this.options.currentStyle.general){this.ctrlClass.push(this.options.currentStyle.general.normal);if(this.state&IntegralUIObjectState.disabled)this.ctrlClass.push(this.options.currentStyle.general.disabled);else if(this.state&IntegralUIObjectState.focused)this.ctrlClass.push(this.options.currentStyle.general.focused);else if(this.state&IntegralUIObjectState.selected)this.ctrlClass.push(this.options.currentStyle.general.selected);else if(this.state&IntegralUIObjectState.hovered)this.ctrlClass.push(this.options.currentStyle.general.hovered);if(this.allowAnimation)if(this.state&IntegralUIObjectState.hovered)this.ctrlClass.push(this.defaultStyle.general.normal+"-enter");else this.ctrlClass.push(this.defaultStyle.general.normal+"-leave")}};e.prototype.getControlClass=function(){return this.ctrlClass};e.prototype.getDefaultStyle=function(){return{general:this.getDefaultGeneralStyle()}};e.prototype.getDefaultGeneralStyle=function(){return this.defaultStyle&&this.defaultStyle.general?{disabled:this.defaultStyle.general.disabled,focused:this.defaultStyle.general.focused,hovered:this.defaultStyle.general.hovered,normal:this.defaultStyle.general.normal,selected:this.defaultStyle.general.selected}:{}};e.prototype.getGeneralStyle=function(e){if(this.commonService)if(this.commonService.isString(e))return e;else if(e)return{disabled:this.commonService.isFieldAvailable(e.disabled,this.generalClassName+"-disabled"),focused:this.commonService.isFieldAvailable(e.focused,this.generalClassName+"-focused"),hovered:this.commonService.isFieldAvailable(e.hovered,this.generalClassName+"-hovered"),normal:this.commonService.isFieldAvailable(e.normal,this.generalClassName),selected:this.commonService.isFieldAvailable(e.selected,this.generalClassName+"-selected")};return this.getDefaultGeneralStyle()};e.prototype.updateStyle=function(e){if(e)this.options.currentStyle={general:this.getGeneralStyle(e.general)};else this.options.currentStyle=this.getDefaultStyle()};e.ɵfac=function(t){return new(t||e)(i0.ɵɵdirectiveInject(i1.IntegralUICommonService))};e.ɵcmp=i0.ɵɵdefineComponent({type:e,selectors:[["iui-base"]],inputs:{allowAnimation:"allowAnimation",controlStyle:"controlStyle",data:"data",name:"name",enabled:"enabled",size:"size",state:"state"},outputs:{enabledChanged:"enabledChanged",sizeChanged:"sizeChanged",styleChanged:"styleChanged",stateChanged:"stateChanged"},decls:0,vars:0,template:function(e,t){},encapsulation:2});return e}();exports.IntegralUIBaseComponent=IntegralUIBaseComponent;var IntegralUIBaseService=function(){function e(){this.componentRef=null}e.prototype.getComponent=function(){return this.componentRef};e.prototype.setComponent=function(e){this.componentRef=e};e.ɵfac=function(t){return new(t||e)};e.ɵprov=i0.ɵɵdefineInjectable({token:e,factory:e.ɵfac});return e}();exports.IntegralUIBaseService=IntegralUIBaseService;var IntegralUIDragWindow=function(){function e(){this.iconClass="";this.position={x:0,y:0};this.size={width:0,height:0};this.title="";this.display="block"}e.prototype.updatePos=function(e){if(e){if(e.class)this.iconClass=e.class;this.position={x:e.left,y:e.top};if(e.text)this.title=e.text}};e.ɵfac=function(t){return new(t||e)};e.ɵcmp=i0.ɵɵdefineComponent({type:e,selectors:[["iui-dragwin"]],inputs:{iconClass:"iconClass",position:"position",size:"size",title:"title",display:"display"},decls:4,vars:7,consts:[["data-element","drag-window",1,"iui-dragwin",3,"ngStyle"],[3,"ngClass"],[1,"iui-dragwin-title"]],template:function(e,t){if(1&e){i0.ɵɵelementStart(0,"div",0);i0.ɵɵelement(1,"span",1);i0.ɵɵelementStart(2,"span",2);i0.ɵɵtext(3);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction3(3,_c0,t.display,t.position.y+"px",t.position.x+"px"));i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.iconClass);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(t.title)}},directives:[i2.NgStyle,i2.NgClass],encapsulation:2});return e}();exports.IntegralUIDragWindow=IntegralUIDragWindow;var IntegralUIBaseValueComponent=function(e){__extends(t,e);function t(t,i){var n=e.call(this,i)||this;n.elemRef=t;n.commonService=i;n.onChange=function(e){};n.onTouched=function(){};n.contentClass=[];n.valueChanged=new core_1.EventEmitter;return n}Object.defineProperty(t.prototype,"value",{get:function(){return this.currentValue},set:function(e){if(this.enabled&&e!==this.currentValue){this.currentValue=e;this.onChange(e);this.processValueChange();this.valueChanged.emit({value:this.currentValue})}},enumerable:!0,configurable:!0});t.prototype.writeValue=function(e){this.value=e};t.prototype.registerOnChange=function(e){this.onChange=e};t.prototype.registerOnTouched=function(e){this.onTouched=e};t.prototype.processValueChange=function(){};t.prototype.ngOnInit=function(){this.generalClassName="iui-common";this.contentClassName=this.generalClassName+"-content";this.initStyle()};t.prototype.initStyle=function(){this.defaultStyle={general:{disabled:this.generalClassName+"-disabled",focused:this.generalClassName+"-focused",normal:this.generalClassName,hovered:this.generalClassName+"-hovered",selected:this.generalClassName+"-selected"},content:{disabled:this.contentClassName+"-disabled",focused:this.contentClassName+"-focused",normal:this.contentClassName,hovered:this.contentClassName+"-hovered",selected:this.contentClassName+"-selected"}};this.updateStyle(this.controlStyle);this.updateControlClass();this.updateContentClass()};t.prototype.preventDragStart=function(e){e.preventDefault();e.stopPropagation()};t.prototype.updateLayout=function(){var e=this,t=setTimeout(function(){e.clientRect={width:e.elemRef.nativeElement.firstElementChild.clientWidth,height:e.elemRef.nativeElement.firstElementChild.clientHeight};clearTimeout(t)},1)};t.prototype.updateContentClass=function(){this.contentClass.length=0;this.contentClass.push(this.contentClassName);if(this.options.currentStyle){this.contentClass.push(this.options.currentStyle.content.normal);if(this.state&IntegralUIObjectState.disabled)this.contentClass.push(this.options.currentStyle.content.disabled);else if(this.state&IntegralUIObjectState.focused)this.contentClass.push(this.options.currentStyle.content.focused);else if(this.state&IntegralUIObjectState.selected)this.contentClass.push(this.options.currentStyle.content.selected);else if(this.state&IntegralUIObjectState.hovered)this.contentClass.push(this.options.currentStyle.content.hovered)}};t.prototype.getContentClass=function(){return this.contentClass};t.prototype.getContentStyle=function(e){if(this.commonService.isString(e))return e;else if(e)return{disabled:this.commonService.isFieldAvailable(e.disabled,this.contentClassName+"-disabled"),focused:this.commonService.isFieldAvailable(e.focused,this.contentClassName+"-focused"),hovered:this.commonService.isFieldAvailable(e.hovered,this.contentClassName+"-hovered"),normal:this.commonService.isFieldAvailable(e.normal,this.contentClassName),selected:this.commonService.isFieldAvailable(e.selected,this.contentClassName+"-selected")};else return{disabled:this.defaultStyle.content.disabled,focused:this.defaultStyle.content.focused,hovered:this.defaultStyle.content.hovered,normal:this.defaultStyle.content.normal,selected:this.defaultStyle.content.selected}};t.prototype.updateStyle=function(e){if(e)this.options.currentStyle={general:this.getGeneralStyle(e.general),content:this.getContentStyle(e.content)};else this.options.currentStyle={general:{disabled:this.defaultStyle.general.disabled,focused:this.defaultStyle.general.focused,hovered:this.defaultStyle.general.hovered,normal:this.defaultStyle.general.normal,selected:this.defaultStyle.general.selected},content:{disabled:this.defaultStyle.content.disabled,focused:this.defaultStyle.content.focused,hovered:this.defaultStyle.content.hovered,normal:this.defaultStyle.content.normal,selected:this.defaultStyle.content.selected}}};t.ɵfac=function(e){return new(e||t)(i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i1.IntegralUICommonService))};t.ɵcmp=i0.ɵɵdefineComponent({type:t,selectors:[["iui-common"]],inputs:{controlStyle:"controlStyle",data:"data",enabled:"enabled",name:"name",size:"size",state:"state",autoUpdate:"autoUpdate"},outputs:{valueChanged:"valueChanged"},features:[i0.ɵɵInheritDefinitionFeature],decls:0,vars:0,template:function(e,t){},encapsulation:2});return t}(IntegralUIBaseComponent);exports.IntegralUIBaseValueComponent=IntegralUIBaseValueComponent;var IntegralUIItem=function(e){__extends(t,e);function t(t,i){var n=e.call(this,i)||this;n.elemRef=t;n.commonService=i;n.itemPos={top:0,left:0};n.positionType="static";n.contentClass=[];n.iconSize={width:16,height:16};n.click=new core_1.EventEmitter;n.mouseDown=new core_1.EventEmitter;n.mouseUp=new core_1.EventEmitter;n.mouseEnter=new core_1.EventEmitter;n.mouseMove=new core_1.EventEmitter;n.mouseLeave=new core_1.EventEmitter;return n}t.prototype.ngOnInit=function(){this.generalClassName="iui-item";this.contentClassName=this.generalClassName+"-content";this.initStyle()};t.prototype.initStyle=function(){this.defaultStyle={general:{disabled:this.generalClassName+"-disabled",focused:this.generalClassName+"-focused",normal:this.generalClassName,hovered:this.generalClassName+"-hovered",selected:this.generalClassName+"-selected"},content:{disabled:this.contentClassName+"-disabled",focused:this.contentClassName+"-focused",normal:this.contentClassName,hovered:this.contentClassName+"-hovered",selected:this.contentClassName+"-selected"}};this.updateStyle(this.controlStyle);this.updateControlClass();this.updateContentClass()};t.prototype.getControlStyle=function(){var e={position:this.positionType,top:this.itemPos.top+"px",left:this.itemPos.left+"px"};if(this.ctrlSize.width>0)e.width=this.ctrlSize.width+"px";if(this.ctrlSize.height>0)e.height=this.ctrlSize.height+"px";return e};t.prototype.updateContentClass=function(){this.contentClass.length=0;this.contentClass.push(this.contentClassName);if(this.options.currentStyle){this.contentClass.push(this.options.currentStyle.content.normal);if(this.state&IntegralUIObjectState.disabled)this.contentClass.push(this.options.currentStyle.content.disabled);else if(this.state&IntegralUIObjectState.focused)this.contentClass.push(this.options.currentStyle.content.focused);else if(this.state&IntegralUIObjectState.selected)this.contentClass.push(this.options.currentStyle.content.selected);else if(this.state&IntegralUIObjectState.hovered)this.contentClass.push(this.options.currentStyle.content.hovered)}};t.prototype.getContentClass=function(){return this.contentClass};t.prototype.getContentStyle=function(e){if(this.commonService.isString(e))return e;else if(e)return{disabled:this.commonService.isFieldAvailable(e.disabled,this.contentClassName+"-disabled"),focused:this.commonService.isFieldAvailable(e.focused,this.contentClassName+"-focused"),hovered:this.commonService.isFieldAvailable(e.hovered,this.contentClassName+"-hovered"),normal:this.commonService.isFieldAvailable(e.normal,this.contentClassName),selected:this.commonService.isFieldAvailable(e.selected,this.contentClassName+"-selected")};else return{disabled:this.defaultStyle.content.disabled,focused:this.defaultStyle.content.focused,hovered:this.defaultStyle.content.hovered,normal:this.defaultStyle.content.normal,selected:this.defaultStyle.content.selected}};t.prototype.updateStyle=function(e){if(e)this.options.currentStyle={general:this.getGeneralStyle(e.general),content:this.getContentStyle(e.content)};else this.options.currentStyle={general:{disabled:this.defaultStyle.general.disabled,focused:this.defaultStyle.general.focused,hovered:this.defaultStyle.general.hovered,normal:this.defaultStyle.general.normal,selected:this.defaultStyle.general.selected},content:{disabled:this.defaultStyle.content.disabled,focused:this.defaultStyle.content.focused,hovered:this.defaultStyle.content.hovered,normal:this.defaultStyle.content.normal,selected:this.defaultStyle.content.selected}}};t.prototype.processStateChanged=function(){this.updateContentClass()};t.prototype.onClick=function(e){if(this.isEnabled)this.click.emit(e);e.stopPropagation()};t.prototype.onMouseDown=function(e){if(this.isEnabled)this.mouseDown.emit(e);e.stopPropagation()};t.prototype.onMouseUp=function(e){if(this.isEnabled)this.mouseUp.emit(e);e.stopPropagation()};t.prototype.onMouseEnter=function(e){if(this.isEnabled){this.state|=IntegralUIObjectState.hovered;this.mouseEnter.emit(e)}e.stopPropagation()};t.prototype.onMouseMove=function(e){if(this.isEnabled)this.mouseMove.emit(e);e.stopPropagation()};t.prototype.onMouseLeave=function(e){if(this.isEnabled){this.state&=~IntegralUIObjectState.hovered;this.mouseLeave.emit(e)}e.stopPropagation()};t.prototype.getContentSize=function(){var e={width:0,height:0};if(this.contentElem){var t=this.commonService.getMargin(this.contentElem.nativeElement);e={width:this.contentElem.nativeElement.offsetWidth+(t.left+t.right),height:this.contentElem.nativeElement.offsetHeight+(t.top+t.bottom)/2}}return e};t.prototype.getIconStatus=function(){return this.icon?"inline-block":"none"};t.prototype.getMargin=function(){if(this.elemRef)return this.commonService.getMargin(this.elemRef.nativeElement.firstElementChild);else return{top:0,right:0,bottom:0,left:0}};t.prototype.getPageRect=function(){var e={top:0,right:0,bottom:0,left:0};if(this.elemRef)e=this.commonService.getPageRect(this.elemRef.nativeElement.firstElementChild);return e};t.prototype.getClientSize=function(){var e={width:0,height:0};if(this.elemRef)e={width:this.elemRef.nativeElement.firstElementChild.clientWidth,height:this.elemRef.nativeElement.firstElementChild.clientHeight};return e};t.prototype.getSize=function(){var e={width:0,height:0};if(this.elemRef){var t=this.commonService.getMargin(this.elemRef.nativeElement.firstElementChild);e={width:this.elemRef.nativeElement.firstElementChild.offsetWidth+(t.left+t.right),height:this.elemRef.nativeElement.firstElementChild.offsetHeight+(t.top+t.bottom)/2}}return e};t.prototype.resetPos=function(){this.updateLayout("static",{x:"auto",y:"auto"})};t.prototype.updateLayout=function(e,t){this.positionType=e;this.itemPos={top:t.y,left:t.x}};t.prototype.updatePos=function(e){this.updateLayout("absolute",e)};t.ɵfac=function(e){return new(e||t)(i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i1.IntegralUICommonService))};t.ɵcmp=i0.ɵɵdefineComponent({type:t,selectors:[["iui-item"]],viewQuery:function(e,t){if(1&e)i0.ɵɵviewQuery(_c1,!0,core_1.ElementRef);if(2&e){var i;i0.ɵɵqueryRefresh(i=i0.ɵɵloadQuery())&&(t.contentElem=i.first)}},inputs:{controlStyle:"controlStyle",data:"data",enabled:"enabled",name:"name",size:"size",state:"state",icon:"icon",iconUrl:"iconUrl",iconSize:"iconSize",text:"text",visible:"visible"},outputs:{click:"click",mouseDown:"mouseDown",mouseUp:"mouseUp",mouseEnter:"mouseEnter",mouseMove:"mouseMove",mouseLeave:"mouseLeave"},features:[i0.ɵɵInheritDefinitionFeature],ngContentSelectors:_c2,decls:6,vars:5,consts:[[3,"ngClass","ngStyle","click","mousedown","mouseup","mouseenter","mousemove","mouseleave"],["content",""],["class","iui-item-icon",3,"ngClass","display",4,"ngIf"],["class","iui-item-icon-url",3,"src","width","height",4,"ngIf"],["class","iui-item-label",4,"ngIf"],[1,"iui-item-icon",3,"ngClass"],[1,"iui-item-icon-url",3,"src","width","height"],[1,"iui-item-label"]],template:function(e,t){if(1&e){i0.ɵɵprojectionDef();i0.ɵɵelementStart(0,"div",0,1);i0.ɵɵlistener("click",function(e){return t.onClick(e)})("mousedown",function(e){return t.onMouseDown(e)})("mouseup",function(e){return t.onMouseUp(e)})("mouseenter",function(e){return t.onMouseEnter(e)})("mousemove",function(e){return t.onMouseMove(e)})("mouseleave",function(e){return t.onMouseLeave(e)});i0.ɵɵtemplate(2,IntegralUIItem_span_2_Template,1,3,"span",2);i0.ɵɵtemplate(3,IntegralUIItem_img_3_Template,1,3,"img",3);i0.ɵɵtemplate(4,IntegralUIItem_span_4_Template,2,1,"span",4);i0.ɵɵprojection(5);i0.ɵɵelementEnd()}if(2&e){i0.ɵɵproperty("ngClass",t.getControlClass())("ngStyle",t.getControlStyle());i0.ɵɵadvance(2);i0.ɵɵproperty("ngIf",t.icon);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",t.iconUrl);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",t.text)}},directives:[i2.NgClass,i2.NgStyle,i2.NgIf],encapsulation:2});return t}(IntegralUIBaseComponent);exports.IntegralUIItem=IntegralUIItem;var IntegralUIList=function(e){__extends(t,e);function t(t,i,n,o){var s=e.call(this,o)||this;s.dataService=t;s.elemRef=i;s.elemRenderer=n;s.commonService=o;s.dataItems=[];s.options={};s.scrollPos=0;s.ctrlClassObj="";s.maxVisibleItems=5;s.contentSizeChanged=new core_1.EventEmitter;s.selectionChanged=new core_1.EventEmitter;s.contentSize={width:0,height:0};s.avgItemHeight=0;return s}Object.defineProperty(t.prototype,"controlStyle",{get:function(){return this.currentControlStyle},set:function(e){if(e){this.currentControlStyle=e;this.updateStyle(e);this.updateControlClass()}},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"dataFields",{set:function(e){this.updateDataFields(e)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"items",{get:function(){return this.dataItems},set:function(e){this.dataItems=e;this.updateData()},enumerable:!0,configurable:!0});t.prototype.ngOnInit=function(){this.updateData();this.generalClassName="iui-list";this.initStyle()};t.prototype.ngAfterViewInit=function(){this.updateLayout()};t.prototype.updateData=function(){this.dataService.init([{data:this.items}])};t.prototype.updateDataFields=function(e){if(e)this.options.dataFields={icon:e.icon?e.icon:"icon",id:e.id?e.id:"id",style:e.style?e.style:"style",text:e.text?e.text:"text",visible:e.visible?e.visible:"visible",value:e.value?e.value:"value"};else this.options.dataFields={icon:"icon",id:"id",style:"style",text:"text",visible:"visible",value:"value"};if(this.dataService)this.dataService.updateDataFields(this.options.dataFields)};t.prototype.getItemText=function(e){return void 0!=e[this.options.dataFields.text]?e[this.options.dataFields.text]:void 0!=e[this.options.dataFields.value]?e[this.options.dataFields.value]:""};t.prototype.ctrlClick=function(e){e.stopPropagation()};t.prototype.ctrlMouseDown=function(e){};t.prototype.ctrlMouseUp=function(e){e.stopPropagation()};t.prototype.itemMouseDown=function(e,t){if(1==e.which)this.selectionChanged.emit({item:t});e.stopPropagation()};t.prototype.itemTouchStart=function(e,t){this.selectionChanged.emit({item:t});e.stopPropagation()};t.prototype.updateLayout=function(){var e=this;setTimeout(function(){var t=e.maxVisibleItems;if(e.items.length<e.maxVisibleItems)t=e.items.length;e.avgItemHeight=e.itemElem?e.itemElem.nativeElement.offsetHeight:25;var i=t*e.avgItemHeight;if(e.contentSize.height!=i){e.contentSize={width:e.ctrlSize.width,height:i};e.contentSizeChanged.emit({size:e.contentSize})}},1)};t.prototype.onScroll=function(e){this.scrollPos=e.target.scrollTop};t.prototype.scrollTo=function(e,t){if(e=e?e:this.selectedItem){var i=this.items.indexOf(e);if(i>=0){var n=this.maxVisibleItems*this.avgItemHeight,o=i*this.avgItemHeight;if(t==IntegralUIMoveDirection.Down){if(o>=this.scrollPos+n-this.avgItemHeight)this.scrollPos=o-n+this.avgItemHeight}else if(o<this.scrollPos)this.scrollPos=o;this.elemRef.nativeElement.firstElementChild.scrollTop=this.scrollPos}}};t.prototype.refresh=function(){this.updateStyle(this.controlStyle);this.updateControlClass()};t.prototype.getControlStyle=function(){var e={};if(this.ctrlSize.width>0)e.width=this.ctrlSize.width+"px";if(this.ctrlSize.height>0)e.height=this.ctrlSize.height+"px";return e};t.prototype.updateControlClass=function(){var e=this.generalClassName;if(this.options.currentStyle){e+=" "+this.options.currentStyle.general.normal;if(this.state&IntegralUIObjectState.disabled)e+=" "+this.options.currentStyle.general.disabled;else if(this.state&IntegralUIObjectState.focused)e+=" "+this.options.currentStyle.general.focused;else if(this.state&IntegralUIObjectState.selected)e+=" "+this.options.currentStyle.general.selected;else if(this.state&IntegralUIObjectState.hovered)e+=" "+this.options.currentStyle.general.hovered}this.ctrlClassObj=e};t.ɵfac=function(e){return new(e||t)(i0.ɵɵdirectiveInject(i3.IntegralUIDataService),i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i0.Renderer2),i0.ɵɵdirectiveInject(i1.IntegralUICommonService))};t.ɵcmp=i0.ɵɵdefineComponent({type:t,selectors:[["iui-list"]],viewQuery:function(e,t){if(1&e)i0.ɵɵviewQuery(_c3,!0,core_1.ElementRef);if(2&e){var i;i0.ɵɵqueryRefresh(i=i0.ɵɵloadQuery())&&(t.itemElem=i.first)}},inputs:{controlStyle:"controlStyle",dataFields:"dataFields",items:"items",maxVisibleItems:"maxVisibleItems",selectedItem:"selectedItem"},outputs:{contentSizeChanged:"contentSizeChanged",selectionChanged:"selectionChanged"},features:[i0.ɵɵProvidersFeature([integralui_data_service_1.IntegralUIDataService]),i0.ɵɵInheritDefinitionFeature],decls:3,vars:5,consts:[[3,"ngStyle","click","mousedown","mouseup","scroll"],[3,"ngClass","mousedown","touchstart",4,"ngFor","ngForOf"],[3,"ngClass","mousedown","touchstart"],["itemElement",""]],template:function(e,t){if(1&e){i0.ɵɵelementStart(0,"div",0);i0.ɵɵlistener("click",function(e){return t.ctrlClick(e)})("mousedown",function(e){return t.ctrlMouseDown(e)})("mouseup",function(e){return t.ctrlMouseUp(e)})("mouseup",function(e){return t.ctrlMouseUp(e)})("scroll",function(e){return t.onScroll(e)});i0.ɵɵelementStart(1,"ul");i0.ɵɵtemplate(2,IntegralUIList_li_2_Template,4,4,"li",1);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){i0.ɵɵclassMap(t.ctrlClassObj);i0.ɵɵproperty("ngStyle",t.getControlStyle());i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",t.items)}},directives:[i2.NgStyle,i2.NgForOf,i2.NgClass],encapsulation:2});return t}(IntegralUIBaseComponent);exports.IntegralUIList=IntegralUIList;var IntegralUIFocus=function(){function e(e){this.elemRef=e;this.settings=!1}Object.defineProperty(e.prototype,"settings",{get:function(){return this.isFocused},set:function(e){if(this.isFocused!=e){this.isFocused=e;if(e)var t=this,i=setTimeout(function(){t.elemRef.nativeElement.focus();clearTimeout(i)},1)}},enumerable:!0,configurable:!0});e.ɵfac=function(t){return new(t||e)(i0.ɵɵdirectiveInject(i0.ElementRef))};e.ɵdir=i0.ɵɵdefineDirective({type:e,selectors:[["","iuiFocus",""]],inputs:{settings:["iuiFocus","settings"]}});return e}();exports.IntegralUIFocus=IntegralUIFocus;var IntegralUIHeaderItem=function(e){__extends(t,e);function t(t,i){var n=e.call(this,t,i)||this;n.elemRef=t;n.commonService=i;n.expandHorizontalClass=[];n.expandVerticalClass=[];n.expandArrowBottomLeftClass=[];n.expandArrowBottomRightClass=[];n.expandArrowVerticalClass=[];n.expandArrowTopLeftClass=[];n.expandArrowTopRightClass=[];n.animationType="";n.animationState="";n.expandClicked=new core_1.EventEmitter;return n}t.prototype.ngOnInit=function(){this.generalClassName="iui-header";this.expandBoxClassName=this.generalClassName+"expand-box";this.contentClassName=this.generalClassName+"-content";this.initStyle()};t.prototype.initStyle=function(){this.defaultStyle={general:{disabled:this.generalClassName+"-disabled",focused:this.generalClassName+"-focused",normal:this.generalClassName,hovered:this.generalClassName+"-hovered",selected:this.generalClassName+"-selected"},content:{disabled:this.contentClassName+"-disabled",focused:this.contentClassName+"-focused",normal:this.contentClassName,hovered:this.contentClassName+"-hovered",selected:this.contentClassName+"-selected"},expandBox:this.expandBoxClassName};this.updateStyle(this.controlStyle);this.updateControlClass();this.updateContentClass()};t.prototype.getExpandVerticalClass=function(){this.expandVerticalClass.length=0;this.expandVerticalClass.push("iui-header-expand-box-vertical");if(this.state&IntegralUIObjectState.selected)this.expandVerticalClass.push("iui-header-expand-box-vertical-collapse");else this.expandVerticalClass.push("iui-header-expand-box-vertical-expand");if(this.options.currentStyle.expandBox)this.expandVerticalClass.push(this.options.currentStyle.expandBox);return this.expandVerticalClass};t.prototype.getExpandHorizontalClass=function(){this.expandHorizontalClass.length=0;this.expandHorizontalClass.push("iui-header-expand-box-horizontal");if(this.state&IntegralUIObjectState.selected)this.expandHorizontalClass.push("iui-header-expand-box-horizontal-collapse");else this.expandHorizontalClass.push("iui-header-expand-box-horizontal-expand");if(this.options.currentStyle.expandBox)this.expandHorizontalClass.push(this.options.currentStyle.expandBox);return this.expandHorizontalClass};t.prototype.getExpandArrowBottomLeftClass=function(){this.expandArrowBottomLeftClass.length=0;this.expandArrowBottomLeftClass.push("iui-header-expand-box-arrow-bottom-left");if("expand"==this.animationState)this.expandArrowBottomLeftClass.push("iui-header-expand-box-arrow-bottom-left-collapse");else this.expandArrowBottomLeftClass.push("iui-header-expand-box-arrow-bottom-left-expand");if(this.options.currentStyle.expandBox)this.expandArrowBottomLeftClass.push(this.options.currentStyle.expandBox);return this.expandArrowBottomLeftClass};t.prototype.getExpandArrowBottomRightClass=function(){this.expandArrowBottomRightClass.length=0;this.expandArrowBottomRightClass.push("iui-header-expand-box-arrow-bottom-right");if("expand"==this.animationState)this.expandArrowBottomRightClass.push("iui-header-expand-box-arrow-bottom-right-collapse");else this.expandArrowBottomRightClass.push("iui-header-expand-box-arrow-bottom-right-expand");if(this.options.currentStyle.expandBox)this.expandArrowBottomRightClass.push(this.options.currentStyle.expandBox);return this.expandArrowBottomRightClass};t.prototype.getExpandArrowVerticalClass=function(){this.expandArrowVerticalClass.length=0;this.expandArrowVerticalClass.push("iui-header-expand-box-arrow-vertical");if("expand"==this.animationState)this.expandArrowVerticalClass.push("iui-header-expand-box-arrow-vertical-collapse");else this.expandArrowVerticalClass.push("iui-header-expand-box-arrow-vertical-expand");if(this.options.currentStyle.expandBox)this.expandArrowVerticalClass.push(this.options.currentStyle.expandBox);return this.expandArrowVerticalClass};t.prototype.getExpandArrowTopLeftClass=function(){this.expandArrowTopLeftClass.length=0;this.expandArrowTopLeftClass.push("iui-header-expand-box-arrow-top-left");if("expand"==this.animationState)this.expandArrowTopLeftClass.push("iui-header-expand-box-arrow-top-left-expand");else this.expandArrowTopLeftClass.push("iui-header-expand-box-arrow-top-left-collapse");if(this.options.currentStyle.expandBox)this.expandArrowTopLeftClass.push(this.options.currentStyle.expandBox);return this.expandArrowTopLeftClass};t.prototype.getExpandArrowTopRightClass=function(){this.expandArrowTopRightClass.length=0;this.expandArrowTopRightClass.push("iui-header-expand-box-arrow-top-right");if("expand"==this.animationState)this.expandArrowTopRightClass.push("iui-header-expand-box-arrow-top-right-expand");else this.expandArrowTopRightClass.push("iui-header-expand-box-arrow-top-right-collapse");if(this.options.currentStyle.expandBox)this.expandArrowTopRightClass.push(this.options.currentStyle.expandBox);return this.expandArrowTopRightClass};t.prototype.expandBoxClicked=function(e){if(this.isEnabled&&1==e.buttons)this.expandClicked.emit({event:e})};t.prototype.getControlStyle=function(){var e={};if(this.ctrlSize.width>0)e.width=this.ctrlSize.width+"px";if(this.ctrlSize.height>0)e.height=this.ctrlSize.height+"px";return e};t.prototype.updateStyle=function(e){if(e)this.options.currentStyle={general:this.getGeneralStyle(e.general),content:this.getContentStyle(e.content),expandBox:this.commonService.isFieldAvailable(e.expandBox,this.expandBoxClassName)};else this.options.currentStyle={general:{disabled:this.defaultStyle.general.disabled,focused:this.defaultStyle.general.focused,hovered:this.defaultStyle.general.hovered,normal:this.defaultStyle.general.normal,selected:this.defaultStyle.general.selected},content:{disabled:this.defaultStyle.content.disabled,focused:this.defaultStyle.content.focused,hovered:this.defaultStyle.content.hovered,normal:this.defaultStyle.content.normal,selected:this.defaultStyle.content.selected},expandBox:this.defaultStyle.expandBox}};t.ɵfac=function(e){return new(e||t)(i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i1.IntegralUICommonService))};t.ɵcmp=i0.ɵɵdefineComponent({type:t,selectors:[["iui-header"]],inputs:{controlStyle:"controlStyle",data:"data",enabled:"enabled",icon:"icon",iconUrl:"iconUrl",iconSize:"iconSize",name:"name",size:"size",state:"state",text:"text",animationType:"animationType",animationState:"animationState"},outputs:{click:"click",mouseDown:"mouseDown",mouseEnter:"mouseEnter",mouseLeave:"mouseLeave",mouseMove:"mouseMove",mouseUp:"mouseUp",expandClicked:"expandClicked"},features:[i0.ɵɵInheritDefinitionFeature],ngContentSelectors:_c2,decls:14,vars:17,consts:[[3,"ngClass","ngStyle","click","mousedown","mouseup","mouseenter","mousemove","mouseleave"],["content",""],["class","iui-item-icon",3,"ngClass","display",4,"ngIf"],["class","iui-item-icon-url",3,"src","width","height",4,"ngIf"],["class","iui-item-label",4,"ngIf"],[1,"iui-header-expand-box",3,"ngStyle","mousedown"],[1,"iui-header-expand-box-vertical",3,"ngClass"],[1,"iui-header-expand-box-horizontal",3,"ngClass"],[1,"iui-header-expand-box-arrow",3,"ngStyle","mousedown"],[1,"iui-header-expand-box-arrow-bottom-left",3,"ngClass"],[1,"iui-header-expand-box-arrow-bottom-right",3,"ngClass"],[1,"iui-header-expand-box-arrow-top-left",3,"ngClass"],[1,"iui-header-expand-box-arrow-top-right",3,"ngClass"],[1,"iui-item-icon",3,"ngClass"],[1,"iui-item-icon-url",3,"src","width","height"],[1,"iui-item-label"]],template:function(e,t){if(1&e){i0.ɵɵprojectionDef();i0.ɵɵelementStart(0,"div",0,1);i0.ɵɵlistener("click",function(e){return t.onClick(e)})("mousedown",function(e){return t.onMouseDown(e)})("mouseup",function(e){return t.onMouseUp(e)})("mouseenter",function(e){return t.onMouseEnter(e)})("mousemove",function(e){return t.onMouseMove(e)})("mouseleave",function(e){return t.onMouseLeave(e)});i0.ɵɵtemplate(2,IntegralUIHeaderItem_span_2_Template,1,3,"span",2);i0.ɵɵtemplate(3,IntegralUIHeaderItem_img_3_Template,1,3,"img",3);i0.ɵɵtemplate(4,IntegralUIHeaderItem_span_4_Template,2,1,"span",4);i0.ɵɵelementStart(5,"div",5);i0.ɵɵlistener("mousedown",function(e){return t.expandBoxClicked(e)});i0.ɵɵelement(6,"span",6);i0.ɵɵelement(7,"span",7);i0.ɵɵelementEnd();i0.ɵɵelementStart(8,"div",8);i0.ɵɵlistener("mousedown",function(e){return t.expandBoxClicked(e)});i0.ɵɵelement(9,"span",9);i0.ɵɵelement(10,"span",10);i0.ɵɵelement(11,"span",11);i0.ɵɵelement(12,"span",12);i0.ɵɵelementEnd();i0.ɵɵprojection(13);i0.ɵɵelementEnd()}if(2&e){i0.ɵɵproperty("ngClass",t.getControlClass())("ngStyle",t.getControlStyle());i0.ɵɵadvance(2);i0.ɵɵproperty("ngIf",t.icon);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",t.iconUrl);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",t.text);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(13,_c5,"plus-minus"==t.animationType?"block":"none"));i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.getExpandVerticalClass());i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.getExpandHorizontalClass());i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(15,_c5,"arrow"==t.animationType?"block":"none"));i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.getExpandArrowBottomLeftClass());i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.getExpandArrowBottomRightClass());i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.getExpandArrowTopLeftClass());i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",t.getExpandArrowTopRightClass())}},directives:[i2.NgClass,i2.NgStyle,i2.NgIf],encapsulation:2});return t}(IntegralUIItem);exports.IntegralUIHeaderItem=IntegralUIHeaderItem;var IntegralUIPopup=function(){function e(e,t){this.elemRef=e;this.commonService=t;this.ctrlState=IntegralUIObjectState.normal;this.isVisible=!1;this.options={};this.ctrlMaxSize={width:0,height:0};this.ctrlSize={width:0,height:0};this.generalClassName="iui-popup";this.defaultStyle={};this.ctrlClass=[];this.allowAnimation=!0;this.animationSpeed=IntegralUISpeedMode.Normal;this.display="block";this.opacity=1;this.position={x:0,y:0};this.stateChanged=new core_1.EventEmitter;this.options={currentStyle:null}}Object.defineProperty(e.prototype,"controlStyle",{get:function(){return this.currentControlStyle},set:function(e){if(e){this.currentControlStyle=e;this.updateStyle(e);this.updateControlClass()}},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"maxSize",{get:function(){return this.ctrlMaxSize},set:function(e){if(e){if(void 0!=e.width&&this.ctrlMaxSize.width!=e.width)this.ctrlMaxSize.width=e.width;if(void 0!=e.height&&this.ctrlMaxSize.height!=e.height)this.ctrlMaxSize.height=e.height}},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"size",{get:function(){return this.ctrlSize},set:function(e){if(e){if(void 0!=e.width&&this.ctrlSize.width!=e.width)this.ctrlSize.width=e.width;if(void 0!=e.height&&this.ctrlSize.height!=e.height)this.ctrlSize.height=e.height}},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"state",{get:function(){return this.ctrlState},set:function(e){if(this.ctrlState!=e){this.ctrlState=e;this.updateControlClass();this.stateChanged.emit(this)}},enumerable:!0,configurable:!0});e.prototype.ngOnInit=function(){this.generalClassName="iui-popup";this.initStyle()};e.prototype.initStyle=function(){this.defaultStyle={general:{disabled:this.generalClassName+"-disabled",focused:this.generalClassName+"-focused",normal:this.generalClassName,hovered:this.generalClassName+"-hovered",selected:this.generalClassName+"-selected"}};this.updateStyle(this.controlStyle);this.updateControlClass()};e.prototype.getAnimationFactor=function(e){var t=10;switch(this.animationSpeed){case IntegralUISpeedMode.VerySlow:t=e?2:1;break;case IntegralUISpeedMode.Slow:t=e?4:3;break;case IntegralUISpeedMode.Fast:t=e?9:7;break;case IntegralUISpeedMode.VeryFast:t=e?12:10;break;default:t=e?7:5}return t};e.prototype.processClose=function(){};e.prototype.onWindowMouseDown=function(e){if(this.isVisible){var t=this.commonService.getMousePos(e);if(this.isClickOut(t))this.processClose()}};e.prototype.onWindowTouchStart=function(e){if(this.isVisible){var t=this.commonService.getTouchData(e);if(t&&t.length>0){var i={x:t[0].pageX,y:t[0].pageY};if(this.isClickOut(i))this.processClose()}}};e.prototype.isClickOut=function(e){var t=this.commonService.getShiftPos();e.x-=t.x;e.y-=t.y;var i=this.commonService.getPageRect(this.elemRef.nativeElement.firstElementChild);return!this.commonService.checkHit(e.x,e.y,i)};e.prototype.focus=function(){var e=this,t=setTimeout(function(){e.elemRef.nativeElement.firstElementChild.focus();clearTimeout(t)},1)};e.prototype.isFieldAvailable=function(e,t){return void 0!=e?e:t};e.prototype.getControlStyle=function(){var e={display:this.display,opacity:this.opacity,top:this.position.y+"px",left:this.position.x+"px"};if(this.ctrlSize.width>0)e.width=this.ctrlSize.width+"px";if(this.ctrlSize.height>0)e.height=this.ctrlSize.height+"px";return e};e.prototype.updateControlClass=function(){this.ctrlClass.length=0;this.ctrlClass.push(this.generalClassName);if(this.options.currentStyle){this.ctrlClass.push(this.options.currentStyle.general.normal);if(this.state&IntegralUIObjectState.disabled)this.ctrlClass.push(this.options.currentStyle.general.disabled);else if(this.state&IntegralUIObjectState.focused)this.ctrlClass.push(this.options.currentSt