Comparing version 3.3.0 to 3.3.1
@@ -1,1 +0,1 @@ | ||
var notie=function(){function e(e){for(var t in e)k[t]=e[t]}function t(e,t,i){k.colorText.length>0&&(x.style.color=k.colorText),g(),H++,setTimeout(function(){H--},k.animationDelay+10),H>=1&&(w?n(function(){o(e,t,i)}):o(e,t,i))}function o(e,t,o){w=!0;var i=0;switch(i="undefined"==typeof o||0===o?864e5:o>0&&1>o?1e3:1e3*o,f(v,"notie-background-success"),f(v,"notie-background-warning"),f(v,"notie-background-error"),f(v,"notie-background-info"),e){case 1:case"success":k.colorSuccess.length>0?v.style.backgroundColor=k.colorSuccess:y(v,"notie-background-success");break;case 2:case"warning":k.colorWarning.length>0?v.style.backgroundColor=k.colorWarning:y(v,"notie-background-warning");break;case 3:case"error":k.colorError.length>0?v.style.backgroundColor=k.colorError:y(v,"notie-background-error");break;case 4:case"info":k.colorInfo.length>0?v.style.backgroundColor=k.colorInfo:y(v,"notie-background-info")}x.innerHTML=t,v.style.top="-10000px",v.style.display="table",v.style.top="-"+v.offsetHeight-5+"px",E=setTimeout(function(){y(v,"notie-transition"),v.style.top=0,D=setTimeout(function(){n(function(){})},i)},20)}function n(e){clearTimeout(E),clearTimeout(D),v.style.top="-"+v.offsetHeight-5+"px",setTimeout(function(){f(v,"notie-transition"),v.style.top="-10000px",w=!1,e&&e()},k.animationDelay+10)}function i(e,t,o,i,l){k.colorInfo.length>0&&(I.style.backgroundColor=k.colorInfo),k.colorSuccess.length>0&&(S.style.backgroundColor=k.colorSuccess),k.colorError.length>0&&(A.style.backgroundColor=k.colorError),k.colorText.length>0&&(M.style.color=k.colorText,N.style.color=k.colorText,W.style.color=k.colorText),g(),w?n(function(){c(e,t,o,i,l)}):c(e,t,o,i,l)}function c(e,t,o,n,i){function c(){M.innerHTML=e,N.innerHTML=t,W.innerHTML=o,L.style.top="-10000px",L.style.display="table",L.style.top="-"+L.offsetHeight-5+"px",V.style.display="block",setTimeout(function(){y(L,"notie-transition"),L.style.top=0,V.style.opacity="0.75",setTimeout(function(){j=!0},k.animationDelay+10)},20)}b(),S.onclick=function(){l(),n&&setTimeout(function(){n()},k.animationDelay+10)},A.onclick=function(){l(),i&&setTimeout(function(){i()},k.animationDelay+10)},j?(l(),setTimeout(function(){c()},k.animationDelay+10)):c()}function l(){L.style.top="-"+L.offsetHeight-5+"px",V.style.opacity="0",setTimeout(function(){f(L,"notie-transition"),L.style.top="-10000px",V.style.display="none",h(),j=!1},k.animationDelay+10)}function r(e,t,o,i,c,l){k.colorInfo.length>0&&(O.style.backgroundColor=k.colorInfo),k.colorSuccess.length>0&&($.style.backgroundColor=k.colorSuccess),k.colorError.length>0&&(q.style.backgroundColor=k.colorError),k.colorText.length>0&&(F.style.color=k.colorText,G.style.color=k.colorText,J.style.color=k.colorText),g(),"undefined"!=typeof e.type&&e.type?R.setAttribute("type",e.type):R.setAttribute("type","text"),"undefined"!=typeof e.placeholder&&e.placeholder&&R.setAttribute("placeholder",e.placeholder),"undefined"!=typeof e.prefilledValue&&e.prefilledValue?R.value=e.prefilledValue:R.value="",w?n(function(){a(t,o,i,c,l)}):a(t,o,i,c,l)}function a(e,t,o,n,i){function c(){F.innerHTML=e,G.innerHTML=t,J.innerHTML=o,B.style.top="-10000px",B.style.display="table",B.style.top="-"+B.offsetHeight-5+"px",z.style.display="block",setTimeout(function(){y(B,"notie-transition"),B.style.top=0,z.style.opacity="0.75",setTimeout(function(){K=!0,R.focus()},k.animationDelay+10)},20)}b(),$.onclick=function(){d(),n&&setTimeout(function(){n(R.value)},k.animationDelay+10)},q.onclick=function(){d(),i&&setTimeout(function(){i(R.value)},k.animationDelay+10)},K?(d(),setTimeout(function(){c()},k.animationDelay+10)):c()}function d(){B.style.top="-"+B.offsetHeight-5+"px",z.style.opacity="0",setTimeout(function(){f(B,"notie-transition"),z.style.display="none",B.style.top="-10000px",h(),K=!1},k.animationDelay+10)}function s(e,t){k.colorInfo.length>0&&(Q.style.backgroundColor=k.colorInfo),k.colorNeutral.length>0&&(Z.style.backgroundColor=k.colorNeutral),k.colorText.length>0&&(U.style.color=k.colorText,Z.style.color=k.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");g(),w?n(function(){u(e,t,o)}):u(e,t,o)}function u(e,t,o){function n(e){U.innerHTML=e,P.style.bottom="-10000px",P.style.display="table",P.style.bottom="-"+P.offsetHeight-5+"px",X.style.display="block",setTimeout(function(){y(P,"notie-transition"),P.style.bottom=0,X.style.opacity="0.75",setTimeout(function(){te=!0},k.animationDelay+10)},20)}b(),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,y(l,"notie-select-choice"),Y.appendChild(l),l.style.backgroundColor=window.getComputedStyle(l).backgroundColor,k.colorText.length>0&&(l.style.color=k.colorText),t[c].type)switch(t[c].type){case 1:k.colorSuccess.length>0?l.style.backgroundColor=k.colorSuccess:y(l,"notie-background-success");break;case 2:k.colorWarning.length>0?l.style.backgroundColor=k.colorWarning:y(l,"notie-background-warning");break;case 3:k.colorError.length>0?l.style.backgroundColor=k.colorError:y(l,"notie-background-error");break;case 4:k.colorInfo.length>0?l.style.backgroundColor=k.colorInfo:y(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(){p(),setTimeout(function(){o[e]()},k.animationDelay+10)}}(c),i=l}te?(p(),setTimeout(function(){n(e)},k.animationDelay+10)):n(e)}function p(){P.style.bottom="-"+P.offsetHeight-5+"px",X.style.opacity="0",setTimeout(function(){f(P,"notie-transition"),P.style.bottom="-10000px",X.style.display="none",h(),te=!1},k.animationDelay+10)}function m(){return w||j||K||te}function y(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function f(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function g(){document.activeElement&&document.activeElement.blur()}function b(){_=document.body.style.height,ee=document.body.style.overflow,document.body.style.height="100%",document.body.style.overflow="hidden"}function h(){document.body.style.height=_,document.body.style.overflow=ee}var k={colorSuccess:"",colorWarning:"",colorError:"",colorInfo:"",colorNeutral:"",colorText:"",animationDelay:300,backgroundClickDismiss:!0},v=document.createElement("div");v.id="notie-alert-outer",v.onclick=function(){n()},document.body.appendChild(v);var C=document.createElement("div");C.id="notie-alert-inner",v.appendChild(C);var T=document.createElement("div");T.id="notie-alert-content",C.appendChild(T);var x=document.createElement("span");x.id="notie-alert-text",T.appendChild(x);var E,D,w=!1,H=0,L=document.createElement("div");L.id="notie-confirm-outer";var I=document.createElement("div");I.id="notie-confirm-inner",L.appendChild(I);var M=document.createElement("span");M.id="notie-confirm-text",I.appendChild(M);var S=document.createElement("div");S.id="notie-confirm-yes",L.appendChild(S);var A=document.createElement("div");A.id="notie-confirm-no",L.appendChild(A);var N=document.createElement("span");N.id="notie-confirm-text-yes",S.appendChild(N);var W=document.createElement("span");W.id="notie-confirm-text-no",A.appendChild(W);var V=document.createElement("div");V.id="notie-confirm-background",y(V,"notie-transition"),V.onclick=function(){k.backgroundClickDismiss&&l()},document.body.appendChild(L),document.body.appendChild(V);var j=!1,B=document.createElement("div");B.id="notie-input-outer";var z=document.createElement("div");z.id="notie-input-background",y(z,"notie-transition");var O=document.createElement("div");O.id="notie-input-inner",B.appendChild(O);var R=document.createElement("input");R.id="notie-input-field",R.setAttribute("autocomplete","off"),R.setAttribute("autocorrect","off"),R.setAttribute("autocapitalize","off"),R.setAttribute("spellcheck","false"),B.appendChild(R);var $=document.createElement("div");$.id="notie-input-yes",B.appendChild($);var q=document.createElement("div");q.id="notie-input-no",B.appendChild(q);var F=document.createElement("span");F.id="notie-input-text",O.appendChild(F);var G=document.createElement("span");G.id="notie-input-text-yes",$.appendChild(G);var J=document.createElement("span");J.id="notie-input-text-no",q.appendChild(J),document.body.appendChild(B),document.body.appendChild(z),z.onclick=function(){k.backgroundClickDismiss&&d()};var K=!1,P=document.createElement("div");P.id="notie-select-outer";var Q=document.createElement("div");Q.id="notie-select-inner",P.appendChild(Q);var U=document.createElement("span");U.id="notie-select-text",Q.appendChild(U);var X=document.createElement("div");X.id="notie-select-background",y(X,"notie-transition");var Y=document.createElement("div");Y.id="notie-select-choices",P.appendChild(Y);var Z=document.createElement("div");Z.id="notie-select-cancel",Z.innerHTML="Cancel",P.appendChild(Z),document.body.appendChild(P),document.body.appendChild(X),X.onclick=function(){k.backgroundClickDismiss&&p()},Z.onclick=function(){p()};var _,ee,te=!1;return window.addEventListener("keydown",function(e){var t=13===e.which||13===e.keyCode,o=27===e.which||27===e.keyCode;w?(t||o)&&n():j?t?S.click():o&&l():K?t?$.click():o&&d():te&&o&&p()}),{setOptions:e,alert:t,alertHide:n,confirm:i,input:r,select:s,isShowing:m}}();"object"==typeof module&&module.exports&&(module.exports=notie); | ||
var notie=function(){function e(e){for(var t in e)k[t]=e[t]}function t(e,t,i){k.colorText.length>0&&(x.style.color=k.colorText),g(),H++,setTimeout(function(){H--},k.animationDelay+10),1===H&&(w?n(function(){o(e,t,i)}):o(e,t,i))}function o(e,t,o){w=!0;var i=0;switch(i="undefined"==typeof o||0===o?864e5:o>0&&1>o?1e3:1e3*o,f(v,"notie-background-success"),f(v,"notie-background-warning"),f(v,"notie-background-error"),f(v,"notie-background-info"),e){case 1:case"success":k.colorSuccess.length>0?v.style.backgroundColor=k.colorSuccess:y(v,"notie-background-success");break;case 2:case"warning":k.colorWarning.length>0?v.style.backgroundColor=k.colorWarning:y(v,"notie-background-warning");break;case 3:case"error":k.colorError.length>0?v.style.backgroundColor=k.colorError:y(v,"notie-background-error");break;case 4:case"info":k.colorInfo.length>0?v.style.backgroundColor=k.colorInfo:y(v,"notie-background-info")}x.innerHTML=t,v.style.top="-10000px",v.style.display="table",v.style.top="-"+v.offsetHeight-5+"px",E=setTimeout(function(){y(v,"notie-transition"),v.style.top=0,D=setTimeout(function(){n(function(){})},i)},20)}function n(e){clearTimeout(E),clearTimeout(D),v.style.top="-"+v.offsetHeight-5+"px",setTimeout(function(){f(v,"notie-transition"),v.style.top="-10000px",w=!1,e&&e()},k.animationDelay+10)}function i(e,t,o,i,l){k.colorInfo.length>0&&(I.style.backgroundColor=k.colorInfo),k.colorSuccess.length>0&&(S.style.backgroundColor=k.colorSuccess),k.colorError.length>0&&(A.style.backgroundColor=k.colorError),k.colorText.length>0&&(M.style.color=k.colorText,N.style.color=k.colorText,W.style.color=k.colorText),g(),w?n(function(){c(e,t,o,i,l)}):c(e,t,o,i,l)}function c(e,t,o,n,i){function c(){M.innerHTML=e,N.innerHTML=t,W.innerHTML=o,L.style.top="-10000px",L.style.display="table",L.style.top="-"+L.offsetHeight-5+"px",V.style.display="block",setTimeout(function(){y(L,"notie-transition"),L.style.top=0,V.style.opacity="0.75",setTimeout(function(){j=!0},k.animationDelay+10)},20)}b(),S.onclick=function(){l(),n&&setTimeout(function(){n()},k.animationDelay+10)},A.onclick=function(){l(),i&&setTimeout(function(){i()},k.animationDelay+10)},j?(l(),setTimeout(function(){c()},k.animationDelay+10)):c()}function l(){L.style.top="-"+L.offsetHeight-5+"px",V.style.opacity="0",setTimeout(function(){f(L,"notie-transition"),L.style.top="-10000px",V.style.display="none",h(),j=!1},k.animationDelay+10)}function r(e,t,o,i,c,l){k.colorInfo.length>0&&(O.style.backgroundColor=k.colorInfo),k.colorSuccess.length>0&&($.style.backgroundColor=k.colorSuccess),k.colorError.length>0&&(q.style.backgroundColor=k.colorError),k.colorText.length>0&&(F.style.color=k.colorText,G.style.color=k.colorText,J.style.color=k.colorText),g(),"undefined"!=typeof e.type&&e.type?R.setAttribute("type",e.type):R.setAttribute("type","text"),"undefined"!=typeof e.placeholder&&e.placeholder&&R.setAttribute("placeholder",e.placeholder),"undefined"!=typeof e.prefilledValue&&e.prefilledValue?R.value=e.prefilledValue:R.value="",w?n(function(){a(t,o,i,c,l)}):a(t,o,i,c,l)}function a(e,t,o,n,i){function c(){F.innerHTML=e,G.innerHTML=t,J.innerHTML=o,B.style.top="-10000px",B.style.display="table",B.style.top="-"+B.offsetHeight-5+"px",z.style.display="block",setTimeout(function(){y(B,"notie-transition"),B.style.top=0,z.style.opacity="0.75",setTimeout(function(){K=!0,R.focus()},k.animationDelay+10)},20)}b(),$.onclick=function(){d(),n&&setTimeout(function(){n(R.value)},k.animationDelay+10)},q.onclick=function(){d(),i&&setTimeout(function(){i(R.value)},k.animationDelay+10)},K?(d(),setTimeout(function(){c()},k.animationDelay+10)):c()}function d(){B.style.top="-"+B.offsetHeight-5+"px",z.style.opacity="0",setTimeout(function(){f(B,"notie-transition"),z.style.display="none",B.style.top="-10000px",h(),K=!1},k.animationDelay+10)}function s(e,t){k.colorInfo.length>0&&(Q.style.backgroundColor=k.colorInfo),k.colorNeutral.length>0&&(Z.style.backgroundColor=k.colorNeutral),k.colorText.length>0&&(U.style.color=k.colorText,Z.style.color=k.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");g(),w?n(function(){u(e,t,o)}):u(e,t,o)}function u(e,t,o){function n(e){U.innerHTML=e,P.style.bottom="-10000px",P.style.display="table",P.style.bottom="-"+P.offsetHeight-5+"px",X.style.display="block",setTimeout(function(){y(P,"notie-transition"),P.style.bottom=0,X.style.opacity="0.75",setTimeout(function(){te=!0},k.animationDelay+10)},20)}b(),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,y(l,"notie-select-choice"),Y.appendChild(l),l.style.backgroundColor=window.getComputedStyle(l).backgroundColor,k.colorText.length>0&&(l.style.color=k.colorText),t[c].type)switch(t[c].type){case 1:k.colorSuccess.length>0?l.style.backgroundColor=k.colorSuccess:y(l,"notie-background-success");break;case 2:k.colorWarning.length>0?l.style.backgroundColor=k.colorWarning:y(l,"notie-background-warning");break;case 3:k.colorError.length>0?l.style.backgroundColor=k.colorError:y(l,"notie-background-error");break;case 4:k.colorInfo.length>0?l.style.backgroundColor=k.colorInfo:y(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(){p(),setTimeout(function(){o[e]()},k.animationDelay+10)}}(c),i=l}te?(p(),setTimeout(function(){n(e)},k.animationDelay+10)):n(e)}function p(){P.style.bottom="-"+P.offsetHeight-5+"px",X.style.opacity="0",setTimeout(function(){f(P,"notie-transition"),P.style.bottom="-10000px",X.style.display="none",h(),te=!1},k.animationDelay+10)}function m(){return w||j||K||te}function y(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function f(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function g(){document.activeElement&&document.activeElement.blur()}function b(){_=document.body.style.height,ee=document.body.style.overflow,document.body.style.height="100%",document.body.style.overflow="hidden"}function h(){document.body.style.height=_,document.body.style.overflow=ee}var k={colorSuccess:"",colorWarning:"",colorError:"",colorInfo:"",colorNeutral:"",colorText:"",animationDelay:300,backgroundClickDismiss:!0},v=document.createElement("div");v.id="notie-alert-outer",v.onclick=function(){n()},document.body.appendChild(v);var C=document.createElement("div");C.id="notie-alert-inner",v.appendChild(C);var T=document.createElement("div");T.id="notie-alert-content",C.appendChild(T);var x=document.createElement("span");x.id="notie-alert-text",T.appendChild(x);var E,D,w=!1,H=0,L=document.createElement("div");L.id="notie-confirm-outer";var I=document.createElement("div");I.id="notie-confirm-inner",L.appendChild(I);var M=document.createElement("span");M.id="notie-confirm-text",I.appendChild(M);var S=document.createElement("div");S.id="notie-confirm-yes",L.appendChild(S);var A=document.createElement("div");A.id="notie-confirm-no",L.appendChild(A);var N=document.createElement("span");N.id="notie-confirm-text-yes",S.appendChild(N);var W=document.createElement("span");W.id="notie-confirm-text-no",A.appendChild(W);var V=document.createElement("div");V.id="notie-confirm-background",y(V,"notie-transition"),V.onclick=function(){k.backgroundClickDismiss&&l()},document.body.appendChild(L),document.body.appendChild(V);var j=!1,B=document.createElement("div");B.id="notie-input-outer";var z=document.createElement("div");z.id="notie-input-background",y(z,"notie-transition");var O=document.createElement("div");O.id="notie-input-inner",B.appendChild(O);var R=document.createElement("input");R.id="notie-input-field",R.setAttribute("autocomplete","off"),R.setAttribute("autocorrect","off"),R.setAttribute("autocapitalize","off"),R.setAttribute("spellcheck","false"),B.appendChild(R);var $=document.createElement("div");$.id="notie-input-yes",B.appendChild($);var q=document.createElement("div");q.id="notie-input-no",B.appendChild(q);var F=document.createElement("span");F.id="notie-input-text",O.appendChild(F);var G=document.createElement("span");G.id="notie-input-text-yes",$.appendChild(G);var J=document.createElement("span");J.id="notie-input-text-no",q.appendChild(J),document.body.appendChild(B),document.body.appendChild(z),z.onclick=function(){k.backgroundClickDismiss&&d()};var K=!1,P=document.createElement("div");P.id="notie-select-outer";var Q=document.createElement("div");Q.id="notie-select-inner",P.appendChild(Q);var U=document.createElement("span");U.id="notie-select-text",Q.appendChild(U);var X=document.createElement("div");X.id="notie-select-background",y(X,"notie-transition");var Y=document.createElement("div");Y.id="notie-select-choices",P.appendChild(Y);var Z=document.createElement("div");Z.id="notie-select-cancel",Z.innerHTML="Cancel",P.appendChild(Z),document.body.appendChild(P),document.body.appendChild(X),X.onclick=function(){k.backgroundClickDismiss&&p()},Z.onclick=function(){p()};var _,ee,te=!1;return window.addEventListener("keydown",function(e){var t=13===e.which||13===e.keyCode,o=27===e.which||27===e.keyCode;w?(t||o)&&n():j?t?S.click():o&&l():K?t?$.click():o&&d():te&&o&&p()}),{setOptions:e,alert:t,alertHide:n,confirm:i,input:r,select:s,isShowing:m}}();"object"==typeof module&&module.exports&&(module.exports=notie); |
@@ -14,3 +14,2 @@ var gulp = require('gulp') | ||
gulp.src('./src/notie.js') | ||
.pipe(gulp.dest('./dist')) | ||
.pipe(uglify()) | ||
@@ -17,0 +16,0 @@ .pipe(rename('notie.min.js')) |
@@ -5,3 +5,3 @@ { | ||
"author": "Jared Reich", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"main": "./dist/notie.min.js", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -83,3 +83,3 @@ /* | ||
if (wasClickedCounter >= 1) { | ||
if (wasClickedCounter === 1) { | ||
if (alertIsShowing) { | ||
@@ -86,0 +86,0 @@ alertHide(function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
854804
11
782