vue-radial-progress
Advanced tools
Comparing version 0.2.4 to 0.2.5
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("RadialProgressBar",[],e):"object"==typeof exports?exports.RadialProgressBar=e():t.RadialProgressBar=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="/dist/",e(0)}([function(t,e,r){"use strict";t.exports=r(5)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{diameter:{type:Number,required:!1,default:200},totalSteps:{type:Number,required:!0,default:10},completedSteps:{type:Number,required:!0,default:0},startColor:{type:String,required:!1,default:"#bbff42"},stopColor:{type:String,required:!1,default:"#429321"},strokeWidth:{type:Number,required:!1,default:10},animateSpeed:{type:Number,required:!1,default:1e3},innerStrokeColor:{type:String,required:!1,default:"#323232"},fps:{type:Number,required:!1,default:60}},data:function(){return{gradient:{fx:.99,fy:.5,cx:.5,cy:.5,r:.65},gradientAnimation:null,currentAngle:0,strokeDashoffset:0}},computed:{radius:function(){return this.diameter/2},circumference:function(){return Math.PI*this.innerCircleDiameter},stepSize:function(){return 0===this.totalSteps?0:100/this.totalSteps},finishedPercentage:function(){return this.stepSize*this.completedSteps},circleSlice:function(){return 2*Math.PI/this.totalSteps},animateSlice:function(){return this.circleSlice/this.totalPoints},innerCircleDiameter:function(){return this.diameter-2*this.strokeWidth},innerCircleRadius:function(){return this.innerCircleDiameter/2},totalPoints:function(){return this.animateSpeed/this.animationIncrements},animationIncrements:function(){return 1e3/this.fps},hasGradient:function(){return this.startColor!==this.stopColor},containerStyle:function(){return{height:this.diameter+"px",width:this.diameter+"px"}},progressStyle:function(){return{height:this.diameter+"px",width:this.diameter+"px",strokeWidth:this.strokeWidth+"px",strokeDashoffset:this.strokeDashoffset,transition:"stroke-dashoffset "+this.animateSpeed+"ms linear"}},strokeStyle:function(){return{height:this.diameter+"px",width:this.diameter+"px",strokeWidth:this.strokeWidth+"px"}},innerCircleStyle:function(){return{width:this.innerCircleDiameter+"px"}}},methods:{getStopPointsOfCircle:function(t){for(var e=[],r=0;r<t;r++){var i=this.circleSlice*r;e.push(this.getPointOfCircle(i))}return e},getPointOfCircle:function(t){var e=.5,r=e+e*Math.cos(t),i=e+e*Math.sin(t);return{x:r,y:i}},gotoPoint:function(){var t=this.getPointOfCircle(this.currentAngle);this.gradient.fx=t.x,this.gradient.fy=t.y},changeProgress:function(t){var e=this,r=t.isAnimate,i=void 0===r||r;if(this.strokeDashoffset=(100-this.finishedPercentage)/100*this.circumference,this.gradientAnimation&&clearInterval(this.gradientAnimation),!i)return void this.gotoNextStep();var n=(this.completedSteps-1)*this.circleSlice,s=(this.currentAngle-n)/this.animateSlice,o=Math.abs(s-this.totalPoints)/this.totalPoints,a=s<this.totalPoints;this.gradientAnimation=setInterval(function(){return a&&s>=e.totalPoints||!a&&s<e.totalPoints?void clearInterval(e.gradientAnimation):(e.currentAngle=n+e.animateSlice*s,e.gotoPoint(),void(s+=a?o:-o))},this.animationIncrements)},gotoNextStep:function(){this.currentAngle=this.completedSteps*this.circleSlice,this.gotoPoint()}},watch:{totalSteps:function(){this.changeProgress({isAnimate:!0})},completedSteps:function(){this.changeProgress({isAnimate:!0})},diameter:function(){this.changeProgress({isAnimate:!0})},strokeWidth:function(){this.changeProgress({isAnimate:!0})}},created:function(){this.changeProgress({isAnimate:!1})}}},function(t,e,r){e=t.exports=r(3)(),e.push([t.id,".radial-progress-container{position:relative}.radial-progress-inner{top:0;right:0;bottom:0;left:0;position:absolute;border-radius:50%;margin:0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e];r[2]?t.push("@media "+r[2]+"{"+r[1]+"}"):t.push(r[1])}return t.join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},n=0;n<this.length;n++){var s=this[n][0];"number"==typeof s&&(i[s]=!0)}for(n=0;n<e.length;n++){var o=e[n];"number"==typeof o[0]&&i[o[0]]||(r&&!o[2]?o[2]=r:r&&(o[2]="("+o[2]+") and ("+r+")"),t.push(o))}},t}},function(t,e){t.exports=" <div class=radial-progress-container :style=containerStyle> <div class=radial-progress-inner :style=innerCircleStyle> <slot></slot> </div> <svg class=radial-progress-bar :width=diameter :height=diameter version=1.1 xmlns=http://www.w3.org/2000/svg> <defs> <radialGradient id=radial-gradient :fx=gradient.fx :fy=gradient.fy :cx=gradient.cx :cy=gradient.cy :r=gradient.r> <stop offset=30% :stop-color=startColor /> <stop offset=100% :stop-color=stopColor /> </radialGradient> </defs> <circle :r=innerCircleRadius :cx=radius :cy=radius fill=transparent :stroke=innerStrokeColor :stroke-dasharray=circumference stroke-dashoffset=0 stroke-linecap=round :style=strokeStyle></circle> <circle :transform=\"'rotate(270, ' + radius + ',' + radius + ')'\" :r=innerCircleRadius :cx=radius :cy=radius fill=transparent stroke=url(#radial-gradient) :stroke-dasharray=circumference :stroke-dashoffset=circumference stroke-linecap=round :style=progressStyle></circle> </svg> </div> "},function(t,e,r){var i,n,s={};r(7),i=r(1),n=r(4),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var o="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;n&&(o.template=n),o.computed||(o.computed={}),Object.keys(s).forEach(function(t){var e=s[t];o.computed[t]=function(){return e}})},function(t,e,r){function i(t,e){for(var r=0;r<t.length;r++){var i=t[r],n=d[i.id];if(n){n.refs++;for(var s=0;s<n.parts.length;s++)n.parts[s](i.parts[s]);for(;s<i.parts.length;s++)n.parts.push(c(i.parts[s],e))}else{for(var o=[],s=0;s<i.parts.length;s++)o.push(c(i.parts[s],e));d[i.id]={id:i.id,refs:1,parts:o}}}}function n(t){for(var e=[],r={},i=0;i<t.length;i++){var n=t[i],s=n[0],o=n[1],a=n[2],c=n[3],l={css:o,media:a,sourceMap:c};r[s]?r[s].parts.push(l):e.push(r[s]={id:s,parts:[l]})}return e}function s(t,e){var r=h(),i=v[v.length-1];if("top"===t.insertAt)i?i.nextSibling?r.insertBefore(e,i.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),v.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(e)}}function o(t){t.parentNode.removeChild(t);var e=v.indexOf(t);e>=0&&v.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",s(t,e),e}function c(t,e){var r,i,n;if(e.singleton){var s=g++;r=m||(m=a(e)),i=l.bind(null,r,s,!1),n=l.bind(null,r,s,!0)}else r=a(e),i=u.bind(null,r),n=function(){o(r)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else n()}}function l(t,e,r,i){var n=r?"":i.css;if(t.styleSheet)t.styleSheet.cssText=x(e,n);else{var s=document.createTextNode(n),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(s,o[e]):t.appendChild(s)}}function u(t,e){var r=e.css,i=e.media,n=e.sourceMap;if(i&&t.setAttribute("media",i),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var d={},f=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=f(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,g=0,v=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var r=n(t);return i(r,e),function(t){for(var s=[],o=0;o<r.length;o++){var a=r[o],c=d[a.id];c.refs--,s.push(c)}if(t){var l=n(t);i(l,e)}for(var o=0;o<s.length;o++){var c=s[o];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete d[c.id]}}}};var x=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e,r){var i=r(2);"string"==typeof i&&(i=[[t.id,i,""]]);r(6)(i,{});i.locals&&(t.exports=i.locals)}])}); | ||
//# sourceMappingURL=build.min.js.map |
{ | ||
"name": "vue-radial-progress", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "A radial progress bar component for Vue.js", | ||
@@ -15,5 +15,2 @@ "main": "src/main.js", | ||
}, | ||
"dependencies": { | ||
"vue": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -20,0 +17,0 @@ "babel-core": "^6.0.0", |
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
0
84933
12
- Removedvue@^1.0.0
- Removedacorn@5.7.4(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedast-types@0.9.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase62@1.2.8(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetective@4.7.1(transitive)
- Removedenvify@3.4.1(transitive)
- Removedesprima@3.1.3(transitive)
- Removedesprima-fb@15001.1.0-dev-harmony-fb(transitive)
- Removedglob@5.0.15(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjstransform@11.0.3(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedobject-assign@2.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedprivate@0.1.8(transitive)
- Removedq@1.5.1(transitive)
- Removedrecast@0.11.23(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsource-map@0.4.40.5.7(transitive)
- Removedthrough@2.3.8(transitive)
- Removedvue@1.0.28(transitive)
- Removedwrappy@1.0.2(transitive)