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
@@ -0,0 +1,23 @@
import { NEVER, of } from 'rxjs';
import { Indicador } from './indicadores.models';
import { emptyAvailability, IndicadoresPeriodos } from './indicadores-periodos';
import { IndicadoresKpiQueries } from './indicadores-kpi-queries';
// Existing figure/search/visibility suites isolate their HTTP from availability.
// The new P0.1 suites exercise the real availability HTTP separately.
export const periodAvailabilityProvider = {
provide: IndicadoresPeriodos,
useValue: { dominio: (_domain: unknown, catalog: Indicador[]) => {
const state = emptyAvailability('ready');
for (const tipo of ['semestre', 'mes'] as const) {
state.options[tipo] = [2024, 2025, 2026].flatMap(year =>
(tipo === 'semestre' ? ['S1', 'S2'] : Array.from({ length: 12 }, (_, i) => String(i + 1).padStart(2, '0'))).map(unit => year + '-' + unit));
}
for (const item of catalog) state.byIndicator[item.id] = item.tipos_periodo.flatMap(tipo => state.options[tipo].map(periodo => ({ tipo, periodo })));
return of(state);
} },
};
// Figure/search/visibility suites also isolate their HTTP from the KPI panels,
// which every domain (TEA included) now renders. KPI suites use the real queries.
export const kpiQueriesProvider = { provide: IndicadoresKpiQueries, useValue: { datos: () => NEVER } };