Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-layouts

Package Overview
Dependencies
Maintainers
2
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-layouts - npm Package Compare versions

Comparing version 16.4.40-beta to 16.4.42

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## 16.4.40-beta (2018-12-10)
### Splitter

@@ -7,0 +9,0 @@

4

dist/ej2-layouts.umd.min.js
/*!
* filename: ej2-layouts.umd.min.js
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";var i=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)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),n=function(e,t,i,n){var s,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,i,a):s(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},s="e-splitter",r="e-splitter-horizontal",a="e-splitter-vertical",o="e-pane-horizontal",h="e-pane-vertical",l="e-split-bar",p="e-split-bar-horizontal",d="e-split-bar-vertical",u="e-static-pane",c="e-scrollable",P="e-resize-handler",v="e-resizable-split-bar",g="e-split-bar-hover",f="e-split-bar-active",x="e-hide-handler",m="e-disabled",y=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return i(s,e),n([t.Property()],s.prototype,"size",void 0),n([t.Property(!0)],s.prototype,"resizable",void 0),n([t.Property(null)],s.prototype,"min",void 0),n([t.Property(null)],s.prototype,"max",void 0),n([t.Property()],s.prototype,"content",void 0),s}(t.ChildProperty),C=function(e){function C(t,i){var n=e.call(this,t,i)||this;return n.allPanes=[],n.paneOrder=[],n.separatorOrder=[],n.allBars=[],n.previousCoordinates={},n.currentCoordinates={},n.updatePrePaneInPercentage=!1,n.updateNextPaneInPercentage=!1,n.panesDimensions=[],n.border=0,n}return i(C,e),C.prototype.onPropertyChanged=function(e,i){if(this.element.classList.contains(s))for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(!(e.paneSettings instanceof Array&&i.paneSettings instanceof Array))for(var a=Object.keys(e.paneSettings),o=0;o<a.length;o++){var h=parseInt(Object.keys(e.paneSettings)[o],10),l=Object.keys(e.paneSettings[h])[0],p=Object(e.paneSettings[h])[l];h=this.enableRtl?this.allBars.length-1-h:h,"content"===l&&(this.allPanes[h].innerHTML="",this.setTemplate(p,this.allPanes[h])),"resizable"===l&&(t.EventHandler.remove(this.allBars[h],"mousedown",this.onMouseDown),p?(t.EventHandler.add(this.allBars[h],"mousedown",this.onMouseDown,this),this.currentSeparator=this.allBars[h],this.isResizable()&&(this.showResizer(this.allBars[h]),this.allBars[h].classList.add(v))):(this.hideResizer(this.allBars[h]),this.allBars[h].classList.remove(v))),"size"===l&&(this.allPanes[h].style.flexBasis=p)}break;case"enableRtl":this.setRTL(e.enableRtl)}}},C.prototype.preRender=function(){this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,t.removeClass([this.wrapper],["e-control","e-lib",s]);var e="Horizontal"===this.orientation?r:a;t.addClass([this.element],e),t.Browser.isDevice&&t.addClass([this.element],"e-splitter-touch")},C.prototype.getPersistData=function(){return this.addOnPersist([])},C.prototype.getModuleName=function(){return"splitter"},C.prototype.render=function(){this.setCssClass(this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl)},C.prototype.setRTL=function(e){e?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},C.prototype.setSplitterSize=function(e,i,n){var s="width"===n?{width:t.formatUnit(i)}:{height:t.formatUnit(i)};t.setStyleAttribute(e,s)},C.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},C.prototype.setCssClass=function(e){""!==e&&t.addClass([this.element],e.split(" "))},C.prototype.hideResizer=function(e){t.addClass([t.select("."+P,e)],x)},C.prototype.showResizer=function(e){t.removeClass([t.select("."+P,e)],x)},C.prototype.isEnabled=function(e){e?t.removeClass([this.element],m):t.addClass([this.element],m)},C.prototype.setSeparatorSize=function(e){for(var i=t.isNullOrUndefined(e)?"auto":e+"px",n="Horizontal"===this.orientation?p:d,s=0;s<this.allBars.length;s++){var r=t.selectAll("."+n,this.element)[s],a=t.selectAll("."+P,r)[0];"Horizontal"===this.orientation?(r.style.width=i,t.isNullOrUndefined(a)||(a.style.width=i)):(r.style.height=i,t.isNullOrUndefined(a)||(a.style.height=i))}},C.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?r:a),this.element.classList.add(t?a:r),this.element.removeAttribute("aria-orientation"),this.element.setAttribute("aria-orientation",e);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?o:h),this.allPanes[i].classList.add(t?h:o);for(i=0;i<this.allBars.length;i++)this.allBars[i].classList.remove(t?p:d),this.allBars[i].classList.add(t?d:p)},C.prototype.getPrevPane=function(e,t){var i=this.enableRtl?(t-1)/2+1:(t-1)/2;return e.parentElement.children[i]},C.prototype.getNextPane=function(e,t){var i=this.enableRtl?(t-1)/2:(t-1)/2+1;return e.parentElement.children[i]},C.prototype.addResizeHandler=function(e){var i=this.createElement("div");t.addClass([i],[P,"e-icons"]);var n=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?i.style.width=n:i.style.height=n,e.appendChild(i)},C.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},C.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},C.prototype.setDimension=function(e,i){t.setStyleAttribute(this.element,{height:e,width:i})},C.prototype.createSeparator=function(e){var i=this.createElement("div");return this.allBars.push(i),"Horizontal"===this.orientation?(t.addClass([i],[l,p]),i.style.width=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"):(t.addClass([i],[l,d]),i.style.height=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"),this.addMouseActions(i),this.addResizeHandler(i),i},C.prototype.addSeparator=function(e){for(var i=this.allPanes.length,n=e.children,s=0;s<i;s++)if(s<i-1){var r=this.createSeparator(s);if(t.setStyleAttribute(r,{order:2*s+1}),this.separatorOrder.push(2*s+1),n[s].parentNode.appendChild(r),this.currentSeparator=r,r.setAttribute("role","separator"),this.isResizable()){t.EventHandler.add(r,"mousedown",this.onMouseDown,this);var a="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(r,a,this.onMouseDown,this),r.classList.add(v)}else this.hideResizer(r)}},C.prototype.isResizable=function(){var e=!1;return(!t.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},C.prototype.addMouseActions=function(e){e.addEventListener("mouseover",function(){t.addClass([e],[g])}),e.addEventListener("mouseout",function(){t.removeClass([e],[g])})},C.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},C.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e:e.parentElement},C.prototype.isSeparator=function(e){var t=!0;return(e.classList.contains(P)||e.classList.contains("e-split-line"))&&(t=!1),t},C.prototype.isMouseEvent=function(e){var i=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(i=!0),i},C.prototype.updateCursorPosition=function(e,i){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},i);else{var n="msie"!==t.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:n.pageX,y:n.pageY},i)}},C.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},C.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.onMouseMove,this),t.EventHandler.add(document,"mouseup",this.onMouseUp,this);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.add(document,e,this.onMouseMove,this),t.EventHandler.add(document,i,this.onMouseUp,this)},C.prototype.unwireResizeEvents=function(){var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.remove(document,"mousemove",this.onMouseMove),t.EventHandler.remove(document,"mouseup",this.onMouseUp),t.EventHandler.remove(document,e,this.onMouseMove),t.EventHandler.remove(document,i,this.onMouseUp)},C.prototype.onMouseDown=function(e){e.preventDefault();var i=e.target;this.updateCurrentSeparator(i),t.addClass([this.currentSeparator],f),this.updateCursorPosition(e,"previous"),this.getPaneDetails();var n={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1};if(this.trigger("resizeStart",n),!n.cancel)if(this.wireResizeEvents(),this.previousPane.style.flexBasis.indexOf("%")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var s=this.updatePaneFlexBasis(this.previousPane),r=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=s+r,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%")}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight},C.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},C.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},C.prototype.convertPercentageToPixel=function(e,i){var n,s=e.toString();if(s.indexOf("%")>-1){n=parseFloat(s.slice(0,s.indexOf("%")));var r=void 0;r=t.isNullOrUndefined(i)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(i)],n=Math.ceil(r*(n/100))}else n=parseInt(s,10);return n},C.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},C.prototype.convertPixelToNumber=function(e){return e.indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},C.prototype.calcDragPosition=function(e,t){var i,n;return i="Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e,n=i/t,(n=n>1?1:n<0?0:n)*t},C.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left:this.element.getBoundingClientRect().top,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},C.prototype.getMinMax=function(e,i,n){var s="min"===n?0:null,r=null;return"min"===n?t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(r=this.paneSettings[e].min):t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(r=this.paneSettings[e].max),this.paneSettings.length>0&&!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(r)?(r.indexOf("%")>0&&(r=this.convertPercentageToPixel(r,i).toString()),this.convertPixelToNumber(r)):s},C.prototype.getPreviousPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e+1:e},C.prototype.getNextPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e:e+1},C.prototype.getPaneDetails=function(){this.order=parseInt(this.currentSeparator.style.order,10),this.previousPane=this.getPrevPane(this.currentSeparator,this.order),this.nextPane=this.getNextPane(this.currentSeparator,this.order),this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex()},C.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},C.prototype.boundingRectValues=function(e){return"Horizontal"===this.orientation?e.getBoundingClientRect().width:e.getBoundingClientRect().height},C.prototype.isValidSize=function(e){var i=!1;return!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(i=!0),i},C.prototype.getPaneDimensions=function(){if(this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.paneSettings.length<1)return this.prePaneDimenson=this.boundingRectValues(this.previousPane),void(this.nextPaneDimension=this.boundingRectValues(this.nextPane));this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},C.prototype.checkCoordinates=function(e,t){var i=!0;return e!==this.previousCoordinates.x&&t!==this.previousCoordinates.y||(i=!1),i},C.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==t.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},C.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==t.Browser.info.name?this.border:e},C.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions();var t={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",t);var i,n=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+n-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+n-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.prevPaneCurrentWidth=i+this.convertPixelToNumber(this.previousPaneHeightWidth),this.nextPaneCurrentWidth=this.nextPaneHeightWidth-i,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth=parseInt(this.nextPaneCurrentWidth,10),this.prevPaneCurrentWidth=parseInt(this.prevPaneCurrentWidth,10),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass(),this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,this.nextPane.style.flexBasis=this.nextPaneCurrentWidth}},C.prototype.validateMinRange=function(e,i,n){var s,r,a=null,o=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a,n).toString()),i<(s=this.convertPixelToNumber(a))&&(o=i-s<=0?0:i-s,this.totalWidth=this.totalWidth-o,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},C.prototype.validateMaxRange=function(e,i,n){var s,r,a=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a,n).toString()),i>(s=this.convertPixelToNumber(a))&&(this.totalWidth=this.totalWidth-(i-s),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},C.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane)},C.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},C.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},C.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(u)||this.previousPane.classList.add(u),this.nextPane.classList.contains(u)||this.nextPane.classList.add(u)},C.prototype.validateDraggedPosition=function(e,i,n){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,r=s-i,a=n+s,o=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),h=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),l=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),p=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),d=e;return e>a-h?d=a-h:e<r+o&&(d=r+o),t.isNullOrUndefined(l)?t.isNullOrUndefined(p)||e<a-p&&(d=a-p):e>r+l&&(d=r+l),d},C.prototype.onMouseUp=function(e){t.removeClass([this.currentSeparator],f),this.unwireResizeEvents();var i={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]};this.trigger("resizeStop",i)},C.prototype.panesDimension=function(e,i){var n,s=i.length;parseInt(this.getHeight(this.element),10),t.isNullOrUndefined(this.paneSettings[e])?t.setStyleAttribute(i[e],{order:2*e}):t.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,t.setStyleAttribute(i[e],{order:2*e})):(n=this.paneSettings[e].size,e<s&&(t.setStyleAttribute(i[e],{"flex-basis":n,order:2*e}),e<s-1?t.addClass([i[e]],u):this.sizeFlag||(i[e].style.flexBasis=null),e===s-1&&this.sizeFlag&&t.addClass([i[e]],u))),this.paneOrder.push(2*e)},C.prototype.setTemplate=function(e,i){for(var n=[],s=0,r=t.compile(e)({});s<r.length;s++){var a=r[s];n.push(a)}t.append([].slice.call(n),i)},C.prototype.createSplitPane=function(e){var i=e.children.length;if(i<this.paneSettings.length)for(var n=0;n<this.paneSettings.length;n++){var s=this.createElement("div");this.element.appendChild(s)}i=e.children.length;var r=e.children;if(this.element.setAttribute("aria-orientation",this.orientation),this.element.setAttribute("role","splitter"),this.sizeFlag=!1,i>1)for(n=0;n<i;n++)1===r[n].nodeType&&(this.allPanes.push(r[n]),"Horizontal"===this.orientation?(t.addClass([r[n]],["e-pane",o,c]),this.panesDimension(n,r)):(t.addClass([r[n]],["e-pane",h,c]),this.panesDimension(n,r)),t.isNullOrUndefined(this.paneSettings[n])||t.isNullOrUndefined(this.paneSettings[n].content)||this.setTemplate(this.paneSettings[n].content,r[n]))},C.prototype.destroy=function(){t.detach(this.element),this.element=this.wrapper,this.wrapperParent.appendChild(this.wrapper)},n([t.Property("100%")],C.prototype,"height",void 0),n([t.Property("100%")],C.prototype,"width",void 0),n([t.Collection([],y)],C.prototype,"paneSettings",void 0),n([t.Property("Horizontal")],C.prototype,"orientation",void 0),n([t.Property("")],C.prototype,"cssClass",void 0),n([t.Property(!0)],C.prototype,"enabled",void 0),n([t.Property(!1)],C.prototype,"enableRtl",void 0),n([t.Property(null)],C.prototype,"separatorSize",void 0),n([t.Event()],C.prototype,"created",void 0),n([t.Event()],C.prototype,"resizeStart",void 0),n([t.Event()],C.prototype,"resizing",void 0),n([t.Event()],C.prototype,"resizeStop",void 0),C=n([t.NotifyPropertyChanges],C)}(t.Component);e.PaneProperties=y,e.Splitter=C,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";var i=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)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),n=function(e,t,i,n){var s,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,i,a):s(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},s="e-splitter",r="e-splitter-horizontal",a="e-splitter-vertical",o="e-pane",h="e-pane-horizontal",l="e-pane-vertical",d="e-split-bar",p="e-split-bar-horizontal",u="e-split-bar-vertical",c="e-static-pane",P="e-scrollable",v="e-resize-handler",f="e-resizable-split-bar",g="e-split-bar-hover",x="e-split-bar-active",m="e-hide-handler",y="e-disabled",C=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return i(s,e),n([t.Property()],s.prototype,"size",void 0),n([t.Property(!0)],s.prototype,"resizable",void 0),n([t.Property(null)],s.prototype,"min",void 0),n([t.Property(null)],s.prototype,"max",void 0),n([t.Property()],s.prototype,"content",void 0),s}(t.ChildProperty),S=function(e){function S(t,i){var n=e.call(this,t,i)||this;return n.allPanes=[],n.paneOrder=[],n.separatorOrder=[],n.allBars=[],n.previousCoordinates={},n.currentCoordinates={},n.updatePrePaneInPercentage=!1,n.updateNextPaneInPercentage=!1,n.panesDimensions=[],n.border=0,n.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable"],n.validElementAttributes=["data-orientation","data-width","data-height"],n}return i(S,e),S.prototype.onPropertyChanged=function(e,i){if(this.element.classList.contains(s))for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(!(e.paneSettings instanceof Array&&i.paneSettings instanceof Array))for(var a=Object.keys(e.paneSettings),o=0;o<a.length;o++){var h=parseInt(Object.keys(e.paneSettings)[o],10),l=Object.keys(e.paneSettings[h])[0],d=Object(e.paneSettings[h])[l];h=this.enableRtl?this.allBars.length-1-h:h,"content"===l&&(this.allPanes[h].innerHTML="",this.setTemplate(d,this.allPanes[h])),"resizable"===l&&(t.EventHandler.remove(this.allBars[h],"mousedown",this.onMouseDown),d?(t.EventHandler.add(this.allBars[h],"mousedown",this.onMouseDown,this),this.currentSeparator=this.allBars[h],this.isResizable()&&(this.showResizer(this.allBars[h]),this.allBars[h].classList.add(f))):(this.hideResizer(this.allBars[h]),this.allBars[h].classList.remove(f))),"size"===l&&(this.allPanes[h].style.flexBasis=d)}break;case"enableRtl":this.setRTL(e.enableRtl)}}},S.prototype.preRender=function(){this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,t.removeClass([this.wrapper],["e-control","e-lib",s]);var e="Horizontal"===this.orientation?r:a;t.addClass([this.element],e),t.Browser.isDevice&&t.addClass([this.element],"e-splitter-touch")},S.prototype.getPersistData=function(){return this.addOnPersist([])},S.prototype.getModuleName=function(){return"splitter"},S.prototype.render=function(){this.checkDataAttributes(),this.setCssClass(this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl)},S.prototype.checkDataAttributes=function(){for(var e,i,n=0;n<this.validElementAttributes.length;n++)i=this.element.getAttribute(this.validElementAttributes[n]),t.isNullOrUndefined(i)||(this[e=this.removeDataPrefix(this.validElementAttributes[n])]=i);for(var s=0;s<this.element.children.length;s++)for(var r=0;r<this.validDataAttributes.length;r++)if(i=this.element.children[s].getAttribute(this.validDataAttributes[r]),!t.isNullOrUndefined(i)){i="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[r]))||"resizable"===e?"true"===i:i,t.isNullOrUndefined(this.paneSettings[s])&&(this.paneSettings[s]={size:"",min:null,max:null,content:"",resizable:!0});var a=this.paneSettings[s][e];"resizable"===e&&this.paneSettings[s].resizable&&(this.paneSettings[s][e]=i),(t.isNullOrUndefined(a)||""===a)&&(this.paneSettings[s][e]=i)}},S.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},S.prototype.setRTL=function(e){e?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},S.prototype.setSplitterSize=function(e,i,n){var s="width"===n?{width:t.formatUnit(i)}:{height:t.formatUnit(i)};t.setStyleAttribute(e,s)},S.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},S.prototype.setCssClass=function(e){""!==e&&t.addClass([this.element],e.split(" "))},S.prototype.hideResizer=function(e){t.addClass([t.select("."+v,e)],m)},S.prototype.showResizer=function(e){t.removeClass([t.select("."+v,e)],m)},S.prototype.isEnabled=function(e){e?t.removeClass([this.element],y):t.addClass([this.element],y)},S.prototype.setSeparatorSize=function(e){for(var i=t.isNullOrUndefined(e)?"auto":e+"px",n="Horizontal"===this.orientation?p:u,s=0;s<this.allBars.length;s++){var r=t.selectAll("."+n,this.element)[s],a=t.selectAll("."+v,r)[0];"Horizontal"===this.orientation?(r.style.width=i,t.isNullOrUndefined(a)||(a.style.width=i)):(r.style.height=i,t.isNullOrUndefined(a)||(a.style.height=i))}},S.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?r:a),this.element.classList.add(t?a:r),this.element.removeAttribute("aria-orientation"),this.element.setAttribute("aria-orientation",e);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?h:l),this.allPanes[i].classList.add(t?l:h);for(i=0;i<this.allBars.length;i++)this.allBars[i].classList.remove(t?p:u),this.allBars[i].classList.add(t?u:p)},S.prototype.getPrevPane=function(e,t){var i=this.enableRtl&&"Horizontal"===this.orientation?(t-1)/2+1:(t-1)/2;return e.parentElement.children[i]},S.prototype.getNextPane=function(e,t){var i=this.enableRtl&&"Horizontal"===this.orientation?(t-1)/2:(t-1)/2+1;return e.parentElement.children[i]},S.prototype.addResizeHandler=function(e){var i=this.createElement("div");t.addClass([i],[v,"e-icons"]);var n=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?i.style.width=n:i.style.height=n,e.appendChild(i)},S.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},S.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},S.prototype.setDimension=function(e,i){t.setStyleAttribute(this.element,{height:e,width:i})},S.prototype.createSeparator=function(e){var i=this.createElement("div");return this.allBars.push(i),"Horizontal"===this.orientation?(t.addClass([i],[d,p]),i.style.width=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"):(t.addClass([i],[d,u]),i.style.height=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"),this.addMouseActions(i),this.addResizeHandler(i),i},S.prototype.addSeparator=function(e){for(var i=this.allPanes.length,n=e.children,s=0;s<i;s++)if(s<i-1){var r=this.createSeparator(s);if(t.setStyleAttribute(r,{order:2*s+1}),this.separatorOrder.push(2*s+1),n[s].parentNode.appendChild(r),this.currentSeparator=r,r.setAttribute("role","separator"),this.isResizable()){t.EventHandler.add(r,"mousedown",this.onMouseDown,this);var a="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(r,a,this.onMouseDown,this),r.classList.add(f)}else this.hideResizer(r)}},S.prototype.isResizable=function(){var e=!1;return(!t.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},S.prototype.addMouseActions=function(e){e.addEventListener("mouseover",function(){t.addClass([e],[g])}),e.addEventListener("mouseout",function(){t.removeClass([e],[g])})},S.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},S.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e:e.parentElement},S.prototype.isSeparator=function(e){var t=!0;return(e.classList.contains(v)||e.classList.contains("e-split-line"))&&(t=!1),t},S.prototype.isMouseEvent=function(e){var i=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(i=!0),i},S.prototype.updateCursorPosition=function(e,i){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},i);else{var n="msie"!==t.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:n.pageX,y:n.pageY},i)}},S.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},S.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.onMouseMove,this),t.EventHandler.add(document,"mouseup",this.onMouseUp,this);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.add(document,e,this.onMouseMove,this),t.EventHandler.add(document,i,this.onMouseUp,this)},S.prototype.unwireResizeEvents=function(){var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.remove(document,"mousemove",this.onMouseMove),t.EventHandler.remove(document,"mouseup",this.onMouseUp),t.EventHandler.remove(document,e,this.onMouseMove),t.EventHandler.remove(document,i,this.onMouseUp)},S.prototype.onMouseDown=function(e){e.preventDefault();var i=e.target;this.updateCurrentSeparator(i),t.addClass([this.currentSeparator],x),this.updateCursorPosition(e,"previous"),this.getPaneDetails();var n={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1};if(this.trigger("resizeStart",n),!n.cancel)if(this.wireResizeEvents(),this.previousPane.style.flexBasis.indexOf("%")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var s=this.updatePaneFlexBasis(this.previousPane),r=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=s+r,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%")}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight},S.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth+this.currentSeparator.offsetWidth:e.offsetHeight+this.currentSeparator.offsetHeight;t=this.convertPixelToPercentage(i)}return t},S.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},S.prototype.convertPercentageToPixel=function(e,i){var n,s=e.toString();if(s.indexOf("%")>-1){n=parseFloat(s.slice(0,s.indexOf("%")));var r=void 0;r=t.isNullOrUndefined(i)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(i)],n=Math.ceil(r*(n/100))}else n=parseInt(s,10);return n},S.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},S.prototype.convertPixelToNumber=function(e){return e.indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},S.prototype.calcDragPosition=function(e,t){var i,n;return i="Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e,n=i/t,(n=n>1?1:n<0?0:n)*t},S.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left:this.element.getBoundingClientRect().top,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},S.prototype.getMinMax=function(e,i,n){var s="min"===n?0:null,r=null;return"min"===n?t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(r=this.paneSettings[e].min):t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(r=this.paneSettings[e].max),this.paneSettings.length>0&&!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(r)?(r.indexOf("%")>0&&(r=this.convertPercentageToPixel(r).toString()),this.convertPixelToNumber(r)):s},S.prototype.getPreviousPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e+1:e},S.prototype.getNextPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e:e+1},S.prototype.getPaneDetails=function(){this.order=parseInt(this.currentSeparator.style.order,10),this.previousPane=this.getPrevPane(this.currentSeparator,this.order),this.nextPane=this.getNextPane(this.currentSeparator,this.order),this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex()},S.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},S.prototype.boundingRectValues=function(e){return"Horizontal"===this.orientation?e.getBoundingClientRect().width:e.getBoundingClientRect().height},S.prototype.isValidSize=function(e){var i=!1;return!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(i=!0),i},S.prototype.getPaneDimensions=function(){if(this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.paneSettings.length<1)return this.prePaneDimenson=this.boundingRectValues(this.previousPane),void(this.nextPaneDimension=this.boundingRectValues(this.nextPane));this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},S.prototype.checkCoordinates=function(e,t){var i=!0;return e!==this.previousCoordinates.x&&t!==this.previousCoordinates.y||(i=!1),i},S.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==t.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},S.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==t.Browser.info.name?this.border:e},S.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions();var t={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",t);var i,n=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+n-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+n-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.prevPaneCurrentWidth=i+this.convertPixelToNumber(this.previousPaneHeightWidth),this.nextPaneCurrentWidth=this.nextPaneHeightWidth-i,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass(),this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,this.nextPane.style.flexBasis=this.nextPaneCurrentWidth}},S.prototype.validateMinRange=function(e,i,n){var s,r,a=null,o=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),i<(s=this.convertPixelToNumber(a))&&(o=i-s<=0?0:i-s,this.totalWidth=this.totalWidth-o,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},S.prototype.validateMaxRange=function(e,i,n){var s,r,a=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),i>(s=this.convertPixelToNumber(a))&&(this.totalWidth=this.totalWidth-(i-s),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},S.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane)},S.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},S.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},S.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(c)||this.previousPane.classList.add(c),this.nextPane.classList.contains(c)||this.nextPane.classList.add(c)},S.prototype.validateDraggedPosition=function(e,i,n){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,r=s-i,a=n+s,o=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),h=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),l=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),d=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),p=e;return e>a-h?p=a-h:e<r+o&&(p=r+o),t.isNullOrUndefined(l)?t.isNullOrUndefined(d)||e<a-d&&(p=a-d):e>r+l&&(p=r+l),p},S.prototype.onMouseUp=function(e){t.removeClass([this.currentSeparator],x),this.unwireResizeEvents();var i={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]};this.trigger("resizeStop",i)},S.prototype.panesDimension=function(e,i){var n,s=i.length;parseInt(this.getHeight(this.element),10),t.isNullOrUndefined(this.paneSettings[e])?t.setStyleAttribute(i[e],{order:2*e}):t.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,t.setStyleAttribute(i[e],{order:2*e})):(n=this.paneSettings[e].size,e<s&&(t.setStyleAttribute(i[e],{"flex-basis":n,order:2*e}),e<s-1?t.addClass([i[e]],c):this.sizeFlag||(i[e].style.flexBasis=null),e===s-1&&this.sizeFlag&&t.addClass([i[e]],c))),this.paneOrder.push(2*e)},S.prototype.setTemplate=function(e,i){for(var n=[],s=0,r=t.compile(e)({});s<r.length;s++){var a=r[s];n.push(a)}t.append([].slice.call(n),i)},S.prototype.createSplitPane=function(e){var i=e.children.length;if(i<this.paneSettings.length)for(var n=0;n<this.paneSettings.length;n++){var s=this.createElement("div");this.element.appendChild(s)}i=e.children.length;var r=[].slice.call(e.children);if(this.element.setAttribute("aria-orientation",this.orientation),this.element.setAttribute("role","splitter"),this.sizeFlag=!1,i>1)for(n=0;n<i;n++)1===r[n].nodeType&&(this.allPanes.push(r[n]),"Horizontal"===this.orientation?(t.addClass([r[n]],[o,h,P]),this.panesDimension(n,r)):(t.addClass([r[n]],[o,l,P]),this.panesDimension(n,r)),t.isNullOrUndefined(this.paneSettings[n])||t.isNullOrUndefined(this.paneSettings[n].content)||this.setTemplate(this.paneSettings[n].content,r[n]))},S.prototype.destroy=function(){t.detach(this.element),this.element=this.wrapper,this.wrapperParent.appendChild(this.wrapper)},S.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?t.addClass([e],[o,h,P]):t.addClass([e],[o,l,P]),e},S.prototype.removePaneOrders=function(e){for(var t=document.querySelectorAll("."+e),i=0;i<t.length;i++)t[i].style.removeProperty("order")},S.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},S.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)t.detach(this.allBars[e]);this.allBars=[]},S.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},S.prototype.addPane=function(e,i){var n=this.createElement("div");n=this.addPaneClass(n),i=i>this.allPanes.length+1?this.allPanes.length:i;var s={size:t.isNullOrUndefined(e.size)?"":e.size,min:t.isNullOrUndefined(e.min)?null:e.min,max:t.isNullOrUndefined(e.max)?null:e.max,content:t.isNullOrUndefined(e.content)?"":e.content,resizable:!!t.isNullOrUndefined(e.resizable)||e.resizable};this.paneSettings.splice(i,0,s),"Horizontal"===this.orientation?(this.element.insertBefore(n,this.element.querySelectorAll("."+h)[i]),this.removePaneOrders(h)):(this.element.insertBefore(n,this.element.querySelectorAll("."+l)[i]),this.removePaneOrders(l)),this.allPanes.splice(i,0,n),this.updatePanes(),this.setTemplate(this.paneSettings[i].content,n),this.allPanes[this.allPanes.length-1].classList.remove(c)},S.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var i="Horizontal"===this.orientation?h:l;t.detach(this.element.querySelectorAll("."+i)[e]),this.allPanes.splice(e,1),this.removePaneOrders(i),this.updatePanes(),this.allPanes[this.allPanes.length-1].classList.remove(c)},n([t.Property("100%")],S.prototype,"height",void 0),n([t.Property("100%")],S.prototype,"width",void 0),n([t.Collection([],C)],S.prototype,"paneSettings",void 0),n([t.Property("Horizontal")],S.prototype,"orientation",void 0),n([t.Property("")],S.prototype,"cssClass",void 0),n([t.Property(!0)],S.prototype,"enabled",void 0),n([t.Property(!1)],S.prototype,"enableRtl",void 0),n([t.Property(null)],S.prototype,"separatorSize",void 0),n([t.Event()],S.prototype,"created",void 0),n([t.Event()],S.prototype,"resizeStart",void 0),n([t.Event()],S.prototype,"resizing",void 0),n([t.Event()],S.prototype,"resizeStop",void 0),S=n([t.NotifyPropertyChanges],S)}(t.Component);e.PaneProperties=C,e.Splitter=S,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-layouts.umd.min.js.map

@@ -85,2 +85,4 @@ import { Browser, ChildProperty, Collection, Component, Event, EventHandler, NotifyPropertyChanges, Property, addClass, append, compile, detach, formatUnit, isNullOrUndefined, removeClass, select, selectAll, setStyleAttribute } from '@syncfusion/ej2-base';

this.border = 0;
this.validDataAttributes = ['data-size', 'data-min', 'data-max', 'data-collapsible', 'data-resizable'];
this.validElementAttributes = ['data-orientation', 'data-width', 'data-height'];
}

@@ -183,2 +185,3 @@ /**

render() {
this.checkDataAttributes();
this.setCssClass(this.cssClass);

@@ -192,2 +195,47 @@ this.isEnabled(this.enabled);

}
checkDataAttributes() {
let api;
let value;
// Element values
for (let dataIndex = 0; dataIndex < this.validElementAttributes.length; dataIndex++) {
value = this.element.getAttribute(this.validElementAttributes[dataIndex]);
if (!isNullOrUndefined(value)) {
api = this.removeDataPrefix(this.validElementAttributes[dataIndex]);
// tslint:disable-next-line
this[api] = value;
}
}
// Pane values
for (let paneIndex = 0; paneIndex < this.element.children.length; paneIndex++) {
for (let dataAttr = 0; dataAttr < this.validDataAttributes.length; dataAttr++) {
value = this.element.children[paneIndex].getAttribute(this.validDataAttributes[dataAttr]);
if (!isNullOrUndefined(value)) {
api = this.removeDataPrefix(this.validDataAttributes[dataAttr]);
value = (api === 'collapsible' || api === 'resizable') ? (value === 'true') : value;
if (isNullOrUndefined(this.paneSettings[paneIndex])) {
this.paneSettings[paneIndex] = {
size: '',
min: null,
max: null,
content: '',
resizable: true,
};
}
// tslint:disable-next-line
let paneAPI = this.paneSettings[paneIndex][api];
if (api === 'resizable' && this.paneSettings[paneIndex].resizable) {
// tslint:disable-next-line
this.paneSettings[paneIndex][api] = value;
}
if (isNullOrUndefined(paneAPI) || paneAPI === '') {
// tslint:disable-next-line
this.paneSettings[paneIndex][api] = value;
}
}
}
}
}
removeDataPrefix(attribute) {
return attribute.slice(attribute.lastIndexOf('-') + 1);
}
setRTL(rtl) {

@@ -260,7 +308,7 @@ rtl ? addClass([this.element], RTL) : removeClass([this.element], RTL);

getPrevPane(currentBar, order) {
let elementIndex = (this.enableRtl) ? ((order - 1) / 2) + 1 : (order - 1) / (2);
let elementIndex = (this.enableRtl && this.orientation === 'Horizontal') ? ((order - 1) / 2) + 1 : (order - 1) / (2);
return currentBar.parentElement.children[elementIndex];
}
getNextPane(currentBar, order) {
let elementIndex = (this.enableRtl) ? (order - 1) / (2) : ((order - 1) / 2) + 1;
let elementIndex = (this.enableRtl && this.orientation === 'Horizontal') ? (order - 1) / (2) : ((order - 1) / 2) + 1;
return currentBar.parentElement.children[elementIndex];

@@ -445,4 +493,4 @@ }

else {
let offset = (this.orientation === 'Horizontal') ? pane.offsetWidth :
pane.offsetHeight;
let offset = (this.orientation === 'Horizontal') ? (pane.offsetWidth + this.currentSeparator.offsetWidth) :
(pane.offsetHeight + this.currentSeparator.offsetHeight);
previous = this.convertPixelToPercentage(offset);

@@ -522,3 +570,3 @@ }

if (paneValue.indexOf('%') > 0) {
paneValue = this.convertPercentageToPixel(paneValue, target).toString();
paneValue = this.convertPercentageToPixel(paneValue).toString();
}

@@ -645,7 +693,6 @@ return this.convertPixelToNumber(paneValue);

}
/* istanbul ignore next */
if (this.prevPaneCurrentWidth < 0) {
this.prevPaneCurrentWidth = 0;
}
this.nextPaneCurrentWidth = parseInt(this.nextPaneCurrentWidth, 10);
this.prevPaneCurrentWidth = parseInt(this.prevPaneCurrentWidth, 10);
if ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth) > this.totalWidth) {

@@ -661,2 +708,3 @@ if (this.nextPaneCurrentWidth < this.prevPaneCurrentWidth) {

}
/* istanbul ignore next */
if ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth) < this.totalWidth) {

@@ -681,3 +729,3 @@ let difference = this.totalWidth - ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth));

if (paneMinRange.indexOf('%') > 0) {
paneMinRange = this.convertPercentageToPixel(paneMinRange, pane).toString();
paneMinRange = this.convertPercentageToPixel(paneMinRange).toString();
}

@@ -704,3 +752,3 @@ paneMinDimensions = this.convertPixelToNumber(paneMinRange);

if (paneMaxRange.indexOf('%') > 0) {
paneMaxRange = this.convertPercentageToPixel(paneMaxRange, pane).toString();
paneMaxRange = this.convertPercentageToPixel(paneMaxRange).toString();
}

@@ -866,3 +914,3 @@ paneMaxDimensions = this.convertPixelToNumber(paneMaxRange);

childCount = target.children.length;
let child = target.children;
let child = [].slice.call(target.children);
this.element.setAttribute('aria-orientation', this.orientation);

@@ -901,2 +949,67 @@ this.element.setAttribute('role', 'splitter');

}
addPaneClass(pane) {
if (this.orientation === 'Horizontal') {
addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
}
else {
addClass([pane], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
}
return pane;
}
removePaneOrders(paneClass) {
let panes = document.querySelectorAll('.' + paneClass);
for (let i = 0; i < panes.length; i++) {
panes[i].style.removeProperty('order');
}
}
setPaneOrder() {
for (let i = 0; i < this.allPanes.length; i++) {
this.panesDimension(i, this.allPanes);
}
}
removeSeparator() {
for (let i = 0; i < this.allBars.length; i++) {
detach(this.allBars[i]);
}
this.allBars = [];
}
updatePanes() {
this.setPaneOrder();
this.removeSeparator();
this.addSeparator(this.element);
}
addPane(paneProperties, index) {
let newPane = this.createElement('div');
newPane = this.addPaneClass(newPane);
index = (index > this.allPanes.length + 1) ? this.allPanes.length : index;
let paneDetails = {
size: isNullOrUndefined(paneProperties.size) ? '' : paneProperties.size,
min: isNullOrUndefined(paneProperties.min) ? null : paneProperties.min,
max: isNullOrUndefined(paneProperties.max) ? null : paneProperties.max,
content: isNullOrUndefined(paneProperties.content) ? '' : paneProperties.content,
resizable: isNullOrUndefined(paneProperties.resizable) ? true : paneProperties.resizable
};
this.paneSettings.splice(index, 0, paneDetails);
if (this.orientation === 'Horizontal') {
this.element.insertBefore(newPane, this.element.querySelectorAll('.' + SPLIT_H_PANE)[index]);
this.removePaneOrders(SPLIT_H_PANE);
}
else {
this.element.insertBefore(newPane, this.element.querySelectorAll('.' + SPLIT_V_PANE)[index]);
this.removePaneOrders(SPLIT_V_PANE);
}
this.allPanes.splice(index, 0, newPane);
this.updatePanes();
this.setTemplate(this.paneSettings[index].content, newPane);
this.allPanes[this.allPanes.length - 1].classList.remove(STATIC_PANE);
}
removePane(index) {
index = (index > this.allPanes.length + 1) ? this.allPanes.length : index;
let elementClass = (this.orientation === 'Horizontal') ? SPLIT_H_PANE : SPLIT_V_PANE;
detach(this.element.querySelectorAll('.' + elementClass)[index]);
this.allPanes.splice(index, 1);
this.removePaneOrders(elementClass);
this.updatePanes();
this.allPanes[this.allPanes.length - 1].classList.remove(STATIC_PANE);
}
};

