UNPKG

@foblex/flow-animator

Version:
52 lines (51 loc) 2.56 kB
import { AnimationBuilder } from '@angular/animations'; import { Observable } from 'rxjs'; import { IFAnimationResult } from './i-f-animation-result'; import { IFAnimationConfiguration } from './i-f-animation-configuration'; import * as i0 from "@angular/core"; /** * Service for animating elements in the @foblex/flow-animator library. * This service handles the orchestration of animations for elements. */ export declare class FFlowAnimatorService { private animationBuilder; private document; /** * Creates an instance of FFlowAnimatorService. * @param {AnimationBuilder} animationBuilder - The AnimationBuilder service for creating animations. * @param {Document} document - The DOM Document object to interact with the DOM. */ constructor(animationBuilder: AnimationBuilder, document: Document); /** * Initiates the animation process for the specified flow. * @param {any} flowId - The identifier of the flow to be animated. * @param {IFAnimationConfiguration} configuration - The configuration settings for the animation. * @return {Observable<IFAnimationResult>} An Observable that emits the result of the animation process. */ animate(flowId: any, configuration: IFAnimationConfiguration): Observable<IFAnimationResult>; /** * Animates elements sequentially according to the provided configuration. * @private * @param {IFElementToAnimate[][]} rows - A two-dimensional array of elements to animate in sequence. * @param {IFAnimationConfiguration} configuration - The configuration settings for the animation. * @param {Subscriber<IFAnimationResult>} observer - The observer to emit the results to. */ private animateSequentially; /** * Animates an individual element. * @private * @param {(HTMLElement | SVGPathElement)} element - The element to be animated. * @param {number} duration - The duration of the animation in milliseconds. * @return {Observable<HTMLElement | SVGPathElement>} An Observable that emits the animated element. */ private animateElement; /** * Removes the specified elements from the DOM. * @private * @param {(HTMLElement | SVGPathElement)[]} toRemove - The elements to be removed. * @return {(HTMLElement | SVGPathElement)[]} An array of the removed elements. */ private removeCreatedElements; static ɵfac: i0.ɵɵFactoryDeclaration<FFlowAnimatorService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<FFlowAnimatorService>; }