@ngx-loading-bar/core
Advanced tools
Comparing version 1.0.0-alpha.11 to 1.0.0-alpha.12
import { Component, Injectable, Input, NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { Subject as Subject$1 } from 'rxjs/Subject'; | ||
import { share as share$1 } from 'rxjs/operator/share'; | ||
var LoadingBarService = /** @class */ (function () { | ||
@@ -32,37 +31,4 @@ function LoadingBarService() { | ||
/** | ||
* @param {?=} source$ | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.startLoading = function (source$) { | ||
console.warn("LoadingBarService: 'startLoading' is deprecated and will removed in the next version use 'start' instead."); | ||
this.start(); | ||
if (source$) { | ||
console.warn("LoadingBarService: passing 'source$' to 'startLoading' is deprecated and will removed in the next version."); | ||
source$ = share$1.call(source$); | ||
source$.subscribe(this.getLoadingObserver()); | ||
return source$; | ||
} | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.endLoading = function () { | ||
console.warn("LoadingBarService: 'endLoading' is deprecated and will removed in the next version use 'complete' instead."); | ||
this.complete(); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.getLoadingObserver = function () { | ||
var _this = this; | ||
console.warn("LoadingBarService: 'getLoadingObserver' is deprecated and will removed in the next version."); | ||
return { | ||
next: function (x) { return x; }, | ||
error: function (err) { return _this.complete(); }, | ||
complete: function () { return _this.complete(); }, | ||
}; | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.ngOnDestroy = function () { | ||
@@ -69,0 +35,0 @@ this.pending.complete(); |
import { Component, Injectable, Input, NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { Subject as Subject$1 } from 'rxjs/Subject'; | ||
import { share as share$1 } from 'rxjs/operator/share'; | ||
@@ -33,36 +32,4 @@ class LoadingBarService { | ||
/** | ||
* @param {?=} source$ | ||
* @return {?} | ||
*/ | ||
startLoading(source$) { | ||
console.warn(`LoadingBarService: 'startLoading' is deprecated and will removed in the next version use 'start' instead.`); | ||
this.start(); | ||
if (source$) { | ||
console.warn(`LoadingBarService: passing 'source$' to 'startLoading' is deprecated and will removed in the next version.`); | ||
source$ = share$1.call(source$); | ||
source$.subscribe(this.getLoadingObserver()); | ||
return source$; | ||
} | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
endLoading() { | ||
console.warn(`LoadingBarService: 'endLoading' is deprecated and will removed in the next version use 'complete' instead.`); | ||
this.complete(); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
getLoadingObserver() { | ||
console.warn(`LoadingBarService: 'getLoadingObserver' is deprecated and will removed in the next version.`); | ||
return { | ||
next: (x) => x, | ||
error: (err) => this.complete(), | ||
complete: () => this.complete(), | ||
}; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ngOnDestroy() { | ||
@@ -69,0 +36,0 @@ this.pending.complete(); |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs/Subject'), require('rxjs/operator/share')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', 'rxjs/Subject', 'rxjs/operator/share'], factory) : | ||
(factory((global.core = {}),global.ng.core,global.ng.common,global.Rx,global.Rx.Observable.prototype)); | ||
}(this, (function (exports,core,common,Subject,share) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs/Subject')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', 'rxjs/Subject'], factory) : | ||
(factory((global.core = {}),global.ng.core,global.ng.common,global.Rx)); | ||
}(this, (function (exports,core,common,Subject) { 'use strict'; | ||
@@ -34,37 +34,4 @@ var LoadingBarService = /** @class */ (function () { | ||
/** | ||
* @param {?=} source$ | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.startLoading = function (source$) { | ||
console.warn("LoadingBarService: 'startLoading' is deprecated and will removed in the next version use 'start' instead."); | ||
this.start(); | ||
if (source$) { | ||
console.warn("LoadingBarService: passing 'source$' to 'startLoading' is deprecated and will removed in the next version."); | ||
source$ = share.share.call(source$); | ||
source$.subscribe(this.getLoadingObserver()); | ||
return source$; | ||
} | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.endLoading = function () { | ||
console.warn("LoadingBarService: 'endLoading' is deprecated and will removed in the next version use 'complete' instead."); | ||
this.complete(); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.getLoadingObserver = function () { | ||
var _this = this; | ||
console.warn("LoadingBarService: 'getLoadingObserver' is deprecated and will removed in the next version."); | ||
return { | ||
next: function (x) { return x; }, | ||
error: function (err) { return _this.complete(); }, | ||
complete: function () { return _this.complete(); }, | ||
}; | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
LoadingBarService.prototype.ngOnDestroy = function () { | ||
@@ -71,0 +38,0 @@ this.pending.complete(); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"LoadingBarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"LoadingBarComponent"}],"exports":[{"__symbolic":"reference","name":"LoadingBarComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"LoadingBarModule"},"providers":[{"__symbolic":"reference","name":"LoadingBarService"}]}}}},"LoadingBarService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"start":[{"__symbolic":"method"}],"complete":[{"__symbolic":"method"}],"startLoading":[{"__symbolic":"method"}],"endLoading":[{"__symbolic":"method"}],"getLoadingObserver":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"LoadingBarComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-loading-bar, ngx-loading-bar","template":"\n <ng-container *ngIf=\"started\">\n <div id=\"loading-bar-spinner\" *ngIf=\"includeSpinner\"><div class=\"spinner-icon\"></div></div>\n <div id=\"loading-bar\"><div class=\"bar\" [style.width]=\"progressWidth\"><div class=\"peg\"></div></div></div>\n </ng-container>\n "}]}],"members":{"includeSpinner":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LoadingBarService"}]}],"start":[{"__symbolic":"method"}],"set":[{"__symbolic":"method"}],"complete":[{"__symbolic":"method"}],"inc":[{"__symbolic":"method"}]}}},"origins":{"LoadingBarModule":"./core.module","LoadingBarService":"./loading-bar.service","LoadingBarComponent":"./loading-bar.component"},"importAs":"@ngx-loading-bar/core"} | ||
{"__symbolic":"module","version":3,"metadata":{"LoadingBarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"LoadingBarComponent"}],"exports":[{"__symbolic":"reference","name":"LoadingBarComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"LoadingBarModule"},"providers":[{"__symbolic":"reference","name":"LoadingBarService"}]}}}},"LoadingBarService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"start":[{"__symbolic":"method"}],"complete":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"LoadingBarComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-loading-bar, ngx-loading-bar","template":"\n <ng-container *ngIf=\"started\">\n <div id=\"loading-bar-spinner\" *ngIf=\"includeSpinner\"><div class=\"spinner-icon\"></div></div>\n <div id=\"loading-bar\"><div class=\"bar\" [style.width]=\"progressWidth\"><div class=\"peg\"></div></div></div>\n </ng-container>\n "}]}],"members":{"includeSpinner":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LoadingBarService"}]}],"start":[{"__symbolic":"method"}],"set":[{"__symbolic":"method"}],"complete":[{"__symbolic":"method"}],"inc":[{"__symbolic":"method"}]}}},"origins":{"LoadingBarModule":"./core.module","LoadingBarService":"./loading-bar.service","LoadingBarComponent":"./loading-bar.component"},"importAs":"@ngx-loading-bar/core"} |
import { OnDestroy } from '@angular/core'; | ||
import { Subject } from 'rxjs/Subject'; | ||
import { Observer } from 'rxjs/Observer'; | ||
import { Observable } from 'rxjs/Observable'; | ||
export interface LoadingBarStatus { | ||
@@ -15,6 +13,3 @@ started?: boolean; | ||
complete(): void; | ||
startLoading(source$?: Observable<any>): Observable<any>; | ||
endLoading(): void; | ||
getLoadingObserver(): Observer<any>; | ||
ngOnDestroy(): void; | ||
} |
{ | ||
"name": "@ngx-loading-bar/core", | ||
"version": "1.0.0-alpha.11", | ||
"description": "", | ||
"version": "1.0.0-alpha.12", | ||
"description": "Automatic page loading / progress bar for Angular", | ||
"keywords": [ | ||
"angular", | ||
"angular2", | ||
"ng", | ||
"ng2", | ||
"loading", | ||
"loadingbar", | ||
"progress", | ||
"progressbar" | ||
], | ||
"license": "MIT", | ||
@@ -6,0 +16,0 @@ "dependencies": { |
@@ -87,3 +87,3 @@ # @ngx-loading-bar/core | ||
// Start loading service | ||
this.loadingService.start(); | ||
this.loadingBar.start(); | ||
} | ||
@@ -102,6 +102,6 @@ | ||
this.loadingService.start(timer$); | ||
this.loadingBar.start(timer$); | ||
} | ||
} | ||
``` | ||
``` |
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
106
62264
716