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 17.1.1-beta to 17.1.32-beta

styles/button/_bootstrap4-definition.scss

21

CHANGELOG.md

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

## 17.1.1-beta (2019-01-29)
### Chips

@@ -15,2 +17,21 @@

## 16.4.53 (2019-02-13)
### Button
#### Bug Fixes
- Flat button text is not visible in bootstrap theme issue is fixed.
## 16.4.40-beta (2018-12-10)
### Chips
The Chip control contains a small block of essential information that triggers an event on click action. It also contains the primary text, image, or both, and is mostly used in mails, contacts, or filter tags.
- `Input chip` - Basic chip with delete icon that represents a person or entity and enables removal of chips from the chip list collection.
- `Choice chip` - Used to select a choice from the available options.
- `Filter chip` - Used to select multiple choices from the available options.
- `Action chip` - Used to trigger actions for primary content.
## 16.3.33 (2018-11-20)

@@ -17,0 +38,0 @@

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 17.1.1-beta
* version : 17.1.32-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var o=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),l=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},c="e-rtl",h="e-btn",p="e-primary",d="e-icon-btn",u=function(e){function s(t,s){return e.call(this,t,s)||this}return o(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(p),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(c),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(d);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[p,c,d,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(p):this.element.classList.remove(p);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(c):this.element.classList.remove(c);break;case"content":i(this.element)||this.element.classList.remove(d),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}}},l([t.Property("Left")],s.prototype,"iconPosition",void 0),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),l([t.Property(!1)],s.prototype,"isPrimary",void 0),l([t.Property("")],s.prototype,"cssClass",void 0),l([t.Property("")],s.prototype,"content",void 0),l([t.Property(!1)],s.prototype,"isToggle",void 0),l([t.Property()],s.prototype,"locale",void 0),l([t.Event()],s.prototype,"created",void 0),s=l([t.NotifyPropertyChanges],s)}(t.Component),m=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),f=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},v="e-checkbox-disabled",y="e-frame",b="e-ripple-container",g="e-ripple-check",C="e-ripple-stop",E="e-checkbox-wrapper",H=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return m(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName(y)[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(b)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove(C),i.classList.add(g)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],[g,C]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove(g),i.classList.add(C)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(E)||(e=this.createElement("div",{className:E,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons "+y});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:b});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelMouseHandler=function(e){a(e,this.getWrapper().getElementsByClassName(b)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,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,i.classList.remove(v),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName(y)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,E,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(v),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName(y)[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},f([t.Event()],i.prototype,"change",void 0),f([t.Event()],i.prototype,"created",void 0),f([t.Property(!1)],i.prototype,"checked",void 0),f([t.Property("")],i.prototype,"cssClass",void 0),f([t.Property(!1)],i.prototype,"disabled",void 0),f([t.Property(!1)],i.prototype,"indeterminate",void 0),f([t.Property("")],i.prototype,"label",void 0),f([t.Property("After")],i.prototype,"labelPosition",void 0),f([t.Property("")],i.prototype,"name",void 0),f([t.Property("")],i.prototype,"value",void 0),i=f([t.NotifyPropertyChanges],i)}(t.Component),k=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),P=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},L="e-label",w="e-ripple-container",x="e-radio-wrapper",N=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}k(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),r=document.querySelectorAll('input.e-radio[name="'+i+'"]'),a=0;a<r.length;a++)(s=r[a])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(x)||(s=this.createElement("div",{className:x}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:w}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){a(e,this.getLabel().getElementsByClassName(w)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,x,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(L)[0];s?s.textContent=e:(s=this.createElement("span",{className:L,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler))},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this))};var n;return P([t.Event()],i.prototype,"change",void 0),P([t.Event()],i.prototype,"created",void 0),P([t.Property(!1)],i.prototype,"checked",void 0),P([t.Property("")],i.prototype,"cssClass",void 0),P([t.Property(!1)],i.prototype,"disabled",void 0),P([t.Property("")],i.prototype,"label",void 0),P([t.Property("After")],i.prototype,"labelPosition",void 0),P([t.Property("")],i.prototype,"name",void 0),P([t.Property("")],i.prototype,"value",void 0),i=n=P([t.NotifyPropertyChanges],i)}(t.Component),S=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),O=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},A="e-switch-disabled",T="e-ripple-container",R="e-ripple-check",I="e-switch-wrapper",W="e-switch-active",D=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return S(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(T)[0]),e?(t.addClass([r,a],W),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],[R])):(t.removeClass([r,a],W),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],[R])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(I)||(e=this.createElement("div",{className:I,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:T});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(A),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}}},s.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,r(this,"EJS-SWITCH",I,e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){a(e,this.getWrapper().getElementsByClassName(T)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(T)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(A),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(T)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp)},O([t.Event()],s.prototype,"change",void 0),O([t.Event()],s.prototype,"created",void 0),O([t.Property(!1)],s.prototype,"checked",void 0),O([t.Property("")],s.prototype,"cssClass",void 0),O([t.Property(!1)],s.prototype,"disabled",void 0),O([t.Property("")],s.prototype,"name",void 0),O([t.Property("")],s.prototype,"onLabel",void 0),O([t.Property("")],s.prototype,"offLabel",void 0),O([t.Property("")],s.prototype,"value",void 0),s=O([t.NotifyPropertyChanges],s)}(t.Component),j=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),B=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},M={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},_=function(e){function s(t,s){return e.call(this,t,s)||this}return j(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(M.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(M.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(M.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](M.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(M.chip+" "+(n.enabled?" ":M.disabled)+" "+(n.avatarIconCss||n.avatarText?M.chipWrapper:n.leadingIconCss?M.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(M.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){s=(M.icon+" "+e.leadingIconCss).trim();var n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:M.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){s=(M.delete+" "+(e.trailingIconCss?e.trailingIconCss:M.deleteIcon)).trim();var a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+M.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+M.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+M.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+M.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+M.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+M.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+M.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(M.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(M.focused)||e.classList.add(M.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+M.chip),i="chip"===this.type?this.element.classList.contains(M.focused)?this.element:null:this.element.querySelector("."+M.focused);s&&i&&i.classList.remove(M.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+M.chip);if(i)if("chip"!==this.type){var n=this.find(i);n.event=e;if((e.target.classList.contains(M.delete)?e.target:s?i.querySelector("."+M.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(M.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);var o=n;this.trigger("click",o)}}else{this.focusInHandler(i);o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+M.active);t&&t!==e&&(t.classList.remove(M.active),e.setAttribute("aria-selected","false"))}e.classList.contains(M.active)?(e.classList.remove(M.active),e.setAttribute("aria-selected","false")):(e.classList.add(M.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[M.chipSet,M.chip,M.rtl,M.multiSelection,M.singleSelection,M.disabled,M.chipWrapper,M.iconWrapper,M.active,M.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}}},B([t.Property([])],s.prototype,"chips",void 0),B([t.Property("")],s.prototype,"text",void 0),B([t.Property("")],s.prototype,"avatarText",void 0),B([t.Property("")],s.prototype,"avatarIconCss",void 0),B([t.Property("")],s.prototype,"leadingIconCss",void 0),B([t.Property("")],s.prototype,"trailingIconCss",void 0),B([t.Property("")],s.prototype,"cssClass",void 0),B([t.Property(!0)],s.prototype,"enabled",void 0),B([t.Property([])],s.prototype,"selectedChips",void 0),B([t.Property("None")],s.prototype,"selection",void 0),B([t.Property(!1)],s.prototype,"enableDelete",void 0),B([t.Event()],s.prototype,"created",void 0),B([t.Event()],s.prototype,"click",void 0),B([t.Event()],s.prototype,"delete",void 0),s=B([t.NotifyPropertyChanges],s)}(t.Component),q=function(){return function(){}}();e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=function(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n},e.rippleMouseHandler=a,e.Button=u,e.CheckBox=H,e.RadioButton=N,e.Switch=D,e.classNames=M,e.ChipList=_,e.Chip=q,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}function o(e,t){e.element.getAttribute("ejs-for")&&t.appendChild(e.createElement("input",{attrs:{name:e.name||e.element.name,value:"false",type:"hidden"}}))}var l=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),c=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},h="e-rtl",p="e-btn",d="e-primary",u="e-icon-btn",m=function(e){function s(t,s){return e.call(this,t,s)||this}return l(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(d),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(h),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+p})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(u);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[d,h,u,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(d):this.element.classList.remove(d);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?e.iconCss?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):t.detach(a):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(h):this.element.classList.remove(h);break;case"content":i(this.element)||this.element.classList.remove(u),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}}},c([t.Property("Left")],s.prototype,"iconPosition",void 0),c([t.Property("")],s.prototype,"iconCss",void 0),c([t.Property(!1)],s.prototype,"disabled",void 0),c([t.Property(!1)],s.prototype,"isPrimary",void 0),c([t.Property("")],s.prototype,"cssClass",void 0),c([t.Property("")],s.prototype,"content",void 0),c([t.Property(!1)],s.prototype,"isToggle",void 0),c([t.Property()],s.prototype,"locale",void 0),c([t.Event()],s.prototype,"created",void 0),s=c([t.NotifyPropertyChanges],s)}(t.Component),f=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),v=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},y="e-checkbox-disabled",b="e-frame",g="e-ripple-container",C="e-ripple-check",E="e-ripple-stop",k="e-checkbox-wrapper",H=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isFocused=!1,i.isMouseClick=!1,i}return f(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName(b)[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(g)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove(E),i.classList.add(C)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],[C,E]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove(C),i.classList.add(E)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.isMouseClick&&(this.focusOutHandler(),this.isMouseClick=!1),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isFocused=!0},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus"),this.isFocused=!1},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(k)||(e=this.createElement("div",{className:k,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons "+b});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),o(this,s),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:g});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyUpHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},i.prototype.labelMouseHandler=function(e){this.isMouseClick=!0;a(e,this.getWrapper().getElementsByClassName(g)[0])},i.prototype.onPropertyChanged=function(e,s){for(var i=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,i.classList.remove(y),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName(b)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,k,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(y),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName(b)[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,t.attributes(this.element,{checked:this.initialCheckedValue.toString()})},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},v([t.Event()],i.prototype,"change",void 0),v([t.Event()],i.prototype,"created",void 0),v([t.Property(!1)],i.prototype,"checked",void 0),v([t.Property("")],i.prototype,"cssClass",void 0),v([t.Property(!1)],i.prototype,"disabled",void 0),v([t.Property(!1)],i.prototype,"indeterminate",void 0),v([t.Property("")],i.prototype,"label",void 0),v([t.Property("After")],i.prototype,"labelPosition",void 0),v([t.Property("")],i.prototype,"name",void 0),v([t.Property("")],i.prototype,"value",void 0),i=v([t.NotifyPropertyChanges],i)}(t.Component),P=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),L=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},x="e-label",w="e-ripple-container",N="e-radio-wrapper",S=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}P(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i,r=this.element.getAttribute("name"),a=document.querySelectorAll('input.e-radio[name="'+r+'"]'),o=0;o<a.length;o++)(s=a[o])!==this.element&&((i=t.getInstance(s,n)).checked=!1,"EJS-RADIOBUTTON"===this.tagName&&(i.angularValue=this.value))},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(N)||(s=this.createElement("div",{className:N}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:w}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){a(e,this.getLabel().getElementsByClassName(w)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;if(this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,N,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),"EJS-RADIOBUTTON"===this.tagName){var i=this.element.getAttribute("formcontrolname");i&&(this.setProperties({name:i},!0),this.element.setAttribute("name",i))}},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(x)[0];s?s.textContent=e:(s=this.createElement("span",{className:x,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName(x)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName(x)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)};var n;return L([t.Event()],i.prototype,"change",void 0),L([t.Event()],i.prototype,"created",void 0),L([t.Property(!1)],i.prototype,"checked",void 0),L([t.Property("")],i.prototype,"cssClass",void 0),L([t.Property(!1)],i.prototype,"disabled",void 0),L([t.Property("")],i.prototype,"label",void 0),L([t.Property("After")],i.prototype,"labelPosition",void 0),L([t.Property("")],i.prototype,"name",void 0),L([t.Property("")],i.prototype,"value",void 0),i=n=L([t.NotifyPropertyChanges],i)}(t.Component),O=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),A=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},T="e-switch-disabled",R="e-ripple-container",I="e-ripple-check",W="e-switch-wrapper",j="e-switch-active",M=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return O(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(R)[0]),e?(t.addClass([r,a],j),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],[I])):(t.removeClass([r,a],j),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],[I])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(W)||(e=this.createElement("div",{className:W,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),o(this,e),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:R});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(T),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH",W,e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){a(e,this.getWrapper().getElementsByClassName(R)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(R)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(T),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(R)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,t.attributes(this.element,{checked:this.initialSwitchCheckedValue.toString()})},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},A([t.Event()],s.prototype,"change",void 0),A([t.Event()],s.prototype,"created",void 0),A([t.Property(!1)],s.prototype,"checked",void 0),A([t.Property("")],s.prototype,"cssClass",void 0),A([t.Property(!1)],s.prototype,"disabled",void 0),A([t.Property("")],s.prototype,"name",void 0),A([t.Property("")],s.prototype,"onLabel",void 0),A([t.Property("")],s.prototype,"offLabel",void 0),A([t.Property("")],s.prototype,"value",void 0),s=A([t.NotifyPropertyChanges],s)}(t.Component),D=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),B=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},_={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},U=function(e){function s(t,s){return e.call(this,t,s)||this}return D(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(_.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(_.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(_.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](_.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(_.chip+" "+(n.enabled?" ":_.disabled)+" "+(n.avatarIconCss||n.avatarText?_.chipWrapper:n.leadingIconCss?_.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(_.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){s=(_.icon+" "+e.leadingIconCss).trim();var n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:_.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){s=(_.delete+" "+(e.trailingIconCss?e.trailingIconCss:_.deleteIcon)).trim();var a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+_.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+_.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+_.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+_.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+_.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+_.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+_.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(_.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(_.focused)||e.classList.add(_.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+_.chip),i="chip"===this.type?this.element.classList.contains(_.focused)?this.element:null:this.element.querySelector("."+_.focused);s&&i&&i.classList.remove(_.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+_.chip);if(i)if("chip"!==this.type){var n=this.find(i);n.event=e;if((e.target.classList.contains(_.delete)?e.target:s?i.querySelector("."+_.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(_.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);var o=n;this.trigger("click",o)}}else{this.focusInHandler(i);o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+_.active);t&&t!==e&&(t.classList.remove(_.active),e.setAttribute("aria-selected","false"))}e.classList.contains(_.active)?(e.classList.remove(_.active),e.setAttribute("aria-selected","false")):(e.classList.add(_.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[_.chipSet,_.chip,_.rtl,_.multiSelection,_.singleSelection,_.disabled,_.chipWrapper,_.iconWrapper,_.active,_.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}}},B([t.Property([])],s.prototype,"chips",void 0),B([t.Property("")],s.prototype,"text",void 0),B([t.Property("")],s.prototype,"avatarText",void 0),B([t.Property("")],s.prototype,"avatarIconCss",void 0),B([t.Property("")],s.prototype,"leadingIconCss",void 0),B([t.Property("")],s.prototype,"trailingIconCss",void 0),B([t.Property("")],s.prototype,"cssClass",void 0),B([t.Property(!0)],s.prototype,"enabled",void 0),B([t.Property([])],s.prototype,"selectedChips",void 0),B([t.Property("None")],s.prototype,"selection",void 0),B([t.Property(!1)],s.prototype,"enableDelete",void 0),B([t.Event()],s.prototype,"created",void 0),B([t.Event()],s.prototype,"click",void 0),B([t.Event()],s.prototype,"delete",void 0),s=B([t.NotifyPropertyChanges],s)}(t.Component),q=function(){return function(){}}();e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=function(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n},e.rippleMouseHandler=a,e.setHiddenInput=o,e.Button=m,e.CheckBox=H,e.RadioButton=S,e.Switch=M,e.classNames=_,e.ChipList=U,e.Chip=q,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-buttons.umd.min.js.map
/*!
* filename: ej2-buttons.min.js
* version : 17.1.1-beta
* version : 17.1.32-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

*/
this.ej=this.ej||{},this.ej.buttons=function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n}function o(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var l=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),c=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},h={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},p=function(e){function s(t,s){return e.call(this,t,s)||this}return l(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(h.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(h.RTL),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h.BUTTON})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(h.ICONBTN);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[h.PRIMARY,h.RTL,h.ICONBTN,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(h.PRIMARY):this.element.classList.remove(h.PRIMARY);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(h.RTL):this.element.classList.remove(h.RTL);break;case"content":i(this.element)||this.element.classList.remove(h.ICONBTN),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}},c([t.Property("Left")],s.prototype,"iconPosition",void 0),c([t.Property("")],s.prototype,"iconCss",void 0),c([t.Property(!1)],s.prototype,"disabled",void 0),c([t.Property(!1)],s.prototype,"isPrimary",void 0),c([t.Property("")],s.prototype,"cssClass",void 0),c([t.Property("")],s.prototype,"content",void 0),c([t.Property(!1)],s.prototype,"isToggle",void 0),c([t.Property()],s.prototype,"locale",void 0),c([t.Event()],s.prototype,"created",void 0),s=c([t.NotifyPropertyChanges],s)}(t.Component),d=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),u=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},m="e-ripple-container",f="e-checkbox-wrapper",v=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return d(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName("e-frame")[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(m)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove("e-ripple-stop"),i.classList.add("e-ripple-check")),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],["e-ripple-check","e-ripple-stop"]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove("e-ripple-check"),i.classList.add("e-ripple-stop")),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(f)||(e=this.createElement("div",{className:f,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons e-frame"});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:m});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelMouseHandler=function(e){o(e,this.getWrapper().getElementsByClassName(m)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=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,i.classList.remove("e-checkbox-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName("e-frame")[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,f,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName("e-frame")[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},u([t.Event()],i.prototype,"change",void 0),u([t.Event()],i.prototype,"created",void 0),u([t.Property(!1)],i.prototype,"checked",void 0),u([t.Property("")],i.prototype,"cssClass",void 0),u([t.Property(!1)],i.prototype,"disabled",void 0),u([t.Property(!1)],i.prototype,"indeterminate",void 0),u([t.Property("")],i.prototype,"label",void 0),u([t.Property("After")],i.prototype,"labelPosition",void 0),u([t.Property("")],i.prototype,"name",void 0),u([t.Property("")],i.prototype,"value",void 0),i=u([t.NotifyPropertyChanges],i)}(t.Component),y=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),b=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},g=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}y(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),r=document.querySelectorAll('input.e-radio[name="'+i+'"]'),a=0;a<r.length;a++)(s=r[a])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains("e-radio-wrapper")||(s=this.createElement("div",{className:"e-radio-wrapper"}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:"e-ripple-container"}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){o(e,this.getLabel().getElementsByClassName("e-ripple-container")[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,"e-radio-wrapper","radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName("e-label")[0];s?s.textContent=e:(s=this.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")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler))},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this))};var n;return b([t.Event()],i.prototype,"change",void 0),b([t.Event()],i.prototype,"created",void 0),b([t.Property(!1)],i.prototype,"checked",void 0),b([t.Property("")],i.prototype,"cssClass",void 0),b([t.Property(!1)],i.prototype,"disabled",void 0),b([t.Property("")],i.prototype,"label",void 0),b([t.Property("After")],i.prototype,"labelPosition",void 0),b([t.Property("")],i.prototype,"name",void 0),b([t.Property("")],i.prototype,"value",void 0),i=n=b([t.NotifyPropertyChanges],i)}(t.Component),C=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),E=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},k="e-ripple-container",H=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return C(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(k)[0]),e?(t.addClass([r,a],"e-switch-active"),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],["e-ripple-check"])):(t.removeClass([r,a],"e-switch-active"),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],["e-ripple-check"])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains("e-switch-wrapper")||(e=this.createElement("div",{className:"e-switch-wrapper",attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:k});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove("e-switch-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}},s.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,r(this,"EJS-SWITCH","e-switch-wrapper",e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){o(e,this.getWrapper().getElementsByClassName(k)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(k)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-switch-disabled"),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(k)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp)},E([t.Event()],s.prototype,"change",void 0),E([t.Event()],s.prototype,"created",void 0),E([t.Property(!1)],s.prototype,"checked",void 0),E([t.Property("")],s.prototype,"cssClass",void 0),E([t.Property(!1)],s.prototype,"disabled",void 0),E([t.Property("")],s.prototype,"name",void 0),E([t.Property("")],s.prototype,"onLabel",void 0),E([t.Property("")],s.prototype,"offLabel",void 0),E([t.Property("")],s.prototype,"value",void 0),s=E([t.NotifyPropertyChanges],s)}(t.Component),P=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),L=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},w={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},N=function(e){function s(t,s){return e.call(this,t,s)||this}return P(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(w.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(w.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(w.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](w.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(w.chip+" "+(n.enabled?" ":w.disabled)+" "+(n.avatarIconCss||n.avatarText?w.chipWrapper:n.leadingIconCss?w.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(w.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){var s=(w.icon+" "+e.leadingIconCss).trim(),n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:w.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){var s=(w.delete+" "+(e.trailingIconCss?e.trailingIconCss:w.deleteIcon)).trim(),a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+w.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+w.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+w.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+w.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+w.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+w.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+w.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(w.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(w.focused)||e.classList.add(w.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+w.chip),i="chip"===this.type?this.element.classList.contains(w.focused)?this.element:null:this.element.querySelector("."+w.focused);s&&i&&i.classList.remove(w.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+w.chip);if(i)if("chip"!==this.type){var n=this.find(i);if(n.event=e,(e.target.classList.contains(w.delete)?e.target:s?i.querySelector("."+w.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(w.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);o=n;this.trigger("click",o)}}else{this.focusInHandler(i);var o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+w.active);t&&t!==e&&(t.classList.remove(w.active),e.setAttribute("aria-selected","false"))}e.classList.contains(w.active)?(e.classList.remove(w.active),e.setAttribute("aria-selected","false")):(e.classList.add(w.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[w.chipSet,w.chip,w.rtl,w.multiSelection,w.singleSelection,w.disabled,w.chipWrapper,w.iconWrapper,w.active,w.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++)switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}},L([t.Property([])],s.prototype,"chips",void 0),L([t.Property("")],s.prototype,"text",void 0),L([t.Property("")],s.prototype,"avatarText",void 0),L([t.Property("")],s.prototype,"avatarIconCss",void 0),L([t.Property("")],s.prototype,"leadingIconCss",void 0),L([t.Property("")],s.prototype,"trailingIconCss",void 0),L([t.Property("")],s.prototype,"cssClass",void 0),L([t.Property(!0)],s.prototype,"enabled",void 0),L([t.Property([])],s.prototype,"selectedChips",void 0),L([t.Property("None")],s.prototype,"selection",void 0),L([t.Property(!1)],s.prototype,"enableDelete",void 0),L([t.Event()],s.prototype,"created",void 0),L([t.Event()],s.prototype,"click",void 0),L([t.Event()],s.prototype,"delete",void 0),s=L([t.NotifyPropertyChanges],s)}(t.Component),x=function(){function e(){}return e}();return e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=a,e.rippleMouseHandler=o,e.Button=p,e.CheckBox=v,e.RadioButton=g,e.Switch=H,e.classNames=w,e.ChipList=N,e.Chip=x,e}({},ej.base),this.ejs=ej;
this.ej=this.ej||{},this.ej.buttons=function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n}function o(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}function l(e,t){e.element.getAttribute("ejs-for")&&t.appendChild(e.createElement("input",{attrs:{name:e.name||e.element.name,value:"false",type:"hidden"}}))}var c=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),h=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},p={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},d=function(e){function s(t,s){return e.call(this,t,s)||this}return c(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(p.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(p.RTL),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+p.BUTTON})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(p.ICONBTN);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[p.PRIMARY,p.RTL,p.ICONBTN,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(p.PRIMARY):this.element.classList.remove(p.PRIMARY);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?e.iconCss?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):t.detach(a):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(p.RTL):this.element.classList.remove(p.RTL);break;case"content":i(this.element)||this.element.classList.remove(p.ICONBTN),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}},h([t.Property("Left")],s.prototype,"iconPosition",void 0),h([t.Property("")],s.prototype,"iconCss",void 0),h([t.Property(!1)],s.prototype,"disabled",void 0),h([t.Property(!1)],s.prototype,"isPrimary",void 0),h([t.Property("")],s.prototype,"cssClass",void 0),h([t.Property("")],s.prototype,"content",void 0),h([t.Property(!1)],s.prototype,"isToggle",void 0),h([t.Property()],s.prototype,"locale",void 0),h([t.Event()],s.prototype,"created",void 0),s=h([t.NotifyPropertyChanges],s)}(t.Component),u=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),m=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},f="e-ripple-container",v="e-checkbox-wrapper",y=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isFocused=!1,i.isMouseClick=!1,i}return u(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName("e-frame")[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(f)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove("e-ripple-stop"),i.classList.add("e-ripple-check")),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],["e-ripple-check","e-ripple-stop"]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove("e-ripple-check"),i.classList.add("e-ripple-stop")),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.isMouseClick&&(this.focusOutHandler(),this.isMouseClick=!1),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isFocused=!0},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus"),this.isFocused=!1},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(v)||(e=this.createElement("div",{className:v,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons e-frame"});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),l(this,s),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:f});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyUpHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},i.prototype.labelMouseHandler=function(e){this.isMouseClick=!0,o(e,this.getWrapper().getElementsByClassName(f)[0])},i.prototype.onPropertyChanged=function(e,s){for(var i=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,i.classList.remove("e-checkbox-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName("e-frame")[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,v,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName("e-frame")[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,t.attributes(this.element,{checked:this.initialCheckedValue.toString()})},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},m([t.Event()],i.prototype,"change",void 0),m([t.Event()],i.prototype,"created",void 0),m([t.Property(!1)],i.prototype,"checked",void 0),m([t.Property("")],i.prototype,"cssClass",void 0),m([t.Property(!1)],i.prototype,"disabled",void 0),m([t.Property(!1)],i.prototype,"indeterminate",void 0),m([t.Property("")],i.prototype,"label",void 0),m([t.Property("After")],i.prototype,"labelPosition",void 0),m([t.Property("")],i.prototype,"name",void 0),m([t.Property("")],i.prototype,"value",void 0),i=m([t.NotifyPropertyChanges],i)}(t.Component),b=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),g=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},C=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}b(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i,r=this.element.getAttribute("name"),a=document.querySelectorAll('input.e-radio[name="'+r+'"]'),o=0;o<a.length;o++)(s=a[o])!==this.element&&((i=t.getInstance(s,n)).checked=!1,"EJS-RADIOBUTTON"===this.tagName&&(i.angularValue=this.value))},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains("e-radio-wrapper")||(s=this.createElement("div",{className:"e-radio-wrapper"}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:"e-ripple-container"}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){o(e,this.getLabel().getElementsByClassName("e-ripple-container")[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;if(this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,"e-radio-wrapper","radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),"EJS-RADIOBUTTON"===this.tagName){var i=this.element.getAttribute("formcontrolname");i&&(this.setProperties({name:i},!0),this.element.setAttribute("name",i))}},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName("e-label")[0];s?s.textContent=e:(s=this.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")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)};var n;return g([t.Event()],i.prototype,"change",void 0),g([t.Event()],i.prototype,"created",void 0),g([t.Property(!1)],i.prototype,"checked",void 0),g([t.Property("")],i.prototype,"cssClass",void 0),g([t.Property(!1)],i.prototype,"disabled",void 0),g([t.Property("")],i.prototype,"label",void 0),g([t.Property("After")],i.prototype,"labelPosition",void 0),g([t.Property("")],i.prototype,"name",void 0),g([t.Property("")],i.prototype,"value",void 0),i=n=g([t.NotifyPropertyChanges],i)}(t.Component),E=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),k=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},H="e-ripple-container",P=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return E(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(H)[0]),e?(t.addClass([r,a],"e-switch-active"),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],["e-ripple-check"])):(t.removeClass([r,a],"e-switch-active"),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],["e-ripple-check"])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains("e-switch-wrapper")||(e=this.createElement("div",{className:"e-switch-wrapper",attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),l(this,e),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:H});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove("e-switch-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH","e-switch-wrapper",e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){o(e,this.getWrapper().getElementsByClassName(H)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(H)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-switch-disabled"),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(H)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,t.attributes(this.element,{checked:this.initialSwitchCheckedValue.toString()})},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},k([t.Event()],s.prototype,"change",void 0),k([t.Event()],s.prototype,"created",void 0),k([t.Property(!1)],s.prototype,"checked",void 0),k([t.Property("")],s.prototype,"cssClass",void 0),k([t.Property(!1)],s.prototype,"disabled",void 0),k([t.Property("")],s.prototype,"name",void 0),k([t.Property("")],s.prototype,"onLabel",void 0),k([t.Property("")],s.prototype,"offLabel",void 0),k([t.Property("")],s.prototype,"value",void 0),s=k([t.NotifyPropertyChanges],s)}(t.Component),L=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),N=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},w={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},x=function(e){function s(t,s){return e.call(this,t,s)||this}return L(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(w.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(w.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(w.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](w.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(w.chip+" "+(n.enabled?" ":w.disabled)+" "+(n.avatarIconCss||n.avatarText?w.chipWrapper:n.leadingIconCss?w.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(w.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){var s=(w.icon+" "+e.leadingIconCss).trim(),n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:w.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){var s=(w.delete+" "+(e.trailingIconCss?e.trailingIconCss:w.deleteIcon)).trim(),a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+w.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+w.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+w.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+w.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+w.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+w.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+w.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(w.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(w.focused)||e.classList.add(w.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+w.chip),i="chip"===this.type?this.element.classList.contains(w.focused)?this.element:null:this.element.querySelector("."+w.focused);s&&i&&i.classList.remove(w.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+w.chip);if(i)if("chip"!==this.type){var n=this.find(i);if(n.event=e,(e.target.classList.contains(w.delete)?e.target:s?i.querySelector("."+w.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(w.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);o=n;this.trigger("click",o)}}else{this.focusInHandler(i);var o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+w.active);t&&t!==e&&(t.classList.remove(w.active),e.setAttribute("aria-selected","false"))}e.classList.contains(w.active)?(e.classList.remove(w.active),e.setAttribute("aria-selected","false")):(e.classList.add(w.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[w.chipSet,w.chip,w.rtl,w.multiSelection,w.singleSelection,w.disabled,w.chipWrapper,w.iconWrapper,w.active,w.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++)switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}},N([t.Property([])],s.prototype,"chips",void 0),N([t.Property("")],s.prototype,"text",void 0),N([t.Property("")],s.prototype,"avatarText",void 0),N([t.Property("")],s.prototype,"avatarIconCss",void 0),N([t.Property("")],s.prototype,"leadingIconCss",void 0),N([t.Property("")],s.prototype,"trailingIconCss",void 0),N([t.Property("")],s.prototype,"cssClass",void 0),N([t.Property(!0)],s.prototype,"enabled",void 0),N([t.Property([])],s.prototype,"selectedChips",void 0),N([t.Property("None")],s.prototype,"selection",void 0),N([t.Property(!1)],s.prototype,"enableDelete",void 0),N([t.Event()],s.prototype,"created",void 0),N([t.Event()],s.prototype,"click",void 0),N([t.Event()],s.prototype,"delete",void 0),s=N([t.NotifyPropertyChanges],s)}(t.Component),S=function(){function e(){}return e}();return e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=a,e.rippleMouseHandler=o,e.setHiddenInput=l,e.Button=d,e.CheckBox=y,e.RadioButton=C,e.Switch=P,e.classNames=w,e.ChipList=x,e.Chip=S,e}({},ej.base),this.ejs=ej;
//# sourceMappingURL=ej2-buttons.min.js.map
/*!
* filename: index.d.ts
* version : 17.1.1-beta
* version : 17.1.32-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

{
"name": "@syncfusion/ej2-buttons",
"version": "17.1.1-beta",
"version": "17.1.32-beta",
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",

@@ -11,10 +11,5 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~17.1.1-beta"
"@syncfusion/ej2-base": "~17.1.32-beta"
},
"devDependencies": {
"@types/chai": "^3.4.28",
"@types/jasmine": "2.8.9",
"@types/jasmine-ajax": "^3.1.27",
"@types/requirejs": "^2.1.26"
},
"devDependencies": {},
"keywords": [

@@ -21,0 +16,0 @@ "ej2",

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

* Called internally if any of the property value changed.
* @param {Button} newProp
* @param {Button} oldProp
* @param {ButtonModel} newProp
* @param {ButtonModel} oldProp
* @returns void
* @private
*/
onPropertyChanged(newProp: Button, oldProp: Button): void;
onPropertyChanged(newProp: ButtonModel, oldProp: ButtonModel): void;
}

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

* Called internally if any of the property value changed.
* @param {Button} newProp
* @param {Button} oldProp
* @param {ButtonModel} newProp
* @param {ButtonModel} oldProp
* @returns void

@@ -206,11 +206,16 @@ * @private

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

@@ -217,0 +222,0 @@ else {

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

import { Component, INotifyPropertyChanged , NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, KeyboardEvents } from '@syncfusion/ej2-base';import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler, ChangeEventArgs } from './../common/common';
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, KeyboardEvents, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';import { wrapperInitialize, rippleMouseHandler, ChangeEventArgs, setHiddenInput } from './../common/common';
import {LabelPosition} from "./check-box";

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

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

private tagName;
private isKeyPressed;
private isFocused;
private isMouseClick;
private keyboardModule;
private formElement;
private initialCheckedValue;
/**

@@ -108,5 +111,4 @@ * Triggers when the CheckBox state has been changed by user interaction.

private initWrapper;
private keyDownHandler;
private keyUpHandler;
private labelMouseHandler;
private mouseDownHandler;
/**

@@ -123,3 +125,3 @@ * Called internally if any of the property value changes.

/**
* Initialize the control rendering
* Initialize the control rendering.
* @private

@@ -131,4 +133,5 @@ */

private changeHandler;
private formResetHandler;
protected unWireEvents(): void;
protected wireEvents(): void;
}

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

import { Component, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';
import { Event, EventHandler } from '@syncfusion/ej2-base';
import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect } from '@syncfusion/ej2-base';
import { wrapperInitialize, rippleMouseHandler } from './../common/common';
import { Event, EventHandler, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';
import { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';
import { wrapperInitialize, rippleMouseHandler, setHiddenInput } from './../common/common';
var CHECK = 'e-check';

@@ -54,3 +54,4 @@ var DISABLED = 'e-checkbox-disabled';

var _this = _super.call(this, options, element) || this;
_this.isKeyPressed = false;
_this.isFocused = false;
_this.isMouseClick = false;
return _this;

@@ -96,3 +97,6 @@ }

CheckBox.prototype.clickHandler = function (event) {
this.focusOutHandler();
if (this.isMouseClick) {
this.focusOutHandler();
this.isMouseClick = false;
}
if (this.indeterminate) {

@@ -144,8 +148,7 @@ this.changeState(this.checked ? 'check' : 'uncheck');

CheckBox.prototype.focusHandler = function () {
if (this.isKeyPressed) {
this.getWrapper().classList.add('e-focus');
}
this.isFocused = true;
};
CheckBox.prototype.focusOutHandler = function () {
this.getWrapper().classList.remove('e-focus');
this.isFocused = false;
};

@@ -170,2 +173,5 @@ /**

CheckBox.prototype.initialize = function () {
if (isNullOrUndefined(this.initialCheckedValue)) {
this.initialCheckedValue = this.checked;
}
if (this.name) {

@@ -205,2 +211,3 @@ this.element.setAttribute('name', this.name);

label.appendChild(this.element);
setHiddenInput(this, label);
label.appendChild(frameSpan);

@@ -221,12 +228,12 @@ if (isRippleEnabled) {

};
CheckBox.prototype.keyDownHandler = function () {
this.isKeyPressed = true;
CheckBox.prototype.keyUpHandler = function () {
if (this.isFocused) {
this.getWrapper().classList.add('e-focus');
}
};
CheckBox.prototype.labelMouseHandler = function (e) {
this.isMouseClick = true;
var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
rippleMouseHandler(e, rippleSpan);
};
CheckBox.prototype.mouseDownHandler = function () {
this.isKeyPressed = false;
};
/**

@@ -312,2 +319,3 @@ * Called internally if any of the property value changes.

var element = this.element;
this.formElement = closest(this.element, 'form');
this.tagName = this.element.tagName;

@@ -324,3 +332,3 @@ element = wrapperInitialize(this.createElement, 'EJS-CHECKBOX', 'checkbox', element, WRAPPER, 'checkbox');

/**
* Initialize the control rendering
* Initialize the control rendering.
* @private

@@ -360,7 +368,10 @@ */

};
CheckBox.prototype.formResetHandler = function () {
this.checked = this.initialCheckedValue;
attributes(this.element, { 'checked': this.initialCheckedValue.toString() });
};
CheckBox.prototype.unWireEvents = function () {
var wrapper = this.getWrapper();
EventHandler.remove(this.element, 'click', this.clickHandler);
EventHandler.remove(document, 'keydown', this.keyDownHandler);
EventHandler.remove(wrapper, 'mousedown', this.mouseDownHandler);
EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
EventHandler.remove(this.element, 'focus', this.focusHandler);

@@ -371,2 +382,5 @@ EventHandler.remove(this.element, 'focusout', this.focusOutHandler);

EventHandler.remove(label, 'mouseup', this.labelMouseHandler);
if (this.formElement) {
EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
}
if (this.tagName === 'EJS-CHECKBOX') {

@@ -379,4 +393,3 @@ EventHandler.remove(this.element, 'change', this.changeHandler);

EventHandler.add(this.element, 'click', this.clickHandler, this);
EventHandler.add(document, 'keydown', this.keyDownHandler, this);
EventHandler.add(wrapper, 'mousedown', this.mouseDownHandler, this);
EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
EventHandler.add(this.element, 'focus', this.focusHandler, this);

@@ -387,2 +400,5 @@ EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);

EventHandler.add(label, 'mouseup', this.labelMouseHandler, this);
if (this.formElement) {
EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);
}
if (this.tagName === 'EJS-CHECKBOX') {

@@ -389,0 +405,0 @@ EventHandler.add(this.element, 'change', this.changeHandler, this);

@@ -22,2 +22,7 @@ import { BaseEventArgs } from '@syncfusion/ej2-base';

export declare function rippleMouseHandler(e: MouseEvent, rippleSpan: Element): void;
/**
* Append hidden input to given element
* @private
*/
export declare function setHiddenInput(proxy: Switch | CheckBox, wrap: Element): void;
export interface CheckBoxUtilModel {

@@ -24,0 +29,0 @@ checked?: boolean;

@@ -103,1 +103,12 @@ import { detach, getUniqueID, rippleEffect, setValue, attributes } from '@syncfusion/ej2-base';

}
/**
* Append hidden input to given element
* @private
*/
export function setHiddenInput(proxy, wrap) {
if (proxy.element.getAttribute('ejs-for')) {
wrap.appendChild(proxy.createElement('input', {
attrs: { 'name': proxy.name || proxy.element.name, 'value': 'false', 'type': 'hidden' }
}));
}
}

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

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

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

@@ -19,2 +19,5 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';

private isKeyPressed;
private formElement;
private initialCheckedValue;
private angularValue;
/**

@@ -99,2 +102,3 @@ * Event trigger when the RadioButton state has been changed by user interaction.

private mouseDownHandler;
private formResetHandler;
/**

@@ -101,0 +105,0 @@ * Called internally if any of the property value changes.

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

};
import { Component, rippleEffect, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';
import { addClass, getInstance, getUniqueID, isRippleEnabled, removeClass } from '@syncfusion/ej2-base';
import { Component, rippleEffect, NotifyPropertyChanges, Property, closest } from '@syncfusion/ej2-base';
import { addClass, getInstance, getUniqueID, isRippleEnabled, removeClass, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';
import { detach, Event, EventHandler } from '@syncfusion/ej2-base';

@@ -63,2 +63,3 @@ import { wrapperInitialize, rippleMouseHandler } from './../common/common';

var input;
var instance;
var name = this.element.getAttribute('name');

@@ -69,3 +70,7 @@ var radioGrp = document.querySelectorAll('input.e-radio[name="' + name + '"]');

if (input !== this.element) {
getInstance(input, RadioButton_1).checked = false;
instance = getInstance(input, RadioButton_1);
instance.checked = false;
if (this.tagName === 'EJS-RADIOBUTTON') {
instance.angularValue = this.value;
}
}

@@ -122,2 +127,5 @@ }

RadioButton.prototype.initialize = function () {
if (isNullOrUndefined(this.initialCheckedValue)) {
this.initialCheckedValue = this.checked;
}
this.initWrapper();

@@ -175,2 +183,8 @@ if (this.name) {

};
RadioButton.prototype.formResetHandler = function () {
this.checked = this.initialCheckedValue;
if (this.initialCheckedValue) {
attributes(this.element, { 'checked': 'true' });
}
};
/**

@@ -243,2 +257,3 @@ * Called internally if any of the property value changes.

var element = this.element;
this.formElement = closest(this.element, 'form');
this.tagName = this.element.tagName;

@@ -253,2 +268,9 @@ element = wrapperInitialize(this.createElement, 'EJS-RADIOBUTTON', 'radio', element, WRAPPER, 'radio');

}
if (this.tagName === 'EJS-RADIOBUTTON') {
var formControlName = this.element.getAttribute('formcontrolname');
if (formControlName) {
this.setProperties({ 'name': formControlName }, true);
this.element.setAttribute('name', formControlName);
}
}
};

@@ -297,2 +319,5 @@ /**

}
if (this.formElement) {
EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
}
};

@@ -311,2 +336,5 @@ RadioButton.prototype.wireEvents = function () {

}
if (this.formElement) {
EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);
}
};

@@ -313,0 +341,0 @@ var RadioButton_1;

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

import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, MouseEventArgs } from '@syncfusion/ej2-base';import { addClass, isRippleEnabled, removeClass, rippleEffect } from '@syncfusion/ej2-base';import { rippleMouseHandler, destroy, preRender, ChangeEventArgs } from './../common/common';
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, closest } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, MouseEventArgs } from '@syncfusion/ej2-base';import { addClass, isRippleEnabled, removeClass, rippleEffect, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';import { rippleMouseHandler, destroy, preRender, ChangeEventArgs, setHiddenInput } from './../common/common';
import {ComponentModel} from '@syncfusion/ej2-base';

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

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

private delegateKeyDownHandler;
private formElement;
private initialSwitchCheckedValue;
/**

@@ -119,2 +121,3 @@ * Triggers when Switch state has been changed by user interaction.

private switchMouseUp;
private formResetHandler;
/**

@@ -121,0 +124,0 @@ * Toggle the Switch component state into checked/unchecked.

@@ -20,6 +20,6 @@ var __extends = (this && this.__extends) || (function () {

};
import { Component, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';
import { Component, NotifyPropertyChanges, Property, closest } from '@syncfusion/ej2-base';
import { Event, EventHandler } from '@syncfusion/ej2-base';
import { addClass, isRippleEnabled, removeClass, rippleEffect } from '@syncfusion/ej2-base';
import { rippleMouseHandler, destroy, preRender } from './../common/common';
import { addClass, isRippleEnabled, removeClass, rippleEffect, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';
import { rippleMouseHandler, destroy, preRender, setHiddenInput } from './../common/common';
var CHECK = 'e-check';

@@ -128,2 +128,5 @@ var DISABLED = 'e-switch-disabled';

Switch.prototype.initialize = function () {
if (isNullOrUndefined(this.initialSwitchCheckedValue)) {
this.initialSwitchCheckedValue = this.checked;
}
if (this.name) {

@@ -158,2 +161,3 @@ this.element.setAttribute('name', this.name);

wrapper.appendChild(this.element);
setHiddenInput(this, wrapper);
switchInner.appendChild(onLabel);

@@ -234,2 +238,3 @@ switchInner.appendChild(offLabel);

var element = this.element;
this.formElement = closest(this.element, 'form');
this.tagName = this.element.tagName;

@@ -301,2 +306,6 @@ preRender(this, 'EJS-SWITCH', WRAPPER, element, this.getModuleName());

};
Switch.prototype.formResetHandler = function () {
this.checked = this.initialSwitchCheckedValue;
attributes(this.element, { 'checked': this.initialSwitchCheckedValue.toString() });
};
/**

@@ -321,2 +330,5 @@ * Toggle the Switch component state into checked/unchecked.

EventHandler.add(wrapper, 'touchstart touchmove touchend', this.switchMouseUp, this);
if (this.formElement) {
EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);
}
};

@@ -333,2 +345,5 @@ Switch.prototype.unWireEvents = function () {

EventHandler.remove(wrapper, 'touchstart touchmove touchend', this.switchMouseUp);
if (this.formElement) {
EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
}
};

@@ -335,0 +350,0 @@ __decorate([

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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc