integration layer; merge work on indicators from forks with existing ingestion pipeline

This commit is contained in:
Roberto Treviño Cervantes
2026-10-23 00:00:14 -06:00
parent b0608fdc70
commit d9245fe9b7
194 changed files with 21773 additions and 848 deletions
+20
View File
@@ -0,0 +1,20 @@
import { InjectionToken } from '@angular/core';
import { PlotlyFigure } from '../../features/indicadores/indicadores.models';
// Narrow boundary for the official partial bundle, which ships without declarations.
export interface PlotlyRuntime {
react(host: HTMLElement, data: PlotlyFigure['data'], layout: PlotlyFigure['layout'], config: Record<string, unknown>): Promise<unknown>;
purge(host: HTMLElement): void;
Plots: { resize(host: HTMLElement): Promise<unknown> };
addFrames(host: HTMLElement, frames: Record<string, unknown>[]): Promise<unknown>;
deleteFrames(host: HTMLElement, indices: number[]): Promise<unknown>;
}
let runtime: Promise<PlotlyRuntime> | undefined;
export function loadPlotly(): Promise<PlotlyRuntime> {
return runtime ??= import('plotly.js-cartesian-dist-min')
.then(module => (module.default ?? module) as unknown as PlotlyRuntime)
.catch(error => { runtime = undefined; throw error; });
}
export const PLOTLY_LOADER = new InjectionToken<() => Promise<PlotlyRuntime>>('PLOTLY_LOADER', { providedIn: 'root', factory: () => loadPlotly });