@@ -903,0 +1016,0 @@ __decorate([

@@ -104,2 +104,4 @@ import { Browser, ChildProperty, Collection, Component, Event, EventHandler, NotifyPropertyChanges, Property, addClass, append, compile, detach, formatUnit, isNullOrUndefined, removeClass, select, selectAll, setStyleAttribute } from '@syncfusion/ej2-base';

_this.border = 0;
_this.validDataAttributes = ['data-size', 'data-min', 'data-max', 'data-collapsible', 'data-resizable'];
_this.validElementAttributes = ['data-orientation', 'data-width', 'data-height'];
return _this;

@@ -204,2 +206,3 @@ }

Splitter.prototype.render = function () {
this.checkDataAttributes();
this.setCssClass(this.cssClass);

@@ -213,2 +216,47 @@ this.isEnabled(this.enabled);

};
Splitter.prototype.checkDataAttributes = function () {
var api;
var value;
// Element values
for (var dataIndex = 0; dataIndex < this.validElementAttributes.length; dataIndex++) {
value = this.element.getAttribute(this.validElementAttributes[dataIndex]);
if (!isNullOrUndefined(value)) {
api = this.removeDataPrefix(this.validElementAttributes[dataIndex]);
// tslint:disable-next-line
this[api] = value;
}
}
// Pane values
for (var paneIndex = 0; paneIndex < this.element.children.length; paneIndex++) {
for (var dataAttr = 0; dataAttr < this.validDataAttributes.length; dataAttr++) {
value = this.element.children[paneIndex].getAttribute(this.validDataAttributes[dataAttr]);
if (!isNullOrUndefined(value)) {
api = this.removeDataPrefix(this.validDataAttributes[dataAttr]);
value = (api === 'collapsible' || api === 'resizable') ? (value === 'true') : value;
if (isNullOrUndefined(this.paneSettings[paneIndex])) {
this.paneSettings[paneIndex] = {
size: '',
min: null,
max: null,
content: '',
resizable: true,
};
}
// tslint:disable-next-line
var paneAPI = this.paneSettings[paneIndex][api];
if (api === 'resizable' && this.paneSettings[paneIndex].resizable) {
// tslint:disable-next-line
this.paneSettings[paneIndex][api] = value;
}
if (isNullOrUndefined(paneAPI) || paneAPI === '') {
// tslint:disable-next-line
this.paneSettings[paneIndex][api] = value;
}
}
}
}
};
Splitter.prototype.removeDataPrefix = function (attribute) {
return attribute.slice(attribute.lastIndexOf('-') + 1);
};
Splitter.prototype.setRTL = function (rtl) {

@@ -281,7 +329,7 @@ rtl ? addClass([this.element], RTL) : removeClass([this.element], RTL);

Splitter.prototype.getPrevPane = function (currentBar, order) {
var elementIndex = (this.enableRtl) ? ((order - 1) / 2) + 1 : (order - 1) / (2);
var elementIndex = (this.enableRtl && this.orientation === 'Horizontal') ? ((order - 1) / 2) + 1 : (order - 1) / (2);
return currentBar.parentElement.children[elementIndex];
};
Splitter.prototype.getNextPane = function (currentBar, order) {
var elementIndex = (this.enableRtl) ? (order - 1) / (2) : ((order - 1) / 2) + 1;
var elementIndex = (this.enableRtl && this.orientation === 'Horizontal') ? (order - 1) / (2) : ((order - 1) / 2) + 1;
return currentBar.parentElement.children[elementIndex];

@@ -466,4 +514,4 @@ };

else {
var offset = (this.orientation === 'Horizontal') ? pane.offsetWidth :
pane.offsetHeight;
var offset = (this.orientation === 'Horizontal') ? (pane.offsetWidth + this.currentSeparator.offsetWidth) :
(pane.offsetHeight + this.currentSeparator.offsetHeight);
previous = this.convertPixelToPercentage(offset);

@@ -543,3 +591,3 @@ }

if (paneValue.indexOf('%') > 0) {
paneValue = this.convertPercentageToPixel(paneValue, target).toString();
paneValue = this.convertPercentageToPixel(paneValue).toString();
}

@@ -666,7 +714,6 @@ return this.convertPixelToNumber(paneValue);

}
/* istanbul ignore next */
if (this.prevPaneCurrentWidth < 0) {
this.prevPaneCurrentWidth = 0;
}
this.nextPaneCurrentWidth = parseInt(this.nextPaneCurrentWidth, 10);
this.prevPaneCurrentWidth = parseInt(this.prevPaneCurrentWidth, 10);
if ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth) > this.totalWidth) {

@@ -682,2 +729,3 @@ if (this.nextPaneCurrentWidth < this.prevPaneCurrentWidth) {

}
/* istanbul ignore next */
if ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth) < this.totalWidth) {

@@ -702,3 +750,3 @@ var difference = this.totalWidth - ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth));

