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
|
@@ -2,7 +2,7 @@ import type { PerpBoardRow, PerpHistoryPayload, PerpLongShortRatio, PerpRankings
|
|
|
2
2
|
import type { DataTableCell, DataTableColumn } from "../../../components";
|
|
3
3
|
import { scalarPoint, staticSeries } from "../../../components/chart/static/series";
|
|
4
4
|
import { getTableWidth } from "../../../components/ui/table-layout";
|
|
5
|
-
import { formatCompact } from "../../../utils/format";
|
|
5
|
+
import { MISSING_VALUE, formatCompact } from "../../../utils/format";
|
|
6
6
|
import { isUsListingExchange, publicTickerKey } from "../../../utils/exchanges";
|
|
7
7
|
import { isRecord } from "../../../utils/guards";
|
|
8
8
|
import type { ThemeColors } from "../../../theme/colors";
|
|
@@ -31,12 +31,12 @@ export function uncoveredVenueNote(venue: string): string | null {
|
|
|
31
31
|
export const BOARD_SORTS = ["oi", "funding", "oi-change", "premium", "long-short"] as const;
|
|
32
32
|
export const sortLabel = (sort: string) => ({ oi: "OI", funding: "Funding", "oi-change": "OI change", premium: "Premium", "long-short": "Long %" })[sort] ?? sort;
|
|
33
33
|
export const label = (s: string) => s === "fx" ? "FX" : s.charAt(0).toUpperCase() + s.slice(1);
|
|
34
|
-
export const percent = (n: number | null | undefined, digits = 3) => n == null ?
|
|
35
|
-
export const price = (n: number | null | undefined) => n == null ?
|
|
36
|
-
export const compact = (n: number | null | undefined) => n == null ?
|
|
37
|
-
export const time = (s: string | null | undefined) => s ? `${s.slice(0, 10)} ${s.slice(11, 16)} UTC` :
|
|
34
|
+
export const percent = (n: number | null | undefined, digits = 3) => n == null ? MISSING_VALUE : `${n > 0 ? "+" : ""}${(n * 100).toFixed(digits)}%`;
|
|
35
|
+
export const price = (n: number | null | undefined) => n == null ? MISSING_VALUE : n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: n < 1 ? 6 : 2 });
|
|
36
|
+
export const compact = (n: number | null | undefined) => n == null ? MISSING_VALUE : formatCompact(n, { fixedDecimals: true });
|
|
37
|
+
export const time = (s: string | null | undefined) => s ? `${s.slice(0, 10)} ${s.slice(11, 16)} UTC` : MISSING_VALUE;
|
|
38
38
|
/** A list row's observation, month to minute: the header names UTC and the footer the full as-of. */
|
|
39
|
-
export const observed = (s: string | null | undefined) => s ? `${s.slice(5, 10)} ${s.slice(11, 16)}` :
|
|
39
|
+
export const observed = (s: string | null | undefined) => s ? `${s.slice(5, 10)} ${s.slice(11, 16)}` : MISSING_VALUE;
|
|
40
40
|
/**
|
|
41
41
|
* The listed security a market tracks, as DES, FA and G take it: a US listing by its symbol, the key a stock is
|
|
42
42
|
* saved and opened under, and a listing abroad with its venue (`NET:XLON`), so they open the security the premium
|
|
@@ -137,7 +137,7 @@ export function collectedVenueCount(sources: unknown): number | null {
|
|
|
137
137
|
}));
|
|
138
138
|
return venues.size || null;
|
|
139
139
|
}
|
|
140
|
-
export const fundingInterval = (row: Pick<PerpBoardRow, "fundingIntervalHours" | "fundingKind">) => row.fundingIntervalHours ? `${row.fundingIntervalHours}h${row.fundingKind === "last-paid" ? " paid" : row.fundingKind === "continuous" ? " continuous" : ""}` :
|
|
140
|
+
export const fundingInterval = (row: Pick<PerpBoardRow, "fundingIntervalHours" | "fundingKind">) => row.fundingIntervalHours ? `${row.fundingIntervalHours}h${row.fundingKind === "last-paid" ? " paid" : row.fundingKind === "continuous" ? " continuous" : ""}` : MISSING_VALUE;
|
|
141
141
|
export const HISTORY_METRICS = ["funding", "oi", "premium", "price", "long-short"] as const;
|
|
142
142
|
export type HistoryMetric = typeof HISTORY_METRICS[number];
|
|
143
143
|
export const metricLabel = (metric: HistoryMetric) => metric === "oi" ? "OI" : metric === "long-short" ? "L/S" : label(metric);
|
|
@@ -175,9 +175,9 @@ export const venueLabel = (row: Pick<PerpBoardRow, "venue">) => venueName(row.ve
|
|
|
175
175
|
export const venuesOf = (rows: readonly Pick<PerpBoardRow, "venue">[]): string[] => [...new Set<string>(rows.map((row) => row.venue))].sort((a, b) => venueName(a).localeCompare(venueName(b)));
|
|
176
176
|
|
|
177
177
|
/** A share of accounts, unsigned: 0.6183 reads 61.8%. */
|
|
178
|
-
export const share = (n: number | null | undefined, digits = 1) => n == null ?
|
|
178
|
+
export const share = (n: number | null | undefined, digits = 1) => n == null ? MISSING_VALUE : `${(n * 100).toFixed(digits)}%`;
|
|
179
179
|
/** Long accounts per short account, as the venue publishes it. */
|
|
180
|
-
export const ratioText = (n: number | null | undefined, digits = 2) => n == null ?
|
|
180
|
+
export const ratioText = (n: number | null | undefined, digits = 2) => n == null ? MISSING_VALUE : n.toFixed(digits);
|
|
181
181
|
/** What a long/short reading counts, short enough for a legend; `definitionText` says it in full. */
|
|
182
182
|
const longShortDefinition = (definition: string | null | undefined) => definition === "accounts_all" || !definition ? "All accounts" : label(definition.replaceAll("_", " "));
|
|
183
183
|
const LONG_SHORT_REASONS: Record<string, string> = { unsupported: "This venue publishes no per-contract account ratio", off: "Not collected yet", collecting: "Collecting" };
|
|
@@ -207,8 +207,8 @@ export function positioningFields(row: Pick<PerpBoardRow, "longShortRatio" | "lo
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
// One text per figure, shared by the pane cells and the text report so the two always agree.
|
|
210
|
-
const markText = (row: Pick<PerpBoardRow, "markPrice" | "quoteCurrency">) => row.markPrice == null ?
|
|
211
|
-
const fundingPerInterval = (row: Pick<PerpBoardRow, "fundingRate" | "fundingIntervalHours" | "fundingKind">) => row.fundingRate == null ?
|
|
210
|
+
const markText = (row: Pick<PerpBoardRow, "markPrice" | "quoteCurrency">) => row.markPrice == null ? MISSING_VALUE : `${price(row.markPrice)} ${row.quoteCurrency}`;
|
|
211
|
+
const fundingPerInterval = (row: Pick<PerpBoardRow, "fundingRate" | "fundingIntervalHours" | "fundingKind">) => row.fundingRate == null ? MISSING_VALUE : `${percent(row.fundingRate, 5)} /${fundingInterval(row)}`;
|
|
212
212
|
/**
|
|
213
213
|
* The contract a bare name opens: the one with the largest open interest across venues, among the venues read
|
|
214
214
|
* recently (a stale one only when every one is). When that contract is Hyperliquid's, Hyperliquid's own pick is
|
|
@@ -252,7 +252,7 @@ export function venueAprSummary(rows: readonly PerpBoardRow[]) {
|
|
|
252
252
|
oiWeighted: rated.length >= 2 ? oiWeighted : null, baseline, stale };
|
|
253
253
|
}
|
|
254
254
|
/** Percentage points between two fractions: 0.00003 reads 0.0030pp. */
|
|
255
|
-
const points = (n: number | null | undefined, digits = 4) => n == null ?
|
|
255
|
+
const points = (n: number | null | undefined, digits = 4) => n == null ? MISSING_VALUE : `${(n * 100).toFixed(digits)}pp`;
|
|
256
256
|
|
|
257
257
|
export type PerpColumnId = "market" | "venue" | "symbol" | "markPrice" | "fundingRate" | "fundingRate8h" | "fundingApr" | "premium"
|
|
258
258
|
| "openInterestUsd" | "oiChange24h" | "longShare" | "priceChange24h" | "observedAt" | "value";
|
|
@@ -315,7 +315,7 @@ export function perpCellText(row: PerpBoardRow, id: PerpColumnId): string {
|
|
|
315
315
|
if (id === "observedAt") return observed(row.observedAt);
|
|
316
316
|
if (id === "longShare") return share(row.longShortRatio?.longShare);
|
|
317
317
|
const digits = SIGNED[id];
|
|
318
|
-
return digits === undefined ?
|
|
318
|
+
return digits === undefined ? MISSING_VALUE : percent(row[id as keyof PerpBoardRow] as number | null, digits);
|
|
319
319
|
}
|
|
320
320
|
export function perpCell(row: PerpBoardRow, id: PerpColumnId, colors: Pick<ThemeColors, "positive" | "negative" | "text" | "textBright" | "textMuted" | "textDim">): DataTableCell {
|
|
321
321
|
const text = perpCellText(row, id);
|
|
@@ -371,7 +371,7 @@ export function historyColumns(metric: HistoryMetric, currency: string, hasCandl
|
|
|
371
371
|
{ id: "basis", label: "Observation basis", width: 25, align: "left" },
|
|
372
372
|
];
|
|
373
373
|
}
|
|
374
|
-
export const historyChange = (value: number | null | undefined, metric: HistoryMetric) => value == null ?
|
|
374
|
+
export const historyChange = (value: number | null | undefined, metric: HistoryMetric) => value == null ? MISSING_VALUE
|
|
375
375
|
: inPoints(metric) ? `${value > 0 ? "+" : ""}${(value * 100).toFixed(metric === "funding" ? 4 : metric === "long-short" ? 2 : 3)}pp` : historyValue(value, metric);
|
|
376
376
|
export function historyCaption(data: PerpHistoryPayload | null | undefined, metric: HistoryMetric) {
|
|
377
377
|
if (metric === "long-short") {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { Fragment, useCallback, useEffect, useMemo, useState, type ReactNode } from "react";
|
|
2
3
|
import { isAccessDenied } from "../../../api-client/errors";
|
|
3
4
|
import { usePlanAccess } from "../../../api-client/plan-access";
|
|
@@ -69,7 +70,7 @@ function MarketEvidence({ row, data, width, height }: { row: PerpBoardRow; data:
|
|
|
69
70
|
["Mark", `${price(row.markPrice)} ${row.quoteCurrency}`], ["Oracle", `${price(row.oraclePrice)} ${row.quoteCurrency}`], ["Premium vs oracle", percent(row.premium)]]],
|
|
70
71
|
["Funding", [["Funding", `${percent(row.fundingRate, 5)} / ${fundingInterval(row)}`, row.fundingKind === "last-paid" ? "Last paid" : row.fundingKind === "continuous" ? "Continuous rate" : "Current rate"],
|
|
71
72
|
["Funding 8h / APR", `${percent(row.fundingRate8h, 4)} / ${percent(row.fundingApr, 2)}`, row.fundingIntervalHours ? `APR = current ${aprFormula(row.fundingIntervalHours)}` : undefined],
|
|
72
|
-
...(row.predictedFundingRate != null ? [["Predicted funding", `${percent(row.predictedFundingRate)} / ${row.predictedFundingIntervalHours ??
|
|
73
|
+
...(row.predictedFundingRate != null ? [["Predicted funding", `${percent(row.predictedFundingRate)} / ${row.predictedFundingIntervalHours ?? MISSING_VALUE}h`] as [string, string]] : []),
|
|
73
74
|
...(row.nextFundingAt ? [["Next funding", time(row.nextFundingAt)] as [string, string]] : []),
|
|
74
75
|
...(acrossVenues ? [["APR across venues", acrossVenues.text] as [string, string]] : [])]],
|
|
75
76
|
["Open Interest", [["Open interest", `${compact(row.openInterestBase)} ${row.baseAsset} · ${compact(row.openInterestUsd)} USD`],
|
|
@@ -77,7 +78,7 @@ function MarketEvidence({ row, data, width, height }: { row: PerpBoardRow; data:
|
|
|
77
78
|
...(positioning ? [["Positioning", positioning.map((field) => [field.label, field.text, field.detail])] as [string, EvidenceField[]]] : []),
|
|
78
79
|
...(row.underlying ? [["Underlying", [...listed, ["Underlying last", `${price(row.underlying.price)} ${row.underlying.currency}`, time(row.underlying.asOf)], ["Underlying session", row.underlying.marketState ?? "Unknown"],
|
|
79
80
|
["Premium vs underlying", percent(row.underlyingPremium)], ["Closed-market premium", percent(row.closedMarketPremium)]]] as [string, EvidenceField[]]] : []),
|
|
80
|
-
["Contract", [["Contract", `${label(row.contractType)} · ${row.priceMultiplier}× price`], ["Margin", row.marginCurrency], ["Max leverage", row.maxLeverage == null ?
|
|
81
|
+
["Contract", [["Contract", `${label(row.contractType)} · ${row.priceMultiplier}× price`], ["Margin", row.marginCurrency], ["Max leverage", row.maxLeverage == null ? MISSING_VALUE : `${row.maxLeverage}×`],
|
|
81
82
|
["Margin mode", row.isolatedOnly === null ? "Unspecified" : row.isolatedOnly ? "Isolated only" : "Cross / isolated"], ["Listing", row.delisted ? "Delisted" : "Active"], ["Confidence", label(row.confidence)]]],
|
|
82
83
|
];
|
|
83
84
|
// The ticker's link is not listed in the pane menu again: `d` there opens the same DES.
|
|
@@ -8,6 +8,7 @@ import { splitSymbolArgs, splitSymbolWords, symbolInputKey } from "../../../../c
|
|
|
8
8
|
import { notASymbolError } from "../../../../cli/symbol-cells";
|
|
9
9
|
import { readSymbolList, SymbolListError } from "../../../../cli/symbol-list";
|
|
10
10
|
import { cliStyles } from "../../../../utils/cli-output";
|
|
11
|
+
import { listProgressNotice } from "../../../../cli/list-progress";
|
|
11
12
|
import { shellWord } from "../../../../utils/shell-word";
|
|
12
13
|
import { logFailure } from "../../../../utils/log-failure";
|
|
13
14
|
import { parsePublicTickerKey } from "../../../../utils/exchanges";
|
|
@@ -256,45 +257,17 @@ export function retryNotice(ctx: CliCommandContext): (count: number, waitMs: num
|
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
259
|
|
|
259
|
-
/** A lookup this slow says how far it has got, so an add never looks stuck: first after two seconds, then every five. */
|
|
260
|
-
const PROGRESS_AFTER_MS = 2_000;
|
|
261
|
-
const PROGRESS_EVERY_MS = 5_000;
|
|
262
|
-
|
|
263
260
|
/**
|
|
264
261
|
* Lines on standard error while an add of several symbols is slow to look
|
|
265
262
|
* them up: "Looking up 10 symbols." two seconds in when none is settled yet,
|
|
266
263
|
* else "Looked up 4 of 10 symbols.", which it says again every five seconds
|
|
267
|
-
* until all are
|
|
268
|
-
* (0, total) as the lookup starts and each symbol as it settles; the lines
|
|
269
|
-
* come from a timer, so a lookup waiting on one slow answer still says so.
|
|
264
|
+
* until all are (`listProgressNotice`).
|
|
270
265
|
*/
|
|
271
266
|
export function progressNotice(
|
|
272
267
|
ctx: Pick<CliCommandContext, "cliOptions">,
|
|
273
|
-
|
|
268
|
+
timing: { afterMs?: number; everyMs?: number } = {},
|
|
274
269
|
): (looked: number, total: number) => void {
|
|
275
|
-
|
|
276
|
-
let looked = 0, total = 0, told = false;
|
|
277
|
-
const tell = () => {
|
|
278
|
-
timer = undefined;
|
|
279
|
-
if (looked >= total) return;
|
|
280
|
-
console.error(cliStyles.muted(told || looked > 0 ? `Looked up ${looked} of ${total} symbols.` : `Looking up ${total} symbols.`));
|
|
281
|
-
told = true;
|
|
282
|
-
schedule(everyMs);
|
|
283
|
-
};
|
|
284
|
-
const schedule = (ms: number) => {
|
|
285
|
-
timer = setTimeout(tell, ms);
|
|
286
|
-
// The add's own end, not this line, decides when the process exits.
|
|
287
|
-
(timer as { unref?: () => void }).unref?.();
|
|
288
|
-
};
|
|
289
|
-
return (settled, of) => {
|
|
290
|
-
if (ctx.cliOptions.quiet || of < 2) return;
|
|
291
|
-
looked = settled;
|
|
292
|
-
total = of;
|
|
293
|
-
if (looked >= total) {
|
|
294
|
-
if (timer) clearTimeout(timer);
|
|
295
|
-
timer = undefined;
|
|
296
|
-
} else if (!timer) schedule(afterMs);
|
|
297
|
-
};
|
|
270
|
+
return listProgressNotice(ctx, (looked, total, told) => told || looked > 0 ? `Looked up ${looked} of ${total} symbols.` : `Looking up ${total} symbols.`, timing);
|
|
298
271
|
}
|
|
299
272
|
|
|
300
273
|
/**
|
|
@@ -2,7 +2,7 @@ import { ActionRow } from "../../../components/ui/action-row";
|
|
|
2
2
|
import { Box, ScrollBox, Text } from "../../../ui";
|
|
3
3
|
import { t } from "../../../i18n";
|
|
4
4
|
import { colors } from "../../../theme/colors";
|
|
5
|
-
import { formatCompact, padTo } from "../../../utils/format";
|
|
5
|
+
import { MISSING_VALUE, formatCompact, padTo } from "../../../utils/format";
|
|
6
6
|
import { formatMarketQuantity } from "../../../market-data/market/format";
|
|
7
7
|
import {
|
|
8
8
|
renderSummarySegments,
|
|
@@ -55,7 +55,7 @@ export function PortfolioCashMarginDrawer({
|
|
|
55
55
|
<Text fg={colors.textDim}>{" qty "}</Text>
|
|
56
56
|
<Text fg={colors.text}>{padTo(formatMarketQuantity(balance.quantity, { isCashBalance: true, maxWidth: 14 }), 14, "right")}</Text>
|
|
57
57
|
<Text fg={colors.textDim}>{" value "}</Text>
|
|
58
|
-
<Text fg={colors.text}>{padTo(balance.baseValue != null ? formatCompact(balance.baseValue, { fixedDecimals: true }) :
|
|
58
|
+
<Text fg={colors.text}>{padTo(balance.baseValue != null ? formatCompact(balance.baseValue, { fixedDecimals: true }) : MISSING_VALUE, 10, "right")}</Text>
|
|
59
59
|
</Box>
|
|
60
60
|
))
|
|
61
61
|
)}
|
|
@@ -42,7 +42,8 @@ function createCollectionPaneInstance(
|
|
|
42
42
|
const named = argument?.trim() ? findCollection(context.config, argument, { prefix: true }) : null;
|
|
43
43
|
const collectionId = named && (!kind || named.kind === kind)
|
|
44
44
|
? named.id
|
|
45
|
-
:
|
|
45
|
+
// PF alone is the portfolio: the one in view, else the first, and a watchlist only where there is no portfolio.
|
|
46
|
+
: resolveCollectionIdForKind(context, kind ?? "portfolio") ?? (kind ? null : resolveCollectionPaneId(context));
|
|
46
47
|
return collectionId ? { params: { collectionId } } : null;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -89,7 +90,7 @@ export const portfolioListModule: PluginModule = {
|
|
|
89
90
|
{
|
|
90
91
|
id: "new-collection-pane",
|
|
91
92
|
paneId: "portfolio-list",
|
|
92
|
-
label: "
|
|
93
|
+
label: "Portfolio",
|
|
93
94
|
description: "Holdings, weights and P&L of a portfolio or watchlist; set target weights to see drift and the trades that rebalance",
|
|
94
95
|
// Phrases rather than bare words, so `fn rebalance` and `fn target` keep resolving where they did.
|
|
95
96
|
keywords: [
|
|
@@ -3,6 +3,7 @@ import { useAssetData } from "../../../runtime";
|
|
|
3
3
|
import { isFuturesTicker, type PortfolioFuturesTerms } from "../../../../portfolio/futures-positions";
|
|
4
4
|
import { dailyFuturesHistory, loadPortfolioFuturesTerms } from "../../../../portfolio/futures-terms";
|
|
5
5
|
import type { TickerRecord } from "../../../../types/ticker";
|
|
6
|
+
import { logFailure } from "../../../../utils/log-failure";
|
|
6
7
|
|
|
7
8
|
/** Settlements land once a day and the terms change with a roll; the terms cache answers sooner reads. */
|
|
8
9
|
const REFRESH_MS = 30 * 60_000;
|
|
@@ -45,12 +46,13 @@ export function usePortfolioFuturesTerms(
|
|
|
45
46
|
if (!key) return;
|
|
46
47
|
let cancelled = false;
|
|
47
48
|
const requestKey = `${key}|${settlement}`;
|
|
48
|
-
|
|
49
|
+
// A future whose terms cannot be read maps to none; anything else is logged.
|
|
50
|
+
loadPortfolioFuturesTerms(futuresRef.current, {
|
|
49
51
|
settlement,
|
|
50
52
|
sources: dataProvider ? { history: dailyFuturesHistory(dataProvider) } : {},
|
|
51
53
|
}).then((terms) => {
|
|
52
54
|
if (!cancelled) setState((previous) => ({ key: requestKey, terms, version: previous.version + 1 }));
|
|
53
|
-
});
|
|
55
|
+
}, logFailure("portfolio-list.futures-terms", "Reading futures terms failed"));
|
|
54
56
|
return () => { cancelled = true; };
|
|
55
57
|
}, [dataProvider, key, refresh, settlement]);
|
|
56
58
|
|
|
@@ -104,6 +104,7 @@ import { openPerpLabel, useOpenPerpMarket } from "../../perps/open-market";
|
|
|
104
104
|
import { useLiveStreamingSetting } from "../../../../state/hooks/live-streaming";
|
|
105
105
|
import { useThrottledTickerOrder } from "../use-throttled-ticker-order";
|
|
106
106
|
import { useThrottledMemo } from "../use-throttled-memo";
|
|
107
|
+
import { useUtcDay } from "../../../../react/auto-refresh";
|
|
107
108
|
import { perpetualDisplaySymbol, perpetualListing, perpetualVenueName } from "../../../../tickers/perpetual-listing";
|
|
108
109
|
import { useColumnClock } from "../use-column-clock";
|
|
109
110
|
import { liveMarketCapitalization } from "../../../../market-data/quotes/live-valuation";
|
|
@@ -672,6 +673,8 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
|
|
|
672
673
|
liveStreaming,
|
|
673
674
|
});
|
|
674
675
|
|
|
676
|
+
// The quotes' time of today drops its day; the next day the footer names it.
|
|
677
|
+
const utcDay = useUtcDay();
|
|
675
678
|
const summaryFooterInfo = useThrottledMemo(() => buildPortfolioFooterSegments({
|
|
676
679
|
accountState: summaryAccountState,
|
|
677
680
|
accountStatusText: accountsError
|
|
@@ -692,6 +695,7 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
|
|
|
692
695
|
portfolioSummaryTotals,
|
|
693
696
|
refreshingSize,
|
|
694
697
|
summaryAccountState,
|
|
698
|
+
utcDay,
|
|
695
699
|
], FOOTER_TOTALS_THROTTLE_MS);
|
|
696
700
|
const fxWarning = !!(fxStatus.stale || fxStatus.unknownTime || fxStatus.unavailable);
|
|
697
701
|
// Signed out or free, the rows' prices are the delayed ones; a list of coins is live and says nothing.
|
|
@@ -795,9 +799,10 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
|
|
|
795
799
|
...offlineBrokerFooter.asOf,
|
|
796
800
|
...summaryFooterInfo,
|
|
797
801
|
...offlineBrokerFooter.status,
|
|
802
|
+
// The delay clock beside the quotes' source and time; the FX note after it gives way first on a narrow row.
|
|
803
|
+
...(quoteDelay ? [quoteDelay] : []),
|
|
798
804
|
...(fxStatusText && !fxWarning ? [{ id: "fx", parts: [{ text: `FX ${fxStatusText}`, tone: "muted" as const }] }] : []),
|
|
799
805
|
...(showsPerpetuals && perpetuals.stale ? [{ id: "perpetuals", parts: [{ text: "perpetuals stale", tone: "warning" as const }] }] : []),
|
|
800
|
-
...(quoteDelay ? [quoteDelay] : []),
|
|
801
806
|
],
|
|
802
807
|
hints: [
|
|
803
808
|
...offlineBrokerFooter.hints,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formatShortDate } from "../../../../utils/datetime-format";
|
|
1
2
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
3
|
import { apiClient } from "../../../../api-client";
|
|
3
4
|
import type { PortfolioFuturesTerms } from "../../../../portfolio/futures-positions";
|
|
@@ -23,7 +24,7 @@ export interface PanePeriodPnl {
|
|
|
23
24
|
|
|
24
25
|
const NO_ROWS: ReadonlyMap<string, PeriodPnlRow> = new Map();
|
|
25
26
|
|
|
26
|
-
const dayMonth = (day: string) =>
|
|
27
|
+
const dayMonth = (day: string) => formatShortDate(day, { year: false, utc: true });
|
|
27
28
|
|
|
28
29
|
/** The day every priced row shares at one end, else the window's own date. */
|
|
29
30
|
function sharedDay(result: LoadedPeriodPnl, end: "start" | "end", fallback: string): string {
|
|
@@ -2,6 +2,7 @@ import { useEffect, useMemo, useRef, useState } from "react";
|
|
|
2
2
|
import { apiClient } from "../../../../api-client";
|
|
3
3
|
import { loadPurchaseDateCostFx, purchaseDatesToRead, type PurchaseDateCostFx } from "../../../../portfolio/cost-fx";
|
|
4
4
|
import type { TickerRecord } from "../../../../types/ticker";
|
|
5
|
+
import { logFailure } from "../../../../utils/log-failure";
|
|
5
6
|
|
|
6
7
|
/** A past close does not change; a date that could not be read is tried again this often. */
|
|
7
8
|
const REFRESH_MS = 30 * 60_000;
|
|
@@ -36,9 +37,10 @@ export function usePurchaseDateCostFx(
|
|
|
36
37
|
useEffect(() => {
|
|
37
38
|
if (!key) return;
|
|
38
39
|
let cancelled = false;
|
|
39
|
-
|
|
40
|
+
// A date whose closes cannot be read is left out; anything else is logged.
|
|
41
|
+
loadPurchaseDateCostFx(tickersRef.current, { into, history: apiClient, portfolioId }).then((rates) => {
|
|
40
42
|
if (!cancelled) setState({ scope: `${into}|${portfolioId}`, rates });
|
|
41
|
-
});
|
|
43
|
+
}, logFailure("portfolio-list.purchase-date-fx", "Reading purchase date FX closes failed"));
|
|
42
44
|
return () => { cancelled = true; };
|
|
43
45
|
}, [into, key, portfolioId, refresh]);
|
|
44
46
|
|
|
@@ -11,7 +11,7 @@ import { getSharedRegistry } from "../../../registry";
|
|
|
11
11
|
import { usePluginAppActions } from "../../../runtime";
|
|
12
12
|
import { isDialogOpen } from "../../../../ui/dialog-stack";
|
|
13
13
|
import { colors, priceColor } from "../../../../theme/colors";
|
|
14
|
-
import { formatPercentRaw } from "../../../../utils/format";
|
|
14
|
+
import { MISSING_VALUE, formatPercentRaw } from "../../../../utils/format";
|
|
15
15
|
import { formatMarketPrice, quoteFormatOptions } from "../../../../market-data/market/format";
|
|
16
16
|
import { listingChoiceQuery, upsertTickerFromSearchResult } from "../../../../tickers/search";
|
|
17
17
|
import type { TickerRecord } from "../../../../types/ticker";
|
|
@@ -107,7 +107,7 @@ function QuickAddPreview({
|
|
|
107
107
|
?? (validation.resolved.kind === "provider" ? validation.resolved.result.type : undefined);
|
|
108
108
|
const priceText = quote?.price != null
|
|
109
109
|
? formatMarketPrice(quote.price, { ...quoteFormatOptions(quote, assetCategory), maxWidth: 12 })
|
|
110
|
-
:
|
|
110
|
+
: MISSING_VALUE;
|
|
111
111
|
const changeValue = quote?.changePercent;
|
|
112
112
|
const name = tickerNameFromValidation(validation);
|
|
113
113
|
const exchange = exchangeLabelFromValidation(validation);
|
|
@@ -214,9 +214,20 @@ export function QuickAddTickerInput({
|
|
|
214
214
|
keepFailureRef.current = false;
|
|
215
215
|
listMemoRef.current = createQuickAddListMemo();
|
|
216
216
|
setInputValue("");
|
|
217
|
+
// The field keeps its own text, cursor and scroll until told: an add that left them read the next symbol
|
|
218
|
+
// scrolled by one ("+ SDTRY=X" for USDTRY=X).
|
|
219
|
+
inputRef.current?.editBuffer?.setText?.("");
|
|
220
|
+
inputRef.current?.setCursorOffset?.(0);
|
|
217
221
|
setValidation(IDLE_VALIDATION);
|
|
218
222
|
}, []);
|
|
219
223
|
|
|
224
|
+
/** An add is done: the row closes, empty, and `a` opens it again. */
|
|
225
|
+
const closeAfterAdd = useCallback(() => {
|
|
226
|
+
resetInput();
|
|
227
|
+
inputRef.current?.blur?.();
|
|
228
|
+
setInputFocused(false);
|
|
229
|
+
}, [resetInput]);
|
|
230
|
+
|
|
220
231
|
const clearFailedInput = useCallback((failure: QuickAddValidation) => {
|
|
221
232
|
keepFailureRef.current = true;
|
|
222
233
|
validationSeqRef.current += 1;
|
|
@@ -393,10 +404,13 @@ export function QuickAddTickerInput({
|
|
|
393
404
|
...skipped,
|
|
394
405
|
].join(" "),
|
|
395
406
|
});
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
407
|
+
// Something added, or nothing left to fix: done. Entries left out keep the row open on what to fix.
|
|
408
|
+
if (added.length > 0 || left.length === 0) closeAfterAdd();
|
|
409
|
+
else {
|
|
410
|
+
setValidation(list);
|
|
411
|
+
queueMicrotask(() => inputRef.current?.focus?.());
|
|
412
|
+
}
|
|
413
|
+
}, [addReady, closeAfterAdd, collectionKind, collectionName, notify, onAdded]);
|
|
400
414
|
|
|
401
415
|
const submitInput = useCallback(async (submittedValue?: string) => {
|
|
402
416
|
// Before any lookup: consent to count the add cannot be given after it.
|
|
@@ -435,7 +449,7 @@ export function QuickAddTickerInput({
|
|
|
435
449
|
collection: collectionName,
|
|
436
450
|
}),
|
|
437
451
|
});
|
|
438
|
-
|
|
452
|
+
closeAfterAdd();
|
|
439
453
|
return;
|
|
440
454
|
}
|
|
441
455
|
if (currentValidation.status !== "ready") {
|
|
@@ -463,6 +477,7 @@ export function QuickAddTickerInput({
|
|
|
463
477
|
collection: collectionName,
|
|
464
478
|
}),
|
|
465
479
|
});
|
|
480
|
+
closeAfterAdd();
|
|
466
481
|
return;
|
|
467
482
|
}
|
|
468
483
|
|
|
@@ -472,8 +487,7 @@ export function QuickAddTickerInput({
|
|
|
472
487
|
collection: collectionName,
|
|
473
488
|
});
|
|
474
489
|
notify({ type: "success", body: added.note ? `${body} ${added.note}.` : body });
|
|
475
|
-
|
|
476
|
-
queueMicrotask(() => inputRef.current?.focus?.());
|
|
490
|
+
closeAfterAdd();
|
|
477
491
|
} catch {
|
|
478
492
|
setValidation({ status: "error", query, message: "Ticker add failed" });
|
|
479
493
|
notify({ type: "error", body: tf("Failed to add {symbol}.", { symbol: query }) });
|
|
@@ -483,12 +497,12 @@ export function QuickAddTickerInput({
|
|
|
483
497
|
}, [
|
|
484
498
|
addReady,
|
|
485
499
|
clearFailedInput,
|
|
500
|
+
closeAfterAdd,
|
|
486
501
|
collectionName,
|
|
487
502
|
handOffListingChoice,
|
|
488
503
|
inputValue,
|
|
489
504
|
notify,
|
|
490
505
|
onAdded,
|
|
491
|
-
resetInput,
|
|
492
506
|
submitList,
|
|
493
507
|
submitting,
|
|
494
508
|
validateInput,
|
|
@@ -416,7 +416,10 @@ export function buildPortfolioPaneSettingsDef(
|
|
|
416
416
|
type: "toggle",
|
|
417
417
|
});
|
|
418
418
|
return {
|
|
419
|
-
|
|
419
|
+
// Named for what the pane shows: a watchlist's settings are not a portfolio's.
|
|
420
|
+
title: activeCollectionId && !activeCollectionIsPortfolio && config.watchlists.some((watchlist) => watchlist.id === activeCollectionId)
|
|
421
|
+
? "Watchlist Settings"
|
|
422
|
+
: "Portfolio Settings",
|
|
420
423
|
values: {
|
|
421
424
|
...settings,
|
|
422
425
|
columnIds: [...settings.columnIds],
|
|
@@ -8,8 +8,8 @@ import type { BrokerConnectionStatus } from "../../../../types/broker";
|
|
|
8
8
|
import type { TickerFinancials } from "../../../../types/financials";
|
|
9
9
|
import type { Portfolio, TickerRecord } from "../../../../types/ticker";
|
|
10
10
|
import type { BrokerAccount, BrokerCashBalance } from "../../../../types/trading";
|
|
11
|
-
import { formatShortDate } from "../../../../utils/datetime-format";
|
|
12
|
-
import { displayWidth, formatPercentRaw } from "../../../../utils/format";
|
|
11
|
+
import { formatClockTime, formatShortDate } from "../../../../utils/datetime-format";
|
|
12
|
+
import { MISSING_VALUE, displayWidth, formatPercentRaw } from "../../../../utils/format";
|
|
13
13
|
import { getBrokerInstance } from "../../../../utils/broker-instances";
|
|
14
14
|
import {
|
|
15
15
|
resolvePortfolioAccountMetrics,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "../account-metrics";
|
|
21
21
|
import { formatPortfolioAmount, type PortfolioSummaryTotals } from "./totals";
|
|
22
22
|
import { formatAllocationDrift, formatAllocationWeight, type PortfolioCashLine } from "../../../../portfolio/allocation";
|
|
23
|
-
import {
|
|
23
|
+
import { quoteSourceFooterSegment } from "../../shared/source-footer";
|
|
24
24
|
import { fxStatusLabel, type FxRateStatus } from "../../../../utils/fx-status";
|
|
25
25
|
import { t } from "../../../../i18n";
|
|
26
26
|
import type { PortfolioValuationBasis } from "../../../../portfolio/valuation-basis";
|
|
@@ -133,7 +133,7 @@ function formatSourceBadge(account: BrokerAccount, liveGateway: boolean): { labe
|
|
|
133
133
|
label: !syncedAt
|
|
134
134
|
? "Synced"
|
|
135
135
|
: today
|
|
136
|
-
? `Synced ${syncedAt
|
|
136
|
+
? `Synced ${formatClockTime(syncedAt)}`
|
|
137
137
|
: `Synced ${formatShortDate(syncedAt, { year: false })}`,
|
|
138
138
|
kind: "cloud",
|
|
139
139
|
};
|
|
@@ -490,13 +490,11 @@ export function buildPortfolioFooterSegments({
|
|
|
490
490
|
if (savedAt != null) return [...accountStatus, savedCopyFooterSegment("refresh", savedAt)];
|
|
491
491
|
if (isPortfolioTab ? !totals.hasPositions && !accountStatusText : totals.watchlistCount === 0) return [];
|
|
492
492
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
: "-";
|
|
499
|
-
return [...accountStatus, { id: "refresh", parts: [{ text: refreshText, tone: "muted" }] }];
|
|
493
|
+
// Where the quotes are from and the newest's time, as `quote` ends (`Gloom Cloud · 14:44 UTC · markets open`):
|
|
494
|
+
// a bare local time ("Thu 12:25") named neither.
|
|
495
|
+
const quoted = refreshingSize > 0 ? null : quoteSourceFooterSegment(quotes, { id: "refresh" });
|
|
496
|
+
const refresh: PaneFooterSegment = quoted ?? { id: "refresh", parts: [{ text: refreshingSize > 0 ? "Refreshing..." : MISSING_VALUE, tone: "muted" }] };
|
|
497
|
+
return [...accountStatus, refresh];
|
|
500
498
|
}
|
|
501
499
|
|
|
502
500
|
const MAX_NOTICE_SYMBOLS = 12;
|
|
@@ -17,6 +17,7 @@ import type { TickerRecord } from "../../../types/ticker";
|
|
|
17
17
|
import { objectVersion } from "../../../utils/object-version";
|
|
18
18
|
import { columnContextVersion, PERPETUAL_COLUMN_IDS } from "./cell-version";
|
|
19
19
|
import { getColumnValue, type ColumnContext } from "./metrics";
|
|
20
|
+
import { RANGE_FROM_BARS_NOTE } from "../../../portfolio/column-values";
|
|
20
21
|
import { periodPnlFigure, tickerDisplayName } from "../../../portfolio/column-values";
|
|
21
22
|
import { listedSymbol } from "../../../portfolio/listed-symbol";
|
|
22
23
|
import { displayWidth } from "../../../utils/format";
|
|
@@ -297,6 +298,12 @@ export function PortfolioTickerTable({
|
|
|
297
298
|
priceColumn.width,
|
|
298
299
|
))
|
|
299
300
|
: 0, [columnContext.valuationBasis, priceColumn, resolveCell, sortedTickers, tableFinancialsMap]);
|
|
301
|
+
// 52W% grows to show a range read from daily bars as one ("+45.30% bars"), as LAST grows for its session mark.
|
|
302
|
+
const rangeColumn = columns.find((column) => column.id === "range_52w");
|
|
303
|
+
const rangeWidth = useMemo(() => rangeColumn && sortedTickers.some((ticker) =>
|
|
304
|
+
tableFinancialsMap.get(ticker.metadata.ticker)?.quote?.yearRangeBasis === "daily-bars")
|
|
305
|
+
? rangeColumn.width + displayWidth(RANGE_FROM_BARS_NOTE) + 1
|
|
306
|
+
: 0, [rangeColumn, sortedTickers, tableFinancialsMap]);
|
|
300
307
|
// The Ticker column grows to its longest symbol, so ETH-USD and BA:LSE show whole beside their market-state dot.
|
|
301
308
|
const tickerWidth = useMemo(() => Math.min(MAX_TICKER_COLUMN_WIDTH, sortedTickers.reduce(
|
|
302
309
|
(widest, ticker) => Math.max(widest, TICKER_DOT_WIDTH + displayWidth(listedSymbol(ticker, tickerDisplayName(ticker), columnContext.homeMarket))),
|
|
@@ -311,13 +318,15 @@ export function PortfolioTickerTable({
|
|
|
311
318
|
: column.id === "weight" && grossWeights ? { ...column, label: GROSS_WEIGHT_LABEL }
|
|
312
319
|
: column.id === "ticker" && tickerWidth > column.width ? { ...column, width: tickerWidth }
|
|
313
320
|
: column.id === "price" && priceWidth > column.width ? { ...column, width: priceWidth }
|
|
321
|
+
: column.id === "range_52w" && rangeWidth > column.width ? { ...column, width: rangeWidth }
|
|
314
322
|
: column.id === "pnl_pct" && period ? { ...column, label: CONTRIBUTION_LABEL }
|
|
315
323
|
: pnlLabel !== "P&L" && (column.id === "pnl" || column.id === "pnl_pct") ? {
|
|
316
324
|
...column,
|
|
317
325
|
label: column.id === "pnl_pct" ? pnlLabel.replace("P&L", "%") : pnlLabel,
|
|
318
326
|
} : column).map((column) => BOOK_CURRENCY_COLUMN_IDS.has(column.id) ? bookCurrencyColumn(column, capCurrency) : column)
|
|
319
327
|
.map((column) => hasFrontReference && column.id === noteColumnId ? { ...column, flexGrow: 1 } : column),
|
|
320
|
-
[capCurrency, columns, grossWeights, hasFrontReference, hasNonShareQuantity, noteColumnId, period, pnlLabel, priceWidth, sharesWidth,
|
|
328
|
+
[capCurrency, columns, grossWeights, hasFrontReference, hasNonShareQuantity, noteColumnId, period, pnlLabel, priceWidth, rangeWidth, sharesWidth,
|
|
329
|
+
tickerWidth]);
|
|
321
330
|
// Read again as the rows' data moves, from the cells the rows show; the columns change only when what is hidden does.
|
|
322
331
|
// The company columns hidden last time, per list, stay hidden while a row added since settles.
|
|
323
332
|
const hiddenCompanyRef = useRef<{ list: string | undefined; ids: ReadonlySet<string> }>({ list: undefined, ids: new Set() });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { isAccessDenied } from "../../../api-client/errors";
|
|
2
3
|
import { useCallback, useEffect } from "react";
|
|
3
4
|
import type { PowerProject } from "../../../api-client/power";
|
|
@@ -20,12 +21,12 @@ function ProjectFacts({ row }: { row: PowerProject }) {
|
|
|
20
21
|
["Observed UTC", row.observedAt], ["Revision", row.revision], ["Confidence", powerPercent(row.confidence)],
|
|
21
22
|
];
|
|
22
23
|
return <>
|
|
23
|
-
{facts.map(([label, value]) => <KeyValueRow key={label} label={label} value={typeof value === "number" ? powerNumber(value) : value ??
|
|
24
|
+
{facts.map(([label, value]) => <KeyValueRow key={label} label={label} value={typeof value === "number" ? powerNumber(value) : value ?? MISSING_VALUE} detail={typeof value === "string" && ["Requested", "Proposed service", "Completed", "Withdrawn", "Published as of"].includes(label) ? /^\d{4}$/.test(value) ? "year precision" : /^\d{4}-Q[1-4]$/.test(value) ? "quarter precision" : /^\d{4}-\d{2}$/.test(value) ? "month precision" : /^\d{4}-\d{2}-\d{2}$/.test(value) ? "day precision" : undefined : undefined} labelWidth={20} />)}
|
|
24
25
|
{row.entities.length ? <SectionHeading title="Mapped companies" /> : null}
|
|
25
26
|
{row.entities.map((entity) => <KeyValueRow key={`${entity.entityId}:${entity.role}`} label={titleCase(entity.role)} value={entity.name}
|
|
26
27
|
detail={`${entity.tickers.map((t) => t.exchange ? `${t.ticker}:${t.exchange}` : t.ticker).join(", ")} · ${powerPercent(entity.confidence)} confidence`} labelWidth={20} />)}
|
|
27
28
|
{Object.keys(row.metrics).length ? <SectionHeading title="Reported context" /> : null}
|
|
28
|
-
{Object.entries(row.metrics).map(([label, value]) => <KeyValueRow key={label} label={label === "revenueUsd" ? "Retail revenue (USD)" : titleCase(label.replace(/([a-z])([A-Z])/g, "$1 $2"))} value={value === null ?
|
|
29
|
+
{Object.entries(row.metrics).map(([label, value]) => <KeyValueRow key={label} label={label === "revenueUsd" ? "Retail revenue (USD)" : titleCase(label.replace(/([a-z])([A-Z])/g, "$1 $2"))} value={value === null ? MISSING_VALUE : String(value)} labelWidth={24} />)}
|
|
29
30
|
<SectionHeading title="Primary evidence" />
|
|
30
31
|
<KeyValueRow label="Location in source" value={row.sourceLocator} labelWidth={20} />
|
|
31
32
|
<PaneLinkMenu><ExternalLinkText url={row.sourceUrl} label="Open primary document" /></PaneLinkMenu>
|
|
@@ -57,16 +58,16 @@ export function PowerDetailView({ row, scope, scrollRef, snapshot, focused, widt
|
|
|
57
58
|
{hasGeneration && view === "generation" ? <PowerGeneration project={project!} width={width} height={Math.max(3, height - 1)} focused={focused} /> : <DetailScrollBody ref={scrollRef} resetScrollKey={row.id}>
|
|
58
59
|
{denied ? <Text>Project evidence is unavailable for this account.</Text> : project ? <ProjectFacts row={project} /> : <>
|
|
59
60
|
{Object.entries(row.cells).filter(([, value]) => ["string", "number"].includes(typeof value) || value === null).map(([key, value]) =>
|
|
60
|
-
<KeyValueRow key={key} label={titleCase(key.replace(/([a-z])([A-Z])/g, "$1 $2"))} value={value == null ?
|
|
61
|
+
<KeyValueRow key={key} label={titleCase(key.replace(/([a-z])([A-Z])/g, "$1 $2"))} value={value == null ? MISSING_VALUE : /Rate$/.test(key) ? powerPercent(Number(value)) : String(value)} labelWidth={22} />)}
|
|
61
62
|
{row.history ? <>
|
|
62
63
|
<KeyValueRow label="History basis" value={row.history.basis === "published" ? "Published period" : "Observed snapshot"} labelWidth={22} />
|
|
63
|
-
<KeyValueRow label="Published as of" value={row.history.asOf ??
|
|
64
|
+
<KeyValueRow label="Published as of" value={row.history.asOf ?? MISSING_VALUE} labelWidth={22} />
|
|
64
65
|
<KeyValueRow label="Observed UTC" value={row.history.observedAt} labelWidth={22} />
|
|
65
66
|
<SectionHeading title="Primary evidence" />
|
|
66
67
|
<PaneLinkMenu>{row.history.sourceUrls.map((url, index) => <Box key={url} paddingBottom={1}><ExternalLinkText url={url} label={`Open primary document ${index + 1}`} /></Box>)}</PaneLinkMenu>
|
|
67
68
|
</> : null}
|
|
68
69
|
{row.exposure ? <>
|
|
69
|
-
<KeyValueRow label="Published as of" value={row.exposure.asOf ??
|
|
70
|
+
<KeyValueRow label="Published as of" value={row.exposure.asOf ?? MISSING_VALUE} labelWidth={22} />
|
|
70
71
|
<KeyValueRow label="Observed UTC" value={row.exposure.observedAt} labelWidth={22} />
|
|
71
72
|
<SectionHeading title="Primary evidence" />
|
|
72
73
|
<PaneLinkMenu>{row.exposure.sourceUrls.map((url, index) => <Box key={url} paddingBottom={1}><ExternalLinkText url={url} label={`Open primary document ${index + 1}`} /></Box>)}</PaneLinkMenu>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { GasStorageHistory, GasStorageRow, GasStorageSeasonal } from "../../../api-client/europe-energy";
|
|
2
3
|
import { staticSeries } from "../../../components/chart/static/series";
|
|
3
4
|
import type { SeriesDefinition, SeriesLoadResult } from "../../../series/types";
|
|
@@ -55,18 +56,18 @@ export const GAS_PUBLISHER = "GIE AGSI+";
|
|
|
55
56
|
const fixed = (value: number, digits: number) => value.toLocaleString("en-US", { minimumFractionDigits: digits, maximumFractionDigits: digits });
|
|
56
57
|
const signed = (value: number, digits: number) => `${value > 0 ? "+" : ""}${fixed(value, digits)}`;
|
|
57
58
|
/** Percent full, to the hundredth AGSI+ publishes. */
|
|
58
|
-
export const formatGasFull = (value: number | null | undefined) => value == null ?
|
|
59
|
+
export const formatGasFull = (value: number | null | undefined) => value == null ? MISSING_VALUE : fixed(value, 2);
|
|
59
60
|
/** Percentage points. */
|
|
60
|
-
export const formatGasPoints = (value: number | null | undefined) => value == null ?
|
|
61
|
+
export const formatGasPoints = (value: number | null | undefined) => value == null ? MISSING_VALUE : signed(value, 2);
|
|
61
62
|
/** TWh to the tenth. */
|
|
62
|
-
export const formatGasTwh = (value: number | null | undefined) => value == null ?
|
|
63
|
+
export const formatGasTwh = (value: number | null | undefined) => value == null ? MISSING_VALUE : fixed(value, 1);
|
|
63
64
|
/** GWh/day, whole. */
|
|
64
|
-
export const formatGasFlow = (value: number | null | undefined) => value == null ?
|
|
65
|
+
export const formatGasFlow = (value: number | null | undefined) => value == null ? MISSING_VALUE : fixed(value, 0);
|
|
65
66
|
|
|
66
67
|
/** Where the day sits in its five-year range: a percentile-like 0 to 100, or below and above it. */
|
|
67
68
|
export function gasRangePosition(row: GasStorageRow): { value: number | null; text: string } {
|
|
68
69
|
const position = row.fiveYear?.position;
|
|
69
|
-
if (position == null) return { value: null, text:
|
|
70
|
+
if (position == null) return { value: null, text: MISSING_VALUE };
|
|
70
71
|
if (position < 0) return { value: 0, text: "below" };
|
|
71
72
|
if (position > 100) return { value: 100, text: "above" };
|
|
72
73
|
return { value: Math.round(position), text: `${Math.round(position)}%` };
|
|
@@ -77,7 +78,7 @@ export const gasRangeLabel = (years: number) => `${years > 0 && years < 5 ? year
|
|
|
77
78
|
|
|
78
79
|
/** A gas day and its flag, the way a row is dated: `2026-10-12 est`. */
|
|
79
80
|
export const gasDayText = (row: Pick<GasStorageRow, "gasDay" | "status">) =>
|
|
80
|
-
row.gasDay ? `${row.gasDay}${row.status === "estimated" ? " est" : ""}` :
|
|
81
|
+
row.gasDay ? `${row.gasDay}${row.status === "estimated" ? " est" : ""}` : MISSING_VALUE;
|
|
81
82
|
|
|
82
83
|
/** The benchmark areas a search lists first; the rest follow by name. */
|
|
83
84
|
const LEAD_AREAS = ["EU", "DE", "IT", "FR", "NL", "AT"];
|
|
@@ -181,7 +182,7 @@ export function gasYearAxis(year: number) {
|
|
|
181
182
|
ticks: [0, 3, 6, 9].map((month) => ({ label: MONTHS[month]!, ratio: ratio(Date.UTC(year, month, 1)) })),
|
|
182
183
|
formatCursor: (xRatio: number) => {
|
|
183
184
|
const date = new Date(start + Math.round((xRatio * span) / DAY_MS) * DAY_MS);
|
|
184
|
-
return `${
|
|
185
|
+
return `${date.getUTCDate()} ${MONTHS[date.getUTCMonth()]}`;
|
|
185
186
|
},
|
|
186
187
|
},
|
|
187
188
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { logFailure } from "../../../utils/log-failure";
|
|
2
3
|
import { useCallback, useMemo } from "react";
|
|
3
4
|
import type { GasStorageRow } from "../../../api-client/europe-energy";
|
|
@@ -72,7 +73,7 @@ function GasDetail({ row, width, height, focused }: { row: GasStorageRow; width:
|
|
|
72
73
|
{ id: "change", label: "1D pp", value: formatGasPoints(row.change), ...(row.previousGasDay ? { detail: `vs ${row.previousGasDay}` } : {}) },
|
|
73
74
|
{ id: "year", label: "1Y ago %", value: formatGasFull(row.yearAgo?.full), ...(row.yearAgo ? { detail: row.yearAgo.gasDay } : {}) },
|
|
74
75
|
{ id: "range", label: `${gasRangeLabel(five?.years.length ?? 0)} range %`,
|
|
75
|
-
value: five ? `${formatGasFull(five.min)} to ${formatGasFull(five.max)}` :
|
|
76
|
+
value: five ? `${formatGasFull(five.min)} to ${formatGasFull(five.max)}` : MISSING_VALUE,
|
|
76
77
|
...(five ? { detail: `avg ${formatGasFull(five.average)}${five.years.length < 5 ? `, ${five.years.length} of 5 years` : ""}` } : {}) },
|
|
77
78
|
];
|
|
78
79
|
return <StatChartDetail items={items} width={width} height={height} empty={!history.loading && (series[0]?.points.length ?? 0) < 2}
|