@3yourmind/vue-yodify
Advanced tools
Comparing version 0.2.7 to 0.2.9
@@ -40,10 +40,30 @@ module.exports = | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { | ||
/******/ configurable: false, | ||
/******/ enumerable: true, | ||
/******/ get: getter | ||
/******/ }); | ||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // create a fake namespace object | ||
/******/ // mode & 1: value is a module id, require it | ||
/******/ // mode & 2: merge all properties of value into the ns | ||
/******/ // mode & 4: return value when already ns object | ||
/******/ // mode & 8|1: behave like require | ||
/******/ __webpack_require__.t = function(value, mode) { | ||
/******/ if(mode & 1) value = __webpack_require__(value); | ||
/******/ if(mode & 8) return value; | ||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | ||
/******/ var ns = Object.create(null); | ||
/******/ __webpack_require__.r(ns); | ||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | ||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | ||
/******/ return ns; | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
@@ -62,6 +82,7 @@ /******/ __webpack_require__.n = function(module) { | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = "./"; | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ return __webpack_require__(__webpack_require__.s = "fb15"); | ||
/******/ }) | ||
@@ -71,441 +92,53 @@ /************************************************************************/ | ||
/***/ "/HNy": | ||
/***/ "0bfb": | ||
/***/ (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__("RtZk"); | ||
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("ef56a390", content, true, {"shadowMode":false,"sourceMap":false}); | ||
/***/ }), | ||
/***/ 0: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__("97+o"); | ||
/***/ }), | ||
/***/ "97+o": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/jpu/Documents/github/vue-yodify/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./source/components/BellIcon.vue | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var BellIcon = ({ | ||
name: 'BellIcon', | ||
props: { | ||
type: { | ||
required: true, | ||
type: String | ||
} | ||
} | ||
}); | ||
// 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"}})])])} | ||
var staticRenderFns = [] | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/component-normalizer.js | ||
/* globals __VUE_SSR_CONTEXT__ */ | ||
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). | ||
// This module is a runtime utility for cleaner component module output and will | ||
// be included in the final webpack user bundle. | ||
function normalizeComponent ( | ||
scriptExports, | ||
render, | ||
staticRenderFns, | ||
functionalTemplate, | ||
injectStyles, | ||
scopeId, | ||
moduleIdentifier, /* server only */ | ||
shadowMode /* vue-cli only */ | ||
) { | ||
scriptExports = scriptExports || {} | ||
// ES6 modules interop | ||
var type = typeof scriptExports.default | ||
if (type === 'object' || type === 'function') { | ||
scriptExports = scriptExports.default | ||
} | ||
// Vue.extend constructor export interop | ||
var options = typeof scriptExports === 'function' | ||
? scriptExports.options | ||
: scriptExports | ||
// render functions | ||
if (render) { | ||
options.render = render | ||
options.staticRenderFns = staticRenderFns | ||
options._compiled = true | ||
} | ||
// functional template | ||
if (functionalTemplate) { | ||
options.functional = true | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId | ||
} | ||
var hook | ||
if (moduleIdentifier) { // server build | ||
hook = function (context) { | ||
// 2.3 injection | ||
context = | ||
context || // cached call | ||
(this.$vnode && this.$vnode.ssrContext) || // stateful | ||
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__ | ||
} | ||
// inject component styles | ||
if (injectStyles) { | ||
injectStyles.call(this, context) | ||
} | ||
// register component module identifier for async chunk inferrence | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier) | ||
} | ||
} | ||
// used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook | ||
} else if (injectStyles) { | ||
hook = shadowMode | ||
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } | ||
: injectStyles | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// for template-only hot-reload because in that case the render fn doesn't | ||
// go through the normalizer | ||
options._injectStyles = hook | ||
// register for functioal component in vue file | ||
var originalRender = options.render | ||
options.render = function renderWithStyleInjection (h, context) { | ||
hook.call(context) | ||
return originalRender(h, context) | ||
} | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate | ||
options.beforeCreate = existing | ||
? [].concat(existing, hook) | ||
: [hook] | ||
} | ||
} | ||
return { | ||
exports: scriptExports, | ||
options: options | ||
} | ||
} | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue | ||
function injectStyle (context) { | ||
__webpack_require__("LBVm") | ||
} | ||
/* script */ | ||
/* template */ | ||
/* template functional */ | ||
var __vue_template_functional__ = false | ||
/* styles */ | ||
var __vue_styles__ = injectStyle | ||
/* scopeId */ | ||
var __vue_scopeId__ = "data-v-3ac2c12c" | ||
/* moduleIdentifier (server only) */ | ||
var __vue_module_identifier__ = null | ||
var Component = normalizeComponent( | ||
BellIcon, | ||
render, | ||
staticRenderFns, | ||
__vue_template_functional__, | ||
__vue_styles__, | ||
__vue_scopeId__, | ||
__vue_module_identifier__ | ||
) | ||
/* harmony default export */ var components_BellIcon = (Component.exports); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/jpu/Documents/github/vue-yodify/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./source/components/CloseIcon.vue | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var CloseIcon = ({ | ||
name: 'CloseIcon', | ||
methods: { | ||
click: function click() { | ||
this.$emit('click'); | ||
} | ||
} | ||
}); | ||
// 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 = [] | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue | ||
/* script */ | ||
/* template */ | ||
/* template functional */ | ||
var CloseIcon___vue_template_functional__ = false | ||
/* styles */ | ||
var CloseIcon___vue_styles__ = null | ||
/* scopeId */ | ||
var CloseIcon___vue_scopeId__ = null | ||
/* moduleIdentifier (server only) */ | ||
var CloseIcon___vue_module_identifier__ = null | ||
var CloseIcon_Component = normalizeComponent( | ||
CloseIcon, | ||
CloseIcon_render, | ||
CloseIcon_staticRenderFns, | ||
CloseIcon___vue_template_functional__, | ||
CloseIcon___vue_styles__, | ||
CloseIcon___vue_scopeId__, | ||
CloseIcon___vue_module_identifier__ | ||
) | ||
/* harmony default export */ var components_CloseIcon = (CloseIcon_Component.exports); | ||
// CONCATENATED MODULE: ./source/utilities.js | ||
/** | ||
* @description generates a random id | ||
* @param {Number} ID_BITS id entropy in bits, defaults to 64 (4 words) | ||
* @returns {String} random id | ||
*/ | ||
const generateId = (ID_BITS = 64) => { | ||
const randomWord = () => | ||
Math.floor((1 + Math.random()) * 0x10000) | ||
.toString(16) | ||
.substring(1); | ||
const result = []; | ||
for (let i = 0; i < ID_BITS; i += 16) result.push(randomWord()); | ||
return result.join(''); | ||
// 21.2.5.3 get RegExp.prototype.flags | ||
var anObject = __webpack_require__("cb7c"); | ||
module.exports = function () { | ||
var that = anObject(this); | ||
var result = ''; | ||
if (that.global) result += 'g'; | ||
if (that.ignoreCase) result += 'i'; | ||
if (that.multiline) result += 'm'; | ||
if (that.unicode) result += 'u'; | ||
if (that.sticky) result += 'y'; | ||
return result; | ||
}; | ||
/** | ||
* @description curried function that filters all ids that don't match a given id | ||
* @param {String} $0.id first id | ||
* @returns {Function} compares id1 to passed id | ||
*/ | ||
const notId = ({ id: id1 }) => ({ id: id2 }) => id1 !== id2; | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/jpu/Documents/github/vue-yodify/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./source/components/VueYodify.vue | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/***/ }), | ||
/***/ "2184": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("2350")(false); | ||
// imports | ||
/* harmony default export */ var VueYodify = ({ | ||
name: 'VueYodify', | ||
components: { | ||
BellIcon: components_BellIcon, | ||
CloseIcon: components_CloseIcon | ||
}, | ||
data: function data() { | ||
return { | ||
queue: [] | ||
}; | ||
}, | ||
methods: { | ||
addNotification: function addNotification(_ref) { | ||
var _this = this; | ||
var _ref$id = _ref.id, | ||
id = _ref$id === void 0 ? generateId() : _ref$id, | ||
text = _ref.text, | ||
type = _ref.type, | ||
_ref$duration = _ref.duration, | ||
duration = _ref$duration === void 0 ? 3000 : _ref$duration; | ||
this.queue.push({ | ||
id: id, | ||
text: text, | ||
type: type | ||
}); | ||
window.setTimeout(function () { | ||
return _this.deleteNotification(id); | ||
}, duration); | ||
}, | ||
deleteNotification: function deleteNotification(id) { | ||
this.queue = this.queue.filter(notId({ | ||
id: id | ||
})); | ||
}, | ||
iconClass: function iconClass(notificationStatus) { | ||
return "vue-yodify__icon vue-yodify__icon--".concat(notificationStatus); | ||
} | ||
}, | ||
created: function created() { | ||
var notification; | ||
// module | ||
exports.push([module.i, "\n.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\n}\n.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px\n}\n.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919\n}\n.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4\n}\n.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13\n}\n.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d\n}", ""]); | ||
while (notification = this.$yodifyBuffer.pop()) { | ||
this.addNotification(notification); | ||
} | ||
// exports | ||
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-821beb90","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)}))} | ||
var VueYodify_staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/VueYodify.vue | ||
function VueYodify_injectStyle (context) { | ||
__webpack_require__("/HNy") | ||
} | ||
/* script */ | ||
/* template */ | ||
/* template functional */ | ||
var VueYodify___vue_template_functional__ = false | ||
/* styles */ | ||
var VueYodify___vue_styles__ = VueYodify_injectStyle | ||
/* scopeId */ | ||
var VueYodify___vue_scopeId__ = "data-v-821beb90" | ||
/* moduleIdentifier (server only) */ | ||
var VueYodify___vue_module_identifier__ = null | ||
var VueYodify_Component = normalizeComponent( | ||
VueYodify, | ||
VueYodify_render, | ||
VueYodify_staticRenderFns, | ||
VueYodify___vue_template_functional__, | ||
VueYodify___vue_styles__, | ||
VueYodify___vue_scopeId__, | ||
VueYodify___vue_module_identifier__ | ||
) | ||
/* harmony default export */ var components_VueYodify = (VueYodify_Component.exports); | ||
// CONCATENATED MODULE: ./source/index.js | ||
/* harmony default export */ var source = __webpack_exports__["default"] = ({ | ||
install(Vue) { | ||
if (this.installed) return; | ||
this.installed = true; | ||
Vue.component('vue-yodify', components_VueYodify); | ||
// prevent race condition when emitting | ||
// notifications before vue is ready | ||
Vue.prototype.$yodifyBuffer = []; | ||
/** | ||
* @description Function to add payload to queue. | ||
* @param {String} $0.text Message Content | ||
* @param {String} [$0.type=success] Message Style | ||
* @param {Number} [$0.duration=3000] Message Duration | ||
* @example { text: 'Success!' } | ||
* @example { type: 'error', text: 'Error!' } | ||
* @example { type: 'warn', text: 'Warn!' } | ||
* @example { type: 'info', text: 'Info!' } | ||
* @example { text: 'Long Notification', duration: 10000 } | ||
*/ | ||
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); | ||
}; | ||
}, | ||
}); | ||
/***/ }), | ||
/***/ "BPeW": | ||
/***/ "230e": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
var isObject = __webpack_require__("d3f4"); | ||
var document = __webpack_require__("7726").document; | ||
// typeof document.createElement is 'object' in old IE | ||
var is = isObject(document) && isObject(document.createElement); | ||
module.exports = function (it) { | ||
return is ? document.createElement(it) : {}; | ||
}; | ||
// 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": | ||
/***/ "2350": | ||
/***/ (function(module, exports) { | ||
@@ -593,38 +226,99 @@ | ||
/***/ "LBVm": | ||
/***/ "2aba": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
var global = __webpack_require__("7726"); | ||
var hide = __webpack_require__("32e9"); | ||
var has = __webpack_require__("69a8"); | ||
var SRC = __webpack_require__("ca5a")('src'); | ||
var TO_STRING = 'toString'; | ||
var $toString = Function[TO_STRING]; | ||
var TPL = ('' + $toString).split(TO_STRING); | ||
// load the styles | ||
var content = __webpack_require__("BPeW"); | ||
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("d04e252a", content, true, {"shadowMode":false,"sourceMap":false}); | ||
__webpack_require__("8378").inspectSource = function (it) { | ||
return $toString.call(it); | ||
}; | ||
(module.exports = function (O, key, val, safe) { | ||
var isFunction = typeof val == 'function'; | ||
if (isFunction) has(val, 'name') || hide(val, 'name', key); | ||
if (O[key] === val) return; | ||
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | ||
if (O === global) { | ||
O[key] = val; | ||
} else if (!safe) { | ||
delete O[key]; | ||
hide(O, key, val); | ||
} else if (O[key]) { | ||
O[key] = val; | ||
} else { | ||
hide(O, key, val); | ||
} | ||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
})(Function.prototype, TO_STRING, function toString() { | ||
return typeof this == 'function' && this[SRC] || $toString.call(this); | ||
}); | ||
/***/ }), | ||
/***/ "RtZk": | ||
/***/ "32e9": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
var dP = __webpack_require__("86cc"); | ||
var createDesc = __webpack_require__("4630"); | ||
module.exports = __webpack_require__("9e1e") ? function (object, key, value) { | ||
return dP.f(object, key, createDesc(1, value)); | ||
} : function (object, key, value) { | ||
object[key] = value; | ||
return object; | ||
}; | ||
// module | ||
exports.push([module.i, ".vue-yodify[data-v-821beb90]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-821beb90]{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;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;width:48px}.vue-yodify__close>svg[data-v-821beb90]{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-821beb90]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-821beb90]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-821beb90]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-821beb90]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-821beb90]{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-821beb90],.vue-yodify [data-v-821beb90]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}@media (max-width:460px){.vue-yodify__notification[data-v-821beb90]{width:96%;margin:2%}.vue-yodify[data-v-821beb90]{width:100%;right:0}}", ""]); | ||
/***/ }), | ||
// exports | ||
/***/ "3846": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 21.2.5.3 get RegExp.prototype.flags() | ||
if (__webpack_require__("9e1e") && /./g.flags != 'g') __webpack_require__("86cc").f(RegExp.prototype, 'flags', { | ||
configurable: true, | ||
get: __webpack_require__("0bfb") | ||
}); | ||
/***/ }), | ||
/***/ "rjj0": | ||
/***/ "3a5a": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7169"); | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); | ||
/***/ }), | ||
/***/ "4630": | ||
/***/ (function(module, exports) { | ||
module.exports = function (bitmap, value) { | ||
return { | ||
enumerable: !(bitmap & 1), | ||
configurable: !(bitmap & 2), | ||
writable: !(bitmap & 4), | ||
value: value | ||
}; | ||
}; | ||
/***/ }), | ||
/***/ "499e": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__.r(__webpack_exports__); | ||
// CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js | ||
@@ -660,3 +354,3 @@ /** | ||
// CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js | ||
/* harmony export (immutable) */ __webpack_exports__["default"] = addStylesClient; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addStylesClient; }); | ||
/* | ||
@@ -886,5 +580,660 @@ MIT License http://www.opensource.org/licenses/mit-license.php | ||
/***/ }), | ||
/***/ "557b": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9429"); | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); | ||
/***/ }), | ||
/***/ "69a8": | ||
/***/ (function(module, exports) { | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
module.exports = function (it, key) { | ||
return hasOwnProperty.call(it, key); | ||
}; | ||
/***/ }), | ||
/***/ "6a99": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.1 ToPrimitive(input [, PreferredType]) | ||
var isObject = __webpack_require__("d3f4"); | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
module.exports = function (it, S) { | ||
if (!isObject(it)) return it; | ||
var fn, val; | ||
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | ||
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; | ||
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
}; | ||
/***/ }), | ||
/***/ "6b54": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__("3846"); | ||
var anObject = __webpack_require__("cb7c"); | ||
var $flags = __webpack_require__("0bfb"); | ||
var DESCRIPTORS = __webpack_require__("9e1e"); | ||
var TO_STRING = 'toString'; | ||
var $toString = /./[TO_STRING]; | ||
var define = function (fn) { | ||
__webpack_require__("2aba")(RegExp.prototype, TO_STRING, fn, true); | ||
}; | ||
// 21.2.5.14 RegExp.prototype.toString() | ||
if (__webpack_require__("79e5")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { | ||
define(function toString() { | ||
var R = anObject(this); | ||
return '/'.concat(R.source, '/', | ||
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); | ||
}); | ||
// FF44- RegExp#toString has a wrong name | ||
} else if ($toString.name != TO_STRING) { | ||
define(function toString() { | ||
return $toString.call(this); | ||
}); | ||
} | ||
/***/ }), | ||
/***/ "7169": | ||
/***/ (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__("80c6"); | ||
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__("499e").default | ||
var update = add("c1566664", content, true, {"sourceMap":false,"shadowMode":false}); | ||
/***/ }), | ||
/***/ "7726": | ||
/***/ (function(module, exports) { | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
var global = module.exports = typeof window != 'undefined' && window.Math == Math | ||
? window : typeof self != 'undefined' && self.Math == Math ? self | ||
// eslint-disable-next-line no-new-func | ||
: Function('return this')(); | ||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | ||
/***/ }), | ||
/***/ "79e5": | ||
/***/ (function(module, exports) { | ||
module.exports = function (exec) { | ||
try { | ||
return !!exec(); | ||
} catch (e) { | ||
return true; | ||
} | ||
}; | ||
/***/ }), | ||
/***/ "80c6": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("2350")(false); | ||
// imports | ||
// module | ||
exports.push([module.i, "\n.vue-yodify[data-v-821beb90]{z-index:9999;position:fixed;top:0;right:8px\n}\n.vue-yodify__close[data-v-821beb90]{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;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;width:48px\n}\n.vue-yodify__close>svg[data-v-821beb90]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%\n}\n@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){\n.vue-yodify__close>svg[data-v-821beb90]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset\n}\n}\n.vue-yodify__close>svg[data-v-821beb90]:hover{background-color:rgba(0,0,0,.1)\n}\n.vue-yodify__content[data-v-821beb90]{-webkit-box-flex:1;-ms-flex:1;flex:1\n}\n.vue-yodify__content>div[data-v-821beb90]{padding:.93em 3em .93em 1em\n}\n.vue-yodify__notification[data-v-821beb90]{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\n}\n.vue-yodify[data-v-821beb90],.vue-yodify *[data-v-821beb90]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial\n}\n@media (max-width:460px){\n.vue-yodify__notification[data-v-821beb90]{width:96%;margin:2%\n}\n.vue-yodify[data-v-821beb90]{width:100%;right:0\n}\n}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "8378": | ||
/***/ (function(module, exports) { | ||
var core = module.exports = { version: '2.5.7' }; | ||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | ||
/***/ }), | ||
/***/ "86cc": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var anObject = __webpack_require__("cb7c"); | ||
var IE8_DOM_DEFINE = __webpack_require__("c69a"); | ||
var toPrimitive = __webpack_require__("6a99"); | ||
var dP = Object.defineProperty; | ||
exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if (IE8_DOM_DEFINE) try { | ||
return dP(O, P, Attributes); | ||
} catch (e) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; | ||
/***/ }), | ||
/***/ "9429": | ||
/***/ (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__("2184"); | ||
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__("499e").default | ||
var update = add("52191902", content, true, {"sourceMap":false,"shadowMode":false}); | ||
/***/ }), | ||
/***/ "9e1e": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// Thank's IE8 for his funny defineProperty | ||
module.exports = !__webpack_require__("79e5")(function () { | ||
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
/***/ }), | ||
/***/ "c69a": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () { | ||
return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
/***/ }), | ||
/***/ "ca5a": | ||
/***/ (function(module, exports) { | ||
var id = 0; | ||
var px = Math.random(); | ||
module.exports = function (key) { | ||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | ||
}; | ||
/***/ }), | ||
/***/ "cb7c": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__("d3f4"); | ||
module.exports = function (it) { | ||
if (!isObject(it)) throw TypeError(it + ' is not an object!'); | ||
return it; | ||
}; | ||
/***/ }), | ||
/***/ "d3f4": | ||
/***/ (function(module, exports) { | ||
module.exports = function (it) { | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
}; | ||
/***/ }), | ||
/***/ "fb15": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__.r(__webpack_exports__); | ||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js | ||
// This file is imported into lib/wc client bundles. | ||
if (typeof window !== 'undefined') { | ||
var i | ||
if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) { | ||
__webpack_require__.p = i[1] // eslint-disable-line | ||
} | ||
} | ||
// Indicate to webpack that this file can be concatenated | ||
/* harmony default export */ var setPublicPath = (null); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/VueYodify.vue?vue&type=template&id=821beb90&scoped=true& | ||
var 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)}))} | ||
var staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/VueYodify.vue?vue&type=template&id=821beb90&scoped=true& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/BellIcon.vue?vue&type=template&id=3ac2c12c&scoped=true& | ||
var BellIconvue_type_template_id_3ac2c12c_scoped_true_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"}})])])} | ||
var BellIconvue_type_template_id_3ac2c12c_scoped_true_staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue?vue&type=template&id=3ac2c12c&scoped=true& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/BellIcon.vue?vue&type=script&lang=js& | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var BellIconvue_type_script_lang_js_ = ({ | ||
name: 'BellIcon', | ||
props: { | ||
type: { | ||
required: true, | ||
type: String | ||
} | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var components_BellIconvue_type_script_lang_js_ = (BellIconvue_type_script_lang_js_); | ||
// EXTERNAL MODULE: ./source/components/BellIcon.vue?vue&type=style&index=0&id=3ac2c12c&lang=scss&scoped=true& | ||
var BellIconvue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true_ = __webpack_require__("557b"); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js | ||
/* globals __VUE_SSR_CONTEXT__ */ | ||
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). | ||
// This module is a runtime utility for cleaner component module output and will | ||
// be included in the final webpack user bundle. | ||
function normalizeComponent ( | ||
scriptExports, | ||
render, | ||
staticRenderFns, | ||
functionalTemplate, | ||
injectStyles, | ||
scopeId, | ||
moduleIdentifier, /* server only */ | ||
shadowMode /* vue-cli only */ | ||
) { | ||
// Vue.extend constructor export interop | ||
var options = typeof scriptExports === 'function' | ||
? scriptExports.options | ||
: scriptExports | ||
// render functions | ||
if (render) { | ||
options.render = render | ||
options.staticRenderFns = staticRenderFns | ||
options._compiled = true | ||
} | ||
// functional template | ||
if (functionalTemplate) { | ||
options.functional = true | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = 'data-v-' + scopeId | ||
} | ||
var hook | ||
if (moduleIdentifier) { // server build | ||
hook = function (context) { | ||
// 2.3 injection | ||
context = | ||
context || // cached call | ||
(this.$vnode && this.$vnode.ssrContext) || // stateful | ||
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__ | ||
} | ||
// inject component styles | ||
if (injectStyles) { | ||
injectStyles.call(this, context) | ||
} | ||
// register component module identifier for async chunk inferrence | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier) | ||
} | ||
} | ||
// used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook | ||
} else if (injectStyles) { | ||
hook = shadowMode | ||
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } | ||
: injectStyles | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// for template-only hot-reload because in that case the render fn doesn't | ||
// go through the normalizer | ||
options._injectStyles = hook | ||
// register for functioal component in vue file | ||
var originalRender = options.render | ||
options.render = function renderWithStyleInjection (h, context) { | ||
hook.call(context) | ||
return originalRender(h, context) | ||
} | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate | ||
options.beforeCreate = existing | ||
? [].concat(existing, hook) | ||
: [hook] | ||
} | ||
} | ||
return { | ||
exports: scriptExports, | ||
options: options | ||
} | ||
} | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue | ||
/* normalize component */ | ||
var component = normalizeComponent( | ||
components_BellIconvue_type_script_lang_js_, | ||
BellIconvue_type_template_id_3ac2c12c_scoped_true_render, | ||
BellIconvue_type_template_id_3ac2c12c_scoped_true_staticRenderFns, | ||
false, | ||
null, | ||
"3ac2c12c", | ||
null | ||
) | ||
component.options.__file = "BellIcon.vue" | ||
/* harmony default export */ var BellIcon = (component.exports); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/CloseIcon.vue?vue&type=template&id=653d2791& | ||
var CloseIconvue_type_template_id_653d2791_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 CloseIconvue_type_template_id_653d2791_staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue?vue&type=template&id=653d2791& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/CloseIcon.vue?vue&type=script&lang=js& | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var CloseIconvue_type_script_lang_js_ = ({ | ||
name: 'CloseIcon', | ||
methods: { | ||
click: function click() { | ||
this.$emit('click'); | ||
} | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var components_CloseIconvue_type_script_lang_js_ = (CloseIconvue_type_script_lang_js_); | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue | ||
/* normalize component */ | ||
var CloseIcon_component = normalizeComponent( | ||
components_CloseIconvue_type_script_lang_js_, | ||
CloseIconvue_type_template_id_653d2791_render, | ||
CloseIconvue_type_template_id_653d2791_staticRenderFns, | ||
false, | ||
null, | ||
null, | ||
null | ||
) | ||
CloseIcon_component.options.__file = "CloseIcon.vue" | ||
/* harmony default export */ var CloseIcon = (CloseIcon_component.exports); | ||
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.to-string.js | ||
var es6_regexp_to_string = __webpack_require__("6b54"); | ||
// CONCATENATED MODULE: ./source/utilities.js | ||
/** | ||
* @description generates a random id | ||
* @param {Number} ID_BITS id entropy in bits, defaults to 64 (4 words) | ||
* @returns {String} random id | ||
*/ | ||
var generateId = function generateId() { | ||
var ID_BITS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 64; | ||
var randomWord = function randomWord() { | ||
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | ||
}; | ||
var result = []; | ||
for (var i = 0; i < ID_BITS; i += 16) { | ||
result.push(randomWord()); | ||
} | ||
return result.join(''); | ||
}; | ||
/** | ||
* @description curried function that filters all ids that don't match a given id | ||
* @param {String} $0.id first id | ||
* @returns {Function} compares id1 to passed id | ||
*/ | ||
var notId = function notId(_ref) { | ||
var id1 = _ref.id; | ||
return function (_ref2) { | ||
var id2 = _ref2.id; | ||
return id1 !== id2; | ||
}; | ||
}; | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/VueYodify.vue?vue&type=script&lang=js& | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var VueYodifyvue_type_script_lang_js_ = ({ | ||
name: 'VueYodify', | ||
components: { | ||
BellIcon: BellIcon, | ||
CloseIcon: CloseIcon | ||
}, | ||
data: function data() { | ||
return { | ||
queue: [] | ||
}; | ||
}, | ||
methods: { | ||
addNotification: function addNotification(_ref) { | ||
var _this = this; | ||
var _ref$id = _ref.id, | ||
id = _ref$id === void 0 ? generateId() : _ref$id, | ||
text = _ref.text, | ||
type = _ref.type, | ||
_ref$duration = _ref.duration, | ||
duration = _ref$duration === void 0 ? 3000 : _ref$duration; | ||
this.queue.push({ | ||
id: id, | ||
text: text, | ||
type: type | ||
}); | ||
window.setTimeout(function () { | ||
return _this.deleteNotification(id); | ||
}, duration); | ||
}, | ||
deleteNotification: function deleteNotification(id) { | ||
this.queue = this.queue.filter(notId({ | ||
id: id | ||
})); | ||
}, | ||
iconClass: function iconClass(notificationStatus) { | ||
return "vue-yodify__icon vue-yodify__icon--".concat(notificationStatus); | ||
} | ||
}, | ||
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: ./source/components/VueYodify.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var components_VueYodifyvue_type_script_lang_js_ = (VueYodifyvue_type_script_lang_js_); | ||
// EXTERNAL MODULE: ./source/components/VueYodify.vue?vue&type=style&index=0&id=821beb90&lang=scss&scoped=true& | ||
var VueYodifyvue_type_style_index_0_id_821beb90_lang_scss_scoped_true_ = __webpack_require__("3a5a"); | ||
// CONCATENATED MODULE: ./source/components/VueYodify.vue | ||
/* normalize component */ | ||
var VueYodify_component = normalizeComponent( | ||
components_VueYodifyvue_type_script_lang_js_, | ||
render, | ||
staticRenderFns, | ||
false, | ||
null, | ||
"821beb90", | ||
null | ||
) | ||
VueYodify_component.options.__file = "VueYodify.vue" | ||
/* harmony default export */ var VueYodify = (VueYodify_component.exports); | ||
// CONCATENATED MODULE: ./source/index.js | ||
/* harmony default export */ var source = ({ | ||
install: function install(Vue) { | ||
if (this.installed) return; | ||
this.installed = true; | ||
Vue.component('vue-yodify', VueYodify); // prevent race condition when emitting | ||
// notifications before vue is ready | ||
Vue.prototype.$yodifyBuffer = []; | ||
/** | ||
* @description Function to add payload to queue. | ||
* @param {String} $0.text Message Content | ||
* @param {String} [$0.type=success] Message Style | ||
* @param {Number} [$0.duration=3000] Message Duration | ||
* @example { text: 'Success!' } | ||
* @example { type: 'error', text: 'Error!' } | ||
* @example { type: 'warn', text: 'Warn!' } | ||
* @example { type: 'info', text: 'Info!' } | ||
* @example { text: 'Long Notification', duration: 10000 } | ||
*/ | ||
Vue.prototype.$yodify = function (_ref) { | ||
var _ref$duration = _ref.duration, | ||
duration = _ref$duration === void 0 ? 3000 : _ref$duration, | ||
text = _ref.text, | ||
_ref$type = _ref.type, | ||
type = _ref$type === void 0 ? 'success' : _ref$type; | ||
var notification = { | ||
duration: duration, | ||
text: text, | ||
type: type | ||
}; // buffer notifications if vue isn't ready | ||
if (!this.$root) Vue.prototype.$yodifyBuffer.push(notification);else this.$root.$emit('vue-yodify', notification); | ||
}; | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js | ||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (source); | ||
/***/ }) | ||
/******/ })["default"]; | ||
/******/ }); | ||
//# sourceMappingURL=vue-yodify.common.js.map |
@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
root["vue-yodify"] = factory(); | ||
})(typeof self !== 'undefined' ? self : this, function() { | ||
})((typeof self !== 'undefined' ? self : this), function() { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
@@ -50,10 +50,30 @@ /******/ // The module cache | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { | ||
/******/ configurable: false, | ||
/******/ enumerable: true, | ||
/******/ get: getter | ||
/******/ }); | ||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // create a fake namespace object | ||
/******/ // mode & 1: value is a module id, require it | ||
/******/ // mode & 2: merge all properties of value into the ns | ||
/******/ // mode & 4: return value when already ns object | ||
/******/ // mode & 8|1: behave like require | ||
/******/ __webpack_require__.t = function(value, mode) { | ||
/******/ if(mode & 1) value = __webpack_require__(value); | ||
/******/ if(mode & 8) return value; | ||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | ||
/******/ var ns = Object.create(null); | ||
/******/ __webpack_require__.r(ns); | ||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | ||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | ||
/******/ return ns; | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
@@ -72,6 +92,7 @@ /******/ __webpack_require__.n = function(module) { | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = "./"; | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ return __webpack_require__(__webpack_require__.s = "fb15"); | ||
/******/ }) | ||
@@ -81,411 +102,53 @@ /************************************************************************/ | ||
/***/ 0: | ||
/***/ "0bfb": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__("97+o"); | ||
/***/ }), | ||
/***/ "97+o": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/jpu/Documents/github/vue-yodify/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./source/components/BellIcon.vue | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var BellIcon = ({ | ||
name: 'BellIcon', | ||
props: { | ||
type: { | ||
required: true, | ||
type: String | ||
} | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-3ac2c12c","hasScoped":true,"optionsId":"1","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"}})])])} | ||
var staticRenderFns = [] | ||
// 21.2.5.3 get RegExp.prototype.flags | ||
var anObject = __webpack_require__("cb7c"); | ||
module.exports = function () { | ||
var that = anObject(this); | ||
var result = ''; | ||
if (that.global) result += 'g'; | ||
if (that.ignoreCase) result += 'i'; | ||
if (that.multiline) result += 'm'; | ||
if (that.unicode) result += 'u'; | ||
if (that.sticky) result += 'y'; | ||
return result; | ||
}; | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/component-normalizer.js | ||
/* globals __VUE_SSR_CONTEXT__ */ | ||
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). | ||
// This module is a runtime utility for cleaner component module output and will | ||
// be included in the final webpack user bundle. | ||
/***/ }), | ||
function normalizeComponent ( | ||
scriptExports, | ||
render, | ||
staticRenderFns, | ||
functionalTemplate, | ||
injectStyles, | ||
scopeId, | ||
moduleIdentifier, /* server only */ | ||
shadowMode /* vue-cli only */ | ||
) { | ||
scriptExports = scriptExports || {} | ||
/***/ "2184": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// ES6 modules interop | ||
var type = typeof scriptExports.default | ||
if (type === 'object' || type === 'function') { | ||
scriptExports = scriptExports.default | ||
} | ||
exports = module.exports = __webpack_require__("2350")(false); | ||
// imports | ||
// Vue.extend constructor export interop | ||
var options = typeof scriptExports === 'function' | ||
? scriptExports.options | ||
: scriptExports | ||
// render functions | ||
if (render) { | ||
options.render = render | ||
options.staticRenderFns = staticRenderFns | ||
options._compiled = true | ||
} | ||
// module | ||
exports.push([module.i, "\n.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\n}\n.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px\n}\n.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919\n}\n.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4\n}\n.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13\n}\n.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d\n}", ""]); | ||
// functional template | ||
if (functionalTemplate) { | ||
options.functional = true | ||
} | ||
// exports | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId | ||
} | ||
var hook | ||
if (moduleIdentifier) { // server build | ||
hook = function (context) { | ||
// 2.3 injection | ||
context = | ||
context || // cached call | ||
(this.$vnode && this.$vnode.ssrContext) || // stateful | ||
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__ | ||
} | ||
// inject component styles | ||
if (injectStyles) { | ||
injectStyles.call(this, context) | ||
} | ||
// register component module identifier for async chunk inferrence | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier) | ||
} | ||
} | ||
// used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook | ||
} else if (injectStyles) { | ||
hook = shadowMode | ||
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } | ||
: injectStyles | ||
} | ||
/***/ }), | ||
if (hook) { | ||
if (options.functional) { | ||
// for template-only hot-reload because in that case the render fn doesn't | ||
// go through the normalizer | ||
options._injectStyles = hook | ||
// register for functioal component in vue file | ||
var originalRender = options.render | ||
options.render = function renderWithStyleInjection (h, context) { | ||
hook.call(context) | ||
return originalRender(h, context) | ||
} | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate | ||
options.beforeCreate = existing | ||
? [].concat(existing, hook) | ||
: [hook] | ||
} | ||
} | ||
/***/ "230e": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
return { | ||
exports: scriptExports, | ||
options: options | ||
} | ||
} | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue | ||
function injectStyle (context) { | ||
__webpack_require__("lMwN") | ||
} | ||
/* script */ | ||
/* template */ | ||
/* template functional */ | ||
var __vue_template_functional__ = false | ||
/* styles */ | ||
var __vue_styles__ = injectStyle | ||
/* scopeId */ | ||
var __vue_scopeId__ = "data-v-3ac2c12c" | ||
/* moduleIdentifier (server only) */ | ||
var __vue_module_identifier__ = null | ||
var Component = normalizeComponent( | ||
BellIcon, | ||
render, | ||
staticRenderFns, | ||
__vue_template_functional__, | ||
__vue_styles__, | ||
__vue_scopeId__, | ||
__vue_module_identifier__ | ||
) | ||
/* harmony default export */ var components_BellIcon = (Component.exports); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/jpu/Documents/github/vue-yodify/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./source/components/CloseIcon.vue | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var CloseIcon = ({ | ||
name: 'CloseIcon', | ||
methods: { | ||
click: function click() { | ||
this.$emit('click'); | ||
} | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-653d2791","hasScoped":false,"optionsId":"1","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 = [] | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue | ||
/* script */ | ||
/* template */ | ||
/* template functional */ | ||
var CloseIcon___vue_template_functional__ = false | ||
/* styles */ | ||
var CloseIcon___vue_styles__ = null | ||
/* scopeId */ | ||
var CloseIcon___vue_scopeId__ = null | ||
/* moduleIdentifier (server only) */ | ||
var CloseIcon___vue_module_identifier__ = null | ||
var CloseIcon_Component = normalizeComponent( | ||
CloseIcon, | ||
CloseIcon_render, | ||
CloseIcon_staticRenderFns, | ||
CloseIcon___vue_template_functional__, | ||
CloseIcon___vue_styles__, | ||
CloseIcon___vue_scopeId__, | ||
CloseIcon___vue_module_identifier__ | ||
) | ||
/* harmony default export */ var components_CloseIcon = (CloseIcon_Component.exports); | ||
// CONCATENATED MODULE: ./source/utilities.js | ||
/** | ||
* @description generates a random id | ||
* @param {Number} ID_BITS id entropy in bits, defaults to 64 (4 words) | ||
* @returns {String} random id | ||
*/ | ||
const generateId = (ID_BITS = 64) => { | ||
const randomWord = () => | ||
Math.floor((1 + Math.random()) * 0x10000) | ||
.toString(16) | ||
.substring(1); | ||
const result = []; | ||
for (let i = 0; i < ID_BITS; i += 16) result.push(randomWord()); | ||
return result.join(''); | ||
var isObject = __webpack_require__("d3f4"); | ||
var document = __webpack_require__("7726").document; | ||
// typeof document.createElement is 'object' in old IE | ||
var is = isObject(document) && isObject(document.createElement); | ||
module.exports = function (it) { | ||
return is ? document.createElement(it) : {}; | ||
}; | ||
/** | ||
* @description curried function that filters all ids that don't match a given id | ||
* @param {String} $0.id first id | ||
* @returns {Function} compares id1 to passed id | ||
*/ | ||
const notId = ({ id: id1 }) => ({ id: id2 }) => id1 !== id2; | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/jpu/Documents/github/vue-yodify/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./source/components/VueYodify.vue | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var VueYodify = ({ | ||
name: 'VueYodify', | ||
components: { | ||
BellIcon: components_BellIcon, | ||
CloseIcon: components_CloseIcon | ||
}, | ||
data: function data() { | ||
return { | ||
queue: [] | ||
}; | ||
}, | ||
methods: { | ||
addNotification: function addNotification(_ref) { | ||
var _this = this; | ||
var _ref$id = _ref.id, | ||
id = _ref$id === void 0 ? generateId() : _ref$id, | ||
text = _ref.text, | ||
type = _ref.type, | ||
_ref$duration = _ref.duration, | ||
duration = _ref$duration === void 0 ? 3000 : _ref$duration; | ||
this.queue.push({ | ||
id: id, | ||
text: text, | ||
type: type | ||
}); | ||
window.setTimeout(function () { | ||
return _this.deleteNotification(id); | ||
}, duration); | ||
}, | ||
deleteNotification: function deleteNotification(id) { | ||
this.queue = this.queue.filter(notId({ | ||
id: id | ||
})); | ||
}, | ||
iconClass: function iconClass(notificationStatus) { | ||
return "vue-yodify__icon vue-yodify__icon--".concat(notificationStatus); | ||
} | ||
}, | ||
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-821beb90","hasScoped":true,"optionsId":"1","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)}))} | ||
var VueYodify_staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/VueYodify.vue | ||
function VueYodify_injectStyle (context) { | ||
__webpack_require__("lex3") | ||
} | ||
/* script */ | ||
/* template */ | ||
/* template functional */ | ||
var VueYodify___vue_template_functional__ = false | ||
/* styles */ | ||
var VueYodify___vue_styles__ = VueYodify_injectStyle | ||
/* scopeId */ | ||
var VueYodify___vue_scopeId__ = "data-v-821beb90" | ||
/* moduleIdentifier (server only) */ | ||
var VueYodify___vue_module_identifier__ = null | ||
var VueYodify_Component = normalizeComponent( | ||
VueYodify, | ||
VueYodify_render, | ||
VueYodify_staticRenderFns, | ||
VueYodify___vue_template_functional__, | ||
VueYodify___vue_styles__, | ||
VueYodify___vue_scopeId__, | ||
VueYodify___vue_module_identifier__ | ||
) | ||
/* harmony default export */ var components_VueYodify = (VueYodify_Component.exports); | ||
// CONCATENATED MODULE: ./source/index.js | ||
/* harmony default export */ var source = __webpack_exports__["default"] = ({ | ||
install(Vue) { | ||
if (this.installed) return; | ||
this.installed = true; | ||
Vue.component('vue-yodify', components_VueYodify); | ||
// prevent race condition when emitting | ||
// notifications before vue is ready | ||
Vue.prototype.$yodifyBuffer = []; | ||
/** | ||
* @description Function to add payload to queue. | ||
* @param {String} $0.text Message Content | ||
* @param {String} [$0.type=success] Message Style | ||
* @param {Number} [$0.duration=3000] Message Duration | ||
* @example { text: 'Success!' } | ||
* @example { type: 'error', text: 'Error!' } | ||
* @example { type: 'warn', text: 'Warn!' } | ||
* @example { type: 'info', text: 'Info!' } | ||
* @example { text: 'Long Notification', duration: 10000 } | ||
*/ | ||
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); | ||
}; | ||
}, | ||
}); | ||
/***/ }), | ||
/***/ "FZ+f": | ||
/***/ "2350": | ||
/***/ (function(module, exports) { | ||
@@ -573,67 +236,98 @@ | ||
/***/ "G3kA": | ||
/***/ "2aba": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
var global = __webpack_require__("7726"); | ||
var hide = __webpack_require__("32e9"); | ||
var has = __webpack_require__("69a8"); | ||
var SRC = __webpack_require__("ca5a")('src'); | ||
var TO_STRING = 'toString'; | ||
var $toString = Function[TO_STRING]; | ||
var TPL = ('' + $toString).split(TO_STRING); | ||
__webpack_require__("8378").inspectSource = function (it) { | ||
return $toString.call(it); | ||
}; | ||
// 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}", ""]); | ||
(module.exports = function (O, key, val, safe) { | ||
var isFunction = typeof val == 'function'; | ||
if (isFunction) has(val, 'name') || hide(val, 'name', key); | ||
if (O[key] === val) return; | ||
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | ||
if (O === global) { | ||
O[key] = val; | ||
} else if (!safe) { | ||
delete O[key]; | ||
hide(O, key, val); | ||
} else if (O[key]) { | ||
O[key] = val; | ||
} else { | ||
hide(O, key, val); | ||
} | ||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
})(Function.prototype, TO_STRING, function toString() { | ||
return typeof this == 'function' && this[SRC] || $toString.call(this); | ||
}); | ||
// exports | ||
/***/ }), | ||
/***/ "XVM/": | ||
/***/ "32e9": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("FZ+f")(false); | ||
// imports | ||
var dP = __webpack_require__("86cc"); | ||
var createDesc = __webpack_require__("4630"); | ||
module.exports = __webpack_require__("9e1e") ? function (object, key, value) { | ||
return dP.f(object, key, createDesc(1, value)); | ||
} : function (object, key, value) { | ||
object[key] = value; | ||
return object; | ||
}; | ||
// module | ||
exports.push([module.i, ".vue-yodify[data-v-821beb90]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-821beb90]{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;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;width:48px}.vue-yodify__close>svg[data-v-821beb90]{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-821beb90]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-821beb90]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-821beb90]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-821beb90]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-821beb90]{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-821beb90],.vue-yodify [data-v-821beb90]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}@media (max-width:460px){.vue-yodify__notification[data-v-821beb90]{width:96%;margin:2%}.vue-yodify[data-v-821beb90]{width:100%;right:0}}", ""]); | ||
/***/ }), | ||
// exports | ||
/***/ "3846": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 21.2.5.3 get RegExp.prototype.flags() | ||
if (__webpack_require__("9e1e") && /./g.flags != 'g') __webpack_require__("86cc").f(RegExp.prototype, 'flags', { | ||
configurable: true, | ||
get: __webpack_require__("0bfb") | ||
}); | ||
/***/ }), | ||
/***/ "lMwN": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ "3a5a": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
"use strict"; | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7169"); | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VueYodify_vue_vue_type_style_index_0_id_821beb90_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); | ||
// load the styles | ||
var content = __webpack_require__("G3kA"); | ||
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("28bb3c6c", content, true, {"shadowMode":false,"sourceMap":false}); | ||
/***/ }), | ||
/***/ "lex3": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ "4630": | ||
/***/ (function(module, exports) { | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
module.exports = function (bitmap, value) { | ||
return { | ||
enumerable: !(bitmap & 1), | ||
configurable: !(bitmap & 2), | ||
writable: !(bitmap & 4), | ||
value: value | ||
}; | ||
}; | ||
// load the styles | ||
var content = __webpack_require__("XVM/"); | ||
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("69df40f9", content, true, {"shadowMode":false,"sourceMap":false}); | ||
/***/ }), | ||
/***/ "rjj0": | ||
/***/ "499e": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
__webpack_require__.r(__webpack_exports__); | ||
@@ -670,3 +364,3 @@ // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js | ||
// CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js | ||
/* harmony export (immutable) */ __webpack_exports__["default"] = addStylesClient; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addStylesClient; }); | ||
/* | ||
@@ -896,6 +590,661 @@ MIT License http://www.opensource.org/licenses/mit-license.php | ||
/***/ }), | ||
/***/ "557b": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9429"); | ||
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_BellIcon_vue_vue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); | ||
/***/ }), | ||
/***/ "69a8": | ||
/***/ (function(module, exports) { | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
module.exports = function (it, key) { | ||
return hasOwnProperty.call(it, key); | ||
}; | ||
/***/ }), | ||
/***/ "6a99": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.1 ToPrimitive(input [, PreferredType]) | ||
var isObject = __webpack_require__("d3f4"); | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
module.exports = function (it, S) { | ||
if (!isObject(it)) return it; | ||
var fn, val; | ||
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | ||
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; | ||
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
}; | ||
/***/ }), | ||
/***/ "6b54": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__("3846"); | ||
var anObject = __webpack_require__("cb7c"); | ||
var $flags = __webpack_require__("0bfb"); | ||
var DESCRIPTORS = __webpack_require__("9e1e"); | ||
var TO_STRING = 'toString'; | ||
var $toString = /./[TO_STRING]; | ||
var define = function (fn) { | ||
__webpack_require__("2aba")(RegExp.prototype, TO_STRING, fn, true); | ||
}; | ||
// 21.2.5.14 RegExp.prototype.toString() | ||
if (__webpack_require__("79e5")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { | ||
define(function toString() { | ||
var R = anObject(this); | ||
return '/'.concat(R.source, '/', | ||
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); | ||
}); | ||
// FF44- RegExp#toString has a wrong name | ||
} else if ($toString.name != TO_STRING) { | ||
define(function toString() { | ||
return $toString.call(this); | ||
}); | ||
} | ||
/***/ }), | ||
/***/ "7169": | ||
/***/ (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__("80c6"); | ||
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__("499e").default | ||
var update = add("c1566664", content, true, {"sourceMap":false,"shadowMode":false}); | ||
/***/ }), | ||
/***/ "7726": | ||
/***/ (function(module, exports) { | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
var global = module.exports = typeof window != 'undefined' && window.Math == Math | ||
? window : typeof self != 'undefined' && self.Math == Math ? self | ||
// eslint-disable-next-line no-new-func | ||
: Function('return this')(); | ||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | ||
/***/ }), | ||
/***/ "79e5": | ||
/***/ (function(module, exports) { | ||
module.exports = function (exec) { | ||
try { | ||
return !!exec(); | ||
} catch (e) { | ||
return true; | ||
} | ||
}; | ||
/***/ }), | ||
/***/ "80c6": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
exports = module.exports = __webpack_require__("2350")(false); | ||
// imports | ||
// module | ||
exports.push([module.i, "\n.vue-yodify[data-v-821beb90]{z-index:9999;position:fixed;top:0;right:8px\n}\n.vue-yodify__close[data-v-821beb90]{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;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;width:48px\n}\n.vue-yodify__close>svg[data-v-821beb90]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%\n}\n@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){\n.vue-yodify__close>svg[data-v-821beb90]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset\n}\n}\n.vue-yodify__close>svg[data-v-821beb90]:hover{background-color:rgba(0,0,0,.1)\n}\n.vue-yodify__content[data-v-821beb90]{-webkit-box-flex:1;-ms-flex:1;flex:1\n}\n.vue-yodify__content>div[data-v-821beb90]{padding:.93em 3em .93em 1em\n}\n.vue-yodify__notification[data-v-821beb90]{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\n}\n.vue-yodify[data-v-821beb90],.vue-yodify *[data-v-821beb90]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial\n}\n@media (max-width:460px){\n.vue-yodify__notification[data-v-821beb90]{width:96%;margin:2%\n}\n.vue-yodify[data-v-821beb90]{width:100%;right:0\n}\n}", ""]); | ||
// exports | ||
/***/ }), | ||
/***/ "8378": | ||
/***/ (function(module, exports) { | ||
var core = module.exports = { version: '2.5.7' }; | ||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | ||
/***/ }), | ||
/***/ "86cc": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var anObject = __webpack_require__("cb7c"); | ||
var IE8_DOM_DEFINE = __webpack_require__("c69a"); | ||
var toPrimitive = __webpack_require__("6a99"); | ||
var dP = Object.defineProperty; | ||
exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if (IE8_DOM_DEFINE) try { | ||
return dP(O, P, Attributes); | ||
} catch (e) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; | ||
/***/ }), | ||
/***/ "9429": | ||
/***/ (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__("2184"); | ||
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__("499e").default | ||
var update = add("52191902", content, true, {"sourceMap":false,"shadowMode":false}); | ||
/***/ }), | ||
/***/ "9e1e": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// Thank's IE8 for his funny defineProperty | ||
module.exports = !__webpack_require__("79e5")(function () { | ||
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
/***/ }), | ||
/***/ "c69a": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () { | ||
return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
/***/ }), | ||
/***/ "ca5a": | ||
/***/ (function(module, exports) { | ||
var id = 0; | ||
var px = Math.random(); | ||
module.exports = function (key) { | ||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | ||
}; | ||
/***/ }), | ||
/***/ "cb7c": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__("d3f4"); | ||
module.exports = function (it) { | ||
if (!isObject(it)) throw TypeError(it + ' is not an object!'); | ||
return it; | ||
}; | ||
/***/ }), | ||
/***/ "d3f4": | ||
/***/ (function(module, exports) { | ||
module.exports = function (it) { | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
}; | ||
/***/ }), | ||
/***/ "fb15": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__.r(__webpack_exports__); | ||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js | ||
// This file is imported into lib/wc client bundles. | ||
if (typeof window !== 'undefined') { | ||
var i | ||
if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) { | ||
__webpack_require__.p = i[1] // eslint-disable-line | ||
} | ||
} | ||
// Indicate to webpack that this file can be concatenated | ||
/* harmony default export */ var setPublicPath = (null); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/VueYodify.vue?vue&type=template&id=821beb90&scoped=true& | ||
var 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)}))} | ||
var staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/VueYodify.vue?vue&type=template&id=821beb90&scoped=true& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/BellIcon.vue?vue&type=template&id=3ac2c12c&scoped=true& | ||
var BellIconvue_type_template_id_3ac2c12c_scoped_true_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"}})])])} | ||
var BellIconvue_type_template_id_3ac2c12c_scoped_true_staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue?vue&type=template&id=3ac2c12c&scoped=true& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/BellIcon.vue?vue&type=script&lang=js& | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var BellIconvue_type_script_lang_js_ = ({ | ||
name: 'BellIcon', | ||
props: { | ||
type: { | ||
required: true, | ||
type: String | ||
} | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var components_BellIconvue_type_script_lang_js_ = (BellIconvue_type_script_lang_js_); | ||
// EXTERNAL MODULE: ./source/components/BellIcon.vue?vue&type=style&index=0&id=3ac2c12c&lang=scss&scoped=true& | ||
var BellIconvue_type_style_index_0_id_3ac2c12c_lang_scss_scoped_true_ = __webpack_require__("557b"); | ||
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js | ||
/* globals __VUE_SSR_CONTEXT__ */ | ||
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). | ||
// This module is a runtime utility for cleaner component module output and will | ||
// be included in the final webpack user bundle. | ||
function normalizeComponent ( | ||
scriptExports, | ||
render, | ||
staticRenderFns, | ||
functionalTemplate, | ||
injectStyles, | ||
scopeId, | ||
moduleIdentifier, /* server only */ | ||
shadowMode /* vue-cli only */ | ||
) { | ||
// Vue.extend constructor export interop | ||
var options = typeof scriptExports === 'function' | ||
? scriptExports.options | ||
: scriptExports | ||
// render functions | ||
if (render) { | ||
options.render = render | ||
options.staticRenderFns = staticRenderFns | ||
options._compiled = true | ||
} | ||
// functional template | ||
if (functionalTemplate) { | ||
options.functional = true | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = 'data-v-' + scopeId | ||
} | ||
var hook | ||
if (moduleIdentifier) { // server build | ||
hook = function (context) { | ||
// 2.3 injection | ||
context = | ||
context || // cached call | ||
(this.$vnode && this.$vnode.ssrContext) || // stateful | ||
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__ | ||
} | ||
// inject component styles | ||
if (injectStyles) { | ||
injectStyles.call(this, context) | ||
} | ||
// register component module identifier for async chunk inferrence | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier) | ||
} | ||
} | ||
// used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook | ||
} else if (injectStyles) { | ||
hook = shadowMode | ||
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } | ||
: injectStyles | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// for template-only hot-reload because in that case the render fn doesn't | ||
// go through the normalizer | ||
options._injectStyles = hook | ||
// register for functioal component in vue file | ||
var originalRender = options.render | ||
options.render = function renderWithStyleInjection (h, context) { | ||
hook.call(context) | ||
return originalRender(h, context) | ||
} | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate | ||
options.beforeCreate = existing | ||
? [].concat(existing, hook) | ||
: [hook] | ||
} | ||
} | ||
return { | ||
exports: scriptExports, | ||
options: options | ||
} | ||
} | ||
// CONCATENATED MODULE: ./source/components/BellIcon.vue | ||
/* normalize component */ | ||
var component = normalizeComponent( | ||
components_BellIconvue_type_script_lang_js_, | ||
BellIconvue_type_template_id_3ac2c12c_scoped_true_render, | ||
BellIconvue_type_template_id_3ac2c12c_scoped_true_staticRenderFns, | ||
false, | ||
null, | ||
"3ac2c12c", | ||
null | ||
) | ||
component.options.__file = "BellIcon.vue" | ||
/* harmony default export */ var BellIcon = (component.exports); | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/CloseIcon.vue?vue&type=template&id=653d2791& | ||
var CloseIconvue_type_template_id_653d2791_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 CloseIconvue_type_template_id_653d2791_staticRenderFns = [] | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue?vue&type=template&id=653d2791& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/CloseIcon.vue?vue&type=script&lang=js& | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var CloseIconvue_type_script_lang_js_ = ({ | ||
name: 'CloseIcon', | ||
methods: { | ||
click: function click() { | ||
this.$emit('click'); | ||
} | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var components_CloseIconvue_type_script_lang_js_ = (CloseIconvue_type_script_lang_js_); | ||
// CONCATENATED MODULE: ./source/components/CloseIcon.vue | ||
/* normalize component */ | ||
var CloseIcon_component = normalizeComponent( | ||
components_CloseIconvue_type_script_lang_js_, | ||
CloseIconvue_type_template_id_653d2791_render, | ||
CloseIconvue_type_template_id_653d2791_staticRenderFns, | ||
false, | ||
null, | ||
null, | ||
null | ||
) | ||
CloseIcon_component.options.__file = "CloseIcon.vue" | ||
/* harmony default export */ var CloseIcon = (CloseIcon_component.exports); | ||
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.to-string.js | ||
var es6_regexp_to_string = __webpack_require__("6b54"); | ||
// CONCATENATED MODULE: ./source/utilities.js | ||
/** | ||
* @description generates a random id | ||
* @param {Number} ID_BITS id entropy in bits, defaults to 64 (4 words) | ||
* @returns {String} random id | ||
*/ | ||
var generateId = function generateId() { | ||
var ID_BITS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 64; | ||
var randomWord = function randomWord() { | ||
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | ||
}; | ||
var result = []; | ||
for (var i = 0; i < ID_BITS; i += 16) { | ||
result.push(randomWord()); | ||
} | ||
return result.join(''); | ||
}; | ||
/** | ||
* @description curried function that filters all ids that don't match a given id | ||
* @param {String} $0.id first id | ||
* @returns {Function} compares id1 to passed id | ||
*/ | ||
var notId = function notId(_ref) { | ||
var id1 = _ref.id; | ||
return function (_ref2) { | ||
var id2 = _ref2.id; | ||
return id1 !== id2; | ||
}; | ||
}; | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./source/components/VueYodify.vue?vue&type=script&lang=js& | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
/* harmony default export */ var VueYodifyvue_type_script_lang_js_ = ({ | ||
name: 'VueYodify', | ||
components: { | ||
BellIcon: BellIcon, | ||
CloseIcon: CloseIcon | ||
}, | ||
data: function data() { | ||
return { | ||
queue: [] | ||
}; | ||
}, | ||
methods: { | ||
addNotification: function addNotification(_ref) { | ||
var _this = this; | ||
var _ref$id = _ref.id, | ||
id = _ref$id === void 0 ? generateId() : _ref$id, | ||
text = _ref.text, | ||
type = _ref.type, | ||
_ref$duration = _ref.duration, | ||
duration = _ref$duration === void 0 ? 3000 : _ref$duration; | ||
this.queue.push({ | ||
id: id, | ||
text: text, | ||
type: type | ||
}); | ||
window.setTimeout(function () { | ||
return _this.deleteNotification(id); | ||
}, duration); | ||
}, | ||
deleteNotification: function deleteNotification(id) { | ||
this.queue = this.queue.filter(notId({ | ||
id: id | ||
})); | ||
}, | ||
iconClass: function iconClass(notificationStatus) { | ||
return "vue-yodify__icon vue-yodify__icon--".concat(notificationStatus); | ||
} | ||
}, | ||
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: ./source/components/VueYodify.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var components_VueYodifyvue_type_script_lang_js_ = (VueYodifyvue_type_script_lang_js_); | ||
// EXTERNAL MODULE: ./source/components/VueYodify.vue?vue&type=style&index=0&id=821beb90&lang=scss&scoped=true& | ||
var VueYodifyvue_type_style_index_0_id_821beb90_lang_scss_scoped_true_ = __webpack_require__("3a5a"); | ||
// CONCATENATED MODULE: ./source/components/VueYodify.vue | ||
/* normalize component */ | ||
var VueYodify_component = normalizeComponent( | ||
components_VueYodifyvue_type_script_lang_js_, | ||
render, | ||
staticRenderFns, | ||
false, | ||
null, | ||
"821beb90", | ||
null | ||
) | ||
VueYodify_component.options.__file = "VueYodify.vue" | ||
/* harmony default export */ var VueYodify = (VueYodify_component.exports); | ||
// CONCATENATED MODULE: ./source/index.js | ||
/* harmony default export */ var source = ({ | ||
install: function install(Vue) { | ||
if (this.installed) return; | ||
this.installed = true; | ||
Vue.component('vue-yodify', VueYodify); // prevent race condition when emitting | ||
// notifications before vue is ready | ||
Vue.prototype.$yodifyBuffer = []; | ||
/** | ||
* @description Function to add payload to queue. | ||
* @param {String} $0.text Message Content | ||
* @param {String} [$0.type=success] Message Style | ||
* @param {Number} [$0.duration=3000] Message Duration | ||
* @example { text: 'Success!' } | ||
* @example { type: 'error', text: 'Error!' } | ||
* @example { type: 'warn', text: 'Warn!' } | ||
* @example { type: 'info', text: 'Info!' } | ||
* @example { text: 'Long Notification', duration: 10000 } | ||
*/ | ||
Vue.prototype.$yodify = function (_ref) { | ||
var _ref$duration = _ref.duration, | ||
duration = _ref$duration === void 0 ? 3000 : _ref$duration, | ||
text = _ref.text, | ||
_ref$type = _ref.type, | ||
type = _ref$type === void 0 ? 'success' : _ref$type; | ||
var notification = { | ||
duration: duration, | ||
text: text, | ||
type: type | ||
}; // buffer notifications if vue isn't ready | ||
if (!this.$root) Vue.prototype.$yodifyBuffer.push(notification);else this.$root.$emit('vue-yodify', notification); | ||
}; | ||
} | ||
}); | ||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js | ||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (source); | ||
/***/ }) | ||
/******/ })["default"]; | ||
/******/ }); | ||
}); | ||
//# sourceMappingURL=vue-yodify.umd.js.map |
@@ -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 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("acgk")}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=[],b=!1,x=null,g=null,m=null,_=a(v,y,h,b,x,g,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)}},$=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)}))},M=[];function L(e){o("gh5j")}var N=!1,S=L,U="data-v-821beb90",B=null,E=a(j,$,M,N,S,U,B),I=E.exports;t["default"]={install(e){this.installed||(this.installed=!0,e.component("vue-yodify",I),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}},IU13: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}",""])},WHme:function(e,t,o){t=e.exports=o("FZ+f")(!1),t.push([e.i,".vue-yodify[data-v-821beb90]{z-index:9999;position:fixed;top:0;right:8px}.vue-yodify__close[data-v-821beb90]{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;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;width:48px}.vue-yodify__close>svg[data-v-821beb90]{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-821beb90]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset}}.vue-yodify__close>svg[data-v-821beb90]:hover{background-color:rgba(0,0,0,.1)}.vue-yodify__content[data-v-821beb90]{-webkit-box-flex:1;-ms-flex:1;flex:1}.vue-yodify__content>div[data-v-821beb90]{padding:.93em 3em .93em 1em}.vue-yodify__notification[data-v-821beb90]{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-821beb90],.vue-yodify [data-v-821beb90]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial}@media (max-width:460px){.vue-yodify__notification[data-v-821beb90]{width:96%;margin:2%}.vue-yodify[data-v-821beb90]{width:100%;right:0}}",""])},acgk:function(e,t,o){var n=o("IU13");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=o("rjj0").default;i("8cc4e926",n,!0,{shadowMode:!1,sourceMap:!1})},gh5j:function(e,t,o){var n=o("WHme");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=o("rjj0").default;i("4b69d3ba",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(b(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(b(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 b(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=g.bind(null,n,i,!1),o=g.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 x=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}();function g(e,t,o,n){var i=o?"":n.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 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"]}); | ||
(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,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return 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="fb15")}({"0bfb":function(e,t,n){"use strict";var o=n("cb7c");e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2184:function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,"\n.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\n}\n.vue-yodify__icon svg[data-v-3ac2c12c]{width:24px;height:24px\n}\n.vue-yodify__icon--error[data-v-3ac2c12c]{background-color:#d91919\n}\n.vue-yodify__icon--info[data-v-3ac2c12c]{background-color:#2c66c4\n}\n.vue-yodify__icon--success[data-v-3ac2c12c]{background-color:#64ad13\n}\n.vue-yodify__icon--warn[data-v-3ac2c12c]{background-color:#ffe60d\n}",""])},"230e":function(e,t,n){var o=n("d3f4"),i=n("7726").document,r=o(i)&&o(i.createElement);e.exports=function(e){return r?i.createElement(e):{}}},2350: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}},"2aba":function(e,t,n){var o=n("7726"),i=n("32e9"),r=n("69a8"),a=n("ca5a")("src"),c="toString",u=Function[c],s=(""+u).split(c);n("8378").inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,c){var u="function"==typeof n;u&&(r(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(r(n,a)||i(n,a,e[t]?""+e[t]:s.join(String(t)))),e===o?e[t]=n:c?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,c,function(){return"function"==typeof this&&this[a]||u.call(this)})},"32e9":function(e,t,n){var o=n("86cc"),i=n("4630");e.exports=n("9e1e")?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},3846:function(e,t,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"3a5a":function(e,t,n){"use strict";var o=n("7169"),i=n.n(o);i.a},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"499e":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],c=r[1],u=r[2],s=r[3],f={id:e+":"+i,css:c,media:u,sourceMap:s};o[a]?o[a].parts.push(f):n.push(o[a]={id:a,parts:[f]})}return n}n.r(t),n.d(t,"default",function(){return 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]),c=null,u=0,s=!1,f=function(){},d=null,l="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(e,t,n,i){s=n,d=i||{};var a=o(e,t);return y(a),function(t){for(var n=[],i=0;i<a.length;i++){var c=a[i],u=r[c.id];u.refs--,n.push(u)}t?(a=o(e,t),y(a)):a=[];for(i=0;i<n.length;i++){u=n[i];if(0===u.refs){for(var s=0;s<u.parts.length;s++)u.parts[s]();delete r[u.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(h(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(h(n.parts[i]));r[n.id]={id:n.id,refs:1,parts:a}}}}function b(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function h(e){var t,n,o=document.querySelector("style["+l+'~="'+e.id+'"]');if(o){if(s)return f;o.parentNode.removeChild(o)}if(p){var i=u++;o=c||(c=b()),t=x.bind(null,o,i,!1),n=x.bind(null,o,i,!0)}else o=b(),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 g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function x(e,t,n,o){var i=n?"":o.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 n=t.css,o=t.media,i=t.sourceMap;if(o&&e.setAttribute("media",o),d.ssrId&&e.setAttribute(l,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))}}},"557b":function(e,t,n){"use strict";var o=n("9429"),i=n.n(o);i.a},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var o=n("d3f4");e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"6b54":function(e,t,n){"use strict";n("3846");var o=n("cb7c"),i=n("0bfb"),r=n("9e1e"),a="toString",c=/./[a],u=function(e){n("2aba")(RegExp.prototype,a,e,!0)};n("79e5")(function(){return"/a/b"!=c.call({source:"a",flags:"b"})})?u(function(){var e=o(this);return"/".concat(e.source,"/","flags"in e?e.flags:!r&&e instanceof RegExp?i.call(e):void 0)}):c.name!=a&&u(function(){return c.call(this)})},7169:function(e,t,n){var o=n("80c6");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("499e").default;i("c1566664",o,!0,{sourceMap:!1,shadowMode:!1})},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"80c6":function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,"\n.vue-yodify[data-v-821beb90]{z-index:9999;position:fixed;top:0;right:8px\n}\n.vue-yodify__close[data-v-821beb90]{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;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;width:48px\n}\n.vue-yodify__close>svg[data-v-821beb90]{cursor:pointer;padding:2px;height:24px;width:24px;border-radius:50%\n}\n@supports ((-webkit-clip-path:circle(50% at 50% 50%)) or (clip-path:circle(50% at 50% 50%))){\n.vue-yodify__close>svg[data-v-821beb90]{-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);border-radius:unset\n}\n}\n.vue-yodify__close>svg[data-v-821beb90]:hover{background-color:rgba(0,0,0,.1)\n}\n.vue-yodify__content[data-v-821beb90]{-webkit-box-flex:1;-ms-flex:1;flex:1\n}\n.vue-yodify__content>div[data-v-821beb90]{padding:.93em 3em .93em 1em\n}\n.vue-yodify__notification[data-v-821beb90]{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\n}\n.vue-yodify[data-v-821beb90],.vue-yodify *[data-v-821beb90]{line-height:normal;-webkit-box-sizing:initial;box-sizing:initial\n}\n@media (max-width:460px){\n.vue-yodify__notification[data-v-821beb90]{width:96%;margin:2%\n}\n.vue-yodify[data-v-821beb90]{width:100%;right:0\n}\n}",""])},8378:function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},"86cc":function(e,t,n){var o=n("cb7c"),i=n("c69a"),r=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(o(e),t=r(t,!0),o(n),i)try{return a(e,t,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},9429:function(e,t,n){var o=n("2184");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("499e").default;i("52191902",o,!0,{sourceMap:!1,shadowMode:!1})},"9e1e":function(e,t,n){e.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},ca5a:function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},cb7c:function(e,t,n){var o=n("d3f4");e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},fb15:function(e,t,n){"use strict";var o;(n.r(t),"undefined"!==typeof window)&&((o=window.document.currentScript)&&(o=o.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=o[1]));var i=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)}))},r=[],a=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"}})])])},c=[],u={name:"BellIcon",props:{type:{required:!0,type:String}}},s=u;n("557b");function f(e,t,n,o,i,r,a,c){var u,s="function"===typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=n,s._compiled=!0),o&&(s.functional=!0),r&&(s._scopeId="data-v-"+r),a?(u=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)},s._ssrRegister=u):i&&(u=c?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(e,t){return u.call(t),f(e,t)}}else{var d=s.beforeCreate;s.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:s}}var d=f(s,a,c,!1,null,"3ac2c12c",null);d.options.__file="BellIcon.vue";var l=d.exports,p=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{attrs:{height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg"},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"}})])},v=[],y={name:"CloseIcon",methods:{click:function(){this.$emit("click")}}},b=y,h=f(b,p,v,!1,null,null,null);h.options.__file="CloseIcon.vue";var g=h.exports,x=(n("6b54"),function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:64,t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},n=[],o=0;o<e;o+=16)n.push(t());return n.join("")}),m=function(e){var t=e.id;return function(e){var n=e.id;return t!==n}},_={name:"VueYodify",components:{BellIcon:l,CloseIcon:g},data:function(){return{queue:[]}},methods:{addNotification:function(e){var t=this,n=e.id,o=void 0===n?x():n,i=e.text,r=e.type,a=e.duration,c=void 0===a?3e3:a;this.queue.push({id:o,text:i,type:r}),window.setTimeout(function(){return t.deleteNotification(o)},c)},deleteNotification:function(e){this.queue=this.queue.filter(m({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)}},w=_,C=(n("3a5a"),f(w,i,r,!1,null,"821beb90",null));C.options.__file="VueYodify.vue";var k=C.exports,j={install:function(e){this.installed||(this.installed=!0,e.component("vue-yodify",k),e.prototype.$yodifyBuffer=[],e.prototype.$yodify=function(t){var n=t.duration,o=void 0===n?3e3:n,i=t.text,r=t.type,a=void 0===r?"success":r,c={duration:o,text:i,type:a};this.$root?this.$root.$emit("vue-yodify",c):e.prototype.$yodifyBuffer.push(c)})}};t["default"]=j}})}); | ||
//# sourceMappingURL=vue-yodify.umd.min.js.map |
@@ -10,2 +10,3 @@ { | ||
"last 2 versions", | ||
"ie 11", | ||
"not ie <= 8" | ||
@@ -30,13 +31,13 @@ ], | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.0.0-beta.6", | ||
"@vue/cli-plugin-eslint": "^3.0.0-beta.6", | ||
"@vue/cli-service": "^3.0.0-beta.6", | ||
"@vue/eslint-config-prettier": "^3.0.0-beta.6", | ||
"husky": "^0.14.3", | ||
"node-sass": "^4.7.2", | ||
"@vue/cli-plugin-babel": "^3.1.1", | ||
"@vue/cli-plugin-eslint": "^3.1.5", | ||
"@vue/cli-service": "^3.1.4", | ||
"@vue/eslint-config-prettier": "^4.0.1", | ||
"husky": "^1.2.0", | ||
"node-sass": "^4.10.0", | ||
"precise-commits": "^1.0.2", | ||
"prettier": "^1.11.1", | ||
"sass-loader": "^6.0.6", | ||
"vue": "^2.5.16", | ||
"vue-template-compiler": "^2.5.13" | ||
"prettier": "^1.15.2", | ||
"sass-loader": "^7.1.0", | ||
"vue": "^2.5.17", | ||
"vue-template-compiler": "^2.5.17" | ||
}, | ||
@@ -79,8 +80,9 @@ "eslintConfig": { | ||
"lint": "vue-cli-service lint", | ||
"postpublish": "git tag $(node -e \"process.stdout.write(require('./package.json').version)\") && git push --tags", | ||
"postpublish": "git tag $(node -p \"require('./package.json').version\") && git push --tags", | ||
"precommit": "precise-commits && npm run lint", | ||
"prepublishOnly": "npm run build", | ||
"serve": "vue-cli-service serve" | ||
"serve": "vue-cli-service serve", | ||
"tagversion": "git tag kotti-$(node -p \"require('./package.json').version\")" | ||
}, | ||
"version": "0.2.7" | ||
"version": "0.2.9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
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
286642
2152
1