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.17 to 15.4.20

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 15.4.17
* version : 15.4.20
* 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){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var s=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var n in s)("object"==typeof exports?exports:e)[n]=s[n]}}(this,function(e){return function(e){function t(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){var n,i;n=[s,t,s(1),s(4),s(6),s(8)],void 0!==(i=function(e,t,s,n,i,r){"use strict";function a(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}Object.defineProperty(t,"__esModule",{value:!0}),a(s),a(n),a(i),a(r)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(2)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(3),s(3)],void 0!==(i=function(e,t,s,n){"use strict";function i(e,t,i,r){if(i.tagName===e){for(var a=n.getValue("ej2_instances",i),o=s.createElement("input",{attrs:{type:t}}),l=["change","cssClass","label","labelPosition"],c=s.createElement(e,{className:r,attrs:{role:t,"aria-checked":"false"}}),d=0,p=i.attributes.length;d<p;d++)-1===l.indexOf(i.attributes[d].nodeName)&&o.setAttribute(i.attributes[d].nodeName,i.attributes[d].nodeValue);i.parentNode.insertBefore(o,i),s.detach(i),i=o,i.parentNode.insertBefore(c,i),c.appendChild(i),n.setValue("ej2_instances",a,i)}return i}function r(e){for(var t,s=e.childNodes,n=0;n<s.length;n++)if(t=s[n],3===t.nodeType)return t;return null}function a(e,t){void 0===e&&(e=!1),void 0===t&&(t={});var n=s.createElement("div",{className:"e-checkbox-wrapper"});if(t.enableRtl&&n.classList.add("e-rtl"),e){var i=s.createElement("span",{className:"e-ripple-container"});s.rippleEffect(i,{isCenterRipple:!0,duration:400}),n.appendChild(i)}var r=s.createElement("span",{className:"e-frame e-icons"});if(t.checked&&r.classList.add("e-check"),n.appendChild(r),t.label){var a=s.createElement("span",{className:"e-label",innerHTML:t.label});n.appendChild(a)}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperInitialize=i,t.getTextNode=r,t.createCheckBox=a}.apply(t,n))&&(e.exports=i)},function(t,s){t.exports=e},function(e,t,s){var n,i;n=[s,t,s(5)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i,r=this&&this.__extends||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)}}(),a=this&&this.__decorate||function(e,t,s,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(r<3?i(a):r>3?i(t,s,a):i(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};n=[s,t,s(3),s(3),s(3),s(2)],void 0!==(i=function(e,t,s,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},c=function(e){function t(t,s){return e.call(this,t,s)||this}return r(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize()},t.prototype.initialize=function(){this.cssClass&&i.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(l.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(l.RTL),this.disabled&&this.controlStatus(this.disabled),n.rippleEffect(this.element,{selector:"."+l.BUTTON}),this.wireEvents()},t.prototype.controlStatus=function(e){this.element.disabled=e},t.prototype.setIconCss=function(){if(this.iconCss){this.element.textContent||this.element.classList.add(l.ICONBTN);var e=i.createElement("span",{className:"e-btn-icon "+this.iconCss}),t=this.element.childNodes[0];t&&"left"===this.iconPosition?(this.element.insertBefore(e,t),e.classList.add("e-icon-left")):(this.element.appendChild(e),"right"===this.iconPosition&&e.classList.add("e-icon-right"))}},t.prototype.wireEvents=function(){this.isToggle&&n.EventHandler.add(this.element,"click",this.btnClickHandler,this)},t.prototype.unWireEvents=function(){this.isToggle&&n.EventHandler.remove(this.element,"click",this.btnClickHandler)},t.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},t.prototype.destroy=function(){var t,s=this.element;e.prototype.destroy.call(this),i.removeClass([this.element],[l.PRIMARY,l.RTL,l.ICONBTN,"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){s.removeAttribute(e)}),this.content&&(s.innerHTML=s.innerHTML.replace(this.content,"")),t=s.querySelector("span.e-btn-icon"),t&&i.detach(t),this.unWireEvents()},t.prototype.getModuleName=function(){return"btn"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var s=0,r=Object.keys(e);s<r.length;s++){switch(r[s]){case"isPrimary":e.isPrimary?this.element.classList.add(l.PRIMARY):this.element.classList.remove(l.PRIMARY);break;case"disabled":this.controlStatus(this.disabled);break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+this.iconCss,this.element.textContent&&("left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":a=this.element.querySelector("span.e-btn-icon"),a&&i.detach(a),this.setIconCss();break;case"cssClass":t.cssClass&&i.removeClass([this.element],t.cssClass.split(" ")),i.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(l.RTL):this.element.classList.remove(l.RTL);break;case"content":var c=o.getTextNode(this.element);c?c.textContent=e.content:(this.element.innerHTML=e.content,this.element.classList.remove(l.ICONBTN),this.setIconCss());break;case"isToggle":e.isToggle?n.EventHandler.add(this.element,"click",this.btnClickHandler,this):(n.EventHandler.remove(this.element,"click",this.btnClickHandler),i.removeClass([this.element],["e-active"]))}}},t}(s.Component);a([s.Property("left")],c.prototype,"iconPosition",void 0),a([s.Property("")],c.prototype,"iconCss",void 0),a([s.Property(!1)],c.prototype,"disabled",void 0),a([s.Property(!1)],c.prototype,"isPrimary",void 0),a([s.Property("")],c.prototype,"cssClass",void 0),a([s.Property("")],c.prototype,"content",void 0),a([s.Property(!1)],c.prototype,"isToggle",void 0),c=a([s.NotifyPropertyChanges],c),t.Button=c,t.buttonBuilder=n.CreateBuilder(c)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(7)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i,r=this&&this.__extends||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)}}(),a=this&&this.__decorate||function(e,t,s,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(r<3?i(a):r>3?i(t,s,a):i(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};n=[s,t,s(3),s(3),s(3),s(3)],void 0!==(i=function(e,t,s,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l="e-ripple-container",c="e-checkbox-wrapper",d=function(e){function t(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return r(t,e),t.prototype.changeState=function(e){var t,s,n=this.getWrapper().getElementsByClassName("e-frame")[0];i.isRippleEnabled&&(s=this.getWrapper().getElementsByClassName(l)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),s&&(s.classList.remove("e-ripple-stop"),s.classList.add("e-ripple-check")),t="true",this.element.checked=!0):"uncheck"===e?(i.removeClass([n],["e-check","e-stop"]),s&&i.removeClass([s],["e-ripple-check","e-ripple-stop"]),t="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),s&&(s.classList.remove("e-ripple-check"),s.classList.add("e-ripple-stop")),t="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",t)},t.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)},t.prototype.destroy=function(){var t=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),t.parentNode.insertBefore(this.element,t),i.detach(t),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),this.name&&this.element.removeAttribute("name"),this.value&&this.element.removeAttribute("value"),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},t.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},t.prototype.getModuleName=function(){return"checkbox"},t.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},t.prototype.getWrapper=function(){return this.element.parentElement.parentElement},t.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()},t.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(c)||(e=i.createElement("div",{className:c,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var t=i.createElement("label",{attrs:{for:this.element.id}}),s=i.createElement("span",{className:"e-icons e-frame"});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&i.addClass([e],this.cssClass.split(" ")),e.appendChild(t),t.appendChild(this.element),t.appendChild(s),i.isRippleEnabled){var n=i.createElement("span",{className:l});"before"===this.labelPosition?t.appendChild(n):t.insertBefore(n,s),i.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},t.prototype.keyActionHandler=function(e){"space"===e.action&&(e.preventDefault(),this.clickHandler(e),this.focusHandler())},t.prototype.keyDownHandler=function(){this.isKeyPressed=!0},t.prototype.labelMouseHandler=function(e){var t=this.getWrapper().getElementsByClassName(l)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}},t.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},t.prototype.onPropertyChanged=function(e,t){for(var s=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove("e-checkbox-disabled"),s.setAttribute("aria-disabled","false"),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":var a=s.getElementsByClassName("e-label")[0],o=s.getElementsByTagName("label")[0];i.detach(a),"after"===e.labelPosition?o.appendChild(a):o.insertBefore(a,s.getElementsByClassName("e-frame")[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},t.prototype.preRender=function(){if("EJ-CHECKBOX"===this.element.tagName){for(var e=o.getValue("ej2_instances",this.element),t=i.createElement("input",{attrs:{type:"checkbox"}}),s=["change","cssClass","indeterminate","label","labelPosition"],n=i.createElement("EJ-CHECKBOX",{className:c,attrs:{role:"checkbox","aria-checked":"false"}}),r=0,a=this.element.attributes.length;r<a;r++)-1===s.indexOf(this.element.attributes[r].nodeName)&&t.setAttribute(this.element.attributes[r].nodeName,this.element.attributes[r].nodeValue);this.element.parentNode.insertBefore(t,this.element),i.detach(this.element),this.element=t,this.element.parentNode.insertBefore(n,this.element),n.appendChild(this.element),o.setValue("ej2_instances",e,this.element)}"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=o.getUniqueID("e-"+this.getModuleName()))},t.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},t.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},t.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=i.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName("e-frame")[0]):s.appendChild(t)}},t.prototype.unWireEvents=function(){var e=this.getWrapper();n.EventHandler.remove(this.element,"click",this.clickHandler),this.keyboardModule.destroy(),n.EventHandler.remove(document,"keydown",this.keyDownHandler),n.EventHandler.remove(e,"mousedown",this.mouseDownHandler),n.EventHandler.remove(this.element,"focus",this.focusHandler),n.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var t=e.getElementsByTagName("label")[0];n.EventHandler.remove(t,"mousedown",this.labelMouseHandler),n.EventHandler.remove(t,"mouseup",this.labelMouseHandler)},t.prototype.wireEvents=function(){var e=this.getWrapper();n.EventHandler.add(this.element,"click",this.clickHandler,this),this.keyboardModule=new n.KeyboardEvents(e,{eventName:"keyup",keyAction:this.keyActionHandler.bind(this),keyConfigs:{space:"space"}}),n.EventHandler.add(document,"keydown",this.keyDownHandler,this),n.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),n.EventHandler.add(this.element,"focus",this.focusHandler,this),n.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var t=e.getElementsByTagName("label")[0];n.EventHandler.add(t,"mousedown",this.labelMouseHandler,this),n.EventHandler.add(t,"mouseup",this.labelMouseHandler,this)},t}(s.Component);a([n.Event()],d.prototype,"change",void 0),a([s.Property(!1)],d.prototype,"checked",void 0),a([s.Property("")],d.prototype,"cssClass",void 0),a([s.Property(!1)],d.prototype,"disabled",void 0),a([s.Property(!1)],d.prototype,"indeterminate",void 0),a([s.Property("")],d.prototype,"label",void 0),a([s.Property("after")],d.prototype,"labelPosition",void 0),a([s.Property("")],d.prototype,"name",void 0),a([s.Property("")],d.prototype,"value",void 0),d=a([s.NotifyPropertyChanges],d),t.CheckBox=d,t.checkBoxBuilder=s.CreateBuilder(d)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(9)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i,r=this&&this.__extends||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)}}(),a=this&&this.__decorate||function(e,t,s,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(r<3?i(a):r>3?i(t,s,a):i(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};n=[s,t,s(3),s(3),s(3),s(3),s(2)],void 0!==(i=function(e,t,s,n,i,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-radio-wrapper",d=function(e){function t(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return r(t,e),t.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={checked:!0,event:e};this.trigger("change",t)},t.prototype.updateChange=function(e){for(var t,s=this.element.getAttribute("name"),n=document.querySelectorAll('input.e-radio[name="'+s+'"]'),i=0;i<n.length;i++)(t=n[i])!==this.element&&(t.ej2_instances[0].checked=!1)},t.prototype.destroy=function(){var t=this.getLabel();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),i.detach(t),this.element.checked=!1,this.name&&this.element.removeAttribute("name"),this.value&&this.element.removeAttribute("value"),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},t.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},t.prototype.getModuleName=function(){return"radio"},t.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},t.prototype.getLabel=function(){return this.element.nextElementSibling},t.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()},t.prototype.initWrapper=function(){var e,t=this.element.parentElement;t.classList.contains(c)||(t=i.createElement("div",{className:c}),this.element.parentNode.insertBefore(t,this.element));var n=i.createElement("label",{attrs:{for:this.element.id}});t.appendChild(this.element),t.appendChild(n),i.isRippleEnabled&&(e=i.createElement("span",{className:"e-ripple-container"}),n.appendChild(e),s.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&n.classList.add("e-rtl"),this.cssClass&&i.addClass([n],this.cssClass.split(" ")),this.label&&this.setText(this.label)},t.prototype.keyDownHandler=function(){this.isKeyPressed=!0},t.prototype.labelRippleHandler=function(e){var t=this.getLabel().getElementsByClassName("e-ripple-container")[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!0,!0),t.dispatchEvent(s)}},t.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},t.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)}}},t.prototype.preRender=function(){var e=this.element;e=l.wrapperInitialize("EJ-RADIOBUTTON","radio",e,c),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=o.getUniqueID("e-"+this.getModuleName()))},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},t.prototype.setDisabled=function(){this.element.disabled=!0},t.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName("e-label")[0];s?s.textContent=e:(s=i.createElement("span",{className:"e-label",innerHTML:e}),t.appendChild(s)),"before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},t.prototype.unWireEvents=function(){var e=this.getLabel();n.EventHandler.remove(this.element,"change",this.changeHandler),n.EventHandler.remove(document,"keydown",this.keyDownHandler),n.EventHandler.remove(e,"mousedown",this.mouseDownHandler),n.EventHandler.remove(this.element,"focus",this.focusHandler),n.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var t=e.getElementsByClassName("e-label")[0];t&&(n.EventHandler.remove(t,"mousedown",this.labelRippleHandler),n.EventHandler.remove(t,"mouseup",this.labelRippleHandler))},t.prototype.wireEvents=function(){var e=this.getLabel();n.EventHandler.add(this.element,"change",this.changeHandler,this),n.EventHandler.add(document,"keydown",this.keyDownHandler,this),n.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),n.EventHandler.add(this.element,"focus",this.focusHandler,this),n.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var t=e.getElementsByClassName("e-label")[0];t&&(n.EventHandler.add(t,"mousedown",this.labelRippleHandler,this),n.EventHandler.add(t,"mouseup",this.labelRippleHandler,this))},t}(s.Component);a([n.Event()],d.prototype,"change",void 0),a([s.Property(!1)],d.prototype,"checked",void 0),a([s.Property("")],d.prototype,"cssClass",void 0),a([s.Property(!1)],d.prototype,"disabled",void 0),a([s.Property("")],d.prototype,"label",void 0),a([s.Property("after")],d.prototype,"labelPosition",void 0),a([s.Property("")],d.prototype,"name",void 0),a([s.Property("")],d.prototype,"value",void 0),d=a([s.NotifyPropertyChanges],d),t.RadioButton=d,t.radioButtonBuilder=s.CreateBuilder(d)}.apply(t,n))&&(e.exports=i)}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var s=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var n in s)("object"==typeof exports?exports:e)[n]=s[n]}}(this,function(e){return function(e){function t(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){var n,i;n=[s,t,s(1),s(4),s(6),s(8)],void 0!==(i=function(e,t,s,n,i,r){"use strict";function a(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}Object.defineProperty(t,"__esModule",{value:!0}),a(s),a(n),a(i),a(r)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(2)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(3),s(3)],void 0!==(i=function(e,t,s,n){"use strict";function i(e,t,i,r){if(i.tagName===e){for(var a=n.getValue("ej2_instances",i),o=s.createElement("input",{attrs:{type:t}}),l=["change","cssClass","label","labelPosition"],c=s.createElement(e,{className:r,attrs:{role:t,"aria-checked":"false"}}),d=0,p=i.attributes.length;d<p;d++)-1===l.indexOf(i.attributes[d].nodeName)&&o.setAttribute(i.attributes[d].nodeName,i.attributes[d].nodeValue);i.parentNode.insertBefore(o,i),s.detach(i),i=o,i.parentNode.insertBefore(c,i),c.appendChild(i),n.setValue("ej2_instances",a,i)}return i}function r(e){for(var t,s=e.childNodes,n=0;n<s.length;n++)if(t=s[n],3===t.nodeType)return t;return null}function a(e,t){void 0===e&&(e=!1),void 0===t&&(t={});var n=s.createElement("div",{className:"e-checkbox-wrapper"});if(t.enableRtl&&n.classList.add("e-rtl"),e){var i=s.createElement("span",{className:"e-ripple-container"});s.rippleEffect(i,{isCenterRipple:!0,duration:400}),n.appendChild(i)}var r=s.createElement("span",{className:"e-frame e-icons"});if(t.checked&&r.classList.add("e-check"),n.appendChild(r),t.label){var a=s.createElement("span",{className:"e-label",innerHTML:t.label});n.appendChild(a)}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperInitialize=i,t.getTextNode=r,t.createCheckBox=a}.apply(t,n))&&(e.exports=i)},function(t,s){t.exports=e},function(e,t,s){var n,i;n=[s,t,s(5)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i,r=this&&this.__extends||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)}}(),a=this&&this.__decorate||function(e,t,s,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(r<3?i(a):r>3?i(t,s,a):i(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};n=[s,t,s(3),s(3),s(3),s(2)],void 0!==(i=function(e,t,s,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},c=function(e){function t(t,s){return e.call(this,t,s)||this}return r(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize()},t.prototype.initialize=function(){this.cssClass&&i.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(l.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(l.RTL),this.disabled&&this.controlStatus(this.disabled),n.rippleEffect(this.element,{selector:"."+l.BUTTON}),this.wireEvents()},t.prototype.controlStatus=function(e){this.element.disabled=e},t.prototype.setIconCss=function(){if(this.iconCss){this.element.textContent||this.element.classList.add(l.ICONBTN);var e=i.createElement("span",{className:"e-btn-icon "+this.iconCss}),t=this.element.childNodes[0];t&&"left"===this.iconPosition?(this.element.insertBefore(e,t),e.classList.add("e-icon-left")):(this.element.appendChild(e),"right"===this.iconPosition&&e.classList.add("e-icon-right"))}},t.prototype.wireEvents=function(){this.isToggle&&n.EventHandler.add(this.element,"click",this.btnClickHandler,this)},t.prototype.unWireEvents=function(){this.isToggle&&n.EventHandler.remove(this.element,"click",this.btnClickHandler)},t.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},t.prototype.destroy=function(){var t,s=this.element;e.prototype.destroy.call(this),i.removeClass([this.element],[l.PRIMARY,l.RTL,l.ICONBTN,"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){s.removeAttribute(e)}),this.content&&(s.innerHTML=s.innerHTML.replace(this.content,"")),t=s.querySelector("span.e-btn-icon"),t&&i.detach(t),this.unWireEvents()},t.prototype.getModuleName=function(){return"btn"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var s=0,r=Object.keys(e);s<r.length;s++){switch(r[s]){case"isPrimary":e.isPrimary?this.element.classList.add(l.PRIMARY):this.element.classList.remove(l.PRIMARY);break;case"disabled":this.controlStatus(this.disabled);break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+this.iconCss,this.element.textContent&&("left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":a=this.element.querySelector("span.e-btn-icon"),a&&i.detach(a),this.setIconCss();break;case"cssClass":t.cssClass&&i.removeClass([this.element],t.cssClass.split(" ")),i.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(l.RTL):this.element.classList.remove(l.RTL);break;case"content":var c=o.getTextNode(this.element);c?c.textContent=e.content:(this.element.innerHTML=e.content,this.element.classList.remove(l.ICONBTN),this.setIconCss());break;case"isToggle":e.isToggle?n.EventHandler.add(this.element,"click",this.btnClickHandler,this):(n.EventHandler.remove(this.element,"click",this.btnClickHandler),i.removeClass([this.element],["e-active"]))}}},a([s.Property("left")],t.prototype,"iconPosition",void 0),a([s.Property("")],t.prototype,"iconCss",void 0),a([s.Property(!1)],t.prototype,"disabled",void 0),a([s.Property(!1)],t.prototype,"isPrimary",void 0),a([s.Property("")],t.prototype,"cssClass",void 0),a([s.Property("")],t.prototype,"content",void 0),a([s.Property(!1)],t.prototype,"isToggle",void 0),t=a([s.NotifyPropertyChanges],t)}(s.Component);t.Button=c,t.buttonBuilder=n.CreateBuilder(c)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(7)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i,r=this&&this.__extends||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)}}(),a=this&&this.__decorate||function(e,t,s,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(r<3?i(a):r>3?i(t,s,a):i(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};n=[s,t,s(3),s(3),s(3),s(3)],void 0!==(i=function(e,t,s,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l="e-ripple-container",c="e-checkbox-wrapper",d=function(e){function t(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return r(t,e),t.prototype.changeState=function(e){var t,s,n=this.getWrapper().getElementsByClassName("e-frame")[0];i.isRippleEnabled&&(s=this.getWrapper().getElementsByClassName(l)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),s&&(s.classList.remove("e-ripple-stop"),s.classList.add("e-ripple-check")),t="true",this.element.checked=!0):"uncheck"===e?(i.removeClass([n],["e-check","e-stop"]),s&&i.removeClass([s],["e-ripple-check","e-ripple-stop"]),t="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),s&&(s.classList.remove("e-ripple-check"),s.classList.add("e-ripple-stop")),t="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",t)},t.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)},t.prototype.destroy=function(){var t=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),t.parentNode.insertBefore(this.element,t),i.detach(t),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),this.name&&this.element.removeAttribute("name"),this.value&&this.element.removeAttribute("value"),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},t.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},t.prototype.getModuleName=function(){return"checkbox"},t.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},t.prototype.getWrapper=function(){return this.element.parentElement.parentElement},t.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()},t.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(c)||(e=i.createElement("div",{className:c,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var t=i.createElement("label",{attrs:{for:this.element.id}}),s=i.createElement("span",{className:"e-icons e-frame"});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&i.addClass([e],this.cssClass.split(" ")),e.appendChild(t),t.appendChild(this.element),t.appendChild(s),i.isRippleEnabled){var n=i.createElement("span",{className:l});"before"===this.labelPosition?t.appendChild(n):t.insertBefore(n,s),i.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},t.prototype.keyActionHandler=function(e){"space"===e.action&&(e.preventDefault(),this.clickHandler(e),this.focusHandler())},t.prototype.keyDownHandler=function(){this.isKeyPressed=!0},t.prototype.labelMouseHandler=function(e){var t=this.getWrapper().getElementsByClassName(l)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}},t.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},t.prototype.onPropertyChanged=function(e,t){for(var s=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove("e-checkbox-disabled"),s.setAttribute("aria-disabled","false"),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":var a=s.getElementsByClassName("e-label")[0],o=s.getElementsByTagName("label")[0];i.detach(a),"after"===e.labelPosition?o.appendChild(a):o.insertBefore(a,s.getElementsByClassName("e-frame")[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},t.prototype.preRender=function(){if("EJ-CHECKBOX"===this.element.tagName){for(var e=o.getValue("ej2_instances",this.element),t=i.createElement("input",{attrs:{type:"checkbox"}}),s=["change","cssClass","indeterminate","label","labelPosition"],n=i.createElement("EJ-CHECKBOX",{className:c,attrs:{role:"checkbox","aria-checked":"false"}}),r=0,a=this.element.attributes.length;r<a;r++)-1===s.indexOf(this.element.attributes[r].nodeName)&&t.setAttribute(this.element.attributes[r].nodeName,this.element.attributes[r].nodeValue);this.element.parentNode.insertBefore(t,this.element),i.detach(this.element),this.element=t,this.element.parentNode.insertBefore(n,this.element),n.appendChild(this.element),o.setValue("ej2_instances",e,this.element)}"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=o.getUniqueID("e-"+this.getModuleName()))},t.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},t.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},t.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=i.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName("e-frame")[0]):s.appendChild(t)}},t.prototype.unWireEvents=function(){var e=this.getWrapper();n.EventHandler.remove(this.element,"click",this.clickHandler),this.keyboardModule.destroy(),n.EventHandler.remove(document,"keydown",this.keyDownHandler),n.EventHandler.remove(e,"mousedown",this.mouseDownHandler),n.EventHandler.remove(this.element,"focus",this.focusHandler),n.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var t=e.getElementsByTagName("label")[0];n.EventHandler.remove(t,"mousedown",this.labelMouseHandler),n.EventHandler.remove(t,"mouseup",this.labelMouseHandler)},t.prototype.wireEvents=function(){var e=this.getWrapper();n.EventHandler.add(this.element,"click",this.clickHandler,this),this.keyboardModule=new n.KeyboardEvents(e,{eventName:"keyup",keyAction:this.keyActionHandler.bind(this),keyConfigs:{space:"space"}}),n.EventHandler.add(document,"keydown",this.keyDownHandler,this),n.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),n.EventHandler.add(this.element,"focus",this.focusHandler,this),n.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var t=e.getElementsByTagName("label")[0];n.EventHandler.add(t,"mousedown",this.labelMouseHandler,this),n.EventHandler.add(t,"mouseup",this.labelMouseHandler,this)},a([n.Event()],t.prototype,"change",void 0),a([s.Property(!1)],t.prototype,"checked",void 0),a([s.Property("")],t.prototype,"cssClass",void 0),a([s.Property(!1)],t.prototype,"disabled",void 0),a([s.Property(!1)],t.prototype,"indeterminate",void 0),a([s.Property("")],t.prototype,"label",void 0),a([s.Property("after")],t.prototype,"labelPosition",void 0),a([s.Property("")],t.prototype,"name",void 0),a([s.Property("")],t.prototype,"value",void 0),t=a([s.NotifyPropertyChanges],t)}(s.Component);t.CheckBox=d,t.checkBoxBuilder=s.CreateBuilder(d)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i;n=[s,t,s(9)],void 0!==(i=function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var s in e)t.hasOwnProperty(s)||(t[s]=e[s])}(s)}.apply(t,n))&&(e.exports=i)},function(e,t,s){var n,i,r=this&&this.__extends||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)}}(),a=this&&this.__decorate||function(e,t,s,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(r<3?i(a):r>3?i(t,s,a):i(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};n=[s,t,s(3),s(3),s(3),s(3),s(2)],void 0!==(i=function(e,t,s,n,i,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-radio-wrapper",d=function(e){function t(t,s){var n=e.call(this,t,s)||this;return n.isKeyPressed=!1,n}return r(t,e),t.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={checked:!0,event:e};this.trigger("change",t)},t.prototype.updateChange=function(e){for(var t,s=this.element.getAttribute("name"),n=document.querySelectorAll('input.e-radio[name="'+s+'"]'),i=0;i<n.length;i++)(t=n[i])!==this.element&&(t.ej2_instances[0].checked=!1)},t.prototype.destroy=function(){var t=this.getLabel();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),i.detach(t),this.element.checked=!1,this.name&&this.element.removeAttribute("name"),this.value&&this.element.removeAttribute("value"),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},t.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},t.prototype.getModuleName=function(){return"radio"},t.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},t.prototype.getLabel=function(){return this.element.nextElementSibling},t.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()},t.prototype.initWrapper=function(){var e,t=this.element.parentElement;t.classList.contains(c)||(t=i.createElement("div",{className:c}),this.element.parentNode.insertBefore(t,this.element));var n=i.createElement("label",{attrs:{for:this.element.id}});t.appendChild(this.element),t.appendChild(n),i.isRippleEnabled&&(e=i.createElement("span",{className:"e-ripple-container"}),n.appendChild(e),s.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&n.classList.add("e-rtl"),this.cssClass&&i.addClass([n],this.cssClass.split(" ")),this.label&&this.setText(this.label)},t.prototype.keyDownHandler=function(){this.isKeyPressed=!0},t.prototype.labelRippleHandler=function(e){var t=this.getLabel().getElementsByClassName("e-ripple-container")[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!0,!0),t.dispatchEvent(s)}},t.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},t.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)}}},t.prototype.preRender=function(){var e=this.element;e=l.wrapperInitialize("EJ-RADIOBUTTON","radio",e,c),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=o.getUniqueID("e-"+this.getModuleName()))},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},t.prototype.setDisabled=function(){this.element.disabled=!0},t.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName("e-label")[0];s?s.textContent=e:(s=i.createElement("span",{className:"e-label",innerHTML:e}),t.appendChild(s)),"before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},t.prototype.unWireEvents=function(){var e=this.getLabel();n.EventHandler.remove(this.element,"change",this.changeHandler),n.EventHandler.remove(document,"keydown",this.keyDownHandler),n.EventHandler.remove(e,"mousedown",this.mouseDownHandler),n.EventHandler.remove(this.element,"focus",this.focusHandler),n.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var t=e.getElementsByClassName("e-label")[0];t&&(n.EventHandler.remove(t,"mousedown",this.labelRippleHandler),n.EventHandler.remove(t,"mouseup",this.labelRippleHandler))},t.prototype.wireEvents=function(){var e=this.getLabel();n.EventHandler.add(this.element,"change",this.changeHandler,this),n.EventHandler.add(document,"keydown",this.keyDownHandler,this),n.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),n.EventHandler.add(this.element,"focus",this.focusHandler,this),n.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var t=e.getElementsByClassName("e-label")[0];t&&(n.EventHandler.add(t,"mousedown",this.labelRippleHandler,this),n.EventHandler.add(t,"mouseup",this.labelRippleHandler,this))},a([n.Event()],t.prototype,"change",void 0),a([s.Property(!1)],t.prototype,"checked",void 0),a([s.Property("")],t.prototype,"cssClass",void 0),a([s.Property(!1)],t.prototype,"disabled",void 0),a([s.Property("")],t.prototype,"label",void 0),a([s.Property("after")],t.prototype,"labelPosition",void 0),a([s.Property("")],t.prototype,"name",void 0),a([s.Property("")],t.prototype,"value",void 0),t=a([s.NotifyPropertyChanges],t)}(s.Component);t.RadioButton=d,t.radioButtonBuilder=s.CreateBuilder(d)}.apply(t,n))&&(e.exports=i)}])});
//# sourceMappingURL=ej2-buttons.umd.min.js.map

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

};
var Button = (function (_super) {
/**
* Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both.
* ```html
* <button id="button">Button</button>
* ```
* ```typescript
* <script>
* var btnObj = new Button();
* btnObj.appendTo("#button");
* </script>
* ```
*/
var Button = /** @class */ (function (_super) {
__extends(Button, _super);
/**
* Constructor for creating the widget
* @param {ButtonModel} options?
* @param {string|HTMLButtonElement} element?
*/
function Button(options, element) {

@@ -34,3 +51,9 @@ return _super.call(this, options, element) || this;

Button.prototype.preRender = function () {
// pre render code snippets
};
/**
* Initialize the control rendering
* @returns void
* @private
*/
Button.prototype.render = function () {

@@ -99,2 +122,6 @@ this.initialize();

};
/**
* To destroy the widget.
* @returns void
*/
Button.prototype.destroy = function () {

@@ -118,8 +145,24 @@ var span;

};
/**
* Get component name.
* @returns string
* @private
*/
Button.prototype.getModuleName = function () {
return 'btn';
};
/**
* Get the properties to be maintained in the persisted state.
* @returns string
*/
Button.prototype.getPersistData = function () {
return this.addOnPersist([]);
};
/**
* Called internally if any of the property value changed.
* @param {Button} newProp
* @param {Button} oldProp
* @returns void
* @private
*/
Button.prototype.onPropertyChanged = function (newProp, oldProp) {

@@ -201,29 +244,32 @@ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {

};
__decorate([
Property('left')
], Button.prototype, "iconPosition", void 0);
__decorate([
Property('')
], Button.prototype, "iconCss", void 0);
__decorate([
Property(false)
], Button.prototype, "disabled", void 0);
__decorate([
Property(false)
], Button.prototype, "isPrimary", void 0);
__decorate([
Property('')
], Button.prototype, "cssClass", void 0);
__decorate([
Property('')
], Button.prototype, "content", void 0);
__decorate([
Property(false)
], Button.prototype, "isToggle", void 0);
Button = __decorate([
NotifyPropertyChanges
], Button);
return Button;
}(Component));
__decorate([
Property('left')
], Button.prototype, "iconPosition", void 0);
__decorate([
Property('')
], Button.prototype, "iconCss", void 0);
__decorate([
Property(false)
], Button.prototype, "disabled", void 0);
__decorate([
Property(false)
], Button.prototype, "isPrimary", void 0);
__decorate([
Property('')
], Button.prototype, "cssClass", void 0);
__decorate([
Property('')
], Button.prototype, "content", void 0);
__decorate([
Property(false)
], Button.prototype, "isToggle", void 0);
Button = __decorate([
NotifyPropertyChanges
], Button);
export { Button };
/**
* builder for button
*/
export var buttonBuilder = CreateBuilder(Button);

@@ -0,1 +1,4 @@

/**
* Button modules
*/
export * from './button';

@@ -31,4 +31,19 @@ var __extends = (this && this.__extends) || (function () {

var WRAPPER = 'e-checkbox-wrapper';
var CheckBox = (function (_super) {
/**
* CheckBox is a graphical user interface element that allows you to select one or more options from the choices.
* It contains checked, unchecked and indeterminate states.
* ```html
* <input type="checkbox" id="checkbox"/>
* <script>
* var checkboxObj = new CheckBox({ label: "Default" });
* checkboxObj.appendTo("#checkbox");
* </script>
* ```
*/
var CheckBox = /** @class */ (function (_super) {
__extends(CheckBox, _super);
/**
* Constructor for creating the widget
* @private
*/
function CheckBox(options, element) {

@@ -94,2 +109,6 @@ var _this = _super.call(this, options, element) || this;

};
/**
* To destroy the widget.
* @returns void
*/
CheckBox.prototype.destroy = function () {

@@ -125,5 +144,13 @@ var wrapper = this.getWrapper();

};
/**
* Gets the module name.
* @private
*/
CheckBox.prototype.getModuleName = function () {
return 'checkbox';
};
/**
* Gets the properties to be maintained in the persistence state.
* @private
*/
CheckBox.prototype.getPersistData = function () {

@@ -206,2 +233,6 @@ return this.addOnPersist(['checked', 'indeterminate']);

};
/**
* Called internally if any of the property value changes.
* @private
*/
CheckBox.prototype.onPropertyChanged = function (newProp, oldProp) {

@@ -275,2 +306,6 @@ var wrapper = this.getWrapper();

};
/**
* Initialize Angular, React and Unique ID support.
* @private
*/
CheckBox.prototype.preRender = function () {

@@ -303,2 +338,6 @@ if (this.element.tagName === 'EJ-CHECKBOX') {

};
/**
* Initialize the control rendering
* @private
*/
CheckBox.prototype.render = function () {

@@ -361,35 +400,38 @@ this.initWrapper();

};
__decorate([
Event()
], CheckBox.prototype, "change", void 0);
__decorate([
Property(false)
], CheckBox.prototype, "checked", void 0);
__decorate([
Property('')
], CheckBox.prototype, "cssClass", void 0);
__decorate([
Property(false)
], CheckBox.prototype, "disabled", void 0);
__decorate([
Property(false)
], CheckBox.prototype, "indeterminate", void 0);
__decorate([
Property('')
], CheckBox.prototype, "label", void 0);
__decorate([
Property('after')
], CheckBox.prototype, "labelPosition", void 0);
__decorate([
Property('')
], CheckBox.prototype, "name", void 0);
__decorate([
Property('')
], CheckBox.prototype, "value", void 0);
CheckBox = __decorate([
NotifyPropertyChanges
], CheckBox);
return CheckBox;
}(Component));
__decorate([
Event()
], CheckBox.prototype, "change", void 0);
__decorate([
Property(false)
], CheckBox.prototype, "checked", void 0);
__decorate([
Property('')
], CheckBox.prototype, "cssClass", void 0);
__decorate([
Property(false)
], CheckBox.prototype, "disabled", void 0);
__decorate([
Property(false)
], CheckBox.prototype, "indeterminate", void 0);
__decorate([
Property('')
], CheckBox.prototype, "label", void 0);
__decorate([
Property('after')
], CheckBox.prototype, "labelPosition", void 0);
__decorate([
Property('')
], CheckBox.prototype, "name", void 0);
__decorate([
Property('')
], CheckBox.prototype, "value", void 0);
CheckBox = __decorate([
NotifyPropertyChanges
], CheckBox);
export { CheckBox };
/**
* Builder for CheckBox
*/
export var checkBoxBuilder = CreateBuilder(CheckBox);

@@ -0,1 +1,4 @@

/**
* CheckBox modules
*/
export * from './check-box';
import { createElement, detach, rippleEffect } from '@syncfusion/ej2-base';
import { getValue, setValue } from '@syncfusion/ej2-base';
/**
* Initialize wrapper element for angular.
* @private
*/
export function wrapperInitialize(tag, type, element, WRAPPER) {

@@ -36,2 +40,6 @@ if (element.tagName === tag) {

}
/**
* Creates CheckBox component UI with theming and ripple support.
* @private
*/
export function createCheckBox(enableRipple, options) {

@@ -38,0 +46,0 @@ if (enableRipple === void 0) { enableRipple = false; }

@@ -0,1 +1,4 @@

/**
* Common modules
*/
export * from './common';

@@ -0,1 +1,4 @@

/**
* Button all modules
*/
export * from './common/index';

@@ -2,0 +5,0 @@ export * from './button/index';

@@ -0,1 +1,4 @@

/**
* RadioButton modules
*/
export * from './radio-button';

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

var WRAPPER = 'e-radio-wrapper';
var RadioButton = (function (_super) {
/**
* RadioButton is a graphical user interface element that allows you to select one option from the choices.
* It contains checked and unchecked states.
* ```html
* <input type="radio" id="radio"/>
* <script>
* var radioObj = new RadioButton({ label: "Default" });
* radioObj.appendTo("#radio");
* </script>
* ```
*/
var RadioButton = /** @class */ (function (_super) {
__extends(RadioButton, _super);
/**
* Constructor for creating the widget
* @private
*/
function RadioButton(options, element) {

@@ -51,2 +66,6 @@ var _this = _super.call(this, options, element) || this;

};
/**
* To destroy the widget.
* @returns void
*/
RadioButton.prototype.destroy = function () {

@@ -81,2 +100,6 @@ var label = this.getLabel();

};
/**
* Gets the properties to be maintained in the persistence state.
* @private
*/
RadioButton.prototype.getPersistData = function () {

@@ -145,2 +168,6 @@ return this.addOnPersist(['checked']);

};
/**
* Called internally if any of the property value changes.
* @private
*/
RadioButton.prototype.onPropertyChanged = function (newProp, oldProp) {

@@ -201,2 +228,6 @@ var label = this.getLabel();

};
/**
* Initialize checked Property, Angular and React and Unique ID support.
* @private
*/
RadioButton.prototype.preRender = function () {

@@ -213,2 +244,6 @@ var element = this.element;

};
/**
* Initialize the control rendering
* @private
*/
RadioButton.prototype.render = function () {

@@ -266,32 +301,35 @@ this.initialize();

};
__decorate([
Event()
], RadioButton.prototype, "change", void 0);
__decorate([
Property(false)
], RadioButton.prototype, "checked", void 0);
__decorate([
Property('')
], RadioButton.prototype, "cssClass", void 0);
__decorate([
Property(false)
], RadioButton.prototype, "disabled", void 0);
__decorate([
Property('')
], RadioButton.prototype, "label", void 0);
__decorate([
Property('after')
], RadioButton.prototype, "labelPosition", void 0);
__decorate([
Property('')
], RadioButton.prototype, "name", void 0);
__decorate([
Property('')
], RadioButton.prototype, "value", void 0);
RadioButton = __decorate([
NotifyPropertyChanges
], RadioButton);
return RadioButton;
}(Component));
__decorate([
Event()
], RadioButton.prototype, "change", void 0);
__decorate([
Property(false)
], RadioButton.prototype, "checked", void 0);
__decorate([
Property('')
], RadioButton.prototype, "cssClass", void 0);
__decorate([
Property(false)
], RadioButton.prototype, "disabled", void 0);
__decorate([
Property('')
], RadioButton.prototype, "label", void 0);
__decorate([
Property('after')
], RadioButton.prototype, "labelPosition", void 0);
__decorate([
Property('')
], RadioButton.prototype, "name", void 0);
__decorate([
Property('')
], RadioButton.prototype, "value", void 0);
RadioButton = __decorate([
NotifyPropertyChanges
], RadioButton);
export { RadioButton };
/**
* Builder for RadioButton
*/
export var radioButtonBuilder = CreateBuilder(RadioButton);
{
"name": "@syncfusion/ej2-buttons",
"version": "15.4.17",
"version": "15.4.20",
"description": "Essential JS 2 Button Components",

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

"dependencies": {
"@syncfusion/ej2-base": "^15.4.17"
"@syncfusion/ej2-base": "^15.4.20"
},

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

@@ -196,30 +196,30 @@ var __extends = (this && this.__extends) || (function () {

};
__decorate([
ej2_base_1.Property('left')
], Button.prototype, "iconPosition", void 0);
__decorate([
ej2_base_1.Property('')
], Button.prototype, "iconCss", void 0);
__decorate([
ej2_base_1.Property(false)
], Button.prototype, "disabled", void 0);
__decorate([
ej2_base_1.Property(false)
], Button.prototype, "isPrimary", void 0);
__decorate([
ej2_base_1.Property('')
], Button.prototype, "cssClass", void 0);
__decorate([
ej2_base_1.Property('')
], Button.prototype, "content", void 0);
__decorate([
ej2_base_1.Property(false)
], Button.prototype, "isToggle", void 0);
Button = __decorate([
ej2_base_1.NotifyPropertyChanges
], Button);
return Button;
}(ej2_base_1.Component));
__decorate([
ej2_base_1.Property('left')
], Button.prototype, "iconPosition", void 0);
__decorate([
ej2_base_1.Property('')
], Button.prototype, "iconCss", void 0);
__decorate([
ej2_base_1.Property(false)
], Button.prototype, "disabled", void 0);
__decorate([
ej2_base_1.Property(false)
], Button.prototype, "isPrimary", void 0);
__decorate([
ej2_base_1.Property('')
], Button.prototype, "cssClass", void 0);
__decorate([
ej2_base_1.Property('')
], Button.prototype, "content", void 0);
__decorate([
ej2_base_1.Property(false)
], Button.prototype, "isToggle", void 0);
Button = __decorate([
ej2_base_1.NotifyPropertyChanges
], Button);
exports.Button = Button;
exports.buttonBuilder = ej2_base_2.CreateBuilder(Button);
});

@@ -354,36 +354,36 @@ var __extends = (this && this.__extends) || (function () {

};
__decorate([
ej2_base_2.Event()
], CheckBox.prototype, "change", void 0);
__decorate([
ej2_base_1.Property(false)
], CheckBox.prototype, "checked", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "cssClass", void 0);
__decorate([
ej2_base_1.Property(false)
], CheckBox.prototype, "disabled", void 0);
__decorate([
ej2_base_1.Property(false)
], CheckBox.prototype, "indeterminate", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "label", void 0);
__decorate([
ej2_base_1.Property('after')
], CheckBox.prototype, "labelPosition", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "name", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "value", void 0);
CheckBox = __decorate([
ej2_base_1.NotifyPropertyChanges
], CheckBox);
return CheckBox;
}(ej2_base_1.Component));
__decorate([
ej2_base_2.Event()
], CheckBox.prototype, "change", void 0);
__decorate([
ej2_base_1.Property(false)
], CheckBox.prototype, "checked", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "cssClass", void 0);
__decorate([
ej2_base_1.Property(false)
], CheckBox.prototype, "disabled", void 0);
__decorate([
ej2_base_1.Property(false)
], CheckBox.prototype, "indeterminate", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "label", void 0);
__decorate([
ej2_base_1.Property('after')
], CheckBox.prototype, "labelPosition", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "name", void 0);
__decorate([
ej2_base_1.Property('')
], CheckBox.prototype, "value", void 0);
CheckBox = __decorate([
ej2_base_1.NotifyPropertyChanges
], CheckBox);
exports.CheckBox = CheckBox;
exports.checkBoxBuilder = ej2_base_1.CreateBuilder(CheckBox);
});

@@ -258,33 +258,33 @@ var __extends = (this && this.__extends) || (function () {

};
__decorate([
ej2_base_2.Event()
], RadioButton.prototype, "change", void 0);
__decorate([
ej2_base_1.Property(false)
], RadioButton.prototype, "checked", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "cssClass", void 0);
__decorate([
ej2_base_1.Property(false)
], RadioButton.prototype, "disabled", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "label", void 0);
__decorate([
ej2_base_1.Property('after')
], RadioButton.prototype, "labelPosition", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "name", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "value", void 0);
RadioButton = __decorate([
ej2_base_1.NotifyPropertyChanges
], RadioButton);
return RadioButton;
}(ej2_base_1.Component));
__decorate([
ej2_base_2.Event()
], RadioButton.prototype, "change", void 0);
__decorate([
ej2_base_1.Property(false)
], RadioButton.prototype, "checked", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "cssClass", void 0);
__decorate([
ej2_base_1.Property(false)
], RadioButton.prototype, "disabled", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "label", void 0);
__decorate([
ej2_base_1.Property('after')
], RadioButton.prototype, "labelPosition", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "name", void 0);
__decorate([
ej2_base_1.Property('')
], RadioButton.prototype, "value", void 0);
RadioButton = __decorate([
ej2_base_1.NotifyPropertyChanges
], RadioButton);
exports.RadioButton = RadioButton;
exports.radioButtonBuilder = ej2_base_1.CreateBuilder(RadioButton);
});

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 too big to display

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

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

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