Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-splitbuttons

Package Overview
Dependencies
Maintainers
4
Versions
137
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 17.1.51 to 17.2.28-beta

6

CHANGELOG.md

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

### DropDownButton
#### Bug Fixes
- Resolved Method and Event name conflict issue.
## 17.1.50 (2019-06-04)

@@ -13,0 +7,0 @@

4

dist/ej2-splitbuttons.umd.min.js
/*!
* filename: ej2-splitbuttons.umd.min.js
* version : 17.1.51
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. 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"),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,s,n){"use strict";function i(e,s){for(var n=t.extend({},e),i=0,o=Object.keys(n);i<o.length;i++){var r=o[i];s.indexOf(r)<0&&t.deleteObject(n,r)}return n}var o=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),r=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},a=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return o(s,e),r([t.Property("")],s.prototype,"iconCss",void 0),r([t.Property("")],s.prototype,"id",void 0),r([t.Property(!1)],s.prototype,"separator",void 0),r([t.Property("")],s.prototype,"text",void 0),r([t.Property("")],s.prototype,"url",void 0),s}(t.ChildProperty),p=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),l=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},c="e-disabled",h="e-focused",d="e-menu-icon",u="e-item",m="e-dropdown-popup",y="e-separator",f="e-vertical",v=function(e){function o(t,s){return e.call(this,t,s)||this}return p(o,e),o.prototype.preRender=function(){},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},o.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},o.prototype.createPopup=function(){var e,s=this.createElement("div",{className:m,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new n.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e["aria-owns"]=this.getPopUpElement().id,e.type="button",e)),this.cssClass&&t.addClass([s],this.cssClass.split(" "))},o.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},o.prototype.createItems=function(e){for(var s,n,i,o,r=this.hasIcon(e,"iconCss"),a=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}}),p=0;p<e.length;p++)n=e[p],i=this.createElement("li",{innerHTML:n.url?"":n.text,className:n.separator?u+" "+y:u,attrs:{role:"menuItem",tabindex:"-1"},id:n.id?n.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),n.iconCss?(s=this.createElement("span",{className:d+" "+n.iconCss}),i.insertBefore(s,i.childNodes[0])):r&&!n.separator&&i.classList.add("e-blank-icon"),n.url&&i.appendChild(this.createAnchor(n)),o={item:n,element:i},this.trigger("beforeItemRender",o),a.appendChild(i);return a},o.prototype.hasIcon=function(e,t){for(var s=0,n=e.length;s<n;s++)if(e[s][t])return!0;return!1},o.prototype.createAnchor=function(e){return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:e.text,attrs:{href:e.url}})},o.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.createPopup(),this.setActiveElem([this.element])},o.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(f)>-1?"bottom":"right")+" e-caret"}))},o.prototype.setActiveElem=function(e){this.activeElem=e},o.prototype.getModuleName=function(){return"dropdown-btn"},o.prototype.canOpen=function(){return this.getPopUpElement().classList.contains("e-popup-close")},o.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var n;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(n=this.cssClass.split(" ")),this.button.destroy(),n&&t.removeClass([this.element],n),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.dropDown.destroy();var i=document.getElementById(this.getPopUpElement().id);i&&(t.removeClass([i],["e-popup-open","e-popup-close"]),t.detach(i)),this.disabled||this.unWireEvents()}},o.prototype.getPopUpElement=function(){return this.dropDown.element},o.prototype.getULElement=function(){return this.getPopUpElement().children[0]},o.prototype.wireEvents=function(){var e=this.getPopUpElement();this.delegateMousedownHandler=this.mousedownHandler.bind(this),t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.rippleFn=t.rippleEffect(e,{selector:"."+u})},o.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(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)}},o.prototype.upDownKeyHandler=function(e){if(!this.target||38!==e.keyCode&&40!==e.keyCode){e.preventDefault();var s=this.getULElement(),n=40===e.keyCode?0:s.childElementCount-1,i=n,o=null;this.removeCustomSelection();for(var r=0,a=s.children.length;r<a;r++)s.children[r].classList.contains(h)&&(i=r,(o=s.children[r]).classList.remove(h),40===e.keyCode?i++:i--,i===(40===e.keyCode?s.childElementCount:-1)&&(i=n));o=s.children[i],-1!==(i=this.isValidLI(o,i,e.keyCode))&&(t.addClass([s.children[i]],h),s.children[i].focus())}},o.prototype.removeCustomSelection=function(){var e=this.getULElement().querySelector(".e-selected");e&&e.classList.remove("e-selected")},o.prototype.isValidLI=function(e,t,s,n){if(void 0===n&&(n=0),(e.classList.contains(y)||e.classList.contains(c))&&(t===(40===s?this.items.length-1:0)?t=40===s?0:this.items.length-1:40===s?t++:t--),(e=this.getULElement().children[t]).classList.contains(y)||e.classList.contains(c)){if(++n===this.items.length)return t=-1;t=this.isValidLI(e,t,s,n)}return t},o.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e))},o.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},o.prototype.mousedownHandler=function(e){var s=e.target;this.canOpen()||t.closest(s,"#"+this.getPopUpElement().id)||t.closest(s,"#"+this.element.id)||this.closePopup(e)},o.prototype.clickHandler=function(e){var s=e.target,n=this.canOpen();if(t.closest(s,"#"+this.element.id))n?this.openPopUp(e):this.closePopup(e,this.activeElem[0]);else if(t.closest(s,"#"+this.getPopUpElement().id)){var i=void 0,o=void 0,r=void 0,a=this.getLI(s);a&&(o=Array.prototype.indexOf.call(this.getULElement().children,a),(r=this.items[o])&&(i={element:a,item:r},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},o.prototype.openPopUp=function(e){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var s=this.getULElement(),n={element:s,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",n),!n.cancel){this.dropDown.show(null,this.element),t.addClass([this.element],"e-active"),this.element.setAttribute("aria-expanded","true"),s.focus();var i={element:s,items:this.items};this.trigger("open",i)}},o.prototype.closePopup=function(e,s){void 0===e&&(e=null);var n=this.getULElement(),i={element:n,items:this.items,event:e,cancel:!1};if(this.trigger("beforeClose",i),!i.cancel){this.removeCustomSelection(),this.dropDown.hide(),t.removeClass(this.activeElem,"e-active"),this.element.setAttribute("aria-expanded","false"),s&&s.focus();var o={element:n,items:this.items};this.trigger("close",o),!this.target&&n&&t.detach(n)}},o.prototype.unWireEvents=function(){t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.rippleFn()},o.prototype.onPropertyChanged=function(e,s){this.button.setProperties(i(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"])),this.dropDown.setProperties(i(e,["enableRtl"]));for(var n=this.getPopUpElement(),o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.canOpen()||this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(f)>-1){var a=this.element.querySelector("span.e-caret");t.classList(a,["e-icon-bottom"],["e-icon-right"])}s.cssClass&&t.removeClass([n],s.cssClass.split(" ")),e.cssClass&&t.addClass([n],e.cssClass.split(" "));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.dropDown.refresh(),n.classList.contains("e-popup-open")&&t.classList(n,["e-popup-close"],["e-popup-open"])}}},o.prototype.focusIn=function(){this.element.focus()},l([t.Property("")],o.prototype,"content",void 0),l([t.Property("")],o.prototype,"cssClass",void 0),l([t.Property(!1)],o.prototype,"disabled",void 0),l([t.Property("")],o.prototype,"iconCss",void 0),l([t.Property("Left")],o.prototype,"iconPosition",void 0),l([t.Collection([],a)],o.prototype,"items",void 0),l([t.Property("")],o.prototype,"target",void 0),l([t.Event()],o.prototype,"beforeItemRender",void 0),l([t.Event()],o.prototype,"beforeOpen",void 0),l([t.Event()],o.prototype,"beforeClose",void 0),l([t.Event()],o.prototype,"close",void 0),l([t.Event()],o.prototype,"open",void 0),l([t.Event()],o.prototype,"select",void 0),l([t.Event()],o.prototype,"created",void 0),o=l([t.NotifyPropertyChanges],o)}(t.Component),g=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),b=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},C="EJS-SPLITBUTTON",P=function(e){function n(t,s){return e.call(this,t,s)||this}return g(n,e),n.prototype.preRender=function(){var e=this.element;if(e.tagName===C){for(var s=t.getValue("ej2_instances",e),n=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(C,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)n.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(i,e),t.detach(e),e=n,i.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=i,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.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents()},n.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.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,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},n.prototype.createSecondaryButton=function(){var e=this,s=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(s);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)},beforeClose:function(t){e.trigger("beforeClose",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 v(n),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(s),this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.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,{"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 s=this,n=["e-rtl"],i=document.getElementById(this.element.id);this.cssClass&&(n=n.concat(this.cssClass.split(" "))),i&&i.parentElement===this.wrapper&&(this.wrapper.tagName===C?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],n),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents()),this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},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,s){var n=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i(e,n)),n=["items","beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl"],this.secondaryBtnObj.setProperties(i(e,n));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl")}}},n.prototype.focusIn=function(){this.element.focus()},b([t.Property("")],n.prototype,"content",void 0),b([t.Property("")],n.prototype,"cssClass",void 0),b([t.Property(!1)],n.prototype,"disabled",void 0),b([t.Property("")],n.prototype,"iconCss",void 0),b([t.Property("Left")],n.prototype,"iconPosition",void 0),b([t.Collection([],a)],n.prototype,"items",void 0),b([t.Property("")],n.prototype,"target",void 0),b([t.Event()],n.prototype,"beforeItemRender",void 0),b([t.Event()],n.prototype,"beforeOpen",void 0),b([t.Event()],n.prototype,"beforeClose",void 0),b([t.Event()],n.prototype,"click",void 0),b([t.Event()],n.prototype,"close",void 0),b([t.Event()],n.prototype,"open",void 0),b([t.Event()],n.prototype,"select",void 0),b([t.Event()],n.prototype,"created",void 0),n=b([t.NotifyPropertyChanges],n)}(v),w=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),E=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},k="e-hide-spinner",O="e-progress-active",S="e-btn-content",B=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return w(s,e),E([t.Property(null)],s.prototype,"template",void 0),E([t.Property(16)],s.prototype,"width",void 0),E([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),L=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return w(s,e),E([t.Property(400)],s.prototype,"duration",void 0),E([t.Property("None")],s.prototype,"effect",void 0),E([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),j=function(e){function s(t,s){var n=e.call(this,t,s)||this;return n.step=1,n}return w(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,n=[k,O,"e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(n=n.concat(this.cssClass.split(" "))),t.removeClass([this.element],n),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),n.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(S)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e=this.element.innerHTML;this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:S,innerHTML:e}))},s.prototype.clickHandler=function(){this.element.classList.contains(O)||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,i=s.contains("e-vertical");s.add(O),s.contains(k)||n.showSpinner(this.element),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,i),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,n,i,o,r,a){var p=this;try{var l,c=e-s,h=this.duration*o/100,d=c?c<h?c-h:c%h:0;this.progressTime=t=t+c-d,s=e-d,n+=(c-d)/this.duration*100,l={percent:i=(t-r)%h==0||100===n?n:i,currentDuration:t,step:o},0===n?this.trigger("begin",l):100===n||t===this.duration?this.trigger("end",l):this.trigger("progress",l),n!==l.percent&&l.percent!==i&&(n=l.percent),this.percent=n,this.step=l.step,(t-r)%(this.duration*l.step/100)!=0&&100!==n||(this.timerId=requestAnimationFrame(function(){p.enableProgress&&(p.getProgress().style[a?"height":"width"]=n+"%"),p.element.setAttribute("aria-valuenow",n.toString())}),i=n,r=t),this.isPaused||(t<this.duration&&n<100?this.interval=window.setTimeout(function(){p.startAnimate(Date.now(),t,s,n,i,l.step,r,a)},this.duration/100-d):this.interval=window.setTimeout(function(){p.progressTime=p.percent=0,p.enableProgress&&(p.getProgress().style[a?"height":"width"]="0%"),p.element.setAttribute("aria-valuenow","0"),p.hideSpin()},100))}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(S)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add(O);for(var s,n=this.percent;n<100;n++)n+=10,this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?n+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin(),s={step:this.step,currentDuration:this.progressTime,percent:100},clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(S)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(S)[0];if(this.element.classList.contains(k)||n.hideSpinner(this.element),this.element.classList.remove(O),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(S)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var i=this.element;e.prototype.onPropertyChanged.call(this,s,n);for(var o=0,r=Object.keys(s);o<r.length;o++){switch(r[o]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),i.setAttribute("aria-label",i.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(i.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(i.removeChild(this.getSpinner()),this.createSpinner())}}},s.prototype.focusIn=function(){this.element.focus()},E([t.Property(!1)],s.prototype,"enableProgress",void 0),E([t.Property(2e3)],s.prototype,"duration",void 0),E([t.Property("Left")],s.prototype,"iconPosition",void 0),E([t.Property("")],s.prototype,"iconCss",void 0),E([t.Property(!1)],s.prototype,"disabled",void 0),E([t.Property(!1)],s.prototype,"isPrimary",void 0),E([t.Property("")],s.prototype,"cssClass",void 0),E([t.Property("")],s.prototype,"content",void 0),E([t.Property(!1)],s.prototype,"isToggle",void 0),E([t.Complex({},B)],s.prototype,"spinSettings",void 0),E([t.Complex({},L)],s.prototype,"animationSettings",void 0),E([t.Event()],s.prototype,"created",void 0),E([t.Event()],s.prototype,"begin",void 0),E([t.Event()],s.prototype,"progress",void 0),E([t.Event()],s.prototype,"end",void 0),E([t.Event()],s.prototype,"fail",void 0),s=E([t.NotifyPropertyChanges],s)}(s.Button);e.getModel=i,e.Item=a,e.DropDownButton=v,e.SplitButton=P,e.createButtonGroup=function(e,n,i){void 0===n&&(n={});var o,r,a,p;t.isNullOrUndefined(i)&&(i=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;n.buttons=n.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=n.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=i("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),n.cssClass&&p&&!p.cssClass&&(p.cssClass=n.cssClass),new s.Button(p||{},r));return l},e.SpinSettings=B,e.AnimationSettings=L,e.ProgressButton=j,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,n,s){"use strict";function i(e,n){for(var s=t.extend({},e),i=0,o=Object.keys(s);i<o.length;i++){var r=o[i];n.indexOf(r)<0&&t.deleteObject(s,r)}return s}var o=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}(),r=function(e,t,n,s){var i,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,n,r):i(t,n))||r);return o>3&&r&&Object.defineProperty(t,n,r),r},a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),r([t.Property("")],n.prototype,"iconCss",void 0),r([t.Property("")],n.prototype,"id",void 0),r([t.Property(!1)],n.prototype,"separator",void 0),r([t.Property("")],n.prototype,"text",void 0),r([t.Property("")],n.prototype,"url",void 0),n}(t.ChildProperty),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}(),l=function(e,t,n,s){var i,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,n,r):i(t,n))||r);return o>3&&r&&Object.defineProperty(t,n,r),r},c="e-disabled",h="e-focused",d="e-menu-icon",u="e-item",m="e-dropdown-popup",y="e-separator",f="e-vertical",v=function(e){function o(t,n){return e.call(this,t,n)||this}return p(o,e),o.prototype.preRender=function(){},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},o.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},o.prototype.createPopup=function(){var e,n=this.createElement("div",{className:m,id:this.element.id+"-popup"});document.body.appendChild(n),this.dropDown=new s.Popup(n,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e["aria-owns"]=this.getPopUpElement().id,e.type="button",e)),this.cssClass&&t.addClass([n],this.cssClass.split(" "))},o.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},o.prototype.createItems=function(e){for(var n,s,i,o,r=this.hasIcon(e,"iconCss"),a=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}}),p=0;p<e.length;p++)s=e[p],i=this.createElement("li",{innerHTML:s.url?"":s.text,className:s.separator?u+" "+y:u,attrs:{role:"menuItem",tabindex:"-1"},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),s.iconCss?(n=this.createElement("span",{className:d+" "+s.iconCss}),i.insertBefore(n,i.childNodes[0])):r&&!s.separator&&i.classList.add("e-blank-icon"),s.url&&i.appendChild(this.createAnchor(s)),o={item:s,element:i},this.trigger("beforeItemRender",o),a.appendChild(i);return a},o.prototype.hasIcon=function(e,t){for(var n=0,s=e.length;n<s;n++)if(e[n][t])return!0;return!1},o.prototype.createAnchor=function(e){return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:e.text,attrs:{href:e.url}})},o.prototype.initialize=function(){this.button=new n.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.createPopup(),this.setActiveElem([this.element])},o.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(f)>-1?"bottom":"right")+" e-caret"}))},o.prototype.setActiveElem=function(e){this.activeElem=e},o.prototype.getModuleName=function(){return"dropdown-btn"},o.prototype.canOpen=function(){return this.getPopUpElement().classList.contains("e-popup-close")},o.prototype.destroy=function(){var n=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&t.removeClass([this.element],s),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){n.element.removeAttribute(e)}),this.dropDown.destroy();var i=document.getElementById(this.getPopUpElement().id);i&&(t.removeClass([i],["e-popup-open","e-popup-close"]),t.detach(i)),this.disabled||this.unWireEvents()}},o.prototype.getPopUpElement=function(){return this.dropDown.element},o.prototype.getULElement=function(){return this.getPopUpElement().children[0]},o.prototype.wireEvents=function(){var e=this.getPopUpElement();this.delegateMousedownHandler=this.mousedownHandler.bind(this),t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.rippleFn=t.rippleEffect(e,{selector:"."+u})},o.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(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)}},o.prototype.upDownKeyHandler=function(e){if(!this.target||38!==e.keyCode&&40!==e.keyCode){e.preventDefault();var n=this.getULElement(),s=40===e.keyCode?0:n.childElementCount-1,i=s,o=null;this.removeCustomSelection();for(var r=0,a=n.children.length;r<a;r++)n.children[r].classList.contains(h)&&(i=r,(o=n.children[r]).classList.remove(h),40===e.keyCode?i++:i--,i===(40===e.keyCode?n.childElementCount:-1)&&(i=s));o=n.children[i],-1!==(i=this.isValidLI(o,i,e.keyCode))&&(t.addClass([n.children[i]],h),n.children[i].focus())}},o.prototype.removeCustomSelection=function(){var e=this.getULElement().querySelector(".e-selected");e&&e.classList.remove("e-selected")},o.prototype.isValidLI=function(e,t,n,s){if(void 0===s&&(s=0),(e.classList.contains(y)||e.classList.contains(c))&&(t===(40===n?this.items.length-1:0)?t=40===n?0:this.items.length-1:40===n?t++:t--),(e=this.getULElement().children[t]).classList.contains(y)||e.classList.contains(c)){if(++s===this.items.length)return t=-1;t=this.isValidLI(e,t,n,s)}return t},o.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e))},o.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},o.prototype.mousedownHandler=function(e){var n=e.target;this.canOpen()||t.closest(n,"#"+this.getPopUpElement().id)||t.closest(n,"#"+this.element.id)||this.closePopup(e)},o.prototype.clickHandler=function(e){var n=e.target,s=this.canOpen();if(t.closest(n,"#"+this.element.id))s?this.openPopUp(e):this.closePopup(e,this.activeElem[0]);else if(t.closest(n,"#"+this.getPopUpElement().id)){var i=void 0,o=void 0,r=void 0,a=this.getLI(n);a&&(o=Array.prototype.indexOf.call(this.getULElement().children,a),(r=this.items[o])&&(i={element:a,item:r},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},o.prototype.openPopUp=function(e){var n=this;void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var s={element:this.getULElement(),items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",s,function(e){if(!e.cancel){var s=n.getULElement();n.dropDown.show(null,n.element),t.addClass([n.element],"e-active"),n.element.setAttribute("aria-expanded","true"),s.focus();var i={element:s,items:n.items};n.trigger("open",i)}})},o.prototype.closePopup=function(e,n){var s=this;void 0===e&&(e=null);var i={element:this.getULElement(),items:this.items,event:e,cancel:!1};this.trigger("beforeClose",i,function(e){if(!e.cancel){var i=s.getULElement();s.removeCustomSelection(),s.dropDown.hide(),t.removeClass(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),n&&n.focus();var o={element:i,items:s.items};s.trigger("close",o),!s.target&&i&&t.detach(i)}})},o.prototype.unWireEvents=function(){t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.rippleFn()},o.prototype.onPropertyChanged=function(e,n){this.button.setProperties(i(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"])),this.dropDown.setProperties(i(e,["enableRtl"]));for(var s=this.getPopUpElement(),o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.canOpen()||this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(f)>-1){var a=this.element.querySelector("span.e-caret");t.classList(a,["e-icon-bottom"],["e-icon-right"])}n.cssClass&&t.removeClass([s],n.cssClass.split(" ")),e.cssClass&&t.addClass([s],e.cssClass.split(" "));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.dropDown.refresh(),s.classList.contains("e-popup-open")&&t.classList(s,["e-popup-close"],["e-popup-open"])}}},o.prototype.focusIn=function(){this.element.focus()},l([t.Property("")],o.prototype,"content",void 0),l([t.Property("")],o.prototype,"cssClass",void 0),l([t.Property(!1)],o.prototype,"disabled",void 0),l([t.Property("")],o.prototype,"iconCss",void 0),l([t.Property("Left")],o.prototype,"iconPosition",void 0),l([t.Collection([],a)],o.prototype,"items",void 0),l([t.Property("")],o.prototype,"target",void 0),l([t.Event()],o.prototype,"beforeItemRender",void 0),l([t.Event()],o.prototype,"beforeOpen",void 0),l([t.Event()],o.prototype,"beforeClose",void 0),l([t.Event()],o.prototype,"close",void 0),l([t.Event()],o.prototype,"open",void 0),l([t.Event()],o.prototype,"select",void 0),l([t.Event()],o.prototype,"created",void 0),o=l([t.NotifyPropertyChanges],o)}(t.Component),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}(),b=function(e,t,n,s){var i,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,n,r):i(t,n))||r);return o>3&&r&&Object.defineProperty(t,n,r),r},C="EJS-SPLITBUTTON",P=function(e){function s(t,n){return e.call(this,t,n)||this}return g(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===C){for(var n=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(C,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)s.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(i,e),t.detach(e),e=s,i.appendChild(e),t.setValue("ej2_instances",n,e),this.wrapper=i,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents()},s.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.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(" "))},s.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new n.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},s.prototype.createSecondaryButton=function(){var e=this,n=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(n);var s={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,function(e){t=e})},beforeClose:function(t){e.trigger("beforeClose",t,function(e){t=e})},open:function(t){e.trigger("open",t)},close:function(t){e.trigger("close",t)},select:function(t){e.trigger("select",t)}};this.secondaryBtnObj=new v(s),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(n),this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],t.EventHandler.remove(this.getPopUpElement(),"keydown",this.secondaryBtnObj.keyBoardHandler),this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right")},s.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.secondaryBtnObj.dropDown.element.id})},s.prototype.getModuleName=function(){return"split-btn"},s.prototype.toggle=function(){this.secondaryBtnObj.toggle()},s.prototype.destroy=function(){var n=this,s=["e-rtl"],i=document.getElementById(this.element.id);this.cssClass&&(s=s.concat(this.cssClass.split(" "))),i&&i.parentElement===this.wrapper&&(this.wrapper.tagName===C?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){n.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents()),this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},s.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"}})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},s.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},s.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e)}},s.prototype.onPropertyChanged=function(e,n){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i(e,s)),s=["items","beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl"],this.secondaryBtnObj.setProperties(i(e,s));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"cssClass":n.cssClass&&t.removeClass([this.wrapper],n.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl")}}},s.prototype.focusIn=function(){this.element.focus()},b([t.Property("")],s.prototype,"content",void 0),b([t.Property("")],s.prototype,"cssClass",void 0),b([t.Property(!1)],s.prototype,"disabled",void 0),b([t.Property("")],s.prototype,"iconCss",void 0),b([t.Property("Left")],s.prototype,"iconPosition",void 0),b([t.Collection([],a)],s.prototype,"items",void 0),b([t.Property("")],s.prototype,"target",void 0),b([t.Event()],s.prototype,"beforeItemRender",void 0),b([t.Event()],s.prototype,"beforeOpen",void 0),b([t.Event()],s.prototype,"beforeClose",void 0),b([t.Event()],s.prototype,"click",void 0),b([t.Event()],s.prototype,"close",void 0),b([t.Event()],s.prototype,"open",void 0),b([t.Event()],s.prototype,"select",void 0),b([t.Event()],s.prototype,"created",void 0),s=b([t.NotifyPropertyChanges],s)}(v),w=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}(),E=function(e,t,n,s){var i,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,n,r):i(t,n))||r);return o>3&&r&&Object.defineProperty(t,n,r),r},k="e-hide-spinner",O="e-progress-active",S="e-btn-content",B=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),E([t.Property(null)],n.prototype,"template",void 0),E([t.Property(16)],n.prototype,"width",void 0),E([t.Property("Left")],n.prototype,"position",void 0),n}(t.ChildProperty),L=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),E([t.Property(400)],n.prototype,"duration",void 0),E([t.Property("None")],n.prototype,"effect",void 0),E([t.Property("ease")],n.prototype,"easing",void 0),n}(t.ChildProperty),j=function(e){function n(t,n){var s=e.call(this,t,n)||this;return s.step=1,s}return w(n,e),n.prototype.preRender=function(){e.prototype.preRender.call(this)},n.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria()},n.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},n.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},n.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},n.prototype.getModuleName=function(){return"progress-btn"},n.prototype.destroy=function(){var n=this,s=[k,O,"e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(s=s.concat(this.cssClass.split(" "))),t.removeClass([this.element],s),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){n.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},n.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},n.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),s.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},n.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},n.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},n.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(S)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},n.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},n.prototype.setContent=function(){var e=this.element.innerHTML;this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:S,innerHTML:e}))},n.prototype.clickHandler=function(){this.element.classList.contains(O)||this.startProgress()},n.prototype.startProgress=function(e,t){var n=this.element.classList,i=n.contains("e-vertical");n.add(O),n.contains(k)||s.showSpinner(this.element),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,i),this.startContAnimate()},n.prototype.startAnimate=function(e,t,n,s,i,o,r,a){var p=this;try{var l=void 0,c=e-n,h=this.duration*o/100,d=c?c<h?c-h:c%h:0;this.progressTime=t=t+c-d,n=e-d,s+=(c-d)/this.duration*100,l={percent:i=(t-r)%h==0||100===s?s:i,currentDuration:t,step:o},this.eIsVertical=a,0===s?this.trigger("begin",l,function(e){p.successCallback(e,s,i,t,r,d,n)}):100===s||t===this.duration?this.trigger("end",l,function(e){p.successCallback(e,s,i,t,r,d,n)}):this.trigger("progress",l,function(e){p.successCallback(e,s,i,t,r,d,n)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},n.prototype.successCallback=function(e,t,n,s,i,o,r){var a=this,p=t,l=n,c=o,h=s,d=i,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},n.prototype.startContAnimate=function(){var e=this,n=this.element.getElementsByClassName(S)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(n,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){n.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},n.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add(O);for(var n,s=this.percent;s<100;s++)s+=10,this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin(),n={step:this.step,currentDuration:this.progressTime,percent:100},clearTimeout(this.interval),this.trigger("end",n),this.progressTime=this.percent=0},n.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(S)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},n.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(S)[0];if(this.element.classList.contains(k)||s.hideSpinner(this.element),this.element.classList.remove(O),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},n.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(S)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},n.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},n.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},n.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},n.prototype.onPropertyChanged=function(n,s){var i=this.element;e.prototype.onPropertyChanged.call(this,n,s);for(var o=0,r=Object.keys(n);o<r.length;o++){switch(r[o]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),i.setAttribute("aria-label",i.textContent+" progress");break;case"iconCss":s.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":n.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":n.spinSettings.position&&(i.classList.remove("e-spin-"+s.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(n.spinSettings.template||n.spinSettings.width)&&(i.removeChild(this.getSpinner()),this.createSpinner())}}},n.prototype.focusIn=function(){this.element.focus()},E([t.Property(!1)],n.prototype,"enableProgress",void 0),E([t.Property(2e3)],n.prototype,"duration",void 0),E([t.Property("Left")],n.prototype,"iconPosition",void 0),E([t.Property("")],n.prototype,"iconCss",void 0),E([t.Property(!1)],n.prototype,"disabled",void 0),E([t.Property(!1)],n.prototype,"isPrimary",void 0),E([t.Property("")],n.prototype,"cssClass",void 0),E([t.Property("")],n.prototype,"content",void 0),E([t.Property(!1)],n.prototype,"isToggle",void 0),E([t.Complex({},B)],n.prototype,"spinSettings",void 0),E([t.Complex({},L)],n.prototype,"animationSettings",void 0),E([t.Event()],n.prototype,"created",void 0),E([t.Event()],n.prototype,"begin",void 0),E([t.Event()],n.prototype,"progress",void 0),E([t.Event()],n.prototype,"end",void 0),E([t.Event()],n.prototype,"fail",void 0),n=E([t.NotifyPropertyChanges],n)}(n.Button);e.getModel=i,e.Item=a,e.DropDownButton=v,e.SplitButton=P,e.createButtonGroup=function(e,s,i){void 0===s&&(s={});var o,r,a,p;t.isNullOrUndefined(i)&&(i=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;s.buttons=s.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=s.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=i("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),s.cssClass&&p&&!p.cssClass&&(p.cssClass=s.cssClass),new n.Button(p||{},r));return l},e.SpinSettings=B,e.AnimationSettings=L,e.ProgressButton=j,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-splitbuttons.umd.min.js.map

@@ -408,11 +408,13 @@ import { Animation, ChildProperty, Collection, Complex, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getInstance, getUniqueID, getValue, isNullOrUndefined, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';

let beforeOpenArgs = { element: ul, items: this.items, event: e, cancel: false };
this.trigger('beforeOpen', beforeOpenArgs);
if (!beforeOpenArgs.cancel) {
this.dropDown.show(null, this.element);
addClass([this.element], 'e-active');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();
let openArgs = { element: ul, items: this.items };
this.trigger('open', openArgs);
}
this.trigger('beforeOpen', beforeOpenArgs, (observedArgs) => {
if (!observedArgs.cancel) {
let ul = this.getULElement();
this.dropDown.show(null, this.element);
addClass([this.element], 'e-active');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();
let openArgs = { element: ul, items: this.items };
this.trigger('open', openArgs);
}
});
}

@@ -422,17 +424,19 @@ closePopup(e = null, focusEle) {

let beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
this.trigger('beforeClose', beforeCloseArgs);
if (!beforeCloseArgs.cancel) {
this.removeCustomSelection();
this.dropDown.hide();
removeClass(this.activeElem, 'e-active');
this.element.setAttribute('aria-expanded', 'false');
if (focusEle) {
focusEle.focus();
this.trigger('beforeClose', beforeCloseArgs, (observedArgs) => {
if (!observedArgs.cancel) {
let ul = this.getULElement();
this.removeCustomSelection();
this.dropDown.hide();
removeClass(this.activeElem, 'e-active');
this.element.setAttribute('aria-expanded', 'false');
if (focusEle) {
focusEle.focus();
}
let closeArgs = { element: ul, items: this.items };
this.trigger('close', closeArgs);
if (!this.target && ul) {
detach(ul);
}
}
let closeArgs = { element: ul, items: this.items };
this.trigger('close', closeArgs);
if (!this.target && ul) {
detach(ul);
}
}
});
}

@@ -672,6 +676,10 @@ unWireEvents() {

beforeOpen: (args) => {
this.trigger('beforeOpen', args);
this.trigger('beforeOpen', args, (observedArgs) => {
args = observedArgs;
});
},
beforeClose: (args) => {
this.trigger('beforeClose', args);
this.trigger('beforeClose', args, (observedArgs) => {
args = observedArgs;
});
},

@@ -1130,45 +1138,18 @@ open: (args) => {

args = { percent: prevPercent, currentDuration: progressTime, step: step };
this.eIsVertical = isVertical;
if (percent === 0) {
this.trigger('begin', args);
this.trigger('begin', args, (observedArgs) => {
this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer, prevTime);
});
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args);
this.trigger('end', args, (observedArgs) => {
this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer, prevTime);
});
}
else {
this.trigger('progress', args);
}
if (percent !== args.percent && args.percent !== prevPercent) {
percent = args.percent;
}
this.percent = percent;
this.step = args.step;
if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
this.timerId = requestAnimationFrame(() => {
if (this.enableProgress) {
this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
}
this.element.setAttribute('aria-valuenow', percent.toString());
this.trigger('progress', args, (observedArgs) => {
this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer, prevTime);
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
this.interval = window.setTimeout(() => {
this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
this.interval = window.setTimeout(() => {
this.progressTime = this.percent = 0;
if (this.enableProgress) {
this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
}
this.element.setAttribute('aria-valuenow', '0');
this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
}

@@ -1180,2 +1161,45 @@ catch (e) {

}
successCallback(args, perc, pPerc, prgTim, pPrgTim, timDif, pTim) {
let percent = perc;
let prevPercent = pPerc;
let timeDiffBuffer = timDif;
let progressTime = prgTim;
let prevProgressTime = pPrgTim;
let prevTime = pTim;
let isVertical = this.eIsVertical;
if (percent !== args.percent && args.percent !== prevPercent) {
percent = args.percent;
}
this.percent = percent;
this.step = args.step;
if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
this.timerId = requestAnimationFrame(() => {
if (this.enableProgress) {
this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
}
this.element.setAttribute('aria-valuenow', percent.toString());
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
this.interval = window.setTimeout(() => {
this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
this.interval = window.setTimeout(() => {
this.progressTime = this.percent = 0;
if (this.enableProgress) {
this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
}
this.element.setAttribute('aria-valuenow', '0');
this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
}
startContAnimate() {

@@ -1182,0 +1206,0 @@ let ele = this.element.getElementsByClassName(CONTENTCLS)[0];

@@ -436,2 +436,3 @@ import { Animation, ChildProperty, Collection, Complex, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getInstance, getUniqueID, getValue, isNullOrUndefined, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';

DropDownButton.prototype.openPopUp = function (e) {
var _this = this;
if (e === void 0) { e = null; }

@@ -443,31 +444,36 @@ if (!this.target) {

var beforeOpenArgs = { element: ul, items: this.items, event: e, cancel: false };
this.trigger('beforeOpen', beforeOpenArgs);
if (!beforeOpenArgs.cancel) {
this.dropDown.show(null, this.element);
addClass([this.element], 'e-active');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();
var openArgs = { element: ul, items: this.items };
this.trigger('open', openArgs);
}
this.trigger('beforeOpen', beforeOpenArgs, function (observedArgs) {
if (!observedArgs.cancel) {
var ul_1 = _this.getULElement();
_this.dropDown.show(null, _this.element);
addClass([_this.element], 'e-active');
_this.element.setAttribute('aria-expanded', 'true');
ul_1.focus();
var openArgs = { element: ul_1, items: _this.items };
_this.trigger('open', openArgs);
}
});
};
DropDownButton.prototype.closePopup = function (e, focusEle) {
var _this = this;
if (e === void 0) { e = null; }
var ul = this.getULElement();
var beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
this.trigger('beforeClose', beforeCloseArgs);
if (!beforeCloseArgs.cancel) {
this.removeCustomSelection();
this.dropDown.hide();
removeClass(this.activeElem, 'e-active');
this.element.setAttribute('aria-expanded', 'false');
if (focusEle) {
focusEle.focus();
this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
if (!observedArgs.cancel) {
var ul_2 = _this.getULElement();
_this.removeCustomSelection();
_this.dropDown.hide();
removeClass(_this.activeElem, 'e-active');
_this.element.setAttribute('aria-expanded', 'false');
if (focusEle) {
focusEle.focus();
}
var closeArgs = { element: ul_2, items: _this.items };
_this.trigger('close', closeArgs);
if (!_this.target && ul_2) {
detach(ul_2);
}
}
var closeArgs = { element: ul, items: this.items };
this.trigger('close', closeArgs);
if (!this.target && ul) {
detach(ul);
}
}
});
};

@@ -724,6 +730,10 @@ DropDownButton.prototype.unWireEvents = function () {

beforeOpen: function (args) {
_this.trigger('beforeOpen', args);
_this.trigger('beforeOpen', args, function (observedArgs) {
args = observedArgs;
});
},
beforeClose: function (args) {
_this.trigger('beforeClose', args);
_this.trigger('beforeClose', args, function (observedArgs) {
args = observedArgs;
});
},

@@ -1204,54 +1214,27 @@ open: function (args) {

try {
var args_1;
var args = void 0;
var timeDiff = timestamp - prevTime;
var stepTime = this.duration * step / 100;
var timeDiffBuffer = timeDiff ? (timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime) : 0;
this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer;
prevTime = timestamp - timeDiffBuffer;
percent = percent + (timeDiff - timeDiffBuffer) / this.duration * 100;
var timeDiffBuffer_1 = timeDiff ? (timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime) : 0;
this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer_1;
prevTime = timestamp - timeDiffBuffer_1;
percent = percent + (timeDiff - timeDiffBuffer_1) / this.duration * 100;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args_1 = { percent: prevPercent, currentDuration: progressTime, step: step };
args = { percent: prevPercent, currentDuration: progressTime, step: step };
this.eIsVertical = isVertical;
if (percent === 0) {
this.trigger('begin', args_1);
this.trigger('begin', args, function (observedArgs) {
_this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
});
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args_1);
this.trigger('end', args, function (observedArgs) {
_this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
});
}
else {
this.trigger('progress', args_1);
}
if (percent !== args_1.percent && args_1.percent !== prevPercent) {
percent = args_1.percent;
}
this.percent = percent;
this.step = args_1.step;
if ((progressTime - prevProgressTime) % (this.duration * args_1.step / 100) === 0 || percent === 100) {
this.timerId = requestAnimationFrame(function () {
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
}
_this.element.setAttribute('aria-valuenow', percent.toString());
this.trigger('progress', args, function (observedArgs) {
_this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
this.interval = window.setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args_1.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
this.interval = window.setTimeout(function () {
_this.progressTime = _this.percent = 0;
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
}
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
}

@@ -1263,2 +1246,46 @@ catch (e) {

};
ProgressButton.prototype.successCallback = function (args, perc, pPerc, prgTim, pPrgTim, timDif, pTim) {
var _this = this;
var percent = perc;
var prevPercent = pPerc;
var timeDiffBuffer = timDif;
var progressTime = prgTim;
var prevProgressTime = pPrgTim;
var prevTime = pTim;
var isVertical = this.eIsVertical;
if (percent !== args.percent && args.percent !== prevPercent) {
percent = args.percent;
}
this.percent = percent;
this.step = args.step;
if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
this.timerId = requestAnimationFrame(function () {
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
}
_this.element.setAttribute('aria-valuenow', percent.toString());
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
this.interval = window.setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
this.interval = window.setTimeout(function () {
_this.progressTime = _this.percent = 0;
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
}
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
};
ProgressButton.prototype.startContAnimate = function () {

@@ -1265,0 +1292,0 @@ var _this = this;

/*!
* filename: ej2-splitbuttons.min.js
* version : 17.1.51
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. 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.splitbuttons=function(e,t,s,n){"use strict";function i(e,s){for(var n=t.extend({},e),i=0,o=Object.keys(n);i<o.length;i++){var r=o[i];s.indexOf(r)<0&&t.deleteObject(n,r)}return n}function o(e,n,i){void 0===n&&(n={});var o,r,a,p;t.isNullOrUndefined(i)&&(i=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;n.buttons=n.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=n.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=i("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),n.cssClass&&p&&!p.cssClass&&(p.cssClass=n.cssClass),new s.Button(p||{},r));return l}var r=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),a=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},p=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return r(s,e),a([t.Property("")],s.prototype,"iconCss",void 0),a([t.Property("")],s.prototype,"id",void 0),a([t.Property(!1)],s.prototype,"separator",void 0),a([t.Property("")],s.prototype,"text",void 0),a([t.Property("")],s.prototype,"url",void 0),s}(t.ChildProperty),l=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),c=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},h={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},d=function(e){function o(t,s){return e.call(this,t,s)||this}return l(o,e),o.prototype.preRender=function(){},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},o.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},o.prototype.createPopup=function(){var e,s=this.createElement("div",{className:h.POPUP,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new n.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e["aria-owns"]=this.getPopUpElement().id,e.type="button",e)),this.cssClass&&t.addClass([s],this.cssClass.split(" "))},o.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},o.prototype.createItems=function(e){for(var s,n,i,o,r=this.hasIcon(e,"iconCss"),a=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}}),p=0;p<e.length;p++)n=e[p],i=this.createElement("li",{innerHTML:n.url?"":n.text,className:n.separator?h.ITEM+" "+h.SEPARATOR:h.ITEM,attrs:{role:"menuItem",tabindex:"-1"},id:n.id?n.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),n.iconCss?(s=this.createElement("span",{className:h.ICON+" "+n.iconCss}),i.insertBefore(s,i.childNodes[0])):r&&!n.separator&&i.classList.add("e-blank-icon"),n.url&&i.appendChild(this.createAnchor(n)),o={item:n,element:i},this.trigger("beforeItemRender",o),a.appendChild(i);return a},o.prototype.hasIcon=function(e,t){for(var s=0,n=e.length;s<n;s++)if(e[s][t])return!0;return!1},o.prototype.createAnchor=function(e){return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:e.text,attrs:{href:e.url}})},o.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.createPopup(),this.setActiveElem([this.element])},o.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(h.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},o.prototype.setActiveElem=function(e){this.activeElem=e},o.prototype.getModuleName=function(){return"dropdown-btn"},o.prototype.canOpen=function(){return this.getPopUpElement().classList.contains("e-popup-close")},o.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var n;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(n=this.cssClass.split(" ")),this.button.destroy(),n&&t.removeClass([this.element],n),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.dropDown.destroy();var i=document.getElementById(this.getPopUpElement().id);i&&(t.removeClass([i],["e-popup-open","e-popup-close"]),t.detach(i)),this.disabled||this.unWireEvents()}},o.prototype.getPopUpElement=function(){return this.dropDown.element},o.prototype.getULElement=function(){return this.getPopUpElement().children[0]},o.prototype.wireEvents=function(){var e=this.getPopUpElement();this.delegateMousedownHandler=this.mousedownHandler.bind(this),t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.rippleFn=t.rippleEffect(e,{selector:"."+h.ITEM})},o.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(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)}},o.prototype.upDownKeyHandler=function(e){if(!this.target||38!==e.keyCode&&40!==e.keyCode){e.preventDefault();var s=this.getULElement(),n=40===e.keyCode?0:s.childElementCount-1,i=n,o=null;this.removeCustomSelection();for(var r=0,a=s.children.length;r<a;r++)s.children[r].classList.contains(h.FOCUS)&&(i=r,(o=s.children[r]).classList.remove(h.FOCUS),40===e.keyCode?i++:i--,i===(40===e.keyCode?s.childElementCount:-1)&&(i=n));o=s.children[i],-1!==(i=this.isValidLI(o,i,e.keyCode))&&(t.addClass([s.children[i]],h.FOCUS),s.children[i].focus())}},o.prototype.removeCustomSelection=function(){var e=this.getULElement().querySelector(".e-selected");e&&e.classList.remove("e-selected")},o.prototype.isValidLI=function(e,t,s,n){if(void 0===n&&(n=0),(e.classList.contains(h.SEPARATOR)||e.classList.contains(h.DISABLED))&&(t===(40===s?this.items.length-1:0)?t=40===s?0:this.items.length-1:40===s?t++:t--),(e=this.getULElement().children[t]).classList.contains(h.SEPARATOR)||e.classList.contains(h.DISABLED)){if(++n===this.items.length)return t=-1;t=this.isValidLI(e,t,s,n)}return t},o.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e))},o.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},o.prototype.mousedownHandler=function(e){var s=e.target;this.canOpen()||t.closest(s,"#"+this.getPopUpElement().id)||t.closest(s,"#"+this.element.id)||this.closePopup(e)},o.prototype.clickHandler=function(e){var s=e.target,n=this.canOpen();if(t.closest(s,"#"+this.element.id))n?this.openPopUp(e):this.closePopup(e,this.activeElem[0]);else if(t.closest(s,"#"+this.getPopUpElement().id)){var i=void 0,o=void 0,r=void 0,a=this.getLI(s);a&&(o=Array.prototype.indexOf.call(this.getULElement().children,a),(r=this.items[o])&&(i={element:a,item:r},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},o.prototype.openPopUp=function(e){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var s=this.getULElement(),n={element:s,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",n),!n.cancel){this.dropDown.show(null,this.element),t.addClass([this.element],"e-active"),this.element.setAttribute("aria-expanded","true"),s.focus();var i={element:s,items:this.items};this.trigger("open",i)}},o.prototype.closePopup=function(e,s){void 0===e&&(e=null);var n=this.getULElement(),i={element:n,items:this.items,event:e,cancel:!1};if(this.trigger("beforeClose",i),!i.cancel){this.removeCustomSelection(),this.dropDown.hide(),t.removeClass(this.activeElem,"e-active"),this.element.setAttribute("aria-expanded","false"),s&&s.focus();var o={element:n,items:this.items};this.trigger("close",o),!this.target&&n&&t.detach(n)}},o.prototype.unWireEvents=function(){t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.rippleFn()},o.prototype.onPropertyChanged=function(e,s){var n=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i(e,n)),this.dropDown.setProperties(i(e,["enableRtl"]));for(var o=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"disabled":e.disabled?(this.unWireEvents(),this.canOpen()||this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(h.VERTICAL)>-1){var p=this.element.querySelector("span.e-caret");t.classList(p,["e-icon-bottom"],["e-icon-right"])}s.cssClass&&t.removeClass([o],s.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.split(" "));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.dropDown.refresh(),o.classList.contains("e-popup-open")&&t.classList(o,["e-popup-close"],["e-popup-open"])}},o.prototype.focusIn=function(){this.element.focus()},c([t.Property("")],o.prototype,"content",void 0),c([t.Property("")],o.prototype,"cssClass",void 0),c([t.Property(!1)],o.prototype,"disabled",void 0),c([t.Property("")],o.prototype,"iconCss",void 0),c([t.Property("Left")],o.prototype,"iconPosition",void 0),c([t.Collection([],p)],o.prototype,"items",void 0),c([t.Property("")],o.prototype,"target",void 0),c([t.Event()],o.prototype,"beforeItemRender",void 0),c([t.Event()],o.prototype,"beforeOpen",void 0),c([t.Event()],o.prototype,"beforeClose",void 0),c([t.Event()],o.prototype,"close",void 0),c([t.Event()],o.prototype,"open",void 0),c([t.Event()],o.prototype,"select",void 0),c([t.Event()],o.prototype,"created",void 0),o=c([t.NotifyPropertyChanges],o)}(t.Component),u=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),m=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},y="e-rtl",f="EJS-SPLITBUTTON",v=function(e){function n(t,s){return e.call(this,t,s)||this}return u(n,e),n.prototype.preRender=function(){var e=this.element;if(e.tagName===f){for(var s=t.getValue("ej2_instances",e),n=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(f,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)n.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(i,e),t.detach(e),e=n,i.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=i,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.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents()},n.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.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(y),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" "))},n.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},n.prototype.createSecondaryButton=function(){var e=this,s=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(s);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)},beforeClose:function(t){e.trigger("beforeClose",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 d(n),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(s),this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.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,{"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 s=this,n=[y],i=document.getElementById(this.element.id);this.cssClass&&(n=n.concat(this.cssClass.split(" "))),i&&i.parentElement===this.wrapper&&(this.wrapper.tagName===f?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],n),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents()),this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},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,s){var n=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i(e,n)),n=["items","beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl"],this.secondaryBtnObj.setProperties(i(e,n));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],y):t.removeClass([this.wrapper],y)}},n.prototype.focusIn=function(){this.element.focus()},m([t.Property("")],n.prototype,"content",void 0),m([t.Property("")],n.prototype,"cssClass",void 0),m([t.Property(!1)],n.prototype,"disabled",void 0),m([t.Property("")],n.prototype,"iconCss",void 0),m([t.Property("Left")],n.prototype,"iconPosition",void 0),m([t.Collection([],p)],n.prototype,"items",void 0),m([t.Property("")],n.prototype,"target",void 0),m([t.Event()],n.prototype,"beforeItemRender",void 0),m([t.Event()],n.prototype,"beforeOpen",void 0),m([t.Event()],n.prototype,"beforeClose",void 0),m([t.Event()],n.prototype,"click",void 0),m([t.Event()],n.prototype,"close",void 0),m([t.Event()],n.prototype,"open",void 0),m([t.Event()],n.prototype,"select",void 0),m([t.Event()],n.prototype,"created",void 0),n=m([t.NotifyPropertyChanges],n)}(d),g=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),b=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},C="e-btn-content",P=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return g(s,e),b([t.Property(null)],s.prototype,"template",void 0),b([t.Property(16)],s.prototype,"width",void 0),b([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),E=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return g(s,e),b([t.Property(400)],s.prototype,"duration",void 0),b([t.Property("None")],s.prototype,"effect",void 0),b([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),w=function(e){function s(t,s){var n=e.call(this,t,s)||this;return n.step=1,n}return g(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,n=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(n=n.concat(this.cssClass.split(" "))),t.removeClass([this.element],n),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),n.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(C)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e=this.element.innerHTML;this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:C,innerHTML:e}))},s.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,i=s.contains("e-vertical");s.add("e-progress-active"),s.contains("e-hide-spinner")||n.showSpinner(this.element),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,i),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,n,i,o,r,a){var p=this;try{var l,c=e-s,h=this.duration*o/100,d=c?c<h?c-h:c%h:0;this.progressTime=t=t+c-d,s=e-d,n+=(c-d)/this.duration*100,l={percent:i=(t-r)%h==0||100===n?n:i,currentDuration:t,step:o},0===n?this.trigger("begin",l):100===n||t===this.duration?this.trigger("end",l):this.trigger("progress",l),n!==l.percent&&l.percent!==i&&(n=l.percent),this.percent=n,this.step=l.step,(t-r)%(this.duration*l.step/100)!=0&&100!==n||(this.timerId=requestAnimationFrame(function(){p.enableProgress&&(p.getProgress().style[a?"height":"width"]=n+"%"),p.element.setAttribute("aria-valuenow",n.toString())}),i=n,r=t),this.isPaused||(t<this.duration&&n<100?this.interval=window.setTimeout(function(){p.startAnimate(Date.now(),t,s,n,i,l.step,r,a)},this.duration/100-d):this.interval=window.setTimeout(function(){p.progressTime=p.percent=0,p.enableProgress&&(p.getProgress().style[a?"height":"width"]="0%"),p.element.setAttribute("aria-valuenow","0"),p.hideSpin()},100))}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(C)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var s,n=this.percent;n<100;n++)n+=10,this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?n+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin(),s={step:this.step,currentDuration:this.progressTime,percent:100},clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(C)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(C)[0];if(this.element.classList.contains("e-hide-spinner")||n.hideSpinner(this.element),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(C)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var i=this.element;e.prototype.onPropertyChanged.call(this,s,n);for(var o=0,r=Object.keys(s);o<r.length;o++)switch(r[o]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),i.setAttribute("aria-label",i.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(i.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(i.removeChild(this.getSpinner()),this.createSpinner())}},s.prototype.focusIn=function(){this.element.focus()},b([t.Property(!1)],s.prototype,"enableProgress",void 0),b([t.Property(2e3)],s.prototype,"duration",void 0),b([t.Property("Left")],s.prototype,"iconPosition",void 0),b([t.Property("")],s.prototype,"iconCss",void 0),b([t.Property(!1)],s.prototype,"disabled",void 0),b([t.Property(!1)],s.prototype,"isPrimary",void 0),b([t.Property("")],s.prototype,"cssClass",void 0),b([t.Property("")],s.prototype,"content",void 0),b([t.Property(!1)],s.prototype,"isToggle",void 0),b([t.Complex({},P)],s.prototype,"spinSettings",void 0),b([t.Complex({},E)],s.prototype,"animationSettings",void 0),b([t.Event()],s.prototype,"created",void 0),b([t.Event()],s.prototype,"begin",void 0),b([t.Event()],s.prototype,"progress",void 0),b([t.Event()],s.prototype,"end",void 0),b([t.Event()],s.prototype,"fail",void 0),s=b([t.NotifyPropertyChanges],s)}(s.Button);return e.getModel=i,e.Item=p,e.DropDownButton=d,e.SplitButton=v,e.createButtonGroup=o,e.SpinSettings=P,e.AnimationSettings=E,e.ProgressButton=w,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
this.ej=this.ej||{},this.ej.splitbuttons=function(e,t,s,n){"use strict";function i(e,s){for(var n=t.extend({},e),i=0,o=Object.keys(n);i<o.length;i++){var r=o[i];s.indexOf(r)<0&&t.deleteObject(n,r)}return n}function o(e,n,i){void 0===n&&(n={});var o,r,a,p;t.isNullOrUndefined(i)&&(i=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;n.buttons=n.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=n.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=i("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),n.cssClass&&p&&!p.cssClass&&(p.cssClass=n.cssClass),new s.Button(p||{},r));return l}var r=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),a=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},p=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return r(s,e),a([t.Property("")],s.prototype,"iconCss",void 0),a([t.Property("")],s.prototype,"id",void 0),a([t.Property(!1)],s.prototype,"separator",void 0),a([t.Property("")],s.prototype,"text",void 0),a([t.Property("")],s.prototype,"url",void 0),s}(t.ChildProperty),l=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),c=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},h={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},d=function(e){function o(t,s){return e.call(this,t,s)||this}return l(o,e),o.prototype.preRender=function(){},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},o.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},o.prototype.createPopup=function(){var e,s=this.createElement("div",{className:h.POPUP,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new n.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e["aria-owns"]=this.getPopUpElement().id,e.type="button",e)),this.cssClass&&t.addClass([s],this.cssClass.split(" "))},o.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},o.prototype.createItems=function(e){for(var s,n,i,o,r=this.hasIcon(e,"iconCss"),a=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}}),p=0;p<e.length;p++)n=e[p],i=this.createElement("li",{innerHTML:n.url?"":n.text,className:n.separator?h.ITEM+" "+h.SEPARATOR:h.ITEM,attrs:{role:"menuItem",tabindex:"-1"},id:n.id?n.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),n.iconCss?(s=this.createElement("span",{className:h.ICON+" "+n.iconCss}),i.insertBefore(s,i.childNodes[0])):r&&!n.separator&&i.classList.add("e-blank-icon"),n.url&&i.appendChild(this.createAnchor(n)),o={item:n,element:i},this.trigger("beforeItemRender",o),a.appendChild(i);return a},o.prototype.hasIcon=function(e,t){for(var s=0,n=e.length;s<n;s++)if(e[s][t])return!0;return!1},o.prototype.createAnchor=function(e){return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:e.text,attrs:{href:e.url}})},o.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.createPopup(),this.setActiveElem([this.element])},o.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(h.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},o.prototype.setActiveElem=function(e){this.activeElem=e},o.prototype.getModuleName=function(){return"dropdown-btn"},o.prototype.canOpen=function(){return this.getPopUpElement().classList.contains("e-popup-close")},o.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var n;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(n=this.cssClass.split(" ")),this.button.destroy(),n&&t.removeClass([this.element],n),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.dropDown.destroy();var i=document.getElementById(this.getPopUpElement().id);i&&(t.removeClass([i],["e-popup-open","e-popup-close"]),t.detach(i)),this.disabled||this.unWireEvents()}},o.prototype.getPopUpElement=function(){return this.dropDown.element},o.prototype.getULElement=function(){return this.getPopUpElement().children[0]},o.prototype.wireEvents=function(){var e=this.getPopUpElement();this.delegateMousedownHandler=this.mousedownHandler.bind(this),t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.rippleFn=t.rippleEffect(e,{selector:"."+h.ITEM})},o.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(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)}},o.prototype.upDownKeyHandler=function(e){if(!this.target||38!==e.keyCode&&40!==e.keyCode){e.preventDefault();var s=this.getULElement(),n=40===e.keyCode?0:s.childElementCount-1,i=n,o=null;this.removeCustomSelection();for(var r=0,a=s.children.length;r<a;r++)s.children[r].classList.contains(h.FOCUS)&&(i=r,(o=s.children[r]).classList.remove(h.FOCUS),40===e.keyCode?i++:i--,i===(40===e.keyCode?s.childElementCount:-1)&&(i=n));o=s.children[i],-1!==(i=this.isValidLI(o,i,e.keyCode))&&(t.addClass([s.children[i]],h.FOCUS),s.children[i].focus())}},o.prototype.removeCustomSelection=function(){var e=this.getULElement().querySelector(".e-selected");e&&e.classList.remove("e-selected")},o.prototype.isValidLI=function(e,t,s,n){if(void 0===n&&(n=0),(e.classList.contains(h.SEPARATOR)||e.classList.contains(h.DISABLED))&&(t===(40===s?this.items.length-1:0)?t=40===s?0:this.items.length-1:40===s?t++:t--),(e=this.getULElement().children[t]).classList.contains(h.SEPARATOR)||e.classList.contains(h.DISABLED)){if(++n===this.items.length)return t=-1;t=this.isValidLI(e,t,s,n)}return t},o.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e))},o.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},o.prototype.mousedownHandler=function(e){var s=e.target;this.canOpen()||t.closest(s,"#"+this.getPopUpElement().id)||t.closest(s,"#"+this.element.id)||this.closePopup(e)},o.prototype.clickHandler=function(e){var s=e.target,n=this.canOpen();if(t.closest(s,"#"+this.element.id))n?this.openPopUp(e):this.closePopup(e,this.activeElem[0]);else if(t.closest(s,"#"+this.getPopUpElement().id)){var i=void 0,o=void 0,r=void 0,a=this.getLI(s);a&&(o=Array.prototype.indexOf.call(this.getULElement().children,a),(r=this.items[o])&&(i={element:a,item:r},this.trigger("select",i)),this.closePopup(e,this.activeElem[0]))}},o.prototype.openPopUp=function(e){var s=this;void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var n={element:this.getULElement(),items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",n,function(e){if(!e.cancel){var n=s.getULElement();s.dropDown.show(null,s.element),t.addClass([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),n.focus();var i={element:n,items:s.items};s.trigger("open",i)}})},o.prototype.closePopup=function(e,s){var n=this;void 0===e&&(e=null);var i={element:this.getULElement(),items:this.items,event:e,cancel:!1};this.trigger("beforeClose",i,function(e){if(!e.cancel){var i=n.getULElement();n.removeCustomSelection(),n.dropDown.hide(),t.removeClass(n.activeElem,"e-active"),n.element.setAttribute("aria-expanded","false"),s&&s.focus();var o={element:i,items:n.items};n.trigger("close",o),!n.target&&i&&t.detach(i)}})},o.prototype.unWireEvents=function(){t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.rippleFn()},o.prototype.onPropertyChanged=function(e,s){var n=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i(e,n)),this.dropDown.setProperties(i(e,["enableRtl"]));for(var o=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"disabled":e.disabled?(this.unWireEvents(),this.canOpen()||this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(h.VERTICAL)>-1){var p=this.element.querySelector("span.e-caret");t.classList(p,["e-icon-bottom"],["e-icon-right"])}s.cssClass&&t.removeClass([o],s.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.split(" "));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.dropDown.refresh(),o.classList.contains("e-popup-open")&&t.classList(o,["e-popup-close"],["e-popup-open"])}},o.prototype.focusIn=function(){this.element.focus()},c([t.Property("")],o.prototype,"content",void 0),c([t.Property("")],o.prototype,"cssClass",void 0),c([t.Property(!1)],o.prototype,"disabled",void 0),c([t.Property("")],o.prototype,"iconCss",void 0),c([t.Property("Left")],o.prototype,"iconPosition",void 0),c([t.Collection([],p)],o.prototype,"items",void 0),c([t.Property("")],o.prototype,"target",void 0),c([t.Event()],o.prototype,"beforeItemRender",void 0),c([t.Event()],o.prototype,"beforeOpen",void 0),c([t.Event()],o.prototype,"beforeClose",void 0),c([t.Event()],o.prototype,"close",void 0),c([t.Event()],o.prototype,"open",void 0),c([t.Event()],o.prototype,"select",void 0),c([t.Event()],o.prototype,"created",void 0),o=c([t.NotifyPropertyChanges],o)}(t.Component),u=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),m=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},y="e-rtl",f="EJS-SPLITBUTTON",v=function(e){function n(t,s){return e.call(this,t,s)||this}return u(n,e),n.prototype.preRender=function(){var e=this.element;if(e.tagName===f){for(var s=t.getValue("ej2_instances",e),n=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(f,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)n.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(i,e),t.detach(e),e=n,i.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=i,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.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents()},n.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.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(y),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" "))},n.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},n.prototype.createSecondaryButton=function(){var e=this,s=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(s);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,function(e){t=e})},beforeClose:function(t){e.trigger("beforeClose",t,function(e){t=e})},open:function(t){e.trigger("open",t)},close:function(t){e.trigger("close",t)},select:function(t){e.trigger("select",t)}};this.secondaryBtnObj=new d(n),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(s),this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.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,{"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 s=this,n=[y],i=document.getElementById(this.element.id);this.cssClass&&(n=n.concat(this.cssClass.split(" "))),i&&i.parentElement===this.wrapper&&(this.wrapper.tagName===f?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],n),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents()),this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},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,s){var n=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i(e,n)),n=["items","beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl"],this.secondaryBtnObj.setProperties(i(e,n));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],y):t.removeClass([this.wrapper],y)}},n.prototype.focusIn=function(){this.element.focus()},m([t.Property("")],n.prototype,"content",void 0),m([t.Property("")],n.prototype,"cssClass",void 0),m([t.Property(!1)],n.prototype,"disabled",void 0),m([t.Property("")],n.prototype,"iconCss",void 0),m([t.Property("Left")],n.prototype,"iconPosition",void 0),m([t.Collection([],p)],n.prototype,"items",void 0),m([t.Property("")],n.prototype,"target",void 0),m([t.Event()],n.prototype,"beforeItemRender",void 0),m([t.Event()],n.prototype,"beforeOpen",void 0),m([t.Event()],n.prototype,"beforeClose",void 0),m([t.Event()],n.prototype,"click",void 0),m([t.Event()],n.prototype,"close",void 0),m([t.Event()],n.prototype,"open",void 0),m([t.Event()],n.prototype,"select",void 0),m([t.Event()],n.prototype,"created",void 0),n=m([t.NotifyPropertyChanges],n)}(d),g=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),b=function(e,t,s,n){var i,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},C="e-btn-content",P=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return g(s,e),b([t.Property(null)],s.prototype,"template",void 0),b([t.Property(16)],s.prototype,"width",void 0),b([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),E=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return g(s,e),b([t.Property(400)],s.prototype,"duration",void 0),b([t.Property("None")],s.prototype,"effect",void 0),b([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),w=function(e){function s(t,s){var n=e.call(this,t,s)||this;return n.step=1,n}return g(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,n=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(n=n.concat(this.cssClass.split(" "))),t.removeClass([this.element],n),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),n.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(C)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e=this.element.innerHTML;this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:C,innerHTML:e}))},s.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,i=s.contains("e-vertical");s.add("e-progress-active"),s.contains("e-hide-spinner")||n.showSpinner(this.element),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,i),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,n,i,o,r,a){var p=this;try{var l=void 0,c=e-s,h=this.duration*o/100,d=c?c<h?c-h:c%h:0;this.progressTime=t=t+c-d,s=e-d,n+=(c-d)/this.duration*100,l={percent:i=(t-r)%h==0||100===n?n:i,currentDuration:t,step:o},this.eIsVertical=a,0===n?this.trigger("begin",l,function(e){p.successCallback(e,n,i,t,r,d,s)}):100===n||t===this.duration?this.trigger("end",l,function(e){p.successCallback(e,n,i,t,r,d,s)}):this.trigger("progress",l,function(e){p.successCallback(e,n,i,t,r,d,s)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.successCallback=function(e,t,s,n,i,o,r){var a=this,p=t,l=s,c=o,h=n,d=i,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(C)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var s,n=this.percent;n<100;n++)n+=10,this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?n+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin(),s={step:this.step,currentDuration:this.progressTime,percent:100},clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(C)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(C)[0];if(this.element.classList.contains("e-hide-spinner")||n.hideSpinner(this.element),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(C)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var i=this.element;e.prototype.onPropertyChanged.call(this,s,n);for(var o=0,r=Object.keys(s);o<r.length;o++)switch(r[o]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),i.setAttribute("aria-label",i.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(i.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(i.removeChild(this.getSpinner()),this.createSpinner())}},s.prototype.focusIn=function(){this.element.focus()},b([t.Property(!1)],s.prototype,"enableProgress",void 0),b([t.Property(2e3)],s.prototype,"duration",void 0),b([t.Property("Left")],s.prototype,"iconPosition",void 0),b([t.Property("")],s.prototype,"iconCss",void 0),b([t.Property(!1)],s.prototype,"disabled",void 0),b([t.Property(!1)],s.prototype,"isPrimary",void 0),b([t.Property("")],s.prototype,"cssClass",void 0),b([t.Property("")],s.prototype,"content",void 0),b([t.Property(!1)],s.prototype,"isToggle",void 0),b([t.Complex({},P)],s.prototype,"spinSettings",void 0),b([t.Complex({},E)],s.prototype,"animationSettings",void 0),b([t.Event()],s.prototype,"created",void 0),b([t.Event()],s.prototype,"begin",void 0),b([t.Event()],s.prototype,"progress",void 0),b([t.Event()],s.prototype,"end",void 0),b([t.Event()],s.prototype,"fail",void 0),s=b([t.NotifyPropertyChanges],s)}(s.Button);return e.getModel=i,e.Item=p,e.DropDownButton=d,e.SplitButton=v,e.createButtonGroup=o,e.SpinSettings=P,e.AnimationSettings=E,e.ProgressButton=w,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
//# sourceMappingURL=ej2-splitbuttons.min.js.map
/*!
* filename: index.d.ts
* version : 17.1.51
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

{
"_from": "@syncfusion/ej2-splitbuttons@*",
"_id": "@syncfusion/ej2-splitbuttons@17.1.50",
"_id": "@syncfusion/ej2-splitbuttons@17.1.1",
"_inBundle": false,
"_integrity": "sha512-NOKiXzAXoJqMbdgzDm0p7EUX7+DWgeSzKE4FRCEvkQVEQSKqOeGdEq2X0rftDEVHGlOH0gklATmtb7qmuSvHwg==",
"_integrity": "sha512-rv2EsdSm0zyCsVqvrMSYvVOYQQUyWEiRLwmySzcLKcpRFvyyyXg8lK9CY0lN0wxE6WfW/i/4mvc2ryjpo7ggfA==",
"_location": "/@syncfusion/ej2-splitbuttons",

@@ -32,4 +32,4 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-17.1.50.tgz",
"_shasum": "a29695c2b3f4059217b38f1b48a187dd8e352c23",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-17.1.1.tgz",
"_shasum": "a4d4befcd5e75cb75827b2361ea250f304910e25",
"_spec": "@syncfusion/ej2-splitbuttons@*",

@@ -45,4 +45,4 @@ "_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.1.49",
"@syncfusion/ej2-popups": "~17.1.50"
"@syncfusion/ej2-base": "~17.2.28-beta",
"@syncfusion/ej2-popups": "~17.2.28-beta"
},

@@ -89,4 +89,4 @@ "deprecated": false,

},
"version": "17.1.51",
"version": "17.2.28-beta",
"sideEffects": false
}

@@ -58,2 +58,3 @@ import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler, EmitType } from '@syncfusion/ej2-base';import { addClass, INotifyPropertyChanged, getUniqueID, rippleEffect } from '@syncfusion/ej2-base';import { attributes, Component, closest, select, KeyboardEventArgs } from '@syncfusion/ej2-base';import { classList, remove, 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';

     * @event
* @blazorProperty 'OnItemRender'
     */

