Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-progressbar

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-progressbar - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

CHANGELOG.md

@@ -1,2 +0,2 @@

##1.0.2
##1.0.3

@@ -3,0 +3,0 @@ * **Improvement:** Uses `OnPush` change detection strategy on the outer component to improve performance.

@@ -1,2 +0,2 @@

"use strict";var __decorate=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},core_1=require("@angular/core"),ng_progress_service_1=require("../ng-progress.service"),Subject_1=require("rxjs/Subject"),NgProgressComponent=function(){function e(e){this.pService=e,this.minimum=.08,this.ease="linear",this.positionUsing="",this.speed=300,this.trickle=!0,this.trickleSpeed=300,this.showSpinner=!0,this.direction="leftToRightIncreased",this.status=!1,this.isActive=new Subject_1.Subject}return Object.defineProperty(e.prototype,"toggle",{set:function(e){e?this.start():this.done()},enumerable:!0,configurable:!0}),e.prototype.isStarted=function(){return!(1===this.status||!this.status)},e.prototype.ngOnInit=function(){var e=this;this.pService.onToggle.subscribe(function(t){e.toggle=t}),this.pService.onSet.subscribe(function(t){e.set(t)}),this.pService.onIncrement.subscribe(function(t){e.inc(t)})},e.prototype.ngOnDestroy=function(){this.pService.onIncrement.unsubscribe(),this.pService.onSet.unsubscribe(),this.pService.onToggle.unsubscribe()},e.prototype.set=function(e){var t=this;this.status=clamp(e,+this.minimum,1),1===e?setTimeout(function(){t.isActive.next(!1)},this.speed):this.isActive.next(!0)},e.prototype.start=function(){var e=this;this.isStarted()||this.set(0);var t=function(){setTimeout(function(){e.isStarted()&&(e.inc(),t())},e.trickleSpeed)};if(this.trickle&&t(),this.pService.colors){var o=this.pService.colors,i=function(){setTimeout(function(){e.isStarted()&&(e.color=o[Math.floor(Math.random()*o.length)],i())},e.pService.colorsInterval)};i()}},e.prototype.done=function(){this.set(1)},e.prototype.inc=function(e){var t=this.status;if(t){if(t>=1)return;("number"!=typeof e||e>=1)&&(e=t>=0&&t<.25?(3*Math.random()+3)/100:t>=.25&&t<.65?3*Math.random()/100:t>=.65&&t<.9?2*Math.random()/100:t>=.9&&t<.99?.005:0),t=clamp(t+e,0,.994),this.set(t)}else this.start()},__decorate([core_1.Input(),__metadata("design:type",Object),__metadata("design:paramtypes",[Object])],e.prototype,"toggle",null),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"minimum",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"ease",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"positionUsing",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"speed",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"trickle",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"trickleSpeed",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"showSpinner",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"direction",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"color",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"thick",void 0),e=__decorate([core_1.Component({selector:"ng-progress",template:'\n <ng-progress-bar [@progressState] style="position:absolute" *ngIf="isActive" [value]="status" [positionUsing]="positionUsing"\n [ease]="ease" [speed]="speed" [showSpinner]="showSpinner" [direction]="direction"\n [color]="color" [thick]="thick"></ng-progress-bar>\n ',changeDetection:core_1.ChangeDetectionStrategy.OnPush,animations:[core_1.trigger("progressState",[core_1.state("",core_1.style({opacity:1})),core_1.transition("void => *",[core_1.style({opacity:0}),core_1.animate("0.4s ease-in")]),core_1.transition("* => void",[core_1.animate("0.4s ease-out",core_1.style({opacity:0}))])])]}),__metadata("design:paramtypes",[ng_progress_service_1.NgProgressService])],e)}();exports.NgProgressComponent=NgProgressComponent;var clamp=function(e,t,o){return e<t?t:e>o?o:e};
"use strict";var __decorate=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},core_1=require("@angular/core"),ng_progress_service_1=require("../ng-progress.service"),Subject_1=require("rxjs/Subject"),NgProgressComponent=function(){function e(e){this.pService=e,this.minimum=.08,this.ease="linear",this.positionUsing="",this.speed=300,this.trickle=!0,this.trickleSpeed=300,this.showSpinner=!0,this.direction="leftToRightIncreased",this.status=!1,this.isActive=new Subject_1.Subject}return Object.defineProperty(e.prototype,"toggle",{set:function(e){e?this.start():this.done()},enumerable:!0,configurable:!0}),e.prototype.isStarted=function(){return!(1===this.status||!this.status)},e.prototype.ngOnInit=function(){var e=this;this.pService.onToggle.subscribe(function(t){e.toggle=t}),this.pService.onSet.subscribe(function(t){e.set(t)}),this.pService.onIncrement.subscribe(function(t){e.inc(t)})},e.prototype.ngOnDestroy=function(){this.pService.onIncrement.unsubscribe(),this.pService.onSet.unsubscribe(),this.pService.onToggle.unsubscribe()},e.prototype.set=function(e){var t=this;this.status=clamp(e,+this.minimum,1),1===e?setTimeout(function(){t.isActive.next(!1)},this.speed):this.isActive.next(!0)},e.prototype.start=function(){var e=this;this.isStarted()||this.set(0);var t=function(){setTimeout(function(){e.isStarted()&&(e.inc(),t())},e.trickleSpeed)};if(this.trickle&&t(),this.pService.colors){var o=this.pService.colors,i=function(){setTimeout(function(){e.isStarted()&&(e.color=o[Math.floor(Math.random()*o.length)],i())},e.pService.colorsInterval)};i()}},e.prototype.done=function(){this.set(1)},e.prototype.inc=function(e){var t=this.status;if(t){if(t>=1)return;("number"!=typeof e||e>=1)&&(e=t>=0&&t<.25?(3*Math.random()+3)/100:t>=.25&&t<.65?3*Math.random()/100:t>=.65&&t<.9?2*Math.random()/100:t>=.9&&t<.99?.005:0),t=clamp(t+e,0,.994),this.set(t)}else this.start()},__decorate([core_1.Input(),__metadata("design:type",Object),__metadata("design:paramtypes",[Object])],e.prototype,"toggle",null),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"minimum",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"ease",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"positionUsing",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"speed",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"trickle",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"trickleSpeed",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"showSpinner",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"direction",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"color",void 0),__decorate([core_1.Input(),__metadata("design:type",Object)],e.prototype,"thick",void 0),e=__decorate([core_1.Component({selector:"ng-progress",template:'\n <ng-progress-bar [@progressState] style="position:absolute" *ngIf="isActive | async" [value]="status" [positionUsing]="positionUsing"\n [ease]="ease" [speed]="speed" [showSpinner]="showSpinner" [direction]="direction"\n [color]="color" [thick]="thick"></ng-progress-bar>\n ',changeDetection:core_1.ChangeDetectionStrategy.OnPush,animations:[core_1.trigger("progressState",[core_1.state("",core_1.style({opacity:1})),core_1.transition("void => *",[core_1.style({opacity:0}),core_1.animate("0.4s ease-in")]),core_1.transition("* => void",[core_1.animate("0.4s ease-out",core_1.style({opacity:0}))])])]}),__metadata("design:paramtypes",[ng_progress_service_1.NgProgressService])],e)}();exports.NgProgressComponent=NgProgressComponent;var clamp=function(e,t,o){return e<t?t:e>o?o:e};
//# sourceMappingURL=ng-progress.component.js.map
{
"name": "ng2-progressbar",
"version": "1.0.2",
"version": "1.0.3",
"description": "A slim customizable progressbar for angular2",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc