import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; import commonModule from '@epochlab/epoch-protos/common'; import tearsheetModule from '@epochlab/epoch-protos/tearsheet'; import chartModule from '@epochlab/epoch-protos/chart_def'; import tableModule from '@epochlab/epoch-protos/table_def'; import HighchartsReact from 'highcharts-react-official'; import Highcharts from 'highcharts/highstock'; type Scalar = commonModule.epoch_proto.IScalar; type CardData = tableModule.epoch_proto.ICardData; type CardDef = tableModule.epoch_proto.ICardDef; type LinesDef = chartModule.epoch_proto.ILinesDef; type NumericPoint = chartModule.epoch_proto.INumericPoint; type NumericLine = chartModule.epoch_proto.INumericLine; type NumericLinesDef = chartModule.epoch_proto.INumericLinesDef; type HeatMapPoint = chartModule.epoch_proto.IHeatMapPoint; type HeatMapDef = chartModule.epoch_proto.IHeatMapDef; type ProtoArray = chartModule.epoch_proto.IArray; type BarDef = chartModule.epoch_proto.IBarDef; type AreaDef = chartModule.epoch_proto.IAreaDef; type HistogramDef = chartModule.epoch_proto.IHistogramDef; type BoxPlotDataPoint = chartModule.epoch_proto.IBoxPlotDataPoint; type BoxPlotOutlier = chartModule.epoch_proto.IBoxPlotOutlier; type BoxPlotDef = chartModule.epoch_proto.IBoxPlotDef; type XRangePoint = chartModule.epoch_proto.IXRangePoint; type XRangeDef = chartModule.epoch_proto.IXRangeDef; type PieDef = chartModule.epoch_proto.IPieDef; type Chart = chartModule.epoch_proto.IChart; type TearSheet = tearsheetModule.epoch_proto.ITearSheet; type Table = tearsheetModule.epoch_proto.ITable; declare const TearSheetClass: typeof tearsheetModule.epoch_proto.TearSheet; declare const EpochFolioType: typeof commonModule.epoch_proto.EpochFolioType; type EpochFolioType = commonModule.epoch_proto.EpochFolioType; declare const EpochFolioDashboardWidget: typeof commonModule.epoch_proto.EpochFolioDashboardWidget; type EpochFolioDashboardWidget = commonModule.epoch_proto.EpochFolioDashboardWidget; declare const AxisType: typeof commonModule.epoch_proto.AxisType; type AxisType = commonModule.epoch_proto.AxisType; declare const DashStyle: typeof commonModule.epoch_proto.DashStyle; type DashStyle = commonModule.epoch_proto.DashStyle; declare const StackType: typeof chartModule.epoch_proto.StackType; type StackType = chartModule.epoch_proto.StackType; declare const DASHBOARD_LAYOUTS: { id: string; title: string; icon: react_jsx_runtime.JSX.Element; value: string; gridClass: string; }[]; type ViewMode$2 = 'tabs' | 'unified'; interface TearsheetDashboardProps { tearsheet: TearSheet; className?: string; hideLayoutControls?: boolean; onCategoryChange?: (category: string) => void; onLayoutChange?: (layout: string) => void; onViewModeChange?: (viewMode: ViewMode$2) => void; defaultViewMode?: ViewMode$2; debug?: boolean; rightControls?: React.ReactNode; highLevelCategory?: string; } declare const TearsheetDashboard: React.FC; type ViewMode$1 = 'tabs' | 'unified'; interface DashboardContainerProps { campaignId: string; userId?: string; apiEndpoint: string; showHeader?: boolean; className?: string; hideLayoutControls?: boolean; defaultViewMode?: ViewMode$1; rightControls?: React.ReactNode; } declare function DashboardContainer(props: DashboardContainerProps): react_jsx_runtime.JSX.Element; type DashboardView = 'dashboard' | 'charts'; type ViewMode = 'tabs' | 'unified'; interface UnifiedDashboardContainerProps { campaignId: string; userId?: string; apiEndpoint: string; defaultView?: DashboardView; defaultViewMode?: ViewMode; className?: string; hideLayoutControls?: boolean; } declare function UnifiedDashboardContainer(props: UnifiedDashboardContainerProps): react_jsx_runtime.JSX.Element; /** * Download tearsheet data as a proto file * @param tearsheet - The tearsheet data to download * @param format - The format to download (only 'proto' supported) * @param filename - The filename without extension */ declare function downloadTearsheet(tearsheet: TearSheet, format?: 'proto', filename?: string): void; /** * Read tearsheet data from a proto file * @param file - The file to read * @returns Promise resolving to the tearsheet data */ declare function readTearsheetFile(file: File): Promise; interface CategoryData { id: string; label: string; charts: Chart[]; cards: CardDef[]; tables: Table[]; } /** * Extract unique categories from tearsheet data */ declare function extractCategories(tearsheet: TearSheet): string[]; /** * Group tearsheet data by categories */ declare function groupByCategory(tearsheet: TearSheet): Map; /** * Filter tearsheet data by category */ declare function filterByCategory(tearsheet: TearSheet, category: string): { charts: Chart[]; cards: CardDef[]; tables: Table[]; }; /** * Convert category string to display-friendly label */ declare function formatCategoryLabel(category: string): string; /** * Get chart title from Chart proto */ declare function getChartTitle(chart: Chart): string; /** * Get chart ID from Chart proto */ declare function getChartId(chart: Chart): string; /** * Create a mock tearsheet with categorized data */ declare function createMockTearsheet(strategyId?: string): TearSheet; /** * Create a minimal mock tearsheet for testing */ declare function createMinimalTearsheet(): TearSheet; declare const getScalarValue: (scalar: Scalar | undefined | null) => any; declare const getScalarNumericValue: (scalar: Scalar | undefined | null, defaultValue?: number) => number; declare const getScalarStringValue: (scalar: Scalar | undefined | null, defaultValue?: string) => string; declare const getScalarDatetimeValue: (scalar: Scalar | undefined | null, defaultValue?: number) => number; declare const formatScalarByType: (scalar: Scalar | undefined | null, type: EpochFolioType) => string; declare enum DashboardLayout { COLUMNS_3 = "columns_3", COLUMNS_2 = "columns_2", GRID_2X2 = "columns_2x2", SINGLE = "single" } interface DashboardProps { data: any; category?: string; layout?: DashboardLayout; className?: string; onCategoryChange?: (category: string) => void; } interface CategoryContentProps { data: any; layout?: DashboardLayout; className?: string; } interface DashboardTheme { colors: { primary: string; secondary: string; background: string; surface: string; text: string; textSecondary: string; border: string; error: string; success: string; warning: string; }; spacing: { xs: string; sm: string; md: string; lg: string; xl: string; }; typography: { fontFamily: string; fontSize: { xs: string; sm: string; md: string; lg: string; xl: string; }; fontWeight: { normal: number; medium: number; semibold: number; bold: number; }; }; borderRadius: { sm: string; md: string; lg: string; }; } interface ChartOptions { height?: number | string; width?: number | string; responsive?: boolean; animation?: boolean; } interface TableOptions { sortable?: boolean; paginated?: boolean; pageSize?: number; striped?: boolean; } interface CardOptions { variant?: 'default' | 'compact' | 'detailed'; showTrend?: boolean; } interface LineChartProps { data: LinesDef; height?: number; className?: string; enableTooltip?: boolean; } declare const LineChart: React.FC; interface NumericLineChartProps { data: NumericLinesDef; height?: number; className?: string; enableTooltip?: boolean; } declare const NumericLineChart: React.FC; interface BarChartProps { data: BarDef; height?: number; className?: string; enableTooltip?: boolean; } declare const BarChart: React.FC; interface AreaChartProps { data: AreaDef; height?: number; className?: string; enableTooltip?: boolean; } declare const AreaChart: React.FC; interface PieChartProps { data: PieDef; height?: number; className?: string; enableTooltip?: boolean; } declare const PieChart: React.FC; interface HeatMapProps { data: HeatMapDef; height?: number; className?: string; } declare const HeatMap: React.FC; interface BoxPlotProps { data: BoxPlotDef; height?: number; className?: string; enableTooltip?: boolean; } declare const BoxPlot: React.FC; interface HistogramProps { data: HistogramDef; height?: number; className?: string; zoomType?: 'x' | 'y' | 'xy' | false; enablePanning?: boolean; enableTooltip?: boolean; } declare const Histogram: React.FC; interface XRangeChartProps { data: XRangeDef; height?: number; className?: string; zoomType?: 'x' | 'y' | 'xy' | false; enablePanning?: boolean; enableTooltip?: boolean; } declare const XRangeChart: React.FC; interface TearsheetTableProps { table: Table; } declare const TearsheetTable: React.FC; interface CardProps { cardDef: CardDef; className?: string; } declare const Card: React.FC; interface TearsheetCategoryContentProps { categoryData: CategoryData; layout: string; debug?: boolean; } declare const _default: React.NamedExoticComponent; interface UnifiedCategoryViewProps { categories: Array<{ id: string; label: string; value: string; data: CategoryData; }>; layout: string; debug?: boolean; } declare const UnifiedCategoryView: React.FC; declare enum ChartDataSeriesType { DEFAULT = 0, STRATEGY = 1, BENCHMARK = 2, LONG = 3, SHORT = 4, CASH = 5 } declare const SERIES_NAME_MAPPING: { [key: string]: ChartDataSeriesType; }; declare const CHART_COLOR_CONFIG: { 1: { default: string; area: string; line: string; marker: string; }; 2: { default: string; area: string; line: string; marker: string; }; 3: { default: string; area: string; line: string; marker: string; }; 4: { default: string; area: string; line: string; marker: string; }; 5: { default: string; area: string; line: string; marker: string; }; 0: { default: string; area: string; line: string; marker: string; }; }; declare const HEATMAP_CHART_COLOR_CONFIG: (string | number)[][]; declare const PIE_CHART_COLOR_PALETTE: string[]; declare const BOXPLOT_COLOR_CONFIG: { fillColor: string; lineColor: string; whiskerColor: string; stemColor: string; medianColor: string; }; declare const HISTOGRAM_COLOR_CONFIG: { primary: string; secondary: string; border: string; }; declare const XRANGE_COLOR_PALETTE: string[]; declare const DASHBOARD_THEME: { background: { primary: string; secondary: string; tertiary: string; card: string; hover: string; }; text: { primary: string; secondary: string; tertiary: string; disabled: string; }; border: { primary: string; secondary: string; focus: string; }; status: { success: string; warning: string; error: string; info: string; }; position: { long: string; short: string; }; gradient: { primary: string; secondary: string; overlay: string; }; gridLine: string; tooltip: { background: string; text: string; }; }; declare function applyHighchartsTheme(options: any): any; declare function createThemedChartOptions(baseOptions: any): any; declare const defaultTheme: DashboardTheme; declare enum AssetClasses { STOCKS = "Stocks", FUTURES = "Futures", CRYPTO = "Crypto", FX = "FX" } interface IAsset { id: string; name: string; ticker: string; asset_class: AssetClasses; exchange: string; currency: string; industry: string; sector: string; multiplier: number; min_tick: number; category: string; eod_start: string; eod_end: string; expiry_months: string; } type GetAssetsResponseType = IAsset[]; type GetFuturesContinuationResponseType = Array<{ id: string; name: string; ticker?: string; }>; declare enum TRADE_RESULT { WIN = "WIN", LOSS = "LOSS", OPEN = "OPEN", BREAK_EVEN = "BREAK EVEN" } declare enum TRADE_POSITION { LONG = "Long", SHORT = "Short" } declare enum PLOT_KIND { LINE = "line", CANDLESTICK = "candlestick", COLUMN = "column", PANEL_LINE = "panel_line", PANEL_LINE_PERCENT = "panel_line_percent", RSI = "rsi", CCI = "cci", AROON = "aroon", FISHER = "fisher", QQE = "qqe", ELDERS = "elders", FOSC = "fosc", STOCH = "stoch", ATR = "atr", AO = "ao", QSTICK = "qstick", BBANDS = "bbands", BB_PERCENT_B = "bb_percent_b", MACD = "macd", VORTEX = "vortex", ICHIMOKU = "ichimoku", CHANDE_KROLL_STOP = "chande_kroll_stop", PSAR = "psar", FLAG = "flag", TRADE_SIGNAL = "trade_signal", SHL = "shl", BOS_CHOCH = "bos_choch", ORDER_BLOCKS = "order_blocks", FVG = "fvg", LIQUIDITY = "liquidity", GAP = "gap", SESSIONS = "sessions", PREVIOUS_HIGH_LOW = "previous_high_low", RETRACEMENTS = "retracements", H_LINE = "h_line", VWAP = "vwap", EXIT_LEVELS = "exit_levels", POSITION = "position", PIVOT_POINT_SR = "pivot_point_sr", PIVOT_POINT_DETECTOR = "pivot_point_detector", CLOSE_LINE = "close_line", HMM = "hmm", SENTIMENT = "sentiment", ZONE = "zone", FLAG_PATTERN = "flag_pattern", PENNANT_PATTERN = "pennant_pattern", TRIANGLE_PATTERNS = "triangle_patterns", CONSOLIDATION_BOX = "consolidation_box", DOUBLE_TOP_BOTTOM = "double_top_bottom", HEAD_AND_SHOULDERS = "head_and_shoulders", INVERSE_HEAD_AND_SHOULDERS = "inverse_head_and_shoulders" } interface SeriesConfig { id: string; type: PLOT_KIND; name: string; dataMapping: { index: string; [key: string]: string; }; zIndex: number; yAxis: number; linkedTo?: string; configOptions?: Record; } interface ChartInfoType { yAxis: { top: number; height: number; }[]; series: SeriesConfig[]; } type TradeAnalyticsMetadataChartInfoType = Record; interface TimeframeInfo { timeframe: string; absolute_start_ms: number; absolute_end_ms: number; total_bars: number; } interface TradeAnalyticsMetadataAssetInfoType { asset: IAsset; start_date: string; end_date: string; timeframes: TimeframeInfo[]; } interface GetTradeAnalyticsMetadataResponseType { asset_info: Record; chart_info?: TradeAnalyticsMetadataChartInfoType; } interface IRoundTrip { asset: string; asset_id: string; asset_root_id: string; avg_entry_price: number; avg_exit_price: number; close_datetime?: string; cost: number; duration: number; entry_cost: number; entry_trade_sizes: number; exit_cost: number; exit_trade_sizes: number; highest_price: number; index: number; lowest_price: number; net_return: number; open_datetime: string; opening_price: number; closing_price: number; position: number; return_nominal: number; return_percent: number; return_size: number; side: TRADE_POSITION; size: number; status: TRADE_RESULT; stop_loss: number | null; take_profit: number | null; total_commissions: number | null; } interface GetTradeAnalyticsRoundTripsResponseType { items: Array; page: number; total: number; } interface TradeAnalyticsChartRendererProps extends Highcharts.Options { isLoading?: boolean; tradeAnalyticsMetadata?: GetTradeAnalyticsMetadataResponseType; selectedRoundTrips?: IRoundTrip[]; campaignId: string; assetId: string; fetchEntireCandleStickData?: boolean; paddingProfile?: 'MINIMAL' | 'CONSERVATIVE' | 'STANDARD' | 'AGGRESSIVE'; wheelZoomMode?: 'default' | 'cursor'; isFullScreen?: boolean; timeframe?: string; chartRef?: React.RefObject; onRangeExpansionNeeded?: (range: { from: number; to: number; }) => void; expansionRange?: { from: number; to: number; } | null; isLazyLoading?: boolean; apiEndpoint?: string; userId?: string; sidebarWidth?: number; isAssetSwitching?: boolean; initialDisplayBars?: number; onIndicatorVisibilityChange?: (visibility: { visibilityState: Record; onToggleIndicator: (seriesId: string) => boolean; getVisibleCount: () => { visible: number; total: number; }; canShowMore: () => boolean; }) => void; } declare const TradeAnalyticsChartRenderer: ({ isLoading, tradeAnalyticsMetadata, selectedRoundTrips, assetId, campaignId, fetchEntireCandleStickData, paddingProfile, wheelZoomMode, timeframe, chartRef: externalChartRef, onRangeExpansionNeeded, expansionRange, apiEndpoint, userId, sidebarWidth, isAssetSwitching, initialDisplayBars, onIndicatorVisibilityChange, }: TradeAnalyticsChartRendererProps) => react_jsx_runtime.JSX.Element; interface TradeAnalyticsContainerProps { campaignId: string; userId?: string; apiEndpoint: string; showHeader?: boolean; className?: string; rightControls?: React.ReactNode; } declare function TradeAnalyticsContainer(props: TradeAnalyticsContainerProps): react_jsx_runtime.JSX.Element; interface RenderTradePositionBadgeProps { tradePosition: TRADE_POSITION; } declare const RenderTradePositionBadge: ({ tradePosition }: RenderTradePositionBadgeProps) => react_jsx_runtime.JSX.Element; interface RenderTradeResultBadgeProps { tradeResult: TRADE_RESULT; } declare const RenderTradePositionResult: ({ tradeResult }: RenderTradeResultBadgeProps) => react_jsx_runtime.JSX.Element; declare const getTradeAnalyticsPlotKindColorPalette: () => string[]; declare const TRADE_ANALYTICS_PLOT_KIND_COLOR_PALETTE: string[]; declare const getTradeAnalyticsPlotStyles: () => { flag: { shape: "squarepin"; width: number; fillColor: string; color: string; lineWidth: number; textColor: string; hoverColor: string; }; }; declare const TRADE_ANALYTICS_PLOT_STYLES: { flag: { shape: "squarepin"; width: number; fillColor: string; color: string; lineWidth: number; textColor: string; hoverColor: string; }; }; declare const tailwindColors: { readonly primary: { readonly white: "#FFFFFF"; readonly bluishDarkGray: "#1a1f2e"; }; readonly secondary: { readonly red: "#dc2626"; readonly cementGrey: "#9ca3af"; readonly ashGrey: "#6b7280"; readonly mildCementGrey: "#374151"; readonly yellow: "#eab308"; readonly purple: "#9333ea"; }; readonly territory: { readonly success: "#16a34a"; readonly warning: "#ca8a04"; readonly cyan: "#06b6d4"; readonly alert: "#dc2626"; readonly blue: "#3b82f6"; }; }; declare const tailwindTypography: { readonly desktopL14Regular: { readonly css: { readonly fontSize: "14px"; readonly lineHeight: "20px"; readonly fontWeight: "400"; }; }; readonly dashboardL12Regular: { readonly css: { readonly fontSize: "12px"; readonly lineHeight: "16px"; readonly fontWeight: "400"; }; }; readonly dashboardP14Regular: { readonly css: { readonly fontSize: "14px"; readonly lineHeight: "20px"; readonly fontWeight: "400"; }; }; }; declare const formatDollarAmount: (amount: number, options?: Intl.NumberFormatOptions) => string; export { AreaChart, AssetClasses, AxisType, BOXPLOT_COLOR_CONFIG, BarChart, BoxPlot, CHART_COLOR_CONFIG, Card, ChartDataSeriesType, DASHBOARD_LAYOUTS, DASHBOARD_THEME, DashStyle, DashboardContainer, DashboardLayout, EpochFolioDashboardWidget, EpochFolioType, HEATMAP_CHART_COLOR_CONFIG, HISTOGRAM_COLOR_CONFIG, HeatMap, Histogram, LineChart, NumericLineChart, PIE_CHART_COLOR_PALETTE, PLOT_KIND, PieChart, RenderTradePositionBadge, RenderTradePositionResult as RenderTradeResultBadge, SERIES_NAME_MAPPING, StackType, TRADE_ANALYTICS_PLOT_KIND_COLOR_PALETTE, TRADE_ANALYTICS_PLOT_STYLES, TRADE_POSITION, TRADE_RESULT, TearSheetClass, _default as TearsheetCategoryContent, TearsheetDashboard, TearsheetTable, TradeAnalyticsChartRenderer, TradeAnalyticsContainer, UnifiedCategoryView, UnifiedDashboardContainer, XRANGE_COLOR_PALETTE, XRangeChart, applyHighchartsTheme, createMinimalTearsheet, createMockTearsheet, createThemedChartOptions, defaultTheme, downloadTearsheet, extractCategories, filterByCategory, formatCategoryLabel, formatDollarAmount, formatScalarByType, getChartId, getChartTitle, getScalarDatetimeValue, getScalarNumericValue, getScalarStringValue, getScalarValue, getTradeAnalyticsPlotKindColorPalette, getTradeAnalyticsPlotStyles, groupByCategory, readTearsheetFile, tailwindColors, tailwindTypography }; export type { AreaDef, BarDef, BoxPlotDataPoint, BoxPlotDef, BoxPlotOutlier, CardData, CardDef, CardOptions, CategoryContentProps, Chart, ChartInfoType, ChartOptions, DashboardContainerProps, DashboardProps, DashboardTheme, DashboardView, GetAssetsResponseType, GetFuturesContinuationResponseType, GetTradeAnalyticsMetadataResponseType, GetTradeAnalyticsRoundTripsResponseType, HeatMapDef, HeatMapPoint, HistogramDef, IAsset, IRoundTrip, LinesDef, NumericLine, NumericLinesDef, NumericPoint, PieDef, ProtoArray, Scalar, SeriesConfig, Table, TableOptions, TearSheet, TimeframeInfo, TradeAnalyticsContainerProps, TradeAnalyticsMetadataAssetInfoType, TradeAnalyticsMetadataChartInfoType, UnifiedDashboardContainerProps, ViewMode$2 as ViewMode, XRangeDef, XRangePoint };