Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-buttons

Package Overview
Dependencies
Maintainers
2
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-buttons - npm Package Compare versions

Comparing version 16.3.25 to 16.3.29

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 16.3.25
* version : 16.3.29
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

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

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";function s(e,s,i,n,a,r){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,d=n.attributes.length;h<d;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:a,role:r,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function a(e,i,n,a,r){a=s(e.createElement,i,"checkbox",a,n,r),e.element=a,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+r))}function r(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),l=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},c="e-rtl",h="e-btn",d="e-primary",p="e-icon-btn",u=function(e){function s(t,s){return e.call(this,t,s)||this}return o(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(d),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(c),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(p);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=this.element;e.prototype.destroy.call(this),t.removeClass([this.element],[d,c,p,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"]),["e-ripple","disabled"].forEach(function(e){i.removeAttribute(e)}),this.content&&(i.innerHTML=i.innerHTML.replace(this.content,"")),(s=i.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){case"isPrimary":e.isPrimary?this.element.classList.add(d):this.element.classList.remove(d);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var r=this.element.querySelector("span.e-btn-icon");r?(r.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?r.classList.add("e-icon-left"):r.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(r=this.element.querySelector("span.e-btn-icon"))&&t.detach(r),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(c):this.element.classList.remove(c);break;case"content":i(this.element)||this.element.classList.remove(p),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}}},l([t.Property("Left")],s.prototype,"iconPosition",void 0),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),l([t.Property(!1)],s.prototype,"isPrimary",void 0),l([t.Property("")],s.prototype,"cssClass",void 0),l([t.Property("")],s.prototype,"content",void 0),l([t.Property(!1)],s.prototype,"isToggle",void 0),l([t.Property()],s.prototype,"locale",void 0),l([t.Event()],s.prototype,"created",void 0),s=l([t.NotifyPropertyChanges],s)}(t.Component),m=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),f=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},v="e-checkbox-disabled",y="e-frame",b="e-ripple-container",g="e-ripple-check",E="e-ripple-stop",k="e-checkbox-wrapper",C=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return m(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName(y)[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(b)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove(E),i.classList.add(g)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],[g,E]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove(g),i.classList.add(E)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(k)||(e=this.createElement("div",{className:k,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons "+y});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:b});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelMouseHandler=function(e){r(e,this.getWrapper().getElementsByClassName(b)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(v),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&i.classList.remove(s.cssClass),i.classList.add(e.cssClass);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var r=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(r),"After"===e.labelPosition?o.appendChild(r):o.insertBefore(r,i.getElementsByClassName(y)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,k,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(v),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName(y)[0]):s.appendChild(t)}},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this)},f([t.Event()],i.prototype,"change",void 0),f([t.Event()],i.prototype,"created",void 0),f([t.Property(!1)],i.prototype,"checked",void 0),f([t.Property("")],i.prototype,"cssClass",void 0),f([t.Property(!1)],i.prototype,"disabled",void 0),f([t.Property(!1)],i.prototype,"indeterminate",void 0),f([t.Property("")],i.prototype,"label",void 0),f([t.Property("After")],i.prototype,"labelPosition",void 0),f([t.Property("")],i.prototype,"name",void 0),f([t.Property("")],i.prototype,"value",void 0),i=f([t.NotifyPropertyChanges],i)}(t.Component),H=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),P=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},L="e-label",w="e-ripple-container",N="e-radio-wrapper",O=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return H(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t)},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),a=document.querySelectorAll('input.e-radio[name="'+i+'"]'),r=0;r<a.length;r++)(s=a[r])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(N)||(s=this.createElement("div",{className:N}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:w}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){r(e,this.getLabel().getElementsByClassName(w)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,N,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(L)[0];s?s.textContent=e:(s=this.createElement("span",{className:L,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler))},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this))},P([t.Event()],i.prototype,"change",void 0),P([t.Event()],i.prototype,"created",void 0),P([t.Property(!1)],i.prototype,"checked",void 0),P([t.Property("")],i.prototype,"cssClass",void 0),P([t.Property(!1)],i.prototype,"disabled",void 0),P([t.Property("")],i.prototype,"label",void 0),P([t.Property("After")],i.prototype,"labelPosition",void 0),P([t.Property("")],i.prototype,"name",void 0),P([t.Property("")],i.prototype,"value",void 0),i=n=P([t.NotifyPropertyChanges],i);var n}(t.Component),R=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),W=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},A="e-switch-disabled",B="e-ripple-container",D="e-ripple-check",T="e-switch-wrapper",_="e-switch-active",j=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return R(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),a=n.querySelector(".e-switch-inner"),r=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(B)[0]),e?(t.addClass([a,r],_),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],[D])):(t.removeClass([a,r],_),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],[D])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(T)||(e=this.createElement("div",{className:T,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),a=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(a),t.isRippleEnabled){var r=this.createElement("span",{className:B});a.appendChild(r),t.rippleEffect(r,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,t){for(var s=this.getWrapper(),i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove(A),s.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?s.classList.add("e-rtl"):s.classList.remove("e-rtl");break;case"cssClass":t.cssClass&&s.classList.remove(t.cssClass),s.classList.add(e.cssClass)}}},s.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,a(this,"EJS-SWITCH",T,e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){r(e,this.getWrapper().getElementsByClassName(B)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(B)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(A),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(B)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.switchMouseUp,this),t.EventHandler.add(document,"keydown",this.switchFocusHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.switchMouseUp),t.EventHandler.remove(document,"keydown",this.switchFocusHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp)},W([t.Event()],s.prototype,"change",void 0),W([t.Event()],s.prototype,"created",void 0),W([t.Property(!1)],s.prototype,"checked",void 0),W([t.Property("")],s.prototype,"cssClass",void 0),W([t.Property(!1)],s.prototype,"disabled",void 0),W([t.Property("")],s.prototype,"name",void 0),W([t.Property("")],s.prototype,"onLabel",void 0),W([t.Property("")],s.prototype,"offLabel",void 0),W([t.Property("")],s.prototype,"value",void 0),s=W([t.NotifyPropertyChanges],s)}(t.Component);e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=a,e.createCheckBox=function(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var a=e("span",{className:"e-ripple-container"});t.rippleEffect(a,{isCenterRipple:!0,duration:400}),n.appendChild(a)}var r=e("span",{className:"e-frame e-icons"});if(i.checked&&r.classList.add("e-check"),n.appendChild(r),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n},e.rippleMouseHandler=r,e.Button=u,e.CheckBox=C,e.RadioButton=O,e.Switch=j,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";function s(e,s,i,n,a,r){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,d=n.attributes.length;h<d;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:a,role:r,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function a(e,i,n,a,r){a=s(e.createElement,i,"checkbox",a,n,r),e.element=a,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+r))}function r(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var o=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),l=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},c="e-rtl",h="e-btn",d="e-primary",p="e-icon-btn",u=function(e){function s(t,s){return e.call(this,t,s)||this}return o(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(d),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(c),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(p);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[d,c,p,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){case"isPrimary":e.isPrimary?this.element.classList.add(d):this.element.classList.remove(d);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var r=this.element.querySelector("span.e-btn-icon");r?(r.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?r.classList.add("e-icon-left"):r.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(r=this.element.querySelector("span.e-btn-icon"))&&t.detach(r),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(c):this.element.classList.remove(c);break;case"content":i(this.element)||this.element.classList.remove(p),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}}},l([t.Property("Left")],s.prototype,"iconPosition",void 0),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),l([t.Property(!1)],s.prototype,"isPrimary",void 0),l([t.Property("")],s.prototype,"cssClass",void 0),l([t.Property("")],s.prototype,"content",void 0),l([t.Property(!1)],s.prototype,"isToggle",void 0),l([t.Property()],s.prototype,"locale",void 0),l([t.Event()],s.prototype,"created",void 0),s=l([t.NotifyPropertyChanges],s)}(t.Component),m=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),f=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},v="e-checkbox-disabled",y="e-frame",b="e-ripple-container",g="e-ripple-check",E="e-ripple-stop",k="e-checkbox-wrapper",C=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return m(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName(y)[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(b)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove(E),i.classList.add(g)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],[g,E]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove(g),i.classList.add(E)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(k)||(e=this.createElement("div",{className:k,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons "+y});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:b});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelMouseHandler=function(e){r(e,this.getWrapper().getElementsByClassName(b)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(v),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&i.classList.remove(s.cssClass),i.classList.add(e.cssClass);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var r=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(r),"After"===e.labelPosition?o.appendChild(r):o.insertBefore(r,i.getElementsByClassName(y)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,k,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(v),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName(y)[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},f([t.Event()],i.prototype,"change",void 0),f([t.Event()],i.prototype,"created",void 0),f([t.Property(!1)],i.prototype,"checked",void 0),f([t.Property("")],i.prototype,"cssClass",void 0),f([t.Property(!1)],i.prototype,"disabled",void 0),f([t.Property(!1)],i.prototype,"indeterminate",void 0),f([t.Property("")],i.prototype,"label",void 0),f([t.Property("After")],i.prototype,"labelPosition",void 0),f([t.Property("")],i.prototype,"name",void 0),f([t.Property("")],i.prototype,"value",void 0),i=f([t.NotifyPropertyChanges],i)}(t.Component),H=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),P=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},L="e-label",w="e-ripple-container",N="e-radio-wrapper",O=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}H(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),a=document.querySelectorAll('input.e-radio[name="'+i+'"]'),r=0;r<a.length;r++)(s=a[r])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(N)||(s=this.createElement("div",{className:N}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:w}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){r(e,this.getLabel().getElementsByClassName(w)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,N,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(L)[0];s?s.textContent=e:(s=this.createElement("span",{className:L,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler))},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this))};var n;return P([t.Event()],i.prototype,"change",void 0),P([t.Event()],i.prototype,"created",void 0),P([t.Property(!1)],i.prototype,"checked",void 0),P([t.Property("")],i.prototype,"cssClass",void 0),P([t.Property(!1)],i.prototype,"disabled",void 0),P([t.Property("")],i.prototype,"label",void 0),P([t.Property("After")],i.prototype,"labelPosition",void 0),P([t.Property("")],i.prototype,"name",void 0),P([t.Property("")],i.prototype,"value",void 0),i=n=P([t.NotifyPropertyChanges],i)}(t.Component),R=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),W=function(e,t,s,i){var n,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(a<3?n(r):a>3?n(t,s,r):n(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},A="e-switch-disabled",B="e-ripple-container",D="e-ripple-check",T="e-switch-wrapper",_="e-switch-active",j=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return R(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),a=n.querySelector(".e-switch-inner"),r=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(B)[0]),e?(t.addClass([a,r],_),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],[D])):(t.removeClass([a,r],_),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],[D])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(T)||(e=this.createElement("div",{className:T,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),a=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(a),t.isRippleEnabled){var r=this.createElement("span",{className:B});a.appendChild(r),t.rippleEffect(r,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,t){for(var s=this.getWrapper(),i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove(A),s.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?s.classList.add("e-rtl"):s.classList.remove("e-rtl");break;case"cssClass":t.cssClass&&s.classList.remove(t.cssClass),s.classList.add(e.cssClass)}}},s.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,a(this,"EJS-SWITCH",T,e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){r(e,this.getWrapper().getElementsByClassName(B)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(B)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(A),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(B)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.switchMouseUp,this),t.EventHandler.add(document,"keydown",this.switchFocusHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.switchMouseUp),t.EventHandler.remove(document,"keydown",this.switchFocusHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp)},W([t.Event()],s.prototype,"change",void 0),W([t.Event()],s.prototype,"created",void 0),W([t.Property(!1)],s.prototype,"checked",void 0),W([t.Property("")],s.prototype,"cssClass",void 0),W([t.Property(!1)],s.prototype,"disabled",void 0),W([t.Property("")],s.prototype,"name",void 0),W([t.Property("")],s.prototype,"onLabel",void 0),W([t.Property("")],s.prototype,"offLabel",void 0),W([t.Property("")],s.prototype,"value",void 0),s=W([t.NotifyPropertyChanges],s)}(t.Component);e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=a,e.createCheckBox=function(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var a=e("span",{className:"e-ripple-container"});t.rippleEffect(a,{isCenterRipple:!0,duration:400}),n.appendChild(a)}var r=e("span",{className:"e-frame e-icons"});if(i.checked&&r.classList.add("e-check"),n.appendChild(r),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n},e.rippleMouseHandler=r,e.Button=u,e.CheckBox=C,e.RadioButton=O,e.Switch=j,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-buttons.umd.min.js.map

@@ -220,13 +220,20 @@ import { Component, Event, EventHandler, NotifyPropertyChanges, Property, addClass, attributes, deleteObject, detach, getInstance, getUniqueID, getValue, isRippleEnabled, removeClass, rippleEffect, setValue } from '@syncfusion/ej2-base';

let span;
let element = this.element;
let classList = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',
'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round',
'e-top-icon-btn', 'e-bottom-icon-btn'];
if (this.cssClass) {
classList = classList.concat(this.cssClass.split(' '));
}
super.destroy();
removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',
'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round', 'e-top-icon-btn', 'e-bottom-icon-btn']);
['e-ripple', 'disabled'].forEach((value) => {
element.removeAttribute(value);
});
removeClass([this.element], classList);
if (!this.element.getAttribute('class')) {
this.element.removeAttribute('class');
}
if (this.disabled) {
this.element.removeAttribute('disabled');
}
if (this.content) {
element.innerHTML = element.innerHTML.replace(this.content, '');
this.element.innerHTML = this.element.innerHTML.replace(this.content, '');
}
span = element.querySelector('span.e-btn-icon');
span = this.element.querySelector('span.e-btn-icon');
if (span) {

@@ -704,2 +711,5 @@ detach(span);

}
changeHandler(e) {
e.stopPropagation();
}
unWireEvents() {

@@ -715,2 +725,5 @@ let wrapper = this.getWrapper();

EventHandler.remove(label, 'mouseup', this.labelMouseHandler);
if (this.tagName === 'EJS-CHECKBOX') {
EventHandler.remove(this.element, 'change', this.changeHandler);
}
}

@@ -727,2 +740,5 @@ wireEvents() {

EventHandler.add(label, 'mouseup', this.labelMouseHandler, this);
if (this.tagName === 'EJS-CHECKBOX') {
EventHandler.add(this.element, 'change', this.changeHandler, this);
}
}

@@ -774,2 +790,3 @@ };

};
var RadioButton_1;
const LABEL$1 = 'e-label';

