@gloom-sh/terminal 0.20.20 → 0.20.21
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 +3 -1
- package/src/api-client/data.ts +1 -1
- package/src/api-client/equity-screener.ts +17 -0
- package/src/api-client/futures-curve.ts +5 -0
- package/src/api-client/market-discovery.ts +8 -0
- package/src/api-client/members.ts +2 -0
- package/src/api-client/paths.ts +3 -0
- package/src/api-client/perps.ts +20 -0
- package/src/api-client/request.ts +53 -7
- package/src/api-client/types/filings-and-calls.ts +2 -0
- package/src/app/pane-runtime/plugin-bindings.ts +6 -4
- package/src/app/pro-welcome/model.ts +15 -11
- package/src/app/pro-welcome/row.tsx +3 -3
- package/src/app/pro-welcome/use-pro-welcome.ts +2 -2
- package/src/app/runtime/startup.ts +3 -2
- package/src/app.tsx +3 -2
- package/src/capabilities/asset-data-inputs.ts +5 -0
- package/src/capabilities/factories.ts +8 -3
- package/src/capabilities/registry.ts +1 -0
- package/src/capabilities/types.ts +1 -0
- package/src/cli/commands/market.ts +68 -35
- package/src/cli/commands/options-chain.ts +2 -2
- package/src/cli/commands/overview.ts +10 -9
- package/src/cli/commands/ticker.ts +19 -4
- package/src/cli/desktop-pane-shot.ts +11 -3
- package/src/cli/export-source.ts +35 -2
- package/src/cli/glossary.ts +3 -2
- package/src/cli/helpers.ts +2 -1
- package/src/cli/history-demergers.ts +41 -10
- package/src/cli/history-rows.ts +3 -1
- package/src/cli/known-gaps.ts +21 -7
- package/src/cli/listing-arg.ts +22 -11
- package/src/cli/pane-functions/capabilities.ts +4 -9
- package/src/cli/pane-functions/catalog-snapshot.json +29 -29
- package/src/cli/pane-functions/catalog.ts +1 -18
- package/src/cli/pane-functions/data.ts +8 -4
- package/src/cli/pane-functions/financial-ratio-shot.ts +20 -5
- package/src/cli/pane-functions/freshness.ts +57 -12
- package/src/cli/pane-functions/function-help.ts +2 -2
- package/src/cli/pane-functions/headless.ts +6 -0
- package/src/cli/pane-functions/index.ts +11 -4
- package/src/cli/pane-functions/market-session.ts +25 -0
- package/src/cli/pane-functions/report-notices.ts +10 -0
- package/src/cli/pane-functions/resolver.ts +75 -3
- package/src/cli/pane-functions/screenshot-bridge.ts +1 -0
- package/src/cli/pane-functions/screenshot-data-evidence.ts +1 -0
- package/src/cli/pane-functions/screenshot-payload.ts +38 -5
- package/src/cli/pane-functions/screenshot-render.ts +20 -7
- package/src/cli/perpetual-contract.ts +14 -1
- package/src/cli/report-tables.ts +11 -2
- package/src/cli/result.ts +6 -1
- package/src/components/chart-table/layout.ts +8 -4
- package/src/components/command-bar/list/model.ts +2 -0
- package/src/components/command-bar/pane-templates/items.ts +5 -25
- package/src/components/command-bar/panel/index.tsx +7 -4
- package/src/components/command-bar/routes/root/provider-search.ts +4 -4
- package/src/components/command-bar/routes/root/results.ts +6 -2
- package/src/components/command-bar/routes/ticker-search/results.ts +19 -0
- package/src/components/command-bar/routes/ticker-search/route.ts +3 -3
- package/src/components/command-bar/routes/ticker-search/title.ts +23 -0
- package/src/components/command-bar/routing/list-state.ts +17 -5
- package/src/components/command-bar/selection-runtime.ts +3 -2
- package/src/components/command-bar/surface/index.tsx +2 -0
- package/src/components/command-bar/workflow/alert.ts +6 -4
- package/src/components/command-bar/workflow/collection-actions.ts +2 -1
- package/src/components/layout/pane/footer/index.tsx +1 -0
- package/src/components/layout/pane/footer/model.ts +20 -7
- package/src/components/layout/pane/title.ts +11 -2
- package/src/components/price-selector-dialog.tsx +8 -4
- package/src/components/ticker/badge/list.tsx +4 -3
- package/src/components/ticker/list-table-view.tsx +12 -1
- package/src/components/ui/query-bar.tsx +20 -14
- package/src/data/cached-query.ts +20 -4
- package/src/data/news-pane-snapshots.ts +2 -1
- package/src/data/plugin-cache.ts +5 -1
- package/src/data/saved-copies.ts +68 -2
- package/src/docs/snapshot.json +65 -14
- package/src/docs/topics.ts +11 -9
- package/src/i18n/es.ts +1 -0
- package/src/i18n/ja.ts +1 -0
- package/src/i18n/ko.ts +1 -0
- package/src/i18n/zh-cn.ts +1 -0
- package/src/i18n/zh-tw.ts +1 -0
- package/src/market-data/coordinator/index.ts +25 -5
- package/src/market-data/depositary-pair.ts +27 -10
- package/src/market-data/futures-roll-returns.ts +54 -7
- package/src/market-data/fx-closes.ts +14 -0
- package/src/market-data/market/futures-product-hours.ts +113 -0
- package/src/market-data/market/futures-week.ts +2 -0
- package/src/market-data/market/globex-day.ts +9 -2
- package/src/market-data/market/status.ts +32 -25
- package/src/market-data/market/venue-session.ts +18 -0
- package/src/market-data/options-alternatives.ts +49 -7
- package/src/market-data/perpetual-open-interest.ts +41 -0
- package/src/market-data/quotes/contributions.ts +4 -2
- package/src/market-data/quotes/export-identity.ts +11 -3
- package/src/market-data/quotes/freshness.ts +3 -2
- package/src/market-data/quotes/resolution.ts +9 -2
- package/src/market-data/quotes/tick-range.ts +22 -1
- package/src/market-data/quotes/time.ts +34 -4
- package/src/market-data/split-terms.ts +3 -2
- package/src/news/aggregator.ts +1 -0
- package/src/news/news-model.ts +12 -2
- package/src/news/types.ts +15 -0
- package/src/plugins/builtin/alerts/alert-engine.ts +2 -0
- package/src/plugins/builtin/alerts/cli-forms.ts +3 -2
- package/src/plugins/builtin/alerts/cli-move.ts +5 -2
- package/src/plugins/builtin/alerts/cli.ts +50 -25
- package/src/plugins/builtin/alerts/command.ts +51 -3
- package/src/plugins/builtin/alerts/event-rows.ts +1 -1
- package/src/plugins/builtin/alerts/events-pane.tsx +1 -1
- package/src/plugins/builtin/alerts/format.ts +67 -8
- package/src/plugins/builtin/alerts/headless.ts +22 -6
- package/src/plugins/builtin/alerts/index.tsx +26 -25
- package/src/plugins/builtin/alerts/move-checks.ts +1 -0
- package/src/plugins/builtin/alerts/pane.tsx +15 -6
- package/src/plugins/builtin/alerts/pro-rules.ts +9 -4
- package/src/plugins/builtin/alerts/quotes.ts +10 -5
- package/src/plugins/builtin/alerts/session.ts +28 -0
- package/src/plugins/builtin/alerts/types.ts +1 -0
- package/src/plugins/builtin/analytics/pane-model.ts +2 -1
- package/src/plugins/builtin/analytics/risk-model.ts +2 -2
- package/src/plugins/builtin/attention/headless.ts +2 -2
- package/src/plugins/builtin/attention/model.ts +7 -2
- package/src/plugins/builtin/attention/pane.tsx +2 -1
- package/src/plugins/builtin/awards/headless.ts +1 -1
- package/src/plugins/builtin/broker-trading/ticket.tsx +13 -5
- package/src/plugins/builtin/buildout/detail/company.tsx +0 -1
- package/src/plugins/builtin/buildout/detail/ui.tsx +7 -5
- package/src/plugins/builtin/buildout/model/normalizers.ts +0 -1
- package/src/plugins/builtin/buildout/model/types.ts +0 -1
- package/src/plugins/builtin/buildout/pane/index.tsx +9 -0
- package/src/plugins/builtin/buildout/pane/status.tsx +11 -0
- package/src/plugins/builtin/catalysts/headless.ts +1 -1
- package/src/plugins/builtin/chart-composer/headless.ts +14 -6
- package/src/plugins/builtin/chart-composer/pane.tsx +2 -1
- package/src/plugins/builtin/chart-composer/session-history.ts +14 -2
- package/src/plugins/builtin/chat/controller/index.ts +5 -3
- package/src/plugins/builtin/chat/controller/session-runtime.ts +18 -8
- package/src/plugins/builtin/chat/index.tsx +1 -1
- package/src/plugins/builtin/cloud/auth-actions.tsx +4 -2
- package/src/plugins/builtin/cloud/mcp-connect/dialog.tsx +4 -1
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +2 -1
- package/src/plugins/builtin/company-attention/headless.ts +2 -1
- package/src/plugins/builtin/company-kpis/headless.ts +1 -1
- package/src/plugins/builtin/correlation/headless.ts +3 -3
- package/src/plugins/builtin/correlation/history.ts +1 -0
- package/src/plugins/builtin/correlation/index.tsx +7 -5
- package/src/plugins/builtin/correlation/matrix/selection.ts +21 -3
- package/src/plugins/builtin/correlation/relationship/model.ts +5 -0
- package/src/plugins/builtin/correlation/relationship/pane.tsx +3 -2
- package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -2
- package/src/plugins/builtin/credit-documents/headless.ts +1 -1
- package/src/plugins/builtin/dividend-yield/client.ts +81 -10
- package/src/plugins/builtin/dividend-yield/headless.ts +21 -10
- package/src/plugins/builtin/dividend-yield/model.ts +1 -1
- package/src/plugins/builtin/dividend-yield/pane.tsx +9 -5
- package/src/plugins/builtin/dividend-yield/ranking.ts +15 -5
- package/src/plugins/builtin/dividend-yield/reference-price.ts +3 -0
- package/src/plugins/builtin/dividend-yield/types.ts +12 -0
- package/src/plugins/builtin/dividend-yield/view.ts +30 -7
- package/src/plugins/builtin/doe/headless.ts +1 -1
- package/src/plugins/builtin/doe/pane.tsx +16 -7
- package/src/plugins/builtin/earnings-calls/data.ts +8 -5
- package/src/plugins/builtin/earnings-ripple/headless.ts +1 -1
- package/src/plugins/builtin/econ/calendar-model.ts +1 -1
- package/src/plugins/builtin/econ/index.tsx +26 -18
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/headless.ts +149 -31
- package/src/plugins/builtin/equity-screener/live.ts +23 -5
- package/src/plugins/builtin/equity-screener/model.ts +27 -12
- package/src/plugins/builtin/equity-screener/pane.tsx +5 -5
- package/src/plugins/builtin/exposure/headless.ts +1 -1
- package/src/plugins/builtin/exposure/holdings.ts +2 -2
- package/src/plugins/builtin/futures/index.tsx +29 -1
- package/src/plugins/builtin/futures/model.ts +93 -10
- package/src/plugins/builtin/futures/returns.ts +54 -1
- package/src/plugins/builtin/futures/table.tsx +14 -2
- package/src/plugins/builtin/futures/use-front-returns.ts +20 -3
- package/src/plugins/builtin/futures-curve/client.ts +1 -1
- package/src/plugins/builtin/futures-curve/headless.ts +9 -3
- package/src/plugins/builtin/futures-curve/model.ts +19 -5
- package/src/plugins/builtin/futures-curve/pane.tsx +12 -6
- package/src/plugins/builtin/gpu/headless.ts +1 -1
- package/src/plugins/builtin/gpu/model.ts +1 -1
- package/src/plugins/builtin/help/function-index.ts +16 -8
- package/src/plugins/builtin/help/functions-table.tsx +6 -4
- package/src/plugins/builtin/help/shortcut-model.ts +7 -2
- package/src/plugins/builtin/holders/headless.ts +16 -5
- package/src/plugins/builtin/holders/pane.tsx +43 -5
- package/src/plugins/builtin/insider/client.ts +118 -11
- package/src/plugins/builtin/insider/filing-stories.ts +36 -20
- package/src/plugins/builtin/insider/issuer.ts +5 -2
- package/src/plugins/builtin/iv-history/headless.ts +2 -0
- package/src/plugins/builtin/macro-day/client.ts +2 -3
- package/src/plugins/builtin/macro-day/comparison.ts +58 -0
- package/src/plugins/builtin/macro-day/headless.ts +47 -3
- package/src/plugins/builtin/macro-day/index.tsx +32 -9
- package/src/plugins/builtin/macro-day/model.ts +1 -1
- package/src/plugins/builtin/macro-day/pane.tsx +99 -12
- package/src/plugins/builtin/market-heatmap/index.tsx +2 -2
- package/src/plugins/builtin/market-movers/footer.ts +29 -3
- package/src/plugins/builtin/market-movers/headless.ts +12 -5
- package/src/plugins/builtin/market-movers/index.tsx +3 -3
- package/src/plugins/builtin/market-movers/session-body.tsx +6 -3
- package/src/plugins/builtin/market-valuation/detail.tsx +3 -3
- package/src/plugins/builtin/market-valuation/headless.ts +6 -6
- package/src/plugins/builtin/market-valuation/pane.tsx +2 -3
- package/src/plugins/builtin/market-valuation/view.ts +6 -8
- package/src/plugins/builtin/members/client.ts +9 -2
- package/src/plugins/builtin/members/headless.ts +8 -10
- package/src/plugins/builtin/members/model.ts +29 -17
- package/src/plugins/builtin/members/pane.tsx +10 -12
- package/src/plugins/builtin/money-markets/headless.ts +1 -1
- package/src/plugins/builtin/news/headless.ts +4 -0
- package/src/plugins/builtin/news/index.tsx +3 -1
- package/src/plugins/builtin/news/wire/industry-pane.tsx +2 -1
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +1 -1
- package/src/plugins/builtin/news/wire/persisted-articles.ts +8 -4
- package/src/plugins/builtin/notes/headless.ts +7 -0
- package/src/plugins/builtin/notes/index.tsx +1 -1
- package/src/plugins/builtin/notes/quick-notes-pane.tsx +18 -2
- package/src/plugins/builtin/options/view.tsx +7 -6
- package/src/plugins/builtin/options-positioning/headless.ts +4 -4
- package/src/plugins/builtin/options-positioning/pane.tsx +7 -3
- package/src/plugins/builtin/options-scenario/client.ts +20 -4
- package/src/plugins/builtin/options-scenario/headless.ts +1 -1
- package/src/plugins/builtin/pe-band/client.ts +5 -9
- package/src/plugins/builtin/pe-band/headless.ts +11 -13
- package/src/plugins/builtin/pe-band/model.ts +39 -60
- package/src/plugins/builtin/pe-band/pane.tsx +14 -15
- package/src/plugins/builtin/perps/equity-row.tsx +3 -1
- package/src/plugins/builtin/perps/freshness.ts +16 -9
- package/src/plugins/builtin/perps/headless.ts +4 -1
- package/src/plugins/builtin/perps/markets-section.tsx +16 -10
- package/src/plugins/builtin/perps/model.ts +33 -2
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/perps/status-line.ts +12 -3
- package/src/plugins/builtin/perps/venue-markets.ts +38 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +4 -3
- package/src/plugins/builtin/portfolio-list/cell-version.ts +1 -1
- package/src/plugins/builtin/portfolio-list/cli/render.ts +46 -7
- package/src/plugins/builtin/portfolio-list/headless.ts +31 -8
- package/src/plugins/builtin/portfolio-list/settings.ts +3 -0
- package/src/plugins/builtin/portfolio-list/table.tsx +7 -1
- package/src/plugins/builtin/power/headless.ts +1 -1
- package/src/plugins/builtin/realized-vol/headless.ts +1 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +27 -13
- package/src/plugins/builtin/scanner/feed.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +8 -4
- package/src/plugins/builtin/scanner/headless.ts +57 -26
- package/src/plugins/builtin/scanner/hilo-pane.tsx +6 -3
- package/src/plugins/builtin/scanner/lock-note.ts +3 -2
- package/src/plugins/builtin/scanner/us-session.ts +9 -0
- package/src/plugins/builtin/seasonality/client.ts +46 -10
- package/src/plugins/builtin/seasonality/headless.ts +29 -11
- package/src/plugins/builtin/seasonality/model.ts +101 -24
- package/src/plugins/builtin/seasonality/pane.tsx +10 -6
- package/src/plugins/builtin/sec/filing-content.ts +13 -0
- package/src/plugins/builtin/sec/index.tsx +16 -11
- package/src/plugins/builtin/sectors/client.ts +27 -5
- package/src/plugins/builtin/sectors/headless.ts +2 -1
- package/src/plugins/builtin/sectors/index.tsx +22 -10
- package/src/plugins/builtin/shared/cloud-resource.ts +3 -3
- package/src/plugins/builtin/shared/extended-print.ts +38 -0
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +1 -1
- package/src/plugins/builtin/shared/report-freshness.ts +7 -3
- package/src/plugins/builtin/shared/scanner-capture.ts +16 -3
- package/src/plugins/builtin/shared/ticker-company.ts +17 -8
- package/src/plugins/builtin/shared/use-quote-board.ts +11 -4
- package/src/plugins/builtin/social-mentions/client.ts +7 -3
- package/src/plugins/builtin/social-mentions/outliers.tsx +9 -2
- package/src/plugins/builtin/thirteenf/api.ts +24 -3
- package/src/plugins/builtin/thirteenf/data.ts +21 -8
- package/src/plugins/builtin/thirteenf/headless.ts +7 -3
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +10 -3
- package/src/plugins/builtin/thirteenf/signals.ts +22 -1
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -2
- package/src/plugins/builtin/ticker-detail/financials/model.ts +7 -0
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +15 -6
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +5 -4
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +14 -5
- package/src/plugins/builtin/ticker-detail/headless.ts +32 -26
- package/src/plugins/builtin/ticker-detail/index.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +8 -3
- package/src/plugins/builtin/ticker-detail/overview/model.ts +28 -5
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +14 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +9 -8
- package/src/plugins/builtin/ticker-detail/pane.tsx +16 -9
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +41 -23
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +30 -13
- package/src/plugins/builtin/ticker-detail/settings.ts +9 -2
- package/src/plugins/builtin/time-sales/headless.ts +49 -13
- package/src/plugins/builtin/time-sales/model.ts +2 -2
- package/src/plugins/builtin/time-sales/window.ts +84 -10
- package/src/plugins/builtin/vol-surface/charts.tsx +4 -2
- package/src/plugins/builtin/vol-surface/events.ts +12 -5
- package/src/plugins/builtin/vol-surface/headless.ts +1 -1
- package/src/plugins/builtin/vol-surface/pane.tsx +15 -7
- package/src/plugins/builtin/world-indices/footer.ts +1 -1
- package/src/plugins/builtin/world-venue-map/chokepoint-report.ts +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +27 -13
- package/src/plugins/builtin/yield-curve/client.ts +3 -1
- package/src/plugins/duplicates.ts +60 -0
- package/src/plugins/loader.ts +12 -3
- package/src/plugins/marketplace/model.ts +10 -1
- package/src/portfolio/column-values.ts +52 -5
- package/src/react/async-resource.ts +8 -7
- package/src/renderers/browser/bundled-plugins.ts +2 -1
- package/src/renderers/dom/build-assets.ts +20 -0
- package/src/renderers/dom/data-table/index.tsx +36 -2
- package/src/renderers/dom/es2023-array-methods.ts +57 -0
- package/src/renderers/dom/host/surface-fit.ts +64 -13
- package/src/renderers/dom/styles.css +6 -1
- package/src/renderers/electrobun/bun/external-plugins.ts +16 -6
- package/src/renderers/electrobun/shared/protocol.ts +2 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +31 -7
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +15 -8
- package/src/renderers/electrobun/view/external-plugins.ts +1 -0
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +1 -0
- package/src/series/types.ts +1 -0
- package/src/sources/gloomberb-cloud/fred-attribution.ts +6 -5
- package/src/sources/gloomberb-cloud/index.ts +42 -5
- package/src/sources/gloomberb-cloud/news.ts +15 -2
- package/src/sources/gloomberb-cloud/normalizers.ts +9 -0
- package/src/sources/history-result.ts +2 -1
- package/src/sources/history-retention.ts +14 -2
- package/src/sources/listing-symbols.ts +1 -1
- package/src/sources/provider-router/cache.ts +32 -3
- package/src/sources/provider-router/cached-routes.ts +25 -0
- package/src/sources/provider-router/connection-health.ts +1 -0
- package/src/sources/provider-router/history.ts +2 -2
- package/src/sources/provider-router/index.ts +14 -0
- package/src/sources/provider-router/sec-filings-page.ts +25 -0
- package/src/sources/sec-edgar/content.ts +67 -36
- package/src/tickers/listing-fate.ts +28 -0
- package/src/tickers/search/home-listing.ts +3 -0
- package/src/tickers/search/index-root-lead.ts +40 -0
- package/src/tickers/terminal-codes.ts +7 -4
- package/src/time-series/base-series.ts +17 -8
- package/src/time-series/fundamentals/historical-valuation.ts +2 -2
- package/src/time-series/fundamentals/series.ts +15 -12
- package/src/time-series/history-acquisition.ts +2 -0
- package/src/time-series/market.ts +3 -1
- package/src/time-series/price-comparison.ts +3 -1
- package/src/time-series/resolve-context.ts +8 -0
- package/src/time-series/resolve.ts +50 -10
- package/src/time-series/types.ts +1 -0
- package/src/time-series/use-chart-resolution.ts +2 -2
- package/src/time-series/valuation-currency.ts +40 -12
- package/src/types/data-provider.ts +30 -1
- package/src/types/financials.ts +23 -0
- package/src/types/headless.ts +23 -0
- package/src/types/instrument.ts +1 -0
- package/src/utils/crypto-pair.ts +16 -0
- package/src/utils/exchange-announcements.ts +2 -1
- package/src/utils/exchange-notation.generated.ts +58 -1
- package/src/utils/exchanges.ts +43 -1
- package/src/utils/format.ts +37 -2
- package/src/utils/function-search.ts +38 -0
- package/src/utils/fuzzy-search.ts +10 -6
- package/src/utils/option-choice.ts +15 -0
- package/src/utils/price-history.ts +15 -1
- package/src/utils/reason-codes.ts +6 -3
- package/src/utils/trailing-dividend.ts +241 -28
|
@@ -146,6 +146,7 @@ const ACCESS_LABELS = { pro: "Pro", preview: "Pro, free preview" } as const;
|
|
|
146
146
|
|
|
147
147
|
const STATUS_COLORS: Record<MarketplaceStatusKind, string> = {
|
|
148
148
|
failed: colors.negative,
|
|
149
|
+
duplicate: colors.warning,
|
|
149
150
|
"needs-restart": colors.warning,
|
|
150
151
|
unsupported: colors.warning,
|
|
151
152
|
"needs-setup": colors.warning,
|
|
@@ -266,7 +267,7 @@ function EntryDetail({ entry, width, host, status, failure }: {
|
|
|
266
267
|
{entry.installedCommit ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Commit" value={entry.installedCommit.slice(0, 7)} /> : null}
|
|
267
268
|
{!entry.installed && entry.availableCommit ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Pinned" value={`${entry.availableVersion ?? ""} ${entry.availableCommit.slice(0, 7)}`.trim()} /> : null}
|
|
268
269
|
{entry.needsSetup ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Setup" value="Missing a required setting. Press s." /> : null}
|
|
269
|
-
{entry.loadError ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Error" value={entry.loadError} /> : null}
|
|
270
|
+
{entry.loadError ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label={entry.duplicateOf ? "Skipped" : "Error"} value={entry.loadError} /> : null}
|
|
270
271
|
{entry.lastError && !entry.loadError ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Last error" value={entry.lastError} /> : null}
|
|
271
272
|
</Box>
|
|
272
273
|
|
|
@@ -865,12 +866,12 @@ export function PluginMarketplacePane({ focused, width, height }: PaneProps) {
|
|
|
865
866
|
&& (host.contributions(selected.id).templates.length > 0 || host.contributions(selected.id).panes.length > 0);
|
|
866
867
|
const tooNew = !!selected && (!!requiredGloomberb(selected.minGloomberb) || !!selected.needsGloomberb);
|
|
867
868
|
const canInstall = !!selected && isInstallable(selected) && !!manager && !busy && !tooNew;
|
|
868
|
-
const canUpdate = !!selected && isManaged(selected) && !selected.linked && !!manager && !busy && !tooNew
|
|
869
|
+
const canUpdate = !!selected && isManaged(selected) && !selected.linked && !selected.duplicateOf && !!manager && !busy && !tooNew
|
|
869
870
|
&& (hasUpdate(selected) || !!selected.loadError);
|
|
870
871
|
const canRemove = !!selected && isManaged(selected) && !!manager && !busy;
|
|
871
872
|
const canToggle = !!selected && selected.installed && selected.toggleable && !selected.loadError;
|
|
872
873
|
const canSetup = !!selected && selected.installed && selected.enabled && selected.hasSetup;
|
|
873
|
-
const canLog = !!selected && selected.installed && (selected.errorCount > 0 || !!selected.loadError);
|
|
874
|
+
const canLog = !!selected && selected.installed && !selected.duplicateOf && (selected.errorCount > 0 || !!selected.loadError);
|
|
874
875
|
|
|
875
876
|
const handleKey = useCallback((key: string): boolean => {
|
|
876
877
|
switch (key) {
|
|
@@ -26,7 +26,7 @@ const VALUATION_COLUMN_IDS = new Set([
|
|
|
26
26
|
]);
|
|
27
27
|
// DIV% reads the corporate actions to measure a trailing yield and to tell a dividend that stopped, which a day can change.
|
|
28
28
|
const SUPPLEMENTAL_COLUMN_IDS = new Set(["target", "target_pct", "rating", "ex_div", "next_earn", "dividend_yield"]);
|
|
29
|
-
const DAY_CLOCK_COLUMN_IDS = new Set(["held", "ex_div", "next_earn", "as_of", "dividend_yield"]);
|
|
29
|
+
const DAY_CLOCK_COLUMN_IDS = new Set(["held", "ex_div", "next_earn", "as_of", "book_time", "dividend_yield"]);
|
|
30
30
|
export const PERPETUAL_COLUMN_IDS: ReadonlySet<string> = new Set(["perp_premium", "perp_funding"]);
|
|
31
31
|
/** Columns a future's contract size or settlement moves: its quantity, its value, and at the close its Last. */
|
|
32
32
|
const FUTURES_TERMS_COLUMN_IDS = new Set([
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
EXTENDED_SESSION_LABELS,
|
|
48
48
|
exchangeShortName,
|
|
49
49
|
extendedPrintSession,
|
|
50
|
+
extendedPrintTime,
|
|
50
51
|
getActiveQuoteDisplay,
|
|
51
52
|
getCompletedRegularSessionDisplay,
|
|
52
53
|
getExtendedSessionDisplay,
|
|
@@ -70,9 +71,11 @@ import { listedMarketCapitalization, selectMarketCapitalization } from "../../..
|
|
|
70
71
|
import { chunked, LIST_FINANCIALS_CONCURRENCY, mapWithConcurrency } from "../../../../utils/concurrency";
|
|
71
72
|
import { liveMarketCapitalization } from "../../../../market-data/quotes/live-valuation";
|
|
72
73
|
import { delistingLabel } from "../../../../market-data/quotes/delisting";
|
|
74
|
+
import { formatExtendedPrintAsOf } from "../../../../market-data/quotes/time";
|
|
73
75
|
import { instrumentFromTicker } from "../../../../market-data/request-types";
|
|
74
76
|
import { toMarketDataContext } from "../../../../market-data/selectors";
|
|
75
77
|
import { cliFreshnessFooter } from "../../../../cli/result";
|
|
78
|
+
import type { ExportIdentity } from "../../../../cli/export-source";
|
|
76
79
|
import { renderReportGlossary, reportGlossary, type GlossaryEntry } from "../../../../cli/glossary";
|
|
77
80
|
import { quotesFreshness, rowsFreshness } from "../../../../cli/freshness";
|
|
78
81
|
import type { BrokerAccount } from "../../../../types/trading";
|
|
@@ -606,7 +609,7 @@ export async function valuePortfolioPositions({
|
|
|
606
609
|
unrealizedPnl: known(pnl), baseCurrency: currency, dateAcquired: position.dateAcquired ?? null,
|
|
607
610
|
pnlBasis: selectedPnl.basis, brokerUnrealizedPnl: known(position.unrealizedPnl), brokerPnlCurrency: positionCurrency, brokerPnlAsOf: null,
|
|
608
611
|
// Only at a nominal price: `quoteAsOf` is the last print, older than the session that price is for.
|
|
609
|
-
...quotePriceKindField(quote) } });
|
|
612
|
+
...quotePriceKindField(quote), ...extendedTimeField(extended, quote) } });
|
|
610
613
|
}
|
|
611
614
|
}
|
|
612
615
|
|
|
@@ -841,16 +844,50 @@ export function listingLabel(ticker: TickerRecord): string {
|
|
|
841
844
|
return savedListingName(ticker).key;
|
|
842
845
|
}
|
|
843
846
|
|
|
844
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* One cell per extended column: the print, its move from the close and when
|
|
849
|
+
* it was observed, as `quote` prints it (`$70.60 +1.35% Sat 00:34 UTC`; Last
|
|
850
|
+
* is the close, dated at the close), or blank.
|
|
851
|
+
*/
|
|
845
852
|
function extendedCells(
|
|
846
853
|
sessions: readonly ExtendedSession[],
|
|
847
854
|
extended: ExtendedSessionDisplay | null,
|
|
848
855
|
quote: CollectionQuote | undefined,
|
|
849
856
|
assetCategory: string | undefined,
|
|
850
857
|
): string[] {
|
|
851
|
-
return sessions.map((session) =>
|
|
852
|
-
|
|
853
|
-
|
|
858
|
+
return sessions.map((session) => {
|
|
859
|
+
if (extended?.session !== session || !quote) return "";
|
|
860
|
+
const time = formatExtendedPrintAsOf(quote);
|
|
861
|
+
return [`${formatListPrice(extended.price, quote, assetCategory)}${extended.mark ? " mid" : ""}`,
|
|
862
|
+
colorBySign(formatPercentRaw(extended.changePercent), extended.change), ...time ? [cliStyles.muted(time)] : []].join(" ");
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* The export field that dates a row's extended print (`extendedUpdatedAt`,
|
|
868
|
+
* epoch ms as `quoteAsOf` is), written after every other column so no column
|
|
869
|
+
* an earlier export had moves: `quoteAsOf` dates Last, the close once the
|
|
870
|
+
* session is over, and the print is later.
|
|
871
|
+
*/
|
|
872
|
+
const EXTENDED_TIME_APPENDED_KEYS = ["extendedUpdatedAt"] as const;
|
|
873
|
+
|
|
874
|
+
function extendedTimeField(extended: ExtendedSessionDisplay | null, quote: CollectionQuote | undefined): { extendedUpdatedAt: number | null } {
|
|
875
|
+
return { extendedUpdatedAt: extended && quote ? extendedPrintTime(quote) : null };
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* What an exported book row is, with its own as-of from `asOfKey` (an ISO
|
|
880
|
+
* time or epoch ms) where it has one: a book's rows are dated apart, and
|
|
881
|
+
* Tencent's close at 08:08 UTC is no observation of New York's 21:00 UTC. A
|
|
882
|
+
* row without one (cash, the total) keeps the closing lines' date.
|
|
883
|
+
*/
|
|
884
|
+
function bookRowIdentity(asOfKey: string) {
|
|
885
|
+
return (row: Record<string, unknown>): ExportIdentity => {
|
|
886
|
+
const text = (value: unknown) => typeof value === "string" && value.trim() ? value : null;
|
|
887
|
+
const value = row[asOfKey];
|
|
888
|
+
const asOf = typeof value === "number" && Number.isFinite(value) && value > 0 ? new Date(value).toISOString() : text(value);
|
|
889
|
+
return { symbolOrSeries: text(row.symbol), currencyOrUnit: text(row.currency), ...asOf ? { asOf } : {} };
|
|
890
|
+
};
|
|
854
891
|
}
|
|
855
892
|
|
|
856
893
|
/**
|
|
@@ -1292,7 +1329,8 @@ async function showCollectionWithMarketData(
|
|
|
1292
1329
|
...(matchedPortfolio.importedFrom ? { importedFrom: matchedPortfolio.importedFrom } : {}),
|
|
1293
1330
|
...(explain ? { glossary: glossaryExport(explained) } : {}),
|
|
1294
1331
|
}, freshness }, { rows: (data) => [...(data as Record<string, unknown>[]), ...extraRows],
|
|
1295
|
-
exportNotes: fxMarks.length ? [`FX: ${fxMarks.map((mark) => baseConversionLabel(mark)).join("; ")}`] : []
|
|
1332
|
+
exportNotes: fxMarks.length ? [`FX: ${fxMarks.map((mark) => baseConversionLabel(mark)).join("; ")}`] : [],
|
|
1333
|
+
exportAppendedKeys: EXTENDED_TIME_APPENDED_KEYS, exportIdentity: bookRowIdentity("valuationAsOf") });
|
|
1296
1334
|
return;
|
|
1297
1335
|
}
|
|
1298
1336
|
|
|
@@ -1523,7 +1561,7 @@ async function showCollectionWithMarketData(
|
|
|
1523
1561
|
data: watched.map((entry) => entry.row),
|
|
1524
1562
|
metadata: { watchlistId: id, watchlistName: displayName, baseCurrency: currency, ...(explain ? { glossary: [] } : {}) },
|
|
1525
1563
|
freshness,
|
|
1526
|
-
});
|
|
1564
|
+
}, { exportAppendedKeys: EXTENDED_TIME_APPENDED_KEYS, exportIdentity: bookRowIdentity("quoteAsOf") });
|
|
1527
1565
|
return;
|
|
1528
1566
|
}
|
|
1529
1567
|
// `--limit` and `--tail` keep rows of the table as every list keeps them, and the line under it says of how many.
|
|
@@ -1726,6 +1764,7 @@ async function valueWatchlistRows({
|
|
|
1726
1764
|
...quotePriceKindField(quote),
|
|
1727
1765
|
// A listing that no longer trades: its status and last session.
|
|
1728
1766
|
...quote?.delisting ? { delisting: quote.delisting } : {},
|
|
1767
|
+
...extendedTimeField(extended, quote),
|
|
1729
1768
|
},
|
|
1730
1769
|
});
|
|
1731
1770
|
}
|
|
@@ -38,7 +38,9 @@ import type { PortfolioValuationBasis } from "../../../portfolio/valuation-basis
|
|
|
38
38
|
import { futuresQuantityText, isFuturesTicker } from "../../../portfolio/futures-positions";
|
|
39
39
|
import { dailyFuturesHistory, loadPortfolioFuturesTerms } from "../../../portfolio/futures-terms";
|
|
40
40
|
import { loadPurchaseDateCostFx } from "../../../portfolio/cost-fx";
|
|
41
|
-
import {
|
|
41
|
+
import {
|
|
42
|
+
EXTENDED_SESSION_LABELS, extendedPrintTime, getCompletedRegularSessionDisplay, quoteHeadlineTime, type ExtendedSession,
|
|
43
|
+
} from "../../../market-data/market/status";
|
|
42
44
|
import {
|
|
43
45
|
BROKER_ACCOUNT_MISSING_NOTE,
|
|
44
46
|
CASH_SYMBOL,
|
|
@@ -53,6 +55,7 @@ import {
|
|
|
53
55
|
import { currencyPriceMinDigits, formatMarketPrice, formatMarketQuantity } from "../../../market-data/market/format";
|
|
54
56
|
import { resolvePortfolioTotalsCurrency } from "./summary/totals";
|
|
55
57
|
import { bookSource, brokerNameOf, quoteFreshnessFields } from "../shared/report-freshness";
|
|
58
|
+
import { extendedPrintTimeColumn, withExtendedPrintTime } from "../shared/extended-print";
|
|
56
59
|
import { importedFromText } from "./imported-from";
|
|
57
60
|
import { describeCollections } from "../../../portfolio/collection-name";
|
|
58
61
|
import { currentListingName } from "../../../tickers/listing-name";
|
|
@@ -153,6 +156,10 @@ function extendedColumn(session: ExtendedSession): HeadlessPaneColumn {
|
|
|
153
156
|
format: (value, row) => row.extendedSession === session && typeof value === "number"
|
|
154
157
|
? `${unitMoney("priceCurrency")(value, row)} ${percent(row.extendedChangePercent)}`
|
|
155
158
|
: formatNumber(undefined),
|
|
159
|
+
// The text report dates the print beside it, as `quote` does: Last is the close, dated at the close.
|
|
160
|
+
textFormat: (value, row) => row.extendedSession === session && typeof value === "number"
|
|
161
|
+
? withExtendedPrintTime(`${unitMoney("priceCurrency")(value, row)} ${percent(row.extendedChangePercent)}`, row)
|
|
162
|
+
: formatNumber(undefined),
|
|
156
163
|
description: "Measured from the regular close in Last.",
|
|
157
164
|
};
|
|
158
165
|
}
|
|
@@ -173,6 +180,12 @@ const WATCHLIST_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
173
180
|
{ key: "changePercent", header: "Regular %", align: "right", format: percent },
|
|
174
181
|
];
|
|
175
182
|
|
|
183
|
+
/** A watchlist's columns; with an extended print, when it was observed ends an export's row, the text saying it beside the print. */
|
|
184
|
+
function watchlistColumns(tickers: readonly TickerRecord[], sessions: readonly ExtendedSession[]): { columns: HeadlessPaneColumn[]; textColumns?: HeadlessPaneColumn[] } {
|
|
185
|
+
const columns = withListingLabels(withExtendedColumns(WATCHLIST_COLUMNS, sessions), tickers);
|
|
186
|
+
return sessions.length > 0 ? { columns: [...columns, ...sessions.map(extendedPrintTimeColumn)], textColumns: columns } : { columns };
|
|
187
|
+
}
|
|
188
|
+
|
|
176
189
|
/**
|
|
177
190
|
* `columns` with the text report's Ticker column naming each listing as
|
|
178
191
|
* `portfolio show` does (SAN:EPA, SAN:NYSE), not by the key it is stored under,
|
|
@@ -192,11 +205,16 @@ function withListingLabels(columns: HeadlessPaneColumn[], tickers: readonly Tick
|
|
|
192
205
|
});
|
|
193
206
|
}
|
|
194
207
|
|
|
195
|
-
/** When the price a row shows was observed: in a pre-market nothing has traded in, the close it stands at. */
|
|
208
|
+
/** When the price a row shows was observed: in a pre-market nothing has traded in, the close it stands at; once the session is over, its close. */
|
|
196
209
|
function headlineTime(quote: Quote | undefined): number | null {
|
|
197
210
|
return quote ? quoteHeadlineTime(quote) : null;
|
|
198
211
|
}
|
|
199
212
|
|
|
213
|
+
/** When a row's extended print was observed, beside the close `headlineTime` dates; null without one. */
|
|
214
|
+
function extendedTime(extended: unknown, quote: Quote | undefined): number | null {
|
|
215
|
+
return extended ? extendedPrintTime(quote) : null;
|
|
216
|
+
}
|
|
217
|
+
|
|
200
218
|
function finite(value: unknown): number | null {
|
|
201
219
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
202
220
|
}
|
|
@@ -408,6 +426,7 @@ async function portfolioHoldings(
|
|
|
408
426
|
...regularChangeFields(quotes.get(ticker.metadata.ticker), headline?.changePercent),
|
|
409
427
|
extendedChangeBasis: extended ? "from-regular-close" : null,
|
|
410
428
|
...extendedQuoteFields(extended),
|
|
429
|
+
extendedUpdatedAt: extendedTime(extended, quotes.get(ticker.metadata.ticker)),
|
|
411
430
|
marketValue,
|
|
412
431
|
unrealizedPnl: finite(row.unrealizedPnl),
|
|
413
432
|
weight: figures?.weight ?? null,
|
|
@@ -494,6 +513,7 @@ async function portfolioHoldings(
|
|
|
494
513
|
tickers,
|
|
495
514
|
);
|
|
496
515
|
const lotted = withPositionLines(shown, columns, allocationBySymbol, allocation.cash);
|
|
516
|
+
const printTimeColumns = extendedSessions.map(extendedPrintTimeColumn);
|
|
497
517
|
|
|
498
518
|
return {
|
|
499
519
|
// Dated by the prices the value uses, and the oldest of them in exports, with the basis in the closing line.
|
|
@@ -503,10 +523,13 @@ async function portfolioHoldings(
|
|
|
503
523
|
citeOldest: true,
|
|
504
524
|
note: `priced at ${valuationBasisText(basis, holdsFutures(valuation), marketsStillTrading(valuation))}`,
|
|
505
525
|
},
|
|
506
|
-
|
|
526
|
+
// When each extended print was observed ends an export's row; the text report says it beside the print.
|
|
527
|
+
columns: [...shown.some((row) => row.fxMark) ? [...columns, { key: "fxMark", header: "Market-value FX" }] : columns, ...printTimeColumns],
|
|
507
528
|
notes: fxMarks.length ? [`Market-value FX: ${[...fxByCurrency.values()].join("; ")}`] : undefined,
|
|
508
|
-
...(!lotted && shown.some((row) => row.fxMark) ? { textColumns: columns } : {}),
|
|
529
|
+
...(!lotted && (shown.some((row) => row.fxMark) || printTimeColumns.length > 0) ? { textColumns: columns } : {}),
|
|
509
530
|
rows: shown,
|
|
531
|
+
// Each exported row is dated by the price its value uses, as the closing lines date the newest and oldest.
|
|
532
|
+
rowAsOfKey: "valuationAsOf",
|
|
510
533
|
...(lotted ? { textColumns: lotted.columns, textRows: lotted.rows } : {}),
|
|
511
534
|
complete: errors.length === 0,
|
|
512
535
|
...(errors.length ? { errors } : {}),
|
|
@@ -697,16 +720,16 @@ async function watchlistHoldings(
|
|
|
697
720
|
...regularChangeFields(quote, headline ? headline.changePercent : quote?.changePercent),
|
|
698
721
|
extendedChangeBasis: extended ? "from-regular-close" : null,
|
|
699
722
|
...extendedQuoteFields(extended),
|
|
723
|
+
extendedUpdatedAt: extendedTime(extended, quote),
|
|
700
724
|
};
|
|
701
725
|
});
|
|
702
726
|
const shown = rows.slice(0, limit);
|
|
703
727
|
return {
|
|
704
728
|
freshness: { source: bookSource("Local watchlist", quotes.values(), brokerNameOf(ctx)) },
|
|
705
|
-
|
|
706
|
-
withExtendedColumns(WATCHLIST_COLUMNS, extendedSessionsOf(shown.map((row) => row.extendedSession))),
|
|
707
|
-
tickers,
|
|
708
|
-
),
|
|
729
|
+
...watchlistColumns(tickers, extendedSessionsOf(shown.map((row) => row.extendedSession))),
|
|
709
730
|
rows: shown,
|
|
731
|
+
// Each exported row is dated by its own quote: Hong Kong's close is no observation of New York's.
|
|
732
|
+
rowAsOfKey: "updatedAt",
|
|
710
733
|
metadata: {
|
|
711
734
|
collection: { kind: "watchlist", id: target.id, name: target.name },
|
|
712
735
|
tickers: rows.length,
|
|
@@ -51,6 +51,8 @@ const PORTFOLIO_COLUMN_DEFS: ColumnConfig[] = [
|
|
|
51
51
|
{ id: "spread", label: "SPREAD", width: 10, align: "right", format: "currency" },
|
|
52
52
|
{ id: "spread_pct", label: "SPR%", width: 7, align: "right", format: "percent" },
|
|
53
53
|
{ id: "bid_ask_size", label: "B/A SZ", width: 9, align: "right", format: "compact" },
|
|
54
|
+
// When the bid and ask were quoted, which is not when the last trade was.
|
|
55
|
+
{ id: "book_time", label: "BOOK UTC", width: 10, align: "right" },
|
|
54
56
|
{ id: "change", label: "CHG", width: 9, align: "right", format: "currency" },
|
|
55
57
|
{ id: "ext_hours", label: "EXT%", width: 8, align: "right", format: "percent" },
|
|
56
58
|
{ id: "dividend_yield", label: "DIV%", width: 7, align: "right", format: "percent" },
|
|
@@ -208,6 +210,7 @@ function describeColumnOption(column: ColumnConfig): string {
|
|
|
208
210
|
if (column.id === "perp_premium") return "Premium of the stock's perpetual to its last price.";
|
|
209
211
|
if (column.id === "perp_funding") return "Funding of the stock's perpetual, per 8 hours.";
|
|
210
212
|
if (column.id === "as_of") return "When each row's price is from: its last print, or the regular close.";
|
|
213
|
+
if (column.id === "book_time") return "When each row's bid and ask were quoted, or not dated when the source gives no time.";
|
|
211
214
|
if (column.id === "currency") return "The currency each row is priced in; shown by default once a row is in another currency than the totals.";
|
|
212
215
|
return PORTFOLIO_ONLY_COLUMN_IDS.has(column.id)
|
|
213
216
|
? "Visible only when this pane is showing a portfolio."
|
|
@@ -19,7 +19,7 @@ import { objectVersion } from "../../../utils/object-version";
|
|
|
19
19
|
import { columnContextVersion, PERPETUAL_COLUMN_IDS } from "./cell-version";
|
|
20
20
|
import { getColumnValue, type ColumnContext } from "./metrics";
|
|
21
21
|
import { RANGE_FROM_BARS_NOTE } from "../../../portfolio/column-values";
|
|
22
|
-
import { periodPnlFigure, tickerDisplayName } from "../../../portfolio/column-values";
|
|
22
|
+
import { getRowAsOfIso, periodPnlFigure, tickerDisplayName } from "../../../portfolio/column-values";
|
|
23
23
|
import { listedSymbol } from "../../../portfolio/listed-symbol";
|
|
24
24
|
import { displayWidth } from "../../../utils/format";
|
|
25
25
|
import { dropColumnsToFit, markHiddenTableColumns } from "../../../components/ui/table-layout";
|
|
@@ -366,6 +366,11 @@ export function PortfolioTickerTable({
|
|
|
366
366
|
const eligible = sizedColumns.filter((column) => !hiddenCompanyRef.current.ids.has(column.id));
|
|
367
367
|
return hiddenColumnIds ? markHiddenTableColumns(eligible, eligible.filter((column) => !hidden.has(column.id))) : sizedColumns;
|
|
368
368
|
}, [hiddenColumnIds, sizedColumns]);
|
|
369
|
+
// The Export CSV dates each row as its AS OF does: a book at the latest print by the print its LAST is.
|
|
370
|
+
const exportAsOf = useCallback(
|
|
371
|
+
(ticker: TickerRecord) => getRowAsOfIso(ticker, tableFinancialsMap.get(ticker.metadata.ticker), columnContext),
|
|
372
|
+
[columnContext, tableFinancialsMap],
|
|
373
|
+
);
|
|
369
374
|
// Over a period, each currency's part under the rows, so P&L adds up to the header's total as portfolio show --from prints it.
|
|
370
375
|
const periodLines = columnContext.periodPnl?.lines ?? null;
|
|
371
376
|
const summaryRows = useMemo<TickerTableSummaryRow[] | undefined>(() => {
|
|
@@ -422,6 +427,7 @@ export function PortfolioTickerTable({
|
|
|
422
427
|
summaryRows={summaryRows}
|
|
423
428
|
rootHeight={rootHeight}
|
|
424
429
|
exportName={exportName}
|
|
430
|
+
exportAsOf={exportAsOf}
|
|
425
431
|
columnReorder={columnReorder}
|
|
426
432
|
groups={groups}
|
|
427
433
|
onToggleGroup={onToggleGroup}
|
|
@@ -70,7 +70,7 @@ export const powerHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
|
70
70
|
freshness: { source: "Grid operator queues and utility filings", status: "not-a-feed", basis: "published records", dataset: true },
|
|
71
71
|
argument: { kind: "free-text", optional: true, placeholder: "ticker", description: "Optional listed developer or utility ticker, with exchange suffix where needed." },
|
|
72
72
|
options: [
|
|
73
|
-
{ key: "tab", type: "enum", settingKey: "tab", defaultValue: "queue", values: POWER_TABS
|
|
73
|
+
{ key: "tab", type: "enum", settingKey: "tab", defaultValue: "queue", values: [...POWER_TABS], description: "Queue, history, outcomes, large loads, utility exposure, capacity, European day-ahead prices or coverage." },
|
|
74
74
|
...["country", "region", "fuel", "status", "search", "sourceId", "from", "to"].map((key) => ({ key, type: "string" as const, settingKey: key, description: `Filter by ${key}.` })),
|
|
75
75
|
{ key: "context", type: "enum", settingKey: "context", values: [{ value: "capacity" }, { value: "generation" }, { value: "utility" }], defaultValue: "capacity", description: "Generation capacity, monthly generation or utility context on the Capacity tab." },
|
|
76
76
|
{ key: "loadClass", aliases: ["load-class"], type: "enum", settingKey: "loadClass", values: [{ value: "datacenter" }], description: "Only loads explicitly classified as datacenters." },
|
|
@@ -67,7 +67,7 @@ export function realizedVolHeadless(initialView: "graph" | "cone"): HeadlessPane
|
|
|
67
67
|
describe: (args) => `${initialView === "graph" ? "HVG" : "HVT"} ${args.symbols[0] ?? ""}`,
|
|
68
68
|
discovery: { screenshotReadiness: "live-dom", limitations: ["IV is a dated current observation; HIVG has the stored IV history."] },
|
|
69
69
|
options: [
|
|
70
|
-
{ key: "tab", type: "enum", values: [{ value: "graph" }, { value: "cone" }], defaultValue: initialView,
|
|
70
|
+
{ key: "tab", type: "enum", values: [{ value: "graph", label: "History" }, { value: "cone" }], defaultValue: initialView,
|
|
71
71
|
description: "Initial view", pluginState: { pluginId: "ticker-research", key: "activeTabId" } },
|
|
72
72
|
{ key: "estimator", type: "enum", values: ESTIMATOR_OPTIONS.map(({ value }) => ({ value })), defaultValue: "close-to-close", description: "Realized volatility estimator" },
|
|
73
73
|
{ key: "windows", type: "string", defaultValue: "",
|
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
isInlineExhibitDocument,
|
|
45
45
|
} from "../sec/filing-documents";
|
|
46
46
|
import {
|
|
47
|
+
buildFilingContentPreviews,
|
|
47
48
|
buildInlineFilingContentTargets,
|
|
48
49
|
useSecFilingContentCache,
|
|
49
50
|
} from "../sec/filing-content";
|
|
@@ -425,6 +426,19 @@ function EventDetailSections({ sections, width }: { sections: EventDetailSection
|
|
|
425
426
|
);
|
|
426
427
|
}
|
|
427
428
|
|
|
429
|
+
/**
|
|
430
|
+
* The row the pane opens on, in newest-first rows: the first row of the
|
|
431
|
+
* earliest day from today on, else the latest row.
|
|
432
|
+
*/
|
|
433
|
+
function nextEventIndex(rows: readonly EventRow[], today: string): number {
|
|
434
|
+
let next = 0;
|
|
435
|
+
for (const [index, row] of rows.entries()) {
|
|
436
|
+
if (row.date < today) break;
|
|
437
|
+
if (row.date !== rows[next]!.date) next = index;
|
|
438
|
+
}
|
|
439
|
+
return next;
|
|
440
|
+
}
|
|
441
|
+
|
|
428
442
|
/** Statuses the Earnings Estimates surface keeps; the rest are corporate actions. */
|
|
429
443
|
const EARNINGS_STATUSES = new Set<EventStatus>(["Q Est", "FY Est", "Earnings", "TTM"]);
|
|
430
444
|
|
|
@@ -514,15 +528,15 @@ export function CorporateActionsView({
|
|
|
514
528
|
const allRows = useMemo(() => (
|
|
515
529
|
buildEventRows(actionsData, analystData, financialsData, displayCurrency)
|
|
516
530
|
), [actionsData, analystData, displayCurrency, financialsData]);
|
|
517
|
-
//
|
|
518
|
-
//
|
|
519
|
-
//
|
|
520
|
-
//
|
|
531
|
+
// Newest first, in the model's order, as `fn EVT` prints them: what is ahead
|
|
532
|
+
// (estimates, the next report, a declared dividend) on top, tinted, then the
|
|
533
|
+
// latest event and the older ones under it. Oldest first, a long history
|
|
534
|
+
// (a dividend from 1995) opened on its first row with the recent ones off-screen.
|
|
521
535
|
const rows = useMemo(() => (
|
|
522
536
|
variant === "earnings-estimates"
|
|
523
537
|
? allRows.filter((row) => EARNINGS_STATUSES.has(row.status))
|
|
524
|
-
:
|
|
525
|
-
)
|
|
538
|
+
: allRows
|
|
539
|
+
), [allRows, variant]);
|
|
526
540
|
const unit = useMemo(() => sharedMetricCurrency(rows), [rows]);
|
|
527
541
|
const hasUnstatedCurrency = rows.some((row) =>
|
|
528
542
|
((row.qEps != null || row.annualEps != null) && !row.epsCurrency)
|
|
@@ -545,12 +559,11 @@ export function CorporateActionsView({
|
|
|
545
559
|
// Keyed by row id, not by position, so a reload or a shared layout comes
|
|
546
560
|
// back to the same event.
|
|
547
561
|
const [selectedKey, setSelectedKey] = usePluginPaneState<string | null>("selectedKey", null);
|
|
548
|
-
// Until one is picked, the next event: the
|
|
562
|
+
// Until one is picked, the next event: the last of the rows ahead, right
|
|
563
|
+
// above the history, or the latest one when nothing is ahead.
|
|
549
564
|
const selectedIdx = useMemo(() => {
|
|
550
565
|
const picked = rows.findIndex((row) => eventRowKey(row) === selectedKey);
|
|
551
|
-
|
|
552
|
-
const next = rows.findIndex((row) => row.date >= today);
|
|
553
|
-
return next >= 0 ? next : Math.max(0, rows.length - 1);
|
|
566
|
+
return picked >= 0 ? picked : nextEventIndex(rows, today);
|
|
554
567
|
}, [rows, selectedKey, today]);
|
|
555
568
|
const [openRowId, setOpenRowId] = usePluginPaneState<string | null>("openRowId", null);
|
|
556
569
|
const detailScrollRef = useRef<ScrollBoxRenderable>(null);
|
|
@@ -609,10 +622,11 @@ export function CorporateActionsView({
|
|
|
609
622
|
if (!matchedFiling || documentsLoading) return [];
|
|
610
623
|
return inlineTargets.length > 0 ? inlineTargets : [matchedFiling];
|
|
611
624
|
}, [documentsLoading, inlineTargets, matchedFiling]);
|
|
612
|
-
const { contentCache
|
|
625
|
+
const { contentCache } = useSecFilingContentCache({
|
|
613
626
|
scopeKey: `${symbol}:${exchange}`,
|
|
614
627
|
targets: filingContentTargets,
|
|
615
628
|
});
|
|
629
|
+
const inlineContent = useMemo(() => buildFilingContentPreviews(filingContentTargets, contentCache), [filingContentTargets, contentCache]);
|
|
616
630
|
const hasInlineExhibits = inlineTargets.length > 0;
|
|
617
631
|
const primaryContent = matchedFiling
|
|
618
632
|
? inlineContent.get(matchedFiling.accessionNumber) ?? null
|
|
@@ -736,11 +750,11 @@ export function CorporateActionsView({
|
|
|
736
750
|
onRootKeyDown={handleKeyDown}
|
|
737
751
|
columns={columns}
|
|
738
752
|
items={rows}
|
|
753
|
+
// Opens at the top; the next event is a few rows down, scrolled only as far as it takes to show it.
|
|
739
754
|
scrollToIndex={selectedIdx}
|
|
740
|
-
scrollToIndexAlign={variant === "earnings-estimates" ? "start" : undefined}
|
|
741
755
|
scrollToIndexVersion={rows.length}
|
|
742
756
|
sortColumnId={null}
|
|
743
|
-
sortDirection="
|
|
757
|
+
sortDirection="desc"
|
|
744
758
|
getItemKey={eventRowKey}
|
|
745
759
|
renderCell={renderCell}
|
|
746
760
|
getExportMetadata={() => [
|
|
@@ -81,13 +81,16 @@ export function useFlowFeed() {
|
|
|
81
81
|
* The only status a scanner pane can change between: the cloud entitlement this
|
|
82
82
|
* feed arrived on, stream health while it is entitled, or the auth/entitlement
|
|
83
83
|
* refusal. The delay comes from the payload, since the server moves a session
|
|
84
|
-
* between the realtime and delayed instances without a remount.
|
|
84
|
+
* between the realtime and delayed instances without a remount. `closed` is the
|
|
85
|
+
* exchange calendar's word that the US market is shut, said before the feed
|
|
86
|
+
* answers and whatever it says.
|
|
85
87
|
*/
|
|
86
88
|
export function useScannerStatusFooter(
|
|
87
89
|
registrationId: string,
|
|
88
90
|
state: ScannerFeedState<Pick<ScannerPayload, "status" | "access" | "delayMinutes"> & { asOf?: number | null }>,
|
|
89
91
|
focused: boolean,
|
|
90
92
|
extra: PaneFooterSegment | null = null,
|
|
93
|
+
closed = false,
|
|
91
94
|
): void {
|
|
92
95
|
const delayed = state.payload?.access === "delayed";
|
|
93
96
|
const { hint: upgradeHint, segment } = useCloudAccessFooter({
|
|
@@ -110,9 +113,9 @@ export function useScannerStatusFooter(
|
|
|
110
113
|
}],
|
|
111
114
|
}];
|
|
112
115
|
}
|
|
113
|
-
const status = state.payload?.status;
|
|
116
|
+
const status = closed ? "closed" : state.payload?.status;
|
|
114
117
|
// The feed connects in the background; nothing to report until it answers.
|
|
115
|
-
if (!status || status === "starting" || state.savedAt != null) return [];
|
|
118
|
+
if (!status || status === "starting" || state.savedAt != null && !closed) return [];
|
|
116
119
|
if (status === "live") {
|
|
117
120
|
return delayed ? [] : [{ id: "scanner-status", parts: [{ text: "live", tone: "positive" as const }] }];
|
|
118
121
|
}
|
|
@@ -120,7 +123,7 @@ export function useScannerStatusFooter(
|
|
|
120
123
|
return [{ id: "scanner-status", parts: [{ text: "market closed", tone: "muted" as const }] }];
|
|
121
124
|
}
|
|
122
125
|
return [{ id: "scanner-status", parts: [{ text: "degraded", tone: "warning" as const }] }];
|
|
123
|
-
}, [delayed, state.denied, state.deniedReason, state.payload?.status, state.savedAt]);
|
|
126
|
+
}, [closed, delayed, state.denied, state.deniedReason, state.payload?.status, state.savedAt]);
|
|
124
127
|
|
|
125
128
|
// The upgrade segment carries the delay for free accounts; a delayed feed reaching Pro still says so.
|
|
126
129
|
const delayMinutes = delayed ? state.payload?.delayMinutes || CLOUD_QUOTE_DELAY_MINUTES : null;
|
|
@@ -31,6 +31,7 @@ import { isPlainKey } from "../../../utils/keyboard";
|
|
|
31
31
|
import { usePluginTickerActions } from "../../runtime";
|
|
32
32
|
import { ScannerDeniedState } from "./denied";
|
|
33
33
|
import { useFlowFeed, useScannerStatusFooter } from "./feed";
|
|
34
|
+
import { useUsScannerSessionClosed } from "./us-session";
|
|
34
35
|
import { useFlowHistory } from "./flow-history";
|
|
35
36
|
import {
|
|
36
37
|
DEFAULT_FLOW_FILTERS,
|
|
@@ -240,6 +241,9 @@ function tideSeries(rows: readonly FlowTideRow[], bucketMs: number): ResolvedSer
|
|
|
240
241
|
|
|
241
242
|
function FlowPane({ focused, width, height }: PaneProps) {
|
|
242
243
|
const feed = useFlowFeed();
|
|
244
|
+
// The calendar says when the US market is shut, whatever a warm scanner holds, as `fn FLOW` does.
|
|
245
|
+
const closed = useUsScannerSessionClosed();
|
|
246
|
+
const status = closed && feed.payload?.status !== "degraded" ? "closed" : feed.payload?.status;
|
|
243
247
|
const { pinTicker } = usePluginTickerActions();
|
|
244
248
|
const { createPaneFromTemplate } = usePluginAppActions();
|
|
245
249
|
const [selectedId, setSelectedId] = useState<string | null>(null);
|
|
@@ -321,7 +325,7 @@ function FlowPane({ focused, width, height }: PaneProps) {
|
|
|
321
325
|
{ savedCopy: feed.cacheScope && shownSearch !== null ? { key: ["scanner-flow-session", feed.cacheScope, shownSearch] } : null },
|
|
322
326
|
);
|
|
323
327
|
useAutoRefresh(session.updatedAt, () => session.load(), {
|
|
324
|
-
intervalMs: sessionShown &&
|
|
328
|
+
intervalMs: sessionShown && status === "live" ? FLOW_SESSION_LIVE_REFRESH_MS : null,
|
|
325
329
|
});
|
|
326
330
|
|
|
327
331
|
const scrollRef = useRef<ScrollBoxRenderable | null>(null);
|
|
@@ -335,8 +339,8 @@ function FlowPane({ focused, width, height }: PaneProps) {
|
|
|
335
339
|
}, [bodyRows, canLoadOlder, events.length, history.loadMore]);
|
|
336
340
|
|
|
337
341
|
const emptyState = useMemo(
|
|
338
|
-
() => flowEmptyState(kept.length, liveRows.length,
|
|
339
|
-
[
|
|
342
|
+
() => flowEmptyState(kept.length, liveRows.length, status, symbol),
|
|
343
|
+
[status, kept.length, liveRows.length, symbol],
|
|
340
344
|
);
|
|
341
345
|
|
|
342
346
|
const statusFooter = useMemo<PaneFooterSegment | null>(() => {
|
|
@@ -352,7 +356,7 @@ function FlowPane({ focused, width, height }: PaneProps) {
|
|
|
352
356
|
if (history.loading) return { id: "flow-history", parts: [{ text: "loading older prints", tone: "muted" }] };
|
|
353
357
|
return null;
|
|
354
358
|
}, [history.error, history.loading, session.data, session.error, tab]);
|
|
355
|
-
useScannerStatusFooter("flow", feed, focused, statusFooter);
|
|
359
|
+
useScannerStatusFooter("flow", feed, focused, statusFooter, status === "closed");
|
|
356
360
|
|
|
357
361
|
const dated = useMemo(() => flowRowsSpanDays(events), [events]);
|
|
358
362
|
const columns = useMemo(() => buildColumns(width, dated, !symbol), [dated, symbol, width]);
|