gloomberb 0.15.7 → 0.16.0
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/README.md +11 -2
- package/package.json +1 -1
- package/src/api-client/app-attention.ts +147 -0
- package/src/api-client/attention.ts +26 -0
- package/src/api-client/awards.ts +215 -0
- package/src/api-client/catalysts.ts +160 -0
- package/src/api-client/chat.ts +137 -14
- package/src/api-client/company-kpis.ts +153 -0
- package/src/api-client/cpi.ts +52 -0
- package/src/api-client/credit-documents.ts +107 -0
- package/src/api-client/data.ts +192 -3
- package/src/api-client/distress.ts +164 -0
- package/src/api-client/doe.ts +75 -0
- package/src/api-client/equity-screener.ts +11 -0
- package/src/api-client/exposure.ts +202 -0
- package/src/api-client/gpu.ts +93 -0
- package/src/api-client/hiring.ts +110 -0
- package/src/api-client/index.ts +78 -3
- package/src/api-client/normalizers.ts +31 -1
- package/src/api-client/paths.ts +3 -0
- package/src/api-client/perps.ts +127 -0
- package/src/api-client/power.ts +148 -0
- package/src/api-client/request.ts +58 -1
- package/src/api-client/research-activity.ts +172 -13
- package/src/api-client/socket.ts +75 -27
- package/src/api-client/supply-chain-graph.ts +40 -0
- package/src/api-client/supply-chain.ts +98 -0
- package/src/api-client/telemetry.ts +29 -0
- package/src/api-client/themes.ts +28 -0
- package/src/api-client/types.ts +33 -1
- package/src/api-client/wall-experiments.ts +100 -0
- package/src/api-client/wall-summary.ts +49 -0
- package/src/api-client/web-experiments.ts +136 -0
- package/src/app/pane-runtime/plugin-bindings.ts +5 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +8 -2
- package/src/app/runtime/update.ts +13 -1
- package/src/cli/commands/system.ts +2 -0
- package/src/cli/desktop-pane-shot.ts +3 -4
- package/src/cli/pane-functions/data.ts +78 -0
- package/src/cli/pane-functions/financial-ratio-shot.ts +160 -0
- package/src/cli/pane-functions/function-help.ts +220 -8
- package/src/cli/pane-functions/headless.ts +4 -0
- package/src/cli/pane-functions/screenshot-evidence.ts +21 -0
- package/src/cli/pane-functions/screenshot.ts +49 -5
- package/src/components/chart/composite/composite-chart.tsx +15 -2
- package/src/components/chart/composite/format.ts +24 -11
- package/src/components/chart/composite/rasterizer.ts +67 -16
- package/src/components/chart/composite/scene.ts +53 -2
- package/src/components/chart/composite/session-shading.ts +3 -2
- package/src/components/chart/composite/text-renderer.ts +52 -1
- package/src/components/chart/composite/time-axis.ts +100 -30
- package/src/components/chart/composite/tools.ts +2 -1
- package/src/components/chart/composite/types.ts +4 -0
- package/src/components/chart-table/index.ts +1 -0
- package/src/components/chart-table/layout.ts +15 -0
- package/src/components/command-bar/action-runtime.ts +1 -0
- package/src/components/command-bar/commands/direct/index.ts +32 -0
- package/src/components/command-bar/commands/registry.ts +7 -0
- package/src/components/command-bar/pane-templates/items.ts +11 -0
- package/src/components/command-bar/pane-templates/workflow.ts +19 -4
- package/src/components/command-bar/routes/root/command-items.ts +6 -0
- package/src/components/command-bar/routes/root/provider-search.ts +2 -0
- package/src/components/command-bar/routes/root/results.ts +64 -0
- package/src/components/command-bar/routes/root/runtime.ts +8 -0
- package/src/components/command-bar/routes/ticker-search/results.ts +89 -24
- package/src/components/command-bar/routes/ticker-search/route.ts +2 -0
- package/src/components/command-bar/surface/index.tsx +15 -0
- package/src/components/command-bar/view-model.ts +3 -0
- package/src/components/command-bar/workflow/collection-actions.ts +9 -7
- package/src/components/command-bar/workflow/ops.ts +19 -0
- package/src/components/command-bar/workflow/tickers.ts +5 -0
- package/src/components/company-logo.tsx +15 -2
- package/src/components/data-table/table-pane.ts +2 -1
- package/src/components/index.ts +1 -0
- package/src/components/layout/detached-pane-shell.tsx +12 -1
- package/src/components/layout/missing-pane.tsx +87 -23
- package/src/components/layout/pane/footer/index.tsx +64 -18
- package/src/components/layout/pane/footer/model.ts +85 -0
- package/src/components/layout/pane/sidebar.tsx +19 -1
- package/src/components/layout/shell/index.tsx +38 -28
- package/src/components/layout/shell/pane/management-shortcuts.ts +13 -1
- package/src/components/layout/status-bar.tsx +93 -28
- package/src/components/layout/status-widget-space.ts +72 -0
- package/src/components/onboarding/first-run-workspace.ts +8 -2
- package/src/components/onboarding/onboarding-wizard.tsx +35 -16
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +14 -5
- package/src/components/onboarding/wizard-model.ts +13 -5
- package/src/components/onboarding/wizard-positions.ts +56 -7
- package/src/components/price-performance.tsx +31 -34
- package/src/components/ui/data-table/index.tsx +11 -8
- package/src/components/ui/display.tsx +15 -6
- package/src/components/ui/fields.tsx +5 -0
- package/src/components/ui/figure.tsx +94 -0
- package/src/components/ui/header-case.ts +25 -3
- package/src/components/ui/icon.tsx +3 -1
- package/src/components/ui/message-composer.tsx +8 -1
- package/src/components/ui/query-bar.tsx +8 -1
- package/src/components/ui/ratio-bar.tsx +84 -0
- package/src/components/ui/toggle.tsx +3 -1
- package/src/components/use-scrollbox-layout.ts +17 -0
- package/src/core/state/app/layout.ts +35 -1
- package/src/core/state/app/state.ts +15 -0
- package/src/core/state/app/types.ts +1 -0
- package/src/data/config/store/normalize.ts +24 -0
- package/src/i18n/es.ts +2 -0
- package/src/i18n/ja.ts +2 -0
- package/src/i18n/ko.ts +2 -0
- package/src/i18n/zh-cn.ts +2 -0
- package/src/i18n/zh-tw.ts +2 -0
- package/src/layout-marketplace/pane-imagery.ts +1 -0
- package/src/market-data/coordinator/entries.ts +13 -0
- package/src/market-data/coordinator/financials.ts +33 -8
- package/src/market-data/market/freshness.ts +16 -5
- package/src/market-data/market/trading-sessions.ts +65 -1
- package/src/market-data/published-cn-sessions.ts +25 -0
- package/src/market-data/published-nse-sessions.ts +20 -0
- package/src/news/aggregator.ts +4 -0
- package/src/plugins/builtin/account-management/model.ts +6 -1
- package/src/plugins/builtin/account-management/pane.tsx +36 -25
- package/src/plugins/builtin/alerts/catalysts.ts +77 -0
- package/src/plugins/builtin/alerts/events-pane.tsx +3 -0
- package/src/plugins/builtin/alerts/events.ts +10 -4
- package/src/plugins/builtin/alerts/history-pane.tsx +1 -1
- package/src/plugins/builtin/alerts/history.ts +1 -0
- package/src/plugins/builtin/alerts/index.tsx +6 -0
- package/src/plugins/builtin/alerts/research-builder.ts +10 -3
- package/src/plugins/builtin/alerts/research-rules.ts +15 -1
- package/src/plugins/builtin/analytics/risk-client.ts +15 -3
- package/src/plugins/builtin/analytics/risk-headless.ts +123 -18
- package/src/plugins/builtin/attention/client.ts +80 -0
- package/src/plugins/builtin/attention/evidence.ts +30 -0
- package/src/plugins/builtin/attention/headless.ts +33 -0
- package/src/plugins/builtin/attention/index.tsx +18 -0
- package/src/plugins/builtin/attention/model.ts +59 -0
- package/src/plugins/builtin/attention/pane.tsx +211 -0
- package/src/plugins/builtin/attention/trending.tsx +59 -0
- package/src/plugins/builtin/awards/alerts.ts +32 -0
- package/src/plugins/builtin/awards/client.ts +82 -0
- package/src/plugins/builtin/awards/detail.tsx +107 -0
- package/src/plugins/builtin/awards/evidence.ts +36 -0
- package/src/plugins/builtin/awards/headless.ts +55 -0
- package/src/plugins/builtin/awards/index.tsx +20 -0
- package/src/plugins/builtin/awards/model.ts +42 -0
- package/src/plugins/builtin/awards/pane.tsx +263 -0
- package/src/plugins/builtin/catalysts/client.ts +28 -0
- package/src/plugins/builtin/catalysts/detail.tsx +88 -0
- package/src/plugins/builtin/catalysts/evidence.ts +47 -0
- package/src/plugins/builtin/catalysts/headless.ts +42 -0
- package/src/plugins/builtin/catalysts/history.ts +26 -0
- package/src/plugins/builtin/catalysts/index.tsx +29 -0
- package/src/plugins/builtin/catalysts/model.ts +135 -0
- package/src/plugins/builtin/catalysts/pane.tsx +159 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +4 -0
- package/src/plugins/builtin/chart-composer/headless-schema.ts +6 -0
- package/src/plugins/builtin/chart-composer/index.tsx +8 -1
- package/src/plugins/builtin/chart-composer/pane.tsx +28 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +610 -0
- package/src/plugins/builtin/chat/attachments/files.ts +45 -0
- package/src/plugins/builtin/chat/attachments/model.ts +164 -0
- package/src/plugins/builtin/chat/attachments/terminal.tsx +72 -0
- package/src/plugins/builtin/chat/attachments/transfer.ts +165 -0
- package/src/plugins/builtin/chat/content/channel-navigation.ts +13 -12
- package/src/plugins/builtin/chat/content/composer-runtime.ts +25 -4
- package/src/plugins/builtin/chat/content/composer.tsx +46 -4
- package/src/plugins/builtin/chat/content/footer.tsx +46 -8
- package/src/plugins/builtin/chat/content/index.tsx +263 -62
- package/src/plugins/builtin/chat/content/layout-metrics.ts +10 -2
- package/src/plugins/builtin/chat/content/open-targets.ts +17 -3
- package/src/plugins/builtin/chat/content/scroll.ts +7 -1
- package/src/plugins/builtin/chat/content/shortcuts.ts +36 -11
- package/src/plugins/builtin/chat/content/snapshot.ts +3 -0
- package/src/plugins/builtin/chat/content/transcript.tsx +17 -1
- package/src/plugins/builtin/chat/content/types.ts +7 -0
- package/src/plugins/builtin/chat/controller/attachments.ts +213 -0
- package/src/plugins/builtin/chat/controller/connections.ts +3 -1
- package/src/plugins/builtin/chat/controller/index.ts +114 -2
- package/src/plugins/builtin/chat/controller/lifecycle.ts +9 -0
- package/src/plugins/builtin/chat/controller/messages.ts +35 -2
- package/src/plugins/builtin/chat/controller/send.ts +128 -25
- package/src/plugins/builtin/chat/controller/state.ts +12 -1
- package/src/plugins/builtin/chat/controller/utils.ts +7 -5
- package/src/plugins/builtin/chat/controller/view.ts +2 -0
- package/src/plugins/builtin/chat/index.tsx +21 -0
- package/src/plugins/builtin/chat/layout.ts +9 -4
- package/src/plugins/builtin/chat/message/desktop.tsx +55 -20
- package/src/plugins/builtin/chat/message/header.tsx +30 -5
- package/src/plugins/builtin/chat/message/inline-tokens.tsx +9 -0
- package/src/plugins/builtin/chat/message/pending-send.ts +35 -0
- package/src/plugins/builtin/chat/message/profile-popover.tsx +5 -1
- package/src/plugins/builtin/chat/message/render-state.ts +12 -2
- package/src/plugins/builtin/chat/message/terminal.tsx +51 -4
- package/src/plugins/builtin/chat/message/types.ts +6 -1
- package/src/plugins/builtin/chat/pane-state.ts +59 -1
- package/src/plugins/builtin/chat/profile-popover.ts +50 -1
- package/src/plugins/builtin/chat/sidebar.tsx +8 -3
- package/src/plugins/builtin/chat/status-widget.tsx +29 -12
- package/src/plugins/builtin/chat/unread-inbox-pane.tsx +143 -0
- package/src/plugins/builtin/chat/unread-inbox.ts +91 -0
- package/src/plugins/builtin/clinical-trials/client.ts +237 -0
- package/src/plugins/builtin/clinical-trials/index.tsx +74 -0
- package/src/plugins/builtin/clinical-trials/pane.tsx +225 -0
- package/src/plugins/builtin/clinical-trials/types.ts +2 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +37 -6
- package/src/plugins/builtin/cloud/askg/executor.ts +59 -44
- package/src/plugins/builtin/cloud/askg/host.ts +8 -1
- package/src/plugins/builtin/cloud/askg/manifest.ts +29 -2
- package/src/plugins/builtin/cloud/askg/model.ts +47 -13
- package/src/plugins/builtin/cloud/askg/notes.ts +100 -0
- package/src/plugins/builtin/cloud/askg/pane.tsx +50 -14
- package/src/plugins/builtin/cloud/askg/protocol.ts +39 -1
- package/src/plugins/builtin/cloud/askg/result-budget.ts +156 -0
- package/src/plugins/builtin/cloud/askg/user-data.ts +89 -0
- package/src/plugins/builtin/cloud/auth-actions.tsx +55 -31
- package/src/plugins/builtin/cloud/plugin.tsx +4 -1
- package/src/plugins/builtin/cloud/team/pane-sections.tsx +10 -1
- package/src/plugins/builtin/cloud/team/pane.tsx +3 -2
- package/src/plugins/builtin/cloud/thesis/board-pane.tsx +2 -2
- package/src/plugins/builtin/cloud/thesis/detail.tsx +1 -1
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +2 -2
- package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +202 -0
- package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
- package/src/plugins/builtin/cloud/upgrade-dialog.tsx +29 -3
- package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +1 -1
- package/src/plugins/builtin/cloud-tweets/table.tsx +1 -1
- package/src/plugins/builtin/comment-letters/client.ts +342 -0
- package/src/plugins/builtin/comment-letters/index.tsx +74 -0
- package/src/plugins/builtin/comment-letters/pane.tsx +295 -0
- package/src/plugins/builtin/comment-letters/types.ts +43 -0
- package/src/plugins/builtin/company-attention/app-rank.tsx +79 -0
- package/src/plugins/builtin/company-attention/client.ts +69 -0
- package/src/plugins/builtin/company-attention/evidence.ts +45 -0
- package/src/plugins/builtin/company-attention/headless.ts +47 -0
- package/src/plugins/builtin/company-attention/index.tsx +30 -0
- package/src/plugins/builtin/company-attention/model.ts +129 -0
- package/src/plugins/builtin/company-attention/pane.tsx +183 -0
- package/src/plugins/builtin/company-kpis/client.ts +92 -0
- package/src/plugins/builtin/company-kpis/headless.ts +32 -0
- package/src/plugins/builtin/company-kpis/index.tsx +26 -0
- package/src/plugins/builtin/company-kpis/model.ts +124 -0
- package/src/plugins/builtin/company-kpis/pane.tsx +226 -0
- package/src/plugins/builtin/company-kpis/related.ts +11 -0
- package/src/plugins/builtin/company-kpis/screenshot-evidence.ts +44 -0
- package/src/plugins/builtin/composite-plugins.ts +34 -0
- package/src/plugins/builtin/correlation/history.ts +4 -1
- package/src/plugins/builtin/correlation/index.tsx +139 -80
- package/src/plugins/builtin/correlation/matrix/pair-chart.tsx +48 -0
- package/src/plugins/builtin/correlation/matrix/selection.ts +77 -0
- package/src/plugins/builtin/correlation/relationship/model.ts +2 -2
- package/src/plugins/builtin/cpi/client.ts +66 -0
- package/src/plugins/builtin/cpi/headless.ts +78 -0
- package/src/plugins/builtin/cpi/index.tsx +31 -0
- package/src/plugins/builtin/cpi/model.ts +198 -0
- package/src/plugins/builtin/cpi/pane.tsx +157 -0
- package/src/plugins/builtin/credit-documents/client.ts +99 -0
- package/src/plugins/builtin/credit-documents/detail.tsx +109 -0
- package/src/plugins/builtin/credit-documents/evidence.ts +64 -0
- package/src/plugins/builtin/credit-documents/gauge.tsx +55 -0
- package/src/plugins/builtin/credit-documents/headless.ts +40 -0
- package/src/plugins/builtin/credit-documents/index.tsx +19 -0
- package/src/plugins/builtin/credit-documents/model.ts +336 -0
- package/src/plugins/builtin/credit-documents/pane.tsx +185 -0
- package/src/plugins/builtin/custom-view/view-spec.ts +14 -2
- package/src/plugins/builtin/debt-maturities/pane.tsx +1 -0
- package/src/plugins/builtin/dividend-yield/pane.tsx +1 -1
- package/src/plugins/builtin/doe/client.ts +73 -0
- package/src/plugins/builtin/doe/headless.ts +93 -0
- package/src/plugins/builtin/doe/index.tsx +41 -0
- package/src/plugins/builtin/doe/model.ts +215 -0
- package/src/plugins/builtin/doe/pane.tsx +148 -0
- package/src/plugins/builtin/doe/range-bar.tsx +45 -0
- package/src/plugins/builtin/earnings/board.tsx +3 -0
- package/src/plugins/builtin/earnings/index.tsx +2 -0
- package/src/plugins/builtin/earnings-calls/pane.tsx +7 -1
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +7 -7
- package/src/plugins/builtin/earnings-ripple/client.ts +60 -0
- package/src/plugins/builtin/earnings-ripple/headless.ts +35 -0
- package/src/plugins/builtin/earnings-ripple/index.tsx +35 -0
- package/src/plugins/builtin/earnings-ripple/model.ts +98 -0
- package/src/plugins/builtin/earnings-ripple/pane.tsx +103 -0
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/criterion-editor.tsx +1 -1
- package/src/plugins/builtin/equity-screener/model.ts +74 -9
- package/src/plugins/builtin/equity-screener/pane.tsx +2 -0
- package/src/plugins/builtin/estimate-revisions/pane.tsx +3 -0
- package/src/plugins/builtin/executives/pane.tsx +7 -5
- package/src/plugins/builtin/exposure/charts.tsx +66 -0
- package/src/plugins/builtin/exposure/client.ts +53 -0
- package/src/plugins/builtin/exposure/drivers.ts +29 -0
- package/src/plugins/builtin/exposure/editor.tsx +61 -0
- package/src/plugins/builtin/exposure/evidence.ts +39 -0
- package/src/plugins/builtin/exposure/headless.ts +51 -0
- package/src/plugins/builtin/exposure/holdings.ts +56 -0
- package/src/plugins/builtin/exposure/index.tsx +13 -0
- package/src/plugins/builtin/exposure/model.ts +104 -0
- package/src/plugins/builtin/exposure/pane.tsx +247 -0
- package/src/plugins/builtin/fear-greed/charts.tsx +1 -1
- package/src/plugins/builtin/fear-greed/pane.tsx +2 -9
- package/src/plugins/builtin/filing-events/pane.tsx +2 -1
- package/src/plugins/builtin/gpu/board.tsx +163 -0
- package/src/plugins/builtin/gpu/changes.tsx +94 -0
- package/src/plugins/builtin/gpu/client.ts +130 -0
- package/src/plugins/builtin/gpu/equities.tsx +112 -0
- package/src/plugins/builtin/gpu/headless.ts +67 -0
- package/src/plugins/builtin/gpu/history.tsx +140 -0
- package/src/plugins/builtin/gpu/index.tsx +18 -0
- package/src/plugins/builtin/gpu/ladder.tsx +127 -0
- package/src/plugins/builtin/gpu/model.ts +317 -0
- package/src/plugins/builtin/gpu/pane.tsx +63 -0
- package/src/plugins/builtin/help/index.tsx +19 -2
- package/src/plugins/builtin/holders/pane.tsx +5 -9
- package/src/plugins/builtin/insider/detail.tsx +119 -0
- package/src/plugins/builtin/insider/display.ts +221 -0
- package/src/plugins/builtin/insider/headless.ts +24 -3
- package/src/plugins/builtin/insider/index.tsx +206 -108
- package/src/plugins/builtin/insider/insider-data.ts +31 -3
- package/src/plugins/builtin/insider/model.ts +53 -4
- package/src/plugins/builtin/insider/table-model.ts +226 -0
- package/src/plugins/builtin/insider/table.tsx +79 -0
- package/src/plugins/builtin/iv-history/screen-pane.tsx +1 -1
- package/src/plugins/builtin/jobs/pane.tsx +14 -7
- package/src/plugins/builtin/kelly-sizer/pane.tsx +1 -1
- package/src/plugins/builtin/macro-day/client.ts +50 -0
- package/src/plugins/builtin/macro-day/headless.ts +51 -0
- package/src/plugins/builtin/macro-day/index.tsx +21 -0
- package/src/plugins/builtin/macro-day/model.ts +137 -0
- package/src/plugins/builtin/macro-day/pane.tsx +118 -0
- package/src/plugins/builtin/macro-day/releases.ts +58 -0
- package/src/plugins/builtin/market-halts/model.ts +30 -17
- package/src/plugins/builtin/market-halts/pane.tsx +15 -21
- package/src/plugins/builtin/market-heatmap/data.ts +1 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +198 -50
- package/src/plugins/builtin/market-heatmap/portfolio.ts +220 -0
- package/src/plugins/builtin/market-movers/index.tsx +1 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +5 -2
- package/src/plugins/builtin/mna/distress/client.ts +326 -0
- package/src/plugins/builtin/mna/distress/detail.tsx +247 -0
- package/src/plugins/builtin/mna/distress/headless.ts +257 -0
- package/src/plugins/builtin/mna/distress/model.ts +427 -0
- package/src/plugins/builtin/mna/distress/pane.tsx +606 -0
- package/src/plugins/builtin/mna/index.tsx +15 -0
- package/src/plugins/builtin/mna/pane.tsx +42 -1
- package/src/plugins/builtin/news/index.tsx +62 -16
- package/src/plugins/builtin/news/wire/filter-articles.ts +54 -0
- package/src/plugins/builtin/news/wire/index.tsx +37 -3
- package/src/plugins/builtin/news/wire/industry-pane.tsx +29 -13
- package/src/plugins/builtin/news/wire/mutes.ts +253 -0
- package/src/plugins/builtin/news/wire/news/command-bar-search.ts +117 -0
- package/src/plugins/builtin/news/wire/news/footer.ts +4 -0
- package/src/plugins/builtin/news/wire/news/list-search.ts +34 -0
- package/src/plugins/builtin/news/wire/news/pop-out.tsx +158 -0
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +64 -19
- package/src/plugins/builtin/openfda/client.ts +300 -0
- package/src/plugins/builtin/openfda/index.tsx +71 -0
- package/src/plugins/builtin/openfda/pane.tsx +382 -0
- package/src/plugins/builtin/openfda/types.ts +76 -0
- package/src/plugins/builtin/options/footer.ts +1 -0
- package/src/plugins/builtin/options/view.tsx +1 -1
- package/src/plugins/builtin/options-calculator/pane.tsx +0 -1
- package/src/plugins/builtin/options-positioning/index.tsx +4 -2
- package/src/plugins/builtin/options-positioning/pane.tsx +1 -1
- package/src/plugins/builtin/pe-band/client.ts +61 -0
- package/src/plugins/builtin/pe-band/headless.ts +51 -0
- package/src/plugins/builtin/pe-band/index.tsx +20 -0
- package/src/plugins/builtin/pe-band/model.ts +267 -0
- package/src/plugins/builtin/pe-band/pane.tsx +159 -0
- package/src/plugins/builtin/perps/client.ts +66 -0
- package/src/plugins/builtin/perps/equity-row.tsx +28 -0
- package/src/plugins/builtin/perps/headless.ts +34 -0
- package/src/plugins/builtin/perps/index.tsx +14 -0
- package/src/plugins/builtin/perps/model.ts +58 -0
- package/src/plugins/builtin/perps/pane.tsx +185 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +0 -1
- package/src/plugins/builtin/portfolio-list/cli/render.ts +177 -87
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +6 -20
- package/src/plugins/builtin/portfolio-list/command-bar.ts +6 -2
- package/src/plugins/builtin/portfolio-list/headless.ts +237 -0
- package/src/plugins/builtin/portfolio-list/index.tsx +2 -0
- package/src/plugins/builtin/portfolio-list/mutations.ts +70 -1
- package/src/plugins/builtin/portfolio-list/pane/data.ts +17 -0
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +88 -5
- package/src/plugins/builtin/portfolio-list/pane/remove-ticker.ts +85 -0
- package/src/plugins/builtin/portfolio-list/pane/streaming.ts +18 -12
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +6 -0
- package/src/plugins/builtin/power/client.ts +100 -0
- package/src/plugins/builtin/power/detail.tsx +82 -0
- package/src/plugins/builtin/power/evidence.ts +56 -0
- package/src/plugins/builtin/power/generation.tsx +37 -0
- package/src/plugins/builtin/power/headless.ts +43 -0
- package/src/plugins/builtin/power/index.tsx +16 -0
- package/src/plugins/builtin/power/model.ts +89 -0
- package/src/plugins/builtin/power/pane.tsx +209 -0
- package/src/plugins/builtin/power/query.ts +25 -0
- package/src/plugins/builtin/relative-rotation/pane.tsx +3 -3
- package/src/plugins/builtin/research/analyst-pane.tsx +1 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +13 -4
- package/src/plugins/builtin/research/equity-diagnostic-pane.tsx +11 -9
- package/src/plugins/builtin/research-search/pane.tsx +21 -7
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +1 -1
- package/src/plugins/builtin/reverse-dcf/client.ts +35 -0
- package/src/plugins/builtin/reverse-dcf/headless.ts +44 -0
- package/src/plugins/builtin/reverse-dcf/index.tsx +20 -0
- package/src/plugins/builtin/reverse-dcf/model.ts +87 -0
- package/src/plugins/builtin/reverse-dcf/pane.tsx +107 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +6 -5
- package/src/plugins/builtin/scanner/denied.tsx +4 -2
- package/src/plugins/builtin/scanner/feed.ts +1 -0
- package/src/plugins/builtin/scanner/flow-pane.tsx +3 -2
- package/src/plugins/builtin/scanner/hilo-pane.tsx +1 -1
- package/src/plugins/builtin/seasonality/client.ts +4 -1
- package/src/plugins/builtin/sec/command-bar-search.ts +217 -0
- package/src/plugins/builtin/sec/forms.ts +54 -0
- package/src/plugins/builtin/sec/headless.ts +31 -5
- package/src/plugins/builtin/sec/index.tsx +67 -11
- package/src/plugins/builtin/sec/model.ts +35 -5
- package/src/plugins/builtin/sectors/headless.ts +1 -0
- package/src/plugins/builtin/sectors/index.tsx +72 -26
- package/src/plugins/builtin/shared/cloud-upgrade.ts +143 -39
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +8 -4
- package/src/plugins/builtin/shared/research-cells.tsx +107 -0
- package/src/plugins/builtin/shared/series-list-detail.tsx +5 -1
- package/src/plugins/builtin/shared/ticker-request.ts +1 -1
- package/src/plugins/builtin/shared/wall-teaser-catalog.ts +80 -0
- package/src/plugins/builtin/shared/wall-teaser.tsx +192 -0
- package/src/plugins/builtin/shared/wall-view-lifecycle.ts +43 -0
- package/src/plugins/builtin/short-interest/index.tsx +31 -0
- package/src/plugins/builtin/short-interest/watch-client.ts +70 -0
- package/src/plugins/builtin/short-interest/watch-headless.ts +49 -0
- package/src/plugins/builtin/short-interest/watch-model.ts +185 -0
- package/src/plugins/builtin/short-interest/watch-pane.tsx +169 -0
- package/src/plugins/builtin/short-volume/pane.tsx +1 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +1 -1
- package/src/plugins/builtin/supply-chain/client.ts +104 -0
- package/src/plugins/builtin/supply-chain/disclosure-quote.tsx +17 -0
- package/src/plugins/builtin/supply-chain/evidence.ts +88 -0
- package/src/plugins/builtin/supply-chain/flow-layout.ts +133 -0
- package/src/plugins/builtin/supply-chain/flow.tsx +323 -0
- package/src/plugins/builtin/supply-chain/graph-client.ts +83 -0
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +25 -0
- package/src/plugins/builtin/supply-chain/graph-model.ts +45 -0
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +218 -0
- package/src/plugins/builtin/supply-chain/graph.tsx +163 -0
- package/src/plugins/builtin/supply-chain/headless.ts +105 -0
- package/src/plugins/builtin/supply-chain/index.tsx +17 -0
- package/src/plugins/builtin/supply-chain/model.ts +145 -0
- package/src/plugins/builtin/supply-chain/pane.tsx +276 -0
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +96 -0
- package/src/plugins/builtin/supply-chain/trust.ts +34 -0
- package/src/plugins/builtin/themes/client.ts +39 -0
- package/src/plugins/builtin/themes/headless.ts +38 -0
- package/src/plugins/builtin/themes/model.ts +92 -0
- package/src/plugins/builtin/themes/pane.tsx +125 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +6 -15
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +5 -6
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +201 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +327 -0
- package/src/plugins/builtin/ticker-detail/financials/period-end-history.ts +5 -2
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +60 -12
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +2 -1
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -2
- package/src/plugins/builtin/ticker-detail/index.tsx +22 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +53 -30
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +2 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +112 -47
- package/src/plugins/builtin/ticker-detail/pane.tsx +50 -6
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +21 -42
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +3 -0
- package/src/plugins/builtin/time-sales/pane.tsx +1 -1
- package/src/plugins/builtin/world-indices/indices.ts +1 -0
- package/src/plugins/catalog-browser.ts +40 -0
- package/src/plugins/catalog-manifest.ts +3 -0
- package/src/plugins/catalog-ui.ts +6 -0
- package/src/plugins/current-target.ts +0 -9
- package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
- package/src/renderers/browser/cloud-transport.ts +66 -1
- package/src/renderers/browser/main.tsx +2 -0
- package/src/renderers/dom/data-table/row.tsx +2 -0
- package/src/renderers/dom/desktop/controls.tsx +38 -25
- package/src/renderers/dom/desktop/icons.tsx +8 -0
- package/src/renderers/dom/host/chart-surface.tsx +36 -2
- package/src/renderers/dom/host/focus-scope.ts +11 -1
- package/src/renderers/dom/styles.css +28 -0
- package/src/renderers/electrobun/view/backend-rpc.ts +3 -2
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +1 -1
- package/src/renderers/electrobun/view/http-fetch.ts +2 -0
- package/src/renderers/electrobun/view/main.tsx +3 -1
- package/src/renderers/electrobun/view/rpc-timeout.ts +59 -0
- package/src/renderers/opentui/start.tsx +3 -0
- package/src/shares/api.ts +3 -1
- package/src/sources/gloomberb-cloud/index.ts +47 -13
- package/src/sources/history-result.ts +1 -0
- package/src/sources/history-retention.ts +16 -0
- package/src/sources/provider-router/history.ts +4 -2
- package/src/sources/sec-edgar/identity.ts +36 -0
- package/src/sources/sec-edgar.ts +1 -34
- package/src/state/app/context/index.tsx +8 -0
- package/src/sync/core-contributors.ts +20 -2
- package/src/telemetry/attention-counts.ts +164 -0
- package/src/telemetry/live-config.ts +7 -0
- package/src/test-support/rpc-loopback.ts +7 -3
- package/src/test-support/shell-pane-keys.tsx +34 -0
- package/src/tickers/instrument-kind.ts +12 -6
- package/src/tickers/open-target.ts +1 -1
- package/src/tickers/search/asset-classes.ts +91 -0
- package/src/tickers/search/index.ts +62 -15
- package/src/tickers/search/ranking.ts +22 -3
- package/src/tickers/search/upsert.ts +4 -1
- package/src/time-series/live-bars.ts +8 -3
- package/src/time-series/resolve.ts +224 -17
- package/src/time-series/spec.ts +1 -0
- package/src/time-series/types.ts +9 -1
- package/src/types/config.ts +23 -1
- package/src/types/data-provider.ts +2 -0
- package/src/types/headless.ts +17 -0
- package/src/types/price-history.ts +2 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/double-escape-close.ts +20 -0
- package/src/utils/exchanges.ts +1 -0
- package/src/utils/html-entities.ts +15 -0
- package/src/utils/http-proxy-response.ts +44 -7
- package/src/utils/plugin-proxy-hosts.json +3 -0
- package/src/utils/price-history.ts +35 -1
- package/src/utils/sec.ts +21 -2
- package/src/utils/text-wrap.ts +13 -8
- package/src/utils/zoned-date-time.ts +67 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { apiClient, type CloudFilingEventPayload } from "../../../../api-client";
|
|
2
|
+
import type {
|
|
3
|
+
DistressAttribution,
|
|
4
|
+
DistressDesignation,
|
|
5
|
+
DistressDesignationsParams,
|
|
6
|
+
DistressDesignationsPayload,
|
|
7
|
+
DistressFilingKind,
|
|
8
|
+
DistressFilingsPayload,
|
|
9
|
+
GoingConcernDisclosure,
|
|
10
|
+
GoingConcernParams,
|
|
11
|
+
GoingConcernPayload,
|
|
12
|
+
InsolvencyNotice,
|
|
13
|
+
InsolvencyNoticesParams,
|
|
14
|
+
InsolvencyNoticesPayload,
|
|
15
|
+
} from "../../../../api-client/distress";
|
|
16
|
+
import { createPluginCache } from "../../../../data/plugin-cache";
|
|
17
|
+
import type { HeadlessPaneApiClient } from "../../../../types/plugin";
|
|
18
|
+
import { unavailableOnServer } from "../../shared/cloud-resource";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The parsers check every field the tab draws or links, so a changed or broken
|
|
22
|
+
* answer becomes an error state rather than a wrong row. Unknown enum values
|
|
23
|
+
* that only label a row (a procedure kind) pass through with a plain label;
|
|
24
|
+
* the going-concern verdict, whose wording matters, must be one of four.
|
|
25
|
+
*/
|
|
26
|
+
class UnreadableRecords extends Error {
|
|
27
|
+
constructor(subject: string) {
|
|
28
|
+
super(`The server returned unreadable ${subject}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type Json = Record<string, unknown>;
|
|
33
|
+
|
|
34
|
+
const isObject = (value: unknown): value is Json => !!value && typeof value === "object" && !Array.isArray(value);
|
|
35
|
+
const isText = (value: unknown): value is string => typeof value === "string";
|
|
36
|
+
const isFilled = (value: unknown): value is string => typeof value === "string" && value.trim().length > 0;
|
|
37
|
+
const isTextOrNull = (value: unknown) => value === null || typeof value === "string";
|
|
38
|
+
const isBooleanOrNull = (value: unknown) => value === null || typeof value === "boolean";
|
|
39
|
+
const isDay = (value: unknown): value is string => typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value)
|
|
40
|
+
&& Number.isFinite(Date.parse(`${value}T00:00:00Z`));
|
|
41
|
+
const isDayOrNull = (value: unknown) => value === null || isDay(value);
|
|
42
|
+
const isInstant = (value: unknown): value is string => typeof value === "string" && Number.isFinite(Date.parse(value));
|
|
43
|
+
const isInstantOrNull = (value: unknown) => value === null || isInstant(value);
|
|
44
|
+
/** Only web links are opened; anything else in a link field makes the record unreadable. */
|
|
45
|
+
const isWebUrl = (value: unknown): value is string => {
|
|
46
|
+
if (typeof value !== "string") return false;
|
|
47
|
+
try {
|
|
48
|
+
const url = new URL(value);
|
|
49
|
+
return url.protocol === "https:" || url.protocol === "http:";
|
|
50
|
+
} catch {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const isWebUrlOrNull = (value: unknown) => value === null || isWebUrl(value);
|
|
55
|
+
const isCount = (value: unknown) => Number.isInteger(value) && (value as number) >= 0;
|
|
56
|
+
const VERDICTS = new Set(["doubt_raised", "doubt_alleviated", "policy_only", "unclear"]);
|
|
57
|
+
const DATE_BASES = new Set(["designation", "effective", "first_observed"]);
|
|
58
|
+
|
|
59
|
+
function validEvent(value: unknown): value is CloudFilingEventPayload {
|
|
60
|
+
if (!isObject(value) || !isObject(value.company)) return false;
|
|
61
|
+
const company = value.company;
|
|
62
|
+
return isFilled(value.id) && isFilled(value.ticker)
|
|
63
|
+
&& isFilled(company.name) && isText(company.ticker) && isTextOrNull(company.cik ?? null)
|
|
64
|
+
&& isInstant(value.filedAt)
|
|
65
|
+
&& (value.filingDate === undefined || isDayOrNull(value.filingDate))
|
|
66
|
+
&& (value.form === undefined || isText(value.form))
|
|
67
|
+
&& isWebUrl(value.docUrl)
|
|
68
|
+
&& Array.isArray(value.items) && value.items.every(isText)
|
|
69
|
+
&& Array.isArray(value.labels) && value.labels.every(isText)
|
|
70
|
+
&& Array.isArray(value.kinds) && value.kinds.every(isText)
|
|
71
|
+
&& typeof value.material === "boolean"
|
|
72
|
+
&& isTextOrNull(value.headline) && isTextOrNull(value.summary)
|
|
73
|
+
&& Array.isArray(value.people)
|
|
74
|
+
&& typeof value.read === "boolean";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function parseDistressFilings(value: unknown): DistressFilingsPayload {
|
|
78
|
+
if (!isObject(value) || !Array.isArray(value.events) || !value.events.every(validEvent)) {
|
|
79
|
+
throw new UnreadableRecords("8-K filings");
|
|
80
|
+
}
|
|
81
|
+
return { events: value.events.map((event) => ({ ...event, people: [] })) };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function validDisclosure(value: unknown): value is GoingConcernDisclosure {
|
|
85
|
+
if (!isObject(value) || !isObject(value.company)) return false;
|
|
86
|
+
const company = value.company;
|
|
87
|
+
return isFilled(value.id) && isFilled(value.cik) && isTextOrNull(value.ticker)
|
|
88
|
+
&& isText(value.accession) && isFilled(value.form)
|
|
89
|
+
&& isDayOrNull(value.period_end) && isDay(value.filed_at) && isDayOrNull(value.fact_date)
|
|
90
|
+
&& isText(value.tag) && VERDICTS.has(value.verdict as string)
|
|
91
|
+
&& isBooleanOrNull(value.within_one_year) && isBooleanOrNull(value.source_within_one_year)
|
|
92
|
+
&& isText(value.summary) && isText(value.quote) && isText(value.text)
|
|
93
|
+
&& typeof value.text_truncated === "boolean" && isText(value.dataset_month)
|
|
94
|
+
&& isFilled(company.name) && isText(company.ticker) && isTextOrNull(company.cik ?? null)
|
|
95
|
+
&& (company.shortName === undefined || isText(company.shortName))
|
|
96
|
+
&& isWebUrl(value.filing_url);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function validPage(value: Json): boolean {
|
|
100
|
+
return typeof value.hasMore === "boolean" && isCount(value.offset) && isCount(value.limit);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function parseGoingConcern(value: unknown): GoingConcernPayload {
|
|
104
|
+
if (!isObject(value) || !validPage(value) || !Array.isArray(value.disclosures) || !value.disclosures.every(validDisclosure)) {
|
|
105
|
+
throw new UnreadableRecords("going-concern disclosures");
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
disclosures: value.disclosures.map((row) => ({
|
|
109
|
+
id: row.id, cik: row.cik, ticker: row.ticker, accession: row.accession, form: row.form,
|
|
110
|
+
period_end: row.period_end, filed_at: row.filed_at, fact_date: row.fact_date, tag: row.tag,
|
|
111
|
+
verdict: row.verdict, within_one_year: row.within_one_year, source_within_one_year: row.source_within_one_year,
|
|
112
|
+
summary: row.summary, quote: row.quote, text: row.text, text_truncated: row.text_truncated,
|
|
113
|
+
dataset_month: row.dataset_month,
|
|
114
|
+
company: {
|
|
115
|
+
ticker: row.company.ticker,
|
|
116
|
+
cik: row.company.cik ?? null,
|
|
117
|
+
name: row.company.name,
|
|
118
|
+
shortName: row.company.shortName ?? row.company.name,
|
|
119
|
+
},
|
|
120
|
+
filing_url: row.filing_url,
|
|
121
|
+
})),
|
|
122
|
+
hasMore: value.hasMore as boolean,
|
|
123
|
+
limit: value.limit as number,
|
|
124
|
+
offset: value.offset as number,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The server's two shapes (a list of dataset pages, or one page) as one list of
|
|
130
|
+
* links. A parsed attribution parses to itself, so cached copies check again.
|
|
131
|
+
*/
|
|
132
|
+
function parseAttribution(value: unknown): DistressAttribution | null {
|
|
133
|
+
if (!isObject(value) || !isFilled(value.source) || !isFilled(value.organization) || !isFilled(value.licence)
|
|
134
|
+
|| !isWebUrl(value.licenceUrl) || !isFilled(value.notice)) return null;
|
|
135
|
+
const datasetUrls: unknown[] = [
|
|
136
|
+
...(Array.isArray(value.datasetUrls) ? value.datasetUrls : []),
|
|
137
|
+
...(Array.isArray(value.datasets) ? value.datasets : []),
|
|
138
|
+
...(value.datasetUrl == null ? [] : [value.datasetUrl]),
|
|
139
|
+
];
|
|
140
|
+
if (!datasetUrls.every(isWebUrl)) return null;
|
|
141
|
+
if (value.dataset != null && !isText(value.dataset)) return null;
|
|
142
|
+
if (value.version != null && !isText(value.version)) return null;
|
|
143
|
+
if (value.year != null && !Number.isInteger(value.year)) return null;
|
|
144
|
+
return {
|
|
145
|
+
source: value.source,
|
|
146
|
+
organization: value.organization,
|
|
147
|
+
dataset: (value.dataset as string | null | undefined) ?? null,
|
|
148
|
+
version: (value.version as string | null | undefined) ?? null,
|
|
149
|
+
year: (value.year as number | null | undefined) ?? null,
|
|
150
|
+
datasetUrls: datasetUrls as string[],
|
|
151
|
+
licence: value.licence,
|
|
152
|
+
licenceUrl: value.licenceUrl,
|
|
153
|
+
notice: value.notice,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function parseAttributions(value: unknown, subject: string): DistressAttribution[] {
|
|
158
|
+
if (!Array.isArray(value)) throw new UnreadableRecords(subject);
|
|
159
|
+
const parsed = value.map(parseAttribution);
|
|
160
|
+
if (parsed.some((entry) => entry === null)) throw new UnreadableRecords(subject);
|
|
161
|
+
return parsed as DistressAttribution[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function validDesignation(value: unknown): value is DistressDesignation {
|
|
165
|
+
return isObject(value)
|
|
166
|
+
&& isFilled(value.id) && isFilled(value.source) && isText(value.region) && isFilled(value.exchange)
|
|
167
|
+
&& isTextOrNull(value.symbol) && isFilled(value.local_code)
|
|
168
|
+
&& isFilled(value.entity_name) && isTextOrNull(value.entity_name_en) && isTextOrNull(value.market_segment)
|
|
169
|
+
&& isFilled(value.kind)
|
|
170
|
+
&& isDayOrNull(value.designated_at) && isDayOrNull(value.effective_at)
|
|
171
|
+
&& isInstant(value.first_seen_at) && isInstant(value.last_seen_at) && isInstantOrNull(value.ended_at)
|
|
172
|
+
&& isText(value.remarks) && isWebUrl(value.source_url) && isWebUrlOrNull(value.notice_url)
|
|
173
|
+
&& DATE_BASES.has(value.date_basis as string)
|
|
174
|
+
// The date the row sorts by must be there.
|
|
175
|
+
&& (value.date_basis !== "designation" || value.designated_at !== null)
|
|
176
|
+
&& (value.date_basis !== "effective" || value.effective_at !== null);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function parseDesignations(value: unknown): DistressDesignationsPayload {
|
|
180
|
+
const subject = "listing designations";
|
|
181
|
+
if (!isObject(value) || !validPage(value) || !Array.isArray(value.designations) || !value.designations.every(validDesignation)) {
|
|
182
|
+
throw new UnreadableRecords(subject);
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
designations: value.designations.map((row) => ({
|
|
186
|
+
id: row.id, source: row.source, region: row.region, exchange: row.exchange, symbol: row.symbol,
|
|
187
|
+
local_code: row.local_code, entity_name: row.entity_name, entity_name_en: row.entity_name_en,
|
|
188
|
+
market_segment: row.market_segment, kind: row.kind, designated_at: row.designated_at,
|
|
189
|
+
effective_at: row.effective_at, first_seen_at: row.first_seen_at, last_seen_at: row.last_seen_at,
|
|
190
|
+
ended_at: row.ended_at, remarks: row.remarks, source_url: row.source_url, notice_url: row.notice_url,
|
|
191
|
+
date_basis: row.date_basis,
|
|
192
|
+
})),
|
|
193
|
+
hasMore: value.hasMore as boolean,
|
|
194
|
+
limit: value.limit as number,
|
|
195
|
+
offset: value.offset as number,
|
|
196
|
+
attributions: parseAttributions(value.attributions, subject),
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function validNotice(value: unknown): value is InsolvencyNotice {
|
|
201
|
+
return isObject(value)
|
|
202
|
+
&& isFilled(value.source) && isFilled(value.country) && isFilled(value.registry_id)
|
|
203
|
+
&& isFilled(value.entity_name) && isTextOrNull(value.symbol)
|
|
204
|
+
&& isFilled(value.kind) && isText(value.raw_code)
|
|
205
|
+
&& isDayOrNull(value.notice_date) && isDay(value.published_date) && isText(value.court)
|
|
206
|
+
&& isFilled(value.notice_id) && isWebUrl(value.notice_url)
|
|
207
|
+
&& isFilled(value.notice_type) && isTextOrNull(value.original_notice_id) && isFilled(value.status);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function parseInsolvencyNotices(value: unknown): InsolvencyNoticesPayload {
|
|
211
|
+
const subject = "insolvency notices";
|
|
212
|
+
if (!isObject(value) || !validPage(value) || !Array.isArray(value.notices) || !value.notices.every(validNotice)) {
|
|
213
|
+
throw new UnreadableRecords(subject);
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
notices: value.notices.map((row) => ({
|
|
217
|
+
source: row.source, country: row.country, registry_id: row.registry_id, entity_name: row.entity_name,
|
|
218
|
+
// No listed-company mapping exists for these notices yet; a symbol is never taken on trust here.
|
|
219
|
+
symbol: null,
|
|
220
|
+
kind: row.kind, raw_code: row.raw_code, notice_date: row.notice_date, published_date: row.published_date,
|
|
221
|
+
court: row.court, notice_id: row.notice_id, notice_url: row.notice_url, notice_type: row.notice_type,
|
|
222
|
+
original_notice_id: row.original_notice_id, status: row.status,
|
|
223
|
+
})),
|
|
224
|
+
hasMore: value.hasMore as boolean,
|
|
225
|
+
limit: value.limit as number,
|
|
226
|
+
offset: value.offset as number,
|
|
227
|
+
attributions: parseAttributions(value.attributions, subject),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type DistressApi = Pick<HeadlessPaneApiClient,
|
|
232
|
+
"getPublicDistressFilings" | "getPublicGoingConcern" | "getPublicDistressDesignations" | "getPublicInsolvencyNotices">;
|
|
233
|
+
|
|
234
|
+
/** Filings are read in one request: the route has no offset, and two hundred covers months of these items. */
|
|
235
|
+
const FILINGS_LIMIT = 200;
|
|
236
|
+
export const PAGE_LIMIT = 100;
|
|
237
|
+
/** The routes refuse an offset past this; a list stops paging there. */
|
|
238
|
+
const MAX_OFFSET = 10_000;
|
|
239
|
+
|
|
240
|
+
/** Whether a page at `nextOffset` can still be asked for. */
|
|
241
|
+
export const canPage = (hasMore: boolean, nextOffset: number) => hasMore && nextOffset <= MAX_OFFSET;
|
|
242
|
+
|
|
243
|
+
const UNAVAILABLE = "These records are not available on this server yet.";
|
|
244
|
+
|
|
245
|
+
async function read<T>(load: () => Promise<unknown>, parse: (value: unknown) => T): Promise<T> {
|
|
246
|
+
let raw: unknown;
|
|
247
|
+
try {
|
|
248
|
+
raw = await load();
|
|
249
|
+
} catch (error) {
|
|
250
|
+
throw unavailableOnServer(error, UNAVAILABLE);
|
|
251
|
+
}
|
|
252
|
+
return parse(raw);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export function fetchDistressFilings(kind: DistressFilingKind, client: DistressApi = apiClient, signal?: AbortSignal, limit = FILINGS_LIMIT) {
|
|
256
|
+
return read(() => client.getPublicDistressFilings({ kind, limit }, { signal }), parseDistressFilings);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function fetchGoingConcern(params: GoingConcernParams, client: DistressApi = apiClient, signal?: AbortSignal) {
|
|
260
|
+
return read(() => client.getPublicGoingConcern(params, { signal }), parseGoingConcern);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export function fetchDesignations(params: DistressDesignationsParams, client: DistressApi = apiClient, signal?: AbortSignal) {
|
|
264
|
+
return read(() => client.getPublicDistressDesignations(params, { signal }), parseDesignations);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function fetchInsolvencyNotices(params: InsolvencyNoticesParams, client: DistressApi = apiClient, signal?: AbortSignal) {
|
|
268
|
+
return read(() => client.getPublicInsolvencyNotices(params, { signal }), parseInsolvencyNotices);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* First pages, kept while the pane is closed. Filings land through the day;
|
|
273
|
+
* the other sources change daily or monthly, so ten minutes is fresh enough
|
|
274
|
+
* for all four. Later pages are always read from the server.
|
|
275
|
+
*/
|
|
276
|
+
const POLICY = { staleMs: 10 * 60_000, expireMs: 7 * 86_400_000 };
|
|
277
|
+
const distressFilingsCache = createPluginCache<DistressFilingsPayload>({ kind: "distress-filings", source: "gloom-cloud", schemaVersion: 1, policy: POLICY });
|
|
278
|
+
const goingConcernCache = createPluginCache<GoingConcernPayload>({ kind: "distress-going-concern", source: "gloom-cloud", schemaVersion: 1, policy: POLICY });
|
|
279
|
+
const designationsCache = createPluginCache<DistressDesignationsPayload>({ kind: "distress-designations", source: "gloom-cloud", schemaVersion: 1, policy: POLICY });
|
|
280
|
+
const insolvencyCache = createPluginCache<InsolvencyNoticesPayload>({ kind: "distress-insolvency", source: "gloom-cloud", schemaVersion: 1, policy: POLICY });
|
|
281
|
+
|
|
282
|
+
export const DISTRESS_CACHES = [distressFilingsCache, goingConcernCache, designationsCache, insolvencyCache] as const;
|
|
283
|
+
|
|
284
|
+
/** A first page from the cache, or a later page from the server, with what the footer needs. */
|
|
285
|
+
export interface LoadedPage<T> {
|
|
286
|
+
payload: T;
|
|
287
|
+
/** The answer is an older copy because the refresh failed. */
|
|
288
|
+
stale: boolean;
|
|
289
|
+
refreshError: string | null;
|
|
290
|
+
/** When the answer was read from the server, for the refresh schedule. */
|
|
291
|
+
fetchedAt: number;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
interface Cache<T> {
|
|
295
|
+
load(key: string, loader: () => Promise<T>, options?: { force?: boolean }): Promise<{ data: T; stale: boolean; refreshError?: string; fetchedAt: number }>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Only parsed answers reach the cache, and a cached copy is parsed again on the
|
|
300
|
+
* way out, so a copy written by an older build can never be drawn unchecked.
|
|
301
|
+
*/
|
|
302
|
+
async function loadFirstPage<T>(cache: Cache<T>, key: string, fetch: () => Promise<T>, parse: (value: unknown) => T, force: boolean): Promise<LoadedPage<T>> {
|
|
303
|
+
const result = await cache.load(key, fetch, { force });
|
|
304
|
+
return { payload: parse(result.data), stale: result.stale, refreshError: result.refreshError ?? null, fetchedAt: result.fetchedAt };
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const fresh = <T,>(payload: T): LoadedPage<T> => ({ payload, stale: false, refreshError: null, fetchedAt: Date.now() });
|
|
308
|
+
|
|
309
|
+
export function loadDistressFilings(kind: DistressFilingKind, force: boolean, signal?: AbortSignal): Promise<LoadedPage<DistressFilingsPayload>> {
|
|
310
|
+
return loadFirstPage(distressFilingsCache, kind, () => fetchDistressFilings(kind, apiClient, signal), parseDistressFilings, force);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export function loadGoingConcern(params: GoingConcernParams, force: boolean, signal?: AbortSignal): Promise<LoadedPage<GoingConcernPayload>> {
|
|
314
|
+
if (params.offset) return fetchGoingConcern(params, apiClient, signal).then(fresh);
|
|
315
|
+
return loadFirstPage(goingConcernCache, JSON.stringify(params), () => fetchGoingConcern(params, apiClient, signal), parseGoingConcern, force);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export function loadDesignations(params: DistressDesignationsParams, force: boolean, signal?: AbortSignal): Promise<LoadedPage<DistressDesignationsPayload>> {
|
|
319
|
+
if (params.offset) return fetchDesignations(params, apiClient, signal).then(fresh);
|
|
320
|
+
return loadFirstPage(designationsCache, JSON.stringify(params), () => fetchDesignations(params, apiClient, signal), parseDesignations, force);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export function loadInsolvencyNotices(params: InsolvencyNoticesParams, force: boolean, signal?: AbortSignal): Promise<LoadedPage<InsolvencyNoticesPayload>> {
|
|
324
|
+
if (params.offset) return fetchInsolvencyNotices(params, apiClient, signal).then(fresh);
|
|
325
|
+
return loadFirstPage(insolvencyCache, JSON.stringify(params), () => fetchInsolvencyNotices(params, apiClient, signal), parseInsolvencyNotices, force);
|
|
326
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { CloudFilingEventPayload } from "../../../../api-client";
|
|
3
|
+
import type {
|
|
4
|
+
DistressAttribution,
|
|
5
|
+
DistressDesignation,
|
|
6
|
+
GoingConcernDisclosure,
|
|
7
|
+
InsolvencyNotice,
|
|
8
|
+
} from "../../../../api-client/distress";
|
|
9
|
+
import { BulletList, ExternalLinkText, Prose, READING_WIDTH } from "../../../../components";
|
|
10
|
+
import { useThemeColors } from "../../../../theme/theme-context";
|
|
11
|
+
import { Box, Text } from "../../../../ui";
|
|
12
|
+
import { truncateToDisplayWidth } from "../../../../utils/format";
|
|
13
|
+
import {
|
|
14
|
+
assessmentHorizonLabel,
|
|
15
|
+
cellText,
|
|
16
|
+
cikLabel,
|
|
17
|
+
DATE_BASIS_LABELS,
|
|
18
|
+
designationDate,
|
|
19
|
+
designationKindLabel,
|
|
20
|
+
designationRemarks,
|
|
21
|
+
exchangeLabel,
|
|
22
|
+
filingDate,
|
|
23
|
+
filingItemLines,
|
|
24
|
+
filingTicker,
|
|
25
|
+
insolvencyKindLabel,
|
|
26
|
+
insolvencyNoticeLabel,
|
|
27
|
+
isoDay,
|
|
28
|
+
MISSING,
|
|
29
|
+
noticeStatusLabel,
|
|
30
|
+
noticeTypeLabel,
|
|
31
|
+
plainText,
|
|
32
|
+
registryLabel,
|
|
33
|
+
VERDICT_LABELS,
|
|
34
|
+
} from "./model";
|
|
35
|
+
|
|
36
|
+
/** Wide enough for "Company number" and a gap. */
|
|
37
|
+
const LABEL_WIDTH = 16;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Detail bodies for the distress lists. Everything here is source text drawn
|
|
41
|
+
* as plain text, with the record's own dates, and the licence terms each
|
|
42
|
+
* source publishes under beside its rows.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
function Field({ label, value, width, bright = false }: { label: string; value: string; width: number; bright?: boolean }) {
|
|
46
|
+
const colors = useThemeColors();
|
|
47
|
+
const valueWidth = Math.max(8, width - LABEL_WIDTH);
|
|
48
|
+
return (
|
|
49
|
+
<Box flexDirection="row" width={width} flexShrink={0}>
|
|
50
|
+
<Box width={LABEL_WIDTH} flexShrink={0} overflow="hidden">
|
|
51
|
+
<Text fg={colors.textDim}>{label}</Text>
|
|
52
|
+
</Box>
|
|
53
|
+
<Box flexDirection="column" width={valueWidth} flexShrink={0}>
|
|
54
|
+
<Prose text={value || MISSING} width={valueWidth} color={bright ? colors.textBright : colors.text} figures={false} />
|
|
55
|
+
</Box>
|
|
56
|
+
</Box>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function LinkField({ label, url, width }: { label: string; url: string; width: number }) {
|
|
61
|
+
const colors = useThemeColors();
|
|
62
|
+
const valueWidth = Math.max(8, width - LABEL_WIDTH);
|
|
63
|
+
return (
|
|
64
|
+
<Box flexDirection="row" width={width} height={1} flexShrink={0} overflow="hidden">
|
|
65
|
+
<Box width={LABEL_WIDTH} flexShrink={0} overflow="hidden">
|
|
66
|
+
<Text fg={colors.textDim}>{label}</Text>
|
|
67
|
+
</Box>
|
|
68
|
+
<ExternalLinkText url={url} label={truncateToDisplayWidth(url.replace(/^https?:\/\//, ""), valueWidth)} />
|
|
69
|
+
</Box>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function Gap() {
|
|
74
|
+
return <Box height={1} flexShrink={0} />;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function Muted({ text, width }: { text: string; width: number }) {
|
|
78
|
+
const colors = useThemeColors();
|
|
79
|
+
return <Prose text={text} width={width} color={colors.textDim} figures={false} />;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function Body({ width, children }: { width: number; children: ReactNode }) {
|
|
83
|
+
return <Box flexDirection="column" width={Math.min(width, READING_WIDTH)}>{children}</Box>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** The licence a source's rows come under, as the source asks for it to be shown. */
|
|
87
|
+
function Attribution({ attribution, width }: { attribution: DistressAttribution | null; width: number }) {
|
|
88
|
+
if (!attribution) return null;
|
|
89
|
+
const dataset = [
|
|
90
|
+
attribution.dataset,
|
|
91
|
+
[attribution.version, attribution.year == null ? null : String(attribution.year)].filter(Boolean).join(", "),
|
|
92
|
+
].filter(Boolean).join(" · ");
|
|
93
|
+
return (
|
|
94
|
+
<>
|
|
95
|
+
<Field label="Publisher" value={cellText(attribution.organization)} width={width} />
|
|
96
|
+
{dataset ? <Field label="Dataset" value={cellText(dataset)} width={width} /> : null}
|
|
97
|
+
{attribution.datasetUrls.map((url) => <LinkField key={url} label="" url={url} width={width} />)}
|
|
98
|
+
<Field label="Licence" value={cellText(attribution.licence)} width={width} />
|
|
99
|
+
<LinkField label="" url={attribution.licenceUrl} width={width} />
|
|
100
|
+
<Gap />
|
|
101
|
+
<Muted text={cellText(attribution.notice)} width={width} />
|
|
102
|
+
</>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function FilingDetail({ event, width }: { event: CloudFilingEventPayload; width: number }) {
|
|
107
|
+
const colors = useThemeColors();
|
|
108
|
+
const bodyWidth = Math.min(width, READING_WIDTH);
|
|
109
|
+
const ticker = filingTicker(event);
|
|
110
|
+
const cik = cikLabel(event.company.cik);
|
|
111
|
+
const items = filingItemLines(event);
|
|
112
|
+
const points = event.summary ? plainText(event.summary).split("\n").map((line) => cellText(line)).filter(Boolean) : [];
|
|
113
|
+
return (
|
|
114
|
+
<Body width={width}>
|
|
115
|
+
<Field label="Filed" value={`${filingDate(event)} · ${event.form ?? "8-K"}`} width={bodyWidth} />
|
|
116
|
+
<Field label="Ticker" value={ticker ?? "No trading symbol"} width={bodyWidth} />
|
|
117
|
+
{cik ? <Field label="CIK" value={cik} width={bodyWidth} /> : null}
|
|
118
|
+
{items.map((line, index) => <Field key={line} label={index === 0 ? "Items" : ""} value={line} width={bodyWidth} />)}
|
|
119
|
+
{event.headline ? (
|
|
120
|
+
<>
|
|
121
|
+
<Gap />
|
|
122
|
+
<Prose text={cellText(event.headline)} width={bodyWidth} color={colors.textBright} />
|
|
123
|
+
</>
|
|
124
|
+
) : null}
|
|
125
|
+
{points.length > 0 ? <BulletList items={points} width={bodyWidth} color={colors.text} /> : null}
|
|
126
|
+
<Gap />
|
|
127
|
+
<LinkField label="Filing" url={event.docUrl} width={bodyWidth} />
|
|
128
|
+
<Gap />
|
|
129
|
+
<Muted
|
|
130
|
+
text="Source: SEC EDGAR. The headline and summary are generated from the filing text; the filing is the authoritative record."
|
|
131
|
+
width={bodyWidth}
|
|
132
|
+
/>
|
|
133
|
+
</Body>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function monthName(month: string): string {
|
|
138
|
+
const date = new Date(`${month}-01T00:00:00Z`);
|
|
139
|
+
return /^\d{4}-\d{2}$/.test(month) && Number.isFinite(date.getTime())
|
|
140
|
+
? date.toLocaleString("en-US", { month: "long", year: "numeric", timeZone: "UTC" })
|
|
141
|
+
: month;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function GoingConcernDetail({ row, width }: { row: GoingConcernDisclosure; width: number }) {
|
|
145
|
+
const colors = useThemeColors();
|
|
146
|
+
const bodyWidth = Math.min(width, READING_WIDTH);
|
|
147
|
+
const cik = cikLabel(row.cik);
|
|
148
|
+
const paragraphs = plainText(row.text).split(/\n+/).map((line) => line.trim()).filter(Boolean);
|
|
149
|
+
return (
|
|
150
|
+
<Body width={width}>
|
|
151
|
+
<Field label="Filed" value={`${isoDay(row.filed_at)} · ${row.form}`} width={bodyWidth} />
|
|
152
|
+
<Field label="Period end" value={isoDay(row.period_end)} width={bodyWidth} />
|
|
153
|
+
<Field label="Ticker" value={row.ticker ? cellText(row.ticker) : "No trading symbol"} width={bodyWidth} />
|
|
154
|
+
{cik ? <Field label="CIK" value={cik} width={bodyWidth} /> : null}
|
|
155
|
+
<Field label="Disclosure" value={VERDICT_LABELS[row.verdict]} width={bodyWidth} bright />
|
|
156
|
+
<Field label="Assessed over" value={assessmentHorizonLabel(row.within_one_year)} width={bodyWidth} />
|
|
157
|
+
{row.quote.trim() ? (
|
|
158
|
+
<>
|
|
159
|
+
<Gap />
|
|
160
|
+
<Prose text={`"${cellText(row.quote)}"`} width={bodyWidth} color={colors.textBright} figures={false} />
|
|
161
|
+
</>
|
|
162
|
+
) : null}
|
|
163
|
+
{/* A summary that only wraps the quote says nothing new. */}
|
|
164
|
+
{row.summary.trim() && !cellText(row.summary).includes(cellText(row.quote)) ? (
|
|
165
|
+
<>
|
|
166
|
+
<Gap />
|
|
167
|
+
<Prose text={cellText(row.summary)} width={bodyWidth} color={colors.text} figures={false} />
|
|
168
|
+
</>
|
|
169
|
+
) : null}
|
|
170
|
+
{paragraphs.length > 0 ? <Gap /> : null}
|
|
171
|
+
{paragraphs.map((paragraph, index) => (
|
|
172
|
+
<Box key={index} flexDirection="column" flexShrink={0}>
|
|
173
|
+
{index > 0 ? <Gap /> : null}
|
|
174
|
+
<Prose text={cellText(paragraph)} width={bodyWidth} color={colors.textMuted} figures={false} />
|
|
175
|
+
</Box>
|
|
176
|
+
))}
|
|
177
|
+
{row.text_truncated ? <Muted text="The note continues in the filing." width={bodyWidth} /> : null}
|
|
178
|
+
<Gap />
|
|
179
|
+
<LinkField label="Filing" url={row.filing_url} width={bodyWidth} />
|
|
180
|
+
<Gap />
|
|
181
|
+
<Muted
|
|
182
|
+
text={`Source: SEC Financial Statement and Notes data set, ${monthName(row.dataset_month)}, XBRL element ${cellText(row.tag)}. The disclosure reading and summary are generated from the note text; the filing is the authoritative record.`}
|
|
183
|
+
width={bodyWidth}
|
|
184
|
+
/>
|
|
185
|
+
</Body>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function DesignationDetail({ row, width, attributions }: { row: DistressDesignation; width: number; attributions: DistressAttribution[] }) {
|
|
190
|
+
const bodyWidth = Math.min(width, READING_WIDTH);
|
|
191
|
+
const official = row.date_basis !== "first_observed";
|
|
192
|
+
const remarks = designationRemarks(row.remarks);
|
|
193
|
+
return (
|
|
194
|
+
<Body width={width}>
|
|
195
|
+
<Field label="Status" value={designationKindLabel(row.kind)} width={bodyWidth} bright />
|
|
196
|
+
<Field
|
|
197
|
+
label={DATE_BASIS_LABELS[row.date_basis]}
|
|
198
|
+
value={official ? designationDate(row) : `${designationDate(row)}, the exchange's list gives no designation date`}
|
|
199
|
+
width={bodyWidth}
|
|
200
|
+
/>
|
|
201
|
+
<Field label="Exchange" value={exchangeLabel(row.exchange)} width={bodyWidth} />
|
|
202
|
+
<Field label="Code" value={row.local_code} width={bodyWidth} />
|
|
203
|
+
{row.symbol ? <Field label="Symbol" value={row.symbol} width={bodyWidth} /> : null}
|
|
204
|
+
<Field label="Name" value={cellText(row.entity_name)} width={bodyWidth} />
|
|
205
|
+
{row.entity_name_en ? <Field label="English name" value={cellText(row.entity_name_en)} width={bodyWidth} /> : null}
|
|
206
|
+
<Field label="On list as of" value={isoDay(row.last_seen_at)} width={bodyWidth} />
|
|
207
|
+
{row.ended_at ? <Field label="Removed" value={`${isoDay(row.ended_at)}, no longer on the exchange's list`} width={bodyWidth} /> : null}
|
|
208
|
+
{remarks.map((line, index) => <Field key={line} label={index === 0 ? "Remarks" : ""} value={line} width={bodyWidth} />)}
|
|
209
|
+
<Gap />
|
|
210
|
+
{row.notice_url ? <LinkField label="Notice" url={row.notice_url} width={bodyWidth} /> : null}
|
|
211
|
+
<LinkField label="List" url={row.source_url} width={bodyWidth} />
|
|
212
|
+
<Gap />
|
|
213
|
+
<Attribution attribution={attributions.find((entry) => entry.source === row.source) ?? null} width={bodyWidth} />
|
|
214
|
+
</Body>
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function InsolvencyDetail({ row, width, attributions }: { row: InsolvencyNotice; width: number; attributions: DistressAttribution[] }) {
|
|
219
|
+
const bodyWidth = Math.min(width, READING_WIDTH);
|
|
220
|
+
const france = row.country === "FR";
|
|
221
|
+
return (
|
|
222
|
+
<Body width={width}>
|
|
223
|
+
<Field label="Procedure" value={insolvencyKindLabel(row.kind)} width={bodyWidth} bright />
|
|
224
|
+
<Field label="Notice" value={insolvencyNoticeLabel(row)} width={bodyWidth} />
|
|
225
|
+
{!france && row.raw_code.trim() ? <Field label="Notice code" value={cellText(row.raw_code)} width={bodyWidth} /> : null}
|
|
226
|
+
<Field label={france ? "Judgment date" : "Procedure date"} value={isoDay(row.notice_date)} width={bodyWidth} />
|
|
227
|
+
<Field label="Published" value={isoDay(row.published_date)} width={bodyWidth} />
|
|
228
|
+
{row.court.trim() ? <Field label="Court" value={cellText(row.court)} width={bodyWidth} /> : null}
|
|
229
|
+
<Field label={registryLabel(row.country)} value={row.registry_id} width={bodyWidth} />
|
|
230
|
+
<Field label="Country" value={france ? "France" : row.country === "GB" ? "United Kingdom" : row.country} width={bodyWidth} />
|
|
231
|
+
{/* A correction says which notice it corrects; an initial notice needs no line. */}
|
|
232
|
+
{row.notice_type !== "annonce" ? (
|
|
233
|
+
<Field
|
|
234
|
+
label="Correction"
|
|
235
|
+
value={row.original_notice_id ? `${noticeTypeLabel(row.notice_type)} of ${row.original_notice_id}` : noticeTypeLabel(row.notice_type)}
|
|
236
|
+
width={bodyWidth}
|
|
237
|
+
/>
|
|
238
|
+
) : null}
|
|
239
|
+
<Field label="Status" value={noticeStatusLabel(row.status)} width={bodyWidth} />
|
|
240
|
+
<Field label="Notice ID" value={row.notice_id} width={bodyWidth} />
|
|
241
|
+
<Gap />
|
|
242
|
+
<LinkField label="Notice page" url={row.notice_url} width={bodyWidth} />
|
|
243
|
+
<Gap />
|
|
244
|
+
<Attribution attribution={attributions.find((entry) => entry.source === row.source) ?? null} width={bodyWidth} />
|
|
245
|
+
</Body>
|
|
246
|
+
);
|
|
247
|
+
}
|