@3yourmind/vue-yodify
Advanced tools
Comparing version 0.0.1-beta to 0.0.1
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports["vue-notification"]=t(require("vue")):e["vue-notification"]=t(e.vue)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=4)}([function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<t.length;r++){var a=t[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){function o(e){for(var t=0;t<e.length;t++){var n=e[t],o=c[n.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](n.parts[r]);for(;r<n.parts.length;r++)o.parts.push(i(n.parts[r]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{for(var a=[],r=0;r<n.parts.length;r++)a.push(i(n.parts[r]));c[n.id]={id:n.id,refs:1,parts:a}}}}function r(){var e=document.createElement("style");return e.type="text/css",f.appendChild(e),e}function i(e){var t,n,o=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(o){if(v)return h;o.parentNode.removeChild(o)}if(b){var i=p++;o=l||(l=r()),t=a.bind(null,o,i,!1),n=a.bind(null,o,i,!0)}else o=r(),t=s.bind(null,o),n=function(){o.parentNode.removeChild(o)};return t(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;t(e=o)}else n()}}function a(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=g(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function s(e,t){var n=t.css,o=t.media,r=t.sourceMap;if(o&&e.setAttribute("media",o),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var d=n(8),c={},f=u&&(document.head||document.getElementsByTagName("head")[0]),l=null,p=0,v=!1,h=function(){},b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n){v=n;var r=d(e,t);return o(r),function(t){for(var n=[],i=0;i<r.length;i++){var a=r[i],s=c[a.id];s.refs--,n.push(s)}t?(r=d(e,t),o(r)):r=[];for(var i=0;i<n.length;i++){var s=n[i];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete c[s.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t,n,o,r){var i,a=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(i=e,a=e.default);var u="function"==typeof a?a.options:a;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),o&&(u._scopeId=o);var d;if(r?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},u._ssrRegister=d):n&&(d=n),d){var c=u.functional,f=c?u.render:u.beforeCreate;c?u.render=function(e,t){return d.call(t),f(e,t)}:u.beforeCreate=f?[].concat(f,d):[d]}return{esModule:i,exports:a,options:u}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default={events:new r.default}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=o(r),a=n(3),s=o(a),u={};u.install=function(e){this.installed||(this.installed=!0,e.component("vue-yodify",i.default),e.prototype.$yodify=function(e){s.default.events.$emit("vue-yodify",e)})},t.default=u},function(e,t,n){"use strict";function o(e){n(6)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n.n(r),a=n(17),s=n(2),u=o,d=s(i.a,a.a,u,"data-v-3115e3b8",null);t.default=d.exports},function(e,t,n){var o=n(7);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(1)("fe159156",o,!0)},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".notification__container[data-v-3115e3b8]{z-index:9999;top:0;right:0;position:fixed;transform:translate(-10px)}.notification[data-v-3115e3b8]{margin-top:10px;margin-bottom:10px}.yoda-close[data-v-3115e3b8]{right:1em;top:50%;margin-top:-12px;position:absolute;width:24px;text-align:center;vertical-align:middle;height:24px;display:inline-block;cursor:pointer}.yoda-close[data-v-3115e3b8]:hover{border-radius:10px;background-color:rgba(0,0,0,.1)}.notification[data-v-3115e3b8]{width:400px;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,.2);display:table;position:relative}.icon[data-v-3115e3b8]{width:55px;border-top-left-radius:5px;border-bottom-left-radius:5px;display:table-cell;padding-top:30px;padding-bottom:30px}.icon--success[data-v-3115e3b8]{background-color:#65a200}.icon--error[data-v-3115e3b8]{background-color:#ff3535}.icon--info[data-v-3115e3b8]{background-color:#23509a}.icon--warn[data-v-3115e3b8]{background-color:#ff0}.icon svg[data-v-3115e3b8]{position:absolute;top:50%;bottom:50%;left:4%;transform:translateY(-50%);height:24px;width:24px}.content[data-v-3115e3b8]{padding:.93em 3em .93em 1.5em;border-top-right-radius:5px;border-bottom-right-radius:5px;display:table-cell;background-color:#fff;vertical-align:middle}",""])},function(e,t){e.exports=function(e,t){for(var n=[],o={},r=0;r<t.length;r++){var i=t[r],a=i[0],s=i[1],u=i[2],d=i[3],c={id:e+":"+r,css:s,media:u,sourceMap:d};o[a]?o[a].parts.push(c):n.push(o[a]={id:a,parts:[c]})}return n}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=o(r),a=n(11),s=o(a),u=n(16),d=o(u);t.default={name:"VueYodify",components:{BellIcon:s.default},data:function(){return{queue:[]}},methods:{addNotification:function(e){var t=this,n=d.default.guid(),o={id:n,message:e.text,type:e.type};this.queue.push(o),setTimeout(function(){t.deleteNotification(n)},3e3)},deleteNotification:function(e){this.queue=this.queue.filter(function(t){return t.id!==e})},iconClass:function(e){return"icon icon--"+e}},mounted:function(){i.default.events.$on("vue-yodify",this.addNotification)}}},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e){n(12)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n.n(r),a=n(15),s=n(2),u=o,d=s(i.a,a.a,u,"data-v-33f24508",null);t.default=d.exports},function(e,t,n){var o=n(13);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(1)("2d732bd2",o,!0)},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,"svg[data-v-33f24508]{width:1.6em;height:1.6em;transform:translate(.5em,.1em)}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BellIcon"}},function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{attrs:{width:"24px",height:"24px",viewBox:"0 0 24 24"}},[n("g",{attrs:{fill:"#FFFFFF"}},[n("path",{attrs:{d:"M18,15.1626667 L20,17.04 L20,18 L4,18 L4,17.04 L6,15.1599998 L5.87733333,\n 11 C5.87733333,10.0613286 6.07999797,9.17244864 6.48533333,8.33333333 C6.89066869,\n 7.49421803 7.45244085,6.78666955 8.17066667,6.21066667 C8.88889248,5.63466379 9.69599552,\n 5.24711211 10.592,5.048 L10.592,4.408 C10.592,4.00977579 10.7271098,3.67555691 10.9973333,\n 3.40533333 C11.2675569,3.13510976 11.6017758,3 12,3 C12.3982242,3 12.7324431,\n 3.13510976 13.0026667,3.40533333 C13.2728902,3.67555691 13.408,4.00977579 13.408,\n 4.408 L13.408,5.048 C14.3040045,5.24711211 15.1111075,5.63466379 15.8293333,\n 6.21066667 C16.5475591,6.78666955 17.1093313,7.49421803 17.5146667,\n 8.33333333 C17.920002,9.17244864 18.1226667,10.0613286 18.1226667,\n 11 L18,15.1626667 Z M10,19 L14,19 C14,19.5396852 13.80488,\n 20.0079345 13.4146341,20.4047619 C13.0243883,20.8015893 12.5528483,21 12,\n 21 C11.4471517,21 10.9756117,20.8015893 10.5853659,20.4047619 C10.19512,20.0079345 10,19.5396852 10,19 Z"}})])])},r=[],i={render:o,staticRenderFns:r};t.a=i},function(e,t,n){"use strict";function o(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return""+e()+e()}Object.defineProperty(t,"__esModule",{value:!0}),t.default={guid:o}},function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"notification__container"},e._l(e.queue,function(t){return n("div",{key:t.id,staticClass:"notification"},[n("div",{class:e.iconClass(t.type)},[n("bell-icon")],1),e._v(" "),n("div",{staticClass:"content",domProps:{textContent:e._s(t.message)}}),e._v(" "),n("div",{staticClass:"yoda-close",on:{click:function(n){e.deleteNotification(t.id)}}},[e._v("\n ✕\n ")])])}))},r=[],i={render:o,staticRenderFns:r};t.a=i}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports["vue-notification"]=t(require("vue")):e["vue-notification"]=t(e.vue)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=4)}([function(e,t){function n(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=n(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var a=e[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){function o(e){for(var t=0;t<e.length;t++){var n=e[t],o=c[n.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](n.parts[r]);for(;r<n.parts.length;r++)o.parts.push(i(n.parts[r]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{for(var a=[],r=0;r<n.parts.length;r++)a.push(i(n.parts[r]));c[n.id]={id:n.id,refs:1,parts:a}}}}function r(){var e=document.createElement("style");return e.type="text/css",f.appendChild(e),e}function i(e){var t,n,o=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(o){if(v)return b;o.parentNode.removeChild(o)}if(h){var i=p++;o=l||(l=r()),t=a.bind(null,o,i,!1),n=a.bind(null,o,i,!0)}else o=r(),t=s.bind(null,o),n=function(){o.parentNode.removeChild(o)};return t(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;t(e=o)}else n()}}function a(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=m(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function s(e,t){var n=t.css,o=t.media,r=t.sourceMap;if(o&&e.setAttribute("media",o),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var d=n(8),c={},f=u&&(document.head||document.getElementsByTagName("head")[0]),l=null,p=0,v=!1,b=function(){},h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n){v=n;var r=d(e,t);return o(r),function(t){for(var n=[],i=0;i<r.length;i++){var a=r[i],s=c[a.id];s.refs--,n.push(s)}t?(r=d(e,t),o(r)):r=[];for(var i=0;i<n.length;i++){var s=n[i];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete c[s.id]}}}};var m=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t,n,o,r,i){var a,s=e=e||{},u=typeof e.default;"object"!==u&&"function"!==u||(a=e,s=e.default);var d="function"==typeof s?s.options:s;t&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0),n&&(d.functional=!0),r&&(d._scopeId=r);var c;if(i?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=c):o&&(c=o),c){var f=d.functional,l=f?d.render:d.beforeCreate;f?(d._injectStyles=c,d.render=function(e,t){return c.call(t),l(e,t)}):d.beforeCreate=l?[].concat(l,c):[c]}return{esModule:a,exports:s,options:d}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default={events:new r.default}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=o(r),a=n(3),s=o(a),u={};u.install=function(e){this.installed||(this.installed=!0,e.component("vue-yodify",i.default),e.prototype.$yodify=function(e){s.default.events.$emit("vue-yodify",e)})},t.default=u},function(e,t,n){"use strict";function o(e){n(6)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n.n(r),a=n(17),s=n(2),u=o,d=s(i.a,a.a,!1,u,"data-v-5b39b589",null);t.default=d.exports},function(e,t,n){var o=n(7);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(1)("aeea4b18",o,!0)},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,".vue-yodify[data-v-5b39b589]{z-index:9999;top:0;right:0;position:fixed;transform:translate(-10px)}.notification[data-v-5b39b589]{margin-top:10px;margin-bottom:10px}.close[data-v-5b39b589]{right:1em;top:50%;margin-top:-.8em;line-height:1.6em;position:absolute;width:1.6em;text-align:center;vertical-align:middle;display:inline-block;cursor:pointer}.close[data-v-5b39b589]:hover{border-radius:100%;background-color:rgba(0,0,0,.1)}.notification[data-v-5b39b589]{width:448px;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,.2);display:table;position:relative}.icon[data-v-5b39b589]{width:48px;border-top-left-radius:5px;border-bottom-left-radius:5px;display:table-cell;padding-top:30px;box-sizing:border-box;padding-bottom:30px}.icon--success[data-v-5b39b589]{background-color:#65a200}.icon--error[data-v-5b39b589]{background-color:#ff3535}.icon--info[data-v-5b39b589]{background-color:#23509a}.icon--warn[data-v-5b39b589]{background-color:#ff0}.icon svg[data-v-5b39b589]{position:absolute;top:50%;left:12px;transform:translateY(-50%);height:24px;width:24px}.content[data-v-5b39b589]{width:400px;padding:0 3em 0 1em;border-top-right-radius:5px;border-bottom-right-radius:5px;display:table-cell;box-sizing:border-box;background-color:#fff;vertical-align:middle;padding-top:.93em;padding-bottom:.93em}",""])},function(e,t){e.exports=function(e,t){for(var n=[],o={},r=0;r<t.length;r++){var i=t[r],a=i[0],s=i[1],u=i[2],d=i[3],c={id:e+":"+r,css:s,media:u,sourceMap:d};o[a]?o[a].parts.push(c):n.push(o[a]={id:a,parts:[c]})}return n}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=o(r),a=n(11),s=o(a),u=n(16),d=o(u);t.default={name:"VueYodify",components:{BellIcon:s.default},data:function(){return{queue:[]}},methods:{addNotification:function(e){var t=this,n=d.default.guid(),o={id:n,message:e.text,type:e.type};this.queue.push(o),setTimeout(function(){t.deleteNotification(n)},3e3)},deleteNotification:function(e){this.queue=this.queue.filter(function(t){return t.id!==e})},iconClass:function(e){return"icon icon--"+e}},mounted:function(){i.default.events.$on("vue-yodify",this.addNotification)}}},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e){n(12)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n.n(r),a=n(15),s=n(2),u=o,d=s(i.a,a.a,!1,u,"data-v-160fbcd6",null);t.default=d.exports},function(e,t,n){var o=n(13);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(1)("72fbb160",o,!0)},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,"svg[data-v-160fbcd6]{width:1.6em;height:1.6em;transform:translate(.5em,.1em)}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"BellIcon"}},function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"#ffffff"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10.0270123,4.32949237 L10.0270123,4.32949237 C10.009244,4.22230056 10,4.11222981 10,4 C10,2.8954305 10.8954305,2 12,2 C13.1045695,2 14,2.8954305 14,4 C14,4.11222981 13.990756,4.22230056 13.9729877,4.32949237 C16.8783478,5.32517945 19,8.46389844 19,12.1818182 L19,18 C19,18.5522847 18.5522847,19 18,19 L6,19 C5.44771525,19 5,18.5522847 5,18 L5,12.1818182 C5,8.46389844 7.12165223,5.32517945 10.0270123,4.32949237 Z M17,17 L17,12 C17,8.6862915 14.7614237,6 12,6 C9.23857625,6 7,8.6862915 7,12 L7,17 L17,17 Z M10,20 L14,20 C14,21.1045695 13.1045695,22 12,22 C10.8954305,22 10,21.1045695 10,20 Z"}})])},r=[],i={render:o,staticRenderFns:r};t.a=i},function(e,t,n){"use strict";function o(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return""+e()+e()}Object.defineProperty(t,"__esModule",{value:!0}),t.default={guid:o}},function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vue-yodify"},e._l(e.queue,function(t){return n("div",{key:t.id,staticClass:"notification"},[n("div",{class:e.iconClass(t.type)},[n("BellIcon")],1),e._v(" "),n("div",{staticClass:"content",domProps:{textContent:e._s(t.message)}}),e._v(" "),n("div",{staticClass:"close",on:{click:function(n){e.deleteNotification(t.id)}}},[e._v("\n ✕\n ")])])}))},r=[],i={render:o,staticRenderFns:r};t.a=i}])}); |
{ | ||
"name": "@3yourmind/vue-yodify", | ||
"version": "0.0.1-beta", | ||
"version": "0.0.1", | ||
"description": "A Vue.js component module", | ||
@@ -10,3 +10,3 @@ "author": "Kevin Peters <kpe@3yourmind.com>", | ||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --optimize-minimize", | ||
"test": "node node_modules/.bin/jest" | ||
"test": "jest" | ||
}, | ||
@@ -23,22 +23,26 @@ "keywords": [ | ||
"dependencies": { | ||
"vue": "^2.4.4" | ||
"vue": "^2.5.9" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-jest": "^21.2.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-module-resolver": "^2.7.1", | ||
"babel-preset-env": "^1.6.0", | ||
"cross-env": "^5.0.5", | ||
"babel-preset-env": "^1.6.1", | ||
"cross-env": "^5.1.1", | ||
"css-loader": "^0.28.7", | ||
"eslint": "^3.19.0", | ||
"eslint-plugin-vue": "beta", | ||
"file-loader": "^0.11.2", | ||
"file-loader": "^1.1.5", | ||
"jest": "^21.2.1", | ||
"jest-vue-preprocessor": "^1.2.0", | ||
"node-sass": "^4.5.3", | ||
"node-sass": "^4.7.2", | ||
"sass-loader": "^6.0.6", | ||
"vue-cli": "^2.8.2", | ||
"vue-loader": "^13.0.5", | ||
"vue-test-utils": "1.0.0-beta", | ||
"vue-cli": "^2.9.1", | ||
"vue-jest": "^1.2.0", | ||
"vue-loader": "^13.5.0", | ||
"vue-template-compiler": "^2.5.9", | ||
"vue-template-es2015-compiler": "^1.6.0", | ||
"vue-test-utils": "1.0.0-beta.6", | ||
"vue-webpack-loaders": "^1.0.6", | ||
"webpack": "^3.6.0" | ||
"webpack": "^3.8.1" | ||
}, | ||
@@ -53,5 +57,6 @@ "jest": { | ||
"^.+\\.js$": "<rootDir>/node_modules/babel-jest", | ||
".*\\.(vue)$": "<rootDir>/node_modules/jest-vue-preprocessor" | ||
} | ||
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest" | ||
}, | ||
"mapCoverage": true | ||
} | ||
} |
@@ -1,9 +0,13 @@ | ||
# vue-yodify | ||
# vue-yodify by <a href="https://www.3yourmind.com/">3YOURMIND</a> | ||
> A Vue.js component module | ||
## Description | ||
# Usage | ||
> A simple Vue.js plugin to enable notifications with ease. | ||
<vue-yodify text="Hello World!"></vue-yodify> | ||
## Dependencies | ||
| Name | Version | Information | | ||
| ---- | ------- | -------------------------------------------------------------------------------------------------- | | ||
| vue | ^2.5.8 | ![](https://img.shields.io/npm/v/vue.svg) ![](https://img.shields.io/github/license/vuejs/vue.svg) | | ||
## Installation | ||
@@ -13,14 +17,63 @@ | ||
`yarn add vue-yodify` | ||
```shell | ||
yarn add @3yourmind/vue-yodify | ||
``` | ||
### Using npm | ||
`npm i --save vue-yodify` | ||
```shell | ||
npm install @3yourmind/vue-yodify | ||
``` | ||
## Demo and Docs | ||
## How to use | ||
`npm run serve` | ||
You need to register this library as a plugin. So you need to find the file where you are registering Vue.js. In the most common case this will be the file `src/main.js`. Inside this file you need to import this library and bind it to Vue.js. | ||
```javascript | ||
import Vue from 'vue'; | ||
import VueYodify from '@3yourmind/vue-yodify'; | ||
Vue.use(VueYodify); | ||
``` | ||
Then you need to register a global component in your app so the library can find the component somehow. To do this go to your root component and extend it by using the component once. | ||
```html | ||
<template> | ||
<div id="app"> | ||
<VueYodify /> | ||
<router-view /> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'app', | ||
}; | ||
</script> | ||
``` | ||
After registering the component you can call it globally by using the Vue instance in the script part of a component. | ||
```js | ||
this.$yodify({ | ||
text: 'This was successful :)', | ||
type: 'success' | ||
}); | ||
``` | ||
## Architecture | ||
Before getting into architecture, you should make sure to understand the Vue.js plugin system which is documented [here](https://vuejs.org/v2/guide/plugins.html). | ||
<span> | ||
<img style="max-width: 400px;" src="./docs/architecture.png" alt="architecture of vue-yodify"/> | ||
</span> | ||
## Contributors | ||
<table><thead><tr><th align="center"><a href="https://github.com/igeligel"><img src="https://avatars1.githubusercontent.com/u/12736734?v=4" width="100px;" style="max-width:100%;"><br><sub>igeligel</sub></a><br><p>Contributions: 11</p></th><th align="center"><a href="https://github.com/ostoc"><img src="https://avatars3.githubusercontent.com/u/3025708?v=4" width="100px;" style="max-width:100%;"><br><sub>ostoc</sub></a><br><p>Contributions: 4</p></th></tbody></table> | ||
## License | ||
This project is licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License) | ||
*vue-yodify* is realeased under the [MIT License](./LICENSE.md). |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
14855
4
79
21
0
Updatedvue@^2.5.9