UNPKG

@foblex/flow-animator

Version:
1 lines 25.7 kB
{"version":3,"file":"foblex-flow-animator.mjs","sources":["../../../projects/f-flow-animator/src/lib/create-connection-overlay/create-connection-overlay.handler.ts","../../../projects/f-flow-animator/src/lib/create-connection-overlay/create-connection-overlay-request.ts","../../../projects/f-flow-animator/src/lib/animate-connection-overlay/animate-connection-overlay.handler.ts","../../../projects/f-flow-animator/src/lib/animate-connection-overlay/animate-connection-overlay-request.ts","../../../projects/f-flow-animator/src/lib/create-node-overlay/create-node-overlay.handler.ts","../../../projects/f-flow-animator/src/lib/create-node-overlay/create-node-overlay-request.ts","../../../projects/f-flow-animator/src/lib/animate-node-overlay/animate-node-overlay.handler.ts","../../../projects/f-flow-animator/src/lib/animate-node-overlay/animate-node-overlay-request.ts","../../../projects/f-flow-animator/src/lib/animate-element/animate-element.handler.ts","../../../projects/f-flow-animator/src/lib/animate-element/animate-element-request.ts","../../../projects/f-flow-animator/src/lib/get-all-animated-elements/get-all-animated-elements-request.ts","../../../projects/f-flow-animator/src/lib/get-all-animated-elements/get-all-animated-elements.handler.ts","../../../projects/f-flow-animator/src/lib/f-flow-animator.service.ts","../../../projects/f-flow-animator/src/public-api.ts","../../../projects/f-flow-animator/src/foblex-flow-animator.ts"],"sourcesContent":["import { CreateConnectionOverlayRequest } from './create-connection-overlay-request';\n\nexport class CreateConnectionOverlayHandler {\n\n public handle(request: CreateConnectionOverlayRequest): SVGPathElement {\n const svgNS = \"http://www.w3.org/2000/svg\";\n const result = document.createElementNS(svgNS, 'path');\n result.classList.add('f-animation', 'f-animated-connection');\n result.setAttribute('d', request.element.getAttribute('d')!);\n\n const parentElement = request.element.parentElement!;\n parentElement.appendChild(result);\n\n return result;\n }\n}\n","export class CreateConnectionOverlayRequest {\n\n constructor(\n public readonly element: SVGPathElement,\n ) {\n }\n}\n","import { AnimateConnectionOverlayRequest } from './animate-connection-overlay-request';\nimport { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';\nimport { CreateConnectionOverlayHandler } from '../create-connection-overlay/create-connection-overlay.handler';\nimport { CreateConnectionOverlayRequest } from '../create-connection-overlay/create-connection-overlay-request';\nimport { Observable } from 'rxjs';\n\nexport class AnimateConnectionOverlayHandler {\n\n constructor(\n private animationBuilder: AnimationBuilder,\n ) {\n }\n\n public handle(request: AnimateConnectionOverlayRequest): Observable<SVGPathElement> {\n const overlayElement = new CreateConnectionOverlayHandler().handle(\n new CreateConnectionOverlayRequest(request.element)\n );\n\n const length = overlayElement.getTotalLength();\n overlayElement.style.strokeDasharray = length + ' ' + length;\n overlayElement.style.strokeDashoffset = String(length);\n\n const animation = this.animationBuilder.build([\n style({ strokeDashoffset: length }),\n animate(request.duration + 'ms', style({ strokeDashoffset: 0 }))\n ]);\n\n const player: AnimationPlayer = animation.create(overlayElement);\n\n return new Observable((observer) => {\n player.onDone(() => {\n observer.next(overlayElement);\n observer.complete();\n });\n player.play();\n });\n }\n}\n","export class AnimateConnectionOverlayRequest {\n\n constructor(\n public readonly element: SVGPathElement,\n public readonly duration: number,\n ) {\n }\n}\n","import { CreateNodeOverlayRequest } from './create-node-overlay-request';\n\nexport class CreateNodeOverlayHandler {\n\n public handle(request: CreateNodeOverlayRequest): HTMLElement {\n const result = document.createElement('div');\n result.classList.add('f-animation', 'f-animated-node');\n result.style.position = 'absolute';\n result.style.width = `${ request.element.clientWidth }px`;\n result.style.height = '0px';\n result.style.top = `0px`;\n result.style.left = `0px`;\n result.style.zIndex = '1';\n\n request.element.appendChild(result);\n\n return result;\n }\n}\n","export class CreateNodeOverlayRequest {\n\n constructor(\n public readonly element: HTMLElement,\n ) {\n }\n}\n","import { AnimateNodeOverlayRequest } from './animate-node-overlay-request';\nimport { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';\nimport { Observable } from 'rxjs';\nimport { CreateNodeOverlayHandler } from '../create-node-overlay/create-node-overlay.handler';\nimport { CreateNodeOverlayRequest } from '../create-node-overlay/create-node-overlay-request';\n\nexport class AnimateNodeOverlayHandler {\n\n constructor(\n private animationBuilder: AnimationBuilder,\n ) {\n }\n\n public handle(request: AnimateNodeOverlayRequest): Observable<HTMLElement> {\n const overlayElement = new CreateNodeOverlayHandler().handle(\n new CreateNodeOverlayRequest(request.element)\n );\n\n const animation = this.animationBuilder.build([\n style({ height: '0px' }),\n animate(request.duration + 'ms', style({ height: `${ request.element.offsetHeight }px` }))\n ]);\n\n const player: AnimationPlayer = animation.create(overlayElement);\n\n return new Observable((observer) => {\n player.onDone(() => {\n observer.next(overlayElement);\n observer.complete();\n });\n player.play();\n });\n }\n}\n","export class AnimateNodeOverlayRequest {\n\n constructor(\n public readonly element: HTMLElement,\n public readonly duration: number,\n ) {\n }\n}\n","import { AnimateElementRequest } from './animate-element-request';\nimport { AnimationBuilder } from '@angular/animations';\nimport { Observable } from 'rxjs';\nimport { AnimateConnectionOverlayHandler } from '../animate-connection-overlay/animate-connection-overlay.handler';\nimport { AnimateConnectionOverlayRequest } from '../animate-connection-overlay/animate-connection-overlay-request';\nimport { AnimateNodeOverlayHandler } from '../animate-node-overlay/animate-node-overlay.handler';\nimport { AnimateNodeOverlayRequest } from '../animate-node-overlay/animate-node-overlay-request';\n\n/**\n * Handler for processing animation requests for individual elements.\n */\nexport class AnimateElementHandler {\n\n /**\n * Creates an instance of AnimateElementHandler.\n * @param {AnimationBuilder} animationBuilder - The AnimationBuilder service for creating animations.\n */\n constructor(\n private animationBuilder: AnimationBuilder,\n ) {\n }\n\n /**\n * Handles the provided animation request and returns an Observable for the animation process.\n * @param {AnimateElementRequest} request - The animation request to be handled.\n * @return {Observable<HTMLElement | SVGPathElement>} An Observable emitting the animated element.\n */\n public handle(request: AnimateElementRequest): Observable<HTMLElement | SVGPathElement> {\n let result: Observable<HTMLElement | SVGPathElement>;\n\n if (request.element instanceof SVGPathElement) {\n result = this.animateConnection(request);\n } else {\n result = this.animateNode(request);\n }\n\n return result;\n }\n\n private animateConnection(request: AnimateElementRequest): Observable<SVGPathElement> {\n const result = new AnimateConnectionOverlayHandler(this.animationBuilder).handle(\n new AnimateConnectionOverlayRequest(request.element as SVGPathElement, request.duration)\n );\n\n return result;\n }\n\n private animateNode(request: AnimateElementRequest): Observable<HTMLElement> {\n const result = new AnimateNodeOverlayHandler(this.animationBuilder).handle(\n new AnimateNodeOverlayRequest(request.element as HTMLElement, request.duration)\n );\n\n return result;\n }\n}\n","/**\n * Class representing a request to animate a specific element.\n */\nexport class AnimateElementRequest {\n\n /**\n * Creates an instance of AnimateElementRequest.\n * @param {HTMLElement | SVGPathElement} element - The element to be animated.\n * @param {number} duration - The duration of the animation in milliseconds.\n */\n constructor(\n public readonly element: HTMLElement | SVGPathElement,\n public readonly duration: number,\n ) {\n }\n}\n","import { IFAnimationItem } from '../i-f-animation-item';\n\nexport class GetAllAnimatedElementsRequest {\n\n constructor(\n public readonly flowId: string,\n public readonly items: IFAnimationItem[][]\n ) {\n }\n}\n","import { GetAllAnimatedElementsRequest } from './get-all-animated-elements-request';\nimport { IFAnimationItem } from '../i-f-animation-item';\nimport { IFElementToAnimate } from '../i-f-element-to-animate';\n\nexport class GetAllAnimatedElementsHandler {\n\n private allNodes: HTMLElement[] = [];\n private allConnections: HTMLElement[] = [];\n\n constructor(\n private document: Document,\n ) {\n }\n\n public handle(request: GetAllAnimatedElementsRequest): IFElementToAnimate[][] {\n\n if (!request.flowId) {\n throw new Error('Flow id is required');\n }\n\n const flowElement: HTMLElement = this.getFlowElement(request.flowId);\n\n this.allNodes = this.getAllNodes(flowElement);\n\n this.allConnections = this.getAllConnections(flowElement);\n\n const result = request.items.map((row: IFAnimationItem[]) => {\n return row.map((item: IFAnimationItem) => {\n return {\n element: item.isConnection ? this.getConnectionElement(item.id) : this.getNodeElement(item.id),\n duration: item.duration\n } as IFElementToAnimate;\n })\n });\n\n return result;\n }\n\n\n private getAllNodes(flowElement: HTMLElement): HTMLElement[] {\n const result = Array.from(flowElement.querySelectorAll('[fNode]')) as HTMLElement[];\n return result;\n }\n\n private getAllConnections(flowElement: HTMLElement): HTMLElement[] {\n const result = Array.from(flowElement.getElementsByTagName('f-connection')) as HTMLElement[];\n return result;\n }\n\n private getFlowElement(flowId: any): HTMLElement {\n const flowElement: HTMLElement | null = this.document.getElementById(flowId);\n if (!flowElement) {\n throw new Error(`FFlowComponent with id ${ flowId } not found`);\n }\n return flowElement;\n }\n\n private getNodeElement(nodeId: string): HTMLElement {\n const nodeElement: HTMLElement | undefined = this.allNodes.find((x: HTMLElement) => x.dataset['fNodeId'] === nodeId);\n if (!nodeElement) {\n throw new Error(`FNodeDirective with id ${ nodeId } not found`);\n }\n return nodeElement;\n }\n\n private getConnectionElement(connectionId: any): SVGPathElement {\n const connectionElement: HTMLElement | undefined = this.allConnections.find((connection: HTMLElement) => connection.id === connectionId);\n if (!connectionElement) {\n throw new Error(`FConnectionComponent with id ${ connectionId } not found`);\n }\n\n const path = connectionElement.querySelector('.f-connection-path') as SVGPathElement;\n if (!path) {\n throw new Error(`FConnectionComponent with id ${ connectionId } has no path element`);\n }\n\n return path;\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { AnimationBuilder } from '@angular/animations';\nimport { concatMap, finalize, forkJoin, from, Observable, Subscriber, tap } from 'rxjs';\nimport { DOCUMENT } from '@angular/common';\nimport { AnimateElementHandler } from './animate-element/animate-element.handler';\nimport { AnimateElementRequest } from './animate-element/animate-element-request';\nimport { GetAllAnimatedElementsRequest } from './get-all-animated-elements/get-all-animated-elements-request';\nimport { GetAllAnimatedElementsHandler } from './get-all-animated-elements/get-all-animated-elements.handler';\nimport { IFAnimationResult } from './i-f-animation-result';\nimport { IFAnimationConfiguration } from './i-f-animation-configuration';\nimport { IFElementToAnimate } from './i-f-element-to-animate';\n\n/**\n * Service for animating elements in the @foblex/flow-animator library.\n * This service handles the orchestration of animations for elements.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class FFlowAnimatorService {\n\n /**\n * Creates an instance of FFlowAnimatorService.\n * @param {AnimationBuilder} animationBuilder - The AnimationBuilder service for creating animations.\n * @param {Document} document - The DOM Document object to interact with the DOM.\n */\n constructor(\n private animationBuilder: AnimationBuilder,\n @Inject(DOCUMENT) private document: Document\n ) {\n }\n\n /**\n * Initiates the animation process for the specified flow.\n * @param {any} flowId - The identifier of the flow to be animated.\n * @param {IFAnimationConfiguration} configuration - The configuration settings for the animation.\n * @return {Observable<IFAnimationResult>} An Observable that emits the result of the animation process.\n */\n public animate(flowId: any, configuration: IFAnimationConfiguration): Observable<IFAnimationResult> {\n return new Observable((observer) => {\n setTimeout(() => {\n const toAnimate = new GetAllAnimatedElementsHandler(this.document).handle(\n new GetAllAnimatedElementsRequest(flowId, configuration.items)\n );\n this.animateSequentially(toAnimate, configuration, observer);\n }, 0);\n });\n }\n\n /**\n * Animates elements sequentially according to the provided configuration.\n * @private\n * @param {IFElementToAnimate[][]} rows - A two-dimensional array of elements to animate in sequence.\n * @param {IFAnimationConfiguration} configuration - The configuration settings for the animation.\n * @param {Subscriber<IFAnimationResult>} observer - The observer to emit the results to.\n */\n private animateSequentially(rows: IFElementToAnimate[][], configuration: IFAnimationConfiguration, observer: Subscriber<IFAnimationResult>): void {\n const singleDuration = configuration.duration / rows.length;\n let toRemove: (HTMLElement | SVGPathElement)[] = [];\n\n from(rows).pipe(\n concatMap((row, index: number) =>\n forkJoin(\n row.map(x => this.animateElement(x.element, x.duration || singleDuration).pipe(\n tap((overlayElement) => {\n toRemove.push(overlayElement);\n })\n ))\n ).pipe(\n finalize(() => {\n if (configuration.removeOverlayAfterRowComplete) {\n toRemove = this.removeCreatedElements(toRemove);\n }\n observer.next({ completeRowIndex: index });\n })\n )\n ),\n finalize(() => {\n if (!configuration.removeOverlayAfterRowComplete) {\n toRemove = this.removeCreatedElements(toRemove);\n }\n observer.next({ completeAll: true });\n observer.complete();\n })\n ).subscribe();\n }\n\n /**\n * Animates an individual element.\n * @private\n * @param {(HTMLElement | SVGPathElement)} element - The element to be animated.\n * @param {number} duration - The duration of the animation in milliseconds.\n * @return {Observable<HTMLElement | SVGPathElement>} An Observable that emits the animated element.\n */\n private animateElement(element: (HTMLElement | SVGPathElement), duration: number): Observable<HTMLElement | SVGPathElement> {\n return new AnimateElementHandler(this.animationBuilder).handle(\n new AnimateElementRequest(element, duration)\n );\n }\n\n /**\n * Removes the specified elements from the DOM.\n * @private\n * @param {(HTMLElement | SVGPathElement)[]} toRemove - The elements to be removed.\n * @return {(HTMLElement | SVGPathElement)[]} An array of the removed elements.\n */\n private removeCreatedElements(toRemove: (HTMLElement | SVGPathElement)[]): (HTMLElement | SVGPathElement)[] {\n toRemove.forEach(x => x.remove());\n return [];\n }\n}\n","/*\n * Public API Surface of @foblex/flow-animator\n *\n */\n\nexport * from './lib/f-flow-animator.service';\n\nexport * from './lib/i-f-animation-configuration';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAEa,8BAA8B,CAAA;AAElC,IAAA,MAAM,CAAC,OAAuC,EAAA;QACnD,MAAM,KAAK,GAAG,4BAA4B,CAAC;QAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACvD,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC;AAC7D,QAAA,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAE,CAAC,CAAC;AAE7D,QAAA,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,aAAc,CAAC;AACrD,QAAA,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAElC,QAAA,OAAO,MAAM,CAAC;KACf;AACF;;MCfY,8BAA8B,CAAA;AAEzC,IAAA,WAAA,CACoB,OAAuB,EAAA;QAAvB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAgB;KAE1C;AACF;;MCAY,+BAA+B,CAAA;AAE1C,IAAA,WAAA,CACY,gBAAkC,EAAA;QAAlC,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