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 1.0.22 to 1.0.25

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 1.0.22
* version : 1.0.25
* 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,h=i.attributes.length;d<h;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){void 0===e&&(e=!1);var t=s.createElement("div",{className:"e-checkbox-wrapper"}),n=s.createElement("span",{className:"e-frame e-icons"});if(e){var i=s.createElement("span",{className:"e-ripple-container"});s.rippleEffect(i,{isCenterRipple:!0,duration:400}),n.appendChild(i)}return t.appendChild(n),t}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-checkbox-wrapper",c=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=this.getWrapper().getElementsByClassName("e-frame")[0];"check"===e?(s.classList.remove("e-stop"),s.classList.add("e-check"),t="true",this.element.checked=!0):"uncheck"===e?(i.removeClass([s],["e-check","e-stop"]),t="false",this.element.checked=!1):(s.classList.remove("e-check"),s.classList.add("e-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(l)||(e=i.createElement("div",{className:l,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:"e-ripple-container"});s.appendChild(n),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("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.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:l,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.getElementsByClassName("e-label")[0];t&&(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:"keydown",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.getElementsByClassName("e-label")[0];t&&(n.EventHandler.add(t,"mousedown",this.labelMouseHandler,this),n.EventHandler.add(t,"mouseup",this.labelMouseHandler,this))},t}(s.Component);a([n.Event()],c.prototype,"change",void 0),a([s.Property(!1)],c.prototype,"checked",void 0),a([s.Property("")],c.prototype,"cssClass",void 0),a([s.Property(!1)],c.prototype,"disabled",void 0),a([s.Property(!1)],c.prototype,"indeterminate",void 0),a([s.Property("")],c.prototype,"label",void 0),a([s.Property("after")],c.prototype,"labelPosition",void 0),a([s.Property("")],c.prototype,"name",void 0),a([s.Property("")],c.prototype,"value",void 0),c=a([s.NotifyPropertyChanges],c),t.CheckBox=c,t.checkBoxBuilder=s.CreateBuilder(c)}.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;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,h=i.attributes.length;d<h;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"}),i=s.createElement("span",{className:"e-frame e-icons"});if(t.checked&&i.classList.add("e-check"),e){var r=s.createElement("span",{className:"e-ripple-container"});s.rippleEffect(r,{isCenterRipple:!0,duration:400}),i.appendChild(r)}if(n.appendChild(i),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-checkbox-wrapper",c=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=this.getWrapper().getElementsByClassName("e-frame")[0];"check"===e?(s.classList.remove("e-stop"),s.classList.add("e-check"),t="true",this.element.checked=!0):"uncheck"===e?(i.removeClass([s],["e-check","e-stop"]),t="false",this.element.checked=!1):(s.classList.remove("e-check"),s.classList.add("e-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(l)||(e=i.createElement("div",{className:l,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:"e-ripple-container"});s.appendChild(n),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("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.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:l,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.getElementsByClassName("e-label")[0];t&&(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:"keydown",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.getElementsByClassName("e-label")[0];t&&(n.EventHandler.add(t,"mousedown",this.labelMouseHandler,this),n.EventHandler.add(t,"mouseup",this.labelMouseHandler,this))},t}(s.Component);a([n.Event()],c.prototype,"change",void 0),a([s.Property(!1)],c.prototype,"checked",void 0),a([s.Property("")],c.prototype,"cssClass",void 0),a([s.Property(!1)],c.prototype,"disabled",void 0),a([s.Property(!1)],c.prototype,"indeterminate",void 0),a([s.Property("")],c.prototype,"label",void 0),a([s.Property("after")],c.prototype,"labelPosition",void 0),a([s.Property("")],c.prototype,"name",void 0),a([s.Property("")],c.prototype,"value",void 0),c=a([s.NotifyPropertyChanges],c),t.CheckBox=c,t.checkBoxBuilder=s.CreateBuilder(c)}.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;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)}])});
//# sourceMappingURL=ej2-buttons.umd.min.js.map

@@ -36,6 +36,10 @@ import { createElement, detach, rippleEffect } from '@syncfusion/ej2-base';

}
export function createCheckBox(enableRipple) {
export function createCheckBox(enableRipple, options) {
if (enableRipple === void 0) { enableRipple = false; }
if (options === void 0) { options = {}; }
var wrapper = createElement('div', { className: 'e-checkbox-wrapper' });
var frameSpan = createElement('span', { className: 'e-frame e-icons' });
if (options.checked) {
frameSpan.classList.add('e-check');
}
if (enableRipple) {

@@ -47,3 +51,7 @@ var rippleSpan = createElement('span', { className: 'e-ripple-container' });

wrapper.appendChild(frameSpan);
if (options.label) {
var labelSpan = createElement('span', { className: 'e-label', innerHTML: options.label });
wrapper.appendChild(labelSpan);
}
return wrapper;
}
{
"name": "@syncfusion/ej2-buttons",
"version": "1.0.22",
"version": "1.0.25",
"description": "Essential JS 2 Button Components",

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

"dependencies": {
"@syncfusion/ej2-base": "^1.0.22"
"@syncfusion/ej2-base": "^1.0.25"
},

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

@@ -11,5 +11,9 @@ /**

*/
export declare function createCheckBox(enableRipple?: boolean): Element;
export declare function createCheckBox(enableRipple?: boolean, options?: CheckBoxUtilModel): Element;
export interface EJ2Instance extends HTMLElement {
ej2_instances: Object[];
}
export interface CheckBoxUtilModel {
checked?: boolean;
label?: string;
}

@@ -39,6 +39,10 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1, ej2_base_2) {

exports.getTextNode = getTextNode;
function createCheckBox(enableRipple) {
function createCheckBox(enableRipple, options) {
if (enableRipple === void 0) { enableRipple = false; }
if (options === void 0) { options = {}; }
var wrapper = ej2_base_1.createElement('div', { className: 'e-checkbox-wrapper' });
var frameSpan = ej2_base_1.createElement('span', { className: 'e-frame e-icons' });
if (options.checked) {
frameSpan.classList.add('e-check');
}
if (enableRipple) {

@@ -50,2 +54,6 @@ var rippleSpan = ej2_base_1.createElement('span', { className: 'e-ripple-container' });

wrapper.appendChild(frameSpan);
if (options.label) {
var labelSpan = ej2_base_1.createElement('span', { className: 'e-label', innerHTML: options.label });
wrapper.appendChild(labelSpan);
}
return wrapper;

@@ -52,0 +60,0 @@ }

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