milnode
Version:
Vue.js Component Framework, build on top of vuetify
531 lines (447 loc) • 17.7 kB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ 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
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
/******/ })
/************************************************************************/
/******/ ({
/***/ "8bbf":
/***/ (function(module, exports) {
module.exports = require("vue");
/***/ }),
/***/ "ca9a":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "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);
// EXTERNAL MODULE: ./src/stylus/app.styl
var app = __webpack_require__("ca9a");
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
// CONCATENATED MODULE: ./src/locale/en.js
/* harmony default export */ var en = ({
feedback: {
title: 'Your feedback',
catch: 'Your opinion is precious!',
explain: 'Share your feedback with us. All your comments and ratings challenge us to continuously improve WebOptis.',
comment: 'Comment',
send: 'Send your feedback',
privacy: 'Your feedback is anonymous. No personal data is linked with your rating and comment.',
success: 'Thanks for your feedback!'
}
});
// CONCATENATED MODULE: ./src/util/helpers.js
function getNestedValue(obj, path, fallback) {
var last = path.length - 1;
if (last < 0) return obj === undefined ? fallback : obj;
for (var i = 0; i < last; i++) {
if (obj == null) {
return fallback;
}
obj = obj[path[i]];
}
if (obj == null) return fallback;
return obj[path[last]] === undefined ? fallback : obj[path[last]];
}
function getObjectValueByPath(obj, path, fallback) {
if (!path || path.constructor !== String) return fallback;
path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
path = path.replace(/^\./, ''); // strip a leading dot
return getNestedValue(obj, path.split('.'), fallback);
}
// CONCATENATED MODULE: ./src/util/console.js
function createMessage(message, vm, parent) {
if (parent) {
vm = {
_isVue: true,
$parent: parent,
$options: vm
};
}
if (vm) {
// Only show each message once per instance
vm.$_alreadyWarned = vm.$_alreadyWarned || [];
if (vm.$_alreadyWarned.includes(message)) return;
vm.$_alreadyWarned.push(message);
}
return "[MilNode] ".concat(message) + (vm ? generateComponentTrace(vm) : '');
}
function consoleInfo(message, vm, parent) {
var newMessage = createMessage(message, vm, parent);
newMessage != null && console.info(newMessage); // eslint-disable-line no-console
}
function consoleWarn(message, vm, parent) {
var newMessage = createMessage(message, vm, parent);
newMessage != null && console.warn(newMessage); // eslint-disable-line no-console
}
function consoleError(message, vm, parent) {
var newMessage = createMessage(message, vm, parent);
newMessage != null && console.error(newMessage); // eslint-disable-line no-console
}
function deprecate(original, replacement, vm, parent) {
consoleWarn("'".concat(original, "' is deprecated, use '").concat(replacement, "' instead"), vm, parent);
}
var classifyRE = /(?:^|[-_])(\w)/g;
var classify = function classify(str) {
return str.replace(classifyRE, function (c) {
return c.toUpperCase();
}).replace(/[-_]/g, '');
};
function formatComponentName(vm, includeFile) {
if (vm.$root === vm) {
return '<Root>';
}
var options = typeof vm === 'function' && vm.cid != null ? vm.options : vm._isVue ? vm.$options || vm.constructor.options : vm || {};
var name = options.name || options._componentTag;
var file = options.__file;
if (!name && file) {
var match = file.match(/([^/\\]+)\.vue$/);
name = match && match[1];
}
return (name ? "<".concat(classify(name), ">") : "<Anonymous>") + (file && includeFile !== false ? " at ".concat(file) : '');
}
function generateComponentTrace(vm) {
if (vm._isVue && vm.$parent) {
var tree = [];
var currentRecursiveSequence = 0;
while (vm) {
if (tree.length > 0) {
var last = tree[tree.length - 1];
if (last.constructor === vm.constructor) {
currentRecursiveSequence++;
vm = vm.$parent;
continue;
} else if (currentRecursiveSequence > 0) {
tree[tree.length - 1] = [last, currentRecursiveSequence];
currentRecursiveSequence = 0;
}
}
tree.push(vm);
vm = vm.$parent;
}
return '\n\nfound in\n\n' + tree.map(function (vm, i) {
return "".concat(i === 0 ? '---> ' : ' '.repeat(5 + i * 2)).concat(Array.isArray(vm) ? "".concat(formatComponentName(vm[0]), "... (").concat(vm[1], " recursive calls)") : formatComponentName(vm));
}).join('\n');
} else {
return "\n\n(found in ".concat(formatComponentName(vm), ")");
}
}
// CONCATENATED MODULE: ./src/components/MilNode/mixins/lang.js
var LANG_PREFIX = '$milnode.';
var fallback = Symbol('Lang fallback');
function getTranslation(locale, key) {
var usingFallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var shortKey = key.replace(LANG_PREFIX, '');
var translation = getObjectValueByPath(locale, shortKey, fallback);
if (translation === fallback) {
if (usingFallback) {
consoleError("Translation key \"".concat(shortKey, "\" not found in fallback"));
translation = key;
} else {
consoleWarn("Translation key \"".concat(shortKey, "\" not found, falling back to default"));
translation = getTranslation(en, key, true);
}
}
return translation;
}
function lang_lang() {
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return {
locales: Object.assign({
en: en
}, config.locales),
current: config.current || 'en',
t: function t(key) {
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
params[_key - 1] = arguments[_key];
}
if (!key.startsWith(LANG_PREFIX)) return key;
if (config.t) return config.t.apply(config, [key].concat(params));
var translation = getTranslation(this.locales[this.current], key);
return translation.replace(/\{(\d+)\}/g, function (match, index) {
return String(params[+index]);
});
}
};
}
// CONCATENATED MODULE: ./src/components/MilNode/index.js
var MilNode = {
install: function install(Vue) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (this.installed) return;
this.installed = true;
if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a !== Vue) {
consoleError('Multiple instances of Vue detected!');
}
var lang = lang_lang(opts.lang);
Vue.prototype.$milnode = new Vue({
data: {
lang: lang
},
methods: {
t: lang.t.bind(lang)
}
});
function registerComponents(components) {
if (components) {
for (var key in components) {
var component = components[key];
if (component && !registerComponents(component.$_milnode_subcomponents)) {
Vue.component(key, component);
}
}
return true;
}
return false;
}
registerComponents(opts.components);
}
};
/* harmony default export */ var components_MilNode = (MilNode);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules//.cache//vue-loader","cacheIdentifier":"62ddfba7-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!./src/components/BtnDelete.vue?vue&type=template&id=32e52c02&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-tooltip',{attrs:{"bottom":""}},[_c('v-btn',{staticClass:"ma-0 error--text",attrs:{"slot":"activator","aria-label":_vm.$t('Delete'),"disabled":_vm.disabled,"icon":""},on:{"click":function($event){_vm.$emit('click')}},slot:"activator"},[_c('v-icon',[_vm._v("delete")])],1),_c('span',[_vm._v(_vm._s(_vm.$t('Delete')))])],1)}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/components/BtnDelete.vue?vue&type=template&id=32e52c02&
// 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!./src/components/BtnDelete.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var BtnDeletevue_type_script_lang_js_ = ({
props: {
disabled: {
type: Boolean,
default: false
}
}
});
// CONCATENATED MODULE: ./src/components/BtnDelete.vue?vue&type=script&lang=js&
/* harmony default export */ var components_BtnDeletevue_type_script_lang_js_ = (BtnDeletevue_type_script_lang_js_);
// 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: ./src/components/BtnDelete.vue
/* normalize component */
var component = normalizeComponent(
components_BtnDeletevue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
component.options.__file = "BtnDelete.vue"
/* harmony default export */ var BtnDelete = (component.exports);
// CONCATENATED MODULE: ./src/components/index.js
/* harmony default export */ var components = ({
BtnDelete: BtnDelete
});
// CONCATENATED MODULE: ./src/main.js
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var main_MilNode = {
install: function install(Vue, args) {
Vue.use(components_MilNode, _objectSpread({
Components: components
}, args));
}
};
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(main_MilNode);
}
/* harmony default export */ var main = (main_MilNode);
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (main);
/***/ })
/******/ });
//# sourceMappingURL=milnode.common.js.map