@@ -65,2 +66,3 @@ beforeItemRender?: EmitType<MenuEventArgs>;

     * @event
* @blazorProperty 'OnOpen'
     */

@@ -72,2 +74,3 @@ beforeOpen?: EmitType<BeforeOpenCloseMenuEventArgs>;

     * @event
* @blazorProperty 'OnClose'
     */

@@ -79,2 +82,3 @@ beforeClose?: EmitType<BeforeOpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'Closed'
*/

@@ -86,2 +90,3 @@ close?: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'Opened'
*/

@@ -93,2 +98,3 @@ open?: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'ItemSelected'
*/

@@ -100,2 +106,3 @@ select?: EmitType<MenuEventArgs>;

* @event
* @blazorProperty 'Created'
*/

@@ -102,0 +109,0 @@ created?: EmitType<Event>;

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

* @event
* @blazorProperty 'OnItemRender'
*/

@@ -77,2 +78,3 @@ beforeItemRender: EmitType<MenuEventArgs>;

* @event
* @blazorProperty 'OnOpen'
*/

@@ -83,2 +85,3 @@ beforeOpen: EmitType<BeforeOpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'OnClose'
*/

@@ -89,2 +92,3 @@ beforeClose: EmitType<BeforeOpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'Closed'
*/

@@ -95,2 +99,3 @@ close: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'Opened'
*/

