import { OnInit, OnDestroy } from '@angular/core'; import { ViewContainerRef, TemplateRef } from '@angular/core'; import { LoadingType, LoadingMode, LoadingStrategy } from '../loading.component'; import { AtLoadingService } from '../services/loading.service'; /** * Context class for variable reference */ export declare class AtLoadingContext { $implicit: any; atLoading: any; } export declare class AtLoadingDirective implements OnInit, OnDestroy { private _viewContainerRef; private _templateRef; private _loadingService; private _context; private _type; private _mode; private _strategy; private _name; private _loadingRef; /** * atLoading: string * Name reference of the loading mask, used to register/resolve requests to the mask. */ name: string; /** * atLoadingUntil?: any * If its null, undefined or false it will be used to register requests to the mask. * Else if its any value that can be resolved as true, it will resolve the mask. * [name] is optional when using [until], but can still be used to register/resolve it manually. */ until: any; /** * atLoadingType?: LoadingType or ['linear' | 'circular'] * Sets the type of loading mask depending on value. * Defaults to [LoadingType.Circular | 'circular']. */ type: LoadingType; /** * atLoadingMode?: LoadingMode or ['determinate' | 'indeterminate'] * Sets the mode of loading mask depending on value. * Defaults to [LoadingMode.Indeterminate | 'indeterminate']. */ mode: LoadingMode; /** * atLoadingStrategy?: LoadingStrategy or ['replace' | 'overlay'] * Sets the strategy of loading mask depending on value. * Defaults to [LoadingMode.Replace | 'replace']. */ strategy: LoadingStrategy; /** * atLoadingColor?: "primary" | "accent" | "warn" * Sets the theme color of the loading component. Defaults to "primary" */ color: 'primary' | 'accent' | 'warn'; constructor(_viewContainerRef: ViewContainerRef, _templateRef: TemplateRef, _loadingService: AtLoadingService); /** * Registers component in the DOM, so it will be available when calling resolve/register. */ ngOnInit(): void; /** * Remove component when directive is destroyed. */ ngOnDestroy(): void; /** * Creates [AtLoadingComponent] and attaches it to this directive's [ViewContainerRef]. * Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`. */ private _registerComponent(); }