@3yourmind/vue-yodify
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -69,17 +69,2 @@ module.exports = | ||
/***/ "/tOC": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
// load the styles | ||
var content = __webpack_require__("1sSP"); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
if(content.locals) module.exports = content.locals; | ||
// add the styles to the DOM | ||
var add = __webpack_require__("rjj0").default | ||
var update = add("a3d8b144", content, true, {"shadowMode":false,"sourceMap":false}); | ||
/***/ }), | ||
/***/ 0: | ||
@@ -93,17 +78,2 @@ /***/ (function(module, exports, __webpack_require__) { | ||
/***/ "1sSP": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
// module | ||
exports.push([module.i, ".vue-yodify[data-v-91dae696]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-91dae696]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px}.vue-yodify__close>svg[data-v-91dae696]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%}@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){.vue-yodify__close>svg[data-v-91dae696]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-91dae696]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-91dae696]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-91dae696]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-91dae696]{background-color:#fff;overflow:hidden;margin:8px 0;width:448px;border-radius:4px;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vue-yodify[data-v-91dae696],.vue-yodify [data-v-91dae696]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "97+o": | ||
@@ -142,3 +112,3 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-3ac2c12c","hasScoped":true,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/BellIcon.vue | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-3ac2c12c","hasScoped":true,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/BellIcon.vue | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vue-yodify__icon",class:("vue-yodify__icon--" + _vm.type)},[_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","fill":"#ffffff"}},[_c('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"}})])])} | ||
@@ -252,3 +222,3 @@ var staticRenderFns = [] | ||
function injectStyle (context) { | ||
__webpack_require__("acgk") | ||
__webpack_require__("LBVm") | ||
} | ||
@@ -288,2 +258,10 @@ /* script */ | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var CloseIcon = ({ | ||
@@ -297,4 +275,4 @@ name: 'CloseIcon', | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-dea79338","hasScoped":false,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/CloseIcon.vue | ||
var CloseIcon_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24"},on:{"click":_vm.click}},[_c('path',{attrs:{"fill-rule":"evenodd","d":"M12 10.5857864L8.1109127 6.69669914c-.19526214-.19526214-.51184463-.19526214-.70710678 0l-.70710678.70710678c-.19526214.19526215-.19526214.51184464 0 .70710678L10.5857864 12l-3.88908726 3.8890873c-.19526214.1952621-.19526214.5118446 0 .7071068l.70710678.7071068c.19526215.1952621.51184464.1952621.70710678 0L12 13.4142136l3.8890873 3.8890873c.1952621.1952621.5118446.1952621.7071068 0l.7071068-.7071068c.1952621-.1952622.1952621-.5118447 0-.7071068L13.4142136 12l3.8890873-3.8890873c.1952621-.19526214.1952621-.51184463 0-.70710678l-.7071068-.70710678c-.1952622-.19526214-.5118447-.19526214-.7071068 0L12 10.5857864z"}})])} | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-653d2791","hasScoped":false,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/CloseIcon.vue | ||
var CloseIcon_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{attrs:{"height":"24","width":"24","xmlns":"http://www.w3.org/2000/svg"},on:{"click":_vm.click}},[_c('path',{attrs:{"fill-rule":"evenodd","d":"M12 10.5857864L8.1109127 6.69669914c-.19526214-.19526214-.51184463-.19526214-.70710678 0l-.70710678.70710678c-.19526214.19526215-.19526214.51184464 0 .70710678L10.5857864 12l-3.88908726 3.8890873c-.19526214.1952621-.19526214.5118446 0 .7071068l.70710678.7071068c.19526215.1952621.51184464.1952621.70710678 0L12 13.4142136l3.8890873 3.8890873c.1952621.1952621.5118446.1952621.7071068 0l.7071068-.7071068c.1952621-.1952622.1952621-.5118447 0-.7071068L13.4142136 12l3.8890873-3.8890873c.1952621-.19526214.1952621-.51184463 0-.70710678l-.7071068-.70710678c-.1952622-.19526214-.5118447-.19526214-.7071068 0L12 10.5857864z"}})])} | ||
var CloseIcon_staticRenderFns = [] | ||
@@ -331,11 +309,2 @@ | ||
/** | ||
* @description Creates the event bridge used for forwarding messages to VueYodify | ||
* @param {Vue} Vue Vue Instance | ||
* @returns {VueInstance} event bridge | ||
*/ | ||
const createEventBridge = Vue => ({ | ||
events: new Vue(), | ||
}); | ||
/** | ||
* @description generates a random id | ||
@@ -426,7 +395,16 @@ * @param {Number} ID_BITS id entropy in bits, defaults to 64 (4 words) | ||
}, | ||
mounted: function mounted() { | ||
this.registerEventBridge(); | ||
created: function created() { | ||
var notification; | ||
while (notification = this.$yodifyBuffer.pop()) { | ||
this.addNotification(notification); | ||
} | ||
this.$root.$on('vue-yodify', this.addNotification); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.$root.$off('vue-yodify', this.addNotification); | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-91dae696","hasScoped":true,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/VueYodify.vue | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-6c81443d","hasScoped":true,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/VueYodify.vue | ||
var VueYodify_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vue-yodify"},_vm._l((_vm.queue),function(notification){return _c('div',{key:notification.id,staticClass:"vue-yodify__notification"},[_c('BellIcon',{attrs:{"type":notification.type}}),_c('div',{staticClass:"vue-yodify__content"},[_c('div',{domProps:{"textContent":_vm._s(notification.text)}})]),_c('div',{staticClass:"vue-yodify__close"},[_c('CloseIcon',{on:{"click":function($event){_vm.deleteNotification(notification.id)}}})],1)],1)}))} | ||
@@ -437,3 +415,3 @@ var VueYodify_staticRenderFns = [] | ||
function VueYodify_injectStyle (context) { | ||
__webpack_require__("/tOC") | ||
__webpack_require__("GT/x") | ||
} | ||
@@ -450,3 +428,3 @@ /* script */ | ||
/* scopeId */ | ||
var VueYodify___vue_scopeId__ = "data-v-91dae696" | ||
var VueYodify___vue_scopeId__ = "data-v-6c81443d" | ||
/* moduleIdentifier (server only) */ | ||
@@ -470,3 +448,2 @@ var VueYodify___vue_module_identifier__ = null | ||
/* harmony default export */ var source = __webpack_exports__["default"] = ({ | ||
@@ -477,11 +454,8 @@ install(Vue) { | ||
const eventBridge = createEventBridge(Vue); | ||
Vue.component('vue-yodify', components_VueYodify); | ||
// inject registerEventBridge method into component | ||
components_VueYodify.methods.registerEventBridge = function() { | ||
eventBridge.events.$on('vue-yodify', this.addNotification); | ||
}; | ||
// prevent race condition when emitting | ||
// notifications before vue is ready | ||
Vue.prototype.$yodifyBuffer = []; | ||
Vue.component('vue-yodify', components_VueYodify); | ||
/** | ||
@@ -498,4 +472,12 @@ * @description Function to add payload to queue. | ||
*/ | ||
Vue.prototype.$yodify = ({ duration = 3000, text, type = 'success' }) => { | ||
eventBridge.events.$emit('vue-yodify', { text, type, duration }); | ||
Vue.prototype.$yodify = function({ | ||
duration = 3000, | ||
text, | ||
type = 'success', | ||
}) { | ||
const notification = { duration, text, type }; | ||
// buffer notifications if vue isn't ready | ||
if (!this.$root) Vue.prototype.$yodifyBuffer.push(notification); | ||
else this.$root.$emit('vue-yodify', notification); | ||
}; | ||
@@ -508,2 +490,32 @@ }, | ||
/***/ "B7gJ": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
// module | ||
exports.push([module.i, ".vue-yodify[data-v-6c81443d]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-6c81443d]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px}.vue-yodify__close>svg[data-v-6c81443d]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%}@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){.vue-yodify__close>svg[data-v-6c81443d]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-6c81443d]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-6c81443d]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-6c81443d]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-6c81443d]{background-color:#fff;overflow:hidden;margin:8px 0;width:448px;border-radius:4px;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vue-yodify[data-v-6c81443d],.vue-yodify [data-v-6c81443d]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "BPeW": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
// module | ||
exports.push([module.i, ".vue-yodify__icon[data-v-3ac2c12c]{width:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px}.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919}.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4}.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13}.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "FZ+f": | ||
@@ -592,18 +604,18 @@ /***/ (function(module, exports) { | ||
/***/ "IU13": | ||
/***/ "GT/x": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
// load the styles | ||
var content = __webpack_require__("B7gJ"); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
if(content.locals) module.exports = content.locals; | ||
// add the styles to the DOM | ||
var add = __webpack_require__("rjj0").default | ||
var update = add("60c5b1a0", content, true, {"shadowMode":false,"sourceMap":false}); | ||
// module | ||
exports.push([module.i, ".vue-yodify__icon[data-v-3ac2c12c]{width:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px}.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919}.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4}.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13}.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "acgk": | ||
/***/ "LBVm": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -614,3 +626,3 @@ | ||
// load the styles | ||
var content = __webpack_require__("IU13"); | ||
var content = __webpack_require__("BPeW"); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
@@ -620,3 +632,3 @@ if(content.locals) module.exports = content.locals; | ||
var add = __webpack_require__("rjj0").default | ||
var update = add("8cc4e926", content, true, {"shadowMode":false,"sourceMap":false}); | ||
var update = add("d04e252a", content, true, {"shadowMode":false,"sourceMap":false}); | ||
@@ -623,0 +635,0 @@ /***/ }), |
@@ -119,3 +119,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-3ac2c12c","hasScoped":true,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/BellIcon.vue | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-3ac2c12c","hasScoped":true,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/BellIcon.vue | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vue-yodify__icon",class:("vue-yodify__icon--" + _vm.type)},[_c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","fill":"#ffffff"}},[_c('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"}})])])} | ||
@@ -229,3 +229,3 @@ var staticRenderFns = [] | ||
function injectStyle (context) { | ||
__webpack_require__("LBVm") | ||
__webpack_require__("acgk") | ||
} | ||
@@ -265,2 +265,10 @@ /* script */ | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var CloseIcon = ({ | ||
@@ -274,4 +282,4 @@ name: 'CloseIcon', | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-dea79338","hasScoped":false,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/CloseIcon.vue | ||
var CloseIcon_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24"},on:{"click":_vm.click}},[_c('path',{attrs:{"fill-rule":"evenodd","d":"M12 10.5857864L8.1109127 6.69669914c-.19526214-.19526214-.51184463-.19526214-.70710678 0l-.70710678.70710678c-.19526214.19526215-.19526214.51184464 0 .70710678L10.5857864 12l-3.88908726 3.8890873c-.19526214.1952621-.19526214.5118446 0 .7071068l.70710678.7071068c.19526215.1952621.51184464.1952621.70710678 0L12 13.4142136l3.8890873 3.8890873c.1952621.1952621.5118446.1952621.7071068 0l.7071068-.7071068c.1952621-.1952622.1952621-.5118447 0-.7071068L13.4142136 12l3.8890873-3.8890873c.1952621-.19526214.1952621-.51184463 0-.70710678l-.7071068-.70710678c-.1952622-.19526214-.5118447-.19526214-.7071068 0L12 10.5857864z"}})])} | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-653d2791","hasScoped":false,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/CloseIcon.vue | ||
var CloseIcon_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{attrs:{"height":"24","width":"24","xmlns":"http://www.w3.org/2000/svg"},on:{"click":_vm.click}},[_c('path',{attrs:{"fill-rule":"evenodd","d":"M12 10.5857864L8.1109127 6.69669914c-.19526214-.19526214-.51184463-.19526214-.70710678 0l-.70710678.70710678c-.19526214.19526215-.19526214.51184464 0 .70710678L10.5857864 12l-3.88908726 3.8890873c-.19526214.1952621-.19526214.5118446 0 .7071068l.70710678.7071068c.19526215.1952621.51184464.1952621.70710678 0L12 13.4142136l3.8890873 3.8890873c.1952621.1952621.5118446.1952621.7071068 0l.7071068-.7071068c.1952621-.1952622.1952621-.5118447 0-.7071068L13.4142136 12l3.8890873-3.8890873c.1952621-.19526214.1952621-.51184463 0-.70710678l-.7071068-.70710678c-.1952622-.19526214-.5118447-.19526214-.7071068 0L12 10.5857864z"}})])} | ||
var CloseIcon_staticRenderFns = [] | ||
@@ -308,11 +316,2 @@ | ||
/** | ||
* @description Creates the event bridge used for forwarding messages to VueYodify | ||
* @param {Vue} Vue Vue Instance | ||
* @returns {VueInstance} event bridge | ||
*/ | ||
const createEventBridge = Vue => ({ | ||
events: new Vue(), | ||
}); | ||
/** | ||
* @description generates a random id | ||
@@ -403,7 +402,16 @@ * @param {Number} ID_BITS id entropy in bits, defaults to 64 (4 words) | ||
}, | ||
mounted: function mounted() { | ||
this.registerEventBridge(); | ||
created: function created() { | ||
var notification; | ||
while (notification = this.$yodifyBuffer.pop()) { | ||
this.addNotification(notification); | ||
} | ||
this.$root.$on('vue-yodify', this.addNotification); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.$root.$off('vue-yodify', this.addNotification); | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-91dae696","hasScoped":true,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/VueYodify.vue | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-6c81443d","hasScoped":true,"optionsId":"2","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./source/components/VueYodify.vue | ||
var VueYodify_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vue-yodify"},_vm._l((_vm.queue),function(notification){return _c('div',{key:notification.id,staticClass:"vue-yodify__notification"},[_c('BellIcon',{attrs:{"type":notification.type}}),_c('div',{staticClass:"vue-yodify__content"},[_c('div',{domProps:{"textContent":_vm._s(notification.text)}})]),_c('div',{staticClass:"vue-yodify__close"},[_c('CloseIcon',{on:{"click":function($event){_vm.deleteNotification(notification.id)}}})],1)],1)}))} | ||
@@ -414,3 +422,3 @@ var VueYodify_staticRenderFns = [] | ||
function VueYodify_injectStyle (context) { | ||
__webpack_require__("fZA0") | ||
__webpack_require__("ILmo") | ||
} | ||
@@ -427,3 +435,3 @@ /* script */ | ||
/* scopeId */ | ||
var VueYodify___vue_scopeId__ = "data-v-91dae696" | ||
var VueYodify___vue_scopeId__ = "data-v-6c81443d" | ||
/* moduleIdentifier (server only) */ | ||
@@ -447,3 +455,2 @@ var VueYodify___vue_module_identifier__ = null | ||
/* harmony default export */ var source = __webpack_exports__["default"] = ({ | ||
@@ -454,11 +461,8 @@ install(Vue) { | ||
const eventBridge = createEventBridge(Vue); | ||
Vue.component('vue-yodify', components_VueYodify); | ||
// inject registerEventBridge method into component | ||
components_VueYodify.methods.registerEventBridge = function() { | ||
eventBridge.events.$on('vue-yodify', this.addNotification); | ||
}; | ||
// prevent race condition when emitting | ||
// notifications before vue is ready | ||
Vue.prototype.$yodifyBuffer = []; | ||
Vue.component('vue-yodify', components_VueYodify); | ||
/** | ||
@@ -475,4 +479,12 @@ * @description Function to add payload to queue. | ||
*/ | ||
Vue.prototype.$yodify = ({ duration = 3000, text, type = 'success' }) => { | ||
eventBridge.events.$emit('vue-yodify', { text, type, duration }); | ||
Vue.prototype.$yodify = function({ | ||
duration = 3000, | ||
text, | ||
type = 'success', | ||
}) { | ||
const notification = { duration, text, type }; | ||
// buffer notifications if vue isn't ready | ||
if (!this.$root) Vue.prototype.$yodifyBuffer.push(notification); | ||
else this.$root.$emit('vue-yodify', notification); | ||
}; | ||
@@ -485,17 +497,2 @@ }, | ||
/***/ "BPeW": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
// module | ||
exports.push([module.i, ".vue-yodify__icon[data-v-3ac2c12c]{width:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px}.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919}.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4}.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13}.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "FZ+f": | ||
@@ -584,3 +581,3 @@ /***/ (function(module, exports) { | ||
/***/ "LBVm": | ||
/***/ "ILmo": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -591,3 +588,3 @@ | ||
// load the styles | ||
var content = __webpack_require__("BPeW"); | ||
var content = __webpack_require__("RLOF"); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
@@ -597,22 +594,22 @@ if(content.locals) module.exports = content.locals; | ||
var add = __webpack_require__("rjj0").default | ||
var update = add("d04e252a", content, true, {"shadowMode":false,"sourceMap":false}); | ||
var update = add("da9b669c", content, true, {"shadowMode":false,"sourceMap":false}); | ||
/***/ }), | ||
/***/ "fZA0": | ||
/***/ "IU13": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
// load the styles | ||
var content = __webpack_require__("pIaN"); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
if(content.locals) module.exports = content.locals; | ||
// add the styles to the DOM | ||
var add = __webpack_require__("rjj0").default | ||
var update = add("2a02fc48", content, true, {"shadowMode":false,"sourceMap":false}); | ||
// module | ||
exports.push([module.i, ".vue-yodify__icon[data-v-3ac2c12c]{width:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px}.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919}.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4}.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13}.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "pIaN": | ||
/***/ "RLOF": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -625,3 +622,3 @@ | ||
// module | ||
exports.push([module.i, ".vue-yodify[data-v-91dae696]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-91dae696]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px}.vue-yodify__close>svg[data-v-91dae696]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%}@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){.vue-yodify__close>svg[data-v-91dae696]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-91dae696]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-91dae696]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-91dae696]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-91dae696]{background-color:#fff;overflow:hidden;margin:8px 0;width:448px;border-radius:4px;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vue-yodify[data-v-91dae696],.vue-yodify [data-v-91dae696]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}", ""]); | ||
exports.push([module.i, ".vue-yodify[data-v-6c81443d]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-6c81443d]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px}.vue-yodify__close>svg[data-v-6c81443d]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%}@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){.vue-yodify__close>svg[data-v-6c81443d]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-6c81443d]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-6c81443d]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-6c81443d]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-6c81443d]{background-color:#fff;overflow:hidden;margin:8px 0;width:448px;border-radius:4px;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vue-yodify[data-v-6c81443d],.vue-yodify [data-v-6c81443d]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}", ""]); | ||
@@ -633,2 +630,17 @@ // exports | ||
/***/ "acgk": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
// load the styles | ||
var content = __webpack_require__("IU13"); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
if(content.locals) module.exports = content.locals; | ||
// add the styles to the DOM | ||
var add = __webpack_require__("rjj0").default | ||
var update = add("8cc4e926", content, true, {"shadowMode":false,"sourceMap":false}); | ||
/***/ }), | ||
/***/ "rjj0": | ||
@@ -635,0 +647,0 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { |
@@ -1,2 +0,2 @@ | ||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue-yodify"]=t():e["vue-yodify"]=t()})("undefined"!==typeof self?self:this,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=0)}({0:function(e,t,n){e.exports=n("97+o")},"8RdY":function(e,t,n){t=e.exports=n("FZ+f")(!1),t.push([e.i,".vue-yodify[data-v-91dae696]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-91dae696]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px}.vue-yodify__close>svg[data-v-91dae696]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%}@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){.vue-yodify__close>svg[data-v-91dae696]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-91dae696]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-91dae696]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-91dae696]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-91dae696]{background-color:#fff;overflow:hidden;margin:8px 0;width:448px;border-radius:4px;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vue-yodify[data-v-91dae696],.vue-yodify [data-v-91dae696]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}",""])},"97+o":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={name:"BellIcon",props:{type:{required:!0,type:String}}},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vue-yodify__icon",class:"vue-yodify__icon--"+e.type},[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=[];function a(e,t,n,o,i,r,a,s){e=e||{};var c=typeof e.default;"object"!==c&&"function"!==c||(e=e.default);var d,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),r&&(u._scopeId=r),a?(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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=d):i&&(d=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),d)if(u.functional){u._injectStyles=d;var l=u.render;u.render=function(e,t){return d.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,d):[d]}return{exports:e,options:u}}function s(e){n("lMwN")}var c=!1,d=s,u="data-v-3ac2c12c",l=null,f=a(o,i,r,c,d,u,l),p=f.exports,v={name:"CloseIcon",methods:{click:function(){this.$emit("click")}}},y=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"},on:{click:e.click}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M12 10.5857864L8.1109127 6.69669914c-.19526214-.19526214-.51184463-.19526214-.70710678 0l-.70710678.70710678c-.19526214.19526215-.19526214.51184464 0 .70710678L10.5857864 12l-3.88908726 3.8890873c-.19526214.1952621-.19526214.5118446 0 .7071068l.70710678.7071068c.19526215.1952621.51184464.1952621.70710678 0L12 13.4142136l3.8890873 3.8890873c.1952621.1952621.5118446.1952621.7071068 0l.7071068-.7071068c.1952621-.1952622.1952621-.5118447 0-.7071068L13.4142136 12l3.8890873-3.8890873c.1952621-.19526214.1952621-.51184463 0-.70710678l-.7071068-.70710678c-.1952622-.19526214-.5118447-.19526214-.7071068 0L12 10.5857864z"}})])},h=[],g=!1,x=null,b=null,m=null,_=a(v,y,h,g,x,b,m),w=_.exports;const C=e=>({events:new e}),k=(e=64)=>{const t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),n=[];for(let o=0;o<e;o+=16)n.push(t());return n.join("")},j=({id:e})=>({id:t})=>e!==t;var M={name:"VueYodify",components:{BellIcon:p,CloseIcon:w},data:function(){return{queue:[]}},methods:{addNotification:function(e){var t=this,n=e.id,o=void 0===n?k():n,i=e.text,r=e.type,a=e.duration,s=void 0===a?3e3:a;this.queue.push({id:o,text:i,type:r}),window.setTimeout(function(){return t.deleteNotification(o)},s)},deleteNotification:function(e){this.queue=this.queue.filter(j({id:e}))},iconClass:function(e){return"vue-yodify__icon vue-yodify__icon--".concat(e)}},mounted:function(){this.registerEventBridge()}},L=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:"vue-yodify__notification"},[n("BellIcon",{attrs:{type:t.type}}),n("div",{staticClass:"vue-yodify__content"},[n("div",{domProps:{textContent:e._s(t.text)}})]),n("div",{staticClass:"vue-yodify__close"},[n("CloseIcon",{on:{click:function(n){e.deleteNotification(t.id)}}})],1)],1)}))},N=[];function S(e){n("eS1l")}var E=!1,R=S,$="data-v-91dae696",B=null,U=a(M,L,N,E,R,$,B),I=U.exports;t["default"]={install(e){if(this.installed)return;this.installed=!0;const t=C(e);I.methods.registerEventBridge=function(){t.events.$on("vue-yodify",this.addNotification)},e.component("vue-yodify",I),e.prototype.$yodify=(({duration:e=3e3,text:n,type:o="success"})=>{t.events.$emit("vue-yodify",{text:n,type:o,duration:e})})}}},"FZ+f":function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"===typeof btoa){var r=o(i),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[n].concat(a).concat([r]).join("\n")}return[n].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return"/*# "+n+" */"}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={},i=0;i<this.length;i++){var r=this[i][0];"number"===typeof r&&(o[r]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"===typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},G3kA:function(e,t,n){t=e.exports=n("FZ+f")(!1),t.push([e.i,".vue-yodify__icon[data-v-3ac2c12c]{width:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px}.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919}.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4}.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13}.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d}",""])},eS1l:function(e,t,n){var o=n("8RdY");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("rjj0").default;i("66edd6c6",o,!0,{shadowMode:!1,sourceMap:!1})},lMwN:function(e,t,n){var o=n("G3kA");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("rjj0").default;i("28bb3c6c",o,!0,{shadowMode:!1,sourceMap:!1})},rjj0:function(e,t,n){"use strict";function o(e,t){for(var n=[],o={},i=0;i<t.length;i++){var r=t[i],a=r[0],s=r[1],c=r[2],d=r[3],u={id:e+":"+i,css:s,media:c,sourceMap:d};o[a]?o[a].parts.push(u):n.push(o[a]={id:a,parts:[u]})}return n}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=v;var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)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 r={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,d=!1,u=function(){},l=null,f="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(e,t,n,i){d=n,l=i||{};var a=o(e,t);return y(a),function(t){for(var n=[],i=0;i<a.length;i++){var s=a[i],c=r[s.id];c.refs--,n.push(c)}t?(a=o(e,t),y(a)):a=[];for(i=0;i<n.length;i++){c=n[i];if(0===c.refs){for(var d=0;d<c.parts.length;d++)c.parts[d]();delete r[c.id]}}}}function y(e){for(var t=0;t<e.length;t++){var n=e[t],o=r[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(g(n.parts[i]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(g(n.parts[i]));r[n.id]={id:n.id,refs:1,parts:a}}}}function h(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function g(e){var t,n,o=document.querySelector("style["+f+'~="'+e.id+'"]');if(o){if(d)return u;o.parentNode.removeChild(o)}if(p){var i=c++;o=s||(s=h()),t=b.bind(null,o,i,!1),n=b.bind(null,o,i,!0)}else o=h(),t=m.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()}}var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function b(e,t,n,o){var i=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var r=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function m(e,t){var n=t.css,o=t.media,i=t.sourceMap;if(o&&e.setAttribute("media",o),l.ssrId&&e.setAttribute(f,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}})["default"]}); | ||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue-yodify"]=t():e["vue-yodify"]=t()})("undefined"!==typeof self?self:this,function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="./",o(o.s=0)}({0:function(e,t,o){e.exports=o("97+o")},"97+o":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={name:"BellIcon",props:{type:{required:!0,type:String}}},i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"vue-yodify__icon",class:"vue-yodify__icon--"+e.type},[o("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"#ffffff"}},[o("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=[];function a(e,t,o,n,i,r,a,s){e=e||{};var c=typeof e.default;"object"!==c&&"function"!==c||(e=e.default);var d,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=o,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r),a?(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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=d):i&&(d=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),d)if(u.functional){u._injectStyles=d;var f=u.render;u.render=function(e,t){return d.call(t),f(e,t)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,d):[d]}return{exports:e,options:u}}function s(e){o("lMwN")}var c=!1,d=s,u="data-v-3ac2c12c",f=null,l=a(n,i,r,c,d,u,f),p=l.exports,v={name:"CloseIcon",methods:{click:function(){this.$emit("click")}}},y=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("svg",{attrs:{height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg"},on:{click:e.click}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M12 10.5857864L8.1109127 6.69669914c-.19526214-.19526214-.51184463-.19526214-.70710678 0l-.70710678.70710678c-.19526214.19526215-.19526214.51184464 0 .70710678L10.5857864 12l-3.88908726 3.8890873c-.19526214.1952621-.19526214.5118446 0 .7071068l.70710678.7071068c.19526215.1952621.51184464.1952621.70710678 0L12 13.4142136l3.8890873 3.8890873c.1952621.1952621.5118446.1952621.7071068 0l.7071068-.7071068c.1952621-.1952622.1952621-.5118447 0-.7071068L13.4142136 12l3.8890873-3.8890873c.1952621-.19526214.1952621-.51184463 0-.70710678l-.7071068-.70710678c-.1952622-.19526214-.5118447-.19526214-.7071068 0L12 10.5857864z"}})])},h=[],x=!1,g=null,b=null,m=null,_=a(v,y,h,x,g,b,m),w=_.exports;const C=(e=64)=>{const t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),o=[];for(let n=0;n<e;n+=16)o.push(t());return o.join("")},k=({id:e})=>({id:t})=>e!==t;var j={name:"VueYodify",components:{BellIcon:p,CloseIcon:w},data:function(){return{queue:[]}},methods:{addNotification:function(e){var t=this,o=e.id,n=void 0===o?C():o,i=e.text,r=e.type,a=e.duration,s=void 0===a?3e3:a;this.queue.push({id:n,text:i,type:r}),window.setTimeout(function(){return t.deleteNotification(n)},s)},deleteNotification:function(e){this.queue=this.queue.filter(k({id:e}))},iconClass:function(e){return"vue-yodify__icon vue-yodify__icon--".concat(e)}},created:function(){var e;while(e=this.$yodifyBuffer.pop())this.addNotification(e);this.$root.$on("vue-yodify",this.addNotification)},beforeDestroy:function(){this.$root.$off("vue-yodify",this.addNotification)}},M=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"vue-yodify"},e._l(e.queue,function(t){return o("div",{key:t.id,staticClass:"vue-yodify__notification"},[o("BellIcon",{attrs:{type:t.type}}),o("div",{staticClass:"vue-yodify__content"},[o("div",{domProps:{textContent:e._s(t.text)}})]),o("div",{staticClass:"vue-yodify__close"},[o("CloseIcon",{on:{click:function(o){e.deleteNotification(t.id)}}})],1)],1)}))},$=[];function N(e){o("IgA8")}var L=!1,S=N,I="data-v-6c81443d",B=null,E=a(j,M,$,L,S,I,B),R=E.exports;t["default"]={install(e){this.installed||(this.installed=!0,e.component("vue-yodify",R),e.prototype.$yodifyBuffer=[],e.prototype.$yodify=function({duration:t=3e3,text:o,type:n="success"}){const i={duration:t,text:o,type:n};this.$root?this.$root.$emit("vue-yodify",i):e.prototype.$yodifyBuffer.push(i)})}}},"FZ+f":function(e,t){function o(e,t){var o=e[1]||"",i=e[3];if(!i)return o;if(t&&"function"===typeof btoa){var r=n(i),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[o].concat(a).concat([r]).join("\n")}return[o].join("\n")}function n(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return"/*# "+o+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=o(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,o){"string"===typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i<this.length;i++){var r=this[i][0];"number"===typeof r&&(n[r]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"===typeof a[0]&&n[a[0]]||(o&&!a[2]?a[2]=o:o&&(a[2]="("+a[2]+") and ("+o+")"),t.push(a))}},t}},G3kA:function(e,t,o){t=e.exports=o("FZ+f")(!1),t.push([e.i,".vue-yodify__icon[data-v-3ac2c12c]{width:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px}.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919}.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4}.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13}.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d}",""])},IPaG:function(e,t,o){t=e.exports=o("FZ+f")(!1),t.push([e.i,".vue-yodify[data-v-6c81443d]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-6c81443d]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px}.vue-yodify__close>svg[data-v-6c81443d]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%}@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){.vue-yodify__close>svg[data-v-6c81443d]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-6c81443d]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-6c81443d]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-6c81443d]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-6c81443d]{background-color:#fff;overflow:hidden;margin:8px 0;width:448px;border-radius:4px;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.vue-yodify[data-v-6c81443d],.vue-yodify [data-v-6c81443d]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}",""])},IgA8:function(e,t,o){var n=o("IPaG");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=o("rjj0").default;i("9db08c1e",n,!0,{shadowMode:!1,sourceMap:!1})},lMwN:function(e,t,o){var n=o("G3kA");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=o("rjj0").default;i("28bb3c6c",n,!0,{shadowMode:!1,sourceMap:!1})},rjj0:function(e,t,o){"use strict";function n(e,t){for(var o=[],n={},i=0;i<t.length;i++){var r=t[i],a=r[0],s=r[1],c=r[2],d=r[3],u={id:e+":"+i,css:s,media:c,sourceMap:d};n[a]?n[a].parts.push(u):o.push(n[a]={id:a,parts:[u]})}return o}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=v;var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)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 r={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,d=!1,u=function(){},f=null,l="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(e,t,o,i){d=o,f=i||{};var a=n(e,t);return y(a),function(t){for(var o=[],i=0;i<a.length;i++){var s=a[i],c=r[s.id];c.refs--,o.push(c)}t?(a=n(e,t),y(a)):a=[];for(i=0;i<o.length;i++){c=o[i];if(0===c.refs){for(var d=0;d<c.parts.length;d++)c.parts[d]();delete r[c.id]}}}}function y(e){for(var t=0;t<e.length;t++){var o=e[t],n=r[o.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](o.parts[i]);for(;i<o.parts.length;i++)n.parts.push(x(o.parts[i]));n.parts.length>o.parts.length&&(n.parts.length=o.parts.length)}else{var a=[];for(i=0;i<o.parts.length;i++)a.push(x(o.parts[i]));r[o.id]={id:o.id,refs:1,parts:a}}}}function h(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function x(e){var t,o,n=document.querySelector("style["+l+'~="'+e.id+'"]');if(n){if(d)return u;n.parentNode.removeChild(n)}if(p){var i=c++;n=s||(s=h()),t=b.bind(null,n,i,!1),o=b.bind(null,n,i,!0)}else n=h(),t=m.bind(null,n),o=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else o()}}var g=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}();function b(e,t,o,n){var i=o?"":n.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var r=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function m(e,t){var o=t.css,n=t.media,i=t.sourceMap;if(n&&e.setAttribute("media",n),f.ssrId&&e.setAttribute(l,t.id),i&&(o+="\n/*# sourceURL="+i.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=o;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}}})["default"]}); | ||
//# sourceMappingURL=vue-yodify.umd.min.js.map |
@@ -65,3 +65,3 @@ { | ||
}, | ||
"version": "0.2.4" | ||
"version": "0.2.5" | ||
} |
@@ -72,3 +72,3 @@ # vue-yodify by <a href="https://www.3yourmind.com/">3YOURMIND</a> | ||
<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> | ||
<th align="center"><a href="https://github.com/dodekeract"><img src="https://avatars0.githubusercontent.com/u/1133858?v=4" width="100px;" style="max-width:100%;"><br><sub>dodekeract</sub></a><br><p>Contributions: 10</p></th> | ||
<th align="center"><a href="https://github.com/dodekeract"><img src="https://avatars0.githubusercontent.com/u/1133858?v=4" width="100px;" style="max-width:100%;"><br><sub>dodekeract</sub></a><br><p>Contributions: 12</p></th> | ||
</thead></table> | ||
@@ -75,0 +75,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
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
214813
1602