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 15.4.30 to 16.1.24

27

CHANGELOG.md

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

### Common
#### Breaking Changes
Pascal casing changes in Button Component.
Enum Name |Old Property Value |New Property Value
-----|-----|-----
IconPosition |left |Left
IconPosition |right |Right
Pascal casing changes in CheckBox Component.
Enum Name |Old Property Value |New Property Value
-----|-----|-----
LabelPosition |after |After
LabelPosition |before |Before
Pascal casing changes in RadioButton Component.
Enum Name |Old Property Value |New Property Value
-----|-----|-----
RadioLabelPosition |after |After
RadioLabelPosition |before |Before
## 15.4.30-preview (2018-02-14)
### CheckBox

@@ -7,0 +34,0 @@

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 15.4.30
* version : 16.1.24
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,3 +11,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,n,i){if(n.tagName===e){for(var a=t.getValue("ej2_instances",n),r=t.createElement("input",{attrs:{type:s}}),o=["change","cssClass","label","labelPosition"],l=t.createElement(e,{className:i,attrs:{role:s,"aria-checked":"false"}}),c=0,d=n.attributes.length;c<d;c++)-1===o.indexOf(n.attributes[c].nodeName)&&r.setAttribute(n.attributes[c].nodeName,n.attributes[c].nodeValue);n.parentNode.insertBefore(r,n),t.detach(n),(n=r).parentNode.insertBefore(l,n),l.appendChild(n),t.setValue("ej2_instances",a,n)}return n}function n(e){for(var t,s=e.childNodes,n=0;n<s.length;n++)if(3===(t=s[n]).nodeType)return t;return null}function i(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var a=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 n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),r=function(e,t,s,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},o="e-rtl",l="e-btn",c="e-primary",d="e-icon-btn",h=function(e){function s(t,s){return e.call(this,t,s)||this}return a(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(c),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(o),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),t.rippleEffect(this.element,{selector:"."+l})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=t.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent?e.classList.add("e-icon-"+this.iconPosition.toLowerCase()):this.element.classList.add(d);var s=this.element.childNodes[0];s&&"Left"===this.iconPosition?this.element.insertBefore(e,s):this.element.appendChild(e)}},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,n=this.element;e.prototype.destroy.call(this),t.removeClass([this.element],[c,o,d,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round"]),["e-ripple","disabled"].forEach(function(e){n.removeAttribute(e)}),this.content&&(n.innerHTML=n.innerHTML.replace(this.content,"")),(s=n.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.onPropertyChanged=function(e,s){for(var i=0,a=Object.keys(e);i<a.length;i++){switch(a[i]){case"isPrimary":e.isPrimary?this.element.classList.add(c):this.element.classList.remove(c);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&&("Left"===this.iconPosition?r.classList.add("e-icon-left"):r.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":(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(" ")),t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(o):this.element.classList.remove(o);break;case"content":var l=n(this.element);l?l.textContent=e.content:(this.element.innerHTML=e.content,this.element.classList.remove(d),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"]))}}},r([t.Property("Left")],s.prototype,"iconPosition",void 0),r([t.Property("")],s.prototype,"iconCss",void 0),r([t.Property(!1)],s.prototype,"disabled",void 0),r([t.Property(!1)],s.prototype,"isPrimary",void 0),r([t.Property("")],s.prototype,"cssClass",void 0),r([t.Property("")],s.prototype,"content",void 0),r([t.Property(!1)],s.prototype,"isToggle",void 0),s=r([t.NotifyPropertyChanges],s)}(t.Component),p=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 n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),m=function(e,t,s,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},u="e-checkbox-disabled",f="e-frame",v="e-ripple-container",y="e-ripple-check",b="e-ripple-stop",g="e-checkbox-wrapper",k=function(e){function n(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return p(n,e),n.prototype.changeState=function(e){var s,n,i=this.getWrapper().getElementsByClassName(f)[0];t.isRippleEnabled&&(n=this.getWrapper().getElementsByClassName(v)[0]),"check"===e?(i.classList.remove("e-stop"),i.classList.add("e-check"),n&&(n.classList.remove(b),n.classList.add(y)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([i],["e-check","e-stop"]),n&&t.removeClass([n],[y,b]),s="false",this.element.checked=!1):(i.classList.remove("e-check"),i.classList.add("e-stop"),n&&(n.classList.remove(y),n.classList.add(b)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},n.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)},n.prototype.destroy=function(){var s=this,n=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(n.parentNode.insertBefore(this.element,n),t.detach(n),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){n.removeAttribute(e)}),this.element.id&&n.setAttribute("id",this.element.id),n.innerHTML="")},n.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},n.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},n.prototype.getModuleName=function(){return"checkbox"},n.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},n.prototype.getWrapper=function(){return this.element.parentElement.parentElement},n.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()},n.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(g)||(e=t.createElement("div",{className:g,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=t.createElement("label",{attrs:{for:this.element.id}}),n=t.createElement("span",{className:"e-icons "+f});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(n),t.isRippleEnabled){var i=t.createElement("span",{className:v});"Before"===this.labelPosition?s.appendChild(i):s.insertBefore(i,n),t.rippleEffect(i,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},n.prototype.keyDownHandler=function(){this.isKeyPressed=!0},n.prototype.labelMouseHandler=function(e){i(e,this.getWrapper().getElementsByClassName(v)[0])},n.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},n.prototype.onPropertyChanged=function(e,s){for(var n=this.getWrapper(),i=0,a=Object.keys(e);i<a.length;i++){switch(a[i]){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,n.classList.remove(u),n.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&n.classList.remove(s.cssClass),n.classList.add(e.cssClass);break;case"enableRtl":e.enableRtl?n.classList.add("e-rtl"):n.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var r=n.getElementsByClassName("e-label")[0],o=n.getElementsByTagName("label")[0];t.detach(r),"After"===e.labelPosition?o.appendChild(r):o.insertBefore(r,n.getElementsByClassName(f)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},n.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s("EJ-CHECKBOX","checkbox",e,g),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},n.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},n.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(u),e.setAttribute("aria-disabled","true")},n.prototype.setText=function(e){var s=this.getWrapper().getElementsByClassName("e-label")[0];if(s)s.textContent=e;else{s=t.createElement("span",{className:"e-label",innerHTML:e});var n=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?n.insertBefore(s,this.getWrapper().getElementsByClassName(f)[0]):n.appendChild(s)}},n.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)},n.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)},m([t.Event()],n.prototype,"change",void 0),m([t.Property(!1)],n.prototype,"checked",void 0),m([t.Property("")],n.prototype,"cssClass",void 0),m([t.Property(!1)],n.prototype,"disabled",void 0),m([t.Property(!1)],n.prototype,"indeterminate",void 0),m([t.Property("")],n.prototype,"label",void 0),m([t.Property("After")],n.prototype,"labelPosition",void 0),m([t.Property("")],n.prototype,"name",void 0),m([t.Property("")],n.prototype,"value",void 0),n=m([t.NotifyPropertyChanges],n)}(t.Component),E=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 n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),C=function(e,t,s,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},H="e-label",P="e-ripple-container",L="e-radio-wrapper",N=function(e){function n(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return E(n,e),a=n,n.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t)},n.prototype.updateChange=function(e){for(var s,n=this.element.getAttribute("name"),i=document.querySelectorAll('input.e-radio[name="'+n+'"]'),r=0;r<i.length;r++)(s=i[r])!==this.element&&(t.getInstance(s,a).checked=!1)},n.prototype.destroy=function(){var s=this,n=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(n.parentNode.insertBefore(this.element,n),t.detach(n),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){n.removeAttribute(e)}),this.element.id&&n.setAttribute("id",this.element.id),n.innerHTML="")},n.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},n.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},n.prototype.getModuleName=function(){return"radio"},n.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},n.prototype.getLabel=function(){return this.element.nextElementSibling},n.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()},n.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(L)||(s=t.createElement("div",{className:L}),this.element.parentNode.insertBefore(s,this.element));var n=t.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(n),t.isRippleEnabled&&(e=t.createElement("span",{className:P}),n.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&n.classList.add("e-rtl"),this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.label&&this.setText(this.label)},n.prototype.keyDownHandler=function(){this.isKeyPressed=!0},n.prototype.labelRippleHandler=function(e){i(e,this.getLabel().getElementsByClassName(P)[0])},n.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},n.prototype.onPropertyChanged=function(e,t){for(var s=this.getLabel(),n=0,i=Object.keys(e);n<i.length;n++){switch(i[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":t.cssClass&&s.classList.remove(t.cssClass),s.classList.add(e.cssClass);break;case"enableRtl":e.enableRtl?s.classList.add("e-rtl"):s.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?s.classList.add("e-right"):s.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},n.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s("EJ-RADIOBUTTON","radio",e,L),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},n.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},n.prototype.setDisabled=function(){this.element.disabled=!0},n.prototype.setText=function(e){var s=this.getLabel(),n=s.getElementsByClassName(H)[0];n?n.textContent=e:(n=t.createElement("span",{className:H,innerHTML:e}),s.appendChild(n)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},n.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(H)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler))},n.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(H)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this))},C([t.Event()],n.prototype,"change",void 0),C([t.Property(!1)],n.prototype,"checked",void 0),C([t.Property("")],n.prototype,"cssClass",void 0),C([t.Property(!1)],n.prototype,"disabled",void 0),C([t.Property("")],n.prototype,"label",void 0),C([t.Property("After")],n.prototype,"labelPosition",void 0),C([t.Property("")],n.prototype,"name",void 0),C([t.Property("")],n.prototype,"value",void 0),n=a=C([t.NotifyPropertyChanges],n);var a}(t.Component);e.wrapperInitialize=s,e.getTextNode=n,e.createCheckBox=function(e,s){void 0===e&&(e=!1),void 0===s&&(s={});var n=t.createElement("div",{className:"e-checkbox-wrapper e-css"});if(s.cssClass&&t.addClass([n],s.cssClass.split(" ")),s.enableRtl&&n.classList.add("e-rtl"),e){var i=t.createElement("span",{className:"e-ripple-container"});t.rippleEffect(i,{isCenterRipple:!0,duration:400}),n.appendChild(i)}var a=t.createElement("span",{className:"e-frame e-icons"});if(s.checked&&a.classList.add("e-check"),n.appendChild(a),s.label){var r=t.createElement("span",{className:"e-label",innerHTML:s.label});n.appendChild(r)}return n},e.rippleMouseHandler=i,e.Button=h,e.CheckBox=k,e.RadioButton=N,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,n,i){if(n.tagName===e){for(var a=t.getValue("ej2_instances",n),r=t.createElement("input",{attrs:{type:s}}),o=["change","cssClass","label","labelPosition"],l=t.createElement(e,{className:i,attrs:{role:s,"aria-checked":"false"}}),c=0,d=n.attributes.length;c<d;c++)-1===o.indexOf(n.attributes[c].nodeName)&&r.setAttribute(n.attributes[c].nodeName,n.attributes[c].nodeValue);n.parentNode.insertBefore(r,n),t.detach(n),(n=r).parentNode.insertBefore(l,n),l.appendChild(n),t.setValue("ej2_instances",a,n)}return n}function n(e){for(var t,s=e.childNodes,n=0;n<s.length;n++)if(3===(t=s[n]).nodeType)return t;return null}function i(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var a=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 n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),r=function(e,t,s,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},o="e-rtl",l="e-btn",c="e-primary",d="e-icon-btn",h=function(e){function s(t,s){return e.call(this,t,s)||this}return a(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(c),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(o),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),t.rippleEffect(this.element,{selector:"."+l})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=t.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?e.classList.add("e-icon-"+this.iconPosition.toLowerCase()):this.element.classList.add(d);var s=this.element.childNodes[0];s&&"Left"===this.iconPosition?this.element.insertBefore(e,s):this.element.appendChild(e)}},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,n=this.element;e.prototype.destroy.call(this),t.removeClass([this.element],[c,o,d,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round"]),["e-ripple","disabled"].forEach(function(e){n.removeAttribute(e)}),this.content&&(n.innerHTML=n.innerHTML.replace(this.content,"")),(s=n.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.onPropertyChanged=function(e,s){for(var i=0,a=Object.keys(e);i<a.length;i++){switch(a[i]){case"isPrimary":e.isPrimary?this.element.classList.add(c):this.element.classList.remove(c);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":(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(" ")),t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(o):this.element.classList.remove(o);break;case"content":n(this.element)||this.element.classList.remove(d),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"]))}}},r([t.Property("Left")],s.prototype,"iconPosition",void 0),r([t.Property("")],s.prototype,"iconCss",void 0),r([t.Property(!1)],s.prototype,"disabled",void 0),r([t.Property(!1)],s.prototype,"isPrimary",void 0),r([t.Property("")],s.prototype,"cssClass",void 0),r([t.Property("")],s.prototype,"content",void 0),r([t.Property(!1)],s.prototype,"isToggle",void 0),s=r([t.NotifyPropertyChanges],s)}(t.Component),p=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 n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),m=function(e,t,s,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},u="e-checkbox-disabled",f="e-frame",v="e-ripple-container",y="e-ripple-check",b="e-ripple-stop",g="e-checkbox-wrapper",k=function(e){function n(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return p(n,e),n.prototype.changeState=function(e){var s,n,i=this.getWrapper().getElementsByClassName(f)[0];t.isRippleEnabled&&(n=this.getWrapper().getElementsByClassName(v)[0]),"check"===e?(i.classList.remove("e-stop"),i.classList.add("e-check"),n&&(n.classList.remove(b),n.classList.add(y)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([i],["e-check","e-stop"]),n&&t.removeClass([n],[y,b]),s="false",this.element.checked=!1):(i.classList.remove("e-check"),i.classList.add("e-stop"),n&&(n.classList.remove(y),n.classList.add(b)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},n.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)},n.prototype.destroy=function(){var s=this,n=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(n.parentNode.insertBefore(this.element,n),t.detach(n),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){n.removeAttribute(e)}),this.element.id&&n.setAttribute("id",this.element.id),n.innerHTML="")},n.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},n.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},n.prototype.getModuleName=function(){return"checkbox"},n.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},n.prototype.getWrapper=function(){return this.element.parentElement.parentElement},n.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()},n.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(g)||(e=t.createElement("div",{className:g,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=t.createElement("label",{attrs:{for:this.element.id}}),n=t.createElement("span",{className:"e-icons "+f});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(n),t.isRippleEnabled){var i=t.createElement("span",{className:v});"Before"===this.labelPosition?s.appendChild(i):s.insertBefore(i,n),t.rippleEffect(i,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},n.prototype.keyDownHandler=function(){this.isKeyPressed=!0},n.prototype.labelMouseHandler=function(e){i(e,this.getWrapper().getElementsByClassName(v)[0])},n.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},n.prototype.onPropertyChanged=function(e,s){for(var n=this.getWrapper(),i=0,a=Object.keys(e);i<a.length;i++){switch(a[i]){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,n.classList.remove(u),n.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&n.classList.remove(s.cssClass),n.classList.add(e.cssClass);break;case"enableRtl":e.enableRtl?n.classList.add("e-rtl"):n.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var r=n.getElementsByClassName("e-label")[0],o=n.getElementsByTagName("label")[0];t.detach(r),"After"===e.labelPosition?o.appendChild(r):o.insertBefore(r,n.getElementsByClassName(f)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},n.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s("EJS-CHECKBOX","checkbox",e,g),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},n.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},n.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(u),e.setAttribute("aria-disabled","true")},n.prototype.setText=function(e){var s=this.getWrapper().getElementsByClassName("e-label")[0];if(s)s.textContent=e;else{s=t.createElement("span",{className:"e-label",innerHTML:e});var n=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?n.insertBefore(s,this.getWrapper().getElementsByClassName(f)[0]):n.appendChild(s)}},n.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)},n.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)},m([t.Event()],n.prototype,"change",void 0),m([t.Property(!1)],n.prototype,"checked",void 0),m([t.Property("")],n.prototype,"cssClass",void 0),m([t.Property(!1)],n.prototype,"disabled",void 0),m([t.Property(!1)],n.prototype,"indeterminate",void 0),m([t.Property("")],n.prototype,"label",void 0),m([t.Property("After")],n.prototype,"labelPosition",void 0),m([t.Property("")],n.prototype,"name",void 0),m([t.Property("")],n.prototype,"value",void 0),n=m([t.NotifyPropertyChanges],n)}(t.Component),E=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 n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),C=function(e,t,s,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(a<3?i(r):a>3?i(t,s,r):i(t,s))||r);return a>3&&r&&Object.defineProperty(t,s,r),r},H="e-label",P="e-ripple-container",L="e-radio-wrapper",N=function(e){function n(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return E(n,e),a=n,n.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t)},n.prototype.updateChange=function(e){for(var s,n=this.element.getAttribute("name"),i=document.querySelectorAll('input.e-radio[name="'+n+'"]'),r=0;r<i.length;r++)(s=i[r])!==this.element&&(t.getInstance(s,a).checked=!1)},n.prototype.destroy=function(){var s=this,n=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(n.parentNode.insertBefore(this.element,n),t.detach(n),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){n.removeAttribute(e)}),this.element.id&&n.setAttribute("id",this.element.id),n.innerHTML="")},n.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},n.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},n.prototype.getModuleName=function(){return"radio"},n.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},n.prototype.getLabel=function(){return this.element.nextElementSibling},n.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()},n.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(L)||(s=t.createElement("div",{className:L}),this.element.parentNode.insertBefore(s,this.element));var n=t.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(n),t.isRippleEnabled&&(e=t.createElement("span",{className:P}),n.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&n.classList.add("e-rtl"),this.cssClass&&t.addClass([n],this.cssClass.split(" ")),this.label&&this.setText(this.label)},n.prototype.keyDownHandler=function(){this.isKeyPressed=!0},n.prototype.labelRippleHandler=function(e){i(e,this.getLabel().getElementsByClassName(P)[0])},n.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},n.prototype.onPropertyChanged=function(e,s){for(var n=this.getLabel(),i=0,a=Object.keys(e);i<a.length;i++){switch(a[i]){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([n],s.cssClass.split(" ")),t.addClass([n],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?n.classList.add("e-rtl"):n.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?n.classList.add("e-right"):n.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},n.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s("EJS-RADIOBUTTON","radio",e,L),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},n.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},n.prototype.setDisabled=function(){this.element.disabled=!0},n.prototype.setText=function(e){var s=this.getLabel(),n=s.getElementsByClassName(H)[0];n?n.textContent=e:(n=t.createElement("span",{className:H,innerHTML:e}),s.appendChild(n)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},n.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(H)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler))},n.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(H)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this))},C([t.Event()],n.prototype,"change",void 0),C([t.Property(!1)],n.prototype,"checked",void 0),C([t.Property("")],n.prototype,"cssClass",void 0),C([t.Property(!1)],n.prototype,"disabled",void 0),C([t.Property("")],n.prototype,"label",void 0),C([t.Property("After")],n.prototype,"labelPosition",void 0),C([t.Property("")],n.prototype,"name",void 0),C([t.Property("")],n.prototype,"value",void 0),n=a=C([t.NotifyPropertyChanges],n);var a}(t.Component);e.wrapperInitialize=s,e.getTextNode=n,e.createCheckBox=function(e,s){void 0===e&&(e=!1),void 0===s&&(s={});var n=t.createElement("div",{className:"e-checkbox-wrapper e-css"});if(s.cssClass&&t.addClass([n],s.cssClass.split(" ")),s.enableRtl&&n.classList.add("e-rtl"),e){var i=t.createElement("span",{className:"e-ripple-container"});t.rippleEffect(i,{isCenterRipple:!0,duration:400}),n.appendChild(i)}var a=t.createElement("span",{className:"e-frame e-icons"});if(s.checked&&a.classList.add("e-check"),n.appendChild(a),s.label){var r=t.createElement("span",{className:"e-label",innerHTML:s.label});n.appendChild(r)}return n},e.rippleMouseHandler=i,e.Button=h,e.CheckBox=k,e.RadioButton=N,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-buttons.umd.min.js.map

@@ -152,3 +152,3 @@ import { Component, Event, EventHandler, NotifyPropertyChanges, Property, addClass, createElement, detach, getInstance, getUniqueID, getValue, isRippleEnabled, removeClass, rippleEffect, setValue } from '@syncfusion/ej2-base';

let span = createElement('span', { className: 'e-btn-icon ' + this.iconCss });
if (!this.element.textContent) {
if (!this.element.textContent.trim()) {
this.element.classList.add(cssClassName.ICONBTN);

@@ -249,3 +249,3 @@ }

span.className = 'e-btn-icon ' + newProp.iconCss;
if (this.element.textContent) {
if (this.element.textContent.trim()) {
if (this.iconPosition === 'Left') {

@@ -286,10 +286,7 @@ span.classList.add('e-icon-left');

let node = getTextNode(this.element);
if (node) {
node.textContent = newProp.content;
}
else {
this.element.innerHTML = newProp.content;
if (!node) {
this.element.classList.remove(cssClassName.ICONBTN);
this.setIconCss();
}
this.element.innerHTML = newProp.content;
this.setIconCss();
break;

@@ -623,3 +620,3 @@ case 'isToggle':

this.tagName = this.element.tagName;
element = wrapperInitialize('EJ-CHECKBOX', 'checkbox', element, WRAPPER);
element = wrapperInitialize('EJS-CHECKBOX', 'checkbox', element, WRAPPER);
this.element = element;

@@ -857,3 +854,3 @@ if (this.element.getAttribute('type') !== 'checkbox') {

if (this.cssClass) {
addClass([this.element], this.cssClass.split(' '));
addClass([label], this.cssClass.split(' '));
}

@@ -900,5 +897,5 @@ if (this.label) {

if (oldProp.cssClass) {
label.classList.remove(oldProp.cssClass);
removeClass([label], oldProp.cssClass.split(' '));
}
label.classList.add(newProp.cssClass);
addClass([label], newProp.cssClass.split(' '));
break;

@@ -940,3 +937,3 @@ case 'enableRtl':

this.tagName = this.element.tagName;
element = wrapperInitialize('EJ-RADIOBUTTON', 'radio', element, WRAPPER$1);
element = wrapperInitialize('EJS-RADIOBUTTON', 'radio', element, WRAPPER$1);
this.element = element;

@@ -943,0 +940,0 @@ if (this.element.getAttribute('type') !== 'radio') {

@@ -116,3 +116,3 @@ import { Component, Event, EventHandler, NotifyPropertyChanges, Property, addClass, createElement, detach, getInstance, getUniqueID, getValue, isRippleEnabled, removeClass, rippleEffect, setValue } from '@syncfusion/ej2-base';

*/
var Button = /** @class */ (function (_super) {
var Button = /** @__PURE__ @class */ (function (_super) {
__extends(Button, _super);

@@ -166,3 +166,3 @@ /**

var span = createElement('span', { className: 'e-btn-icon ' + this.iconCss });
if (!this.element.textContent) {
if (!this.element.textContent.trim()) {
this.element.classList.add(cssClassName.ICONBTN);

@@ -264,3 +264,3 @@ }

span.className = 'e-btn-icon ' + newProp.iconCss;
if (this.element.textContent) {
if (this.element.textContent.trim()) {
if (this.iconPosition === 'Left') {

@@ -301,10 +301,7 @@ span.classList.add('e-icon-left');

var node = getTextNode(this.element);
if (node) {
node.textContent = newProp.content;
}
else {
this.element.innerHTML = newProp.content;
if (!node) {
this.element.classList.remove(cssClassName.ICONBTN);
this.setIconCss();
}
this.element.innerHTML = newProp.content;
this.setIconCss();
break;

@@ -391,3 +388,3 @@ case 'isToggle':

*/
var CheckBox = /** @class */ (function (_super) {
var CheckBox = /** @__PURE__ @class */ (function (_super) {
__extends$1(CheckBox, _super);

@@ -654,3 +651,3 @@ /**

this.tagName = this.element.tagName;
element = wrapperInitialize('EJ-CHECKBOX', 'checkbox', element, WRAPPER);
element = wrapperInitialize('EJS-CHECKBOX', 'checkbox', element, WRAPPER);
this.element = element;

@@ -787,3 +784,3 @@ if (this.element.getAttribute('type') !== 'checkbox') {

*/
var RadioButton = /** @class */ (function (_super) {
var RadioButton = /** @__PURE__ @class */ (function (_super) {
__extends$2(RadioButton, _super);

@@ -904,3 +901,3 @@ /**

if (this.cssClass) {
addClass([this.element], this.cssClass.split(' '));
addClass([label], this.cssClass.split(' '));
}

@@ -948,5 +945,5 @@ if (this.label) {

if (oldProp.cssClass) {
label.classList.remove(oldProp.cssClass);
removeClass([label], oldProp.cssClass.split(' '));
}
label.classList.add(newProp.cssClass);
addClass([label], newProp.cssClass.split(' '));
break;

@@ -988,3 +985,3 @@ case 'enableRtl':

this.tagName = this.element.tagName;
element = wrapperInitialize('EJ-RADIOBUTTON', 'radio', element, WRAPPER$1);
element = wrapperInitialize('EJS-RADIOBUTTON', 'radio', element, WRAPPER$1);
this.element = element;

@@ -991,0 +988,0 @@ if (this.element.getAttribute('type') !== 'radio') {

/*!
* filename: index.d.ts
* version : 15.4.27
* version : 15.4.30
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

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

{
"name": "@syncfusion/ej2-buttons",
"version": "15.4.30",
"version": "16.1.24",
"description": "Essential JS 2 Button Components",

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

"dependencies": {
"@syncfusion/ej2-base": "^15.4.23"
"@syncfusion/ej2-base": "^16.1.24"
},

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

@@ -40,3 +40,4 @@ import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Component } from '@syncfusion/ej2-base';import { addClass, createElement, detach, removeClass, rippleEffect, EventHandler } from '@syncfusion/ej2-base';import { getTextNode } from '../common/common';

* Defines class/multiple classes separated by a space in the Button element. The Button types, styles, and
* size can be defined by using [`this`](http://ej2.syncfusion.com/documentation/button/howto.html).
* size can be defined by using
* [`this`](http://ej2.syncfusion.com/documentation/button/howto.html?lang=typescript#create-a-block-button).
* @default ""

@@ -43,0 +44,0 @@ */

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

* Defines class/multiple classes separated by a space in the Button element. The Button types, styles, and
* size can be defined by using [`this`](http://ej2.syncfusion.com/documentation/button/howto.html).
* size can be defined by using
* [`this`](http://ej2.syncfusion.com/documentation/button/howto.html?lang=typescript#create-a-block-button).
* @default ""

@@ -46,0 +47,0 @@ */

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

var span = ej2_base_2.createElement('span', { className: 'e-btn-icon ' + this.iconCss });
if (!this.element.textContent) {
if (!this.element.textContent.trim()) {
this.element.classList.add(cssClassName.ICONBTN);

@@ -142,3 +142,3 @@ }

span.className = 'e-btn-icon ' + newProp.iconCss;
if (this.element.textContent) {
if (this.element.textContent.trim()) {
if (this.iconPosition === 'Left') {

@@ -179,10 +179,7 @@ span.classList.add('e-icon-left');

var node = common_1.getTextNode(this.element);
if (node) {
node.textContent = newProp.content;
}
else {
this.element.innerHTML = newProp.content;
if (!node) {
this.element.classList.remove(cssClassName.ICONBTN);
this.setIconCss();
}
this.element.innerHTML = newProp.content;
this.setIconCss();
break;

@@ -189,0 +186,0 @@ case 'isToggle':

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

this.tagName = this.element.tagName;
element = common_1.wrapperInitialize('EJ-CHECKBOX', 'checkbox', element, WRAPPER);
element = common_1.wrapperInitialize('EJS-CHECKBOX', 'checkbox', element, WRAPPER);
this.element = element;

@@ -271,0 +271,0 @@ if (this.element.getAttribute('type') !== 'checkbox') {

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

import { Component, INotifyPropertyChanged, rippleEffect, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { BaseEventArgs, EmitType, Event, EventHandler } from '@syncfusion/ej2-base';import { addClass, createElement, detach, getInstance, getUniqueID, isRippleEnabled } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler } from './../common/common';
import { Component, INotifyPropertyChanged, rippleEffect, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { addClass, createElement, getInstance, getUniqueID, isRippleEnabled, removeClass } from '@syncfusion/ej2-base';import { BaseEventArgs, detach, EmitType, Event, EventHandler } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler } from './../common/common';
import {ChangeArgs,RadioLabelPosition} from "./radio-button";

@@ -3,0 +3,0 @@ import {ComponentModel} from '@syncfusion/ej2-base';

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

if (input !== this.element) {
ej2_base_3.getInstance(input, RadioButton_1).checked = false;
ej2_base_2.getInstance(input, RadioButton_1).checked = false;
}

@@ -111,10 +111,10 @@ }

if (!wrapper.classList.contains(WRAPPER)) {
wrapper = ej2_base_3.createElement('div', { className: WRAPPER });
wrapper = ej2_base_2.createElement('div', { className: WRAPPER });
this.element.parentNode.insertBefore(wrapper, this.element);
}
var label = ej2_base_3.createElement('label', { attrs: { for: this.element.id } });
var label = ej2_base_2.createElement('label', { attrs: { for: this.element.id } });
wrapper.appendChild(this.element);
wrapper.appendChild(label);
if (ej2_base_3.isRippleEnabled) {
rippleSpan = ej2_base_3.createElement('span', { className: (RIPPLE) });
if (ej2_base_2.isRippleEnabled) {
rippleSpan = ej2_base_2.createElement('span', { className: (RIPPLE) });
label.appendChild(rippleSpan);

@@ -130,3 +130,3 @@ ej2_base_1.rippleEffect(rippleSpan, {

if (this.cssClass) {
ej2_base_3.addClass([this.element], this.cssClass.split(' '));
ej2_base_2.addClass([label], this.cssClass.split(' '));
}

@@ -170,5 +170,5 @@ if (this.label) {

if (oldProp.cssClass) {
label.classList.remove(oldProp.cssClass);
ej2_base_2.removeClass([label], oldProp.cssClass.split(' '));
}
label.classList.add(newProp.cssClass);
ej2_base_2.addClass([label], newProp.cssClass.split(' '));
break;

@@ -206,3 +206,3 @@ case 'enableRtl':

this.tagName = this.element.tagName;
element = common_1.wrapperInitialize('EJ-RADIOBUTTON', 'radio', element, WRAPPER);
element = common_1.wrapperInitialize('EJS-RADIOBUTTON', 'radio', element, WRAPPER);
this.element = element;

@@ -213,3 +213,3 @@ if (this.element.getAttribute('type') !== 'radio') {

if (!this.element.id) {
this.element.id = ej2_base_3.getUniqueID('e-' + this.getModuleName());
this.element.id = ej2_base_2.getUniqueID('e-' + this.getModuleName());
}

@@ -233,3 +233,3 @@ };

else {
textLabel = ej2_base_3.createElement('span', { className: LABEL, innerHTML: text });
textLabel = ej2_base_2.createElement('span', { className: LABEL, innerHTML: text });
label.appendChild(textLabel);

@@ -246,11 +246,11 @@ }

var label = this.getLabel();
ej2_base_2.EventHandler.remove(this.element, 'change', this.changeHandler);
ej2_base_2.EventHandler.remove(document, 'keydown', this.keyDownHandler);
ej2_base_2.EventHandler.remove(label, 'mousedown', this.mouseDownHandler);
ej2_base_2.EventHandler.remove(this.element, 'focus', this.focusHandler);
ej2_base_2.EventHandler.remove(this.element, 'focusout', this.focusOutHandler);
ej2_base_3.EventHandler.remove(this.element, 'change', this.changeHandler);
ej2_base_3.EventHandler.remove(document, 'keydown', this.keyDownHandler);
ej2_base_3.EventHandler.remove(label, 'mousedown', this.mouseDownHandler);
ej2_base_3.EventHandler.remove(this.element, 'focus', this.focusHandler);
ej2_base_3.EventHandler.remove(this.element, 'focusout', this.focusOutHandler);
var rippleLabel = label.getElementsByClassName(LABEL)[0];
if (rippleLabel) {
ej2_base_2.EventHandler.remove(rippleLabel, 'mousedown', this.labelRippleHandler);
ej2_base_2.EventHandler.remove(rippleLabel, 'mouseup', this.labelRippleHandler);
ej2_base_3.EventHandler.remove(rippleLabel, 'mousedown', this.labelRippleHandler);
ej2_base_3.EventHandler.remove(rippleLabel, 'mouseup', this.labelRippleHandler);
}

@@ -260,15 +260,15 @@ };

var label = this.getLabel();
ej2_base_2.EventHandler.add(this.element, 'change', this.changeHandler, this);
ej2_base_2.EventHandler.add(document, 'keydown', this.keyDownHandler, this);
ej2_base_2.EventHandler.add(label, 'mousedown', this.mouseDownHandler, this);
ej2_base_2.EventHandler.add(this.element, 'focus', this.focusHandler, this);
ej2_base_2.EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);
ej2_base_3.EventHandler.add(this.element, 'change', this.changeHandler, this);
ej2_base_3.EventHandler.add(document, 'keydown', this.keyDownHandler, this);
ej2_base_3.EventHandler.add(label, 'mousedown', this.mouseDownHandler, this);
ej2_base_3.EventHandler.add(this.element, 'focus', this.focusHandler, this);
ej2_base_3.EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);
var rippleLabel = label.getElementsByClassName(LABEL)[0];
if (rippleLabel) {
ej2_base_2.EventHandler.add(rippleLabel, 'mousedown', this.labelRippleHandler, this);
ej2_base_2.EventHandler.add(rippleLabel, 'mouseup', this.labelRippleHandler, this);
ej2_base_3.EventHandler.add(rippleLabel, 'mousedown', this.labelRippleHandler, this);
ej2_base_3.EventHandler.add(rippleLabel, 'mouseup', this.labelRippleHandler, this);
}
};
__decorate([
ej2_base_2.Event()
ej2_base_3.Event()
], RadioButton.prototype, "change", void 0);

@@ -275,0 +275,0 @@ __decorate([

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

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