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.27 to 15.4.30

styles/button/_highcontrast-definition.scss

8

CHANGELOG.md

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

- Label text responsive issue fixed.
## 15.4.27-preview (2018-01-30)
### CheckBox
#### Bug Fixes
- Wrapped text overlaps frame icon issue fixed.

@@ -11,0 +19,0 @@

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 15.4.27
* version : 15.4.30
* 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),t.rippleEffect(this.element,{selector:"."+l}),this.wireEvents()},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){this.element.textContent||this.element.classList.add(d);var e=t.createElement("span",{className:"e-btn-icon "+this.iconCss}),s=this.element.childNodes[0];s&&"left"===this.iconPosition?(this.element.insertBefore(e,s),e.classList.add("e-icon-left")):(this.element.appendChild(e),"right"===this.iconPosition&&e.classList.add("e-icon-right"))}},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(this.disabled);break;case"iconCss":var r=this.element.querySelector("span.e-btn-icon");r?(r.className="e-btn-icon "+this.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([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,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?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})});
//# sourceMappingURL=ej2-buttons.umd.min.js.map

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

}
else {
this.wireEvents();
}
rippleEffect(this.element, { selector: '.' + cssClassName.BUTTON });
this.wireEvents();
}

@@ -150,16 +152,15 @@ controlStatus(disabled) {

if (this.iconCss) {
let span = createElement('span', { className: 'e-btn-icon ' + this.iconCss });
if (!this.element.textContent) {
this.element.classList.add(cssClassName.ICONBTN);
}
let span = createElement('span', { className: 'e-btn-icon ' + this.iconCss });
else {
span.classList.add('e-icon-' + this.iconPosition.toLowerCase());
}
let node = this.element.childNodes[0];
if (node && this.iconPosition === 'left') {
if (node && (this.iconPosition === 'Left')) {
this.element.insertBefore(span, node);
span.classList.add('e-icon-left');
}
else {
this.element.appendChild(span);
if (this.iconPosition === 'right') {
span.classList.add('e-icon-right');
}
}

@@ -242,3 +243,4 @@ }

case 'disabled':
this.controlStatus(this.disabled);
this.controlStatus(newProp.disabled);
this.unWireEvents();
break;

@@ -248,5 +250,5 @@ case 'iconCss':

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

@@ -309,3 +311,3 @@ }

__decorate([
Property('left')
Property('Left')
], Button.prototype, "iconPosition", void 0);

@@ -523,3 +525,3 @@ __decorate([

let rippleSpan = createElement('span', { className: RIPPLE });
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
label.appendChild(rippleSpan);

@@ -601,3 +603,3 @@ }

detach(label);
if (newProp.labelPosition === 'after') {
if (newProp.labelPosition === 'After') {
labelWrap.appendChild(label);

@@ -659,3 +661,3 @@ }

let labelWrap = this.getWrapper().getElementsByTagName('label')[0];
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName(FRAME)[0]);

@@ -710,3 +712,3 @@ }

__decorate$1([
Property('after')
Property('After')
], CheckBox.prototype, "labelPosition", void 0);

@@ -860,3 +862,3 @@ __decorate$1([

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

@@ -919,3 +921,3 @@ if (this.label) {

case 'labelPosition':
if (newProp.labelPosition === 'before') {
if (newProp.labelPosition === 'Before') {
label.classList.add('e-right');

@@ -975,3 +977,3 @@ }

}
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
this.getLabel().classList.add('e-right');

@@ -1026,3 +1028,3 @@ }

__decorate$2([
Property('after')
Property('After')
], RadioButton.prototype, "labelPosition", void 0);

@@ -1029,0 +1031,0 @@ __decorate$2([

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

}
else {
this.wireEvents();
}
rippleEffect(this.element, { selector: '.' + cssClassName.BUTTON });
this.wireEvents();
};

@@ -163,16 +165,15 @@ Button.prototype.controlStatus = function (disabled) {

if (this.iconCss) {
var span = createElement('span', { className: 'e-btn-icon ' + this.iconCss });
if (!this.element.textContent) {
this.element.classList.add(cssClassName.ICONBTN);
}
var span = createElement('span', { className: 'e-btn-icon ' + this.iconCss });
else {
span.classList.add('e-icon-' + this.iconPosition.toLowerCase());
}
var node = this.element.childNodes[0];
if (node && this.iconPosition === 'left') {
if (node && (this.iconPosition === 'Left')) {
this.element.insertBefore(span, node);
span.classList.add('e-icon-left');
}
else {
this.element.appendChild(span);
if (this.iconPosition === 'right') {
span.classList.add('e-icon-right');
}
}

@@ -256,3 +257,4 @@ }

case 'disabled':
this.controlStatus(this.disabled);
this.controlStatus(newProp.disabled);
this.unWireEvents();
break;

@@ -262,5 +264,5 @@ case 'iconCss':

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

@@ -322,3 +324,3 @@ }

__decorate([
Property('left')
Property('Left')
], Button.prototype, "iconPosition", void 0);

@@ -551,3 +553,3 @@ __decorate([

var rippleSpan = createElement('span', { className: RIPPLE });
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
label.appendChild(rippleSpan);

@@ -630,3 +632,3 @@ }

detach(label);
if (newProp.labelPosition === 'after') {
if (newProp.labelPosition === 'After') {
labelWrap.appendChild(label);

@@ -688,3 +690,3 @@ }

var labelWrap = this.getWrapper().getElementsByTagName('label')[0];
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName(FRAME)[0]);

@@ -738,3 +740,3 @@ }

__decorate$1([
Property('after')
Property('After')
], CheckBox.prototype, "labelPosition", void 0);

@@ -904,3 +906,3 @@ __decorate$1([

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

@@ -964,3 +966,3 @@ if (this.label) {

case 'labelPosition':
if (newProp.labelPosition === 'before') {
if (newProp.labelPosition === 'Before') {
label.classList.add('e-right');

@@ -1020,3 +1022,3 @@ }

}
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
this.getLabel().classList.add('e-right');

@@ -1070,3 +1072,3 @@ }

__decorate$2([
Property('after')
Property('After')
], RadioButton.prototype, "labelPosition", void 0);

@@ -1073,0 +1075,0 @@ __decorate$2([

/*!
* filename: index.d.ts
* version : 15.4.26
* version : 15.4.27
* 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.27",
"version": "15.4.30",
"description": "Essential JS 2 Button Components",

@@ -5,0 +5,0 @@ "author": "Syncfusion Inc.",

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

import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Component } from '@syncfusion/ej2-base';import { rippleEffect, EventHandler } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, detach } from '@syncfusion/ej2-base';import { getTextNode } from '../common/common';
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';
import {IconPosition} from "./button";

@@ -13,4 +13,4 @@ import {ComponentModel} from '@syncfusion/ej2-base';

* The possible values are:
* * left: The icon will be positioned to the left of the text content.
* * right: The icon will be positioned to the right of the text content.
* * Left: The icon will be positioned to the left of the text content.
* * Right: The icon will be positioned to the right of the text content.
* @default "left"

@@ -29,3 +29,3 @@ */

* Specifies a value that indicates whether the Button is `disabled` or not.
* @default false
* @default false.
*/

@@ -42,3 +42,3 @@ disabled?: boolean;

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

@@ -45,0 +45,0 @@ */

import { INotifyPropertyChanged, Component } from '@syncfusion/ej2-base';
import { ButtonModel } from './button-model';
export declare type IconPosition = 'left' | 'right';
export declare type IconPosition = 'Left' | 'Right';
/**

@@ -20,4 +20,4 @@ * The Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both.

* The possible values are:
* * left: The icon will be positioned to the left of the text content.
* * right: The icon will be positioned to the right of the text content.
* * Left: The icon will be positioned to the left of the text content.
* * Right: The icon will be positioned to the right of the text content.
* @default "left"

@@ -34,3 +34,3 @@ */

* Specifies a value that indicates whether the Button is `disabled` or not.
* @default false
* @default false.
*/

@@ -45,3 +45,3 @@ disabled: boolean;

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

@@ -48,0 +48,0 @@ */

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

};
define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "../common/common"], function (require, exports, ej2_base_1, ej2_base_2, ej2_base_3, common_1) {
define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "../common/common"], function (require, exports, ej2_base_1, ej2_base_2, common_1) {
"use strict";

@@ -39,3 +39,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

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

@@ -55,4 +55,6 @@ if (this.isPrimary) {

}
else {
this.wireEvents();
}
ej2_base_2.rippleEffect(this.element, { selector: '.' + cssClassName.BUTTON });
this.wireEvents();
};

@@ -64,16 +66,15 @@ Button.prototype.controlStatus = function (disabled) {

if (this.iconCss) {
var span = ej2_base_2.createElement('span', { className: 'e-btn-icon ' + this.iconCss });
if (!this.element.textContent) {
this.element.classList.add(cssClassName.ICONBTN);
}
var span = ej2_base_3.createElement('span', { className: 'e-btn-icon ' + this.iconCss });
else {
span.classList.add('e-icon-' + this.iconPosition.toLowerCase());
}
var node = this.element.childNodes[0];
if (node && this.iconPosition === 'left') {
if (node && (this.iconPosition === 'Left')) {
this.element.insertBefore(span, node);
span.classList.add('e-icon-left');
}
else {
this.element.appendChild(span);
if (this.iconPosition === 'right') {
span.classList.add('e-icon-right');
}
}

@@ -104,3 +105,3 @@ }

_super.prototype.destroy.call(this);
ej2_base_3.removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success',
ej2_base_2.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']);

@@ -115,3 +116,3 @@ ['e-ripple', 'disabled'].forEach(function (value) {

if (span) {
ej2_base_3.detach(span);
ej2_base_2.detach(span);
}

@@ -139,3 +140,4 @@ this.unWireEvents();

case 'disabled':
this.controlStatus(this.disabled);
this.controlStatus(newProp.disabled);
this.unWireEvents();
break;

@@ -145,5 +147,5 @@ case 'iconCss':

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

@@ -163,3 +165,3 @@ }

if (span) {
ej2_base_3.detach(span);
ej2_base_2.detach(span);
}

@@ -170,5 +172,5 @@ this.setIconCss();

if (oldProp.cssClass) {
ej2_base_3.removeClass([this.element], oldProp.cssClass.split(' '));
ej2_base_2.removeClass([this.element], oldProp.cssClass.split(' '));
}
ej2_base_3.addClass([this.element], newProp.cssClass.split(' '));
ej2_base_2.addClass([this.element], newProp.cssClass.split(' '));
break;

@@ -200,3 +202,3 @@ case 'enableRtl':

ej2_base_2.EventHandler.remove(this.element, 'click', this.btnClickHandler);
ej2_base_3.removeClass([this.element], ['e-active']);
ej2_base_2.removeClass([this.element], ['e-active']);
}

@@ -208,3 +210,3 @@ break;

__decorate([
ej2_base_1.Property('left')
ej2_base_1.Property('Left')
], Button.prototype, "iconPosition", void 0);

@@ -211,0 +213,0 @@ __decorate([

@@ -53,5 +53,5 @@ import { Component, INotifyPropertyChanged , NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { BaseEventArgs, EmitType, Event, EventHandler, KeyboardEvents } from '@syncfusion/ej2-base';import { addClass, createElement, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler } from './../common/common';

* The possible values are:
* * before - The label is positioned to left of the CheckBox.
* * after - The label is positioned to right of the CheckBox.
* @default 'after'
* * Before - The label is positioned to left of the CheckBox.
* * After - The label is positioned to right of the CheckBox.
* @default 'After'
*/

@@ -58,0 +58,0 @@ labelPosition?: LabelPosition;

import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';
import { BaseEventArgs, EmitType } from '@syncfusion/ej2-base';
import { CheckBoxModel } from './check-box-model';
export declare type LabelPosition = 'after' | 'before';
export declare type LabelPosition = 'After' | 'Before';
/**

@@ -57,5 +57,5 @@ * The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.

* The possible values are:
* * before - The label is positioned to left of the CheckBox.
* * after - The label is positioned to right of the CheckBox.
* @default 'after'
* * Before - The label is positioned to left of the CheckBox.
* * After - The label is positioned to right of the CheckBox.
* @default 'After'
*/

@@ -62,0 +62,0 @@ labelPosition: LabelPosition;

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

var rippleSpan = ej2_base_3.createElement('span', { className: RIPPLE });
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
label.appendChild(rippleSpan);

@@ -250,3 +250,3 @@ }

ej2_base_3.detach(label);
if (newProp.labelPosition === 'after') {
if (newProp.labelPosition === 'After') {
labelWrap.appendChild(label);

@@ -300,3 +300,3 @@ }

var labelWrap = this.getWrapper().getElementsByTagName('label')[0];
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName(FRAME)[0]);

@@ -350,3 +350,3 @@ }

__decorate([
ej2_base_1.Property('after')
ej2_base_1.Property('After')
], CheckBox.prototype, "labelPosition", void 0);

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

@@ -46,5 +46,5 @@ 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';

* The possible values are:
* * before: The label is positioned to left of the RadioButton.
* * after: The label is positioned to right of the RadioButton.
* @default 'after'
* * Before: The label is positioned to left of the RadioButton.
* * After: The label is positioned to right of the RadioButton.
* @default 'After'
*/

@@ -51,0 +51,0 @@ labelPosition?: RadioLabelPosition;

import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';
import { BaseEventArgs, EmitType } from '@syncfusion/ej2-base';
import { RadioButtonModel } from './radio-button-model';
export declare type RadioLabelPosition = 'after' | 'before';
export declare type RadioLabelPosition = 'After' | 'Before';
/**

@@ -50,5 +50,5 @@ * The RadioButton is a graphical user interface element that allows you to select one option from the choices.

* The possible values are:
* * before: The label is positioned to left of the RadioButton.
* * after: The label is positioned to right of the RadioButton.
* @default 'after'
* * Before: The label is positioned to left of the RadioButton.
* * After: The label is positioned to right of the RadioButton.
* @default 'After'
*/

@@ -55,0 +55,0 @@ labelPosition: RadioLabelPosition;

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

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

@@ -184,3 +184,3 @@ if (this.label) {

case 'labelPosition':
if (newProp.labelPosition === 'before') {
if (newProp.labelPosition === 'Before') {
label.classList.add('e-right');

@@ -232,3 +232,3 @@ }

}
if (this.labelPosition === 'before') {
if (this.labelPosition === 'Before') {
this.getLabel().classList.add('e-right');

@@ -282,3 +282,3 @@ }

__decorate([
ej2_base_1.Property('after')
ej2_base_1.Property('After')
], RadioButton.prototype, "labelPosition", void 0);

@@ -285,0 +285,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

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