ngx-ui-loader
Version:
An all-in-one and fully customizable loader/spinner for Angular applications. It supports foreground, background spinner/loader, indicative progress bar and multiple loaders.
83 lines (82 loc) • 4.11 kB
TypeScript
import { OnInit, OnChanges, SimpleChanges, OnDestroy, ChangeDetectorRef, TemplateRef } from '@angular/core';
import { DomSanitizer, SafeResourceUrl, SafeStyle } from '@angular/platform-browser';
import { NgxUiLoaderService } from './ngx-ui-loader.service';
import { Subscription } from 'rxjs';
import { NgxUiLoaderConfig } from '../utils/interfaces';
import { DirectionType, PositionType, SpinnerType } from '../utils/types';
import * as i0 from "@angular/core";
export declare class NgxUiLoaderComponent implements OnChanges, OnDestroy, OnInit {
private domSanitizer;
private changeDetectorRef;
private ngxService;
bgsColor: string;
bgsOpacity: number;
bgsPosition: PositionType;
bgsSize: number;
bgsTemplate: TemplateRef<any>;
bgsType: SpinnerType;
fgsColor: string;
fgsPosition: PositionType;
fgsSize: number;
fgsTemplate: TemplateRef<any>;
fgsType: SpinnerType;
gap: number;
loaderId: string;
logoPosition: PositionType;
logoSize: number;
logoUrl: string;
overlayBorderRadius: string;
overlayColor: string;
pbColor: string;
pbDirection: DirectionType;
pbThickness: number;
hasProgressBar: boolean;
text: string;
textColor: string;
textPosition: PositionType;
fastFadeOut: boolean;
fgDivs: number[];
fgSpinnerClass: string;
bgDivs: number[];
bgSpinnerClass: string;
showForeground: boolean;
showBackground: boolean;
foregroundClosing: boolean;
backgroundClosing: boolean;
trustedLogoUrl: SafeResourceUrl;
logoTop: SafeStyle;
spinnerTop: SafeStyle;
textTop: SafeStyle;
showForegroundWatcher: Subscription;
showBackgroundWatcher: Subscription;
foregroundClosingWatcher: Subscription;
backgroundClosingWatcher: Subscription;
defaultConfig: NgxUiLoaderConfig;
initialized: boolean;
/**
* Constructor
*/
constructor(domSanitizer: DomSanitizer, changeDetectorRef: ChangeDetectorRef, ngxService: NgxUiLoaderService);
/**
* On init event
*/
ngOnInit(): void;
/**
* On changes event
*/
ngOnChanges(changes: SimpleChanges): void;
/**
* On destroy event
*/
ngOnDestroy(): void;
/**
* Initialize spinners
*/
private initializeSpinners;
/**
* Determine the positions of spinner, logo and text
*/
private determinePositions;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxUiLoaderComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxUiLoaderComponent, "ngx-ui-loader", never, { "bgsColor": { "alias": "bgsColor"; "required": false; }; "bgsOpacity": { "alias": "bgsOpacity"; "required": false; }; "bgsPosition": { "alias": "bgsPosition"; "required": false; }; "bgsSize": { "alias": "bgsSize"; "required": false; }; "bgsTemplate": { "alias": "bgsTemplate"; "required": false; }; "bgsType": { "alias": "bgsType"; "required": false; }; "fgsColor": { "alias": "fgsColor"; "required": false; }; "fgsPosition": { "alias": "fgsPosition"; "required": false; }; "fgsSize": { "alias": "fgsSize"; "required": false; }; "fgsTemplate": { "alias": "fgsTemplate"; "required": false; }; "fgsType": { "alias": "fgsType"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "loaderId": { "alias": "loaderId"; "required": false; }; "logoPosition": { "alias": "logoPosition"; "required": false; }; "logoSize": { "alias": "logoSize"; "required": false; }; "logoUrl": { "alias": "logoUrl"; "required": false; }; "overlayBorderRadius": { "alias": "overlayBorderRadius"; "required": false; }; "overlayColor": { "alias": "overlayColor"; "required": false; }; "pbColor": { "alias": "pbColor"; "required": false; }; "pbDirection": { "alias": "pbDirection"; "required": false; }; "pbThickness": { "alias": "pbThickness"; "required": false; }; "hasProgressBar": { "alias": "hasProgressBar"; "required": false; }; "text": { "alias": "text"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "textPosition": { "alias": "textPosition"; "required": false; }; }, {}, never, never, false, never>;
}