mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-17 06:20:29 +00:00
17458 lines
No EOL
486 KiB
JavaScript
17458 lines
No EOL
486 KiB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
|
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
module.exports = factory();
|
|
else if(typeof define === 'function' && define.amd)
|
|
define([], factory);
|
|
else if(typeof exports === 'object')
|
|
exports["VueMaterial"] = factory();
|
|
else
|
|
root["VueMaterial"] = factory();
|
|
})(this, function() {
|
|
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] = {
|
|
/******/ exports: {},
|
|
/******/ id: moduleId,
|
|
/******/ loaded: false
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.loaded = 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;
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/";
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(0);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ([
|
|
/* 0 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = __webpack_require__(253);
|
|
|
|
|
|
/***/ },
|
|
/* 1 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdAvatar = __webpack_require__(2);
|
|
|
|
var _mdAvatar2 = _interopRequireDefault(_mdAvatar);
|
|
|
|
var _mdAvatar3 = __webpack_require__(10);
|
|
|
|
var _mdAvatar4 = _interopRequireDefault(_mdAvatar3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-avatar', Vue.extend(_mdAvatar2.default));
|
|
|
|
Vue.material.styles.push(_mdAvatar4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 2 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(3)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(5)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(9)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdAvatar/mdAvatar.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-1cbfca0d", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-1cbfca0d", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdAvatar.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 3 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 4 */
|
|
/***/ 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;
|
|
};
|
|
|
|
|
|
/***/ },
|
|
/* 5 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_mixin2.default]
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 6 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _vue = __webpack_require__(7);
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdTheme: String
|
|
},
|
|
data: function data() {
|
|
return {
|
|
closestThemedParent: false
|
|
};
|
|
},
|
|
methods: {
|
|
getClosestThemedParent: function getClosestThemedParent($parent) {
|
|
if (!$parent || !$parent.$el || $parent._uid === 0) {
|
|
return false;
|
|
}
|
|
|
|
if ($parent.mdTheme || $parent.mdName) {
|
|
return $parent;
|
|
}
|
|
|
|
return this.getClosestThemedParent($parent.$parent);
|
|
}
|
|
},
|
|
computed: {
|
|
themeClass: function themeClass() {
|
|
if (this.mdTheme) {
|
|
return 'md-theme-' + this.mdTheme;
|
|
}
|
|
|
|
var theme = this.closestThemedParent.mdTheme;
|
|
|
|
if (!theme) {
|
|
theme = this.closestThemedParent.mdName;
|
|
}
|
|
|
|
return 'md-theme-' + (theme || _vue2.default.material.currentTheme);
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.closestThemedParent = this.getClosestThemedParent(this.$parent);
|
|
|
|
if (!_vue2.default.material.currentTheme) {
|
|
_vue2.default.material.setCurrentTheme('default');
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 7 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(process, global) {/*!
|
|
* Vue.js v2.1.6
|
|
* (c) 2014-2016 Evan You
|
|
* Released under the MIT License.
|
|
*/
|
|
'use strict';
|
|
|
|
/* */
|
|
|
|
/**
|
|
* Convert a value to a string that is actually rendered.
|
|
*/
|
|
function _toString (val) {
|
|
return val == null
|
|
? ''
|
|
: typeof val === 'object'
|
|
? JSON.stringify(val, null, 2)
|
|
: String(val)
|
|
}
|
|
|
|
/**
|
|
* Convert a input value to a number for persistence.
|
|
* If the conversion fails, return original string.
|
|
*/
|
|
function toNumber (val) {
|
|
var n = parseFloat(val, 10);
|
|
return (n || n === 0) ? n : val
|
|
}
|
|
|
|
/**
|
|
* Make a map and return a function for checking if a key
|
|
* is in that map.
|
|
*/
|
|
function makeMap (
|
|
str,
|
|
expectsLowerCase
|
|
) {
|
|
var map = Object.create(null);
|
|
var list = str.split(',');
|
|
for (var i = 0; i < list.length; i++) {
|
|
map[list[i]] = true;
|
|
}
|
|
return expectsLowerCase
|
|
? function (val) { return map[val.toLowerCase()]; }
|
|
: function (val) { return map[val]; }
|
|
}
|
|
|
|
/**
|
|
* Check if a tag is a built-in tag.
|
|
*/
|
|
var isBuiltInTag = makeMap('slot,component', true);
|
|
|
|
/**
|
|
* Remove an item from an array
|
|
*/
|
|
function remove$1 (arr, item) {
|
|
if (arr.length) {
|
|
var index = arr.indexOf(item);
|
|
if (index > -1) {
|
|
return arr.splice(index, 1)
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Check whether the object has the property.
|
|
*/
|
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
function hasOwn (obj, key) {
|
|
return hasOwnProperty.call(obj, key)
|
|
}
|
|
|
|
/**
|
|
* Check if value is primitive
|
|
*/
|
|
function isPrimitive (value) {
|
|
return typeof value === 'string' || typeof value === 'number'
|
|
}
|
|
|
|
/**
|
|
* Create a cached version of a pure function.
|
|
*/
|
|
function cached (fn) {
|
|
var cache = Object.create(null);
|
|
return function cachedFn (str) {
|
|
var hit = cache[str];
|
|
return hit || (cache[str] = fn(str))
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Camelize a hyphen-delmited string.
|
|
*/
|
|
var camelizeRE = /-(\w)/g;
|
|
var camelize = cached(function (str) {
|
|
return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
|
|
});
|
|
|
|
/**
|
|
* Capitalize a string.
|
|
*/
|
|
var capitalize = cached(function (str) {
|
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
});
|
|
|
|
/**
|
|
* Hyphenate a camelCase string.
|
|
*/
|
|
var hyphenateRE = /([^-])([A-Z])/g;
|
|
var hyphenate = cached(function (str) {
|
|
return str
|
|
.replace(hyphenateRE, '$1-$2')
|
|
.replace(hyphenateRE, '$1-$2')
|
|
.toLowerCase()
|
|
});
|
|
|
|
/**
|
|
* Simple bind, faster than native
|
|
*/
|
|
function bind$1 (fn, ctx) {
|
|
function boundFn (a) {
|
|
var l = arguments.length;
|
|
return l
|
|
? l > 1
|
|
? fn.apply(ctx, arguments)
|
|
: fn.call(ctx, a)
|
|
: fn.call(ctx)
|
|
}
|
|
// record original fn length
|
|
boundFn._length = fn.length;
|
|
return boundFn
|
|
}
|
|
|
|
/**
|
|
* Convert an Array-like object to a real Array.
|
|
*/
|
|
function toArray (list, start) {
|
|
start = start || 0;
|
|
var i = list.length - start;
|
|
var ret = new Array(i);
|
|
while (i--) {
|
|
ret[i] = list[i + start];
|
|
}
|
|
return ret
|
|
}
|
|
|
|
/**
|
|
* Mix properties into target object.
|
|
*/
|
|
function extend (to, _from) {
|
|
for (var key in _from) {
|
|
to[key] = _from[key];
|
|
}
|
|
return to
|
|
}
|
|
|
|
/**
|
|
* Quick object check - this is primarily used to tell
|
|
* Objects from primitive values when we know the value
|
|
* is a JSON-compliant type.
|
|
*/
|
|
function isObject (obj) {
|
|
return obj !== null && typeof obj === 'object'
|
|
}
|
|
|
|
/**
|
|
* Strict object type check. Only returns true
|
|
* for plain JavaScript objects.
|
|
*/
|
|
var toString = Object.prototype.toString;
|
|
var OBJECT_STRING = '[object Object]';
|
|
function isPlainObject (obj) {
|
|
return toString.call(obj) === OBJECT_STRING
|
|
}
|
|
|
|
/**
|
|
* Merge an Array of Objects into a single Object.
|
|
*/
|
|
function toObject (arr) {
|
|
var res = {};
|
|
for (var i = 0; i < arr.length; i++) {
|
|
if (arr[i]) {
|
|
extend(res, arr[i]);
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
/**
|
|
* Perform no operation.
|
|
*/
|
|
function noop () {}
|
|
|
|
/**
|
|
* Always return false.
|
|
*/
|
|
var no = function () { return false; };
|
|
|
|
/**
|
|
* Return same value
|
|
*/
|
|
var identity = function (_) { return _; };
|
|
|
|
/**
|
|
* Generate a static keys string from compiler modules.
|
|
*/
|
|
function genStaticKeys (modules) {
|
|
return modules.reduce(function (keys, m) {
|
|
return keys.concat(m.staticKeys || [])
|
|
}, []).join(',')
|
|
}
|
|
|
|
/**
|
|
* Check if two values are loosely equal - that is,
|
|
* if they are plain objects, do they have the same shape?
|
|
*/
|
|
function looseEqual (a, b) {
|
|
/* eslint-disable eqeqeq */
|
|
return a == b || (
|
|
isObject(a) && isObject(b)
|
|
? JSON.stringify(a) === JSON.stringify(b)
|
|
: false
|
|
)
|
|
/* eslint-enable eqeqeq */
|
|
}
|
|
|
|
function looseIndexOf (arr, val) {
|
|
for (var i = 0; i < arr.length; i++) {
|
|
if (looseEqual(arr[i], val)) { return i }
|
|
}
|
|
return -1
|
|
}
|
|
|
|
/* */
|
|
|
|
var config = {
|
|
/**
|
|
* Option merge strategies (used in core/util/options)
|
|
*/
|
|
optionMergeStrategies: Object.create(null),
|
|
|
|
/**
|
|
* Whether to suppress warnings.
|
|
*/
|
|
silent: false,
|
|
|
|
/**
|
|
* Whether to enable devtools
|
|
*/
|
|
devtools: process.env.NODE_ENV !== 'production',
|
|
|
|
/**
|
|
* Error handler for watcher errors
|
|
*/
|
|
errorHandler: null,
|
|
|
|
/**
|
|
* Ignore certain custom elements
|
|
*/
|
|
ignoredElements: null,
|
|
|
|
/**
|
|
* Custom user key aliases for v-on
|
|
*/
|
|
keyCodes: Object.create(null),
|
|
|
|
/**
|
|
* Check if a tag is reserved so that it cannot be registered as a
|
|
* component. This is platform-dependent and may be overwritten.
|
|
*/
|
|
isReservedTag: no,
|
|
|
|
/**
|
|
* Check if a tag is an unknown element.
|
|
* Platform-dependent.
|
|
*/
|
|
isUnknownElement: no,
|
|
|
|
/**
|
|
* Get the namespace of an element
|
|
*/
|
|
getTagNamespace: noop,
|
|
|
|
/**
|
|
* Parse the real tag name for the specific platform.
|
|
*/
|
|
parsePlatformTagName: identity,
|
|
|
|
/**
|
|
* Check if an attribute must be bound using property, e.g. value
|
|
* Platform-dependent.
|
|
*/
|
|
mustUseProp: no,
|
|
|
|
/**
|
|
* List of asset types that a component can own.
|
|
*/
|
|
_assetTypes: [
|
|
'component',
|
|
'directive',
|
|
'filter'
|
|
],
|
|
|
|
/**
|
|
* List of lifecycle hooks.
|
|
*/
|
|
_lifecycleHooks: [
|
|
'beforeCreate',
|
|
'created',
|
|
'beforeMount',
|
|
'mounted',
|
|
'beforeUpdate',
|
|
'updated',
|
|
'beforeDestroy',
|
|
'destroyed',
|
|
'activated',
|
|
'deactivated'
|
|
],
|
|
|
|
/**
|
|
* Max circular updates allowed in a scheduler flush cycle.
|
|
*/
|
|
_maxUpdateCount: 100
|
|
};
|
|
|
|
/* */
|
|
|
|
/**
|
|
* Check if a string starts with $ or _
|
|
*/
|
|
function isReserved (str) {
|
|
var c = (str + '').charCodeAt(0);
|
|
return c === 0x24 || c === 0x5F
|
|
}
|
|
|
|
/**
|
|
* Define a property.
|
|
*/
|
|
function def (obj, key, val, enumerable) {
|
|
Object.defineProperty(obj, key, {
|
|
value: val,
|
|
enumerable: !!enumerable,
|
|
writable: true,
|
|
configurable: true
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Parse simple path.
|
|
*/
|
|
var bailRE = /[^\w.$]/;
|
|
function parsePath (path) {
|
|
if (bailRE.test(path)) {
|
|
return
|
|
} else {
|
|
var segments = path.split('.');
|
|
return function (obj) {
|
|
for (var i = 0; i < segments.length; i++) {
|
|
if (!obj) { return }
|
|
obj = obj[segments[i]];
|
|
}
|
|
return obj
|
|
}
|
|
}
|
|
}
|
|
|
|
/* */
|
|
/* globals MutationObserver */
|
|
|
|
// can we use __proto__?
|
|
var hasProto = '__proto__' in {};
|
|
|
|
// Browser environment sniffing
|
|
var inBrowser = typeof window !== 'undefined';
|
|
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
|
var isIE = UA && /msie|trident/.test(UA);
|
|
var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
|
var isEdge = UA && UA.indexOf('edge/') > 0;
|
|
var isAndroid = UA && UA.indexOf('android') > 0;
|
|
var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
|
|
|
|
// this needs to be lazy-evaled because vue may be required before
|
|
// vue-server-renderer can set VUE_ENV
|
|
var _isServer;
|
|
var isServerRendering = function () {
|
|
if (_isServer === undefined) {
|
|
/* istanbul ignore if */
|
|
if (!inBrowser && typeof global !== 'undefined') {
|
|
// detect presence of vue-server-renderer and avoid
|
|
// Webpack shimming the process
|
|
_isServer = global['process'].env.VUE_ENV === 'server';
|
|
} else {
|
|
_isServer = false;
|
|
}
|
|
}
|
|
return _isServer
|
|
};
|
|
|
|
// detect devtools
|
|
var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
|
|
/* istanbul ignore next */
|
|
function isNative (Ctor) {
|
|
return /native code/.test(Ctor.toString())
|
|
}
|
|
|
|
/**
|
|
* Defer a task to execute it asynchronously.
|
|
*/
|
|
var nextTick = (function () {
|
|
var callbacks = [];
|
|
var pending = false;
|
|
var timerFunc;
|
|
|
|
function nextTickHandler () {
|
|
pending = false;
|
|
var copies = callbacks.slice(0);
|
|
callbacks.length = 0;
|
|
for (var i = 0; i < copies.length; i++) {
|
|
copies[i]();
|
|
}
|
|
}
|
|
|
|
// the nextTick behavior leverages the microtask queue, which can be accessed
|
|
// via either native Promise.then or MutationObserver.
|
|
// MutationObserver has wider support, however it is seriously bugged in
|
|
// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
|
|
// completely stops working after triggering a few times... so, if native
|
|
// Promise is available, we will use it:
|
|
/* istanbul ignore if */
|
|
if (typeof Promise !== 'undefined' && isNative(Promise)) {
|
|
var p = Promise.resolve();
|
|
var logError = function (err) { console.error(err); };
|
|
timerFunc = function () {
|
|
p.then(nextTickHandler).catch(logError);
|
|
// in problematic UIWebViews, Promise.then doesn't completely break, but
|
|
// it can get stuck in a weird state where callbacks are pushed into the
|
|
// microtask queue but the queue isn't being flushed, until the browser
|
|
// needs to do some other work, e.g. handle a timer. Therefore we can
|
|
// "force" the microtask queue to be flushed by adding an empty timer.
|
|
if (isIOS) { setTimeout(noop); }
|
|
};
|
|
} else if (typeof MutationObserver !== 'undefined' && (
|
|
isNative(MutationObserver) ||
|
|
// PhantomJS and iOS 7.x
|
|
MutationObserver.toString() === '[object MutationObserverConstructor]'
|
|
)) {
|
|
// use MutationObserver where native Promise is not available,
|
|
// e.g. PhantomJS IE11, iOS7, Android 4.4
|
|
var counter = 1;
|
|
var observer = new MutationObserver(nextTickHandler);
|
|
var textNode = document.createTextNode(String(counter));
|
|
observer.observe(textNode, {
|
|
characterData: true
|
|
});
|
|
timerFunc = function () {
|
|
counter = (counter + 1) % 2;
|
|
textNode.data = String(counter);
|
|
};
|
|
} else {
|
|
// fallback to setTimeout
|
|
/* istanbul ignore next */
|
|
timerFunc = function () {
|
|
setTimeout(nextTickHandler, 0);
|
|
};
|
|
}
|
|
|
|
return function queueNextTick (cb, ctx) {
|
|
var _resolve;
|
|
callbacks.push(function () {
|
|
if (cb) { cb.call(ctx); }
|
|
if (_resolve) { _resolve(ctx); }
|
|
});
|
|
if (!pending) {
|
|
pending = true;
|
|
timerFunc();
|
|
}
|
|
if (!cb && typeof Promise !== 'undefined') {
|
|
return new Promise(function (resolve) {
|
|
_resolve = resolve;
|
|
})
|
|
}
|
|
}
|
|
})();
|
|
|
|
var _Set;
|
|
/* istanbul ignore if */
|
|
if (typeof Set !== 'undefined' && isNative(Set)) {
|
|
// use native Set when available.
|
|
_Set = Set;
|
|
} else {
|
|
// a non-standard Set polyfill that only works with primitive keys.
|
|
_Set = (function () {
|
|
function Set () {
|
|
this.set = Object.create(null);
|
|
}
|
|
Set.prototype.has = function has (key) {
|
|
return this.set[key] === true
|
|
};
|
|
Set.prototype.add = function add (key) {
|
|
this.set[key] = true;
|
|
};
|
|
Set.prototype.clear = function clear () {
|
|
this.set = Object.create(null);
|
|
};
|
|
|
|
return Set;
|
|
}());
|
|
}
|
|
|
|
var warn = noop;
|
|
var formatComponentName;
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
var hasConsole = typeof console !== 'undefined';
|
|
|
|
warn = function (msg, vm) {
|
|
if (hasConsole && (!config.silent)) {
|
|
console.error("[Vue warn]: " + msg + " " + (
|
|
vm ? formatLocation(formatComponentName(vm)) : ''
|
|
));
|
|
}
|
|
};
|
|
|
|
formatComponentName = function (vm) {
|
|
if (vm.$root === vm) {
|
|
return 'root instance'
|
|
}
|
|
var name = vm._isVue
|
|
? vm.$options.name || vm.$options._componentTag
|
|
: vm.name;
|
|
return (
|
|
(name ? ("component <" + name + ">") : "anonymous component") +
|
|
(vm._isVue && vm.$options.__file ? (" at " + (vm.$options.__file)) : '')
|
|
)
|
|
};
|
|
|
|
var formatLocation = function (str) {
|
|
if (str === 'anonymous component') {
|
|
str += " - use the \"name\" option for better debugging messages.";
|
|
}
|
|
return ("\n(found in " + str + ")")
|
|
};
|
|
}
|
|
|
|
/* */
|
|
|
|
|
|
var uid$1 = 0;
|
|
|
|
/**
|
|
* A dep is an observable that can have multiple
|
|
* directives subscribing to it.
|
|
*/
|
|
var Dep = function Dep () {
|
|
this.id = uid$1++;
|
|
this.subs = [];
|
|
};
|
|
|
|
Dep.prototype.addSub = function addSub (sub) {
|
|
this.subs.push(sub);
|
|
};
|
|
|
|
Dep.prototype.removeSub = function removeSub (sub) {
|
|
remove$1(this.subs, sub);
|
|
};
|
|
|
|
Dep.prototype.depend = function depend () {
|
|
if (Dep.target) {
|
|
Dep.target.addDep(this);
|
|
}
|
|
};
|
|
|
|
Dep.prototype.notify = function notify () {
|
|
// stablize the subscriber list first
|
|
var subs = this.subs.slice();
|
|
for (var i = 0, l = subs.length; i < l; i++) {
|
|
subs[i].update();
|
|
}
|
|
};
|
|
|
|
// the current target watcher being evaluated.
|
|
// this is globally unique because there could be only one
|
|
// watcher being evaluated at any time.
|
|
Dep.target = null;
|
|
var targetStack = [];
|
|
|
|
function pushTarget (_target) {
|
|
if (Dep.target) { targetStack.push(Dep.target); }
|
|
Dep.target = _target;
|
|
}
|
|
|
|
function popTarget () {
|
|
Dep.target = targetStack.pop();
|
|
}
|
|
|
|
/*
|
|
* not type checking this file because flow doesn't play well with
|
|
* dynamically accessing methods on Array prototype
|
|
*/
|
|
|
|
var arrayProto = Array.prototype;
|
|
var arrayMethods = Object.create(arrayProto);[
|
|
'push',
|
|
'pop',
|
|
'shift',
|
|
'unshift',
|
|
'splice',
|
|
'sort',
|
|
'reverse'
|
|
]
|
|
.forEach(function (method) {
|
|
// cache original method
|
|
var original = arrayProto[method];
|
|
def(arrayMethods, method, function mutator () {
|
|
var arguments$1 = arguments;
|
|
|
|
// avoid leaking arguments:
|
|
// http://jsperf.com/closure-with-arguments
|
|
var i = arguments.length;
|
|
var args = new Array(i);
|
|
while (i--) {
|
|
args[i] = arguments$1[i];
|
|
}
|
|
var result = original.apply(this, args);
|
|
var ob = this.__ob__;
|
|
var inserted;
|
|
switch (method) {
|
|
case 'push':
|
|
inserted = args;
|
|
break
|
|
case 'unshift':
|
|
inserted = args;
|
|
break
|
|
case 'splice':
|
|
inserted = args.slice(2);
|
|
break
|
|
}
|
|
if (inserted) { ob.observeArray(inserted); }
|
|
// notify change
|
|
ob.dep.notify();
|
|
return result
|
|
});
|
|
});
|
|
|
|
/* */
|
|
|
|
var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
|
|
|
|
/**
|
|
* By default, when a reactive property is set, the new value is
|
|
* also converted to become reactive. However when passing down props,
|
|
* we don't want to force conversion because the value may be a nested value
|
|
* under a frozen data structure. Converting it would defeat the optimization.
|
|
*/
|
|
var observerState = {
|
|
shouldConvert: true,
|
|
isSettingProps: false
|
|
};
|
|
|
|
/**
|
|
* Observer class that are attached to each observed
|
|
* object. Once attached, the observer converts target
|
|
* object's property keys into getter/setters that
|
|
* collect dependencies and dispatches updates.
|
|
*/
|
|
var Observer = function Observer (value) {
|
|
this.value = value;
|
|
this.dep = new Dep();
|
|
this.vmCount = 0;
|
|
def(value, '__ob__', this);
|
|
if (Array.isArray(value)) {
|
|
var augment = hasProto
|
|
? protoAugment
|
|
: copyAugment;
|
|
augment(value, arrayMethods, arrayKeys);
|
|
this.observeArray(value);
|
|
} else {
|
|
this.walk(value);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Walk through each property and convert them into
|
|
* getter/setters. This method should only be called when
|
|
* value type is Object.
|
|
*/
|
|
Observer.prototype.walk = function walk (obj) {
|
|
var keys = Object.keys(obj);
|
|
for (var i = 0; i < keys.length; i++) {
|
|
defineReactive$$1(obj, keys[i], obj[keys[i]]);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Observe a list of Array items.
|
|
*/
|
|
Observer.prototype.observeArray = function observeArray (items) {
|
|
for (var i = 0, l = items.length; i < l; i++) {
|
|
observe(items[i]);
|
|
}
|
|
};
|
|
|
|
// helpers
|
|
|
|
/**
|
|
* Augment an target Object or Array by intercepting
|
|
* the prototype chain using __proto__
|
|
*/
|
|
function protoAugment (target, src) {
|
|
/* eslint-disable no-proto */
|
|
target.__proto__ = src;
|
|
/* eslint-enable no-proto */
|
|
}
|
|
|
|
/**
|
|
* Augment an target Object or Array by defining
|
|
* hidden properties.
|
|
*/
|
|
/* istanbul ignore next */
|
|
function copyAugment (target, src, keys) {
|
|
for (var i = 0, l = keys.length; i < l; i++) {
|
|
var key = keys[i];
|
|
def(target, key, src[key]);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Attempt to create an observer instance for a value,
|
|
* returns the new observer if successfully observed,
|
|
* or the existing observer if the value already has one.
|
|
*/
|
|
function observe (value) {
|
|
if (!isObject(value)) {
|
|
return
|
|
}
|
|
var ob;
|
|
if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
|
|
ob = value.__ob__;
|
|
} else if (
|
|
observerState.shouldConvert &&
|
|
!isServerRendering() &&
|
|
(Array.isArray(value) || isPlainObject(value)) &&
|
|
Object.isExtensible(value) &&
|
|
!value._isVue
|
|
) {
|
|
ob = new Observer(value);
|
|
}
|
|
return ob
|
|
}
|
|
|
|
/**
|
|
* Define a reactive property on an Object.
|
|
*/
|
|
function defineReactive$$1 (
|
|
obj,
|
|
key,
|
|
val,
|
|
customSetter
|
|
) {
|
|
var dep = new Dep();
|
|
|
|
var property = Object.getOwnPropertyDescriptor(obj, key);
|
|
if (property && property.configurable === false) {
|
|
return
|
|
}
|
|
|
|
// cater for pre-defined getter/setters
|
|
var getter = property && property.get;
|
|
var setter = property && property.set;
|
|
|
|
var childOb = observe(val);
|
|
Object.defineProperty(obj, key, {
|
|
enumerable: true,
|
|
configurable: true,
|
|
get: function reactiveGetter () {
|
|
var value = getter ? getter.call(obj) : val;
|
|
if (Dep.target) {
|
|
dep.depend();
|
|
if (childOb) {
|
|
childOb.dep.depend();
|
|
}
|
|
if (Array.isArray(value)) {
|
|
dependArray(value);
|
|
}
|
|
}
|
|
return value
|
|
},
|
|
set: function reactiveSetter (newVal) {
|
|
var value = getter ? getter.call(obj) : val;
|
|
/* eslint-disable no-self-compare */
|
|
if (newVal === value || (newVal !== newVal && value !== value)) {
|
|
return
|
|
}
|
|
/* eslint-enable no-self-compare */
|
|
if (process.env.NODE_ENV !== 'production' && customSetter) {
|
|
customSetter();
|
|
}
|
|
if (setter) {
|
|
setter.call(obj, newVal);
|
|
} else {
|
|
val = newVal;
|
|
}
|
|
childOb = observe(newVal);
|
|
dep.notify();
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Set a property on an object. Adds the new property and
|
|
* triggers change notification if the property doesn't
|
|
* already exist.
|
|
*/
|
|
function set$1 (obj, key, val) {
|
|
if (Array.isArray(obj)) {
|
|
obj.length = Math.max(obj.length, key);
|
|
obj.splice(key, 1, val);
|
|
return val
|
|
}
|
|
if (hasOwn(obj, key)) {
|
|
obj[key] = val;
|
|
return
|
|
}
|
|
var ob = obj.__ob__;
|
|
if (obj._isVue || (ob && ob.vmCount)) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'Avoid adding reactive properties to a Vue instance or its root $data ' +
|
|
'at runtime - declare it upfront in the data option.'
|
|
);
|
|
return
|
|
}
|
|
if (!ob) {
|
|
obj[key] = val;
|
|
return
|
|
}
|
|
defineReactive$$1(ob.value, key, val);
|
|
ob.dep.notify();
|
|
return val
|
|
}
|
|
|
|
/**
|
|
* Delete a property and trigger change if necessary.
|
|
*/
|
|
function del (obj, key) {
|
|
var ob = obj.__ob__;
|
|
if (obj._isVue || (ob && ob.vmCount)) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'Avoid deleting properties on a Vue instance or its root $data ' +
|
|
'- just set it to null.'
|
|
);
|
|
return
|
|
}
|
|
if (!hasOwn(obj, key)) {
|
|
return
|
|
}
|
|
delete obj[key];
|
|
if (!ob) {
|
|
return
|
|
}
|
|
ob.dep.notify();
|
|
}
|
|
|
|
/**
|
|
* Collect dependencies on array elements when the array is touched, since
|
|
* we cannot intercept array element access like property getters.
|
|
*/
|
|
function dependArray (value) {
|
|
for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
|
|
e = value[i];
|
|
e && e.__ob__ && e.__ob__.dep.depend();
|
|
if (Array.isArray(e)) {
|
|
dependArray(e);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
/**
|
|
* Option overwriting strategies are functions that handle
|
|
* how to merge a parent option value and a child option
|
|
* value into the final value.
|
|
*/
|
|
var strats = config.optionMergeStrategies;
|
|
|
|
/**
|
|
* Options with restrictions
|
|
*/
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
strats.el = strats.propsData = function (parent, child, vm, key) {
|
|
if (!vm) {
|
|
warn(
|
|
"option \"" + key + "\" can only be used during instance " +
|
|
'creation with the `new` keyword.'
|
|
);
|
|
}
|
|
return defaultStrat(parent, child)
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Helper that recursively merges two data objects together.
|
|
*/
|
|
function mergeData (to, from) {
|
|
if (!from) { return to }
|
|
var key, toVal, fromVal;
|
|
var keys = Object.keys(from);
|
|
for (var i = 0; i < keys.length; i++) {
|
|
key = keys[i];
|
|
toVal = to[key];
|
|
fromVal = from[key];
|
|
if (!hasOwn(to, key)) {
|
|
set$1(to, key, fromVal);
|
|
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
|
|
mergeData(toVal, fromVal);
|
|
}
|
|
}
|
|
return to
|
|
}
|
|
|
|
/**
|
|
* Data
|
|
*/
|
|
strats.data = function (
|
|
parentVal,
|
|
childVal,
|
|
vm
|
|
) {
|
|
if (!vm) {
|
|
// in a Vue.extend merge, both should be functions
|
|
if (!childVal) {
|
|
return parentVal
|
|
}
|
|
if (typeof childVal !== 'function') {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'The "data" option should be a function ' +
|
|
'that returns a per-instance value in component ' +
|
|
'definitions.',
|
|
vm
|
|
);
|
|
return parentVal
|
|
}
|
|
if (!parentVal) {
|
|
return childVal
|
|
}
|
|
// when parentVal & childVal are both present,
|
|
// we need to return a function that returns the
|
|
// merged result of both functions... no need to
|
|
// check if parentVal is a function here because
|
|
// it has to be a function to pass previous merges.
|
|
return function mergedDataFn () {
|
|
return mergeData(
|
|
childVal.call(this),
|
|
parentVal.call(this)
|
|
)
|
|
}
|
|
} else if (parentVal || childVal) {
|
|
return function mergedInstanceDataFn () {
|
|
// instance merge
|
|
var instanceData = typeof childVal === 'function'
|
|
? childVal.call(vm)
|
|
: childVal;
|
|
var defaultData = typeof parentVal === 'function'
|
|
? parentVal.call(vm)
|
|
: undefined;
|
|
if (instanceData) {
|
|
return mergeData(instanceData, defaultData)
|
|
} else {
|
|
return defaultData
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Hooks and param attributes are merged as arrays.
|
|
*/
|
|
function mergeHook (
|
|
parentVal,
|
|
childVal
|
|
) {
|
|
return childVal
|
|
? parentVal
|
|
? parentVal.concat(childVal)
|
|
: Array.isArray(childVal)
|
|
? childVal
|
|
: [childVal]
|
|
: parentVal
|
|
}
|
|
|
|
config._lifecycleHooks.forEach(function (hook) {
|
|
strats[hook] = mergeHook;
|
|
});
|
|
|
|
/**
|
|
* Assets
|
|
*
|
|
* When a vm is present (instance creation), we need to do
|
|
* a three-way merge between constructor options, instance
|
|
* options and parent options.
|
|
*/
|
|
function mergeAssets (parentVal, childVal) {
|
|
var res = Object.create(parentVal || null);
|
|
return childVal
|
|
? extend(res, childVal)
|
|
: res
|
|
}
|
|
|
|
config._assetTypes.forEach(function (type) {
|
|
strats[type + 's'] = mergeAssets;
|
|
});
|
|
|
|
/**
|
|
* Watchers.
|
|
*
|
|
* Watchers hashes should not overwrite one
|
|
* another, so we merge them as arrays.
|
|
*/
|
|
strats.watch = function (parentVal, childVal) {
|
|
/* istanbul ignore if */
|
|
if (!childVal) { return parentVal }
|
|
if (!parentVal) { return childVal }
|
|
var ret = {};
|
|
extend(ret, parentVal);
|
|
for (var key in childVal) {
|
|
var parent = ret[key];
|
|
var child = childVal[key];
|
|
if (parent && !Array.isArray(parent)) {
|
|
parent = [parent];
|
|
}
|
|
ret[key] = parent
|
|
? parent.concat(child)
|
|
: [child];
|
|
}
|
|
return ret
|
|
};
|
|
|
|
/**
|
|
* Other object hashes.
|
|
*/
|
|
strats.props =
|
|
strats.methods =
|
|
strats.computed = function (parentVal, childVal) {
|
|
if (!childVal) { return parentVal }
|
|
if (!parentVal) { return childVal }
|
|
var ret = Object.create(null);
|
|
extend(ret, parentVal);
|
|
extend(ret, childVal);
|
|
return ret
|
|
};
|
|
|
|
/**
|
|
* Default strategy.
|
|
*/
|
|
var defaultStrat = function (parentVal, childVal) {
|
|
return childVal === undefined
|
|
? parentVal
|
|
: childVal
|
|
};
|
|
|
|
/**
|
|
* Validate component names
|
|
*/
|
|
function checkComponents (options) {
|
|
for (var key in options.components) {
|
|
var lower = key.toLowerCase();
|
|
if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
|
|
warn(
|
|
'Do not use built-in or reserved HTML elements as component ' +
|
|
'id: ' + key
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Ensure all props option syntax are normalized into the
|
|
* Object-based format.
|
|
*/
|
|
function normalizeProps (options) {
|
|
var props = options.props;
|
|
if (!props) { return }
|
|
var res = {};
|
|
var i, val, name;
|
|
if (Array.isArray(props)) {
|
|
i = props.length;
|
|
while (i--) {
|
|
val = props[i];
|
|
if (typeof val === 'string') {
|
|
name = camelize(val);
|
|
res[name] = { type: null };
|
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
warn('props must be strings when using array syntax.');
|
|
}
|
|
}
|
|
} else if (isPlainObject(props)) {
|
|
for (var key in props) {
|
|
val = props[key];
|
|
name = camelize(key);
|
|
res[name] = isPlainObject(val)
|
|
? val
|
|
: { type: val };
|
|
}
|
|
}
|
|
options.props = res;
|
|
}
|
|
|
|
/**
|
|
* Normalize raw function directives into object format.
|
|
*/
|
|
function normalizeDirectives (options) {
|
|
var dirs = options.directives;
|
|
if (dirs) {
|
|
for (var key in dirs) {
|
|
var def = dirs[key];
|
|
if (typeof def === 'function') {
|
|
dirs[key] = { bind: def, update: def };
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Merge two option objects into a new one.
|
|
* Core utility used in both instantiation and inheritance.
|
|
*/
|
|
function mergeOptions (
|
|
parent,
|
|
child,
|
|
vm
|
|
) {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
checkComponents(child);
|
|
}
|
|
normalizeProps(child);
|
|
normalizeDirectives(child);
|
|
var extendsFrom = child.extends;
|
|
if (extendsFrom) {
|
|
parent = typeof extendsFrom === 'function'
|
|
? mergeOptions(parent, extendsFrom.options, vm)
|
|
: mergeOptions(parent, extendsFrom, vm);
|
|
}
|
|
if (child.mixins) {
|
|
for (var i = 0, l = child.mixins.length; i < l; i++) {
|
|
var mixin = child.mixins[i];
|
|
if (mixin.prototype instanceof Vue$2) {
|
|
mixin = mixin.options;
|
|
}
|
|
parent = mergeOptions(parent, mixin, vm);
|
|
}
|
|
}
|
|
var options = {};
|
|
var key;
|
|
for (key in parent) {
|
|
mergeField(key);
|
|
}
|
|
for (key in child) {
|
|
if (!hasOwn(parent, key)) {
|
|
mergeField(key);
|
|
}
|
|
}
|
|
function mergeField (key) {
|
|
var strat = strats[key] || defaultStrat;
|
|
options[key] = strat(parent[key], child[key], vm, key);
|
|
}
|
|
return options
|
|
}
|
|
|
|
/**
|
|
* Resolve an asset.
|
|
* This function is used because child instances need access
|
|
* to assets defined in its ancestor chain.
|
|
*/
|
|
function resolveAsset (
|
|
options,
|
|
type,
|
|
id,
|
|
warnMissing
|
|
) {
|
|
/* istanbul ignore if */
|
|
if (typeof id !== 'string') {
|
|
return
|
|
}
|
|
var assets = options[type];
|
|
// check local registration variations first
|
|
if (hasOwn(assets, id)) { return assets[id] }
|
|
var camelizedId = camelize(id);
|
|
if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
|
|
var PascalCaseId = capitalize(camelizedId);
|
|
if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
|
|
// fallback to prototype chain
|
|
var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
|
|
if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {
|
|
warn(
|
|
'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
|
|
options
|
|
);
|
|
}
|
|
return res
|
|
}
|
|
|
|
/* */
|
|
|
|
function validateProp (
|
|
key,
|
|
propOptions,
|
|
propsData,
|
|
vm
|
|
) {
|
|
var prop = propOptions[key];
|
|
var absent = !hasOwn(propsData, key);
|
|
var value = propsData[key];
|
|
// handle boolean props
|
|
if (isBooleanType(prop.type)) {
|
|
if (absent && !hasOwn(prop, 'default')) {
|
|
value = false;
|
|
} else if (value === '' || value === hyphenate(key)) {
|
|
value = true;
|
|
}
|
|
}
|
|
// check default value
|
|
if (value === undefined) {
|
|
value = getPropDefaultValue(vm, prop, key);
|
|
// since the default value is a fresh copy,
|
|
// make sure to observe it.
|
|
var prevShouldConvert = observerState.shouldConvert;
|
|
observerState.shouldConvert = true;
|
|
observe(value);
|
|
observerState.shouldConvert = prevShouldConvert;
|
|
}
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
assertProp(prop, key, value, vm, absent);
|
|
}
|
|
return value
|
|
}
|
|
|
|
/**
|
|
* Get the default value of a prop.
|
|
*/
|
|
function getPropDefaultValue (vm, prop, key) {
|
|
// no default, return undefined
|
|
if (!hasOwn(prop, 'default')) {
|
|
return undefined
|
|
}
|
|
var def = prop.default;
|
|
// warn against non-factory defaults for Object & Array
|
|
if (isObject(def)) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'Invalid default value for prop "' + key + '": ' +
|
|
'Props with type Object/Array must use a factory function ' +
|
|
'to return the default value.',
|
|
vm
|
|
);
|
|
}
|
|
// the raw prop value was also undefined from previous render,
|
|
// return previous default value to avoid unnecessary watcher trigger
|
|
if (vm && vm.$options.propsData &&
|
|
vm.$options.propsData[key] === undefined &&
|
|
vm[key] !== undefined) {
|
|
return vm[key]
|
|
}
|
|
// call factory function for non-Function types
|
|
return typeof def === 'function' && prop.type !== Function
|
|
? def.call(vm)
|
|
: def
|
|
}
|
|
|
|
/**
|
|
* Assert whether a prop is valid.
|
|
*/
|
|
function assertProp (
|
|
prop,
|
|
name,
|
|
value,
|
|
vm,
|
|
absent
|
|
) {
|
|
if (prop.required && absent) {
|
|
warn(
|
|
'Missing required prop: "' + name + '"',
|
|
vm
|
|
);
|
|
return
|
|
}
|
|
if (value == null && !prop.required) {
|
|
return
|
|
}
|
|
var type = prop.type;
|
|
var valid = !type || type === true;
|
|
var expectedTypes = [];
|
|
if (type) {
|
|
if (!Array.isArray(type)) {
|
|
type = [type];
|
|
}
|
|
for (var i = 0; i < type.length && !valid; i++) {
|
|
var assertedType = assertType(value, type[i]);
|
|
expectedTypes.push(assertedType.expectedType);
|
|
valid = assertedType.valid;
|
|
}
|
|
}
|
|
if (!valid) {
|
|
warn(
|
|
'Invalid prop: type check failed for prop "' + name + '".' +
|
|
' Expected ' + expectedTypes.map(capitalize).join(', ') +
|
|
', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',
|
|
vm
|
|
);
|
|
return
|
|
}
|
|
var validator = prop.validator;
|
|
if (validator) {
|
|
if (!validator(value)) {
|
|
warn(
|
|
'Invalid prop: custom validator check failed for prop "' + name + '".',
|
|
vm
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Assert the type of a value
|
|
*/
|
|
function assertType (value, type) {
|
|
var valid;
|
|
var expectedType = getType(type);
|
|
if (expectedType === 'String') {
|
|
valid = typeof value === (expectedType = 'string');
|
|
} else if (expectedType === 'Number') {
|
|
valid = typeof value === (expectedType = 'number');
|
|
} else if (expectedType === 'Boolean') {
|
|
valid = typeof value === (expectedType = 'boolean');
|
|
} else if (expectedType === 'Function') {
|
|
valid = typeof value === (expectedType = 'function');
|
|
} else if (expectedType === 'Object') {
|
|
valid = isPlainObject(value);
|
|
} else if (expectedType === 'Array') {
|
|
valid = Array.isArray(value);
|
|
} else {
|
|
valid = value instanceof type;
|
|
}
|
|
return {
|
|
valid: valid,
|
|
expectedType: expectedType
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Use function string name to check built-in types,
|
|
* because a simple equality check will fail when running
|
|
* across different vms / iframes.
|
|
*/
|
|
function getType (fn) {
|
|
var match = fn && fn.toString().match(/^\s*function (\w+)/);
|
|
return match && match[1]
|
|
}
|
|
|
|
function isBooleanType (fn) {
|
|
if (!Array.isArray(fn)) {
|
|
return getType(fn) === 'Boolean'
|
|
}
|
|
for (var i = 0, len = fn.length; i < len; i++) {
|
|
if (getType(fn[i]) === 'Boolean') {
|
|
return true
|
|
}
|
|
}
|
|
/* istanbul ignore next */
|
|
return false
|
|
}
|
|
|
|
|
|
|
|
var util = Object.freeze({
|
|
defineReactive: defineReactive$$1,
|
|
_toString: _toString,
|
|
toNumber: toNumber,
|
|
makeMap: makeMap,
|
|
isBuiltInTag: isBuiltInTag,
|
|
remove: remove$1,
|
|
hasOwn: hasOwn,
|
|
isPrimitive: isPrimitive,
|
|
cached: cached,
|
|
camelize: camelize,
|
|
capitalize: capitalize,
|
|
hyphenate: hyphenate,
|
|
bind: bind$1,
|
|
toArray: toArray,
|
|
extend: extend,
|
|
isObject: isObject,
|
|
isPlainObject: isPlainObject,
|
|
toObject: toObject,
|
|
noop: noop,
|
|
no: no,
|
|
identity: identity,
|
|
genStaticKeys: genStaticKeys,
|
|
looseEqual: looseEqual,
|
|
looseIndexOf: looseIndexOf,
|
|
isReserved: isReserved,
|
|
def: def,
|
|
parsePath: parsePath,
|
|
hasProto: hasProto,
|
|
inBrowser: inBrowser,
|
|
UA: UA,
|
|
isIE: isIE,
|
|
isIE9: isIE9,
|
|
isEdge: isEdge,
|
|
isAndroid: isAndroid,
|
|
isIOS: isIOS,
|
|
isServerRendering: isServerRendering,
|
|
devtools: devtools,
|
|
nextTick: nextTick,
|
|
get _Set () { return _Set; },
|
|
mergeOptions: mergeOptions,
|
|
resolveAsset: resolveAsset,
|
|
get warn () { return warn; },
|
|
get formatComponentName () { return formatComponentName; },
|
|
validateProp: validateProp
|
|
});
|
|
|
|
/* not type checking this file because flow doesn't play well with Proxy */
|
|
|
|
var initProxy;
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
var allowedGlobals = makeMap(
|
|
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
|
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
|
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
|
'require' // for Webpack/Browserify
|
|
);
|
|
|
|
var warnNonPresent = function (target, key) {
|
|
warn(
|
|
"Property or method \"" + key + "\" is not defined on the instance but " +
|
|
"referenced during render. Make sure to declare reactive data " +
|
|
"properties in the data option.",
|
|
target
|
|
);
|
|
};
|
|
|
|
var hasProxy =
|
|
typeof Proxy !== 'undefined' &&
|
|
Proxy.toString().match(/native code/);
|
|
|
|
if (hasProxy) {
|
|
var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');
|
|
config.keyCodes = new Proxy(config.keyCodes, {
|
|
set: function set (target, key, value) {
|
|
if (isBuiltInModifier(key)) {
|
|
warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
|
|
return false
|
|
} else {
|
|
target[key] = value;
|
|
return true
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
var hasHandler = {
|
|
has: function has (target, key) {
|
|
var has = key in target;
|
|
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
|
|
if (!has && !isAllowed) {
|
|
warnNonPresent(target, key);
|
|
}
|
|
return has || !isAllowed
|
|
}
|
|
};
|
|
|
|
var getHandler = {
|
|
get: function get (target, key) {
|
|
if (typeof key === 'string' && !(key in target)) {
|
|
warnNonPresent(target, key);
|
|
}
|
|
return target[key]
|
|
}
|
|
};
|
|
|
|
initProxy = function initProxy (vm) {
|
|
if (hasProxy) {
|
|
// determine which proxy handler to use
|
|
var options = vm.$options;
|
|
var handlers = options.render && options.render._withStripped
|
|
? getHandler
|
|
: hasHandler;
|
|
vm._renderProxy = new Proxy(vm, handlers);
|
|
} else {
|
|
vm._renderProxy = vm;
|
|
}
|
|
};
|
|
}
|
|
|
|
/* */
|
|
|
|
|
|
var queue = [];
|
|
var has$1 = {};
|
|
var circular = {};
|
|
var waiting = false;
|
|
var flushing = false;
|
|
var index = 0;
|
|
|
|
/**
|
|
* Reset the scheduler's state.
|
|
*/
|
|
function resetSchedulerState () {
|
|
queue.length = 0;
|
|
has$1 = {};
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
circular = {};
|
|
}
|
|
waiting = flushing = false;
|
|
}
|
|
|
|
/**
|
|
* Flush both queues and run the watchers.
|
|
*/
|
|
function flushSchedulerQueue () {
|
|
flushing = true;
|
|
|
|
// Sort queue before flush.
|
|
// This ensures that:
|
|
// 1. Components are updated from parent to child. (because parent is always
|
|
// created before the child)
|
|
// 2. A component's user watchers are run before its render watcher (because
|
|
// user watchers are created before the render watcher)
|
|
// 3. If a component is destroyed during a parent component's watcher run,
|
|
// its watchers can be skipped.
|
|
queue.sort(function (a, b) { return a.id - b.id; });
|
|
|
|
// do not cache length because more watchers might be pushed
|
|
// as we run existing watchers
|
|
for (index = 0; index < queue.length; index++) {
|
|
var watcher = queue[index];
|
|
var id = watcher.id;
|
|
has$1[id] = null;
|
|
watcher.run();
|
|
// in dev build, check and stop circular updates.
|
|
if (process.env.NODE_ENV !== 'production' && has$1[id] != null) {
|
|
circular[id] = (circular[id] || 0) + 1;
|
|
if (circular[id] > config._maxUpdateCount) {
|
|
warn(
|
|
'You may have an infinite update loop ' + (
|
|
watcher.user
|
|
? ("in watcher with expression \"" + (watcher.expression) + "\"")
|
|
: "in a component render function."
|
|
),
|
|
watcher.vm
|
|
);
|
|
break
|
|
}
|
|
}
|
|
}
|
|
|
|
// devtool hook
|
|
/* istanbul ignore if */
|
|
if (devtools && config.devtools) {
|
|
devtools.emit('flush');
|
|
}
|
|
|
|
resetSchedulerState();
|
|
}
|
|
|
|
/**
|
|
* Push a watcher into the watcher queue.
|
|
* Jobs with duplicate IDs will be skipped unless it's
|
|
* pushed when the queue is being flushed.
|
|
*/
|
|
function queueWatcher (watcher) {
|
|
var id = watcher.id;
|
|
if (has$1[id] == null) {
|
|
has$1[id] = true;
|
|
if (!flushing) {
|
|
queue.push(watcher);
|
|
} else {
|
|
// if already flushing, splice the watcher based on its id
|
|
// if already past its id, it will be run next immediately.
|
|
var i = queue.length - 1;
|
|
while (i >= 0 && queue[i].id > watcher.id) {
|
|
i--;
|
|
}
|
|
queue.splice(Math.max(i, index) + 1, 0, watcher);
|
|
}
|
|
// queue the flush
|
|
if (!waiting) {
|
|
waiting = true;
|
|
nextTick(flushSchedulerQueue);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
var uid$2 = 0;
|
|
|
|
/**
|
|
* A watcher parses an expression, collects dependencies,
|
|
* and fires callback when the expression value changes.
|
|
* This is used for both the $watch() api and directives.
|
|
*/
|
|
var Watcher = function Watcher (
|
|
vm,
|
|
expOrFn,
|
|
cb,
|
|
options
|
|
) {
|
|
if ( options === void 0 ) options = {};
|
|
|
|
this.vm = vm;
|
|
vm._watchers.push(this);
|
|
// options
|
|
this.deep = !!options.deep;
|
|
this.user = !!options.user;
|
|
this.lazy = !!options.lazy;
|
|
this.sync = !!options.sync;
|
|
this.expression = expOrFn.toString();
|
|
this.cb = cb;
|
|
this.id = ++uid$2; // uid for batching
|
|
this.active = true;
|
|
this.dirty = this.lazy; // for lazy watchers
|
|
this.deps = [];
|
|
this.newDeps = [];
|
|
this.depIds = new _Set();
|
|
this.newDepIds = new _Set();
|
|
// parse expression for getter
|
|
if (typeof expOrFn === 'function') {
|
|
this.getter = expOrFn;
|
|
} else {
|
|
this.getter = parsePath(expOrFn);
|
|
if (!this.getter) {
|
|
this.getter = function () {};
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
"Failed watching path: \"" + expOrFn + "\" " +
|
|
'Watcher only accepts simple dot-delimited paths. ' +
|
|
'For full control, use a function instead.',
|
|
vm
|
|
);
|
|
}
|
|
}
|
|
this.value = this.lazy
|
|
? undefined
|
|
: this.get();
|
|
};
|
|
|
|
/**
|
|
* Evaluate the getter, and re-collect dependencies.
|
|
*/
|
|
Watcher.prototype.get = function get () {
|
|
pushTarget(this);
|
|
var value = this.getter.call(this.vm, this.vm);
|
|
// "touch" every property so they are all tracked as
|
|
// dependencies for deep watching
|
|
if (this.deep) {
|
|
traverse(value);
|
|
}
|
|
popTarget();
|
|
this.cleanupDeps();
|
|
return value
|
|
};
|
|
|
|
/**
|
|
* Add a dependency to this directive.
|
|
*/
|
|
Watcher.prototype.addDep = function addDep (dep) {
|
|
var id = dep.id;
|
|
if (!this.newDepIds.has(id)) {
|
|
this.newDepIds.add(id);
|
|
this.newDeps.push(dep);
|
|
if (!this.depIds.has(id)) {
|
|
dep.addSub(this);
|
|
}
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Clean up for dependency collection.
|
|
*/
|
|
Watcher.prototype.cleanupDeps = function cleanupDeps () {
|
|
var this$1 = this;
|
|
|
|
var i = this.deps.length;
|
|
while (i--) {
|
|
var dep = this$1.deps[i];
|
|
if (!this$1.newDepIds.has(dep.id)) {
|
|
dep.removeSub(this$1);
|
|
}
|
|
}
|
|
var tmp = this.depIds;
|
|
this.depIds = this.newDepIds;
|
|
this.newDepIds = tmp;
|
|
this.newDepIds.clear();
|
|
tmp = this.deps;
|
|
this.deps = this.newDeps;
|
|
this.newDeps = tmp;
|
|
this.newDeps.length = 0;
|
|
};
|
|
|
|
/**
|
|
* Subscriber interface.
|
|
* Will be called when a dependency changes.
|
|
*/
|
|
Watcher.prototype.update = function update () {
|
|
/* istanbul ignore else */
|
|
if (this.lazy) {
|
|
this.dirty = true;
|
|
} else if (this.sync) {
|
|
this.run();
|
|
} else {
|
|
queueWatcher(this);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Scheduler job interface.
|
|
* Will be called by the scheduler.
|
|
*/
|
|
Watcher.prototype.run = function run () {
|
|
if (this.active) {
|
|
var value = this.get();
|
|
if (
|
|
value !== this.value ||
|
|
// Deep watchers and watchers on Object/Arrays should fire even
|
|
// when the value is the same, because the value may
|
|
// have mutated.
|
|
isObject(value) ||
|
|
this.deep
|
|
) {
|
|
// set new value
|
|
var oldValue = this.value;
|
|
this.value = value;
|
|
if (this.user) {
|
|
try {
|
|
this.cb.call(this.vm, value, oldValue);
|
|
} catch (e) {
|
|
/* istanbul ignore else */
|
|
if (config.errorHandler) {
|
|
config.errorHandler.call(null, e, this.vm);
|
|
} else {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
("Error in watcher \"" + (this.expression) + "\""),
|
|
this.vm
|
|
);
|
|
throw e
|
|
}
|
|
}
|
|
} else {
|
|
this.cb.call(this.vm, value, oldValue);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Evaluate the value of the watcher.
|
|
* This only gets called for lazy watchers.
|
|
*/
|
|
Watcher.prototype.evaluate = function evaluate () {
|
|
this.value = this.get();
|
|
this.dirty = false;
|
|
};
|
|
|
|
/**
|
|
* Depend on all deps collected by this watcher.
|
|
*/
|
|
Watcher.prototype.depend = function depend () {
|
|
var this$1 = this;
|
|
|
|
var i = this.deps.length;
|
|
while (i--) {
|
|
this$1.deps[i].depend();
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Remove self from all dependencies' subscriber list.
|
|
*/
|
|
Watcher.prototype.teardown = function teardown () {
|
|
var this$1 = this;
|
|
|
|
if (this.active) {
|
|
// remove self from vm's watcher list
|
|
// this is a somewhat expensive operation so we skip it
|
|
// if the vm is being destroyed or is performing a v-for
|
|
// re-render (the watcher list is then filtered by v-for).
|
|
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
|
|
remove$1(this.vm._watchers, this);
|
|
}
|
|
var i = this.deps.length;
|
|
while (i--) {
|
|
this$1.deps[i].removeSub(this$1);
|
|
}
|
|
this.active = false;
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Recursively traverse an object to evoke all converted
|
|
* getters, so that every nested property inside the object
|
|
* is collected as a "deep" dependency.
|
|
*/
|
|
var seenObjects = new _Set();
|
|
function traverse (val) {
|
|
seenObjects.clear();
|
|
_traverse(val, seenObjects);
|
|
}
|
|
|
|
function _traverse (val, seen) {
|
|
var i, keys;
|
|
var isA = Array.isArray(val);
|
|
if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {
|
|
return
|
|
}
|
|
if (val.__ob__) {
|
|
var depId = val.__ob__.dep.id;
|
|
if (seen.has(depId)) {
|
|
return
|
|
}
|
|
seen.add(depId);
|
|
}
|
|
if (isA) {
|
|
i = val.length;
|
|
while (i--) { _traverse(val[i], seen); }
|
|
} else {
|
|
keys = Object.keys(val);
|
|
i = keys.length;
|
|
while (i--) { _traverse(val[keys[i]], seen); }
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
function initState (vm) {
|
|
vm._watchers = [];
|
|
initProps(vm);
|
|
initMethods(vm);
|
|
initData(vm);
|
|
initComputed(vm);
|
|
initWatch(vm);
|
|
}
|
|
|
|
var isReservedProp = { key: 1, ref: 1, slot: 1 };
|
|
|
|
function initProps (vm) {
|
|
var props = vm.$options.props;
|
|
if (props) {
|
|
var propsData = vm.$options.propsData || {};
|
|
var keys = vm.$options._propKeys = Object.keys(props);
|
|
var isRoot = !vm.$parent;
|
|
// root instance props should be converted
|
|
observerState.shouldConvert = isRoot;
|
|
var loop = function ( i ) {
|
|
var key = keys[i];
|
|
/* istanbul ignore else */
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
if (isReservedProp[key]) {
|
|
warn(
|
|
("\"" + key + "\" is a reserved attribute and cannot be used as component prop."),
|
|
vm
|
|
);
|
|
}
|
|
defineReactive$$1(vm, key, validateProp(key, props, propsData, vm), function () {
|
|
if (vm.$parent && !observerState.isSettingProps) {
|
|
warn(
|
|
"Avoid mutating a prop directly since the value will be " +
|
|
"overwritten whenever the parent component re-renders. " +
|
|
"Instead, use a data or computed property based on the prop's " +
|
|
"value. Prop being mutated: \"" + key + "\"",
|
|
vm
|
|
);
|
|
}
|
|
});
|
|
} else {
|
|
defineReactive$$1(vm, key, validateProp(key, props, propsData, vm));
|
|
}
|
|
};
|
|
|
|
for (var i = 0; i < keys.length; i++) loop( i );
|
|
observerState.shouldConvert = true;
|
|
}
|
|
}
|
|
|
|
function initData (vm) {
|
|
var data = vm.$options.data;
|
|
data = vm._data = typeof data === 'function'
|
|
? data.call(vm)
|
|
: data || {};
|
|
if (!isPlainObject(data)) {
|
|
data = {};
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'data functions should return an object:\n' +
|
|
'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
|
|
vm
|
|
);
|
|
}
|
|
// proxy data on instance
|
|
var keys = Object.keys(data);
|
|
var props = vm.$options.props;
|
|
var i = keys.length;
|
|
while (i--) {
|
|
if (props && hasOwn(props, keys[i])) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
"The data property \"" + (keys[i]) + "\" is already declared as a prop. " +
|
|
"Use prop default value instead.",
|
|
vm
|
|
);
|
|
} else {
|
|
proxy(vm, keys[i]);
|
|
}
|
|
}
|
|
// observe data
|
|
observe(data);
|
|
data.__ob__ && data.__ob__.vmCount++;
|
|
}
|
|
|
|
var computedSharedDefinition = {
|
|
enumerable: true,
|
|
configurable: true,
|
|
get: noop,
|
|
set: noop
|
|
};
|
|
|
|
function initComputed (vm) {
|
|
var computed = vm.$options.computed;
|
|
if (computed) {
|
|
for (var key in computed) {
|
|
var userDef = computed[key];
|
|
if (typeof userDef === 'function') {
|
|
computedSharedDefinition.get = makeComputedGetter(userDef, vm);
|
|
computedSharedDefinition.set = noop;
|
|
} else {
|
|
computedSharedDefinition.get = userDef.get
|
|
? userDef.cache !== false
|
|
? makeComputedGetter(userDef.get, vm)
|
|
: bind$1(userDef.get, vm)
|
|
: noop;
|
|
computedSharedDefinition.set = userDef.set
|
|
? bind$1(userDef.set, vm)
|
|
: noop;
|
|
}
|
|
Object.defineProperty(vm, key, computedSharedDefinition);
|
|
}
|
|
}
|
|
}
|
|
|
|
function makeComputedGetter (getter, owner) {
|
|
var watcher = new Watcher(owner, getter, noop, {
|
|
lazy: true
|
|
});
|
|
return function computedGetter () {
|
|
if (watcher.dirty) {
|
|
watcher.evaluate();
|
|
}
|
|
if (Dep.target) {
|
|
watcher.depend();
|
|
}
|
|
return watcher.value
|
|
}
|
|
}
|
|
|
|
function initMethods (vm) {
|
|
var methods = vm.$options.methods;
|
|
if (methods) {
|
|
for (var key in methods) {
|
|
vm[key] = methods[key] == null ? noop : bind$1(methods[key], vm);
|
|
if (process.env.NODE_ENV !== 'production' && methods[key] == null) {
|
|
warn(
|
|
"method \"" + key + "\" has an undefined value in the component definition. " +
|
|
"Did you reference the function correctly?",
|
|
vm
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function initWatch (vm) {
|
|
var watch = vm.$options.watch;
|
|
if (watch) {
|
|
for (var key in watch) {
|
|
var handler = watch[key];
|
|
if (Array.isArray(handler)) {
|
|
for (var i = 0; i < handler.length; i++) {
|
|
createWatcher(vm, key, handler[i]);
|
|
}
|
|
} else {
|
|
createWatcher(vm, key, handler);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function createWatcher (vm, key, handler) {
|
|
var options;
|
|
if (isPlainObject(handler)) {
|
|
options = handler;
|
|
handler = handler.handler;
|
|
}
|
|
if (typeof handler === 'string') {
|
|
handler = vm[handler];
|
|
}
|
|
vm.$watch(key, handler, options);
|
|
}
|
|
|
|
function stateMixin (Vue) {
|
|
// flow somehow has problems with directly declared definition object
|
|
// when using Object.defineProperty, so we have to procedurally build up
|
|
// the object here.
|
|
var dataDef = {};
|
|
dataDef.get = function () {
|
|
return this._data
|
|
};
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
dataDef.set = function (newData) {
|
|
warn(
|
|
'Avoid replacing instance root $data. ' +
|
|
'Use nested data properties instead.',
|
|
this
|
|
);
|
|
};
|
|
}
|
|
Object.defineProperty(Vue.prototype, '$data', dataDef);
|
|
|
|
Vue.prototype.$set = set$1;
|
|
Vue.prototype.$delete = del;
|
|
|
|
Vue.prototype.$watch = function (
|
|
expOrFn,
|
|
cb,
|
|
options
|
|
) {
|
|
var vm = this;
|
|
options = options || {};
|
|
options.user = true;
|
|
var watcher = new Watcher(vm, expOrFn, cb, options);
|
|
if (options.immediate) {
|
|
cb.call(vm, watcher.value);
|
|
}
|
|
return function unwatchFn () {
|
|
watcher.teardown();
|
|
}
|
|
};
|
|
}
|
|
|
|
function proxy (vm, key) {
|
|
if (!isReserved(key)) {
|
|
Object.defineProperty(vm, key, {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: function proxyGetter () {
|
|
return vm._data[key]
|
|
},
|
|
set: function proxySetter (val) {
|
|
vm._data[key] = val;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
var VNode = function VNode (
|
|
tag,
|
|
data,
|
|
children,
|
|
text,
|
|
elm,
|
|
context,
|
|
componentOptions
|
|
) {
|
|
this.tag = tag;
|
|
this.data = data;
|
|
this.children = children;
|
|
this.text = text;
|
|
this.elm = elm;
|
|
this.ns = undefined;
|
|
this.context = context;
|
|
this.functionalContext = undefined;
|
|
this.key = data && data.key;
|
|
this.componentOptions = componentOptions;
|
|
this.child = undefined;
|
|
this.parent = undefined;
|
|
this.raw = false;
|
|
this.isStatic = false;
|
|
this.isRootInsert = true;
|
|
this.isComment = false;
|
|
this.isCloned = false;
|
|
this.isOnce = false;
|
|
};
|
|
|
|
var createEmptyVNode = function () {
|
|
var node = new VNode();
|
|
node.text = '';
|
|
node.isComment = true;
|
|
return node
|
|
};
|
|
|
|
function createTextVNode (val) {
|
|
return new VNode(undefined, undefined, undefined, String(val))
|
|
}
|
|
|
|
// optimized shallow clone
|
|
// used for static nodes and slot nodes because they may be reused across
|
|
// multiple renders, cloning them avoids errors when DOM manipulations rely
|
|
// on their elm reference.
|
|
function cloneVNode (vnode) {
|
|
var cloned = new VNode(
|
|
vnode.tag,
|
|
vnode.data,
|
|
vnode.children,
|
|
vnode.text,
|
|
vnode.elm,
|
|
vnode.context,
|
|
vnode.componentOptions
|
|
);
|
|
cloned.ns = vnode.ns;
|
|
cloned.isStatic = vnode.isStatic;
|
|
cloned.key = vnode.key;
|
|
cloned.isCloned = true;
|
|
return cloned
|
|
}
|
|
|
|
function cloneVNodes (vnodes) {
|
|
var res = new Array(vnodes.length);
|
|
for (var i = 0; i < vnodes.length; i++) {
|
|
res[i] = cloneVNode(vnodes[i]);
|
|
}
|
|
return res
|
|
}
|
|
|
|
/* */
|
|
|
|
var activeInstance = null;
|
|
|
|
function initLifecycle (vm) {
|
|
var options = vm.$options;
|
|
|
|
// locate first non-abstract parent
|
|
var parent = options.parent;
|
|
if (parent && !options.abstract) {
|
|
while (parent.$options.abstract && parent.$parent) {
|
|
parent = parent.$parent;
|
|
}
|
|
parent.$children.push(vm);
|
|
}
|
|
|
|
vm.$parent = parent;
|
|
vm.$root = parent ? parent.$root : vm;
|
|
|
|
vm.$children = [];
|
|
vm.$refs = {};
|
|
|
|
vm._watcher = null;
|
|
vm._inactive = false;
|
|
vm._isMounted = false;
|
|
vm._isDestroyed = false;
|
|
vm._isBeingDestroyed = false;
|
|
}
|
|
|
|
function lifecycleMixin (Vue) {
|
|
Vue.prototype._mount = function (
|
|
el,
|
|
hydrating
|
|
) {
|
|
var vm = this;
|
|
vm.$el = el;
|
|
if (!vm.$options.render) {
|
|
vm.$options.render = createEmptyVNode;
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
/* istanbul ignore if */
|
|
if (vm.$options.template && vm.$options.template.charAt(0) !== '#') {
|
|
warn(
|
|
'You are using the runtime-only build of Vue where the template ' +
|
|
'option is not available. Either pre-compile the templates into ' +
|
|
'render functions, or use the compiler-included build.',
|
|
vm
|
|
);
|
|
} else {
|
|
warn(
|
|
'Failed to mount component: template or render function not defined.',
|
|
vm
|
|
);
|
|
}
|
|
}
|
|
}
|
|
callHook(vm, 'beforeMount');
|
|
vm._watcher = new Watcher(vm, function () {
|
|
vm._update(vm._render(), hydrating);
|
|
}, noop);
|
|
hydrating = false;
|
|
// manually mounted instance, call mounted on self
|
|
// mounted is called for render-created child components in its inserted hook
|
|
if (vm.$vnode == null) {
|
|
vm._isMounted = true;
|
|
callHook(vm, 'mounted');
|
|
}
|
|
return vm
|
|
};
|
|
|
|
Vue.prototype._update = function (vnode, hydrating) {
|
|
var vm = this;
|
|
if (vm._isMounted) {
|
|
callHook(vm, 'beforeUpdate');
|
|
}
|
|
var prevEl = vm.$el;
|
|
var prevVnode = vm._vnode;
|
|
var prevActiveInstance = activeInstance;
|
|
activeInstance = vm;
|
|
vm._vnode = vnode;
|
|
// Vue.prototype.__patch__ is injected in entry points
|
|
// based on the rendering backend used.
|
|
if (!prevVnode) {
|
|
// initial render
|
|
vm.$el = vm.__patch__(
|
|
vm.$el, vnode, hydrating, false /* removeOnly */,
|
|
vm.$options._parentElm,
|
|
vm.$options._refElm
|
|
);
|
|
} else {
|
|
// updates
|
|
vm.$el = vm.__patch__(prevVnode, vnode);
|
|
}
|
|
activeInstance = prevActiveInstance;
|
|
// update __vue__ reference
|
|
if (prevEl) {
|
|
prevEl.__vue__ = null;
|
|
}
|
|
if (vm.$el) {
|
|
vm.$el.__vue__ = vm;
|
|
}
|
|
// if parent is an HOC, update its $el as well
|
|
if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
|
|
vm.$parent.$el = vm.$el;
|
|
}
|
|
if (vm._isMounted) {
|
|
callHook(vm, 'updated');
|
|
}
|
|
};
|
|
|
|
Vue.prototype._updateFromParent = function (
|
|
propsData,
|
|
listeners,
|
|
parentVnode,
|
|
renderChildren
|
|
) {
|
|
var vm = this;
|
|
var hasChildren = !!(vm.$options._renderChildren || renderChildren);
|
|
vm.$options._parentVnode = parentVnode;
|
|
vm.$vnode = parentVnode; // update vm's placeholder node without re-render
|
|
if (vm._vnode) { // update child tree's parent
|
|
vm._vnode.parent = parentVnode;
|
|
}
|
|
vm.$options._renderChildren = renderChildren;
|
|
// update props
|
|
if (propsData && vm.$options.props) {
|
|
observerState.shouldConvert = false;
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
observerState.isSettingProps = true;
|
|
}
|
|
var propKeys = vm.$options._propKeys || [];
|
|
for (var i = 0; i < propKeys.length; i++) {
|
|
var key = propKeys[i];
|
|
vm[key] = validateProp(key, vm.$options.props, propsData, vm);
|
|
}
|
|
observerState.shouldConvert = true;
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
observerState.isSettingProps = false;
|
|
}
|
|
vm.$options.propsData = propsData;
|
|
}
|
|
// update listeners
|
|
if (listeners) {
|
|
var oldListeners = vm.$options._parentListeners;
|
|
vm.$options._parentListeners = listeners;
|
|
vm._updateListeners(listeners, oldListeners);
|
|
}
|
|
// resolve slots + force update if has children
|
|
if (hasChildren) {
|
|
vm.$slots = resolveSlots(renderChildren, parentVnode.context);
|
|
vm.$forceUpdate();
|
|
}
|
|
};
|
|
|
|
Vue.prototype.$forceUpdate = function () {
|
|
var vm = this;
|
|
if (vm._watcher) {
|
|
vm._watcher.update();
|
|
}
|
|
};
|
|
|
|
Vue.prototype.$destroy = function () {
|
|
var vm = this;
|
|
if (vm._isBeingDestroyed) {
|
|
return
|
|
}
|
|
callHook(vm, 'beforeDestroy');
|
|
vm._isBeingDestroyed = true;
|
|
// remove self from parent
|
|
var parent = vm.$parent;
|
|
if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
|
|
remove$1(parent.$children, vm);
|
|
}
|
|
// teardown watchers
|
|
if (vm._watcher) {
|
|
vm._watcher.teardown();
|
|
}
|
|
var i = vm._watchers.length;
|
|
while (i--) {
|
|
vm._watchers[i].teardown();
|
|
}
|
|
// remove reference from data ob
|
|
// frozen object may not have observer.
|
|
if (vm._data.__ob__) {
|
|
vm._data.__ob__.vmCount--;
|
|
}
|
|
// call the last hook...
|
|
vm._isDestroyed = true;
|
|
callHook(vm, 'destroyed');
|
|
// turn off all instance listeners.
|
|
vm.$off();
|
|
// remove __vue__ reference
|
|
if (vm.$el) {
|
|
vm.$el.__vue__ = null;
|
|
}
|
|
// invoke destroy hooks on current rendered tree
|
|
vm.__patch__(vm._vnode, null);
|
|
};
|
|
}
|
|
|
|
function callHook (vm, hook) {
|
|
var handlers = vm.$options[hook];
|
|
if (handlers) {
|
|
for (var i = 0, j = handlers.length; i < j; i++) {
|
|
handlers[i].call(vm);
|
|
}
|
|
}
|
|
vm.$emit('hook:' + hook);
|
|
}
|
|
|
|
/* */
|
|
|
|
var hooks = { init: init, prepatch: prepatch, insert: insert, destroy: destroy$1 };
|
|
var hooksToMerge = Object.keys(hooks);
|
|
|
|
function createComponent (
|
|
Ctor,
|
|
data,
|
|
context,
|
|
children,
|
|
tag
|
|
) {
|
|
if (!Ctor) {
|
|
return
|
|
}
|
|
|
|
var baseCtor = context.$options._base;
|
|
if (isObject(Ctor)) {
|
|
Ctor = baseCtor.extend(Ctor);
|
|
}
|
|
|
|
if (typeof Ctor !== 'function') {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
warn(("Invalid Component definition: " + (String(Ctor))), context);
|
|
}
|
|
return
|
|
}
|
|
|
|
// async component
|
|
if (!Ctor.cid) {
|
|
if (Ctor.resolved) {
|
|
Ctor = Ctor.resolved;
|
|
} else {
|
|
Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {
|
|
// it's ok to queue this on every render because
|
|
// $forceUpdate is buffered by the scheduler.
|
|
context.$forceUpdate();
|
|
});
|
|
if (!Ctor) {
|
|
// return nothing if this is indeed an async component
|
|
// wait for the callback to trigger parent update.
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// resolve constructor options in case global mixins are applied after
|
|
// component constructor creation
|
|
resolveConstructorOptions(Ctor);
|
|
|
|
data = data || {};
|
|
|
|
// extract props
|
|
var propsData = extractProps(data, Ctor);
|
|
|
|
// functional component
|
|
if (Ctor.options.functional) {
|
|
return createFunctionalComponent(Ctor, propsData, data, context, children)
|
|
}
|
|
|
|
// extract listeners, since these needs to be treated as
|
|
// child component listeners instead of DOM listeners
|
|
var listeners = data.on;
|
|
// replace with listeners with .native modifier
|
|
data.on = data.nativeOn;
|
|
|
|
if (Ctor.options.abstract) {
|
|
// abstract components do not keep anything
|
|
// other than props & listeners
|
|
data = {};
|
|
}
|
|
|
|
// merge component management hooks onto the placeholder node
|
|
mergeHooks(data);
|
|
|
|
// return a placeholder vnode
|
|
var name = Ctor.options.name || tag;
|
|
var vnode = new VNode(
|
|
("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
|
|
data, undefined, undefined, undefined, context,
|
|
{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }
|
|
);
|
|
return vnode
|
|
}
|
|
|
|
function createFunctionalComponent (
|
|
Ctor,
|
|
propsData,
|
|
data,
|
|
context,
|
|
children
|
|
) {
|
|
var props = {};
|
|
var propOptions = Ctor.options.props;
|
|
if (propOptions) {
|
|
for (var key in propOptions) {
|
|
props[key] = validateProp(key, propOptions, propsData);
|
|
}
|
|
}
|
|
// ensure the createElement function in functional components
|
|
// gets a unique context - this is necessary for correct named slot check
|
|
var _context = Object.create(context);
|
|
var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };
|
|
var vnode = Ctor.options.render.call(null, h, {
|
|
props: props,
|
|
data: data,
|
|
parent: context,
|
|
children: children,
|
|
slots: function () { return resolveSlots(children, context); }
|
|
});
|
|
if (vnode instanceof VNode) {
|
|
vnode.functionalContext = context;
|
|
if (data.slot) {
|
|
(vnode.data || (vnode.data = {})).slot = data.slot;
|
|
}
|
|
}
|
|
return vnode
|
|
}
|
|
|
|
function createComponentInstanceForVnode (
|
|
vnode, // we know it's MountedComponentVNode but flow doesn't
|
|
parent, // activeInstance in lifecycle state
|
|
parentElm,
|
|
refElm
|
|
) {
|
|
var vnodeComponentOptions = vnode.componentOptions;
|
|
var options = {
|
|
_isComponent: true,
|
|
parent: parent,
|
|
propsData: vnodeComponentOptions.propsData,
|
|
_componentTag: vnodeComponentOptions.tag,
|
|
_parentVnode: vnode,
|
|
_parentListeners: vnodeComponentOptions.listeners,
|
|
_renderChildren: vnodeComponentOptions.children,
|
|
_parentElm: parentElm || null,
|
|
_refElm: refElm || null
|
|
};
|
|
// check inline-template render functions
|
|
var inlineTemplate = vnode.data.inlineTemplate;
|
|
if (inlineTemplate) {
|
|
options.render = inlineTemplate.render;
|
|
options.staticRenderFns = inlineTemplate.staticRenderFns;
|
|
}
|
|
return new vnodeComponentOptions.Ctor(options)
|
|
}
|
|
|
|
function init (
|
|
vnode,
|
|
hydrating,
|
|
parentElm,
|
|
refElm
|
|
) {
|
|
if (!vnode.child || vnode.child._isDestroyed) {
|
|
var child = vnode.child = createComponentInstanceForVnode(
|
|
vnode,
|
|
activeInstance,
|
|
parentElm,
|
|
refElm
|
|
);
|
|
child.$mount(hydrating ? vnode.elm : undefined, hydrating);
|
|
} else if (vnode.data.keepAlive) {
|
|
// kept-alive components, treat as a patch
|
|
var mountedNode = vnode; // work around flow
|
|
prepatch(mountedNode, mountedNode);
|
|
}
|
|
}
|
|
|
|
function prepatch (
|
|
oldVnode,
|
|
vnode
|
|
) {
|
|
var options = vnode.componentOptions;
|
|
var child = vnode.child = oldVnode.child;
|
|
child._updateFromParent(
|
|
options.propsData, // updated props
|
|
options.listeners, // updated listeners
|
|
vnode, // new parent vnode
|
|
options.children // new children
|
|
);
|
|
}
|
|
|
|
function insert (vnode) {
|
|
if (!vnode.child._isMounted) {
|
|
vnode.child._isMounted = true;
|
|
callHook(vnode.child, 'mounted');
|
|
}
|
|
if (vnode.data.keepAlive) {
|
|
vnode.child._inactive = false;
|
|
callHook(vnode.child, 'activated');
|
|
}
|
|
}
|
|
|
|
function destroy$1 (vnode) {
|
|
if (!vnode.child._isDestroyed) {
|
|
if (!vnode.data.keepAlive) {
|
|
vnode.child.$destroy();
|
|
} else {
|
|
vnode.child._inactive = true;
|
|
callHook(vnode.child, 'deactivated');
|
|
}
|
|
}
|
|
}
|
|
|
|
function resolveAsyncComponent (
|
|
factory,
|
|
baseCtor,
|
|
cb
|
|
) {
|
|
if (factory.requested) {
|
|
// pool callbacks
|
|
factory.pendingCallbacks.push(cb);
|
|
} else {
|
|
factory.requested = true;
|
|
var cbs = factory.pendingCallbacks = [cb];
|
|
var sync = true;
|
|
|
|
var resolve = function (res) {
|
|
if (isObject(res)) {
|
|
res = baseCtor.extend(res);
|
|
}
|
|
// cache resolved
|
|
factory.resolved = res;
|
|
// invoke callbacks only if this is not a synchronous resolve
|
|
// (async resolves are shimmed as synchronous during SSR)
|
|
if (!sync) {
|
|
for (var i = 0, l = cbs.length; i < l; i++) {
|
|
cbs[i](res);
|
|
}
|
|
}
|
|
};
|
|
|
|
var reject = function (reason) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
"Failed to resolve async component: " + (String(factory)) +
|
|
(reason ? ("\nReason: " + reason) : '')
|
|
);
|
|
};
|
|
|
|
var res = factory(resolve, reject);
|
|
|
|
// handle promise
|
|
if (res && typeof res.then === 'function' && !factory.resolved) {
|
|
res.then(resolve, reject);
|
|
}
|
|
|
|
sync = false;
|
|
// return in case resolved synchronously
|
|
return factory.resolved
|
|
}
|
|
}
|
|
|
|
function extractProps (data, Ctor) {
|
|
// we are only extracting raw values here.
|
|
// validation and default values are handled in the child
|
|
// component itself.
|
|
var propOptions = Ctor.options.props;
|
|
if (!propOptions) {
|
|
return
|
|
}
|
|
var res = {};
|
|
var attrs = data.attrs;
|
|
var props = data.props;
|
|
var domProps = data.domProps;
|
|
if (attrs || props || domProps) {
|
|
for (var key in propOptions) {
|
|
var altKey = hyphenate(key);
|
|
checkProp(res, props, key, altKey, true) ||
|
|
checkProp(res, attrs, key, altKey) ||
|
|
checkProp(res, domProps, key, altKey);
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
function checkProp (
|
|
res,
|
|
hash,
|
|
key,
|
|
altKey,
|
|
preserve
|
|
) {
|
|
if (hash) {
|
|
if (hasOwn(hash, key)) {
|
|
res[key] = hash[key];
|
|
if (!preserve) {
|
|
delete hash[key];
|
|
}
|
|
return true
|
|
} else if (hasOwn(hash, altKey)) {
|
|
res[key] = hash[altKey];
|
|
if (!preserve) {
|
|
delete hash[altKey];
|
|
}
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
function mergeHooks (data) {
|
|
if (!data.hook) {
|
|
data.hook = {};
|
|
}
|
|
for (var i = 0; i < hooksToMerge.length; i++) {
|
|
var key = hooksToMerge[i];
|
|
var fromParent = data.hook[key];
|
|
var ours = hooks[key];
|
|
data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
|
|
}
|
|
}
|
|
|
|
function mergeHook$1 (one, two) {
|
|
return function (a, b, c, d) {
|
|
one(a, b, c, d);
|
|
two(a, b, c, d);
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
function mergeVNodeHook (def, hookKey, hook, key) {
|
|
key = key + hookKey;
|
|
var injectedHash = def.__injected || (def.__injected = {});
|
|
if (!injectedHash[key]) {
|
|
injectedHash[key] = true;
|
|
var oldHook = def[hookKey];
|
|
if (oldHook) {
|
|
def[hookKey] = function () {
|
|
oldHook.apply(this, arguments);
|
|
hook.apply(this, arguments);
|
|
};
|
|
} else {
|
|
def[hookKey] = hook;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
function updateListeners (
|
|
on,
|
|
oldOn,
|
|
add,
|
|
remove$$1,
|
|
vm
|
|
) {
|
|
var name, cur, old, fn, event, capture, once;
|
|
for (name in on) {
|
|
cur = on[name];
|
|
old = oldOn[name];
|
|
if (!cur) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
"Invalid handler for event \"" + name + "\": got " + String(cur),
|
|
vm
|
|
);
|
|
} else if (!old) {
|
|
once = name.charAt(0) === '~'; // Prefixed last, checked first
|
|
event = once ? name.slice(1) : name;
|
|
capture = event.charAt(0) === '!';
|
|
event = capture ? event.slice(1) : event;
|
|
if (Array.isArray(cur)) {
|
|
add(event, (cur.invoker = arrInvoker(cur)), once, capture);
|
|
} else {
|
|
if (!cur.invoker) {
|
|
fn = cur;
|
|
cur = on[name] = {};
|
|
cur.fn = fn;
|
|
cur.invoker = fnInvoker(cur);
|
|
}
|
|
add(event, cur.invoker, once, capture);
|
|
}
|
|
} else if (cur !== old) {
|
|
if (Array.isArray(old)) {
|
|
old.length = cur.length;
|
|
for (var i = 0; i < old.length; i++) { old[i] = cur[i]; }
|
|
on[name] = old;
|
|
} else {
|
|
old.fn = cur;
|
|
on[name] = old;
|
|
}
|
|
}
|
|
}
|
|
for (name in oldOn) {
|
|
if (!on[name]) {
|
|
once = name.charAt(0) === '~'; // Prefixed last, checked first
|
|
event = once ? name.slice(1) : name;
|
|
capture = event.charAt(0) === '!';
|
|
event = capture ? event.slice(1) : event;
|
|
remove$$1(event, oldOn[name].invoker, capture);
|
|
}
|
|
}
|
|
}
|
|
|
|
function arrInvoker (arr) {
|
|
return function (ev) {
|
|
var arguments$1 = arguments;
|
|
|
|
var single = arguments.length === 1;
|
|
for (var i = 0; i < arr.length; i++) {
|
|
single ? arr[i](ev) : arr[i].apply(null, arguments$1);
|
|
}
|
|
}
|
|
}
|
|
|
|
function fnInvoker (o) {
|
|
return function (ev) {
|
|
var single = arguments.length === 1;
|
|
single ? o.fn(ev) : o.fn.apply(null, arguments);
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
function normalizeChildren (children) {
|
|
return isPrimitive(children)
|
|
? [createTextVNode(children)]
|
|
: Array.isArray(children)
|
|
? normalizeArrayChildren(children)
|
|
: undefined
|
|
}
|
|
|
|
function normalizeArrayChildren (children, nestedIndex) {
|
|
var res = [];
|
|
var i, c, last;
|
|
for (i = 0; i < children.length; i++) {
|
|
c = children[i];
|
|
if (c == null || typeof c === 'boolean') { continue }
|
|
last = res[res.length - 1];
|
|
// nested
|
|
if (Array.isArray(c)) {
|
|
res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)));
|
|
} else if (isPrimitive(c)) {
|
|
if (last && last.text) {
|
|
last.text += String(c);
|
|
} else if (c !== '') {
|
|
// convert primitive to vnode
|
|
res.push(createTextVNode(c));
|
|
}
|
|
} else {
|
|
if (c.text && last && last.text) {
|
|
res[res.length - 1] = createTextVNode(last.text + c.text);
|
|
} else {
|
|
// default key for nested array children (likely generated by v-for)
|
|
if (c.tag && c.key == null && nestedIndex != null) {
|
|
c.key = "__vlist" + nestedIndex + "_" + i + "__";
|
|
}
|
|
res.push(c);
|
|
}
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
/* */
|
|
|
|
function getFirstComponentChild (children) {
|
|
return children && children.filter(function (c) { return c && c.componentOptions; })[0]
|
|
}
|
|
|
|
/* */
|
|
|
|
// wrapper function for providing a more flexible interface
|
|
// without getting yelled at by flow
|
|
function createElement (
|
|
context,
|
|
tag,
|
|
data,
|
|
children,
|
|
needNormalization,
|
|
alwaysNormalize
|
|
) {
|
|
if (Array.isArray(data) || isPrimitive(data)) {
|
|
needNormalization = children;
|
|
children = data;
|
|
data = undefined;
|
|
}
|
|
if (alwaysNormalize) { needNormalization = true; }
|
|
return _createElement(context, tag, data, children, needNormalization)
|
|
}
|
|
|
|
function _createElement (
|
|
context,
|
|
tag,
|
|
data,
|
|
children,
|
|
needNormalization
|
|
) {
|
|
if (data && data.__ob__) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
"Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
|
|
'Always create fresh vnode data objects in each render!',
|
|
context
|
|
);
|
|
return createEmptyVNode()
|
|
}
|
|
if (!tag) {
|
|
// in case of component :is set to falsy value
|
|
return createEmptyVNode()
|
|
}
|
|
// support single function children as default scoped slot
|
|
if (Array.isArray(children) &&
|
|
typeof children[0] === 'function') {
|
|
data = data || {};
|
|
data.scopedSlots = { default: children[0] };
|
|
children.length = 0;
|
|
}
|
|
if (needNormalization) {
|
|
children = normalizeChildren(children);
|
|
}
|
|
var vnode, ns;
|
|
if (typeof tag === 'string') {
|
|
var Ctor;
|
|
ns = config.getTagNamespace(tag);
|
|
if (config.isReservedTag(tag)) {
|
|
// platform built-in elements
|
|
vnode = new VNode(
|
|
config.parsePlatformTagName(tag), data, children,
|
|
undefined, undefined, context
|
|
);
|
|
} else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {
|
|
// component
|
|
vnode = createComponent(Ctor, data, context, children, tag);
|
|
} else {
|
|
// unknown or unlisted namespaced elements
|
|
// check at runtime because it may get assigned a namespace when its
|
|
// parent normalizes children
|
|
ns = tag === 'foreignObject' ? 'xhtml' : ns;
|
|
vnode = new VNode(
|
|
tag, data, children,
|
|
undefined, undefined, context
|
|
);
|
|
}
|
|
} else {
|
|
// direct component options / constructor
|
|
vnode = createComponent(tag, data, context, children);
|
|
}
|
|
if (vnode) {
|
|
if (ns) { applyNS(vnode, ns); }
|
|
return vnode
|
|
} else {
|
|
return createEmptyVNode()
|
|
}
|
|
}
|
|
|
|
function applyNS (vnode, ns) {
|
|
vnode.ns = ns;
|
|
if (vnode.children) {
|
|
for (var i = 0, l = vnode.children.length; i < l; i++) {
|
|
var child = vnode.children[i];
|
|
if (child.tag && !child.ns) {
|
|
applyNS(child, ns);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
function initRender (vm) {
|
|
vm.$vnode = null; // the placeholder node in parent tree
|
|
vm._vnode = null; // the root of the child tree
|
|
vm._staticTrees = null;
|
|
var parentVnode = vm.$options._parentVnode;
|
|
var renderContext = parentVnode && parentVnode.context;
|
|
vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);
|
|
vm.$scopedSlots = {};
|
|
// bind the createElement fn to this instance
|
|
// so that we get proper render context inside it.
|
|
// args order: tag, data, children, needNormalization, alwaysNormalize
|
|
// internal version is used by render functions compiled from templates
|
|
vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
|
|
// normalization is always applied for the public version, used in
|
|
// user-written render functions.
|
|
vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
|
|
if (vm.$options.el) {
|
|
vm.$mount(vm.$options.el);
|
|
}
|
|
}
|
|
|
|
function renderMixin (Vue) {
|
|
Vue.prototype.$nextTick = function (fn) {
|
|
return nextTick(fn, this)
|
|
};
|
|
|
|
Vue.prototype._render = function () {
|
|
var vm = this;
|
|
var ref = vm.$options;
|
|
var render = ref.render;
|
|
var staticRenderFns = ref.staticRenderFns;
|
|
var _parentVnode = ref._parentVnode;
|
|
|
|
if (vm._isMounted) {
|
|
// clone slot nodes on re-renders
|
|
for (var key in vm.$slots) {
|
|
vm.$slots[key] = cloneVNodes(vm.$slots[key]);
|
|
}
|
|
}
|
|
|
|
if (_parentVnode && _parentVnode.data.scopedSlots) {
|
|
vm.$scopedSlots = _parentVnode.data.scopedSlots;
|
|
}
|
|
|
|
if (staticRenderFns && !vm._staticTrees) {
|
|
vm._staticTrees = [];
|
|
}
|
|
// set parent vnode. this allows render functions to have access
|
|
// to the data on the placeholder node.
|
|
vm.$vnode = _parentVnode;
|
|
// render self
|
|
var vnode;
|
|
try {
|
|
vnode = render.call(vm._renderProxy, vm.$createElement);
|
|
} catch (e) {
|
|
/* istanbul ignore else */
|
|
if (config.errorHandler) {
|
|
config.errorHandler.call(null, e, vm);
|
|
} else {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
warn(("Error when rendering " + (formatComponentName(vm)) + ":"));
|
|
}
|
|
throw e
|
|
}
|
|
// return previous vnode to prevent render error causing blank component
|
|
vnode = vm._vnode;
|
|
}
|
|
// return empty vnode in case the render function errored out
|
|
if (!(vnode instanceof VNode)) {
|
|
if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {
|
|
warn(
|
|
'Multiple root nodes returned from render function. Render function ' +
|
|
'should return a single root node.',
|
|
vm
|
|
);
|
|
}
|
|
vnode = createEmptyVNode();
|
|
}
|
|
// set parent
|
|
vnode.parent = _parentVnode;
|
|
return vnode
|
|
};
|
|
|
|
// toString for mustaches
|
|
Vue.prototype._s = _toString;
|
|
// convert text to vnode
|
|
Vue.prototype._v = createTextVNode;
|
|
// number conversion
|
|
Vue.prototype._n = toNumber;
|
|
// empty vnode
|
|
Vue.prototype._e = createEmptyVNode;
|
|
// loose equal
|
|
Vue.prototype._q = looseEqual;
|
|
// loose indexOf
|
|
Vue.prototype._i = looseIndexOf;
|
|
|
|
// render static tree by index
|
|
Vue.prototype._m = function renderStatic (
|
|
index,
|
|
isInFor
|
|
) {
|
|
var tree = this._staticTrees[index];
|
|
// if has already-rendered static tree and not inside v-for,
|
|
// we can reuse the same tree by doing a shallow clone.
|
|
if (tree && !isInFor) {
|
|
return Array.isArray(tree)
|
|
? cloneVNodes(tree)
|
|
: cloneVNode(tree)
|
|
}
|
|
// otherwise, render a fresh tree.
|
|
tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy);
|
|
markStatic(tree, ("__static__" + index), false);
|
|
return tree
|
|
};
|
|
|
|
// mark node as static (v-once)
|
|
Vue.prototype._o = function markOnce (
|
|
tree,
|
|
index,
|
|
key
|
|
) {
|
|
markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
|
|
return tree
|
|
};
|
|
|
|
function markStatic (tree, key, isOnce) {
|
|
if (Array.isArray(tree)) {
|
|
for (var i = 0; i < tree.length; i++) {
|
|
if (tree[i] && typeof tree[i] !== 'string') {
|
|
markStaticNode(tree[i], (key + "_" + i), isOnce);
|
|
}
|
|
}
|
|
} else {
|
|
markStaticNode(tree, key, isOnce);
|
|
}
|
|
}
|
|
|
|
function markStaticNode (node, key, isOnce) {
|
|
node.isStatic = true;
|
|
node.key = key;
|
|
node.isOnce = isOnce;
|
|
}
|
|
|
|
// filter resolution helper
|
|
Vue.prototype._f = function resolveFilter (id) {
|
|
return resolveAsset(this.$options, 'filters', id, true) || identity
|
|
};
|
|
|
|
// render v-for
|
|
Vue.prototype._l = function renderList (
|
|
val,
|
|
render
|
|
) {
|
|
var ret, i, l, keys, key;
|
|
if (Array.isArray(val)) {
|
|
ret = new Array(val.length);
|
|
for (i = 0, l = val.length; i < l; i++) {
|
|
ret[i] = render(val[i], i);
|
|
}
|
|
} else if (typeof val === 'number') {
|
|
ret = new Array(val);
|
|
for (i = 0; i < val; i++) {
|
|
ret[i] = render(i + 1, i);
|
|
}
|
|
} else if (isObject(val)) {
|
|
keys = Object.keys(val);
|
|
ret = new Array(keys.length);
|
|
for (i = 0, l = keys.length; i < l; i++) {
|
|
key = keys[i];
|
|
ret[i] = render(val[key], key, i);
|
|
}
|
|
}
|
|
return ret
|
|
};
|
|
|
|
// renderSlot
|
|
Vue.prototype._t = function (
|
|
name,
|
|
fallback,
|
|
props
|
|
) {
|
|
var scopedSlotFn = this.$scopedSlots[name];
|
|
if (scopedSlotFn) { // scoped slot
|
|
return scopedSlotFn(props || {}) || fallback
|
|
} else {
|
|
var slotNodes = this.$slots[name];
|
|
// warn duplicate slot usage
|
|
if (slotNodes && process.env.NODE_ENV !== 'production') {
|
|
slotNodes._rendered && warn(
|
|
"Duplicate presence of slot \"" + name + "\" found in the same render tree " +
|
|
"- this will likely cause render errors.",
|
|
this
|
|
);
|
|
slotNodes._rendered = true;
|
|
}
|
|
return slotNodes || fallback
|
|
}
|
|
};
|
|
|
|
// apply v-bind object
|
|
Vue.prototype._b = function bindProps (
|
|
data,
|
|
tag,
|
|
value,
|
|
asProp
|
|
) {
|
|
if (value) {
|
|
if (!isObject(value)) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'v-bind without argument expects an Object or Array value',
|
|
this
|
|
);
|
|
} else {
|
|
if (Array.isArray(value)) {
|
|
value = toObject(value);
|
|
}
|
|
for (var key in value) {
|
|
if (key === 'class' || key === 'style') {
|
|
data[key] = value[key];
|
|
} else {
|
|
var hash = asProp || config.mustUseProp(tag, key)
|
|
? data.domProps || (data.domProps = {})
|
|
: data.attrs || (data.attrs = {});
|
|
hash[key] = value[key];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return data
|
|
};
|
|
|
|
// check v-on keyCodes
|
|
Vue.prototype._k = function checkKeyCodes (
|
|
eventKeyCode,
|
|
key,
|
|
builtInAlias
|
|
) {
|
|
var keyCodes = config.keyCodes[key] || builtInAlias;
|
|
if (Array.isArray(keyCodes)) {
|
|
return keyCodes.indexOf(eventKeyCode) === -1
|
|
} else {
|
|
return keyCodes !== eventKeyCode
|
|
}
|
|
};
|
|
}
|
|
|
|
function resolveSlots (
|
|
children,
|
|
context
|
|
) {
|
|
var slots = {};
|
|
if (!children) {
|
|
return slots
|
|
}
|
|
var defaultSlot = [];
|
|
var name, child;
|
|
for (var i = 0, l = children.length; i < l; i++) {
|
|
child = children[i];
|
|
// named slots should only be respected if the vnode was rendered in the
|
|
// same context.
|
|
if ((child.context === context || child.functionalContext === context) &&
|
|
child.data && (name = child.data.slot)) {
|
|
var slot = (slots[name] || (slots[name] = []));
|
|
if (child.tag === 'template') {
|
|
slot.push.apply(slot, child.children);
|
|
} else {
|
|
slot.push(child);
|
|
}
|
|
} else {
|
|
defaultSlot.push(child);
|
|
}
|
|
}
|
|
// ignore single whitespace
|
|
if (defaultSlot.length && !(
|
|
defaultSlot.length === 1 &&
|
|
(defaultSlot[0].text === ' ' || defaultSlot[0].isComment)
|
|
)) {
|
|
slots.default = defaultSlot;
|
|
}
|
|
return slots
|
|
}
|
|
|
|
/* */
|
|
|
|
function initEvents (vm) {
|
|
vm._events = Object.create(null);
|
|
// init parent attached events
|
|
var listeners = vm.$options._parentListeners;
|
|
var add = function (event, fn, once) {
|
|
once ? vm.$once(event, fn) : vm.$on(event, fn);
|
|
};
|
|
var remove$$1 = bind$1(vm.$off, vm);
|
|
vm._updateListeners = function (listeners, oldListeners) {
|
|
updateListeners(listeners, oldListeners || {}, add, remove$$1, vm);
|
|
};
|
|
if (listeners) {
|
|
vm._updateListeners(listeners);
|
|
}
|
|
}
|
|
|
|
function eventsMixin (Vue) {
|
|
Vue.prototype.$on = function (event, fn) {
|
|
var vm = this;(vm._events[event] || (vm._events[event] = [])).push(fn);
|
|
return vm
|
|
};
|
|
|
|
Vue.prototype.$once = function (event, fn) {
|
|
var vm = this;
|
|
function on () {
|
|
vm.$off(event, on);
|
|
fn.apply(vm, arguments);
|
|
}
|
|
on.fn = fn;
|
|
vm.$on(event, on);
|
|
return vm
|
|
};
|
|
|
|
Vue.prototype.$off = function (event, fn) {
|
|
var vm = this;
|
|
// all
|
|
if (!arguments.length) {
|
|
vm._events = Object.create(null);
|
|
return vm
|
|
}
|
|
// specific event
|
|
var cbs = vm._events[event];
|
|
if (!cbs) {
|
|
return vm
|
|
}
|
|
if (arguments.length === 1) {
|
|
vm._events[event] = null;
|
|
return vm
|
|
}
|
|
// specific handler
|
|
var cb;
|
|
var i = cbs.length;
|
|
while (i--) {
|
|
cb = cbs[i];
|
|
if (cb === fn || cb.fn === fn) {
|
|
cbs.splice(i, 1);
|
|
break
|
|
}
|
|
}
|
|
return vm
|
|
};
|
|
|
|
Vue.prototype.$emit = function (event) {
|
|
var vm = this;
|
|
var cbs = vm._events[event];
|
|
if (cbs) {
|
|
cbs = cbs.length > 1 ? toArray(cbs) : cbs;
|
|
var args = toArray(arguments, 1);
|
|
for (var i = 0, l = cbs.length; i < l; i++) {
|
|
cbs[i].apply(vm, args);
|
|
}
|
|
}
|
|
return vm
|
|
};
|
|
}
|
|
|
|
/* */
|
|
|
|
var uid = 0;
|
|
|
|
function initMixin (Vue) {
|
|
Vue.prototype._init = function (options) {
|
|
var vm = this;
|
|
// a uid
|
|
vm._uid = uid++;
|
|
// a flag to avoid this being observed
|
|
vm._isVue = true;
|
|
// merge options
|
|
if (options && options._isComponent) {
|
|
// optimize internal component instantiation
|
|
// since dynamic options merging is pretty slow, and none of the
|
|
// internal component options needs special treatment.
|
|
initInternalComponent(vm, options);
|
|
} else {
|
|
vm.$options = mergeOptions(
|
|
resolveConstructorOptions(vm.constructor),
|
|
options || {},
|
|
vm
|
|
);
|
|
}
|
|
/* istanbul ignore else */
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
initProxy(vm);
|
|
} else {
|
|
vm._renderProxy = vm;
|
|
}
|
|
// expose real self
|
|
vm._self = vm;
|
|
initLifecycle(vm);
|
|
initEvents(vm);
|
|
callHook(vm, 'beforeCreate');
|
|
initState(vm);
|
|
callHook(vm, 'created');
|
|
initRender(vm);
|
|
};
|
|
}
|
|
|
|
function initInternalComponent (vm, options) {
|
|
var opts = vm.$options = Object.create(vm.constructor.options);
|
|
// doing this because it's faster than dynamic enumeration.
|
|
opts.parent = options.parent;
|
|
opts.propsData = options.propsData;
|
|
opts._parentVnode = options._parentVnode;
|
|
opts._parentListeners = options._parentListeners;
|
|
opts._renderChildren = options._renderChildren;
|
|
opts._componentTag = options._componentTag;
|
|
opts._parentElm = options._parentElm;
|
|
opts._refElm = options._refElm;
|
|
if (options.render) {
|
|
opts.render = options.render;
|
|
opts.staticRenderFns = options.staticRenderFns;
|
|
}
|
|
}
|
|
|
|
function resolveConstructorOptions (Ctor) {
|
|
var options = Ctor.options;
|
|
if (Ctor.super) {
|
|
var superOptions = Ctor.super.options;
|
|
var cachedSuperOptions = Ctor.superOptions;
|
|
var extendOptions = Ctor.extendOptions;
|
|
if (superOptions !== cachedSuperOptions) {
|
|
// super option changed
|
|
Ctor.superOptions = superOptions;
|
|
extendOptions.render = options.render;
|
|
extendOptions.staticRenderFns = options.staticRenderFns;
|
|
extendOptions._scopeId = options._scopeId;
|
|
options = Ctor.options = mergeOptions(superOptions, extendOptions);
|
|
if (options.name) {
|
|
options.components[options.name] = Ctor;
|
|
}
|
|
}
|
|
}
|
|
return options
|
|
}
|
|
|
|
function Vue$2 (options) {
|
|
if (process.env.NODE_ENV !== 'production' &&
|
|
!(this instanceof Vue$2)) {
|
|
warn('Vue is a constructor and should be called with the `new` keyword');
|
|
}
|
|
this._init(options);
|
|
}
|
|
|
|
initMixin(Vue$2);
|
|
stateMixin(Vue$2);
|
|
eventsMixin(Vue$2);
|
|
lifecycleMixin(Vue$2);
|
|
renderMixin(Vue$2);
|
|
|
|
/* */
|
|
|
|
function initUse (Vue) {
|
|
Vue.use = function (plugin) {
|
|
/* istanbul ignore if */
|
|
if (plugin.installed) {
|
|
return
|
|
}
|
|
// additional parameters
|
|
var args = toArray(arguments, 1);
|
|
args.unshift(this);
|
|
if (typeof plugin.install === 'function') {
|
|
plugin.install.apply(plugin, args);
|
|
} else {
|
|
plugin.apply(null, args);
|
|
}
|
|
plugin.installed = true;
|
|
return this
|
|
};
|
|
}
|
|
|
|
/* */
|
|
|
|
function initMixin$1 (Vue) {
|
|
Vue.mixin = function (mixin) {
|
|
this.options = mergeOptions(this.options, mixin);
|
|
};
|
|
}
|
|
|
|
/* */
|
|
|
|
function initExtend (Vue) {
|
|
/**
|
|
* Each instance constructor, including Vue, has a unique
|
|
* cid. This enables us to create wrapped "child
|
|
* constructors" for prototypal inheritance and cache them.
|
|
*/
|
|
Vue.cid = 0;
|
|
var cid = 1;
|
|
|
|
/**
|
|
* Class inheritance
|
|
*/
|
|
Vue.extend = function (extendOptions) {
|
|
extendOptions = extendOptions || {};
|
|
var Super = this;
|
|
var SuperId = Super.cid;
|
|
var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
|
|
if (cachedCtors[SuperId]) {
|
|
return cachedCtors[SuperId]
|
|
}
|
|
var name = extendOptions.name || Super.options.name;
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
if (!/^[a-zA-Z][\w-]*$/.test(name)) {
|
|
warn(
|
|
'Invalid component name: "' + name + '". Component names ' +
|
|
'can only contain alphanumeric characters and the hyphen, ' +
|
|
'and must start with a letter.'
|
|
);
|
|
}
|
|
}
|
|
var Sub = function VueComponent (options) {
|
|
this._init(options);
|
|
};
|
|
Sub.prototype = Object.create(Super.prototype);
|
|
Sub.prototype.constructor = Sub;
|
|
Sub.cid = cid++;
|
|
Sub.options = mergeOptions(
|
|
Super.options,
|
|
extendOptions
|
|
);
|
|
Sub['super'] = Super;
|
|
// allow further extension/mixin/plugin usage
|
|
Sub.extend = Super.extend;
|
|
Sub.mixin = Super.mixin;
|
|
Sub.use = Super.use;
|
|
// create asset registers, so extended classes
|
|
// can have their private assets too.
|
|
config._assetTypes.forEach(function (type) {
|
|
Sub[type] = Super[type];
|
|
});
|
|
// enable recursive self-lookup
|
|
if (name) {
|
|
Sub.options.components[name] = Sub;
|
|
}
|
|
// keep a reference to the super options at extension time.
|
|
// later at instantiation we can check if Super's options have
|
|
// been updated.
|
|
Sub.superOptions = Super.options;
|
|
Sub.extendOptions = extendOptions;
|
|
// cache constructor
|
|
cachedCtors[SuperId] = Sub;
|
|
return Sub
|
|
};
|
|
}
|
|
|
|
/* */
|
|
|
|
function initAssetRegisters (Vue) {
|
|
/**
|
|
* Create asset registration methods.
|
|
*/
|
|
config._assetTypes.forEach(function (type) {
|
|
Vue[type] = function (
|
|
id,
|
|
definition
|
|
) {
|
|
if (!definition) {
|
|
return this.options[type + 's'][id]
|
|
} else {
|
|
/* istanbul ignore if */
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
if (type === 'component' && config.isReservedTag(id)) {
|
|
warn(
|
|
'Do not use built-in or reserved HTML elements as component ' +
|
|
'id: ' + id
|
|
);
|
|
}
|
|
}
|
|
if (type === 'component' && isPlainObject(definition)) {
|
|
definition.name = definition.name || id;
|
|
definition = this.options._base.extend(definition);
|
|
}
|
|
if (type === 'directive' && typeof definition === 'function') {
|
|
definition = { bind: definition, update: definition };
|
|
}
|
|
this.options[type + 's'][id] = definition;
|
|
return definition
|
|
}
|
|
};
|
|
});
|
|
}
|
|
|
|
/* */
|
|
|
|
var patternTypes = [String, RegExp];
|
|
|
|
function matches (pattern, name) {
|
|
if (typeof pattern === 'string') {
|
|
return pattern.split(',').indexOf(name) > -1
|
|
} else {
|
|
return pattern.test(name)
|
|
}
|
|
}
|
|
|
|
var KeepAlive = {
|
|
name: 'keep-alive',
|
|
abstract: true,
|
|
props: {
|
|
include: patternTypes,
|
|
exclude: patternTypes
|
|
},
|
|
created: function created () {
|
|
this.cache = Object.create(null);
|
|
},
|
|
render: function render () {
|
|
var vnode = getFirstComponentChild(this.$slots.default);
|
|
if (vnode && vnode.componentOptions) {
|
|
var opts = vnode.componentOptions;
|
|
// check pattern
|
|
var name = opts.Ctor.options.name || opts.tag;
|
|
if (name && (
|
|
(this.include && !matches(this.include, name)) ||
|
|
(this.exclude && matches(this.exclude, name))
|
|
)) {
|
|
return vnode
|
|
}
|
|
var key = vnode.key == null
|
|
// same constructor may get registered as different local components
|
|
// so cid alone is not enough (#3269)
|
|
? opts.Ctor.cid + (opts.tag ? ("::" + (opts.tag)) : '')
|
|
: vnode.key;
|
|
if (this.cache[key]) {
|
|
vnode.child = this.cache[key].child;
|
|
} else {
|
|
this.cache[key] = vnode;
|
|
}
|
|
vnode.data.keepAlive = true;
|
|
}
|
|
return vnode
|
|
},
|
|
destroyed: function destroyed () {
|
|
var this$1 = this;
|
|
|
|
for (var key in this.cache) {
|
|
var vnode = this$1.cache[key];
|
|
callHook(vnode.child, 'deactivated');
|
|
vnode.child.$destroy();
|
|
}
|
|
}
|
|
};
|
|
|
|
var builtInComponents = {
|
|
KeepAlive: KeepAlive
|
|
};
|
|
|
|
/* */
|
|
|
|
function initGlobalAPI (Vue) {
|
|
// config
|
|
var configDef = {};
|
|
configDef.get = function () { return config; };
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
configDef.set = function () {
|
|
warn(
|
|
'Do not replace the Vue.config object, set individual fields instead.'
|
|
);
|
|
};
|
|
}
|
|
Object.defineProperty(Vue, 'config', configDef);
|
|
Vue.util = util;
|
|
Vue.set = set$1;
|
|
Vue.delete = del;
|
|
Vue.nextTick = nextTick;
|
|
|
|
Vue.options = Object.create(null);
|
|
config._assetTypes.forEach(function (type) {
|
|
Vue.options[type + 's'] = Object.create(null);
|
|
});
|
|
|
|
// this is used to identify the "base" constructor to extend all plain-object
|
|
// components with in Weex's multi-instance scenarios.
|
|
Vue.options._base = Vue;
|
|
|
|
extend(Vue.options.components, builtInComponents);
|
|
|
|
initUse(Vue);
|
|
initMixin$1(Vue);
|
|
initExtend(Vue);
|
|
initAssetRegisters(Vue);
|
|
}
|
|
|
|
initGlobalAPI(Vue$2);
|
|
|
|
Object.defineProperty(Vue$2.prototype, '$isServer', {
|
|
get: isServerRendering
|
|
});
|
|
|
|
Vue$2.version = '2.1.6';
|
|
|
|
/* */
|
|
|
|
// attributes that should be using props for binding
|
|
var acceptValue = makeMap('input,textarea,option,select');
|
|
var mustUseProp = function (tag, attr) {
|
|
return (
|
|
(attr === 'value' && acceptValue(tag)) ||
|
|
(attr === 'selected' && tag === 'option') ||
|
|
(attr === 'checked' && tag === 'input') ||
|
|
(attr === 'muted' && tag === 'video')
|
|
)
|
|
};
|
|
|
|
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
|
|
|
var isBooleanAttr = makeMap(
|
|
'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
|
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
|
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
|
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
|
'required,reversed,scoped,seamless,selected,sortable,translate,' +
|
|
'truespeed,typemustmatch,visible'
|
|
);
|
|
|
|
var xlinkNS = 'http://www.w3.org/1999/xlink';
|
|
|
|
var isXlink = function (name) {
|
|
return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
|
|
};
|
|
|
|
var getXlinkProp = function (name) {
|
|
return isXlink(name) ? name.slice(6, name.length) : ''
|
|
};
|
|
|
|
var isFalsyAttrValue = function (val) {
|
|
return val == null || val === false
|
|
};
|
|
|
|
/* */
|
|
|
|
function genClassForVnode (vnode) {
|
|
var data = vnode.data;
|
|
var parentNode = vnode;
|
|
var childNode = vnode;
|
|
while (childNode.child) {
|
|
childNode = childNode.child._vnode;
|
|
if (childNode.data) {
|
|
data = mergeClassData(childNode.data, data);
|
|
}
|
|
}
|
|
while ((parentNode = parentNode.parent)) {
|
|
if (parentNode.data) {
|
|
data = mergeClassData(data, parentNode.data);
|
|
}
|
|
}
|
|
return genClassFromData(data)
|
|
}
|
|
|
|
function mergeClassData (child, parent) {
|
|
return {
|
|
staticClass: concat(child.staticClass, parent.staticClass),
|
|
class: child.class
|
|
? [child.class, parent.class]
|
|
: parent.class
|
|
}
|
|
}
|
|
|
|
function genClassFromData (data) {
|
|
var dynamicClass = data.class;
|
|
var staticClass = data.staticClass;
|
|
if (staticClass || dynamicClass) {
|
|
return concat(staticClass, stringifyClass(dynamicClass))
|
|
}
|
|
/* istanbul ignore next */
|
|
return ''
|
|
}
|
|
|
|
function concat (a, b) {
|
|
return a ? b ? (a + ' ' + b) : a : (b || '')
|
|
}
|
|
|
|
function stringifyClass (value) {
|
|
var res = '';
|
|
if (!value) {
|
|
return res
|
|
}
|
|
if (typeof value === 'string') {
|
|
return value
|
|
}
|
|
if (Array.isArray(value)) {
|
|
var stringified;
|
|
for (var i = 0, l = value.length; i < l; i++) {
|
|
if (value[i]) {
|
|
if ((stringified = stringifyClass(value[i]))) {
|
|
res += stringified + ' ';
|
|
}
|
|
}
|
|
}
|
|
return res.slice(0, -1)
|
|
}
|
|
if (isObject(value)) {
|
|
for (var key in value) {
|
|
if (value[key]) { res += key + ' '; }
|
|
}
|
|
return res.slice(0, -1)
|
|
}
|
|
/* istanbul ignore next */
|
|
return res
|
|
}
|
|
|
|
/* */
|
|
|
|
var namespaceMap = {
|
|
svg: 'http://www.w3.org/2000/svg',
|
|
math: 'http://www.w3.org/1998/Math/MathML',
|
|
xhtml: 'http://www.w3.org/1999/xhtml'
|
|
};
|
|
|
|
var isHTMLTag = makeMap(
|
|
'html,body,base,head,link,meta,style,title,' +
|
|
'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
|
|
'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +
|
|
'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
|
|
's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
|
|
'embed,object,param,source,canvas,script,noscript,del,ins,' +
|
|
'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
|
|
'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
|
|
'output,progress,select,textarea,' +
|
|
'details,dialog,menu,menuitem,summary,' +
|
|
'content,element,shadow,template'
|
|
);
|
|
|
|
// this map is intentionally selective, only covering SVG elements that may
|
|
// contain child elements.
|
|
var isSVG = makeMap(
|
|
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,' +
|
|
'font-face,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
|
|
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
|
|
true
|
|
);
|
|
|
|
|
|
|
|
var isReservedTag = function (tag) {
|
|
return isHTMLTag(tag) || isSVG(tag)
|
|
};
|
|
|
|
function getTagNamespace (tag) {
|
|
if (isSVG(tag)) {
|
|
return 'svg'
|
|
}
|
|
// basic support for MathML
|
|
// note it doesn't support other MathML elements being component roots
|
|
if (tag === 'math') {
|
|
return 'math'
|
|
}
|
|
}
|
|
|
|
var unknownElementCache = Object.create(null);
|
|
function isUnknownElement (tag) {
|
|
/* istanbul ignore if */
|
|
if (!inBrowser) {
|
|
return true
|
|
}
|
|
if (isReservedTag(tag)) {
|
|
return false
|
|
}
|
|
tag = tag.toLowerCase();
|
|
/* istanbul ignore if */
|
|
if (unknownElementCache[tag] != null) {
|
|
return unknownElementCache[tag]
|
|
}
|
|
var el = document.createElement(tag);
|
|
if (tag.indexOf('-') > -1) {
|
|
// http://stackoverflow.com/a/28210364/1070244
|
|
return (unknownElementCache[tag] = (
|
|
el.constructor === window.HTMLUnknownElement ||
|
|
el.constructor === window.HTMLElement
|
|
))
|
|
} else {
|
|
return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
/**
|
|
* Query an element selector if it's not an element already.
|
|
*/
|
|
function query (el) {
|
|
if (typeof el === 'string') {
|
|
var selector = el;
|
|
el = document.querySelector(el);
|
|
if (!el) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
'Cannot find element: ' + selector
|
|
);
|
|
return document.createElement('div')
|
|
}
|
|
}
|
|
return el
|
|
}
|
|
|
|
/* */
|
|
|
|
function createElement$1 (tagName, vnode) {
|
|
var elm = document.createElement(tagName);
|
|
if (tagName !== 'select') {
|
|
return elm
|
|
}
|
|
if (vnode.data && vnode.data.attrs && 'multiple' in vnode.data.attrs) {
|
|
elm.setAttribute('multiple', 'multiple');
|
|
}
|
|
return elm
|
|
}
|
|
|
|
function createElementNS (namespace, tagName) {
|
|
return document.createElementNS(namespaceMap[namespace], tagName)
|
|
}
|
|
|
|
function createTextNode (text) {
|
|
return document.createTextNode(text)
|
|
}
|
|
|
|
function createComment (text) {
|
|
return document.createComment(text)
|
|
}
|
|
|
|
function insertBefore (parentNode, newNode, referenceNode) {
|
|
parentNode.insertBefore(newNode, referenceNode);
|
|
}
|
|
|
|
function removeChild (node, child) {
|
|
node.removeChild(child);
|
|
}
|
|
|
|
function appendChild (node, child) {
|
|
node.appendChild(child);
|
|
}
|
|
|
|
function parentNode (node) {
|
|
return node.parentNode
|
|
}
|
|
|
|
function nextSibling (node) {
|
|
return node.nextSibling
|
|
}
|
|
|
|
function tagName (node) {
|
|
return node.tagName
|
|
}
|
|
|
|
function setTextContent (node, text) {
|
|
node.textContent = text;
|
|
}
|
|
|
|
function setAttribute (node, key, val) {
|
|
node.setAttribute(key, val);
|
|
}
|
|
|
|
|
|
var nodeOps = Object.freeze({
|
|
createElement: createElement$1,
|
|
createElementNS: createElementNS,
|
|
createTextNode: createTextNode,
|
|
createComment: createComment,
|
|
insertBefore: insertBefore,
|
|
removeChild: removeChild,
|
|
appendChild: appendChild,
|
|
parentNode: parentNode,
|
|
nextSibling: nextSibling,
|
|
tagName: tagName,
|
|
setTextContent: setTextContent,
|
|
setAttribute: setAttribute
|
|
});
|
|
|
|
/* */
|
|
|
|
var ref = {
|
|
create: function create (_, vnode) {
|
|
registerRef(vnode);
|
|
},
|
|
update: function update (oldVnode, vnode) {
|
|
if (oldVnode.data.ref !== vnode.data.ref) {
|
|
registerRef(oldVnode, true);
|
|
registerRef(vnode);
|
|
}
|
|
},
|
|
destroy: function destroy (vnode) {
|
|
registerRef(vnode, true);
|
|
}
|
|
};
|
|
|
|
function registerRef (vnode, isRemoval) {
|
|
var key = vnode.data.ref;
|
|
if (!key) { return }
|
|
|
|
var vm = vnode.context;
|
|
var ref = vnode.child || vnode.elm;
|
|
var refs = vm.$refs;
|
|
if (isRemoval) {
|
|
if (Array.isArray(refs[key])) {
|
|
remove$1(refs[key], ref);
|
|
} else if (refs[key] === ref) {
|
|
refs[key] = undefined;
|
|
}
|
|
} else {
|
|
if (vnode.data.refInFor) {
|
|
if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {
|
|
refs[key].push(ref);
|
|
} else {
|
|
refs[key] = [ref];
|
|
}
|
|
} else {
|
|
refs[key] = ref;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
* Simon Friis Vindum (@paldepind)
|
|
* Licensed under the MIT License
|
|
* https://github.com/paldepind/snabbdom/blob/master/LICENSE
|
|
*
|
|
* modified by Evan You (@yyx990803)
|
|
*
|
|
|
|
/*
|
|
* Not type-checking this because this file is perf-critical and the cost
|
|
* of making flow understand it is not worth it.
|
|
*/
|
|
|
|
var emptyNode = new VNode('', {}, []);
|
|
|
|
var hooks$1 = ['create', 'activate', 'update', 'remove', 'destroy'];
|
|
|
|
function isUndef (s) {
|
|
return s == null
|
|
}
|
|
|
|
function isDef (s) {
|
|
return s != null
|
|
}
|
|
|
|
function sameVnode (vnode1, vnode2) {
|
|
return (
|
|
vnode1.key === vnode2.key &&
|
|
vnode1.tag === vnode2.tag &&
|
|
vnode1.isComment === vnode2.isComment &&
|
|
!vnode1.data === !vnode2.data
|
|
)
|
|
}
|
|
|
|
function createKeyToOldIdx (children, beginIdx, endIdx) {
|
|
var i, key;
|
|
var map = {};
|
|
for (i = beginIdx; i <= endIdx; ++i) {
|
|
key = children[i].key;
|
|
if (isDef(key)) { map[key] = i; }
|
|
}
|
|
return map
|
|
}
|
|
|
|
function createPatchFunction (backend) {
|
|
var i, j;
|
|
var cbs = {};
|
|
|
|
var modules = backend.modules;
|
|
var nodeOps = backend.nodeOps;
|
|
|
|
for (i = 0; i < hooks$1.length; ++i) {
|
|
cbs[hooks$1[i]] = [];
|
|
for (j = 0; j < modules.length; ++j) {
|
|
if (modules[j][hooks$1[i]] !== undefined) { cbs[hooks$1[i]].push(modules[j][hooks$1[i]]); }
|
|
}
|
|
}
|
|
|
|
function emptyNodeAt (elm) {
|
|
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
|
|
}
|
|
|
|
function createRmCb (childElm, listeners) {
|
|
function remove$$1 () {
|
|
if (--remove$$1.listeners === 0) {
|
|
removeElement(childElm);
|
|
}
|
|
}
|
|
remove$$1.listeners = listeners;
|
|
return remove$$1
|
|
}
|
|
|
|
function removeElement (el) {
|
|
var parent = nodeOps.parentNode(el);
|
|
// element may have already been removed due to v-html
|
|
if (parent) {
|
|
nodeOps.removeChild(parent, el);
|
|
}
|
|
}
|
|
|
|
var inPre = 0;
|
|
function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {
|
|
vnode.isRootInsert = !nested; // for transition enter check
|
|
if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
|
|
return
|
|
}
|
|
|
|
var data = vnode.data;
|
|
var children = vnode.children;
|
|
var tag = vnode.tag;
|
|
if (isDef(tag)) {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
if (data && data.pre) {
|
|
inPre++;
|
|
}
|
|
if (
|
|
!inPre &&
|
|
!vnode.ns &&
|
|
!(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) &&
|
|
config.isUnknownElement(tag)
|
|
) {
|
|
warn(
|
|
'Unknown custom element: <' + tag + '> - did you ' +
|
|
'register the component correctly? For recursive components, ' +
|
|
'make sure to provide the "name" option.',
|
|
vnode.context
|
|
);
|
|
}
|
|
}
|
|
vnode.elm = vnode.ns
|
|
? nodeOps.createElementNS(vnode.ns, tag)
|
|
: nodeOps.createElement(tag, vnode);
|
|
setScope(vnode);
|
|
|
|
/* istanbul ignore if */
|
|
{
|
|
createChildren(vnode, children, insertedVnodeQueue);
|
|
if (isDef(data)) {
|
|
invokeCreateHooks(vnode, insertedVnodeQueue);
|
|
}
|
|
insert(parentElm, vnode.elm, refElm);
|
|
}
|
|
|
|
if (process.env.NODE_ENV !== 'production' && data && data.pre) {
|
|
inPre--;
|
|
}
|
|
} else if (vnode.isComment) {
|
|
vnode.elm = nodeOps.createComment(vnode.text);
|
|
insert(parentElm, vnode.elm, refElm);
|
|
} else {
|
|
vnode.elm = nodeOps.createTextNode(vnode.text);
|
|
insert(parentElm, vnode.elm, refElm);
|
|
}
|
|
}
|
|
|
|
function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
|
|
var i = vnode.data;
|
|
if (isDef(i)) {
|
|
var isReactivated = isDef(vnode.child) && i.keepAlive;
|
|
if (isDef(i = i.hook) && isDef(i = i.init)) {
|
|
i(vnode, false /* hydrating */, parentElm, refElm);
|
|
}
|
|
// after calling the init hook, if the vnode is a child component
|
|
// it should've created a child instance and mounted it. the child
|
|
// component also has set the placeholder vnode's elm.
|
|
// in that case we can just return the element and be done.
|
|
if (isDef(vnode.child)) {
|
|
initComponent(vnode, insertedVnodeQueue);
|
|
if (isReactivated) {
|
|
reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
|
|
}
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
|
|
function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
|
|
var i;
|
|
// hack for #4339: a reactivated component with inner transition
|
|
// does not trigger because the inner node's created hooks are not called
|
|
// again. It's not ideal to involve module-specific logic in here but
|
|
// there doesn't seem to be a better way to do it.
|
|
var innerNode = vnode;
|
|
while (innerNode.child) {
|
|
innerNode = innerNode.child._vnode;
|
|
if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
|
|
for (i = 0; i < cbs.activate.length; ++i) {
|
|
cbs.activate[i](emptyNode, innerNode);
|
|
}
|
|
insertedVnodeQueue.push(innerNode);
|
|
break
|
|
}
|
|
}
|
|
// unlike a newly created component,
|
|
// a reactivated keep-alive component doesn't insert itself
|
|
insert(parentElm, vnode.elm, refElm);
|
|
}
|
|
|
|
function insert (parent, elm, ref) {
|
|
if (parent) {
|
|
if (ref) {
|
|
nodeOps.insertBefore(parent, elm, ref);
|
|
} else {
|
|
nodeOps.appendChild(parent, elm);
|
|
}
|
|
}
|
|
}
|
|
|
|
function createChildren (vnode, children, insertedVnodeQueue) {
|
|
if (Array.isArray(children)) {
|
|
for (var i = 0; i < children.length; ++i) {
|
|
createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);
|
|
}
|
|
} else if (isPrimitive(vnode.text)) {
|
|
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));
|
|
}
|
|
}
|
|
|
|
function isPatchable (vnode) {
|
|
while (vnode.child) {
|
|
vnode = vnode.child._vnode;
|
|
}
|
|
return isDef(vnode.tag)
|
|
}
|
|
|
|
function invokeCreateHooks (vnode, insertedVnodeQueue) {
|
|
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
|
|
cbs.create[i$1](emptyNode, vnode);
|
|
}
|
|
i = vnode.data.hook; // Reuse variable
|
|
if (isDef(i)) {
|
|
if (i.create) { i.create(emptyNode, vnode); }
|
|
if (i.insert) { insertedVnodeQueue.push(vnode); }
|
|
}
|
|
}
|
|
|
|
function initComponent (vnode, insertedVnodeQueue) {
|
|
if (vnode.data.pendingInsert) {
|
|
insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
|
|
}
|
|
vnode.elm = vnode.child.$el;
|
|
if (isPatchable(vnode)) {
|
|
invokeCreateHooks(vnode, insertedVnodeQueue);
|
|
setScope(vnode);
|
|
} else {
|
|
// empty component root.
|
|
// skip all element-related modules except for ref (#3455)
|
|
registerRef(vnode);
|
|
// make sure to invoke the insert hook
|
|
insertedVnodeQueue.push(vnode);
|
|
}
|
|
}
|
|
|
|
// set scope id attribute for scoped CSS.
|
|
// this is implemented as a special case to avoid the overhead
|
|
// of going through the normal attribute patching process.
|
|
function setScope (vnode) {
|
|
var i;
|
|
if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {
|
|
nodeOps.setAttribute(vnode.elm, i, '');
|
|
}
|
|
if (isDef(i = activeInstance) &&
|
|
i !== vnode.context &&
|
|
isDef(i = i.$options._scopeId)) {
|
|
nodeOps.setAttribute(vnode.elm, i, '');
|
|
}
|
|
}
|
|
|
|
function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
|
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);
|
|
}
|
|
}
|
|
|
|
function invokeDestroyHook (vnode) {
|
|
var i, j;
|
|
var data = vnode.data;
|
|
if (isDef(data)) {
|
|
if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
|
|
for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
|
|
}
|
|
if (isDef(i = vnode.children)) {
|
|
for (j = 0; j < vnode.children.length; ++j) {
|
|
invokeDestroyHook(vnode.children[j]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
|
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
var ch = vnodes[startIdx];
|
|
if (isDef(ch)) {
|
|
if (isDef(ch.tag)) {
|
|
removeAndInvokeRemoveHook(ch);
|
|
invokeDestroyHook(ch);
|
|
} else { // Text node
|
|
nodeOps.removeChild(parentElm, ch.elm);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function removeAndInvokeRemoveHook (vnode, rm) {
|
|
if (rm || isDef(vnode.data)) {
|
|
var listeners = cbs.remove.length + 1;
|
|
if (!rm) {
|
|
// directly removing
|
|
rm = createRmCb(vnode.elm, listeners);
|
|
} else {
|
|
// we have a recursively passed down rm callback
|
|
// increase the listeners count
|
|
rm.listeners += listeners;
|
|
}
|
|
// recursively invoke hooks on child component root node
|
|
if (isDef(i = vnode.child) && isDef(i = i._vnode) && isDef(i.data)) {
|
|
removeAndInvokeRemoveHook(i, rm);
|
|
}
|
|
for (i = 0; i < cbs.remove.length; ++i) {
|
|
cbs.remove[i](vnode, rm);
|
|
}
|
|
if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
|
|
i(vnode, rm);
|
|
} else {
|
|
rm();
|
|
}
|
|
} else {
|
|
removeElement(vnode.elm);
|
|
}
|
|
}
|
|
|
|
function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
|
|
var oldStartIdx = 0;
|
|
var newStartIdx = 0;
|
|
var oldEndIdx = oldCh.length - 1;
|
|
var oldStartVnode = oldCh[0];
|
|
var oldEndVnode = oldCh[oldEndIdx];
|
|
var newEndIdx = newCh.length - 1;
|
|
var newStartVnode = newCh[0];
|
|
var newEndVnode = newCh[newEndIdx];
|
|
var oldKeyToIdx, idxInOld, elmToMove, refElm;
|
|
|
|
// removeOnly is a special flag used only by <transition-group>
|
|
// to ensure removed elements stay in correct relative positions
|
|
// during leaving transitions
|
|
var canMove = !removeOnly;
|
|
|
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
if (isUndef(oldStartVnode)) {
|
|
oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
|
|
} else if (isUndef(oldEndVnode)) {
|
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
} else if (sameVnode(oldStartVnode, newStartVnode)) {
|
|
patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
|
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
newStartVnode = newCh[++newStartIdx];
|
|
} else if (sameVnode(oldEndVnode, newEndVnode)) {
|
|
patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
|
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
newEndVnode = newCh[--newEndIdx];
|
|
} else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
|
|
patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
|
|
canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
|
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
newEndVnode = newCh[--newEndIdx];
|
|
} else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
|
|
patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
|
|
canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
|
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
newStartVnode = newCh[++newStartIdx];
|
|
} else {
|
|
if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
|
|
idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;
|
|
if (isUndef(idxInOld)) { // New element
|
|
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
|
|
newStartVnode = newCh[++newStartIdx];
|
|
} else {
|
|
elmToMove = oldCh[idxInOld];
|
|
/* istanbul ignore if */
|
|
if (process.env.NODE_ENV !== 'production' && !elmToMove) {
|
|
warn(
|
|
'It seems there are duplicate keys that is causing an update error. ' +
|
|
'Make sure each v-for item has a unique key.'
|
|
);
|
|
}
|
|
if (sameVnode(elmToMove, newStartVnode)) {
|
|
patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
|
|
oldCh[idxInOld] = undefined;
|
|
canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);
|
|
newStartVnode = newCh[++newStartIdx];
|
|
} else {
|
|
// same key but different element. treat as new element
|
|
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
|
|
newStartVnode = newCh[++newStartIdx];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (oldStartIdx > oldEndIdx) {
|
|
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
|
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
|
} else if (newStartIdx > newEndIdx) {
|
|
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
|
|
}
|
|
}
|
|
|
|
function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
|
|
if (oldVnode === vnode) {
|
|
return
|
|
}
|
|
// reuse element for static trees.
|
|
// note we only do this if the vnode is cloned -
|
|
// if the new node is not cloned it means the render functions have been
|
|
// reset by the hot-reload-api and we need to do a proper re-render.
|
|
if (vnode.isStatic &&
|
|
oldVnode.isStatic &&
|
|
vnode.key === oldVnode.key &&
|
|
(vnode.isCloned || vnode.isOnce)) {
|
|
vnode.elm = oldVnode.elm;
|
|
vnode.child = oldVnode.child;
|
|
return
|
|
}
|
|
var i;
|
|
var data = vnode.data;
|
|
var hasData = isDef(data);
|
|
if (hasData && isDef(i = data.hook) && isDef(i = i.prepatch)) {
|
|
i(oldVnode, vnode);
|
|
}
|
|
var elm = vnode.elm = oldVnode.elm;
|
|
var oldCh = oldVnode.children;
|
|
var ch = vnode.children;
|
|
if (hasData && isPatchable(vnode)) {
|
|
for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
|
|
if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
|
|
}
|
|
if (isUndef(vnode.text)) {
|
|
if (isDef(oldCh) && isDef(ch)) {
|
|
if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
|
|
} else if (isDef(ch)) {
|
|
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
|
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
|
} else if (isDef(oldCh)) {
|
|
removeVnodes(elm, oldCh, 0, oldCh.length - 1);
|
|
} else if (isDef(oldVnode.text)) {
|
|
nodeOps.setTextContent(elm, '');
|
|
}
|
|
} else if (oldVnode.text !== vnode.text) {
|
|
nodeOps.setTextContent(elm, vnode.text);
|
|
}
|
|
if (hasData) {
|
|
if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
|
|
}
|
|
}
|
|
|
|
function invokeInsertHook (vnode, queue, initial) {
|
|
// delay insert hooks for component root nodes, invoke them after the
|
|
// element is really inserted
|
|
if (initial && vnode.parent) {
|
|
vnode.parent.data.pendingInsert = queue;
|
|
} else {
|
|
for (var i = 0; i < queue.length; ++i) {
|
|
queue[i].data.hook.insert(queue[i]);
|
|
}
|
|
}
|
|
}
|
|
|
|
var bailed = false;
|
|
// list of modules that can skip create hook during hydration because they
|
|
// are already rendered on the client or has no need for initialization
|
|
var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');
|
|
|
|
// Note: this is a browser-only function so we can assume elms are DOM nodes.
|
|
function hydrate (elm, vnode, insertedVnodeQueue) {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
if (!assertNodeMatch(elm, vnode)) {
|
|
return false
|
|
}
|
|
}
|
|
vnode.elm = elm;
|
|
var tag = vnode.tag;
|
|
var data = vnode.data;
|
|
var children = vnode.children;
|
|
if (isDef(data)) {
|
|
if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
|
|
if (isDef(i = vnode.child)) {
|
|
// child component. it should have hydrated its own tree.
|
|
initComponent(vnode, insertedVnodeQueue);
|
|
return true
|
|
}
|
|
}
|
|
if (isDef(tag)) {
|
|
if (isDef(children)) {
|
|
// empty element, allow client to pick up and populate children
|
|
if (!elm.hasChildNodes()) {
|
|
createChildren(vnode, children, insertedVnodeQueue);
|
|
} else {
|
|
var childrenMatch = true;
|
|
var childNode = elm.firstChild;
|
|
for (var i$1 = 0; i$1 < children.length; i$1++) {
|
|
if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {
|
|
childrenMatch = false;
|
|
break
|
|
}
|
|
childNode = childNode.nextSibling;
|
|
}
|
|
// if childNode is not null, it means the actual childNodes list is
|
|
// longer than the virtual children list.
|
|
if (!childrenMatch || childNode) {
|
|
if (process.env.NODE_ENV !== 'production' &&
|
|
typeof console !== 'undefined' &&
|
|
!bailed) {
|
|
bailed = true;
|
|
console.warn('Parent: ', elm);
|
|
console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
|
|
}
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
if (isDef(data)) {
|
|
for (var key in data) {
|
|
if (!isRenderedModule(key)) {
|
|
invokeCreateHooks(vnode, insertedVnodeQueue);
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
function assertNodeMatch (node, vnode) {
|
|
if (vnode.tag) {
|
|
return (
|
|
vnode.tag.indexOf('vue-component') === 0 ||
|
|
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
|
|
)
|
|
} else {
|
|
return _toString(vnode.text) === node.data
|
|
}
|
|
}
|
|
|
|
return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {
|
|
if (!vnode) {
|
|
if (oldVnode) { invokeDestroyHook(oldVnode); }
|
|
return
|
|
}
|
|
|
|
var elm, parent;
|
|
var isInitialPatch = false;
|
|
var insertedVnodeQueue = [];
|
|
|
|
if (!oldVnode) {
|
|
// empty mount (likely as component), create new root element
|
|
isInitialPatch = true;
|
|
createElm(vnode, insertedVnodeQueue, parentElm, refElm);
|
|
} else {
|
|
var isRealElement = isDef(oldVnode.nodeType);
|
|
if (!isRealElement && sameVnode(oldVnode, vnode)) {
|
|
// patch existing root node
|
|
patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);
|
|
} else {
|
|
if (isRealElement) {
|
|
// mounting to a real element
|
|
// check if this is server-rendered content and if we can perform
|
|
// a successful hydration.
|
|
if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {
|
|
oldVnode.removeAttribute('server-rendered');
|
|
hydrating = true;
|
|
}
|
|
if (hydrating) {
|
|
if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
|
|
invokeInsertHook(vnode, insertedVnodeQueue, true);
|
|
return oldVnode
|
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
warn(
|
|
'The client-side rendered virtual DOM tree is not matching ' +
|
|
'server-rendered content. This is likely caused by incorrect ' +
|
|
'HTML markup, for example nesting block-level elements inside ' +
|
|
'<p>, or missing <tbody>. Bailing hydration and performing ' +
|
|
'full client-side render.'
|
|
);
|
|
}
|
|
}
|
|
// either not server-rendered, or hydration failed.
|
|
// create an empty node and replace it
|
|
oldVnode = emptyNodeAt(oldVnode);
|
|
}
|
|
|
|
// replacing existing element
|
|
elm = oldVnode.elm;
|
|
parent = nodeOps.parentNode(elm);
|
|
createElm(vnode, insertedVnodeQueue, parent, nodeOps.nextSibling(elm));
|
|
|
|
if (vnode.parent) {
|
|
// component root element replaced.
|
|
// update parent placeholder node element, recursively
|
|
var ancestor = vnode.parent;
|
|
while (ancestor) {
|
|
ancestor.elm = vnode.elm;
|
|
ancestor = ancestor.parent;
|
|
}
|
|
if (isPatchable(vnode)) {
|
|
for (var i = 0; i < cbs.create.length; ++i) {
|
|
cbs.create[i](emptyNode, vnode.parent);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (parent !== null) {
|
|
removeVnodes(parent, [oldVnode], 0, 0);
|
|
} else if (isDef(oldVnode.tag)) {
|
|
invokeDestroyHook(oldVnode);
|
|
}
|
|
}
|
|
}
|
|
|
|
invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
|
|
return vnode.elm
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
var directives = {
|
|
create: updateDirectives,
|
|
update: updateDirectives,
|
|
destroy: function unbindDirectives (vnode) {
|
|
updateDirectives(vnode, emptyNode);
|
|
}
|
|
};
|
|
|
|
function updateDirectives (oldVnode, vnode) {
|
|
if (oldVnode.data.directives || vnode.data.directives) {
|
|
_update(oldVnode, vnode);
|
|
}
|
|
}
|
|
|
|
function _update (oldVnode, vnode) {
|
|
var isCreate = oldVnode === emptyNode;
|
|
var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
|
|
var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
|
|
|
|
var dirsWithInsert = [];
|
|
var dirsWithPostpatch = [];
|
|
|
|
var key, oldDir, dir;
|
|
for (key in newDirs) {
|
|
oldDir = oldDirs[key];
|
|
dir = newDirs[key];
|
|
if (!oldDir) {
|
|
// new directive, bind
|
|
callHook$1(dir, 'bind', vnode, oldVnode);
|
|
if (dir.def && dir.def.inserted) {
|
|
dirsWithInsert.push(dir);
|
|
}
|
|
} else {
|
|
// existing directive, update
|
|
dir.oldValue = oldDir.value;
|
|
callHook$1(dir, 'update', vnode, oldVnode);
|
|
if (dir.def && dir.def.componentUpdated) {
|
|
dirsWithPostpatch.push(dir);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (dirsWithInsert.length) {
|
|
var callInsert = function () {
|
|
for (var i = 0; i < dirsWithInsert.length; i++) {
|
|
callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
|
|
}
|
|
};
|
|
if (isCreate) {
|
|
mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert, 'dir-insert');
|
|
} else {
|
|
callInsert();
|
|
}
|
|
}
|
|
|
|
if (dirsWithPostpatch.length) {
|
|
mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {
|
|
for (var i = 0; i < dirsWithPostpatch.length; i++) {
|
|
callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
|
|
}
|
|
}, 'dir-postpatch');
|
|
}
|
|
|
|
if (!isCreate) {
|
|
for (key in oldDirs) {
|
|
if (!newDirs[key]) {
|
|
// no longer present, unbind
|
|
callHook$1(oldDirs[key], 'unbind', oldVnode);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var emptyModifiers = Object.create(null);
|
|
|
|
function normalizeDirectives$1 (
|
|
dirs,
|
|
vm
|
|
) {
|
|
var res = Object.create(null);
|
|
if (!dirs) {
|
|
return res
|
|
}
|
|
var i, dir;
|
|
for (i = 0; i < dirs.length; i++) {
|
|
dir = dirs[i];
|
|
if (!dir.modifiers) {
|
|
dir.modifiers = emptyModifiers;
|
|
}
|
|
res[getRawDirName(dir)] = dir;
|
|
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
|
|
}
|
|
return res
|
|
}
|
|
|
|
function getRawDirName (dir) {
|
|
return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
|
|
}
|
|
|
|
function callHook$1 (dir, hook, vnode, oldVnode) {
|
|
var fn = dir.def && dir.def[hook];
|
|
if (fn) {
|
|
fn(vnode.elm, dir, vnode, oldVnode);
|
|
}
|
|
}
|
|
|
|
var baseModules = [
|
|
ref,
|
|
directives
|
|
];
|
|
|
|
/* */
|
|
|
|
function updateAttrs (oldVnode, vnode) {
|
|
if (!oldVnode.data.attrs && !vnode.data.attrs) {
|
|
return
|
|
}
|
|
var key, cur, old;
|
|
var elm = vnode.elm;
|
|
var oldAttrs = oldVnode.data.attrs || {};
|
|
var attrs = vnode.data.attrs || {};
|
|
// clone observed objects, as the user probably wants to mutate it
|
|
if (attrs.__ob__) {
|
|
attrs = vnode.data.attrs = extend({}, attrs);
|
|
}
|
|
|
|
for (key in attrs) {
|
|
cur = attrs[key];
|
|
old = oldAttrs[key];
|
|
if (old !== cur) {
|
|
setAttr(elm, key, cur);
|
|
}
|
|
}
|
|
// #4391: in IE9, setting type can reset value for input[type=radio]
|
|
/* istanbul ignore if */
|
|
if (isIE9 && attrs.value !== oldAttrs.value) {
|
|
setAttr(elm, 'value', attrs.value);
|
|
}
|
|
for (key in oldAttrs) {
|
|
if (attrs[key] == null) {
|
|
if (isXlink(key)) {
|
|
elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
|
} else if (!isEnumeratedAttr(key)) {
|
|
elm.removeAttribute(key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function setAttr (el, key, value) {
|
|
if (isBooleanAttr(key)) {
|
|
// set attribute for blank value
|
|
// e.g. <option disabled>Select one</option>
|
|
if (isFalsyAttrValue(value)) {
|
|
el.removeAttribute(key);
|
|
} else {
|
|
el.setAttribute(key, key);
|
|
}
|
|
} else if (isEnumeratedAttr(key)) {
|
|
el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
|
|
} else if (isXlink(key)) {
|
|
if (isFalsyAttrValue(value)) {
|
|
el.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
|
} else {
|
|
el.setAttributeNS(xlinkNS, key, value);
|
|
}
|
|
} else {
|
|
if (isFalsyAttrValue(value)) {
|
|
el.removeAttribute(key);
|
|
} else {
|
|
el.setAttribute(key, value);
|
|
}
|
|
}
|
|
}
|
|
|
|
var attrs = {
|
|
create: updateAttrs,
|
|
update: updateAttrs
|
|
};
|
|
|
|
/* */
|
|
|
|
function updateClass (oldVnode, vnode) {
|
|
var el = vnode.elm;
|
|
var data = vnode.data;
|
|
var oldData = oldVnode.data;
|
|
if (!data.staticClass && !data.class &&
|
|
(!oldData || (!oldData.staticClass && !oldData.class))) {
|
|
return
|
|
}
|
|
|
|
var cls = genClassForVnode(vnode);
|
|
|
|
// handle transition classes
|
|
var transitionClass = el._transitionClasses;
|
|
if (transitionClass) {
|
|
cls = concat(cls, stringifyClass(transitionClass));
|
|
}
|
|
|
|
// set the class
|
|
if (cls !== el._prevClass) {
|
|
el.setAttribute('class', cls);
|
|
el._prevClass = cls;
|
|
}
|
|
}
|
|
|
|
var klass = {
|
|
create: updateClass,
|
|
update: updateClass
|
|
};
|
|
|
|
/* */
|
|
|
|
var target;
|
|
|
|
function add$1 (event, handler, once, capture) {
|
|
if (once) {
|
|
var oldHandler = handler;
|
|
handler = function (ev) {
|
|
remove$2(event, handler, capture);
|
|
arguments.length === 1
|
|
? oldHandler(ev)
|
|
: oldHandler.apply(null, arguments);
|
|
};
|
|
}
|
|
target.addEventListener(event, handler, capture);
|
|
}
|
|
|
|
function remove$2 (event, handler, capture) {
|
|
target.removeEventListener(event, handler, capture);
|
|
}
|
|
|
|
function updateDOMListeners (oldVnode, vnode) {
|
|
if (!oldVnode.data.on && !vnode.data.on) {
|
|
return
|
|
}
|
|
var on = vnode.data.on || {};
|
|
var oldOn = oldVnode.data.on || {};
|
|
target = vnode.elm;
|
|
updateListeners(on, oldOn, add$1, remove$2, vnode.context);
|
|
}
|
|
|
|
var events = {
|
|
create: updateDOMListeners,
|
|
update: updateDOMListeners
|
|
};
|
|
|
|
/* */
|
|
|
|
function updateDOMProps (oldVnode, vnode) {
|
|
if (!oldVnode.data.domProps && !vnode.data.domProps) {
|
|
return
|
|
}
|
|
var key, cur;
|
|
var elm = vnode.elm;
|
|
var oldProps = oldVnode.data.domProps || {};
|
|
var props = vnode.data.domProps || {};
|
|
// clone observed objects, as the user probably wants to mutate it
|
|
if (props.__ob__) {
|
|
props = vnode.data.domProps = extend({}, props);
|
|
}
|
|
|
|
for (key in oldProps) {
|
|
if (props[key] == null) {
|
|
elm[key] = '';
|
|
}
|
|
}
|
|
for (key in props) {
|
|
cur = props[key];
|
|
// ignore children if the node has textContent or innerHTML,
|
|
// as these will throw away existing DOM nodes and cause removal errors
|
|
// on subsequent patches (#3360)
|
|
if (key === 'textContent' || key === 'innerHTML') {
|
|
if (vnode.children) { vnode.children.length = 0; }
|
|
if (cur === oldProps[key]) { continue }
|
|
}
|
|
if (key === 'value') {
|
|
// store value as _value as well since
|
|
// non-string values will be stringified
|
|
elm._value = cur;
|
|
// avoid resetting cursor position when value is the same
|
|
var strCur = cur == null ? '' : String(cur);
|
|
if (!elm.composing && (
|
|
(document.activeElement !== elm && elm.value !== strCur) ||
|
|
isValueChanged(vnode, strCur)
|
|
)) {
|
|
elm.value = strCur;
|
|
}
|
|
} else {
|
|
elm[key] = cur;
|
|
}
|
|
}
|
|
}
|
|
|
|
function isValueChanged (vnode, newVal) {
|
|
var value = vnode.elm.value;
|
|
var modifiers = vnode.elm._vModifiers; // injected by v-model runtime
|
|
if ((modifiers && modifiers.number) || vnode.elm.type === 'number') {
|
|
return toNumber(value) !== toNumber(newVal)
|
|
}
|
|
if (modifiers && modifiers.trim) {
|
|
return value.trim() !== newVal.trim()
|
|
}
|
|
return value !== newVal
|
|
}
|
|
|
|
var domProps = {
|
|
create: updateDOMProps,
|
|
update: updateDOMProps
|
|
};
|
|
|
|
/* */
|
|
|
|
var parseStyleText = cached(function (cssText) {
|
|
var res = {};
|
|
var listDelimiter = /;(?![^(]*\))/g;
|
|
var propertyDelimiter = /:(.+)/;
|
|
cssText.split(listDelimiter).forEach(function (item) {
|
|
if (item) {
|
|
var tmp = item.split(propertyDelimiter);
|
|
tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
|
|
}
|
|
});
|
|
return res
|
|
});
|
|
|
|
// merge static and dynamic style data on the same vnode
|
|
function normalizeStyleData (data) {
|
|
var style = normalizeStyleBinding(data.style);
|
|
// static style is pre-processed into an object during compilation
|
|
// and is always a fresh object, so it's safe to merge into it
|
|
return data.staticStyle
|
|
? extend(data.staticStyle, style)
|
|
: style
|
|
}
|
|
|
|
// normalize possible array / string values into Object
|
|
function normalizeStyleBinding (bindingStyle) {
|
|
if (Array.isArray(bindingStyle)) {
|
|
return toObject(bindingStyle)
|
|
}
|
|
if (typeof bindingStyle === 'string') {
|
|
return parseStyleText(bindingStyle)
|
|
}
|
|
return bindingStyle
|
|
}
|
|
|
|
/**
|
|
* parent component style should be after child's
|
|
* so that parent component's style could override it
|
|
*/
|
|
function getStyle (vnode, checkChild) {
|
|
var res = {};
|
|
var styleData;
|
|
|
|
if (checkChild) {
|
|
var childNode = vnode;
|
|
while (childNode.child) {
|
|
childNode = childNode.child._vnode;
|
|
if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
|
|
extend(res, styleData);
|
|
}
|
|
}
|
|
}
|
|
|
|
if ((styleData = normalizeStyleData(vnode.data))) {
|
|
extend(res, styleData);
|
|
}
|
|
|
|
var parentNode = vnode;
|
|
while ((parentNode = parentNode.parent)) {
|
|
if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
|
|
extend(res, styleData);
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
/* */
|
|
|
|
var cssVarRE = /^--/;
|
|
var importantRE = /\s*!important$/;
|
|
var setProp = function (el, name, val) {
|
|
/* istanbul ignore if */
|
|
if (cssVarRE.test(name)) {
|
|
el.style.setProperty(name, val);
|
|
} else if (importantRE.test(val)) {
|
|
el.style.setProperty(name, val.replace(importantRE, ''), 'important');
|
|
} else {
|
|
el.style[normalize(name)] = val;
|
|
}
|
|
};
|
|
|
|
var prefixes = ['Webkit', 'Moz', 'ms'];
|
|
|
|
var testEl;
|
|
var normalize = cached(function (prop) {
|
|
testEl = testEl || document.createElement('div');
|
|
prop = camelize(prop);
|
|
if (prop !== 'filter' && (prop in testEl.style)) {
|
|
return prop
|
|
}
|
|
var upper = prop.charAt(0).toUpperCase() + prop.slice(1);
|
|
for (var i = 0; i < prefixes.length; i++) {
|
|
var prefixed = prefixes[i] + upper;
|
|
if (prefixed in testEl.style) {
|
|
return prefixed
|
|
}
|
|
}
|
|
});
|
|
|
|
function updateStyle (oldVnode, vnode) {
|
|
var data = vnode.data;
|
|
var oldData = oldVnode.data;
|
|
|
|
if (!data.staticStyle && !data.style &&
|
|
!oldData.staticStyle && !oldData.style) {
|
|
return
|
|
}
|
|
|
|
var cur, name;
|
|
var el = vnode.elm;
|
|
var oldStaticStyle = oldVnode.data.staticStyle;
|
|
var oldStyleBinding = oldVnode.data.style || {};
|
|
|
|
// if static style exists, stylebinding already merged into it when doing normalizeStyleData
|
|
var oldStyle = oldStaticStyle || oldStyleBinding;
|
|
|
|
var style = normalizeStyleBinding(vnode.data.style) || {};
|
|
|
|
vnode.data.style = style.__ob__ ? extend({}, style) : style;
|
|
|
|
var newStyle = getStyle(vnode, true);
|
|
|
|
for (name in oldStyle) {
|
|
if (newStyle[name] == null) {
|
|
setProp(el, name, '');
|
|
}
|
|
}
|
|
for (name in newStyle) {
|
|
cur = newStyle[name];
|
|
if (cur !== oldStyle[name]) {
|
|
// ie9 setting to null has no effect, must use empty string
|
|
setProp(el, name, cur == null ? '' : cur);
|
|
}
|
|
}
|
|
}
|
|
|
|
var style = {
|
|
create: updateStyle,
|
|
update: updateStyle
|
|
};
|
|
|
|
/* */
|
|
|
|
/**
|
|
* Add class with compatibility for SVG since classList is not supported on
|
|
* SVG elements in IE
|
|
*/
|
|
function addClass (el, cls) {
|
|
/* istanbul ignore if */
|
|
if (!cls || !cls.trim()) {
|
|
return
|
|
}
|
|
|
|
/* istanbul ignore else */
|
|
if (el.classList) {
|
|
if (cls.indexOf(' ') > -1) {
|
|
cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
|
|
} else {
|
|
el.classList.add(cls);
|
|
}
|
|
} else {
|
|
var cur = ' ' + el.getAttribute('class') + ' ';
|
|
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
|
el.setAttribute('class', (cur + cls).trim());
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Remove class with compatibility for SVG since classList is not supported on
|
|
* SVG elements in IE
|
|
*/
|
|
function removeClass (el, cls) {
|
|
/* istanbul ignore if */
|
|
if (!cls || !cls.trim()) {
|
|
return
|
|
}
|
|
|
|
/* istanbul ignore else */
|
|
if (el.classList) {
|
|
if (cls.indexOf(' ') > -1) {
|
|
cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); });
|
|
} else {
|
|
el.classList.remove(cls);
|
|
}
|
|
} else {
|
|
var cur = ' ' + el.getAttribute('class') + ' ';
|
|
var tar = ' ' + cls + ' ';
|
|
while (cur.indexOf(tar) >= 0) {
|
|
cur = cur.replace(tar, ' ');
|
|
}
|
|
el.setAttribute('class', cur.trim());
|
|
}
|
|
}
|
|
|
|
/* */
|
|
|
|
var hasTransition = inBrowser && !isIE9;
|
|
var TRANSITION = 'transition';
|
|
var ANIMATION = 'animation';
|
|
|
|
// Transition property/event sniffing
|
|
var transitionProp = 'transition';
|
|
var transitionEndEvent = 'transitionend';
|
|
var animationProp = 'animation';
|
|
var animationEndEvent = 'animationend';
|
|
if (hasTransition) {
|
|
/* istanbul ignore if */
|
|
if (window.ontransitionend === undefined &&
|
|
window.onwebkittransitionend !== undefined) {
|
|
transitionProp = 'WebkitTransition';
|
|
transitionEndEvent = 'webkitTransitionEnd';
|
|
}
|
|
if (window.onanimationend === undefined &&
|
|
window.onwebkitanimationend !== undefined) {
|
|
animationProp = 'WebkitAnimation';
|
|
animationEndEvent = 'webkitAnimationEnd';
|
|
}
|
|
}
|
|
|
|
var raf = (inBrowser && window.requestAnimationFrame) || setTimeout;
|
|
function nextFrame (fn) {
|
|
raf(function () {
|
|
raf(fn);
|
|
});
|
|
}
|
|
|
|
function addTransitionClass (el, cls) {
|
|
(el._transitionClasses || (el._transitionClasses = [])).push(cls);
|
|
addClass(el, cls);
|
|
}
|
|
|
|
function removeTransitionClass (el, cls) {
|
|
if (el._transitionClasses) {
|
|
remove$1(el._transitionClasses, cls);
|
|
}
|
|
removeClass(el, cls);
|
|
}
|
|
|
|
function whenTransitionEnds (
|
|
el,
|
|
expectedType,
|
|
cb
|
|
) {
|
|
var ref = getTransitionInfo(el, expectedType);
|
|
var type = ref.type;
|
|
var timeout = ref.timeout;
|
|
var propCount = ref.propCount;
|
|
if (!type) { return cb() }
|
|
var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
|
|
var ended = 0;
|
|
var end = function () {
|
|
el.removeEventListener(event, onEnd);
|
|
cb();
|
|
};
|
|
var onEnd = function (e) {
|
|
if (e.target === el) {
|
|
if (++ended >= propCount) {
|
|
end();
|
|
}
|
|
}
|
|
};
|
|
setTimeout(function () {
|
|
if (ended < propCount) {
|
|
end();
|
|
}
|
|
}, timeout + 1);
|
|
el.addEventListener(event, onEnd);
|
|
}
|
|
|
|
var transformRE = /\b(transform|all)(,|$)/;
|
|
|
|
function getTransitionInfo (el, expectedType) {
|
|
var styles = window.getComputedStyle(el);
|
|
var transitioneDelays = styles[transitionProp + 'Delay'].split(', ');
|
|
var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
|
|
var transitionTimeout = getTimeout(transitioneDelays, transitionDurations);
|
|
var animationDelays = styles[animationProp + 'Delay'].split(', ');
|
|
var animationDurations = styles[animationProp + 'Duration'].split(', ');
|
|
var animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
|
|
var type;
|
|
var timeout = 0;
|
|
var propCount = 0;
|
|
/* istanbul ignore if */
|
|
if (expectedType === TRANSITION) {
|
|
if (transitionTimeout > 0) {
|
|
type = TRANSITION;
|
|
timeout = transitionTimeout;
|
|
propCount = transitionDurations.length;
|
|
}
|
|
} else if (expectedType === ANIMATION) {
|
|
if (animationTimeout > 0) {
|
|
type = ANIMATION;
|
|
timeout = animationTimeout;
|
|
propCount = animationDurations.length;
|
|
}
|
|
} else {
|
|
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
type = timeout > 0
|
|
? transitionTimeout > animationTimeout
|
|
? TRANSITION
|
|
: ANIMATION
|
|
: null;
|
|
propCount = type
|
|
? type === TRANSITION
|
|
? transitionDurations.length
|
|
: animationDurations.length
|
|
: 0;
|
|
}
|
|
var hasTransform =
|
|
type === TRANSITION &&
|
|
transformRE.test(styles[transitionProp + 'Property']);
|
|
return {
|
|
type: type,
|
|
timeout: timeout,
|
|
propCount: propCount,
|
|
hasTransform: hasTransform
|
|
}
|
|
}
|
|
|
|
function getTimeout (delays, durations) {
|
|
/* istanbul ignore next */
|
|
while (delays.length < durations.length) {
|
|
delays = delays.concat(delays);
|
|
}
|
|
|
|
return Math.max.apply(null, durations.map(function (d, i) {
|
|
return toMs(d) + toMs(delays[i])
|
|
}))
|
|
}
|
|
|
|
function toMs (s) {
|
|
return Number(s.slice(0, -1)) * 1000
|
|
}
|
|
|
|
/* */
|
|
|
|
function enter (vnode, toggleDisplay) {
|
|
var el = vnode.elm;
|
|
|
|
// call leave callback now
|
|
if (el._leaveCb) {
|
|
el._leaveCb.cancelled = true;
|
|
el._leaveCb();
|
|
}
|
|
|
|
var data = resolveTransition(vnode.data.transition);
|
|
if (!data) {
|
|
return
|
|
}
|
|
|
|
/* istanbul ignore if */
|
|
if (el._enterCb || el.nodeType !== 1) {
|
|
return
|
|
}
|
|
|
|
var css = data.css;
|
|
var type = data.type;
|
|
var enterClass = data.enterClass;
|
|
var enterActiveClass = data.enterActiveClass;
|
|
var appearClass = data.appearClass;
|
|
var appearActiveClass = data.appearActiveClass;
|
|
var beforeEnter = data.beforeEnter;
|
|
var enter = data.enter;
|
|
var afterEnter = data.afterEnter;
|
|
var enterCancelled = data.enterCancelled;
|
|
var beforeAppear = data.beforeAppear;
|
|
var appear = data.appear;
|
|
var afterAppear = data.afterAppear;
|
|
var appearCancelled = data.appearCancelled;
|
|
|
|
// activeInstance will always be the <transition> component managing this
|
|
// transition. One edge case to check is when the <transition> is placed
|
|
// as the root node of a child component. In that case we need to check
|
|
// <transition>'s parent for appear check.
|
|
var context = activeInstance;
|
|
var transitionNode = activeInstance.$vnode;
|
|
while (transitionNode && transitionNode.parent) {
|
|
transitionNode = transitionNode.parent;
|
|
context = transitionNode.context;
|
|
}
|
|
|
|
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
|
|
|
if (isAppear && !appear && appear !== '') {
|
|
return
|
|
}
|
|
|
|
var startClass = isAppear ? appearClass : enterClass;
|
|
var activeClass = isAppear ? appearActiveClass : enterActiveClass;
|
|
var beforeEnterHook = isAppear ? (beforeAppear || beforeEnter) : beforeEnter;
|
|
var enterHook = isAppear ? (typeof appear === 'function' ? appear : enter) : enter;
|
|
var afterEnterHook = isAppear ? (afterAppear || afterEnter) : afterEnter;
|
|
var enterCancelledHook = isAppear ? (appearCancelled || enterCancelled) : enterCancelled;
|
|
|
|
var expectsCSS = css !== false && !isIE9;
|
|
var userWantsControl =
|
|
enterHook &&
|
|
// enterHook may be a bound method which exposes
|
|
// the length of original fn as _length
|
|
(enterHook._length || enterHook.length) > 1;
|
|
|
|
var cb = el._enterCb = once(function () {
|
|
if (expectsCSS) {
|
|
removeTransitionClass(el, activeClass);
|
|
}
|
|
if (cb.cancelled) {
|
|
if (expectsCSS) {
|
|
removeTransitionClass(el, startClass);
|
|
}
|
|
enterCancelledHook && enterCancelledHook(el);
|
|
} else {
|
|
afterEnterHook && afterEnterHook(el);
|
|
}
|
|
el._enterCb = null;
|
|
});
|
|
|
|
if (!vnode.data.show) {
|
|
// remove pending leave element on enter by injecting an insert hook
|
|
mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {
|
|
var parent = el.parentNode;
|
|
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
|
|
if (pendingNode &&
|
|
pendingNode.context === vnode.context &&
|
|
pendingNode.tag === vnode.tag &&
|
|
pendingNode.elm._leaveCb) {
|
|
pendingNode.elm._leaveCb();
|
|
}
|
|
enterHook && enterHook(el, cb);
|
|
}, 'transition-insert');
|
|
}
|
|
|
|
// start enter transition
|
|
beforeEnterHook && beforeEnterHook(el);
|
|
if (expectsCSS) {
|
|
addTransitionClass(el, startClass);
|
|
addTransitionClass(el, activeClass);
|
|
nextFrame(function () {
|
|
removeTransitionClass(el, startClass);
|
|
if (!cb.cancelled && !userWantsControl) {
|
|
whenTransitionEnds(el, type, cb);
|
|
}
|
|
});
|
|
}
|
|
|
|
if (vnode.data.show) {
|
|
toggleDisplay && toggleDisplay();
|
|
enterHook && enterHook(el, cb);
|
|
}
|
|
|
|
if (!expectsCSS && !userWantsControl) {
|
|
cb();
|
|
}
|
|
}
|
|
|
|
function leave (vnode, rm) {
|
|
var el = vnode.elm;
|
|
|
|
// call enter callback now
|
|
if (el._enterCb) {
|
|
el._enterCb.cancelled = true;
|
|
el._enterCb();
|
|
}
|
|
|
|
var data = resolveTransition(vnode.data.transition);
|
|
if (!data) {
|
|
return rm()
|
|
}
|
|
|
|
/* istanbul ignore if */
|
|
if (el._leaveCb || el.nodeType !== 1) {
|
|
return
|
|
}
|
|
|
|
var css = data.css;
|
|
var type = data.type;
|
|
var leaveClass = data.leaveClass;
|
|
var leaveActiveClass = data.leaveActiveClass;
|
|
var beforeLeave = data.beforeLeave;
|
|
var leave = data.leave;
|
|
var afterLeave = data.afterLeave;
|
|
var leaveCancelled = data.leaveCancelled;
|
|
var delayLeave = data.delayLeave;
|
|
|
|
var expectsCSS = css !== false && !isIE9;
|
|
var userWantsControl =
|
|
leave &&
|
|
// leave hook may be a bound method which exposes
|
|
// the length of original fn as _length
|
|
(leave._length || leave.length) > 1;
|
|
|
|
var cb = el._leaveCb = once(function () {
|
|
if (el.parentNode && el.parentNode._pending) {
|
|
el.parentNode._pending[vnode.key] = null;
|
|
}
|
|
if (expectsCSS) {
|
|
removeTransitionClass(el, leaveActiveClass);
|
|
}
|
|
if (cb.cancelled) {
|
|
if (expectsCSS) {
|
|
removeTransitionClass(el, leaveClass);
|
|
}
|
|
leaveCancelled && leaveCancelled(el);
|
|
} else {
|
|
rm();
|
|
afterLeave && afterLeave(el);
|
|
}
|
|
el._leaveCb = null;
|
|
});
|
|
|
|
if (delayLeave) {
|
|
delayLeave(performLeave);
|
|
} else {
|
|
performLeave();
|
|
}
|
|
|
|
function performLeave () {
|
|
// the delayed leave may have already been cancelled
|
|
if (cb.cancelled) {
|
|
return
|
|
}
|
|
// record leaving element
|
|
if (!vnode.data.show) {
|
|
(el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
|
|
}
|
|
beforeLeave && beforeLeave(el);
|
|
if (expectsCSS) {
|
|
addTransitionClass(el, leaveClass);
|
|
addTransitionClass(el, leaveActiveClass);
|
|
nextFrame(function () {
|
|
removeTransitionClass(el, leaveClass);
|
|
if (!cb.cancelled && !userWantsControl) {
|
|
whenTransitionEnds(el, type, cb);
|
|
}
|
|
});
|
|
}
|
|
leave && leave(el, cb);
|
|
if (!expectsCSS && !userWantsControl) {
|
|
cb();
|
|
}
|
|
}
|
|
}
|
|
|
|
function resolveTransition (def$$1) {
|
|
if (!def$$1) {
|
|
return
|
|
}
|
|
/* istanbul ignore else */
|
|
if (typeof def$$1 === 'object') {
|
|
var res = {};
|
|
if (def$$1.css !== false) {
|
|
extend(res, autoCssTransition(def$$1.name || 'v'));
|
|
}
|
|
extend(res, def$$1);
|
|
return res
|
|
} else if (typeof def$$1 === 'string') {
|
|
return autoCssTransition(def$$1)
|
|
}
|
|
}
|
|
|
|
var autoCssTransition = cached(function (name) {
|
|
return {
|
|
enterClass: (name + "-enter"),
|
|
leaveClass: (name + "-leave"),
|
|
appearClass: (name + "-enter"),
|
|
enterActiveClass: (name + "-enter-active"),
|
|
leaveActiveClass: (name + "-leave-active"),
|
|
appearActiveClass: (name + "-enter-active")
|
|
}
|
|
});
|
|
|
|
function once (fn) {
|
|
var called = false;
|
|
return function () {
|
|
if (!called) {
|
|
called = true;
|
|
fn();
|
|
}
|
|
}
|
|
}
|
|
|
|
function _enter (_, vnode) {
|
|
if (!vnode.data.show) {
|
|
enter(vnode);
|
|
}
|
|
}
|
|
|
|
var transition = inBrowser ? {
|
|
create: _enter,
|
|
activate: _enter,
|
|
remove: function remove (vnode, rm) {
|
|
/* istanbul ignore else */
|
|
if (!vnode.data.show) {
|
|
leave(vnode, rm);
|
|
} else {
|
|
rm();
|
|
}
|
|
}
|
|
} : {};
|
|
|
|
var platformModules = [
|
|
attrs,
|
|
klass,
|
|
events,
|
|
domProps,
|
|
style,
|
|
transition
|
|
];
|
|
|
|
/* */
|
|
|
|
// the directive module should be applied last, after all
|
|
// built-in modules have been applied.
|
|
var modules = platformModules.concat(baseModules);
|
|
|
|
var patch$1 = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
|
|
|
/**
|
|
* Not type checking this file because flow doesn't like attaching
|
|
* properties to Elements.
|
|
*/
|
|
|
|
var modelableTagRE = /^input|select|textarea|vue-component-[0-9]+(-[0-9a-zA-Z_-]*)?$/;
|
|
|
|
/* istanbul ignore if */
|
|
if (isIE9) {
|
|
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
|
document.addEventListener('selectionchange', function () {
|
|
var el = document.activeElement;
|
|
if (el && el.vmodel) {
|
|
trigger(el, 'input');
|
|
}
|
|
});
|
|
}
|
|
|
|
var model = {
|
|
inserted: function inserted (el, binding, vnode) {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
if (!modelableTagRE.test(vnode.tag)) {
|
|
warn(
|
|
"v-model is not supported on element type: <" + (vnode.tag) + ">. " +
|
|
'If you are working with contenteditable, it\'s recommended to ' +
|
|
'wrap a library dedicated for that purpose inside a custom component.',
|
|
vnode.context
|
|
);
|
|
}
|
|
}
|
|
if (vnode.tag === 'select') {
|
|
var cb = function () {
|
|
setSelected(el, binding, vnode.context);
|
|
};
|
|
cb();
|
|
/* istanbul ignore if */
|
|
if (isIE || isEdge) {
|
|
setTimeout(cb, 0);
|
|
}
|
|
} else if (vnode.tag === 'textarea' || el.type === 'text') {
|
|
el._vModifiers = binding.modifiers;
|
|
if (!binding.modifiers.lazy) {
|
|
if (!isAndroid) {
|
|
el.addEventListener('compositionstart', onCompositionStart);
|
|
el.addEventListener('compositionend', onCompositionEnd);
|
|
}
|
|
/* istanbul ignore if */
|
|
if (isIE9) {
|
|
el.vmodel = true;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
componentUpdated: function componentUpdated (el, binding, vnode) {
|
|
if (vnode.tag === 'select') {
|
|
setSelected(el, binding, vnode.context);
|
|
// in case the options rendered by v-for have changed,
|
|
// it's possible that the value is out-of-sync with the rendered options.
|
|
// detect such cases and filter out values that no longer has a matching
|
|
// option in the DOM.
|
|
var needReset = el.multiple
|
|
? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })
|
|
: binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);
|
|
if (needReset) {
|
|
trigger(el, 'change');
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
function setSelected (el, binding, vm) {
|
|
var value = binding.value;
|
|
var isMultiple = el.multiple;
|
|
if (isMultiple && !Array.isArray(value)) {
|
|
process.env.NODE_ENV !== 'production' && warn(
|
|
"<select multiple v-model=\"" + (binding.expression) + "\"> " +
|
|
"expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
|
|
vm
|
|
);
|
|
return
|
|
}
|
|
var selected, option;
|
|
for (var i = 0, l = el.options.length; i < l; i++) {
|
|
option = el.options[i];
|
|
if (isMultiple) {
|
|
selected = looseIndexOf(value, getValue(option)) > -1;
|
|
if (option.selected !== selected) {
|
|
option.selected = selected;
|
|
}
|
|
} else {
|
|
if (looseEqual(getValue(option), value)) {
|
|
if (el.selectedIndex !== i) {
|
|
el.selectedIndex = i;
|
|
}
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (!isMultiple) {
|
|
el.selectedIndex = -1;
|
|
}
|
|
}
|
|
|
|
function hasNoMatchingOption (value, options) {
|
|
for (var i = 0, l = options.length; i < l; i++) {
|
|
if (looseEqual(getValue(options[i]), value)) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
function getValue (option) {
|
|
return '_value' in option
|
|
? option._value
|
|
: option.value
|
|
}
|
|
|
|
function onCompositionStart (e) {
|
|
e.target.composing = true;
|
|
}
|
|
|
|
function onCompositionEnd (e) {
|
|
e.target.composing = false;
|
|
trigger(e.target, 'input');
|
|
}
|
|
|
|
function trigger (el, type) {
|
|
var e = document.createEvent('HTMLEvents');
|
|
e.initEvent(type, true, true);
|
|
el.dispatchEvent(e);
|
|
}
|
|
|
|
/* */
|
|
|
|
// recursively search for possible transition defined inside the component root
|
|
function locateNode (vnode) {
|
|
return vnode.child && (!vnode.data || !vnode.data.transition)
|
|
? locateNode(vnode.child._vnode)
|
|
: vnode
|
|
}
|
|
|
|
var show = {
|
|
bind: function bind (el, ref, vnode) {
|
|
var value = ref.value;
|
|
|
|
vnode = locateNode(vnode);
|
|
var transition = vnode.data && vnode.data.transition;
|
|
var originalDisplay = el.__vOriginalDisplay =
|
|
el.style.display === 'none' ? '' : el.style.display;
|
|
if (value && transition && !isIE9) {
|
|
vnode.data.show = true;
|
|
enter(vnode, function () {
|
|
el.style.display = originalDisplay;
|
|
});
|
|
} else {
|
|
el.style.display = value ? originalDisplay : 'none';
|
|
}
|
|
},
|
|
update: function update (el, ref, vnode) {
|
|
var value = ref.value;
|
|
var oldValue = ref.oldValue;
|
|
|
|
/* istanbul ignore if */
|
|
if (value === oldValue) { return }
|
|
vnode = locateNode(vnode);
|
|
var transition = vnode.data && vnode.data.transition;
|
|
if (transition && !isIE9) {
|
|
vnode.data.show = true;
|
|
if (value) {
|
|
enter(vnode, function () {
|
|
el.style.display = el.__vOriginalDisplay;
|
|
});
|
|
} else {
|
|
leave(vnode, function () {
|
|
el.style.display = 'none';
|
|
});
|
|
}
|
|
} else {
|
|
el.style.display = value ? el.__vOriginalDisplay : 'none';
|
|
}
|
|
}
|
|
};
|
|
|
|
var platformDirectives = {
|
|
model: model,
|
|
show: show
|
|
};
|
|
|
|
/* */
|
|
|
|
// Provides transition support for a single element/component.
|
|
// supports transition mode (out-in / in-out)
|
|
|
|
var transitionProps = {
|
|
name: String,
|
|
appear: Boolean,
|
|
css: Boolean,
|
|
mode: String,
|
|
type: String,
|
|
enterClass: String,
|
|
leaveClass: String,
|
|
enterActiveClass: String,
|
|
leaveActiveClass: String,
|
|
appearClass: String,
|
|
appearActiveClass: String
|
|
};
|
|
|
|
// in case the child is also an abstract component, e.g. <keep-alive>
|
|
// we want to recursively retrieve the real component to be rendered
|
|
function getRealChild (vnode) {
|
|
var compOptions = vnode && vnode.componentOptions;
|
|
if (compOptions && compOptions.Ctor.options.abstract) {
|
|
return getRealChild(getFirstComponentChild(compOptions.children))
|
|
} else {
|
|
return vnode
|
|
}
|
|
}
|
|
|
|
function extractTransitionData (comp) {
|
|
var data = {};
|
|
var options = comp.$options;
|
|
// props
|
|
for (var key in options.propsData) {
|
|
data[key] = comp[key];
|
|
}
|
|
// events.
|
|
// extract listeners and pass them directly to the transition methods
|
|
var listeners = options._parentListeners;
|
|
for (var key$1 in listeners) {
|
|
data[camelize(key$1)] = listeners[key$1].fn;
|
|
}
|
|
return data
|
|
}
|
|
|
|
function placeholder (h, rawChild) {
|
|
return /\d-keep-alive$/.test(rawChild.tag)
|
|
? h('keep-alive')
|
|
: null
|
|
}
|
|
|
|
function hasParentTransition (vnode) {
|
|
while ((vnode = vnode.parent)) {
|
|
if (vnode.data.transition) {
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
|
|
var Transition = {
|
|
name: 'transition',
|
|
props: transitionProps,
|
|
abstract: true,
|
|
render: function render (h) {
|
|
var this$1 = this;
|
|
|
|
var children = this.$slots.default;
|
|
if (!children) {
|
|
return
|
|
}
|
|
|
|
// filter out text nodes (possible whitespaces)
|
|
children = children.filter(function (c) { return c.tag; });
|
|
/* istanbul ignore if */
|
|
if (!children.length) {
|
|
return
|
|
}
|
|
|
|
// warn multiple elements
|
|
if (process.env.NODE_ENV !== 'production' && children.length > 1) {
|
|
warn(
|
|
'<transition> can only be used on a single element. Use ' +
|
|
'<transition-group> for lists.',
|
|
this.$parent
|
|
);
|
|
}
|
|
|
|
var mode = this.mode;
|
|
|
|
// warn invalid mode
|
|
if (process.env.NODE_ENV !== 'production' &&
|
|
mode && mode !== 'in-out' && mode !== 'out-in') {
|
|
warn(
|
|
'invalid <transition> mode: ' + mode,
|
|
this.$parent
|
|
);
|
|
}
|
|
|
|
var rawChild = children[0];
|
|
|
|
// if this is a component root node and the component's
|
|
// parent container node also has transition, skip.
|
|
if (hasParentTransition(this.$vnode)) {
|
|
return rawChild
|
|
}
|
|
|
|
// apply transition data to child
|
|
// use getRealChild() to ignore abstract components e.g. keep-alive
|
|
var child = getRealChild(rawChild);
|
|
/* istanbul ignore if */
|
|
if (!child) {
|
|
return rawChild
|
|
}
|
|
|
|
if (this._leaving) {
|
|
return placeholder(h, rawChild)
|
|
}
|
|
|
|
var key = child.key = child.key == null || child.isStatic
|
|
? ("__v" + (child.tag + this._uid) + "__")
|
|
: child.key;
|
|
var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
|
|
var oldRawChild = this._vnode;
|
|
var oldChild = getRealChild(oldRawChild);
|
|
|
|
// mark v-show
|
|
// so that the transition module can hand over the control to the directive
|
|
if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {
|
|
child.data.show = true;
|
|
}
|
|
|
|
if (oldChild && oldChild.data && oldChild.key !== key) {
|
|
// replace old child transition data with fresh one
|
|
// important for dynamic transitions!
|
|
var oldData = oldChild.data.transition = extend({}, data);
|
|
|
|
// handle transition mode
|
|
if (mode === 'out-in') {
|
|
// return placeholder node and queue update when leave finishes
|
|
this._leaving = true;
|
|
mergeVNodeHook(oldData, 'afterLeave', function () {
|
|
this$1._leaving = false;
|
|
this$1.$forceUpdate();
|
|
}, key);
|
|
return placeholder(h, rawChild)
|
|
} else if (mode === 'in-out') {
|
|
var delayedLeave;
|
|
var performLeave = function () { delayedLeave(); };
|
|
mergeVNodeHook(data, 'afterEnter', performLeave, key);
|
|
mergeVNodeHook(data, 'enterCancelled', performLeave, key);
|
|
mergeVNodeHook(oldData, 'delayLeave', function (leave) {
|
|
delayedLeave = leave;
|
|
}, key);
|
|
}
|
|
}
|
|
|
|
return rawChild
|
|
}
|
|
};
|
|
|
|
/* */
|
|
|
|
// Provides transition support for list items.
|
|
// supports move transitions using the FLIP technique.
|
|
|
|
// Because the vdom's children update algorithm is "unstable" - i.e.
|
|
// it doesn't guarantee the relative positioning of removed elements,
|
|
// we force transition-group to update its children into two passes:
|
|
// in the first pass, we remove all nodes that need to be removed,
|
|
// triggering their leaving transition; in the second pass, we insert/move
|
|
// into the final disired state. This way in the second pass removed
|
|
// nodes will remain where they should be.
|
|
|
|
var props = extend({
|
|
tag: String,
|
|
moveClass: String
|
|
}, transitionProps);
|
|
|
|
delete props.mode;
|
|
|
|
var TransitionGroup = {
|
|
props: props,
|
|
|
|
render: function render (h) {
|
|
var tag = this.tag || this.$vnode.data.tag || 'span';
|
|
var map = Object.create(null);
|
|
var prevChildren = this.prevChildren = this.children;
|
|
var rawChildren = this.$slots.default || [];
|
|
var children = this.children = [];
|
|
var transitionData = extractTransitionData(this);
|
|
|
|
for (var i = 0; i < rawChildren.length; i++) {
|
|
var c = rawChildren[i];
|
|
if (c.tag) {
|
|
if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
|
|
children.push(c);
|
|
map[c.key] = c
|
|
;(c.data || (c.data = {})).transition = transitionData;
|
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
var opts = c.componentOptions;
|
|
var name = opts
|
|
? (opts.Ctor.options.name || opts.tag)
|
|
: c.tag;
|
|
warn(("<transition-group> children must be keyed: <" + name + ">"));
|
|
}
|
|
}
|
|
}
|
|
|
|
if (prevChildren) {
|
|
var kept = [];
|
|
var removed = [];
|
|
for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
|
|
var c$1 = prevChildren[i$1];
|
|
c$1.data.transition = transitionData;
|
|
c$1.data.pos = c$1.elm.getBoundingClientRect();
|
|
if (map[c$1.key]) {
|
|
kept.push(c$1);
|
|
} else {
|
|
removed.push(c$1);
|
|
}
|
|
}
|
|
this.kept = h(tag, null, kept);
|
|
this.removed = removed;
|
|
}
|
|
|
|
return h(tag, null, children)
|
|
},
|
|
|
|
beforeUpdate: function beforeUpdate () {
|
|
// force removing pass
|
|
this.__patch__(
|
|
this._vnode,
|
|
this.kept,
|
|
false, // hydrating
|
|
true // removeOnly (!important, avoids unnecessary moves)
|
|
);
|
|
this._vnode = this.kept;
|
|
},
|
|
|
|
updated: function updated () {
|
|
var children = this.prevChildren;
|
|
var moveClass = this.moveClass || ((this.name || 'v') + '-move');
|
|
if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
|
|
return
|
|
}
|
|
|
|
// we divide the work into three loops to avoid mixing DOM reads and writes
|
|
// in each iteration - which helps prevent layout thrashing.
|
|
children.forEach(callPendingCbs);
|
|
children.forEach(recordPosition);
|
|
children.forEach(applyTranslation);
|
|
|
|
// force reflow to put everything in position
|
|
var f = document.body.offsetHeight; // eslint-disable-line
|
|
|
|
children.forEach(function (c) {
|
|
if (c.data.moved) {
|
|
var el = c.elm;
|
|
var s = el.style;
|
|
addTransitionClass(el, moveClass);
|
|
s.transform = s.WebkitTransform = s.transitionDuration = '';
|
|
el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
|
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
el.removeEventListener(transitionEndEvent, cb);
|
|
el._moveCb = null;
|
|
removeTransitionClass(el, moveClass);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
},
|
|
|
|
methods: {
|
|
hasMove: function hasMove (el, moveClass) {
|
|
/* istanbul ignore if */
|
|
if (!hasTransition) {
|
|
return false
|
|
}
|
|
if (this._hasMove != null) {
|
|
return this._hasMove
|
|
}
|
|
addTransitionClass(el, moveClass);
|
|
var info = getTransitionInfo(el);
|
|
removeTransitionClass(el, moveClass);
|
|
return (this._hasMove = info.hasTransform)
|
|
}
|
|
}
|
|
};
|
|
|
|
function callPendingCbs (c) {
|
|
/* istanbul ignore if */
|
|
if (c.elm._moveCb) {
|
|
c.elm._moveCb();
|
|
}
|
|
/* istanbul ignore if */
|
|
if (c.elm._enterCb) {
|
|
c.elm._enterCb();
|
|
}
|
|
}
|
|
|
|
function recordPosition (c) {
|
|
c.data.newPos = c.elm.getBoundingClientRect();
|
|
}
|
|
|
|
function applyTranslation (c) {
|
|
var oldPos = c.data.pos;
|
|
var newPos = c.data.newPos;
|
|
var dx = oldPos.left - newPos.left;
|
|
var dy = oldPos.top - newPos.top;
|
|
if (dx || dy) {
|
|
c.data.moved = true;
|
|
var s = c.elm.style;
|
|
s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
|
|
s.transitionDuration = '0s';
|
|
}
|
|
}
|
|
|
|
var platformComponents = {
|
|
Transition: Transition,
|
|
TransitionGroup: TransitionGroup
|
|
};
|
|
|
|
/* */
|
|
|
|
// install platform specific utils
|
|
Vue$2.config.isUnknownElement = isUnknownElement;
|
|
Vue$2.config.isReservedTag = isReservedTag;
|
|
Vue$2.config.getTagNamespace = getTagNamespace;
|
|
Vue$2.config.mustUseProp = mustUseProp;
|
|
|
|
// install platform runtime directives & components
|
|
extend(Vue$2.options.directives, platformDirectives);
|
|
extend(Vue$2.options.components, platformComponents);
|
|
|
|
// install platform patch function
|
|
Vue$2.prototype.__patch__ = inBrowser ? patch$1 : noop;
|
|
|
|
// wrap mount
|
|
Vue$2.prototype.$mount = function (
|
|
el,
|
|
hydrating
|
|
) {
|
|
el = el && inBrowser ? query(el) : undefined;
|
|
return this._mount(el, hydrating)
|
|
};
|
|
|
|
// devtools global hook
|
|
/* istanbul ignore next */
|
|
setTimeout(function () {
|
|
if (config.devtools) {
|
|
if (devtools) {
|
|
devtools.emit('init', Vue$2);
|
|
} else if (
|
|
process.env.NODE_ENV !== 'production' &&
|
|
inBrowser && !isEdge && /Chrome\/\d+/.test(window.navigator.userAgent)
|
|
) {
|
|
console.log(
|
|
'Download the Vue Devtools for a better development experience:\n' +
|
|
'https://github.com/vuejs/vue-devtools'
|
|
);
|
|
}
|
|
}
|
|
}, 0);
|
|
|
|
module.exports = Vue$2;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8), (function() { return this; }())))
|
|
|
|
/***/ },
|
|
/* 8 */
|
|
/***/ function(module, exports) {
|
|
|
|
// shim for using process in browser
|
|
var process = module.exports = {};
|
|
|
|
// cached from whatever global is present so that test runners that stub it
|
|
// don't break things. But we need to wrap it in a try catch in case it is
|
|
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
// function because try/catches deoptimize in certain engines.
|
|
|
|
var cachedSetTimeout;
|
|
var cachedClearTimeout;
|
|
|
|
function defaultSetTimout() {
|
|
throw new Error('setTimeout has not been defined');
|
|
}
|
|
function defaultClearTimeout () {
|
|
throw new Error('clearTimeout has not been defined');
|
|
}
|
|
(function () {
|
|
try {
|
|
if (typeof setTimeout === 'function') {
|
|
cachedSetTimeout = setTimeout;
|
|
} else {
|
|
cachedSetTimeout = defaultSetTimout;
|
|
}
|
|
} catch (e) {
|
|
cachedSetTimeout = defaultSetTimout;
|
|
}
|
|
try {
|
|
if (typeof clearTimeout === 'function') {
|
|
cachedClearTimeout = clearTimeout;
|
|
} else {
|
|
cachedClearTimeout = defaultClearTimeout;
|
|
}
|
|
} catch (e) {
|
|
cachedClearTimeout = defaultClearTimeout;
|
|
}
|
|
} ())
|
|
function runTimeout(fun) {
|
|
if (cachedSetTimeout === setTimeout) {
|
|
//normal enviroments in sane situations
|
|
return setTimeout(fun, 0);
|
|
}
|
|
// if setTimeout wasn't available but was latter defined
|
|
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
cachedSetTimeout = setTimeout;
|
|
return setTimeout(fun, 0);
|
|
}
|
|
try {
|
|
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
return cachedSetTimeout(fun, 0);
|
|
} catch(e){
|
|
try {
|
|
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
return cachedSetTimeout.call(null, fun, 0);
|
|
} catch(e){
|
|
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
return cachedSetTimeout.call(this, fun, 0);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
function runClearTimeout(marker) {
|
|
if (cachedClearTimeout === clearTimeout) {
|
|
//normal enviroments in sane situations
|
|
return clearTimeout(marker);
|
|
}
|
|
// if clearTimeout wasn't available but was latter defined
|
|
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
cachedClearTimeout = clearTimeout;
|
|
return clearTimeout(marker);
|
|
}
|
|
try {
|
|
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
return cachedClearTimeout(marker);
|
|
} catch (e){
|
|
try {
|
|
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
return cachedClearTimeout.call(null, marker);
|
|
} catch (e){
|
|
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
return cachedClearTimeout.call(this, marker);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
var queue = [];
|
|
var draining = false;
|
|
var currentQueue;
|
|
var queueIndex = -1;
|
|
|
|
function cleanUpNextTick() {
|
|
if (!draining || !currentQueue) {
|
|
return;
|
|
}
|
|
draining = false;
|
|
if (currentQueue.length) {
|
|
queue = currentQueue.concat(queue);
|
|
} else {
|
|
queueIndex = -1;
|
|
}
|
|
if (queue.length) {
|
|
drainQueue();
|
|
}
|
|
}
|
|
|
|
function drainQueue() {
|
|
if (draining) {
|
|
return;
|
|
}
|
|
var timeout = runTimeout(cleanUpNextTick);
|
|
draining = true;
|
|
|
|
var len = queue.length;
|
|
while(len) {
|
|
currentQueue = queue;
|
|
queue = [];
|
|
while (++queueIndex < len) {
|
|
if (currentQueue) {
|
|
currentQueue[queueIndex].run();
|
|
}
|
|
}
|
|
queueIndex = -1;
|
|
len = queue.length;
|
|
}
|
|
currentQueue = null;
|
|
draining = false;
|
|
runClearTimeout(timeout);
|
|
}
|
|
|
|
process.nextTick = function (fun) {
|
|
var args = new Array(arguments.length - 1);
|
|
if (arguments.length > 1) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
args[i - 1] = arguments[i];
|
|
}
|
|
}
|
|
queue.push(new Item(fun, args));
|
|
if (queue.length === 1 && !draining) {
|
|
runTimeout(drainQueue);
|
|
}
|
|
};
|
|
|
|
// v8 likes predictible objects
|
|
function Item(fun, array) {
|
|
this.fun = fun;
|
|
this.array = array;
|
|
}
|
|
Item.prototype.run = function () {
|
|
this.fun.apply(null, this.array);
|
|
};
|
|
process.title = 'browser';
|
|
process.browser = true;
|
|
process.env = {};
|
|
process.argv = [];
|
|
process.version = ''; // empty string to avoid regexp issues
|
|
process.versions = {};
|
|
|
|
function noop() {}
|
|
|
|
process.on = noop;
|
|
process.addListener = noop;
|
|
process.once = noop;
|
|
process.off = noop;
|
|
process.removeListener = noop;
|
|
process.removeAllListeners = noop;
|
|
process.emit = noop;
|
|
|
|
process.binding = function (name) {
|
|
throw new Error('process.binding is not supported');
|
|
};
|
|
|
|
process.cwd = function () { return '/' };
|
|
process.chdir = function (dir) {
|
|
throw new Error('process.chdir is not supported');
|
|
};
|
|
process.umask = function() { return 0; };
|
|
|
|
|
|
/***/ },
|
|
/* 9 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-avatar",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-1cbfca0d", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 10 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-avatar.md-primary.md-avatar-icon {\n background-color: PRIMARY-COLOR; }\n .THEME_NAME.md-avatar.md-primary.md-avatar-icon .md-icon {\n color: PRIMARY-CONTRAST-0.99999; }\n\n.THEME_NAME.md-avatar.md-accent.md-avatar-icon {\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-avatar.md-accent.md-avatar-icon .md-icon {\n color: ACCENT-CONTRAST-0.99999; }\n\n.THEME_NAME.md-avatar.md-warn.md-avatar-icon {\n background-color: WARN-COLOR; }\n .THEME_NAME.md-avatar.md-warn.md-avatar-icon .md-icon {\n color: WARN-CONTRAST-0.99999; }\n"
|
|
|
|
/***/ },
|
|
/* 11 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdBackdrop = __webpack_require__(12);
|
|
|
|
var _mdBackdrop2 = _interopRequireDefault(_mdBackdrop);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-backdrop', Vue.extend(_mdBackdrop2.default));
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 12 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(13)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(14)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(15)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdBackdrop/mdBackdrop.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-df1259a6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-df1259a6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdBackdrop.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 13 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 14 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
methods: {
|
|
close: function close() {
|
|
this.$emit('close');
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 15 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-backdrop",
|
|
on: {
|
|
"click": _vm.close,
|
|
"keyup": function($event) {
|
|
if (_vm._k($event.keyCode, "esc", 27)) { return; }
|
|
_vm.close($event)
|
|
}
|
|
}
|
|
})
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-df1259a6", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 16 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdBottomBar = __webpack_require__(17);
|
|
|
|
var _mdBottomBar2 = _interopRequireDefault(_mdBottomBar);
|
|
|
|
var _mdBottomBarItem = __webpack_require__(21);
|
|
|
|
var _mdBottomBarItem2 = _interopRequireDefault(_mdBottomBarItem);
|
|
|
|
var _mdBottomBar3 = __webpack_require__(24);
|
|
|
|
var _mdBottomBar4 = _interopRequireDefault(_mdBottomBar3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-bottom-bar', Vue.extend(_mdBottomBar2.default));
|
|
Vue.component('md-bottom-bar-item', Vue.extend(_mdBottomBarItem2.default));
|
|
|
|
Vue.material.styles.push(_mdBottomBar4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 17 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(18)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(19)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(20)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdBottomBar/mdBottomBar.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-039c211e", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-039c211e", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdBottomBar.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 18 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 19 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdShift: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
computed: {
|
|
classes: function classes() {
|
|
return this.mdShift ? 'md-shift' : 'md-fixed';
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 20 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-bottom-bar",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-039c211e", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 21 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(22)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(23)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdBottomBar/mdBottomBarItem.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-1c07f8a4", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-1c07f8a4", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdBottomBarItem.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 22 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdIcon: String,
|
|
mdActive: Boolean,
|
|
href: String
|
|
},
|
|
data: function data() {
|
|
return {
|
|
active: false
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-active': this.active
|
|
};
|
|
}
|
|
},
|
|
watch: {
|
|
mdActive: function mdActive(active) {
|
|
this.setActive(active);
|
|
}
|
|
},
|
|
methods: {
|
|
setActive: function setActive(active) {
|
|
this.$parent.$children.forEach(function (item) {
|
|
item.active = false;
|
|
});
|
|
|
|
this.active = !!active;
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (!this.$parent.$el.classList.contains('md-bottom-bar')) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You should wrap the md-bottom-bar-item in a md-bottom-bar');
|
|
}
|
|
|
|
if (this.mdActive) {
|
|
this.active = true;
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 23 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return (_vm.href) ? _c('a', {
|
|
directives: [{
|
|
name: "md-ink-ripple",
|
|
rawName: "v-md-ink-ripple"
|
|
}],
|
|
staticClass: "md-bottom-bar-item",
|
|
class: _vm.classes,
|
|
attrs: {
|
|
"href": _vm.href
|
|
},
|
|
on: {
|
|
"click": _vm.setActive
|
|
}
|
|
}, [_c('md-icon', [_vm._v(_vm._s(_vm.mdIcon))]), _vm._v(" "), _c('span', {
|
|
staticClass: "md-text"
|
|
}, [_vm._t("default")], true)]) : _c('button', {
|
|
directives: [{
|
|
name: "md-ink-ripple",
|
|
rawName: "v-md-ink-ripple"
|
|
}],
|
|
staticClass: "md-bottom-bar-item",
|
|
class: _vm.classes,
|
|
attrs: {
|
|
"type": "button"
|
|
},
|
|
on: {
|
|
"click": _vm.setActive
|
|
}
|
|
}, [_c('md-icon', [_vm._v(_vm._s(_vm.mdIcon))]), _vm._v(" "), _c('span', {
|
|
staticClass: "md-text"
|
|
}, [_vm._t("default")], true)])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-1c07f8a4", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 24 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-bottom-bar.md-fixed {\n background-color: BACKGROUND-COLOR; }\n .THEME_NAME.md-bottom-bar.md-fixed .md-bottom-bar-item {\n color: BACKGROUND-CONTRAST-0.54; }\n .THEME_NAME.md-bottom-bar.md-fixed .md-bottom-bar-item:hover:not(.md-active) {\n color: BACKGROUND-CONTRAST-0.87; }\n .THEME_NAME.md-bottom-bar.md-fixed .md-bottom-bar-item.md-active {\n color: PRIMARY-COLOR; }\n .THEME_NAME.md-bottom-bar.md-fixed.md-accent .md-bottom-bar-item.md-active {\n color: ACCENT-COLOR; }\n .THEME_NAME.md-bottom-bar.md-fixed.md-warn .md-bottom-bar-item.md-active {\n color: WARN-COLOR; }\n .THEME_NAME.md-bottom-bar.md-fixed.md-transparent .md-bottom-bar-item.md-active {\n color: BACKGROUND-CONTRAST; }\n\n.THEME_NAME.md-bottom-bar.md-shift {\n background-color: PRIMARY-COLOR;\n color: PRIMARY-CONTRAST; }\n .THEME_NAME.md-bottom-bar.md-shift .md-bottom-bar-item {\n color: PRIMARY-CONTRAST-0.54; }\n .THEME_NAME.md-bottom-bar.md-shift .md-bottom-bar-item:hover:not(.md-active) {\n color: PRIMARY-CONTRAST-0.87; }\n .THEME_NAME.md-bottom-bar.md-shift .md-bottom-bar-item.md-active {\n color: PRIMARY-CONTRAST; }\n .THEME_NAME.md-bottom-bar.md-shift.md-accent {\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-bottom-bar.md-shift.md-accent .md-bottom-bar-item {\n color: ACCENT-CONTRAST-0.54; }\n .THEME_NAME.md-bottom-bar.md-shift.md-accent .md-bottom-bar-item:hover:not(.md-active) {\n color: ACCENT-CONTRAST-0.87; }\n .THEME_NAME.md-bottom-bar.md-shift.md-accent .md-bottom-bar-item.md-active {\n color: ACCENT-CONTRAST; }\n .THEME_NAME.md-bottom-bar.md-shift.md-warn {\n background-color: WARN-COLOR; }\n .THEME_NAME.md-bottom-bar.md-shift.md-warn .md-bottom-bar-item {\n color: WARN-CONTRAST-0.54; }\n .THEME_NAME.md-bottom-bar.md-shift.md-warn .md-bottom-bar-item:hover:not(.md-active) {\n color: WARN-CONTRAST-0.87; }\n .THEME_NAME.md-bottom-bar.md-shift.md-warn .md-bottom-bar-item.md-active {\n color: WARN-CONTRAST; }\n .THEME_NAME.md-bottom-bar.md-shift.md-transparent {\n background-color: transparent; }\n .THEME_NAME.md-bottom-bar.md-shift.md-transparent .md-bottom-bar-item {\n color: BACKGROUND-CONTRAST-0.54; }\n .THEME_NAME.md-bottom-bar.md-shift.md-transparent .md-bottom-bar-item:hover:not(.md-active) {\n color: BACKGROUND-CONTRAST-0.87; }\n .THEME_NAME.md-bottom-bar.md-shift.md-transparent .md-bottom-bar-item.md-active {\n color: BACKGROUND-CONTRAST; }\n"
|
|
|
|
/***/ },
|
|
/* 25 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdButton = __webpack_require__(26);
|
|
|
|
var _mdButton2 = _interopRequireDefault(_mdButton);
|
|
|
|
var _mdButton3 = __webpack_require__(30);
|
|
|
|
var _mdButton4 = _interopRequireDefault(_mdButton3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-button', Vue.extend(_mdButton2.default));
|
|
|
|
Vue.material.styles.push(_mdButton4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 26 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(27)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(28)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(29)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdButton/mdButton.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-9b3983a6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-9b3983a6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdButton.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 27 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 28 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
href: String,
|
|
target: String,
|
|
rel: String,
|
|
type: {
|
|
type: String,
|
|
default: 'button'
|
|
},
|
|
disabled: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
computed: {
|
|
newRel: function newRel() {
|
|
if (this.target === '_blank') {
|
|
return this.rel || 'noopener';
|
|
}
|
|
|
|
return this.rel;
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 29 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return (!_vm.href) ? _c('button', {
|
|
staticClass: "md-button",
|
|
class: [_vm.themeClass],
|
|
attrs: {
|
|
"type": _vm.type,
|
|
"disabled": _vm.disabled
|
|
},
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.$emit('click', $event)
|
|
}
|
|
}
|
|
}, [_c('md-ink-ripple', {
|
|
attrs: {
|
|
"md-disabled": _vm.disabled
|
|
}
|
|
}), _vm._v(" "), _vm._t("default")], true) : _c('a', {
|
|
staticClass: "md-button",
|
|
class: [_vm.themeClass],
|
|
attrs: {
|
|
"href": _vm.href,
|
|
"disabled": _vm.disabled,
|
|
"target": _vm.target,
|
|
"rel": _vm.newRel
|
|
},
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.$emit('click', $event)
|
|
}
|
|
}
|
|
}, [_c('md-ink-ripple', {
|
|
attrs: {
|
|
"md-disabled": _vm.disabled
|
|
}
|
|
}), _vm._v(" "), _vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-9b3983a6", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 30 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-button:not([disabled]).md-raised:not(.md-icon-button) {\n color: BACKGROUND-COLOR-900;\n background-color: BACKGROUND-COLOR-50; }\n .THEME_NAME.md-button:not([disabled]).md-raised:not(.md-icon-button):hover {\n background-color: BACKGROUND-COLOR-200; }\n\n.THEME_NAME.md-button:not([disabled]).md-raised.md-icon-button:not(.md-raised) {\n color: BACKGROUND-COLOR; }\n\n.THEME_NAME.md-button:not([disabled]).md-fab {\n color: ACCENT-CONTRAST;\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-button:not([disabled]).md-fab:hover {\n background-color: ACCENT-COLOR-600; }\n .THEME_NAME.md-button:not([disabled]).md-fab.md-clean {\n color: BACKGROUND-COLOR-900;\n background-color: BACKGROUND-COLOR-50; }\n .THEME_NAME.md-button:not([disabled]).md-fab.md-clean:hover {\n background-color: BACKGROUND-COLOR-200; }\n\n.THEME_NAME.md-button:not([disabled]).md-primary:not(.md-icon-button) {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-button:not([disabled]).md-primary.md-raised, .THEME_NAME.md-button:not([disabled]).md-primary.md-fab {\n background-color: PRIMARY-COLOR;\n color: PRIMARY-CONTRAST; }\n .THEME_NAME.md-button:not([disabled]).md-primary.md-raised:hover, .THEME_NAME.md-button:not([disabled]).md-primary.md-fab:hover {\n background-color: PRIMARY-COLOR-600; }\n\n.THEME_NAME.md-button:not([disabled]).md-primary.md-icon-button:not(.md-raised) {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-button:not([disabled]).md-accent:not(.md-icon-button) {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-button:not([disabled]).md-accent.md-raised {\n background-color: ACCENT-COLOR;\n color: ACCENT-CONTRAST; }\n .THEME_NAME.md-button:not([disabled]).md-accent.md-raised:hover {\n background-color: ACCENT-COLOR-600; }\n\n.THEME_NAME.md-button:not([disabled]).md-accent.md-icon-button:not(.md-raised) {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-button:not([disabled]).md-warn:not(.md-icon-button) {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-button:not([disabled]).md-warn.md-raised, .THEME_NAME.md-button:not([disabled]).md-warn.md-fab {\n background-color: WARN-COLOR;\n color: WARN-CONTRAST; }\n .THEME_NAME.md-button:not([disabled]).md-warn.md-raised:hover, .THEME_NAME.md-button:not([disabled]).md-warn.md-fab:hover {\n background-color: WARN-COLOR-600; }\n\n.THEME_NAME.md-button:not([disabled]).md-warn.md-icon-button:not(.md-raised) {\n color: WARN-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 31 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdButtonToggle = __webpack_require__(32);
|
|
|
|
var _mdButtonToggle2 = _interopRequireDefault(_mdButtonToggle);
|
|
|
|
var _mdButtonToggle3 = __webpack_require__(36);
|
|
|
|
var _mdButtonToggle4 = _interopRequireDefault(_mdButtonToggle3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-button-toggle', Vue.extend(_mdButtonToggle2.default));
|
|
|
|
Vue.material.styles.push(_mdButtonToggle4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 32 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(33)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(34)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(35)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdButtonToggle/mdButtonToggle.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-106cf22d", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-106cf22d", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdButtonToggle.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 33 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 34 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var onClickButton = void 0; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdSingle: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
this.$children.forEach(function (child) {
|
|
var element = child.$el;
|
|
var toggleClass = 'md-toggle';
|
|
|
|
onClickButton = function onClickButton() {
|
|
if (_this.mdSingle) {
|
|
_this.$children.forEach(function (child) {
|
|
child.$el.classList.remove(toggleClass);
|
|
});
|
|
|
|
element.classList.add(toggleClass);
|
|
} else {
|
|
element.classList.toggle(toggleClass);
|
|
}
|
|
};
|
|
|
|
if (element && element.classList.contains('md-button')) {
|
|
element.addEventListener('click', onClickButton);
|
|
}
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.$children.forEach(function (child) {
|
|
var element = child.$el;
|
|
|
|
if (element && element.classList.contains('md-button')) {
|
|
element.removeEventListener('click', onClickButton);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 35 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-button-toggle",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-106cf22d", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 36 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-button-toggle .md-button:after {\n width: 1px;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n content: \" \"; }\n\n.THEME_NAME.md-button-toggle .md-toggle {\n color: BACKGROUND-CONTRAST-600;\n background-color: BACKGROUND-COLOR-500; }\n .THEME_NAME.md-button-toggle .md-toggle:hover:not([disabled]) {\n background-color: BACKGROUND-COLOR-600; }\n .THEME_NAME.md-button-toggle .md-toggle + .md-toggle:after {\n background-color: BACKGROUND-COLOR-600; }\n\n.THEME_NAME.md-button-toggle.md-primary .md-toggle {\n color: PRIMARY-CONTRAST;\n background-color: PRIMARY-COLOR; }\n .THEME_NAME.md-button-toggle.md-primary .md-toggle:hover:not([disabled]) {\n background-color: PRIMARY-COLOR-600; }\n .THEME_NAME.md-button-toggle.md-primary .md-toggle + .md-toggle:after {\n background-color: PRIMARY-COLOR-700; }\n\n.THEME_NAME.md-button-toggle.md-accent .md-toggle {\n color: ACCENT-CONTRAST;\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-button-toggle.md-accent .md-toggle:hover:not([disabled]) {\n background-color: ACCENT-COLOR-600; }\n .THEME_NAME.md-button-toggle.md-accent .md-toggle + .md-toggle:after {\n background-color: ACCENT-COLOR-700; }\n\n.THEME_NAME.md-button-toggle.md-warn .md-toggle {\n color: WARN-CONTRAST;\n background-color: WARN-COLOR; }\n .THEME_NAME.md-button-toggle.md-warn .md-toggle:hover:not([disabled]) {\n background-color: WARN-COLOR-600; }\n .THEME_NAME.md-button-toggle.md-warn .md-toggle + .md-toggle:after {\n background-color: WARN-COLOR-700; }\n\n.THEME_NAME.md-button-toggle [disabled] {\n color: rgba(0, 0, 0, 0.26); }\n .THEME_NAME.md-button-toggle [disabled].md-toggle {\n color: BACKGROUND-CONTRAST-0.2;\n background-color: rgba(0, 0, 0, 0.26); }\n"
|
|
|
|
/***/ },
|
|
/* 37 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdCard = __webpack_require__(38);
|
|
|
|
var _mdCard2 = _interopRequireDefault(_mdCard);
|
|
|
|
var _mdCardMedia = __webpack_require__(42);
|
|
|
|
var _mdCardMedia2 = _interopRequireDefault(_mdCardMedia);
|
|
|
|
var _mdCardMediaCover = __webpack_require__(45);
|
|
|
|
var _mdCardMediaCover2 = _interopRequireDefault(_mdCardMediaCover);
|
|
|
|
var _mdCardMediaActions = __webpack_require__(48);
|
|
|
|
var _mdCardMediaActions2 = _interopRequireDefault(_mdCardMediaActions);
|
|
|
|
var _mdCardHeader = __webpack_require__(50);
|
|
|
|
var _mdCardHeader2 = _interopRequireDefault(_mdCardHeader);
|
|
|
|
var _mdCardHeaderText = __webpack_require__(52);
|
|
|
|
var _mdCardHeaderText2 = _interopRequireDefault(_mdCardHeaderText);
|
|
|
|
var _mdCardContent = __webpack_require__(55);
|
|
|
|
var _mdCardContent2 = _interopRequireDefault(_mdCardContent);
|
|
|
|
var _mdCardActions = __webpack_require__(57);
|
|
|
|
var _mdCardActions2 = _interopRequireDefault(_mdCardActions);
|
|
|
|
var _mdCardArea = __webpack_require__(59);
|
|
|
|
var _mdCardArea2 = _interopRequireDefault(_mdCardArea);
|
|
|
|
var _mdCardExpand = __webpack_require__(62);
|
|
|
|
var _mdCardExpand2 = _interopRequireDefault(_mdCardExpand);
|
|
|
|
var _mdCard3 = __webpack_require__(65);
|
|
|
|
var _mdCard4 = _interopRequireDefault(_mdCard3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-card', Vue.extend(_mdCard2.default));
|
|
Vue.component('md-card-media', Vue.extend(_mdCardMedia2.default));
|
|
Vue.component('md-card-media-cover', Vue.extend(_mdCardMediaCover2.default));
|
|
Vue.component('md-card-media-actions', Vue.extend(_mdCardMediaActions2.default));
|
|
Vue.component('md-card-header', Vue.extend(_mdCardHeader2.default));
|
|
Vue.component('md-card-header-text', Vue.extend(_mdCardHeaderText2.default));
|
|
Vue.component('md-card-content', Vue.extend(_mdCardContent2.default));
|
|
Vue.component('md-card-actions', Vue.extend(_mdCardActions2.default));
|
|
Vue.component('md-card-area', Vue.extend(_mdCardArea2.default));
|
|
Vue.component('md-card-expand', Vue.extend(_mdCardExpand2.default));
|
|
|
|
Vue.material.styles.push(_mdCard4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 38 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(39)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(40)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(41)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCard.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-5074f4ed", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-5074f4ed", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCard.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 39 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 40 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdWithHover: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-with-hover': this.mdWithHover
|
|
};
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 41 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-5074f4ed", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 42 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(43)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(44)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardMedia.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-623c9b27", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-623c9b27", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardMedia.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 43 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdRatio: String,
|
|
mdMedium: Boolean,
|
|
mdBig: Boolean
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
var classes = {
|
|
'md-16-9': this.mdRatio === '16:9' || this.mdRatio === '16/9',
|
|
'md-4-3': this.mdRatio === '4:3' || this.mdRatio === '4/3',
|
|
'md-1-1': this.mdRatio === '1:1' || this.mdRatio === '1/1'
|
|
};
|
|
|
|
if (this.mdMedium || this.mdBig) {
|
|
classes = {
|
|
'md-medium': this.mdMedium,
|
|
'md-big': this.mdBig
|
|
};
|
|
}
|
|
|
|
return classes;
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 44 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-media",
|
|
class: _vm.classes
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-623c9b27", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 45 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(46)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(47)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardMediaCover.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-1a9ce900", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-1a9ce900", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardMediaCover.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 46 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
var getImageAlpha = function getImageAlpha(image, onLoad) {
|
|
var canvas = document.createElement('canvas');
|
|
|
|
image.onload = function () {
|
|
var colorSum = 0;
|
|
var ctx = void 0;
|
|
var imageData = void 0;
|
|
var imageMetadata = void 0;
|
|
var r = void 0;
|
|
var g = void 0;
|
|
var b = void 0;
|
|
var average = void 0;
|
|
|
|
canvas.width = this.width;
|
|
canvas.height = this.height;
|
|
ctx = canvas.getContext('2d');
|
|
|
|
ctx.drawImage(this, 0, 0);
|
|
|
|
imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
imageMetadata = imageData.data;
|
|
|
|
for (var x = 0, len = imageMetadata.length; x < len; x += 4) {
|
|
r = imageMetadata[x];
|
|
g = imageMetadata[x + 1];
|
|
b = imageMetadata[x + 2];
|
|
|
|
average = Math.floor((r + g + b) / 3);
|
|
colorSum += average;
|
|
}
|
|
|
|
onLoad(Math.floor(colorSum / (this.width * this.height)));
|
|
};
|
|
};
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdTextScrim: Boolean,
|
|
mdSolid: Boolean
|
|
},
|
|
data: function data() {
|
|
return {
|
|
backdropBg: {}
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-text-scrim': this.mdTextScrim,
|
|
'md-solid': this.mdSolid
|
|
};
|
|
},
|
|
styles: function styles() {
|
|
return {
|
|
background: this.backdropBg
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
applyScrimColor: function applyScrimColor(darkness) {
|
|
if (this.$refs.backdrop) {
|
|
this.backdropBg = 'linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, ' + darkness / 2 + ') 66%, rgba(0, 0, 0, ' + darkness + ') 100%)';
|
|
}
|
|
},
|
|
applySolidColor: function applySolidColor(darkness) {
|
|
var area = this.$el.querySelector('.md-card-area');
|
|
|
|
if (area) {
|
|
area.style.background = 'rgba(0, 0, 0, ' + darkness + ')';
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
var image = this.$el.querySelector('img');
|
|
|
|
if (image && (this.mdTextScrim || this.mdSolid)) {
|
|
getImageAlpha(image, function (lightness) {
|
|
var limit = 256;
|
|
var darkness = (Math.abs(limit - lightness) * 100 / limit + 15) / 100;
|
|
|
|
if (darkness >= 0.7) {
|
|
darkness = 0.7;
|
|
}
|
|
|
|
if (_this.mdTextScrim) {
|
|
_this.applyScrimColor(darkness);
|
|
} else if (_this.mdSolid) {
|
|
_this.applySolidColor(darkness);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 47 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-media-cover",
|
|
class: _vm.classes
|
|
}, [_vm._t("default"), _vm._v(" "), (_vm.mdTextScrim) ? _c('div', {
|
|
ref: "backdrop",
|
|
staticClass: "md-card-backdrop",
|
|
style: (_vm.styles)
|
|
}) : _vm._e()], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-1a9ce900", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 48 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(49)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardMediaActions.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-9711f4f4", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-9711f4f4", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardMediaActions.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 49 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-media-actions"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-9711f4f4", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 50 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(51)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardHeader.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-2b945d4c", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-2b945d4c", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardHeader.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 51 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-header"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-2b945d4c", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 52 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(53)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(54)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardHeaderText.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-3c04eb27", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-3c04eb27", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardHeaderText.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 53 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
mounted: function mounted() {
|
|
this.parentClasses = this.$parent.$el.classList;
|
|
|
|
if (this.parentClasses.contains('md-card-header')) {
|
|
this.insideParent = true;
|
|
this.parentClasses.add('md-card-header-flex');
|
|
}
|
|
},
|
|
destroyed: function destroyed() {
|
|
this.parentClasses.remove('md-card-header-flex');
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 54 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-header-text"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-3c04eb27", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 55 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(56)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardContent.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-015e0e7c", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-015e0e7c", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardContent.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 56 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-content"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-015e0e7c", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 57 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(58)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardActions.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-78014100", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-78014100", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardActions.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 58 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-actions"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-78014100", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 59 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(60)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(61)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardArea.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-3894e89a", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-3894e89a", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardArea.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 60 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdInset: Boolean
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-inset': this.mdInset
|
|
};
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 61 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-card-area",
|
|
class: _vm.classes
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-3894e89a", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 62 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(63)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(64)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCard/mdCardExpand.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-d6fa0232", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-d6fa0232", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCardExpand.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 63 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
methods: {
|
|
setContentMargin: function setContentMargin() {
|
|
this.content.style.marginTop = -this.content.offsetHeight + 'px';
|
|
},
|
|
toggle: function toggle() {
|
|
this.$refs.expand.classList.toggle('md-active');
|
|
},
|
|
onWindowResize: function onWindowResize() {
|
|
window.requestAnimationFrame(this.setContentMargin);
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.trigger = this.$el.querySelector('[md-expand-trigger]');
|
|
this.content = this.$el.querySelector('.md-card-content');
|
|
|
|
if (this.content) {
|
|
this.setContentMargin();
|
|
|
|
this.trigger.addEventListener('click', this.toggle);
|
|
window.addEventListener('resize', this.onWindowResize);
|
|
}
|
|
},
|
|
destroyed: function destroyed() {
|
|
if (this.content) {
|
|
this.trigger.removeEventListener('click', this.toggle);
|
|
window.removeEventListener('resize', this.onWindowResize);
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 64 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
ref: "expand",
|
|
staticClass: "md-card-expand"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-d6fa0232", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 65 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-card {\n background-color: BACKGROUND-COLOR-A100; }\n .THEME_NAME.md-card.md-primary {\n background-color: PRIMARY-COLOR;\n color: PRIMARY-CONTRAST; }\n .THEME_NAME.md-card.md-primary .md-card-header .md-icon-button .md-icon,\n .THEME_NAME.md-card.md-primary .md-card-actions .md-icon-button .md-icon {\n color: PRIMARY-CONTRAST-0.87; }\n .THEME_NAME.md-card.md-accent {\n background-color: ACCENT-COLOR;\n color: ACCENT-CONTRAST; }\n .THEME_NAME.md-card.md-accent .md-card-header .md-icon-button .md-icon,\n .THEME_NAME.md-card.md-accent .md-card-actions .md-icon-button .md-icon {\n color: ACCENT-CONTRAST-0.87; }\n .THEME_NAME.md-card.md-warn {\n background-color: WARN-COLOR;\n color: WARN-CONTRAST; }\n .THEME_NAME.md-card.md-warn .md-card-header .md-icon-button .md-icon,\n .THEME_NAME.md-card.md-warn .md-card-actions .md-icon-button .md-icon {\n color: WARN-CONTRAST-0.87; }\n .THEME_NAME.md-card .md-card-header .md-icon-button .md-icon,\n .THEME_NAME.md-card .md-card-actions .md-icon-button .md-icon {\n color: BACKGROUND-CONTRAST-0.54; }\n .THEME_NAME.md-card > .md-card-area:after {\n background-color: BACKGROUND-CONTRAST-0.12; }\n .THEME_NAME.md-card .md-card-media-cover.md-text-scrim .md-backdrop {\n background: linear-gradient(to bottom, BACKGROUND-CONTRAST-0.0 20%, BACKGROUND-CONTRAST-0.275 66%, BACKGROUND-CONTRAST-0.55 100%); }\n .THEME_NAME.md-card .md-card-media-cover.md-solid .md-card-area {\n background-color: BACKGROUND-CONTRAST-0.4; }\n .THEME_NAME.md-card .md-card-expand .md-card-actions {\n background-color: BACKGROUND-COLOR-A100; }\n"
|
|
|
|
/***/ },
|
|
/* 66 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdCheckbox = __webpack_require__(67);
|
|
|
|
var _mdCheckbox2 = _interopRequireDefault(_mdCheckbox);
|
|
|
|
var _mdCheckbox3 = __webpack_require__(71);
|
|
|
|
var _mdCheckbox4 = _interopRequireDefault(_mdCheckbox3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-checkbox', Vue.extend(_mdCheckbox2.default));
|
|
|
|
Vue.material.styles.push(_mdCheckbox4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 67 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(68)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(69)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(70)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCheckbox/mdCheckbox.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-9db725e6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-9db725e6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdCheckbox.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 68 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 69 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
name: String,
|
|
value: [String, Boolean],
|
|
id: String,
|
|
disabled: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
checked: this.value
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-checked': Boolean(this.checked),
|
|
'md-disabled': this.disabled
|
|
};
|
|
}
|
|
},
|
|
watch: {
|
|
value: function value() {
|
|
this.checked = this.value;
|
|
}
|
|
},
|
|
methods: {
|
|
toggleCheck: function toggleCheck($event) {
|
|
if (!this.disabled) {
|
|
this.checked = !this.checked;
|
|
this.$emit('change', this.checked, $event);
|
|
this.$emit('input', this.checked, $event);
|
|
}
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 70 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-checkbox",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_c('div', {
|
|
directives: [{
|
|
name: "md-ink-ripple",
|
|
rawName: "v-md-ink-ripple",
|
|
value: (_vm.disabled),
|
|
expression: "disabled"
|
|
}],
|
|
staticClass: "md-checkbox-container",
|
|
attrs: {
|
|
"tabindex": "0"
|
|
},
|
|
on: {
|
|
"click": function($event) {
|
|
$event.stopPropagation();
|
|
_vm.toggleCheck($event)
|
|
}
|
|
}
|
|
}, [_c('input', {
|
|
attrs: {
|
|
"type": "checkbox",
|
|
"name": _vm.name,
|
|
"id": _vm.id,
|
|
"disabled": _vm.disabled,
|
|
"tabindex": "-1"
|
|
},
|
|
domProps: {
|
|
"value": _vm.value
|
|
}
|
|
})]), _vm._v(" "), (_vm.$slots.default) ? _c('label', {
|
|
staticClass: "md-checkbox-label",
|
|
attrs: {
|
|
"for": _vm.id || _vm.name
|
|
}
|
|
}, [_vm._t("default")], true) : _vm._e()])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-9db725e6", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 71 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-checkbox.md-checked .md-checkbox-container {\n background-color: ACCENT-COLOR;\n border-color: ACCENT-COLOR; }\n .THEME_NAME.md-checkbox.md-checked .md-checkbox-container:after {\n border-color: ACCENT-CONTRAST; }\n\n.THEME_NAME.md-checkbox.md-checked .md-ink-ripple {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-checkbox.md-checked .md-ripple {\n opacity: .38; }\n\n.THEME_NAME.md-checkbox.md-primary.md-checked .md-checkbox-container {\n background-color: PRIMARY-COLOR;\n border-color: PRIMARY-COLOR; }\n .THEME_NAME.md-checkbox.md-primary.md-checked .md-checkbox-container:after {\n border-color: PRIMARY-CONTRAST; }\n\n.THEME_NAME.md-checkbox.md-primary.md-checked .md-ink-ripple {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-checkbox.md-warn.md-checked .md-checkbox-container {\n background-color: WARN-COLOR;\n border-color: WARN-COLOR; }\n .THEME_NAME.md-checkbox.md-warn.md-checked .md-checkbox-container:after {\n border-color: WARN-CONTRAST; }\n\n.THEME_NAME.md-checkbox.md-warn.md-checked .md-ink-ripple {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-checkbox.md-disabled.md-checked .md-checkbox-container {\n background-color: rgba(0, 0, 0, 0.26);\n border-color: transparent; }\n\n.THEME_NAME.md-checkbox.md-disabled:not(.md-checked) .md-checkbox-container {\n border-color: rgba(0, 0, 0, 0.26); }\n"
|
|
|
|
/***/ },
|
|
/* 72 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdTheme = __webpack_require__(73);
|
|
|
|
var _mdTheme2 = _interopRequireDefault(_mdTheme);
|
|
|
|
var _mdInkRipple = __webpack_require__(78);
|
|
|
|
var _mdInkRipple2 = _interopRequireDefault(_mdInkRipple);
|
|
|
|
var _core = __webpack_require__(82);
|
|
|
|
var _core2 = _interopRequireDefault(_core);
|
|
|
|
__webpack_require__(83);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
/* Code Components */
|
|
function install(Vue) {
|
|
if (install.installed) {
|
|
console.warn('Vue Material is already installed.');
|
|
|
|
return;
|
|
}
|
|
|
|
install.installed = true;
|
|
|
|
Vue.use(_mdTheme2.default);
|
|
Vue.use(_mdInkRipple2.default);
|
|
Vue.material.styles.push(_core2.default);
|
|
}
|
|
|
|
/* Core Stylesheets */
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 73 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _palette = __webpack_require__(74);
|
|
|
|
var _palette2 = _interopRequireDefault(_palette);
|
|
|
|
var _rgba = __webpack_require__(75);
|
|
|
|
var _rgba2 = _interopRequireDefault(_rgba);
|
|
|
|
var _MdTheme = __webpack_require__(76);
|
|
|
|
var _MdTheme2 = _interopRequireDefault(_MdTheme);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var VALID_THEME_TYPE = ['primary', 'accent', 'background', 'warn', 'hue-1', 'hue-2', 'hue-3'];
|
|
var DEFAULT_THEME_COLORS = {
|
|
primary: 'indigo',
|
|
accent: 'pink',
|
|
background: 'grey',
|
|
warn: 'deep-orange'
|
|
};
|
|
/*const DEFAULT_HUES = {
|
|
accent: {
|
|
'hue-1': 'A100',
|
|
'hue-2': 'A400',
|
|
'hue-3': 'A700'
|
|
},
|
|
background: {
|
|
'hue-1': 'A100',
|
|
'hue-2': '100',
|
|
'hue-3': '300'
|
|
}
|
|
};*/
|
|
|
|
var createNewStyleElement = function createNewStyleElement(style, name) {
|
|
var head = document.head;
|
|
var styleId = 'md-theme-' + name;
|
|
var styleElement = head.querySelector('#' + styleId);
|
|
|
|
if (!styleElement) {
|
|
var newTag = document.createElement('style');
|
|
|
|
style = style.replace(/THEME_NAME/g, styleId);
|
|
|
|
newTag.type = 'text/css';
|
|
newTag.id = styleId;
|
|
newTag.textContent = style;
|
|
|
|
head.appendChild(newTag);
|
|
} else {
|
|
styleElement.textContent = style;
|
|
}
|
|
};
|
|
|
|
var registeredThemes = [];
|
|
|
|
var parseStyle = function parseStyle(style, theme) {
|
|
VALID_THEME_TYPE.forEach(function (type) {
|
|
style = style.replace(RegExp('(' + type.toUpperCase() + ')-(COLOR|CONTRAST)-?(A?\\d*)-?(\\d*\\.?\\d+)?', 'g'), function (match, paletteType, colorType, hue, opacity) {
|
|
var color = void 0;
|
|
var colorVariant = +hue === 0 ? 500 : hue;
|
|
|
|
if (theme[type]) {
|
|
if (typeof theme[type] === 'string') {
|
|
color = _palette2.default[theme[type]];
|
|
} else {
|
|
color = _palette2.default[theme[type].color] || _palette2.default[DEFAULT_THEME_COLORS[type]];
|
|
colorVariant = +hue === 0 ? theme[type].hue : hue;
|
|
}
|
|
} else {
|
|
color = _palette2.default[DEFAULT_THEME_COLORS[type]];
|
|
}
|
|
|
|
if (colorType === 'COLOR') {
|
|
var isDefault = _palette2.default[theme[type]];
|
|
|
|
if (!hue && !isDefault) {
|
|
if (type === 'accent') {
|
|
colorVariant = 'A200';
|
|
} else if (type === 'background') {
|
|
colorVariant = 50;
|
|
}
|
|
}
|
|
|
|
if (opacity) {
|
|
return (0, _rgba2.default)(color[colorVariant], opacity);
|
|
}
|
|
|
|
return color[colorVariant];
|
|
}
|
|
|
|
if (color.darkText.indexOf(colorVariant) >= 0) {
|
|
if (opacity) {
|
|
return (0, _rgba2.default)('#000', opacity);
|
|
}
|
|
|
|
return 'rgba(0, 0, 0, .87)';
|
|
}
|
|
|
|
if (opacity) {
|
|
return (0, _rgba2.default)('#fff', opacity);
|
|
}
|
|
|
|
return 'rgba(255, 255, 255, .87)';
|
|
});
|
|
});
|
|
|
|
return style;
|
|
};
|
|
|
|
var registerTheme = function registerTheme(theme, name, themeStyles) {
|
|
var parsedStyle = [];
|
|
|
|
themeStyles.forEach(function (style) {
|
|
parsedStyle.push(parseStyle(style, theme));
|
|
});
|
|
|
|
createNewStyleElement(parsedStyle.join('\n'), name);
|
|
};
|
|
|
|
var registerAllThemes = function registerAllThemes(themes, themeStyles) {
|
|
var themeNames = themes ? Object.keys(themes) : [];
|
|
|
|
themeNames.forEach(function (name) {
|
|
registerTheme(themes[name], name, themeStyles);
|
|
registeredThemes.push(name);
|
|
});
|
|
};
|
|
|
|
function install(Vue) {
|
|
Vue.material = new Vue({
|
|
data: function data() {
|
|
return {
|
|
styles: [],
|
|
currentTheme: null
|
|
};
|
|
},
|
|
methods: {
|
|
registerTheme: function registerTheme(name, spec) {
|
|
var theme = {};
|
|
|
|
if (typeof name === 'string') {
|
|
theme[name] = spec;
|
|
} else {
|
|
theme = name;
|
|
}
|
|
|
|
registerAllThemes(theme, this.styles);
|
|
},
|
|
applyCurrentTheme: function applyCurrentTheme(themeName) {
|
|
document.body.classList.remove('md-theme-' + this.currentTheme);
|
|
document.body.classList.add('md-theme-' + themeName);
|
|
this.currentTheme = themeName;
|
|
},
|
|
setCurrentTheme: function setCurrentTheme(themeName) {
|
|
if (registeredThemes.indexOf(themeName) >= 0) {
|
|
this.applyCurrentTheme(themeName);
|
|
} else {
|
|
if (registeredThemes.indexOf('default') === -1) {
|
|
this.registerTheme('default', DEFAULT_THEME_COLORS);
|
|
} else {
|
|
console.warn('The theme \'' + themeName + '\' doesn\'t exists. You need to register it first in order to use.');
|
|
}
|
|
|
|
this.applyCurrentTheme('default');
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
Vue.component('md-theme', _MdTheme2.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 74 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = {
|
|
red: {
|
|
50: '#ffebee',
|
|
100: '#ffcdd2',
|
|
200: '#ef9a9a',
|
|
300: '#e57373',
|
|
400: '#ef5350',
|
|
500: '#f44336',
|
|
600: '#e53935',
|
|
700: '#d32f2f',
|
|
800: '#c62828',
|
|
900: '#b71c1c',
|
|
A100: '#ff8a80',
|
|
A200: '#ff5252',
|
|
A400: '#ff1744',
|
|
A700: '#d50000',
|
|
darkText: [50, 100, 200, 300, 'A100']
|
|
},
|
|
pink: {
|
|
50: '#fce4ec',
|
|
100: '#f8bbd0',
|
|
200: '#f48fb1',
|
|
300: '#f06292',
|
|
400: '#ec407a',
|
|
500: '#e91e63',
|
|
600: '#d81b60',
|
|
700: '#c2185b',
|
|
800: '#ad1457',
|
|
900: '#880e4f',
|
|
A100: '#ff80ab',
|
|
A200: '#ff4081',
|
|
A400: '#f50057',
|
|
A700: '#c51162',
|
|
darkText: [50, 100, 200, 'A100']
|
|
},
|
|
purple: {
|
|
50: '#f3e5f5',
|
|
100: '#e1bee7',
|
|
200: '#ce93d8',
|
|
300: '#ba68c8',
|
|
400: '#ab47bc',
|
|
500: '#9c27b0',
|
|
600: '#8e24aa',
|
|
700: '#7b1fa2',
|
|
800: '#6a1b9a',
|
|
900: '#4a148c',
|
|
A100: '#ea80fc',
|
|
A200: '#e040fb',
|
|
A400: '#d500f9',
|
|
A700: '#aa00ff',
|
|
darkText: [50, 100, 200, 'A100']
|
|
},
|
|
'deep-purple': {
|
|
50: '#ede7f6',
|
|
100: '#d1c4e9',
|
|
200: '#b39ddb',
|
|
300: '#9575cd',
|
|
400: '#7e57c2',
|
|
500: '#673ab7',
|
|
600: '#5e35b1',
|
|
700: '#512da8',
|
|
800: '#4527a0',
|
|
900: '#311b92',
|
|
A100: '#b388ff',
|
|
A200: '#7c4dff',
|
|
A400: '#651fff',
|
|
A700: '#6200ea',
|
|
darkText: [50, 100, 200, 'A100']
|
|
},
|
|
indigo: {
|
|
50: '#e8eaf6',
|
|
100: '#c5cae9',
|
|
200: '#9fa8da',
|
|
300: '#7986cb',
|
|
400: '#5c6bc0',
|
|
500: '#3f51b5',
|
|
600: '#3949ab',
|
|
700: '#303f9f',
|
|
800: '#283593',
|
|
900: '#1a237e',
|
|
A100: '#8c9eff',
|
|
A200: '#536dfe',
|
|
A400: '#3d5afe',
|
|
A700: '#304ffe',
|
|
darkText: [50, 100, 200, 'A100']
|
|
},
|
|
blue: {
|
|
50: '#e3f2fd',
|
|
100: '#bbdefb',
|
|
200: '#90caf9',
|
|
300: '#64b5f6',
|
|
400: '#42a5f5',
|
|
500: '#2196f3',
|
|
600: '#1e88e5',
|
|
700: '#1976d2',
|
|
800: '#1565c0',
|
|
900: '#0d47a1',
|
|
A100: '#82b1ff',
|
|
A200: '#448aff',
|
|
A400: '#2979ff',
|
|
A700: '#2962ff',
|
|
darkText: [50, 100, 200, 300, 400, 'A100']
|
|
},
|
|
'light-blue': {
|
|
50: '#e1f5fe',
|
|
100: '#b3e5fc',
|
|
200: '#81d4fa',
|
|
300: '#4fc3f7',
|
|
400: '#29b6f6',
|
|
500: '#03a9f4',
|
|
600: '#039be5',
|
|
700: '#0288d1',
|
|
800: '#0277bd',
|
|
900: '#01579b',
|
|
A100: '#80d8ff',
|
|
A200: '#40c4ff',
|
|
A400: '#00b0ff',
|
|
A700: '#0091ea',
|
|
darkText: [50, 100, 200, 300, 400, 500, 'A100', 'A200', 'A300']
|
|
},
|
|
cyan: {
|
|
50: '#e0f7fa',
|
|
100: '#b2ebf2',
|
|
200: '#80deea',
|
|
300: '#4dd0e1',
|
|
400: '#26c6da',
|
|
500: '#00bcd4',
|
|
600: '#00acc1',
|
|
700: '#0097a7',
|
|
800: '#00838f',
|
|
900: '#006064',
|
|
A100: '#84ffff',
|
|
A200: '#18ffff',
|
|
A400: '#00e5ff',
|
|
A700: '#00b8d4',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
teal: {
|
|
50: '#e0f2f1',
|
|
100: '#b2dfdb',
|
|
200: '#80cbc4',
|
|
300: '#4db6ac',
|
|
400: '#26a69a',
|
|
500: '#009688',
|
|
600: '#00897b',
|
|
700: '#00796b',
|
|
800: '#00695c',
|
|
900: '#004d40',
|
|
A100: '#a7ffeb',
|
|
A200: '#64ffda',
|
|
A400: '#1de9b6',
|
|
A700: '#00bfa5',
|
|
darkText: [50, 100, 200, 300, 400, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
green: {
|
|
50: '#e8f5e9',
|
|
100: '#c8e6c9',
|
|
200: '#a5d6a7',
|
|
300: '#81c784',
|
|
400: '#66bb6a',
|
|
500: '#4caf50',
|
|
600: '#43a047',
|
|
700: '#388e3c',
|
|
800: '#2e7d32',
|
|
900: '#1b5e20',
|
|
A100: '#b9f6ca',
|
|
A200: '#69f0ae',
|
|
A400: '#00e676',
|
|
A700: '#00c853',
|
|
darkText: [50, 100, 200, 300, 400, 500, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
'light-green': {
|
|
50: '#f1f8e9',
|
|
100: '#dcedc8',
|
|
200: '#c5e1a5',
|
|
300: '#aed581',
|
|
400: '#9ccc65',
|
|
500: '#8bc34a',
|
|
600: '#7cb342',
|
|
700: '#689f38',
|
|
800: '#558b2f',
|
|
900: '#33691e',
|
|
A100: '#ccff90',
|
|
A200: '#b2ff59',
|
|
A400: '#76ff03',
|
|
A700: '#64dd17',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
lime: {
|
|
50: '#f9fbe7',
|
|
100: '#f0f4c3',
|
|
200: '#e6ee9c',
|
|
300: '#dce775',
|
|
400: '#d4e157',
|
|
500: '#cddc39',
|
|
600: '#c0ca33',
|
|
700: '#afb42b',
|
|
800: '#9e9d24',
|
|
900: '#827717',
|
|
A100: '#f4ff81',
|
|
A200: '#eeff41',
|
|
A400: '#c6ff00',
|
|
A700: '#aeea00',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 700, 800, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
yellow: {
|
|
50: '#fffde7',
|
|
100: '#fff9c4',
|
|
200: '#fff59d',
|
|
300: '#fff176',
|
|
400: '#ffee58',
|
|
500: '#ffeb3b',
|
|
600: '#fdd835',
|
|
700: '#fbc02d',
|
|
800: '#f9a825',
|
|
900: '#f57f17',
|
|
A100: '#ffff8d',
|
|
A200: '#ffff00',
|
|
A400: '#ffea00',
|
|
A700: '#ffd600',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
amber: {
|
|
50: '#fff8e1',
|
|
100: '#ffecb3',
|
|
200: '#ffe082',
|
|
300: '#ffd54f',
|
|
400: '#ffca28',
|
|
500: '#ffc107',
|
|
600: '#ffb300',
|
|
700: '#ffa000',
|
|
800: '#ff8f00',
|
|
900: '#ff6f00',
|
|
A100: '#ffe57f',
|
|
A200: '#ffd740',
|
|
A400: '#ffc400',
|
|
A700: '#ffab00',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
orange: {
|
|
50: '#fff3e0',
|
|
100: '#ffe0b2',
|
|
200: '#ffcc80',
|
|
300: '#ffb74d',
|
|
400: '#ffa726',
|
|
500: '#ff9800',
|
|
600: '#fb8c00',
|
|
700: '#f57c00',
|
|
800: '#ef6c00',
|
|
900: '#e65100',
|
|
A100: '#ffd180',
|
|
A200: '#ffab40',
|
|
A400: '#ff9100',
|
|
A700: '#ff6d00',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 700, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
'deep-orange': {
|
|
50: '#fbe9e7',
|
|
100: '#ffccbc',
|
|
200: '#ffab91',
|
|
300: '#ff8a65',
|
|
400: '#ff7043',
|
|
500: '#ff5722',
|
|
600: '#f4511e',
|
|
700: '#e64a19',
|
|
800: '#d84315',
|
|
900: '#bf360c',
|
|
A100: '#ff9e80',
|
|
A200: '#ff6e40',
|
|
A400: '#ff3d00',
|
|
A700: '#dd2c00',
|
|
darkText: [50, 100, 200, 300, 400, 'A100', 'A200']
|
|
},
|
|
brown: {
|
|
50: '#efebe9',
|
|
100: '#d7ccc8',
|
|
200: '#bcaaa4',
|
|
300: '#a1887f',
|
|
400: '#8d6e63',
|
|
500: '#795548',
|
|
600: '#6d4c41',
|
|
700: '#5d4037',
|
|
800: '#4e342e',
|
|
900: '#3e2723',
|
|
A100: '#d7ccc8',
|
|
A200: '#bcaaa4',
|
|
A400: '#8d6e63',
|
|
A700: '#5d4037',
|
|
darkText: [50, 100, 200, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
grey: {
|
|
50: '#fafafa',
|
|
100: '#f5f5f5',
|
|
200: '#eeeeee',
|
|
300: '#e0e0e0',
|
|
400: '#bdbdbd',
|
|
500: '#9e9e9e',
|
|
600: '#757575',
|
|
700: '#616161',
|
|
800: '#424242',
|
|
900: '#212121',
|
|
A100: '#fff',
|
|
A200: '#000000',
|
|
A400: '#303030',
|
|
A700: '#616161',
|
|
darkText: [50, 100, 200, 300, 400, 500, 'A100']
|
|
},
|
|
'blue-grey': {
|
|
50: '#eceff1',
|
|
100: '#cfd8dc',
|
|
200: '#b0bec5',
|
|
300: '#90a4ae',
|
|
400: '#78909c',
|
|
500: '#607d8b',
|
|
600: '#546e7a',
|
|
700: '#455a64',
|
|
800: '#37474f',
|
|
900: '#263238',
|
|
A100: '#cfd8dc',
|
|
A200: '#b0bec5',
|
|
A400: '#78909c',
|
|
A700: '#455a64',
|
|
darkText: [50, 100, 200, 300, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
white: {
|
|
50: '#fff',
|
|
100: '#fff',
|
|
200: '#fff',
|
|
300: '#fff',
|
|
400: '#fff',
|
|
500: '#fff',
|
|
600: '#fff',
|
|
700: '#fff',
|
|
800: '#fff',
|
|
900: '#fff',
|
|
A100: '#fff',
|
|
A200: '#fff',
|
|
A400: '#fff',
|
|
A700: '#fff',
|
|
darkText: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 'A100', 'A200', 'A300', 'A400']
|
|
},
|
|
black: {
|
|
50: '#000',
|
|
100: '#000',
|
|
200: '#000',
|
|
300: '#000',
|
|
400: '#000',
|
|
500: '#000',
|
|
600: '#000',
|
|
700: '#000',
|
|
800: '#000',
|
|
900: '#000',
|
|
A100: '#000',
|
|
A200: '#000',
|
|
A400: '#000',
|
|
A700: '#000',
|
|
darkText: []
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 75 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
exports.default = function (hex, opacity) {
|
|
var r = '';
|
|
var g = '';
|
|
var b = '';
|
|
var match = hex.toString().match(/^#?(([0-9a-zA-Z]{3}){1,3})$/);
|
|
|
|
if (!match) {
|
|
throw new Error('Invalid color' + hex);
|
|
}
|
|
|
|
hex = match[1];
|
|
|
|
if (hex.length === 6) {
|
|
r = parseInt(hex.substring(0, 2), 16);
|
|
g = parseInt(hex.substring(2, 4), 16);
|
|
b = parseInt(hex.substring(4, 6), 16);
|
|
} else if (hex.length === 3) {
|
|
var rSubstring = hex.substring(0, 1);
|
|
var gSubstring = hex.substring(1, 2);
|
|
var bSubstring = hex.substring(2, 3);
|
|
|
|
r = parseInt(rSubstring + rSubstring, 16);
|
|
g = parseInt(gSubstring + gSubstring, 16);
|
|
b = parseInt(bSubstring + bSubstring, 16);
|
|
}
|
|
|
|
if (opacity) {
|
|
if (opacity > 1) {
|
|
opacity = opacity / 100;
|
|
}
|
|
|
|
return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + opacity + ')';
|
|
}
|
|
|
|
return 'rgb(' + r + ', ' + g + ', ' + b + ')';
|
|
};
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 76 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(77)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/core/components/mdTheme/MdTheme.vue"
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-7108c965", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-7108c965", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] MdTheme.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 77 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = {
|
|
props: {
|
|
mdTag: String,
|
|
mdName: {
|
|
type: String,
|
|
default: 'default'
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
name: 'md-theme'
|
|
};
|
|
},
|
|
render: function render(_render) {
|
|
if (this.mdTag || this.$slots.default.length > 1) {
|
|
return _render(this.mdTag || 'div', {
|
|
staticClass: 'md-theme'
|
|
}, this.$slots.default);
|
|
}
|
|
|
|
return this.$slots.default[0];
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 78 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
__webpack_require__(79);
|
|
|
|
__webpack_require__(80);
|
|
|
|
function install(Vue) {
|
|
var rippleParentClass = 'md-ink-ripple';
|
|
var rippleClass = 'md-ripple';
|
|
var rippleActiveClass = 'md-active';
|
|
var registeredMouseFunction = void 0;
|
|
var referenceElement = void 0;
|
|
|
|
var unregisterMouseEvent = function unregisterMouseEvent() {
|
|
var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : referenceElement;
|
|
|
|
el.removeEventListener('mousedown', registeredMouseFunction);
|
|
};
|
|
|
|
var registerMouseEvent = function registerMouseEvent(element, holder) {
|
|
if (holder) {
|
|
(function () {
|
|
var ripple = holder.querySelector(':scope > .' + rippleParentClass + '> .' + rippleClass);
|
|
|
|
if (ripple) {
|
|
registeredMouseFunction = function registeredMouseFunction(event) {
|
|
var rect = holder.getBoundingClientRect();
|
|
|
|
event.stopPropagation();
|
|
|
|
ripple.classList.remove(rippleActiveClass);
|
|
|
|
var top = event.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop;
|
|
var left = event.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft;
|
|
|
|
ripple.style.top = top + 'px';
|
|
ripple.style.left = left + 'px';
|
|
|
|
ripple.classList.add(rippleActiveClass);
|
|
};
|
|
|
|
element.removeEventListener('mousedown', registeredMouseFunction);
|
|
element.addEventListener('mousedown', registeredMouseFunction);
|
|
}
|
|
})();
|
|
}
|
|
};
|
|
|
|
var createElement = function createElement(ripple, className, size) {
|
|
ripple = document.createElement('div');
|
|
ripple.className = className;
|
|
|
|
if (size) {
|
|
ripple.style.width = size;
|
|
ripple.style.height = size;
|
|
}
|
|
|
|
return ripple;
|
|
};
|
|
|
|
var checkAvailablePositions = function checkAvailablePositions(element) {
|
|
var availablePositions = ['relative', 'absolute', 'fixed'];
|
|
|
|
return availablePositions.indexOf(getComputedStyle(element).position) > -1;
|
|
};
|
|
|
|
var getClosestParent = function getClosestParent(element) {
|
|
var found = false;
|
|
var parent = element;
|
|
|
|
if (!element) {
|
|
return false;
|
|
}
|
|
|
|
if (checkAvailablePositions(element)) {
|
|
return element;
|
|
}
|
|
|
|
while (!found) {
|
|
parent = parent.parentNode;
|
|
|
|
if (!parent || parent.tagName.toLowerCase() === 'body') {
|
|
break;
|
|
}
|
|
|
|
if (parent && checkAvailablePositions(parent)) {
|
|
found = parent;
|
|
}
|
|
}
|
|
|
|
return found;
|
|
};
|
|
|
|
var createRipple = function createRipple(element, currentRipple) {
|
|
var holder = getClosestParent(element);
|
|
|
|
if (holder) {
|
|
var ripple = holder.querySelector(':scope > .' + rippleParentClass + '> .' + rippleClass);
|
|
|
|
if (!ripple) {
|
|
var elementSize = Math.round(Math.max(holder.offsetWidth, holder.offsetHeight)) + 'px';
|
|
var rippleParent = currentRipple || createElement(ripple, rippleParentClass);
|
|
var rippleElement = createElement(ripple, rippleClass, elementSize);
|
|
|
|
rippleParent.appendChild(rippleElement);
|
|
holder.appendChild(rippleParent);
|
|
}
|
|
|
|
if (holder !== element || !ripple) {
|
|
referenceElement = element;
|
|
registerMouseEvent(element, holder);
|
|
}
|
|
}
|
|
};
|
|
|
|
Vue.directive('mdInkRipple', function (el, bindings) {
|
|
Vue.nextTick(function () {
|
|
if (!bindings.value) {
|
|
createRipple(el);
|
|
} else {
|
|
unregisterMouseEvent(el);
|
|
}
|
|
});
|
|
});
|
|
|
|
Vue.component('md-ink-ripple', {
|
|
props: {
|
|
mdDisabled: Boolean
|
|
},
|
|
render: function render(createElement) {
|
|
return createElement('div', {
|
|
staticClass: 'md-ink-ripple'
|
|
});
|
|
},
|
|
|
|
watch: {
|
|
mdDisabled: function mdDisabled() {
|
|
if (this.mdDisabled) {
|
|
unregisterMouseEvent(this.$el.parentNode);
|
|
} else {
|
|
createRipple(this.$el.parentNode, this.$el);
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (!this.mdDisabled) {
|
|
createRipple(this.$el.parentNode, this.$el);
|
|
}
|
|
},
|
|
destroyed: function destroyed() {
|
|
unregisterMouseEvent(this.$el.parentNode);
|
|
}
|
|
});
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 79 */
|
|
/***/ function(module, exports) {
|
|
|
|
/* scopeQuerySelectorShim.js
|
|
*
|
|
* Copyright (C) 2015 Larry Davis
|
|
* All rights reserved.
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the BSD license. See the LICENSE file for details.
|
|
*/
|
|
(function() {
|
|
if (!HTMLElement.prototype.querySelectorAll) {
|
|
throw new Error("rootedQuerySelectorAll: This polyfill can only be used with browsers that support querySelectorAll");
|
|
}
|
|
// A temporary element to query against for elements not currently in the DOM
|
|
// We'll also use this element to test for :scope support
|
|
var container = document.createElement("div");
|
|
// Check if the browser supports :scope
|
|
try {
|
|
// Browser supports :scope, do nothing
|
|
container.querySelectorAll(":scope *");
|
|
} catch (e) {
|
|
// Match usage of scope
|
|
var scopeRE = /^\s*:scope/gi;
|
|
// Overrides
|
|
function overrideNodeMethod(prototype, methodName) {
|
|
// Store the old method for use later
|
|
var oldMethod = prototype[methodName];
|
|
// Override the method
|
|
prototype[methodName] = function(query) {
|
|
var nodeList, gaveId = false, gaveContainer = false;
|
|
if (query.match(scopeRE)) {
|
|
// Remove :scope
|
|
query = query.replace(scopeRE, "");
|
|
if (!this.parentNode) {
|
|
// Add to temporary container
|
|
container.appendChild(this);
|
|
gaveContainer = true;
|
|
}
|
|
parentNode = this.parentNode;
|
|
if (!this.id) {
|
|
// Give temporary ID
|
|
this.id = "rootedQuerySelector_id_" + new Date().getTime();
|
|
gaveId = true;
|
|
}
|
|
// Find elements against parent node
|
|
nodeList = oldMethod.call(parentNode, "#" + this.id + " " + query);
|
|
// Reset the ID
|
|
if (gaveId) {
|
|
this.id = "";
|
|
}
|
|
// Remove from temporary container
|
|
if (gaveContainer) {
|
|
container.removeChild(this);
|
|
}
|
|
return nodeList;
|
|
} else {
|
|
// No immediate child selector used
|
|
return oldMethod.call(this, query);
|
|
}
|
|
};
|
|
}
|
|
// Browser doesn't support :scope, add polyfill
|
|
overrideNodeMethod(HTMLElement.prototype, "querySelector");
|
|
overrideNodeMethod(HTMLElement.prototype, "querySelectorAll");
|
|
}
|
|
})();
|
|
|
|
/***/ },
|
|
/* 80 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(81)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/core/components/mdInkRipple/mdInkRipple.vue"
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdInkRipple.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 81 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 82 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME :not(input):not(textarea)::selection {\n background: ACCENT-COLOR;\n color: ACCENT-CONTRAST; }\n\n.THEME_NAME a:not(.md-button) {\n color: ACCENT-COLOR; }\n .THEME_NAME a:not(.md-button):hover {\n color: ACCENT-COLOR-800; }\n\nbody.THEME_NAME {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST-0.87; }\n\n/* Typography */\n.THEME_NAME .md-caption,\n.THEME_NAME .md-display-1,\n.THEME_NAME .md-display-2,\n.THEME_NAME .md-display-3,\n.THEME_NAME .md-display-4 {\n color: BACKGROUND-CONTRAST-0.57; }\n\n.THEME_NAME code:not(.hljs) {\n background-color: ACCENT-COLOR-A100-0.2;\n color: ACCENT-COLOR-800; }\n"
|
|
|
|
/***/ },
|
|
/* 83 */
|
|
/***/ 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__(84);
|
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
// add the styles to the DOM
|
|
var update = __webpack_require__(85)(content, {});
|
|
if(content.locals) module.exports = content.locals;
|
|
// Hot Module Replacement
|
|
if(false) {
|
|
// When the styles change, update the <style> tags
|
|
if(!content.locals) {
|
|
module.hot.accept("!!./../../../node_modules/css-loader/index.js!./../../../node_modules/sass-loader/index.js!./core.scss", function() {
|
|
var newContent = require("!!./../../../node_modules/css-loader/index.js!./../../../node_modules/sass-loader/index.js!./core.scss");
|
|
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
|
update(newContent);
|
|
});
|
|
}
|
|
// When the module is disposed, remove the <style> tags
|
|
module.hot.dispose(function() { update(); });
|
|
}
|
|
|
|
/***/ },
|
|
/* 84 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
exports = module.exports = __webpack_require__(4)();
|
|
// imports
|
|
|
|
|
|
// module
|
|
exports.push([module.id, "/* Common */\n/* Responsive Breakpoints */\n/* Transitions - Based on Angular Material */\n/* Elevation - Based on Angular Material */\n/* Structure\n ========================================================================== */\nhtml {\n height: 100%;\n box-sizing: border-box; }\n html *,\n html *:before,\n html *:after {\n box-sizing: inherit; }\n\nbody {\n min-height: 100%;\n margin: 0;\n position: relative;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n color: rgba(0, 0, 0, 0.87);\n font-family: Roboto, \"Noto Sans\", Noto, sans-serif; }\n\n[tabindex='-1']:focus {\n outline: none; }\n\n/* Fluid Media\n ========================================================================== */\naudio,\nimg,\nsvg,\nobject,\nembed,\ncanvas,\nvideo,\niframe {\n max-width: 100%;\n height: auto;\n font-style: italic;\n vertical-align: middle; }\n\n/* Suppress the focus outline on links that cannot be accessed via keyboard.\n This prevents an unwanted focus outline from appearing around elements\n that might still respond to pointer events.\n ========================================================================== */\n[tabindex=\"-1\"]:focus {\n outline: none !important; }\n\n.md-scrollbar::-webkit-scrollbar,\n.md-scrollbar ::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.12);\n transition: all 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n background-color: rgba(0, 0, 0, 0.05); }\n .md-scrollbar::-webkit-scrollbar:hover,\n .md-scrollbar ::-webkit-scrollbar:hover {\n box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.054), inset 0 -1px 0 rgba(0, 0, 0, 0.038);\n background-color: rgba(0, 0, 0, 0.087); }\n\n.md-scrollbar::-webkit-scrollbar-button,\n.md-scrollbar ::-webkit-scrollbar-button {\n display: none; }\n\n.md-scrollbar::-webkit-scrollbar-corner,\n.md-scrollbar ::-webkit-scrollbar-corner {\n background-color: transparent; }\n\n.md-scrollbar::-webkit-scrollbar-thumb,\n.md-scrollbar ::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.26);\n box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.054), inset 0 -1px 0 rgba(0, 0, 0, 0.087);\n transition: all 0.5s cubic-bezier(0.35, 0, 0.25, 1); }\n\n/* Text and Titles\n ========================================================================== */\n.md-caption {\n font-size: 12px;\n font-weight: 400;\n letter-spacing: .02em;\n line-height: 17px; }\n\n.md-body-1, body {\n font-size: 14px;\n font-weight: 400;\n letter-spacing: .01em;\n line-height: 20px; }\n\n.md-body-2 {\n font-size: 14px;\n font-weight: 500;\n letter-spacing: .01em;\n line-height: 24px; }\n\n.md-subheading {\n font-size: 16px;\n font-weight: 400;\n letter-spacing: .01em;\n line-height: 24px; }\n\n.md-title {\n font-size: 20px;\n font-weight: 500;\n letter-spacing: .005em;\n line-height: 26px; }\n\n.md-headline {\n font-size: 24px;\n font-weight: 400;\n letter-spacing: 0;\n line-height: 32px; }\n\n.md-display-1 {\n font-size: 34px;\n font-weight: 400;\n letter-spacing: 0;\n line-height: 40px; }\n\n.md-display-2 {\n font-size: 45px;\n font-weight: 400;\n letter-spacing: 0;\n line-height: 48px; }\n\n.md-display-3 {\n font-size: 56px;\n font-weight: 400;\n letter-spacing: -.005em;\n line-height: 58px; }\n\n.md-display-4 {\n font-size: 112px;\n font-weight: 300;\n letter-spacing: -.01em;\n line-height: 112px; }\n\n/* Links & Buttons\n ========================================================================== */\na:not(.md-button):not(.md-bottom-bar-item) {\n text-decoration: none; }\n a:not(.md-button):not(.md-bottom-bar-item):hover {\n text-decoration: underline; }\n\nbutton:focus {\n outline: none; }\n", ""]);
|
|
|
|
// exports
|
|
|
|
|
|
/***/ },
|
|
/* 85 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
var stylesInDom = {},
|
|
memoize = function(fn) {
|
|
var memo;
|
|
return function () {
|
|
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
|
return memo;
|
|
};
|
|
},
|
|
isOldIE = memoize(function() {
|
|
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
|
|
}),
|
|
getHeadElement = memoize(function () {
|
|
return document.head || document.getElementsByTagName("head")[0];
|
|
}),
|
|
singletonElement = null,
|
|
singletonCounter = 0,
|
|
styleElementsInsertedAtTop = [];
|
|
|
|
module.exports = function(list, options) {
|
|
if(false) {
|
|
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
|
}
|
|
|
|
options = options || {};
|
|
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
|
// tags it will allow on a page
|
|
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
|
|
|
|
// By default, add <style> tags to the bottom of <head>.
|
|
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
|
|
|
|
var styles = listToStyles(list);
|
|
addStylesToDom(styles, options);
|
|
|
|
return function update(newList) {
|
|
var mayRemove = [];
|
|
for(var i = 0; i < styles.length; i++) {
|
|
var item = styles[i];
|
|
var domStyle = stylesInDom[item.id];
|
|
domStyle.refs--;
|
|
mayRemove.push(domStyle);
|
|
}
|
|
if(newList) {
|
|
var newStyles = listToStyles(newList);
|
|
addStylesToDom(newStyles, options);
|
|
}
|
|
for(var i = 0; i < mayRemove.length; i++) {
|
|
var domStyle = mayRemove[i];
|
|
if(domStyle.refs === 0) {
|
|
for(var j = 0; j < domStyle.parts.length; j++)
|
|
domStyle.parts[j]();
|
|
delete stylesInDom[domStyle.id];
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
function addStylesToDom(styles, options) {
|
|
for(var i = 0; i < styles.length; i++) {
|
|
var item = styles[i];
|
|
var domStyle = stylesInDom[item.id];
|
|
if(domStyle) {
|
|
domStyle.refs++;
|
|
for(var j = 0; j < domStyle.parts.length; j++) {
|
|
domStyle.parts[j](item.parts[j]);
|
|
}
|
|
for(; j < item.parts.length; j++) {
|
|
domStyle.parts.push(addStyle(item.parts[j], options));
|
|
}
|
|
} else {
|
|
var parts = [];
|
|
for(var j = 0; j < item.parts.length; j++) {
|
|
parts.push(addStyle(item.parts[j], options));
|
|
}
|
|
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
|
}
|
|
}
|
|
}
|
|
|
|
function listToStyles(list) {
|
|
var styles = [];
|
|
var newStyles = {};
|
|
for(var i = 0; i < list.length; i++) {
|
|
var item = list[i];
|
|
var id = item[0];
|
|
var css = item[1];
|
|
var media = item[2];
|
|
var sourceMap = item[3];
|
|
var part = {css: css, media: media, sourceMap: sourceMap};
|
|
if(!newStyles[id])
|
|
styles.push(newStyles[id] = {id: id, parts: [part]});
|
|
else
|
|
newStyles[id].parts.push(part);
|
|
}
|
|
return styles;
|
|
}
|
|
|
|
function insertStyleElement(options, styleElement) {
|
|
var head = getHeadElement();
|
|
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
|
|
if (options.insertAt === "top") {
|
|
if(!lastStyleElementInsertedAtTop) {
|
|
head.insertBefore(styleElement, head.firstChild);
|
|
} else if(lastStyleElementInsertedAtTop.nextSibling) {
|
|
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
|
|
} else {
|
|
head.appendChild(styleElement);
|
|
}
|
|
styleElementsInsertedAtTop.push(styleElement);
|
|
} else if (options.insertAt === "bottom") {
|
|
head.appendChild(styleElement);
|
|
} else {
|
|
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
|
|
}
|
|
}
|
|
|
|
function removeStyleElement(styleElement) {
|
|
styleElement.parentNode.removeChild(styleElement);
|
|
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
|
|
if(idx >= 0) {
|
|
styleElementsInsertedAtTop.splice(idx, 1);
|
|
}
|
|
}
|
|
|
|
function createStyleElement(options) {
|
|
var styleElement = document.createElement("style");
|
|
styleElement.type = "text/css";
|
|
insertStyleElement(options, styleElement);
|
|
return styleElement;
|
|
}
|
|
|
|
function addStyle(obj, options) {
|
|
var styleElement, update, remove;
|
|
|
|
if (options.singleton) {
|
|
var styleIndex = singletonCounter++;
|
|
styleElement = singletonElement || (singletonElement = createStyleElement(options));
|
|
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
|
|
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
|
|
} else {
|
|
styleElement = createStyleElement(options);
|
|
update = applyToTag.bind(null, styleElement);
|
|
remove = function() {
|
|
removeStyleElement(styleElement);
|
|
};
|
|
}
|
|
|
|
update(obj);
|
|
|
|
return function updateStyle(newObj) {
|
|
if(newObj) {
|
|
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
|
|
return;
|
|
update(obj = newObj);
|
|
} else {
|
|
remove();
|
|
}
|
|
};
|
|
}
|
|
|
|
var replaceText = (function () {
|
|
var textStore = [];
|
|
|
|
return function (index, replacement) {
|
|
textStore[index] = replacement;
|
|
return textStore.filter(Boolean).join('\n');
|
|
};
|
|
})();
|
|
|
|
function applyToSingletonTag(styleElement, index, remove, obj) {
|
|
var css = remove ? "" : obj.css;
|
|
|
|
if (styleElement.styleSheet) {
|
|
styleElement.styleSheet.cssText = replaceText(index, css);
|
|
} else {
|
|
var cssNode = document.createTextNode(css);
|
|
var childNodes = styleElement.childNodes;
|
|
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
|
|
if (childNodes.length) {
|
|
styleElement.insertBefore(cssNode, childNodes[index]);
|
|
} else {
|
|
styleElement.appendChild(cssNode);
|
|
}
|
|
}
|
|
}
|
|
|
|
function applyToTag(styleElement, obj) {
|
|
var css = obj.css;
|
|
var media = obj.media;
|
|
var sourceMap = obj.sourceMap;
|
|
|
|
if (media) {
|
|
styleElement.setAttribute("media", media);
|
|
}
|
|
|
|
if (sourceMap) {
|
|
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
// this makes source maps inside style tags work properly in Chrome
|
|
css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */';
|
|
// http://stackoverflow.com/a/26603875
|
|
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
|
}
|
|
|
|
if (styleElement.styleSheet) {
|
|
styleElement.styleSheet.cssText = css;
|
|
} else {
|
|
while(styleElement.firstChild) {
|
|
styleElement.removeChild(styleElement.firstChild);
|
|
}
|
|
styleElement.appendChild(document.createTextNode(css));
|
|
}
|
|
}
|
|
|
|
|
|
/***/ },
|
|
/* 86 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdDialog = __webpack_require__(87);
|
|
|
|
var _mdDialog2 = _interopRequireDefault(_mdDialog);
|
|
|
|
var _mdDialogTitle = __webpack_require__(92);
|
|
|
|
var _mdDialogTitle2 = _interopRequireDefault(_mdDialogTitle);
|
|
|
|
var _mdDialogContent = __webpack_require__(94);
|
|
|
|
var _mdDialogContent2 = _interopRequireDefault(_mdDialogContent);
|
|
|
|
var _mdDialogActions = __webpack_require__(96);
|
|
|
|
var _mdDialogActions2 = _interopRequireDefault(_mdDialogActions);
|
|
|
|
var _mdDialogAlert = __webpack_require__(98);
|
|
|
|
var _mdDialogAlert2 = _interopRequireDefault(_mdDialogAlert);
|
|
|
|
var _mdDialogConfirm = __webpack_require__(101);
|
|
|
|
var _mdDialogConfirm2 = _interopRequireDefault(_mdDialogConfirm);
|
|
|
|
var _mdDialogPrompt = __webpack_require__(104);
|
|
|
|
var _mdDialogPrompt2 = _interopRequireDefault(_mdDialogPrompt);
|
|
|
|
var _mdDialog3 = __webpack_require__(107);
|
|
|
|
var _mdDialog4 = _interopRequireDefault(_mdDialog3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-dialog', Vue.extend(_mdDialog2.default));
|
|
Vue.component('md-dialog-title', Vue.extend(_mdDialogTitle2.default));
|
|
Vue.component('md-dialog-content', Vue.extend(_mdDialogContent2.default));
|
|
Vue.component('md-dialog-actions', Vue.extend(_mdDialogActions2.default));
|
|
|
|
/* Presets */
|
|
Vue.component('md-dialog-alert', Vue.extend(_mdDialogAlert2.default));
|
|
Vue.component('md-dialog-confirm', Vue.extend(_mdDialogConfirm2.default));
|
|
Vue.component('md-dialog-prompt', Vue.extend(_mdDialogPrompt2.default));
|
|
|
|
Vue.material.styles.push(_mdDialog4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 87 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(88)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(89)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(91)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/mdDialog.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-78b956ed", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-78b956ed", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialog.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 88 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 89 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
var _transitionEndEventName = __webpack_require__(90);
|
|
|
|
var _transitionEndEventName2 = _interopRequireDefault(_transitionEndEventName);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdClickOutsideToClose: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
mdEscToClose: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
mdBackdrop: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
mdOpenFrom: String,
|
|
mdCloseTo: String,
|
|
mdFullscreen: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
active: false,
|
|
transitionOff: false,
|
|
dialogTransform: ''
|
|
};
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-active': this.active
|
|
};
|
|
},
|
|
dialogClasses: function dialogClasses() {
|
|
return {
|
|
'md-fullscreen': this.mdFullscreen,
|
|
'md-transition-off': this.transitionOff,
|
|
'md-reference': this.mdOpenFrom || this.mdCloseTo
|
|
};
|
|
},
|
|
styles: function styles() {
|
|
return {
|
|
transform: this.dialogTransform
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
removeDialog: function removeDialog() {
|
|
if (this.rootElement.contains(this.dialogElement)) {
|
|
this.$el.parentNode.removeChild(this.$el);
|
|
}
|
|
},
|
|
calculateDialogPos: function calculateDialogPos(ref) {
|
|
var reference = document.querySelector(ref);
|
|
|
|
if (reference) {
|
|
var openFromRect = reference.getBoundingClientRect();
|
|
var dialogRect = this.dialogInnerElement.getBoundingClientRect();
|
|
var widthInScale = openFromRect.width / dialogRect.width;
|
|
var heightInScale = openFromRect.height / dialogRect.height;
|
|
var distance = {
|
|
top: -(dialogRect.top - openFromRect.top),
|
|
left: -(dialogRect.left - openFromRect.left + openFromRect.width)
|
|
};
|
|
|
|
if (openFromRect.top > dialogRect.top + dialogRect.height) {
|
|
distance.top = openFromRect.top - dialogRect.top;
|
|
}
|
|
|
|
if (openFromRect.left > dialogRect.left + dialogRect.width) {
|
|
distance.left = openFromRect.left - dialogRect.left - openFromRect.width;
|
|
}
|
|
|
|
this.dialogTransform = 'translate3D(' + distance.left + 'px, ' + distance.top + 'px, 0) scale(' + widthInScale + ', ' + heightInScale + ')';
|
|
}
|
|
},
|
|
open: function open() {
|
|
var _this = this;
|
|
|
|
this.rootElement.appendChild(this.dialogElement);
|
|
this.transitionOff = true;
|
|
this.calculateDialogPos(this.mdOpenFrom);
|
|
|
|
window.setTimeout(function () {
|
|
_this.dialogElement.focus();
|
|
_this.transitionOff = false;
|
|
_this.active = true;
|
|
});
|
|
|
|
this.$emit('open');
|
|
},
|
|
closeOnEsc: function closeOnEsc() {
|
|
if (this.mdEscToClose) {
|
|
this.close();
|
|
}
|
|
},
|
|
close: function close() {
|
|
var _this2 = this;
|
|
|
|
if (this.rootElement.contains(this.dialogElement)) {
|
|
this.$nextTick(function () {
|
|
var cleanElement = function cleanElement() {
|
|
var activeRipple = _this2.dialogElement.querySelector('.md-ripple.md-active');
|
|
|
|
if (activeRipple) {
|
|
activeRipple.classList.remove('md-active');
|
|
}
|
|
|
|
_this2.dialogInnerElement.removeEventListener(_transitionEndEventName2.default, cleanElement);
|
|
_this2.rootElement.removeChild(_this2.dialogElement);
|
|
_this2.dialogTransform = '';
|
|
};
|
|
|
|
_this2.transitionOff = true;
|
|
_this2.dialogTransform = '';
|
|
_this2.calculateDialogPos(_this2.mdCloseTo);
|
|
|
|
window.setTimeout(function () {
|
|
_this2.transitionOff = false;
|
|
_this2.active = false;
|
|
_this2.dialogInnerElement.addEventListener(_transitionEndEventName2.default, cleanElement);
|
|
});
|
|
|
|
_this2.$emit('close');
|
|
});
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this3 = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this3.rootElement = _this3.$root.$el;
|
|
_this3.dialogElement = _this3.$el;
|
|
_this3.dialogInnerElement = _this3.$refs.dialog;
|
|
_this3.removeDialog();
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.removeDialog();
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 90 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
function transitionEndEventName() {
|
|
var el = document.createElement('span');
|
|
var transitions = {
|
|
transition: 'transitionend',
|
|
OTransition: 'oTransitionEnd',
|
|
MozTransition: 'transitionend',
|
|
WebkitTransition: 'webkitTransitionEnd'
|
|
};
|
|
|
|
for (var transition in transitions) {
|
|
if (el.style[transition] !== undefined) {
|
|
return transitions[transition];
|
|
}
|
|
}
|
|
}
|
|
|
|
exports.default = transitionEndEventName();
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 91 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-dialog-container",
|
|
class: [_vm.themeClass, _vm.classes],
|
|
attrs: {
|
|
"tabindex": "0"
|
|
},
|
|
on: {
|
|
"keyup": function($event) {
|
|
if (_vm._k($event.keyCode, "esc", 27)) { return; }
|
|
$event.stopPropagation();
|
|
_vm.closeOnEsc($event)
|
|
}
|
|
}
|
|
}, [_c('div', {
|
|
ref: "dialog",
|
|
staticClass: "md-dialog",
|
|
class: _vm.dialogClasses,
|
|
style: (_vm.styles)
|
|
}, [_vm._t("default")], true), _vm._v(" "), (_vm.mdBackdrop) ? _c('md-backdrop', {
|
|
ref: "backdrop",
|
|
staticClass: "md-dialog-backdrop",
|
|
class: _vm.classes,
|
|
on: {
|
|
"close": function($event) {
|
|
_vm.mdClickOutsideToClose && _vm.close()
|
|
}
|
|
}
|
|
}) : _vm._e()])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-78b956ed", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 92 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(93)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/mdDialogTitle.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-0083d19b", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-0083d19b", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialogTitle.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 93 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-dialog-title md-title"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-0083d19b", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 94 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(95)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/mdDialogContent.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-10712708", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-10712708", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialogContent.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 95 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-dialog-content"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-10712708", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 96 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(97)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/mdDialogActions.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-6e6a9f00", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-6e6a9f00", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialogActions.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 97 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-dialog-actions"
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-6e6a9f00", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 98 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(99)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(100)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/presets/mdDialogAlert.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-e4165678", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-e4165678", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialogAlert.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 99 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdTitle: String,
|
|
mdContent: String,
|
|
mdContentHtml: String,
|
|
mdOkText: {
|
|
type: String,
|
|
default: 'Ok'
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
debounce: false
|
|
};
|
|
},
|
|
methods: {
|
|
fireCloseEvent: function fireCloseEvent() {
|
|
if (!this.debounce) {
|
|
this.$emit('close');
|
|
}
|
|
},
|
|
open: function open() {
|
|
this.$emit('open');
|
|
this.debounce = false;
|
|
this.$refs.dialog.open();
|
|
},
|
|
close: function close() {
|
|
this.fireCloseEvent();
|
|
this.debounce = true;
|
|
this.$refs.dialog.close();
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (!this.mdContent && !this.mdContentHtml) {
|
|
throw new Error('Missing md-content or md-content-html attributes');
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 100 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('md-dialog', {
|
|
ref: "dialog",
|
|
staticClass: "md-dialog-alert",
|
|
on: {
|
|
"close": function($event) {
|
|
_vm.fireCloseEvent()
|
|
}
|
|
}
|
|
}, [(_vm.mdTitle) ? _c('md-dialog-title', [_vm._v(_vm._s(_vm.mdTitle))]) : _vm._e(), _vm._v(" "), (_vm.mdContentHtml) ? _c('md-dialog-content', {
|
|
domProps: {
|
|
"innerHTML": _vm._s(_vm.mdContentHtml)
|
|
}
|
|
}) : _c('md-dialog-content', [_vm._v(_vm._s(_vm.mdContent))]), _vm._v(" "), _vm._v(" "), _c('md-dialog-actions', [_c('md-button', {
|
|
staticClass: "md-primary",
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.close()
|
|
}
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.mdOkText))])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-e4165678", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 101 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(102)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(103)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/presets/mdDialogConfirm.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-70186c28", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-70186c28", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialogConfirm.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 102 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdTitle: String,
|
|
mdContent: String,
|
|
mdContentHtml: String,
|
|
mdOkText: {
|
|
type: String,
|
|
default: 'Ok'
|
|
},
|
|
mdCancelText: {
|
|
type: String,
|
|
default: 'Cancel'
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
debounce: false
|
|
};
|
|
},
|
|
methods: {
|
|
fireCloseEvent: function fireCloseEvent(type) {
|
|
if (!this.debounce) {
|
|
this.$emit('close', type);
|
|
}
|
|
},
|
|
open: function open() {
|
|
this.$emit('open');
|
|
this.debounce = false;
|
|
this.$refs.dialog.open();
|
|
},
|
|
close: function close(type) {
|
|
this.fireCloseEvent(type);
|
|
this.debounce = true;
|
|
this.$refs.dialog.close();
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (!this.mdContent && !this.mdContentHtml) {
|
|
throw new Error('Missing md-content or md-content-html attributes');
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 103 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('md-dialog', {
|
|
ref: "dialog",
|
|
staticClass: "md-dialog-confirm",
|
|
on: {
|
|
"close": function($event) {
|
|
_vm.fireCloseEvent('cancel')
|
|
}
|
|
}
|
|
}, [(_vm.mdTitle) ? _c('md-dialog-title', [_vm._v(_vm._s(_vm.mdTitle))]) : _vm._e(), _vm._v(" "), (_vm.mdContentHtml) ? _c('md-dialog-content', {
|
|
domProps: {
|
|
"innerHTML": _vm._s(_vm.mdContentHtml)
|
|
}
|
|
}) : _c('md-dialog-content', [_vm._v(_vm._s(_vm.mdContent))]), _vm._v(" "), _vm._v(" "), _c('md-dialog-actions', [_c('md-button', {
|
|
staticClass: "md-primary",
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.close('cancel')
|
|
}
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.mdCancelText))]), _vm._v(" "), _c('md-button', {
|
|
staticClass: "md-primary",
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.close('ok')
|
|
}
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.mdOkText))])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-70186c28", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 104 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(105)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(106)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDialog/presets/mdDialogPrompt.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-047e25a8", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-047e25a8", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDialogPrompt.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 105 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
value: {
|
|
type: [String, Number],
|
|
required: true
|
|
},
|
|
mdTitle: String,
|
|
mdContent: String,
|
|
mdContentHtml: String,
|
|
mdOkText: {
|
|
type: String,
|
|
default: 'Ok'
|
|
},
|
|
mdCancelText: {
|
|
type: String,
|
|
default: 'Cancel'
|
|
},
|
|
mdInputId: String,
|
|
mdInputName: String,
|
|
mdInputMaxlength: [String, Number],
|
|
mdInputPlaceholder: String
|
|
},
|
|
data: function data() {
|
|
return {
|
|
debounce: false
|
|
};
|
|
},
|
|
methods: {
|
|
fireCloseEvent: function fireCloseEvent(type) {
|
|
if (!this.debounce) {
|
|
this.$emit('close', type);
|
|
}
|
|
},
|
|
open: function open() {
|
|
var _this = this;
|
|
|
|
this.$emit('open');
|
|
this.debounce = false;
|
|
this.$refs.dialog.open();
|
|
|
|
window.setTimeout(function () {
|
|
_this.$refs.input.$el.focus();
|
|
});
|
|
},
|
|
close: function close(type) {
|
|
this.fireCloseEvent(type);
|
|
this.debounce = true;
|
|
this.$refs.dialog.close();
|
|
},
|
|
confirmValue: function confirmValue() {
|
|
this.$emit('input', this.$refs.input.$el.value);
|
|
this.close('ok');
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 106 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('md-dialog', {
|
|
ref: "dialog",
|
|
staticClass: "md-dialog-prompt",
|
|
on: {
|
|
"close": function($event) {
|
|
_vm.fireCloseEvent('cancel')
|
|
}
|
|
}
|
|
}, [(_vm.mdTitle) ? _c('md-dialog-title', [_vm._v(_vm._s(_vm.mdTitle))]) : _vm._e(), _vm._v(" "), (_vm.mdContentHtml) ? _c('md-dialog-content', {
|
|
domProps: {
|
|
"innerHTML": _vm._s(_vm.mdContentHtml)
|
|
}
|
|
}) : _vm._e(), _vm._v(" "), (_vm.mdContent) ? _c('md-dialog-content', [_vm._v(_vm._s(_vm.mdContent))]) : _vm._e(), _vm._v(" "), _c('md-dialog-content', [_c('md-input-container', [_c('md-input', {
|
|
ref: "input",
|
|
attrs: {
|
|
"id": _vm.mdInputId,
|
|
"name": _vm.mdInputName,
|
|
"maxlength": _vm.mdInputMaxlength,
|
|
"placeholder": _vm.mdInputPlaceholder,
|
|
"value": _vm.value
|
|
},
|
|
nativeOn: {
|
|
"keydown": function($event) {
|
|
if (_vm._k($event.keyCode, "enter", 13)) { return; }
|
|
_vm.confirmValue($event)
|
|
}
|
|
}
|
|
})])]), _vm._v(" "), _c('md-dialog-actions', [_c('md-button', {
|
|
staticClass: "md-primary",
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.close('cancel')
|
|
}
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.mdCancelText))]), _vm._v(" "), _c('md-button', {
|
|
staticClass: "md-primary",
|
|
on: {
|
|
"click": _vm.confirmValue
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.mdOkText))])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-047e25a8", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 107 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-dialog-container .md-dialog {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST; }\n"
|
|
|
|
/***/ },
|
|
/* 108 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdDivider = __webpack_require__(109);
|
|
|
|
var _mdDivider2 = _interopRequireDefault(_mdDivider);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-divider', Vue.extend(_mdDivider2.default));
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 109 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(110)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(111)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdDivider/mdDivider.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-30e870da", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-30e870da", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdDivider.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 110 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 111 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('hr', {
|
|
staticClass: "md-divider"
|
|
})
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-30e870da", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 112 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdIcon = __webpack_require__(113);
|
|
|
|
var _mdIcon2 = _interopRequireDefault(_mdIcon);
|
|
|
|
var _mdIcon3 = __webpack_require__(117);
|
|
|
|
var _mdIcon4 = _interopRequireDefault(_mdIcon3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-icon', Vue.extend(_mdIcon2.default));
|
|
|
|
Vue.material.styles.push(_mdIcon4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 113 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(114)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(115)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(116)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdIcon/mdIcon.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-f5836666", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-f5836666", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdIcon.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 114 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 115 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_mixin2.default]
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 116 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('i', {
|
|
staticClass: "md-icon material-icons",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-f5836666", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 117 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-icon.md-primary {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-icon.md-accent {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-icon.md-warn {\n color: WARN-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 118 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdInputContainer = __webpack_require__(119);
|
|
|
|
var _mdInputContainer2 = _interopRequireDefault(_mdInputContainer);
|
|
|
|
var _mdInput = __webpack_require__(124);
|
|
|
|
var _mdInput2 = _interopRequireDefault(_mdInput);
|
|
|
|
var _mdTextarea = __webpack_require__(129);
|
|
|
|
var _mdTextarea2 = _interopRequireDefault(_mdTextarea);
|
|
|
|
var _mdInputContainer3 = __webpack_require__(133);
|
|
|
|
var _mdInputContainer4 = _interopRequireDefault(_mdInputContainer3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-input-container', _mdInputContainer2.default);
|
|
Vue.component('md-input', _mdInput2.default);
|
|
Vue.component('md-textarea', _mdTextarea2.default);
|
|
|
|
Vue.material.styles.push(_mdInputContainer4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 119 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(120)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(121)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(123)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdInputContainer/mdInputContainer.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-4e747acd", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-4e747acd", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdInputContainer.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 120 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 121 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
var _isArray = __webpack_require__(122);
|
|
|
|
var _isArray2 = _interopRequireDefault(_isArray);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdInline: Boolean,
|
|
mdHasPassword: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
value: '',
|
|
input: false,
|
|
showPassword: false,
|
|
enableCounter: false,
|
|
hasSelect: false,
|
|
hasPlaceholder: false,
|
|
isDisabled: false,
|
|
isRequired: false,
|
|
isFocused: false,
|
|
counterLength: 0,
|
|
inputLength: 0
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
hasValue: function hasValue() {
|
|
if ((0, _isArray2.default)(this.value)) {
|
|
return this.value.length > 0;
|
|
}
|
|
|
|
return Boolean(this.value);
|
|
},
|
|
classes: function classes() {
|
|
return {
|
|
'md-input-inline': this.mdInline,
|
|
'md-has-password': this.mdHasPassword,
|
|
'md-has-select': this.hasSelect,
|
|
'md-has-value': this.hasValue,
|
|
'md-input-placeholder': this.hasPlaceholder,
|
|
'md-input-disabled': this.isDisabled,
|
|
'md-input-required': this.isRequired,
|
|
'md-input-focused': this.isFocused
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
isInput: function isInput() {
|
|
return this.input && this.input.tagName.toLowerCase() === 'input';
|
|
},
|
|
togglePasswordType: function togglePasswordType() {
|
|
if (this.isInput()) {
|
|
if (this.input.type === 'password') {
|
|
this.input.type = 'text';
|
|
this.showPassword = true;
|
|
} else {
|
|
this.input.type = 'password';
|
|
this.showPassword = false;
|
|
}
|
|
|
|
this.input.focus();
|
|
}
|
|
},
|
|
setValue: function setValue(value) {
|
|
this.value = value;
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.input = this.$el.querySelectorAll('input, textarea, select')[0];
|
|
|
|
if (!this.input) {
|
|
this.$destroy();
|
|
|
|
throw new Error('Missing input/select/textarea inside md-input-container');
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 122 */
|
|
/***/ function(module, exports) {
|
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
var isArray = function isArray(value) {
|
|
return value && value.constructor === Array;
|
|
};
|
|
|
|
exports.default = isArray;
|
|
module.exports = exports["default"];
|
|
|
|
/***/ },
|
|
/* 123 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-input-container",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_vm._t("default"), _vm._v(" "), (_vm.enableCounter) ? _c('span', {
|
|
staticClass: "md-count"
|
|
}, [_vm._v(_vm._s(_vm.inputLength) + " / " + _vm._s(_vm.counterLength))]) : _vm._e(), _vm._v(" "), (_vm.mdHasPassword) ? _c('md-button', {
|
|
staticClass: "md-icon-button md-toggle-password",
|
|
on: {
|
|
"click": _vm.togglePasswordType
|
|
}
|
|
}, [_c('md-icon', [_vm._v(_vm._s(_vm.showPassword ? 'visibility_off' : 'visibility'))])]) : _vm._e()], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-4e747acd", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 124 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(125)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(128)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdInputContainer/mdInput.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-53a56078", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-53a56078", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdInput.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 125 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _common = __webpack_require__(126);
|
|
|
|
var _common2 = _interopRequireDefault(_common);
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
mixins: [_common2.default],
|
|
props: {
|
|
type: {
|
|
type: String,
|
|
default: 'text'
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentContainer = (0, _getClosestVueParent2.default)(this.$parent, 'md-input-container');
|
|
|
|
if (!this.parentContainer) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You should wrap the md-input in a md-input-container');
|
|
}
|
|
|
|
this.setParentDisabled();
|
|
this.setParentRequired();
|
|
this.setParentPlaceholder();
|
|
this.setParentValue();
|
|
this.handleMaxLength();
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 126 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = {
|
|
props: {
|
|
value: [String, Number],
|
|
disabled: Boolean,
|
|
required: Boolean,
|
|
maxlength: [Number, String],
|
|
placeholder: String
|
|
},
|
|
watch: {
|
|
value: function value(_value) {
|
|
this.setParentValue(_value);
|
|
},
|
|
disabled: function disabled() {
|
|
this.setParentDisabled();
|
|
},
|
|
required: function required() {
|
|
this.setParentRequired();
|
|
},
|
|
placeholder: function placeholder() {
|
|
this.setParentPlaceholder();
|
|
},
|
|
maxlength: function maxlength() {
|
|
this.handleMaxLength();
|
|
}
|
|
},
|
|
methods: {
|
|
handleMaxLength: function handleMaxLength() {
|
|
this.parentContainer.enableCounter = this.maxlength > 0;
|
|
this.parentContainer.counterLength = this.maxlength;
|
|
},
|
|
setParentValue: function setParentValue(value) {
|
|
this.parentContainer.setValue(value || this.$el.value);
|
|
},
|
|
setParentDisabled: function setParentDisabled() {
|
|
this.parentContainer.isDisabled = this.disabled;
|
|
},
|
|
setParentRequired: function setParentRequired() {
|
|
this.parentContainer.isRequired = this.required;
|
|
},
|
|
setParentPlaceholder: function setParentPlaceholder() {
|
|
this.parentContainer.hasPlaceholder = !!this.placeholder;
|
|
},
|
|
onFocus: function onFocus() {
|
|
this.parentContainer.isFocused = true;
|
|
},
|
|
onBlur: function onBlur() {
|
|
this.parentContainer.isFocused = false;
|
|
this.setParentValue();
|
|
},
|
|
onInput: function onInput() {
|
|
var value = this.$el.value;
|
|
|
|
this.setParentValue();
|
|
this.parentContainer.inputLength = value ? value.length : 0;
|
|
this.$emit('change', value);
|
|
this.$emit('input', value);
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 127 */
|
|
/***/ function(module, exports) {
|
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
var getClosestVueParent = function getClosestVueParent($parent, cssClass) {
|
|
if (!$parent || !$parent.$el) {
|
|
return false;
|
|
}
|
|
|
|
if ($parent._uid === 0) {
|
|
return false;
|
|
}
|
|
|
|
if ($parent.$el.classList.contains(cssClass)) {
|
|
return $parent;
|
|
}
|
|
|
|
return getClosestVueParent($parent.$parent, cssClass);
|
|
};
|
|
|
|
exports.default = getClosestVueParent;
|
|
module.exports = exports["default"];
|
|
|
|
/***/ },
|
|
/* 128 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('input', {
|
|
staticClass: "md-input",
|
|
attrs: {
|
|
"type": _vm.type,
|
|
"disabled": _vm.disabled,
|
|
"required": _vm.required,
|
|
"placeholder": _vm.placeholder,
|
|
"maxlength": _vm.maxlength
|
|
},
|
|
domProps: {
|
|
"value": _vm.value
|
|
},
|
|
on: {
|
|
"focus": _vm.onFocus,
|
|
"blur": _vm.onBlur,
|
|
"input": _vm.onInput,
|
|
"keydown": [function($event) {
|
|
if (_vm._k($event.keyCode, "up", 38)) { return; }
|
|
_vm.onInput($event)
|
|
}, function($event) {
|
|
if (_vm._k($event.keyCode, "down", 40)) { return; }
|
|
_vm.onInput($event)
|
|
}]
|
|
}
|
|
})
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-53a56078", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 129 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(130)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(132)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdInputContainer/mdTextarea.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-62d24f30", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-62d24f30", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTextarea.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 130 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _autosize = __webpack_require__(131);
|
|
|
|
var _autosize2 = _interopRequireDefault(_autosize);
|
|
|
|
var _common = __webpack_require__(126);
|
|
|
|
var _common2 = _interopRequireDefault(_common);
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_common2.default],
|
|
watch: {
|
|
value: function value() {
|
|
var _this = this;
|
|
|
|
this.$nextTick(function () {
|
|
_autosize2.default.update(_this.$el);
|
|
});
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentContainer = (0, _getClosestVueParent2.default)(this.$parent, 'md-input-container');
|
|
|
|
if (!this.parentContainer) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You should wrap the md-textarea in a md-input-container');
|
|
}
|
|
|
|
this.setParentDisabled();
|
|
this.setParentRequired();
|
|
this.setParentPlaceholder();
|
|
this.setParentValue();
|
|
this.handleMaxLength();
|
|
|
|
if (!this.$el.getAttribute('rows')) {
|
|
this.$el.setAttribute('rows', '1');
|
|
}
|
|
|
|
(0, _autosize2.default)(this.$el);
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
_autosize2.default.destroy(this.$el);
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 131 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
Autosize 3.0.20
|
|
license: MIT
|
|
http://www.jacklmoore.com/autosize
|
|
*/
|
|
(function (global, factory) {
|
|
if (true) {
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
|
|
factory(exports, module);
|
|
} else {
|
|
var mod = {
|
|
exports: {}
|
|
};
|
|
factory(mod.exports, mod);
|
|
global.autosize = mod.exports;
|
|
}
|
|
})(this, function (exports, module) {
|
|
'use strict';
|
|
|
|
var map = typeof Map === "function" ? new Map() : (function () {
|
|
var keys = [];
|
|
var values = [];
|
|
|
|
return {
|
|
has: function has(key) {
|
|
return keys.indexOf(key) > -1;
|
|
},
|
|
get: function get(key) {
|
|
return values[keys.indexOf(key)];
|
|
},
|
|
set: function set(key, value) {
|
|
if (keys.indexOf(key) === -1) {
|
|
keys.push(key);
|
|
values.push(value);
|
|
}
|
|
},
|
|
'delete': function _delete(key) {
|
|
var index = keys.indexOf(key);
|
|
if (index > -1) {
|
|
keys.splice(index, 1);
|
|
values.splice(index, 1);
|
|
}
|
|
}
|
|
};
|
|
})();
|
|
|
|
var createEvent = function createEvent(name) {
|
|
return new Event(name, { bubbles: true });
|
|
};
|
|
try {
|
|
new Event('test');
|
|
} catch (e) {
|
|
// IE does not support `new Event()`
|
|
createEvent = function (name) {
|
|
var evt = document.createEvent('Event');
|
|
evt.initEvent(name, true, false);
|
|
return evt;
|
|
};
|
|
}
|
|
|
|
function assign(ta) {
|
|
if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
|
|
|
|
var heightOffset = null;
|
|
var clientWidth = ta.clientWidth;
|
|
var cachedHeight = null;
|
|
|
|
function init() {
|
|
var style = window.getComputedStyle(ta, null);
|
|
|
|
if (style.resize === 'vertical') {
|
|
ta.style.resize = 'none';
|
|
} else if (style.resize === 'both') {
|
|
ta.style.resize = 'horizontal';
|
|
}
|
|
|
|
if (style.boxSizing === 'content-box') {
|
|
heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
|
|
} else {
|
|
heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
}
|
|
// Fix when a textarea is not on document body and heightOffset is Not a Number
|
|
if (isNaN(heightOffset)) {
|
|
heightOffset = 0;
|
|
}
|
|
|
|
update();
|
|
}
|
|
|
|
function changeOverflow(value) {
|
|
{
|
|
// Chrome/Safari-specific fix:
|
|
// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
|
|
// made available by removing the scrollbar. The following forces the necessary text reflow.
|
|
var width = ta.style.width;
|
|
ta.style.width = '0px';
|
|
// Force reflow:
|
|
/* jshint ignore:start */
|
|
ta.offsetWidth;
|
|
/* jshint ignore:end */
|
|
ta.style.width = width;
|
|
}
|
|
|
|
ta.style.overflowY = value;
|
|
}
|
|
|
|
function getParentOverflows(el) {
|
|
var arr = [];
|
|
|
|
while (el && el.parentNode && el.parentNode instanceof Element) {
|
|
if (el.parentNode.scrollTop) {
|
|
arr.push({
|
|
node: el.parentNode,
|
|
scrollTop: el.parentNode.scrollTop
|
|
});
|
|
}
|
|
el = el.parentNode;
|
|
}
|
|
|
|
return arr;
|
|
}
|
|
|
|
function resize() {
|
|
var originalHeight = ta.style.height;
|
|
var overflows = getParentOverflows(ta);
|
|
var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
|
|
|
|
ta.style.height = 'auto';
|
|
|
|
var endHeight = ta.scrollHeight + heightOffset;
|
|
|
|
if (ta.scrollHeight === 0) {
|
|
// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
|
|
ta.style.height = originalHeight;
|
|
return;
|
|
}
|
|
|
|
ta.style.height = endHeight + 'px';
|
|
|
|
// used to check if an update is actually necessary on window.resize
|
|
clientWidth = ta.clientWidth;
|
|
|
|
// prevents scroll-position jumping
|
|
overflows.forEach(function (el) {
|
|
el.node.scrollTop = el.scrollTop;
|
|
});
|
|
|
|
if (docTop) {
|
|
document.documentElement.scrollTop = docTop;
|
|
}
|
|
}
|
|
|
|
function update() {
|
|
resize();
|
|
|
|
var styleHeight = Math.round(parseFloat(ta.style.height));
|
|
var computed = window.getComputedStyle(ta, null);
|
|
var actualHeight = Math.round(parseFloat(computed.height));
|
|
|
|
// The actual height not matching the style height (set via the resize method) indicates that
|
|
// the max-height has been exceeded, in which case the overflow should be set to visible.
|
|
if (actualHeight !== styleHeight) {
|
|
if (computed.overflowY !== 'visible') {
|
|
changeOverflow('visible');
|
|
resize();
|
|
actualHeight = Math.round(parseFloat(window.getComputedStyle(ta, null).height));
|
|
}
|
|
} else {
|
|
// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
|
|
if (computed.overflowY !== 'hidden') {
|
|
changeOverflow('hidden');
|
|
resize();
|
|
actualHeight = Math.round(parseFloat(window.getComputedStyle(ta, null).height));
|
|
}
|
|
}
|
|
|
|
if (cachedHeight !== actualHeight) {
|
|
cachedHeight = actualHeight;
|
|
var evt = createEvent('autosize:resized');
|
|
try {
|
|
ta.dispatchEvent(evt);
|
|
} catch (err) {
|
|
// Firefox will throw an error on dispatchEvent for a detached element
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
|
|
}
|
|
}
|
|
}
|
|
|
|
var pageResize = function pageResize() {
|
|
if (ta.clientWidth !== clientWidth) {
|
|
update();
|
|
}
|
|
};
|
|
|
|
var destroy = (function (style) {
|
|
window.removeEventListener('resize', pageResize, false);
|
|
ta.removeEventListener('input', update, false);
|
|
ta.removeEventListener('keyup', update, false);
|
|
ta.removeEventListener('autosize:destroy', destroy, false);
|
|
ta.removeEventListener('autosize:update', update, false);
|
|
|
|
Object.keys(style).forEach(function (key) {
|
|
ta.style[key] = style[key];
|
|
});
|
|
|
|
map['delete'](ta);
|
|
}).bind(ta, {
|
|
height: ta.style.height,
|
|
resize: ta.style.resize,
|
|
overflowY: ta.style.overflowY,
|
|
overflowX: ta.style.overflowX,
|
|
wordWrap: ta.style.wordWrap
|
|
});
|
|
|
|
ta.addEventListener('autosize:destroy', destroy, false);
|
|
|
|
// IE9 does not fire onpropertychange or oninput for deletions,
|
|
// so binding to onkeyup to catch most of those events.
|
|
// There is no way that I know of to detect something like 'cut' in IE9.
|
|
if ('onpropertychange' in ta && 'oninput' in ta) {
|
|
ta.addEventListener('keyup', update, false);
|
|
}
|
|
|
|
window.addEventListener('resize', pageResize, false);
|
|
ta.addEventListener('input', update, false);
|
|
ta.addEventListener('autosize:update', update, false);
|
|
ta.style.overflowX = 'hidden';
|
|
ta.style.wordWrap = 'break-word';
|
|
|
|
map.set(ta, {
|
|
destroy: destroy,
|
|
update: update
|
|
});
|
|
|
|
init();
|
|
}
|
|
|
|
function destroy(ta) {
|
|
var methods = map.get(ta);
|
|
if (methods) {
|
|
methods.destroy();
|
|
}
|
|
}
|
|
|
|
function update(ta) {
|
|
var methods = map.get(ta);
|
|
if (methods) {
|
|
methods.update();
|
|
}
|
|
}
|
|
|
|
var autosize = null;
|
|
|
|
// Do nothing in Node.js environment and IE8 (or lower)
|
|
if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
|
|
autosize = function (el) {
|
|
return el;
|
|
};
|
|
autosize.destroy = function (el) {
|
|
return el;
|
|
};
|
|
autosize.update = function (el) {
|
|
return el;
|
|
};
|
|
} else {
|
|
autosize = function (el, options) {
|
|
if (el) {
|
|
Array.prototype.forEach.call(el.length ? el : [el], function (x) {
|
|
return assign(x, options);
|
|
});
|
|
}
|
|
return el;
|
|
};
|
|
autosize.destroy = function (el) {
|
|
if (el) {
|
|
Array.prototype.forEach.call(el.length ? el : [el], destroy);
|
|
}
|
|
return el;
|
|
};
|
|
autosize.update = function (el) {
|
|
if (el) {
|
|
Array.prototype.forEach.call(el.length ? el : [el], update);
|
|
}
|
|
return el;
|
|
};
|
|
}
|
|
|
|
module.exports = autosize;
|
|
});
|
|
|
|
/***/ },
|
|
/* 132 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('textarea', {
|
|
staticClass: "md-input",
|
|
attrs: {
|
|
"disabled": _vm.disabled,
|
|
"required": _vm.required,
|
|
"placeholder": _vm.placeholder,
|
|
"maxlength": _vm.maxlength
|
|
},
|
|
domProps: {
|
|
"value": _vm.value
|
|
},
|
|
on: {
|
|
"focus": _vm.onFocus,
|
|
"blur": _vm.onBlur,
|
|
"input": _vm.onInput
|
|
}
|
|
})
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-62d24f30", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 133 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-input-container.md-input-invalid:after {\n background-color: WARN-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-invalid label,\n.THEME_NAME.md-input-container.md-input-invalid .md-error,\n.THEME_NAME.md-input-container.md-input-invalid .md-count,\n.THEME_NAME.md-input-container.md-input-invalid input,\n.THEME_NAME.md-input-container.md-input-invalid textarea {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-focused.md-input-inline label {\n color: rgba(0, 0, 0, 0.54); }\n\n.THEME_NAME.md-input-container.md-input-focused.md-input-required label:after {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-focused:after {\n height: 2px;\n background-color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-focused input,\n.THEME_NAME.md-input-container.md-input-focused textarea {\n color: PRIMARY-COLOR;\n text-shadow: 0 0 0 BACKGROUND-CONTRAST;\n -webkit-text-fill-color: transparent; }\n\n.THEME_NAME.md-input-container.md-input-focused label {\n color: PRIMARY-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 134 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdLayout = __webpack_require__(135);
|
|
|
|
var _mdLayout2 = _interopRequireDefault(_mdLayout);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-layout', Vue.extend(_mdLayout2.default));
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 135 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(136)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(137)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdLayout/mdLayout.vue"
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-1f1a95a6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-1f1a95a6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdLayout.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 136 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 137 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdTag: {
|
|
type: String,
|
|
default: 'div'
|
|
},
|
|
mdRow: Boolean,
|
|
mdRowXsmall: Boolean,
|
|
mdRowSmall: Boolean,
|
|
mdRowMedium: Boolean,
|
|
mdRowLarge: Boolean,
|
|
mdRowXlarge: Boolean,
|
|
mdColumn: Boolean,
|
|
mdColumnXsmall: Boolean,
|
|
mdColumnSmall: Boolean,
|
|
mdColumnMedium: Boolean,
|
|
mdColumnLarge: Boolean,
|
|
mdColumnXlarge: Boolean,
|
|
mdHideXsmall: Boolean,
|
|
mdHideSmall: Boolean,
|
|
mdHideMedium: Boolean,
|
|
mdHideLarge: Boolean,
|
|
mdHideXlarge: Boolean,
|
|
mdGutter: [String, Number, Boolean],
|
|
mdFlex: [String, Number, Boolean],
|
|
mdFlexXsmall: [String, Number, Boolean],
|
|
mdFlexSmall: [String, Number, Boolean],
|
|
mdFlexMedium: [String, Number, Boolean],
|
|
mdFlexLarge: [String, Number, Boolean],
|
|
mdFlexXlarge: [String, Number, Boolean],
|
|
mdFlexOffset: [String, Number]
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
var classes = {
|
|
'md-row': this.mdRow,
|
|
'md-row-xsmall': this.mdRowXsmall,
|
|
'md-row-small': this.mdRowSmall,
|
|
'md-row-medium': this.mdRowMedium,
|
|
'md-row-large': this.mdRowLarge,
|
|
'md-row-xlarge': this.mdRowXlarge,
|
|
'md-column': this.mdColumn,
|
|
'md-column-xsmall': this.mdColumnXsmall,
|
|
'md-column-small': this.mdColumnSmall,
|
|
'md-column-medium': this.mdColumnMedium,
|
|
'md-column-large': this.mdColumnLarge,
|
|
'md-column-xlarge': this.mdColumnXlarge,
|
|
'md-hide-xsmall': this.mdHideXsmall,
|
|
'md-hide-small': this.mdHideSmall,
|
|
'md-hide-medium': this.mdHideMedium,
|
|
'md-hide-large': this.mdHideLarge,
|
|
'md-hide-xlarge': this.mdHideXlarge
|
|
};
|
|
|
|
if (this.mdGutter) {
|
|
if (typeof this.mdGutter === 'boolean') {
|
|
classes['md-gutter'] = true;
|
|
} else if (this.mdGutter) {
|
|
classes['md-gutter-' + this.mdGutter] = true;
|
|
}
|
|
}
|
|
|
|
if (this.mdFlexOffset) {
|
|
classes['md-flex-offset-' + this.mdFlexOffset] = true;
|
|
}
|
|
|
|
this.generateFlexClasses('', 'mdFlex', classes);
|
|
this.generateFlexClasses('xsmall', 'mdFlexXsmall', classes);
|
|
this.generateFlexClasses('small', 'mdFlexSmall', classes);
|
|
this.generateFlexClasses('medium', 'mdFlexMedium', classes);
|
|
this.generateFlexClasses('large', 'mdFlexLarge', classes);
|
|
this.generateFlexClasses('xlarge', 'mdFlexXlarge', classes);
|
|
|
|
return classes;
|
|
}
|
|
},
|
|
methods: {
|
|
generateFlexClasses: function generateFlexClasses(size, name, object) {
|
|
if (size) {
|
|
size = '-' + size;
|
|
}
|
|
|
|
if (this[name]) {
|
|
if (typeof this[name] === 'boolean') {
|
|
object['md-flex' + size] = true;
|
|
} else {
|
|
object['md-flex' + size + '-' + this[name]] = true;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
render: function render(createElement) {
|
|
return createElement(this.mdTag, {
|
|
staticClass: 'md-layout',
|
|
class: this.classes
|
|
}, this.$slots.default);
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 138 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdList = __webpack_require__(139);
|
|
|
|
var _mdList2 = _interopRequireDefault(_mdList);
|
|
|
|
var _mdListItem = __webpack_require__(143);
|
|
|
|
var _mdListItem2 = _interopRequireDefault(_mdListItem);
|
|
|
|
var _mdListExpand = __webpack_require__(145);
|
|
|
|
var _mdListExpand2 = _interopRequireDefault(_mdListExpand);
|
|
|
|
var _mdList3 = __webpack_require__(148);
|
|
|
|
var _mdList4 = _interopRequireDefault(_mdList3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-list', Vue.extend(_mdList2.default));
|
|
Vue.component('md-list-item', Vue.extend(_mdListItem2.default));
|
|
Vue.component('md-list-expand', Vue.extend(_mdListExpand2.default));
|
|
|
|
Vue.material.styles.push(_mdList4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 139 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(140)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(141)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(142)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdList/mdList.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-426a192d", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-426a192d", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdList.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 140 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 141 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_mixin2.default]
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 142 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('ul', {
|
|
staticClass: "md-list",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-426a192d", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 143 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(144)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdList/mdListItem.vue"
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-5f463740", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-5f463740", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdListItem.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 144 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
|
|
exports.default = {
|
|
props: {
|
|
href: String,
|
|
target: String,
|
|
disabled: Boolean
|
|
},
|
|
render: function render(createElement) {
|
|
var _this = this;
|
|
|
|
var containerClass = 'md-button md-list-item-container';
|
|
var holderClass = 'md-list-item-holder';
|
|
var slot = this.$slots.default;
|
|
var componentOptions = slot[0].componentOptions;
|
|
var expandSlot = void 0;
|
|
var expandSlotIndex = void 0;
|
|
|
|
var listItemSpec = {
|
|
staticClass: 'md-list-item',
|
|
on: {
|
|
click: function click($event) {
|
|
_this.$emit('click', $event);
|
|
}
|
|
}
|
|
};
|
|
|
|
var createItemHolder = function createItemHolder(content) {
|
|
return createElement('div', { staticClass: holderClass }, content);
|
|
};
|
|
|
|
var createRipple = function createRipple() {
|
|
return createElement('md-ink-ripple');
|
|
};
|
|
|
|
var createCompatibleRouterLink = function createCompatibleRouterLink() {
|
|
slot[0].data.staticClass = containerClass + ' ' + holderClass;
|
|
|
|
return createElement('li', listItemSpec, [].concat(_toConsumableArray(slot), [createRipple()]));
|
|
};
|
|
|
|
var prepareExpandList = function prepareExpandList() {
|
|
slot.some(function (slot, index) {
|
|
if (slot.componentOptions && slot.componentOptions.tag === 'md-list-expand') {
|
|
expandSlot = slot;
|
|
expandSlotIndex = index;
|
|
|
|
return true;
|
|
}
|
|
});
|
|
};
|
|
|
|
var createExpandIndicator = function createExpandIndicator() {
|
|
return createElement('md-icon', {
|
|
staticClass: 'md-list-expand-indicator'
|
|
}, 'keyboard_arrow_down');
|
|
};
|
|
|
|
var recalculateExpand = function recalculateExpand(element) {
|
|
element.$children.some(function (expand) {
|
|
if (expand.$el.classList.contains('md-list-expand')) {
|
|
expand.calculatePadding();
|
|
}
|
|
});
|
|
};
|
|
|
|
var handleExpandClick = function handleExpandClick(scope) {
|
|
var target = void 0;
|
|
|
|
scope.$parent.$children.some(function (child) {
|
|
var classList = child.$el.classList;
|
|
|
|
if (classList.contains('md-list-item-expand') && classList.contains('md-active')) {
|
|
target = child;
|
|
classList.remove('md-active');
|
|
|
|
recalculateExpand(child);
|
|
|
|
return true;
|
|
}
|
|
});
|
|
|
|
if (!target || scope.$el !== target.$el) {
|
|
scope.$el.classList.add('md-active');
|
|
}
|
|
};
|
|
|
|
var createExpandElement = function createExpandElement() {
|
|
slot.splice(expandSlotIndex, 1);
|
|
slot.push(createExpandIndicator());
|
|
|
|
return createElement('button', {
|
|
staticClass: containerClass,
|
|
on: {
|
|
click: function click() {
|
|
handleExpandClick(_this);
|
|
_this.$emit('click');
|
|
}
|
|
}
|
|
}, [createItemHolder(slot), createRipple()]);
|
|
};
|
|
|
|
var createExpandList = function createExpandList() {
|
|
listItemSpec.staticClass += ' md-list-item-expand';
|
|
|
|
return createElement('li', listItemSpec, [createExpandElement(), expandSlot]);
|
|
};
|
|
|
|
if (componentOptions && componentOptions.tag === 'router-link') {
|
|
return createCompatibleRouterLink();
|
|
}
|
|
|
|
prepareExpandList();
|
|
|
|
if (expandSlot) {
|
|
return createExpandList();
|
|
}
|
|
|
|
var buttonSpec = createElement('md-button', {
|
|
staticClass: containerClass,
|
|
attrs: {
|
|
target: this.target,
|
|
href: this.href,
|
|
disabled: this.disabled
|
|
}
|
|
}, [createItemHolder(slot)]);
|
|
|
|
if (this.target) {
|
|
buttonSpec.data.attrs.rel = 'noopener';
|
|
}
|
|
|
|
return createElement('li', listItemSpec, [buttonSpec]);
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 145 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(146)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(147)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdList/mdListExpand.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-149bf327", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-149bf327", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdListExpand.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 146 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
data: function data() {
|
|
return {
|
|
height: 0
|
|
};
|
|
},
|
|
|
|
methods: {
|
|
calculatePadding: function calculatePadding() {
|
|
this.height = -this.$el.offsetHeight + 'px';
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.calculatePadding();
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 147 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-list-expand",
|
|
style: ({
|
|
'margin-bottom': _vm.height
|
|
})
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-149bf327", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 148 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-list {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST; }\n .THEME_NAME.md-list.md-transparent {\n background-color: transparent;\n color: inherit; }\n .THEME_NAME.md-list .md-list-item .router-link-active.md-list-item-container {\n color: PRIMARY-COLOR; }\n .THEME_NAME.md-list .md-list-item .router-link-active.md-list-item-container > .md-icon {\n color: PRIMARY-COLOR; }\n .THEME_NAME.md-list .md-list-item.md-primary .md-list-item-container {\n color: PRIMARY-COLOR; }\n .THEME_NAME.md-list .md-list-item.md-primary .md-list-item-container > .md-icon {\n color: PRIMARY-COLOR; }\n .THEME_NAME.md-list .md-list-item.md-accent .md-list-item-container {\n color: ACCENT-COLOR; }\n .THEME_NAME.md-list .md-list-item.md-accent .md-list-item-container > .md-icon {\n color: ACCENT-COLOR; }\n .THEME_NAME.md-list .md-list-item.md-warn .md-list-item-container {\n color: WARN-COLOR; }\n .THEME_NAME.md-list .md-list-item.md-warn .md-list-item-container > .md-icon {\n color: WARN-COLOR; }\n .THEME_NAME.md-list .md-list-item-expand .md-list-item-container {\n background-color: BACKGROUND-COLOR-A100; }\n .THEME_NAME.md-list .md-list-item-expand .md-list-item-container:hover, .THEME_NAME.md-list .md-list-item-expand .md-list-item-container:focus {\n background-color: rgba(153, 153, 153, 0.2); }\n"
|
|
|
|
/***/ },
|
|
/* 149 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdMenu = __webpack_require__(150);
|
|
|
|
var _mdMenu2 = _interopRequireDefault(_mdMenu);
|
|
|
|
var _mdMenuItem = __webpack_require__(155);
|
|
|
|
var _mdMenuItem2 = _interopRequireDefault(_mdMenuItem);
|
|
|
|
var _mdMenuContent = __webpack_require__(159);
|
|
|
|
var _mdMenuContent2 = _interopRequireDefault(_mdMenuContent);
|
|
|
|
var _mdMenu3 = __webpack_require__(162);
|
|
|
|
var _mdMenu4 = _interopRequireDefault(_mdMenu3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-menu', Vue.extend(_mdMenu2.default));
|
|
Vue.component('md-menu-item', Vue.extend(_mdMenuItem2.default));
|
|
Vue.component('md-menu-content', Vue.extend(_mdMenuContent2.default));
|
|
|
|
Vue.material.styles.push(_mdMenu4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 150 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(151)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(152)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(154)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdMenu/mdMenu.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-008203e6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-008203e6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdMenu.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 151 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 152 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _transitionEndEventName = __webpack_require__(90);
|
|
|
|
var _transitionEndEventName2 = _interopRequireDefault(_transitionEndEventName);
|
|
|
|
var _getInViewPosition = __webpack_require__(153);
|
|
|
|
var _getInViewPosition2 = _interopRequireDefault(_getInViewPosition);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdSize: {
|
|
type: [Number, String],
|
|
default: 0
|
|
},
|
|
mdDirection: {
|
|
type: String,
|
|
default: 'bottom right'
|
|
},
|
|
mdAlignTrigger: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
mdOffsetX: {
|
|
type: [Number, String],
|
|
default: 0
|
|
},
|
|
mdOffsetY: {
|
|
type: [Number, String],
|
|
default: 0
|
|
},
|
|
mdCloseOnSelect: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
active: false
|
|
};
|
|
},
|
|
watch: {
|
|
mdSize: function mdSize(current, previous) {
|
|
if (current >= 1 && current <= 7) {
|
|
this.removeLastSizeMenuContentClass(previous);
|
|
this.addNewSizeMenuContentClass(current);
|
|
}
|
|
},
|
|
mdDirection: function mdDirection(current, previous) {
|
|
this.removeLastDirectionMenuContentClass(previous);
|
|
this.addNewDirectionMenuContentClass(current);
|
|
},
|
|
mdAlignTrigger: function mdAlignTrigger(trigger) {
|
|
this.handleAlignTriggerClass(trigger);
|
|
}
|
|
},
|
|
methods: {
|
|
validateMenu: function validateMenu() {
|
|
if (!this.menuContent) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You must have a md-menu-content inside your menu.');
|
|
}
|
|
|
|
if (!this.menuTrigger) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You must have an element with a md-menu-trigger attribute inside your menu.');
|
|
}
|
|
},
|
|
removeLastSizeMenuContentClass: function removeLastSizeMenuContentClass(size) {
|
|
this.menuContent.classList.remove('md-size-' + size);
|
|
},
|
|
removeLastDirectionMenuContentClass: function removeLastDirectionMenuContentClass(direction) {
|
|
this.menuContent.classList.remove('md-direction-' + direction.replace(/ /g, '-'));
|
|
},
|
|
addNewSizeMenuContentClass: function addNewSizeMenuContentClass(size) {
|
|
this.menuContent.classList.add('md-size-' + size);
|
|
},
|
|
addNewDirectionMenuContentClass: function addNewDirectionMenuContentClass(direction) {
|
|
this.menuContent.classList.add('md-direction-' + direction.replace(/ /g, '-'));
|
|
},
|
|
handleAlignTriggerClass: function handleAlignTriggerClass(trigger) {
|
|
if (trigger) {
|
|
this.menuContent.classList.add('md-align-trigger');
|
|
}
|
|
},
|
|
getPosition: function getPosition(vertical, horizontal) {
|
|
var menuTriggerRect = this.menuTrigger.getBoundingClientRect();
|
|
|
|
var top = vertical === 'top' ? menuTriggerRect.top + menuTriggerRect.height - this.menuContent.offsetHeight : menuTriggerRect.top;
|
|
|
|
var left = horizontal === 'left' ? menuTriggerRect.left - this.menuContent.offsetWidth + menuTriggerRect.width : menuTriggerRect.left;
|
|
|
|
top += parseInt(this.mdOffsetY, 10);
|
|
left += parseInt(this.mdOffsetX, 10);
|
|
|
|
if (this.mdAlignTrigger) {
|
|
if (vertical === 'top') {
|
|
top -= menuTriggerRect.height;
|
|
} else {
|
|
top += menuTriggerRect.height;
|
|
}
|
|
}
|
|
|
|
return { top: top, left: left };
|
|
},
|
|
calculateMenuContentPos: function calculateMenuContentPos() {
|
|
var position = void 0;
|
|
|
|
if (!this.mdDirection) {
|
|
position = this.getPosition('bottom', 'right');
|
|
} else {
|
|
position = this.getPosition.apply(this, this.mdDirection.trim().split(' '));
|
|
}
|
|
|
|
position = (0, _getInViewPosition2.default)(this.menuContent, position);
|
|
|
|
this.menuContent.style.top = position.top + window.pageYOffset + 'px';
|
|
this.menuContent.style.left = position.left + window.pageXOffset + 'px';
|
|
},
|
|
recalculateOnResize: function recalculateOnResize() {
|
|
window.requestAnimationFrame(this.calculateMenuContentPos);
|
|
},
|
|
open: function open() {
|
|
if (this.rootElement.contains(this.menuContent)) {
|
|
this.rootElement.removeChild(this.menuContent);
|
|
}
|
|
|
|
this.rootElement.appendChild(this.menuContent);
|
|
this.rootElement.appendChild(this.backdropElement);
|
|
window.addEventListener('resize', this.recalculateOnResize);
|
|
|
|
this.calculateMenuContentPos();
|
|
|
|
getComputedStyle(this.menuContent).top;
|
|
this.menuContent.classList.add('md-active');
|
|
this.menuContent.focus();
|
|
this.active = true;
|
|
this.$emit('open');
|
|
},
|
|
close: function close() {
|
|
var _this = this;
|
|
|
|
var close = function close(event) {
|
|
if (_this.menuContent && event.target === _this.menuContent) {
|
|
var activeRipple = _this.menuContent.querySelector('.md-ripple.md-active');
|
|
|
|
_this.menuContent.removeEventListener(_transitionEndEventName2.default, close);
|
|
_this.menuTrigger.focus();
|
|
_this.active = false;
|
|
|
|
if (activeRipple) {
|
|
activeRipple.classList.remove('md-active');
|
|
}
|
|
|
|
_this.rootElement.removeChild(_this.menuContent);
|
|
_this.rootElement.removeChild(_this.backdropElement);
|
|
window.removeEventListener('resize', _this.recalculateOnResize);
|
|
}
|
|
};
|
|
|
|
this.menuContent.addEventListener(_transitionEndEventName2.default, close);
|
|
this.menuContent.classList.remove('md-active');
|
|
this.$emit('close');
|
|
},
|
|
toggle: function toggle() {
|
|
if (this.active) {
|
|
this.close();
|
|
} else {
|
|
this.open();
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this2 = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this2.rootElement = _this2.$root.$el;
|
|
_this2.menuTrigger = _this2.$el.querySelector('[md-menu-trigger]');
|
|
_this2.menuContent = _this2.$el.querySelector('.md-menu-content');
|
|
_this2.backdropElement = _this2.$refs.backdrop.$el;
|
|
_this2.validateMenu();
|
|
_this2.handleAlignTriggerClass(_this2.mdAlignTrigger);
|
|
_this2.addNewSizeMenuContentClass(_this2.mdSize);
|
|
_this2.addNewDirectionMenuContentClass(_this2.mdDirection);
|
|
_this2.$el.removeChild(_this2.$refs.backdrop.$el);
|
|
_this2.menuContent.parentNode.removeChild(_this2.menuContent);
|
|
_this2.menuTrigger.addEventListener('click', _this2.toggle);
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.rootElement.contains(this.menuContent)) {
|
|
this.rootElement.removeChild(this.menuContent);
|
|
this.rootElement.removeChild(this.backdropElement);
|
|
}
|
|
|
|
this.menuTrigger.removeEventListener('click', this.toggle);
|
|
window.removeEventListener('resize', this.recalculateOnResize);
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 153 */
|
|
/***/ function(module, exports) {
|
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
var margin = 8;
|
|
|
|
var isAboveOfViewport = function isAboveOfViewport(element, position) {
|
|
return position.top <= margin - parseInt(getComputedStyle(element).marginTop, 10);
|
|
};
|
|
|
|
var isBelowOfViewport = function isBelowOfViewport(element, position) {
|
|
return position.top + element.offsetHeight + margin >= window.innerHeight - parseInt(getComputedStyle(element).marginTop, 10);
|
|
};
|
|
|
|
var isOnTheLeftOfViewport = function isOnTheLeftOfViewport(element, position) {
|
|
return position.left <= margin - parseInt(getComputedStyle(element).marginLeft, 10);
|
|
};
|
|
|
|
var isOnTheRightOfViewport = function isOnTheRightOfViewport(element, position) {
|
|
return position.left + element.offsetWidth + margin >= window.innerWidth - parseInt(getComputedStyle(element).marginLeft, 10);
|
|
};
|
|
|
|
var getInViewPosition = function getInViewPosition(element, position) {
|
|
var computedStyle = getComputedStyle(element);
|
|
|
|
if (isAboveOfViewport(element, position)) {
|
|
position.top = margin - parseInt(computedStyle.marginTop, 10);
|
|
}
|
|
|
|
if (isOnTheLeftOfViewport(element, position)) {
|
|
position.left = margin - parseInt(computedStyle.marginLeft, 10);
|
|
}
|
|
|
|
if (isOnTheRightOfViewport(element, position)) {
|
|
position.left = window.innerWidth - margin - element.offsetWidth - parseInt(computedStyle.marginLeft, 10);
|
|
}
|
|
|
|
if (isBelowOfViewport(element, position)) {
|
|
position.top = window.innerHeight - margin - element.offsetHeight - parseInt(computedStyle.marginTop, 10);
|
|
}
|
|
|
|
return position;
|
|
};
|
|
|
|
exports.default = getInViewPosition;
|
|
module.exports = exports["default"];
|
|
|
|
/***/ },
|
|
/* 154 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-menu"
|
|
}, [_vm._t("default"), _vm._v(" "), _c('md-backdrop', {
|
|
ref: "backdrop",
|
|
staticClass: "md-menu-backdrop md-transparent md-active",
|
|
on: {
|
|
"close": _vm.close
|
|
}
|
|
})], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-008203e6", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 155 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(156)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(158)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdMenu/mdMenuItem.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-5cf45940", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-5cf45940", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdMenuItem.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 156 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
__webpack_require__(157);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
disabled: Boolean
|
|
},
|
|
data: function data() {
|
|
return {
|
|
parentContent: {},
|
|
index: 0
|
|
};
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-highlighted': this.highlighted
|
|
};
|
|
},
|
|
highlighted: function highlighted() {
|
|
if (this.index === this.parentContent.highlighted) {
|
|
if (this.disabled) {
|
|
if (this.parentContent.oldHighlight > this.parentContent.highlighted) {
|
|
this.parentContent.highlighted--;
|
|
} else {
|
|
this.parentContent.highlighted++;
|
|
}
|
|
}
|
|
|
|
if (this.index === 1) {
|
|
this.parentContent.$el.scrollTop = 0;
|
|
} else if (this.index === this.parentContent.itemsAmount) {
|
|
this.parentContent.$el.scrollTop = this.parentContent.$el.scrollHeight;
|
|
} else {
|
|
this.$el.scrollIntoViewIfNeeded(false);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
},
|
|
methods: {
|
|
close: function close($event) {
|
|
if (!this.disabled) {
|
|
if (this.parentMenu.mdCloseOnSelect) {
|
|
this.parentContent.close();
|
|
}
|
|
|
|
this.$emit('click');
|
|
this.$emit('selected', $event);
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentContent = (0, _getClosestVueParent2.default)(this.$parent, 'md-menu-content');
|
|
this.parentMenu = (0, _getClosestVueParent2.default)(this.$parent, 'md-menu');
|
|
|
|
if (!this.parentContent) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You must wrap the md-menu-item in a md-menu-content');
|
|
}
|
|
|
|
this.parentContent.itemsAmount++;
|
|
this.index = this.parentContent.itemsAmount;
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 157 */
|
|
/***/ function(module, exports) {
|
|
|
|
if (!Element.prototype.scrollIntoViewIfNeeded) {
|
|
Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) {
|
|
centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
|
|
|
|
var parent = this.parentNode,
|
|
parentComputedStyle = window.getComputedStyle(parent, null),
|
|
parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width')),
|
|
parentBorderLeftWidth = parseInt(parentComputedStyle.getPropertyValue('border-left-width')),
|
|
overTop = this.offsetTop - parent.offsetTop < parent.scrollTop,
|
|
overBottom = (this.offsetTop - parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight),
|
|
overLeft = this.offsetLeft - parent.offsetLeft < parent.scrollLeft,
|
|
overRight = (this.offsetLeft - parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth),
|
|
alignWithTop = overTop && !overBottom;
|
|
|
|
if ((overTop || overBottom) && centerIfNeeded) {
|
|
parent.scrollTop = this.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + this.clientHeight / 2;
|
|
}
|
|
|
|
if ((overLeft || overRight) && centerIfNeeded) {
|
|
parent.scrollLeft = this.offsetLeft - parent.offsetLeft - parent.clientWidth / 2 - parentBorderLeftWidth + this.clientWidth / 2;
|
|
}
|
|
|
|
if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) {
|
|
this.scrollIntoView(alignWithTop);
|
|
}
|
|
};
|
|
}
|
|
|
|
/***/ },
|
|
/* 158 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('md-list-item', {
|
|
staticClass: "md-menu-item",
|
|
class: _vm.classes,
|
|
attrs: {
|
|
"disabled": _vm.disabled
|
|
},
|
|
on: {
|
|
"click": _vm.close
|
|
}
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-5cf45940", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 159 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(160)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(161)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdMenu/mdMenuContent.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-518d815c", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-518d815c", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdMenuContent.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 160 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
data: function data() {
|
|
return {
|
|
oldHighlight: false,
|
|
highlighted: false,
|
|
itemsAmount: 0
|
|
};
|
|
},
|
|
|
|
mixins: [_mixin2.default],
|
|
methods: {
|
|
close: function close() {
|
|
this.highlighted = false;
|
|
this.$parent.close();
|
|
},
|
|
highlightItem: function highlightItem(direction) {
|
|
this.oldHighlight = this.highlighted;
|
|
|
|
if (direction === 'up') {
|
|
if (this.highlighted === 1) {
|
|
this.highlighted = this.itemsAmount;
|
|
} else {
|
|
this.highlighted--;
|
|
}
|
|
}
|
|
|
|
if (direction === 'down') {
|
|
if (this.highlighted === this.itemsAmount) {
|
|
this.highlighted = 1;
|
|
} else {
|
|
this.highlighted++;
|
|
}
|
|
}
|
|
},
|
|
fireClick: function fireClick() {
|
|
if (this.highlighted > 0) {
|
|
this.$children[0].$children[this.highlighted - 1].$el.click();
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (!this.$parent.$el.classList.contains('md-menu')) {
|
|
this.$destroy();
|
|
|
|
throw new Error('You must wrap the md-menu-content in a md-menu');
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 161 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-menu-content",
|
|
class: [_vm.themeClass],
|
|
attrs: {
|
|
"tabindex": "-1"
|
|
},
|
|
on: {
|
|
"keydown": [function($event) {
|
|
if (_vm._k($event.keyCode, "esc", 27)) { return; }
|
|
$event.preventDefault();
|
|
_vm.close($event)
|
|
}, function($event) {
|
|
if (_vm._k($event.keyCode, "tab", 9)) { return; }
|
|
$event.preventDefault();
|
|
_vm.close($event)
|
|
}, function($event) {
|
|
if (_vm._k($event.keyCode, "up", 38)) { return; }
|
|
$event.preventDefault();
|
|
_vm.highlightItem('up')
|
|
}, function($event) {
|
|
if (_vm._k($event.keyCode, "down", 40)) { return; }
|
|
$event.preventDefault();
|
|
_vm.highlightItem('down')
|
|
}, function($event) {
|
|
if (_vm._k($event.keyCode, "enter", 13)) { return; }
|
|
$event.preventDefault();
|
|
_vm.fireClick($event)
|
|
}, function($event) {
|
|
if (_vm._k($event.keyCode, "space", 32)) { return; }
|
|
$event.preventDefault();
|
|
_vm.fireClick($event)
|
|
}]
|
|
}
|
|
}, [_c('md-list', [_vm._t("default")], true)])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-518d815c", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 162 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-menu-content {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST; }\n .THEME_NAME.md-menu-content .md-menu-item:hover .md-button:not([disabled]), .THEME_NAME.md-menu-content .md-menu-item:focus .md-button:not([disabled]), .THEME_NAME.md-menu-content .md-menu-item.md-highlighted .md-button:not([disabled]) {\n background-color: BACKGROUND-CONTRAST-0.12; }\n .THEME_NAME.md-menu-content .md-menu-item[disabled] {\n color: BACKGROUND-CONTRAST-0.38; }\n"
|
|
|
|
/***/ },
|
|
/* 163 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdRadio = __webpack_require__(164);
|
|
|
|
var _mdRadio2 = _interopRequireDefault(_mdRadio);
|
|
|
|
var _mdRadio3 = __webpack_require__(168);
|
|
|
|
var _mdRadio4 = _interopRequireDefault(_mdRadio3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-radio', Vue.extend(_mdRadio2.default));
|
|
|
|
Vue.material.styles.push(_mdRadio4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 164 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(165)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(166)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(167)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdRadio/mdRadio.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-e87254d2", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-e87254d2", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdRadio.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 165 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 166 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
name: String,
|
|
id: String,
|
|
value: [String, Boolean, Number],
|
|
mdValue: {
|
|
type: [String, Boolean, Number],
|
|
required: true
|
|
},
|
|
disabled: Boolean
|
|
},
|
|
mixins: [_mixin2.default],
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-checked': this.value && this.mdValue.toString() === this.value.toString(),
|
|
'md-disabled': this.disabled
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
toggleCheck: function toggleCheck($event) {
|
|
if (!this.disabled) {
|
|
this.$emit('change', this.mdValue, $event);
|
|
this.$emit('input', this.mdValue, $event);
|
|
}
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 167 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-radio",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_c('div', {
|
|
directives: [{
|
|
name: "md-ink-ripple",
|
|
rawName: "v-md-ink-ripple",
|
|
value: (_vm.disabled),
|
|
expression: "disabled"
|
|
}],
|
|
staticClass: "md-radio-container",
|
|
on: {
|
|
"click": _vm.toggleCheck
|
|
}
|
|
}, [_c('input', {
|
|
attrs: {
|
|
"type": "radio",
|
|
"name": _vm.name,
|
|
"id": _vm.id,
|
|
"disabled": _vm.disabled
|
|
},
|
|
domProps: {
|
|
"value": _vm.value
|
|
}
|
|
})]), _vm._v(" "), (_vm.$slots.default) ? _c('label', {
|
|
staticClass: "md-radio-label",
|
|
attrs: {
|
|
"for": _vm.id || _vm.name
|
|
}
|
|
}, [_vm._t("default")], true) : _vm._e()])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-e87254d2", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 168 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-radio .md-radio-container:after {\n background-color: ACCENT-COLOR; }\n\n.THEME_NAME.md-radio.md-checked .md-radio-container {\n border-color: ACCENT-COLOR; }\n\n.THEME_NAME.md-radio.md-checked .md-ink-ripple {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-radio.md-checked .md-ripple {\n opacity: .38; }\n\n.THEME_NAME.md-radio.md-primary .md-radio-container:after {\n background-color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-radio.md-primary.md-checked .md-radio-container {\n border-color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-radio.md-primary.md-checked .md-ink-ripple {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-radio.md-warn .md-radio-container:after {\n background-color: WARN-COLOR; }\n\n.THEME_NAME.md-radio.md-warn.md-checked .md-radio-container {\n border-color: WARN-COLOR; }\n\n.THEME_NAME.md-radio.md-warn.md-checked .md-ink-ripple {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-radio.md-disabled .md-radio-container {\n border-color: rgba(0, 0, 0, 0.26); }\n .THEME_NAME.md-radio.md-disabled .md-radio-container:after {\n background-color: rgba(0, 0, 0, 0.26); }\n\n.THEME_NAME.md-radio.md-disabled.md-checked .md-radio-container {\n border-color: rgba(0, 0, 0, 0.26); }\n"
|
|
|
|
/***/ },
|
|
/* 169 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdSelect = __webpack_require__(170);
|
|
|
|
var _mdSelect2 = _interopRequireDefault(_mdSelect);
|
|
|
|
var _mdOption = __webpack_require__(174);
|
|
|
|
var _mdOption2 = _interopRequireDefault(_mdOption);
|
|
|
|
var _mdSelect3 = __webpack_require__(177);
|
|
|
|
var _mdSelect4 = _interopRequireDefault(_mdSelect3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-select', Vue.extend(_mdSelect2.default));
|
|
Vue.component('md-option', Vue.extend(_mdOption2.default));
|
|
|
|
Vue.material.styles.push(_mdSelect4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 170 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(171)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(172)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(173)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdSelect/mdSelect.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-1cdcfd26", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-1cdcfd26", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdSelect.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 171 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 172 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(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 _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
var _isArray = __webpack_require__(122);
|
|
|
|
var _isArray2 = _interopRequireDefault(_isArray);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
name: String,
|
|
id: String,
|
|
required: Boolean,
|
|
multiple: Boolean,
|
|
value: [String, Number, Array],
|
|
disabled: Boolean,
|
|
placeholder: String,
|
|
mdMenuClass: String
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
selectedValue: null,
|
|
selectedText: null,
|
|
multipleText: null,
|
|
multipleOptions: {},
|
|
options: {},
|
|
optionsAmount: 0
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-disabled': this.disabled
|
|
};
|
|
},
|
|
contentClasses: function contentClasses() {
|
|
if (this.multiple) {
|
|
return 'md-multiple ' + this.mdMenuClass;
|
|
}
|
|
|
|
return this.mdMenuClass;
|
|
}
|
|
},
|
|
watch: {
|
|
value: function value(_value) {
|
|
this.setTextAndValue(_value);
|
|
},
|
|
disabled: function disabled() {
|
|
this.setParentDisabled();
|
|
},
|
|
required: function required() {
|
|
this.setParentRequired();
|
|
},
|
|
placeholder: function placeholder() {
|
|
this.setParentPlaceholder();
|
|
}
|
|
},
|
|
methods: {
|
|
setParentDisabled: function setParentDisabled() {
|
|
this.parentContainer.isDisabled = this.disabled;
|
|
},
|
|
setParentRequired: function setParentRequired() {
|
|
this.parentContainer.isRequired = this.required;
|
|
},
|
|
setParentPlaceholder: function setParentPlaceholder() {
|
|
this.parentContainer.hasPlaceholder = !!this.placeholder;
|
|
},
|
|
getSingleValue: function getSingleValue(value) {
|
|
var _this = this;
|
|
|
|
var output = {};
|
|
|
|
Object.keys(this.options).forEach(function (index) {
|
|
var options = _this.options[index];
|
|
|
|
if (options.value === value) {
|
|
output.value = value;
|
|
output.text = options.$refs.item.textContent;
|
|
}
|
|
});
|
|
|
|
return output;
|
|
},
|
|
getMultipleValue: function getMultipleValue(modelValue) {
|
|
var _this2 = this;
|
|
|
|
if ((0, _isArray2.default)(this.value)) {
|
|
var _ret = function () {
|
|
var outputText = [];
|
|
|
|
modelValue.forEach(function (value) {
|
|
Object.keys(_this2.options).forEach(function (index) {
|
|
var options = _this2.options[index];
|
|
|
|
if (options.value === value) {
|
|
var text = options.$refs.item.textContent;
|
|
|
|
_this2.multipleOptions[index] = {
|
|
value: value,
|
|
text: text
|
|
};
|
|
outputText.push(text);
|
|
}
|
|
});
|
|
});
|
|
|
|
return {
|
|
v: {
|
|
value: modelValue,
|
|
text: outputText.join(', ')
|
|
}
|
|
};
|
|
}();
|
|
|
|
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
|
|
}
|
|
|
|
return {};
|
|
},
|
|
setTextAndValue: function setTextAndValue(modelValue) {
|
|
var output = this.multiple ? this.getMultipleValue(modelValue) : this.getSingleValue(modelValue);
|
|
|
|
this.selectedValue = output.value;
|
|
this.selectedText = output.text;
|
|
|
|
if (this.selectedText && this.parentContainer) {
|
|
this.parentContainer.setValue(this.selectedText);
|
|
}
|
|
},
|
|
changeValue: function changeValue(value) {
|
|
this.$emit('input', value);
|
|
this.$emit('change', value);
|
|
},
|
|
selectMultiple: function selectMultiple(index, value, text) {
|
|
var values = [];
|
|
|
|
this.multipleOptions[index] = {
|
|
value: value,
|
|
text: text
|
|
};
|
|
|
|
for (var key in this.multipleOptions) {
|
|
if (this.multipleOptions.hasOwnProperty(key) && this.multipleOptions[key].value) {
|
|
values.push(this.multipleOptions[key].value);
|
|
}
|
|
}
|
|
|
|
this.changeValue(values);
|
|
},
|
|
selectOption: function selectOption(value, text) {
|
|
this.selectedText = text;
|
|
this.setTextAndValue(value);
|
|
this.changeValue(value);
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentContainer = (0, _getClosestVueParent2.default)(this.$parent, 'md-input-container');
|
|
|
|
if (this.parentContainer) {
|
|
this.setParentDisabled();
|
|
this.setParentRequired();
|
|
this.setParentPlaceholder();
|
|
this.parentContainer.hasSelect = true;
|
|
}
|
|
|
|
this.setTextAndValue(this.value);
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.parentContainer) {
|
|
this.parentContainer.setValue('');
|
|
this.parentContainer.hasSelect = false;
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 173 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-select",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_c('md-menu', {
|
|
attrs: {
|
|
"md-close-on-select": !_vm.multiple
|
|
}
|
|
}, [_c('span', {
|
|
ref: "value",
|
|
staticClass: "md-select-value",
|
|
attrs: {
|
|
"md-menu-trigger": ""
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.selectedText || _vm.multipleText || _vm.placeholder))]), _vm._v(" "), _c('md-menu-content', {
|
|
staticClass: "md-select-content",
|
|
class: [_vm.themeClass, _vm.contentClasses]
|
|
}, [_vm._t("default")], true)]), _vm._v(" "), _c('select', {
|
|
attrs: {
|
|
"name": _vm.name,
|
|
"id": _vm.id,
|
|
"required": _vm.required,
|
|
"disabled": _vm.disabled,
|
|
"tabindex": "-1"
|
|
}
|
|
}, [_c('option', {
|
|
domProps: {
|
|
"value": _vm.value
|
|
}
|
|
}, [_vm._v(_vm._s(_vm.value))])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-1cdcfd26", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 174 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(175)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(176)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdSelect/mdOption.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-b3b71f34", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-b3b71f34", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdOption.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 175 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
value: [String, Boolean, Number]
|
|
},
|
|
data: function data() {
|
|
return {
|
|
parentSelect: {},
|
|
check: false,
|
|
index: 0
|
|
};
|
|
},
|
|
computed: {
|
|
isSelected: function isSelected() {
|
|
if (this.value && this.parentSelect.value) {
|
|
var thisValue = this.value.toString();
|
|
|
|
if (this.parentSelect.multiple) {
|
|
return this.parentSelect.value.indexOf(thisValue) >= 0;
|
|
}
|
|
|
|
return this.value && this.parentSelect.value && thisValue === this.parentSelect.value.toString();
|
|
}
|
|
|
|
return false;
|
|
},
|
|
classes: function classes() {
|
|
return {
|
|
'md-selected': this.isSelected,
|
|
'md-checked': this.check
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
setParentOption: function setParentOption() {
|
|
if (!this.parentSelect.multiple) {
|
|
this.parentSelect.selectOption(this.value, this.$refs.item.textContent);
|
|
} else {
|
|
this.check = !this.check;
|
|
}
|
|
},
|
|
selectOption: function selectOption($event) {
|
|
this.setParentOption();
|
|
this.$emit('selected', $event);
|
|
}
|
|
},
|
|
watch: {
|
|
isSelected: function isSelected(selected) {
|
|
if (this.parentSelect.multiple) {
|
|
this.check = selected;
|
|
}
|
|
},
|
|
check: function check(_check) {
|
|
if (_check) {
|
|
this.parentSelect.selectMultiple(this.index, this.value, this.$refs.item.textContent);
|
|
} else {
|
|
this.parentSelect.selectMultiple(this.index);
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentSelect = (0, _getClosestVueParent2.default)(this.$parent, 'md-select');
|
|
this.parentContent = (0, _getClosestVueParent2.default)(this.$parent, 'md-menu-content');
|
|
|
|
if (!this.parentSelect) {
|
|
throw new Error('You must wrap the md-option in a md-select');
|
|
}
|
|
|
|
this.parentSelect.optionsAmount++;
|
|
this.index = this.parentSelect.optionsAmount;
|
|
|
|
this.parentSelect.multipleOptions[this.index] = {};
|
|
this.parentSelect.options[this.index] = this;
|
|
|
|
if (this.parentSelect.value === this.value) {
|
|
this.setParentOption();
|
|
}
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.parentSelect) {
|
|
delete this.parentSelect.options[this.index];
|
|
delete this.parentSelect.multipleOptions[this.index];
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 176 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('md-menu-item', {
|
|
staticClass: "md-option",
|
|
class: _vm.classes,
|
|
attrs: {
|
|
"tabindex": "-1"
|
|
},
|
|
on: {
|
|
"click": _vm.selectOption
|
|
}
|
|
}, [(_vm.parentSelect.multiple) ? _c('md-checkbox', {
|
|
directives: [{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: (_vm.check),
|
|
expression: "check"
|
|
}],
|
|
staticClass: "md-primary",
|
|
domProps: {
|
|
"value": (_vm.check)
|
|
},
|
|
on: {
|
|
"input": function($event) {
|
|
_vm.check = $event
|
|
}
|
|
}
|
|
}, [_c('span', {
|
|
ref: "item"
|
|
}, [_vm._t("default")], true)]) : _c('span', {
|
|
ref: "item"
|
|
}, [_vm._t("default")], true), _vm._v(" ")])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-b3b71f34", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 177 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-select:after {\n color: BACKGROUND-CONTRAST-0.54; }\n\n.THEME_NAME.md-select:after {\n color: BACKGROUND-CONTRAST-0.38; }\n\n.THEME_NAME.md-select-content .md-menu-item.md-selected, .THEME_NAME.md-select-content .md-menu-item.md-checked {\n color: PRIMARY-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 178 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdSidenav = __webpack_require__(179);
|
|
|
|
var _mdSidenav2 = _interopRequireDefault(_mdSidenav);
|
|
|
|
var _mdSidenav3 = __webpack_require__(183);
|
|
|
|
var _mdSidenav4 = _interopRequireDefault(_mdSidenav3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-sidenav', Vue.extend(_mdSidenav2.default));
|
|
|
|
Vue.material.styles.push(_mdSidenav4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 179 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(180)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(181)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(182)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdSidenav/mdSidenav.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-4904390e", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-4904390e", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdSidenav.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 180 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 181 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
data: function data() {
|
|
return {
|
|
mdVisible: false
|
|
};
|
|
},
|
|
|
|
mixins: [_mixin2.default],
|
|
computed: {
|
|
classes: function classes() {
|
|
return this.mdVisible && 'md-active';
|
|
}
|
|
},
|
|
methods: {
|
|
show: function show() {
|
|
this.mdVisible = true;
|
|
this.$el.focus();
|
|
this.$emit('open');
|
|
},
|
|
close: function close() {
|
|
this.mdVisible = false;
|
|
this.$el.blur();
|
|
this.$emit('close');
|
|
},
|
|
toggle: function toggle() {
|
|
if (this.mdVisible) {
|
|
this.close();
|
|
} else {
|
|
this.show();
|
|
}
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 182 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-sidenav",
|
|
class: [_vm.themeClass, _vm.classes],
|
|
attrs: {
|
|
"tabindex": "0"
|
|
},
|
|
on: {
|
|
"keyup": function($event) {
|
|
if (_vm._k($event.keyCode, "esc", 27)) { return; }
|
|
_vm.close($event)
|
|
}
|
|
}
|
|
}, [_c('div', {
|
|
staticClass: "md-sidenav-content"
|
|
}, [_vm._t("default")], true), _vm._v(" "), _c('md-backdrop', {
|
|
staticClass: "md-sidenav-backdrop",
|
|
on: {
|
|
"close": _vm.close
|
|
}
|
|
})])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-4904390e", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 183 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-sidenav .md-sidenav-content {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST; }\n"
|
|
|
|
/***/ },
|
|
/* 184 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdSpinner = __webpack_require__(185);
|
|
|
|
var _mdSpinner2 = _interopRequireDefault(_mdSpinner);
|
|
|
|
var _mdSpinner3 = __webpack_require__(189);
|
|
|
|
var _mdSpinner4 = _interopRequireDefault(_mdSpinner3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-spinner', Vue.extend(_mdSpinner2.default));
|
|
|
|
Vue.material.styles.push(_mdSpinner4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 185 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(186)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(187)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(188)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdSpinner/mdSpinner.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-7e174593", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-7e174593", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdSpinner.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 186 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 187 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdSize: {
|
|
type: Number,
|
|
default: 50
|
|
},
|
|
mdStroke: {
|
|
type: Number,
|
|
default: 3.5
|
|
},
|
|
mdIndeterminate: Boolean,
|
|
mdProgress: {
|
|
type: Number,
|
|
default: 0
|
|
}
|
|
},
|
|
mixins: [_mixin2.default],
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-indeterminate': this.mdIndeterminate
|
|
};
|
|
},
|
|
styles: function styles() {
|
|
var newSize = this.mdSize + 'px';
|
|
|
|
return {
|
|
width: newSize,
|
|
height: newSize
|
|
};
|
|
},
|
|
dashProgress: function dashProgress() {
|
|
var progress = this.mdProgress * 125 / 100;
|
|
|
|
if (this.mdIndeterminate) {
|
|
return false;
|
|
}
|
|
|
|
if (progress >= 125) {
|
|
progress = 130;
|
|
}
|
|
|
|
return progress + ', 200';
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {};
|
|
},
|
|
methods: {}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 188 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('transition', {
|
|
attrs: {
|
|
"name": "md-spinner",
|
|
"appear": ""
|
|
}
|
|
}, [_c('div', {
|
|
staticClass: "md-spinner",
|
|
class: [_vm.themeClass, _vm.classes],
|
|
style: (_vm.styles)
|
|
}, [_c('svg', {
|
|
staticClass: "md-spinner-draw",
|
|
attrs: {
|
|
"viewBox": "25 25 50 50"
|
|
}
|
|
}, [_c('circle', {
|
|
staticClass: "md-spinner-path",
|
|
attrs: {
|
|
"cx": "50",
|
|
"cy": "50",
|
|
"r": "20",
|
|
"stroke-width": _vm.mdStroke,
|
|
"stroke-dasharray": _vm.dashProgress
|
|
}
|
|
})])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-7e174593", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 189 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-spinner .md-spinner-path {\n stroke: PRIMARY-COLOR; }\n\n.THEME_NAME.md-spinner.md-accent .md-spinner-path {\n stroke: ACCENT-COLOR; }\n\n.THEME_NAME.md-spinner.md-warn .md-spinner-path {\n stroke: WARN-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 190 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdSubheader = __webpack_require__(191);
|
|
|
|
var _mdSubheader2 = _interopRequireDefault(_mdSubheader);
|
|
|
|
var _mdSubheader3 = __webpack_require__(195);
|
|
|
|
var _mdSubheader4 = _interopRequireDefault(_mdSubheader3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-subheader', Vue.extend(_mdSubheader2.default));
|
|
|
|
Vue.material.styles.push(_mdSubheader4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 191 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(192)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(193)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(194)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdSubheader/mdSubheader.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-a2e7fe8a", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-a2e7fe8a", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdSubheader.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 192 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 193 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_mixin2.default]
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 194 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return (_vm.$parent.$options._componentTag === 'md-list') ? _c('li', {
|
|
staticClass: "md-subheader",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true) : _c('div', {
|
|
staticClass: "md-subheader",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-a2e7fe8a", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 195 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-subheader.md-primary {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-subheader.md-accent {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-subheader.md-warn {\n color: WARN-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 196 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdSwitch = __webpack_require__(197);
|
|
|
|
var _mdSwitch2 = _interopRequireDefault(_mdSwitch);
|
|
|
|
var _mdSwitch3 = __webpack_require__(200);
|
|
|
|
var _mdSwitch4 = _interopRequireDefault(_mdSwitch3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-switch', Vue.extend(_mdSwitch2.default));
|
|
|
|
Vue.material.styles.push(_mdSwitch4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 197 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(198)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(199)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdSwitch/mdSwitch.vue"
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-7e05ff26", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-7e05ff26", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdSwitch.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 198 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 199 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var checkedPosition = 75; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
var initialPosition = '-1px';
|
|
|
|
exports.default = {
|
|
props: {
|
|
name: String,
|
|
value: Boolean,
|
|
id: String,
|
|
disabled: Boolean,
|
|
type: {
|
|
type: String,
|
|
default: 'button'
|
|
}
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
leftPos: initialPosition,
|
|
checked: this.value
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-checked': Boolean(this.value),
|
|
'md-disabled': this.disabled
|
|
};
|
|
},
|
|
styles: function styles() {
|
|
return {
|
|
transform: 'translate3D(' + this.leftPos + ', -50%, 0)'
|
|
};
|
|
}
|
|
},
|
|
watch: {
|
|
checked: function checked() {
|
|
this.setPosition();
|
|
},
|
|
value: function value(_value) {
|
|
this.changeState(_value);
|
|
}
|
|
},
|
|
methods: {
|
|
setPosition: function setPosition() {
|
|
this.leftPos = this.checked ? checkedPosition + '%' : initialPosition;
|
|
},
|
|
changeState: function changeState(checked, $event) {
|
|
this.checked = checked;
|
|
this.$emit('change', this.checked, $event);
|
|
this.$emit('input', this.checked, $event);
|
|
},
|
|
toggle: function toggle($event) {
|
|
if (!this.disabled) {
|
|
this.changeState(!this.checked, $event);
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.$nextTick(this.setPosition);
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 200 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-switch.md-checked .md-switch-container {\n background-color: ACCENT-COLOR-500-0.5; }\n\n.THEME_NAME.md-switch.md-checked .md-switch-thumb {\n background-color: ACCENT-COLOR; }\n\n.THEME_NAME.md-switch.md-checked .md-ink-ripple {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-switch.md-checked .md-ripple {\n opacity: .38; }\n\n.THEME_NAME.md-switch.md-checked.md-primary .md-switch-container {\n background-color: PRIMARY-COLOR-500-0.5; }\n\n.THEME_NAME.md-switch.md-checked.md-primary .md-switch-thumb {\n background-color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-switch.md-checked.md-primary .md-ink-ripple {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-switch.md-checked.md-warn .md-switch-container {\n background-color: WARN-COLOR-500-0.5; }\n\n.THEME_NAME.md-switch.md-checked.md-warn .md-switch-thumb {\n background-color: WARN-COLOR; }\n\n.THEME_NAME.md-switch.md-checked.md-warn .md-ink-ripple {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-switch.md-disabled .md-switch-container, .THEME_NAME.md-switch.md-disabled.md-checked .md-switch-container {\n background-color: rgba(0, 0, 0, 0.12); }\n\n.THEME_NAME.md-switch.md-disabled .md-switch-thumb, .THEME_NAME.md-switch.md-disabled.md-checked .md-switch-thumb {\n background-color: #bdbdbd; }\n"
|
|
|
|
/***/ },
|
|
/* 201 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdTable = __webpack_require__(202);
|
|
|
|
var _mdTable2 = _interopRequireDefault(_mdTable);
|
|
|
|
var _mdTableRow = __webpack_require__(206);
|
|
|
|
var _mdTableRow2 = _interopRequireDefault(_mdTableRow);
|
|
|
|
var _mdTableHead = __webpack_require__(209);
|
|
|
|
var _mdTableHead2 = _interopRequireDefault(_mdTableHead);
|
|
|
|
var _mdTableCell = __webpack_require__(212);
|
|
|
|
var _mdTableCell2 = _interopRequireDefault(_mdTableCell);
|
|
|
|
var _mdTableEdit = __webpack_require__(215);
|
|
|
|
var _mdTableEdit2 = _interopRequireDefault(_mdTableEdit);
|
|
|
|
var _mdTableCard = __webpack_require__(218);
|
|
|
|
var _mdTableCard2 = _interopRequireDefault(_mdTableCard);
|
|
|
|
var _mdTableAlternateHeader = __webpack_require__(221);
|
|
|
|
var _mdTableAlternateHeader2 = _interopRequireDefault(_mdTableAlternateHeader);
|
|
|
|
var _mdTablePagination = __webpack_require__(224);
|
|
|
|
var _mdTablePagination2 = _interopRequireDefault(_mdTablePagination);
|
|
|
|
var _mdTable3 = __webpack_require__(227);
|
|
|
|
var _mdTable4 = _interopRequireDefault(_mdTable3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-table', Vue.extend(_mdTable2.default));
|
|
Vue.component('md-table-header', {
|
|
functional: true,
|
|
render: function render(h, scope) {
|
|
return h('thead', {
|
|
staticClass: 'md-table-header'
|
|
}, scope.children);
|
|
}
|
|
});
|
|
Vue.component('md-table-body', {
|
|
functional: true,
|
|
render: function render(h, scope) {
|
|
return h('tbody', {
|
|
staticClass: 'md-table-body'
|
|
}, scope.children);
|
|
}
|
|
});
|
|
Vue.component('md-table-row', Vue.extend(_mdTableRow2.default));
|
|
Vue.component('md-table-head', Vue.extend(_mdTableHead2.default));
|
|
Vue.component('md-table-cell', Vue.extend(_mdTableCell2.default));
|
|
Vue.component('md-table-edit', Vue.extend(_mdTableEdit2.default));
|
|
Vue.component('md-table-card', Vue.extend(_mdTableCard2.default));
|
|
Vue.component('md-table-pagination', Vue.extend(_mdTablePagination2.default));
|
|
Vue.component('md-table-alternate-header', Vue.extend(_mdTableAlternateHeader2.default));
|
|
|
|
Vue.material.styles.push(_mdTable4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 202 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(203)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(204)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(205)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTable.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-dda64186", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-dda64186", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTable.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 203 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 204 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdSortType: String,
|
|
mdSort: String
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
sortType: this.mdSortType,
|
|
sortBy: this.mdSort,
|
|
hasRowSelection: false,
|
|
data: [],
|
|
numberOfRows: 0,
|
|
numberOfSelected: 0,
|
|
selectedRows: {}
|
|
};
|
|
},
|
|
|
|
methods: {
|
|
emitSort: function emitSort(name) {
|
|
this.sortBy = name;
|
|
this.$emit('sort', {
|
|
name: name,
|
|
type: this.sortType
|
|
});
|
|
},
|
|
emitSelection: function emitSelection() {
|
|
this.$emit('select', this.selectedRows);
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentCard = (0, _getClosestVueParent2.default)(this.$parent, 'md-table-card');
|
|
|
|
if (this.parentCard) {
|
|
this.parentCard.tableInstance = this;
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 205 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-table",
|
|
class: [_vm.themeClass]
|
|
}, [_c('table', [_vm._t("default")], true)])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-dda64186", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 206 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(207)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(208)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTableRow.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-cd7c46e6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-cd7c46e6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTableRow.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 207 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var transitionClass = 'md-transition-off'; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdAutoSelect: Boolean,
|
|
mdSelection: Boolean,
|
|
mdItem: Object
|
|
},
|
|
data: function data() {
|
|
return {
|
|
parentTable: {},
|
|
headRow: false,
|
|
checkbox: false,
|
|
index: 0
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
isDisabled: function isDisabled() {
|
|
return !this.mdSelection && !this.headRow;
|
|
},
|
|
hasSelection: function hasSelection() {
|
|
return this.mdSelection || this.headRow && this.parentTable.hasRowSelection;
|
|
},
|
|
classes: function classes() {
|
|
return {
|
|
'md-selected': this.checkbox
|
|
};
|
|
}
|
|
},
|
|
watch: {
|
|
mdItem: function mdItem(newValue, oldValue) {
|
|
this.parentTable.data[this.index] = this.mdItem;
|
|
this.handleMultipleSelection(newValue === oldValue);
|
|
}
|
|
},
|
|
methods: {
|
|
setSelectedRow: function setSelectedRow(value, index) {
|
|
if (value) {
|
|
this.parentTable.selectedRows[index] = this.parentTable.data[index];
|
|
++this.parentTable.numberOfSelected;
|
|
} else {
|
|
delete this.parentTable.selectedRows[index];
|
|
--this.parentTable.numberOfSelected;
|
|
}
|
|
},
|
|
handleSingleSelection: function handleSingleSelection(value) {
|
|
this.setSelectedRow(value, this.index - 1);
|
|
this.parentTable.$children[0].checkbox = this.parentTable.numberOfSelected === this.parentTable.numberOfRows;
|
|
},
|
|
handleMultipleSelection: function handleMultipleSelection(value) {
|
|
var _this = this;
|
|
|
|
if (this.parentTable.numberOfRows > 25) {
|
|
this.parentTable.$el.classList.add(transitionClass);
|
|
}
|
|
|
|
this.parentTable.$children.forEach(function (row, index) {
|
|
row.checkbox = value;
|
|
|
|
if (!row.headRow) {
|
|
_this.setSelectedRow(value, index - 1);
|
|
}
|
|
});
|
|
|
|
if (value) {
|
|
this.parentTable.numberOfSelected = this.parentTable.numberOfRows;
|
|
} else {
|
|
this.parentTable.numberOfSelected = 0;
|
|
}
|
|
|
|
window.setTimeout(function () {
|
|
return _this.parentTable.$el.classList.remove(transitionClass);
|
|
});
|
|
},
|
|
select: function select(value) {
|
|
if (this.hasSelection) {
|
|
if (this.headRow) {
|
|
this.handleMultipleSelection(value);
|
|
} else {
|
|
this.handleSingleSelection(value);
|
|
}
|
|
|
|
this.parentTable.emitSelection();
|
|
}
|
|
},
|
|
autoSelect: function autoSelect() {
|
|
if (this.mdAutoSelect && this.hasSelection) {
|
|
this.checkbox = !this.checkbox;
|
|
this.handleSingleSelection(this.checkbox);
|
|
this.parentTable.emitSelection();
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentTable = (0, _getClosestVueParent2.default)(this.$parent, 'md-table');
|
|
|
|
if (this.$el.parentNode.tagName.toLowerCase() === 'thead') {
|
|
this.headRow = true;
|
|
} else {
|
|
this.parentTable.numberOfRows++;
|
|
this.index = this.parentTable.numberOfRows;
|
|
|
|
if (this.mdSelection) {
|
|
this.parentTable.hasRowSelection = true;
|
|
}
|
|
|
|
if (this.mdItem) {
|
|
this.parentTable.data.push(this.mdItem);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 208 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('tr', {
|
|
staticClass: "md-table-row",
|
|
class: _vm.classes,
|
|
on: {
|
|
"click": _vm.autoSelect
|
|
}
|
|
}, [(_vm.hasSelection) ? _c('md-table-cell', {
|
|
staticClass: "md-table-selection"
|
|
}, [_c('md-checkbox', {
|
|
directives: [{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: (_vm.checkbox),
|
|
expression: "checkbox"
|
|
}],
|
|
attrs: {
|
|
"disabled": _vm.isDisabled
|
|
},
|
|
domProps: {
|
|
"value": (_vm.checkbox)
|
|
},
|
|
on: {
|
|
"change": _vm.select,
|
|
"input": function($event) {
|
|
_vm.checkbox = $event
|
|
}
|
|
}
|
|
})]) : _vm._e(), _vm._v(" "), _vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-cd7c46e6", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 209 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(210)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(211)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTableHead.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-4c7d46bd", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-4c7d46bd", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTableHead.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 210 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdNumeric: Boolean,
|
|
mdSortBy: String,
|
|
mdTooltip: String
|
|
},
|
|
data: function data() {
|
|
return {
|
|
sortType: null,
|
|
sorted: false,
|
|
parentTable: {}
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
classes: function classes() {
|
|
var matchSort = this.hasMatchSort();
|
|
|
|
if (!matchSort) {
|
|
this.sorted = false;
|
|
}
|
|
|
|
return {
|
|
'md-numeric': this.mdNumeric,
|
|
'md-sortable': this.mdSortBy,
|
|
'md-sorted': matchSort && this.sorted,
|
|
'md-sorted-descending': matchSort && this.sortType === 'desc'
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
hasMatchSort: function hasMatchSort() {
|
|
return this.parentTable.sortBy === this.mdSortBy;
|
|
},
|
|
changeSort: function changeSort() {
|
|
if (this.mdSortBy) {
|
|
if (this.sortType === 'asc' && this.sorted) {
|
|
this.sortType = 'desc';
|
|
} else {
|
|
this.sortType = 'asc';
|
|
}
|
|
|
|
this.sorted = true;
|
|
|
|
this.parentTable.sortType = this.sortType;
|
|
this.parentTable.emitSort(this.mdSortBy);
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
this.parentTable = (0, _getClosestVueParent2.default)(this.$parent, 'md-table');
|
|
|
|
if (this.hasMatchSort()) {
|
|
this.sorted = true;
|
|
this.sortType = this.parentTable.sortType;
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 211 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('th', {
|
|
staticClass: "md-table-head",
|
|
class: _vm.classes,
|
|
on: {
|
|
"click": _vm.changeSort
|
|
}
|
|
}, [_c('div', {
|
|
directives: [{
|
|
name: "md-ink-ripple",
|
|
rawName: "v-md-ink-ripple",
|
|
value: (!_vm.mdSortBy),
|
|
expression: "!mdSortBy"
|
|
}],
|
|
staticClass: "md-table-head-container"
|
|
}, [_c('div', {
|
|
staticClass: "md-table-head-text md-test"
|
|
}, [(_vm.mdSortBy) ? _c('md-icon', {
|
|
staticClass: "md-sortable-icon"
|
|
}, [_vm._v("arrow_downward")]) : _vm._e(), _vm._v(" "), _vm._t("default"), _vm._v(" "), (_vm.mdTooltip) ? _c('md-tooltip', [_vm._v(_vm._s(_vm.mdTooltip))]) : _vm._e()], true)])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-4c7d46bd", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 212 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(213)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(214)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTableCell.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-584d713f", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-584d713f", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTableCell.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 213 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdNumeric: Boolean
|
|
},
|
|
data: function data() {
|
|
return {
|
|
hasAction: false
|
|
};
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
return {
|
|
'md-numeric': this.mdNumeric,
|
|
'md-has-action': this.hasAction
|
|
};
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (this.$children.length > 0) {
|
|
this.hasAction = true;
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 214 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('td', {
|
|
staticClass: "md-table-cell",
|
|
class: _vm.classes
|
|
}, [_c('div', {
|
|
staticClass: "md-table-cell-container"
|
|
}, [_vm._t("default")], true)])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-584d713f", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 215 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(216)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(217)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTableEdit.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-23087c32", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-23087c32", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTableEdit.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 216 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
value: [String, Number],
|
|
mdLarge: Boolean,
|
|
mdId: String,
|
|
mdName: String,
|
|
mdPlaceholder: String,
|
|
mdMaxlength: [Number, String]
|
|
},
|
|
data: function data() {
|
|
return {
|
|
active: false
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
triggerClasses: function triggerClasses() {
|
|
return {
|
|
'md-edited': this.value
|
|
};
|
|
},
|
|
dialogClasses: function dialogClasses() {
|
|
return {
|
|
'md-active': this.active,
|
|
'md-large': this.mdLarge
|
|
};
|
|
},
|
|
realValue: function realValue() {
|
|
console.log(this.value);
|
|
}
|
|
},
|
|
methods: {
|
|
openDialog: function openDialog() {
|
|
this.active = true;
|
|
this.$refs.input.$el.focus();
|
|
document.addEventListener('click', this.closeDialogOnOffClick);
|
|
},
|
|
closeDialog: function closeDialog() {
|
|
if (this.active) {
|
|
this.active = false;
|
|
this.$refs.input.$el.blur();
|
|
document.removeEventListener('click', this.closeDialogOnOffClick);
|
|
}
|
|
},
|
|
closeDialogOnOffClick: function closeDialogOnOffClick(event) {
|
|
if (!this.$refs.dialog.contains(event.target)) {
|
|
this.closeDialog();
|
|
}
|
|
},
|
|
confirmDialog: function confirmDialog() {
|
|
var value = this.$refs.input.$el.value;
|
|
|
|
this.closeDialog();
|
|
this.$emit('input', value);
|
|
this.$emit('edited', value);
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 217 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-table-edit",
|
|
on: {
|
|
"keydown": function($event) {
|
|
if (_vm._k($event.keyCode, "esc", 27)) { return; }
|
|
_vm.closeDialog($event)
|
|
}
|
|
}
|
|
}, [_c('div', {
|
|
staticClass: "md-table-edit-trigger",
|
|
class: _vm.triggerClasses,
|
|
on: {
|
|
"click": function($event) {
|
|
$event.stopPropagation();
|
|
_vm.openDialog($event)
|
|
}
|
|
}
|
|
}, [_vm._v("\n " + _vm._s(_vm.value || _vm.mdPlaceholder) + "\n ")]), _vm._v(" "), _c('div', {
|
|
ref: "dialog",
|
|
staticClass: "md-table-dialog",
|
|
class: _vm.dialogClasses
|
|
}, [_c('md-input-container', [_c('md-input', {
|
|
ref: "input",
|
|
attrs: {
|
|
"id": _vm.mdId,
|
|
"name": _vm.mdName,
|
|
"maxlength": _vm.mdMaxlength,
|
|
"value": _vm.value,
|
|
"placeholder": _vm.mdPlaceholder
|
|
},
|
|
nativeOn: {
|
|
"keydown": function($event) {
|
|
if (_vm._k($event.keyCode, "enter", 13)) { return; }
|
|
_vm.confirmDialog($event)
|
|
}
|
|
}
|
|
})])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-23087c32", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 218 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(219)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(220)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTableCard.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-e2fe4826", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-e2fe4826", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTableCard.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 219 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_mixin2.default]
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 220 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('md-card', {
|
|
staticClass: "md-table-card",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-e2fe4826", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 221 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(222)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(223)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTableAlternateHeader.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-1ea3ef5a", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-1ea3ef5a", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTableAlternateHeader.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 222 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdSelectedLabel: {
|
|
type: String,
|
|
default: 'selected'
|
|
}
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
classes: {},
|
|
tableInstance: {}
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
this.parentCard = (0, _getClosestVueParent2.default)(this.$parent, 'md-table-card');
|
|
|
|
this.$nextTick(function () {
|
|
_this.tableInstance = _this.parentCard.tableInstance;
|
|
|
|
_this.$watch('tableInstance.numberOfSelected', function () {
|
|
_this.$refs.counter.textContent = _this.tableInstance.numberOfSelected;
|
|
_this.classes = {
|
|
'md-active': _this.tableInstance.numberOfSelected > 0
|
|
};
|
|
});
|
|
});
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 223 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-table-alternate-header",
|
|
class: [_vm.themeClass, _vm.classes]
|
|
}, [_c('md-toolbar', [_c('div', {
|
|
staticClass: "md-counter"
|
|
}, [_c('span', {
|
|
ref: "counter"
|
|
}, [_vm._v(_vm._s(_vm.tableInstance.numberOfSelected))]), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.mdSelectedLabel))])]), _vm._v(" "), _vm._t("default")], true)])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-1ea3ef5a", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 224 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(225)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(226)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTable/mdTablePagination.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-7f188892", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-7f188892", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTablePagination.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 225 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdSize: {
|
|
type: [Number, String],
|
|
default: 10
|
|
},
|
|
mdPageOptions: [Array, Boolean],
|
|
mdPage: {
|
|
type: [Number, String],
|
|
default: 1
|
|
},
|
|
mdTotal: {
|
|
type: [Number, String],
|
|
default: 'Many'
|
|
},
|
|
mdLabel: {
|
|
type: String,
|
|
default: 'Rows per page'
|
|
},
|
|
mdSeparator: {
|
|
type: String,
|
|
default: 'of'
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
subTotal: 0,
|
|
currentSize: parseInt(this.mdSize, 10),
|
|
currentPage: parseInt(this.mdPage, 10),
|
|
totalItems: isNaN(this.mdTotal) ? Number.MAX_SAFE_INTEGER : parseInt(this.mdTotal, 10)
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
lastPage: function lastPage() {
|
|
return false;
|
|
}
|
|
},
|
|
methods: {
|
|
emitPaginationEvent: function emitPaginationEvent() {
|
|
if (this.canFireEvents) {
|
|
var sub = this.currentPage * this.currentSize;
|
|
|
|
this.subTotal = sub > this.mdTotal ? this.mdTotal : sub;
|
|
this.$emit('pagination', {
|
|
size: this.currentSize,
|
|
page: this.currentPage
|
|
});
|
|
}
|
|
},
|
|
changeSize: function changeSize() {
|
|
if (this.canFireEvents) {
|
|
this.$emit('size', this.currentSize);
|
|
this.emitPaginationEvent();
|
|
}
|
|
},
|
|
previousPage: function previousPage() {
|
|
if (this.canFireEvents) {
|
|
this.currentPage--;
|
|
this.$emit('page', this.currentPage);
|
|
this.emitPaginationEvent();
|
|
}
|
|
},
|
|
nextPage: function nextPage() {
|
|
if (this.canFireEvents) {
|
|
this.currentPage++;
|
|
this.$emit('page', this.currentPage);
|
|
this.emitPaginationEvent();
|
|
}
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this.subTotal = _this.currentPage * _this.currentSize;
|
|
_this.mdPageOptions = _this.mdPageOptions || [10, 25, 50, 100];
|
|
_this.currentSize = _this.mdPageOptions[0];
|
|
_this.canFireEvents = true;
|
|
});
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 226 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-table-pagination"
|
|
}, [_c('span', {
|
|
staticClass: "md-table-pagination-label"
|
|
}, [_vm._v(_vm._s(_vm.mdLabel) + ":")]), _vm._v(" "), (_vm.mdPageOptions) ? _c('md-select', {
|
|
directives: [{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: (_vm.currentSize),
|
|
expression: "currentSize"
|
|
}],
|
|
attrs: {
|
|
"md-menu-class": "md-pagination-select"
|
|
},
|
|
domProps: {
|
|
"value": (_vm.currentSize)
|
|
},
|
|
on: {
|
|
"change": _vm.changeSize,
|
|
"input": function($event) {
|
|
_vm.currentSize = $event
|
|
}
|
|
}
|
|
}, _vm._l((_vm.mdPageOptions), function(amount) {
|
|
return _c('md-option', {
|
|
attrs: {
|
|
"value": amount
|
|
}
|
|
}, [_vm._v(_vm._s(amount))])
|
|
})) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(((_vm.currentPage - 1) * _vm.currentSize) + 1) + "-" + _vm._s(_vm.subTotal) + " " + _vm._s(_vm.mdSeparator) + " " + _vm._s(_vm.mdTotal))]), _vm._v(" "), _c('md-button', {
|
|
staticClass: "md-icon-button md-table-pagination-previous",
|
|
attrs: {
|
|
"disabled": _vm.currentPage === 1
|
|
},
|
|
on: {
|
|
"click": _vm.previousPage
|
|
}
|
|
}, [_c('md-icon', [_vm._v("keyboard_arrow_left")])]), _vm._v(" "), _c('md-button', {
|
|
staticClass: "md-icon-button md-table-pagination-next",
|
|
attrs: {
|
|
"disabled": _vm.currentSize * _vm.currentPage >= _vm.totalItems
|
|
},
|
|
on: {
|
|
"click": _vm.nextPage
|
|
}
|
|
}, [_c('md-icon', [_vm._v("keyboard_arrow_right")])])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-7f188892", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 227 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-table-card .md-toolbar {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST-A100; }\n\n.THEME_NAME.md-table-alternate-header {\n background-color: BACKGROUND-COLOR-A100; }\n .THEME_NAME.md-table-alternate-header .md-toolbar {\n background-color: ACCENT-COLOR-A100-0.2;\n color: ACCENT-CONTRAST-A100; }\n .THEME_NAME.md-table-alternate-header .md-counter {\n color: ACCENT-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 228 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdTabs = __webpack_require__(229);
|
|
|
|
var _mdTabs2 = _interopRequireDefault(_mdTabs);
|
|
|
|
var _mdTab = __webpack_require__(233);
|
|
|
|
var _mdTab2 = _interopRequireDefault(_mdTab);
|
|
|
|
var _mdTabs3 = __webpack_require__(237);
|
|
|
|
var _mdTabs4 = _interopRequireDefault(_mdTabs3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-tabs', Vue.extend(_mdTabs2.default));
|
|
Vue.component('md-tab', Vue.extend(_mdTab2.default));
|
|
|
|
Vue.material.styles.push(_mdTabs4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 229 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(230)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(231)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(232)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTabs/mdTabs.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-c28dc5a6", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-c28dc5a6", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTabs.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 230 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 231 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdFixed: Boolean,
|
|
mdCentered: Boolean,
|
|
mdRight: Boolean,
|
|
mdDynamicHeight: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
mdElevation: {
|
|
type: [String, Number],
|
|
default: 0
|
|
}
|
|
},
|
|
mixins: [_mixin2.default],
|
|
data: function data() {
|
|
return {
|
|
tabList: {},
|
|
activeTab: null,
|
|
activeTabNumber: 0,
|
|
hasIcons: false,
|
|
hasLabel: false,
|
|
transitionControl: null,
|
|
contentHeight: '0px',
|
|
contentWidth: '0px'
|
|
};
|
|
},
|
|
computed: {
|
|
tabClasses: function tabClasses() {
|
|
return {
|
|
'md-dynamic-height': this.mdDynamicHeight,
|
|
'md-transition-off': this.transitionOff
|
|
};
|
|
},
|
|
navigationClasses: function navigationClasses() {
|
|
return {
|
|
'md-has-icon': this.hasIcons,
|
|
'md-has-label': this.hasLabel,
|
|
'md-fixed': this.mdFixed,
|
|
'md-right': !this.mdCentered && this.mdRight,
|
|
'md-centered': this.mdCentered || this.mdFixed
|
|
};
|
|
},
|
|
indicatorClasses: function indicatorClasses() {
|
|
var toLeft = this.lastIndicatorNumber > this.activeTabNumber;
|
|
|
|
this.lastIndicatorNumber = this.activeTabNumber;
|
|
|
|
return {
|
|
'md-transition-off': this.transitionOff,
|
|
'md-to-right': !toLeft,
|
|
'md-to-left': toLeft
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
getHeaderClass: function getHeaderClass(header) {
|
|
return {
|
|
'md-active': this.activeTab === header.id,
|
|
'md-disabled': header.disabled
|
|
};
|
|
},
|
|
registerTab: function registerTab(tabData) {
|
|
this.tabList[tabData.id] = tabData;
|
|
this.$forceUpdate();
|
|
},
|
|
unregisterTab: function unregisterTab(tabData) {
|
|
delete this.tabList[tabData.id];
|
|
},
|
|
updateTab: function updateTab(tabData) {
|
|
this.registerTab(tabData);
|
|
|
|
if (tabData.active) {
|
|
if (!tabData.disabled) {
|
|
this.setActiveTab(tabData);
|
|
} else {
|
|
var tabsIds = Object.keys(this.tabList);
|
|
var targetIndex = tabsIds.indexOf(tabData.id) + 1;
|
|
var target = tabsIds[targetIndex];
|
|
|
|
if (target) {
|
|
this.setActiveTab(this.tabList[target]);
|
|
} else {
|
|
this.setActiveTab(this.tabList[0]);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
observeElementChanges: function observeElementChanges() {
|
|
this.contentObserver = new MutationObserver(this.calculateOnWatch);
|
|
this.navigationObserver = new MutationObserver(this.calculateOnWatch);
|
|
this.contentObserver.observe(this.$refs.tabContent, {
|
|
childList: true,
|
|
attributes: true,
|
|
characterData: true,
|
|
subtree: true,
|
|
attributeOldValue: true,
|
|
characterDataOldValue: true
|
|
});
|
|
this.navigationObserver.observe(this.$refs.tabNavigation.$el, {
|
|
attributes: true
|
|
});
|
|
},
|
|
getTabIndex: function getTabIndex(id) {
|
|
var idList = Object.keys(this.tabList);
|
|
|
|
return idList.indexOf(id);
|
|
},
|
|
calculateIndicatorPos: function calculateIndicatorPos() {
|
|
var tabsWidth = this.$el.offsetWidth;
|
|
var activeTab = this.$refs.tabHeader[this.activeTabNumber];
|
|
var left = activeTab.offsetLeft;
|
|
var right = tabsWidth - left - activeTab.offsetWidth;
|
|
|
|
this.$refs.indicator.style.left = left + 'px';
|
|
this.$refs.indicator.style.right = right + 'px';
|
|
},
|
|
calculateTabsWidthAndPosition: function calculateTabsWidthAndPosition() {
|
|
var width = this.$el.offsetWidth;
|
|
|
|
this.contentWidth = width * this.activeTabNumber + 'px';
|
|
|
|
var index = 0;
|
|
|
|
for (var tabId in this.tabList) {
|
|
var tab = this.tabList[tabId];
|
|
|
|
tab.ref.width = width + 'px';
|
|
tab.ref.left = width * index + 'px';
|
|
index++;
|
|
}
|
|
},
|
|
calculateContentHeight: function calculateContentHeight() {
|
|
var _this = this;
|
|
|
|
this.$nextTick(function () {
|
|
var height = _this.tabList[_this.activeTab].ref.$el.offsetHeight;
|
|
|
|
_this.contentHeight = height + 'px';
|
|
});
|
|
},
|
|
calculatePosition: function calculatePosition() {
|
|
var _this2 = this;
|
|
|
|
window.requestAnimationFrame(function () {
|
|
_this2.calculateIndicatorPos();
|
|
_this2.calculateTabsWidthAndPosition();
|
|
_this2.calculateContentHeight();
|
|
});
|
|
},
|
|
debounceTransition: function debounceTransition() {
|
|
var _this3 = this;
|
|
|
|
window.clearTimeout(this.transitionControl);
|
|
this.transitionControl = window.setTimeout(function () {
|
|
_this3.calculatePosition();
|
|
_this3.transitionOff = false;
|
|
}, 200);
|
|
},
|
|
calculateOnWatch: function calculateOnWatch() {
|
|
this.transitionOff = true;
|
|
this.calculatePosition();
|
|
this.debounceTransition();
|
|
},
|
|
setActiveTab: function setActiveTab(tabData) {
|
|
this.hasIcons = !!tabData.icon;
|
|
this.hasLabel = !!tabData.label;
|
|
this.activeTab = tabData.id;
|
|
this.activeTabNumber = this.getTabIndex(this.activeTab);
|
|
this.calculatePosition();
|
|
this.$emit('change', this.activeTabNumber);
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this4 = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this4.observeElementChanges();
|
|
window.addEventListener('resize', _this4.calculateOnWatch);
|
|
|
|
if (!_this4.activeTab) {
|
|
var firstTab = Object.keys(_this4.tabList)[0];
|
|
|
|
_this4.setActiveTab(_this4.tabList[firstTab]);
|
|
}
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.contentObserver) {
|
|
this.contentObserver.disconnect();
|
|
}
|
|
|
|
if (this.navigationObserver) {
|
|
this.navigationObserver.disconnect();
|
|
}
|
|
|
|
window.removeEventListener('resize', this.calculateOnWatch);
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 232 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-tabs",
|
|
class: [_vm.themeClass, _vm.tabClasses]
|
|
}, [_c('md-whiteframe', {
|
|
ref: "tabNavigation",
|
|
staticClass: "md-tabs-navigation",
|
|
class: _vm.navigationClasses,
|
|
attrs: {
|
|
"md-tag": "nav",
|
|
"md-elevation": _vm.mdElevation
|
|
}
|
|
}, [_vm._l((_vm.tabList), function(header) {
|
|
return _c('button', {
|
|
key: header.id,
|
|
ref: "tabHeader",
|
|
refInFor: true,
|
|
staticClass: "md-tab-header",
|
|
class: _vm.getHeaderClass(header),
|
|
attrs: {
|
|
"type": "button",
|
|
"disabled": header.disabled
|
|
},
|
|
on: {
|
|
"click": function($event) {
|
|
_vm.setActiveTab(header)
|
|
}
|
|
}
|
|
}, [_c('md-ink-ripple', {
|
|
attrs: {
|
|
"md-disabled": header.disabled
|
|
}
|
|
}), _vm._v(" "), _c('div', {
|
|
staticClass: "md-tab-header-container"
|
|
}, [(header.icon) ? _c('md-icon', [_vm._v(_vm._s(header.icon))]) : _vm._e(), _vm._v(" "), (header.label) ? _c('span', [_vm._v(_vm._s(header.label))]) : _vm._e(), _vm._v(" "), (header.tooltip) ? _c('md-tooltip', {
|
|
attrs: {
|
|
"md-direction": header.tooltipDirection,
|
|
"md-delay": header.tooltipDelay
|
|
}
|
|
}, [_vm._v(_vm._s(header.tooltip))]) : _vm._e()])])
|
|
}), _vm._v(" "), _c('span', {
|
|
ref: "indicator",
|
|
staticClass: "md-tab-indicator",
|
|
class: _vm.indicatorClasses
|
|
})], true), _vm._v(" "), _c('div', {
|
|
ref: "tabContent",
|
|
staticClass: "md-tabs-content",
|
|
style: ({
|
|
height: _vm.contentHeight
|
|
})
|
|
}, [_c('div', {
|
|
staticClass: "md-tabs-wrapper",
|
|
style: ({
|
|
transform: ("translate3D(-" + _vm.contentWidth + ", 0, 0)")
|
|
})
|
|
}, [_vm._t("default")], true)])])
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-c28dc5a6", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 233 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(234)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(236)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTabs/mdTab.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-8aa44a94", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-8aa44a94", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTab.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 234 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _uniqueId = __webpack_require__(235);
|
|
|
|
var _uniqueId2 = _interopRequireDefault(_uniqueId);
|
|
|
|
var _getClosestVueParent = __webpack_require__(127);
|
|
|
|
var _getClosestVueParent2 = _interopRequireDefault(_getClosestVueParent);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
id: [String, Number],
|
|
mdLabel: [String, Number],
|
|
mdIcon: String,
|
|
mdActive: Boolean,
|
|
mdDisabled: Boolean,
|
|
mdTooltip: String,
|
|
mdTooltipDelay: {
|
|
type: String,
|
|
default: '0'
|
|
},
|
|
mdTooltipDirection: {
|
|
type: String,
|
|
default: 'bottom'
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
mounted: false,
|
|
tabId: this.id || 'tab-' + (0, _uniqueId2.default)(),
|
|
width: '0px',
|
|
left: '0px'
|
|
};
|
|
},
|
|
|
|
watch: {
|
|
mdActive: function mdActive() {
|
|
this.updateTabData();
|
|
},
|
|
mdDisabled: function mdDisabled() {
|
|
this.updateTabData();
|
|
},
|
|
mdIcon: function mdIcon() {
|
|
this.updateTabData();
|
|
},
|
|
mdLabel: function mdLabel() {
|
|
this.updateTabData();
|
|
},
|
|
mdTooltip: function mdTooltip() {
|
|
this.updateTabData();
|
|
},
|
|
mdTooltipDelay: function mdTooltipDelay() {
|
|
this.updateTabData();
|
|
},
|
|
mdTooltipDirection: function mdTooltipDirection() {
|
|
this.updateTabData();
|
|
}
|
|
},
|
|
computed: {
|
|
styles: function styles() {
|
|
return {
|
|
width: this.width,
|
|
left: this.left
|
|
};
|
|
}
|
|
},
|
|
methods: {
|
|
getTabData: function getTabData() {
|
|
return {
|
|
id: this.tabId,
|
|
label: this.mdLabel,
|
|
icon: this.mdIcon,
|
|
active: this.mdActive,
|
|
disabled: this.mdDisabled,
|
|
tooltip: this.mdTooltip,
|
|
tooltipDelay: this.mdTooltipDelay,
|
|
tooltipDirection: this.mdTooltipDirection,
|
|
ref: this
|
|
};
|
|
},
|
|
updateTabData: function updateTabData() {
|
|
this.parentTabs.updateTab(this.getTabData());
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
this.parentTabs = (0, _getClosestVueParent2.default)(this.$parent, 'md-tabs');
|
|
|
|
if (!this.parentTabs) {
|
|
throw new Error('You must wrap the md-tab in a md-tabs');
|
|
}
|
|
|
|
this.$nextTick(function () {
|
|
_this.mounted = true;
|
|
_this.parentTabs.registerTab(_this.getTabData());
|
|
|
|
if (_this.mdActive) {
|
|
_this.parentTabs.activeTab = _this.tabId;
|
|
}
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.parentTabs.unregisterTab(this.getTabData());
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 235 */
|
|
/***/ function(module, exports) {
|
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
var uniqueId = function uniqueId() {
|
|
return Math.random().toString(36).slice(4);
|
|
};
|
|
|
|
exports.default = uniqueId;
|
|
module.exports = exports["default"];
|
|
|
|
/***/ },
|
|
/* 236 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-tab",
|
|
style: (_vm.styles),
|
|
attrs: {
|
|
"id": _vm.tabId
|
|
}
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-8aa44a94", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 237 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-tabs > .md-tabs-navigation {\n background-color: PRIMARY-COLOR; }\n .THEME_NAME.md-tabs > .md-tabs-navigation .md-tab-header {\n color: PRIMARY-CONTRAST-0.54; }\n .THEME_NAME.md-tabs > .md-tabs-navigation .md-tab-header.md-active, .THEME_NAME.md-tabs > .md-tabs-navigation .md-tab-header:focus {\n color: PRIMARY-CONTRAST; }\n .THEME_NAME.md-tabs > .md-tabs-navigation .md-tab-header.md-disabled {\n color: PRIMARY-CONTRAST-0.26; }\n .THEME_NAME.md-tabs > .md-tabs-navigation .md-tab-indicator {\n background-color: ACCENT-COLOR; }\n\n.THEME_NAME.md-tabs.md-transparent > .md-tabs-navigation {\n background-color: transparent;\n border-bottom: 1px solid BACKGROUND-CONTRAST-0.12; }\n .THEME_NAME.md-tabs.md-transparent > .md-tabs-navigation .md-tab-header {\n color: BACKGROUND-CONTRAST-0.54; }\n .THEME_NAME.md-tabs.md-transparent > .md-tabs-navigation .md-tab-header.md-active, .THEME_NAME.md-tabs.md-transparent > .md-tabs-navigation .md-tab-header:focus {\n color: PRIMARY-COLOR; }\n .THEME_NAME.md-tabs.md-transparent > .md-tabs-navigation .md-tab-header.md-disabled {\n color: BACKGROUND-CONTRAST-0.26; }\n .THEME_NAME.md-tabs.md-transparent > .md-tabs-navigation .md-tab-indicator {\n background-color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-tabs.md-accent > .md-tabs-navigation {\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-tabs.md-accent > .md-tabs-navigation .md-tab-header {\n color: ACCENT-CONTRAST-0.54; }\n .THEME_NAME.md-tabs.md-accent > .md-tabs-navigation .md-tab-header.md-active, .THEME_NAME.md-tabs.md-accent > .md-tabs-navigation .md-tab-header:focus {\n color: ACCENT-CONTRAST; }\n .THEME_NAME.md-tabs.md-accent > .md-tabs-navigation .md-tab-header.md-disabled {\n color: ACCENT-CONTRAST-0.26; }\n .THEME_NAME.md-tabs.md-accent > .md-tabs-navigation .md-tab-indicator {\n background-color: BACKGROUND-COLOR; }\n\n.THEME_NAME.md-tabs.md-warn > .md-tabs-navigation {\n background-color: WARN-COLOR; }\n .THEME_NAME.md-tabs.md-warn > .md-tabs-navigation .md-tab-header {\n color: WARN-CONTRAST-0.54; }\n .THEME_NAME.md-tabs.md-warn > .md-tabs-navigation .md-tab-header.md-active, .THEME_NAME.md-tabs.md-warn > .md-tabs-navigation .md-tab-header:focus {\n color: WARN-CONTRAST; }\n .THEME_NAME.md-tabs.md-warn > .md-tabs-navigation .md-tab-header.md-disabled {\n color: WARN-CONTRAST-0.26; }\n .THEME_NAME.md-tabs.md-warn > .md-tabs-navigation .md-tab-indicator {\n background-color: BACKGROUND-COLOR; }\n"
|
|
|
|
/***/ },
|
|
/* 238 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdToolbar = __webpack_require__(239);
|
|
|
|
var _mdToolbar2 = _interopRequireDefault(_mdToolbar);
|
|
|
|
var _mdToolbar3 = __webpack_require__(243);
|
|
|
|
var _mdToolbar4 = _interopRequireDefault(_mdToolbar3);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-toolbar', Vue.extend(_mdToolbar2.default));
|
|
|
|
Vue.material.styles.push(_mdToolbar4.default);
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 239 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(240)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(241)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(242)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdToolbar/mdToolbar.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-668063d7", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-668063d7", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdToolbar.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 240 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 241 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _mixin = __webpack_require__(6);
|
|
|
|
var _mixin2 = _interopRequireDefault(_mixin);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
mixins: [_mixin2.default]
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 242 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('div', {
|
|
staticClass: "md-toolbar",
|
|
class: [_vm.themeClass]
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-668063d7", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 243 */
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = ".THEME_NAME.md-toolbar {\n background-color: PRIMARY-COLOR;\n color: PRIMARY-CONTRAST; }\n .THEME_NAME.md-toolbar.md-accent {\n background-color: ACCENT-COLOR;\n color: ACCENT-CONTRAST; }\n .THEME_NAME.md-toolbar.md-warn {\n background-color: WARN-COLOR;\n color: WARN-CONTRAST; }\n .THEME_NAME.md-toolbar.md-transparent {\n background-color: transparent;\n color: BACKGROUND-CONTRAST; }\n"
|
|
|
|
/***/ },
|
|
/* 244 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdTooltip = __webpack_require__(245);
|
|
|
|
var _mdTooltip2 = _interopRequireDefault(_mdTooltip);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-tooltip', Vue.extend(_mdTooltip2.default));
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 245 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(246)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(247)
|
|
|
|
/* template */
|
|
var __vue_template__ = __webpack_require__(248)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdTooltip/mdTooltip.vue"
|
|
__vue_options__.render = __vue_template__.render
|
|
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-3104dae7", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-3104dae7", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdTooltip.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 246 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 247 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _transitionEndEventName = __webpack_require__(90);
|
|
|
|
var _transitionEndEventName2 = _interopRequireDefault(_transitionEndEventName);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdDirection: {
|
|
type: String,
|
|
default: 'bottom'
|
|
},
|
|
mdDelay: {
|
|
type: String,
|
|
default: '0'
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
active: false,
|
|
parentClass: null,
|
|
transitionOff: false,
|
|
topPosition: false,
|
|
leftPosition: false
|
|
};
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
var cssClasses = {
|
|
'md-active': this.active,
|
|
'md-transition-off': this.transitionOff,
|
|
'md-tooltip-top': this.mdDirection === 'top',
|
|
'md-tooltip-right': this.mdDirection === 'right',
|
|
'md-tooltip-bottom': this.mdDirection === 'bottom',
|
|
'md-tooltip-left': this.mdDirection === 'left'
|
|
};
|
|
|
|
if (this.parentClass) {
|
|
cssClasses[this.parentClass] = true;
|
|
}
|
|
|
|
return cssClasses;
|
|
},
|
|
style: function style() {
|
|
return {
|
|
'transition-delay': this.mdDelay + 'ms',
|
|
top: this.topPosition + 'px',
|
|
left: this.leftPosition + 'px'
|
|
};
|
|
}
|
|
},
|
|
watch: {
|
|
mdDirection: function mdDirection() {
|
|
this.calculateTooltipPosition();
|
|
}
|
|
},
|
|
methods: {
|
|
removeTooltips: function removeTooltips() {
|
|
var tooltips = [].concat(_toConsumableArray(this.rootElement.querySelectorAll('.md-tooltip')));
|
|
|
|
tooltips.forEach(function (tooltip) {
|
|
if (tooltip.parentNode) {
|
|
tooltip.parentNode.removeChild(tooltip);
|
|
}
|
|
});
|
|
|
|
this.tooltipElement.removeEventListener(_transitionEndEventName2.default, this.removeTooltips);
|
|
},
|
|
calculateTooltipPosition: function calculateTooltipPosition() {
|
|
var position = this.parentElement.getBoundingClientRect();
|
|
var cssPosition = {};
|
|
|
|
switch (this.mdDirection) {
|
|
case 'top':
|
|
cssPosition.top = position.top - this.$el.offsetHeight;
|
|
cssPosition.left = position.left + position.width / 2;
|
|
|
|
break;
|
|
|
|
case 'right':
|
|
cssPosition.top = position.top;
|
|
cssPosition.left = position.left + position.width;
|
|
|
|
break;
|
|
|
|
case 'bottom':
|
|
cssPosition.top = position.bottom;
|
|
cssPosition.left = position.left + position.width / 2;
|
|
|
|
break;
|
|
|
|
case 'left':
|
|
cssPosition.top = position.top;
|
|
cssPosition.left = position.left - this.$el.offsetWidth;
|
|
|
|
break;
|
|
|
|
default:
|
|
console.warn('Invalid ' + this.mdDirection + ' option to md-direction option');
|
|
}
|
|
|
|
this.topPosition = cssPosition.top;
|
|
this.leftPosition = cssPosition.left;
|
|
},
|
|
generateTooltipClasses: function generateTooltipClasses() {
|
|
var classes = [];
|
|
|
|
[].concat(_toConsumableArray(this.parentElement.classList)).forEach(function (cssClass) {
|
|
if (cssClass.indexOf('md-') >= 0 && cssClass !== 'md-active') {
|
|
classes.push(cssClass + '-tooltip');
|
|
}
|
|
});
|
|
|
|
this.parentClass = classes.join(' ');
|
|
},
|
|
open: function open() {
|
|
var _this = this;
|
|
|
|
this.removeTooltips();
|
|
|
|
this.$nextTick(function () {
|
|
_this.rootElement.appendChild(_this.tooltipElement);
|
|
getComputedStyle(_this.tooltipElement).top;
|
|
_this.transitionOff = true;
|
|
_this.generateTooltipClasses();
|
|
_this.calculateTooltipPosition();
|
|
|
|
window.setTimeout(function () {
|
|
_this.transitionOff = false;
|
|
_this.active = true;
|
|
}, 10);
|
|
});
|
|
},
|
|
close: function close() {
|
|
this.active = false;
|
|
this.tooltipElement.removeEventListener(_transitionEndEventName2.default, this.removeTooltips);
|
|
this.tooltipElement.addEventListener(_transitionEndEventName2.default, this.removeTooltips);
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this2 = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this2.tooltipElement = _this2.$el;
|
|
_this2.parentElement = _this2.tooltipElement.parentNode;
|
|
_this2.rootElement = _this2.$root.$el;
|
|
|
|
_this2.$el.parentNode.removeChild(_this2.$el);
|
|
|
|
_this2.parentElement.addEventListener('mouseenter', _this2.open);
|
|
_this2.parentElement.addEventListener('focus', _this2.open);
|
|
_this2.parentElement.addEventListener('mouseleave', _this2.close);
|
|
_this2.parentElement.addEventListener('blur', _this2.close);
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.active = false;
|
|
|
|
this.removeTooltips();
|
|
|
|
if (this.parentElement) {
|
|
this.parentElement.removeEventListener('mouseenter', this.open);
|
|
this.parentElement.removeEventListener('focus', this.open);
|
|
this.parentElement.removeEventListener('mouseleave', this.close);
|
|
this.parentElement.removeEventListener('blur', this.close);
|
|
}
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 248 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._c;
|
|
return _c('span', {
|
|
staticClass: "md-tooltip",
|
|
class: _vm.classes,
|
|
style: (_vm.style)
|
|
}, [_vm._t("default")], true)
|
|
},staticRenderFns: []}
|
|
module.exports.render._withStripped = true
|
|
if (false) {
|
|
module.hot.accept()
|
|
if (module.hot.data) {
|
|
require("vue-hot-reload-api").rerender("data-v-3104dae7", module.exports)
|
|
}
|
|
}
|
|
|
|
/***/ },
|
|
/* 249 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = install;
|
|
|
|
var _mdWhiteframe = __webpack_require__(250);
|
|
|
|
var _mdWhiteframe2 = _interopRequireDefault(_mdWhiteframe);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function install(Vue) {
|
|
Vue.component('md-whiteframe', Vue.extend(_mdWhiteframe2.default));
|
|
}
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 250 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var __vue_exports__, __vue_options__
|
|
var __vue_styles__ = {}
|
|
|
|
/* styles */
|
|
__webpack_require__(251)
|
|
|
|
/* script */
|
|
__vue_exports__ = __webpack_require__(252)
|
|
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
|
|
if (
|
|
typeof __vue_exports__.default === "object" ||
|
|
typeof __vue_exports__.default === "function"
|
|
) {
|
|
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
|
|
__vue_options__ = __vue_exports__ = __vue_exports__.default
|
|
}
|
|
if (typeof __vue_options__ === "function") {
|
|
__vue_options__ = __vue_options__.options
|
|
}
|
|
__vue_options__.__file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdWhiteframe/mdWhiteframe.vue"
|
|
|
|
/* hot reload */
|
|
if (false) {(function () {
|
|
var hotAPI = require("vue-hot-reload-api")
|
|
hotAPI.install(require("vue"), false)
|
|
if (!hotAPI.compatible) return
|
|
module.hot.accept()
|
|
if (!module.hot.data) {
|
|
hotAPI.createRecord("data-v-01d6d326", __vue_options__)
|
|
} else {
|
|
hotAPI.reload("data-v-01d6d326", __vue_options__)
|
|
}
|
|
})()}
|
|
if (__vue_options__.functional) {console.error("[vue-loader] mdWhiteframe.vue: functional components are not supported and should be defined in plain js files using render functions.")}
|
|
|
|
module.exports = __vue_exports__
|
|
|
|
|
|
/***/ },
|
|
/* 251 */
|
|
/***/ function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ },
|
|
/* 252 */
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
//
|
|
//
|
|
|
|
exports.default = {
|
|
props: {
|
|
mdElevation: {
|
|
type: [String, Number],
|
|
default: 1
|
|
},
|
|
mdTag: {
|
|
type: String,
|
|
default: 'div'
|
|
}
|
|
},
|
|
computed: {
|
|
classes: function classes() {
|
|
var numberedElevation = parseInt(this.mdElevation, 10);
|
|
var elevationClass = 'md-whiteframe-';
|
|
|
|
if (!isNaN(numberedElevation) && typeof numberedElevation === 'number') {
|
|
elevationClass += numberedElevation;
|
|
elevationClass += 'dp';
|
|
} else if (this.mdElevation.indexOf('dp') > -1) {
|
|
elevationClass += this.mdElevation;
|
|
}
|
|
|
|
return elevationClass;
|
|
}
|
|
},
|
|
render: function render(createElement) {
|
|
return createElement(this.mdTag, {
|
|
staticClass: 'md-whiteframe',
|
|
class: this.classes
|
|
}, this.$slots.default);
|
|
}
|
|
};
|
|
module.exports = exports['default'];
|
|
|
|
/***/ },
|
|
/* 253 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
var _core = __webpack_require__(72);
|
|
|
|
var _core2 = _interopRequireDefault(_core);
|
|
|
|
var _mdAvatar = __webpack_require__(1);
|
|
|
|
var _mdAvatar2 = _interopRequireDefault(_mdAvatar);
|
|
|
|
var _mdBackdrop = __webpack_require__(11);
|
|
|
|
var _mdBackdrop2 = _interopRequireDefault(_mdBackdrop);
|
|
|
|
var _mdBottomBar = __webpack_require__(16);
|
|
|
|
var _mdBottomBar2 = _interopRequireDefault(_mdBottomBar);
|
|
|
|
var _mdButton = __webpack_require__(25);
|
|
|
|
var _mdButton2 = _interopRequireDefault(_mdButton);
|
|
|
|
var _mdButtonToggle = __webpack_require__(31);
|
|
|
|
var _mdButtonToggle2 = _interopRequireDefault(_mdButtonToggle);
|
|
|
|
var _mdCard = __webpack_require__(37);
|
|
|
|
var _mdCard2 = _interopRequireDefault(_mdCard);
|
|
|
|
var _mdCheckbox = __webpack_require__(66);
|
|
|
|
var _mdCheckbox2 = _interopRequireDefault(_mdCheckbox);
|
|
|
|
var _mdDialog = __webpack_require__(86);
|
|
|
|
var _mdDialog2 = _interopRequireDefault(_mdDialog);
|
|
|
|
var _mdDivider = __webpack_require__(108);
|
|
|
|
var _mdDivider2 = _interopRequireDefault(_mdDivider);
|
|
|
|
var _mdIcon = __webpack_require__(112);
|
|
|
|
var _mdIcon2 = _interopRequireDefault(_mdIcon);
|
|
|
|
var _mdInputContainer = __webpack_require__(118);
|
|
|
|
var _mdInputContainer2 = _interopRequireDefault(_mdInputContainer);
|
|
|
|
var _mdLayout = __webpack_require__(134);
|
|
|
|
var _mdLayout2 = _interopRequireDefault(_mdLayout);
|
|
|
|
var _mdList = __webpack_require__(138);
|
|
|
|
var _mdList2 = _interopRequireDefault(_mdList);
|
|
|
|
var _mdMenu = __webpack_require__(149);
|
|
|
|
var _mdMenu2 = _interopRequireDefault(_mdMenu);
|
|
|
|
var _mdRadio = __webpack_require__(163);
|
|
|
|
var _mdRadio2 = _interopRequireDefault(_mdRadio);
|
|
|
|
var _mdSelect = __webpack_require__(169);
|
|
|
|
var _mdSelect2 = _interopRequireDefault(_mdSelect);
|
|
|
|
var _mdSidenav = __webpack_require__(178);
|
|
|
|
var _mdSidenav2 = _interopRequireDefault(_mdSidenav);
|
|
|
|
var _mdSpinner = __webpack_require__(184);
|
|
|
|
var _mdSpinner2 = _interopRequireDefault(_mdSpinner);
|
|
|
|
var _mdSubheader = __webpack_require__(190);
|
|
|
|
var _mdSubheader2 = _interopRequireDefault(_mdSubheader);
|
|
|
|
var _mdSwitch = __webpack_require__(196);
|
|
|
|
var _mdSwitch2 = _interopRequireDefault(_mdSwitch);
|
|
|
|
var _mdTable = __webpack_require__(201);
|
|
|
|
var _mdTable2 = _interopRequireDefault(_mdTable);
|
|
|
|
var _mdTabs = __webpack_require__(228);
|
|
|
|
var _mdTabs2 = _interopRequireDefault(_mdTabs);
|
|
|
|
var _mdToolbar = __webpack_require__(238);
|
|
|
|
var _mdToolbar2 = _interopRequireDefault(_mdToolbar);
|
|
|
|
var _mdTooltip = __webpack_require__(244);
|
|
|
|
var _mdTooltip2 = _interopRequireDefault(_mdTooltip);
|
|
|
|
var _mdWhiteframe = __webpack_require__(249);
|
|
|
|
var _mdWhiteframe2 = _interopRequireDefault(_mdWhiteframe);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var options = {
|
|
MdCore: _core2.default,
|
|
MdAvatar: _mdAvatar2.default,
|
|
MdBackdrop: _mdBackdrop2.default,
|
|
MdBottomBar: _mdBottomBar2.default,
|
|
MdButton: _mdButton2.default,
|
|
MdButtonToggle: _mdButtonToggle2.default,
|
|
MdCard: _mdCard2.default,
|
|
MdCheckbox: _mdCheckbox2.default,
|
|
MdDialog: _mdDialog2.default,
|
|
MdDivider: _mdDivider2.default,
|
|
MdIcon: _mdIcon2.default,
|
|
MdInputContainer: _mdInputContainer2.default,
|
|
MdLayout: _mdLayout2.default,
|
|
MdList: _mdList2.default,
|
|
MdMenu: _mdMenu2.default,
|
|
MdRadio: _mdRadio2.default,
|
|
MdSelect: _mdSelect2.default,
|
|
MdSidenav: _mdSidenav2.default,
|
|
MdSpinner: _mdSpinner2.default,
|
|
MdSubheader: _mdSubheader2.default,
|
|
MdSwitch: _mdSwitch2.default,
|
|
MdTable: _mdTable2.default,
|
|
MdTabs: _mdTabs2.default,
|
|
MdToolbar: _mdToolbar2.default,
|
|
MdTooltip: _mdTooltip2.default,
|
|
MdWhiteframe: _mdWhiteframe2.default
|
|
};
|
|
|
|
options.install = function (Vue) {
|
|
for (var component in options) {
|
|
var componentInstaller = options[component];
|
|
|
|
if (componentInstaller && component !== 'install') {
|
|
Vue.use(componentInstaller);
|
|
}
|
|
}
|
|
};
|
|
|
|
window.VueMaterial = options;
|
|
|
|
exports.default = options;
|
|
module.exports = exports['default'];
|
|
|
|
/***/ }
|
|
/******/ ])
|
|
});
|
|
;
|
|
//# sourceMappingURL=vue-material.debug.js.map
|