UNPKG

ngx-lottie

Version:

<table> <thead> <tr> <th>ngx-lottie</th> <th>Angular</th> </tr> </thead> <tbody> <tr> <td> 7.x </td> <td> >= 8 < 13 </td> </tr> <tr> <td> 8.x </td> <td> 13 </td> </tr> <tr> <td> 9.x </td> <td> 14 </td> </tr> <tr> <td> 10.x </td> <td> 15 </td> </tr> <tr> <

69 lines (68 loc) 3.36 kB
import { SimpleChanges, OnDestroy } from '@angular/core'; import { Observable } from 'rxjs'; import { AnimationOptions, BMCompleteEvent, BMCompleteLoopEvent, BMEnterFrameEvent, BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent } from './symbols'; import * as i0 from "@angular/core"; export declare class BaseDirective implements OnDestroy { options: import("@angular/core").InputSignal<AnimationOptions | null>; containerClass: import("@angular/core").InputSignal<string | null>; styles: import("@angular/core").InputSignal<Partial<CSSStyleDeclaration> | null>; /** * `animationCreated` is dispatched after calling `loadAnimation`. */ readonly animationCreated: Observable<import("lottie-web").AnimationItem>; /** * `complete` is dispatched after completing the last frame. */ readonly complete: Observable<BMCompleteEvent>; /** * `loopComplete` is dispatched after completing the frame loop. */ readonly loopComplete: Observable<BMCompleteLoopEvent>; /** * `enterFrame` is dispatched after entering the new frame. */ readonly enterFrame: Observable<BMEnterFrameEvent>; /** * `segmentStart` is dispatched when the new segment is adjusted. */ readonly segmentStart: Observable<BMSegmentStartEvent>; /** * Original event name is `config_ready`. `config_ready` is dispatched * after the needed renderer is configured. */ readonly configReady: Observable<void>; /** * Original event name is `data_ready`. `data_ready` is dispatched * when all parts of the animation have been loaded. */ readonly dataReady: Observable<void>; /** * Original event name is `DOMLoaded`. `DOMLoaded` is dispatched * when elements have been added to the DOM. */ readonly domLoaded: Observable<void>; /** * `destroy` will be dispatched when the component gets destroyed, * it's handy for releasing resources. */ readonly destroy: Observable<BMDestroyEvent>; /** * `error` will be dispatched if the Lottie player could not render * some frame or parse config. */ readonly error: Observable<BMRenderFrameErrorEvent | BMConfigErrorEvent>; private ngZone; private isBrowser; private animationLoader; private loadAnimation$; private animationItem$; constructor(); ngOnDestroy(): void; protected loadAnimation(changes: SimpleChanges, container: HTMLElement): void; private getAnimationItem; private awaitAnimationItemAndStartListening; private setupLoadAnimationListener; private destroyAnimation; static ɵfac: i0.ɵɵFactoryDeclaration<BaseDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<BaseDirective, "[lottie]", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "containerClass": { "alias": "containerClass"; "required": false; "isSignal": true; }; "styles": { "alias": "styles"; "required": false; "isSignal": true; }; }, { "animationCreated": "animationCreated"; "complete": "complete"; "loopComplete": "loopComplete"; "enterFrame": "enterFrame"; "segmentStart": "segmentStart"; "configReady": "configReady"; "dataReady": "dataReady"; "domLoaded": "domLoaded"; "destroy": "destroy"; "error": "error"; }, never, never, true, never>; }