Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-splitbuttons

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-splitbuttons - npm Package Compare versions

Comparing version 16.1.32 to 16.1.35

8

CHANGELOG.md

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

### DropDownButton
#### New Features
- Styles support provided.
## 16.1.28-preview (2018-03-09)
### SplitButton

@@ -7,0 +15,0 @@

7

dist/ej2-splitbuttons.umd.min.js
/*!
* filename: ej2-splitbuttons.umd.min.js
* version : 16.1.32
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.
* version : 16.1.35
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.

@@ -10,4 +10,3 @@ * A copy of the current license can be obtained at any time by e-mailing

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Buttons,e.ej2Popups)}(this,function(e,t,o,n){"use strict";function s(e,o){for(var n=t.extend({},e),s=0,i=Object.keys(n);s<i.length;s++){var r=i[s];o.indexOf(r)<0&&t.deleteObject(n,r)}return n}var i=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),r=function(e,t,o,n){var s,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(i<3?s(r):i>3?s(t,o,r):s(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r},a=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i(o,e),r([t.Property("")],o.prototype,"iconCss",void 0),r([t.Property("")],o.prototype,"id",void 0),r([t.Property(!1)],o.prototype,"separator",void 0),r([t.Property("")],o.prototype,"text",void 0),r([t.Property("")],o.prototype,"url",void 0),o}(t.ChildProperty),p=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),l=function(e,t,o,n){var s,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(i<3?s(r):i>3?s(t,o,r):s(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r},c="e-disabled",d="e-focused",h="e-menu-icon",u="e-item",y="e-dropdown-popup",m="e-rtl",f="e-separator",v="e-vertical",g=function(e){function i(t,o){return e.call(this,t,o)||this}return p(i,e),i.prototype.preRender=function(){},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.createPopup=function(){var e=t.createElement("div",{className:y,id:this.element.id+"-popup"});document.body.appendChild(e),this.dropDown=new n.Popup(e,{relateTo:this.element,collision:{X:t.Browser.isDevice?"fit":"flip",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():""}),e.style.zIndex=this.getZIndex(),this.dropDown.hide(),t.attributes(this.element,(o={},o.role="menu",o["aria-haspopup"]=this.items.length||this.target?"true":"false",o["aria-expanded"]="false",o["aria-owns"]=this.getPopUpElement().id,o)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add(m);var o},i.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},i.prototype.createItems=function(e){for(var o,n,s,i,r=this.hasIcon(e,"iconCss"),a=t.createElement("ul",{attrs:{tabindex:"0"}}),p=0;p<e.length;p++)n=e[p],s=t.createElement("li",{innerHTML:n.url?"":n.text,className:n.separator?u+" "+f:u,attrs:{role:"menuItem",tabindex:"-1"},id:n.id?n.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),n.iconCss?(o=t.createElement("span",{className:h+" "+n.iconCss}),s.insertBefore(o,s.childNodes[0])):r&&!n.separator&&s.classList.add("e-blank-icon"),n.url&&s.appendChild(this.createAnchor(n)),i={item:n,element:s},this.trigger("beforeItemRender",i),a.appendChild(s);return a},i.prototype.hasIcon=function(e,t){for(var o=0,n=e.length;o<n;o++)if(e[o][t])return!0;return!1},i.prototype.createAnchor=function(e){return t.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:e.text,attrs:{href:e.url}})},i.prototype.initialize=function(){this.button=new o.Button({iconCss:this.iconCss,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.setIconPositionTop(),this.appendArrowSpan(),this.createPopup(),this.setActiveElem()},i.prototype.setIconPositionTop=function(){var e=this.element.querySelector(".e-icon-left");e&&"Top"===this.iconPosition&&(t.addClass([this.element],v),t.removeClass([e],"e-icon-left"),t.addClass([e],"e-icon-top"))},i.prototype.appendArrowSpan=function(){this.element.appendChild(t.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass===v?"bottom":"right")+" e-caret"}))},i.prototype.setActiveElem=function(){this.activeElem=this.element},i.prototype.getModuleName=function(){return"dropdown-btn"},i.prototype.canOpen=function(){return this.getPopUpElement().classList.contains("e-popup-close")},i.prototype.destroy=function(){var o=this;t.detach(this.element.querySelector("span.e-caret")),e.prototype.destroy.call(this),this.button.destroy(),["role","aria-haspopup","aria-expanded","aria-owns"].forEach(function(e){o.element.removeAttribute(e)}),t.removeClass([this.element,this.activeElem],["e-ddb-active","e-btn"]),t.detach(this.getPopUpElement()),this.unWireEvents()},i.prototype.getPopUpElement=function(){return this.dropDown.element},i.prototype.getULElement=function(){return this.getPopUpElement().children[0]},i.prototype.wireEvents=function(){var e=this.getPopUpElement();t.EventHandler.add(document,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),this.target||t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),t.rippleEffect(e,{selector:"."+u})},i.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(9!==e.keyCode&&e.preventDefault(),e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},i.prototype.upDownKeyHandler=function(e){for(var o=this.getULElement(),n=40===e.keyCode?0:o.childElementCount-1,s=n,i=null,r=0,a=o.children.length;r<a;r++)o.children[r].classList.contains(d)&&(s=r,(i=o.children[r]).classList.remove(d),40===e.keyCode?s++:s--,s===(40===e.keyCode?o.childElementCount:-1)&&(s=n));i=o.children[s],-1!==(s=this.isValidLI(i,s,e.keyCode))&&(t.addClass([o.children[s]],d),o.children[s].focus())},i.prototype.isValidLI=function(e,t,o,n){if(void 0===n&&(n=0),(e.classList.contains(f)||e.classList.contains(c))&&(t===(40===o?this.items.length-1:0)?t=40===o?0:this.items.length-1:40===o?t++:t--),(e=this.getULElement().children[t]).classList.contains(f)||e.classList.contains(c)){if(++n===this.items.length)return t=-1;t=this.isValidLI(e,t,o,n)}return t},i.prototype.keyEventHandler=function(e){27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||(this.closePopup(e),this.element.focus()):this.clickHandler(e)},i.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},i.prototype.getZIndex=function(){for(var e,t,o,n=["999"],s=0,i=document.body.children.length;s<i;s++)e=(o=document.defaultView.getComputedStyle(document.body.children[s])).getPropertyValue("z-index"),t=o.getPropertyValue("position"),"auto"!==e&&"static"!==t&&n.push(e);return(Math.max.apply(Math,n)+1).toString()},i.prototype.clickHandler=function(e){var o=e.target,n=this.canOpen();if(t.closest(o,"#"+this.element.id))n?this.openPopUp(e):(this.closePopup(e),this.activeElem.focus());else if(t.closest(o,"#"+this.getPopUpElement().id)){var s=void 0,i=void 0,r=void 0,a=this.getLI(o);a&&(i=Array.prototype.indexOf.call(this.getULElement().children,a),(r=this.items[i])&&(s={element:a,item:r},this.trigger("select",s)),this.closePopup(e),this.activeElem.focus())}else n||this.closePopup(e)},i.prototype.openPopUp=function(e){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var o=this.getULElement(),n={element:o,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",n),!n.cancel){this.dropDown.show(),t.addClass([this.activeElem],"e-ddb-active"),this.activeElem.setAttribute("aria-expanded","true"),o.focus();var s={element:o,items:this.items};this.trigger("open",s)}},i.prototype.closePopup=function(e){void 0===e&&(e=null);var o=this.getULElement(),n={element:o,items:this.items,event:e,cancel:!1};if(this.trigger("beforeClose",n),!n.cancel){this.dropDown.hide(),t.removeClass([this.activeElem],"e-ddb-active"),this.activeElem.setAttribute("aria-expanded","false");var s={element:o,items:this.items};this.trigger("close",s),this.target||t.detach(o)}},i.prototype.unWireEvents=function(){t.EventHandler.remove(document,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)},i.prototype.onPropertyChanged=function(e,o){var n=["content","cssClass","iconCss","disabled","enableRtl"];"Left"===e.iconPosition&&n.push("iconPosition"),this.button.setProperties(s(e,n));for(var i=this.getPopUpElement(),r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"cssClass":if(e.cssClass===v){var p=this.element.querySelector("span.e-caret");t.classList(p,["e-icon-bottom"],["e-icon-right"])}o.cssClass&&t.removeClass([i],o.cssClass.split(" ")),t.addClass([i],e.cssClass.split(" "));break;case"iconPosition":this.setIconPositionTop();break;case"enableRtl":i.classList.toggle(m);break;case"target":this.target=e.target,t.detach(this.getULElement()),i.appendChild(this.getTargetElement()),this.dropDown.content=this.getTargetElement();break;case"items":this.dropDown.refresh(),i.classList.contains("e-popup-open")&&t.classList(i,["e-popup-close"],["e-popup-open"])}}},l([t.Property("")],i.prototype,"content",void 0),l([t.Property("")],i.prototype,"cssClass",void 0),l([t.Property(!1)],i.prototype,"disabled",void 0),l([t.Property("")],i.prototype,"iconCss",void 0),l([t.Property("Left")],i.prototype,"iconPosition",void 0),l([t.Collection([],a)],i.prototype,"items",void 0),l([t.Property("")],i.prototype,"target",void 0),l([t.Event()],i.prototype,"beforeItemRender",void 0),l([t.Event()],i.prototype,"beforeOpen",void 0),l([t.Event()],i.prototype,"beforeClose",void 0),l([t.Event()],i.prototype,"close",void 0),l([t.Event()],i.prototype,"open",void 0),l([t.Event()],i.prototype,"select",void 0),i=l([t.NotifyPropertyChanges],i)}(t.Component),b=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C=function(e,t,o,n){var s,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(i<3?s(r):i>3?s(t,o,r):s(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r},E="EJS-SPLITBUTTON",P=function(e){function n(t,o){return e.call(this,t,o)||this}return b(n,e),n.prototype.preRender=function(){var e=this.element;if(e.tagName===E){for(var o=t.getValue("ej2_instances",e),n=t.createElement("button"),s=t.createElement(E,{className:"e-"+this.getModuleName()+"-wrapper"}),i=0,r=e.attributes.length;i<r;i++)n.setAttribute(e.attributes[i].nodeName,e.attributes[i].nodeValue);e.parentNode.insertBefore(s,e),t.detach(e),e=n,s.appendChild(e),t.setValue("ej2_instances",o,e),this.wrapper=s,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},n.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.createSecondaryButton(),this.setAria(),this.wireEvents()},n.prototype.initWrapper=function(){this.wrapper||(this.wrapper=t.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" "))},n.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,content:this.content,disabled:this.disabled};this.primaryBtnObj=new o.Button(e,this.element),this.element.classList.add("e-"+this.getModuleName()),this.wrapper.appendChild(this.element),this.setIconPositionTop(),this.setActiveElem()},n.prototype.createSecondaryButton=function(){var e=this,o=t.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(o);var n={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,beforeItemRender:function(t){e.trigger("beforeItemRender",t)},beforeOpen:function(t){e.trigger("beforeOpen",t)},open:function(t){e.trigger("open",t)},close:function(t){e.trigger("close",t)},select:function(t){e.trigger("select",t)}};this.secondaryBtnObj=new g(n,o),this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown,this.secondaryBtnObj.activeElem=this.element,t.EventHandler.remove(this.getPopUpElement(),"keydown",this.secondaryBtnObj.keyBoardHandler),this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right")},n.prototype.setAria=function(){t.attributes(this.element,{role:"listbox","aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.secondaryBtnObj.dropDown.element.id})},n.prototype.getModuleName=function(){return"split-btn"},n.prototype.toggle=function(){this.secondaryBtnObj.toggle()},n.prototype.destroy=function(){var e=this;this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),this.wrapper.tagName===E?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],["e-"+this.getModuleName(),"e-rtl"]),["role","aria-label","aria-haspopup","aria-expanded","aria-owns"].forEach(function(t){e.element.removeAttribute(t)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents()},n.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),t.EventHandler.add(this.getPopUpElement(),"keydown",this.keyBoardHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow"}})},n.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},n.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},n.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e)}},n.prototype.onPropertyChanged=function(e,o){var n=["content","iconCss","cssClass","disabled","enableRtl"];"Left"===e.iconPosition&&n.push("iconPosition"),this.primaryBtnObj.setProperties(s(e,n)),n=["items","beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl"],this.secondaryBtnObj.setProperties(s(e,n));for(var i=0,r=Object.keys(e);i<r.length;i++){switch(r[i]){case"cssClass":o.cssClass&&t.removeClass([this.wrapper],o.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"iconPosition":this.setIconPositionTop();break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl")}}},C([t.Property("")],n.prototype,"content",void 0),C([t.Property("")],n.prototype,"cssClass",void 0),C([t.Property(!1)],n.prototype,"disabled",void 0),C([t.Property("")],n.prototype,"iconCss",void 0),C([t.Property("Left")],n.prototype,"iconPosition",void 0),C([t.Collection([],a)],n.prototype,"items",void 0),C([t.Property("")],n.prototype,"target",void 0),C([t.Event()],n.prototype,"beforeItemRender",void 0),C([t.Event()],n.prototype,"beforeOpen",void 0),C([t.Event()],n.prototype,"beforeClose",void 0),C([t.Event()],n.prototype,"click",void 0),C([t.Event()],n.prototype,"close",void 0),C([t.Event()],n.prototype,"open",void 0),C([t.Event()],n.prototype,"select",void 0),n=C([t.NotifyPropertyChanges],n)}(g);e.getModel=s,e.Item=a,e.DropDownButton=g,e.SplitButton=P,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Buttons,e.ej2Popups)}(this,function(e,t,o,n){"use strict";function s(e,o){for(var n=t.extend({},e),s=0,i=Object.keys(n);s<i.length;s++){var r=i[s];o.indexOf(r)<0&&t.deleteObject(n,r)}return n}var i=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),r=function(e,t,o,n){var s,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(i<3?s(r):i>3?s(t,o,r):s(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r},a=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i(o,e),r([t.Property("")],o.prototype,"iconCss",void 0),r([t.Property("")],o.prototype,"id",void 0),r([t.Property(!1)],o.prototype,"separator",void 0),r([t.Property("")],o.prototype,"text",void 0),r([t.Property("")],o.prototype,"url",void 0),o}(t.ChildProperty),p=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),l=function(e,t,o,n){var s,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(i<3?s(r):i>3?s(t,o,r):s(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r},c="e-disabled",d="e-focused",h="e-menu-icon",u="e-item",y="e-dropdown-popup",f="e-rtl",m="e-separator",v="e-vertical",b=function(e){function i(t,o){return e.call(this,t,o)||this}return p(i,e),i.prototype.preRender=function(){},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.createPopup=function(){var e=t.createElement("div",{className:y,id:this.element.id+"-popup"});document.body.appendChild(e),this.dropDown=new n.Popup(e,{relateTo:this.element,collision:{X:t.Browser.isDevice?"fit":"flip",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",zIndex:n.getZindexPartial(e)}),this.dropDown.hide(),t.attributes(this.element,(o={},o.role="menu",o["aria-haspopup"]=this.items.length||this.target?"true":"false",o["aria-expanded"]="false",o["aria-owns"]=this.getPopUpElement().id,o)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add(f);var o},i.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},i.prototype.createItems=function(e){for(var o,n,s,i,r=this.hasIcon(e,"iconCss"),a=t.createElement("ul",{attrs:{tabindex:"0"}}),p=0;p<e.length;p++)n=e[p],s=t.createElement("li",{innerHTML:n.url?"":n.text,className:n.separator?u+" "+m:u,attrs:{role:"menuItem",tabindex:"-1"},id:n.id?n.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),n.iconCss?(o=t.createElement("span",{className:h+" "+n.iconCss}),s.insertBefore(o,s.childNodes[0])):r&&!n.separator&&s.classList.add("e-blank-icon"),n.url&&s.appendChild(this.createAnchor(n)),i={item:n,element:s},this.trigger("beforeItemRender",i),a.appendChild(s);return a},i.prototype.hasIcon=function(e,t){for(var o=0,n=e.length;o<n;o++)if(e[o][t])return!0;return!1},i.prototype.createAnchor=function(e){return t.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:e.text,attrs:{href:e.url}})},i.prototype.initialize=function(){this.button=new o.Button({iconCss:this.iconCss,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.setIconPositionTop(),this.appendArrowSpan(),this.createPopup(),this.setActiveElem()},i.prototype.setIconPositionTop=function(){var e=this.element.querySelector(".e-icon-left");e&&"Top"===this.iconPosition&&(t.addClass([this.element],"e-top-icon-btn"),t.removeClass([e],"e-icon-left"),t.addClass([e],"e-icon-top"))},i.prototype.appendArrowSpan=function(){this.element.appendChild(t.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(v)>-1?"bottom":"right")+" e-caret"}))},i.prototype.setActiveElem=function(){this.activeElem=this.element},i.prototype.getModuleName=function(){return"dropdown-btn"},i.prototype.canOpen=function(){return this.getPopUpElement().classList.contains("e-popup-close")},i.prototype.destroy=function(){var o=this;t.detach(this.element.querySelector("span.e-caret")),e.prototype.destroy.call(this),this.button.destroy(),["role","aria-haspopup","aria-expanded","aria-owns"].forEach(function(e){o.element.removeAttribute(e)}),t.removeClass([this.element,this.activeElem],["e-ddb-active","e-btn"]),t.detach(this.getPopUpElement()),this.unWireEvents()},i.prototype.getPopUpElement=function(){return this.dropDown.element},i.prototype.getULElement=function(){return this.getPopUpElement().children[0]},i.prototype.wireEvents=function(){var e=this.getPopUpElement();t.EventHandler.add(document,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),this.target||t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),t.rippleEffect(e,{selector:"."+u})},i.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(9!==e.keyCode&&e.preventDefault(),e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},i.prototype.upDownKeyHandler=function(e){for(var o=this.getULElement(),n=40===e.keyCode?0:o.childElementCount-1,s=n,i=null,r=0,a=o.children.length;r<a;r++)o.children[r].classList.contains(d)&&(s=r,(i=o.children[r]).classList.remove(d),40===e.keyCode?s++:s--,s===(40===e.keyCode?o.childElementCount:-1)&&(s=n));i=o.children[s],-1!==(s=this.isValidLI(i,s,e.keyCode))&&(t.addClass([o.children[s]],d),o.children[s].focus())},i.prototype.isValidLI=function(e,t,o,n){if(void 0===n&&(n=0),(e.classList.contains(m)||e.classList.contains(c))&&(t===(40===o?this.items.length-1:0)?t=40===o?0:this.items.length-1:40===o?t++:t--),(e=this.getULElement().children[t]).classList.contains(m)||e.classList.contains(c)){if(++n===this.items.length)return t=-1;t=this.isValidLI(e,t,o,n)}return t},i.prototype.keyEventHandler=function(e){27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||(this.closePopup(e),this.element.focus()):this.clickHandler(e)},i.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},i.prototype.clickHandler=function(e){var o=e.target,n=this.canOpen();if(t.closest(o,"#"+this.element.id))n?this.openPopUp(e):(this.closePopup(e),this.activeElem.focus());else if(t.closest(o,"#"+this.getPopUpElement().id)){var s=void 0,i=void 0,r=void 0,a=this.getLI(o);a&&(i=Array.prototype.indexOf.call(this.getULElement().children,a),(r=this.items[i])&&(s={element:a,item:r},this.trigger("select",s)),this.closePopup(e),this.activeElem.focus())}else n||this.closePopup(e)},i.prototype.openPopUp=function(e){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var o=this.getULElement(),n={element:o,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",n),!n.cancel){this.dropDown.show(),t.addClass([this.activeElem],"e-ddb-active"),this.element.setAttribute("aria-expanded","true"),o.focus();var s={element:o,items:this.items};this.trigger("open",s)}},i.prototype.closePopup=function(e){void 0===e&&(e=null);var o=this.getULElement(),n={element:o,items:this.items,event:e,cancel:!1};if(this.trigger("beforeClose",n),!n.cancel){this.dropDown.hide(),t.removeClass([this.activeElem],"e-ddb-active"),this.element.setAttribute("aria-expanded","false");var s={element:o,items:this.items};this.trigger("close",s),this.target||t.detach(o)}},i.prototype.unWireEvents=function(){t.EventHandler.remove(document,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)},i.prototype.onPropertyChanged=function(e,o){var n=["content","cssClass","iconCss","disabled","enableRtl"];"Left"===e.iconPosition&&n.push("iconPosition"),this.button.setProperties(s(e,n));for(var i=this.getPopUpElement(),r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"cssClass":if(e.cssClass.indexOf(v)>-1){var p=this.element.querySelector("span.e-caret");t.classList(p,["e-icon-bottom"],["e-icon-right"])}o.cssClass&&t.removeClass([i],o.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"iconPosition":this.setIconPositionTop();break;case"enableRtl":i.classList.toggle(f);break;case"target":this.target=e.target,t.detach(this.getULElement()),i.appendChild(this.getTargetElement()),this.dropDown.content=this.getTargetElement();break;case"items":this.dropDown.refresh(),i.classList.contains("e-popup-open")&&t.classList(i,["e-popup-close"],["e-popup-open"])}}},l([t.Property("")],i.prototype,"content",void 0),l([t.Property("")],i.prototype,"cssClass",void 0),l([t.Property(!1)],i.prototype,"disabled",void 0),l([t.Property("")],i.prototype,"iconCss",void 0),l([t.Property("Left")],i.prototype,"iconPosition",void 0),l([t.Collection([],a)],i.prototype,"items",void 0),l([t.Property("")],i.prototype,"target",void 0),l([t.Event()],i.prototype,"beforeItemRender",void 0),l([t.Event()],i.prototype,"beforeOpen",void 0),l([t.Event()],i.prototype,"beforeClose",void 0),l([t.Event()],i.prototype,"close",void 0),l([t.Event()],i.prototype,"open",void 0),l([t.Event()],i.prototype,"select",void 0),i=l([t.NotifyPropertyChanges],i)}(t.Component),g=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C=function(e,t,o,n){var s,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(i<3?s(r):i>3?s(t,o,r):s(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r},E="EJS-SPLITBUTTON",P=function(e){function n(t,o){return e.call(this,t,o)||this}return g(n,e),n.prototype.preRender=function(){var e=this.element;if(e.tagName===E){for(var o=t.getValue("ej2_instances",e),n=t.createElement("button"),s=t.createElement(E,{className:"e-"+this.getModuleName()+"-wrapper"}),i=0,r=e.attributes.length;i<r;i++)n.setAttribute(e.attributes[i].nodeName,e.attributes[i].nodeValue);e.parentNode.insertBefore(s,e),t.detach(e),e=n,s.appendChild(e),t.setValue("ej2_instances",o,e),this.wrapper=s,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},n.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.createSecondaryButton(),this.setAria(),this.wireEvents()},n.prototype.initWrapper=function(){this.wrapper||(this.wrapper=t.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" "))},n.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,content:this.content,disabled:this.disabled};this.primaryBtnObj=new o.Button(e,this.element),this.element.classList.add("e-"+this.getModuleName()),this.wrapper.appendChild(this.element),this.setIconPositionTop(),this.setActiveElem()},n.prototype.createSecondaryButton=function(){var e=this,o=t.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(o);var n={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,beforeItemRender:function(t){e.trigger("beforeItemRender",t)},beforeOpen:function(t){e.trigger("beforeOpen",t)},open:function(t){e.trigger("open",t)},close:function(t){e.trigger("close",t)},select:function(t){e.trigger("select",t)}};this.secondaryBtnObj=new b(n,o),this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown,this.secondaryBtnObj.activeElem=this.element,t.EventHandler.remove(this.getPopUpElement(),"keydown",this.secondaryBtnObj.keyBoardHandler),this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right")},n.prototype.setAria=function(){t.attributes(this.element,{role:"listbox","aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.secondaryBtnObj.dropDown.element.id})},n.prototype.getModuleName=function(){return"split-btn"},n.prototype.toggle=function(){this.secondaryBtnObj.toggle()},n.prototype.destroy=function(){var e=this;this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),this.wrapper.tagName===E?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],["e-"+this.getModuleName(),"e-rtl"]),["role","aria-label","aria-haspopup","aria-expanded","aria-owns"].forEach(function(t){e.element.removeAttribute(t)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents()},n.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),t.EventHandler.add(this.getPopUpElement(),"keydown",this.keyBoardHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow"}})},n.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},n.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},n.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e)}},n.prototype.onPropertyChanged=function(e,o){var n=["content","iconCss","cssClass","disabled","enableRtl"];"Left"===e.iconPosition&&n.push("iconPosition"),this.primaryBtnObj.setProperties(s(e,n)),n=["items","beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl"],this.secondaryBtnObj.setProperties(s(e,n));for(var i=0,r=Object.keys(e);i<r.length;i++){switch(r[i]){case"cssClass":o.cssClass&&t.removeClass([this.wrapper],o.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"iconPosition":this.setIconPositionTop();break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl")}}},C([t.Property("")],n.prototype,"content",void 0),C([t.Property("")],n.prototype,"cssClass",void 0),C([t.Property(!1)],n.prototype,"disabled",void 0),C([t.Property("")],n.prototype,"iconCss",void 0),C([t.Property("Left")],n.prototype,"iconPosition",void 0),C([t.Collection([],a)],n.prototype,"items",void 0),C([t.Property("")],n.prototype,"target",void 0),C([t.Event()],n.prototype,"beforeItemRender",void 0),C([t.Event()],n.prototype,"beforeOpen",void 0),C([t.Event()],n.prototype,"beforeClose",void 0),C([t.Event()],n.prototype,"click",void 0),C([t.Event()],n.prototype,"close",void 0),C([t.Event()],n.prototype,"open",void 0),C([t.Event()],n.prototype,"select",void 0),n=C([t.NotifyPropertyChanges],n)}(b);e.getModel=s,e.Item=a,e.DropDownButton=b,e.SplitButton=P,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-splitbuttons.umd.min.js.map
import { Browser, ChildProperty, Collection, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getInstance, getUniqueID, getValue, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';
import { Button } from '@syncfusion/ej2-buttons';
import { Popup } from '@syncfusion/ej2-popups';
import { Popup, getZindexPartial } from '@syncfusion/ej2-popups';

@@ -123,5 +123,5 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {

targetType: 'relative',
content: this.target ? this.getTargetElement() : ''
content: this.target ? this.getTargetElement() : '',
zIndex: getZindexPartial(div)
});
div.style.zIndex = this.getZIndex();
this.dropDown.hide();

@@ -205,3 +205,3 @@ attributes(this.element, {

if (iconSpan && this.iconPosition === 'Top') {
addClass([this.element], classNames.VERTICAL);
addClass([this.element], 'e-top-icon-btn');
removeClass([iconSpan], 'e-icon-left');

@@ -213,3 +213,4 @@ addClass([iconSpan], 'e-icon-top');

this.element.appendChild(createElement('span', {
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass === classNames.VERTICAL ? 'bottom' : 'right') + ' e-caret'
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
? 'bottom' : 'right') + ' e-caret'
}));

@@ -344,17 +345,2 @@ }

}
getZIndex() {
let idx;
let pos;
let props;
let zIndex = ['999'];
for (let i = 0, len = document.body.children.length; i < len; i++) {
props = document.defaultView.getComputedStyle(document.body.children[i]);
idx = props.getPropertyValue('z-index');
pos = props.getPropertyValue('position');
if (idx !== 'auto' && pos !== 'static') {
zIndex.push(idx);
}
}
return (Math.max.apply(Math, zIndex) + 1).toString();
}
clickHandler(e) {

@@ -406,3 +392,3 @@ let trgt = e.target;

addClass([this.activeElem], 'e-ddb-active');
this.activeElem.setAttribute('aria-expanded', 'true');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();

@@ -420,3 +406,3 @@ let openArgs = { element: ul, items: this.items };

removeClass([this.activeElem], 'e-ddb-active');
this.activeElem.setAttribute('aria-expanded', 'false');
this.element.setAttribute('aria-expanded', 'false');
let closeArgs = { element: ul, items: this.items };

@@ -456,3 +442,3 @@ this.trigger('close', closeArgs);

case 'cssClass':
if (newProp.cssClass === classNames.VERTICAL) {
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
let arrowSpan = this.element.querySelector('span.e-caret');

@@ -464,3 +450,5 @@ classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);

}
addClass([popupElement], newProp.cssClass.split(' '));
if (newProp.cssClass) {
addClass([popupElement], newProp.cssClass.split(' '));
}
break;

@@ -467,0 +455,0 @@ case 'iconPosition':

import { Browser, ChildProperty, Collection, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getInstance, getUniqueID, getValue, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';
import { Button } from '@syncfusion/ej2-buttons';
import { Popup } from '@syncfusion/ej2-popups';
import { Popup, getZindexPartial } from '@syncfusion/ej2-popups';

@@ -150,5 +150,5 @@ var __extends = (undefined && undefined.__extends) || (function () {

targetType: 'relative',
content: this.target ? this.getTargetElement() : ''
content: this.target ? this.getTargetElement() : '',
zIndex: getZindexPartial(div)
});
div.style.zIndex = this.getZIndex();
this.dropDown.hide();

@@ -230,3 +230,3 @@ attributes(this.element, (_a = {}, _a['role'] = 'menu', _a['aria-haspopup'] = this.items.length || this.target ? 'true' : 'false', _a['aria-expanded'] = 'false', _a['aria-owns'] = this.getPopUpElement().id, _a));

if (iconSpan && this.iconPosition === 'Top') {
addClass([this.element], classNames.VERTICAL);
addClass([this.element], 'e-top-icon-btn');
removeClass([iconSpan], 'e-icon-left');

@@ -238,3 +238,4 @@ addClass([iconSpan], 'e-icon-top');

this.element.appendChild(createElement('span', {
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass === classNames.VERTICAL ? 'bottom' : 'right') + ' e-caret'
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
? 'bottom' : 'right') + ' e-caret'
}));

@@ -371,17 +372,2 @@ };

};
DropDownButton.prototype.getZIndex = function () {
var idx;
var pos;
var props;
var zIndex = ['999'];
for (var i = 0, len = document.body.children.length; i < len; i++) {
props = document.defaultView.getComputedStyle(document.body.children[i]);
idx = props.getPropertyValue('z-index');
pos = props.getPropertyValue('position');
if (idx !== 'auto' && pos !== 'static') {
zIndex.push(idx);
}
}
return (Math.max.apply(Math, zIndex) + 1).toString();
};
DropDownButton.prototype.clickHandler = function (e) {

@@ -434,3 +420,3 @@ var trgt = e.target;

addClass([this.activeElem], 'e-ddb-active');
this.activeElem.setAttribute('aria-expanded', 'true');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();

@@ -449,3 +435,3 @@ var openArgs = { element: ul, items: this.items };

removeClass([this.activeElem], 'e-ddb-active');
this.activeElem.setAttribute('aria-expanded', 'false');
this.element.setAttribute('aria-expanded', 'false');
var closeArgs = { element: ul, items: this.items };

@@ -486,3 +472,3 @@ this.trigger('close', closeArgs);

case 'cssClass':
if (newProp.cssClass === classNames.VERTICAL) {
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
var arrowSpan = this.element.querySelector('span.e-caret');

@@ -494,3 +480,5 @@ classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);

}
addClass([popupElement], newProp.cssClass.split(' '));
if (newProp.cssClass) {
addClass([popupElement], newProp.cssClass.split(' '));
}
break;

@@ -497,0 +485,0 @@ case 'iconPosition':

/*!
* filename: index.d.ts
* version : 16.1.26
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.
* version : 16.1.35
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.

@@ -10,3 +10,2 @@ * A copy of the current license can be obtained at any time by e-mailing

*/
import * as _splitbuttons from '@syncfusion/ej2-splitbuttons';