if (paneMinRange.indexOf('%') > 0) {
paneMinRange = this.convertPercentageToPixel(paneMinRange, pane).toString();
paneMinRange = this.convertPercentageToPixel(paneMinRange).toString();
}

@@ -725,3 +773,3 @@ paneMinDimensions = this.convertPixelToNumber(paneMinRange);

if (paneMaxRange.indexOf('%') > 0) {
paneMaxRange = this.convertPercentageToPixel(paneMaxRange, pane).toString();
paneMaxRange = this.convertPercentageToPixel(paneMaxRange).toString();
}

@@ -888,3 +936,3 @@ paneMaxDimensions = this.convertPixelToNumber(paneMaxRange);

childCount = target.children.length;
var child = target.children;
var child = [].slice.call(target.children);
this.element.setAttribute('aria-orientation', this.orientation);

@@ -923,2 +971,67 @@ this.element.setAttribute('role', 'splitter');

};
Splitter.prototype.addPaneClass = function (pane) {
if (this.orientation === 'Horizontal') {
addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
}
else {
addClass([pane], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
}
return pane;
};
Splitter.prototype.removePaneOrders = function (paneClass) {
var panes = document.querySelectorAll('.' + paneClass);
for (var i = 0; i < panes.length; i++) {
panes[i].style.removeProperty('order');
}
};
Splitter.prototype.setPaneOrder = function () {
for (var i = 0; i < this.allPanes.length; i++) {
this.panesDimension(i, this.allPanes);
}
};
Splitter.prototype.removeSeparator = function () {
for (var i = 0; i < this.allBars.length; i++) {
detach(this.allBars[i]);
}
this.allBars = [];
};
Splitter.prototype.updatePanes = function () {
this.setPaneOrder();
this.removeSeparator();
this.addSeparator(this.element);
};
Splitter.prototype.addPane = function (paneProperties, index) {
var newPane = this.createElement('div');
newPane = this.addPaneClass(newPane);
index = (index > this.allPanes.length + 1) ? this.allPanes.length : index;
var paneDetails = {
size: isNullOrUndefined(paneProperties.size) ? '' : paneProperties.size,
min: isNullOrUndefined(paneProperties.min) ? null : paneProperties.min,
max: isNullOrUndefined(paneProperties.max) ? null : paneProperties.max,
content: isNullOrUndefined(paneProperties.content) ? '' : paneProperties.content,
resizable: isNullOrUndefined(paneProperties.resizable) ? true : paneProperties.resizable
};
this.paneSettings.splice(index, 0, paneDetails);
if (this.orientation === 'Horizontal') {
this.element.insertBefore(newPane, this.element.querySelectorAll('.' + SPLIT_H_PANE)[index]);
this.removePaneOrders(SPLIT_H_PANE);
}
else {
this.element.insertBefore(newPane, this.element.querySelectorAll('.' + SPLIT_V_PANE)[index]);
this.removePaneOrders(SPLIT_V_PANE);
}
this.allPanes.splice(index, 0, newPane);
this.updatePanes();
this.setTemplate(this.paneSettings[index].content, newPane);
this.allPanes[this.allPanes.length - 1].classList.remove(STATIC_PANE);
};
Splitter.prototype.removePane = function (index) {
index = (index > this.allPanes.length + 1) ? this.allPanes.length : index;
var elementClass = (this.orientation === 'Horizontal') ? SPLIT_H_PANE : SPLIT_V_PANE;
detach(this.element.querySelectorAll('.' + elementClass)[index]);
this.allPanes.splice(index, 1);
this.removePaneOrders(elementClass);
this.updatePanes();
this.allPanes[this.allPanes.length - 1].classList.remove(STATIC_PANE);
};
__decorate([

@@ -925,0 +1038,0 @@ Property('100%')

/*!
* filename: ej2-layouts.min.js
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.layouts=function(e,t){"use strict";var i=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)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),n=function(e,t,i,n){var s,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,i,a):s(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},s="e-split-bar-horizontal",r="e-split-bar-vertical",a="e-resize-handler",o=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return i(s,e),n([t.Property()],s.prototype,"size",void 0),n([t.Property(!0)],s.prototype,"resizable",void 0),n([t.Property(null)],s.prototype,"min",void 0),n([t.Property(null)],s.prototype,"max",void 0),n([t.Property()],s.prototype,"content",void 0),s}(t.ChildProperty),h=function(e){function h(t,i){var n=e.call(this,t,i)||this;return n.allPanes=[],n.paneOrder=[],n.separatorOrder=[],n.allBars=[],n.previousCoordinates={},n.currentCoordinates={},n.updatePrePaneInPercentage=!1,n.updateNextPaneInPercentage=!1,n.panesDimensions=[],n.border=0,n}return i(h,e),h.prototype.onPropertyChanged=function(e,i){if(this.element.classList.contains("e-splitter"))for(var n=0,s=Object.keys(e);n<s.length;n++)switch(s[n]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(!(e.paneSettings instanceof Array&&i.paneSettings instanceof Array))for(var r=Object.keys(e.paneSettings),a=0;a<r.length;a++){var o=parseInt(Object.keys(e.paneSettings)[a],10),h=Object.keys(e.paneSettings[o])[0],l=Object(e.paneSettings[o])[h];o=this.enableRtl?this.allBars.length-1-o:o,"content"===h&&(this.allPanes[o].innerHTML="",this.setTemplate(l,this.allPanes[o])),"resizable"===h&&(t.EventHandler.remove(this.allBars[o],"mousedown",this.onMouseDown),l?(t.EventHandler.add(this.allBars[o],"mousedown",this.onMouseDown,this),this.currentSeparator=this.allBars[o],this.isResizable()&&(this.showResizer(this.allBars[o]),this.allBars[o].classList.add("e-resizable-split-bar"))):(this.hideResizer(this.allBars[o]),this.allBars[o].classList.remove("e-resizable-split-bar"))),"size"===h&&(this.allPanes[o].style.flexBasis=l)}break;case"enableRtl":this.setRTL(e.enableRtl)}},h.prototype.preRender=function(){this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,t.removeClass([this.wrapper],["e-control","e-lib","e-splitter"]);var e="Horizontal"===this.orientation?"e-splitter-horizontal":"e-splitter-vertical";t.addClass([this.element],e),t.Browser.isDevice&&t.addClass([this.element],"e-splitter-touch")},h.prototype.getPersistData=function(){return this.addOnPersist([])},h.prototype.getModuleName=function(){return"splitter"},h.prototype.render=function(){this.setCssClass(this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl)},h.prototype.setRTL=function(e){e?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},h.prototype.setSplitterSize=function(e,i,n){var s="width"===n?{width:t.formatUnit(i)}:{height:t.formatUnit(i)};t.setStyleAttribute(e,s)},h.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},h.prototype.setCssClass=function(e){""!==e&&t.addClass([this.element],e.split(" "))},h.prototype.hideResizer=function(e){t.addClass([t.select("."+a,e)],"e-hide-handler")},h.prototype.showResizer=function(e){t.removeClass([t.select("."+a,e)],"e-hide-handler")},h.prototype.isEnabled=function(e){e?t.removeClass([this.element],"e-disabled"):t.addClass([this.element],"e-disabled")},h.prototype.setSeparatorSize=function(e){for(var i=t.isNullOrUndefined(e)?"auto":e+"px",n="Horizontal"===this.orientation?s:r,o=0;o<this.allBars.length;o++){var h=t.selectAll("."+n,this.element)[o],l=t.selectAll("."+a,h)[0];"Horizontal"===this.orientation?(h.style.width=i,t.isNullOrUndefined(l)||(l.style.width=i)):(h.style.height=i,t.isNullOrUndefined(l)||(l.style.height=i))}},h.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?"e-splitter-horizontal":"e-splitter-vertical"),this.element.classList.add(t?"e-splitter-vertical":"e-splitter-horizontal"),this.element.removeAttribute("aria-orientation"),this.element.setAttribute("aria-orientation",e);for(i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?"e-pane-horizontal":"e-pane-vertical"),this.allPanes[i].classList.add(t?"e-pane-vertical":"e-pane-horizontal");for(var i=0;i<this.allBars.length;i++)this.allBars[i].classList.remove(t?s:r),this.allBars[i].classList.add(t?r:s)},h.prototype.getPrevPane=function(e,t){var i=this.enableRtl?(t-1)/2+1:(t-1)/2;return e.parentElement.children[i]},h.prototype.getNextPane=function(e,t){var i=this.enableRtl?(t-1)/2:(t-1)/2+1;return e.parentElement.children[i]},h.prototype.addResizeHandler=function(e){var i=this.createElement("div");t.addClass([i],[a,"e-icons"]);var n=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?i.style.width=n:i.style.height=n,e.appendChild(i)},h.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},h.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},h.prototype.setDimension=function(e,i){t.setStyleAttribute(this.element,{height:e,width:i})},h.prototype.createSeparator=function(e){var i=this.createElement("div");return this.allBars.push(i),"Horizontal"===this.orientation?(t.addClass([i],["e-split-bar",s]),i.style.width=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"):(t.addClass([i],["e-split-bar",r]),i.style.height=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"),this.addMouseActions(i),this.addResizeHandler(i),i},h.prototype.addSeparator=function(e){for(var i=this.allPanes.length,n=e.children,s=0;s<i;s++)if(s<i-1){var r=this.createSeparator(s);if(t.setStyleAttribute(r,{order:2*s+1}),this.separatorOrder.push(2*s+1),n[s].parentNode.appendChild(r),this.currentSeparator=r,r.setAttribute("role","separator"),this.isResizable()){t.EventHandler.add(r,"mousedown",this.onMouseDown,this);var a="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(r,a,this.onMouseDown,this),r.classList.add("e-resizable-split-bar")}else this.hideResizer(r)}},h.prototype.isResizable=function(){var e=!1;return(!t.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},h.prototype.addMouseActions=function(e){e.addEventListener("mouseover",function(){t.addClass([e],["e-split-bar-hover"])}),e.addEventListener("mouseout",function(){t.removeClass([e],["e-split-bar-hover"])})},h.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},h.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e:e.parentElement},h.prototype.isSeparator=function(e){var t=!0;return(e.classList.contains(a)||e.classList.contains("e-split-line"))&&(t=!1),t},h.prototype.isMouseEvent=function(e){var i=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(i=!0),i},h.prototype.updateCursorPosition=function(e,i){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},i);else{var n="msie"!==t.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:n.pageX,y:n.pageY},i)}},h.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},h.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.onMouseMove,this),t.EventHandler.add(document,"mouseup",this.onMouseUp,this);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.add(document,e,this.onMouseMove,this),t.EventHandler.add(document,i,this.onMouseUp,this)},h.prototype.unwireResizeEvents=function(){var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.remove(document,"mousemove",this.onMouseMove),t.EventHandler.remove(document,"mouseup",this.onMouseUp),t.EventHandler.remove(document,e,this.onMouseMove),t.EventHandler.remove(document,i,this.onMouseUp)},h.prototype.onMouseDown=function(e){e.preventDefault();var i=e.target;this.updateCurrentSeparator(i),t.addClass([this.currentSeparator],"e-split-bar-active"),this.updateCursorPosition(e,"previous"),this.getPaneDetails();var n={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1};if(this.trigger("resizeStart",n),!n.cancel)if(this.wireResizeEvents(),this.previousPane.style.flexBasis.indexOf("%")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var s=this.updatePaneFlexBasis(this.previousPane),r=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=s+r,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%")}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight},h.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},h.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},h.prototype.convertPercentageToPixel=function(e,i){var n,s=e.toString();if(s.indexOf("%")>-1){n=parseFloat(s.slice(0,s.indexOf("%")));var r=void 0;r=t.isNullOrUndefined(i)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(i)],n=Math.ceil(r*(n/100))}else n=parseInt(s,10);return n},h.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},h.prototype.convertPixelToNumber=function(e){return e.indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},h.prototype.calcDragPosition=function(e,t){var i,n;return i="Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e,n=i/t,(n=n>1?1:n<0?0:n)*t},h.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left:this.element.getBoundingClientRect().top,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},h.prototype.getMinMax=function(e,i,n){var s="min"===n?0:null,r=null;return"min"===n?t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(r=this.paneSettings[e].min):t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(r=this.paneSettings[e].max),this.paneSettings.length>0&&!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(r)?(r.indexOf("%")>0&&(r=this.convertPercentageToPixel(r,i).toString()),this.convertPixelToNumber(r)):s},h.prototype.getPreviousPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e+1:e},h.prototype.getNextPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e:e+1},h.prototype.getPaneDetails=function(){this.order=parseInt(this.currentSeparator.style.order,10),this.previousPane=this.getPrevPane(this.currentSeparator,this.order),this.nextPane=this.getNextPane(this.currentSeparator,this.order),this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex()},h.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},h.prototype.boundingRectValues=function(e){return"Horizontal"===this.orientation?e.getBoundingClientRect().width:e.getBoundingClientRect().height},h.prototype.isValidSize=function(e){var i=!1;return!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(i=!0),i},h.prototype.getPaneDimensions=function(){if(this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.paneSettings.length<1)return this.prePaneDimenson=this.boundingRectValues(this.previousPane),void(this.nextPaneDimension=this.boundingRectValues(this.nextPane));this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},h.prototype.checkCoordinates=function(e,t){var i=!0;return e!==this.previousCoordinates.x&&t!==this.previousCoordinates.y||(i=!1),i},h.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==t.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},h.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==t.Browser.info.name?this.border:e},h.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions();var t={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",t);var i,n=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+n-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+n-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.prevPaneCurrentWidth=i+this.convertPixelToNumber(this.previousPaneHeightWidth),this.nextPaneCurrentWidth=this.nextPaneHeightWidth-i,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth=parseInt(this.nextPaneCurrentWidth,10),this.prevPaneCurrentWidth=parseInt(this.prevPaneCurrentWidth,10),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass(),this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,this.nextPane.style.flexBasis=this.nextPaneCurrentWidth}},h.prototype.validateMinRange=function(e,i,n){var s,r,a=null,o=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a,n).toString()),i<(s=this.convertPixelToNumber(a))&&(o=i-s<=0?0:i-s,this.totalWidth=this.totalWidth-o,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},h.prototype.validateMaxRange=function(e,i,n){var s,r,a=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a,n).toString()),i>(s=this.convertPixelToNumber(a))&&(this.totalWidth=this.totalWidth-(i-s),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},h.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane)},h.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},h.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},h.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains("e-static-pane")||this.previousPane.classList.add("e-static-pane"),this.nextPane.classList.contains("e-static-pane")||this.nextPane.classList.add("e-static-pane")},h.prototype.validateDraggedPosition=function(e,i,n){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,r=s-i,a=n+s,o=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),h=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),l=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),p=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),d=e;return e>a-h?d=a-h:e<r+o&&(d=r+o),t.isNullOrUndefined(l)?t.isNullOrUndefined(p)||e<a-p&&(d=a-p):e>r+l&&(d=r+l),d},h.prototype.onMouseUp=function(e){t.removeClass([this.currentSeparator],"e-split-bar-active"),this.unwireResizeEvents();var i={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]};this.trigger("resizeStop",i)},h.prototype.panesDimension=function(e,i){var n,s=i.length;parseInt(this.getHeight(this.element),10),t.isNullOrUndefined(this.paneSettings[e])?t.setStyleAttribute(i[e],{order:2*e}):t.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,t.setStyleAttribute(i[e],{order:2*e})):(n=this.paneSettings[e].size,e<s&&(t.setStyleAttribute(i[e],{"flex-basis":n,order:2*e}),e<s-1?t.addClass([i[e]],"e-static-pane"):this.sizeFlag||(i[e].style.flexBasis=null),e===s-1&&this.sizeFlag&&t.addClass([i[e]],"e-static-pane"))),this.paneOrder.push(2*e)},h.prototype.setTemplate=function(e,i){for(var n=[],s=0,r=t.compile(e)({});s<r.length;s++){var a=r[s];n.push(a)}t.append([].slice.call(n),i)},h.prototype.createSplitPane=function(e){var i=e.children.length;if(i<this.paneSettings.length)for(r=0;r<this.paneSettings.length;r++){var n=this.createElement("div");this.element.appendChild(n)}i=e.children.length;var s=e.children;if(this.element.setAttribute("aria-orientation",this.orientation),this.element.setAttribute("role","splitter"),this.sizeFlag=!1,i>1)for(var r=0;r<i;r++)1===s[r].nodeType&&(this.allPanes.push(s[r]),"Horizontal"===this.orientation?(t.addClass([s[r]],["e-pane","e-pane-horizontal","e-scrollable"]),this.panesDimension(r,s)):(t.addClass([s[r]],["e-pane","e-pane-vertical","e-scrollable"]),this.panesDimension(r,s)),t.isNullOrUndefined(this.paneSettings[r])||t.isNullOrUndefined(this.paneSettings[r].content)||this.setTemplate(this.paneSettings[r].content,s[r]))},h.prototype.destroy=function(){t.detach(this.element),this.element=this.wrapper,this.wrapperParent.appendChild(this.wrapper)},n([t.Property("100%")],h.prototype,"height",void 0),n([t.Property("100%")],h.prototype,"width",void 0),n([t.Collection([],o)],h.prototype,"paneSettings",void 0),n([t.Property("Horizontal")],h.prototype,"orientation",void 0),n([t.Property("")],h.prototype,"cssClass",void 0),n([t.Property(!0)],h.prototype,"enabled",void 0),n([t.Property(!1)],h.prototype,"enableRtl",void 0),n([t.Property(null)],h.prototype,"separatorSize",void 0),n([t.Event()],h.prototype,"created",void 0),n([t.Event()],h.prototype,"resizeStart",void 0),n([t.Event()],h.prototype,"resizing",void 0),n([t.Event()],h.prototype,"resizeStop",void 0),h=n([t.NotifyPropertyChanges],h)}(t.Component);return e.PaneProperties=o,e.Splitter=h,e}({},ej.base),this.ejs=ej;
this.ej=this.ej||{},this.ej.layouts=function(e,t){"use strict";var i=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)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),n=function(e,t,i,n){var s,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,i,a):s(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},s="e-pane",r="e-pane-horizontal",a="e-pane-vertical",o="e-split-bar-horizontal",h="e-split-bar-vertical",l="e-static-pane",d="e-resize-handler",p=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return i(s,e),n([t.Property()],s.prototype,"size",void 0),n([t.Property(!0)],s.prototype,"resizable",void 0),n([t.Property(null)],s.prototype,"min",void 0),n([t.Property(null)],s.prototype,"max",void 0),n([t.Property()],s.prototype,"content",void 0),s}(t.ChildProperty),u=function(e){function u(t,i){var n=e.call(this,t,i)||this;return n.allPanes=[],n.paneOrder=[],n.separatorOrder=[],n.allBars=[],n.previousCoordinates={},n.currentCoordinates={},n.updatePrePaneInPercentage=!1,n.updateNextPaneInPercentage=!1,n.panesDimensions=[],n.border=0,n.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable"],n.validElementAttributes=["data-orientation","data-width","data-height"],n}return i(u,e),u.prototype.onPropertyChanged=function(e,i){if(this.element.classList.contains("e-splitter"))for(var n=0,s=Object.keys(e);n<s.length;n++)switch(s[n]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(!(e.paneSettings instanceof Array&&i.paneSettings instanceof Array))for(var r=Object.keys(e.paneSettings),a=0;a<r.length;a++){var o=parseInt(Object.keys(e.paneSettings)[a],10),h=Object.keys(e.paneSettings[o])[0],l=Object(e.paneSettings[o])[h];o=this.enableRtl?this.allBars.length-1-o:o,"content"===h&&(this.allPanes[o].innerHTML="",this.setTemplate(l,this.allPanes[o])),"resizable"===h&&(t.EventHandler.remove(this.allBars[o],"mousedown",this.onMouseDown),l?(t.EventHandler.add(this.allBars[o],"mousedown",this.onMouseDown,this),this.currentSeparator=this.allBars[o],this.isResizable()&&(this.showResizer(this.allBars[o]),this.allBars[o].classList.add("e-resizable-split-bar"))):(this.hideResizer(this.allBars[o]),this.allBars[o].classList.remove("e-resizable-split-bar"))),"size"===h&&(this.allPanes[o].style.flexBasis=l)}break;case"enableRtl":this.setRTL(e.enableRtl)}},u.prototype.preRender=function(){this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,t.removeClass([this.wrapper],["e-control","e-lib","e-splitter"]);var e="Horizontal"===this.orientation?"e-splitter-horizontal":"e-splitter-vertical";t.addClass([this.element],e),t.Browser.isDevice&&t.addClass([this.element],"e-splitter-touch")},u.prototype.getPersistData=function(){return this.addOnPersist([])},u.prototype.getModuleName=function(){return"splitter"},u.prototype.render=function(){this.checkDataAttributes(),this.setCssClass(this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl)},u.prototype.checkDataAttributes=function(){for(var e,i,n=0;n<this.validElementAttributes.length;n++)i=this.element.getAttribute(this.validElementAttributes[n]),t.isNullOrUndefined(i)||(this[e=this.removeDataPrefix(this.validElementAttributes[n])]=i);for(var s=0;s<this.element.children.length;s++)for(var r=0;r<this.validDataAttributes.length;r++)if(i=this.element.children[s].getAttribute(this.validDataAttributes[r]),!t.isNullOrUndefined(i)){i="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[r]))||"resizable"===e?"true"===i:i,t.isNullOrUndefined(this.paneSettings[s])&&(this.paneSettings[s]={size:"",min:null,max:null,content:"",resizable:!0});var a=this.paneSettings[s][e];"resizable"===e&&this.paneSettings[s].resizable&&(this.paneSettings[s][e]=i),(t.isNullOrUndefined(a)||""===a)&&(this.paneSettings[s][e]=i)}},u.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},u.prototype.setRTL=function(e){e?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},u.prototype.setSplitterSize=function(e,i,n){var s="width"===n?{width:t.formatUnit(i)}:{height:t.formatUnit(i)};t.setStyleAttribute(e,s)},u.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},u.prototype.setCssClass=function(e){""!==e&&t.addClass([this.element],e.split(" "))},u.prototype.hideResizer=function(e){t.addClass([t.select("."+d,e)],"e-hide-handler")},u.prototype.showResizer=function(e){t.removeClass([t.select("."+d,e)],"e-hide-handler")},u.prototype.isEnabled=function(e){e?t.removeClass([this.element],"e-disabled"):t.addClass([this.element],"e-disabled")},u.prototype.setSeparatorSize=function(e){for(var i=t.isNullOrUndefined(e)?"auto":e+"px",n="Horizontal"===this.orientation?o:h,s=0;s<this.allBars.length;s++){var r=t.selectAll("."+n,this.element)[s],a=t.selectAll("."+d,r)[0];"Horizontal"===this.orientation?(r.style.width=i,t.isNullOrUndefined(a)||(a.style.width=i)):(r.style.height=i,t.isNullOrUndefined(a)||(a.style.height=i))}},u.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?"e-splitter-horizontal":"e-splitter-vertical"),this.element.classList.add(t?"e-splitter-vertical":"e-splitter-horizontal"),this.element.removeAttribute("aria-orientation"),this.element.setAttribute("aria-orientation",e);for(i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?r:a),this.allPanes[i].classList.add(t?a:r);for(var i=0;i<this.allBars.length;i++)this.allBars[i].classList.remove(t?o:h),this.allBars[i].classList.add(t?h:o)},u.prototype.getPrevPane=function(e,t){var i=this.enableRtl&&"Horizontal"===this.orientation?(t-1)/2+1:(t-1)/2;return e.parentElement.children[i]},u.prototype.getNextPane=function(e,t){var i=this.enableRtl&&"Horizontal"===this.orientation?(t-1)/2:(t-1)/2+1;return e.parentElement.children[i]},u.prototype.addResizeHandler=function(e){var i=this.createElement("div");t.addClass([i],[d,"e-icons"]);var n=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?i.style.width=n:i.style.height=n,e.appendChild(i)},u.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},u.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},u.prototype.setDimension=function(e,i){t.setStyleAttribute(this.element,{height:e,width:i})},u.prototype.createSeparator=function(e){var i=this.createElement("div");return this.allBars.push(i),"Horizontal"===this.orientation?(t.addClass([i],["e-split-bar",o]),i.style.width=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"):(t.addClass([i],["e-split-bar",h]),i.style.height=t.isNullOrUndefined(this.separatorSize)?"auto":this.separatorSize+"px"),this.addMouseActions(i),this.addResizeHandler(i),i},u.prototype.addSeparator=function(e){for(var i=this.allPanes.length,n=e.children,s=0;s<i;s++)if(s<i-1){var r=this.createSeparator(s);if(t.setStyleAttribute(r,{order:2*s+1}),this.separatorOrder.push(2*s+1),n[s].parentNode.appendChild(r),this.currentSeparator=r,r.setAttribute("role","separator"),this.isResizable()){t.EventHandler.add(r,"mousedown",this.onMouseDown,this);var a="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(r,a,this.onMouseDown,this),r.classList.add("e-resizable-split-bar")}else this.hideResizer(r)}},u.prototype.isResizable=function(){var e=!1;return(!t.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},u.prototype.addMouseActions=function(e){e.addEventListener("mouseover",function(){t.addClass([e],["e-split-bar-hover"])}),e.addEventListener("mouseout",function(){t.removeClass([e],["e-split-bar-hover"])})},u.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},u.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e:e.parentElement},u.prototype.isSeparator=function(e){var t=!0;return(e.classList.contains(d)||e.classList.contains("e-split-line"))&&(t=!1),t},u.prototype.isMouseEvent=function(e){var i=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(i=!0),i},u.prototype.updateCursorPosition=function(e,i){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},i);else{var n="msie"!==t.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:n.pageX,y:n.pageY},i)}},u.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},u.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.onMouseMove,this),t.EventHandler.add(document,"mouseup",this.onMouseUp,this);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.add(document,e,this.onMouseMove,this),t.EventHandler.add(document,i,this.onMouseUp,this)},u.prototype.unwireResizeEvents=function(){var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.remove(document,"mousemove",this.onMouseMove),t.EventHandler.remove(document,"mouseup",this.onMouseUp),t.EventHandler.remove(document,e,this.onMouseMove),t.EventHandler.remove(document,i,this.onMouseUp)},u.prototype.onMouseDown=function(e){e.preventDefault();var i=e.target;this.updateCurrentSeparator(i),t.addClass([this.currentSeparator],"e-split-bar-active"),this.updateCursorPosition(e,"previous"),this.getPaneDetails();var n={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1};if(this.trigger("resizeStart",n),!n.cancel)if(this.wireResizeEvents(),this.previousPane.style.flexBasis.indexOf("%")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var s=this.updatePaneFlexBasis(this.previousPane),r=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=s+r,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%")}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight},u.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth+this.currentSeparator.offsetWidth:e.offsetHeight+this.currentSeparator.offsetHeight;t=this.convertPixelToPercentage(i)}return t},u.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},u.prototype.convertPercentageToPixel=function(e,i){var n,s=e.toString();if(s.indexOf("%")>-1){n=parseFloat(s.slice(0,s.indexOf("%")));var r=void 0;r=t.isNullOrUndefined(i)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(i)],n=Math.ceil(r*(n/100))}else n=parseInt(s,10);return n},u.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},u.prototype.convertPixelToNumber=function(e){return e.indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},u.prototype.calcDragPosition=function(e,t){var i,n;return i="Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e,n=i/t,(n=n>1?1:n<0?0:n)*t},u.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left:this.element.getBoundingClientRect().top,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},u.prototype.getMinMax=function(e,i,n){var s="min"===n?0:null,r=null;return"min"===n?t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(r=this.paneSettings[e].min):t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(r=this.paneSettings[e].max),this.paneSettings.length>0&&!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(r)?(r.indexOf("%")>0&&(r=this.convertPercentageToPixel(r).toString()),this.convertPixelToNumber(r)):s},u.prototype.getPreviousPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e+1:e},u.prototype.getNextPaneIndex=function(){var e=(parseInt(this.currentSeparator.style.order,10)-1)/2;return this.enableRtl?e:e+1},u.prototype.getPaneDetails=function(){this.order=parseInt(this.currentSeparator.style.order,10),this.previousPane=this.getPrevPane(this.currentSeparator,this.order),this.nextPane=this.getNextPane(this.currentSeparator,this.order),this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex()},u.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},u.prototype.boundingRectValues=function(e){return"Horizontal"===this.orientation?e.getBoundingClientRect().width:e.getBoundingClientRect().height},u.prototype.isValidSize=function(e){var i=!1;return!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(i=!0),i},u.prototype.getPaneDimensions=function(){if(this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.paneSettings.length<1)return this.prePaneDimenson=this.boundingRectValues(this.previousPane),void(this.nextPaneDimension=this.boundingRectValues(this.nextPane));this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},u.prototype.checkCoordinates=function(e,t){var i=!0;return e!==this.previousCoordinates.x&&t!==this.previousCoordinates.y||(i=!1),i},u.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==t.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},u.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==t.Browser.info.name?this.border:e},u.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions();var t={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",t);var i,n=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+n-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+n-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.prevPaneCurrentWidth=i+this.convertPixelToNumber(this.previousPaneHeightWidth),this.nextPaneCurrentWidth=this.nextPaneHeightWidth-i,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass(),this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,this.nextPane.style.flexBasis=this.nextPaneCurrentWidth}},u.prototype.validateMinRange=function(e,i,n){var s,r,a=null,o=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),i<(s=this.convertPixelToNumber(a))&&(o=i-s<=0?0:i-s,this.totalWidth=this.totalWidth-o,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},u.prototype.validateMaxRange=function(e,i,n){var s,r,a=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max.toString()),t.isNullOrUndefined(a)||(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),i>(s=this.convertPixelToNumber(a))&&(this.totalWidth=this.totalWidth-(i-s),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),r=s)),t.isNullOrUndefined(r)?i:r},u.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane)},u.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},u.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},u.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(l)||this.previousPane.classList.add(l),this.nextPane.classList.contains(l)||this.nextPane.classList.add(l)},u.prototype.validateDraggedPosition=function(e,i,n){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,r=s-i,a=n+s,o=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),h=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),l=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),d=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),p=e;return e>a-h?p=a-h:e<r+o&&(p=r+o),t.isNullOrUndefined(l)?t.isNullOrUndefined(d)||e<a-d&&(p=a-d):e>r+l&&(p=r+l),p},u.prototype.onMouseUp=function(e){t.removeClass([this.currentSeparator],"e-split-bar-active"),this.unwireResizeEvents();var i={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]};this.trigger("resizeStop",i)},u.prototype.panesDimension=function(e,i){var n,s=i.length;parseInt(this.getHeight(this.element),10),t.isNullOrUndefined(this.paneSettings[e])?t.setStyleAttribute(i[e],{order:2*e}):t.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,t.setStyleAttribute(i[e],{order:2*e})):(n=this.paneSettings[e].size,e<s&&(t.setStyleAttribute(i[e],{"flex-basis":n,order:2*e}),e<s-1?t.addClass([i[e]],l):this.sizeFlag||(i[e].style.flexBasis=null),e===s-1&&this.sizeFlag&&t.addClass([i[e]],l))),this.paneOrder.push(2*e)},u.prototype.setTemplate=function(e,i){for(var n=[],s=0,r=t.compile(e)({});s<r.length;s++){var a=r[s];n.push(a)}t.append([].slice.call(n),i)},u.prototype.createSplitPane=function(e){var i=e.children.length;if(i<this.paneSettings.length)for(h=0;h<this.paneSettings.length;h++){var n=this.createElement("div");this.element.appendChild(n)}i=e.children.length;var o=[].slice.call(e.children);if(this.element.setAttribute("aria-orientation",this.orientation),this.element.setAttribute("role","splitter"),this.sizeFlag=!1,i>1)for(var h=0;h<i;h++)1===o[h].nodeType&&(this.allPanes.push(o[h]),"Horizontal"===this.orientation?(t.addClass([o[h]],[s,r,"e-scrollable"]),this.panesDimension(h,o)):(t.addClass([o[h]],[s,a,"e-scrollable"]),this.panesDimension(h,o)),t.isNullOrUndefined(this.paneSettings[h])||t.isNullOrUndefined(this.paneSettings[h].content)||this.setTemplate(this.paneSettings[h].content,o[h]))},u.prototype.destroy=function(){t.detach(this.element),this.element=this.wrapper,this.wrapperParent.appendChild(this.wrapper)},u.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?t.addClass([e],[s,r,"e-scrollable"]):t.addClass([e],[s,a,"e-scrollable"]),e},u.prototype.removePaneOrders=function(e){for(var t=document.querySelectorAll("."+e),i=0;i<t.length;i++)t[i].style.removeProperty("order")},u.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},u.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)t.detach(this.allBars[e]);this.allBars=[]},u.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},u.prototype.addPane=function(e,i){var n=this.createElement("div");n=this.addPaneClass(n),i=i>this.allPanes.length+1?this.allPanes.length:i;var s={size:t.isNullOrUndefined(e.size)?"":e.size,min:t.isNullOrUndefined(e.min)?null:e.min,max:t.isNullOrUndefined(e.max)?null:e.max,content:t.isNullOrUndefined(e.content)?"":e.content,resizable:!!t.isNullOrUndefined(e.resizable)||e.resizable};this.paneSettings.splice(i,0,s),"Horizontal"===this.orientation?(this.element.insertBefore(n,this.element.querySelectorAll("."+r)[i]),this.removePaneOrders(r)):(this.element.insertBefore(n,this.element.querySelectorAll("."+a)[i]),this.removePaneOrders(a)),this.allPanes.splice(i,0,n),this.updatePanes(),this.setTemplate(this.paneSettings[i].content,n),this.allPanes[this.allPanes.length-1].classList.remove(l)},u.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var i="Horizontal"===this.orientation?r:a;t.detach(this.element.querySelectorAll("."+i)[e]),this.allPanes.splice(e,1),this.removePaneOrders(i),this.updatePanes(),this.allPanes[this.allPanes.length-1].classList.remove(l)},n([t.Property("100%")],u.prototype,"height",void 0),n([t.Property("100%")],u.prototype,"width",void 0),n([t.Collection([],p)],u.prototype,"paneSettings",void 0),n([t.Property("Horizontal")],u.prototype,"orientation",void 0),n([t.Property("")],u.prototype,"cssClass",void 0),n([t.Property(!0)],u.prototype,"enabled",void 0),n([t.Property(!1)],u.prototype,"enableRtl",void 0),n([t.Property(null)],u.prototype,"separatorSize",void 0),n([t.Event()],u.prototype,"created",void 0),n([t.Event()],u.prototype,"resizeStart",void 0),n([t.Event()],u.prototype,"resizing",void 0),n([t.Event()],u.prototype,"resizeStop",void 0),u=n([t.NotifyPropertyChanges],u)}(t.Component);return e.PaneProperties=p,e.Splitter=u,e}({},ej.base),this.ejs=ej;
//# sourceMappingURL=ej2-layouts.min.js.map
/*!
* filename: index.d.ts
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-layouts",
"version": "16.4.40-beta",
"version": "16.4.42",
"description": "A package of Essential JS 2 layout pure CSS components such as card and avatar. The card is used as small container to show content in specific structure, whereas the avatars are icons, initials or figures representing particular person.",

@@ -8,3 +8,3 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~16.4.40-beta"
"@syncfusion/ej2-base": "~16.4.42"
},

@@ -11,0 +11,0 @@ "devDependencies": {

@@ -83,2 +83,4 @@ import { Component, ChildProperty } from '@syncfusion/ej2-base';

private nextPaneHeightWidth;
private validDataAttributes;
private validElementAttributes;
/**

@@ -180,2 +182,4 @@ * Specifies the height of the Splitter component that accepts both string and number values.

render(): void;
private checkDataAttributes;
private removeDataPrefix;
private setRTL;

@@ -244,2 +248,9 @@ private setSplitterSize;

destroy(): void;
private addPaneClass;
private removePaneOrders;
private setPaneOrder;
removeSeparator(): void;
private updatePanes;
addPane(paneProperties: PanePropertiesModel, index: number): void;
removePane(index: number): void;
}

@@ -246,0 +257,0 @@ export interface CreatedEventArgs {

@@ -106,2 +106,4 @@ var __extends = (this && this.__extends) || (function () {

_this.border = 0;
_this.validDataAttributes = ['data-size', 'data-min', 'data-max', 'data-collapsible', 'data-resizable'];
_this.validElementAttributes = ['data-orientation', 'data-width', 'data-height'];
return _this;

@@ -206,2 +208,3 @@ }

Splitter.prototype.render = function () {
this.checkDataAttributes();
this.setCssClass(this.cssClass);

@@ -215,2 +218,47 @@ this.isEnabled(this.enabled);

};
Splitter.prototype.checkDataAttributes = function () {
var api;
var value;
// Element values
for (var dataIndex = 0; dataIndex < this.validElementAttributes.length; dataIndex++) {
value = this.element.getAttribute(this.validElementAttributes[dataIndex]);
if (!isNullOrUndefined(value)) {
api = this.removeDataPrefix(this.validElementAttributes[dataIndex]);
// tslint:disable-next-line
this[api] = value;
}
}
// Pane values
for (var paneIndex = 0; paneIndex < this.element.children.length; paneIndex++) {
for (var dataAttr = 0; dataAttr < this.validDataAttributes.length; dataAttr++) {
value = this.element.children[paneIndex].getAttribute(this.validDataAttributes[dataAttr]);
if (!isNullOrUndefined(value)) {
api = this.removeDataPrefix(this.validDataAttributes[dataAttr]);
value = (api === 'collapsible' || api === 'resizable') ? (value === 'true') : value;
if (isNullOrUndefined(this.paneSettings[paneIndex])) {
this.paneSettings[paneIndex] = {
size: '',
min: null,
max: null,
content: '',
resizable: true,
};
}
// tslint:disable-next-line
var paneAPI = this.paneSettings[paneIndex][api];
if (api === 'resizable' && this.paneSettings[paneIndex].resizable) {
// tslint:disable-next-line
this.paneSettings[paneIndex][api] = value;
}
if (isNullOrUndefined(paneAPI) || paneAPI === '') {
// tslint:disable-next-line
this.paneSettings[paneIndex][api] = value;
}
}
}
}
};
Splitter.prototype.removeDataPrefix = function (attribute) {
return attribute.slice(attribute.lastIndexOf('-') + 1);
};
Splitter.prototype.setRTL = function (rtl) {

@@ -283,7 +331,7 @@ rtl ? addClass([this.element], RTL) : removeClass([this.element], RTL);

Splitter.prototype.getPrevPane = function (currentBar, order) {
var elementIndex = (this.enableRtl) ? ((order - 1) / 2) + 1 : (order - 1) / (2);
var elementIndex = (this.enableRtl && this.orientation === 'Horizontal') ? ((order - 1) / 2) + 1 : (order - 1) / (2);
return currentBar.parentElement.children[elementIndex];
};
Splitter.prototype.getNextPane = function (currentBar, order) {
var elementIndex = (this.enableRtl) ? (order - 1) / (2) : ((order - 1) / 2) + 1;
var elementIndex = (this.enableRtl && this.orientation === 'Horizontal') ? (order - 1) / (2) : ((order - 1) / 2) + 1;
return currentBar.parentElement.children[elementIndex];

@@ -468,4 +516,4 @@ };

else {
var offset = (this.orientation === 'Horizontal') ? pane.offsetWidth :
pane.offsetHeight;
var offset = (this.orientation === 'Horizontal') ? (pane.offsetWidth + this.currentSeparator.offsetWidth) :
(pane.offsetHeight + this.currentSeparator.offsetHeight);
previous = this.convertPixelToPercentage(offset);

@@ -545,3 +593,3 @@ }

if (paneValue.indexOf('%') > 0) {
paneValue = this.convertPercentageToPixel(paneValue, target).toString();
paneValue = this.convertPercentageToPixel(paneValue).toString();
}

@@ -668,7 +716,6 @@ return this.convertPixelToNumber(paneValue);

}
/* istanbul ignore next */
if (this.prevPaneCurrentWidth < 0) {
this.prevPaneCurrentWidth = 0;
}
this.nextPaneCurrentWidth = parseInt(this.nextPaneCurrentWidth, 10);
this.prevPaneCurrentWidth = parseInt(this.prevPaneCurrentWidth, 10);
if ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth) > this.totalWidth) {

@@ -684,2 +731,3 @@ if (this.nextPaneCurrentWidth < this.prevPaneCurrentWidth) {

}
/* istanbul ignore next */
if ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth) < this.totalWidth) {

@@ -704,3 +752,3 @@ var difference = this.totalWidth - ((this.nextPaneCurrentWidth + this.prevPaneCurrentWidth));

if (paneMinRange.indexOf('%') > 0) {
paneMinRange = this.convertPercentageToPixel(paneMinRange, pane).toString();
paneMinRange = this.convertPercentageToPixel(paneMinRange).toString();
}

@@ -727,3 +775,3 @@ paneMinDimensions = this.convertPixelToNumber(paneMinRange);

if (paneMaxRange.indexOf('%') > 0) {
paneMaxRange = this.convertPercentageToPixel(paneMaxRange, pane).toString();
paneMaxRange = this.convertPercentageToPixel(paneMaxRange).toString();
}

@@ -890,3 +938,3 @@ paneMaxDimensions = this.convertPixelToNumber(paneMaxRange);

childCount = target.children.length;
var child = target.children;
var child = [].slice.call(target.children);
this.element.setAttribute('aria-orientation', this.orientation);

@@ -925,2 +973,67 @@ this.element.setAttribute('role', 'splitter');

};
Splitter.prototype.addPaneClass = function (pane) {
if (this.orientation === 'Horizontal') {
addClass([pane], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
}
else {
addClass([pane], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
}
return pane;
};
Splitter.prototype.removePaneOrders = function (paneClass) {
var panes = document.querySelectorAll('.' + paneClass);
for (var i = 0; i < panes.length; i++) {
panes[i].style.removeProperty('order');
}
};
Splitter.prototype.setPaneOrder = function () {
for (var i = 0; i < this.allPanes.length; i++) {
this.panesDimension(i, this.allPanes);
}
};
Splitter.prototype.removeSeparator = function () {
for (var i = 0; i < this.allBars.length; i++) {
detach(this.allBars[i]);
}
this.allBars = [];
};
Splitter.prototype.updatePanes = function () {
this.setPaneOrder();
this.removeSeparator();
this.addSeparator(this.element);
};
Splitter.prototype.addPane = function (paneProperties, index) {
var newPane = this.createElement('div');
newPane = this.addPaneClass(newPane);
index = (index > this.allPanes.length + 1) ? this.allPanes.length : index;
var paneDetails = {
size: isNullOrUndefined(paneProperties.size) ? '' : paneProperties.size,
min: isNullOrUndefined(paneProperties.min) ? null : paneProperties.min,
max: isNullOrUndefined(paneProperties.max) ? null : paneProperties.max,
content: isNullOrUndefined(paneProperties.content) ? '' : paneProperties.content,
resizable: isNullOrUndefined(paneProperties.resizable) ? true : paneProperties.resizable
};
this.paneSettings.splice(index, 0, paneDetails);
if (this.orientation === 'Horizontal') {
this.element.insertBefore(newPane, this.element.querySelectorAll('.' + SPLIT_H_PANE)[index]);
this.removePaneOrders(SPLIT_H_PANE);
}
else {
this.element.insertBefore(newPane, this.element.querySelectorAll('.' + SPLIT_V_PANE)[index]);
this.removePaneOrders(SPLIT_V_PANE);
}
this.allPanes.splice(index, 0, newPane);
this.updatePanes();
this.setTemplate(this.paneSettings[index].content, newPane);
this.allPanes[this.allPanes.length - 1].classList.remove(STATIC_PANE);
};
Splitter.prototype.removePane = function (index) {
index = (index > this.allPanes.length + 1) ? this.allPanes.length : index;
var elementClass = (this.orientation === 'Horizontal') ? SPLIT_H_PANE : SPLIT_V_PANE;
detach(this.element.querySelectorAll('.' + elementClass)[index]);
this.allPanes.splice(index, 1);
this.removePaneOrders(elementClass);
this.updatePanes();
this.allPanes[this.allPanes.length - 1].classList.remove(STATIC_PANE);
};
__decorate([

@@ -927,0 +1040,0 @@ Property('100%')

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc