Socket
Socket
Sign inDemoInstall

notie

Package Overview
Dependencies
0
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.8.4 to 3.8.5

2

dist/notie.min.js

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

var notie=function(){function e(e){for(var t in e)L[t]=e[t]}function t(e,t,i){L.colorText.length>0&&(A.style.color=L.colorText),H(),J++,setTimeout(function(){J--},L.animationDelay+10),1===J&&(Y?n(function(){o(e,t,i)}):o(e,t,i))}function o(e,t,o){Y=!0;var i=0;switch(i="undefined"==typeof o||0===o?864e5:o>0&&1>o?1e3:1e3*o,D(N,"notie-background-success"),D(N,"notie-background-warning"),D(N,"notie-background-error"),D(N,"notie-background-info"),e){case 1:case"success":L.colorSuccess.length>0?N.style.backgroundColor=L.colorSuccess:x(N,"notie-background-success");break;case 2:case"warning":L.colorWarning.length>0?N.style.backgroundColor=L.colorWarning:x(N,"notie-background-warning");break;case 3:case"error":L.colorError.length>0?N.style.backgroundColor=L.colorError:x(N,"notie-background-error");break;case 4:case"info":L.colorInfo.length>0?N.style.backgroundColor=L.colorInfo:x(N,"notie-background-info")}A.innerHTML=t,N.style.top="-10000px",N.style.display="table",N.style.top="-"+N.offsetHeight-5+"px",F=setTimeout(function(){x(N,"notie-transition"),N.style.top=0,W=setTimeout(function(){n(function(){})},i)},20)}function n(e){clearTimeout(F),clearTimeout(W),N.style.top="-"+N.offsetHeight-5+"px",setTimeout(function(){D(N,"notie-transition"),N.style.top="-10000px",Y=!1,e&&e()},L.animationDelay+10)}function i(e,t,o,i,l){L.colorInfo.length>0&&(V.style.backgroundColor=L.colorInfo),L.colorSuccess.length>0&&(B.style.backgroundColor=L.colorSuccess),L.colorError.length>0&&(z.style.backgroundColor=L.colorError),L.colorText.length>0&&(j.style.color=L.colorText,K.style.color=L.colorText,R.style.color=L.colorText),H(),Y?n(function(){c(e,t,o,i,l)}):c(e,t,o,i,l)}function c(e,t,o,n,i){function c(){j.innerHTML=e,K.innerHTML=t,R.innerHTML=o,O.style.top="-10000px",O.style.display="table",O.style.top="-"+O.offsetHeight-5+"px",$.style.display="block",setTimeout(function(){x(O,"notie-transition"),O.style.top=0,$.style.opacity="0.75",setTimeout(function(){q=!0},L.animationDelay+10)},20)}M(),B.onclick=function(){l(),n&&setTimeout(function(){n()},L.animationDelay+10)},z.onclick=function(){l(),i&&setTimeout(function(){i()},L.animationDelay+10)},q?(l(),setTimeout(function(){c()},L.animationDelay+10)):c()}function l(){O.style.top="-"+O.offsetHeight-5+"px",$.style.opacity="0",setTimeout(function(){D(O,"notie-transition"),O.style.top="-10000px",$.style.display="none",w(),q=!1},L.animationDelay+10)}function a(e,t,o,i,c,l){L.colorInfo.length>0&&(Q.style.backgroundColor=L.colorInfo),L.colorSuccess.length>0&&(X.style.backgroundColor=L.colorSuccess),L.colorError.length>0&&(Z.style.backgroundColor=L.colorError),L.colorText.length>0&&(_.style.color=L.colorText,ee.style.color=L.colorText,te.style.color=L.colorText),H(),"undefined"!=typeof e.type&&e.type?U.setAttribute("type",e.type):U.setAttribute("type","text"),"undefined"!=typeof e.placeholder&&e.placeholder&&U.setAttribute("placeholder",e.placeholder),"undefined"!=typeof e.prefilledValue&&e.prefilledValue?U.value=e.prefilledValue:U.value="",Y?n(function(){r(t,o,i,c,l)}):r(t,o,i,c,l)}function r(e,t,o,n,i){function c(){_.innerHTML=e,ee.innerHTML=t,te.innerHTML=o,G.style.top="-10000px",G.style.display="table",G.style.top="-"+G.offsetHeight-5+"px",P.style.display="block",setTimeout(function(){x(G,"notie-transition"),G.style.top=0,P.style.opacity="0.75",setTimeout(function(){oe=!0,U.focus()},L.animationDelay+10)},20)}M(),X.onclick=function(){d(),n&&setTimeout(function(){n(U.value)},L.animationDelay+10)},Z.onclick=function(){d(),i&&setTimeout(function(){i(U.value)},L.animationDelay+10)},oe?(d(),setTimeout(function(){c()},L.animationDelay+10)):c()}function d(){G.style.top="-"+G.offsetHeight-5+"px",P.style.opacity="0",setTimeout(function(){D(G,"notie-transition"),P.style.display="none",G.style.top="-10000px",w(),oe=!1},L.animationDelay+10)}function s(e,t){L.colorInfo.length>0&&(ie.style.backgroundColor=L.colorInfo),L.colorNeutral.length>0&&(re.style.backgroundColor=L.colorNeutral),L.colorText.length>0&&(ce.style.color=L.colorText,re.style.color=L.colorText);for(var o=[],i=0;i<arguments.length-2;i++)o[i]=arguments[i+2];if(o.length!==t.length)throw new Error("notie.select number of choices must match number of functions");H(),Y?n(function(){u(e,t,o)}):u(e,t,o)}function u(e,t,o){function n(e){ce.innerHTML=e,ne.style.bottom="-10000px",ne.style.display="table",ne.style.bottom="-"+ne.offsetHeight-5+"px",le.style.display="block",setTimeout(function(){x(ne,"notie-transition"),ne.style.bottom=0,le.style.opacity="0.75",setTimeout(function(){de=!0},L.animationDelay+10)},20)}M(),document.getElementById("notie-select-choices").innerHTML="";for(var i,c=0;c<t.length;c++){var l=document.createElement("div");if(l.innerHTML=t[c].title,x(l,"notie-select-choice"),ae.appendChild(l),l.style.backgroundColor=window.getComputedStyle(l).backgroundColor,L.colorText.length>0&&(l.style.color=L.colorText),t[c].type)switch(t[c].type){case 1:L.colorSuccess.length>0?l.style.backgroundColor=L.colorSuccess:x(l,"notie-background-success");break;case 2:L.colorWarning.length>0?l.style.backgroundColor=L.colorWarning:x(l,"notie-background-warning");break;case 3:L.colorError.length>0?l.style.backgroundColor=L.colorError:x(l,"notie-background-error");break;case 4:L.colorInfo.length>0?l.style.backgroundColor=L.colorInfo:x(l,"notie-background-info")}else t[c].color&&(l.style.backgroundColor=t[c].color);c>0&&l.style.backgroundColor===i.style.backgroundColor&&(i.style.borderBottom="1px solid rgba(255, 255, 255, 0.2)"),l.onclick=function(e){return function(){m(),setTimeout(function(){o[e]()},L.animationDelay+10)}}(c),i=l}de?(m(),setTimeout(function(){n(e)},L.animationDelay+10)):n(e)}function m(){ne.style.bottom="-"+ne.offsetHeight-5+"px",le.style.opacity="0",setTimeout(function(){D(ne,"notie-transition"),ne.style.bottom="-10000px",le.style.display="none",w(),de=!1},L.animationDelay+10)}function p(){return Y||q||oe||de||Ne}function y(e){L.colorInfo.length>0&&(me.style.backgroundColor=L.colorInfo),L.colorSuccess.length>0&&(xe.style.backgroundColor=L.colorSuccess),L.colorError.length>0&&(De.style.backgroundColor=L.colorError),L.colorText.length>0&&(me.style.color=L.colorText),H(),Y?n(function(){f(e)}):f(e)}function f(e){function t(){Me=e.initial||new Date,h(Me),xe.innerHTML=e.yesText||"OK",De.innerHTML=e.noText||"Cancel",se.style.top="-10000px",se.style.display="table",se.style.top="-"+se.offsetHeight-5+"px",He.style.display="block",setTimeout(function(){x(se,"notie-transition"),se.style.top=0,He.style.opacity="0.75",setTimeout(function(){Ne=!0},L.animationDelay+10)},20)}M(),xe.onclick=function(){E(),e.yesCallback&&setTimeout(function(){e.yesCallback(Me)},L.animationDelay+10)},De.onclick=function(){E(),e.noCallback&&setTimeout(function(){e.noCallback(Me)},L.animationDelay+10)},Ne?(E(),setTimeout(function(){t()},L.animationDelay+10)):t()}function h(e){be.innerHTML=L.dateMonths[e.getMonth()],ve.innerHTML=e.getDate(),ke.innerHTML=e.getFullYear()}function g(){Me.setMonth(Me.getMonth()-1),h(Me)}function b(){Me.setMonth(Me.getMonth()+1),h(Me)}function v(){Me.setDate(Me.getDate()-1),h(Me)}function k(){Me.setDate(Me.getDate()+1),h(Me)}function C(){Me.setFullYear(Me.getFullYear()-1),h(Me)}function T(){Me.setFullYear(Me.getFullYear()+1),h(Me)}function E(){se.style.top="-"+se.offsetHeight-5+"px",He.style.opacity="0",setTimeout(function(){D(se,"notie-transition"),se.style.top="-10000px",He.style.display="none",w(),Ne=!1},L.animationDelay+10)}function x(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function D(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function H(){document.activeElement&&document.activeElement.blur()}function M(){we=document.body.style.height,Le=document.body.style.overflow,document.body.style.height="100%",document.body.style.overflow="hidden"}function w(){document.body.style.height=we,document.body.style.overflow=Le}var L={colorSuccess:"",colorWarning:"",colorError:"",colorInfo:"",colorNeutral:"",colorText:"",dateMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],animationDelay:300,backgroundClickDismiss:!0},N=document.createElement("div");N.id="notie-alert-outer",N.onclick=function(){n()},document.body.appendChild(N);var I=document.createElement("div");I.id="notie-alert-inner",N.appendChild(I);var S=document.createElement("div");S.id="notie-alert-content",I.appendChild(S);var A=document.createElement("span");A.id="notie-alert-text",S.appendChild(A);var F,W,Y=!1,J=0,O=document.createElement("div");O.id="notie-confirm-outer";var V=document.createElement("div");V.id="notie-confirm-inner",O.appendChild(V);var j=document.createElement("span");j.id="notie-confirm-text",V.appendChild(j);var B=document.createElement("div");B.id="notie-confirm-yes",O.appendChild(B);var z=document.createElement("div");z.id="notie-confirm-no",O.appendChild(z);var K=document.createElement("span");K.id="notie-confirm-text-yes",B.appendChild(K);var R=document.createElement("span");R.id="notie-confirm-text-no",z.appendChild(R);var $=document.createElement("div");$.id="notie-confirm-background",x($,"notie-transition"),$.onclick=function(){L.backgroundClickDismiss&&l()},document.body.appendChild(O),document.body.appendChild($);var q=!1,G=document.createElement("div");G.id="notie-input-outer";var P=document.createElement("div");P.id="notie-input-background",x(P,"notie-transition");var Q=document.createElement("div");Q.id="notie-input-inner",G.appendChild(Q);var U=document.createElement("input");U.id="notie-input-field",U.setAttribute("autocomplete","off"),U.setAttribute("autocorrect","off"),U.setAttribute("autocapitalize","off"),U.setAttribute("spellcheck","false"),G.appendChild(U);var X=document.createElement("div");X.id="notie-input-yes",G.appendChild(X);var Z=document.createElement("div");Z.id="notie-input-no",G.appendChild(Z);var _=document.createElement("span");_.id="notie-input-text",Q.appendChild(_);var ee=document.createElement("span");ee.id="notie-input-text-yes",X.appendChild(ee);var te=document.createElement("span");te.id="notie-input-text-no",Z.appendChild(te),document.body.appendChild(G),document.body.appendChild(P),P.onclick=function(){L.backgroundClickDismiss&&d()};var oe=!1,ne=document.createElement("div");ne.id="notie-select-outer";var ie=document.createElement("div");ie.id="notie-select-inner",ne.appendChild(ie);var ce=document.createElement("span");ce.id="notie-select-text",ie.appendChild(ce);var le=document.createElement("div");le.id="notie-select-background",x(le,"notie-transition");var ae=document.createElement("div");ae.id="notie-select-choices",ne.appendChild(ae);var re=document.createElement("div");re.id="notie-select-cancel",re.innerHTML="Cancel",ne.appendChild(re),document.body.appendChild(ne),document.body.appendChild(le),le.onclick=function(){L.backgroundClickDismiss&&m()},re.onclick=function(){m()};var de=!1,se=document.createElement("div");se.id="notie-date-outer";var ue=document.createElement("div");ue.id="notie-date-selector",se.appendChild(ue);var me=document.createElement("div");me.id="notie-date-inner",se.appendChild(me);var pe='<div class="notie-date-arrow-up"></div>',ye='<div class="notie-date-arrow-down"></div>',fe=document.createElement("div");fe.className="notie-date-up",fe.innerHTML=pe,ue.appendChild(fe),fe.onclick=g;var he=document.createElement("div");he.className="notie-date-up",he.innerHTML=pe,ue.appendChild(he),he.onclick=v;var ge=document.createElement("div");ge.className="notie-date-up",ge.innerHTML=pe,ue.appendChild(ge),ge.onclick=C;var be=document.createElement("div");be.className="notie-date-text",ue.appendChild(be);var ve=document.createElement("div");ve.className="notie-date-text",ue.appendChild(ve);var ke=document.createElement("div");ke.className="notie-date-text",ue.appendChild(ke);var Ce=document.createElement("div");Ce.className="notie-date-down",Ce.innerHTML=ye,ue.appendChild(Ce),Ce.onclick=b;var Te=document.createElement("div");Te.className="notie-date-down",Te.innerHTML=ye,ue.appendChild(Te),Te.onclick=k;var Ee=document.createElement("div");Ee.className="notie-date-down",Ee.innerHTML=ye,ue.appendChild(Ee),Ee.onclick=T;var xe=document.createElement("div");xe.id="notie-date-yes",me.appendChild(xe);var De=document.createElement("div");De.id="notie-date-no",me.appendChild(De);var He=document.createElement("div");He.id="notie-date-background",x(He,"notie-transition"),He.onclick=function(){L.backgroundClickDismiss&&E()},document.body.appendChild(se),document.body.appendChild(He);var Me,we,Le,Ne=!1;return window.addEventListener("keydown",function(e){var t=13===e.which||13===e.keyCode,o=27===e.which||27===e.keyCode;Y?(t||o)&&n():q?t?B.click():o&&l():oe?t?X.click():o&&d():de?o&&m():Ne&&(t?xe.click():o&&E())}),{setOptions:e,alert:t,alertHide:n,confirm:i,input:a,select:s,date:y,isShowing:p}}();"object"==typeof module&&module.exports&&(module.exports=notie);
var notie=function(){function e(e){for(var t in e)L[t]=e[t]}function t(e,t,i){L.colorText.length>0&&(A.style.color=L.colorText),H(),J++,setTimeout(function(){J--},L.animationDelay+10),1===J&&(Y?n(function(){o(e,t,i)}):o(e,t,i))}function o(e,t,o){Y=!0;var i=0;switch(i="undefined"==typeof o||0===o?864e5:o>0&&1>o?1e3:1e3*o,D(N,"notie-background-success"),D(N,"notie-background-warning"),D(N,"notie-background-error"),D(N,"notie-background-info"),e){case 1:case"success":L.colorSuccess.length>0?N.style.backgroundColor=L.colorSuccess:x(N,"notie-background-success");break;case 2:case"warning":L.colorWarning.length>0?N.style.backgroundColor=L.colorWarning:x(N,"notie-background-warning");break;case 3:case"error":L.colorError.length>0?N.style.backgroundColor=L.colorError:x(N,"notie-background-error");break;case 4:case"info":L.colorInfo.length>0?N.style.backgroundColor=L.colorInfo:x(N,"notie-background-info")}A.innerHTML=t,N.style.top="-10000px",N.style.display="table",N.style.top="-"+N.offsetHeight-5+"px",F=setTimeout(function(){x(N,"notie-transition"),N.style.top=0,W=setTimeout(function(){n(function(){})},i)},20)}function n(e){clearTimeout(F),clearTimeout(W),N.style.top="-"+N.offsetHeight-5+"px",setTimeout(function(){D(N,"notie-transition"),N.style.top="-10000px",Y=!1,e&&e()},L.animationDelay+10)}function i(e,t,o,i,l){L.colorInfo.length>0&&(V.style.backgroundColor=L.colorInfo),L.colorSuccess.length>0&&(z.style.backgroundColor=L.colorSuccess),L.colorError.length>0&&(B.style.backgroundColor=L.colorError),L.colorText.length>0&&(j.style.color=L.colorText,K.style.color=L.colorText,R.style.color=L.colorText),H(),Y?n(function(){c(e,t,o,i,l)}):c(e,t,o,i,l)}function c(e,t,o,n,i){function c(){j.innerHTML=e,K.innerHTML=t,R.innerHTML=o,O.style.top="-10000px",O.style.display="table",O.style.top="-"+O.offsetHeight-5+"px",$.style.display="block",setTimeout(function(){x(O,"notie-transition"),O.style.top=0,$.style.opacity="0.75",setTimeout(function(){q=!0},L.animationDelay+10)},20)}M(),z.onclick=function(){l(),n&&setTimeout(function(){n()},L.animationDelay+10)},B.onclick=function(){l(),i&&setTimeout(function(){i()},L.animationDelay+10)},q?(l(),setTimeout(function(){c()},L.animationDelay+10)):c()}function l(){O.style.top="-"+O.offsetHeight-5+"px",$.style.opacity="0",setTimeout(function(){D(O,"notie-transition"),O.style.top="-10000px",$.style.display="none",w(),q=!1},L.animationDelay+10)}function a(e,t,o,i,c,l){L.colorInfo.length>0&&(Q.style.backgroundColor=L.colorInfo),L.colorSuccess.length>0&&(X.style.backgroundColor=L.colorSuccess),L.colorError.length>0&&(Z.style.backgroundColor=L.colorError),L.colorText.length>0&&(_.style.color=L.colorText,ee.style.color=L.colorText,te.style.color=L.colorText),H(),"undefined"!=typeof e.type&&e.type?U.setAttribute("type",e.type):U.setAttribute("type","text"),"undefined"!=typeof e.placeholder&&e.placeholder&&U.setAttribute("placeholder",e.placeholder),"undefined"!=typeof e.prefilledValue&&e.prefilledValue?U.value=e.prefilledValue:U.value="",Y?n(function(){r(t,o,i,c,l)}):r(t,o,i,c,l)}function r(e,t,o,n,i){function c(){_.innerHTML=e,ee.innerHTML=t,te.innerHTML=o,G.style.top="-10000px",G.style.display="table",G.style.top="-"+G.offsetHeight-5+"px",P.style.display="block",setTimeout(function(){x(G,"notie-transition"),G.style.top=0,P.style.opacity="0.75",setTimeout(function(){oe=!0,U.focus()},L.animationDelay+10)},20)}M(),X.onclick=function(){d(),n&&setTimeout(function(){n(U.value)},L.animationDelay+10)},Z.onclick=function(){d(),i&&setTimeout(function(){i(U.value)},L.animationDelay+10)},oe?(d(),setTimeout(function(){c()},L.animationDelay+10)):c()}function d(){G.style.top="-"+G.offsetHeight-5+"px",P.style.opacity="0",setTimeout(function(){D(G,"notie-transition"),P.style.display="none",G.style.top="-10000px",w(),oe=!1},L.animationDelay+10)}function s(e,t,o){L.colorInfo.length>0&&(ie.style.backgroundColor=L.colorInfo),L.colorNeutral.length>0&&(re.style.backgroundColor=L.colorNeutral),L.colorText.length>0&&(ce.style.color=L.colorText,re.style.color=L.colorText);for(var i=[],c=0;c<arguments.length-3;c++)i[c]=arguments[c+3];if(i.length!==o.length)throw new Error("notie.select number of choices must match number of functions");H(),Y?n(function(){u(e,t,o,i)}):u(e,t,o,i)}function u(e,t,o,n){function i(e){ce.innerHTML=e,ne.style.bottom="-10000px",ne.style.display="table",ne.style.bottom="-"+ne.offsetHeight-5+"px",le.style.display="block",setTimeout(function(){x(ne,"notie-transition"),ne.style.bottom=0,le.style.opacity="0.75",setTimeout(function(){de=!0},L.animationDelay+10)},20)}M(),document.getElementById("notie-select-choices").innerHTML="",re.innerHTML=t;for(var c,l=0;l<o.length;l++){var a=document.createElement("div");if(a.innerHTML=o[l].title,x(a,"notie-select-choice"),ae.appendChild(a),L.colorText.length>0&&(a.style.color=L.colorText),o[l].type)switch(o[l].type){case 1:L.colorSuccess.length>0?a.style.backgroundColor=L.colorSuccess:x(a,"notie-background-success");break;case 2:L.colorWarning.length>0?a.style.backgroundColor=L.colorWarning:x(a,"notie-background-warning");break;case 3:L.colorError.length>0?a.style.backgroundColor=L.colorError:x(a,"notie-background-error");break;case 4:L.colorInfo.length>0?a.style.backgroundColor=L.colorInfo:x(a,"notie-background-info")}else o[l].color&&(a.style.backgroundColor=o[l].color);a.style.backgroundColor=window.getComputedStyle(a).backgroundColor,l>0&&a.style.backgroundColor===c.style.backgroundColor&&x(c,"notie-select-choice-bottom-border"),a.onclick=function(e){return function(){m(),setTimeout(function(){n[e]()},L.animationDelay+10)}}(l),c=a}de?(m(),setTimeout(function(){i(e)},L.animationDelay+10)):i(e)}function m(){ne.style.bottom="-"+ne.offsetHeight-5+"px",le.style.opacity="0",setTimeout(function(){D(ne,"notie-transition"),ne.style.bottom="-10000px",le.style.display="none",w(),de=!1},L.animationDelay+10)}function p(){return Y||q||oe||de||Ne}function y(e){L.colorInfo.length>0&&(me.style.backgroundColor=L.colorInfo),L.colorSuccess.length>0&&(xe.style.backgroundColor=L.colorSuccess),L.colorError.length>0&&(De.style.backgroundColor=L.colorError),L.colorText.length>0&&(me.style.color=L.colorText),H(),Y?n(function(){f(e)}):f(e)}function f(e){function t(){Me=e.initial||new Date,h(Me),xe.innerHTML=e.yesText||"OK",De.innerHTML=e.noText||"Cancel",se.style.top="-10000px",se.style.display="table",se.style.top="-"+se.offsetHeight-5+"px",He.style.display="block",setTimeout(function(){x(se,"notie-transition"),se.style.top=0,He.style.opacity="0.75",setTimeout(function(){Ne=!0},L.animationDelay+10)},20)}M(),xe.onclick=function(){E(),e.yesCallback&&setTimeout(function(){e.yesCallback(Me)},L.animationDelay+10)},De.onclick=function(){E(),e.noCallback&&setTimeout(function(){e.noCallback(Me)},L.animationDelay+10)},Ne?(E(),setTimeout(function(){t()},L.animationDelay+10)):t()}function h(e){be.innerHTML=L.dateMonths[e.getMonth()],ve.innerHTML=e.getDate(),ke.innerHTML=e.getFullYear()}function g(){Me.setMonth(Me.getMonth()-1),h(Me)}function b(){Me.setMonth(Me.getMonth()+1),h(Me)}function v(){Me.setDate(Me.getDate()-1),h(Me)}function k(){Me.setDate(Me.getDate()+1),h(Me)}function C(){Me.setFullYear(Me.getFullYear()-1),h(Me)}function T(){Me.setFullYear(Me.getFullYear()+1),h(Me)}function E(){se.style.top="-"+se.offsetHeight-5+"px",He.style.opacity="0",setTimeout(function(){D(se,"notie-transition"),se.style.top="-10000px",He.style.display="none",w(),Ne=!1},L.animationDelay+10)}function x(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function D(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function H(){document.activeElement&&document.activeElement.blur()}function M(){we=document.body.style.height,Le=document.body.style.overflow,document.body.style.height="100%",document.body.style.overflow="hidden"}function w(){document.body.style.height=we,document.body.style.overflow=Le}var L={colorSuccess:"",colorWarning:"",colorError:"",colorInfo:"",colorNeutral:"",colorText:"",dateMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],animationDelay:300,backgroundClickDismiss:!0},N=document.createElement("div");N.id="notie-alert-outer",N.onclick=function(){n()},document.body.appendChild(N);var I=document.createElement("div");I.id="notie-alert-inner",N.appendChild(I);var S=document.createElement("div");S.id="notie-alert-content",I.appendChild(S);var A=document.createElement("span");A.id="notie-alert-text",S.appendChild(A);var F,W,Y=!1,J=0,O=document.createElement("div");O.id="notie-confirm-outer";var V=document.createElement("div");V.id="notie-confirm-inner",O.appendChild(V);var j=document.createElement("span");j.id="notie-confirm-text",V.appendChild(j);var z=document.createElement("div");z.id="notie-confirm-yes",O.appendChild(z);var B=document.createElement("div");B.id="notie-confirm-no",O.appendChild(B);var K=document.createElement("span");K.id="notie-confirm-text-yes",z.appendChild(K);var R=document.createElement("span");R.id="notie-confirm-text-no",B.appendChild(R);var $=document.createElement("div");$.id="notie-confirm-background",x($,"notie-transition"),$.onclick=function(){L.backgroundClickDismiss&&l()},document.body.appendChild(O),document.body.appendChild($);var q=!1,G=document.createElement("div");G.id="notie-input-outer";var P=document.createElement("div");P.id="notie-input-background",x(P,"notie-transition");var Q=document.createElement("div");Q.id="notie-input-inner",G.appendChild(Q);var U=document.createElement("input");U.id="notie-input-field",U.setAttribute("autocomplete","off"),U.setAttribute("autocorrect","off"),U.setAttribute("autocapitalize","off"),U.setAttribute("spellcheck","false"),G.appendChild(U);var X=document.createElement("div");X.id="notie-input-yes",G.appendChild(X);var Z=document.createElement("div");Z.id="notie-input-no",G.appendChild(Z);var _=document.createElement("span");_.id="notie-input-text",Q.appendChild(_);var ee=document.createElement("span");ee.id="notie-input-text-yes",X.appendChild(ee);var te=document.createElement("span");te.id="notie-input-text-no",Z.appendChild(te),document.body.appendChild(G),document.body.appendChild(P),P.onclick=function(){L.backgroundClickDismiss&&d()};var oe=!1,ne=document.createElement("div");ne.id="notie-select-outer";var ie=document.createElement("div");ie.id="notie-select-inner",ne.appendChild(ie);var ce=document.createElement("span");ce.id="notie-select-text",ie.appendChild(ce);var le=document.createElement("div");le.id="notie-select-background",x(le,"notie-transition");var ae=document.createElement("div");ae.id="notie-select-choices",ne.appendChild(ae);var re=document.createElement("div");re.id="notie-select-cancel",ne.appendChild(re),document.body.appendChild(ne),document.body.appendChild(le),le.onclick=function(){L.backgroundClickDismiss&&m()},re.onclick=function(){m()};var de=!1,se=document.createElement("div");se.id="notie-date-outer";var ue=document.createElement("div");ue.id="notie-date-selector",se.appendChild(ue);var me=document.createElement("div");me.id="notie-date-inner",se.appendChild(me);var pe='<div class="notie-date-arrow-up"></div>',ye='<div class="notie-date-arrow-down"></div>',fe=document.createElement("div");fe.className="notie-date-up",fe.innerHTML=pe,ue.appendChild(fe),fe.onclick=g;var he=document.createElement("div");he.className="notie-date-up",he.innerHTML=pe,ue.appendChild(he),he.onclick=v;var ge=document.createElement("div");ge.className="notie-date-up",ge.innerHTML=pe,ue.appendChild(ge),ge.onclick=C;var be=document.createElement("div");be.className="notie-date-text",ue.appendChild(be);var ve=document.createElement("div");ve.className="notie-date-text",ue.appendChild(ve);var ke=document.createElement("div");ke.className="notie-date-text",ue.appendChild(ke);var Ce=document.createElement("div");Ce.className="notie-date-down",Ce.innerHTML=ye,ue.appendChild(Ce),Ce.onclick=b;var Te=document.createElement("div");Te.className="notie-date-down",Te.innerHTML=ye,ue.appendChild(Te),Te.onclick=k;var Ee=document.createElement("div");Ee.className="notie-date-down",Ee.innerHTML=ye,ue.appendChild(Ee),Ee.onclick=T;var xe=document.createElement("div");xe.id="notie-date-yes",me.appendChild(xe);var De=document.createElement("div");De.id="notie-date-no",me.appendChild(De);var He=document.createElement("div");He.id="notie-date-background",x(He,"notie-transition"),He.onclick=function(){L.backgroundClickDismiss&&E()},document.body.appendChild(se),document.body.appendChild(He);var Me,we,Le,Ne=!1;return window.addEventListener("keydown",function(e){var t=13===e.which||13===e.keyCode,o=27===e.which||27===e.keyCode;Y?(t||o)&&n():q?t?z.click():o&&l():oe?t?X.click():o&&d():de?o&&m():Ne&&(t?xe.click():o&&E())}),{setOptions:e,alert:t,alertHide:n,confirm:i,input:a,select:s,date:y,isShowing:p}}();"object"==typeof module&&module.exports&&(module.exports=notie);

@@ -5,3 +5,3 @@ {

"author": "Jared Reich",
"version": "3.8.4",
"version": "3.8.5",
"main": "./dist/notie.min.js",

@@ -8,0 +8,0 @@ "repository": {

@@ -69,3 +69,3 @@ # notie

notie.select(title(String), choices(Array of Objects) /*, callback1(Function), callback2(Function), ... */);
notie.select(title(String), cancelText(String), choices(Array of Objects) /*, callback1(Function), callback2(Function), ... */);

@@ -117,3 +117,3 @@ notie.date({

notie.select('Demo item #1, owner is Jane Smith',
notie.select('Demo item #1, owner is Jane Smith', 'Cancel',
[

@@ -120,0 +120,0 @@ { title: 'Share' },

@@ -512,3 +512,2 @@ /*

selectCancel.id = 'notie-select-cancel'
selectCancel.innerHTML = 'Cancel'
selectOuter.appendChild(selectCancel)

@@ -534,3 +533,3 @@

function select (title, choices /*, callback1, callback2, ... */) {
function select (title, cancelText, choices) {
if (options.colorInfo.length > 0) selectInner.style.backgroundColor = options.colorInfo

@@ -544,4 +543,4 @@ if (options.colorNeutral.length > 0) selectCancel.style.backgroundColor = options.colorNeutral

var funcs = []
for (var i = 0; i < arguments.length - 2; i++) {
funcs[i] = arguments[i + 2]
for (var i = 0; i < arguments.length - 3; i++) {
funcs[i] = arguments[i + 3]
}

@@ -555,6 +554,6 @@

alertHide(function () {
selectShow(title, choices, funcs)
selectShow(title, cancelText, choices, funcs)
})
} else {
selectShow(title, choices, funcs)
selectShow(title, cancelText, choices, funcs)
}

@@ -566,6 +565,7 @@ } else {

function selectShow (title, choices, funcs) {
function selectShow (title, cancelText, choices, funcs) {
scrollDisable()
document.getElementById('notie-select-choices').innerHTML = ''
selectCancel.innerHTML = cancelText

@@ -579,3 +579,2 @@ var selectChoicePrevious

selectChoices.appendChild(selectChoice)
selectChoice.style.backgroundColor = window.getComputedStyle(selectChoice).backgroundColor
if (options.colorText.length > 0) selectChoice.style.color = options.colorText

@@ -606,4 +605,5 @@

selectChoice.style.backgroundColor = window.getComputedStyle(selectChoice).backgroundColor
if (i > 0 && selectChoice.style.backgroundColor === selectChoicePrevious.style.backgroundColor) {
selectChoicePrevious.style.borderBottom = '1px solid rgba(255, 255, 255, 0.2)'
addClass(selectChoicePrevious, 'notie-select-choice-bottom-border')
}

@@ -610,0 +610,0 @@

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