Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-buttons

Package Overview
Dependencies
Maintainers
2
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-buttons - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

dist\global\button.js

2

dist/ej2-buttons.umd.min.js

@@ -11,2 +11,2 @@ /*!

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var n=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r,o;r=[n,t,n(1)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(2)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};r=[n,t,n(3),n(3),n(4)],void 0!==(o=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary"},c=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize()},t.prototype.initialize=function(){this.cssClass&&o.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(a.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(a.RTL);var e={role:"button","aria-describedby":this.element.textContent};o.attributes(this.element,e),this.disabled&&this.controlStatus(this.disabled),r.ripple(this.element,"."+a.BUTTON),this.wireEvents()},t.prototype.controlStatus=function(e){this.element.disabled=e},t.prototype.setIconCss=function(){if(this.iconCss){var e=o.createElement("span",{className:"e-btn-icon "+this.iconCss}),t=this.element.childNodes[0];t&&"left"===this.iconPosition?(this.element.insertBefore(e,t),e.classList.add("e-icon-left")):(this.element.appendChild(e),"right"===this.iconPosition&&e.classList.add("e-icon-right"))}},t.prototype.wireEvents=function(){this.isToggle&&r.EventHandler.add(this.element,"click",this.btnClickHandler,this)},t.prototype.unWireEvents=function(){this.isToggle&&r.EventHandler.remove(this.element,"click",this.btnClickHandler)},t.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},t.prototype.destroy=function(){var t,n=this.element;e.prototype.destroy.call(this),o.removeClass([this.element],[a.PRIMARY,a.RTL,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round"]),["role","aria-describedby","e-ripple","disabled"].forEach(function(e){n.removeAttribute(e)}),this.content&&(n.innerHTML=n.innerHTML.replace(this.content,"")),t=n.querySelector("span.e-btn-icon"),t&&o.detach(t),this.unWireEvents()},t.prototype.getModuleName=function(){return"btn"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"isPrimary":e.isPrimary?this.element.classList.add(a.PRIMARY):this.element.classList.remove(a.PRIMARY);break;case"disabled":this.controlStatus(this.disabled);break;case"iconCss":var s=this.element.querySelector("span.e-btn-icon");s?(s.className="e-btn-icon "+this.iconCss,this.element.textContent&&("left"===this.iconPosition?s.classList.add("e-icon-left"):s.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":s=this.element.querySelector("span.e-btn-icon"),s&&o.detach(s),this.setIconCss();break;case"cssClass":t.cssClass&&o.removeClass([this.element],t.cssClass.split(" ")),o.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(a.RTL):this.element.classList.remove(a.RTL);break;case"content":this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?r.EventHandler.add(this.element,"click",this.btnClickHandler,this):(r.EventHandler.remove(this.element,"click",this.btnClickHandler),o.removeClass([this.element],["e-active"]))}}},t}(n.Component);s([n.Property("left")],c.prototype,"iconPosition",void 0),s([n.Property("")],c.prototype,"iconCss",void 0),s([n.Property(!1)],c.prototype,"disabled",void 0),s([n.Property(!1)],c.prototype,"isPrimary",void 0),s([n.Property("")],c.prototype,"cssClass",void 0),s([n.Property("")],c.prototype,"content",void 0),s([n.Property(!1)],c.prototype,"isToggle",void 0),c=s([n.NotifyPropertyChanges],c),t.Button=c,t.buttonBuilder=r.CreateBuilder(c)}.apply(t,r))&&(e.exports=o)},function(t,n){t.exports=e},function(e,t,n){var r,o;r=[n,t,n(5)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(6),n(7)],void 0!==(o=function(e,t,n,r){"use strict";function o(e,t){var n=document.createElement(e);return void 0===t?n:(n.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(n.className=t.className),void 0!==t.id&&(n.id=t.id),void 0!==t.styles&&n.setAttribute("style",t.styles),void 0!==t.attrs&&p(n,t.attrs),n)}function i(e,t){for(var n=a(t),r=0,o=e;r<o.length;r++)for(var i=o[r],s=0,c=n;s<c.length;s++){var l=c[s];i.classList.contains(l)||i.classList.add(l)}return e}function s(e,t){for(var n=a(t),r=0,o=e;r<o.length;r++){var i=o[r];if(""!==i.className)for(var s=0,c=n;s<c.length;s++){var l=c[s];i.classList.remove(l)}}return e}function a(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function c(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function l(e,t){for(var n=document.createDocumentFragment(),r=0,o=e;r<o.length;r++){var i=o[r];n.appendChild(i)}return t.insertBefore(n,t.firstElementChild),e}function u(e,t){for(var n=document.createDocumentFragment(),r=0,o=e;r<o.length;r++){var i=o[r];n.appendChild(i)}return t.appendChild(n),e}function d(e){return e.parentNode.removeChild(e)}function f(e){var t=e.parentNode;n.EventHandler.clearEvents(e),t.removeChild(e)}function p(e,t){for(var n=Object.keys(t),r=e,o=0,i=n;o<i.length;o++){var s=i[o];r.setAttribute(s,t[s])}return r}function v(e,t){return void 0===t&&(t=document),t.querySelector(e)}function h(e,t){return void 0===t&&(t=document),t.querySelectorAll(e)}function y(e,t){var n=e;if("function"==typeof n.closest)return n.closest(t);for(;n&&1===n.nodeType;){if(O(n,t))return n;n=n.parentNode}return null}function m(e){for(var t=[],n=Array.prototype.slice.call(e.parentNode.childNodes),r=0,o=n;r<o.length;r++){var i=o[r];i.nodeType===Node.ELEMENT_NODE&&e!==i&&t.push(i)}return t}function b(e,t,n){var o=e.getAttribute(t);return r.isNullOrUndefined(o)&&(e.setAttribute(t,n.toString()),o=n),o}function g(e,t){void 0!==t&&Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function C(e,t,n){i([e],t),s([e],n)}function O(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return n?n.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=o,t.addClass=i,t.removeClass=s,t.isVisible=c,t.prepend=l,t.append=u,t.detach=d,t.remove=f,t.attributes=p,t.select=v,t.selectAll=h,t.closest=y,t.siblings=m,t.getAttributeOrDefault=b,t.setStyleAttribute=g,t.classList=C,t.matches=O}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(7)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,r,o,i,s){var a,c=e.addOrGetEventData(t);a=s?n.debounce(o,s):o,i&&(a=a.bind(i));for(var l=r.split(" "),u=0;u<l.length;u++)c.push({name:l[u],listener:o,debounce:a}),t.addEventListener(l[u],a)},e.remove=function(t,n,r){for(var o=e.addOrGetEventData(t),i=n.split(" "),s=0;s<i.length;s++)!function(e){var n,s=-1;o&&0!==o.length&&o.some(function(t,o){return t.name===i[e]&&t.listener.toString()===r.toString()&&(s=o,n=t.debounce,!0)}),-1!==s&&o.splice(s,1),t.removeEventListener(i[e],n)}(s)},e.clearEvents=function(t){var r,o;r=e.addOrGetEventData(t),o=n.extend([],o,r);for(var i=0;i<o.length;i++)t.removeEventListener(o[i].name,o[i].debounce),r.shift()},e.trigger=function(t,n,r){for(var o=e.addOrGetEventData(t),i=0,s=o;i<s.length;i++){var a=s[i];a.name===n&&a.debounce.call(this,r)}},e}();t.EventHandler=r}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t],void 0!==(o=function(e,t){"use strict";function n(e,t){var n=t;return n.unshift(void 0),new(Function.prototype.bind.apply(e,n))}function r(e){var t,n=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(n);var r="ej2"+L(n),o=function(n){n.source===window&&"string"==typeof n.data&&n.data.length<=32&&n.data===r&&(e(),t())};return window.addEventListener("message",o,!1),window.postMessage(r,"*"),t=function(){window.removeEventListener("message",o)}}function o(e,t){for(var n=t,r=e.split("."),o=0;o<r.length&&!f(n);o++)n=n[r[o]];return n}function i(e,t,n){var r,o,i=e.split("."),s=n||{},a=s,c=i.length;for(r=0;r<c;r++)o=i[r],r+1===c?a[o]=void 0===t?{}:t:d(a[o])&&(a[o]={}),a=a[o];return s}function s(e,t){delete e[t]}function a(e){var t={};return!d(e)&&e.constructor===t.constructor}function c(e,t){return e[t]}function l(e,t){if(!d(t))for(var n=e,r=t,o=Object.keys(t),i=0,s=o;i<s.length;i++){var a=s[i];n[a]=r[a]}}function u(e,t,n,r){var o=e||{},i=arguments.length;r&&(i-=1);for(var s=arguments,c=1;c<i;c++)!function(e){if(!s[e])return"continue";var t=s[e];Object.keys(t).forEach(function(e){var n,i=o[e],s=t[e];r&&a(s)?(n=a(i)?i:{},o[e]=u({},n,s,!0)):o[e]=s})}(c);return o}function d(e){return void 0===e||null===e}function f(e){return void 0===e}function p(e){return e+"_"+_++}function v(e,t){var n,r=this;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var s=o[0],a=function(){return n=null,e.call(r,s)};clearTimeout(n),n=setTimeout(a,t)}}function h(e){for(var t=[],n=Object.keys(e),r=0,o=n;r<o.length;r++){var i=o[r];t.push(encodeURIComponent(i)+"="+encodeURIComponent(""+e[i]))}return t.join("&")}function y(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function m(e,t){var n=e;return n===t||!(n===document||!n)&&m(n.parentNode,t)}function b(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function g(e,t){var n=document.createElement("div"),r=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),o="";d(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),n.appendChild(e.cloneNode(!0));for(var i=0,s=r.length;i<s;i++)o+=r[i].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+o+"</head><body>"+n.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var a=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(a))},500);return t}function C(e){var t=e+"";return"auto"===t||-1!==t.indexOf("%")||-1!==t.indexOf("px")?t:t+"px"}function O(e,t){var n="string"==typeof e?document.querySelector(e):e;if(n[E])for(var r=0,o=n[E];r<o.length;r++){var i=o[r];if(i instanceof t)return i}return null}function P(e,t){var n="string"==typeof e?document.querySelector(e):e;n[E]?n[E].push(t):n[E]=[t]}function L(e){for(var t="",n=0;n<5;n++)t+=(n?",":"")+e[n];return t}Object.defineProperty(t,"__esModule",{value:!0});var E="ej2_instances",_=0;t.createInstance=n,t.setImmediate=r,t.getValue=o,t.setValue=i,t.deleteObject=s,t.isObject=a,t.getEnumValue=c,t.merge=l,t.extend=u,t.isNullOrUndefined=d,t.isUndefined=f,t.getUniqueID=p,t.debounce=v,t.queryParams=h,t.isObjectArray=y,t.compareElementParent=m,t.throwError=b,t.print=g,t.formatUnit=C,t.getInstance=O,t.addInstance=P}.apply(t,r))&&(e.exports=o)}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var n=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r,o;r=[n,t,n(1)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(2)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};r=[n,t,n(3),n(3),n(4)],void 0!==(o=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},c=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize()},t.prototype.initialize=function(){this.cssClass&&o.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(a.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(a.RTL),this.disabled&&this.controlStatus(this.disabled),r.ripple(this.element,"."+a.BUTTON),this.wireEvents()},t.prototype.controlStatus=function(e){this.element.disabled=e},t.prototype.setIconCss=function(){if(this.iconCss){this.element.textContent||this.element.classList.add(a.ICONBTN);var e=o.createElement("span",{className:"e-btn-icon "+this.iconCss}),t=this.element.childNodes[0];t&&"left"===this.iconPosition?(this.element.insertBefore(e,t),e.classList.add("e-icon-left")):(this.element.appendChild(e),"right"===this.iconPosition&&e.classList.add("e-icon-right"))}},t.prototype.wireEvents=function(){this.isToggle&&r.EventHandler.add(this.element,"click",this.btnClickHandler,this)},t.prototype.unWireEvents=function(){this.isToggle&&r.EventHandler.remove(this.element,"click",this.btnClickHandler)},t.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},t.prototype.destroy=function(){var t,n=this.element;e.prototype.destroy.call(this),o.removeClass([this.element],[a.PRIMARY,a.RTL,a.ICONBTN,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round"]),["e-ripple","disabled"].forEach(function(e){n.removeAttribute(e)}),this.content&&(n.innerHTML=n.innerHTML.replace(this.content,"")),t=n.querySelector("span.e-btn-icon"),t&&o.detach(t),this.unWireEvents()},t.prototype.getModuleName=function(){return"btn"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"isPrimary":e.isPrimary?this.element.classList.add(a.PRIMARY):this.element.classList.remove(a.PRIMARY);break;case"disabled":this.controlStatus(this.disabled);break;case"iconCss":var s=this.element.querySelector("span.e-btn-icon");s?(s.className="e-btn-icon "+this.iconCss,this.element.textContent&&("left"===this.iconPosition?s.classList.add("e-icon-left"):s.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":s=this.element.querySelector("span.e-btn-icon"),s&&o.detach(s),this.setIconCss();break;case"cssClass":t.cssClass&&o.removeClass([this.element],t.cssClass.split(" ")),o.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(a.RTL):this.element.classList.remove(a.RTL);break;case"content":this.element.innerHTML=e.content,this.element.classList.remove(a.ICONBTN),this.setIconCss();break;case"isToggle":e.isToggle?r.EventHandler.add(this.element,"click",this.btnClickHandler,this):(r.EventHandler.remove(this.element,"click",this.btnClickHandler),o.removeClass([this.element],["e-active"]))}}},t}(n.Component);s([n.Property("left")],c.prototype,"iconPosition",void 0),s([n.Property("")],c.prototype,"iconCss",void 0),s([n.Property(!1)],c.prototype,"disabled",void 0),s([n.Property(!1)],c.prototype,"isPrimary",void 0),s([n.Property("")],c.prototype,"cssClass",void 0),s([n.Property("")],c.prototype,"content",void 0),s([n.Property(!1)],c.prototype,"isToggle",void 0),c=s([n.NotifyPropertyChanges],c),t.Button=c,t.buttonBuilder=r.CreateBuilder(c)}.apply(t,r))&&(e.exports=o)},function(t,n){t.exports=e},function(e,t,n){var r,o;r=[n,t,n(5)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(6),n(7)],void 0!==(o=function(e,t,n,r){"use strict";function o(e,t){var n=document.createElement(e);return void 0===t?n:(n.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(n.className=t.className),void 0!==t.id&&(n.id=t.id),void 0!==t.styles&&n.setAttribute("style",t.styles),void 0!==t.attrs&&p(n,t.attrs),n)}function i(e,t){for(var n=a(t),r=0,o=e;r<o.length;r++)for(var i=o[r],s=0,c=n;s<c.length;s++){var l=c[s];i.classList.contains(l)||i.classList.add(l)}return e}function s(e,t){for(var n=a(t),r=0,o=e;r<o.length;r++){var i=o[r];if(""!==i.className)for(var s=0,c=n;s<c.length;s++){var l=c[s];i.classList.remove(l)}}return e}function a(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function c(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function l(e,t){for(var n=document.createDocumentFragment(),r=0,o=e;r<o.length;r++){var i=o[r];n.appendChild(i)}return t.insertBefore(n,t.firstElementChild),e}function u(e,t){for(var n=document.createDocumentFragment(),r=0,o=e;r<o.length;r++){var i=o[r];n.appendChild(i)}return t.appendChild(n),e}function d(e){return e.parentNode.removeChild(e)}function f(e){var t=e.parentNode;n.EventHandler.clearEvents(e),t.removeChild(e)}function p(e,t){for(var n=Object.keys(t),r=e,o=0,i=n;o<i.length;o++){var s=i[o];r.setAttribute(s,t[s])}return r}function v(e,t){return void 0===t&&(t=document),t.querySelector(e)}function h(e,t){return void 0===t&&(t=document),t.querySelectorAll(e)}function m(e,t){var n=e;if("function"==typeof n.closest)return n.closest(t);for(;n&&1===n.nodeType;){if(O(n,t))return n;n=n.parentNode}return null}function y(e){for(var t=[],n=Array.prototype.slice.call(e.parentNode.childNodes),r=0,o=n;r<o.length;r++){var i=o[r];i.nodeType===Node.ELEMENT_NODE&&e!==i&&t.push(i)}return t}function b(e,t,n){var o=e.getAttribute(t);return r.isNullOrUndefined(o)&&(e.setAttribute(t,n.toString()),o=n),o}function g(e,t){void 0!==t&&Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function C(e,t,n){i([e],t),s([e],n)}function O(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return n?n.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=o,t.addClass=i,t.removeClass=s,t.isVisible=c,t.prepend=l,t.append=u,t.detach=d,t.remove=f,t.attributes=p,t.select=v,t.selectAll=h,t.closest=m,t.siblings=y,t.getAttributeOrDefault=b,t.setStyleAttribute=g,t.classList=C,t.matches=O}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(7)],void 0!==(o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,r,o,i,s){var a,c=e.addOrGetEventData(t);a=s?n.debounce(o,s):o,i&&(a=a.bind(i));for(var l=r.split(" "),u=0;u<l.length;u++)c.push({name:l[u],listener:o,debounce:a}),t.addEventListener(l[u],a)},e.remove=function(t,n,r){for(var o=e.addOrGetEventData(t),i=n.split(" "),s=0;s<i.length;s++)!function(e){var n,s=-1;o&&0!==o.length&&o.some(function(t,o){return t.name===i[e]&&t.listener.toString()===r.toString()&&(s=o,n=t.debounce,!0)}),-1!==s&&o.splice(s,1),t.removeEventListener(i[e],n)}(s)},e.clearEvents=function(t){var r,o;r=e.addOrGetEventData(t),o=n.extend([],o,r);for(var i=0;i<o.length;i++)t.removeEventListener(o[i].name,o[i].debounce),r.shift()},e.trigger=function(t,n,r){for(var o=e.addOrGetEventData(t),i=0,s=o;i<s.length;i++){var a=s[i];a.name===n&&a.debounce.call(this,r)}},e}();t.EventHandler=r}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t],void 0!==(o=function(e,t){"use strict";function n(e,t){var n=t;return n.unshift(void 0),new(Function.prototype.bind.apply(e,n))}function r(e){var t,n=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(n);var r="ej2"+P(n),o=function(n){n.source===window&&"string"==typeof n.data&&n.data.length<=32&&n.data===r&&(e(),t())};return window.addEventListener("message",o,!1),window.postMessage(r,"*"),t=function(){window.removeEventListener("message",o)}}function o(e,t){for(var n=t,r=e.split("."),o=0;o<r.length&&!f(n);o++)n=n[r[o]];return n}function i(e,t,n){var r,o,i=e.split("."),s=n||{},a=s,c=i.length;for(r=0;r<c;r++)o=i[r],r+1===c?a[o]=void 0===t?{}:t:d(a[o])&&(a[o]={}),a=a[o];return s}function s(e,t){delete e[t]}function a(e){var t={};return!d(e)&&e.constructor===t.constructor}function c(e,t){return e[t]}function l(e,t){if(!d(t))for(var n=e,r=t,o=Object.keys(t),i=0,s=o;i<s.length;i++){var a=s[i];n[a]=r[a]}}function u(e,t,n,r){var o=e||{},i=arguments.length;r&&(i-=1);for(var s=arguments,c=1;c<i;c++)!function(e){if(!s[e])return"continue";var t=s[e];Object.keys(t).forEach(function(e){var n,i=o[e],s=t[e];r&&a(s)?(n=a(i)?i:{},o[e]=u({},n,s,!0)):o[e]=s})}(c);return o}function d(e){return void 0===e||null===e}function f(e){return void 0===e}function p(e){return e+"_"+_++}function v(e,t){var n,r=this;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var s=o[0],a=function(){return n=null,e.call(r,s)};clearTimeout(n),n=setTimeout(a,t)}}function h(e){for(var t=[],n=Object.keys(e),r=0,o=n;r<o.length;r++){var i=o[r];t.push(encodeURIComponent(i)+"="+encodeURIComponent(""+e[i]))}return t.join("&")}function m(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function y(e,t){var n=e;return n===t||!(n===document||!n)&&y(n.parentNode,t)}function b(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function g(e,t){var n=document.createElement("div"),r=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),o="";d(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),n.appendChild(e.cloneNode(!0));for(var i=0,s=r.length;i<s;i++)o+=r[i].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+o+"</head><body>"+n.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var a=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(a))},500);return t}function C(e){var t=e+"";return"auto"===t||-1!==t.indexOf("%")||-1!==t.indexOf("px")?t:t+"px"}function O(e,t){var n="string"==typeof e?document.querySelector(e):e;if(n[E])for(var r=0,o=n[E];r<o.length;r++){var i=o[r];if(i instanceof t)return i}return null}function L(e,t){var n="string"==typeof e?document.querySelector(e):e;n[E]?n[E].push(t):n[E]=[t]}function P(e){for(var t="",n=0;n<5;n++)t+=(n?",":"")+e[n];return t}Object.defineProperty(t,"__esModule",{value:!0});var E="ej2_instances",_=0;t.createInstance=n,t.setImmediate=r,t.getValue=o,t.setValue=i,t.deleteObject=s,t.isObject=a,t.getEnumValue=c,t.merge=l,t.extend=u,t.isNullOrUndefined=d,t.isUndefined=f,t.getUniqueID=p,t.debounce=v,t.queryParams=h,t.isObjectArray=m,t.compareElementParent=y,t.throwError=b,t.print=g,t.formatUnit=C,t.getInstance=O,t.addInstance=L}.apply(t,r))&&(e.exports=o)}])});

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

import { CreateBuilder, ripple, EventHandler } from '@syncfusion/ej2-base';
import { createElement, addClass, removeClass, attributes, detach } from '@syncfusion/ej2-base/dom';
import { createElement, addClass, removeClass, detach } from '@syncfusion/ej2-base/dom';
var cssClassName = {
RTL: 'e-rtl',
BUTTON: 'e-btn',
PRIMARY: 'e-primary'
PRIMARY: 'e-primary',
ICONBTN: 'e-icon-btn'
};

@@ -50,7 +51,2 @@ var Button = (function (_super) {

}
var ariaAttr = {
'role': 'button',
'aria-describedby': this.element.textContent
};
attributes(this.element, ariaAttr);
if (this.disabled) {

@@ -67,2 +63,5 @@ this.controlStatus(this.disabled);

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

@@ -104,5 +103,5 @@ var node = this.element.childNodes[0];

_super.prototype.destroy.call(this);
removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, 'e-success',
removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success',
'e-info', 'e-danger', 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round']);
['role', 'aria-describedby', 'e-ripple', 'disabled'].forEach(function (value) {
['e-ripple', 'disabled'].forEach(function (value) {
element.removeAttribute(value);

@@ -180,2 +179,3 @@ });

this.element.innerHTML = newProp.content;
this.element.classList.remove(cssClassName.ICONBTN);
this.setIconCss();

@@ -182,0 +182,0 @@ break;

{
"_args": [
[
{
"raw": "@syncfusion/ej2-buttons@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-buttons",
"name": "@syncfusion/ej2-buttons",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2"
]
],
"_from": "@syncfusion/ej2-buttons@*",
"_id": "@syncfusion/ej2-buttons@1.0.10",
"_inCache": true,
"_location": "/@syncfusion/ej2-buttons",
"_nodeVersion": "6.11.0",
"_npmUser": {
"name": "ej2",
"email": "pipeline@syncfusion.com"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "@syncfusion/ej2-buttons@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-buttons",
"name": "@syncfusion/ej2-buttons",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@syncfusion/ej2",
"/@syncfusion/ej2-navigations",
"/@syncfusion/ej2-ng-buttons",
"/@syncfusion/ej2-popups"
],
"_resolved": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-buttons/-/ej2-buttons-1.0.10.tgz",
"_shasum": "c4e3d566947a352c81db721622b8e5fa1785a2ab",
"_shrinkwrap": null,
"_spec": "@syncfusion/ej2-buttons@*",
"_where": "C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2",
"author": {
"name": "Syncfusion Inc."
},
"bugs": {
"url": "https://github.com/syncfusion/ej2-buttons/issues"
},
"name": "@syncfusion/ej2-buttons",
"version": "1.0.11",
"description": "Syncfusion TypeScript Button",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"module": "dist/es6/index.js",
"dependencies": {
"@syncfusion/ej2-base": "^1.0.10"
"@syncfusion/ej2-base": "^1.0.11"
},
"description": "Essential JS 2 Button",
"devDependencies": {

@@ -63,8 +17,2 @@ "@types/chai": "^3.4.28",

},
"dist": {
"shasum": "c4e3d566947a352c81db721622b8e5fa1785a2ab",
"tarball": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-buttons/-/ej2-buttons-1.0.10.tgz"
},
"gitHead": "8c27a2c498ea9b7e7a7dd023d3f6439181e273c1",
"homepage": "https://github.com/syncfusion/ej2-buttons#readme",
"keywords": [

@@ -75,24 +23,6 @@ "ej2",

],
"license": "SEE LICENSE IN license",
"maintainers": [
{
"name": "ej2",
"email": "pipeline@syncfusion.com"
}
],
"module": "dist/es6/index.js",
"name": "@syncfusion/ej2-buttons",
"optionalDependencies": {},
"readme": "# Button\n\nProvides several built-in styles to customize the appearance and behaviour of buttons. It comes with documentation and support, which is available under commercial and community licenses. Please visit www.syncfusion.com to get started.\n\n## Resources\n\n* [Demo](http://ej2.syncfusion.com/demos/#/button/default.html)\n* [Documentation](http://ej2.syncfusion.com/documentation/button)\n\n\n# 1.0.10\n\n## Button\n\n### Bug Fixes\n\n- Round button icon misalignment in IE bug was fixed.\n\n- Text and icon overlapping while enabling RTL bug was fixed.",
"readmeFilename": "ReadMe.md",
"repository": {
"type": "git",
"url": "git+https://github.com/syncfusion/ej2-buttons.git"
},
"scripts": {
"ci-publish": "gulp ci-publish",
"compile": "gulp ci-compile",
"test": "gulp ci-test"
},
"version": "1.0.10"
"url": "https://github.com/syncfusion/ej2-buttons.git"
}
}
# Button
Provides several built-in styles to customize the appearance and behaviour of buttons. It comes with documentation and support, which is available under commercial and community licenses. Please visit www.syncfusion.com to get started.
Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both. It comes with documentation and support, which is available under commercial and community licenses. Please visit www.syncfusion.com to get started.

@@ -11,10 +11,4 @@ ## Resources

# 1.0.10
## Changelog
## Button
### Bug Fixes
- Round button icon misalignment in IE bug was fixed.
- Text and icon overlapping while enabling RTL bug was fixed.
Check the changelog [here](https://github.com/syncfusion/ej2-buttons/blob/master/CHANGELOG.md)

@@ -13,11 +13,11 @@ import{Button} from "./button";

/**
* Defines the inner content of the button element.
* Defines the `content` of the Button element that can either be text or HTML elements.
*/
content(value:string): BuilderProperties;
/**
* Adds class / multiple classes separated by space in button element. Types and styles of button can be defined with this.
* Defines class/multiple classes separated by a space in the Button element. Button types, styles, and size can be defined using this.
*/
cssClass(value:string): BuilderProperties;
/**
* Indicates button is in `disabled` state. When set to `true` button will be in `disabled` state.
* Specifies a value that indicates whether the Button control is `disabled` or not.
*/

@@ -34,9 +34,9 @@ disabled(value:boolean): BuilderProperties;

/**
* Defines class / multiple classes separated by space for button which is used to include icon in button.
Button can include sprite image, font icon.
* Defines class/multiple classes separated by a space for the Button that is used to include an icon.
Buttons can also include font icon and sprite image.
*/
iconCss(value:string): BuilderProperties;
/**
* Positions icon before / after text content in button.
When set to `right` the icon will be positioned right to text content.
* Positions the icon before/after the text content in the Button.
When set to `right`, the icon will be positioned to the right of the text content.
*/

@@ -46,7 +46,7 @@ iconPosition(value:IconPosition): BuilderProperties;

/**
* Makes button visually prioritized. When set to `true`, button will look as more prioritized visually.
* Allows the appearance of the Button to be enhanced and visually appealing when set to `true`.
*/
isPrimary(value:boolean): BuilderProperties;
/**
* Makes the button as toggle button, When you set to `true`. When you click it, the state changes from normal to active state.
* Makes the Button toggle, when set to `true`. When you click it, the state changes from normal to active.
*/

@@ -53,0 +53,0 @@ isToggle(value:boolean): BuilderProperties;

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

import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Component } from '@syncfusion/ej2-base';import { CreateBuilder, ripple, EventHandler } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, attributes, detach } from '@syncfusion/ej2-base/dom';import { ButtonHelper } from './button-builder';
import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Component } from '@syncfusion/ej2-base';import { CreateBuilder, ripple, EventHandler } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, detach } from '@syncfusion/ej2-base/dom';import { ButtonHelper } from './button-builder';
import {IconPosition} from "./button";

@@ -11,22 +11,22 @@ import {ComponentModel} from '@syncfusion/ej2-base';

/**
* Positions icon before / after text content in button. * When set to `right` the icon will be positioned right to text content. * @default "IconPosition.left" */ iconPosition?: IconPosition;
* Positions the icon before/after the text content in the Button. * When set to `right`, the icon will be positioned to the right of the text content. * @default "left" */ iconPosition?: IconPosition;
/**
* Defines class / multiple classes separated by space for button which is used to include icon in button. * Button can include sprite image, font icon. * @default "" */ iconCss?: string;
* Defines class/multiple classes separated by a space for the Button that is used to include an icon. * Buttons can also include font icon and sprite image. * @default "" */ iconCss?: string;
/**
* Indicates button is in `disabled` state. When set to `true` button will be in `disabled` state. * @default false */ disabled?: boolean;
* Specifies a value that indicates whether the Button control is `disabled` or not. * @default false */ disabled?: boolean;
/**
* Makes button visually prioritized. When set to `true`, button will look as more prioritized visually. * @default false */ isPrimary?: boolean;
* Allows the appearance of the Button to be enhanced and visually appealing when set to `true`. * @default false */ isPrimary?: boolean;
/**
* Adds class / multiple classes separated by space in button element. Types and styles of button can be defined with this. * @default "" */ cssClass?: string;
* Defines class/multiple classes separated by a space in the Button element. Button types, styles, and size can be defined using this. * @default "" */ cssClass?: string;
/**
* Defines the inner content of the button element. * @default "" */ content?: string;
* Defines the `content` of the Button element that can either be text or HTML elements. * @default "" */ content?: string;
/**
* Makes the button as toggle button, When you set to `true`. When you click it, the state changes from normal to active state. * @default false */ isToggle?: boolean;
* Makes the Button toggle, when set to `true`. When you click it, the state changes from normal to active. * @default false */ isToggle?: boolean;
}

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

/**
* Button is used to perform an action by clicking it. It can contain both text and icon.
* Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both.
* ```html

@@ -20,10 +20,10 @@ * <button id="button">Button</button>

/**
* Positions icon before / after text content in button.
* When set to `right` the icon will be positioned right to text content.
* @default "IconPosition.left"
* Positions the icon before/after the text content in the Button.
* When set to `right`, the icon will be positioned to the right of the text content.
* @default "left"
*/
iconPosition: IconPosition;
/**
* Defines class / multiple classes separated by space for button which is used to include icon in button.
* Button can include sprite image, font icon.
* Defines class/multiple classes separated by a space for the Button that is used to include an icon.
* Buttons can also include font icon and sprite image.
* @default ""

@@ -33,3 +33,3 @@ */

/**
* Indicates button is in `disabled` state. When set to `true` button will be in `disabled` state.
* Specifies a value that indicates whether the Button control is `disabled` or not.
* @default false

@@ -39,3 +39,3 @@ */

/**
* Makes button visually prioritized. When set to `true`, button will look as more prioritized visually.
* Allows the appearance of the Button to be enhanced and visually appealing when set to `true`.
* @default false

@@ -45,3 +45,3 @@ */

/**
* Adds class / multiple classes separated by space in button element. Types and styles of button can be defined with this.
* Defines class/multiple classes separated by a space in the Button element. Button types, styles, and size can be defined using this.
* @default ""

@@ -51,3 +51,3 @@ */

/**
* Defines the inner content of the button element.
* Defines the `content` of the Button element that can either be text or HTML elements.
* @default ""

@@ -57,3 +57,3 @@ */

/**
* Makes the button as toggle button, When you set to `true`. When you click it, the state changes from normal to active state.
* Makes the Button toggle, when set to `true`. When you click it, the state changes from normal to active.
* @default false

@@ -60,0 +60,0 @@ */

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

BUTTON: 'e-btn',
PRIMARY: 'e-primary'
PRIMARY: 'e-primary',
ICONBTN: 'e-icon-btn'
};

@@ -50,7 +51,2 @@ var Button = (function (_super) {

}
var ariaAttr = {
'role': 'button',
'aria-describedby': this.element.textContent
};
dom_1.attributes(this.element, ariaAttr);
if (this.disabled) {

@@ -67,2 +63,5 @@ this.controlStatus(this.disabled);

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

@@ -104,5 +103,5 @@ var node = this.element.childNodes[0];

_super.prototype.destroy.call(this);
dom_1.removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, 'e-success',
dom_1.removeClass([this.element], [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success',
'e-info', 'e-danger', 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round']);
['role', 'aria-describedby', 'e-ripple', 'disabled'].forEach(function (value) {
['e-ripple', 'disabled'].forEach(function (value) {
element.removeAttribute(value);

@@ -180,2 +179,3 @@ });

this.element.innerHTML = newProp.content;
this.element.classList.remove(cssClassName.ICONBTN);
this.setIconCss();

@@ -182,0 +182,0 @@ break;

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

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

Sorry, the diff of this file is 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