Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-splitbuttons

Package Overview
Dependencies
Maintainers
2
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 16.3.17 to 16.3.21

4

CHANGELOG.md

@@ -5,5 +5,7 @@ # Changelog

## 16.3.17 (2018-09-12)
### ProgressButton
The progress button visualizes the progression of an operation to indicates the user that a process is happening in the background. The progress can be shown with graphics accompanied by a textual representation.
The progress button visualizes the progression of an operation to indicate the user that a process is happening in the background. The progress can be shown with graphics accompanied by a textual representation.

@@ -10,0 +12,0 @@ - **Types, Sizes, and Styles** - Provided with different types, sizes and predefined styles of progress button.

/*!
* filename: ej2-splitbuttons.umd.min.js
* version : 16.3.17
* version : 16.3.21
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

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

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),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=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])};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=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])};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-rtl",f="e-separator",v="e-vertical",g=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=this.createElement("div",{className:m,id:this.element.id+"-popup"});document.body.appendChild(e),this.dropDown=new s.Popup(e,{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,(n={},n.role="menu",n["aria-haspopup"]=this.items.length||this.target?"true":"false",n["aria-expanded"]="false",n["aria-owns"]=this.getPopUpElement().id,n.type="button",n)),this.cssClass&&t.addClass([e],this.cssClass.split(" "));var n},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:{tabindex:"0"}}),p=0;p<e.length;p++)s=e[p],i=this.createElement("li",{innerHTML:s.url?"":s.text,className:s.separator?u+" "+f: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(v)>-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;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),e.prototype.destroy.call(this),this.button.destroy(),["role","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){n.element.removeAttribute(e)}),t.removeClass([this.element],["e-btn"]),t.removeClass(this.activeElem,["e-active"]),this.dropDown.destroy();var s=document.getElementById(this.getPopUpElement().id);s&&(t.removeClass([s],["e-popup-open","e-popup-close"]),t.detach(s)),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(f)||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(f)||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){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var n=this.getULElement(),s={element:n,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",s),!s.cancel){this.dropDown.show(null,this.element),t.addClass([this.element],"e-active"),this.element.setAttribute("aria-expanded","true"),n.focus();var i={element:n,items:this.items};this.trigger("open",i)}},o.prototype.closePopup=function(e,n){void 0===e&&(e=null);var s=this.getULElement(),i={element:s,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"),n&&n.focus();var o={element:s,items:this.items};this.trigger("close",o),!this.target&&s&&t.detach(s)}},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"]));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(v)>-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"enableRtl":s.classList.toggle(y);break;case"target":this.target=e.target,t.detach(this.getULElement()),s.appendChild(this.getTargetElement()),this.dropDown.content=this.getTargetElement();break;case"items":this.dropDown.refresh(),s.classList.contains("e-popup-open")&&t.classList(s,["e-popup-close"],["e-popup-open"])}}},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),b=function(){var 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])};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)}}(),C=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},E="EJS-SPLITBUTTON",P=function(e){function s(t,n){return e.call(this,t,n)||this}return b(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===E){for(var n=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(E,{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)},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 g(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,{role:"listbox","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 e=this;this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy();var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===E?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],["e-"+this.getModuleName(),"e-rtl"]),["role","aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(t){e.element.removeAttribute(t)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())},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")}}},C([t.Property("")],s.prototype,"content",void 0),C([t.Property("")],s.prototype,"cssClass",void 0),C([t.Property(!1)],s.prototype,"disabled",void 0),C([t.Property("")],s.prototype,"iconCss",void 0),C([t.Property("Left")],s.prototype,"iconPosition",void 0),C([t.Collection([],a)],s.prototype,"items",void 0),C([t.Property("")],s.prototype,"target",void 0),C([t.Event()],s.prototype,"beforeItemRender",void 0),C([t.Event()],s.prototype,"beforeOpen",void 0),C([t.Event()],s.prototype,"beforeClose",void 0),C([t.Event()],s.prototype,"click",void 0),C([t.Event()],s.prototype,"close",void 0),C([t.Event()],s.prototype,"open",void 0),C([t.Event()],s.prototype,"select",void 0),C([t.Event()],s.prototype,"created",void 0),s=C([t.NotifyPropertyChanges],s)}(g),w=function(){var 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])};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)}}(),k=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},O="e-hide-spinner",B="e-progress",j="e-progress-active",H="e-btn-content",L=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(),this.trigger("created")},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.getModuleName=function(){return"progress-btn"},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",t.removeClass([this.element],[O,j,"e-round-corner","e-"+e.prototype.getModuleName.call(this)])},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.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(H)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},n.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:B}))},n.prototype.setContent=function(){var e=this.element.innerHTML;this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:H,innerHTML:e}))},n.prototype.clickHandler=function(){this.element.classList.contains(j)||this.startProgress()},n.prototype.startProgress=function(e,t){var n,i=this,o=this.element.classList,r=o.contains("e-vertical");o.add(j),o.contains(O)||(s.showSpinner(this.element),this.enableProgress||setTimeout(function(){i.hideSpin()},this.duration)),this.enableProgress&&(n=this.element.getElementsByClassName(B)[0],this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),n,e||0,0,this.step,0,r)),this.startContAnimate()},n.prototype.startAnimate=function(e,t,n,s,i,o,r,a,p){var l,c=this,h=e-n,d=this.duration*r/100,u=h?h<d?h-d:h%d:0;this.progressTime=t=t+h-u,n=e-u,i+=(h-u)/this.duration*100,l={percent:o=(t-a)%d==0||100===i?i:o,currentDuration:t,step:r},0===i?this.trigger("begin",l):100===i||t===this.duration?this.trigger("end",l):this.trigger("progress",l),i!==l.percent&&l.percent!==o&&(i=l.percent),this.percent=i,this.step=l.step,(t-a)%(this.duration*l.step/100)!=0&&100!==i||(this.timerId=requestAnimationFrame(function(){try{s.style[p?"height":"width"]=i+"%",c.element.setAttribute("aria-valuenow",i.toString())}catch(e){cancelAnimationFrame(c.timerId)}}),o=i,a=t),this.isPaused||(t<this.duration&&i<100?setTimeout(function(){c.startAnimate(Date.now(),t,n,s,i,o,l.step,a,p)},this.duration/100-u):setTimeout(function(){c.progressTime=c.percent=0,s.style[p?"height":"width"]="0%",c.element.setAttribute("aria-valuenow","0"),c.hideSpin()},100))},n.prototype.startContAnimate=function(){var e=this,n=this.element.getElementsByClassName(H)[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.setSpinnerSize=function(){var e=this.element.getElementsByClassName(H)[0],t=this.element.getElementsByClassName("e-spinner")[0];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(H)[0];if(this.element.classList.contains(O)||s.hideSpinner(this.element),this.element.classList.remove(j),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.element.getElementsByClassName("e-spinner")[0];e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},n.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(H)[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){e.prototype.onPropertyChanged.call(this,n,s);for(var i=0,o=Object.keys(n);i<o.length;i++){switch(o[i]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),this.element.setAttribute("aria-label",this.element.textContent+" progress");break;case"iconCss":s.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":n.enableProgress?this.createProgress():t.remove(this.element.getElementsByClassName(B)[0])}}},k([t.Property(!1)],n.prototype,"enableProgress",void 0),k([t.Property(2e3)],n.prototype,"duration",void 0),k([t.Property("Left")],n.prototype,"iconPosition",void 0),k([t.Property("")],n.prototype,"iconCss",void 0),k([t.Property(!1)],n.prototype,"disabled",void 0),k([t.Property(!1)],n.prototype,"isPrimary",void 0),k([t.Property("")],n.prototype,"cssClass",void 0),k([t.Property("")],n.prototype,"content",void 0),k([t.Property(!1)],n.prototype,"isToggle",void 0),k([t.Property({template:null,width:16,position:"Left"})],n.prototype,"spinSettings",void 0),k([t.Property({duration:400,effect:"None",easing:"ease"})],n.prototype,"animationSettings",void 0),k([t.Event()],n.prototype,"begin",void 0),k([t.Event()],n.prototype,"progress",void 0),k([t.Event()],n.prototype,"end",void 0),n=k([t.NotifyPropertyChanges],n)}(n.Button);e.getModel=i,e.Item=a,e.DropDownButton=g,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"]),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.ProgressButton=L,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=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])};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=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])};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-rtl",f="e-separator",v="e-vertical",g=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=this.createElement("div",{className:m,id:this.element.id+"-popup"});document.body.appendChild(e),this.dropDown=new s.Popup(e,{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,(n={},n.role="menu",n["aria-haspopup"]=this.items.length||this.target?"true":"false",n["aria-expanded"]="false",n["aria-owns"]=this.getPopUpElement().id,n.type="button",n)),this.cssClass&&t.addClass([e],this.cssClass.split(" "));var n},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:{tabindex:"0"}}),p=0;p<e.length;p++)s=e[p],i=this.createElement("li",{innerHTML:s.url?"":s.text,className:s.separator?u+" "+f: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(v)>-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;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),e.prototype.destroy.call(this),this.button.destroy(),["role","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){n.element.removeAttribute(e)}),t.removeClass([this.element],["e-btn"]),t.removeClass(this.activeElem,["e-active"]),this.dropDown.destroy();var s=document.getElementById(this.getPopUpElement().id);s&&(t.removeClass([s],["e-popup-open","e-popup-close"]),t.detach(s)),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(f)||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(f)||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){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var n=this.getULElement(),s={element:n,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",s),!s.cancel){this.dropDown.show(null,this.element),t.addClass([this.element],"e-active"),this.element.setAttribute("aria-expanded","true"),n.focus();var i={element:n,items:this.items};this.trigger("open",i)}},o.prototype.closePopup=function(e,n){void 0===e&&(e=null);var s=this.getULElement(),i={element:s,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"),n&&n.focus();var o={element:s,items:this.items};this.trigger("close",o),!this.target&&s&&t.detach(s)}},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"]));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(v)>-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"enableRtl":s.classList.toggle(y);break;case"target":this.target=e.target,t.detach(this.getULElement()),s.appendChild(this.getTargetElement()),this.dropDown.content=this.getTargetElement();break;case"items":this.dropDown.refresh(),s.classList.contains("e-popup-open")&&t.classList(s,["e-popup-close"],["e-popup-open"])}}},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),b=function(){var 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])};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)}}(),C=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},E="EJS-SPLITBUTTON",P=function(e){function s(t,n){return e.call(this,t,n)||this}return b(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===E){for(var n=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(E,{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)},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 g(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,{role:"listbox","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 e=this;this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy();var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===E?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],["e-"+this.getModuleName(),"e-rtl"]),["role","aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(t){e.element.removeAttribute(t)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())},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")}}},C([t.Property("")],s.prototype,"content",void 0),C([t.Property("")],s.prototype,"cssClass",void 0),C([t.Property(!1)],s.prototype,"disabled",void 0),C([t.Property("")],s.prototype,"iconCss",void 0),C([t.Property("Left")],s.prototype,"iconPosition",void 0),C([t.Collection([],a)],s.prototype,"items",void 0),C([t.Property("")],s.prototype,"target",void 0),C([t.Event()],s.prototype,"beforeItemRender",void 0),C([t.Event()],s.prototype,"beforeOpen",void 0),C([t.Event()],s.prototype,"beforeClose",void 0),C([t.Event()],s.prototype,"click",void 0),C([t.Event()],s.prototype,"close",void 0),C([t.Event()],s.prototype,"open",void 0),C([t.Event()],s.prototype,"select",void 0),C([t.Event()],s.prototype,"created",void 0),s=C([t.NotifyPropertyChanges],s)}(g),w=function(){var 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])};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)}}(),k=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},O="e-hide-spinner",B="e-progress",j="e-progress-active",H="e-btn-content",L=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.getModuleName=function(){return"progress-btn"},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",t.removeClass([this.element],[O,j,"e-round-corner","e-"+e.prototype.getModuleName.call(this)])},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.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(H)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},n.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:B}))},n.prototype.setContent=function(){var e=this.element.innerHTML;this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:H,innerHTML:e}))},n.prototype.clickHandler=function(){this.element.classList.contains(j)||this.startProgress()},n.prototype.startProgress=function(e,t){var n,i=this,o=this.element.classList,r=o.contains("e-vertical");o.add(j),o.contains(O)||(s.showSpinner(this.element),this.enableProgress||setTimeout(function(){i.hideSpin()},this.duration)),this.enableProgress&&(n=this.element.getElementsByClassName(B)[0],this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),n,e||0,0,this.step,0,r)),this.startContAnimate()},n.prototype.startAnimate=function(e,t,n,s,i,o,r,a,p){var l=this;try{var c,h=e-n,d=this.duration*r/100,u=h?h<d?h-d:h%d:0;this.progressTime=t=t+h-u,n=e-u,i+=(h-u)/this.duration*100,c={percent:o=(t-a)%d==0||100===i?i:o,currentDuration:t,step:r},0===i?this.trigger("begin",c):100===i||t===this.duration?this.trigger("end",c):this.trigger("progress",c),i!==c.percent&&c.percent!==o&&(i=c.percent),this.percent=i,this.step=c.step,(t-a)%(this.duration*c.step/100)!=0&&100!==i||(this.timerId=requestAnimationFrame(function(){s.style[p?"height":"width"]=i+"%",l.element.setAttribute("aria-valuenow",i.toString())}),o=i,a=t),this.isPaused||(t<this.duration&&i<100?setTimeout(function(){l.startAnimate(Date.now(),t,n,s,i,o,c.step,a,p)},this.duration/100-u):setTimeout(function(){l.progressTime=l.percent=0,s.style[p?"height":"width"]="0%",l.element.setAttribute("aria-valuenow","0"),l.hideSpin()},100))}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},n.prototype.startContAnimate=function(){var e=this,n=this.element.getElementsByClassName(H)[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.setSpinnerSize=function(){var e=this.element.getElementsByClassName(H)[0],t=this.element.getElementsByClassName("e-spinner")[0];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(H)[0];if(this.element.classList.contains(O)||s.hideSpinner(this.element),this.element.classList.remove(j),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.element.getElementsByClassName("e-spinner")[0];e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},n.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(H)[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){e.prototype.onPropertyChanged.call(this,n,s);for(var i=0,o=Object.keys(n);i<o.length;i++){switch(o[i]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),this.element.setAttribute("aria-label",this.element.textContent+" progress");break;case"iconCss":s.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":n.enableProgress?this.createProgress():t.remove(this.element.getElementsByClassName(B)[0])}}},k([t.Property(!1)],n.prototype,"enableProgress",void 0),k([t.Property(2e3)],n.prototype,"duration",void 0),k([t.Property("Left")],n.prototype,"iconPosition",void 0),k([t.Property("")],n.prototype,"iconCss",void 0),k([t.Property(!1)],n.prototype,"disabled",void 0),k([t.Property(!1)],n.prototype,"isPrimary",void 0),k([t.Property("")],n.prototype,"cssClass",void 0),k([t.Property("")],n.prototype,"content",void 0),k([t.Property(!1)],n.prototype,"isToggle",void 0),k([t.Property({template:null,width:16,position:"Left"})],n.prototype,"spinSettings",void 0),k([t.Property({duration:400,effect:"None",easing:"ease"})],n.prototype,"animationSettings",void 0),k([t.Event()],n.prototype,"created",void 0),k([t.Event()],n.prototype,"begin",void 0),k([t.Event()],n.prototype,"progress",void 0),k([t.Event()],n.prototype,"end",void 0),k([t.Event()],n.prototype,"fail",void 0),n=k([t.NotifyPropertyChanges],n)}(n.Button);e.getModel=i,e.Item=a,e.DropDownButton=g,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"]),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.ProgressButton=L,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-splitbuttons.umd.min.js.map

@@ -914,3 +914,3 @@ import { Animation, ChildProperty, Collection, 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';

/**
* The progress button visualizes the progression of an operation to indicates the user that a process is happening in the background.
* The progress button visualizes the progression of an operation to indicate the user that a process is happening in the background.
* The progress can be shown with graphics accompanied by a textual representation.

@@ -950,3 +950,2 @@ * ```html

this.setAria();
this.trigger('created');
}

@@ -956,2 +955,3 @@ /**

* @param percent
* @returns void
*/

@@ -964,2 +964,3 @@ start(percent) {

* Stops the button progress.
* @returns void
*/

@@ -1048,55 +1049,56 @@ stop() {

startAnimate(timestamp, progressTime, prevTime, ele, percent, prevPercent, step, prevProgressTime, isVertical) {
let args;
let timeDiff = timestamp - prevTime;
let stepTime = this.duration * step / 100;
let 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;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args = { percent: prevPercent, currentDuration: progressTime, step: step };
if (percent === 0) {
this.trigger('begin', args);
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args);
}
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(() => {
try {
try {
let args;
let timeDiff = timestamp - prevTime;
let stepTime = this.duration * step / 100;
let 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;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args = { percent: prevPercent, currentDuration: progressTime, step: step };
if (percent === 0) {
this.trigger('begin', args);
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args);
}
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(() => {
ele.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) {
setTimeout(() => {
this.startAnimate(Date.now(), progressTime, prevTime, ele, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
catch (_a) {
cancelAnimationFrame(this.timerId);
else {
setTimeout(() => {
this.progressTime = this.percent = 0;
ele.style[isVertical ? 'height' : 'width'] = '0%';
this.element.setAttribute('aria-valuenow', '0');
this.hideSpin();
// tslint:disable-next-line
}, 100);
}
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
setTimeout(() => {
this.startAnimate(Date.now(), progressTime, prevTime, ele, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
setTimeout(() => {
this.progressTime = this.percent = 0;
ele.style[isVertical ? 'height' : 'width'] = '0%';
this.element.setAttribute('aria-valuenow', '0');
this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
catch (e) {
cancelAnimationFrame(this.timerId);
this.trigger('fail', e);
}
}

@@ -1242,2 +1244,5 @@ startContAnimate() {

Event()
], ProgressButton.prototype, "created", void 0);
__decorate$3([
Event()
], ProgressButton.prototype, "begin", void 0);

@@ -1250,2 +1255,5 @@ __decorate$3([

], ProgressButton.prototype, "end", void 0);
__decorate$3([
Event()
], ProgressButton.prototype, "fail", void 0);
ProgressButton = __decorate$3([

@@ -1252,0 +1260,0 @@ NotifyPropertyChanges

@@ -971,3 +971,3 @@ import { Animation, ChildProperty, Collection, 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';

/**
* The progress button visualizes the progression of an operation to indicates the user that a process is happening in the background.
* The progress button visualizes the progression of an operation to indicate the user that a process is happening in the background.
* The progress can be shown with graphics accompanied by a textual representation.

@@ -1009,3 +1009,2 @@ * ```html

this.setAria();
this.trigger('created');
};

@@ -1015,2 +1014,3 @@ /**

* @param percent
* @returns void
*/

@@ -1023,2 +1023,3 @@ ProgressButton.prototype.start = function (percent) {

* Stops the button progress.
* @returns void
*/

@@ -1109,55 +1110,56 @@ ProgressButton.prototype.stop = function () {

var _this = this;
var args;
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;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args = { percent: prevPercent, currentDuration: progressTime, step: step };
if (percent === 0) {
this.trigger('begin', args);
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args);
}
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(function () {
try {
try {
var args_1;
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;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args_1 = { percent: prevPercent, currentDuration: progressTime, step: step };
if (percent === 0) {
this.trigger('begin', args_1);
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args_1);
}
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 () {
ele.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) {
setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, ele, percent, prevPercent, args_1.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
catch (_a) {
cancelAnimationFrame(_this.timerId);
else {
setTimeout(function () {
_this.progressTime = _this.percent = 0;
ele.style[isVertical ? 'height' : 'width'] = '0%';
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, ele, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
setTimeout(function () {
_this.progressTime = _this.percent = 0;
ele.style[isVertical ? 'height' : 'width'] = '0%';
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
catch (e) {
cancelAnimationFrame(this.timerId);
this.trigger('fail', e);
}
};

@@ -1304,2 +1306,5 @@ ProgressButton.prototype.startContAnimate = function () {

Event()
], ProgressButton.prototype, "created", void 0);
__decorate$3([
Event()
], ProgressButton.prototype, "begin", void 0);

@@ -1312,2 +1317,5 @@ __decorate$3([

], ProgressButton.prototype, "end", void 0);
__decorate$3([
Event()
], ProgressButton.prototype, "fail", void 0);
ProgressButton = __decorate$3([

@@ -1314,0 +1322,0 @@ NotifyPropertyChanges

/*!
* filename: ej2-splitbuttons.min.js
* version : 16.3.17
* version : 16.3.21
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

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

*/
this.ej=this.ej||{},this.ej.splitbuttons=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}function o(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"]),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}var r=function(){var 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])};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)}}(),a=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},p=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),a([t.Property("")],n.prototype,"iconCss",void 0),a([t.Property("")],n.prototype,"id",void 0),a([t.Property(!1)],n.prototype,"separator",void 0),a([t.Property("")],n.prototype,"text",void 0),a([t.Property("")],n.prototype,"url",void 0),n}(t.ChildProperty),l=function(){var 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])};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)}}(),c=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},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,n){return e.call(this,t,n)||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=this.createElement("div",{className:h.POPUP,id:this.element.id+"-popup"});document.body.appendChild(e),this.dropDown=new s.Popup(e,{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,(n={},n.role="menu",n["aria-haspopup"]=this.items.length||this.target?"true":"false",n["aria-expanded"]="false",n["aria-owns"]=this.getPopUpElement().id,n.type="button",n)),this.cssClass&&t.addClass([e],this.cssClass.split(" "));var n},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:{tabindex:"0"}}),p=0;p<e.length;p++)s=e[p],i=this.createElement("li",{innerHTML:s.url?"":s.text,className:s.separator?h.ITEM+" "+h.SEPARATOR:h.ITEM,attrs:{role:"menuItem",tabindex:"-1"},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),s.iconCss?(n=this.createElement("span",{className:h.ICON+" "+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(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 n=this;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),e.prototype.destroy.call(this),this.button.destroy(),["role","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){n.element.removeAttribute(e)}),t.removeClass([this.element],["e-btn"]),t.removeClass(this.activeElem,["e-active"]),this.dropDown.destroy();var s=document.getElementById(this.getPopUpElement().id);s&&(t.removeClass([s],["e-popup-open","e-popup-close"]),t.detach(s)),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 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.FOCUS)&&(i=r,(o=n.children[r]).classList.remove(h.FOCUS),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.FOCUS),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(h.SEPARATOR)||e.classList.contains(h.DISABLED))&&(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(h.SEPARATOR)||e.classList.contains(h.DISABLED)){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){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var n=this.getULElement(),s={element:n,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",s),!s.cancel){this.dropDown.show(null,this.element),t.addClass([this.element],"e-active"),this.element.setAttribute("aria-expanded","true"),n.focus();var i={element:n,items:this.items};this.trigger("open",i)}},o.prototype.closePopup=function(e,n){void 0===e&&(e=null);var s=this.getULElement(),i={element:s,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"),n&&n.focus();var o={element:s,items:this.items};this.trigger("close",o),!this.target&&s&&t.detach(s)}},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){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i(e,s));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"])}n.cssClass&&t.removeClass([o],n.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.split(" "));break;case"enableRtl":o.classList.toggle(h.RTL);break;case"target":this.target=e.target,t.detach(this.getULElement()),o.appendChild(this.getTargetElement()),this.dropDown.content=this.getTargetElement();break;case"items":this.dropDown.refresh(),o.classList.contains("e-popup-open")&&t.classList(o,["e-popup-close"],["e-popup-open"])}},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),m=function(){var 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])};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)}}(),u=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},y="e-rtl",f="EJS-SPLITBUTTON",v=function(e){function s(t,n){return e.call(this,t,n)||this}return m(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===f){for(var n=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(f,{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(y),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)},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(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,{role:"listbox","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 e=this;this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy();var n=document.getElementById(this.element.id);n&&n.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],["e-"+this.getModuleName(),y]),["role","aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(t){e.element.removeAttribute(t)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())},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],y):t.removeClass([this.wrapper],y)}},u([t.Property("")],s.prototype,"content",void 0),u([t.Property("")],s.prototype,"cssClass",void 0),u([t.Property(!1)],s.prototype,"disabled",void 0),u([t.Property("")],s.prototype,"iconCss",void 0),u([t.Property("Left")],s.prototype,"iconPosition",void 0),u([t.Collection([],p)],s.prototype,"items",void 0),u([t.Property("")],s.prototype,"target",void 0),u([t.Event()],s.prototype,"beforeItemRender",void 0),u([t.Event()],s.prototype,"beforeOpen",void 0),u([t.Event()],s.prototype,"beforeClose",void 0),u([t.Event()],s.prototype,"click",void 0),u([t.Event()],s.prototype,"close",void 0),u([t.Event()],s.prototype,"open",void 0),u([t.Event()],s.prototype,"select",void 0),u([t.Event()],s.prototype,"created",void 0),s=u([t.NotifyPropertyChanges],s)}(d),g=function(){var 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])};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="e-btn-content",E=function(e){function n(t,n){var s=e.call(this,t,n)||this;return s.step=1,s}return g(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(),this.trigger("created")},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.getModuleName=function(){return"progress-btn"},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",t.removeClass([this.element],["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this)])},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.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())},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:C,innerHTML:e}))},n.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},n.prototype.startProgress=function(e,t){var n,i=this,o=this.element.classList,r=o.contains("e-vertical");o.add("e-progress-active"),o.contains("e-hide-spinner")||(s.showSpinner(this.element),this.enableProgress||setTimeout(function(){i.hideSpin()},this.duration)),this.enableProgress&&(n=this.element.getElementsByClassName("e-progress")[0],this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),n,e||0,0,this.step,0,r)),this.startContAnimate()},n.prototype.startAnimate=function(e,t,n,s,i,o,r,a,p){var l,c=this,h=e-n,d=this.duration*r/100,m=h?h<d?h-d:h%d:0;this.progressTime=t=t+h-m,n=e-m,i+=(h-m)/this.duration*100,l={percent:o=(t-a)%d==0||100===i?i:o,currentDuration:t,step:r},0===i?this.trigger("begin",l):100===i||t===this.duration?this.trigger("end",l):this.trigger("progress",l),i!==l.percent&&l.percent!==o&&(i=l.percent),this.percent=i,this.step=l.step,(t-a)%(this.duration*l.step/100)!=0&&100!==i||(this.timerId=requestAnimationFrame(function(){try{s.style[p?"height":"width"]=i+"%",c.element.setAttribute("aria-valuenow",i.toString())}catch(e){cancelAnimationFrame(c.timerId)}}),o=i,a=t),this.isPaused||(t<this.duration&&i<100?setTimeout(function(){c.startAnimate(Date.now(),t,n,s,i,o,l.step,a,p)},this.duration/100-m):setTimeout(function(){c.progressTime=c.percent=0,s.style[p?"height":"width"]="0%",c.element.setAttribute("aria-valuenow","0"),c.hideSpin()},100))},n.prototype.startContAnimate=function(){var e=this,n=this.element.getElementsByClassName(C)[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.setSpinnerSize=function(){var e=this.element.getElementsByClassName(C)[0],t=this.element.getElementsByClassName("e-spinner")[0];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(C)[0];if(this.element.classList.contains("e-hide-spinner")||s.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.element.getElementsByClassName("e-spinner")[0];e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},n.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])},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){e.prototype.onPropertyChanged.call(this,n,s);for(var i=0,o=Object.keys(n);i<o.length;i++)switch(o[i]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),this.element.setAttribute("aria-label",this.element.textContent+" progress");break;case"iconCss":s.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":n.enableProgress?this.createProgress():t.remove(this.element.getElementsByClassName("e-progress")[0])}},b([t.Property(!1)],n.prototype,"enableProgress",void 0),b([t.Property(2e3)],n.prototype,"duration",void 0),b([t.Property("Left")],n.prototype,"iconPosition",void 0),b([t.Property("")],n.prototype,"iconCss",void 0),b([t.Property(!1)],n.prototype,"disabled",void 0),b([t.Property(!1)],n.prototype,"isPrimary",void 0),b([t.Property("")],n.prototype,"cssClass",void 0),b([t.Property("")],n.prototype,"content",void 0),b([t.Property(!1)],n.prototype,"isToggle",void 0),b([t.Property({template:null,width:16,position:"Left"})],n.prototype,"spinSettings",void 0),b([t.Property({duration:400,effect:"None",easing:"ease"})],n.prototype,"animationSettings",void 0),b([t.Event()],n.prototype,"begin",void 0),b([t.Event()],n.prototype,"progress",void 0),b([t.Event()],n.prototype,"end",void 0),n=b([t.NotifyPropertyChanges],n)}(n.Button);return e.getModel=i,e.Item=p,e.DropDownButton=d,e.SplitButton=v,e.createButtonGroup=o,e.ProgressButton=E,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
this.ej=this.ej||{},this.ej.splitbuttons=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}function o(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"]),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}var r=function(){var 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])};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)}}(),a=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},p=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),a([t.Property("")],n.prototype,"iconCss",void 0),a([t.Property("")],n.prototype,"id",void 0),a([t.Property(!1)],n.prototype,"separator",void 0),a([t.Property("")],n.prototype,"text",void 0),a([t.Property("")],n.prototype,"url",void 0),n}(t.ChildProperty),l=function(){var 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])};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)}}(),c=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},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,n){return e.call(this,t,n)||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=this.createElement("div",{className:h.POPUP,id:this.element.id+"-popup"});document.body.appendChild(e),this.dropDown=new s.Popup(e,{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,(n={},n.role="menu",n["aria-haspopup"]=this.items.length||this.target?"true":"false",n["aria-expanded"]="false",n["aria-owns"]=this.getPopUpElement().id,n.type="button",n)),this.cssClass&&t.addClass([e],this.cssClass.split(" "));var n},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:{tabindex:"0"}}),p=0;p<e.length;p++)s=e[p],i=this.createElement("li",{innerHTML:s.url?"":s.text,className:s.separator?h.ITEM+" "+h.SEPARATOR:h.ITEM,attrs:{role:"menuItem",tabindex:"-1"},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),s.iconCss?(n=this.createElement("span",{className:h.ICON+" "+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(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 n=this;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),e.prototype.destroy.call(this),this.button.destroy(),["role","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){n.element.removeAttribute(e)}),t.removeClass([this.element],["e-btn"]),t.removeClass(this.activeElem,["e-active"]),this.dropDown.destroy();var s=document.getElementById(this.getPopUpElement().id);s&&(t.removeClass([s],["e-popup-open","e-popup-close"]),t.detach(s)),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 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.FOCUS)&&(i=r,(o=n.children[r]).classList.remove(h.FOCUS),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.FOCUS),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(h.SEPARATOR)||e.classList.contains(h.DISABLED))&&(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(h.SEPARATOR)||e.classList.contains(h.DISABLED)){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){void 0===e&&(e=null),this.target||this.getPopUpElement().appendChild(this.createItems(this.items));var n=this.getULElement(),s={element:n,items:this.items,event:e,cancel:!1};if(this.trigger("beforeOpen",s),!s.cancel){this.dropDown.show(null,this.element),t.addClass([this.element],"e-active"),this.element.setAttribute("aria-expanded","true"),n.focus();var i={element:n,items:this.items};this.trigger("open",i)}},o.prototype.closePopup=function(e,n){void 0===e&&(e=null);var s=this.getULElement(),i={element:s,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"),n&&n.focus();var o={element:s,items:this.items};this.trigger("close",o),!this.target&&s&&t.detach(s)}},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){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i(e,s));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"])}n.cssClass&&t.removeClass([o],n.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.split(" "));break;case"enableRtl":o.classList.toggle(h.RTL);break;case"target":this.target=e.target,t.detach(this.getULElement()),o.appendChild(this.getTargetElement()),this.dropDown.content=this.getTargetElement();break;case"items":this.dropDown.refresh(),o.classList.contains("e-popup-open")&&t.classList(o,["e-popup-close"],["e-popup-open"])}},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),m=function(){var 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])};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)}}(),u=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},y="e-rtl",f="EJS-SPLITBUTTON",v=function(e){function s(t,n){return e.call(this,t,n)||this}return m(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===f){for(var n=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(f,{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(y),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)},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(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,{role:"listbox","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 e=this;this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy();var n=document.getElementById(this.element.id);n&&n.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],["e-"+this.getModuleName(),y]),["role","aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(t){e.element.removeAttribute(t)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())},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],y):t.removeClass([this.wrapper],y)}},u([t.Property("")],s.prototype,"content",void 0),u([t.Property("")],s.prototype,"cssClass",void 0),u([t.Property(!1)],s.prototype,"disabled",void 0),u([t.Property("")],s.prototype,"iconCss",void 0),u([t.Property("Left")],s.prototype,"iconPosition",void 0),u([t.Collection([],p)],s.prototype,"items",void 0),u([t.Property("")],s.prototype,"target",void 0),u([t.Event()],s.prototype,"beforeItemRender",void 0),u([t.Event()],s.prototype,"beforeOpen",void 0),u([t.Event()],s.prototype,"beforeClose",void 0),u([t.Event()],s.prototype,"click",void 0),u([t.Event()],s.prototype,"close",void 0),u([t.Event()],s.prototype,"open",void 0),u([t.Event()],s.prototype,"select",void 0),u([t.Event()],s.prototype,"created",void 0),s=u([t.NotifyPropertyChanges],s)}(d),g=function(){var 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])};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="e-btn-content",E=function(e){function n(t,n){var s=e.call(this,t,n)||this;return s.step=1,s}return g(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.getModuleName=function(){return"progress-btn"},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",t.removeClass([this.element],["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this)])},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.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())},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:C,innerHTML:e}))},n.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},n.prototype.startProgress=function(e,t){var n,i=this,o=this.element.classList,r=o.contains("e-vertical");o.add("e-progress-active"),o.contains("e-hide-spinner")||(s.showSpinner(this.element),this.enableProgress||setTimeout(function(){i.hideSpin()},this.duration)),this.enableProgress&&(n=this.element.getElementsByClassName("e-progress")[0],this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),n,e||0,0,this.step,0,r)),this.startContAnimate()},n.prototype.startAnimate=function(e,t,n,s,i,o,r,a,p){var l=this;try{var c,h=e-n,d=this.duration*r/100,m=h?h<d?h-d:h%d:0;this.progressTime=t=t+h-m,n=e-m,i+=(h-m)/this.duration*100,c={percent:o=(t-a)%d==0||100===i?i:o,currentDuration:t,step:r},0===i?this.trigger("begin",c):100===i||t===this.duration?this.trigger("end",c):this.trigger("progress",c),i!==c.percent&&c.percent!==o&&(i=c.percent),this.percent=i,this.step=c.step,(t-a)%(this.duration*c.step/100)!=0&&100!==i||(this.timerId=requestAnimationFrame(function(){s.style[p?"height":"width"]=i+"%",l.element.setAttribute("aria-valuenow",i.toString())}),o=i,a=t),this.isPaused||(t<this.duration&&i<100?setTimeout(function(){l.startAnimate(Date.now(),t,n,s,i,o,c.step,a,p)},this.duration/100-m):setTimeout(function(){l.progressTime=l.percent=0,s.style[p?"height":"width"]="0%",l.element.setAttribute("aria-valuenow","0"),l.hideSpin()},100))}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},n.prototype.startContAnimate=function(){var e=this,n=this.element.getElementsByClassName(C)[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.setSpinnerSize=function(){var e=this.element.getElementsByClassName(C)[0],t=this.element.getElementsByClassName("e-spinner")[0];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(C)[0];if(this.element.classList.contains("e-hide-spinner")||s.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.element.getElementsByClassName("e-spinner")[0];e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},n.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])},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){e.prototype.onPropertyChanged.call(this,n,s);for(var i=0,o=Object.keys(n);i<o.length;i++)switch(o[i]){case"content":this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress(),this.element.setAttribute("aria-label",this.element.textContent+" progress");break;case"iconCss":s.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":n.enableProgress?this.createProgress():t.remove(this.element.getElementsByClassName("e-progress")[0])}},b([t.Property(!1)],n.prototype,"enableProgress",void 0),b([t.Property(2e3)],n.prototype,"duration",void 0),b([t.Property("Left")],n.prototype,"iconPosition",void 0),b([t.Property("")],n.prototype,"iconCss",void 0),b([t.Property(!1)],n.prototype,"disabled",void 0),b([t.Property(!1)],n.prototype,"isPrimary",void 0),b([t.Property("")],n.prototype,"cssClass",void 0),b([t.Property("")],n.prototype,"content",void 0),b([t.Property(!1)],n.prototype,"isToggle",void 0),b([t.Property({template:null,width:16,position:"Left"})],n.prototype,"spinSettings",void 0),b([t.Property({duration:400,effect:"None",easing:"ease"})],n.prototype,"animationSettings",void 0),b([t.Event()],n.prototype,"created",void 0),b([t.Event()],n.prototype,"begin",void 0),b([t.Event()],n.prototype,"progress",void 0),b([t.Event()],n.prototype,"end",void 0),b([t.Event()],n.prototype,"fail",void 0),n=b([t.NotifyPropertyChanges],n)}(n.Button);return e.getModel=i,e.Item=p,e.DropDownButton=d,e.SplitButton=v,e.createButtonGroup=o,e.ProgressButton=E,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
//# sourceMappingURL=ej2-splitbuttons.min.js.map
/*!
* filename: index.d.ts
* version : 16.3.17
* version : 16.3.21
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

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

{
"name": "@syncfusion/ej2-splitbuttons",
"version": "16.3.17",
"version": "16.3.21",
"description": "A package of feature-rich Essential JS 2 components such as DropDownButton, SplitButton, ProgressButton and ButtonGroup.",

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

"dependencies": {
"@syncfusion/ej2-base": "~16.3.17",
"@syncfusion/ej2-popups": "~16.3.17"
"@syncfusion/ej2-base": "~16.3.21",
"@syncfusion/ej2-popups": "~16.3.21"
},

@@ -51,3 +51,4 @@ "devDependencies": {

"url": "https://github.com/syncfusion/ej2-splitbuttons.git"
}
},
"sideEffects": false
}

@@ -33,3 +33,3 @@ # ej2-splitbuttons

* ProgressButton - `ProgressButton` visualizes the progression of an operation to indicates the user that a process is happening in the background. The progress can be shown with graphics accompanied by a textual representation.
* ProgressButton - `ProgressButton` visualizes the progression of an operation to indicate the user that a process is happening in the background. The progress can be shown with graphics accompanied by a textual representation.
* [Getting Started](https://ej2.syncfusion.com/documentation/progress-button/getting-started.html?lang=typescript&utm_source=npm&utm_campaign=progress-button)

@@ -36,0 +36,0 @@ * [View Online Demos](https://ej2.syncfusion.com/demos/?utm_source=npm&utm_campaign=grid#/material/button/progress-button.html)

@@ -80,2 +80,8 @@ 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 } from '@syncfusion/ej2-base';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';

/**
* Triggers once the component rendering is completed.
* @event
*/
created?: EmitType<Event>;
/**
* Triggers when the progress starts.

@@ -98,2 +104,8 @@ * @event

/**
* Triggers when the progress is incomplete.
* @event
*/
fail?: EmitType<Event>;
}

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

/**
* The progress button visualizes the progression of an operation to indicates the user that a process is happening in the background.
* The progress button visualizes the progression of an operation to indicate the user that a process is happening in the background.
* The progress can be shown with graphics accompanied by a textual representation.

@@ -85,2 +85,7 @@ * ```html

/**
* Triggers once the component rendering is completed.
* @event
*/
created: EmitType<Event>;
/**
* Triggers when the progress starts.

@@ -101,2 +106,7 @@ * @event

/**
* Triggers when the progress is incomplete.
* @event
*/
fail: EmitType<Event>;
/**
* Constructor for creating the widget

@@ -117,2 +127,3 @@ * @param {ProgressButtonModel} options?

* @param percent
* @returns void
*/

@@ -122,2 +133,3 @@ start(percent?: number): void;

* Stops the button progress.
* @returns void
*/

@@ -124,0 +136,0 @@ stop(): void;

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

/**
* The progress button visualizes the progression of an operation to indicates the user that a process is happening in the background.
* The progress button visualizes the progression of an operation to indicate the user that a process is happening in the background.
* The progress can be shown with graphics accompanied by a textual representation.

@@ -64,3 +64,2 @@ * ```html

this.setAria();
this.trigger('created');
};

@@ -70,2 +69,3 @@ /**

* @param percent
* @returns void
*/

@@ -78,2 +78,3 @@ ProgressButton.prototype.start = function (percent) {

* Stops the button progress.
* @returns void
*/

@@ -164,55 +165,56 @@ ProgressButton.prototype.stop = function () {

var _this = this;
var args;
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;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args = { percent: prevPercent, currentDuration: progressTime, step: step };
if (percent === 0) {
this.trigger('begin', args);
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args);
}
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(function () {
try {
try {
var args_1;
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;
prevPercent = ((progressTime - prevProgressTime) % stepTime === 0 || percent === 100) ? percent : prevPercent;
args_1 = { percent: prevPercent, currentDuration: progressTime, step: step };
if (percent === 0) {
this.trigger('begin', args_1);
}
else if (percent === 100 || progressTime === this.duration) {
this.trigger('end', args_1);
}
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 () {
ele.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) {
setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, ele, percent, prevPercent, args_1.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
catch (_a) {
cancelAnimationFrame(_this.timerId);
else {
setTimeout(function () {
_this.progressTime = _this.percent = 0;
ele.style[isVertical ? 'height' : 'width'] = '0%';
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
});
prevPercent = percent;
prevProgressTime = progressTime;
}
if (!this.isPaused) {
if (progressTime < this.duration && percent < 100) {
setTimeout(function () {
_this.startAnimate(Date.now(), progressTime, prevTime, ele, percent, prevPercent, args.step, prevProgressTime, isVertical);
// tslint:disable-next-line
}, (this.duration / 100) - timeDiffBuffer);
}
else {
setTimeout(function () {
_this.progressTime = _this.percent = 0;
ele.style[isVertical ? 'height' : 'width'] = '0%';
_this.element.setAttribute('aria-valuenow', '0');
_this.hideSpin();
// tslint:disable-next-line
}, 100);
}
}
catch (e) {
cancelAnimationFrame(this.timerId);
this.trigger('fail', e);
}
};

@@ -359,2 +361,5 @@ ProgressButton.prototype.startContAnimate = function () {

Event()
], ProgressButton.prototype, "created", void 0);
__decorate([
Event()
], ProgressButton.prototype, "begin", void 0);

@@ -367,2 +372,5 @@ __decorate([

], ProgressButton.prototype, "end", void 0);
__decorate([
Event()
], ProgressButton.prototype, "fail", void 0);
ProgressButton = __decorate([

@@ -369,0 +377,0 @@ NotifyPropertyChanges

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc