@gloom-sh/terminal 0.20.21 → 0.20.22
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 +4 -3
- package/patches/electrobun-devkit@2.0.5.patch +169 -3
- package/src/api-client/buybacks.ts +108 -0
- package/src/api-client/data.ts +213 -1
- package/src/api-client/dilution.ts +183 -0
- package/src/api-client/earnings.ts +2 -2
- package/src/api-client/equity-screener.ts +7 -0
- package/src/api-client/exchange-announcements.ts +16 -5
- package/src/api-client/exchange-short-balances.ts +24 -0
- package/src/api-client/hk-cbbc.ts +134 -0
- package/src/api-client/hk-ccass.ts +233 -0
- package/src/api-client/index.ts +55 -3
- package/src/api-client/jpx-short-positions.ts +24 -0
- package/src/api-client/market-discovery.ts +34 -6
- package/src/api-client/members.ts +5 -0
- package/src/api-client/ownership-disclosures.ts +35 -0
- package/src/api-client/paths.ts +2 -2
- package/src/api-client/request.ts +39 -10
- package/src/api-client/revenue-breakdown.ts +6 -2
- package/src/api-client/sfc-short-positions.ts +19 -0
- package/src/api-client/supply-chain.ts +22 -0
- package/src/api-client/taiwan-revenue.ts +134 -0
- package/src/api-client/types/jobs.ts +1 -0
- package/src/api-client/types/world-venues.ts +1 -0
- package/src/app/language-observer.tsx +6 -1
- package/src/app/pane-runtime/plugin-bindings.ts +9 -4
- package/src/app/runtime/plugin-bindings.ts +20 -2
- package/src/architecture/core-builtin-allowlist.json +2 -2
- package/src/architecture/dom-text-cuts-allowlist.json +2 -2
- package/src/architecture/floating-promise-allowlist.json +2 -2
- package/src/architecture/pane-tabs-allowlist.json +3 -0
- package/src/brokers/account-cache.ts +2 -1
- package/src/brokers/account-choice.ts +121 -0
- package/src/brokers/broker-portfolio-sync.ts +30 -5
- package/src/brokers/profile-form.ts +3 -0
- package/src/brokers/signed-in/adapter.ts +16 -5
- package/src/brokers/sync-broker-instance.ts +27 -3
- package/src/capabilities/asset-data-inputs.ts +8 -0
- package/src/capabilities/factories.ts +4 -0
- package/src/cli/commands/market.ts +136 -73
- package/src/cli/commands/news-search.ts +12 -0
- package/src/cli/commands/options-chain.ts +9 -3
- package/src/cli/commands/options-leaps.ts +55 -30
- package/src/cli/commands/overview.ts +14 -15
- package/src/cli/commands/search.ts +2 -1
- package/src/cli/commands/ticker.ts +17 -18
- package/src/cli/csv-export.ts +9 -5
- package/src/cli/desktop-pane-shot-browser.ts +143 -53
- package/src/cli/desktop-pane-shot.ts +50 -64
- package/src/cli/export-source.ts +9 -4
- package/src/cli/history-demergers.ts +134 -11
- package/src/cli/history-rows.ts +47 -7
- package/src/cli/pane-functions/catalog-snapshot.json +26 -22
- package/src/cli/pane-functions/catalog.ts +6 -2
- package/src/cli/pane-functions/dom.ts +8 -5
- package/src/cli/pane-functions/function-help.ts +34 -2
- package/src/cli/pane-functions/headless.ts +79 -27
- package/src/cli/pane-functions/index.ts +2 -1
- package/src/cli/pane-functions/market-session.ts +1 -1
- package/src/cli/pane-functions/resolver.ts +4 -1
- package/src/cli/pane-functions/screenshot-assessment.ts +26 -10
- package/src/cli/pane-functions/screenshot-bridge.ts +4 -1
- package/src/cli/pane-functions/screenshot-data-evidence.ts +11 -5
- package/src/cli/pane-functions/screenshot-payload.ts +18 -2
- package/src/cli/pane-functions/screenshot-render.ts +2 -0
- package/src/cli/pane-functions/ticker-question.ts +52 -47
- package/src/cli/rendered-table-rows.ts +75 -0
- package/src/cli/report-tables.ts +7 -1
- package/src/cli/result.ts +9 -2
- package/src/cli/visible-key-values.ts +3 -2
- package/src/components/chart/composite/format.ts +14 -1
- package/src/components/chart/composite/panel-surface/panel-cursor.tsx +37 -14
- package/src/components/chart/composite/panel-surface.tsx +1 -0
- package/src/components/chart/composite/text-renderer.ts +104 -44
- package/src/components/chart/curve/model.ts +4 -1
- package/src/components/command-bar/routes/root/start-here.ts +1 -1
- package/src/components/command-bar/routes/ticker-search/results.ts +2 -1
- package/src/components/data-table/export.ts +3 -1
- package/src/components/data-table/sections.ts +12 -1
- package/src/components/data-table/view.tsx +50 -8
- package/src/components/feed-data-table/stack-view.tsx +3 -0
- package/src/components/index.ts +3 -3
- package/src/components/layout/floating-pane.tsx +5 -2
- package/src/components/layout/pane/header.tsx +21 -2
- package/src/components/layout/pane/index.tsx +6 -2
- package/src/components/layout/pane/link-note.ts +12 -0
- package/src/components/layout/pane/title.ts +1 -3
- package/src/components/market-board/index.tsx +8 -11
- package/src/components/reader/reader-text.tsx +25 -2
- package/src/components/ticker/list-table-view.tsx +4 -0
- package/src/components/ui/data-table/column-fit.ts +129 -0
- package/src/components/ui/data-table/display-columns.ts +28 -9
- package/src/components/ui/data-table/index.tsx +57 -15
- package/src/components/ui/data-table/opentui/index.tsx +5 -0
- package/src/components/ui/data-table/types.ts +96 -5
- package/src/components/ui/data-table/visible-range.ts +9 -1
- package/src/components/ui/day-cell.ts +30 -0
- package/src/components/ui/index.ts +3 -1
- package/src/components/ui/prose.tsx +3 -1
- package/src/components/ui/table-layout.ts +188 -6
- package/src/core/state/app/layout.ts +7 -2
- package/src/core/state/app/state.ts +6 -2
- package/src/data/config/store/legacy-tabs.ts +51 -0
- package/src/data/config/store/node.ts +2 -2
- package/src/data/config/store/normalize.ts +11 -5
- package/src/data/config/store/shared-file.ts +8 -7
- package/src/data/config/store/shared-layout.ts +146 -0
- package/src/data/sqlite/access.ts +76 -11
- package/src/data/sqlite/checkpointer.ts +73 -10
- package/src/data/sqlite/database.ts +14 -1
- package/src/data/sqlite/retry.ts +1 -1
- package/src/docs/load.ts +5 -2
- package/src/docs/snapshot.json +1648 -4396
- package/src/i18n/es.ts +108 -0
- package/src/i18n/index.ts +74 -4
- package/src/i18n/ja.ts +108 -0
- package/src/i18n/ko.ts +108 -0
- package/src/i18n/react.ts +10 -2
- package/src/i18n/zh-cn.ts +108 -0
- package/src/i18n/zh-tw.ts +108 -0
- package/src/layout/pane-manager/dock-normalization.ts +61 -0
- package/src/market-data/ah-pair.ts +7 -2
- package/src/market-data/fund-actions.ts +21 -0
- package/src/market-data/market/freshness.ts +37 -33
- package/src/market-data/market/split-price-basis.ts +55 -0
- package/src/market-data/market/status.ts +2 -4
- package/src/market-data/price-adjustments.ts +115 -0
- package/src/market-data/quotes/balance-sheet-rate.ts +6 -2
- package/src/market-data/quotes/day-range.ts +24 -9
- package/src/market-data/quotes/freshness.ts +4 -3
- package/src/market-data/quotes/regular-session-valuation.ts +6 -0
- package/src/market-data/quotes/resolution.ts +18 -29
- package/src/market-data/quotes/time.ts +138 -14
- package/src/news/query-presets.ts +6 -4
- package/src/plugins/builtin/alerts/cli-forms.ts +3 -0
- package/src/plugins/builtin/alerts/cli.ts +19 -7
- package/src/plugins/builtin/alerts/events-pane.tsx +1 -0
- package/src/plugins/builtin/alerts/format.ts +22 -10
- package/src/plugins/builtin/alerts/headless.ts +7 -4
- package/src/plugins/builtin/alerts/history-pane.tsx +74 -33
- package/src/plugins/builtin/alerts/history-rows.ts +24 -1
- package/src/plugins/builtin/alerts/index.tsx +8 -10
- package/src/plugins/builtin/alerts/metric-data.ts +24 -6
- package/src/plugins/builtin/alerts/pane.tsx +9 -0
- package/src/plugins/builtin/alerts/pro-rules.ts +1 -0
- package/src/plugins/builtin/alerts/research-builder.ts +6 -2
- package/src/plugins/builtin/alerts/research-rules.ts +12 -0
- package/src/plugins/builtin/alerts/types.ts +1 -0
- package/src/plugins/builtin/awards/detail.tsx +5 -4
- package/src/plugins/builtin/awards/headless.ts +13 -4
- package/src/plugins/builtin/awards/model.ts +36 -1
- package/src/plugins/builtin/awards/pane.tsx +29 -9
- package/src/plugins/builtin/backtest/pane.tsx +4 -2
- package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
- package/src/plugins/builtin/broker-manager/detail.tsx +67 -4
- package/src/plugins/builtin/broker-manager/index.tsx +35 -4
- package/src/plugins/builtin/broker-manager/keyboard.ts +10 -0
- package/src/plugins/builtin/broker-manager/pane-actions.tsx +35 -2
- package/src/plugins/builtin/broker-trading/orders.tsx +10 -3
- package/src/plugins/builtin/broker-trading/ticket.tsx +1 -0
- package/src/plugins/builtin/buildout/format.ts +3 -1
- package/src/plugins/builtin/buybacks/client.ts +48 -0
- package/src/plugins/builtin/buybacks/index.tsx +22 -0
- package/src/plugins/builtin/buybacks/model.ts +151 -0
- package/src/plugins/builtin/buybacks/pane.tsx +140 -0
- package/src/plugins/builtin/buybacks/series.ts +36 -0
- package/src/plugins/builtin/catalysts/detail.tsx +14 -8
- package/src/plugins/builtin/catalysts/evidence.ts +11 -3
- package/src/plugins/builtin/catalysts/headless.ts +51 -8
- package/src/plugins/builtin/catalysts/kinds.ts +413 -0
- package/src/plugins/builtin/catalysts/model.ts +61 -18
- package/src/plugins/builtin/catalysts/pane.tsx +85 -19
- package/src/plugins/builtin/cds/client.ts +9 -2
- package/src/plugins/builtin/cds/headless.ts +25 -10
- package/src/plugins/builtin/cds/model.ts +37 -12
- package/src/plugins/builtin/cds/pane.tsx +18 -10
- package/src/plugins/builtin/chart-composer/chart-spec-edit.ts +68 -7
- package/src/plugins/builtin/chart-composer/chart-title.ts +114 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +1 -1
- package/src/plugins/builtin/chart-composer/headless.ts +13 -1
- package/src/plugins/builtin/chart-composer/index.tsx +2 -68
- package/src/plugins/builtin/chart-composer/leverage-overlay.ts +2 -4
- package/src/plugins/builtin/chart-composer/pane.tsx +11 -3
- package/src/plugins/builtin/chart-composer/presets.ts +1 -1
- package/src/plugins/builtin/chat/controller/draft-sync.ts +13 -7
- package/src/plugins/builtin/chat/controller/state.ts +4 -0
- package/src/plugins/builtin/chat/pane-requests.ts +8 -4
- package/src/plugins/builtin/clinical-trials/model.ts +2 -2
- package/src/plugins/builtin/clinical-trials/pane.tsx +3 -3
- package/src/plugins/builtin/cloud/askg/pane.tsx +60 -50
- package/src/plugins/builtin/cloud/auth-actions.tsx +2 -1
- package/src/plugins/builtin/comment-letters/pane.tsx +4 -2
- package/src/plugins/builtin/commodity-balances/headless.ts +2 -1
- package/src/plugins/builtin/company-attention/building-model.ts +3 -4
- package/src/plugins/builtin/company-attention/building.tsx +2 -0
- package/src/plugins/builtin/company-attention/headless.ts +2 -2
- package/src/plugins/builtin/company-attention/model.ts +2 -0
- package/src/plugins/builtin/company-attention/moves-model.ts +2 -1
- package/src/plugins/builtin/company-attention/moves.tsx +2 -0
- package/src/plugins/builtin/company-attention/pane.tsx +17 -3
- package/src/plugins/builtin/company-attention/signals-model.ts +3 -4
- package/src/plugins/builtin/company-attention/signals.tsx +5 -0
- package/src/plugins/builtin/company-kpis/headless.ts +26 -10
- package/src/plugins/builtin/company-kpis/model.ts +47 -7
- package/src/plugins/builtin/company-kpis/pane.tsx +36 -19
- package/src/plugins/builtin/company-kpis/taiwan-monthly-model.ts +99 -0
- package/src/plugins/builtin/company-kpis/taiwan-monthly-view.tsx +327 -0
- package/src/plugins/builtin/composite/ownership-browser.ts +28 -0
- package/src/plugins/builtin/composite/ownership.ts +5 -1
- package/src/plugins/builtin/congress-trades/detail.tsx +44 -8
- package/src/plugins/builtin/congress-trades/headless.ts +15 -11
- package/src/plugins/builtin/congress-trades/model.ts +104 -11
- package/src/plugins/builtin/congress-trades/pane.tsx +11 -6
- package/src/plugins/builtin/congress-trades/table.tsx +17 -10
- package/src/plugins/builtin/congress-trades/use-feed.ts +13 -2
- package/src/plugins/builtin/correlation/headless.ts +2 -2
- package/src/plugins/builtin/correlation/relationship/pane.tsx +11 -8
- package/src/plugins/builtin/correlation/relationship/view-model.ts +1 -19
- package/src/plugins/builtin/cot/headless.ts +1 -1
- package/src/plugins/builtin/cot/pane.tsx +7 -2
- package/src/plugins/builtin/cpi/headless.ts +2 -1
- package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
- package/src/plugins/builtin/credit-documents/detail.tsx +2 -1
- package/src/plugins/builtin/credit-documents/export.ts +18 -12
- package/src/plugins/builtin/credit-documents/model.ts +106 -25
- package/src/plugins/builtin/credit-documents/pane.tsx +9 -5
- package/src/plugins/builtin/crypto-board/defi-view.tsx +2 -1
- package/src/plugins/builtin/crypto-board/defi.ts +5 -4
- package/src/plugins/builtin/crypto-board/headless.ts +7 -2
- package/src/plugins/builtin/crypto-board/model.ts +6 -4
- package/src/plugins/builtin/crypto-board/pane.tsx +2 -1
- package/src/plugins/builtin/crypto-board/supply.ts +4 -3
- package/src/plugins/builtin/crypto-etf-flows/headless.ts +15 -8
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +6 -5
- package/src/plugins/builtin/debt-maturities/headless.ts +56 -38
- package/src/plugins/builtin/debt-maturities/model.ts +2 -1
- package/src/plugins/builtin/debt-maturities/pane.tsx +24 -22
- package/src/plugins/builtin/dilution/index.tsx +74 -0
- package/src/plugins/builtin/dilution/model.ts +159 -0
- package/src/plugins/builtin/dilution/pane.tsx +592 -0
- package/src/plugins/builtin/dividend-yield/headless.ts +24 -15
- package/src/plugins/builtin/dividend-yield/index.tsx +2 -1
- package/src/plugins/builtin/dividend-yield/model.ts +8 -5
- package/src/plugins/builtin/dividend-yield/pane.tsx +20 -11
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +6 -2
- package/src/plugins/builtin/dividend-yield/ranking.ts +7 -3
- package/src/plugins/builtin/dividend-yield/view.ts +36 -10
- package/src/plugins/builtin/docs/index.tsx +1 -1
- package/src/plugins/builtin/docs/pane.tsx +7 -3
- package/src/plugins/builtin/docs/use-docs.ts +2 -1
- package/src/plugins/builtin/earnings/board-model.ts +19 -6
- package/src/plugins/builtin/earnings/board-table.ts +64 -48
- package/src/plugins/builtin/earnings/board.tsx +93 -51
- package/src/plugins/builtin/earnings/headless.ts +71 -12
- package/src/plugins/builtin/earnings/history-model.ts +28 -15
- package/src/plugins/builtin/earnings/history.tsx +1 -1
- package/src/plugins/builtin/earnings-calls/calendar.tsx +23 -10
- package/src/plugins/builtin/earnings-calls/format.ts +34 -0
- package/src/plugins/builtin/earnings-calls/headless.ts +5 -4
- package/src/plugins/builtin/earnings-calls/pane.tsx +22 -17
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +14 -12
- package/src/plugins/builtin/earnings-ripple/pane.tsx +4 -3
- package/src/plugins/builtin/econ/calendar-model.ts +72 -3
- package/src/plugins/builtin/econ/index.tsx +9 -21
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -2
- package/src/plugins/builtin/econ-statistics/headless.ts +10 -5
- package/src/plugins/builtin/econ-statistics/pane.tsx +6 -3
- package/src/plugins/builtin/econ-statistics/view.ts +15 -4
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/model.ts +12 -3
- package/src/plugins/builtin/estimate-revisions/headless.ts +23 -2
- package/src/plugins/builtin/estimate-revisions/model.ts +63 -13
- package/src/plugins/builtin/estimate-revisions/pane.tsx +228 -225
- package/src/plugins/builtin/estimate-revisions/sorting.ts +8 -16
- package/src/plugins/builtin/exposure/drivers.ts +5 -2
- package/src/plugins/builtin/exposure/headless.ts +6 -3
- package/src/plugins/builtin/exposure/model.ts +2 -1
- package/src/plugins/builtin/exposure/pane.tsx +16 -7
- package/src/plugins/builtin/fear-greed/format.ts +7 -7
- package/src/plugins/builtin/fear-greed/pane.tsx +21 -7
- package/src/plugins/builtin/futures-curve/headless.ts +14 -9
- package/src/plugins/builtin/futures-curve/model.ts +12 -4
- package/src/plugins/builtin/futures-curve/pane.tsx +18 -15
- package/src/plugins/builtin/fx-matrix/headless.ts +3 -2
- package/src/plugins/builtin/gpu/headless.ts +10 -4
- package/src/plugins/builtin/holders/beneficial-model.ts +1 -1
- package/src/plugins/builtin/holders/beneficial-view.tsx +3 -2
- package/src/plugins/builtin/holders/ccass-market-pane.tsx +363 -0
- package/src/plugins/builtin/holders/ccass-view.tsx +323 -0
- package/src/plugins/builtin/holders/disclosures-view.tsx +63 -0
- package/src/plugins/builtin/holders/disclosures.ts +33 -0
- package/src/plugins/builtin/holders/headless.ts +9 -2
- package/src/plugins/builtin/holders/index.tsx +75 -1
- package/src/plugins/builtin/holders/pane.tsx +37 -10
- package/src/plugins/builtin/holders/report-rows.ts +2 -0
- package/src/plugins/builtin/holders/table-model.ts +14 -6
- package/src/plugins/builtin/holders/types.ts +2 -2
- package/src/plugins/builtin/insider/activity-chart.ts +141 -0
- package/src/plugins/builtin/insider/headless.ts +2 -1
- package/src/plugins/builtin/insider/index.tsx +74 -12
- package/src/plugins/builtin/insider/signals-cells.tsx +15 -8
- package/src/plugins/builtin/insider/signals.tsx +6 -5
- package/src/plugins/builtin/insider/table-model.ts +17 -17
- package/src/plugins/builtin/insider/table.tsx +18 -10
- package/src/plugins/builtin/ipo-calendar/headless.ts +55 -11
- package/src/plugins/builtin/ipo-calendar/listing-ipo.ts +31 -4
- package/src/plugins/builtin/ipo-calendar/model.ts +208 -47
- package/src/plugins/builtin/ipo-calendar/pane.tsx +87 -25
- package/src/plugins/builtin/iv-history/client.ts +17 -8
- package/src/plugins/builtin/iv-history/format.ts +23 -12
- package/src/plugins/builtin/iv-history/headless.ts +9 -5
- package/src/plugins/builtin/iv-history/model.ts +15 -13
- package/src/plugins/builtin/iv-history/pane.tsx +5 -2
- package/src/plugins/builtin/iv-history/screen-pane.tsx +46 -24
- package/src/plugins/builtin/jobs/headless.ts +4 -3
- package/src/plugins/builtin/jobs/pane.tsx +6 -5
- package/src/plugins/builtin/jodi/headless.ts +15 -2
- package/src/plugins/builtin/jodi/model.ts +46 -5
- package/src/plugins/builtin/jodi/pane.tsx +17 -13
- package/src/plugins/builtin/kelly-sizer/headless.ts +3 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -1
- package/src/plugins/builtin/macro-day/pane.tsx +12 -5
- package/src/plugins/builtin/market-halts/model.ts +10 -8
- package/src/plugins/builtin/market-halts/pane.tsx +1 -1
- package/src/plugins/builtin/market-heatmap/data.ts +17 -2
- package/src/plugins/builtin/market-heatmap/headless.ts +56 -6
- package/src/plugins/builtin/market-heatmap/index.tsx +55 -1
- package/src/plugins/builtin/market-heatmap/model.ts +27 -1
- package/src/plugins/builtin/market-movers/model.ts +7 -1
- package/src/plugins/builtin/market-movers/session-table.ts +1 -0
- package/src/plugins/builtin/market-movers/session.ts +1 -1
- package/src/plugins/builtin/market-movers/table.ts +1 -1
- package/src/plugins/builtin/members/headless.ts +13 -5
- package/src/plugins/builtin/members/model.ts +35 -1
- package/src/plugins/builtin/members/pane.tsx +16 -8
- package/src/plugins/builtin/mna/distress/detail.tsx +7 -6
- package/src/plugins/builtin/mna/distress/model.ts +7 -7
- package/src/plugins/builtin/mna/distress/pane.tsx +8 -7
- package/src/plugins/builtin/mna/headless.ts +40 -7
- package/src/plugins/builtin/mna/model.ts +66 -6
- package/src/plugins/builtin/mna/pane.tsx +118 -60
- package/src/plugins/builtin/news/wire/industry-pane.tsx +1 -0
- package/src/plugins/builtin/news/wire/news/table.tsx +15 -4
- package/src/plugins/builtin/notes/index.tsx +2 -1
- package/src/plugins/builtin/openfda/model.ts +1 -1
- package/src/plugins/builtin/openfda/pane.tsx +37 -9
- package/src/plugins/builtin/options/analytics.ts +30 -6
- package/src/plugins/builtin/options/calc-seed.ts +38 -3
- package/src/plugins/builtin/options/footer.ts +18 -1
- package/src/plugins/builtin/options/live-quotes.ts +21 -6
- package/src/plugins/builtin/options/open-interest-as-of.ts +5 -0
- package/src/plugins/builtin/options/quote-context.tsx +21 -8
- package/src/plugins/builtin/options/table.ts +17 -2
- package/src/plugins/builtin/options/view.tsx +97 -46
- package/src/plugins/builtin/options-calculator/model.ts +65 -3
- package/src/plugins/builtin/options-calculator/pane.tsx +11 -3
- package/src/plugins/builtin/options-calculator/valuation.ts +33 -0
- package/src/plugins/builtin/options-positioning/cbbc-model.ts +160 -0
- package/src/plugins/builtin/options-positioning/cbbc-view.tsx +453 -0
- package/src/plugins/builtin/options-positioning/index.tsx +22 -1
- package/src/plugins/builtin/options-positioning/pane.tsx +16 -1
- package/src/plugins/builtin/options-scenario/charts.tsx +2 -1
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +5 -5
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +11 -14
- package/src/plugins/builtin/options-scenario/csp-screen.ts +9 -1
- package/src/plugins/builtin/options-scenario/headless.ts +3 -3
- package/src/plugins/builtin/options-scenario/index.tsx +1 -1
- package/src/plugins/builtin/options-scenario/model.ts +7 -0
- package/src/plugins/builtin/options-scenario/pane.tsx +24 -14
- package/src/plugins/builtin/pe-band/pane.tsx +2 -1
- package/src/plugins/builtin/perps/cascade-tabs.tsx +2 -1
- package/src/plugins/builtin/perps/cascade.ts +4 -3
- package/src/plugins/builtin/perps/headless.ts +19 -12
- package/src/plugins/builtin/perps/model.ts +4 -3
- package/src/plugins/builtin/portfolio-list/cached-account.ts +3 -1
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -3
- package/src/plugins/builtin/portfolio-list/table.tsx +19 -2
- package/src/plugins/builtin/power/client.ts +2 -2
- package/src/plugins/builtin/power/detail.tsx +11 -8
- package/src/plugins/builtin/power/gas-model.ts +2 -1
- package/src/plugins/builtin/power/gas.tsx +3 -2
- package/src/plugins/builtin/power/headless.ts +4 -1
- package/src/plugins/builtin/power/model.ts +19 -0
- package/src/plugins/builtin/power/pane.tsx +5 -4
- package/src/plugins/builtin/power/prices-headless.ts +4 -3
- package/src/plugins/builtin/power/prices.tsx +7 -6
- package/src/plugins/builtin/primary-dealers/headless.ts +1 -1
- package/src/plugins/builtin/primary-dealers/model.ts +2 -1
- package/src/plugins/builtin/rate-path/headless.ts +5 -2
- package/src/plugins/builtin/rate-path/pane.tsx +13 -10
- package/src/plugins/builtin/realized-vol/fx-proxy.ts +7 -8
- package/src/plugins/builtin/realized-vol/headless.ts +3 -4
- package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
- package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
- package/src/plugins/builtin/research/analyst-model.ts +1 -1
- package/src/plugins/builtin/research/analyst-pane.tsx +2 -1
- package/src/plugins/builtin/research/earnings-estimates-pane.tsx +262 -0
- package/src/plugins/builtin/research/event-charts.ts +322 -0
- package/src/plugins/builtin/research/event-data.ts +138 -0
- package/src/plugins/builtin/research/event-detail.tsx +442 -0
- package/src/plugins/builtin/research/event-model.ts +328 -31
- package/src/plugins/builtin/research/event-sources.ts +58 -8
- package/src/plugins/builtin/research/event-views.tsx +397 -0
- package/src/plugins/builtin/research/events-headless.ts +60 -4
- package/src/plugins/builtin/research/headless-schema.ts +2 -2
- package/src/plugins/builtin/research/headless.ts +84 -7
- package/src/plugins/builtin/research/index.tsx +19 -17
- package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -8
- package/src/plugins/builtin/research/relative-valuation-headless.ts +8 -4
- package/src/plugins/builtin/research/relative-valuation-model.ts +23 -8
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +10 -0
- package/src/plugins/builtin/revenue-breakdown/client.ts +9 -4
- package/src/plugins/builtin/revenue-breakdown/headless.ts +1 -1
- package/src/plugins/builtin/revenue-breakdown/index.tsx +2 -1
- package/src/plugins/builtin/revenue-breakdown/model.ts +2 -0
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +10 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +14 -9
- package/src/plugins/builtin/scanner/headless.ts +2 -0
- package/src/plugins/builtin/scanner/lock-note.ts +5 -9
- package/src/plugins/builtin/sec/exchange-filings.ts +44 -0
- package/src/plugins/builtin/sec/fund-facts.ts +10 -8
- package/src/plugins/builtin/sec/headless.ts +60 -8
- package/src/plugins/builtin/sec/index.tsx +129 -61
- package/src/plugins/builtin/sec/model.ts +10 -4
- package/src/plugins/builtin/sec/row-summaries.ts +1 -0
- package/src/plugins/builtin/series-inventory.ts +4 -0
- package/src/plugins/builtin/shared/beat-miss-chart.ts +66 -0
- package/src/plugins/builtin/shared/day-entries.ts +41 -0
- package/src/plugins/builtin/shared/earnings-calendar.ts +80 -53
- package/src/plugins/builtin/shared/earnings-report.ts +53 -15
- package/src/plugins/builtin/shared/history-span.ts +2 -1
- package/src/plugins/builtin/shared/locked-rows.tsx +1 -1
- package/src/plugins/builtin/shared/pro-lock-note.ts +8 -12
- package/src/plugins/builtin/shared/ticker-request.ts +4 -2
- package/src/plugins/builtin/shared/volatility/live-session.ts +6 -7
- package/src/plugins/builtin/shared/volatility/option-snapshot.ts +30 -0
- package/src/plugins/builtin/shared/volatility/quote-session.ts +49 -0
- package/src/plugins/builtin/short-interest/exchange-balances.ts +76 -0
- package/src/plugins/builtin/short-interest/exchange-positions-pane.tsx +55 -0
- package/src/plugins/builtin/short-interest/headless.ts +15 -2
- package/src/plugins/builtin/short-interest/index.tsx +7 -3
- package/src/plugins/builtin/short-interest/jpx.ts +38 -0
- package/src/plugins/builtin/short-interest/model.ts +3 -2
- package/src/plugins/builtin/short-interest/pane.tsx +4 -3
- package/src/plugins/builtin/short-interest/publications-model.ts +73 -2
- package/src/plugins/builtin/short-interest/publications-pane.tsx +16 -4
- package/src/plugins/builtin/short-interest/sfc.ts +40 -0
- package/src/plugins/builtin/short-interest/surface.tsx +16 -2
- package/src/plugins/builtin/short-volume/headless.ts +18 -3
- package/src/plugins/builtin/short-volume/model.ts +6 -1
- package/src/plugins/builtin/short-volume/pane.tsx +8 -7
- package/src/plugins/builtin/short-volume/sgx.ts +23 -0
- package/src/plugins/builtin/social-mentions/outliers-model.ts +2 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +10 -8
- package/src/plugins/builtin/supply-chain/client.ts +10 -2
- package/src/plugins/builtin/supply-chain/directories.ts +18 -0
- package/src/plugins/builtin/supply-chain/evidence.ts +12 -4
- package/src/plugins/builtin/supply-chain/headless.ts +20 -7
- package/src/plugins/builtin/supply-chain/pane.tsx +40 -11
- package/src/plugins/builtin/thirteenf/api.ts +299 -31
- package/src/plugins/builtin/thirteenf/data.ts +126 -32
- package/src/plugins/builtin/thirteenf/format.ts +4 -6
- package/src/plugins/builtin/thirteenf/headless.ts +68 -29
- package/src/plugins/builtin/thirteenf/model.ts +24 -11
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +16 -8
- package/src/plugins/builtin/thirteenf/pane.tsx +45 -22
- package/src/plugins/builtin/thirteenf/report-notes.ts +52 -2
- package/src/plugins/builtin/thirteenf/session-scope.ts +57 -0
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +17 -4
- package/src/plugins/builtin/thirteenf/split-history.ts +119 -0
- package/src/plugins/builtin/thirteenf/table.ts +6 -6
- package/src/plugins/builtin/thirteenf/types.ts +17 -1
- package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +11 -0
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +12 -8
- package/src/plugins/builtin/ticker-detail/data-panes/history-bars.ts +5 -4
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +7 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +12 -5
- package/src/plugins/builtin/ticker-detail/financials/aggregation.ts +36 -5
- package/src/plugins/builtin/ticker-detail/financials/model.ts +172 -39
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +62 -8
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +64 -10
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +67 -32
- package/src/plugins/builtin/ticker-detail/headless.ts +33 -12
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +75 -14
- package/src/plugins/builtin/ticker-detail/overview/model.ts +26 -20
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +14 -8
- package/src/plugins/builtin/ticker-detail/overview/types.ts +2 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +45 -17
- package/src/plugins/builtin/ticker-detail/pane.tsx +5 -3
- package/src/plugins/builtin/ticker-detail/research-groups.ts +15 -2
- package/src/plugins/builtin/ticker-detail/research-tabs.ts +2 -1
- package/src/plugins/builtin/time-sales/headless.ts +3 -3
- package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
- package/src/plugins/builtin/treasury-auctions/cache.ts +44 -19
- package/src/plugins/builtin/treasury-auctions/client.ts +9 -4
- package/src/plugins/builtin/vol-surface/charts.tsx +3 -1
- package/src/plugins/builtin/vol-surface/events.ts +8 -5
- package/src/plugins/builtin/vol-surface/evidence.ts +2 -2
- package/src/plugins/builtin/vol-surface/headless.ts +46 -28
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
- package/src/plugins/builtin/vol-surface/model.ts +34 -9
- package/src/plugins/builtin/vol-surface/pane.tsx +35 -67
- package/src/plugins/builtin/vol-surface/quote-coverage.ts +68 -0
- package/src/plugins/builtin/vol-surface/tables.ts +57 -6
- package/src/plugins/builtin/volatility/charts.tsx +7 -3
- package/src/plugins/builtin/volatility/headless.ts +5 -5
- package/src/plugins/builtin/volatility/pane.tsx +8 -5
- package/src/plugins/builtin/world-indices/headless.ts +5 -3
- package/src/plugins/builtin/world-venue-map/headless.ts +15 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +5 -3
- package/src/plugins/builtin/world-venue-map/pane.tsx +4 -3
- package/src/plugins/builtin/world-venue-map/venue-exceptions.ts +72 -0
- package/src/plugins/builtin/world-venue-map/venue-header.tsx +20 -11
- package/src/plugins/builtin/yield-curve/headless.ts +4 -2
- package/src/plugins/builtin/yield-curve/index.tsx +4 -3
- package/src/plugins/catalog-browser.ts +3 -34
- package/src/plugins/marketplace/feed.ts +3 -2
- package/src/plugins/registry/contributions.ts +37 -10
- package/src/plugins/registry/index.ts +2 -1
- package/src/portfolio/column-values.ts +8 -9
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/i18n.ts +3 -2
- package/src/renderers/dom/css.d.ts +1 -0
- package/src/renderers/dom/data-table/index.tsx +60 -8
- package/src/renderers/dom/data-table/row.tsx +1 -1
- package/src/renderers/electrobun/bun/desktop/backend.ts +12 -1
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +7 -1
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +2 -0
- package/src/sources/gloomberb-cloud/batched-lookups.ts +12 -1
- package/src/sources/gloomberb-cloud/index.ts +36 -3
- package/src/sources/gloomberb-cloud/normalizers.ts +1 -0
- package/src/sources/provider-router/financials.ts +4 -4
- package/src/sources/provider-router/index.ts +9 -1
- package/src/state/app/context/index.tsx +12 -4
- package/src/sync/broker-instances.ts +63 -11
- package/src/sync/config-merge.ts +1 -1
- package/src/sync/sanitize.ts +2 -0
- package/src/test-support/cloud-api.ts +34 -0
- package/src/test-support/strict-table-capture.tsx +83 -0
- package/src/tickers/search/index.ts +23 -7
- package/src/time-series/alignment.ts +14 -4
- package/src/time-series/base-series.ts +5 -4
- package/src/time-series/chart-data.ts +2 -0
- package/src/time-series/chart-seed.ts +3 -1
- package/src/time-series/fundamentals/current-valuation.ts +22 -5
- package/src/time-series/fundamentals/history-link.ts +25 -0
- package/src/time-series/fundamentals/quarterly-ttm.ts +50 -5
- package/src/time-series/market.ts +30 -4
- package/src/time-series/price-comparison.ts +39 -60
- package/src/time-series/resolve.ts +18 -11
- package/src/time-series/spec.ts +2 -1
- package/src/time-series/studies/formula.ts +4 -2
- package/src/time-series/studies/indicators.ts +2 -0
- package/src/time-series/studies/pair.ts +4 -2
- package/src/time-series/studies/shared.ts +1 -0
- package/src/time-series/types.ts +2 -1
- package/src/time-series/use-chart-resolution.ts +32 -14
- package/src/types/config.ts +13 -61
- package/src/types/data-provider.ts +8 -0
- package/src/types/financials.ts +49 -6
- package/src/types/headless.ts +30 -0
- package/src/types/plugin-context.ts +8 -1
- package/src/utils/crypto-pair.ts +10 -0
- package/src/utils/day-format.ts +104 -0
- package/src/utils/exchange-announcements.ts +35 -12
- package/src/utils/financial-statements.ts +40 -46
- package/src/utils/format.ts +39 -12
- package/src/utils/forward-dividend.ts +2 -1
- package/src/utils/trailing-dividend.ts +47 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +0 -771
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
HeadlessRowsResult,
|
|
12
12
|
} from "../../../types/plugin";
|
|
13
13
|
import type { EarningsEvent } from "../../../types/data-provider";
|
|
14
|
-
import { addDays, boardKey, boardReport, boardRowOf, fallbackReport, historyListing, MIN_AVERAGE_REPORTS, newYorkToday, type BoardReport } from "./board-model";
|
|
14
|
+
import { addDays, boardKey, boardReport, boardReportKind, boardRowOf, fallbackReport, historyListing, MIN_AVERAGE_REPORTS, newYorkToday, type BoardKind, type BoardReport } from "./board-model";
|
|
15
15
|
import { BOARD_WEEKS, boardRangeDays, boardRangeLabel, isBoardWeek, requestedBoardRange, type BoardRange } from "./calendar-model";
|
|
16
16
|
import { fetchEarningsCalendar, fetchEarningsHistory, noHistoryAbroad, sameHistoryListing } from "./client";
|
|
17
17
|
import { loadEarningsCalendar } from "./data/cache";
|
|
@@ -27,7 +27,7 @@ import { findUsListingOfCompany } from "../../../tickers/us-listing";
|
|
|
27
27
|
import { shortCompanyName } from "../../../tickers/company-name";
|
|
28
28
|
import { REPORT_ROWS } from "../shared/headless-options";
|
|
29
29
|
import { DATE_OPTION_EXAMPLES, isoDateOption } from "../../../utils/calendar-date";
|
|
30
|
-
import type { HeadlessPaneOptionDef } from "../../../types/headless";
|
|
30
|
+
import type { HeadlessBundleSection, HeadlessPaneOptionDef } from "../../../types/headless";
|
|
31
31
|
|
|
32
32
|
const right = "right" as const;
|
|
33
33
|
const num = (value: unknown) => (typeof value === "number" && Number.isFinite(value) ? value : null);
|
|
@@ -85,6 +85,25 @@ const BOARD_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
85
85
|
{ key: "averageMove", header: "Avg move", align: right, format: (value) => moveSize(num(value)) },
|
|
86
86
|
];
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* The text report's tables, as the pane's views are: reports to come with their date's status and analysts,
|
|
90
|
+
* reports out with their actual and surprise. No currency column: a report in another currency than dollars
|
|
91
|
+
* writes its code after each EPS and sales figure ("7.21 CNY"), as the pane does. The exports keep
|
|
92
|
+
* BOARD_COLUMNS for every row.
|
|
93
|
+
*/
|
|
94
|
+
const UPCOMING_TEXT_COLUMNS = BOARD_COLUMNS.filter((column) => !["epsActual", "epsBasis", "epsSurprise"].includes(column.key));
|
|
95
|
+
const REPORTED_TEXT_COLUMNS = BOARD_COLUMNS.filter((column) => !["dateStatus", "epsAnalysts"].includes(column.key));
|
|
96
|
+
const REPORT_CURRENCY_FIGURES = new Set(["epsEstimate", "epsActual", "revenueEstimate"]);
|
|
97
|
+
const inRowCurrency = (column: HeadlessPaneColumn): HeadlessPaneColumn => ({
|
|
98
|
+
...column,
|
|
99
|
+
format: (value, row) => {
|
|
100
|
+
const text = column.format ? column.format(value, row) : value == null ? MISSING_VALUE : String(value);
|
|
101
|
+
return typeof row.currency === "string" && row.currency !== "USD" && text !== MISSING_VALUE && text !== ACTUAL_PENDING ? `${text} ${row.currency}` : text;
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
const textColumnsFor = (columns: HeadlessPaneColumn[]) => columns.filter((column) => column.key !== "currency")
|
|
105
|
+
.map((column) => REPORT_CURRENCY_FIGURES.has(column.key) ? inRowCurrency(column) : column);
|
|
106
|
+
|
|
88
107
|
/** What the board's currency and cap are, and which listings abroad it has, in its metadata. */
|
|
89
108
|
const BOARD_CURRENCY_NOTE = "currency is the ISO currency of a report's EPS and sales figures: dollars for US listings, a listing abroad's own (CNY for Tencent), never converted. marketCap is in dollars for every company, so the board ranks them together. Besides US listings the board has the Hong Kong, China A and Singapore top 100's reports whose date the company confirmed or that are out, from each listing's earnings history; they have no time of day, implied or average move. A company listed on two of those markets is shown once, under its primary listing, and found by any of its lines.";
|
|
90
109
|
|
|
@@ -104,7 +123,7 @@ const HISTORY_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
104
123
|
// The quarter as the company names it; its end month where the company's calls do not say. Exports keep both.
|
|
105
124
|
{ key: "fiscalQuarter", header: "Quarter", format: (value, row) => typeof value === "string" ? value : fiscalPeriodText(typeof row.fiscalPeriod === "string" ? row.fiscalPeriod : undefined) },
|
|
106
125
|
// A reported quarter with no consensus on record says so (exports: in the status column), never a bare blank.
|
|
107
|
-
{ key: "epsEstimate", header: "EPS est", align: right, format: (value, row) => lacksConsensus({ epsActual: num(row.epsActual), epsEstimate: num(value) }) ? NO_CONSENSUS : epsText(num(value)) },
|
|
126
|
+
{ key: "epsEstimate", header: "EPS est", align: right, format: (value, row) => lacksConsensus({ epsActual: num(row.epsActual), epsEstimate: num(value), epsBasis: row.epsBasis }) ? NO_CONSENSUS : epsText(num(value)) },
|
|
108
127
|
{ key: "epsAnalysts", header: "Ests", align: right },
|
|
109
128
|
// A report out with no actual yet says so (exports: in the status column), never a bare blank.
|
|
110
129
|
{ key: "epsActual", header: "EPS act", align: right, format: (value, row) => actualPending({ date: typeof row.date === "string" ? row.date : null, epsActual: num(value), dateStatus: typeof row.dateStatus === "string" ? row.dateStatus : null }, pendingAbroad(row)) ? ACTUAL_PENDING : epsText(num(value)) },
|
|
@@ -153,16 +172,18 @@ const NO_OWNERSHIP = new Map();
|
|
|
153
172
|
/**
|
|
154
173
|
* EVTS with a ticker: the board is the market's whatever the ticker, so the
|
|
155
174
|
* report says so once, whether the ticker is on it and when, and where its
|
|
156
|
-
* own report dates are.
|
|
175
|
+
* own report dates are. `board` is what the report lists: with `--kind`, that
|
|
176
|
+
* view's reports alone, which `kind` names.
|
|
157
177
|
*/
|
|
158
|
-
function boardTickerNotice(symbol: string, board: ReadonlyArray<Pick<BoardReport, "symbol" | "listings" | "date">>, from: string, to: string): { notice: string; date: string | null; row: string | null } {
|
|
178
|
+
function boardTickerNotice(symbol: string, board: ReadonlyArray<Pick<BoardReport, "symbol" | "listings" | "date">>, from: string, to: string, kind?: string | null): { notice: string; date: string | null; row: string | null } {
|
|
159
179
|
const report = board.find((entry) => boardRowOf(entry, symbol));
|
|
160
180
|
// CCB named by its H share is on the board under its A share.
|
|
161
181
|
const shownAs = report?.listings && !sameHistoryListing(report.symbol, boardKey(symbol)) ? ` (as ${report.symbol})` : "";
|
|
162
182
|
const where = report ? `${symbol} reports on ${report.date}${shownAs}` : `${symbol} is not on it`;
|
|
163
183
|
const days = from === to ? from : `${from} to ${to}`;
|
|
184
|
+
const view = kind === "upcoming" ? " (Upcoming)" : kind === "reported" ? " (Reported)" : "";
|
|
164
185
|
return {
|
|
165
|
-
notice: `EVTS is the market's earnings board for ${days}, not one company's: ${where}. For ${symbol}'s own report dates run \`gloom fn ERN ${symbol}\`.`,
|
|
186
|
+
notice: `EVTS is the market's earnings board for ${days}${view}, not one company's: ${where}. For ${symbol}'s own report dates run \`gloom fn ERN ${symbol}\`.`,
|
|
166
187
|
date: report?.date ?? null,
|
|
167
188
|
row: report?.symbol ?? null,
|
|
168
189
|
};
|
|
@@ -233,7 +254,10 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
|
|
|
233
254
|
const extra = uncovered.map((event) => stored.get(event) ?? fallbackReport(event, NO_OWNERSHIP, today));
|
|
234
255
|
const limit = Number(args.options.limit ?? 200);
|
|
235
256
|
const all = [...reports, ...extra].sort((left, right) => left.date.localeCompare(right.date) || (right.marketCap ?? 0) - (left.marketCap ?? 0));
|
|
236
|
-
|
|
257
|
+
// `--kind` lists one of the pane's views alone, as `shot` opens on it: the reports to come, or those out.
|
|
258
|
+
const kind = boardKindOption(args.options);
|
|
259
|
+
const listed = kind ? all.filter((report) => boardReportKind(report, today) === kind) : all;
|
|
260
|
+
const rows = listed.slice(0, limit).map((report) => ({
|
|
237
261
|
date: report.date,
|
|
238
262
|
dateStatus: report.dateStatus,
|
|
239
263
|
timing: report.timing ? TIMING_LABEL[report.timing] : null,
|
|
@@ -246,6 +270,7 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
|
|
|
246
270
|
epsEstimate: report.epsEstimate,
|
|
247
271
|
epsAnalysts: report.epsAnalysts,
|
|
248
272
|
epsActual: report.epsActual,
|
|
273
|
+
...(report.streetEps ? { streetEps: report.streetEps, gaapEps: report.gaapEps } : {}),
|
|
249
274
|
epsActualProvisional: report.provisional,
|
|
250
275
|
epsBasis: showsEpsBasis(report) ? epsBasisName(report.epsBasis) : null,
|
|
251
276
|
...surpriseFields("epsSurprise", report.epsSurprise),
|
|
@@ -253,12 +278,26 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
|
|
|
253
278
|
impliedMove: report.impliedMove,
|
|
254
279
|
averageMove: report.averageMove,
|
|
255
280
|
}));
|
|
256
|
-
|
|
281
|
+
// Said of the reports listed: with `--kind`, the view's.
|
|
282
|
+
const ticker = highlight ? boardTickerNotice(highlight, listed, query.from, query.to, kind) : null;
|
|
283
|
+
// As the pane's Upcoming and Reported views: the reports to come first, those out under them.
|
|
284
|
+
const kinds = listed.slice(0, limit).map((report) => boardReportKind(report, today));
|
|
285
|
+
const upcoming = rows.filter((_row, index) => kinds[index] === "upcoming");
|
|
286
|
+
const reported = rows.filter((_row, index) => kinds[index] === "reported");
|
|
287
|
+
const [main, mainColumns] = kind === "reported" || (!kind && !upcoming.length && reported.length)
|
|
288
|
+
? [reported, REPORTED_TEXT_COLUMNS] : [upcoming, UPCOMING_TEXT_COLUMNS];
|
|
289
|
+
const textSections: HeadlessBundleSection[] = main === upcoming && reported.length
|
|
290
|
+
? [{ title: "Reported", columns: textColumnsFor(REPORTED_TEXT_COLUMNS), rows: reported }] : [];
|
|
257
291
|
return {
|
|
258
292
|
columns: BOARD_COLUMNS,
|
|
259
293
|
rows,
|
|
260
|
-
|
|
261
|
-
|
|
294
|
+
textColumns: textColumnsFor(mainColumns),
|
|
295
|
+
textRows: main,
|
|
296
|
+
...(textSections.length ? { textSections } : {}),
|
|
297
|
+
// The pane's words for a view with none while the other has some.
|
|
298
|
+
...(kind && !listed.length && all.length ? { empty: kind === "upcoming" ? "Every report on these days is out." : "None of these reports is out yet." } : {}),
|
|
299
|
+
complete: rows.length === listed.length && cloud.status !== "rejected",
|
|
300
|
+
...(rows.length < listed.length ? { notes: [`Showing ${rows.length} of ${listed.length} reports. Retrieve all with --limit ${listed.length}.`] } : {}),
|
|
262
301
|
errors: cloud.status === "rejected" ? [String(cloud.reason instanceof Error ? cloud.reason.message : cloud.reason)] : undefined,
|
|
263
302
|
metadata: {
|
|
264
303
|
...(ticker ? { notices: [ticker.notice], highlight: { symbol: highlight, onBoard: ticker.date != null, date: ticker.date, row: ticker.row } } : {}),
|
|
@@ -270,9 +309,10 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
|
|
|
270
309
|
provisional: PROVISIONAL_NOTE,
|
|
271
310
|
marketCap: MARKET_CAP_NOTE,
|
|
272
311
|
currency: BOARD_CURRENCY_NOTE,
|
|
273
|
-
|
|
312
|
+
...(kind ? { kind } : {}),
|
|
313
|
+
total: listed.length,
|
|
274
314
|
returned: rows.length,
|
|
275
|
-
truncated: rows.length <
|
|
315
|
+
truncated: rows.length < listed.length,
|
|
276
316
|
},
|
|
277
317
|
};
|
|
278
318
|
}
|
|
@@ -334,6 +374,7 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
|
|
|
334
374
|
epsEstimate: row.epsEstimate,
|
|
335
375
|
epsAnalysts: row.epsAnalysts,
|
|
336
376
|
epsActual: row.epsActual,
|
|
377
|
+
...(row.streetEps ? { streetEps: row.streetEps, gaapEps: row.gaapEps } : {}),
|
|
337
378
|
epsActualProvisional: row.provisional,
|
|
338
379
|
epsBasis: !showsEpsBasis(row) ? null : !row.epsBasis && row.epsDilution === "basic" ? "basic" : epsBasisName(row.epsBasis),
|
|
339
380
|
...surpriseFields("epsSurprise", row.epsSurprise),
|
|
@@ -382,6 +423,17 @@ const BOARD_RANGE_OPTIONS: HeadlessPaneOptionDef[] = [
|
|
|
382
423
|
description: "A week's reports, Monday to Friday: last, this or next. Without it or --date, the days ahead." },
|
|
383
424
|
];
|
|
384
425
|
|
|
426
|
+
/** The board's Upcoming or Reported view, which `shot` opens on and `fn` lists alone. */
|
|
427
|
+
const BOARD_KIND_OPTION: HeadlessPaneOptionDef = {
|
|
428
|
+
key: "kind", type: "enum", settingKey: "kind", values: [{ value: "upcoming" }, { value: "reported" }],
|
|
429
|
+
example: "--kind reported", exampleWithoutArgument: true,
|
|
430
|
+
description: "One view of the board: upcoming, the reports to come, or reported, the reports out. Without it, the pane opens on Upcoming while a report is to come and the text report prints both.",
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
function boardKindOption(options: HeadlessPaneLoadArgs["options"]): BoardKind | null {
|
|
434
|
+
return options.kind === "upcoming" || options.kind === "reported" ? options.kind : null;
|
|
435
|
+
}
|
|
436
|
+
|
|
385
437
|
/** The days `--date` or `--week` asks for; the days ahead without either. */
|
|
386
438
|
function boardRange(options: HeadlessPaneLoadArgs["options"]): BoardRange {
|
|
387
439
|
if (options.date && isBoardWeek(options.week)) throw new Error("Use --date or --week, not both.");
|
|
@@ -395,6 +447,7 @@ export function createEarningsBoardHeadless(deps: EarningsHeadlessDependencies =
|
|
|
395
447
|
argument: { kind: "ticker", placeholder: "ticker", description: "Optional; the board is the same.", minimum: 0, maximum: 1 },
|
|
396
448
|
options: [
|
|
397
449
|
...BOARD_RANGE_OPTIONS,
|
|
450
|
+
BOARD_KIND_OPTION,
|
|
398
451
|
{ key: "limit", shot: REPORT_ROWS, description: "Maximum rows.", type: "integer", defaultValue: 200, minimum: 1, maximum: 1000 },
|
|
399
452
|
],
|
|
400
453
|
columns: BOARD_COLUMNS,
|
|
@@ -421,6 +474,7 @@ export function createEarningsHeadless(deps: EarningsHeadlessDependencies = defa
|
|
|
421
474
|
},
|
|
422
475
|
options: [
|
|
423
476
|
...BOARD_RANGE_OPTIONS,
|
|
477
|
+
BOARD_KIND_OPTION,
|
|
424
478
|
{ key: "limit", shot: REPORT_ROWS, description: "Maximum rows on the market board or a ticker list.", type: "integer", defaultValue: 200, minimum: 1, maximum: 1000 },
|
|
425
479
|
],
|
|
426
480
|
columns: BOARD_COLUMNS,
|
|
@@ -435,6 +489,11 @@ export function createEarningsHeadless(deps: EarningsHeadlessDependencies = defa
|
|
|
435
489
|
const symbol = args.symbols[0]!;
|
|
436
490
|
throw new Error(`ERN ${symbol} is its report history, past reports included; --date and --week pick the board's days. Run \`gloom fn EVTS ${symbol} ${args.options.date ? `--date ${args.options.date}` : `--week ${args.options.week}`}\` for the market's.`);
|
|
437
491
|
}
|
|
492
|
+
const kind = boardKindOption(args.options);
|
|
493
|
+
if (args.symbols.length === 1 && kind) {
|
|
494
|
+
const symbol = args.symbols[0]!;
|
|
495
|
+
throw new Error(`ERN ${symbol} is its report history, reports to come and out together; --kind picks one view of the board. Run \`gloom fn EVTS ${symbol} --kind ${kind}\` for the market's.`);
|
|
496
|
+
}
|
|
438
497
|
return args.symbols.length === 1 ? historyReport(args.symbols[0]!, context, deps) : boardRows(args, context, deps, undefined, range);
|
|
439
498
|
},
|
|
440
499
|
};
|
|
@@ -4,14 +4,14 @@ import { scalarPoint } from "../../../components/chart/static/series";
|
|
|
4
4
|
import type { TimeSeriesPoint } from "../../../time-series/types";
|
|
5
5
|
import { formatMonthYear } from "../../../utils/datetime-format";
|
|
6
6
|
import type { EarningsEvent } from "../../../types/data-provider";
|
|
7
|
-
import type { EarningsDateStatus, EarningsEpsBasis } from "../../../types/financials";
|
|
8
|
-
import { earningsDateStatus, earningsEpsBasis, isProvisionalActual } from "../shared/earnings-report";
|
|
7
|
+
import type { EarningsDateStatus, EarningsEpsBasis, FilingEpsDetails } from "../../../types/financials";
|
|
8
|
+
import { displayEarningsEpsBasis, earningsDateStatus, earningsEpsBasis, isProvisionalActual, reportedEpsComparison } from "../shared/earnings-report";
|
|
9
9
|
import { resolveReportRows, type ReportRowAdapter } from "../shared/earnings-calendar";
|
|
10
10
|
import { addDays, MIN_AVERAGE_REPORTS } from "./board-model";
|
|
11
11
|
import { fiscalQuarterOf, fiscalPeriodText, placedPeriod, type FiscalQuarter } from "./fiscal-quarter";
|
|
12
12
|
import { datedYear, epsText, fiscalMonth, impliedText, moveSize, shortDate, surprise, TIMING_LABEL, type Surprise } from "./format";
|
|
13
13
|
|
|
14
|
-
export interface HistoryRow {
|
|
14
|
+
export interface HistoryRow extends FilingEpsDetails {
|
|
15
15
|
key: string;
|
|
16
16
|
date: string;
|
|
17
17
|
timing: EarningsTiming | null;
|
|
@@ -36,6 +36,7 @@ export interface HistoryRow {
|
|
|
36
36
|
/** Analysts behind `epsEstimate`. */
|
|
37
37
|
epsAnalysts: number | null;
|
|
38
38
|
epsActual: number | null;
|
|
39
|
+
epsActualSource?: EarningsHistoryPayload["reports"][number]["epsActualSource"];
|
|
39
40
|
/** The actual is the company's press release's, until the calendar's replaces it. */
|
|
40
41
|
provisional: boolean;
|
|
41
42
|
/** Null when the reported figure's basis cannot be determined. */
|
|
@@ -130,8 +131,8 @@ const historyAdapter = (today: string, abroad: boolean): ReportRowAdapter<Histor
|
|
|
130
131
|
reported: (row, epsActual, report) => {
|
|
131
132
|
// A listing abroad's row takes the calendar's figure only as a quarter's, in the currency its own figures are in.
|
|
132
133
|
const fits = !abroad || (row.periodKind === "quarter" && row.currency != null && report?.currency === row.currency);
|
|
133
|
-
|
|
134
|
-
return { ...row, dateStatus: "reported", epsActual:
|
|
134
|
+
if (row.epsActual != null || epsActual == null || !fits) return { ...row, dateStatus: "reported" };
|
|
135
|
+
return { ...row, dateStatus: "reported", epsActual, epsBasis: null, epsActualSource: undefined, epsDilution: null, provisional: false, epsSurprise: null };
|
|
135
136
|
},
|
|
136
137
|
fromCalendar(report, row) {
|
|
137
138
|
// A listing abroad's consensus goes with its date only in the currency its figures are in: an unlabelled figure would read as dollars.
|
|
@@ -141,7 +142,9 @@ const historyAdapter = (today: string, abroad: boolean): ReportRowAdapter<Histor
|
|
|
141
142
|
const inCurrency = !abroad || (report.currency != null && report.currency === currency);
|
|
142
143
|
const estimate = report.epsEstimate != null && quarter && inCurrency;
|
|
143
144
|
const epsEstimate = estimate ? report.epsEstimate : row?.epsEstimate ?? null;
|
|
144
|
-
const
|
|
145
|
+
const estimateBasis = estimate ? report.epsBasis ?? (epsEstimate === row?.epsEstimate ? row?.epsBasis : null) : row?.epsBasis;
|
|
146
|
+
const calendarActual = quarter && inCurrency ? report.epsActual : null;
|
|
147
|
+
const epsActual = calendarActual ?? row?.epsActual ?? null;
|
|
145
148
|
const move = row?.move ?? null;
|
|
146
149
|
const dateStatus = report.dateStatus;
|
|
147
150
|
const revenueEstimate = quarter && (!abroad || (report.revenueCurrency != null && report.revenueCurrency === currency)) ? report.revenueEstimate : null;
|
|
@@ -164,11 +167,11 @@ const historyAdapter = (today: string, abroad: boolean): ReportRowAdapter<Histor
|
|
|
164
167
|
epsEstimate,
|
|
165
168
|
epsAnalysts: estimate ? report.epsAnalysts : row?.epsAnalysts ?? null,
|
|
166
169
|
epsActual,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
epsBasis:
|
|
170
|
-
epsDilution: row?.epsDilution ?? null,
|
|
171
|
-
epsSurprise:
|
|
170
|
+
...(calendarActual == null ? { epsActualSource: row?.epsActualSource } : {}),
|
|
171
|
+
provisional: calendarActual == null && (row?.provisional ?? false),
|
|
172
|
+
epsBasis: calendarActual != null ? null : epsActual == null ? estimateBasis ?? null : row?.epsBasis ?? null,
|
|
173
|
+
epsDilution: calendarActual == null ? row?.epsDilution ?? null : null,
|
|
174
|
+
epsSurprise: calendarActual == null && !estimate ? row?.epsSurprise ?? null : null,
|
|
172
175
|
revenueEstimate: revenueEstimate ?? row?.revenueEstimate ?? null,
|
|
173
176
|
revenueActual: row?.revenueActual ?? null,
|
|
174
177
|
revenueCurrency: row?.revenueCurrency ?? null,
|
|
@@ -232,10 +235,12 @@ export function historyRows(
|
|
|
232
235
|
epsEstimate: report.epsEstimate,
|
|
233
236
|
epsAnalysts: report.epsAnalysts,
|
|
234
237
|
epsActual: report.epsActual,
|
|
238
|
+
epsActualSource: report.epsActualSource,
|
|
235
239
|
provisional: isProvisionalActual(report),
|
|
236
|
-
epsBasis:
|
|
240
|
+
epsBasis: displayEarningsEpsBasis(report),
|
|
241
|
+
...(report.streetEps ? { streetEps: report.streetEps, gaapEps: report.gaapEps } : {}),
|
|
237
242
|
epsDilution: abroad && report.epsDilution === "basic" ? "basic" : null,
|
|
238
|
-
epsSurprise:
|
|
243
|
+
epsSurprise: reportedEpsComparison(report)?.surprise ?? null,
|
|
239
244
|
revenueEstimate: report.revenueEstimate,
|
|
240
245
|
revenueActual: revenue?.amount ?? null,
|
|
241
246
|
revenueCurrency: revenue?.currency ?? null,
|
|
@@ -253,7 +258,7 @@ export function historyRows(
|
|
|
253
258
|
const basis = earningsEpsBasis(payload?.consensusBasis);
|
|
254
259
|
const rows = resolveReportRows(recorded, upcoming, today, historyAdapter(today, abroad))
|
|
255
260
|
// The calendar's next report past the stored horizon is on the basis the company's reports were measured on.
|
|
256
|
-
.map((row) => (basis && row.upcoming && row.epsEstimate != null && row.epsBasis == null ? { ...row, epsBasis: basis } : row))
|
|
261
|
+
.map((row) => (basis && row.upcoming && row.epsActual == null && row.epsEstimate != null && row.epsBasis == null ? { ...row, epsBasis: basis } : row))
|
|
257
262
|
.map((row) => withFiscalQuarter(row, anchor))
|
|
258
263
|
.sort((left, right) => right.date.localeCompare(left.date));
|
|
259
264
|
const upcomingRows = rows.filter((row) => row.upcoming).slice(-1);
|
|
@@ -284,7 +289,15 @@ function daysUntil(date: string, today: string): string {
|
|
|
284
289
|
}
|
|
285
290
|
|
|
286
291
|
/** Most important first: the chart-table layout drops figures from the end. */
|
|
287
|
-
export function historyFigures(rows: readonly HistoryRow[], today: string): StatItem[] {
|
|
292
|
+
export function historyFigures(rows: readonly HistoryRow[], today: string, selected?: HistoryRow | null): StatItem[] {
|
|
293
|
+
if (selected?.epsBasis === "company-adjusted" && selected.streetEps) {
|
|
294
|
+
return [
|
|
295
|
+
{ id: "filed", label: "Company EPS", value: epsText(selected.epsActual), detail: "non-GAAP diluted" },
|
|
296
|
+
{ id: "gaap", label: "GAAP diluted", value: epsText(selected.gaapEps) },
|
|
297
|
+
{ id: "street", label: "Street actual", value: epsText(selected.streetEps.actual), detail: "includes stock comp" },
|
|
298
|
+
{ id: "street-estimate", label: "Street estimate", value: epsText(selected.streetEps.estimate), detail: "basis unconfirmed" },
|
|
299
|
+
];
|
|
300
|
+
}
|
|
288
301
|
const next = rows.find((row) => row.upcoming);
|
|
289
302
|
const past = rows.filter((row) => !row.upcoming).slice(0, AVERAGE_OVER);
|
|
290
303
|
const moves = past.flatMap((row) => (row.move == null ? [] : [Math.abs(row.move)]));
|
|
@@ -100,7 +100,7 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
|
|
|
100
100
|
const link = useChartTableSelection({
|
|
101
101
|
rows, getId: (row) => row.key, getDate: barDate, selectedId: selected?.key ?? null, onSelect: setSelectedId, focused,
|
|
102
102
|
});
|
|
103
|
-
const figures = useMemo(() => historyFigures(rows, today), [rows, today]);
|
|
103
|
+
const figures = useMemo(() => historyFigures(rows, today, selected), [rows, today, selected]);
|
|
104
104
|
// The upcoming report has no bar until it is priced; the legend then reads the latest report's.
|
|
105
105
|
const latestBar = bars.at(-1);
|
|
106
106
|
const cursorDate = link.cursorDate ?? (latestBar ? barDate(latestBar) : null);
|
|
@@ -34,12 +34,14 @@ import { usePluginPaneState } from "../../runtime";
|
|
|
34
34
|
import { newYorkToday } from "../earnings/board-model";
|
|
35
35
|
import { ProWall, SignInWall } from "../cloud/auth-actions";
|
|
36
36
|
import { cachedUpcomingCalls, calendarAway, loadUpcomingCalls, statusOf, upcomingCutNotice, type UpcomingCallsResult } from "./data";
|
|
37
|
-
import { callPeriod } from "./format";
|
|
37
|
+
import { callPeriod, callPeriodMayBeBlank } from "./format";
|
|
38
38
|
import {
|
|
39
39
|
calendarDays,
|
|
40
40
|
calendarSections,
|
|
41
|
+
callDay,
|
|
41
42
|
callLocalClock,
|
|
42
43
|
callNewYorkClock,
|
|
44
|
+
callTimeKnown,
|
|
43
45
|
clockIsNewYork,
|
|
44
46
|
DEFAULT_CALENDAR_SORT,
|
|
45
47
|
isUpcomingCall,
|
|
@@ -79,7 +81,7 @@ const SORTABLE: Partial<Record<CalendarColumnId, CalendarSort["column"]>> = {
|
|
|
79
81
|
ticker: "ticker", company: "company", local: "time", newYork: "time",
|
|
80
82
|
};
|
|
81
83
|
|
|
82
|
-
function calendarColumns(width: number, { localClock }: { localClock: boolean }): CalendarColumn[] {
|
|
84
|
+
export function calendarColumns(width: number, { localClock }: { localClock: boolean }): CalendarColumn[] {
|
|
83
85
|
const fixed = (list: CalendarColumn[]) =>
|
|
84
86
|
list.reduce((sum, column) => sum + (column.id === "company" ? 0 : tableColumnWidth(column)) + TABLE_COLUMN_GAP, 2);
|
|
85
87
|
const original = localClock ? ALL_COLUMNS : ALL_COLUMNS.filter((column) => column.id !== "local");
|
|
@@ -92,12 +94,21 @@ function calendarColumns(width: number, { localClock }: { localClock: boolean })
|
|
|
92
94
|
return markHiddenTableColumns(original, columns.map((column) => (column.id === "company" ? { ...column, width: companyWidth } : column)));
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
/**
|
|
98
|
+
* One cell of a call in the calendar.
|
|
99
|
+
*
|
|
100
|
+
* A call known by its day alone has no start to show: its LOCAL and ET are
|
|
101
|
+
* blank with no time missing, which the row says itself (`callTimeKnown`, on a
|
|
102
|
+
* call that has its day). A row with no day at all owes both. The calendar
|
|
103
|
+
* cannot tell a company that has not announced a time from a time the service
|
|
104
|
+
* did not read: both arrive as a day alone, and are read as the former.
|
|
105
|
+
*/
|
|
106
|
+
export function calendarCallCell(call: CloudEarningsCallPayload, column: CalendarColumn, now: number): DataTableCell {
|
|
98
107
|
// A call already over is shown and quieter, as a row that no longer applies is.
|
|
99
108
|
const over = !isUpcomingCall(call, now);
|
|
100
109
|
const tone = (color: string) => (over ? colors.textMuted : color);
|
|
110
|
+
const dayAlone = callDay(call) !== null && !callTimeKnown(call);
|
|
111
|
+
const noStart = { text: MISSING, color: colors.textMuted, ...(dayAlone ? { mayBeBlank: true } : {}) };
|
|
101
112
|
switch (column.id) {
|
|
102
113
|
case "ticker":
|
|
103
114
|
return { text: call.ticker, color: tone(colors.text), attributes: over ? undefined : TextAttributes.BOLD };
|
|
@@ -105,14 +116,14 @@ function renderCalendarCell(row: CalendarRow, column: CalendarColumn, now: numbe
|
|
|
105
116
|
return { text: call.companyName ?? call.ticker, color: tone(colors.text) };
|
|
106
117
|
case "local": {
|
|
107
118
|
const clock = callLocalClock(call);
|
|
108
|
-
return clock ? { text: clock, color: tone(colors.text) } :
|
|
119
|
+
return clock ? { text: clock, color: tone(colors.text) } : noStart;
|
|
109
120
|
}
|
|
110
121
|
case "newYork": {
|
|
111
122
|
const clock = callNewYorkClock(call);
|
|
112
|
-
return clock ? { text: clock, color: tone(colors.textDim) } :
|
|
123
|
+
return clock ? { text: clock, color: tone(colors.textDim) } : noStart;
|
|
113
124
|
}
|
|
114
125
|
case "period":
|
|
115
|
-
return { text: callPeriod(call), color: tone(colors.textDim) };
|
|
126
|
+
return { text: callPeriod(call), color: tone(colors.textDim), ...(callPeriodMayBeBlank(call) ? { mayBeBlank: true } : {}) };
|
|
116
127
|
case "away":
|
|
117
128
|
return { text: calendarAway(call, now), color: over ? colors.textMuted : colors.textBright };
|
|
118
129
|
}
|
|
@@ -204,7 +215,9 @@ export function UpcomingCallsView({ focused, width, height, view, renderCompany
|
|
|
204
215
|
?? null;
|
|
205
216
|
const localClock = useMemo(() => !clockIsNewYork(calls, now), [calls, now]);
|
|
206
217
|
const columns = useMemo(() => calendarColumns(width, { localClock }), [localClock, width]);
|
|
207
|
-
const renderCell = useCallback((row: CalendarRow, column: CalendarColumn) =>
|
|
218
|
+
const renderCell = useCallback((row: CalendarRow, column: CalendarColumn): DataTableCell => (
|
|
219
|
+
isSectionedItemRow(row) ? calendarCallCell(row.item, column, now) : { text: "" }
|
|
220
|
+
), [now]);
|
|
208
221
|
|
|
209
222
|
const openCall = openTicker ? calls.find((call) => call.ticker === openTicker) ?? null : null;
|
|
210
223
|
const detailOpen = !!openTicker && entitled;
|
|
@@ -250,7 +263,7 @@ export function UpcomingCallsView({ focused, width, height, view, renderCompany
|
|
|
250
263
|
return (
|
|
251
264
|
<SignInWall
|
|
252
265
|
placement="calls-signin" width={width} height={height} symbol={null}
|
|
253
|
-
action="browse earnings call transcripts" needsVerification={verificationRequired}
|
|
266
|
+
action="browse earnings call transcripts" needsVerification={verificationRequired} pro
|
|
254
267
|
/>
|
|
255
268
|
);
|
|
256
269
|
}
|
|
@@ -82,6 +82,8 @@ const SHORT_EVENT_LABELS: Record<string, string> = {
|
|
|
82
82
|
"business update": "Update",
|
|
83
83
|
"trial results": "Trial",
|
|
84
84
|
"shareholder call": "Holders",
|
|
85
|
+
// A second call after the results call, for analysts (Micron's "post earnings analyst call").
|
|
86
|
+
"analyst call": "Analyst",
|
|
85
87
|
};
|
|
86
88
|
|
|
87
89
|
/** The period column: "FQ4 26", or a short event label ("M&A", "Inv day"). */
|
|
@@ -91,6 +93,38 @@ export function callPeriod(call: Omit<NamedCall, "ticker">): string {
|
|
|
91
93
|
return formatPeriod(call.fiscalYear, call.fiscalQuarter, call.fiscalHalf);
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Whether a call's PERIOD is blank with no period missing: an event that is
|
|
98
|
+
* not an earnings call (`eventKind: "other"`) has no fiscal period. Where it
|
|
99
|
+
* has a label it reads by it ("Analyst", "Inv day"), which names the event and
|
|
100
|
+
* is no period: the mark stands with the label or without, so a capture leaves
|
|
101
|
+
* the row out and the label fills nothing for the earnings calls beside it.
|
|
102
|
+
*
|
|
103
|
+
* An earnings call owes its period, and so does a call whose kind is unclear
|
|
104
|
+
* (`eventKind` null, or an older server that sends none): the list cannot tell
|
|
105
|
+
* such a call from an earnings call whose period was lost, so a capture whose
|
|
106
|
+
* every such row has none fails on the column.
|
|
107
|
+
*/
|
|
108
|
+
export function callPeriodMayBeBlank(call: Pick<CloudEarningsCallPayload, "eventKind">): boolean {
|
|
109
|
+
return call.eventKind === "other";
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Whether a call's LENGTH is blank with nothing missing: a call with no
|
|
114
|
+
* transcript has no recording to time yet (it is still to come, or not yet
|
|
115
|
+
* produced).
|
|
116
|
+
*
|
|
117
|
+
* A transcribed call owes one. A transcript read from a document has no
|
|
118
|
+
* recording either, which the list cannot tell from a recording whose length
|
|
119
|
+
* was lost (both a null `durationSeconds` on a transcribed call). The list
|
|
120
|
+
* drops the column while no call states a length (`omitWhenEmpty`), so a
|
|
121
|
+
* capture fails on it only where it stays: a call with no transcript shows
|
|
122
|
+
* one, and every transcribed row has none.
|
|
123
|
+
*/
|
|
124
|
+
export function callLengthMayBeBlank(call: Pick<CloudEarningsCallPayload, "hasTranscript">): boolean {
|
|
125
|
+
return !call.hasTranscript;
|
|
126
|
+
}
|
|
127
|
+
|
|
94
128
|
/** Title for the detail stack: names the call so the body need not repeat it. */
|
|
95
129
|
export function callTitle(call: NamedCall): string {
|
|
96
130
|
const label = eventLabelOf(call);
|
|
@@ -54,17 +54,18 @@ import { savedCopyMark, unansweredRefreshError } from "../../../data/saved-copie
|
|
|
54
54
|
|
|
55
55
|
const optionalErrors = (error: string | null) => error ? [error] : undefined;
|
|
56
56
|
|
|
57
|
+
/** As the pane: one company's calls print no ticker or company on each row, and a length or event none has leaves the text. */
|
|
57
58
|
const CALL_COLUMNS = [
|
|
58
|
-
{ key: "ticker", header: "Ticker" },
|
|
59
|
-
{ key: "company", header: "Company" },
|
|
59
|
+
{ key: "ticker", header: "Ticker", omitWhenSame: true },
|
|
60
|
+
{ key: "company", header: "Company", omitWhenSame: true },
|
|
60
61
|
// A call known by its day alone prints the day, never a midnight it was not held at.
|
|
61
62
|
{ key: "callAt", header: "Call date", textFormat: (value: unknown, row: HeadlessPaneRow) => callDateText(value, row.timeKnown !== false) },
|
|
62
63
|
{ key: "fiscalYear", header: "FY", align: "right" as const },
|
|
63
64
|
// A half year's results read H1, never a blank quarter beside the year's.
|
|
64
65
|
{ key: "fiscalQuarter", header: "FQ", align: "right" as const, textFormat: (value: unknown, row: HeadlessPaneRow) => String(fiscalQuarterText({ fiscalQuarter: value as number | null, fiscalHalf: row.fiscalHalf as number | undefined }) ?? "—") },
|
|
65
|
-
{ key: "event", header: "Event" },
|
|
66
|
+
{ key: "event", header: "Event", omitWhenEmpty: true },
|
|
66
67
|
{ key: "status", header: "Status" },
|
|
67
|
-
{ key: "durationSeconds", header: "Seconds", align: "right" as const },
|
|
68
|
+
{ key: "durationSeconds", header: "Seconds", align: "right" as const, omitWhenEmpty: true },
|
|
68
69
|
{ key: "wordCount", header: "Words", align: "right" as const },
|
|
69
70
|
{ key: "sentiment", header: "Tone", align: "right" as const },
|
|
70
71
|
];
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
useQueryBarSearch,
|
|
11
11
|
useTableLoadMore,
|
|
12
12
|
type DataTableCell,
|
|
13
|
+
type DataTableColumn,
|
|
13
14
|
type DataTableKeyEvent,
|
|
14
15
|
type DataTableRootKeyContext,
|
|
15
16
|
type PaneFooterSegment,
|
|
@@ -53,7 +54,7 @@ import {
|
|
|
53
54
|
import { isPermanentClientError } from "../../../api-client/errors";
|
|
54
55
|
import { savedCopyFooterInfo } from "../../../components/layout/pane/footer";
|
|
55
56
|
import { STALE_SEGMENT } from "../../../components/layout/pane/status-footer";
|
|
56
|
-
import { callPeriod, callTitle, eventLabelOf, formatCallDate, formatDuration, formatSentiment, noCallsText, searchingCallsTitle } from "./format";
|
|
57
|
+
import { callLengthMayBeBlank, callPeriod, callPeriodMayBeBlank, callTitle, eventLabelOf, formatCallDate, formatDuration, formatSentiment, noCallsText, searchingCallsTitle } from "./format";
|
|
57
58
|
import { findCallForQuarter, findInLines, MIN_FIND_LENGTH, originalIsMachineTranscript, translatedFrom, turnParagraphs } from "./model";
|
|
58
59
|
import { READER_TABS, TranscriptView, type ReaderTab, type TranscriptPlayback } from "./transcript-view";
|
|
59
60
|
import { PLAYBACK_RATES, SEEK_STEP_SECONDS, useCallPlayback } from "./use-call-playback";
|
|
@@ -65,14 +66,15 @@ function isReaderTab(value: string): value is ReaderTab {
|
|
|
65
66
|
return READER_TABS.some((tab) => tab.value === value);
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
id: string;
|
|
70
|
-
label: string;
|
|
71
|
-
width: number;
|
|
72
|
-
align: "left" | "right";
|
|
73
|
-
}
|
|
69
|
+
type CallColumn = DataTableColumn;
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
/**
|
|
72
|
+
* The list's columns. One company's calls (`CALLS 600690`) name it in the
|
|
73
|
+
* title, so no column repeats it and the period, an event's name among them
|
|
74
|
+
* ("written results"), takes its room. A length no call states (a written
|
|
75
|
+
* call has none) leaves the table.
|
|
76
|
+
*/
|
|
77
|
+
export function callListColumns(width: number, showTicker: boolean): CallColumn[] {
|
|
76
78
|
const tickerWidth = showTicker ? 8 : 0;
|
|
77
79
|
const dateWidth = 10;
|
|
78
80
|
const periodWidth = 8;
|
|
@@ -86,17 +88,20 @@ function buildColumns(width: number, showTicker: boolean): CallColumn[] {
|
|
|
86
88
|
|
|
87
89
|
const columns: CallColumn[] = [];
|
|
88
90
|
if (showTicker) columns.push({ id: "ticker", label: "TICKER", width: tickerWidth, align: "left" });
|
|
91
|
+
if (showTicker) columns.push({ id: "company", label: "COMPANY", width: companyWidth, align: "left" });
|
|
89
92
|
columns.push(
|
|
90
|
-
{ id: "company", label: "COMPANY", width: companyWidth, align: "left" },
|
|
91
93
|
{ id: "date", label: "DATE", width: dateWidth, align: "left" },
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
showTicker
|
|
95
|
+
? { id: "period", label: "PERIOD", width: periodWidth, align: "left" }
|
|
96
|
+
: { id: "period", label: "PERIOD", width: Math.max(periodWidth, width - dateWidth - lengthWidth - sentimentWidth - 6), align: "left", flexGrow: 1 },
|
|
97
|
+
{ id: "length", label: "LENGTH", width: lengthWidth, align: "right", omitWhenEmpty: true },
|
|
94
98
|
{ id: "sentiment", label: "TONE", width: sentimentWidth, align: "right" },
|
|
95
99
|
);
|
|
96
100
|
return columns;
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
|
|
103
|
+
/** One cell of a call in the list. PERIOD and LENGTH say per row when their dash is no value lost (format.ts). */
|
|
104
|
+
export function callListCell(call: CloudEarningsCallPayload, column: CallColumn, now: number): DataTableCell {
|
|
100
105
|
switch (column.id) {
|
|
101
106
|
case "ticker":
|
|
102
107
|
return { text: call.ticker };
|
|
@@ -105,9 +110,9 @@ function renderCell(call: CloudEarningsCallPayload, column: CallColumn, now: num
|
|
|
105
110
|
case "date":
|
|
106
111
|
return { text: formatCallDate(call.callAt), color: colors.textDim };
|
|
107
112
|
case "period":
|
|
108
|
-
return { text: callPeriod(call) };
|
|
113
|
+
return { text: callPeriod(call), ...(callPeriodMayBeBlank(call) ? { mayBeBlank: true } : {}) };
|
|
109
114
|
case "length":
|
|
110
|
-
return { text: formatDuration(call.durationSeconds), color: colors.textDim };
|
|
115
|
+
return { text: formatDuration(call.durationSeconds), color: colors.textDim, ...(callLengthMayBeBlank(call) ? { mayBeBlank: true } : {}) };
|
|
111
116
|
case "sentiment": {
|
|
112
117
|
// A call still to come says how far away it is, not that it is queued.
|
|
113
118
|
if (isUpcomingCall(call, now)) return { text: callCountdown(call, now), color: colors.text };
|
|
@@ -749,8 +754,8 @@ function CallsListView({
|
|
|
749
754
|
(!access.hasProAccess || listError?.status === 402);
|
|
750
755
|
const transcriptProRequired = transcriptError?.status === 402;
|
|
751
756
|
|
|
752
|
-
const columns = useMemo(() =>
|
|
753
|
-
const renderRow = useCallback((call: CloudEarningsCallPayload, column: CallColumn) =>
|
|
757
|
+
const columns = useMemo(() => callListColumns(width, !ticker), [width, ticker]);
|
|
758
|
+
const renderRow = useCallback((call: CloudEarningsCallPayload, column: CallColumn) => callListCell(call, column, now), [now]);
|
|
754
759
|
|
|
755
760
|
const isSearchUp = useSearchFocusUp();
|
|
756
761
|
const handleRootKey = useCallback(
|
|
@@ -987,7 +992,7 @@ function CallsListView({
|
|
|
987
992
|
placement={detailOpen ? "calls-transcript-signin" : "calls-signin"}
|
|
988
993
|
width={width} height={height} symbol={detailOpen ? selected?.ticker ?? symbol : symbol} exchange={exchange}
|
|
989
994
|
action="browse earnings call transcripts"
|
|
990
|
-
needsVerification={verificationRequired}
|
|
995
|
+
needsVerification={verificationRequired} pro
|
|
991
996
|
/>
|
|
992
997
|
);
|
|
993
998
|
}
|