@gloom-sh/terminal 0.20.21 → 0.20.23
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/account/heard-from-question.tsx +6 -4
- package/src/account/heard-from.ts +3 -4
- 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/heard-from.ts +5 -7
- 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 +68 -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/ticker-data.ts +3 -1
- 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-cell-metrics-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 +141 -76
- 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 +20 -23
- 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/listing-arg.ts +45 -18
- package/src/cli/pane-functions/catalog-snapshot.json +26 -22
- package/src/cli/pane-functions/catalog.ts +6 -2
- package/src/cli/pane-functions/data.ts +3 -1
- package/src/cli/pane-functions/dom.ts +8 -5
- package/src/cli/pane-functions/freshness.ts +6 -1
- package/src/cli/pane-functions/function-help.ts +32 -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 +13 -3
- 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 +21 -3
- 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/symbol-list.ts +52 -14
- package/src/cli/ticker-resolution.ts +133 -38
- package/src/cli/visible-key-values.ts +3 -2
- package/src/components/chart/composite/composite-chart.tsx +12 -0
- 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/composite/types.ts +18 -0
- package/src/components/chart/composite/use-composite-chart-keyboard.ts +38 -15
- package/src/components/chart/curve/model.ts +4 -1
- package/src/components/chart-table/header.tsx +11 -5
- package/src/components/chart-table/selection.ts +20 -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 +52 -8
- package/src/components/feed-data-table/stack-view.tsx +88 -5
- package/src/components/index.ts +3 -3
- package/src/components/layout/floating-pane.tsx +5 -2
- package/src/components/layout/pane/header.tsx +33 -32
- 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/badge/index.tsx +9 -4
- package/src/components/ticker/badge/list.tsx +3 -1
- 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 +64 -16
- package/src/components/ui/data-table/muted-row.tsx +47 -0
- package/src/components/ui/data-table/opentui/index.tsx +47 -11
- package/src/components/ui/data-table/spill.ts +36 -0
- package/src/components/ui/data-table/types.ts +113 -6
- package/src/components/ui/data-table/use-column-order.ts +11 -0
- package/src/components/ui/data-table/visible-range.ts +9 -1
- package/src/components/ui/day-cell.ts +30 -0
- package/src/components/ui/icon.tsx +50 -3
- package/src/components/ui/index.ts +3 -1
- package/src/components/ui/list-view.tsx +2 -2
- package/src/components/ui/prose.tsx +3 -1
- package/src/components/ui/table-layout.ts +220 -6
- package/src/components/ui/terminal-hover-label.tsx +49 -0
- package/src/components/use-pinned-moment.ts +222 -13
- package/src/core/state/app/layout.ts +7 -2
- package/src/core/state/app/state.ts +17 -4
- package/src/core/state/app/types.ts +2 -1
- 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 +90 -12
- package/src/data/sqlite/checkpointer.ts +75 -12
- package/src/data/sqlite/database.ts +18 -1
- package/src/data/sqlite/retry.ts +1 -1
- package/src/docs/load.ts +5 -2
- package/src/docs/snapshot.json +1862 -4456
- package/src/i18n/es.ts +109 -0
- package/src/i18n/index.ts +74 -4
- package/src/i18n/ja.ts +109 -0
- package/src/i18n/ko.ts +109 -0
- package/src/i18n/react.ts +10 -2
- package/src/i18n/zh-cn.ts +109 -0
- package/src/i18n/zh-tw.ts +109 -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 +39 -35
- package/src/market-data/market/globex-day.ts +14 -0
- 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/published-us-sessions.ts +3 -2
- 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/live-valuation.ts +4 -2
- package/src/market-data/quotes/metadata.ts +48 -5
- package/src/market-data/quotes/regular-session-valuation.ts +18 -1
- 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 +93 -36
- 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 +14 -5
- 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/attachments/desktop.tsx +46 -12
- package/src/plugins/builtin/chat/channels.ts +5 -2
- package/src/plugins/builtin/chat/content/composer-runtime.ts +64 -65
- package/src/plugins/builtin/chat/content/footer.tsx +17 -7
- package/src/plugins/builtin/chat/content/index.tsx +108 -36
- package/src/plugins/builtin/chat/content/new-dm-dialog.tsx +21 -8
- package/src/plugins/builtin/chat/content/selection-runtime.ts +16 -0
- package/src/plugins/builtin/chat/content/shortcuts.ts +3 -0
- package/src/plugins/builtin/chat/content/snapshot.ts +37 -13
- package/src/plugins/builtin/chat/content/transcript.tsx +12 -0
- package/src/plugins/builtin/chat/content/types.ts +2 -0
- package/src/plugins/builtin/chat/controller/channels.ts +15 -15
- package/src/plugins/builtin/chat/controller/draft-sync.ts +13 -7
- package/src/plugins/builtin/chat/controller/index.ts +140 -34
- package/src/plugins/builtin/chat/controller/lifecycle.ts +8 -12
- package/src/plugins/builtin/chat/controller/persistence.ts +32 -4
- package/src/plugins/builtin/chat/controller/send.ts +41 -17
- package/src/plugins/builtin/chat/controller/session-runtime.ts +28 -27
- package/src/plugins/builtin/chat/controller/state.ts +21 -8
- package/src/plugins/builtin/chat/controller/storage.ts +41 -4
- package/src/plugins/builtin/chat/controller/view.ts +6 -3
- package/src/plugins/builtin/chat/index.tsx +1 -1
- package/src/plugins/builtin/chat/layout.ts +8 -1
- package/src/plugins/builtin/chat/message/desktop.tsx +15 -11
- package/src/plugins/builtin/chat/message/header.tsx +112 -30
- package/src/plugins/builtin/chat/message/reactions.tsx +10 -11
- package/src/plugins/builtin/chat/message/render-state.ts +4 -2
- package/src/plugins/builtin/chat/message/terminal.tsx +13 -15
- package/src/plugins/builtin/chat/message/types.ts +5 -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/cloud-tweets/table.tsx +25 -2
- 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 +58 -10
- 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/compute.ts +6 -1
- 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/custom-view/loader.ts +95 -34
- package/src/plugins/builtin/custom-view/pane.tsx +31 -41
- package/src/plugins/builtin/custom-view/table.ts +201 -0
- 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/client.ts +14 -17
- package/src/plugins/builtin/dividend-yield/headless.ts +24 -16
- package/src/plugins/builtin/dividend-yield/index.tsx +2 -1
- package/src/plugins/builtin/dividend-yield/model.ts +52 -10
- package/src/plugins/builtin/dividend-yield/pane.tsx +89 -17
- 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/types.ts +2 -3
- package/src/plugins/builtin/dividend-yield/view.ts +58 -12
- 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 +207 -3
- package/src/plugins/builtin/econ/columns.ts +132 -0
- package/src/plugins/builtin/econ/index.tsx +27 -79
- 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 +66 -0
- package/src/plugins/builtin/holders/disclosures.ts +47 -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 +238 -48
- package/src/plugins/builtin/ipo-calendar/pane.tsx +91 -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 +11 -4
- package/src/plugins/builtin/kelly-sizer/pane.tsx +19 -9
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/units.ts +26 -0
- 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 +15 -3
- 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/row.ts +5 -12
- package/src/plugins/builtin/news/wire/news/table.tsx +46 -44
- 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/headless.ts +1 -1
- package/src/plugins/builtin/pe-band/model.ts +41 -18
- package/src/plugins/builtin/pe-band/pane.tsx +8 -6
- package/src/plugins/builtin/perps/cascade-tabs.tsx +2 -1
- package/src/plugins/builtin/perps/cascade.ts +4 -3
- package/src/plugins/builtin/perps/equity-row.tsx +4 -6
- package/src/plugins/builtin/perps/headless.ts +19 -12
- package/src/plugins/builtin/perps/markets-section.tsx +19 -15
- package/src/plugins/builtin/perps/model.ts +14 -5
- package/src/plugins/builtin/portfolio-list/cached-account.ts +3 -1
- package/src/plugins/builtin/portfolio-list/cli/import-positions.ts +6 -18
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +1 -1
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +1 -1
- package/src/plugins/builtin/portfolio-list/positions-import/index.tsx +1 -1
- package/src/plugins/builtin/portfolio-list/positions-import/lookup.ts +28 -57
- 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 +140 -0
- package/src/plugins/builtin/research/event-detail.tsx +442 -0
- package/src/plugins/builtin/research/event-model.ts +338 -39
- 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 +39 -14
- package/src/plugins/builtin/research/relative-valuation-headless.ts +9 -5
- 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/flow-pane.tsx +10 -0
- 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 +69 -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 +169 -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/report-freshness.ts +4 -1
- 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 +35 -5
- package/src/plugins/builtin/ticker-detail/financials/exchange-table.tsx +61 -0
- package/src/plugins/builtin/ticker-detail/financials/model.ts +210 -43
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +69 -8
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +64 -10
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +132 -68
- package/src/plugins/builtin/ticker-detail/headless.ts +37 -13
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +75 -14
- package/src/plugins/builtin/ticker-detail/overview/model.ts +87 -35
- 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 +50 -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/time-sales/model.ts +16 -9
- package/src/plugins/builtin/time-sales/pane.tsx +27 -24
- 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/treasury-daily/client.ts +43 -9
- package/src/plugins/builtin/treasury-daily/pane.tsx +48 -27
- package/src/plugins/builtin/treasury-daily/resource.ts +33 -0
- 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/portfolio/positions-import/parse.ts +14 -6
- package/src/portfolio/positions-import/plan.ts +3 -2
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/i18n.ts +3 -2
- package/src/react/async-resource.ts +3 -1
- package/src/renderers/dom/css.d.ts +1 -0
- package/src/renderers/dom/data-table/index.tsx +100 -8
- package/src/renderers/dom/data-table/row.tsx +40 -4
- package/src/renderers/dom/desktop/icons.tsx +147 -3
- package/src/renderers/dom/desktop/popover.tsx +2 -2
- package/src/renderers/dom/host/media-surface.tsx +204 -45
- package/src/renderers/dom/host/tabs.tsx +1 -0
- package/src/renderers/dom/styles.css +14 -2
- package/src/renderers/electrobun/bun/desktop/backend.ts +14 -1
- package/src/renderers/electrobun/bun/desktop/rpc-timing.ts +9 -3
- package/src/renderers/electrobun/shared/protocol.ts +2 -0
- package/src/renderers/electrobun/view/backend-rpc.ts +5 -2
- 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/renderers/electrobun/view/rpc-timeout.ts +44 -3
- package/src/sources/gloomberb-cloud/batched-lookups.ts +12 -1
- package/src/sources/gloomberb-cloud/index.ts +44 -10
- package/src/sources/gloomberb-cloud/normalizers.ts +8 -2
- package/src/sources/listing-symbols.ts +7 -1
- package/src/sources/provider-router/cache.ts +5 -4
- package/src/sources/provider-router/financials.ts +44 -22
- package/src/sources/provider-router/index.ts +9 -1
- package/src/state/app/context/index.tsx +12 -4
- package/src/state/app/tab-cursor.ts +47 -6
- 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/telemetry/stall-clocks.ts +3 -0
- package/src/telemetry/stall-reports.ts +12 -3
- package/src/telemetry/windows-process-activity.ts +41 -0
- package/src/telemetry/windows-time.ts +32 -0
- package/src/test-support/cloud-api.ts +34 -0
- package/src/test-support/scoped-earnings.ts +24 -0
- package/src/test-support/strict-table-capture.tsx +83 -0
- package/src/tickers/search/index.ts +23 -7
- package/src/tickers/terminal-codes.ts +1 -6
- 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/daily-valuation.ts +13 -6
- package/src/time-series/filed-trailing-eps.ts +16 -3
- package/src/time-series/fundamentals/current-valuation.ts +30 -5
- package/src/time-series/fundamentals/historical-valuation.ts +20 -0
- package/src/time-series/fundamentals/history-link.ts +25 -0
- package/src/time-series/fundamentals/quarterly-ttm.ts +50 -5
- package/src/time-series/fundamentals/series.ts +13 -1
- 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/time-series/valuation-currency.ts +2 -0
- package/src/types/config.ts +13 -61
- package/src/types/data-provider.ts +8 -0
- package/src/types/financials.ts +94 -15
- package/src/types/headless.ts +30 -0
- package/src/types/plugin-context.ts +8 -1
- package/src/ui/dialog-context.ts +8 -0
- package/src/utils/crypto-pair.ts +10 -0
- package/src/utils/datetime-format.ts +23 -1
- package/src/utils/day-format.ts +104 -0
- package/src/utils/declared-dividends.ts +12 -2
- package/src/utils/exchange-announcements.ts +38 -12
- package/src/utils/exchange-notation.generated.ts +3 -1
- package/src/utils/exchanges.ts +2 -1
- 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/fundamentals.ts +1 -0
- package/src/utils/main-thread-stall.ts +9 -1
- package/src/utils/rpc-timeout-error.ts +36 -11
- package/src/utils/sec.ts +3 -1
- package/src/utils/share-multiples.ts +1 -1
- package/src/utils/stall-process-activity.ts +70 -0
- package/src/utils/statement-scope.ts +103 -0
- package/src/utils/trailing-dividend.ts +47 -0
- package/src/utils/trailing-eps.ts +1 -1
- package/src/utils/zoned-date-time.ts +1 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +0 -771
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
|
|
2
2
|
import type { PluginModule } from "../plugin-module";
|
|
3
3
|
import type { SecFilingDocument, SecFilingItem } from "../../../types/data-provider";
|
|
4
|
+
import { apiClient } from "../../../api-client";
|
|
5
|
+
import { useAsyncResource } from "../../../public/react";
|
|
6
|
+
import { emptyOwnershipArchive, exchangeFilingForms, exchangeFilingHistoryLimit, localFilingListing, localFilingRows, PRESENTATIONS_FORM, RECENT_EXCHANGE_FILING_LIMIT } from "./exchange-filings";
|
|
4
7
|
import { useResolvedEntryValue, useSecFilingDocuments, useSecFilingsQuery, useTickerFinancials } from "../../../market-data/hooks";
|
|
5
8
|
import { getSharedMarketDataCoordinator } from "../../../market-data/coordinator";
|
|
6
9
|
import { useShortcut } from "../../../react/input";
|
|
@@ -9,13 +12,14 @@ import { logFailure } from "../../../utils/log-failure";
|
|
|
9
12
|
import { instrumentFromTicker } from "../../../market-data/request-types";
|
|
10
13
|
import { useDebouncedPluginPaneState, usePluginAppActions, usePluginPaneState } from "../../runtime";
|
|
11
14
|
import { usePaneSettingValue } from "../../../state/app/context";
|
|
12
|
-
import { Box, Text, useUiCapabilities, type ScrollBoxRenderable } from "../../../ui";
|
|
15
|
+
import { Box, Text, useRendererHost, useUiCapabilities, type ScrollBoxRenderable } from "../../../ui";
|
|
13
16
|
import { FILL_REST } from "../../../components/ui/fill";
|
|
14
17
|
import { t, tf } from "../../../i18n";
|
|
15
18
|
import { EmptyState, ExternalLinkText, FeedDataTableStackView, PaneLinkMenu, QueryBar, Spinner, TickerBadgeList, usePaneNoticeFooter, useTableLoadMore, type FeedDataTableItem, type FeedDataTableTimeColumn, type PaneHint, type QueryBarFilter } from "../../../components";
|
|
16
19
|
import { useCompanyDataFooter } from "../../../components/layout/pane/status-footer";
|
|
17
20
|
import { displayWidth } from "../../../utils/format";
|
|
18
21
|
import { formatFilingDate } from "../../../utils/datetime-format";
|
|
22
|
+
import { formatDaysInText, isoDaysInText } from "../../../utils/day-format";
|
|
19
23
|
import type { DetailFact } from "../../../components/reader/detail-reader";
|
|
20
24
|
import type { ThemeColors } from "../../../theme/colors";
|
|
21
25
|
import { useThemeColors } from "../../../theme/theme-context";
|
|
@@ -183,7 +187,10 @@ function toFeedItems(
|
|
|
183
187
|
openStories: { accession: string; stories: readonly FilingStory[]; open: (story: FilingStory) => void } | null = null,
|
|
184
188
|
): FeedDataTableItem[] {
|
|
185
189
|
// A Form 144 names its seller freely; the insider forms read beside it say which way round.
|
|
186
|
-
const knownOwners = filings.flatMap((filing) =>
|
|
190
|
+
const knownOwners = filings.flatMap((filing) => [
|
|
191
|
+
...ownerNames(filing.form, contentCache.get(filing.accessionNumber)),
|
|
192
|
+
...(filing.form4?.ownerName ? [filing.form4.ownerName] : []),
|
|
193
|
+
]);
|
|
187
194
|
return filings.map((filing) => {
|
|
188
195
|
const displayTitle = getFilingDisplayTitle(filing);
|
|
189
196
|
const acceptedAt = secReportedAcceptance(filing);
|
|
@@ -246,12 +253,16 @@ function toFeedItems(
|
|
|
246
253
|
: []),
|
|
247
254
|
];
|
|
248
255
|
|
|
256
|
+
// A ticker shared by several filers names the filer on each row. A period end or fund year reads day first
|
|
257
|
+
// and exports as its ISO day.
|
|
258
|
+
const title = formatDaysInText(showIssuer && filing.companyName ? `${filing.companyName}: ${summary}` : summary);
|
|
259
|
+
const titleValue = isoDaysInText(title);
|
|
249
260
|
return {
|
|
250
261
|
id: filing.accessionNumber,
|
|
251
262
|
eyebrow: filing.form,
|
|
252
263
|
eyebrowColor: toneColor(filingTone(filing, direction), colors),
|
|
253
|
-
|
|
254
|
-
|
|
264
|
+
title,
|
|
265
|
+
...(titleValue !== title ? { titleValue } : {}),
|
|
255
266
|
timestamp: filing.filingDate,
|
|
256
267
|
detailTitle: enrichedTitle,
|
|
257
268
|
detailFacts: facts,
|
|
@@ -339,16 +350,25 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
339
350
|
);
|
|
340
351
|
// The fund view (ETF) has its own groups; each view keeps its own choice.
|
|
341
352
|
const groups = forms ? FUND_FORM_GROUPS : COMPANY_FORM_GROUPS;
|
|
353
|
+
const local = ticker && !forms && eligibleTicker ? localFilingListing(ticker.metadata.ticker, ticker.metadata.exchange) : null;
|
|
354
|
+
const localSymbol = local?.symbol;
|
|
355
|
+
const localVenue = local?.exchange;
|
|
356
|
+
const localForms = exchangeFilingForms(localVenue);
|
|
357
|
+
const hasLocalForms = localForms.length > 0;
|
|
342
358
|
const [storedGroup, setFormGroup] = usePluginPaneState<string>(forms ? "fundFormGroup" : "formGroup", ALL_FORMS);
|
|
343
|
-
const
|
|
359
|
+
const localForm = localForms.find(form => form.value === storedGroup);
|
|
360
|
+
const localKind = localForm?.kind;
|
|
361
|
+
const presentations = localKind === PRESENTATIONS_FORM;
|
|
362
|
+
const formGroup = localKind || groups.some((group) => group.value === storedGroup) ? storedGroup : ALL_FORMS;
|
|
344
363
|
// A ticker can map to more than one filer (CIK); each can be listed alone.
|
|
345
364
|
const issuers = useMemo(() => secFilingIssuers(formFilings), [formFilings]);
|
|
346
365
|
const [storedIssuer, setIssuer] = usePluginPaneState<string>("issuerCik", ALL_FORMS);
|
|
347
366
|
const issuerCik = issuers.some((issuer) => issuer.cik === storedIssuer) ? storedIssuer : ALL_FORMS;
|
|
348
367
|
const scopedFilings = useMemo(() => {
|
|
368
|
+
if (localKind) return NO_FILINGS;
|
|
349
369
|
const grouped = filterFilingsByGroup(formFilings, groups, formGroup);
|
|
350
370
|
return issuerCik === ALL_FORMS ? grouped : grouped.filter((filing) => filing.cik === issuerCik);
|
|
351
|
-
}, [formFilings, formGroup, groups, issuerCik]);
|
|
371
|
+
}, [formFilings, formGroup, groups, issuerCik, localKind]);
|
|
352
372
|
// A bank files a pricing supplement for each note it sells, hundreds a week, which bury its
|
|
353
373
|
// reports; they stay out until asked for, counted among the filings the other filters keep.
|
|
354
374
|
const [showSupplements, setShowSupplements] = usePluginPaneState<boolean>("pricingSupplements", false);
|
|
@@ -359,39 +379,93 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
359
379
|
() => (showSupplements || supplementCount === 0 ? scopedFilings : scopedFilings.filter((filing) => !isSupplement(filing))),
|
|
360
380
|
[isSupplement, scopedFilings, showSupplements, supplementCount],
|
|
361
381
|
);
|
|
382
|
+
const host = useRendererHost();
|
|
383
|
+
const readLocal = useCallback(() => apiClient.getCloudExchangeAnnouncements({
|
|
384
|
+
symbol: localSymbol!,
|
|
385
|
+
exchange: localVenue!,
|
|
386
|
+
limit: localVenue === "HOSE" && !localKind
|
|
387
|
+
? RECENT_EXCHANGE_FILING_LIMIT : exchangeFilingHistoryLimit(localVenue, localKind),
|
|
388
|
+
...(localKind ? { kind: localKind } : {}),
|
|
389
|
+
}), [localSymbol, localVenue, localKind]);
|
|
390
|
+
const localFeed = useAsyncResource(localSymbol && localVenue ? readLocal : null);
|
|
391
|
+
const [archiveSymbol, setArchiveSymbol] = useState<string | undefined>();
|
|
392
|
+
const showLocalFilings = !!localKind || (formGroup === ALL_FORMS && issuerCik === ALL_FORMS);
|
|
393
|
+
const hasOlderLocalFilings = showLocalFilings && localVenue === "HOSE" && localFeed.data !== null
|
|
394
|
+
&& (localFeed.data.total ?? 0) > localFeed.data.announcements.length;
|
|
395
|
+
// HOSE's longer read can be slow. Keep the recent notices while it loads,
|
|
396
|
+
// including when opening a saved link to an older filing.
|
|
397
|
+
const openOlderFiling = openItemId?.startsWith("exchange:") &&
|
|
398
|
+
!localFeed.data?.announcements.some(item => `exchange:${item.url}` === openItemId);
|
|
399
|
+
const readOlderFilings = hasOlderLocalFilings && (archiveSymbol === localSymbol || openOlderFiling);
|
|
400
|
+
useEffect(() => {
|
|
401
|
+
if (hasOlderLocalFilings && openOlderFiling) setArchiveSymbol(localSymbol);
|
|
402
|
+
}, [hasOlderLocalFilings, openOlderFiling, localSymbol]);
|
|
403
|
+
const readArchive = useCallback(() => apiClient.getCloudExchangeAnnouncements({
|
|
404
|
+
symbol: localSymbol!,
|
|
405
|
+
exchange: localVenue!,
|
|
406
|
+
limit: exchangeFilingHistoryLimit(localVenue),
|
|
407
|
+
}), [localSymbol, localVenue]);
|
|
408
|
+
const archiveFeed = useAsyncResource(readOlderFilings ? readArchive : null);
|
|
409
|
+
const localData = archiveFeed.data ?? localFeed.data;
|
|
410
|
+
const localLoading = localFeed.loading || archiveFeed.loading;
|
|
411
|
+
const localError = archiveFeed.error ?? localFeed.error;
|
|
412
|
+
const localRows = useMemo(() => {
|
|
413
|
+
if (!localData || !showLocalFilings) return [];
|
|
414
|
+
const rows = localFilingRows(localData, showSupplements);
|
|
415
|
+
if (!archiveFeed.data?.stale || !localFeed.data) return rows;
|
|
416
|
+
const recent = localFilingRows(localFeed.data, showSupplements);
|
|
417
|
+
const known = new Set(recent.map(row => row.documentKey));
|
|
418
|
+
return [...recent, ...rows.filter(row => !known.has(row.documentKey))];
|
|
419
|
+
}, [localData, localFeed.data, archiveFeed.data, showLocalFilings, showSupplements]);
|
|
420
|
+
|
|
421
|
+
const openLocal = localRows.find(row => `exchange:${row.url}` === openItemId);
|
|
422
|
+
const timeline = useMemo(() => {
|
|
423
|
+
const sec = filings.map(filing => ({ id: filing.accessionNumber, date: +new Date(filing.filingDate), filing }));
|
|
424
|
+
if (!localRows.length) return sec;
|
|
425
|
+
return [...sec, ...localRows.map(row => ({ id: `exchange:${row.url}`, date: Date.parse(row.filedAt), filing: null }))]
|
|
426
|
+
.sort((a, b) => b.date - a.date);
|
|
427
|
+
}, [filings, localRows]);
|
|
362
428
|
const filterHistoryCapped = !!forms && issuerFilings.length >= SEC_FILING_FETCH_LIMIT;
|
|
363
429
|
const [visibleCount, setVisibleCount] = useState(SEC_FILING_PAGE_SIZE);
|
|
364
|
-
const
|
|
430
|
+
const visible = useMemo(() => timeline.slice(0, visibleCount), [timeline, visibleCount]);
|
|
431
|
+
const visibleFilings = useMemo(() => visible.flatMap(item => item.filing ? [item.filing] : []), [visible]);
|
|
365
432
|
const scrollRef = useRef<ScrollBoxRenderable | null>(null);
|
|
366
433
|
const loadMore = useTableLoadMore(
|
|
367
434
|
scrollRef,
|
|
368
|
-
visibleCount <
|
|
369
|
-
() =>
|
|
435
|
+
visibleCount < timeline.length || (hasOlderLocalFilings && !readOlderFilings),
|
|
436
|
+
() => {
|
|
437
|
+
if (visibleCount < timeline.length) {
|
|
438
|
+
setVisibleCount((current) => Math.min(timeline.length, current + SEC_FILING_PAGE_SIZE));
|
|
439
|
+
} else {
|
|
440
|
+
setArchiveSymbol(localSymbol);
|
|
441
|
+
setVisibleCount((current) => current + SEC_FILING_PAGE_SIZE);
|
|
442
|
+
}
|
|
443
|
+
},
|
|
370
444
|
);
|
|
371
445
|
useEffect(() => {
|
|
372
446
|
setVisibleCount(SEC_FILING_PAGE_SIZE);
|
|
373
447
|
}, [ticker?.metadata.ticker, ticker?.metadata.exchange, formsSetting, formGroup, issuerCik, showSupplements]);
|
|
374
|
-
const loading = filingsEntry?.phase === "loading" || filingsEntry?.phase === "refreshing";
|
|
448
|
+
const loading = !localKind && (filingsEntry?.phase === "loading" || filingsEntry?.phase === "refreshing");
|
|
375
449
|
// A restored or shared open filing can sit past the first page, or be gone
|
|
376
450
|
// from the feed entirely.
|
|
377
451
|
useEffect(() => {
|
|
378
|
-
if (!openItemId ||
|
|
379
|
-
const index =
|
|
452
|
+
if (!openItemId || !timeline.length) return;
|
|
453
|
+
const index = timeline.findIndex(item => item.id === openItemId);
|
|
380
454
|
if (index < 0) {
|
|
381
455
|
// A pricing supplement opened from the command bar shows the supplements rather than closing.
|
|
382
456
|
const supplement = !showSupplements && scopedFilings.some((filing) => filing.accessionNumber === openItemId && isSupplement(filing));
|
|
383
457
|
if (supplement) setShowSupplements(true);
|
|
384
|
-
else if (!loading) setOpenItemId(null);
|
|
458
|
+
else if (!loading && !localLoading && !archiveFeed.error) setOpenItemId(null);
|
|
385
459
|
return;
|
|
386
460
|
}
|
|
387
461
|
if (index >= visibleCount) {
|
|
388
462
|
setVisibleCount(Math.ceil((index + 1) / SEC_FILING_PAGE_SIZE) * SEC_FILING_PAGE_SIZE);
|
|
389
463
|
}
|
|
390
|
-
}, [
|
|
391
|
-
const error = filingsEntry?.error && filingsEntry.error.reasonCode !== "NO_DATA" ? filingsEntry.error.message : null;
|
|
464
|
+
}, [timeline, isSupplement, loading, localLoading, archiveFeed.error, openItemId, scopedFilings, setOpenItemId, setShowSupplements, showSupplements, visibleCount]);
|
|
465
|
+
const error = !localKind && filingsEntry?.error && filingsEntry.error.reasonCode !== "NO_DATA" ? filingsEntry.error.message : null;
|
|
392
466
|
// Hosted, the only filings source is Gloom Cloud, which needs an account.
|
|
393
467
|
const cloudSession = useResearchCloudSession();
|
|
394
|
-
const authWall = formFilings.length === 0 && isCloudSessionRequired(error);
|
|
468
|
+
const authWall = !localLoading && !localRows.length && (!!localKind || formFilings.length === 0) && (isCloudSessionRequired(error) || isCloudSessionRequired(localError));
|
|
395
469
|
|
|
396
470
|
const openFiling = openItemId
|
|
397
471
|
? filings.find((filing) => filing.accessionNumber === openItemId) ?? null
|
|
@@ -418,21 +492,21 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
418
492
|
// in their text, so the ones around the cursor are read after it, one at a
|
|
419
493
|
// time, for their rows; the rest of the list is never queued, which would
|
|
420
494
|
// fire dozens of requests for rows nobody looks at. Read text is cached.
|
|
421
|
-
const selectedFiling =
|
|
495
|
+
const selectedFiling = visible[selectedIdx]?.filing;
|
|
422
496
|
// The rows on screen, as a share of the list so it holds for terminal rows and desktop pixels alike.
|
|
423
497
|
const [onScreen, setOnScreen] = useState({ first: 0, count: height });
|
|
424
498
|
const trackScroll = useCallback(() => {
|
|
425
499
|
loadMore();
|
|
426
500
|
const box = scrollRef.current;
|
|
427
|
-
if (!box?.viewport || !(box.scrollHeight > 0) ||
|
|
428
|
-
const first = Math.floor((box.scrollTop / box.scrollHeight) *
|
|
429
|
-
const count = Math.ceil((box.viewport.height / box.scrollHeight) *
|
|
501
|
+
if (!box?.viewport || !(box.scrollHeight > 0) || visible.length === 0) return;
|
|
502
|
+
const first = Math.floor((box.scrollTop / box.scrollHeight) * visible.length);
|
|
503
|
+
const count = Math.ceil((box.viewport.height / box.scrollHeight) * visible.length) + 1;
|
|
430
504
|
setOnScreen((current) => (current.first === first && current.count === count ? current : { first, count }));
|
|
431
|
-
}, [loadMore,
|
|
505
|
+
}, [loadMore, visible.length]);
|
|
432
506
|
const nearbyOwnership = useMemo(() => [
|
|
433
507
|
...(selectedFiling ? [selectedFiling] : []),
|
|
434
|
-
...
|
|
435
|
-
].map(rowSummaryTarget).filter((target): target is SecFilingItem => !!target), [onScreen, selectedFiling,
|
|
508
|
+
...visible.slice(onScreen.first, onScreen.first + Math.min(OWNERSHIP_ROWS_READ, onScreen.count)).flatMap(item => item.filing ? [item.filing] : []),
|
|
509
|
+
].map(rowSummaryTarget).filter((target): target is SecFilingItem => !!target), [onScreen, selectedFiling, visible]);
|
|
436
510
|
const viewedTargets = useMemo(() => [
|
|
437
511
|
...(openFiling ? [openFiling] : []),
|
|
438
512
|
...buildInlineFilingContentTargets(openFiling, openDocuments),
|
|
@@ -477,6 +551,7 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
477
551
|
useShortcut((event) => {
|
|
478
552
|
if (!isPlainKey(event, "r")) return;
|
|
479
553
|
refresh();
|
|
554
|
+
if (localVenue) (readOlderFilings ? archiveFeed : localFeed).reload();
|
|
480
555
|
if (forms && eligibleTicker) reloadFacts();
|
|
481
556
|
}, { enabled: focused, scope: "sec" });
|
|
482
557
|
// Signing in must retry the request the wall was shown for.
|
|
@@ -487,11 +562,12 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
487
562
|
refresh();
|
|
488
563
|
}, [cloudSession.requestKey, refresh]);
|
|
489
564
|
|
|
565
|
+
const itemCount = visible.length;
|
|
490
566
|
useEffect(() => {
|
|
491
|
-
if (
|
|
492
|
-
setSelectedIdx(Math.max(0,
|
|
567
|
+
if (itemCount > 0 && selectedIdx >= itemCount) {
|
|
568
|
+
setSelectedIdx(Math.max(0, itemCount - 1));
|
|
493
569
|
}
|
|
494
|
-
}, [selectedIdx, setSelectedIdx,
|
|
570
|
+
}, [selectedIdx, setSelectedIdx, itemCount]);
|
|
495
571
|
|
|
496
572
|
// The pane's own ticker opens its description; a fund or equity both have one.
|
|
497
573
|
const issuerTicker = useMemo(() => (ticker && paneType ? {
|
|
@@ -506,27 +582,29 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
506
582
|
registrationId: "sec",
|
|
507
583
|
focused,
|
|
508
584
|
// A current report links its press release, where its figures are, when its index names one.
|
|
509
|
-
url: openFiling ? openFiling.pressReleaseUrl ?? openFiling.filingUrl
|
|
510
|
-
|
|
511
|
-
|
|
585
|
+
url: openLocal ? openLocal.url : openFiling ? openFiling.pressReleaseUrl ?? openFiling.filingUrl
|
|
586
|
+
: factsUrl ?? abroadPage ?? (localKind ? localData?.page : null) ?? announcements?.url,
|
|
587
|
+
source: openLocal ? openLocal.source : openFiling ? openFiling.form : facts?.covered ? listNames(fundFactPublishers(facts)) : facts?.note ? facts.note.filing.form : announcements?.name ?? null,
|
|
588
|
+
label: openLocal ? "filing" : openFiling ? openFiling.pressReleaseUrl ? "press release" : "filing"
|
|
512
589
|
: factsUrl ? "source" : abroadPage ? "issuer page" : announcements ? "announcements" : "filing",
|
|
513
590
|
// Rows read in the background for their insiders do not hold up the pane.
|
|
514
|
-
loading: loading || loadingDocuments || (!!loadingKey && viewedTargets.some((target) => target.accessionNumber === loadingKey)),
|
|
515
|
-
error: authWall ? null : error ?? detailError,
|
|
591
|
+
loading: loading || localLoading || loadingDocuments || (!!loadingKey && viewedTargets.some((target) => target.accessionNumber === loadingKey)),
|
|
592
|
+
error: authWall ? null : error ?? detailError ?? localError,
|
|
593
|
+
stale: (!!localKind || !!archiveFeed.data) && localData?.stale === true,
|
|
516
594
|
hints,
|
|
517
|
-
showOpenHint: !!(openFiling ? openFiling.filingUrl : factsUrl ?? abroadPage ?? announcements),
|
|
595
|
+
showOpenHint: !!openLocal || !!(openFiling ? openFiling.filingUrl : factsUrl ?? abroadPage ?? announcements),
|
|
518
596
|
});
|
|
519
597
|
|
|
520
598
|
// A foreign line's filings are its company's, read from the home line.
|
|
521
599
|
useCompanyDataFooter(issuerFilings[0]?.companyFrom, !openFiling);
|
|
522
600
|
usePaneNoticeFooter({
|
|
523
601
|
registrationId: "sec:form-filter",
|
|
524
|
-
notices: filterHistoryCapped
|
|
602
|
+
notices: (localRows.length || localKind) && localData?.coverage ? [localData.coverage] : filterHistoryCapped
|
|
525
603
|
? [`Only the ${SEC_FILING_FETCH_LIMIT.toLocaleString("en-US")} most recent filings of this issuer were searched; older fund filings are not listed.`]
|
|
526
604
|
: [],
|
|
527
605
|
focused,
|
|
528
606
|
enabled: !openFiling,
|
|
529
|
-
title: "Fund filings",
|
|
607
|
+
title: localKind ? localForm?.label : "Fund filings",
|
|
530
608
|
});
|
|
531
609
|
|
|
532
610
|
const queryFilters = useMemo<QueryBarFilter[]>(() => [
|
|
@@ -535,10 +613,14 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
535
613
|
label: "Form",
|
|
536
614
|
value: formGroup,
|
|
537
615
|
defaultValue: ALL_FORMS,
|
|
538
|
-
options: [
|
|
616
|
+
options: [
|
|
617
|
+
{ value: ALL_FORMS, label: forms ? "All fund forms" : "All forms" },
|
|
618
|
+
...localForms.map(({ value, label }) => ({ value, label })),
|
|
619
|
+
...groups.map((group) => ({ value: group.value, label: group.label })),
|
|
620
|
+
],
|
|
539
621
|
onChange: (value: string) => { setFormGroup(value); setSelectedIdx(0, { immediate: true }); setOpenItemId(null); },
|
|
540
622
|
},
|
|
541
|
-
...(issuers.length > 1 ? [{
|
|
623
|
+
...(!localKind && issuers.length > 1 ? [{
|
|
542
624
|
id: "issuer",
|
|
543
625
|
label: "Filer",
|
|
544
626
|
value: issuerCik,
|
|
@@ -555,9 +637,9 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
555
637
|
defaultValue: false,
|
|
556
638
|
onChange: (value: boolean) => { setShowSupplements(value); setSelectedIdx(0, { immediate: true }); setOpenItemId(null); },
|
|
557
639
|
}] : []),
|
|
558
|
-
], [formGroup, forms, groups, issuerCik, issuers, setFormGroup, setIssuer, setOpenItemId, setSelectedIdx, setShowSupplements, showSupplements, supplementCount]);
|
|
640
|
+
], [formGroup, forms, groups, issuerCik, issuers, localForms, localKind, setFormGroup, setIssuer, setOpenItemId, setSelectedIdx, setShowSupplements, showSupplements, supplementCount]);
|
|
559
641
|
// The ticker and the filer once, beside the filters: every row is their filing.
|
|
560
|
-
const issuerMeta = issuers.length === 1 ? secIssuerLabel(issuers[0]!).replace(/CIK 0+/, "CIK ") : undefined;
|
|
642
|
+
const issuerMeta = !localKind && issuers.length === 1 ? secIssuerLabel(issuers[0]!).replace(/CIK 0+/, "CIK ") : undefined;
|
|
561
643
|
const queryBar = (
|
|
562
644
|
<QueryBar
|
|
563
645
|
width={width}
|
|
@@ -605,10 +687,11 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
605
687
|
)
|
|
606
688
|
: body;
|
|
607
689
|
if (authWall) return withFacts(<SignInWall placement="sec-signin" action="view SEC filings" needsVerification={cloudSession.needsVerification} />);
|
|
608
|
-
if (loading && filings.length === 0) return withFacts(<Spinner label="Loading SEC filings..." />);
|
|
690
|
+
if (!hasLocalForms && (loading || localLoading) && filings.length === 0 && !localRows.length) return withFacts(<Spinner label="Loading SEC filings..." />);
|
|
609
691
|
// The fund view keeps its facts and query bar over an empty or failed filings list, which says why in the table.
|
|
610
|
-
|
|
611
|
-
if (!forms && formFilings.length === 0) {
|
|
692
|
+
const feedError = localError ?? error;
|
|
693
|
+
if (!forms && !hasLocalForms && feedError && formFilings.length === 0 && !localRows.length) return <EmptyState title="Filings unavailable." message={feedError} />;
|
|
694
|
+
if (!forms && !hasLocalForms && formFilings.length === 0 && !localRows.length) {
|
|
612
695
|
// A company from abroad that files nothing with the SEC says so and links its exchange's announcements, as `filings` does.
|
|
613
696
|
if (equityAbroad) {
|
|
614
697
|
const listing = { symbol: parsePublicTickerKey(ticker.metadata.ticker).symbol, exchange: equityAbroad, name: ticker.metadata.name ?? null };
|
|
@@ -632,39 +715,64 @@ function SecView({ width, height, focused, paneType }: { width: number; height:
|
|
|
632
715
|
);
|
|
633
716
|
}
|
|
634
717
|
|
|
718
|
+
const secItems = toFeedItems(
|
|
719
|
+
colors,
|
|
720
|
+
issuerTicker,
|
|
721
|
+
issuers.length > 1 && issuerCik === ALL_FORMS,
|
|
722
|
+
visibleFilings,
|
|
723
|
+
openFiling?.accessionNumber,
|
|
724
|
+
contentCache,
|
|
725
|
+
loadingContent,
|
|
726
|
+
openDocuments,
|
|
727
|
+
loadingDocuments,
|
|
728
|
+
documentsError,
|
|
729
|
+
contentErrors,
|
|
730
|
+
previews,
|
|
731
|
+
storyLinks,
|
|
732
|
+
);
|
|
733
|
+
let items = secItems;
|
|
734
|
+
if (localRows.length) {
|
|
735
|
+
const byId = new Map(secItems.map(item => [item.id, item]));
|
|
736
|
+
for (const row of localRows) {
|
|
737
|
+
const id = `exchange:${row.url}`;
|
|
738
|
+
byId.set(id, { id, title: row.filing, timestamp: row.filedAt, eyebrow: row.source,
|
|
739
|
+
detailFacts: [{ label: row.dateBasis === "catalogue" ? "Catalogue date" : "Filed", value: formatFilingDate(row.filedAt) },
|
|
740
|
+
{ label: "Document", value: row.source, link: { label: "Open filing", onOpen: () => host.openExternal(row.url).catch(logFailure("sec.pane", "Open exchange filing failed")) } }],
|
|
741
|
+
detailMeta: [row.form, formatFilingDate(row.filedAt)],
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
items = visible.map(item => byId.get(item.id)!);
|
|
745
|
+
}
|
|
635
746
|
return (
|
|
636
747
|
<FeedDataTableStackView
|
|
637
748
|
width={width}
|
|
638
749
|
height={height}
|
|
639
750
|
focused={focused}
|
|
640
|
-
items={
|
|
641
|
-
colors,
|
|
642
|
-
issuerTicker,
|
|
643
|
-
issuers.length > 1 && issuerCik === ALL_FORMS,
|
|
644
|
-
visibleFilings,
|
|
645
|
-
openFiling?.accessionNumber,
|
|
646
|
-
contentCache,
|
|
647
|
-
loadingContent,
|
|
648
|
-
openDocuments,
|
|
649
|
-
loadingDocuments,
|
|
650
|
-
documentsError,
|
|
651
|
-
contentErrors,
|
|
652
|
-
previews,
|
|
653
|
-
storyLinks,
|
|
654
|
-
)}
|
|
751
|
+
items={items}
|
|
655
752
|
selectedIdx={selectedIdx}
|
|
656
753
|
onSelect={setSelectedIdx}
|
|
657
754
|
openItemId={openItemId}
|
|
658
755
|
onOpenItemIdChange={setOpenItemId}
|
|
659
756
|
prefetchDetail={prefetchDocuments}
|
|
660
757
|
rootBefore={factsSummary ? <Box flexDirection="column" flexShrink={0}>{queryBar}{factsSummary}</Box> : queryBar}
|
|
661
|
-
sourceLabel="Form"
|
|
758
|
+
sourceLabel={localRows.length ? "Source / form" : "Form"}
|
|
662
759
|
titleLabel="Filing"
|
|
663
|
-
timeColumn={FILED_COLUMN}
|
|
664
|
-
emptyStateTitle={
|
|
760
|
+
timeColumn={localRows.some(row => row.dateBasis === "catalogue") ? { ...FILED_COLUMN, label: "Date" } : FILED_COLUMN}
|
|
761
|
+
emptyStateTitle={presentations
|
|
762
|
+
? localLoading ? "Loading presentations..."
|
|
763
|
+
: localError || localData?.stale ? "Presentation archive unavailable or incomplete."
|
|
764
|
+
: "No investor conference presentations in the past year."
|
|
765
|
+
: hasLocalForms && (loading || localLoading) ? "Loading filings..."
|
|
766
|
+
: hasLocalForms && feedError ? "Filings unavailable."
|
|
767
|
+
: localKind === "ownership" ? emptyOwnershipArchive(localData?.stale)
|
|
768
|
+
: localKind === "results" ? localFeed.data?.stale
|
|
769
|
+
? "Results archive unavailable or incomplete."
|
|
770
|
+
: "No results or presentations in the exchange archive."
|
|
771
|
+
: forms && formFilings.length === 0 ? fundEmptyTitle
|
|
665
772
|
: supplementCount > 0 && !showSupplements ? "Only pricing supplements."
|
|
666
773
|
: formGroup === ALL_FORMS ? "No SEC filings." : "No filings of these forms."}
|
|
667
|
-
emptyStateHint={
|
|
774
|
+
emptyStateHint={hasLocalForms && feedError ? feedError
|
|
775
|
+
: forms && formFilings.length === 0 ? fundEmptyHint
|
|
668
776
|
: supplementCount > 0 && !showSupplements ? "Turn on Pricing supplements to list them." : undefined}
|
|
669
777
|
scrollRef={scrollRef}
|
|
670
778
|
onBodyScrollActivity={trackScroll}
|
|
@@ -694,7 +802,7 @@ export const secModule: PluginModule = {
|
|
|
694
802
|
id: "sec-pane",
|
|
695
803
|
paneId: "sec",
|
|
696
804
|
label: "SEC",
|
|
697
|
-
description: "
|
|
805
|
+
description: "SEC filings and covered exchange disclosures for the selected ticker.",
|
|
698
806
|
keywords: ["sec", "filings", "10-k", "10-q", "8-k"],
|
|
699
807
|
shortcut: "SEC",
|
|
700
808
|
shortcutAliases: ["CF"],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formatDay } from "../../../utils/day-format";
|
|
1
2
|
import type { SecFilingItem } from "../../../types/data-provider";
|
|
2
3
|
import { secFilingItemCodes } from "../../../utils/sec";
|
|
3
4
|
import { currentReportItemNames, form4TradeText, isCurrentReportForm as isCurrentReport } from "../../../utils/sec-filings";
|
|
@@ -64,8 +65,12 @@ function periodicReportPeriod(filing: Pick<SecFilingItem, "form" | "primaryDocum
|
|
|
64
65
|
return days >= 0 && days <= 460 ? iso : null;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
/**
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
* The adjacent FORM column already identifies the form. Keep its meaning here:
|
|
70
|
+
* what the filing reports, a period end day first as the pane draws it
|
|
71
|
+
* (`period ended 26 Sep 2026`), or as `day` writes it.
|
|
72
|
+
*/
|
|
73
|
+
export function getFilingColumnText(filing: SecFilingItem, day: (iso: string) => string = formatDay): string {
|
|
69
74
|
// A Form 4 Gloom Cloud read says its trade, and whose shares when they are another company's.
|
|
70
75
|
const trade = form4TradeText(filing);
|
|
71
76
|
if (trade) return trade;
|
|
@@ -75,7 +80,7 @@ export function getFilingColumnText(filing: SecFilingItem): string {
|
|
|
75
80
|
const items = isCurrentReport(filing.form) ? currentReportItemNames(filing.items) : null;
|
|
76
81
|
if (items) return /\/A$/i.test(filing.form.trim()) ? `${items} (amended)` : items;
|
|
77
82
|
const period = periodicReportPeriod(filing);
|
|
78
|
-
if (period) return `${meaning || "Report"}, period ended ${period}`;
|
|
83
|
+
if (period) return `${meaning || "Report"}, period ended ${day(period)}`;
|
|
79
84
|
return meaning || "Filing";
|
|
80
85
|
}
|
|
81
86
|
return meaning && normalizeComparableText(description) !== normalizeComparableText(meaning)
|
|
@@ -223,7 +228,8 @@ export function buildSecFilingRows(filings: readonly SecFilingItem[]) {
|
|
|
223
228
|
acceptedAtRaw: filing.acceptedAtRaw ?? null,
|
|
224
229
|
acceptanceReported: secReportedAcceptance(filing),
|
|
225
230
|
form: filing.form,
|
|
226
|
-
|
|
231
|
+
// JSON and CSV keep a period end in ISO, as they always wrote it; the text draws it day first.
|
|
232
|
+
filing: getFilingColumnText(filing, (iso) => iso),
|
|
227
233
|
items: secFilingItemCodes(filing.items),
|
|
228
234
|
accessionNumber: filing.accessionNumber,
|
|
229
235
|
primaryDocument: filing.primaryDocument ?? null,
|
|
@@ -30,6 +30,7 @@ const isOwnershipForm = (form: string) => OWNERSHIP_FORMS.test(form.trim());
|
|
|
30
30
|
export function rowSummaryTarget(filing: SecFilingItem): SecFilingItem | null {
|
|
31
31
|
const form = filing.form.trim();
|
|
32
32
|
if (!isOwnershipForm(form) && !FUND_FLOW_FORM.test(form)) return null;
|
|
33
|
+
if (/^4(?:\/A)?$/i.test(form) && filing.form4) return null;
|
|
33
34
|
if (/^[345](?:\/A)?$/i.test(form)) return filing;
|
|
34
35
|
const url = filing.primaryDocumentUrl?.replace(/\/xsl[^/]+\//, "/");
|
|
35
36
|
if (!url || url === filing.primaryDocumentUrl) return null;
|
|
@@ -69,7 +69,11 @@ export const SERIES_INVENTORY: readonly SeriesInventoryEntry[] = [
|
|
|
69
69
|
{ module: "treasury-daily", chart: "The Treasury General Account's daily closing balance", notInCatalog: "not-yet", reason: "Daily and dated, from the Daily Treasury Statement's operating cash balance table; the pane reads it with the day's cash lines, and none is registered for the composer yet." },
|
|
70
70
|
{ module: "primary-dealers", chart: "A primary dealer position's weekly net level, the sum of the release's series behind the row", notInCatalog: "not-yet", reason: "Weekly and dated, one series per row of the board; the pane reads each only when its row is selected, and none is registered for the composer yet." },
|
|
71
71
|
{ module: "short-interest", chart: "A ticker's short interest and days to cover", series: ["short-interest:*"] },
|
|
72
|
+
{ module: "short-interest", chart: "A ticker's fails to deliver by settlement date, over the price the same rows report (FTD)", notInCatalog: "not-yet", reason: "Dated per ticker and settlement date; it could be a ticker series and is not registered for the composer yet." },
|
|
73
|
+
{ module: "short-interest", chart: "A ticker's weekly ATS share of off-exchange volume (ATS)", notInCatalog: "not-yet", reason: "Weekly and dated per ticker; it could be a ticker series and is not registered for the composer yet." },
|
|
74
|
+
{ module: "insider", chart: "A ticker's weekly open-market insider buys and sales, plan trades apart, over the daily close", notInCatalog: "not-yet", reason: "Weekly and dated per ticker, summed in the pane from the filings it lists; the close is in the catalog, and the weekly totals are not registered for the composer yet." },
|
|
72
75
|
{ module: "short-volume", chart: "A ticker's daily short volume ratio", series: ["short-volume:*"] },
|
|
76
|
+
{ module: "buybacks", chart: "A Hong Kong listing's shares bought back each session, on the Exchange and elsewhere, under its closes (the ticker's own price)", series: ["buybacks:*"] },
|
|
73
77
|
{ module: "scanner", chart: "Net options premium through the session, for the market or one ticker (FLOW's Tide)", notInCatalog: "per-item", reason: "One per ticker, filter set and session, summed on request from the recorded option prints." },
|
|
74
78
|
{ module: "social-mentions", chart: "A ticker's daily posts", series: ["social-mentions:*"] },
|
|
75
79
|
{ module: "jobs", chart: "A company's open job postings", series: ["jobs:*"] },
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { scalarPoint, staticSeries } from "../../../components/chart/static/series";
|
|
2
|
+
import type { ResolvedSeries, TimeSeriesPoint } from "../../../time-series/types";
|
|
3
|
+
import { colors } from "../../../theme/colors";
|
|
4
|
+
|
|
5
|
+
const DAY_MS = 86_400_000;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One slot per bar, oldest first, with an empty slot at each end so the outer
|
|
9
|
+
* bars sit inside the plot, as ERN's report bars do.
|
|
10
|
+
*/
|
|
11
|
+
export function slotPoints<T extends { date: string }>(bars: readonly T[], value: (bar: T) => number | null | undefined): TimeSeriesPoint[] {
|
|
12
|
+
if (!bars.length) return [];
|
|
13
|
+
const at = (date: string, days = 0) => new Date(Date.parse(`${date}T00:00:00Z`) + days * DAY_MS);
|
|
14
|
+
return [
|
|
15
|
+
scalarPoint(at(bars[0]!.date, -1), null),
|
|
16
|
+
...bars.map((bar) => scalarPoint(at(bar.date), value(bar) ?? null)),
|
|
17
|
+
scalarPoint(at(bars.at(-1)!.date, 1), null),
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** A tick under each bar; where they are too close the axis drops some rather than run them together. */
|
|
22
|
+
export function slotAxis<T>(bars: readonly T[], label: (bar: T) => string, cursor: (bar: T) => string) {
|
|
23
|
+
const slots = bars.length + 1;
|
|
24
|
+
return {
|
|
25
|
+
ticks: bars.map((bar, index) => ({ label: label(bar), ratio: (index + 1) / slots })),
|
|
26
|
+
formatCursor: (ratio: number) => {
|
|
27
|
+
const bar = bars[Math.max(0, Math.min(bars.length - 1, Math.round(ratio * slots) - 1))];
|
|
28
|
+
return bar ? cursor(bar) : "";
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** How a report's EPS reads against its estimate; "eps" with no estimate to measure against, or exactly on it. */
|
|
34
|
+
function outcome(actual: number | null | undefined, estimate: number | null | undefined): "beat" | "miss" | "eps" | null {
|
|
35
|
+
if (actual == null) return null;
|
|
36
|
+
return estimate == null || actual === estimate ? "eps" : actual > estimate ? "beat" : "miss";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The beat or miss chart EVT's Earnings view and EM's Surprises draw over
|
|
41
|
+
* their reports, oldest first: each report's estimate as a muted column
|
|
42
|
+
* beside what was reported, the reported column in the beat or miss colour,
|
|
43
|
+
* so a quarter reads at a glance. A report with no estimate to measure
|
|
44
|
+
* against (or exactly on it) is the plain EPS column; one not out yet is its
|
|
45
|
+
* estimate alone. Fewer than two reports draw nothing.
|
|
46
|
+
*/
|
|
47
|
+
export function beatMissSeries<T extends { date: string }>(
|
|
48
|
+
bars: readonly T[],
|
|
49
|
+
read: { actual: (bar: T) => number | null | undefined; estimate: (bar: T) => number | null | undefined; comparable?: (bar: T) => boolean },
|
|
50
|
+
unit = "",
|
|
51
|
+
): ResolvedSeries[] {
|
|
52
|
+
if (bars.length < 2) return [];
|
|
53
|
+
const result = (bar: T) => outcome(read.actual(bar), read.comparable?.(bar) === false ? null : read.estimate(bar));
|
|
54
|
+
const reported = (id: "beat" | "miss" | "eps", label: string, color: string): ResolvedSeries => ({
|
|
55
|
+
...staticSeries(slotPoints(bars, (bar) => (result(bar) === id ? read.actual(bar) : null)),
|
|
56
|
+
{ id, label, color, style: "columns" }),
|
|
57
|
+
unit, unitGroup: "eps",
|
|
58
|
+
});
|
|
59
|
+
return [
|
|
60
|
+
{ ...staticSeries(slotPoints(bars, read.estimate), { id: "estimate", label: "Estimate", color: colors.textMuted, style: "columns" }),
|
|
61
|
+
unit, unitGroup: "eps" },
|
|
62
|
+
reported("beat", "Beat", colors.positive),
|
|
63
|
+
reported("miss", "Miss", colors.negative),
|
|
64
|
+
...(bars.some((bar) => result(bar) === "eps") ? [reported("eps", "EPS", colors.textBright)] : []),
|
|
65
|
+
];
|
|
66
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { HeadlessPaneEntry } from "../../../types/headless";
|
|
2
|
+
import { formatDaysInText, isoDaysInText } from "../../../utils/day-format";
|
|
3
|
+
|
|
4
|
+
type DayEntries = { entries: HeadlessPaneEntry[]; textEntries: HeadlessPaneEntry[] };
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A report section's figures, drawn with their days first as the pane writes
|
|
8
|
+
* them (`26 Nov 2026 00:11 UTC`): the text report prints them so
|
|
9
|
+
* (`textEntries`), while JSON and CSV keep each line's days in ISO
|
|
10
|
+
* (`2026-11-26 00:11 UTC`), as they always wrote them. A day without its
|
|
11
|
+
* year has none to read back and stays as drawn.
|
|
12
|
+
*/
|
|
13
|
+
export function dayFirstEntries(entries: HeadlessPaneEntry[]): DayEntries {
|
|
14
|
+
return {
|
|
15
|
+
entries: entries.map((entry) => entry.formatted ? { ...entry, formatted: isoDaysInText(entry.formatted) } : entry),
|
|
16
|
+
textEntries: entries,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The other way round: figures written with ISO days, which JSON and CSV keep,
|
|
22
|
+
* and the text report draws day first. `whole` names the keys whose line is a
|
|
23
|
+
* link or an identifier, left as it is.
|
|
24
|
+
*/
|
|
25
|
+
export function isoDayEntries(entries: HeadlessPaneEntry[], whole: readonly string[] = []): DayEntries {
|
|
26
|
+
return { entries, textEntries: dayFirstTextEntries(entries, whole) };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Text-report lines with each ISO day drawn first: a line's words, or a value
|
|
31
|
+
* that is words (`Stale cash history as of 2026-11-20; …`). For a section
|
|
32
|
+
* whose `textEntries` are already their own lines; `whole` as above.
|
|
33
|
+
*/
|
|
34
|
+
export function dayFirstTextEntries(entries: HeadlessPaneEntry[], whole: readonly string[] = []): HeadlessPaneEntry[] {
|
|
35
|
+
return entries.map((entry) => {
|
|
36
|
+
if (entry.key && whole.includes(entry.key)) return entry;
|
|
37
|
+
if (entry.formatted) return { ...entry, formatted: formatDaysInText(entry.formatted) };
|
|
38
|
+
const shown = typeof entry.value === "string" ? formatDaysInText(entry.value) : null;
|
|
39
|
+
return shown != null && shown !== entry.value ? { ...entry, formatted: shown } : entry;
|
|
40
|
+
});
|
|
41
|
+
}
|