gloomberb 0.20.12 → 0.20.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/account/billing.ts +3 -2
- package/src/account/upgrade-dialog.tsx +8 -8
- package/src/api-client/index.ts +10 -2
- package/src/api-client/install-experiments.ts +146 -0
- package/src/api-client/telemetry.ts +47 -0
- package/src/api-client/types/market.ts +4 -0
- package/src/api-client/types/news.ts +16 -0
- package/src/architecture/floating-promise-allowlist.json +17 -33
- package/src/brokers/signed-in/adapter.ts +2 -2
- package/src/brokers/signed-in/catalog.ts +13 -4
- package/src/cli/commands/market.ts +51 -32
- package/src/cli/commands/overview.ts +3 -3
- package/src/cli/commands/search.ts +103 -9
- package/src/cli/commands/ticker.ts +22 -13
- package/src/cli/earnings-calendar.ts +33 -53
- package/src/cli/history-rows.ts +18 -1
- package/src/cli/known-gaps.ts +9 -0
- package/src/cli/listing-arg.ts +105 -18
- package/src/cli/pane-functions/catalog.ts +55 -7
- package/src/cli/pane-functions/dom.ts +8 -1
- package/src/cli/pane-functions/freshness.ts +2 -2
- package/src/cli/pane-functions/headless.ts +8 -8
- package/src/cli/pane-functions/index.ts +1 -1
- package/src/cli/pane-functions/report.ts +4 -1
- package/src/cli/perpetual-contract.ts +4 -4
- package/src/cli/quote-answer.ts +6 -2
- package/src/cli/result.ts +2 -1
- package/src/components/chart/composite/axis-overlays.tsx +5 -2
- package/src/components/chart/composite/composite-chart.tsx +1 -0
- package/src/components/chart/composite/format.ts +101 -15
- package/src/components/chart/composite/legend.tsx +60 -25
- package/src/components/chart/composite/time-axis.ts +51 -29
- package/src/components/chart/composite/toolbar.tsx +42 -6
- package/src/components/chart/curve/curve-surface.tsx +5 -5
- package/src/components/command-bar/list/badge.ts +8 -5
- package/src/components/command-bar/list/model.ts +0 -5
- package/src/components/command-bar/list/view.tsx +39 -2
- package/src/components/command-bar/routes/root/plugin-install.ts +4 -2
- package/src/components/command-bar/routes/root/provider-search.ts +23 -3
- package/src/components/command-bar/routes/root/results.ts +20 -9
- package/src/components/command-bar/routes/root/start-here.ts +1 -2
- package/src/components/command-bar/routes/ticker-search/actions.ts +2 -3
- package/src/components/command-bar/routes/ticker-search/results.ts +23 -4
- package/src/components/data-table/view.tsx +29 -6
- package/src/components/form-modal/host.tsx +1 -1
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +3 -3
- package/src/components/layout/pane/error-boundary.tsx +2 -1
- package/src/components/markdown-text.tsx +36 -0
- package/src/components/market-board/index.tsx +4 -3
- package/src/components/onboarding/first-run-workspace.ts +46 -11
- package/src/components/onboarding/onboarding-keyboard.ts +57 -5
- package/src/components/onboarding/onboarding-wizard.tsx +91 -24
- package/src/components/onboarding/portfolio-step/index.tsx +1 -0
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +36 -9
- package/src/components/onboarding/portfolio-step/types.ts +2 -0
- package/src/components/onboarding/tickers-step-model.ts +140 -0
- package/src/components/onboarding/tickers-step.tsx +116 -0
- package/src/components/onboarding/use-onboarding-broker-form.ts +1 -1
- package/src/components/onboarding/use-onboarding-progress.ts +100 -11
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
- package/src/components/onboarding/wizard-model.ts +3 -1
- package/src/components/onboarding/wizard-tickers.ts +139 -0
- package/src/components/price-performance.tsx +2 -2
- package/src/components/speedometer-gauge/model.ts +2 -1
- package/src/components/speedometer-gauge/terminal.tsx +13 -8
- package/src/components/ui/choice-dialog.tsx +101 -32
- package/src/components/ui/multi-select/dialog.tsx +1 -7
- package/src/components/ui/not-meaningful.ts +16 -0
- package/src/components/ui/query-bar.tsx +16 -4
- package/src/components/ui/stat-grid.tsx +27 -6
- package/src/data/config/store/normalize.ts +2 -0
- package/src/docs/snapshot.json +1 -1
- package/src/i18n/es.ts +5 -2
- package/src/i18n/ja.ts +5 -2
- package/src/i18n/ko.ts +5 -2
- package/src/i18n/zh-cn.ts +5 -2
- package/src/i18n/zh-tw.ts +5 -2
- package/src/layout-marketplace/model.ts +2 -1
- package/src/market-data/futures-contract.ts +2 -1
- package/src/market-data/hooks.tsx +1 -1
- package/src/market-data/market/change-basis.ts +27 -5
- package/src/market-data/market/format.ts +13 -13
- package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
- package/src/market-data/quotes/time.ts +17 -10
- package/src/market-data/tax-equivalent.ts +3 -2
- package/src/news/aggregator.ts +19 -8
- package/src/news/hooks.ts +1 -1
- package/src/news/news-model.ts +49 -0
- package/src/news/types.ts +9 -0
- package/src/plugins/builtin/account-management/calendar-tab.tsx +8 -3
- package/src/plugins/builtin/account-management/pane.tsx +9 -8
- package/src/plugins/builtin/alerts/calendar-events.ts +4 -5
- package/src/plugins/builtin/alerts/format.ts +6 -5
- package/src/plugins/builtin/alerts/headless.ts +3 -2
- package/src/plugins/builtin/alerts/history.ts +2 -1
- package/src/plugins/builtin/alerts/pane.tsx +2 -1
- package/src/plugins/builtin/alerts/price-text.ts +2 -1
- package/src/plugins/builtin/alerts/scheduled.ts +6 -5
- package/src/plugins/builtin/analytics/account-returns.ts +6 -7
- package/src/plugins/builtin/analytics/display.ts +2 -1
- package/src/plugins/builtin/analytics/pane-model.ts +5 -9
- package/src/plugins/builtin/analytics/risk-model.ts +6 -6
- package/src/plugins/builtin/analytics/risk-pane.tsx +6 -5
- package/src/plugins/builtin/analytics/view.tsx +5 -5
- package/src/plugins/builtin/attention/model.ts +6 -5
- package/src/plugins/builtin/attention/pane.tsx +5 -4
- package/src/plugins/builtin/awards/detail.tsx +5 -4
- package/src/plugins/builtin/awards/headless.ts +8 -7
- package/src/plugins/builtin/awards/model.ts +4 -3
- package/src/plugins/builtin/awards/pane.tsx +4 -4
- package/src/plugins/builtin/backtest/format.ts +3 -2
- package/src/plugins/builtin/backtest/report.ts +3 -2
- package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
- package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
- package/src/plugins/builtin/broker-manager/add-flow.tsx +1 -1
- package/src/plugins/builtin/broker-trading/orders-data.ts +3 -3
- package/src/plugins/builtin/broker-trading/orders.tsx +3 -2
- package/src/plugins/builtin/broker-trading/ticket.tsx +2 -2
- package/src/plugins/builtin/buildout/cells.tsx +2 -1
- package/src/plugins/builtin/buildout/company/pane.tsx +4 -3
- package/src/plugins/builtin/buildout/data-runtime.ts +21 -23
- package/src/plugins/builtin/buildout/detail/values.ts +2 -1
- package/src/plugins/builtin/buildout/format.ts +4 -3
- package/src/plugins/builtin/buildout/pane/index.tsx +3 -3
- package/src/plugins/builtin/catalysts/detail.tsx +2 -1
- package/src/plugins/builtin/catalysts/model.ts +6 -5
- package/src/plugins/builtin/catalysts/pane.tsx +2 -1
- package/src/plugins/builtin/cds/headless.ts +3 -2
- package/src/plugins/builtin/cds/model.ts +8 -8
- package/src/plugins/builtin/cds/pane.tsx +3 -2
- package/src/plugins/builtin/central-bank-rates/headless.ts +2 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +3 -2
- package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -5
- package/src/plugins/builtin/changelog/index.tsx +2 -2
- package/src/plugins/builtin/chart-composer/index.tsx +4 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +7 -3
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +3 -1
- package/src/plugins/builtin/chart-composer/user-series.ts +3 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +2 -1
- package/src/plugins/builtin/chat/controller/utils.ts +2 -1
- package/src/plugins/builtin/clinical-trials/model.ts +4 -3
- package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +4 -2
- package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -4
- package/src/plugins/builtin/cloud/askg/model.ts +2 -1
- package/src/plugins/builtin/cloud/askg/pane.tsx +35 -1
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
- package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
- package/src/plugins/builtin/cloud/thesis/detail.tsx +13 -8
- package/src/plugins/builtin/cloud-tweets/model.ts +2 -2
- package/src/plugins/builtin/comment-letters/pane.tsx +2 -1
- package/src/plugins/builtin/commodity-balances/headless.ts +3 -2
- package/src/plugins/builtin/company-attention/app-rank.tsx +5 -4
- package/src/plugins/builtin/company-attention/building-model.ts +7 -7
- package/src/plugins/builtin/company-attention/headless.ts +6 -5
- package/src/plugins/builtin/company-attention/model.ts +4 -4
- package/src/plugins/builtin/company-attention/moves-model.ts +9 -9
- package/src/plugins/builtin/company-attention/signals-model.ts +9 -9
- package/src/plugins/builtin/company-kpis/headless.ts +2 -1
- package/src/plugins/builtin/company-kpis/model.ts +15 -10
- package/src/plugins/builtin/company-kpis/pane.tsx +2 -2
- package/src/plugins/builtin/congress-trades/detail.tsx +6 -5
- package/src/plugins/builtin/congress-trades/headless.ts +2 -1
- package/src/plugins/builtin/congress-trades/model.ts +6 -6
- package/src/plugins/builtin/congress-trades/table.tsx +7 -6
- package/src/plugins/builtin/connections/pane.tsx +5 -5
- package/src/plugins/builtin/correlation/headless.ts +2 -2
- package/src/plugins/builtin/correlation/index.tsx +4 -1
- package/src/plugins/builtin/correlation/matrix/selection.ts +2 -1
- package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -3
- package/src/plugins/builtin/cot/headless.ts +3 -2
- package/src/plugins/builtin/cot/model.ts +2 -1
- package/src/plugins/builtin/cot/pane.tsx +4 -3
- package/src/plugins/builtin/cpi/headless.ts +4 -3
- package/src/plugins/builtin/cpi/model.ts +8 -7
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +5 -4
- package/src/plugins/builtin/credit-boards/headless.ts +2 -1
- package/src/plugins/builtin/credit-boards/model.ts +5 -5
- package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -2
- package/src/plugins/builtin/credit-documents/model.ts +2 -2
- package/src/plugins/builtin/crypto-board/defi-view.tsx +7 -7
- package/src/plugins/builtin/crypto-board/defi.ts +2 -2
- package/src/plugins/builtin/crypto-board/model.ts +4 -3
- package/src/plugins/builtin/crypto-board/pane.tsx +8 -8
- package/src/plugins/builtin/crypto-board/supply.ts +2 -2
- package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
- package/src/plugins/builtin/custom-view/index.tsx +3 -1
- package/src/plugins/builtin/custom-view/pane.tsx +5 -1
- package/src/plugins/builtin/custom-view/view-spec.ts +11 -0
- package/src/plugins/builtin/debt-maturities/model.ts +3 -3
- package/src/plugins/builtin/debt-maturities/pane.tsx +2 -2
- package/src/plugins/builtin/dividend-yield/client.ts +7 -3
- package/src/plugins/builtin/dividend-yield/headless.ts +16 -11
- package/src/plugins/builtin/dividend-yield/pane.tsx +12 -10
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +4 -1
- package/src/plugins/builtin/dividend-yield/ranking.ts +19 -11
- package/src/plugins/builtin/dividend-yield/types.ts +4 -0
- package/src/plugins/builtin/dividend-yield/view.ts +3 -3
- package/src/plugins/builtin/docs/use-docs.ts +4 -2
- package/src/plugins/builtin/doe/headless.ts +2 -1
- package/src/plugins/builtin/doe/model.ts +12 -11
- package/src/plugins/builtin/earnings/board-model.ts +14 -8
- package/src/plugins/builtin/earnings/board-table.ts +13 -8
- package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
- package/src/plugins/builtin/earnings/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings/format.ts +16 -14
- package/src/plugins/builtin/earnings/headless.ts +57 -19
- package/src/plugins/builtin/earnings/history-model.ts +11 -7
- package/src/plugins/builtin/earnings/history-table.ts +14 -9
- package/src/plugins/builtin/earnings/history.tsx +4 -3
- package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings-calls/format.ts +6 -5
- package/src/plugins/builtin/earnings-calls/upcoming.ts +5 -5
- package/src/plugins/builtin/earnings-ripple/headless.ts +2 -1
- package/src/plugins/builtin/earnings-ripple/model.ts +3 -2
- package/src/plugins/builtin/earnings-ripple/pane.tsx +6 -6
- package/src/plugins/builtin/econ/calendar-model.ts +2 -2
- package/src/plugins/builtin/econ/detail-view.tsx +2 -2
- package/src/plugins/builtin/econ/index.tsx +7 -6
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/headless.ts +4 -4
- package/src/plugins/builtin/econ-statistics/pane.tsx +2 -2
- package/src/plugins/builtin/equity-screener/headless.ts +5 -5
- package/src/plugins/builtin/equity-screener/model.ts +6 -4
- package/src/plugins/builtin/equity-screener/pane.tsx +7 -7
- package/src/plugins/builtin/equity-screener/screen-check.ts +2 -1
- package/src/plugins/builtin/equity-screener/ticker-check.tsx +2 -1
- package/src/plugins/builtin/estimate-revisions/model.ts +3 -2
- package/src/plugins/builtin/estimate-revisions/pane.tsx +8 -8
- package/src/plugins/builtin/executives/format.ts +4 -4
- package/src/plugins/builtin/exposure/headless.ts +8 -8
- package/src/plugins/builtin/exposure/model.ts +4 -3
- package/src/plugins/builtin/exposure/pane.tsx +6 -5
- package/src/plugins/builtin/fear-greed/format.ts +7 -7
- package/src/plugins/builtin/fear-greed/headless.ts +2 -1
- package/src/plugins/builtin/filing-events/feed.ts +2 -1
- package/src/plugins/builtin/futures/table.tsx +8 -8
- package/src/plugins/builtin/futures-curve/headless.ts +18 -18
- package/src/plugins/builtin/futures-curve/model.ts +5 -5
- package/src/plugins/builtin/futures-curve/pane.tsx +8 -8
- package/src/plugins/builtin/fx-matrix/index.tsx +2 -2
- package/src/plugins/builtin/fx-matrix/pairs.ts +2 -1
- package/src/plugins/builtin/gpu/board.tsx +6 -5
- package/src/plugins/builtin/gpu/changes.tsx +2 -1
- package/src/plugins/builtin/gpu/equities.tsx +2 -2
- package/src/plugins/builtin/gpu/headless.ts +4 -3
- package/src/plugins/builtin/gpu/model.ts +8 -7
- package/src/plugins/builtin/help/functions-table.tsx +41 -9
- package/src/plugins/builtin/help/index.tsx +6 -3
- package/src/plugins/builtin/help/keybindings-editor.tsx +35 -7
- package/src/plugins/builtin/help/shortcut-table.tsx +19 -7
- package/src/plugins/builtin/help/table-cells.tsx +51 -0
- package/src/plugins/builtin/holders/pane.tsx +4 -1
- package/src/plugins/builtin/insider/base-values.ts +2 -2
- package/src/plugins/builtin/insider/display.ts +2 -1
- package/src/plugins/builtin/insider/headless.ts +16 -16
- package/src/plugins/builtin/insider/insider-data.ts +2 -1
- package/src/plugins/builtin/insider/signals-model.ts +3 -3
- package/src/plugins/builtin/insider/table-model.ts +27 -13
- package/src/plugins/builtin/insider/table.tsx +1 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +4 -4
- package/src/plugins/builtin/iv-history/format.ts +8 -7
- package/src/plugins/builtin/iv-history/headless.ts +9 -8
- package/src/plugins/builtin/iv-history/pane.tsx +3 -2
- package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -4
- package/src/plugins/builtin/jobs/headless.ts +11 -11
- package/src/plugins/builtin/jobs/model.ts +2 -2
- package/src/plugins/builtin/jobs/pane.tsx +5 -5
- package/src/plugins/builtin/jodi/model.ts +2 -2
- package/src/plugins/builtin/jodi/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/headless.ts +4 -4
- package/src/plugins/builtin/kelly-sizer/model.ts +2 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -2
- package/src/plugins/builtin/macro-day/headless.ts +6 -5
- package/src/plugins/builtin/macro-day/model.ts +2 -1
- package/src/plugins/builtin/macro-day/pane.tsx +4 -4
- package/src/plugins/builtin/market-halts/model.ts +11 -10
- package/src/plugins/builtin/market-halts/pane.tsx +2 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +4 -4
- package/src/plugins/builtin/market-movers/session-table.ts +3 -3
- package/src/plugins/builtin/market-movers/session.ts +2 -1
- package/src/plugins/builtin/market-movers/table.ts +5 -5
- package/src/plugins/builtin/market-valuation/detail.tsx +2 -2
- package/src/plugins/builtin/market-valuation/headless.ts +7 -7
- package/src/plugins/builtin/market-valuation/pane.tsx +7 -7
- package/src/plugins/builtin/members/breadth-pane.tsx +5 -4
- package/src/plugins/builtin/members/headless.ts +2 -1
- package/src/plugins/builtin/members/model.ts +3 -2
- package/src/plugins/builtin/members/pane.tsx +10 -9
- package/src/plugins/builtin/mna/distress/model.ts +2 -1
- package/src/plugins/builtin/mna/model.ts +5 -5
- package/src/plugins/builtin/money-markets/headless.ts +2 -1
- package/src/plugins/builtin/money-markets/model.ts +3 -2
- package/src/plugins/builtin/money-markets/pane.tsx +4 -4
- package/src/plugins/builtin/news/headless.ts +5 -2
- package/src/plugins/builtin/news/wire/breaking/notifications.ts +21 -19
- package/src/plugins/builtin/news/wire/news/row.ts +3 -1
- package/src/plugins/builtin/news/wire/news/table.tsx +3 -2
- package/src/plugins/builtin/news/wire/persisted-articles.ts +28 -3
- package/src/plugins/builtin/notes/headless.ts +2 -1
- package/src/plugins/builtin/notes/model.ts +2 -1
- package/src/plugins/builtin/openfda/pane.tsx +4 -3
- package/src/plugins/builtin/options/carry.ts +3 -2
- package/src/plugins/builtin/options/market-reference.ts +2 -1
- package/src/plugins/builtin/options/table.ts +48 -9
- package/src/plugins/builtin/options/view.tsx +47 -17
- package/src/plugins/builtin/options-calculator/headless.ts +3 -2
- package/src/plugins/builtin/options-calculator/pane.tsx +7 -7
- package/src/plugins/builtin/options-positioning/headless.ts +8 -7
- package/src/plugins/builtin/options-positioning/model.ts +10 -10
- package/src/plugins/builtin/options-positioning/pane.tsx +5 -5
- package/src/plugins/builtin/options-scenario/collar.ts +5 -4
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +11 -10
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +15 -14
- package/src/plugins/builtin/options-scenario/csp-screen.ts +2 -1
- package/src/plugins/builtin/options-scenario/csp.ts +6 -5
- package/src/plugins/builtin/options-scenario/headless.ts +6 -5
- package/src/plugins/builtin/options-scenario/hedge.ts +3 -3
- package/src/plugins/builtin/options-scenario/pane.tsx +7 -6
- package/src/plugins/builtin/options-scenario/strategy-screen.ts +1 -1
- package/src/plugins/builtin/pe-band/headless.ts +9 -8
- package/src/plugins/builtin/pe-band/pane.tsx +7 -7
- package/src/plugins/builtin/perps/cascade.ts +3 -2
- package/src/plugins/builtin/perps/headless.ts +10 -9
- package/src/plugins/builtin/perps/model.ts +14 -14
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/header.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/index.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +4 -2
- package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +2 -1
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +4 -2
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +4 -4
- package/src/plugins/builtin/power/detail.tsx +6 -5
- package/src/plugins/builtin/power/gas-model.ts +8 -7
- package/src/plugins/builtin/power/gas.tsx +2 -1
- package/src/plugins/builtin/power/headless.ts +7 -6
- package/src/plugins/builtin/power/model.ts +3 -2
- package/src/plugins/builtin/power/prices-headless.ts +10 -9
- package/src/plugins/builtin/power/prices-model.ts +3 -2
- package/src/plugins/builtin/power/prices.tsx +2 -1
- package/src/plugins/builtin/primary-dealers/model.ts +3 -3
- package/src/plugins/builtin/primary-dealers/pane.tsx +2 -2
- package/src/plugins/builtin/rate-path/headless.ts +8 -7
- package/src/plugins/builtin/rate-path/model.ts +6 -5
- package/src/plugins/builtin/rate-path/pane.tsx +6 -5
- package/src/plugins/builtin/realized-vol/fx-proxy.ts +2 -1
- package/src/plugins/builtin/realized-vol/headless.ts +11 -10
- package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
- package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
- package/src/plugins/builtin/relative-rotation/pane.tsx +6 -6
- package/src/plugins/builtin/research/analyst-headless.ts +5 -5
- package/src/plugins/builtin/research/analyst-model.ts +7 -7
- package/src/plugins/builtin/research/analyst-pane.tsx +7 -7
- package/src/plugins/builtin/research/client.ts +14 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +40 -30
- package/src/plugins/builtin/research/event-model.ts +55 -22
- package/src/plugins/builtin/research/event-sources.ts +26 -8
- package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -12
- package/src/plugins/builtin/research/relative-valuation-currency.ts +16 -0
- package/src/plugins/builtin/research/relative-valuation-headless.ts +33 -21
- package/src/plugins/builtin/research/relative-valuation-model.ts +31 -17
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +29 -14
- package/src/plugins/builtin/research-search/model.ts +2 -1
- package/src/plugins/builtin/research-search/saved-view.tsx +4 -3
- package/src/plugins/builtin/revenue-breakdown/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/headless.ts +7 -7
- package/src/plugins/builtin/reverse-dcf/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -2
- package/src/plugins/builtin/scanner/flow-model.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
- package/src/plugins/builtin/scanner/headless.ts +3 -2
- package/src/plugins/builtin/scanner/hilo-model.ts +2 -1
- package/src/plugins/builtin/scanner/live-headless.ts +2 -2
- package/src/plugins/builtin/scanner/live-model.ts +3 -2
- package/src/plugins/builtin/scanner/live-pane.tsx +5 -5
- package/src/plugins/builtin/seasonality/headless.ts +2 -1
- package/src/plugins/builtin/seasonality/pane.tsx +4 -3
- package/src/plugins/builtin/sec/filing-display.tsx +12 -15
- package/src/plugins/builtin/sec/fund-facts.ts +2 -2
- package/src/plugins/builtin/sec/headless.ts +2 -1
- package/src/plugins/builtin/sec/index.tsx +6 -2
- package/src/plugins/builtin/sectors/headless.ts +4 -4
- package/src/plugins/builtin/sectors/index.tsx +7 -7
- package/src/plugins/builtin/shared/earnings-calendar.ts +90 -6
- package/src/plugins/builtin/shared/earnings-report.ts +13 -6
- package/src/plugins/builtin/shared/research-cells.tsx +2 -2
- package/src/plugins/builtin/shared/source-footer.ts +2 -1
- package/src/plugins/builtin/shared/trend.ts +2 -2
- package/src/plugins/builtin/shared/use-quote-board.ts +9 -8
- package/src/plugins/builtin/short-interest/headless.ts +6 -6
- package/src/plugins/builtin/short-interest/model.ts +9 -9
- package/src/plugins/builtin/short-interest/publications-model.ts +5 -5
- package/src/plugins/builtin/short-interest/publications-pane.tsx +3 -2
- package/src/plugins/builtin/short-interest/watch-headless.ts +5 -5
- package/src/plugins/builtin/short-interest/watch-pane.tsx +6 -6
- package/src/plugins/builtin/short-volume/model.ts +5 -5
- package/src/plugins/builtin/short-volume/pane.tsx +4 -4
- package/src/plugins/builtin/social-mentions/headless.ts +2 -1
- package/src/plugins/builtin/social-mentions/model.ts +4 -4
- package/src/plugins/builtin/supply-chain/graph-model.ts +2 -1
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +2 -2
- package/src/plugins/builtin/supply-chain/headless.ts +3 -2
- package/src/plugins/builtin/supply-chain/model.ts +4 -4
- package/src/plugins/builtin/supply-chain/pane.tsx +2 -2
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +2 -1
- package/src/plugins/builtin/themes/headless.ts +2 -1
- package/src/plugins/builtin/themes/model.ts +3 -2
- package/src/plugins/builtin/themes/pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/format.ts +9 -9
- package/src/plugins/builtin/thirteenf/headless.ts +3 -2
- package/src/plugins/builtin/thirteenf/model.ts +2 -1
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +2 -1
- package/src/plugins/builtin/thirteenf/pane.tsx +5 -4
- package/src/plugins/builtin/thirteenf/report-notes.ts +2 -1
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/table.ts +6 -5
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -3
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +4 -4
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +3 -3
- package/src/plugins/builtin/ticker-detail/financials/model.ts +83 -35
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -1
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +2 -2
- package/src/plugins/builtin/ticker-detail/financials/schema.ts +14 -18
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +8 -13
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -5
- package/src/plugins/builtin/ticker-detail/overview/chart-scale.ts +52 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +4 -4
- package/src/plugins/builtin/ticker-detail/overview/model.ts +24 -13
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +6 -0
- package/src/plugins/builtin/ticker-detail/overview/tax-equivalent.ts +2 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +33 -7
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +7 -5
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +4 -4
- package/src/plugins/builtin/ticker-detail/settings.ts +17 -0
- package/src/plugins/builtin/time-sales/headless.ts +3 -2
- package/src/plugins/builtin/time-sales/model.ts +7 -5
- package/src/plugins/builtin/time-sales/pane.tsx +7 -6
- package/src/plugins/builtin/trace-bonds/model.ts +3 -2
- package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
- package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
- package/src/plugins/builtin/treasury-auctions/headless.ts +6 -6
- package/src/plugins/builtin/treasury-auctions/hk-headless.ts +3 -2
- package/src/plugins/builtin/treasury-auctions/hk-view.tsx +10 -9
- package/src/plugins/builtin/treasury-auctions/hk.ts +5 -5
- package/src/plugins/builtin/treasury-auctions/model.ts +4 -4
- package/src/plugins/builtin/treasury-auctions/pane.tsx +18 -18
- package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -1
- package/src/plugins/builtin/treasury-daily/model.ts +2 -2
- package/src/plugins/builtin/vol-surface/events.ts +5 -4
- package/src/plugins/builtin/vol-surface/headless.ts +19 -18
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
- package/src/plugins/builtin/vol-surface/pane.tsx +8 -7
- package/src/plugins/builtin/vol-surface/stored.ts +2 -1
- package/src/plugins/builtin/vol-surface/tables.ts +4 -3
- package/src/plugins/builtin/volatility/headless.ts +5 -4
- package/src/plugins/builtin/volatility/pane.tsx +6 -6
- package/src/plugins/builtin/world-indices/headless.ts +7 -7
- package/src/plugins/builtin/world-indices/index.tsx +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +2 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +2 -1
- package/src/plugins/builtin/world-venue-map/layers.ts +3 -2
- package/src/plugins/builtin/world-venue-map/use-geo.ts +4 -2
- package/src/plugins/builtin/yield-curve/curves.ts +3 -3
- package/src/plugins/builtin/yield-curve/headless.ts +7 -6
- package/src/plugins/builtin/yield-curve/index.tsx +5 -4
- package/src/plugins/builtin/yield-curve/swaps.tsx +2 -1
- package/src/portfolio/allocation.ts +5 -5
- package/src/portfolio/column-values.ts +47 -41
- package/src/portfolio/futures-positions.ts +2 -1
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
- package/src/renderers/opentui/ui-host.tsx +32 -2
- package/src/renderers/share/layout-view.tsx +2 -1
- package/src/sources/gloomberb-cloud/news.ts +9 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +2 -0
- package/src/sources/provider-router/search.ts +15 -10
- package/src/state/hooks/inline-tickers.ts +3 -2
- package/src/state/hooks/quote-streaming.ts +9 -10
- package/src/team/collections-sync.ts +8 -3
- package/src/telemetry/usage-counts.ts +26 -0
- package/src/tickers/company-name-listing.ts +2 -2
- package/src/tickers/company-name.ts +17 -1
- package/src/tickers/listing-venues.ts +26 -1
- package/src/tickers/renamed-listings.ts +2 -1
- package/src/tickers/search/index.ts +19 -0
- package/src/tickers/starter-symbols.ts +7 -0
- package/src/time-series/fundamentals/statement-fields.ts +11 -14
- package/src/time-series/history-acquisition.ts +1 -1
- package/src/time-series/log-scale.ts +9 -0
- package/src/time-series/reporting.ts +3 -3
- package/src/time-series/resolve.ts +6 -4
- package/src/time-series/transforms.ts +10 -5
- package/src/types/config.ts +9 -0
- package/src/types/data-provider.ts +3 -2
- package/src/types/financials.ts +15 -0
- package/src/types/instrument.ts +6 -0
- package/src/types/plugin-panes.ts +1 -1
- package/src/types/plugin-reports.ts +8 -0
- package/src/utils/datetime-format.ts +74 -33
- package/src/utils/financial-statements.ts +39 -15
- package/src/utils/format.ts +4 -9
- package/src/utils/fundamentals.ts +38 -16
- package/src/utils/growth.ts +67 -0
- package/src/utils/keyboard.ts +6 -0
- package/src/utils/options.ts +1 -1
- package/src/utils/report-timing.ts +2 -2
- package/src/utils/served-rates.ts +45 -0
- package/src/utils/text-wrap.ts +84 -3
- package/src/utils/zoned-date-time.ts +47 -22
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { logFailure } from "../../../utils/log-failure";
|
|
3
|
+
import { isNotMeaningful, NOT_MEANINGFUL_TEXT } from "../../../utils/growth";
|
|
2
4
|
import type { EarningsCalendarPayload, EarningsHistoryPayload } from "../../../api-client/earnings";
|
|
3
5
|
import type {
|
|
4
6
|
HeadlessPaneColumn,
|
|
@@ -18,6 +20,8 @@ import { historyRows, periodText } from "./history-model";
|
|
|
18
20
|
import { fiscalQuarterText } from "./fiscal-quarter";
|
|
19
21
|
import { loadNoEarningsText } from "./no-earnings";
|
|
20
22
|
import { EPS_BASIS_NOTE, epsBasisName, PROVISIONAL_NOTE, showsEpsBasis } from "../shared/earnings-report";
|
|
23
|
+
import { lastReportOnRecord, listingDay, noNextReportText } from "../shared/earnings-calendar";
|
|
24
|
+
import { commandWord } from "../../../utils/shell-word";
|
|
21
25
|
import { listingAbroadVenue } from "../../../utils/sec";
|
|
22
26
|
import { findUsListingOfCompany } from "../../../tickers/us-listing";
|
|
23
27
|
import { shortCompanyName } from "../../../tickers/company-name";
|
|
@@ -27,12 +31,32 @@ import type { HeadlessPaneOptionDef } from "../../../types/headless";
|
|
|
27
31
|
|
|
28
32
|
const right = "right" as const;
|
|
29
33
|
const num = (value: unknown) => (typeof value === "number" && Number.isFinite(value) ? value : null);
|
|
34
|
+
/**
|
|
35
|
+
* A surprise as exported: a number, or null with the row's `<key>NotMeaningful` set against a loss or zero
|
|
36
|
+
* estimate (the text report draws N/M, as RV and DVD do), never text in the number's column.
|
|
37
|
+
*/
|
|
38
|
+
function surpriseFields<Key extends "epsSurprise" | "revenueSurprise">(key: Key, value: unknown) {
|
|
39
|
+
return isNotMeaningful(value)
|
|
40
|
+
? { [key]: null, [`${key}NotMeaningful`]: true } as Record<Key, null> & Record<`${Key}NotMeaningful`, true>
|
|
41
|
+
: { [key]: num(value) } as Record<Key, number | null>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A surprise column. Where JSON has null and `<key>NotMeaningful`, the text report draws N/M and CSV leaves the
|
|
46
|
+
* cell empty, its status column saying `n/m`, as DVD's growth does: the column holds only numbers.
|
|
47
|
+
*/
|
|
48
|
+
function surpriseColumn(key: "epsSurprise" | "revenueSurprise", header: string): HeadlessPaneColumn {
|
|
49
|
+
const flag = `${key}NotMeaningful`;
|
|
50
|
+
const draw = (text: string) => (value: unknown, row: Record<string, unknown>) =>
|
|
51
|
+
typeof value !== "number" && row[flag] === true ? text : signedPercent(num(value));
|
|
52
|
+
return { key, header, align: right, format: draw(NOT_MEANINGFUL_TEXT.toLowerCase()), textFormat: draw(NOT_MEANINGFUL_TEXT) };
|
|
53
|
+
}
|
|
30
54
|
|
|
31
55
|
/** The text report says a provisional figure's basis is provisional; exports keep the basis alone and `epsActualProvisional`. */
|
|
32
56
|
const BASIS_COLUMN: HeadlessPaneColumn = {
|
|
33
57
|
key: "epsBasis",
|
|
34
58
|
header: "Basis",
|
|
35
|
-
textFormat: (value, row) => (value == null ?
|
|
59
|
+
textFormat: (value, row) => (value == null ? MISSING_VALUE : row.epsActualProvisional === true ? `${String(value)}, provisional` : String(value)),
|
|
36
60
|
};
|
|
37
61
|
|
|
38
62
|
const BOARD_COLUMNS: HeadlessPaneColumn[] = [
|
|
@@ -49,7 +73,7 @@ const BOARD_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
49
73
|
{ key: "epsAnalysts", header: "Ests", align: right },
|
|
50
74
|
{ key: "epsActual", header: "EPS act", align: right, format: (value) => epsText(num(value)) },
|
|
51
75
|
BASIS_COLUMN,
|
|
52
|
-
|
|
76
|
+
surpriseColumn("epsSurprise", "EPS surp"),
|
|
53
77
|
{ key: "revenueEstimate", header: "Sales est", align: right, format: (value) => moneyText(num(value)) },
|
|
54
78
|
{ key: "impliedMove", header: "Implied", align: right, format: (value) => impliedText(num(value)) },
|
|
55
79
|
{ key: "averageMove", header: "Avg move", align: right, format: (value) => moveSize(num(value)) },
|
|
@@ -72,21 +96,21 @@ const HISTORY_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
72
96
|
{ key: "dateStatus", header: "Status" },
|
|
73
97
|
{ key: "timing", header: "When" },
|
|
74
98
|
// The quarter as the company names it; its end month where the company's calls do not say. Exports keep both.
|
|
75
|
-
{ key: "fiscalQuarter", header: "Quarter", format: (value, row) => typeof value === "string" ? value : typeof row.fiscalPeriod === "string" ? row.fiscalPeriod :
|
|
99
|
+
{ key: "fiscalQuarter", header: "Quarter", format: (value, row) => typeof value === "string" ? value : typeof row.fiscalPeriod === "string" ? row.fiscalPeriod : MISSING_VALUE },
|
|
76
100
|
{ key: "epsEstimate", header: "EPS est", align: right, format: (value) => epsText(num(value)) },
|
|
77
101
|
{ key: "epsAnalysts", header: "Ests", align: right },
|
|
78
102
|
{ key: "epsActual", header: "EPS act", align: right, format: (value) => epsText(num(value)) },
|
|
79
103
|
BASIS_COLUMN,
|
|
80
|
-
|
|
104
|
+
surpriseColumn("epsSurprise", "EPS surp"),
|
|
81
105
|
{ key: "revenueEstimate", header: "Sales est", align: right, format: (value) => moneyText(num(value)) },
|
|
82
106
|
{ key: "revenueActual", header: "Sales act", align: right, format: (value) => moneyText(num(value)) },
|
|
83
|
-
|
|
107
|
+
surpriseColumn("revenueSurprise", "Sales surp"),
|
|
84
108
|
{ key: "impliedMove", header: "Implied", align: right, format: (value) => impliedText(num(value)) },
|
|
85
109
|
{ key: "impliedFrom", header: "Implied from" },
|
|
86
110
|
{ key: "move", header: "Move", align: right, format: (value) => signedPercent(num(value)) },
|
|
87
111
|
];
|
|
88
112
|
|
|
89
|
-
/** A Hong Kong listing's report: what its figures cover, their currency and its results announcement; no options or moves are read for it. */
|
|
113
|
+
/** A Hong Kong, Singapore or China A listing's report: what its figures cover, their currency and its results announcement; no options or moves are read for it. */
|
|
90
114
|
const LISTING_HISTORY_COLUMNS: HeadlessPaneColumn[] = [
|
|
91
115
|
{ key: "date", header: "Date" },
|
|
92
116
|
{ key: "dateStatus", header: "Status" },
|
|
@@ -97,8 +121,8 @@ const LISTING_HISTORY_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
97
121
|
{ key: "filing", header: "Filing" },
|
|
98
122
|
];
|
|
99
123
|
|
|
100
|
-
/** What a Hong Kong listing's ERN report's period, currency and filing are, in its metadata. */
|
|
101
|
-
const LISTING_PERIOD_NOTE = "period is what the figures cover: a quarter (Q3 FY2026, or its end month), a half (H1 FY2026), a year (FY2025) or a year to date (9M FY2026), a fiscal year named by the calendar year it ends in. A half-yearly reporter's half is never a quarter. currency is the ISO currency of every amount on the row, estimates included. EPS estimates and actuals are the street's quarter figures, compared only in one currency and on one basis; a period the street has no quarter for shows the company's reported EPS and revenue from its results announcement (filing) with no estimate, its EPS diluted (basis GAAP) where the filing gives one, else basic (basis basic). The announcements' figures and links come with Gloom Pro, as KPIS has them
|
|
124
|
+
/** What a Hong Kong, Singapore or China A listing's ERN report's period, currency and filing are, in its metadata. */
|
|
125
|
+
const LISTING_PERIOD_NOTE = "period is what the figures cover: a quarter (Q3 FY2026, or its end month), a half (H1 FY2026), a year (FY2025) or a year to date (9M FY2026), a fiscal year named by the calendar year it ends in. A half-yearly reporter's half is never a quarter. currency is the ISO currency of every amount on the row, estimates included. EPS estimates and actuals are the street's quarter figures, compared only in one currency and on one basis; a period the street has no quarter for shows the company's reported EPS and revenue from its results announcement (filing) with no estimate, its EPS diluted (basis GAAP) where the filing gives one, else basic (basis basic). The street's quarters and the exchange's results calendar (each report's day, time and period) are everyone's; the announcements' figures and links come with Gloom Pro, as KPIS has them. The next report's date is the company's where its exchange has it (status confirmed), else the day the same report came out a year before, 52 weeks on (status projected).";
|
|
102
126
|
|
|
103
127
|
interface EarningsHeadlessDependencies {
|
|
104
128
|
calendar(query: { from: string; to: string; perDay: number; symbols: string[]; markets?: "all" }, context: HeadlessPaneContext): Promise<EarningsCalendarPayload>;
|
|
@@ -212,7 +236,7 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
|
|
|
212
236
|
epsActual: report.epsActual,
|
|
213
237
|
epsActualProvisional: report.provisional,
|
|
214
238
|
epsBasis: showsEpsBasis(report) ? epsBasisName(report.epsBasis) : null,
|
|
215
|
-
epsSurprise
|
|
239
|
+
...surpriseFields("epsSurprise", report.epsSurprise),
|
|
216
240
|
revenueEstimate: report.revenueEstimate,
|
|
217
241
|
impliedMove: report.impliedMove,
|
|
218
242
|
averageMove: report.averageMove,
|
|
@@ -243,17 +267,30 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
|
|
|
243
267
|
* What ERN says for a listing abroad, whose next report is its own but whose
|
|
244
268
|
* past reports, surprises and implied moves only the US board and Hong Kong's
|
|
245
269
|
* results announcements have: that, and the company's US listing to read
|
|
246
|
-
* them on (Sanofi's SNY for SAN:EPA).
|
|
270
|
+
* them on (Sanofi's SNY for SAN:EPA). It promises the next report only when
|
|
271
|
+
* the calendar has one.
|
|
247
272
|
*/
|
|
248
|
-
async function abroadHistoryNotice(symbol: string, company: string | null, context: HeadlessPaneContext): Promise<string> {
|
|
249
|
-
const
|
|
273
|
+
async function abroadHistoryNotice(symbol: string, company: string | null, hasNext: boolean, context: HeadlessPaneContext): Promise<string> {
|
|
274
|
+
const covers = "Past reports, surprises and implied moves cover US, Hong Kong, Singapore and China A listings only";
|
|
275
|
+
const lead = hasNext ? `${covers}, so ${symbol} shows its next report.` : `${covers}.`;
|
|
250
276
|
const us = await findUsListingOfCompany(context.marketData, company);
|
|
251
277
|
return us ? `${lead} ${shortCompanyName(company!)}'s US listing is ${us.symbol}: ERN ${us.symbol} has them.` : lead;
|
|
252
278
|
}
|
|
253
279
|
|
|
280
|
+
/**
|
|
281
|
+
* A listing abroad with no next report on the calendar: "VOW3:XETRA: no next
|
|
282
|
+
* report date on record; last reported 2026-10-29 (quarter ended 2026-09-30).
|
|
283
|
+
* Headlines: gloom news VOW3:XETRA".
|
|
284
|
+
*/
|
|
285
|
+
async function noNextReportAbroad(symbol: string, context: HeadlessPaneContext): Promise<string> {
|
|
286
|
+
const [bare = symbol, exchange = ""] = symbol.split(":");
|
|
287
|
+
const last = await lastReportOnRecord(context.marketData, { symbol: bare, exchange }, listingDay(exchange));
|
|
288
|
+
return `${symbol}: ${noNextReportText(last)}. Headlines: gloom news ${commandWord(symbol)}`;
|
|
289
|
+
}
|
|
290
|
+
|
|
254
291
|
async function historyReport(symbol: string, context: HeadlessPaneContext, deps: EarningsHeadlessDependencies): Promise<HeadlessRowsResult> {
|
|
255
292
|
// The board is US listings'; SAN:EPA's past reports are not on it, and bare SAN there is another company.
|
|
256
|
-
// A Hong Kong listing has its own, from its results announcements.
|
|
293
|
+
// A Hong Kong, Singapore or China A listing has its own, from its exchange's results calendar and announcements.
|
|
257
294
|
const { listing, abroad, ownAbroad } = historyListing(symbol);
|
|
258
295
|
const [history, upcoming] = await Promise.allSettled([
|
|
259
296
|
abroad ? Promise.resolve(null) : ownAbroad ? deps.history(listing, context).catch(noHistoryAbroad) : deps.history(listing, context),
|
|
@@ -263,7 +300,7 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
|
|
|
263
300
|
const payload = history.status === "fulfilled" ? history.value : null;
|
|
264
301
|
const next = upcoming.status === "fulfilled" ? upcoming.value[0] ?? null : null;
|
|
265
302
|
const notice = abroad
|
|
266
|
-
? await abroadHistoryNotice(symbol, next?.name ?? await context.marketData.getQuote(symbol, "").then((quote) => quote.name ?? null, logFailure("earnings.headless", "Load earnings company name failed", null)), context)
|
|
303
|
+
? await abroadHistoryNotice(symbol, next?.name ?? await context.marketData.getQuote(symbol, "").then((quote) => quote.name ?? null, logFailure("earnings.headless", "Load earnings company name failed", null)), !!next, context)
|
|
267
304
|
: null;
|
|
268
305
|
const rows = historyRows(payload, newYorkToday(), next, { abroad: ownAbroad }).map((row) => ({
|
|
269
306
|
date: row.date,
|
|
@@ -285,11 +322,11 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
|
|
|
285
322
|
epsActual: row.epsActual,
|
|
286
323
|
epsActualProvisional: row.provisional,
|
|
287
324
|
epsBasis: !showsEpsBasis(row) ? null : !row.epsBasis && row.epsDilution === "basic" ? "basic" : epsBasisName(row.epsBasis),
|
|
288
|
-
epsSurprise
|
|
325
|
+
...surpriseFields("epsSurprise", row.epsSurprise),
|
|
289
326
|
revenueEstimate: row.revenueEstimate,
|
|
290
327
|
revenueActual: row.revenueActual,
|
|
291
328
|
revenueActualProvisional: row.revenueProvisional,
|
|
292
|
-
revenueSurprise
|
|
329
|
+
...surpriseFields("revenueSurprise", row.revenueSurprise),
|
|
293
330
|
impliedMove: row.implied,
|
|
294
331
|
impliedFrom: row.impliedMethod === "trade-close" ? "trade closes" : row.impliedMethod === "quote-mid" ? "quote mids" : null,
|
|
295
332
|
move: row.move,
|
|
@@ -299,9 +336,10 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
|
|
|
299
336
|
const noEarnings = rows.length === 0 && !abroad ? await loadNoEarningsText(context.marketData, symbol, "cli") : null;
|
|
300
337
|
// A company ERN covers whose history answered with nothing (AIA's, 1299:HKEX) has no reports on record yet: no
|
|
301
338
|
// complete answer, and not one ERN does not cover.
|
|
302
|
-
// A listing abroad shows only its next report: none on the calendar is what it has, not a listing ERN does not cover
|
|
303
|
-
|
|
304
|
-
|
|
339
|
+
// A listing abroad shows only its next report: none on the calendar is what it has, not a listing ERN does not cover,
|
|
340
|
+
// and it says when it last reported. A calendar that failed to answer says nothing of it.
|
|
341
|
+
const empty = noEarnings ?? (rows.length === 0 && payload ? `No earnings reports on record for ${symbol}.` : null)
|
|
342
|
+
?? (rows.length === 0 && abroad && upcoming.status === "fulfilled" && !next ? await noNextReportAbroad(symbol, context) : null);
|
|
305
343
|
return {
|
|
306
344
|
columns: ownAbroad ? LISTING_HISTORY_COLUMNS : HISTORY_COLUMNS,
|
|
307
345
|
rows,
|
|
@@ -8,7 +8,7 @@ import { earningsDateStatus, earningsEpsBasis, isProvisionalActual } from "../sh
|
|
|
8
8
|
import { resolveReportRows, type ReportRowAdapter } from "../shared/earnings-calendar";
|
|
9
9
|
import { addDays, MIN_AVERAGE_REPORTS } from "./board-model";
|
|
10
10
|
import { fiscalQuarterOf, fiscalQuarterText, placedPeriod, type FiscalQuarter } from "./fiscal-quarter";
|
|
11
|
-
import { datedYear, fiscalMonth, impliedText, moveSize, shortDate, surprise, TIMING_LABEL } from "./format";
|
|
11
|
+
import { datedYear, fiscalMonth, impliedText, moveSize, shortDate, surprise, TIMING_LABEL, type Surprise } from "./format";
|
|
12
12
|
|
|
13
13
|
export interface HistoryRow {
|
|
14
14
|
key: string;
|
|
@@ -41,12 +41,13 @@ export interface HistoryRow {
|
|
|
41
41
|
epsBasis: EarningsEpsBasis | null;
|
|
42
42
|
/** A listing abroad's filed EPS that is basic: not the statements' diluted figure, so it has no basis and says so. */
|
|
43
43
|
epsDilution: "diluted" | "basic" | null;
|
|
44
|
-
|
|
44
|
+
/** N/M against a loss or zero estimate. */
|
|
45
|
+
epsSurprise: Surprise;
|
|
45
46
|
revenueEstimate: number | null;
|
|
46
47
|
revenueActual: number | null;
|
|
47
48
|
/** The revenue is the press release's, until the statements have the quarter. */
|
|
48
49
|
revenueProvisional: boolean;
|
|
49
|
-
revenueSurprise:
|
|
50
|
+
revenueSurprise: Surprise;
|
|
50
51
|
implied: number | null;
|
|
51
52
|
impliedMethod: "quote-mid" | "trade-close" | null;
|
|
52
53
|
impliedExpiry: string | null;
|
|
@@ -174,9 +175,11 @@ export function historyRows(
|
|
|
174
175
|
const abroad = options.abroad === true;
|
|
175
176
|
const recorded: HistoryRow[] = (payload?.reports ?? []).flatMap((report) => {
|
|
176
177
|
const period = reportPeriod(report);
|
|
177
|
-
// A listing abroad's amount with no currency could be any: it is not shown.
|
|
178
|
+
// A listing abroad's amount with no currency could be any: it is not shown. A row with no amount (a report's
|
|
179
|
+
// day and announcement, its next date from the exchange) needs none.
|
|
178
180
|
const currency = abroad ? isoCurrency(report.currency) : null;
|
|
179
|
-
|
|
181
|
+
const amounts = [report.epsEstimate, report.epsActual, report.revenueEstimate, report.revenueActual].some((value) => value != null);
|
|
182
|
+
if (!period || (abroad && !currency && amounts)) return [];
|
|
180
183
|
const move = report.realized?.move ?? null;
|
|
181
184
|
const implied = report.implied?.move ?? null;
|
|
182
185
|
const dateStatus = earningsDateStatus(report.dateStatus);
|
|
@@ -256,7 +259,7 @@ export function historyFigures(rows: readonly HistoryRow[], today: string): Stat
|
|
|
256
259
|
const past = rows.filter((row) => !row.upcoming).slice(0, AVERAGE_OVER);
|
|
257
260
|
const moves = past.flatMap((row) => (row.move == null ? [] : [Math.abs(row.move)]));
|
|
258
261
|
const implied = past.flatMap((row) => (row.implied == null ? [] : [row.implied]));
|
|
259
|
-
const beats = past.filter((row) => row.epsSurprise != null);
|
|
262
|
+
const beats = past.filter((row) => row.epsSurprise != null && row.epsActual != null && row.epsEstimate != null);
|
|
260
263
|
const figures: StatItem[] = [];
|
|
261
264
|
if (next) {
|
|
262
265
|
figures.push({
|
|
@@ -284,7 +287,8 @@ export function historyFigures(rows: readonly HistoryRow[], today: string): Stat
|
|
|
284
287
|
figures.push({
|
|
285
288
|
id: "beats",
|
|
286
289
|
label: "EPS beats",
|
|
287
|
-
|
|
290
|
+
// A beat is an actual above the estimate, a loss narrower than expected too (its surprise N/M).
|
|
291
|
+
value: `${beats.filter((row) => row.epsActual! > row.epsEstimate!).length} of ${beats.length}`,
|
|
288
292
|
});
|
|
289
293
|
}
|
|
290
294
|
return figures;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { DataTableCell, DataTableColumn } from "../../../components";
|
|
2
3
|
import { TABLE_COLUMN_GAP, tableColumnWidth } from "../../../components/ui/table-layout";
|
|
3
4
|
import { colors } from "../../../theme/colors";
|
|
5
|
+
import { notMeaningfulCell } from "../../../components/ui/not-meaningful";
|
|
6
|
+
import { isNotMeaningful } from "../../../utils/growth";
|
|
4
7
|
import { TextAttributes } from "../../../ui";
|
|
5
|
-
import { datedYear, epsText, impliedText, moneyText, signedPercent, TIMING_LABEL } from "./format";
|
|
8
|
+
import { datedYear, epsText, impliedText, moneyText, signedPercent, TIMING_LABEL, type Surprise } from "./format";
|
|
6
9
|
import { epsBasisShort, showsEpsBasis } from "../shared/earnings-report";
|
|
7
10
|
import { periodText, type HistoryRow } from "./history-model";
|
|
8
11
|
|
|
@@ -35,7 +38,7 @@ const DROP_ORDER: HistoryColumnId[] = [
|
|
|
35
38
|
];
|
|
36
39
|
|
|
37
40
|
/** The sales columns and what fills them; a company with no revenue on record shows none of them. */
|
|
38
|
-
const SALES_COLUMNS: Partial<Record<HistoryColumnId, (row: HistoryRow) =>
|
|
41
|
+
const SALES_COLUMNS: Partial<Record<HistoryColumnId, (row: HistoryRow) => Surprise>> = {
|
|
39
42
|
revenueEstimate: (row) => row.revenueEstimate,
|
|
40
43
|
revenueActual: (row) => row.revenueActual,
|
|
41
44
|
revenueSurprise: (row) => row.revenueSurprise,
|
|
@@ -53,7 +56,7 @@ const AMOUNT_COLUMNS: ReadonlySet<HistoryColumnId> = new Set(["epsEstimate", "ep
|
|
|
53
56
|
const CURRENCY_WIDTH = 4;
|
|
54
57
|
|
|
55
58
|
/** A listing abroad's figure with its currency; a US listing's dollars stay bare. */
|
|
56
|
-
const inCurrency = (text: string, row: HistoryRow) => (row.currency && text !==
|
|
59
|
+
const inCurrency = (text: string, row: HistoryRow) => (row.currency && text !== MISSING_VALUE ? `${text} ${row.currency}` : text);
|
|
57
60
|
|
|
58
61
|
/**
|
|
59
62
|
* The columns that fit `width`. A listing abroad's (`abroad`, Hong Kong's)
|
|
@@ -83,8 +86,10 @@ export function historyColumns(width: number, rows: readonly HistoryRow[], optio
|
|
|
83
86
|
return columns;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
|
-
function signed(value:
|
|
87
|
-
|
|
89
|
+
function signed(value: Surprise): DataTableCell {
|
|
90
|
+
// N/M (a surprise against a loss or zero estimate) as every pane draws it; a missing figure dim.
|
|
91
|
+
if (isNotMeaningful(value)) return notMeaningfulCell();
|
|
92
|
+
return { text: signedPercent(value), color: typeof value !== "number" || value === 0 ? colors.textDim : value > 0 ? colors.positive : colors.negative };
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
/**
|
|
@@ -100,20 +105,20 @@ export function renderHistoryCell(row: HistoryRow, column: HistoryColumn, liveMo
|
|
|
100
105
|
case "date":
|
|
101
106
|
return { text: datedYear(row.date), color: row.upcoming ? colors.textBright : colors.text, attributes: row.upcoming ? TextAttributes.BOLD : undefined };
|
|
102
107
|
case "when":
|
|
103
|
-
return { text: row.timing ? TIMING_LABEL[row.timing] :
|
|
108
|
+
return { text: row.timing ? TIMING_LABEL[row.timing] : MISSING_VALUE, color: row.expectedTiming ? colors.textMuted : dim };
|
|
104
109
|
case "period":
|
|
105
110
|
return { text: periodText(row), color: dim };
|
|
106
111
|
case "epsEstimate":
|
|
107
112
|
return { text: inCurrency(epsText(row.epsEstimate), row), color: dim };
|
|
108
113
|
case "analysts":
|
|
109
|
-
return { text: row.epsAnalysts == null ?
|
|
114
|
+
return { text: row.epsAnalysts == null ? MISSING_VALUE : String(row.epsAnalysts), color: dim };
|
|
110
115
|
case "epsActual":
|
|
111
116
|
// The company's press release's figure reads quieter until the calendar's replaces it.
|
|
112
117
|
return { text: inCurrency(epsText(row.epsActual), row), color: row.provisional ? colors.textMuted : colors.text };
|
|
113
118
|
case "basis":
|
|
114
119
|
// A listing abroad's basic EPS is not the statements' diluted figure: it says what it is.
|
|
115
120
|
return !showsEpsBasis(row)
|
|
116
|
-
? { text:
|
|
121
|
+
? { text: MISSING_VALUE, color: dim }
|
|
117
122
|
: !row.epsBasis && row.epsDilution === "basic"
|
|
118
123
|
? { text: "basic", color: colors.textMuted }
|
|
119
124
|
: { text: epsBasisShort(row.epsBasis), color: row.epsBasis ? colors.textMuted : dim };
|
|
@@ -133,6 +138,6 @@ export function renderHistoryCell(row: HistoryRow, column: HistoryColumn, liveMo
|
|
|
133
138
|
return live === "loading" ? { text: "…", color: dim } : signed(row.move ?? live);
|
|
134
139
|
}
|
|
135
140
|
case "ratio":
|
|
136
|
-
return { text: row.moveRatio == null ?
|
|
141
|
+
return { text: row.moveRatio == null ? MISSING_VALUE : `${row.moveRatio.toFixed(1)}x`, color: row.moveRatio != null && row.moveRatio > 1 ? colors.warning : dim };
|
|
137
142
|
}
|
|
138
143
|
}
|
|
@@ -43,8 +43,9 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
43
43
|
registrationId: string;
|
|
44
44
|
}) {
|
|
45
45
|
const dataProvider = useAssetData();
|
|
46
|
-
// Past reports are a US listing's and a Hong Kong listing's own
|
|
47
|
-
//
|
|
46
|
+
// Past reports are a US listing's and a Hong Kong, Singapore or China A listing's own (its exchange's results
|
|
47
|
+
// calendar and announcements, in their currency), read by its key however it was typed (0700.HK is 0700:HKEX): any
|
|
48
|
+
// other listing abroad shows its next report alone.
|
|
48
49
|
const { listing, abroad, ownAbroad } = historyListing(symbol);
|
|
49
50
|
// A Hong Kong listing's announcement figures come with Pro, as KPIS has them: what Gloom Cloud answers differs by
|
|
50
51
|
// plan, so it is kept per session and plan.
|
|
@@ -118,7 +119,7 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
118
119
|
const utcDay = useUtcDay();
|
|
119
120
|
// Its source and when the history was read, as `fn ERN` ends; how long ago it loaded goes first on a narrow row.
|
|
120
121
|
const footerInfo = useMemo(() => abroad
|
|
121
|
-
? [{ id: "us-listings", parts: [{ text: "past reports: US
|
|
122
|
+
? [{ id: "us-listings", parts: [{ text: "past reports: US, Hong Kong, Singapore and China A listings only", tone: "muted" as const }] }]
|
|
122
123
|
: payload ? [
|
|
123
124
|
reportFooterSegment(earningsCalendarHeadless, { rows: [], metadata: { asOf: payload.asOf } }),
|
|
124
125
|
...(updatedAgo ? [ageFooterSegment(updatedAgo)] : []),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
|
|
2
3
|
import type { CloudEarningsCallPayload } from "../../../api-client";
|
|
3
4
|
import { usePlanAccess } from "../../../api-client/plan-access";
|
|
@@ -56,7 +57,7 @@ type CalendarColumn = DataTableColumn & { id: CalendarColumnId };
|
|
|
56
57
|
type CalendarRow = SectionedRow<CloudEarningsCallPayload>;
|
|
57
58
|
|
|
58
59
|
const COMPANY_MIN_WIDTH = 12;
|
|
59
|
-
const MISSING =
|
|
60
|
+
const MISSING = MISSING_VALUE;
|
|
60
61
|
|
|
61
62
|
const ALL_COLUMNS: CalendarColumn[] = [
|
|
62
63
|
{ id: "ticker", label: "TICKER", width: 6, align: "left" },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { CloudEarningsCallPayload } from "../../../api-client";
|
|
2
3
|
import { formatShortDate } from "../../../utils/datetime-format";
|
|
3
4
|
|
|
@@ -11,7 +12,7 @@ function formatPeriod(
|
|
|
11
12
|
fiscalQuarter: number | null,
|
|
12
13
|
fiscalHalf?: number | null,
|
|
13
14
|
): string {
|
|
14
|
-
if (!fiscalQuarter && !fiscalYear) return
|
|
15
|
+
if (!fiscalQuarter && !fiscalYear) return MISSING_VALUE;
|
|
15
16
|
const quarter = fiscalQuarter ? `FQ${fiscalQuarter}` : fiscalHalf ? `H${fiscalHalf}` : "FY";
|
|
16
17
|
const year = fiscalYear ? ` ${String(fiscalYear).slice(-2)}` : "";
|
|
17
18
|
return `${quarter}${year}`;
|
|
@@ -31,18 +32,18 @@ export function noCallsText(ticker: string): { title: string; message: string }
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export function formatCallDate(value: string | null): string {
|
|
34
|
-
return formatShortDate(value, { day: "2-digit", year: "2-digit", fallback:
|
|
35
|
+
return formatShortDate(value, { day: "2-digit", year: "2-digit", fallback: MISSING_VALUE });
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export function formatDuration(seconds: number | null): string {
|
|
38
|
-
if (!seconds || seconds <= 0) return
|
|
39
|
+
if (!seconds || seconds <= 0) return MISSING_VALUE;
|
|
39
40
|
const minutes = Math.round(seconds / 60);
|
|
40
41
|
if (minutes < 60) return `${minutes}m`;
|
|
41
42
|
return `${Math.floor(minutes / 60)}h${String(minutes % 60).padStart(2, "0")}`;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
export function formatSentiment(sentiment: number | null): string {
|
|
45
|
-
if (sentiment === null || !Number.isFinite(sentiment)) return
|
|
46
|
+
if (sentiment === null || !Number.isFinite(sentiment)) return MISSING_VALUE;
|
|
46
47
|
const rounded = sentiment.toFixed(2);
|
|
47
48
|
return sentiment > 0 ? `+${rounded}` : rounded;
|
|
48
49
|
}
|
|
@@ -86,5 +87,5 @@ export function callTitle(call: NamedCall): string {
|
|
|
86
87
|
const label = eventLabelOf(call);
|
|
87
88
|
if (label) return `${call.ticker} ${label}`;
|
|
88
89
|
const period = formatPeriod(call.fiscalYear, call.fiscalQuarter, call.fiscalHalf);
|
|
89
|
-
return period ===
|
|
90
|
+
return period === MISSING_VALUE ? call.ticker : `${call.ticker} ${period}`;
|
|
90
91
|
}
|
|
@@ -61,7 +61,7 @@ const localDay = (at: number) => {
|
|
|
61
61
|
/**
|
|
62
62
|
* How far away a call is. With its start: "in 25m" and "in 3h" within a day
|
|
63
63
|
* (the countdown econ events use), then its weekday on this machine's clock
|
|
64
|
-
* within the week ("Thu"), then its date ("Oct
|
|
64
|
+
* within the week ("Thu"), then its date ("30 Oct"); "started" once it has.
|
|
65
65
|
* Known by its day alone: "today", "tomorrow", then the same.
|
|
66
66
|
*/
|
|
67
67
|
export function callCountdown(call: CloudEarningsCallPayload, now = Date.now()): string {
|
|
@@ -86,7 +86,7 @@ export function callCountdown(call: CloudEarningsCallPayload, now = Date.now()):
|
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* The countdown when it says more than the call's day does: "in 3h", "today",
|
|
89
|
-
* "tomorrow". Null when it would only name the day ("Thu", "Oct
|
|
89
|
+
* "tomorrow". Null when it would only name the day ("Thu", "30 Oct").
|
|
90
90
|
*/
|
|
91
91
|
export function callAway(call: CloudEarningsCallPayload, now = Date.now()): string | null {
|
|
92
92
|
const countdown = callCountdown(call, now);
|
|
@@ -114,7 +114,7 @@ function clockFormatter(timeZone: string | undefined, withDay: boolean): Intl.Da
|
|
|
114
114
|
function clock(at: number, timeZone: string | undefined, withDay: boolean): string {
|
|
115
115
|
const parts = Object.fromEntries(clockFormatter(timeZone, withDay).formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
116
116
|
const time = `${parts.hour}:${parts.minute}`;
|
|
117
|
-
return withDay ? `${parts.weekday} ${parts.
|
|
117
|
+
return withDay ? `${parts.weekday} ${parts.day} ${parts.month} ${time}` : time;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
const NEW_YORK = "America/New_York";
|
|
@@ -137,8 +137,8 @@ export function clockIsNewYork(calls: readonly CloudEarningsCallPayload[], now =
|
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* When the next call starts, as its own line names it: the day and time here,
|
|
140
|
-
* then New York's ("Thu Oct 22
|
|
141
|
-
* two agree ("Thu Oct
|
|
140
|
+
* then New York's ("Thu 22 Oct 22:30", "16:30 ET"), New York's alone when the
|
|
141
|
+
* two agree ("Thu 22 Oct 16:30 ET"), or the day alone ("Thu 22 Oct").
|
|
142
142
|
*/
|
|
143
143
|
export function callStartText(call: CloudEarningsCallPayload, now = Date.now()): { start: string; newYork: string | null } {
|
|
144
144
|
const day = callDay(call);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { HeadlessPaneDefinition } from "../../../types/plugin";
|
|
2
3
|
import { fetchEarningsCalendar } from "../earnings/client";
|
|
3
4
|
import { fetchSupplyChain } from "../supply-chain/client";
|
|
@@ -5,7 +6,7 @@ import { fetchSupplyGraph } from "../supply-chain/graph-client";
|
|
|
5
6
|
import { loadRipple } from "./client";
|
|
6
7
|
import { hopLabel, revenueOwner, rippleEmptyText } from "./model";
|
|
7
8
|
|
|
8
|
-
const percent = (value: unknown) => typeof value === "number" ? `${(value * 100).toFixed(1)}%` :
|
|
9
|
+
const percent = (value: unknown) => typeof value === "number" ? `${(value * 100).toFixed(1)}%` : MISSING_VALUE;
|
|
9
10
|
|
|
10
11
|
export const earningsRippleHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
11
12
|
shape: "bundle",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { EarningsCalendarReport, EarningsTiming } from "../../../api-client/earnings";
|
|
2
3
|
import type { SupplyChainPayload, SupplyEntity, SupplyRow } from "../../../api-client/supply-chain";
|
|
3
4
|
import type { GraphPath, GraphPayload } from "../../../api-client/supply-chain-graph";
|
|
@@ -184,12 +185,12 @@ export function secondHopLinks(chains: ReadonlyMap<string, SupplyChainPayload>,
|
|
|
184
185
|
function hopShare(graph: GraphPayload, linkId: string): RippleHop {
|
|
185
186
|
const link = graph.links.find((entry) => entry.id === linkId);
|
|
186
187
|
const evidence = link?.evidence.find((item) => item.id === link.primaryEvidenceId);
|
|
187
|
-
return { owner: evidence ? entityLabel(evidence.reporter) :
|
|
188
|
+
return { owner: evidence ? entityLabel(evidence.reporter) : MISSING_VALUE, pct: evidence?.pctOfRevenue ?? null, basis: evidence?.pctBasis ?? null, scoped: !!evidence?.pctScope };
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
/** `30% of TSM`, `12% of AVGO purchases`, or `--` where the filing names the link without a figure. */
|
|
191
192
|
export function hopLabel(hop: RippleHop) {
|
|
192
|
-
if (hop.pct == null) return
|
|
193
|
+
if (hop.pct == null) return MISSING_VALUE;
|
|
193
194
|
return `${hop.pct}%${hop.scoped ? "*" : ""} of ${hop.owner}${hop.basis && hop.basis !== "revenue" ? ` ${hop.basis}` : ""}`;
|
|
194
195
|
}
|
|
195
196
|
|
|
@@ -8,7 +8,7 @@ import { useAsyncResource, useAutoRefresh, usePaneSettingValue, usePluginAppActi
|
|
|
8
8
|
import type { PaneProps } from "../../../types/plugin";
|
|
9
9
|
import { Box } from "../../../ui";
|
|
10
10
|
import { isUsListingExchange } from "../../../utils/exchanges";
|
|
11
|
-
import { displayWidth } from "../../../utils/format";
|
|
11
|
+
import { MISSING_VALUE, displayWidth } from "../../../utils/format";
|
|
12
12
|
import { CLOUD_PLAN_KEY, useCloudUpgradeAction } from "../shared/cloud-upgrade";
|
|
13
13
|
import { UpgradeLabel } from "../shared/locked-rows";
|
|
14
14
|
import { useResearchCloudSession } from "../shared/research-cloud-session";
|
|
@@ -95,32 +95,32 @@ function secondHopLayout(width: number, rows: readonly SecondHopRow[]) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
const move = (row: RippleRow | SecondHopRow): DataTableCell =>
|
|
98
|
-
({ text: row.averageMove == null ?
|
|
98
|
+
({ text: row.averageMove == null ? MISSING_VALUE : `±${(row.averageMove * 100).toFixed(1)}%`, value: row.averageMove });
|
|
99
99
|
|
|
100
100
|
function renderCell(row: RippleRow, column: DataTableColumn): DataTableCell {
|
|
101
101
|
switch (column.id) {
|
|
102
102
|
case "date": return { text: row.date };
|
|
103
|
-
case "timing": return { text: row.timing?.toUpperCase() ??
|
|
103
|
+
case "timing": return { text: row.timing?.toUpperCase() ?? MISSING_VALUE };
|
|
104
104
|
case "company": return { text: `${row.company} ${row.companyName}` };
|
|
105
105
|
case "link": return { text: row.link === "customer" ? "customer of" : "supplier to" };
|
|
106
106
|
case "holding": return { text: row.holding };
|
|
107
107
|
case "pct": return { text: `${row.pctOfRevenue}%${row.pctScope ? "*" : ""} of ${revenueOwner(row)}`, value: row.pctOfRevenue };
|
|
108
108
|
case "move": return move(row);
|
|
109
|
-
default: return { text: row.holdingDate ??
|
|
109
|
+
default: return { text: row.holdingDate ?? MISSING_VALUE };
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
function renderSecondHopCell(row: SecondHopRow, column: DataTableColumn, firstHopWidth: number): DataTableCell {
|
|
114
114
|
switch (column.id) {
|
|
115
115
|
case "date": return { text: row.date };
|
|
116
|
-
case "timing": return { text: row.timing?.toUpperCase() ??
|
|
116
|
+
case "timing": return { text: row.timing?.toUpperCase() ?? MISSING_VALUE };
|
|
117
117
|
case "company": return { text: `${row.company} ${row.companyName}` };
|
|
118
118
|
case "link": return { text: row.link === "customer" ? "customer's customer" : "supplier's supplier" };
|
|
119
119
|
case "via": return { text: row.via };
|
|
120
120
|
case "holding": return { text: row.holding };
|
|
121
121
|
case "shares": return { text: shareText(row, firstHopWidth, column.width), value: shareText(row, 0) };
|
|
122
122
|
case "move": return move(row);
|
|
123
|
-
default: return { text: row.holdingDate ??
|
|
123
|
+
default: return { text: row.holdingDate ?? MISSING_VALUE };
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -94,9 +94,9 @@ export function timeLabel(d: Date): string {
|
|
|
94
94
|
/** The zone the calendar's times and days are in, for the column header. */
|
|
95
95
|
export const CALENDAR_TIME_ZONE_LABEL = "UTC";
|
|
96
96
|
|
|
97
|
-
/** "Fri Oct
|
|
97
|
+
/** "Fri 9 Oct", the UTC day the calendar groups an instant under. */
|
|
98
98
|
export function shortDayLabel(d: Date): string {
|
|
99
|
-
return `${DAY_NAMES[d.getUTCDay()]!} ${
|
|
99
|
+
return `${DAY_NAMES[d.getUTCDay()]!} ${d.getUTCDate()} ${MONTH_NAMES[d.getUTCMonth()]!}`;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export function dayLabel(d: Date, today: Date): string {
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "../../../sources/gloomberb-cloud/fred-series";
|
|
31
31
|
import { colors } from "../../../theme/colors";
|
|
32
32
|
import { Box, Text } from "../../../ui";
|
|
33
|
-
import { displayWidth, truncateToDisplayWidth } from "../../../utils/format";
|
|
33
|
+
import { MISSING_VALUE, displayWidth, truncateToDisplayWidth } from "../../../utils/format";
|
|
34
34
|
import { useOpenTickerChoice } from "../shared/ticker-choice";
|
|
35
35
|
import { resolveFredMapping, projectFredHistory, fredHistoryUnits } from "./fred-series-map";
|
|
36
36
|
import { actualColor, CALENDAR_TIME_ZONE_LABEL, econEventName, figureGap, figureGapText, timeLabel } from "./calendar-model";
|
|
@@ -79,7 +79,7 @@ function formatHistoryValue(value: number, units: string): string {
|
|
|
79
79
|
|
|
80
80
|
/** A move in a percentage is in points, so it never reads as a relative change. */
|
|
81
81
|
function formatHistoryChange(change: number | null, units: string): string {
|
|
82
|
-
if (change == null) return
|
|
82
|
+
if (change == null) return MISSING_VALUE;
|
|
83
83
|
const text = isPercent(units)
|
|
84
84
|
? `${Math.abs(change).toFixed(2)}pp`
|
|
85
85
|
: Math.abs(change).toLocaleString("en-US", { maximumFractionDigits: 1 });
|
|
@@ -277,9 +277,10 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
|
|
|
277
277
|
// A reader who set a time zone (`config set timezone`) gets their clock in a column beside UTC.
|
|
278
278
|
const readerZone = readerTimeZone(useAppConfig().timezone);
|
|
279
279
|
const columns = useMemo<EconCalendarColumn[]>(() => {
|
|
280
|
-
//
|
|
281
|
-
|
|
282
|
-
const
|
|
280
|
+
// Named by its zone, as the reader's column is by its city: "TIME (UTC)" took 13
|
|
281
|
+
// cells over "07:00" while EVENT read "GDP Growth Ra…" (review, 12 Nov 2026).
|
|
282
|
+
const timeLabelText = CALENDAR_TIME_ZONE_LABEL;
|
|
283
|
+
const timeWidth = tableColumnWidth({ width: filtered.some(isAllDayEvent) ? "All day".length : 5, label: timeLabelText });
|
|
283
284
|
const actualWidth = valueColumnWidth(filtered, "actual", 9);
|
|
284
285
|
const forecastWidth = valueColumnWidth(filtered, "forecast", 10);
|
|
285
286
|
const priorWidth = valueColumnWidth(filtered, "prior", 9);
|
|
@@ -503,13 +504,13 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
|
|
|
503
504
|
const gap = figureGap(ev, now, events);
|
|
504
505
|
if (gap) return { text: gap === "none" ? NO_FIGURE_CELL : AWAITING_FIGURE_CELL, color: colors.warning, value: null };
|
|
505
506
|
return {
|
|
506
|
-
text: figureWithCurrency(ev.actual, ev.currency) ??
|
|
507
|
+
text: figureWithCurrency(ev.actual, ev.currency) ?? MISSING_VALUE,
|
|
507
508
|
color: actualColor(ev.actual, ev.forecast),
|
|
508
509
|
};
|
|
509
510
|
case "forecast":
|
|
510
|
-
return { text: figureWithCurrency(ev.forecast, ev.currency) ??
|
|
511
|
+
return { text: figureWithCurrency(ev.forecast, ev.currency) ?? MISSING_VALUE, color: colors.textDim };
|
|
511
512
|
case "prior":
|
|
512
|
-
return { text: figureWithCurrency(ev.prior, ev.currency) ??
|
|
513
|
+
return { text: figureWithCurrency(ev.prior, ev.currency) ?? MISSING_VALUE, color: colors.textDim };
|
|
513
514
|
}
|
|
514
515
|
}, [events, flagged, now, readerZone]);
|
|
515
516
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { useMemo } from "react";
|
|
2
3
|
import { ExternalLinkText, type StatItem } from "../../../components/ui";
|
|
3
4
|
import { fredSeriesUrl, fredSourceLabel } from "../../../sources/gloomberb-cloud/fred-series";
|
|
@@ -39,7 +40,7 @@ export function StatDetail({
|
|
|
39
40
|
const stat = view.stat;
|
|
40
41
|
const visible = view.visible;
|
|
41
42
|
const stats = useMemo<StatItem[]>(() => [
|
|
42
|
-
{ id: "year-ago", label: "1Y ago", value: view.yearAgo ? stat.formatValue(view.yearAgo.value) :
|
|
43
|
+
{ id: "year-ago", label: "1Y ago", value: view.yearAgo ? stat.formatValue(view.yearAgo.value) : MISSING_VALUE },
|
|
43
44
|
{ id: "high", label: "High", value: stat.formatValue(view.high.value), detail: view.high.date },
|
|
44
45
|
{ id: "low", label: "Low", value: stat.formatValue(view.low.value), detail: view.low.date },
|
|
45
46
|
// A range longer than the history shows all of it, from where it starts.
|