aboutsummaryrefslogtreecommitdiff
path: root/docs/example/vanilla-yo-notification.js
diff options
context:
space:
mode:
authorIndrajith K L2017-12-26 10:40:05 +0530
committerIndrajith K L2017-12-26 10:40:05 +0530
commit810d7ba1f6df4c966e7d549ae81350d3d10bee22 (patch)
treeacdab603ddd498a49622e09bbdaf1892c26bd363 /docs/example/vanilla-yo-notification.js
parent7413c442dee015750ce5a9107740097e11e8014c (diff)
downloadvanilla-yo-notification-810d7ba1f6df4c966e7d549ae81350d3d10bee22.tar.gz
vanilla-yo-notification-810d7ba1f6df4c966e7d549ae81350d3d10bee22.tar.bz2
vanilla-yo-notification-810d7ba1f6df4c966e7d549ae81350d3d10bee22.zip
Updated library builds
Diffstat (limited to 'docs/example/vanilla-yo-notification.js')
-rw-r--r--docs/example/vanilla-yo-notification.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/example/vanilla-yo-notification.js b/docs/example/vanilla-yo-notification.js
index ec7e447..4f239c0 100644
--- a/docs/example/vanilla-yo-notification.js
+++ b/docs/example/vanilla-yo-notification.js
@@ -1,2 +1 @@
-!function(t){function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e(1);window.VYN=o.default},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(2);var o=function(){function t(t){this.defaultConfig={content:t.content?t.content:"",footer:t.footer?t.footer:"",timeout:t.timeout?t.timeout:3e3,title:t.title?t.title:"",type:t.type?t.type:"success",position:t.position&&2==t.position.length?t.position:["bottom","right"]},this.init()}return t.prototype.init=function(){this.buildContainers()},t.prototype.buildContainers=function(){this.container=document.createElement("div"),this.container.className="notif-mainContainer "+this.defaultConfig.position.join("-"),this.notifInner=document.createElement("div"),this.notifInner.className="notif-inner",this.container.appendChild(this.notifInner),document.body.appendChild(this.container)},t.prototype.show=function(t){var n=this,e=document.createElement("div");e.className="vanilla-yo-notification "+(t.type?t.type:this.defaultConfig.type),this.notificationTemplate='\n <div class="notification_container">\n <div class="notification_header">\n '+(t.title?t.title:this.defaultConfig.title)+'\n </div>\n <div class="notification_body">\n '+(t.content?t.content:this.defaultConfig.content)+'\n </div>\n <div class="notification_footer">\n '+(t.footer?t.footer:this.defaultConfig.footer)+"\n </div>\n </div>\n ",e.innerHTML=this.notificationTemplate,this.notifInner.appendChild(e),setTimeout(function(){e.className=e.className+" close",n.destroyNotification(e)},t.timeout?t.timeout:this.defaultConfig.timeout)},t.prototype.destroyNotification=function(t){var n=this;setTimeout(function(){n.notifInner.removeChild(t)},100)},t}();n.default=o},function(t,n,e){var o=e(3);"string"==typeof o&&(o=[[t.i,o,""]]);var i={};i.transform=void 0;e(5)(o,i);o.locals&&(t.exports=o.locals)},function(t,n,e){n=t.exports=e(4)(void 0),n.push([t.i,'\n\n.notif-mainContainer {\n z-index: 999;\n position: fixed;\n width: 350px;\n max-width: 98%;\n font-family: "Segoe UI","Tahoma","Calibri","Verdana",sans-serif;\n color: #999;\n box-sizing: border-box;\n}\n\n.notif-mainContainer.top-right{\n top: 8px;\n right: 8px;\n}\n\n.notif-mainContainer.bottom-right{\n bottom: 8px;\n right: 8px;\n}\n\n.notif-mainContainer.top-left{\n top: 8px;\n left: 8px;\n}\n.notif-mainContainer.bottom-left{\n bottom: 8px;\n left: 8px;\n}\n\n.notif-inner {\n display: flex;\n flex-direction: column;\n}\n\n.vanilla-yo-notification{\n width: 250px;\n color: white;\n position: relative;\n cursor: pointer;\n padding: 8px;\n margin-bottom: 12px;\n display: flex;\n border-radius: 10px;\n -webkit-animation-duration: 500ms;animation-duration: 500ms;\n}\n\n.vanilla-yo-notification.error {\n background: #e74c3c;\n}\n\n.vanilla-yo-notification.warning {\n background: #f39c12;\n}\n\n.vanilla-yo-notification.success {\n background: #2ecc71;\n}\n\n\n\n@-webkit-keyframes fadeOut {\n 0% {opacity: 1;}\n 100% {opacity: 0;}\n }\n \n @keyframes fadeOut {\n 0% {opacity: 1;}\n 100% {opacity: 0;}\n }\n\n.close {\n -webkit-animation-name: fadeOut;\n animation-name: fadeOut;\n}\n\n\n\n\n.notification_header{\n\tfont-size: 15px;\n font-weight: bold\n}',""])},function(t,n){function e(t,n){var e=t[1]||"",i=t[3];if(!i)return e;if(n&&"function"==typeof btoa){var r=o(i);return[e].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([r]).join("\n")}return[e].join("\n")}function o(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var n=[];return n.toString=function(){return this.map(function(n){var o=e(n,t);return n[2]?"@media "+n[2]+"{"+o+"}":o}).join("")},n.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&o[a[0]]||(e&&!a[2]?a[2]=e:e&&(a[2]="("+a[2]+") and ("+e+")"),n.push(a))}},n}},function(t,n,e){function o(t,n){for(var e=0;e<t.length;e++){var o=t[e],i=h[o.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](o.parts[r]);for(;r<o.parts.length;r++)i.parts.push(u(o.parts[r],n))}else{for(var a=[],r=0;r<o.parts.length;r++)a.push(u(o.parts[r],n));h[o.id]={id:o.id,refs:1,parts:a}}}}function i(t,n){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i],a=n.base?r[0]+n.base:r[0],s=r[1],f=r[2],c=r[3],u={css:s,media:f,sourceMap:c};o[a]?o[a].parts.push(u):e.push(o[a]={id:a,parts:[u]})}return e}function r(t,n){var e=v(t.insertInto);if(!e)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=g[g.length-1];if("top"===t.insertAt)o?o.nextSibling?e.insertBefore(n,o.nextSibling):e.appendChild(n):e.insertBefore(n,e.firstChild),g.push(n);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");e.appendChild(n)}}function a(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var n=g.indexOf(t);n>=0&&g.splice(n,1)}function s(t){var n=document.createElement("style");return t.attrs.type="text/css",c(n,t.attrs),r(t,n),n}function f(t){var n=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",c(n,t.attrs),r(t,n),n}function c(t,n){Object.keys(n).forEach(function(e){t.setAttribute(e,n[e])})}function u(t,n){var e,o,i,r;if(n.transform&&t.css){if(!(r=n.transform(t.css)))return function(){};t.css=r}if(n.singleton){var c=y++;e=b||(b=s(n)),o=l.bind(null,e,c,!1),i=l.bind(null,e,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=f(n),o=d.bind(null,e,n),i=function(){a(e),e.href&&URL.revokeObjectURL(e.href)}):(e=s(n),o=p.bind(null,e),i=function(){a(e)});return o(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;o(t=n)}else i()}}function l(t,n,e,o){var i=e?"":o.css;if(t.styleSheet)t.styleSheet.cssText=w(n,i);else{var r=document.createTextNode(i),a=t.childNodes;a[n]&&t.removeChild(a[n]),a.length?t.insertBefore(r,a[n]):t.appendChild(r)}}function p(t,n){var e=n.css,o=n.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}function d(t,n,e){var o=e.css,i=e.sourceMap,r=void 0===n.convertToAbsoluteUrls&&i;(n.convertToAbsoluteUrls||r)&&(o=x(o)),i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var h={},m=function(t){var n;return function(){return void 0===n&&(n=t.apply(this,arguments)),n}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){var n={};return function(e){return void 0===n[e]&&(n[e]=t.call(this,e)),n[e]}}(function(t){return document.querySelector(t)}),b=null,y=0,g=[],x=e(6);t.exports=function(t,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");n=n||{},n.attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||(n.singleton=m()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var e=i(t,n);return o(e,n),function(t){for(var r=[],a=0;a<e.length;a++){var s=e[a],f=h[s.id];f.refs--,r.push(f)}if(t){o(i(t,n),n)}for(var a=0;a<r.length;a++){var f=r[a];if(0===f.refs){for(var c=0;c<f.parts.length;c++)f.parts[c]();delete h[f.id]}}}};var w=function(){var t=[];return function(n,e){return t[n]=e,t.filter(Boolean).join("\n")}}()},function(t,n){t.exports=function(t){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var e=n.protocol+"//"+n.host,o=e+n.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,n){var i=n.trim().replace(/^"(.*)"$/,function(t,n){return n}).replace(/^'(.*)'$/,function(t,n){return n});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return t;var r;return r=0===i.indexOf("//")?i:0===i.indexOf("/")?e+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")"})}}]);
-//# sourceMappingURL=vanilla-yo-notification.js.map \ No newline at end of file
+!function(t){function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e(1);window.VYN=o.default},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(2);var o=function(){function t(t){this.defaultConfig={content:t.content?t.content:"",footer:t.footer?t.footer:"",timeout:t.timeout?t.timeout:3e3,title:t.title?t.title:"",type:t.type?t.type:"success",position:t.position&&2==t.position.length?t.position:["bottom","right"]},this.init()}return t.prototype.init=function(){this.buildContainers()},t.prototype.buildContainers=function(){this.container=document.createElement("div"),this.container.className="notif-mainContainer "+this.defaultConfig.position.join("-"),this.notifInner=document.createElement("div"),this.notifInner.className="notif-inner",this.container.appendChild(this.notifInner),document.body.appendChild(this.container)},t.prototype.show=function(t){var n=this,e=document.createElement("div");e.className="vanilla-yo-notification "+(t.type?t.type:this.defaultConfig.type),this.notificationTemplate='\n <div class="notification_container">\n <div class="notification_header">\n '+(t.title?t.title:this.defaultConfig.title)+'\n </div>\n <div class="notification_body">\n '+(t.content?t.content:this.defaultConfig.content)+'\n </div>\n <div class="notification_footer">\n '+(t.footer?t.footer:this.defaultConfig.footer)+"\n </div>\n </div>\n ",e.innerHTML=this.notificationTemplate,this.notifInner.appendChild(e),setTimeout(function(){e.className=e.className+" close",n.destroyNotification(e)},t.timeout?t.timeout:this.defaultConfig.timeout)},t.prototype.destroyNotification=function(t){var n=this;setTimeout(function(){n.notifInner.removeChild(t)},100)},t}();n.default=o},function(t,n,e){var o=e(3);"string"==typeof o&&(o=[[t.i,o,""]]);var i={};i.transform=void 0;e(5)(o,i);o.locals&&(t.exports=o.locals)},function(t,n,e){n=t.exports=e(4)(void 0),n.push([t.i,'\n\n.notif-mainContainer {\n z-index: 999;\n position: fixed;\n max-width: 98%;\n font-family: "Segoe UI","Tahoma","Calibri","Verdana",sans-serif;\n color: #999;\n box-sizing: border-box;\n}\n\n.notif-mainContainer.top-right{\n top: 8px;\n right: 8px;\n}\n\n.notif-mainContainer.bottom-right{\n bottom: 8px;\n right: 8px;\n}\n\n.notif-mainContainer.top-left{\n top: 8px;\n left: 8px;\n}\n.notif-mainContainer.bottom-left{\n bottom: 8px;\n left: 8px;\n}\n\n.notif-inner {\n display: flex;\n flex-direction: column;\n}\n\n.vanilla-yo-notification{\n width: 250px;\n color: white;\n position: relative;\n cursor: pointer;\n padding: 8px;\n margin-bottom: 12px;\n display: flex;\n border-radius: 10px;\n -webkit-animation-duration: 500ms;animation-duration: 500ms;\n}\n\n.vanilla-yo-notification.error {\n background: #e74c3c;\n}\n\n.vanilla-yo-notification.warning {\n background: #f39c12;\n}\n\n.vanilla-yo-notification.success {\n background: #2ecc71;\n}\n\n\n\n@-webkit-keyframes fadeOut {\n 0% {opacity: 1;}\n 100% {opacity: 0;}\n }\n \n @keyframes fadeOut {\n 0% {opacity: 1;}\n 100% {opacity: 0;}\n }\n\n.close {\n -webkit-animation-name: fadeOut;\n animation-name: fadeOut;\n}\n\n\n\n\n.notification_header{\n\tfont-size: 15px;\n font-weight: bold\n}',""])},function(t,n){function e(t,n){var e=t[1]||"",i=t[3];if(!i)return e;if(n&&"function"==typeof btoa){var r=o(i);return[e].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([r]).join("\n")}return[e].join("\n")}function o(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var n=[];return n.toString=function(){return this.map(function(n){var o=e(n,t);return n[2]?"@media "+n[2]+"{"+o+"}":o}).join("")},n.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&o[a[0]]||(e&&!a[2]?a[2]=e:e&&(a[2]="("+a[2]+") and ("+e+")"),n.push(a))}},n}},function(t,n,e){function o(t,n){for(var e=0;e<t.length;e++){var o=t[e],i=h[o.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](o.parts[r]);for(;r<o.parts.length;r++)i.parts.push(u(o.parts[r],n))}else{for(var a=[],r=0;r<o.parts.length;r++)a.push(u(o.parts[r],n));h[o.id]={id:o.id,refs:1,parts:a}}}}function i(t,n){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i],a=n.base?r[0]+n.base:r[0],s=r[1],f=r[2],c=r[3],u={css:s,media:f,sourceMap:c};o[a]?o[a].parts.push(u):e.push(o[a]={id:a,parts:[u]})}return e}function r(t,n){var e=v(t.insertInto);if(!e)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=g[g.length-1];if("top"===t.insertAt)o?o.nextSibling?e.insertBefore(n,o.nextSibling):e.appendChild(n):e.insertBefore(n,e.firstChild),g.push(n);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");e.appendChild(n)}}function a(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var n=g.indexOf(t);n>=0&&g.splice(n,1)}function s(t){var n=document.createElement("style");return t.attrs.type="text/css",c(n,t.attrs),r(t,n),n}function f(t){var n=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",c(n,t.attrs),r(t,n),n}function c(t,n){Object.keys(n).forEach(function(e){t.setAttribute(e,n[e])})}function u(t,n){var e,o,i,r;if(n.transform&&t.css){if(!(r=n.transform(t.css)))return function(){};t.css=r}if(n.singleton){var c=y++;e=b||(b=s(n)),o=l.bind(null,e,c,!1),i=l.bind(null,e,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=f(n),o=d.bind(null,e,n),i=function(){a(e),e.href&&URL.revokeObjectURL(e.href)}):(e=s(n),o=p.bind(null,e),i=function(){a(e)});return o(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;o(t=n)}else i()}}function l(t,n,e,o){var i=e?"":o.css;if(t.styleSheet)t.styleSheet.cssText=C(n,i);else{var r=document.createTextNode(i),a=t.childNodes;a[n]&&t.removeChild(a[n]),a.length?t.insertBefore(r,a[n]):t.appendChild(r)}}function p(t,n){var e=n.css,o=n.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}function d(t,n,e){var o=e.css,i=e.sourceMap,r=void 0===n.convertToAbsoluteUrls&&i;(n.convertToAbsoluteUrls||r)&&(o=x(o)),i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var h={},m=function(t){var n;return function(){return void 0===n&&(n=t.apply(this,arguments)),n}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){var n={};return function(e){return void 0===n[e]&&(n[e]=t.call(this,e)),n[e]}}(function(t){return document.querySelector(t)}),b=null,y=0,g=[],x=e(6);t.exports=function(t,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");n=n||{},n.attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||(n.singleton=m()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var e=i(t,n);return o(e,n),function(t){for(var r=[],a=0;a<e.length;a++){var s=e[a],f=h[s.id];f.refs--,r.push(f)}if(t){o(i(t,n),n)}for(var a=0;a<r.length;a++){var f=r[a];if(0===f.refs){for(var c=0;c<f.parts.length;c++)f.parts[c]();delete h[f.id]}}}};var C=function(){var t=[];return function(n,e){return t[n]=e,t.filter(Boolean).join("\n")}}()},function(t,n){t.exports=function(t){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var e=n.protocol+"//"+n.host,o=e+n.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,n){var i=n.trim().replace(/^"(.*)"$/,function(t,n){return n}).replace(/^'(.*)'$/,function(t,n){return n});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return t;var r;return r=0===i.indexOf("//")?i:0===i.indexOf("/")?e+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")"})}}]); \ No newline at end of file