diff --git a/dist/js/field.js b/dist/js/field.js index 51581af..8de9517 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,23091 +1 @@ -/******/ (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, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // 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 = 2); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file. -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ -) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.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 = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // 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 - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } -} - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(3); - - -/***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_js_toggle_button__ = __webpack_require__(4); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_js_toggle_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue_js_toggle_button__); - - -Nova.booting(function (Vue, router) { - Vue.use(__WEBPACK_IMPORTED_MODULE_0_vue_js_toggle_button___default.a); - Vue.component('index-nova-toggle', __webpack_require__(9)); - Vue.component('detail-nova-toggle', __webpack_require__(12)); - Vue.component('form-nova-toggle', __webpack_require__(15)); -}); - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(__webpack_require__(5)); - else if(typeof define === 'function' && define.amd) - define(["vue"], factory); - else if(typeof exports === 'object') - exports["vue-js-toggle-button"] = factory(require("vue")); - else - root["vue-js-toggle-button"] = factory(root["vue"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) { -return /******/ (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; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // 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 = "/dist/"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 3); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - -/* styles */ -__webpack_require__(8) - -var Component = __webpack_require__(6)( - /* script */ - __webpack_require__(2), - /* template */ - __webpack_require__(7), - /* scopeId */ - "data-v-25adc6c0", - /* cssModules */ - null -) - -module.exports = Component.exports - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_1__; - -/***/ }), -/* 2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -var constants = { - colorChecked: '#75C791', - colorUnchecked: '#bfcbd9', - cssColors: false, - labelChecked: 'on', - labelUnchecked: 'off', - width: 50, - height: 22, - margin: 3, - switchColor: '#fff' -}; - -var contains = function contains(object, title) { - return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object.hasOwnProperty(title); -}; - -var px = function px(v) { - return v + 'px'; -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - name: 'ToggleButton', - props: { - value: { - type: Boolean, - default: false - }, - disabled: { - type: Boolean, - default: false - }, - name: { - type: String - }, - sync: { - type: Boolean, - default: false - }, - speed: { - type: Number, - default: 300 - }, - color: { - type: [String, Object], - validator: function validator(value) { - return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.checked || value.unchecked : typeof value === 'string'; - } - }, - switchColor: { - type: [String, Object], - validator: function validator(value) { - return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.checked || value.unchecked : typeof value === 'string'; - } - }, - cssColors: { - type: Boolean, - default: false - }, - labels: { - type: [Boolean, Object], - default: false, - validator: function validator(value) { - return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.checked || value.unchecked : typeof value === 'boolean'; - } - }, - height: { - type: Number, - default: constants.height - }, - width: { - type: Number, - default: constants.width - } - }, - computed: { - className: function className() { - var toggled = this.toggled, - disabled = this.disabled; - - - return ['vue-js-switch', { toggled: toggled, disabled: disabled }]; - }, - ariaChecked: function ariaChecked() { - return this.toggled.toString(); - }, - coreStyle: function coreStyle() { - return { - width: px(this.width), - height: px(this.height), - backgroundColor: this.cssColors ? null : this.disabled ? this.colorDisabled : this.colorCurrent, - borderRadius: px(Math.round(this.height / 2)) - }; - }, - buttonRadius: function buttonRadius() { - return this.height - constants.margin * 2; - }, - distance: function distance() { - return px(this.width - this.height + constants.margin); - }, - buttonStyle: function buttonStyle() { - return { - width: px(this.buttonRadius), - height: px(this.buttonRadius), - transition: 'transform ' + this.speed + 'ms', - transform: this.toggled ? 'translate3d(' + this.distance + ', 3px, 0px)' : null, - background: this.switchColor ? this.switchColorCurrent : undefined - }; - }, - labelStyle: function labelStyle() { - return { - lineHeight: px(this.height) - }; - }, - colorChecked: function colorChecked() { - var color = this.color; - - - if ((typeof color === 'undefined' ? 'undefined' : _typeof(color)) !== 'object') { - return color || constants.colorChecked; - } - - return contains(color, 'checked') ? color.checked : constants.colorChecked; - }, - colorUnchecked: function colorUnchecked() { - var color = this.color; - - - return contains(color, 'unchecked') ? color.unchecked : constants.colorUnchecked; - }, - colorDisabled: function colorDisabled() { - var color = this.color; - - - return contains(color, 'disabled') ? color.disabled : this.colorCurrent; - }, - colorCurrent: function colorCurrent() { - return this.toggled ? this.colorChecked : this.colorUnchecked; - }, - labelChecked: function labelChecked() { - return contains(this.labels, 'checked') ? this.labels.checked : constants.labelChecked; - }, - labelUnchecked: function labelUnchecked() { - return contains(this.labels, 'unchecked') ? this.labels.unchecked : constants.labelUnchecked; - }, - switchColorChecked: function switchColorChecked() { - var switchColor = this.switchColor; - - - return contains(switchColor, 'checked') ? switchColor.checked : constants.switchColor; - }, - switchColorUnchecked: function switchColorUnchecked() { - var switchColor = this.switchColor; - - - return contains(switchColor, 'unchecked') ? switchColor.unchecked : constants.switchColor; - }, - switchColorCurrent: function switchColorCurrent() { - var switchColor = this.switchColor; - - - if ((typeof switchColor === 'undefined' ? 'undefined' : _typeof(switchColor)) !== 'object') { - return switchColor || constants.switchColor; - } - - return this.toggled ? this.switchColorChecked : this.switchColorUnchecked; - } - }, - watch: { - value: function value(_value) { - if (this.sync) { - this.toggled = !!_value; - } - } - }, - data: function data() { - return { - toggled: !!this.value - }; - }, - - methods: { - toggle: function toggle(event) { - this.toggled = !this.toggled; - this.$emit('input', this.toggled); - this.$emit('change', { - value: this.toggled, - srcEvent: event - }); - } - } -}); - -/***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Button_vue__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Button_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Button_vue__); - - - -var plugin = { - install: function install(Vue, options) { - Vue.component('ToggleButton', __WEBPACK_IMPORTED_MODULE_1__Button_vue___default.a); - } -}; - -/* harmony default export */ __webpack_exports__["default"] = (plugin); - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__(5)(); -// imports - - -// module -exports.push([module.i, ".vue-js-switch[data-v-25adc6c0]{display:inline-block;position:relative;overflow:hidden;vertical-align:middle;user-select:none;font-size:10px;cursor:pointer}.vue-js-switch .v-switch-input[data-v-25adc6c0]{display:none}.vue-js-switch .v-switch-label[data-v-25adc6c0]{position:absolute;top:0;font-weight:600;color:#fff}.vue-js-switch .v-switch-label.v-left[data-v-25adc6c0]{left:10px}.vue-js-switch .v-switch-label.v-right[data-v-25adc6c0]{right:10px}.vue-js-switch .v-switch-core[data-v-25adc6c0]{display:block;position:relative;box-sizing:border-box;outline:0;margin:0;transition:border-color .3s,background-color .3s;user-select:none}.vue-js-switch .v-switch-core .v-switch-button[data-v-25adc6c0]{display:block;position:absolute;overflow:hidden;top:0;left:0;transform:translate3d(3px,3px,0);border-radius:100%;background-color:#fff}.vue-js-switch.disabled[data-v-25adc6c0]{pointer-events:none;opacity:.6}", ""]); - -// exports - - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -module.exports = function() { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - var result = []; - for(var i = 0; i < this.length; i++) { - var item = this[i]; - if(item[2]) { - result.push("@media " + item[2] + "{" + item[1] + "}"); - } else { - result.push(item[1]); - } - } - return result.join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; -}; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -// this module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle - -module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - scopeId, - cssModules -) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - // inject cssModules - if (cssModules) { - var computed = Object.create(options.computed || null) - Object.keys(cssModules).forEach(function (key) { - var module = cssModules[key] - computed[key] = function () { return module } - }) - options.computed = computed - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } -} - - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('label', { - class: _vm.className, - attrs: { - "role": "checkbox", - "aria-checked": _vm.ariaChecked - } - }, [_c('input', { - staticClass: "v-switch-input", - attrs: { - "type": "checkbox", - "name": _vm.name - }, - on: { - "change": function($event) { - $event.stopPropagation(); - return _vm.toggle($event) - } - } - }), _vm._v(" "), _c('div', { - staticClass: "v-switch-core", - style: (_vm.coreStyle) - }, [_c('div', { - staticClass: "v-switch-button", - style: (_vm.buttonStyle) - })]), _vm._v(" "), (_vm.labels) ? [(_vm.toggled) ? _c('span', { - staticClass: "v-switch-label v-left", - style: (_vm.labelStyle), - domProps: { - "innerHTML": _vm._s(_vm.labelChecked) - } - }) : _c('span', { - staticClass: "v-switch-label v-right", - style: (_vm.labelStyle), - domProps: { - "innerHTML": _vm._s(_vm.labelUnchecked) - } - })] : _vm._e()], 2) -},staticRenderFns: []} - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -// style-loader: Adds some css to the DOM by adding a