@@ -804,2 +821,5 @@ const RIPPLE$1 = 'e-ripple-container';

this.trigger('change', changeEventArgs);
if (this.tagName === 'EJS-RADIOBUTTON') {
event.stopPropagation();
}
}

@@ -1077,3 +1097,2 @@ updateChange(state) {

], RadioButton);
var RadioButton_1;

@@ -1080,0 +1099,0 @@ /**

@@ -109,5 +109,8 @@ import { Component, Event, EventHandler, NotifyPropertyChanges, Property, addClass, attributes, deleteObject, detach, getInstance, getUniqueID, getValue, isRippleEnabled, removeClass, rippleEffect, setValue } from '@syncfusion/ej2-base';

var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {

@@ -234,13 +237,20 @@ extendStatics(d, b);

var span;
var element = this.element;
var classList = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',
'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round',
'e-top-icon-btn', 'e-bottom-icon-btn'];
if (this.cssClass) {
classList = classList.concat(this.cssClass.split(' '));
}
_super.prototype.destroy.call(this);
removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',
'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round', 'e-top-icon-btn', 'e-bottom-icon-btn']);
['e-ripple', 'disabled'].forEach(function (value) {
element.removeAttribute(value);
});
removeClass([this.element], classList);
if (!this.element.getAttribute('class')) {
this.element.removeAttribute('class');
}
if (this.disabled) {
this.element.removeAttribute('disabled');
}
if (this.content) {
element.innerHTML = element.innerHTML.replace(this.content, '');
this.element.innerHTML = this.element.innerHTML.replace(this.content, '');
}
span = element.querySelector('span.e-btn-icon');
span = this.element.querySelector('span.e-btn-icon');
if (span) {

@@ -397,5 +407,8 @@ detach(span);

var __extends$1 = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {

@@ -735,2 +748,5 @@ extendStatics(d, b);

};
CheckBox.prototype.changeHandler = function (e) {
e.stopPropagation();
};
CheckBox.prototype.unWireEvents = function () {

@@ -746,2 +762,5 @@ var wrapper = this.getWrapper();

EventHandler.remove(label, 'mouseup', this.labelMouseHandler);
if (this.tagName === 'EJS-CHECKBOX') {
EventHandler.remove(this.element, 'change', this.changeHandler);
}
};

@@ -758,2 +777,5 @@ CheckBox.prototype.wireEvents = function () {

EventHandler.add(label, 'mouseup', this.labelMouseHandler, this);
if (this.tagName === 'EJS-CHECKBOX') {
EventHandler.add(this.element, 'change', this.changeHandler, this);
}
};

@@ -801,5 +823,8 @@ __decorate$1([

var __extends$2 = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {

@@ -849,2 +874,5 @@ extendStatics(d, b);

this.trigger('change', changeEventArgs);
if (this.tagName === 'EJS-RADIOBUTTON') {
event.stopPropagation();
}
};

@@ -1093,2 +1121,3 @@ RadioButton.prototype.updateChange = function (state) {

};
var RadioButton_1;
__decorate$2([

@@ -1125,3 +1154,2 @@ Event()

return RadioButton;
var RadioButton_1;
}(Component));

@@ -1134,5 +1162,8 @@

var __extends$3 = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {

@@ -1139,0 +1170,0 @@ extendStatics(d, b);

/*!
* filename: index.d.ts
* version : 16.3.25
* version : 16.3.29
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

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

import * as _buttons from '@syncfusion/ej2-buttons';
import * as _base from '@syncfusion/ej2-base';
export declare namespace ej {
const buttons: typeof _buttons;
const base: typeof _base;
}
{
"name": "@syncfusion/ej2-buttons",
"version": "16.3.25",
"version": "16.3.29",
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",

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

"dependencies": {
"@syncfusion/ej2-base": "~16.3.24"
"@syncfusion/ej2-base": "~16.3.29"
},

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

@@ -83,8 +83,8 @@ import { INotifyPropertyChanged, Component } from '@syncfusion/ej2-base';

render(): void;
private initialize();
private controlStatus(disabled);
private setIconCss();
private initialize;
private controlStatus;
private setIconCss;
protected wireEvents(): void;
protected unWireEvents(): void;
private btnClickHandler();
private btnClickHandler;
/**

@@ -91,0 +91,0 @@ * Destroys the widget.

var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -129,13 +132,20 @@ extendStatics(d, b);

var span;
var element = this.element;
var classList = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',
'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round',
'e-top-icon-btn', 'e-bottom-icon-btn'];
if (this.cssClass) {
classList = classList.concat(this.cssClass.split(' '));
}
_super.prototype.destroy.call(this);
removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger',
'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round', 'e-top-icon-btn', 'e-bottom-icon-btn']);
['e-ripple', 'disabled'].forEach(function (value) {
element.removeAttribute(value);
});
removeClass([this.element], classList);
if (!this.element.getAttribute('class')) {
this.element.removeAttribute('class');
}
if (this.disabled) {
this.element.removeAttribute('disabled');
}
if (this.content) {
element.innerHTML = element.innerHTML.replace(this.content, '');
this.element.innerHTML = this.element.innerHTML.replace(this.content, '');
}
span = element.querySelector('span.e-btn-icon');
span = this.element.querySelector('span.e-btn-icon');
if (span) {

@@ -142,0 +152,0 @@ detach(span);

@@ -85,4 +85,4 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';

constructor(options?: CheckBoxModel, element?: string | HTMLInputElement);
private changeState(state?);
private clickHandler(event);
private changeState;
private clickHandler;
/**

@@ -93,4 +93,4 @@ * Destroys the widget.

destroy(): void;
private focusHandler();
private focusOutHandler();
private focusHandler;
private focusOutHandler;
/**

@@ -106,8 +106,8 @@ * Gets the module name.

getPersistData(): string;
private getWrapper();
private initialize();
private initWrapper();
private keyDownHandler();
private labelMouseHandler(e);
private mouseDownHandler();
private getWrapper;
private initialize;
private initWrapper;
private keyDownHandler;
private labelMouseHandler;
private mouseDownHandler;
/**

@@ -128,6 +128,7 @@ * Called internally if any of the property value changes.

protected render(): void;
private setDisabled();
private setText(text);
private setDisabled;
private setText;
private changeHandler;
protected unWireEvents(): void;
protected wireEvents(): void;
}
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -343,2 +346,5 @@ extendStatics(d, b);

};
CheckBox.prototype.changeHandler = function (e) {
e.stopPropagation();
};
CheckBox.prototype.unWireEvents = function () {

@@ -354,2 +360,5 @@ var wrapper = this.getWrapper();

EventHandler.remove(label, 'mouseup', this.labelMouseHandler);
if (this.tagName === 'EJS-CHECKBOX') {
EventHandler.remove(this.element, 'change', this.changeHandler);
}
};

@@ -366,2 +375,5 @@ CheckBox.prototype.wireEvents = function () {

EventHandler.add(label, 'mouseup', this.labelMouseHandler, this);
if (this.tagName === 'EJS-CHECKBOX') {
EventHandler.add(this.element, 'change', this.changeHandler, this);
}
};

@@ -368,0 +380,0 @@ __decorate([

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

import * as buttons from './index';
import * as base from '@syncfusion/ej2-base';
export { buttons, base };
export * from './index';

@@ -77,4 +77,4 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';

constructor(options?: RadioButtonModel, element?: string | HTMLInputElement);
private changeHandler(event);
private updateChange(state);
private changeHandler;
private updateChange;
/**

@@ -85,4 +85,4 @@ * Destroys the widget.

destroy(): void;
private focusHandler();
private focusOutHandler();
private focusHandler;
private focusOutHandler;
protected getModuleName(): string;

@@ -94,8 +94,8 @@ /**

getPersistData(): string;
private getLabel();
private initialize();
private initWrapper();
private keyDownHandler();
private labelRippleHandler(e);
private mouseDownHandler();
private getLabel;
private initialize;
private initWrapper;
private keyDownHandler;
private labelRippleHandler;
private mouseDownHandler;
/**

@@ -116,4 +116,4 @@ * Called internally if any of the property value changes.

protected render(): void;
private setDisabled();
private setText(text);
private setDisabled;
private setText;
protected unWireEvents(): void;

@@ -120,0 +120,0 @@ protected wireEvents(): void;

var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -53,2 +56,5 @@ extendStatics(d, b);

this.trigger('change', changeEventArgs);
if (this.tagName === 'EJS-RADIOBUTTON') {
event.stopPropagation();
}
};

@@ -297,2 +303,3 @@ RadioButton.prototype.updateChange = function (state) {

};
var RadioButton_1;
__decorate([

@@ -329,4 +336,3 @@ Event()

return RadioButton;
var RadioButton_1;
}(Component));
export { RadioButton };

@@ -73,4 +73,4 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';

constructor(options?: SwitchModel, element?: string | HTMLInputElement);
private changeState(state?);
private clickHandler(evt?);
private changeState;
private clickHandler;
/**

@@ -81,4 +81,4 @@ * Destroys the Switch widget.

destroy(): void;
private focusHandler();
private focusOutHandler();
private focusHandler;
private focusOutHandler;
/**

@@ -94,5 +94,5 @@ * Gets the module name.

getPersistData(): string;
private getWrapper();
private initialize();
private initWrapper();
private getWrapper;
private initialize;
private initWrapper;
/**

@@ -113,8 +113,8 @@ * Called internally if any of the property value changes.

protected render(): void;
private rippleHandler(e);
private rippleTouchHandler(eventType);
private setDisabled();
private setLabel(onText, offText);
private switchFocusHandler();
private switchMouseUp(e);
private rippleHandler;
private rippleTouchHandler;
private setDisabled;
private setLabel;
private switchFocusHandler;
private switchMouseUp;
/**

@@ -125,4 +125,4 @@ * Toggle the Switch component state into checked/unchecked.

toggle(): void;
private wireEvents();
private unWireEvents();
private wireEvents;
private unWireEvents;
}
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -6,0 +9,0 @@ extendStatics(d, b);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc