ng-http-loader
Version:
[](https://github.com/mpalourdio/ng-http-loader/actions/workflows/main.yml) [ • 7.99 kB
TypeScript
import * as i0 from '@angular/core';
import { OnInit, Signal, Type } from '@angular/core';
import { Observable, ReplaySubject } from 'rxjs';
import { HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
declare abstract class AbstractLoaderDirective {
readonly backgroundColor: i0.InputSignal<string | undefined>;
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractLoaderDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractLoaderDirective, never, never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
declare class SkChasingDotsComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkChasingDotsComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkChasingDotsComponent, "sk-chasing-dots", never, {}, {}, never, never, true, never>;
}
declare class SkCubeGridComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkCubeGridComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkCubeGridComponent, "sk-cube-grid", never, {}, {}, never, never, true, never>;
}
declare class SkDoubleBounceComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkDoubleBounceComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkDoubleBounceComponent, "sk-double-bounce", never, {}, {}, never, never, true, never>;
}
declare class SkRotatingPlaneComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkRotatingPlaneComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkRotatingPlaneComponent, "sk-rotating-plane", never, {}, {}, never, never, true, never>;
}
declare class SkSpinnerPulseComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkSpinnerPulseComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkSpinnerPulseComponent, "sk-spinner-pulse", never, {}, {}, never, never, true, never>;
}
declare class SkThreeBounceComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkThreeBounceComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkThreeBounceComponent, "sk-three-bounce", never, {}, {}, never, never, true, never>;
}
declare class SkWanderingCubesComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkWanderingCubesComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkWanderingCubesComponent, "sk-wandering-cubes", never, {}, {}, never, never, true, never>;
}
declare class SkWaveComponent extends AbstractLoaderDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<SkWaveComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SkWaveComponent, "sk-wave", never, {}, {}, never, never, true, never>;
}
declare class PendingRequestsInterceptorConfigurer {
private _pendingRequests;
private _pendingRequestsStatus$;
private _filteredUrlPatterns;
private _filteredMethods;
private _filteredHeaders;
private _forceByPass;
get pendingRequestsStatus$(): Observable<boolean>;
get pendingRequestsStatusSubject$(): ReplaySubject<boolean>;
get pendingRequests(): number;
set pendingRequests(pendingRequests: number);
get filteredUrlPatterns(): RegExp[];
set filteredMethods(httpMethods: string[]);
set filteredHeaders(value: string[]);
set forceByPass(value: boolean);
shouldBypassUrl(url: string): boolean;
shouldBypassMethod(req: HttpRequest<unknown>): boolean;
shouldBypassHeader(req: HttpRequest<unknown>): boolean;
shouldBypass(req: HttpRequest<unknown>): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<PendingRequestsInterceptorConfigurer, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<PendingRequestsInterceptorConfigurer>;
}
declare class SpinnerVisibilityService {
private pendingRequestsInterceptorConfigurer;
private _visibility$;
constructor(pendingRequestsInterceptorConfigurer: PendingRequestsInterceptorConfigurer);
get visibility$(): Observable<boolean>;
show(): void;
hide(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SpinnerVisibilityService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SpinnerVisibilityService>;
}
declare class NgHttpLoaderComponent implements OnInit {
private pendingRequestsInterceptorConfigurer;
private spinnerVisibility;
spinkit: {
skChasingDots: string;
skCubeGrid: string;
skDoubleBounce: string;
skRotatingPlane: string;
skSpinnerPulse: string;
skThreeBounce: string;
skWanderingCubes: string;
skWave: string;
};
isVisible$: Observable<boolean>;
isVisible: Signal<boolean | undefined>;
visibleUntil: number;
readonly backdrop: i0.InputSignal<boolean>;
readonly backgroundColor: i0.InputSignal<string | undefined>;
readonly debounceDelay: i0.InputSignal<number>;
readonly entryComponent: i0.InputSignal<Type<unknown> | null>;
readonly extraDuration: i0.InputSignal<number>;
readonly filteredHeaders: i0.InputSignal<string[]>;
readonly filteredMethods: i0.InputSignal<string[]>;
readonly filteredUrlPatterns: i0.InputSignal<string[]>;
readonly minDuration: i0.InputSignal<number>;
readonly opacity: i0.InputSignal<string>;
readonly backdropBackgroundColor: i0.InputSignal<string>;
readonly spinner: i0.ModelSignal<string | null>;
constructor(pendingRequestsInterceptorConfigurer: PendingRequestsInterceptorConfigurer, spinnerVisibility: SpinnerVisibilityService);
ngOnInit(): void;
private nullifySpinnerIfEntryComponentIsDefined;
private initFilters;
private initFilteredUrlPatterns;
private initFilteredMethods;
private initFilteredHeaders;
private updateExpirationDelay;
private getVisibilityTimer$;
static ɵfac: i0.ɵɵFactoryDeclaration<NgHttpLoaderComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgHttpLoaderComponent, "ng-http-loader", never, { "backdrop": { "alias": "backdrop"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "debounceDelay": { "alias": "debounceDelay"; "required": false; "isSignal": true; }; "entryComponent": { "alias": "entryComponent"; "required": false; "isSignal": true; }; "extraDuration": { "alias": "extraDuration"; "required": false; "isSignal": true; }; "filteredHeaders": { "alias": "filteredHeaders"; "required": false; "isSignal": true; }; "filteredMethods": { "alias": "filteredMethods"; "required": false; "isSignal": true; }; "filteredUrlPatterns": { "alias": "filteredUrlPatterns"; "required": false; "isSignal": true; }; "minDuration": { "alias": "minDuration"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "backdropBackgroundColor": { "alias": "backdropBackgroundColor"; "required": false; "isSignal": true; }; "spinner": { "alias": "spinner"; "required": false; "isSignal": true; }; }, { "spinner": "spinnerChange"; }, never, never, true, never>;
}
declare function pendingRequestsInterceptor$(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
declare const Spinkit: {
skChasingDots: string;
skCubeGrid: string;
skDoubleBounce: string;
skRotatingPlane: string;
skSpinnerPulse: string;
skThreeBounce: string;
skWanderingCubes: string;
skWave: string;
};
declare const SPINKIT_COMPONENTS: (typeof SkChasingDotsComponent)[];
export { AbstractLoaderDirective, NgHttpLoaderComponent, PendingRequestsInterceptorConfigurer, SPINKIT_COMPONENTS, SkChasingDotsComponent, SkCubeGridComponent, SkDoubleBounceComponent, SkRotatingPlaneComponent, SkSpinnerPulseComponent, SkThreeBounceComponent, SkWanderingCubesComponent, SkWaveComponent, Spinkit, SpinnerVisibilityService, pendingRequestsInterceptor$ };