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> <

1 lines 28 kB
{"version":3,"file":"ngx-lottie.mjs","sources":["../../../../libs/ngx-lottie/src/lib/symbols.ts","../../../../libs/ngx-lottie/src/lib/animation-loader.ts","../../../../libs/ngx-lottie/src/lib/cacheable-animation-loader/cacheable-animation-loader.ts","../../../../libs/ngx-lottie/src/lib/providers.ts","../../../../libs/ngx-lottie/src/lib/base.directive.ts","../../../../libs/ngx-lottie/src/lib/lottie.directive.ts","../../../../libs/ngx-lottie/src/lib/lottie.component.ts","../../../../libs/ngx-lottie/src/lib/server.ts","../../../../libs/ngx-lottie/src/lib/transfer-state.ts","../../../../libs/ngx-lottie/src/ngx-lottie.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface BMEnterFrameEvent {\n type: 'enterFrame';\n currentTime: number;\n totalTime: number;\n duration: number;\n}\n\nexport interface BMCompleteLoopEvent {\n type: 'loopComplete';\n currentLoop: boolean | number;\n totalLoops: number;\n direction: number;\n}\n\nexport interface BMCompleteEvent {\n type: 'complete';\n direction: number;\n}\n\nexport interface BMSegmentStartEvent {\n type: 'segmentStart';\n firstFrame: number;\n totalFrames: number;\n}\n\nexport interface BMDestroyEvent {\n target: AnimationItem;\n type: 'destroy';\n}\n\nexport interface BMRenderFrameErrorEvent {\n type: 'renderFrameError';\n nativeError: Error;\n currentTime: number;\n}\n\nexport interface BMConfigErrorEvent {\n type: 'configError';\n nativeError: Error;\n}\n\nexport type LottieEvent =\n | BMEnterFrameEvent\n | BMCompleteLoopEvent\n | BMCompleteEvent\n | BMSegmentStartEvent\n | BMDestroyEvent\n | BMRenderFrameErrorEvent\n | BMConfigErrorEvent\n | void;\n\nexport type CamelizedAnimationEventName =\n | 'complete'\n | 'loopComplete'\n | 'enterFrame'\n | 'segmentStart'\n | 'configReady'\n | 'dataReady'\n | 'domLoaded'\n | 'destroy'\n | 'error';\n\nexport type EventsMap = { [key in CamelizedAnimationEventName]: AnimationEventName };\n\nexport type AnimationFilename = string;\nexport type AnimationEventName = import('lottie-web').AnimationEventName;\nexport type AnimationItem = import('lottie-web').AnimationItem;\nexport type LottiePlayer = typeof import('lottie-web').default;\n\n/**\n * @example\n * import player from 'lottie-web';\n * const factory = () => player;\n */\ntype LottiePlayerFactory = () => LottiePlayer;\n\n/**\n * @example\n * const factory = () => import('lottie-web');\n */\ntype LottieLoader = () => Promise<typeof import('lottie-web')>;\n\nexport type LottiePlayerFactoryOrLoader = LottiePlayerFactory | LottieLoader;\n\nexport interface LottieOptions {\n // Determines whether to load files on a separate worker. Note: workers cannot load\n // animations from URLs (if `options.path` is defined).\n useWebWorker?: boolean;\n player: LottiePlayerFactoryOrLoader;\n}\n\nexport type RendererType = import('lottie-web').RendererType;\n\nexport type AnimationConfigWithData<R extends RendererType = 'svg'> =\n import('lottie-web').AnimationConfigWithData<R>;\nexport type AnimationConfigWithPath<R extends RendererType = 'svg'> =\n import('lottie-web').AnimationConfigWithPath<R>;\n\nexport type AnimationOptions<R extends RendererType = 'svg'> =\n | Partial<AnimationConfigWithData<R>>\n | Partial<AnimationConfigWithPath<R>>;\n\nexport const LOTTIE_OPTIONS = new InjectionToken<LottieOptions>('LottieOptions');\n","import { Injectable, NgZone, inject, ɵisPromise } from '@angular/core';\n\nimport { Observable, from, of } from 'rxjs';\nimport { map, mergeMap, shareReplay, tap } from 'rxjs/operators';\n\nimport {\n LOTTIE_OPTIONS,\n LottiePlayer,\n AnimationItem,\n AnimationOptions,\n AnimationConfigWithData,\n AnimationConfigWithPath,\n} from './symbols';\n\nfunction convertPlayerOrLoaderToObservable(): Observable<LottiePlayer> {\n const ngZone = inject(NgZone);\n const { player, useWebWorker } = inject(LOTTIE_OPTIONS);\n const playerOrLoader = ngZone.runOutsideAngular(() => player());\n // We need to use `isPromise` instead of checking whether\n // `result instanceof Promise`. In zone.js patched environments, `global.Promise`\n // is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js\n // for certain reasons, might not work with `instanceof`. For instance, the dynamic\n // import `() => import('./chunk.js')` returns a native promise (not a `ZoneAwarePromise`),\n // causing this check to be falsy.\n const player$ = ɵisPromise(playerOrLoader)\n ? from(playerOrLoader).pipe(map(module => module.default || module))\n : of(playerOrLoader);\n\n return player$.pipe(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tap(player => (player as any).useWebWorker?.(useWebWorker)),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AnimationLoader {\n protected player$ = convertPlayerOrLoaderToObservable().pipe(\n mergeMap(player => raf$(this.ngZone).pipe(map(() => player))),\n );\n\n private ngZone = inject(NgZone);\n\n loadAnimation(\n options: AnimationConfigWithData | AnimationConfigWithPath,\n ): Observable<AnimationItem> {\n return this.player$.pipe(map(player => this.createAnimationItem(player, options)));\n }\n\n resolveOptions(\n options: AnimationOptions | null,\n container: HTMLElement,\n ): AnimationConfigWithData | AnimationConfigWithPath {\n return Object.assign(\n {\n container,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n },\n options,\n );\n }\n\n protected createAnimationItem(\n player: LottiePlayer,\n options: AnimationConfigWithData | AnimationConfigWithPath,\n ): AnimationItem {\n return this.ngZone.runOutsideAngular(() => player.loadAnimation(options));\n }\n}\n\nfunction raf$(ngZone: NgZone) {\n return new Observable<void>(subscriber => {\n const requestId = ngZone.runOutsideAngular(() =>\n requestAnimationFrame(() => {\n subscriber.next();\n subscriber.complete();\n }),\n );\n return () => cancelAnimationFrame(requestId);\n });\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { map } from 'rxjs/operators';\n\nimport { AnimationLoader } from '../animation-loader';\nimport { AnimationItem, AnimationConfigWithData, AnimationConfigWithPath } from '../symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class CacheableAnimationLoader extends AnimationLoader implements OnDestroy {\n private cache = new Map<string, string>();\n\n ngOnDestroy(): void {\n this.cache.clear();\n }\n\n loadAnimation(options: AnimationConfigWithData | AnimationConfigWithPath) {\n return this.player$.pipe(\n map(player => {\n const animationItem = this.createAnimationItem(player, this.transformOptions(options));\n this.awaitConfigAndCache(options, animationItem);\n return animationItem;\n }),\n );\n }\n\n private awaitConfigAndCache(\n options: AnimationConfigWithData | AnimationConfigWithPath,\n animationItem: AnimationItem,\n ): void {\n if (this.isAnimationConfigWithPath(options)) {\n // Don't wait for the `config_ready` event if it has been cached previously.\n if (this.cache.has(options.path!)) {\n return;\n }\n\n animationItem.addEventListener('config_ready', () => {\n // See the comments below on why we're storing the animation data as a string.\n this.cache.set(options.path!, JSON.stringify(animationItem['animationData']));\n });\n }\n }\n\n private transformOptions(\n options: AnimationConfigWithData | AnimationConfigWithPath,\n ): AnimationConfigWithData | AnimationConfigWithPath {\n if (this.isAnimationConfigWithPath(options) && this.cache.has(options.path!)) {\n return {\n ...options,\n path: undefined,\n // Caretaker note: `lottie-web` cannot re-use the `animationData` object between animations, and we\n // have to retrieve a new object each time an animation is created.\n // https://github.com/airbnb/lottie-web#html\n // See comments for the `animationData` property.\n animationData: JSON.parse(this.cache.get(options.path!)!),\n };\n } else {\n return options;\n }\n }\n\n private isAnimationConfigWithPath(\n options: Record<string, unknown>,\n ): options is AnimationConfigWithPath {\n return typeof options.path === 'string';\n }\n}\n","import { Provider } from '@angular/core';\n\nimport { AnimationLoader } from './animation-loader';\nimport { LottieOptions, LOTTIE_OPTIONS } from './symbols';\nimport { CacheableAnimationLoader } from './cacheable-animation-loader/cacheable-animation-loader';\n\nexport function provideCacheableAnimationLoader(): Provider[] {\n return [\n {\n provide: AnimationLoader,\n useExisting: CacheableAnimationLoader,\n },\n ];\n}\n\nexport function provideLottieOptions(options: LottieOptions): Provider[] {\n return [\n {\n provide: LOTTIE_OPTIONS,\n useValue: options,\n },\n ];\n}\n","import {\n Directive,\n Output,\n SimpleChanges,\n NgZone,\n inject,\n input,\n PLATFORM_ID,\n OnDestroy,\n} from '@angular/core';\n\nimport { Subject, BehaviorSubject, Observable, defer } from 'rxjs';\nimport { filter, switchMap } from 'rxjs/operators';\n\nimport {\n AnimationOptions,\n BMCompleteEvent,\n BMCompleteLoopEvent,\n BMEnterFrameEvent,\n BMSegmentStartEvent,\n BMDestroyEvent,\n BMRenderFrameErrorEvent,\n BMConfigErrorEvent,\n AnimationItem,\n AnimationEventName,\n} from './symbols';\nimport { AnimationLoader } from './animation-loader';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Directive({ selector: '[lottie]' })\nexport class BaseDirective implements OnDestroy {\n options = input<AnimationOptions | null>(null);\n\n containerClass = input<string | null>(null);\n\n styles = input<Partial<CSSStyleDeclaration> | null>(null);\n\n /**\n * `animationCreated` is dispatched after calling `loadAnimation`.\n */\n @Output() readonly animationCreated = this.getAnimationItem();\n\n /**\n * `complete` is dispatched after completing the last frame.\n */\n @Output() readonly complete =\n this.awaitAnimationItemAndStartListening<BMCompleteEvent>('complete');\n\n /**\n * `loopComplete` is dispatched after completing the frame loop.\n */\n @Output() readonly loopComplete =\n this.awaitAnimationItemAndStartListening<BMCompleteLoopEvent>('loopComplete');\n\n /**\n * `enterFrame` is dispatched after entering the new frame.\n */\n @Output() readonly enterFrame =\n this.awaitAnimationItemAndStartListening<BMEnterFrameEvent>('enterFrame');\n\n /**\n * `segmentStart` is dispatched when the new segment is adjusted.\n */\n @Output() readonly segmentStart =\n this.awaitAnimationItemAndStartListening<BMSegmentStartEvent>('segmentStart');\n\n /**\n * Original event name is `config_ready`. `config_ready` is dispatched\n * after the needed renderer is configured.\n */\n @Output() readonly configReady = this.awaitAnimationItemAndStartListening<void>('config_ready');\n\n /**\n * Original event name is `data_ready`. `data_ready` is dispatched\n * when all parts of the animation have been loaded.\n */\n @Output() readonly dataReady = this.awaitAnimationItemAndStartListening<void>('data_ready');\n\n /**\n * Original event name is `DOMLoaded`. `DOMLoaded` is dispatched\n * when elements have been added to the DOM.\n */\n @Output() readonly domLoaded = this.awaitAnimationItemAndStartListening<void>('DOMLoaded');\n\n /**\n * `destroy` will be dispatched when the component gets destroyed,\n * it's handy for releasing resources.\n */\n @Output() readonly destroy = this.awaitAnimationItemAndStartListening<BMDestroyEvent>('destroy');\n\n /**\n * `error` will be dispatched if the Lottie player could not render\n * some frame or parse config.\n */\n @Output() readonly error = this.awaitAnimationItemAndStartListening<\n BMRenderFrameErrorEvent | BMConfigErrorEvent\n >('error');\n\n private ngZone = inject(NgZone);\n private isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private animationLoader = inject(AnimationLoader);\n\n private loadAnimation$ = new Subject<[SimpleChanges, HTMLElement]>();\n private animationItem$ = new BehaviorSubject<AnimationItem | null>(null);\n\n constructor() {\n this.setupLoadAnimationListener();\n }\n\n ngOnDestroy(): void {\n this.destroyAnimation();\n this.loadAnimation$.complete();\n this.animationItem$.complete();\n }\n\n protected loadAnimation(changes: SimpleChanges, container: HTMLElement): void {\n this.ngZone.runOutsideAngular(() => this.loadAnimation$.next([changes, container]));\n }\n\n private getAnimationItem(): Observable<AnimationItem> {\n return defer(() => this.animationItem$).pipe(\n filter(\n (animationItem: AnimationItem | null): animationItem is AnimationItem =>\n animationItem !== null,\n ),\n );\n }\n\n private awaitAnimationItemAndStartListening<T>(name: AnimationEventName): Observable<T> {\n return this.getAnimationItem().pipe(\n switchMap(\n animationItem =>\n // `fromEvent` will try to call `removeEventListener` when `unsubscribe()` is invoked.\n // The problem is that `ngOnDestroy()` is called before Angular unsubscribes from\n // `@Output()` properties, thus `animationItem` will be `null` already, also `lottie-web`\n // removes event listeners when calling `destroy()`.\n new Observable<T>(observer => {\n this.ngZone.runOutsideAngular(() => {\n animationItem.addEventListener(name, event => {\n this.ngZone.runOutsideAngular(() => {\n observer.next(event as T);\n });\n });\n });\n }),\n ),\n );\n }\n\n private setupLoadAnimationListener(): void {\n const loadAnimation$ = this.loadAnimation$.pipe(\n filter(([changes]) => this.isBrowser && changes.options !== undefined),\n );\n\n loadAnimation$\n .pipe(\n switchMap(([changes, container]) => {\n this.destroyAnimation();\n return this.animationLoader.loadAnimation(\n this.animationLoader.resolveOptions(changes.options.currentValue, container),\n );\n }),\n )\n .subscribe(animationItem => {\n this.ngZone.run(() => this.animationItem$.next(animationItem));\n });\n }\n\n private destroyAnimation(): void {\n const animationItem = this.animationItem$.getValue();\n // The `ng-lottie` component or the `lottie` directive can be destroyed\n // before the `animationItem` is set, thus it will fail with\n // `Cannot read property 'destroy' of null`.\n // Potentially it can happen if the directive gets destroyed before change\n // detection is run.\n if (animationItem === null) {\n return;\n }\n\n // `destroy()` will remove all events listeners.\n animationItem.destroy();\n this.animationItem$.next(null);\n }\n}\n","import { Directive, ElementRef, OnChanges, SimpleChanges, inject } from '@angular/core';\n\nimport { BaseDirective } from './base.directive';\n\n@Directive({ selector: '[lottie]', standalone: true })\nexport class LottieDirective extends BaseDirective implements OnChanges {\n private host = inject(ElementRef);\n\n ngOnChanges(changes: SimpleChanges): void {\n super.loadAnimation(changes, this.host.nativeElement);\n }\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n ElementRef,\n ViewChild,\n OnChanges,\n SimpleChanges,\n input,\n} from '@angular/core';\nimport { NgClass, NgStyle } from '@angular/common';\n\nimport { BaseDirective } from './base.directive';\n\n@Component({\n selector: 'ng-lottie',\n template: `\n <div\n #container\n [style.width]=\"width() || '100%'\"\n [style.height]=\"height() || '100%'\"\n [ngStyle]=\"styles()\"\n [ngClass]=\"containerClass()\"\n ></div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgStyle, NgClass],\n})\nexport class LottieComponent extends BaseDirective implements OnChanges {\n width = input<string | null>(null);\n height = input<string | null>(null);\n\n @ViewChild('container', { static: true }) container: ElementRef<HTMLElement> = null!;\n\n ngOnChanges(changes: SimpleChanges): void {\n super.loadAnimation(changes, this.container.nativeElement);\n }\n}\n","import { AnimationFilename } from './symbols';\n\nexport function transformAnimationFilenameToKey(animation: AnimationFilename): string {\n const [animationName] = animation.split('.json');\n return `animation-${animationName}`;\n}\n","import { Injectable, makeStateKey, TransferState } from '@angular/core';\n\nimport { AnimationFilename } from './symbols';\nimport { transformAnimationFilenameToKey } from './server';\n\n@Injectable({ providedIn: 'root' })\nexport class LottieTransferState {\n constructor(private transferState: TransferState) {}\n\n get<T>(animation: AnimationFilename): T | null {\n const animationKey = transformAnimationFilenameToKey(animation);\n const stateKey = makeStateKey<T>(animationKey);\n return this.transferState.get(stateKey, null);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵisPromise"],"mappings":";;;;;;MAwGa,cAAc,GAAG,IAAI,cAAc,CAAgB,eAAe;;AC1F/E,SAAS,iCAAiC,GAAA;AACxC,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC;AACvD,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,MAAM,MAAM,EAAE,CAAC;;;;;;;AAO/D,IAAA,MAAM,OAAO,GAAGA,UAAU,CAAC,cAAc;UACrC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC;AACnE,UAAE,EAAE,CAAC,cAAc,CAAC;IAEtB,OAAO,OAAO,CAAC,IAAI;;IAEjB,GAAG,CAAC,MAAM,IAAK,MAAc,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC,EAC3D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAC/C;AACH;MAGa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEY,QAAA,IAAA,CAAA,OAAO,GAA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