@@ -13,0 +12,0 @@ import * as _base from '@syncfusion/ej2-base';

{
"name": "@syncfusion/ej2-splitbuttons",
"version": "16.1.32",
"version": "16.1.35",
"description": "Essential JS 2 SplitButton Components",

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

"dependencies": {
"@syncfusion/ej2-base": "~16.1.32",
"@syncfusion/ej2-base": "~16.1.35",
"@syncfusion/ej2-popups": "~16.1.32"

@@ -14,0 +14,0 @@ },

@@ -10,6 +10,2 @@ # Overview

* [SplitButton Demo](http://ej2.syncfusion.com/demos/#/material/button/split-button.html)
* [SplitButton Documentation](http://ej2.syncfusion.com/documentation/split-button)
## Changelog
Check the changelog [here](https://github.com/syncfusion/ej2-splitbuttons/blob/master/CHANGELOG.md)
* [SplitButton Documentation](http://ej2.syncfusion.com/documentation/split-button)

@@ -1,2 +0,2 @@

import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler, addClass, attributes } from '@syncfusion/ej2-base';import { createElement, EmitType, getUniqueID, closest, rippleEffect } from '@syncfusion/ej2-base';import { Component, INotifyPropertyChanged, select, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Browser, classList, removeClass } from '@syncfusion/ej2-base';import { Button } from '@syncfusion/ej2-buttons';import { Popup } from '@syncfusion/ej2-popups';import { MenuEventArgs, BeforeOpenCloseMenuEventArgs, OpenCloseMenuEventArgs } from './../common/common';import { getModel, SplitButtonIconPosition, Item } from './../common/common';import { ItemModel } from './../common/common-model';
import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler, addClass, attributes } from '@syncfusion/ej2-base';import { createElement, EmitType, getUniqueID, closest, rippleEffect } from '@syncfusion/ej2-base';import { Component, INotifyPropertyChanged, select, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Browser, classList, removeClass } from '@syncfusion/ej2-base';import { Button } from '@syncfusion/ej2-buttons';import { Popup, getZindexPartial } from '@syncfusion/ej2-popups';import { MenuEventArgs, BeforeOpenCloseMenuEventArgs, OpenCloseMenuEventArgs } from './../common/common';import { getModel, SplitButtonIconPosition, Item } from './../common/common';import { ItemModel } from './../common/common-model';
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -3,0 +3,0 @@

@@ -147,3 +147,2 @@ import { EmitType } from '@syncfusion/ej2-base';

private getLI(elem);
private getZIndex();
protected clickHandler(e: MouseEvent | KeyboardEventArgs): void;

@@ -150,0 +149,0 @@ private openPopUp(e?);

@@ -60,5 +60,5 @@ var __extends = (this && this.__extends) || (function () {

targetType: 'relative',
content: this.target ? this.getTargetElement() : ''
content: this.target ? this.getTargetElement() : '',
zIndex: ej2_popups_1.getZindexPartial(div)
});
div.style.zIndex = this.getZIndex();
this.dropDown.hide();

@@ -145,3 +145,3 @@ ej2_base_1.attributes(this.element, (_a = {},

if (iconSpan && this.iconPosition === 'Top') {
ej2_base_1.addClass([this.element], classNames.VERTICAL);
ej2_base_1.addClass([this.element], 'e-top-icon-btn');
ej2_base_4.removeClass([iconSpan], 'e-icon-left');

@@ -153,3 +153,4 @@ ej2_base_1.addClass([iconSpan], 'e-icon-top');

this.element.appendChild(ej2_base_2.createElement('span', {
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass === classNames.VERTICAL ? 'bottom' : 'right') + ' e-caret'
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
? 'bottom' : 'right') + ' e-caret'
}));

@@ -277,17 +278,2 @@ };

};
DropDownButton.prototype.getZIndex = function () {
var idx;
var pos;
var props;
var zIndex = ['999'];
for (var i = 0, len = document.body.children.length; i < len; i++) {
props = document.defaultView.getComputedStyle(document.body.children[i]);
idx = props.getPropertyValue('z-index');
pos = props.getPropertyValue('position');
if (idx !== 'auto' && pos !== 'static') {
zIndex.push(idx);
}
}
return (Math.max.apply(Math, zIndex) + 1).toString();
};
DropDownButton.prototype.clickHandler = function (e) {

@@ -340,3 +326,3 @@ var trgt = e.target;

ej2_base_1.addClass([this.activeElem], 'e-ddb-active');
this.activeElem.setAttribute('aria-expanded', 'true');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();

@@ -355,3 +341,3 @@ var openArgs = { element: ul, items: this.items };

ej2_base_4.removeClass([this.activeElem], 'e-ddb-active');
this.activeElem.setAttribute('aria-expanded', 'false');
this.element.setAttribute('aria-expanded', 'false');
var closeArgs = { element: ul, items: this.items };

@@ -385,3 +371,3 @@ this.trigger('close', closeArgs);

case 'cssClass':
if (newProp.cssClass === classNames.VERTICAL) {
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
var arrowSpan = this.element.querySelector('span.e-caret');

@@ -393,3 +379,5 @@ ej2_base_4.classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);

}
ej2_base_1.addClass([popupElement], newProp.cssClass.split(' '));
if (newProp.cssClass) {
ej2_base_1.addClass([popupElement], newProp.cssClass.split(' '));
}
break;

@@ -396,0 +384,0 @@ case 'iconPosition':

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 too big to display

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

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