vue-simple-spinner
Advanced tools
Comparing version 1.2.5 to 1.2.6
'use strict' | ||
//const ExtractTextPlugin = require('extract-text-webpack-plugin') | ||
const merge = require('deep-assign') | ||
@@ -17,2 +16,3 @@ const webpack = require('webpack') | ||
library: 'vue-simple-spinner', | ||
libraryExport: 'default', | ||
libraryTarget: 'umd' | ||
@@ -26,20 +26,7 @@ }, | ||
entryOnly: true | ||
})/*, | ||
new ExtractTextPlugin({ | ||
filename: options.isProduction ? 'vue-simple-spinner.min.css' : 'vue-simple-spinner.css' | ||
})*/ | ||
}) | ||
] | ||
}) | ||
/* | ||
// First item in module.rules array is Vue | ||
config.module.rules[0].options.loaders = { | ||
scss: ExtractTextPlugin.extract({ | ||
loader: 'css-loader!sass-loader', | ||
fallbackLoader: 'vue-style-loader' | ||
}) | ||
} | ||
*/ | ||
// debug and production | ||
config.plugins = config.plugins.concat([ | ||
@@ -52,8 +39,7 @@ new webpack.LoaderOptionsPlugin({ | ||
if (options.isProduction) { | ||
// production only | ||
config.plugins = config.plugins.concat([ | ||
// Set the production environment | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"' | ||
} | ||
'process.env.NODE_ENV': JSON.stringify('production') | ||
}), | ||
@@ -60,0 +46,0 @@ |
'use strict' | ||
//const ExtractTextPlugin = require('extract-text-webpack-plugin') | ||
const merge = require('deep-assign') | ||
@@ -19,8 +18,2 @@ const webpack = require('webpack') | ||
plugins: [ | ||
/* | ||
new ExtractTextPlugin({ | ||
filename: 'examples.bundle.css' | ||
}), | ||
*/ | ||
new webpack.LoaderOptionsPlugin({ | ||
@@ -32,5 +25,3 @@ minimize: true | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"' | ||
} | ||
'process.env.NODE_ENV': JSON.stringify('production') | ||
}), | ||
@@ -47,12 +38,2 @@ | ||
/* | ||
// First item in module.rules array is Vue | ||
config.module.rules[0].options.loaders = { | ||
scss: ExtractTextPlugin.extract({ | ||
loader: 'css-loader!sass-loader', | ||
fallbackLoader: 'vue-style-loader' | ||
}) | ||
} | ||
*/ | ||
module.exports = config |
/*! | ||
* vue-simple-spinner v1.2.5 (https://github.com/dzwillia/vue-simple-spinner) | ||
* vue-simple-spinner v1.2.6 (https://github.com/dzwillia/vue-simple-spinner) | ||
* (c) 2017 David Z. Williams | ||
@@ -51,5 +51,2 @@ * Released under the MIT License. | ||
/******/ | ||
/******/ // identity function for calling harmony imports with the correct context | ||
/******/ __webpack_require__.i = function(value) { return value; }; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
@@ -82,3 +79,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ }) | ||
@@ -90,24 +87,2 @@ /************************************************************************/ | ||
/* styles */ | ||
__webpack_require__(7) | ||
var Component = __webpack_require__(5)( | ||
/* script */ | ||
__webpack_require__(1), | ||
/* template */ | ||
__webpack_require__(6), | ||
/* scopeId */ | ||
null, | ||
/* cssModules */ | ||
null | ||
) | ||
module.exports = Component.exports | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
@@ -119,161 +94,51 @@ | ||
}); | ||
exports.VueSimpleSpinner = undefined; | ||
var _Spinner = __webpack_require__(1); | ||
var isNumber = function isNumber(n) { | ||
return !isNaN(parseFloat(n)) && isFinite(n); | ||
}; | ||
var _Spinner2 = _interopRequireDefault(_Spinner); | ||
exports.default = { | ||
name: 'vue-simple-spinner', | ||
props: { | ||
'size': { | ||
default: 32 | ||
}, | ||
'line-size': { | ||
type: Number, | ||
default: 3 | ||
}, | ||
'line-bg-color': { | ||
type: String, | ||
default: '#eee' | ||
}, | ||
'line-fg-color': { | ||
type: String, | ||
default: '#2196f3' }, | ||
'speed': { | ||
type: Number, | ||
default: 0.8 | ||
}, | ||
'spacing': { | ||
type: Number, | ||
default: 4 | ||
}, | ||
'message': { | ||
type: String, | ||
default: '' | ||
}, | ||
'font-size': { | ||
type: Number, | ||
default: 13 | ||
}, | ||
'text-fg-color': { | ||
type: String, | ||
default: '#555' | ||
} | ||
}, | ||
computed: { | ||
size_px: function size_px() { | ||
switch (this.size) { | ||
case 'tiny': | ||
return 12; | ||
case 'small': | ||
return 16; | ||
case 'medium': | ||
return 32; | ||
case 'large': | ||
return 48; | ||
case 'big': | ||
return 64; | ||
case 'huge': | ||
return 96; | ||
case 'massive': | ||
return 128; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
return isNumber(this.size) ? this.size : 32; | ||
}, | ||
line_size_px: function line_size_px() { | ||
switch (this.size) { | ||
case 'tiny': | ||
return 1; | ||
case 'small': | ||
return 2; | ||
case 'medium': | ||
return 3; | ||
case 'large': | ||
return 3; | ||
case 'big': | ||
return 4; | ||
case 'huge': | ||
return 4; | ||
case 'massive': | ||
return 5; | ||
} | ||
if (typeof window !== 'undefined' && window.Vue) { | ||
Vue.component('vue-simple-spinner', _Spinner2.default); | ||
} | ||
return isNumber(this.lineSize) ? this.lineSize : 4; | ||
}, | ||
text_margin_top: function text_margin_top() { | ||
switch (this.size) { | ||
case 'tiny': | ||
case 'small': | ||
case 'medium': | ||
case 'large': | ||
case 'big': | ||
case 'huge': | ||
case 'massive': | ||
return Math.min(Math.max(Math.ceil(this.size_px / 8), 3), 12); | ||
} | ||
exports.VueSimpleSpinner = _Spinner2.default; | ||
exports.default = _Spinner2.default; | ||
return isNumber(this.spacing) ? this.spacing : 4; | ||
}, | ||
text_font_size: function text_font_size() { | ||
switch (this.size) { | ||
case 'tiny': | ||
case 'small': | ||
case 'medium': | ||
case 'large': | ||
case 'big': | ||
case 'huge': | ||
case 'massive': | ||
return Math.min(Math.max(Math.ceil(this.size_px * 0.4), 11), 32); | ||
} | ||
return isNumber(this.fontSize) ? this.fontSize : 13; | ||
}, | ||
spinner_style: function spinner_style() { | ||
return { | ||
'margin': '0 auto', | ||
'border-radius': '100%', | ||
'border': this.line_size_px + 'px solid ' + this.lineBgColor, | ||
'border-top': this.line_size_px + 'px solid ' + this.lineFgColor, | ||
'width': this.size_px + 'px', | ||
'height': this.size_px + 'px', | ||
'animation': 'vue-simple-spinner-spin ' + this.speed + 's linear infinite' | ||
}; | ||
}, | ||
text_style: function text_style() { | ||
return { | ||
'margin-top': this.text_margin_top + 'px', | ||
'color': this.textFgColor, | ||
'font-size': this.text_font_size + 'px', | ||
'text-align': 'center' | ||
}; | ||
} | ||
} | ||
}; | ||
/***/ }), | ||
/* 2 */ | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
/* styles */ | ||
__webpack_require__(2) | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.VueSimpleSpinner = undefined; | ||
var Component = __webpack_require__(7)( | ||
/* script */ | ||
__webpack_require__(8), | ||
/* template */ | ||
__webpack_require__(9), | ||
/* scopeId */ | ||
null, | ||
/* cssModules */ | ||
null | ||
) | ||
var _Spinner = __webpack_require__(0); | ||
module.exports = Component.exports | ||
var _Spinner2 = _interopRequireDefault(_Spinner); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
if (typeof window !== 'undefined' && window.Vue) { | ||
Vue.component('vue-simple-spinner', _Spinner2.default); | ||
} | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
exports.VueSimpleSpinner = _Spinner2.default; | ||
exports.default = _Spinner2.default; | ||
// load the styles | ||
var content = __webpack_require__(3); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
if(content.locals) module.exports = content.locals; | ||
// add the styles to the DOM | ||
var update = __webpack_require__(5)("d89557e4", content, true); | ||
@@ -352,88 +217,4 @@ /***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports) { | ||
// this module is a runtime utility for cleaner component module output and will | ||
// be included in the final webpack user bundle | ||
module.exports = function normalizeComponent ( | ||
rawScriptExports, | ||
compiledTemplate, | ||
scopeId, | ||
cssModules | ||
) { | ||
var esModule | ||
var scriptExports = rawScriptExports = rawScriptExports || {} | ||
// ES6 modules interop | ||
var type = typeof rawScriptExports.default | ||
if (type === 'object' || type === 'function') { | ||
esModule = rawScriptExports | ||
scriptExports = rawScriptExports.default | ||
} | ||
// Vue.extend constructor export interop | ||
var options = typeof scriptExports === 'function' | ||
? scriptExports.options | ||
: scriptExports | ||
// render functions | ||
if (compiledTemplate) { | ||
options.render = compiledTemplate.render | ||
options.staticRenderFns = compiledTemplate.staticRenderFns | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId | ||
} | ||
// inject cssModules | ||
if (cssModules) { | ||
var computed = Object.create(options.computed || null) | ||
Object.keys(cssModules).forEach(function (key) { | ||
var module = cssModules[key] | ||
computed[key] = function () { return module } | ||
}) | ||
options.computed = computed | ||
} | ||
return { | ||
esModule: esModule, | ||
exports: scriptExports, | ||
options: options | ||
} | ||
} | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, exports) { | ||
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; | ||
return _c('div', [_c('div', { | ||
staticClass: "vue-simple-spinner", | ||
style: (_vm.spinner_style) | ||
}), _vm._v(" "), (_vm.message.length > 0) ? _c('div', { | ||
staticClass: "vue-simple-spinner", | ||
style: (_vm.text_style) | ||
}, [_vm._v(_vm._s(_vm.message))]) : _vm._e()]) | ||
},staticRenderFns: []} | ||
/***/ }), | ||
/* 7 */ | ||
/***/ (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__(3); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
if(content.locals) module.exports = content.locals; | ||
// add the styles to the DOM | ||
var update = __webpack_require__(8)("d89557e4", content, true); | ||
/***/ }), | ||
/* 8 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/* | ||
@@ -455,3 +236,3 @@ MIT License http://www.opensource.org/licenses/mit-license.php | ||
var listToStyles = __webpack_require__(9) | ||
var listToStyles = __webpack_require__(6) | ||
@@ -658,3 +439,3 @@ /* | ||
/***/ }), | ||
/* 9 */ | ||
/* 6 */ | ||
/***/ (function(module, exports) { | ||
@@ -691,4 +472,220 @@ | ||
/***/ }), | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
// this module is a runtime utility for cleaner component module output and will | ||
// be included in the final webpack user bundle | ||
module.exports = function normalizeComponent ( | ||
rawScriptExports, | ||
compiledTemplate, | ||
scopeId, | ||
cssModules | ||
) { | ||
var esModule | ||
var scriptExports = rawScriptExports = rawScriptExports || {} | ||
// ES6 modules interop | ||
var type = typeof rawScriptExports.default | ||
if (type === 'object' || type === 'function') { | ||
esModule = rawScriptExports | ||
scriptExports = rawScriptExports.default | ||
} | ||
// Vue.extend constructor export interop | ||
var options = typeof scriptExports === 'function' | ||
? scriptExports.options | ||
: scriptExports | ||
// render functions | ||
if (compiledTemplate) { | ||
options.render = compiledTemplate.render | ||
options.staticRenderFns = compiledTemplate.staticRenderFns | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId | ||
} | ||
// inject cssModules | ||
if (cssModules) { | ||
var computed = Object.create(options.computed || null) | ||
Object.keys(cssModules).forEach(function (key) { | ||
var module = cssModules[key] | ||
computed[key] = function () { return module } | ||
}) | ||
options.computed = computed | ||
} | ||
return { | ||
esModule: esModule, | ||
exports: scriptExports, | ||
options: options | ||
} | ||
} | ||
/***/ }), | ||
/* 8 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var isNumber = function isNumber(n) { | ||
return !isNaN(parseFloat(n)) && isFinite(n); | ||
}; | ||
exports.default = { | ||
name: 'vue-simple-spinner', | ||
props: { | ||
'size': { | ||
default: 32 | ||
}, | ||
'line-size': { | ||
type: Number, | ||
default: 3 | ||
}, | ||
'line-bg-color': { | ||
type: String, | ||
default: '#eee' | ||
}, | ||
'line-fg-color': { | ||
type: String, | ||
default: '#2196f3' }, | ||
'speed': { | ||
type: Number, | ||
default: 0.8 | ||
}, | ||
'spacing': { | ||
type: Number, | ||
default: 4 | ||
}, | ||
'message': { | ||
type: String, | ||
default: '' | ||
}, | ||
'font-size': { | ||
type: Number, | ||
default: 13 | ||
}, | ||
'text-fg-color': { | ||
type: String, | ||
default: '#555' | ||
} | ||
}, | ||
computed: { | ||
size_px: function size_px() { | ||
switch (this.size) { | ||
case 'tiny': | ||
return 12; | ||
case 'small': | ||
return 16; | ||
case 'medium': | ||
return 32; | ||
case 'large': | ||
return 48; | ||
case 'big': | ||
return 64; | ||
case 'huge': | ||
return 96; | ||
case 'massive': | ||
return 128; | ||
} | ||
return isNumber(this.size) ? this.size : 32; | ||
}, | ||
line_size_px: function line_size_px() { | ||
switch (this.size) { | ||
case 'tiny': | ||
return 1; | ||
case 'small': | ||
return 2; | ||
case 'medium': | ||
return 3; | ||
case 'large': | ||
return 3; | ||
case 'big': | ||
return 4; | ||
case 'huge': | ||
return 4; | ||
case 'massive': | ||
return 5; | ||
} | ||
return isNumber(this.lineSize) ? this.lineSize : 4; | ||
}, | ||
text_margin_top: function text_margin_top() { | ||
switch (this.size) { | ||
case 'tiny': | ||
case 'small': | ||
case 'medium': | ||
case 'large': | ||
case 'big': | ||
case 'huge': | ||
case 'massive': | ||
return Math.min(Math.max(Math.ceil(this.size_px / 8), 3), 12); | ||
} | ||
return isNumber(this.spacing) ? this.spacing : 4; | ||
}, | ||
text_font_size: function text_font_size() { | ||
switch (this.size) { | ||
case 'tiny': | ||
case 'small': | ||
case 'medium': | ||
case 'large': | ||
case 'big': | ||
case 'huge': | ||
case 'massive': | ||
return Math.min(Math.max(Math.ceil(this.size_px * 0.4), 11), 32); | ||
} | ||
return isNumber(this.fontSize) ? this.fontSize : 13; | ||
}, | ||
spinner_style: function spinner_style() { | ||
return { | ||
'margin': '0 auto', | ||
'border-radius': '100%', | ||
'border': this.line_size_px + 'px solid ' + this.lineBgColor, | ||
'border-top': this.line_size_px + 'px solid ' + this.lineFgColor, | ||
'width': this.size_px + 'px', | ||
'height': this.size_px + 'px', | ||
'animation': 'vue-simple-spinner-spin ' + this.speed + 's linear infinite' | ||
}; | ||
}, | ||
text_style: function text_style() { | ||
return { | ||
'margin-top': this.text_margin_top + 'px', | ||
'color': this.textFgColor, | ||
'font-size': this.text_font_size + 'px', | ||
'text-align': 'center' | ||
}; | ||
} | ||
} | ||
}; | ||
/***/ }), | ||
/* 9 */ | ||
/***/ (function(module, exports) { | ||
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; | ||
return _c('div', [_c('div', { | ||
staticClass: "vue-simple-spinner", | ||
style: (_vm.spinner_style) | ||
}), _vm._v(" "), (_vm.message.length > 0) ? _c('div', { | ||
staticClass: "vue-simple-spinner-text", | ||
style: (_vm.text_style) | ||
}, [_vm._v(_vm._s(_vm.message))]) : _vm._e()]) | ||
},staticRenderFns: []} | ||
/***/ }) | ||
/******/ ]); | ||
/******/ ])["default"]; | ||
}); |
/*! | ||
* vue-simple-spinner v1.2.5 (https://github.com/dzwillia/vue-simple-spinner) | ||
* vue-simple-spinner v1.2.6 (https://github.com/dzwillia/vue-simple-spinner) | ||
* (c) 2017 David Z. Williams | ||
* Released under the MIT License. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-simple-spinner"]=t():e["vue-simple-spinner"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){n(7);var r=n(5)(n(1),n(6),null,null);e.exports=r.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};t.default={name:"vue-simple-spinner",props:{size:{default:32},"line-size":{type:Number,default:3},"line-bg-color":{type:String,default:"#eee"},"line-fg-color":{type:String,default:"#2196f3"},speed:{type:Number,default:.8},spacing:{type:Number,default:4},message:{type:String,default:""},"font-size":{type:Number,default:13},"text-fg-color":{type:String,default:"#555"}},computed:{size_px:function(){switch(this.size){case"tiny":return 12;case"small":return 16;case"medium":return 32;case"large":return 48;case"big":return 64;case"huge":return 96;case"massive":return 128}return r(this.size)?this.size:32},line_size_px:function(){switch(this.size){case"tiny":return 1;case"small":return 2;case"medium":case"large":return 3;case"big":case"huge":return 4;case"massive":return 5}return r(this.lineSize)?this.lineSize:4},text_margin_top:function(){switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":return Math.min(Math.max(Math.ceil(this.size_px/8),3),12)}return r(this.spacing)?this.spacing:4},text_font_size:function(){switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":return Math.min(Math.max(Math.ceil(.4*this.size_px),11),32)}return r(this.fontSize)?this.fontSize:13},spinner_style:function(){return{margin:"0 auto","border-radius":"100%",border:this.line_size_px+"px solid "+this.lineBgColor,"border-top":this.line_size_px+"px solid "+this.lineFgColor,width:this.size_px+"px",height:this.size_px+"px",animation:"vue-simple-spinner-spin "+this.speed+"s linear infinite"}},text_style:function(){return{"margin-top":this.text_margin_top+"px",color:this.textFgColor,"font-size":this.text_font_size+"px","text-align":"center"}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VueSimpleSpinner=void 0;var r=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(r);"undefined"!=typeof window&&window.Vue&&Vue.component("vue-simple-spinner",i.default),t.VueSimpleSpinner=i.default,t.default=i.default},function(e,t,n){t=e.exports=n(4)(),t.push([e.i,".vue-simple-spinner{transition:all .3s linear}@keyframes vue-simple-spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var s=this[i][0];"number"==typeof s&&(r[s]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(e,t){e.exports=function(e,t,n,r){var i,s=e=e||{},o=typeof e.default;"object"!==o&&"function"!==o||(i=e,s=e.default);var a="function"==typeof s?s.options:s;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),n&&(a._scopeId=n),r){var u=Object.create(a.computed||null);Object.keys(r).forEach(function(e){var t=r[e];u[e]=function(){return t}}),a.computed=u}return{esModule:i,exports:s,options:a}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"vue-simple-spinner",style:e.spinner_style}),e._v(" "),e.message.length>0?n("div",{staticClass:"vue-simple-spinner",style:e.text_style},[e._v(e._s(e.message))]):e._e()])},staticRenderFns:[]}},function(e,t,n){var r=n(3);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(8)("d89557e4",r,!0)},function(e,t,n){function r(e){for(var t=0;t<e.length;t++){var n=e[t],r=c[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(s(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],i=0;i<n.parts.length;i++)o.push(s(n.parts[i]));c[n.id]={id:n.id,refs:1,parts:o}}}}function i(){var e=document.createElement("style");return e.type="text/css",p.appendChild(e),e}function s(e){var t,n,r=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(r){if(h)return m;r.parentNode.removeChild(r)}if(v){var s=d++;r=f||(f=i()),t=o.bind(null,r,s,!1),n=o.bind(null,r,s,!0)}else r=i(),t=a.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}function o(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var s=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function a(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=n(9),c={},p=u&&(document.head||document.getElementsByTagName("head")[0]),f=null,d=0,h=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n){h=n;var i=l(e,t);return r(i),function(t){for(var n=[],s=0;s<i.length;s++){var o=i[s],a=c[o.id];a.refs--,n.push(a)}t?(i=l(e,t),r(i)):i=[];for(var s=0;s<n.length;s++){var a=n[s];if(0===a.refs){for(var u=0;u<a.parts.length;u++)a.parts[u]();delete c[a.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var n=[],r={},i=0;i<t.length;i++){var s=t[i],o=s[0],a=s[1],u=s[2],l=s[3],c={id:e+":"+i,css:a,media:u,sourceMap:l};r[o]?r[o].parts.push(c):n.push(r[o]={id:o,parts:[c]})}return n}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vue-simple-spinner"]=t():e["vue-simple-spinner"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VueSimpleSpinner=void 0;var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);"undefined"!=typeof window&&window.Vue&&Vue.component("vue-simple-spinner",i.default),t.VueSimpleSpinner=i.default,t.default=i.default},function(e,t,n){n(2);var r=n(7)(n(8),n(9),null,null);e.exports=r.exports},function(e,t,n){var r=n(3);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(5)("d89557e4",r,!0)},function(e,t,n){t=e.exports=n(4)(),t.push([e.i,".vue-simple-spinner{transition:all .3s linear}@keyframes vue-simple-spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var s=this[i][0];"number"==typeof s&&(r[s]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(e,t,n){function r(e){for(var t=0;t<e.length;t++){var n=e[t],r=c[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(s(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],i=0;i<n.parts.length;i++)o.push(s(n.parts[i]));c[n.id]={id:n.id,refs:1,parts:o}}}}function i(){var e=document.createElement("style");return e.type="text/css",p.appendChild(e),e}function s(e){var t,n,r=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(r){if(h)return m;r.parentNode.removeChild(r)}if(v){var s=d++;r=f||(f=i()),t=o.bind(null,r,s,!1),n=o.bind(null,r,s,!0)}else r=i(),t=a.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}function o(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var s=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function a(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=n(6),c={},p=u&&(document.head||document.getElementsByTagName("head")[0]),f=null,d=0,h=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n){h=n;var i=l(e,t);return r(i),function(t){for(var n=[],s=0;s<i.length;s++){var o=i[s],a=c[o.id];a.refs--,n.push(a)}t?(i=l(e,t),r(i)):i=[];for(var s=0;s<n.length;s++){var a=n[s];if(0===a.refs){for(var u=0;u<a.parts.length;u++)a.parts[u]();delete c[a.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var n=[],r={},i=0;i<t.length;i++){var s=t[i],o=s[0],a=s[1],u=s[2],l=s[3],c={id:e+":"+i,css:a,media:u,sourceMap:l};r[o]?r[o].parts.push(c):n.push(r[o]={id:o,parts:[c]})}return n}},function(e,t){e.exports=function(e,t,n,r){var i,s=e=e||{},o=typeof e.default;"object"!==o&&"function"!==o||(i=e,s=e.default);var a="function"==typeof s?s.options:s;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),n&&(a._scopeId=n),r){var u=Object.create(a.computed||null);Object.keys(r).forEach(function(e){var t=r[e];u[e]=function(){return t}}),a.computed=u}return{esModule:i,exports:s,options:a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};t.default={name:"vue-simple-spinner",props:{size:{default:32},"line-size":{type:Number,default:3},"line-bg-color":{type:String,default:"#eee"},"line-fg-color":{type:String,default:"#2196f3"},speed:{type:Number,default:.8},spacing:{type:Number,default:4},message:{type:String,default:""},"font-size":{type:Number,default:13},"text-fg-color":{type:String,default:"#555"}},computed:{size_px:function(){switch(this.size){case"tiny":return 12;case"small":return 16;case"medium":return 32;case"large":return 48;case"big":return 64;case"huge":return 96;case"massive":return 128}return r(this.size)?this.size:32},line_size_px:function(){switch(this.size){case"tiny":return 1;case"small":return 2;case"medium":case"large":return 3;case"big":case"huge":return 4;case"massive":return 5}return r(this.lineSize)?this.lineSize:4},text_margin_top:function(){switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":return Math.min(Math.max(Math.ceil(this.size_px/8),3),12)}return r(this.spacing)?this.spacing:4},text_font_size:function(){switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":return Math.min(Math.max(Math.ceil(.4*this.size_px),11),32)}return r(this.fontSize)?this.fontSize:13},spinner_style:function(){return{margin:"0 auto","border-radius":"100%",border:this.line_size_px+"px solid "+this.lineBgColor,"border-top":this.line_size_px+"px solid "+this.lineFgColor,width:this.size_px+"px",height:this.size_px+"px",animation:"vue-simple-spinner-spin "+this.speed+"s linear infinite"}},text_style:function(){return{"margin-top":this.text_margin_top+"px",color:this.textFgColor,"font-size":this.text_font_size+"px","text-align":"center"}}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"vue-simple-spinner",style:e.spinner_style}),e._v(" "),e.message.length>0?n("div",{staticClass:"vue-simple-spinner-text",style:e.text_style},[e._v(e._s(e.message))]):e._e()])},staticRenderFns:[]}}]).default}); |
{ | ||
"name": "vue-simple-spinner", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "A simple, flexible spinner for Vue.js", | ||
@@ -9,7 +9,6 @@ "author": "David Z. Williams <dave@flex.io>", | ||
"dev": "cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.dev.js --open --inline --hot", | ||
"build": "webpack --config build/webpack.dist.js", | ||
"build:debug": "cross-env NODE_ENV=debug webpack --config build/webpack.dist.js", | ||
"build:release": "cross-env NODE_ENV=production webpack --config build/webpack.dist.js", | ||
"build:examples": "webpack --config build/webpack.examples.js", | ||
"build:all": "npm run build:debug && npm run build:release && npm run build:examples", | ||
"build": "npm run build:debug && npm run build:release && npm run build:examples", | ||
"clean": "rimraf ./examples/examples.bundle.css ./examples/examples.bundle.js" | ||
@@ -38,3 +37,3 @@ }, | ||
"babel-core": "^6.0.0", | ||
"babel-loader": "^6.0.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-transform-es2015-destructuring": "^6.19.0", | ||
@@ -50,6 +49,6 @@ "babel-plugin-transform-es2015-parameters": "^6.18.0", | ||
"deep-assign": "^2.0.0", | ||
"extract-text-webpack-plugin": "^2.1.0", | ||
"extract-text-webpack-plugin": "^3.0.0", | ||
"node-sass": "^4.5.2", | ||
"rimraf": "^2.6.1", | ||
"sass-loader": "^6.0.3", | ||
"sass-loader": "^6.0.6", | ||
"vue": "^2.2.6", | ||
@@ -59,6 +58,6 @@ "vue-loader": "^11.3.3", | ||
"vue-template-compiler": "^2.2.6", | ||
"webpack": "^2.4.1", | ||
"webpack": "^3.5.6", | ||
"webpack-bundle-analyzer": "^2.2.1", | ||
"webpack-dev-server": "^2.4.2" | ||
"webpack-dev-server": "^2.7.1" | ||
} | ||
} |
@@ -13,2 +13,6 @@ # vue-simple-spinner | ||
## JsFiddle Demo | ||
[http://jsfiddle.net/dzwillia/kc5ka8zu](http://jsfiddle.net/dzwillia/kc5ka8zu) | ||
## Requirements | ||
@@ -15,0 +19,0 @@ * [Vue.js](http://vuejs.org/) (^v2.1.4) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
326071
84
809