Remove dead code in app and XBRL loader

This commit is contained in:
2026-03-21 13:03:12 -04:00
parent 7d2816e3c4
commit dd289968b8
22 changed files with 22 additions and 796 deletions

View File

@@ -1,33 +0,0 @@
import type {
FinancialStatementKind,
FinancialUnit
} from '@/lib/types';
import {
INCOME_SURFACES,
BALANCE_SURFACES,
CASH_FLOW_SURFACES
} from '@/lib/generated';
export type CanonicalRowDefinition = {
key: string;
label: string;
category: string;
order: number;
unit: FinancialUnit;
};
function toCanonicalRow(surface: { surface_key: string; label: string; category: string; order: number; unit: string }) {
return {
key: surface.surface_key,
label: surface.label,
category: surface.category,
order: surface.order,
unit: surface.unit as FinancialUnit
};
}
export const CANONICAL_ROW_DEFINITIONS: Record<Extract<FinancialStatementKind, 'income' | 'balance' | 'cash_flow'>, CanonicalRowDefinition[]> = {
income: INCOME_SURFACES.map(toCanonicalRow),
balance: BALANCE_SURFACES.map(toCanonicalRow),
cash_flow: CASH_FLOW_SURFACES.map(toCanonicalRow)
};