UNPKG

@lidorsystems/integralui-web

Version:

IntegralUI Web - Advanced UI Components for Angular

15 lines (12 loc) 23.5 kB
/* filename: integralui.treeitem.js version : 20.2.0 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_core_1=require("./integralui.core"),integralui_common_service_1=require("../services/integralui.common.service"),integralui_data_service_1=require("../services/integralui.data.service"),integralui_listitem_1=require("./integralui.listitem"),i0=require("@angular/core"),i1=require("../services/integralui.data.service"),i2=require("../services/integralui.common.service"),i3=require("./integralui.core"),i4=require("@angular/common"),_c0=["content"],_c1=["dragElem"],_c2=["block"],_c3=["expandBox"];function IntegralUITreeItem_li_0_span_4_Template(e,t){if(1&e){var i=i0.ɵɵgetCurrentView();i0.ɵɵelementStart(0,"span",13);i0.ɵɵelementStart(1,"span",14,15);i0.ɵɵlistener("mousedown",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext(2).onExpandBoxMouseDown(e)})("mousedown",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext(2).onExpandBoxMouseUp(e)})("touchstart",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext(2).onExpandBoxTouchStart(e)});i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var n=i0.ɵɵnextContext(2);i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",n.getExpandBoxClass())}}function IntegralUITreeItem_li_0_ng_template_7_Template(e,t){}var _c4=function(e,t){return{height:e,width:t}},_c5=function(e){return{"iui-listitem-animate-select iui-listitem-animate-select-left":e}},_c6=function(e){return{height:e}};function IntegralUITreeItem_li_0_span_8_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",16);i0.ɵɵelement(1,"span",10);i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext(2);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(3,_c4,i.getSize().height+"px",i.clickPos.x+"px"));i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",i0.ɵɵpureFunction1(6,_c5,i.isClicked))("ngStyle",i0.ɵɵpureFunction1(8,_c6,i.getSize().height+"px"))}}var _c7=function(e,t,i){return{left:e,height:t,width:i}},_c8=function(e){return{"iui-listitem-animate-select iui-listitem-animate-select-right":e}};function IntegralUITreeItem_li_0_span_9_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",16);i0.ɵɵelement(1,"span",10);i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext(2);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction3(3,_c7,i.clickPos.x+"px",i.getSize().height+"px",i.getSize().width-i.clickPos.x+"px"));i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",i0.ɵɵpureFunction1(7,_c8,i.isClicked))("ngStyle",i0.ɵɵpureFunction1(9,_c6,i.getSize().height+"px"))}}function IntegralUITreeItem_li_0_iui_treeitem_12_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"iui-treeitem",17);i0.ɵɵtext(1,">");i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit,n=i0.ɵɵnextContext(2);i0.ɵɵproperty("allowAnimation",n.getItemObject(i,"allowAnimation"))("enabled",n.getItemObject(i,"enabled"))("expanded",n.getItemObject(i,"expanded"))("text",n.getItemObject(i,"text"))("items",n.getItemObject(i,"items"))("templateRef",n.templateRef)("data",i)("visible",n.getItemObject(i,"visible"))}}var _c9=function(e,t){return{"iui-treeitem-animate":e,"iui-listitem-animate-enter-suspended":t}},_c10=function(e){return{display:e}},_c11=function(e){return{height:e}};function IntegralUITreeItem_li_0_Template(e,t){if(1&e){var i=i0.ɵɵgetCurrentView();i0.ɵɵelementStart(0,"li",1);i0.ɵɵelementStart(1,"div",2);i0.ɵɵelementStart(2,"div",3,4);i0.ɵɵlistener("dragstart",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().itemDragStart(e)})("dragover",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().itemDragOver(e)})("drop",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().itemDragDrop(e)})("mouseenter",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onMouseEnter(e)})("mousemove",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onMouseMove(e)})("mouseleave",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onMouseLeave(e)});i0.ɵɵtemplate(4,IntegralUITreeItem_li_0_span_4_Template,3,1,"span",5);i0.ɵɵelementStart(5,"div",6,7);i0.ɵɵlistener("click",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onClick(e)})("dblclick",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onDblClick(e)})("contextmenu",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onRightClick(e)})("mousedown",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onMouseDown(e)})("mouseup",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onMouseUp(e)})("touchstart",function(e){i0.ɵɵrestoreView(i);return i0.ɵɵnextContext().onTouchStart(e)});i0.ɵɵtemplate(7,IntegralUITreeItem_li_0_ng_template_7_Template,0,0,"ng-template",8);i0.ɵɵelementEnd();i0.ɵɵelementEnd();i0.ɵɵelementEnd();i0.ɵɵtemplate(8,IntegralUITreeItem_li_0_span_8_Template,2,10,"span",9);i0.ɵɵtemplate(9,IntegralUITreeItem_li_0_span_9_Template,2,11,"span",9);i0.ɵɵelementStart(10,"ul",10,11);i0.ɵɵtemplate(12,IntegralUITreeItem_li_0_iui_treeitem_12_Template,2,8,"iui-treeitem",12);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var n=i0.ɵɵnextContext();i0.ɵɵproperty("ngClass",i0.ɵɵpureFunction2(13,_c9,n.allowAnimation,n.allowAnimation&&n.isHovered));i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",n.getControlClass());i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",n.getContentClass())("ngStyle",n.getControlStyle());i0.ɵɵadvance(2);i0.ɵɵproperty("ngIf",n.checkExpandBoxVisibility());i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(16,_c10,0==n.getItemDisplayMode()?"inline-block":"block"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",n.templateData)("ngForTemplate",n.templateRef);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",n.allowAnimation&&n.isClicked);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",n.allowAnimation&&n.isClicked);i0.ɵɵadvance(1);i0.ɵɵproperty("ngClass",n.getBlockClass())("ngStyle",i0.ɵɵpureFunction1(18,_c11,n.blockElemHeight));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",n.items)}}var IntegralUITreeItem=function(e){__extends(t,e);function t(t,i,n,s){var a=e.call(this,t,n,s)||this;a.elemRef=t;a.dataService=i;a.commonService=n;a.baseService=s;a.contentAnimation={display:"none",left:0,width:0,height:0};a.numItems=0;a.templateData=[];a.expandState="none";a.blockElemHeight="0";a.eventList=[];a.parentItem=null;a.blockClass=[];a.expandBoxClass=[];a.isExpandBoxTouched=!1;a.itemClick=new core_1.EventEmitter;a.itemDblClick=new core_1.EventEmitter;a.itemRightClick=new core_1.EventEmitter;return a}Object.defineProperty(t.prototype,"expanded",{get:function(){return this.isExpanded},set:function(e){if(this.isExpanded!=e){var t=!0;if(this.parentCtrl&&this.parentCtrl.invokeEvent)t=this.parentCtrl.invokeEvent(e?"BEFORE_EXPAND":"BEFORE_COLLAPSE",this.data);if(t){if(e)this.expandState="expand";else this.expandState="collapse";this.isExpanded=e;if(this.parentCtrl)this.parentCtrl.invokeMethod("CHANGE_EXPANDED",{component:this});this.updateBlockClass();this.updateExpandBoxClass();this.toggleContent();if(this.parentCtrl&&this.parentCtrl.invokeEvent)this.parentCtrl.invokeEvent(e?"AFTER_EXPAND":"AFTER_COLLAPSE",this.data)}}},enumerable:!0,configurable:!0});t.prototype.ngOnInit=function(){this.templateData.push(this.data);this.parentCtrl=this.baseService.getComponent();this.dataService.init([{data:this.items}]);this.isExpanded=this.parentCtrl?this.parentCtrl.isItemExpanded(this.data):!0;this.blockElemHeight="0";this.generalClassName="iui-treeitem";this.blockClassName=this.generalClassName+"-list";this.contentClassName=this.generalClassName+"-content";this.expandBoxClassName=this.generalClassName+"-expand-box";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"},expandBox:{general:this.expandBoxClassName,load:this.expandBoxClassName+"-load",expanded:this.expandBoxClassName+"-open",collapsed:this.expandBoxClassName+"-close"},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.refresh()};t.prototype.ngAfterViewInit=function(){if(this.contentElem){this.contentAnimation={display:"none",left:this.contentElem.nativeElement.offsetWidth/2,width:0,height:this.contentElem.nativeElement.offsetHeight};this.toggleContent()}};t.prototype.ngAfterContentChecked=function(){if(this.contentList){this.itemList=this.contentList.toArray();if(this.numItems!=this.itemList.length){this.numItems=this.itemList.length;this.refresh()}}};t.prototype.onClick=function(e){if(this.isEnabled&&1==e.which){var t={event:e,item:this.data};if(this.parentCtrl)this.parentCtrl.itemClick.emit(t);else this.itemClick.emit(t)}};t.prototype.onDblClick=function(e){if(this.isEnabled&&1==e.which){var t={cancel:!1,event:e,item:this.data};if(this.parentCtrl)this.parentCtrl.itemDblClick.emit(t);else this.itemDblClick.emit(t);if(1!=t.cancel)this.toggle()}};t.prototype.onRightClick=function(e){if(this.isEnabled){var t={event:e,item:this.data};if(this.parentCtrl)this.parentCtrl.itemRightClick.emit(t);else this.itemRightClick.emit(t)}};t.prototype.itemDragOver=function(e,t){if(this.isEnabled&&this.parentCtrl){var i=this.parentCtrl.getItemFromComponent(this),n=this.getPageRect(),s=this.getContentSize(),a={x:n.left,y:n.top,width:n.right-n.left,height:s.height};this.parentCtrl.expandOnDelay(i);this.parentCtrl.processDragOver(e,i,a,t)}e.stopPropagation()};t.prototype.itemDragDrop=function(e){if(this.isEnabled&&this.parentCtrl){this.parentCtrl.processDragDrop(e,this.data);var t=this;if(t.expanded&&!t.isBlockExpanded())var i=setTimeout(function(){t.toggleContent();clearTimeout(i)},100)}e.stopPropagation()};t.prototype.isBlockExpanded=function(){return"0"==this.blockElemHeight?!1:!0};t.prototype.collapse=function(e){this.expanded=!1;if(e){this.itemList=this.contentList.toArray();if(this.itemList&&this.itemList.length>0)this.itemList.forEach(function(t){t.collapse(e)})}};t.prototype.expand=function(e){this.expanded=!0;if(e){this.itemList=this.contentList.toArray();if(this.itemList&&this.itemList.length>0)this.itemList.forEach(function(t){t.expand(e)})}};t.prototype.toggle=function(e,t){this.expanded=void 0!=e?e:!this.expanded;if(t){this.itemList=this.contentList.toArray();if(this.itemList&&this.itemList.length>0)this.itemList.forEach(function(i){i.toggle(e,t)})}};t.prototype.onExpandBoxMouseDown=function(e){if(this.isEnabled&&!this.isExpandBoxTouched)this.toggle();this.isExpandBoxTouched=!1;e.stopPropagation()};t.prototype.onExpandBoxMouseUp=function(e){this.isExpandBoxTouched=!1};t.prototype.onExpandBoxTouchStart=function(e){this.isExpandBoxTouched=!0;if(this.isEnabled)this.toggle();e.stopPropagation()};t.prototype.toggleContent=function(){var e=this;if(e.items&&e.contentElem){var t=e.contentElem.nativeElement.offsetHeight*e.items.length,i=0,n=0;if(e.expanded)if(e.allowAnimation)var s=setInterval(function(){if(i<t){i+=n=0==n?1:n+2;e.blockElemHeight=i+"px"}else{e.blockElemHeight="auto";e.expandState="none";e.updateExpandBoxClass();if(e.parentCtrl)e.parentCtrl.updateLayout();clearInterval(s)}},25);else{e.blockElemHeight="auto";e.expandState="none";e.updateExpandBoxClass();if(e.parentCtrl)e.parentCtrl.updateLayout()}else{i=e.blockElem.nativeElement.offsetHeight;if(e.allowAnimation)var a=setInterval(function(){if(i>0){i-=n=0==n?1:n+2;e.blockElemHeight=i+"px"}else{e.blockElemHeight="0";e.expandState="none";e.updateExpandBoxClass();if(e.parentCtrl)e.parentCtrl.updateLayout();clearInterval(a)}},25);else{e.blockElemHeight="0";e.expandState="none";e.updateExpandBoxClass();if(e.parentCtrl)e.parentCtrl.updateLayout()}}}};t.prototype.getComponentFromItem=function(e){var t=null;this.itemList=this.contentList.toArray();if(this.itemList&&this.itemList.length>0)for(var i=0;!t&&i<this.itemList.length;){var n=this.itemList[i];if(this.getItemFromComponent(n)==e){t=n;break}else t=n.getComponentFromItem(e);i++}return t};t.prototype.getItemFromComponent=function(e){if(e&&e.data)return e.data;if(this.items){this.itemList=this.contentList.toArray();var t=this.itemList.indexOf(e);if(t>=0&&t<this.items.length)return this.items[t]}return null};t.prototype.getItemObject=function(e,t){return this.parentCtrl?this.parentCtrl.getItemObject(e,t):null};t.prototype.isThereVisibleChildren=function(){var e=!1;if(this.data&&this.parentCtrl){var t=this.data[this.parentCtrl.getDataFields().items];if(t&&t.length>0)e=!0}return e};t.prototype.getSize=function(){var e={width:0,height:0};if(this.contentElem){e={width:this.contentElem.nativeElement.offsetWidth,height:this.contentElem.nativeElement.offsetHeight};if(this.isExpanded&&this.contentList){var t=this.commonService.getPadding(this.blockElem.nativeElement);this.itemList=this.contentList.toArray();for(var i=0;i<this.itemList.length;i++){var n=this.itemList[i].getSize();n.width+=t.left;if(e.width<n.width)e.width=n.width}}}return e};t.prototype.checkExpandBoxVisibility=function(){return this.parentCtrl?this.parentCtrl.showExpandBox:!0};t.prototype.onMouseEnter=function(e){if(this.isEnabled){this.state|=integralui_core_1.IntegralUIObjectState.hovered;this.mouseEnter.emit(e);if(this.data&&this.parentCtrl)this.parentCtrl.invokeEvent("ITEM_HOVER",this.data);this.isHovered=!0}e.stopPropagation()};t.prototype.clearComponentSelection=function(){this.itemList=this.contentList.toArray();if(this.itemList&&this.itemList.length>0)this.itemList.forEach(function(e){e.state&=~integralui_core_1.IntegralUIObjectState.selected;e.clearComponentSelection()})};t.prototype.selectItem=function(){if(this.parentCtrl)this.parentCtrl.clearSelection();this.state|=integralui_core_1.IntegralUIObjectState.selected};t.prototype.getControlStyle=function(){var e={};if(this.data&&this.parentCtrl){var t=this.parentCtrl.getDataFields();e=this.data[t.style]||{}}e.display=0==this.getItemDisplayMode()?"inline-block":"block";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.getItemDisplayMode=function(){return this.parentCtrl?this.parentCtrl.itemDisplay:integralui_core_1.IntegralUIItemDisplayMode.Full};t.prototype.refresh=function(){this.updateControlClass();this.updateContentClass();this.updateBlockClass();this.updateExpandBoxClass();if(this.contentList){this.itemList=this.contentList.toArray();for(var e=0;e<this.itemList.length;e++)this.itemList[e].refresh()}};t.prototype.updateBlockClass=function(){this.blockClass.length=0;this.blockClass.push(this.blockClassName);if(this.items&&this.items.length>0)if(0!=this.expanded)this.blockClass.push(this.blockClassName+"-open");else this.blockClass.push(this.blockClassName+"-close")};t.prototype.getBlockClass=function(){return this.blockClass};t.prototype.getGeneralClass=function(){return this.generalClassName};t.prototype.updateExpandBoxClass=function(){this.expandBoxClass.length=0;if(this.options.currentStyle&&this.parentCtrl){var e=this.parentCtrl.getDataFields();if(this.parentCtrl.isThereChildren()||this.data&&this.data[e.hasChildren])this.expandBoxClass.push(this.options.currentStyle.expandBox.general);if(this.data&&this.data[e.hasChildren]&&(this.isThereVisibleChildren()||!this.data[e.items]||this.data[e.items]&&0==this.data[e.items].length)||this.isThereVisibleChildren())if(this.parentCtrl&&this.parentCtrl.isItemLoading(this.data))this.expandBoxClass.push(this.options.currentStyle.expandBox.load);else if(0!=this.expanded){if("none"==this.expandState)this.expandBoxClass.push(this.options.currentStyle.expandBox.expanded);else if("expand"==this.expandState)this.expandBoxClass.push(this.options.currentStyle.expandBox.expanded+"-animate")}else if("none"==this.expandState)this.expandBoxClass.push(this.options.currentStyle.expandBox.collapsed);else if("collapse"==this.expandState)this.expandBoxClass.push(this.options.currentStyle.expandBox.collapsed+"-animate")}};t.prototype.getExpandBoxClass=function(){return this.expandBoxClass};t.prototype.getExpandBoxStyle=function(e){if(this.commonService.isString(e))return e;else if(e)return{general:this.commonService.isFieldAvailable(e.general,this.expandBoxClassName),load:this.commonService.isFieldAvailable(e.load,this.expandBoxClassName+"-load"),expanded:this.commonService.isFieldAvailable(e.expanded,this.expandBoxClassName+"-open"),collapsed:this.commonService.isFieldAvailable(e.collapsed,this.expandBoxClassName+"-close")};else return{general:this.defaultStyle.expandBox.general,load:this.defaultStyle.expandBox.load,expanded:this.defaultStyle.expandBox.expanded,collapsed:this.defaultStyle.expandBox.collapsed}};t.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.parentCtrl&&this.parentCtrl.getDisplayMode()==integralui_core_1.IntegralUIItemDisplayMode.Full){this.ctrlClass.push("iui-treeitem-block");if(this.state&integralui_core_1.IntegralUIObjectState.disabled)this.ctrlClass.push(this.options.currentStyle.general.disabled);else if(this.state&integralui_core_1.IntegralUIObjectState.focused)this.ctrlClass.push(this.options.currentStyle.general.focused);else if(this.state&integralui_core_1.IntegralUIObjectState.selected)this.ctrlClass.push(this.options.currentStyle.general.selected);else if(this.state&integralui_core_1.IntegralUIObjectState.hovered)this.ctrlClass.push(this.options.currentStyle.general.hovered);if(this.allowAnimation)if(this.state&integralui_core_1.IntegralUIObjectState.hovered)this.ctrlClass.push(this.defaultStyle.general.normal+"-enter");else this.ctrlClass.push(this.defaultStyle.general.normal+"-leave")}}};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.parentCtrl&&this.parentCtrl.getDisplayMode()==integralui_core_1.IntegralUIItemDisplayMode.Partial){this.contentClass.push("iui-treeitem-content-block");if(this.state&integralui_core_1.IntegralUIObjectState.disabled)this.contentClass.push(this.options.currentStyle.content.disabled);else if(this.state&integralui_core_1.IntegralUIObjectState.focused)this.contentClass.push(this.options.currentStyle.content.focused);else if(this.state&integralui_core_1.IntegralUIObjectState.selected)this.contentClass.push(this.options.currentStyle.content.selected);else if(this.state&integralui_core_1.IntegralUIObjectState.hovered)this.contentClass.push(this.options.currentStyle.content.hovered)}}};t.prototype.updateStyle=function(e){if(e)this.options.currentStyle={content:this.getContentStyle(e.content),expandBox:this.getExpandBoxStyle(e.expandBox),general:this.getGeneralStyle(e.general)};else this.options.currentStyle={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:{general:this.defaultStyle.expandBox.general,load:this.defaultStyle.expandBox.load,expanded:this.defaultStyle.expandBox.expanded,collapsed:this.defaultStyle.expandBox.collapsed},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}}};t.ɵfac=function(e){return new(e||t)(i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i1.IntegralUIDataService),i0.ɵɵdirectiveInject(i2.IntegralUICommonService),i0.ɵɵdirectiveInject(i3.IntegralUIBaseService))};t.ɵcmp=i0.ɵɵdefineComponent({type:t,selectors:[["iui-treeitem"]],viewQuery:function(e,i){if(1&e){i0.ɵɵviewQuery(_c0,!0,core_1.ElementRef);i0.ɵɵviewQuery(_c1,!0,core_1.ElementRef);i0.ɵɵviewQuery(_c2,!0,core_1.ElementRef);i0.ɵɵviewQuery(_c3,!0,core_1.ElementRef);i0.ɵɵviewQuery(t,!0)}if(2&e){var n;i0.ɵɵqueryRefresh(n=i0.ɵɵloadQuery())&&(i.contentElem=n.first);i0.ɵɵqueryRefresh(n=i0.ɵɵloadQuery())&&(i.dragElem=n.first);i0.ɵɵqueryRefresh(n=i0.ɵɵloadQuery())&&(i.blockElem=n.first);i0.ɵɵqueryRefresh(n=i0.ɵɵloadQuery())&&(i.expandBoxElem=n.first);i0.ɵɵqueryRefresh(n=i0.ɵɵloadQuery())&&(i.contentList=n)}},inputs:{controlStyle:"controlStyle",data:"data",enabled:"enabled",icon:"icon",name:"name",size:"size",state:"state",text:"text",items:"items",templateRef:"templateRef",expanded:"expanded"},outputs:{click:"click",mouseDown:"mouseDown",mouseEnter:"mouseEnter",mouseLeave:"mouseLeave",mouseMove:"mouseMove",mouseUp:"mouseUp",itemClick:"itemClick",itemDblClick:"itemDblClick",itemRightClick:"itemRightClick"},features:[i0.ɵɵProvidersFeature([integralui_data_service_1.IntegralUIDataService]),i0.ɵɵInheritDefinitionFeature],decls:1,vars:1,consts:[["style","position:relative",3,"ngClass",4,"ngIf"],[2,"position","relative",3,"ngClass"],[3,"ngClass"],["draggable","true",3,"ngClass","ngStyle","dragstart","dragover","drop","mouseenter","mousemove","mouseleave"],["content",""],["class","iui-treeitem-expand-box-general",4,"ngIf"],[3,"ngStyle","click","dblclick","contextmenu","mousedown","mouseup","touchstart"],["dragElem",""],["ngFor","",3,"ngForOf","ngForTemplate"],["class","iui-listitem-animate-select-block",3,"ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"],["block",""],[3,"allowAnimation","enabled","expanded","text","items","templateRef","data","visible",4,"ngFor","ngForOf"],[1,"iui-treeitem-expand-box-general"],[3,"ngClass","mousedown","touchstart"],["expandBox",""],[1,"iui-listitem-animate-select-block",3,"ngStyle"],[3,"allowAnimation","enabled","expanded","text","items","templateRef","data","visible"]],template:function(e,t){if(1&e)i0.ɵɵtemplate(0,IntegralUITreeItem_li_0_Template,13,20,"li",0);if(2&e)i0.ɵɵproperty("ngIf",t.visible)},directives:[i4.NgIf,i4.NgClass,i4.NgStyle,i4.NgForOf,t],encapsulation:2});return t}(integralui_listitem_1.IntegralUIListItem);exports.IntegralUITreeItem=IntegralUITreeItem;