Socket
Socket
Sign inDemoInstall

evol-colorpicker

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.4.0 to 3.4.1

8

js/evol-colorpicker.js

@@ -205,5 +205,6 @@ /*

oTRTH='<tr><th colspan="10" class="ui-widget-content">',
i;
i,
css='evo-palette'+_ie + (opts.customTheme ? ' cust-theme':'');
var h='<table class="evo-palette'+_ie+'">'+oTRTH+labels[0]+'</th></tr><tr>';
var h='<table class="'+css+'">'+oTRTH+labels[0]+'</th></tr><tr>';

@@ -213,2 +214,5 @@ if (opts.customTheme) {

h+=oTD+opts.customTheme[i]+cTD;
if(i%10===9){
h+='</tr><tr>';
}
}

@@ -215,0 +219,0 @@ } else {

/*
evol-colorpicker 3.4.0
evol-colorpicker 3.4.1
(c) 2019 Olivier Giulieri

@@ -7,2 +7,2 @@ http://evoluteur.github.io/colorpicker/

!function(r,t){function o(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e}function s(t){return o(Number(t))}function h(t){var e=o(t);return e+e+e}function f(t){if(10<t.length){var e=1+t.indexOf("("),o=t.indexOf(")"),i=t.substring(e,o).split(",");return["#",s(i[0]),s(i[1]),s(i[2])].join("")}return t}var l=0,e=window.navigator.userAgent,d=0<e.indexOf("MSIE "),p=d?"-ie":"",v=!d&&(/mozilla/.test(e.toLowerCase())&&!/webkit/.test(e.toLowerCase())),u=[],a=["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646"],_=["f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","92cddc","fac08f","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","31859b","e36c09","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","205867","974806"],b=["c00000","ff0000","ffc000","ffff00","92d050","00b050","00b0f0","0070c0","002060","7030a0"],m=[["003366","336699","3366cc","003399","000099","0000cc","000066"],["006666","006699","0099cc","0066cc","0033cc","0000ff","3333ff","333399"],["669999","009999","33cccc","00ccff","0099ff","0066ff","3366ff","3333cc","666699"],["339966","00cc99","00ffcc","00ffff","33ccff","3399ff","6699ff","6666ff","6600ff","6600cc"],["339933","00cc66","00ff99","66ffcc","66ffff","66ccff","99ccff","9999ff","9966ff","9933ff","9900ff"],["006600","00cc00","00ff00","66ff99","99ffcc","ccffff","ccccff","cc99ff","cc66ff","cc33ff","cc00ff","9900cc"],["003300","009933","33cc33","66ff66","99ff99","ccffcc","ffffff","ffccff","ff99ff","ff66ff","ff00ff","cc00cc","660066"],["333300","009900","66ff33","99ff66","ccff99","ffffcc","ffcccc","ff99cc","ff66cc","ff33cc","cc0099","993399"],["336600","669900","99ff33","ccff66","ffff99","ffcc99","ff9999","ff6699","ff3399","cc3399","990099"],["666633","99cc00","ccff33","ffff66","ffcc66","ff9966","ff6666","ff0066","d60094","993366"],["a58800","cccc00","ffff00","ffcc00","ff9933","ff6600","ff0033","cc0066","660033"],["996633","cc9900","ff9900","cc6600","ff3300","ff0000","cc0000","990033"],["663300","996600","cc3300","993300","990000","800000","993333"]],g="#0000ffff";r.widget("evol.colorpicker",{version:"3.4.0",options:{color:null,customTheme:null,showOn:"both",hideButton:!1,displayIndicator:!0,transparentColor:!1,history:!0,defaultPalette:"theme",strings:"Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet."},_active:!1,_create:function(){var o=this,t=this.options.color;switch(this._paletteIdx="theme"==this.options.defaultPalette?1:2,this._id="evo-cp"+l++,this._enabled=!0,this.options.showOn=this.options.hideButton?"focus":this.options.showOn,this.element.get(0).tagName){case"INPUT":var e=this.element,i=("focus"===this.options.showOn?"":"evo-pointer ")+"evo-colorind"+(v?"-ff":p)+(this.options.hideButton?" evo-hidden-button":""),s="";this._isPopup=!0,this._palette=null;var f=e.val();null!==t?t!=f&&e.val(t).change():""!==f&&(t=this.options.color=f),t===g?i+=" evo-transparent":s=null!==t?"background-color:"+t:"",e.addClass("colorPicker "+this._id).wrap('<div style="width:'+(this.options.hideButton?this.element.width():this.element.width()+32)+"px;"+(d?"margin-bottom:-21px;":"")+(v?"padding:1px 0;":"")+'" class="evo-cp-wrap"></div>').after('<div class="'+i+'" style="'+s+'"></div>').on("keyup onpaste",function(t){var e=r(this).val();e!=o.options.color&&o._setValue(e,!0)});var n=this.options.showOn;"both"!==n&&"focus"!==n||e.on("focus",function(){o.showPalette()}),"both"!==n&&"button"!==n||e.next().on("click",function(t){return t.stopPropagation(),o.showPalette(),!1});break;default:this._isPopup=!1,this._palette=this.element.html(this._paletteHTML()).attr("aria-haspopup","true"),this._bindColors()}if(this.options.history){t&&this._add2History(t);var c=this.options.initialHistory;if(c)for(var a in c)this._add2History(c[a])}},_paletteHTML:function(){var t=this._paletteIdx=Math.abs(this._paletteIdx),e=this.options,o=e.strings.split(","),i='<div class="evo-pop'+p+' ui-widget ui-widget-content ui-corner-all"'+(this._isPopup?' style="position:absolute"':"")+"><span>"+this["_paletteHTML"+t]()+'</span><div class="evo-more"><a href="javascript:void(0)">'+o[1+t]+"</a>";return e.history&&(i+='<a href="javascript:void(0)" class="evo-hist">'+o[5]+"</a>"),i+="</div>",e.displayIndicator&&(i+=this._colorIndHTML(this.options.color)+this._colorIndHTML("")),i+="</div>"},_colorIndHTML:function(t){var e=d?"evo-colorbox-ie ":"",o="";return t?t===g?e+="evo-transparent":o="background-color:"+t:o="display:none",'<div class="evo-color" style="float:left"><div style="'+o+'" class="'+e+'"></div><span>'+(t||"")+"</span></div>"},_paletteHTML1:function(){var t,e=this.options,o=e.strings.split(","),i='<td style="background-color:',s=d?'"><div style="width:2px;"></div></td>':'"><span/></td>',f='<tr><th colspan="10" class="ui-widget-content">',n='<table class="evo-palette'+p+'">'+f+o[0]+"</th></tr><tr>";if(e.customTheme)for(t=0,ml=e.customTheme.length;t<ml;t++)n+=i+e.customTheme[t]+s;else{for(i+="#",t=0;t<10;t++)n+=i+a[t]+s;for(n+="</tr>",d||(n+='<tr><th colspan="10"></th></tr>'),n+='<tr class="top">',t=0;t<10;t++)n+=i+_[t]+s;for(var c=1;c<4;c++)for(n+='</tr><tr class="in">',t=0;t<10;t++)n+=i+_[10*c+t]+s;for(n+='</tr><tr class="bottom">',t=40;t<50;t++)n+=i+_[t]+s;for(n+="</tr>"+f,e.transparentColor&&(n+='<div class="evo-transparent evo-tr-box"></div>'),n+=o[1]+"</th></tr><tr>",t=0;t<10;t++)n+=i+b[t]+s}return n+="</tr></table>"},_paletteHTML2:function(){for(var t,e,o='<td style="background-color:#',i=d?'"><div style="width:5px;"></div></td>':'"><span/></td>',s='<table class="evo-palette2'+p+'"><tr>',f="</tr></table>",n='<div class="evo-palcenter">',c=0,a=m.length;c<a;c++){n+=s;var r=m[c];for(t=0,e=r.length;t<e;t++)n+=o+r[t]+i;n+=f}n+='<div class="evo-sep"/>';var l="";for(n+=s,t=255;10<t;t-=10)n+=o+h(t)+i,l+=o+h(t-=10)+i;return n+=f+s+l+f+"</div>"},_switchPalette:function(t){if(this._enabled){var e,o,i,s=this.options,f=s.strings.split(",");if(r(t).hasClass("evo-hist")){var n='<table class="evo-palette"><tr><th class="ui-widget-content">'+f[5]+'</th></tr></tr></table><div class="evo-cHist">';if(0===u.length)n+="<p>&nbsp;"+f[6]+"</p>";else for(var c=u.length-1;-1<c;c--)9===u[c].length?s.transparentColor&&(n+='<div class="evo-transparent"></div>'):n+='<div style="background-color:'+u[c]+'"></div>';n+="</div>",e=-this._paletteIdx,o=n,i=f[4]}else this._paletteIdx<0?(e=-this._paletteIdx,this._palette.find(".evo-hist").show()):e=2==this._paletteIdx?1:2,o=this["_paletteHTML"+e](),i=f[e+1],this._paletteIdx=e;this._paletteIdx=e;var a=this._palette.find(".evo-more").prev().html(o).end().children().eq(0).html(i);e<0&&a.next().hide()}},_downOrUpPositioning:function(){for(var t=this.element,e=0;null!==t&&e<100;){if("visible"!=t.css("overflow")){var o=this._palette.offset().top+this._palette.height(),i=t.offset().top+t.height(),s=this._palette.offset().top-this._palette.height()-this.element.outerHeight(),f=t.offset().top;i<o&&f<s?this._palette.css({bottom:this.element.outerHeight()+"px"}):this._palette.css({bottom:"auto"});break}if("HTML"==t[0].tagName)break;t=t.offsetParent(),e++}},showPalette:function(){if(this._enabled&&(this._active=!0,r(".colorPicker").not("."+this._id).colorpicker("hidePalette"),null===this._palette)){this._palette=this.element.next().after(this._paletteHTML()).next().on("click",function(t){return t.stopPropagation(),!1}),this._bindColors();var e=this;this._isPopup&&(this._downOrUpPositioning(),r(document.body).on("click."+e._id,function(t){t.target!=e.element.get(0)&&e.hidePalette()}).on("keyup."+e._id,function(t){27===t.keyCode&&e.hidePalette()}))}return this},hidePalette:function(){if(this._isPopup&&this._palette){r(document.body).off("click."+this._id);var t=this;this._palette.off("mouseover click","td,.evo-transparent").fadeOut(function(){t._palette.remove(),t._palette=t._cTxt=null}).find(".evo-more a").off("click")}return this},_bindColors:function(){var i=this,t=this.options,e=this._palette.find("div.evo-color"),o=t.history?"td,.evo-cHist>div":"td";t.transparentColor&&(o+=",.evo-transparent"),this._cTxt1=e.eq(0).children().eq(0),this._cTxt2=e.eq(1).children().eq(0),this._palette.on("click",o,function(t){if(i._enabled){var e=r(this);i._setValue(e.hasClass("evo-transparent")?g:f(e.attr("style").substring(17))),i._active=!1}}).on("mouseover",o,function(t){if(i._enabled){var e=r(this),o=e.hasClass("evo-transparent")?g:f(e.attr("style").substring(17));i.options.displayIndicator&&i._setColorInd(o,2),i._active&&i.element.trigger("mouseover.color",o)}}).find(".evo-more a").on("click",function(){return i._switchPalette(this),!1})},val:function(t){return void 0===t?this.options.color:(this._setValue(t),this)},_setValue:function(t,e){t=t.replace(/ /g,""),this.options.color=t,this._isPopup?(e||this.hidePalette(),this._setBoxColor(this.element.val(t).change().next(),t)):this._setColorInd(t,1),this.options.history&&0<this._paletteIdx&&this._add2History(t),this.element.trigger("change.color",t)},_setColorInd:function(t,e){var o=this["_cTxt"+e];this._setBoxColor(o,t),o.next().html(t)},_setBoxColor:function(t,e){e===g?t.addClass("evo-transparent").removeAttr("style"):t.removeClass("evo-transparent").attr("style","background-color:"+e)},_setOption:function(t,e){"color"==t?this._setValue(e,!0):this.options[t]=e},_add2History:function(t){for(var e=u.length,o=0;o<e;o++)if(t==u[o])return;27<e&&u.shift(),u.push(t)},clear:function(){this.hidePalette().val("")},enable:function(){var t=this.element;return this._isPopup?t.removeAttr("disabled"):t.css({opacity:"1","pointer-events":"auto"}),"focus"!==this.options.showOn&&this.element.next().addClass("evo-pointer"),t.removeAttr("aria-disabled"),this._enabled=!0,this},disable:function(){var t=this.element;return this._isPopup?t.attr("disabled","disabled"):(this.hidePalette(),t.css({opacity:"0.3","pointer-events":"none"})),"focus"!==this.options.showOn&&this.element.next().removeClass("evo-pointer"),t.attr("aria-disabled","true"),this._enabled=!1,this},isDisabled:function(){return!this._enabled},destroy:function(){r(document.body).off("click."+this._id),this._palette&&(this._palette.off("mouseover click","td,.evo-cHist>div,.evo-transparent").find(".evo-more a").off("click"),this._isPopup&&this._palette.remove(),this._palette=this._cTxt=null),this._isPopup&&this.element.next().off("click").remove().end().off("focus").unwrap(),this.element.removeClass("colorPicker "+this.id).empty(),r.Widget.prototype.destroy.call(this)}})}(jQuery);
!function(r,t){function o(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e}function s(t){return o(Number(t))}function h(t){var e=o(t);return e+e+e}function f(t){if(10<t.length){var e=1+t.indexOf("("),o=t.indexOf(")"),i=t.substring(e,o).split(",");return["#",s(i[0]),s(i[1]),s(i[2])].join("")}return t}var l=0,e=window.navigator.userAgent,d=0<e.indexOf("MSIE "),p=d?"-ie":"",u=!d&&(/mozilla/.test(e.toLowerCase())&&!/webkit/.test(e.toLowerCase())),v=[],a=["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646"],_=["f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","92cddc","fac08f","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","31859b","e36c09","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","205867","974806"],b=["c00000","ff0000","ffc000","ffff00","92d050","00b050","00b0f0","0070c0","002060","7030a0"],m=[["003366","336699","3366cc","003399","000099","0000cc","000066"],["006666","006699","0099cc","0066cc","0033cc","0000ff","3333ff","333399"],["669999","009999","33cccc","00ccff","0099ff","0066ff","3366ff","3333cc","666699"],["339966","00cc99","00ffcc","00ffff","33ccff","3399ff","6699ff","6666ff","6600ff","6600cc"],["339933","00cc66","00ff99","66ffcc","66ffff","66ccff","99ccff","9999ff","9966ff","9933ff","9900ff"],["006600","00cc00","00ff00","66ff99","99ffcc","ccffff","ccccff","cc99ff","cc66ff","cc33ff","cc00ff","9900cc"],["003300","009933","33cc33","66ff66","99ff99","ccffcc","ffffff","ffccff","ff99ff","ff66ff","ff00ff","cc00cc","660066"],["333300","009900","66ff33","99ff66","ccff99","ffffcc","ffcccc","ff99cc","ff66cc","ff33cc","cc0099","993399"],["336600","669900","99ff33","ccff66","ffff99","ffcc99","ff9999","ff6699","ff3399","cc3399","990099"],["666633","99cc00","ccff33","ffff66","ffcc66","ff9966","ff6666","ff0066","d60094","993366"],["a58800","cccc00","ffff00","ffcc00","ff9933","ff6600","ff0033","cc0066","660033"],["996633","cc9900","ff9900","cc6600","ff3300","ff0000","cc0000","990033"],["663300","996600","cc3300","993300","990000","800000","993333"]],g="#0000ffff";r.widget("evol.colorpicker",{version:"3.4.0",options:{color:null,customTheme:null,showOn:"both",hideButton:!1,displayIndicator:!0,transparentColor:!1,history:!0,defaultPalette:"theme",strings:"Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet."},_active:!1,_create:function(){var o=this,t=this.options.color;switch(this._paletteIdx="theme"==this.options.defaultPalette?1:2,this._id="evo-cp"+l++,this._enabled=!0,this.options.showOn=this.options.hideButton?"focus":this.options.showOn,this.element.get(0).tagName){case"INPUT":var e=this.element,i=("focus"===this.options.showOn?"":"evo-pointer ")+"evo-colorind"+(u?"-ff":p)+(this.options.hideButton?" evo-hidden-button":""),s="";this._isPopup=!0,this._palette=null;var f=e.val();null!==t?t!=f&&e.val(t).change():""!==f&&(t=this.options.color=f),t===g?i+=" evo-transparent":s=null!==t?"background-color:"+t:"",e.addClass("colorPicker "+this._id).wrap('<div style="width:'+(this.options.hideButton?this.element.width():this.element.width()+32)+"px;"+(d?"margin-bottom:-21px;":"")+(u?"padding:1px 0;":"")+'" class="evo-cp-wrap"></div>').after('<div class="'+i+'" style="'+s+'"></div>').on("keyup onpaste",function(t){var e=r(this).val();e!=o.options.color&&o._setValue(e,!0)});var n=this.options.showOn;"both"!==n&&"focus"!==n||e.on("focus",function(){o.showPalette()}),"both"!==n&&"button"!==n||e.next().on("click",function(t){return t.stopPropagation(),o.showPalette(),!1});break;default:this._isPopup=!1,this._palette=this.element.html(this._paletteHTML()).attr("aria-haspopup","true"),this._bindColors()}if(this.options.history){t&&this._add2History(t);var c=this.options.initialHistory;if(c)for(var a in c)this._add2History(c[a])}},_paletteHTML:function(){var t=this._paletteIdx=Math.abs(this._paletteIdx),e=this.options,o=e.strings.split(","),i='<div class="evo-pop'+p+' ui-widget ui-widget-content ui-corner-all"'+(this._isPopup?' style="position:absolute"':"")+"><span>"+this["_paletteHTML"+t]()+'</span><div class="evo-more"><a href="javascript:void(0)">'+o[1+t]+"</a>";return e.history&&(i+='<a href="javascript:void(0)" class="evo-hist">'+o[5]+"</a>"),i+="</div>",e.displayIndicator&&(i+=this._colorIndHTML(this.options.color)+this._colorIndHTML("")),i+="</div>"},_colorIndHTML:function(t){var e=d?"evo-colorbox-ie ":"",o="";return t?t===g?e+="evo-transparent":o="background-color:"+t:o="display:none",'<div class="evo-color" style="float:left"><div style="'+o+'" class="'+e+'"></div><span>'+(t||"")+"</span></div>"},_paletteHTML1:function(){var t,e=this.options,o=e.strings.split(","),i='<td style="background-color:',s=d?'"><div style="width:2px;"></div></td>':'"><span/></td>',f='<tr><th colspan="10" class="ui-widget-content">',n='<table class="'+("evo-palette"+p+(e.customTheme?" cust-theme":""))+'">'+f+o[0]+"</th></tr><tr>";if(e.customTheme)for(t=0,ml=e.customTheme.length;t<ml;t++)n+=i+e.customTheme[t]+s,t%10==9&&(n+="</tr><tr>");else{for(i+="#",t=0;t<10;t++)n+=i+a[t]+s;for(n+="</tr>",d||(n+='<tr><th colspan="10"></th></tr>'),n+='<tr class="top">',t=0;t<10;t++)n+=i+_[t]+s;for(var c=1;c<4;c++)for(n+='</tr><tr class="in">',t=0;t<10;t++)n+=i+_[10*c+t]+s;for(n+='</tr><tr class="bottom">',t=40;t<50;t++)n+=i+_[t]+s;for(n+="</tr>"+f,e.transparentColor&&(n+='<div class="evo-transparent evo-tr-box"></div>'),n+=o[1]+"</th></tr><tr>",t=0;t<10;t++)n+=i+b[t]+s}return n+="</tr></table>"},_paletteHTML2:function(){for(var t,e,o='<td style="background-color:#',i=d?'"><div style="width:5px;"></div></td>':'"><span/></td>',s='<table class="evo-palette2'+p+'"><tr>',f="</tr></table>",n='<div class="evo-palcenter">',c=0,a=m.length;c<a;c++){n+=s;var r=m[c];for(t=0,e=r.length;t<e;t++)n+=o+r[t]+i;n+=f}n+='<div class="evo-sep"/>';var l="";for(n+=s,t=255;10<t;t-=10)n+=o+h(t)+i,l+=o+h(t-=10)+i;return n+=f+s+l+f+"</div>"},_switchPalette:function(t){if(this._enabled){var e,o,i,s=this.options,f=s.strings.split(",");if(r(t).hasClass("evo-hist")){var n='<table class="evo-palette"><tr><th class="ui-widget-content">'+f[5]+'</th></tr></tr></table><div class="evo-cHist">';if(0===v.length)n+="<p>&nbsp;"+f[6]+"</p>";else for(var c=v.length-1;-1<c;c--)9===v[c].length?s.transparentColor&&(n+='<div class="evo-transparent"></div>'):n+='<div style="background-color:'+v[c]+'"></div>';n+="</div>",e=-this._paletteIdx,o=n,i=f[4]}else this._paletteIdx<0?(e=-this._paletteIdx,this._palette.find(".evo-hist").show()):e=2==this._paletteIdx?1:2,o=this["_paletteHTML"+e](),i=f[e+1],this._paletteIdx=e;this._paletteIdx=e;var a=this._palette.find(".evo-more").prev().html(o).end().children().eq(0).html(i);e<0&&a.next().hide()}},_downOrUpPositioning:function(){for(var t=this.element,e=0;null!==t&&e<100;){if("visible"!=t.css("overflow")){var o=this._palette.offset().top+this._palette.height(),i=t.offset().top+t.height(),s=this._palette.offset().top-this._palette.height()-this.element.outerHeight(),f=t.offset().top;i<o&&f<s?this._palette.css({bottom:this.element.outerHeight()+"px"}):this._palette.css({bottom:"auto"});break}if("HTML"==t[0].tagName)break;t=t.offsetParent(),e++}},showPalette:function(){if(this._enabled&&(this._active=!0,r(".colorPicker").not("."+this._id).colorpicker("hidePalette"),null===this._palette)){this._palette=this.element.next().after(this._paletteHTML()).next().on("click",function(t){return t.stopPropagation(),!1}),this._bindColors();var e=this;this._isPopup&&(this._downOrUpPositioning(),r(document.body).on("click."+e._id,function(t){t.target!=e.element.get(0)&&e.hidePalette()}).on("keyup."+e._id,function(t){27===t.keyCode&&e.hidePalette()}))}return this},hidePalette:function(){if(this._isPopup&&this._palette){r(document.body).off("click."+this._id);var t=this;this._palette.off("mouseover click","td,.evo-transparent").fadeOut(function(){t._palette.remove(),t._palette=t._cTxt=null}).find(".evo-more a").off("click")}return this},_bindColors:function(){var i=this,t=this.options,e=this._palette.find("div.evo-color"),o=t.history?"td,.evo-cHist>div":"td";t.transparentColor&&(o+=",.evo-transparent"),this._cTxt1=e.eq(0).children().eq(0),this._cTxt2=e.eq(1).children().eq(0),this._palette.on("click",o,function(t){if(i._enabled){var e=r(this);i._setValue(e.hasClass("evo-transparent")?g:f(e.attr("style").substring(17))),i._active=!1}}).on("mouseover",o,function(t){if(i._enabled){var e=r(this),o=e.hasClass("evo-transparent")?g:f(e.attr("style").substring(17));i.options.displayIndicator&&i._setColorInd(o,2),i._active&&i.element.trigger("mouseover.color",o)}}).find(".evo-more a").on("click",function(){return i._switchPalette(this),!1})},val:function(t){return void 0===t?this.options.color:(this._setValue(t),this)},_setValue:function(t,e){t=t.replace(/ /g,""),this.options.color=t,this._isPopup?(e||this.hidePalette(),this._setBoxColor(this.element.val(t).change().next(),t)):this._setColorInd(t,1),this.options.history&&0<this._paletteIdx&&this._add2History(t),this.element.trigger("change.color",t)},_setColorInd:function(t,e){var o=this["_cTxt"+e];this._setBoxColor(o,t),o.next().html(t)},_setBoxColor:function(t,e){e===g?t.addClass("evo-transparent").removeAttr("style"):t.removeClass("evo-transparent").attr("style","background-color:"+e)},_setOption:function(t,e){"color"==t?this._setValue(e,!0):this.options[t]=e},_add2History:function(t){for(var e=v.length,o=0;o<e;o++)if(t==v[o])return;27<e&&v.shift(),v.push(t)},clear:function(){this.hidePalette().val("")},enable:function(){var t=this.element;return this._isPopup?t.removeAttr("disabled"):t.css({opacity:"1","pointer-events":"auto"}),"focus"!==this.options.showOn&&this.element.next().addClass("evo-pointer"),t.removeAttr("aria-disabled"),this._enabled=!0,this},disable:function(){var t=this.element;return this._isPopup?t.attr("disabled","disabled"):(this.hidePalette(),t.css({opacity:"0.3","pointer-events":"none"})),"focus"!==this.options.showOn&&this.element.next().removeClass("evo-pointer"),t.attr("aria-disabled","true"),this._enabled=!1,this},isDisabled:function(){return!this._enabled},destroy:function(){r(document.body).off("click."+this._id),this._palette&&(this._palette.off("mouseover click","td,.evo-cHist>div,.evo-transparent").find(".evo-more a").off("click"),this._isPopup&&this._palette.remove(),this._palette=this._cTxt=null),this._isPopup&&this.element.next().off("click").remove().end().off("focus").unwrap(),this.element.removeClass("colorPicker "+this.id).empty(),r.Widget.prototype.destroy.call(this)}})}(jQuery);
{
"name": "evol-colorpicker",
"version": "3.4.0",
"version": "3.4.1",
"description": "jQuery UI widget for web color picking which looks like the one in Microsoft Office 2010.",

@@ -17,3 +17,3 @@ "copyright": "(c) 2019 Olivier Giulieri",

"dependencies": {
"jquery": "~3.4.0",
"jquery": "~3.4.1",
"jquery-ui": "~1.12.1"

@@ -20,0 +20,0 @@ },

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

# evol-colorpicker
# evol-colorpicker &middot; [![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/evoluteur/colorpicker/blob/master/LICENSE.md) [![npm version](https://img.shields.io/npm/v/evol-colorpicker)](https://www.npmjs.com/package/evol-colorpicker)
**evol-colorpicker** is a web color picker which looks like the one in Microsoft Office 2010.

@@ -52,3 +53,3 @@ It can be used inline or as a popup bound to a text box.

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>

@@ -55,0 +56,0 @@ <script src="js/evol-colorpicker.min.js" type="text/javascript" charset="utf-8"></script>

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc