auto: sync 2026-06-02 13:46

This commit is contained in:
Capucine Gest
2026-06-02 13:46:08 +02:00
parent c4d8876dc6
commit 2347d02ae4
2 changed files with 30 additions and 7 deletions
+29 -6
View File
@@ -58,10 +58,11 @@ function TrendIcon({ trend }: { trend: "up"|"down"|"flat"|null }) {
return <Minus size={11} className="text-gray-300 flex-shrink-0" />; return <Minus size={11} className="text-gray-300 flex-shrink-0" />;
} }
function Row({ label, ind, unit = "", invertSurprise = false, warn = false, consensus = null, surpriseVsCons = null }: { function Row({ label, ind, unit = "", invertSurprise = false, warn = false, consensus = null, surpriseVsCons = null, tooltip = null }: {
label: string; ind: Ind | null; unit?: string; invertSurprise?: boolean; warn?: boolean; label: string; ind: Ind | null; unit?: string; invertSurprise?: boolean; warn?: boolean;
consensus?: number | null; // consensus à venir (upcoming) consensus?: number | null;
surpriseVsCons?: number | null; // actual consensus si ≤5j post-release surpriseVsCons?: number | null;
tooltip?: string | null;
}) { }) {
const value = ind?.value ?? null; const value = ind?.value ?? null;
const prev = ind?.prev ?? null; const prev = ind?.prev ?? null;
@@ -96,7 +97,7 @@ function Row({ label, ind, unit = "", invertSurprise = false, warn = false, cons
{label}{warn && <span className="text-amber-400 ml-0.5"></span>} {label}{warn && <span className="text-amber-400 ml-0.5"></span>}
</span> </span>
</div> </div>
<span className={`text-xs font-semibold tabular-nums flex-shrink-0 ${valCls}`}> <span className={`text-xs font-semibold tabular-nums flex-shrink-0 ${valCls}`} title={tooltip ?? undefined}>
{fmt(value)} {fmt(value)}
</span> </span>
</div> </div>
@@ -358,8 +359,30 @@ export default function CurrencyCard({ currency, expectations, yields, sentiment
{/* ── INFLATION ───────────────────────────────────────────────────── */} {/* ── INFLATION ───────────────────────────────────────────────────── */}
<SectionHeader label="Inflation" /> <SectionHeader label="Inflation" />
<Row label="CPI Core YoY" ind={inds?.cpiCore ?? null} unit="%" consensus={fc?.cpiCore ?? fc?.cpi ?? null} surpriseVsCons={fc?.cpiSurprise ?? null} /> <Row label="CPI Core YoY" ind={inds?.cpiCore ?? null} unit="%" consensus={fc?.cpiCore ?? fc?.cpi ?? null} surpriseVsCons={fc?.cpiSurprise ?? null} />
<Row label="CPI MoM" ind={inds?.cpiMoM ?? null} unit="%" consensus={fc?.cpiMoM ?? null} /> <Row
label={(() => {
const isQoQ = (inds?.cpiCoreMoM as (Ind & { isQoQ?: boolean }) | null)?.isQoQ;
return isQoQ ? "Core CPI QoQ (=Core CPI Index)" : "Core CPI MoM (=Core CPI Index)";
})()}
ind={inds?.cpiCoreMoM ?? null}
unit="%"
tooltip={(() => {
const raw = (inds?.cpiCoreMoM as (Ind & { _raw?: { last: number; prev: number; refMonth: string } }) | null)?._raw;
return raw ? `Index: last=${raw.last} prev=${raw.prev} ref=${raw.refMonth}` : null;
})()}
/>
<Row label="Inflation YoY" ind={inds?.cpiYoY ?? null} unit="%" />
<Row label="CPI MoM" ind={inds?.cpiMoM ?? null} unit="%" consensus={fc?.cpiMoM ?? null} />
<Row
label="CPI Index MoM%"
ind={inds?.cpiIndex ?? null}
unit="%"
tooltip={(() => {
const raw = (inds?.cpiIndex as (Ind & { _raw?: { last: number; prev: number; refMonth: string } }) | null)?._raw;
return raw ? `Index: last=${raw.last} prev=${raw.prev} ref=${raw.refMonth}` : null;
})()}
/>
{/* ── CROISSANCE ──────────────────────────────────────────────────── */} {/* ── CROISSANCE ──────────────────────────────────────────────────── */}
<SectionHeader label="Croissance" /> <SectionHeader label="Croissance" />
+1 -1
View File
File diff suppressed because one or more lines are too long