@@ -101,2 +106,3 @@ open: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'ItemSelected'
*/

@@ -107,2 +113,3 @@ select: EmitType<MenuEventArgs>;

* @event
* @blazorProperty 'Created'
*/

@@ -109,0 +116,0 @@ created: EmitType<Event>;

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

DropDownButton.prototype.openPopUp = function (e) {
var _this = this;
if (e === void 0) { e = null; }

@@ -391,31 +392,36 @@ if (!this.target) {

var beforeOpenArgs = { element: ul, items: this.items, event: e, cancel: false };
this.trigger('beforeOpen', beforeOpenArgs);
if (!beforeOpenArgs.cancel) {
this.dropDown.show(null, this.element);
addClass([this.element], 'e-active');
this.element.setAttribute('aria-expanded', 'true');
ul.focus();
var openArgs = { element: ul, items: this.items };
this.trigger('open', openArgs);
}
this.trigger('beforeOpen', beforeOpenArgs, function (observedArgs) {
if (!observedArgs.cancel) {
var ul_1 = _this.getULElement();
_this.dropDown.show(null, _this.element);
addClass([_this.element], 'e-active');
_this.element.setAttribute('aria-expanded', 'true');
ul_1.focus();
var openArgs = { element: ul_1, items: _this.items };
_this.trigger('open', openArgs);
}
});
};
DropDownButton.prototype.closePopup = function (e, focusEle) {
var _this = this;
if (e === void 0) { e = null; }
var ul = this.getULElement();
var beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
this.trigger('beforeClose', beforeCloseArgs);
if (!beforeCloseArgs.cancel) {
this.removeCustomSelection();
this.dropDown.hide();
removeClass(this.activeElem, 'e-active');
this.element.setAttribute('aria-expanded', 'false');
if (focusEle) {
focusEle.focus();
this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
if (!observedArgs.cancel) {
var ul_2 = _this.getULElement();
_this.removeCustomSelection();
_this.dropDown.hide();
removeClass(_this.activeElem, 'e-active');
_this.element.setAttribute('aria-expanded', 'false');
if (focusEle) {
focusEle.focus();
}
var closeArgs = { element: ul_2, items: _this.items };
_this.trigger('close', closeArgs);
if (!_this.target && ul_2) {
detach(ul_2);
}
}
var closeArgs = { element: ul, items: this.items };
this.trigger('close', closeArgs);
if (!this.target && ul) {
detach(ul);
}
}
});
};

