gloomberb 0.20.11 → 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 +2 -1
- package/src/account/billing.ts +3 -2
- package/src/account/upgrade-dialog.tsx +8 -8
- package/src/api-client/awards.ts +16 -0
- package/src/api-client/central-bank-rates.ts +5 -0
- package/src/api-client/data.ts +55 -2
- package/src/api-client/index.ts +28 -3
- package/src/api-client/install-experiments.ts +146 -0
- package/src/api-client/request.ts +86 -3
- package/src/api-client/socket-connection.ts +12 -1
- package/src/api-client/socket.ts +21 -3
- package/src/api-client/supply-chain-graph.ts +4 -2
- package/src/api-client/supply-chain.ts +8 -0
- package/src/api-client/telemetry.ts +47 -0
- package/src/api-client/types/econ.ts +10 -7
- package/src/api-client/types/filings-and-calls.ts +8 -0
- package/src/api-client/types/market.ts +4 -0
- package/src/api-client/types/news.ts +16 -0
- package/src/app/global-shortcuts.ts +2 -1
- package/src/app/keybindings/actions.ts +19 -0
- package/src/app/pane-runtime/index.tsx +18 -3
- package/src/app/pane-runtime/layout-placement.ts +63 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +10 -2
- 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/capabilities/chart-series.ts +4 -1
- package/src/cli/board-coins.ts +10 -1
- package/src/cli/commands/crypto-hints.ts +3 -2
- package/src/cli/commands/fred-series.ts +0 -54
- package/src/cli/commands/market.ts +260 -63
- package/src/cli/commands/overview.ts +50 -17
- package/src/cli/commands/search.ts +140 -17
- package/src/cli/commands/ticker.ts +37 -17
- package/src/cli/desktop-pane-shot.ts +27 -2
- package/src/cli/earnings-calendar.ts +33 -53
- package/src/cli/fx-quote-rate.ts +1 -1
- package/src/cli/glossary.ts +14 -5
- package/src/cli/history-catalog-series.ts +85 -0
- package/src/cli/history-rows.ts +18 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/known-gaps.ts +9 -0
- package/src/cli/list-progress.ts +45 -0
- package/src/cli/listing-arg.ts +176 -25
- package/src/cli/name-entries.ts +8 -4
- package/src/cli/not-a-ticker.ts +2 -2
- 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 +52 -5
- package/src/cli/pane-functions/headless.ts +8 -8
- package/src/cli/pane-functions/index.ts +8 -5
- package/src/cli/pane-functions/market-session.ts +66 -14
- package/src/cli/pane-functions/options.ts +5 -0
- package/src/cli/pane-functions/report.ts +4 -1
- package/src/cli/pane-functions/resolver.ts +9 -2
- package/src/cli/pane-functions/screenshot-assessment.ts +28 -3
- package/src/cli/pane-functions/screenshot-types.ts +6 -0
- package/src/cli/perpetual-contract.ts +4 -4
- package/src/cli/quote-answer.ts +55 -12
- package/src/cli/quote-list-reads.ts +87 -0
- package/src/cli/report-tables.ts +70 -13
- package/src/cli/result.ts +26 -3
- package/src/cli/symbol-list.ts +31 -4
- package/src/cli/terminal-code-hints.ts +83 -0
- package/src/cli/ticker-resolution.ts +2 -1
- package/src/cli/treasury-yields.ts +5 -0
- 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/action-runtime.ts +2 -0
- 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/command-bar/routing/launch-request.ts +2 -1
- package/src/components/command-bar/routing/navigation-state.ts +4 -2
- package/src/components/command-bar/workflow/types.ts +6 -0
- package/src/components/data-table/view.tsx +29 -6
- package/src/components/form-modal/host.tsx +1 -1
- package/src/components/layout/detached-pane-shell.tsx +3 -0
- package/src/components/layout/double-escape-close.ts +34 -3
- package/src/components/layout/floating-pane.tsx +10 -4
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +3 -3
- package/src/components/layout/pane/cycle-order.ts +66 -2
- package/src/components/layout/pane/error-boundary.tsx +2 -1
- package/src/components/layout/pane/header.tsx +140 -31
- package/src/components/layout/pane/sidebar.tsx +13 -5
- package/src/components/layout/pane/status-footer.ts +3 -1
- package/src/components/layout/shell/drag/runtime.ts +5 -0
- package/src/components/layout/shell/index.tsx +25 -0
- package/src/components/layout/shell/menu.ts +9 -0
- package/src/components/layout/shell/pane/actions.ts +36 -0
- package/src/components/layout/shell/pane/management-shortcuts.ts +27 -3
- package/src/components/layout/shell/pane-occlusion.ts +40 -0
- package/src/components/layout/shell/shortcuts.ts +17 -1
- package/src/components/layout/shell/terminal-pointer-runtime.ts +39 -6
- package/src/components/layout/shell/window-mode/index.ts +5 -16
- package/src/components/layout/shell/window-mode/overlays.tsx +3 -1
- package/src/components/markdown-text.tsx +36 -0
- package/src/components/market-board/index.tsx +18 -8
- package/src/components/metric-treemap/index.tsx +3 -1
- 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/button.tsx +48 -4
- package/src/components/ui/choice-dialog.tsx +101 -32
- package/src/components/ui/data-table/opentui/index.tsx +24 -9
- package/src/components/ui/data-table/types.ts +7 -0
- package/src/components/ui/inline-quick-add.tsx +19 -3
- package/src/components/ui/list-view.tsx +11 -5
- 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 +32 -5
- package/src/components/ui/selection-fill.ts +39 -0
- package/src/components/ui/stat-grid.tsx +27 -6
- package/src/core/state/app/layout-reducer.ts +2 -1
- package/src/core/state/app/pane-choices.ts +68 -0
- package/src/core/state/app/state.ts +14 -6
- package/src/core/state/app/types.ts +8 -0
- 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/pane-manager/dock-tree.ts +19 -0
- package/src/layout/pane-manager/index.ts +3 -0
- 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/market/freshness.ts +33 -0
- package/src/market-data/market/status.ts +5 -1
- package/src/market-data/quotes/contributions.ts +10 -0
- package/src/market-data/quotes/freshness.ts +19 -0
- package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
- package/src/market-data/quotes/live-valuation.ts +31 -4
- package/src/market-data/quotes/resolution.ts +4 -0
- package/src/market-data/quotes/time.ts +17 -24
- 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/index.tsx +1 -0
- 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 +17 -8
- package/src/plugins/builtin/awards/headless.ts +37 -15
- package/src/plugins/builtin/awards/model.ts +40 -5
- package/src/plugins/builtin/awards/pane.tsx +11 -8
- 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-manager/index.tsx +1 -0
- package/src/plugins/builtin/broker-trading/index.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 +8 -7
- package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +24 -5
- package/src/plugins/builtin/central-bank-rates/pane.tsx +19 -9
- package/src/plugins/builtin/changelog/index.tsx +2 -2
- package/src/plugins/builtin/chart-composer/headless.ts +5 -1
- package/src/plugins/builtin/chart-composer/index.tsx +4 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +8 -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/content/handle-prompt.tsx +4 -0
- package/src/plugins/builtin/chat/controller/realtime.ts +17 -1
- package/src/plugins/builtin/chat/controller/utils.ts +2 -1
- package/src/plugins/builtin/chat/message/terminal.tsx +4 -1
- package/src/plugins/builtin/chat/sidebar.tsx +3 -4
- 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 +39 -1
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
- package/src/plugins/builtin/cloud/plugin.tsx +1 -0
- package/src/plugins/builtin/cloud/team/module.tsx +1 -0
- package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
- package/src/plugins/builtin/cloud/thesis/detail.tsx +22 -12
- 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/commodity-balances/pane.tsx +13 -5
- 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 +18 -13
- 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/index.ts +1 -0
- 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 +14 -9
- package/src/plugins/builtin/credit-boards/client.ts +5 -0
- package/src/plugins/builtin/credit-boards/headless.ts +3 -7
- package/src/plugins/builtin/credit-boards/model.ts +5 -11
- package/src/plugins/builtin/credit-boards/series.ts +19 -8
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +9 -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/headless.ts +23 -13
- package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +8 -3
- 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/headless.ts +16 -7
- package/src/plugins/builtin/debt-maturities/model.ts +12 -18
- package/src/plugins/builtin/debt-maturities/pane.tsx +11 -12
- 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 +42 -7
- package/src/plugins/builtin/earnings/board-table.ts +13 -8
- package/src/plugins/builtin/earnings/board.tsx +15 -3
- package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
- package/src/plugins/builtin/earnings/calendar.tsx +11 -6
- package/src/plugins/builtin/earnings/client.ts +0 -9
- package/src/plugins/builtin/earnings/format.ts +16 -14
- package/src/plugins/builtin/earnings/headless.ts +64 -23
- 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 +22 -14
- package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings-calls/data.ts +24 -4
- package/src/plugins/builtin/earnings-calls/format.ts +29 -10
- package/src/plugins/builtin/earnings-calls/headless.ts +23 -3
- package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
- package/src/plugins/builtin/earnings-calls/model.ts +11 -1
- package/src/plugins/builtin/earnings-calls/pane.tsx +2 -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 +29 -2
- package/src/plugins/builtin/econ/detail-view.tsx +2 -2
- package/src/plugins/builtin/econ/fred-catalog.ts +3 -0
- package/src/plugins/builtin/econ/index.tsx +16 -8
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/headless.ts +7 -5
- package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
- 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 +18 -14
- package/src/plugins/builtin/fear-greed/pane.tsx +12 -4
- package/src/plugins/builtin/filing-events/feed.ts +2 -1
- package/src/plugins/builtin/filing-events/index.tsx +1 -0
- 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 +32 -21
- 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 +11 -8
- package/src/plugins/builtin/insider/tickers.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 +18 -16
- 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/index.tsx +1 -0
- 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 +9 -8
- package/src/plugins/builtin/macro-day/model.ts +3 -2
- package/src/plugins/builtin/macro-day/pane.tsx +4 -4
- package/src/plugins/builtin/macro-day/releases.ts +25 -16
- 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/index.tsx +20 -8
- package/src/plugins/builtin/market-movers/model.ts +5 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +2 -1
- 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 +14 -3
- package/src/plugins/builtin/money-markets/model.ts +3 -2
- package/src/plugins/builtin/money-markets/pane.tsx +14 -5
- 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 +48 -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 +6 -6
- 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/cli/bulk-symbols.ts +4 -31
- 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/index.tsx +6 -1
- 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 +24 -10
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +9 -11
- package/src/plugins/builtin/portfolio-list/table.tsx +10 -1
- 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 +37 -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/risk-factors/index.tsx +1 -0
- 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 +71 -0
- 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 +8 -3
- 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 +9 -5
- package/src/plugins/builtin/social-mentions/headless.ts +2 -1
- package/src/plugins/builtin/social-mentions/model.ts +4 -4
- package/src/plugins/builtin/social-mentions/outliers.tsx +10 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +7 -0
- package/src/plugins/builtin/supply-chain/client.ts +3 -1
- package/src/plugins/builtin/supply-chain/flow.tsx +25 -8
- package/src/plugins/builtin/supply-chain/graph-client.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-model.ts +14 -2
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +11 -10
- package/src/plugins/builtin/supply-chain/graph.tsx +12 -6
- package/src/plugins/builtin/supply-chain/headless.ts +15 -8
- package/src/plugins/builtin/supply-chain/model.ts +72 -15
- package/src/plugins/builtin/supply-chain/pane.tsx +11 -8
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +7 -6
- 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 +18 -5
- 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 +35 -7
- package/src/plugins/builtin/ticker-detail/pane.tsx +48 -24
- package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -0
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +13 -8
- 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/after.ts +50 -23
- package/src/plugins/builtin/treasury-auctions/cache.ts +23 -5
- package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
- package/src/plugins/builtin/treasury-auctions/headless.ts +231 -42
- package/src/plugins/builtin/treasury-auctions/hk-headless.ts +14 -7
- package/src/plugins/builtin/treasury-auctions/hk-view.tsx +37 -34
- package/src/plugins/builtin/treasury-auctions/hk.ts +65 -13
- package/src/plugins/builtin/treasury-auctions/index.tsx +3 -0
- package/src/plugins/builtin/treasury-auctions/keys.ts +27 -0
- package/src/plugins/builtin/treasury-auctions/like.ts +137 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +101 -23
- package/src/plugins/builtin/treasury-auctions/pane.tsx +56 -28
- 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 +6 -3
- package/src/plugins/builtin/vol-surface/pane.tsx +13 -9
- 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/plugins/runtime/index.tsx +1 -0
- package/src/plugins/runtime/state.ts +20 -0
- package/src/portfolio/allocation.ts +5 -5
- package/src/portfolio/column-values.ts +54 -42
- package/src/portfolio/futures-positions.ts +2 -1
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/react.ts +7 -0
- package/src/react/auto-refresh.ts +29 -0
- package/src/renderers/browser/deeplink-bridge.ts +24 -3
- package/src/renderers/dom/desktop/query-bar.tsx +229 -60
- package/src/renderers/dom/host/overflow-fade-px.ts +2 -0
- package/src/renderers/dom/host/overflow-fade.ts +1 -2
- package/src/renderers/dom/styles.css +25 -5
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -1
- package/src/renderers/opentui/ui-host.tsx +32 -2
- package/src/renderers/share/layout-view.tsx +2 -1
- package/src/series/types.ts +2 -0
- package/src/sources/gloomberb-cloud/fred-attribution.ts +86 -0
- package/src/sources/gloomberb-cloud/index.ts +25 -1
- package/src/sources/gloomberb-cloud/news.ts +9 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +24 -3
- package/src/sources/provider-errors.ts +64 -1
- package/src/sources/provider-router/batches.ts +19 -0
- package/src/sources/provider-router/index.ts +7 -1
- package/src/sources/provider-router/search.ts +15 -10
- package/src/state/app/context/index.tsx +24 -1
- package/src/state/hooks/inline-tickers.ts +3 -2
- package/src/state/hooks/quote-streaming.ts +9 -10
- package/src/state/pane-unsent-work.ts +47 -0
- package/src/team/collections-sync.ts +8 -3
- package/src/telemetry/usage-counts.ts +26 -0
- package/src/test-support/shell-pane-keys.tsx +5 -0
- package/src/test-support/telemetry-guard.ts +83 -0
- package/src/test-support/test-env.ts +12 -0
- package/src/theme/colors.ts +17 -1
- package/src/theme/ui-tokens.ts +50 -1
- package/src/tickers/company-name-listing.ts +2 -2
- package/src/tickers/company-name.ts +17 -1
- package/src/tickers/listing-venues.ts +37 -2
- package/src/tickers/renamed-listings.ts +2 -1
- package/src/tickers/search/index.ts +19 -0
- package/src/tickers/search/japanese-names.json +1 -0
- package/src/tickers/search/japanese-names.ts +152 -0
- package/src/tickers/starter-symbols.ts +7 -0
- package/src/tickers/terminal-codes.ts +55 -6
- package/src/time-series/base-series.ts +3 -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 +9 -2
- package/src/types/financials.ts +26 -0
- package/src/types/instrument.ts +6 -0
- package/src/types/plugin-contributions.ts +7 -0
- package/src/types/plugin-panes.ts +8 -1
- package/src/types/plugin-reports.ts +8 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/datetime-format.ts +74 -33
- package/src/utils/double-escape-close.ts +42 -0
- 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/fx-status.ts +30 -7
- package/src/utils/growth.ts +67 -0
- package/src/utils/keyboard.ts +6 -0
- package/src/utils/network-failure.ts +23 -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
|
@@ -3,6 +3,7 @@ import { CompanyLogoMark } from "../../../components/company-logo";
|
|
|
3
3
|
import { PaneStatusBody } from "../../../components";
|
|
4
4
|
import { ClippedText } from "../../../components/ui/display";
|
|
5
5
|
import { FILL_REST } from "../../../components/ui/fill";
|
|
6
|
+
import { useSelectionFill } from "../../../components/ui/selection-fill";
|
|
6
7
|
import { afterLayout, revealInScrollBox } from "../../../components/ui/reveal-in-scroll-box";
|
|
7
8
|
import { useDoubleClickActivation } from "../../../components/use-double-click-activation";
|
|
8
9
|
import { useShortcut } from "../../../react/input";
|
|
@@ -285,9 +286,11 @@ function ReportTile({ report, selected, onPress, tileRef }: {
|
|
|
285
286
|
tileRef: (node: BoxRenderable | null) => void;
|
|
286
287
|
}) {
|
|
287
288
|
const colors = useThemeColors();
|
|
289
|
+
const selectionFill = useSelectionFill();
|
|
288
290
|
const surprise = report.epsSurprise;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
+
// An N/M surprise (against a loss or zero estimate) is no number to colour by.
|
|
292
|
+
const tone = typeof surprise !== "number" || surprise === 0 ? colors.text : surprise > 0 ? colors.positive : colors.negative;
|
|
293
|
+
const ink = !selected ? tone : selectionFill.lit ? colors.selectedText : selectionFill.ink(tone);
|
|
291
294
|
return (
|
|
292
295
|
<Box
|
|
293
296
|
ref={tileRef}
|
|
@@ -296,7 +299,7 @@ function ReportTile({ report, selected, onPress, tileRef }: {
|
|
|
296
299
|
minWidth={0}
|
|
297
300
|
flexDirection="column"
|
|
298
301
|
alignItems="center"
|
|
299
|
-
backgroundColor={selected ?
|
|
302
|
+
backgroundColor={selected ? selectionFill.bg : undefined}
|
|
300
303
|
hoverBackgroundColor={selected ? undefined : "var(--gloom-hover-fill)"}
|
|
301
304
|
onMouseDown={onPress}
|
|
302
305
|
title={reportTitle(report)}
|
|
@@ -323,6 +326,8 @@ function MoreTile({ count, selected, onPress, tileRef }: {
|
|
|
323
326
|
tileRef: (node: BoxRenderable | null) => void;
|
|
324
327
|
}) {
|
|
325
328
|
const colors = useThemeColors();
|
|
329
|
+
const selectionFill = useSelectionFill();
|
|
330
|
+
const lit = selected && selectionFill.lit;
|
|
326
331
|
return (
|
|
327
332
|
<Box
|
|
328
333
|
ref={tileRef}
|
|
@@ -332,7 +337,7 @@ function MoreTile({ count, selected, onPress, tileRef }: {
|
|
|
332
337
|
flexDirection="column"
|
|
333
338
|
alignItems="center"
|
|
334
339
|
justifyContent="center"
|
|
335
|
-
backgroundColor={selected ?
|
|
340
|
+
backgroundColor={selected ? selectionFill.bg : undefined}
|
|
336
341
|
hoverBackgroundColor={selected ? undefined : "var(--gloom-hover-fill)"}
|
|
337
342
|
onMouseDown={onPress}
|
|
338
343
|
title={`Show the other ${count}`}
|
|
@@ -342,9 +347,9 @@ function MoreTile({ count, selected, onPress, tileRef }: {
|
|
|
342
347
|
style={TILE_STYLE}
|
|
343
348
|
>
|
|
344
349
|
<Box style={LOGO_STYLE} alignItems="center" justifyContent="center">
|
|
345
|
-
<Text fg={
|
|
350
|
+
<Text fg={lit ? colors.selectedText : selected ? selectionFill.ink(colors.textDim) : colors.textDim} attributes={TextAttributes.BOLD}>{`+${count}`}</Text>
|
|
346
351
|
</Box>
|
|
347
|
-
<Text fg={
|
|
352
|
+
<Text fg={lit ? colors.selectedText : colors.textMuted}>more</Text>
|
|
348
353
|
</Box>
|
|
349
354
|
);
|
|
350
355
|
}
|
|
@@ -114,15 +114,6 @@ export function cachedEarningsHistory(symbol: string, accessKey?: string) {
|
|
|
114
114
|
return cachedCloudResource(historyCache, historyKey(symbol, undefined, accessKey), (payload) => validateEarningsHistory(payload, symbol));
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
/**
|
|
118
|
-
* Whether ERN reads a listing's own past reports: every US listing, and of
|
|
119
|
-
* the listings abroad Hong Kong's, which Gloom Cloud reads from their
|
|
120
|
-
* results announcements. Any other listing abroad shows its next report.
|
|
121
|
-
*/
|
|
122
|
-
export function hasEarningsHistory(venueAbroad: string | null): boolean {
|
|
123
|
-
return venueAbroad == null || venueAbroad === "HKEX";
|
|
124
|
-
}
|
|
125
|
-
|
|
126
117
|
/** A server that does not read a listing abroad's history yet refuses it (400): the next report stands alone, as before. */
|
|
127
118
|
export function noHistoryAbroad(error: unknown): null {
|
|
128
119
|
if (error instanceof ApiRequestError && error.status === 400) return null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { formatShortDate } from "../../../utils/datetime-format";
|
|
1
2
|
import type { EarningsTiming } from "../../../api-client/earnings";
|
|
2
|
-
import { formatCompact, formatNumber } from "../../../utils/format";
|
|
3
|
+
import { MISSING_VALUE, formatCompact, formatNumber } from "../../../utils/format";
|
|
4
|
+
import { isNotMeaningful, NOT_MEANINGFUL_TEXT, type NotMeaningful } from "../../../utils/growth";
|
|
3
5
|
|
|
4
6
|
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] as const;
|
|
5
7
|
const WEEKDAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] as const;
|
|
@@ -8,13 +10,12 @@ const utcDate = (date: string) => new Date(`${date}T00:00:00Z`);
|
|
|
8
10
|
|
|
9
11
|
export const TIMING_LABEL: Record<EarningsTiming, string> = { bmo: "BMO", dmh: "DMH", amc: "AMC" };
|
|
10
12
|
|
|
11
|
-
/** "Oct
|
|
13
|
+
/** "29 Oct" */
|
|
12
14
|
export function shortDate(date: string): string {
|
|
13
|
-
|
|
14
|
-
return `${MONTHS[day.getUTCMonth()]} ${day.getUTCDate()}`;
|
|
15
|
+
return formatShortDate(utcDate(date), { year: false, utc: true });
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
/** "Oct
|
|
18
|
+
/** "29 Oct '26" */
|
|
18
19
|
export function datedYear(date: string): string {
|
|
19
20
|
return `${shortDate(date)} '${date.slice(2, 4)}`;
|
|
20
21
|
}
|
|
@@ -26,33 +27,34 @@ export function weekday(date: string): string {
|
|
|
26
27
|
|
|
27
28
|
/** Fiscal quarter end month: "Sep '26". */
|
|
28
29
|
export function fiscalMonth(period: string | null): string {
|
|
29
|
-
if (!period) return
|
|
30
|
+
if (!period) return MISSING_VALUE;
|
|
30
31
|
return `${MONTHS[Number(period.slice(5, 7)) - 1]} '${period.slice(2, 4)}`;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/** An implied move, priced in either direction: "±6.1%". */
|
|
34
35
|
export function impliedText(move: number | null | undefined): string {
|
|
35
|
-
return move == null ?
|
|
36
|
+
return move == null ? MISSING_VALUE : `±${(move * 100).toFixed(1)}%`;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/** A size of move without a sign: "4.1%". */
|
|
39
40
|
export function moveSize(move: number | null | undefined): string {
|
|
40
|
-
return move == null ?
|
|
41
|
+
return move == null ? MISSING_VALUE : `${(Math.abs(move) * 100).toFixed(1)}%`;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
/** A signed move or surprise: "+3.2%", "-7.4%". */
|
|
44
|
-
export function signedPercent(value: number | null | undefined): string {
|
|
45
|
-
if (value
|
|
44
|
+
/** A signed move or surprise: "+3.2%", "-7.4%"; N/M for a surprise against a loss or zero estimate. */
|
|
45
|
+
export function signedPercent(value: number | NotMeaningful | null | undefined): string {
|
|
46
|
+
if (isNotMeaningful(value)) return NOT_MEANINGFUL_TEXT;
|
|
47
|
+
if (value == null) return MISSING_VALUE;
|
|
46
48
|
const shown = Number((value * 100).toFixed(1));
|
|
47
49
|
return `${shown > 0 ? "+" : ""}${shown.toFixed(1)}%`;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
export function epsText(value: number | null | undefined): string {
|
|
51
|
-
return value == null ?
|
|
53
|
+
return value == null ? MISSING_VALUE : formatNumber(value, 2);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export function moneyText(value: number | null | undefined): string {
|
|
55
|
-
return value == null ?
|
|
57
|
+
return value == null ? MISSING_VALUE : formatCompact(value, { fixedDecimals: true });
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
export { epsSurprise as surprise } from "../shared/earnings-report";
|
|
60
|
+
export { epsSurprise as surprise, type Surprise } from "../shared/earnings-report";
|
|
@@ -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,
|
|
@@ -9,15 +11,17 @@ import type {
|
|
|
9
11
|
HeadlessRowsResult,
|
|
10
12
|
} from "../../../types/plugin";
|
|
11
13
|
import type { EarningsEvent } from "../../../types/data-provider";
|
|
12
|
-
import { addDays, boardKey, boardReport, boardRowOf, fallbackReport, MIN_AVERAGE_REPORTS, newYorkToday, type BoardReport } from "./board-model";
|
|
14
|
+
import { addDays, boardKey, boardReport, boardRowOf, fallbackReport, historyListing, MIN_AVERAGE_REPORTS, newYorkToday, type BoardReport } from "./board-model";
|
|
13
15
|
import { BOARD_WEEKS, boardRangeDays, boardRangeLabel, isBoardWeek, requestedBoardRange, type BoardRange } from "./calendar-model";
|
|
14
|
-
import { fetchEarningsCalendar, fetchEarningsHistory,
|
|
16
|
+
import { fetchEarningsCalendar, fetchEarningsHistory, noHistoryAbroad, sameHistoryListing } from "./client";
|
|
15
17
|
import { loadEarningsCalendar } from "./data/cache";
|
|
16
18
|
import { epsText, impliedText, moneyText, moveSize, signedPercent, TIMING_LABEL } from "./format";
|
|
17
19
|
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,29 +267,40 @@ 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.
|
|
257
|
-
const
|
|
258
|
-
const abroad = !hasEarningsHistory(venueAbroad);
|
|
259
|
-
const ownAbroad = venueAbroad != null && !abroad;
|
|
293
|
+
// A Hong Kong, Singapore or China A listing has its own, from its exchange's results calendar and announcements.
|
|
294
|
+
const { listing, abroad, ownAbroad } = historyListing(symbol);
|
|
260
295
|
const [history, upcoming] = await Promise.allSettled([
|
|
261
|
-
abroad ? Promise.resolve(null) : ownAbroad ? deps.history(
|
|
296
|
+
abroad ? Promise.resolve(null) : ownAbroad ? deps.history(listing, context).catch(noHistoryAbroad) : deps.history(listing, context),
|
|
262
297
|
deps.upcoming([symbol], context),
|
|
263
298
|
]);
|
|
264
299
|
if (history.status === "rejected" && upcoming.status === "rejected") throw history.reason;
|
|
265
300
|
const payload = history.status === "fulfilled" ? history.value : null;
|
|
266
301
|
const next = upcoming.status === "fulfilled" ? upcoming.value[0] ?? null : null;
|
|
267
302
|
const notice = abroad
|
|
268
|
-
? 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)
|
|
269
304
|
: null;
|
|
270
305
|
const rows = historyRows(payload, newYorkToday(), next, { abroad: ownAbroad }).map((row) => ({
|
|
271
306
|
date: row.date,
|
|
@@ -287,11 +322,11 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
|
|
|
287
322
|
epsActual: row.epsActual,
|
|
288
323
|
epsActualProvisional: row.provisional,
|
|
289
324
|
epsBasis: !showsEpsBasis(row) ? null : !row.epsBasis && row.epsDilution === "basic" ? "basic" : epsBasisName(row.epsBasis),
|
|
290
|
-
epsSurprise
|
|
325
|
+
...surpriseFields("epsSurprise", row.epsSurprise),
|
|
291
326
|
revenueEstimate: row.revenueEstimate,
|
|
292
327
|
revenueActual: row.revenueActual,
|
|
293
328
|
revenueActualProvisional: row.revenueProvisional,
|
|
294
|
-
revenueSurprise
|
|
329
|
+
...surpriseFields("revenueSurprise", row.revenueSurprise),
|
|
295
330
|
impliedMove: row.implied,
|
|
296
331
|
impliedFrom: row.impliedMethod === "trade-close" ? "trade closes" : row.impliedMethod === "quote-mid" ? "quote mids" : null,
|
|
297
332
|
move: row.move,
|
|
@@ -299,10 +334,16 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
|
|
|
299
334
|
// An ETF, an index, a currency pair, a coin or a future has no earnings: that is the answer, not a gap in the data,
|
|
300
335
|
// and a history that failed for one (a coin is no US ticker) is no error.
|
|
301
336
|
const noEarnings = rows.length === 0 && !abroad ? await loadNoEarningsText(context.marketData, symbol, "cli") : null;
|
|
337
|
+
// A company ERN covers whose history answered with nothing (AIA's, 1299:HKEX) has no reports on record yet: no
|
|
338
|
+
// complete answer, and not one ERN does not cover.
|
|
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);
|
|
302
343
|
return {
|
|
303
344
|
columns: ownAbroad ? LISTING_HISTORY_COLUMNS : HISTORY_COLUMNS,
|
|
304
345
|
rows,
|
|
305
|
-
...(noEarnings ? { empty: noEarnings, complete: true, unavailableSymbols: [] } : {}),
|
|
346
|
+
...(noEarnings ? { empty: noEarnings, complete: true, unavailableSymbols: [] } : empty ? { empty } : {}),
|
|
306
347
|
errors: history.status === "rejected" && !noEarnings ? [String(history.reason instanceof Error ? history.reason.message : history.reason)] : undefined,
|
|
307
348
|
metadata: {
|
|
308
349
|
symbol, name: payload?.name ?? next?.name ?? null, asOf: payload?.asOf ?? null,
|
|
@@ -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
|
}
|
|
@@ -12,19 +12,21 @@ import { ageFooterSegment } from "../../../components/layout/pane/footer";
|
|
|
12
12
|
import { staticSeries } from "../../../components/chart/static/series";
|
|
13
13
|
import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
|
|
14
14
|
import { useAsyncResource, useAutoRefresh, usePluginPaneState, useUpdatedAgo } from "../../../public/react";
|
|
15
|
+
import { useUtcDay } from "../../../react/auto-refresh";
|
|
16
|
+
import { reportFooterSegment } from "../shared/source-footer";
|
|
17
|
+
import { earningsCalendarHeadless } from "./headless";
|
|
15
18
|
import { colors } from "../../../theme/colors";
|
|
16
19
|
import { useLiveStreamingSetting } from "../../../state/hooks/live-streaming";
|
|
17
20
|
import { useAssetData } from "../../runtime";
|
|
18
21
|
import { isBoardRowLoading, useQuoteBoard } from "../shared/use-quote-board";
|
|
19
|
-
import { newYorkToday, reportMove } from "./board-model";
|
|
22
|
+
import { historyListing, newYorkToday, reportMove } from "./board-model";
|
|
20
23
|
import { usePlanAccess } from "../../../api-client/plan-access";
|
|
21
24
|
import { useResearchCloudSession } from "../shared/research-cloud-session";
|
|
22
|
-
import { cachedEarningsHistory,
|
|
25
|
+
import { cachedEarningsHistory, loadEarningsHistory, noHistoryAbroad } from "./client";
|
|
23
26
|
import { loadEarningsCalendar } from "./data/cache";
|
|
24
27
|
import { chartAxis, chartPoints, chartRows, historyFigures, historyRows, type HistoryRow } from "./history-model";
|
|
25
28
|
import { historyColumns, renderHistoryCell, type HistoryColumn, type LiveMove } from "./history-table";
|
|
26
29
|
import { loadNoEarningsText } from "./no-earnings";
|
|
27
|
-
import { listingAbroadVenue } from "../../../utils/sec";
|
|
28
30
|
|
|
29
31
|
const barDate = (row: HistoryRow) => (row.implied != null || row.move != null ? new Date(`${row.date}T00:00:00Z`) : null);
|
|
30
32
|
|
|
@@ -41,11 +43,10 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
41
43
|
registrationId: string;
|
|
42
44
|
}) {
|
|
43
45
|
const dataProvider = useAssetData();
|
|
44
|
-
// Past reports are
|
|
45
|
-
// announcements, in their currency)
|
|
46
|
-
|
|
47
|
-
const abroad =
|
|
48
|
-
const ownAbroad = venueAbroad != null && !abroad;
|
|
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.
|
|
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.
|
|
51
52
|
const access = usePlanAccess();
|
|
@@ -53,11 +54,11 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
53
54
|
const accessKey = ownAbroad ? `${session.requestKey}:${access.hasProAccess ? "pro" : "free"}` : undefined;
|
|
54
55
|
const loader = useCallback(
|
|
55
56
|
(force: boolean) => (abroad ? Promise.resolve(null)
|
|
56
|
-
: ownAbroad ? loadEarningsHistory(
|
|
57
|
-
: loadEarningsHistory(
|
|
58
|
-
[abroad, accessKey,
|
|
57
|
+
: ownAbroad ? loadEarningsHistory(listing, force, undefined, accessKey).catch(noHistoryAbroad)
|
|
58
|
+
: loadEarningsHistory(listing, force)),
|
|
59
|
+
[abroad, accessKey, listing, ownAbroad],
|
|
59
60
|
);
|
|
60
|
-
const resource = useAsyncResource(loader, { initialData: () => (abroad ? null : cachedEarningsHistory(
|
|
61
|
+
const resource = useAsyncResource(loader, { initialData: () => (abroad ? null : cachedEarningsHistory(listing, accessKey)) });
|
|
61
62
|
// Past the stored calendar's horizon, and for listings it does not carry, the per-ticker calendar has the next date.
|
|
62
63
|
const upcomingLoader = useCallback(
|
|
63
64
|
(force: boolean) => loadEarningsCalendar(dataProvider, [symbol], { force }).then((result) => result.events[0] ?? null),
|
|
@@ -115,6 +116,14 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
115
116
|
// A coin's history fails (it is no US ticker), which says nothing once its type has answered.
|
|
116
117
|
const historyError = noEarnings.loading || noEarnings.data ? null : resource.error;
|
|
117
118
|
const updatedAgo = useUpdatedAgo(resource.updatedAt);
|
|
119
|
+
const utcDay = useUtcDay();
|
|
120
|
+
// Its source and when the history was read, as `fn ERN` ends; how long ago it loaded goes first on a narrow row.
|
|
121
|
+
const footerInfo = useMemo(() => abroad
|
|
122
|
+
? [{ id: "us-listings", parts: [{ text: "past reports: US, Hong Kong, Singapore and China A listings only", tone: "muted" as const }] }]
|
|
123
|
+
: payload ? [
|
|
124
|
+
reportFooterSegment(earningsCalendarHeadless, { rows: [], metadata: { asOf: payload.asOf } }),
|
|
125
|
+
...(updatedAgo ? [ageFooterSegment(updatedAgo)] : []),
|
|
126
|
+
] : [], [abroad, payload, updatedAgo, utcDay]);
|
|
118
127
|
useAutoRefresh(resource.updatedAt, resource.load);
|
|
119
128
|
usePaneRefreshKey(() => { resource.reload(); upcoming.reload(); }, { focused });
|
|
120
129
|
usePaneStatusFooter({
|
|
@@ -122,8 +131,7 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
122
131
|
loading: resource.loading,
|
|
123
132
|
error: historyError,
|
|
124
133
|
stale: !!resource.data?.stale,
|
|
125
|
-
info:
|
|
126
|
-
: payload && updatedAgo ? [ageFooterSegment(updatedAgo)] : [],
|
|
134
|
+
info: footerInfo,
|
|
127
135
|
});
|
|
128
136
|
|
|
129
137
|
return (
|
|
@@ -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" },
|