@@ -422,0 +428,0 @@ DropDownButton.prototype.unWireEvents = function () {

@@ -141,2 +141,3 @@ import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { EventHandler, Property, INotifyPropertyChanged, NotifyPropertyChanges, Animation, Effect, attributes } from '@syncfusion/ej2-base';import { EmitType, Event, BaseEventArgs, remove, removeClass, Complex, ChildProperty } from '@syncfusion/ej2-base';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';

* @event
* @blazorProperty 'Created'
*/

@@ -148,2 +149,3 @@ created?: EmitType<Event>;

* @event
* @blazorProperty 'OnBegin'
*/

@@ -155,2 +157,3 @@ begin?: EmitType<ProgressEventArgs>;

* @event
* @blazorProperty 'Progressing'
*/

@@ -162,2 +165,3 @@ progress?: EmitType<ProgressEventArgs>;

* @event
* @blazorProperty 'OnEnd'
*/

@@ -169,2 +173,3 @@ end?: EmitType<ProgressEventArgs>;

* @event
* @blazorProperty 'OnFailure'
*/

@@ -171,0 +176,0 @@ fail?: EmitType<Event>;

@@ -68,2 +68,3 @@ import { Button, IconPosition } from '@syncfusion/ej2-buttons';

private interval;
private eIsVertical;
/**

@@ -131,2 +132,3 @@ * Enables or disables the background filler UI in the progress button.

* @event
* @blazorProperty 'Created'
*/

@@ -137,2 +139,3 @@ created: EmitType<Event>;

* @event
* @blazorProperty 'OnBegin'
*/

@@ -143,2 +146,3 @@ begin: EmitType<ProgressEventArgs>;

* @event
* @blazorProperty 'Progressing'
*/

@@ -149,2 +153,3 @@ progress: EmitType<ProgressEventArgs>;

* @event
* @blazorProperty 'OnEnd'
*/

@@ -155,2 +160,3 @@ end: EmitType<ProgressEventArgs>;

* @event
* @blazorProperty 'OnFailure'
*/

@@ -208,2 +214,3 @@ fail: EmitType<Event>;

private startAnimate;
private successCallback;
private startContAnimate;

@@ -210,0 +217,0 @@ private finishProgress;

@@ -217,54 +217,27 @@ var __extends = (this && this.__extends) || (function () {

try {
var args_1;
var args = void 0;
var timeDiff = timestamp - prevTime;
var stepTime = this.duration * step / 100;
var timeDiffBuffer = timeDiff ? (timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime) : 0;
this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer;
prevTime = timestamp - timeDiffBuffer;
percent = percent + (timeDiff - timeDiffBuffer) / this.duration * 100;
var timeDiffBuffer_1 = timeDiff ? (timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime) : 0;
this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer_1;
prevTime = timestamp - timeDiffBuffer_1;
percent = percent + (timeDiff - timeDiffBuffer_1) / this.duration * 100;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args_1 = { percent: prevPercent, currentDuration: progressTime, step: step };
args = { percent: prevPercent, currentDuration: progressTime, step: step };
this.eIsVertical = isVertical;
if (percent === 0) {
this.trigger('begin', args_1);
this.trigger('begin', args, function (observedArgs) {
_this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
});
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args_1);
this.trigger('end', args, function (observedArgs) {
_this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
});
}
else {
this.trigger('progress', args_1);
}
if (percent !== args_1.percent && args_1.percent !== prevPercent) {
percent = args_1.percent;
}
this.percent = percent;
this.step = args_1.step;
if ((progressTime - prevProgressTime) % (this.duration * args_1.step / 100) === 0 || percent === 100) {
this.timerId = requestAnimationFrame(function () {
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
}
_this.element.setAttribute('aria-valuenow', percent.toString());
this.trigger('progress', args, function (observedArgs) {
_this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
this.interval = window.setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args_1.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
this.interval = window.setTimeout(function () {
_this.progressTime = _this.percent = 0;
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
}
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
}

@@ -276,2 +249,46 @@ catch (e) {

};
ProgressButton.prototype.successCallback = function (args, perc, pPerc, prgTim, pPrgTim, timDif, pTim) {
var _this = this;
var percent = perc;
var prevPercent = pPerc;
var timeDiffBuffer = timDif;
var progressTime = prgTim;
var prevProgressTime = pPrgTim;
var prevTime = pTim;
var isVertical = this.eIsVertical;
if (percent !== args.percent && args.percent !== prevPercent) {
percent = args.percent;
}
this.percent = percent;
this.step = args.step;
if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
this.timerId = requestAnimationFrame(function () {
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
}
_this.element.setAttribute('aria-valuenow', percent.toString());
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
this.interval = window.setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
this.interval = window.setTimeout(function () {
_this.progressTime = _this.percent = 0;
if (_this.enableProgress) {
_this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
}
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
};
ProgressButton.prototype.startContAnimate = function () {

@@ -278,0 +295,0 @@ var _this = this;

@@ -59,2 +59,3 @@ import { Event, EmitType, remove, addClass, removeClass, detach, getValue, setValue } from '@syncfusion/ej2-base';import { EventHandler, Collection, BaseEventArgs, NotifyPropertyChanges, INotifyPropertyChanged, Property } from '@syncfusion/ej2-base';import { attributes, getUniqueID, getInstance, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';import { MenuEventArgs, BeforeOpenCloseMenuEventArgs, OpenCloseMenuEventArgs } from './../common/common';import { getModel, SplitButtonIconPosition, Item } from './../common/common';import { DropDownButton } from '../drop-down-button/drop-down-button';import { ItemModel } from './../common/common-model';

     * @event
* @blazorProperty 'OnItemRender'
     */

@@ -66,2 +67,3 @@ beforeItemRender?: EmitType<MenuEventArgs>;

     * @event
* @blazorProperty 'OnOpen'
     */

@@ -73,2 +75,3 @@ beforeOpen?: EmitType<BeforeOpenCloseMenuEventArgs>;

     * @event
* @blazorProperty 'OnClose'
     */

@@ -80,2 +83,3 @@ beforeClose?: EmitType<BeforeOpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'OnClick'
*/

@@ -87,2 +91,3 @@ click?: EmitType<ClickEventArgs>;

* @event
* @blazorProperty 'Closed'
*/

@@ -94,2 +99,3 @@ close?: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'Opened'
*/

@@ -101,2 +107,3 @@ open?: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'ItemSelected'
*/

@@ -108,2 +115,3 @@ select?: EmitType<MenuEventArgs>;

* @event
* @blazorProperty 'Created'
*/

@@ -110,0 +118,0 @@ created?: EmitType<Event>;

@@ -69,2 +69,3 @@ /// <reference path="../drop-down-button/drop-down-button-model.d.ts" />

* @event
* @blazorProperty 'OnItemRender'
*/

@@ -75,2 +76,3 @@ beforeItemRender: EmitType<MenuEventArgs>;

* @event
* @blazorProperty 'OnOpen'
*/

@@ -81,2 +83,3 @@ beforeOpen: EmitType<BeforeOpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'OnClose'
*/

@@ -87,2 +90,3 @@ beforeClose: EmitType<BeforeOpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'OnClick'
*/

@@ -93,2 +97,3 @@ click: EmitType<ClickEventArgs>;

* @event
* @blazorProperty 'Closed'
*/

@@ -99,2 +104,3 @@ close: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'Opened'
*/

@@ -105,2 +111,3 @@ open: EmitType<OpenCloseMenuEventArgs>;

* @event
* @blazorProperty 'ItemSelected'
*/

@@ -111,2 +118,3 @@ select: EmitType<MenuEventArgs>;

* @event
* @blazorProperty 'Created'
*/

@@ -113,0 +121,0 @@ created: EmitType<Event>;

@@ -133,6 +133,10 @@ var __extends = (this && this.__extends) || (function () {

beforeOpen: function (args) {
_this.trigger('beforeOpen', args);
_this.trigger('beforeOpen', args, function (observedArgs) {
args = observedArgs;
});
},
beforeClose: function (args) {
_this.trigger('beforeClose', args);
_this.trigger('beforeClose', args, function (observedArgs) {
args = observedArgs;
});
},

@@ -139,0 +143,0 @@ open: function (args) {

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