react-open-source-grid 1.5.3 → 1.5.4

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.
Files changed (89) hide show
  1. package/dist/lib/App.d.ts +3 -0
  2. package/dist/lib/chunk-FG3FLQAE.js +296 -0
  3. package/dist/lib/components/AccessibilityDemo.d.ts +8 -0
  4. package/dist/lib/components/ApiReferencePage.d.ts +2 -0
  5. package/dist/lib/components/BenchmarkDemo.d.ts +2 -0
  6. package/dist/lib/components/CellRenderersDemo.d.ts +16 -0
  7. package/dist/lib/components/CodeBlock.d.ts +10 -0
  8. package/dist/lib/components/ColumnFiltersDemo.d.ts +5 -0
  9. package/dist/lib/components/CompleteApiReferencePage.d.ts +2 -0
  10. package/dist/lib/components/ContextMenuDemo.d.ts +12 -0
  11. package/dist/lib/components/DataGrid/ARCHITECTURE.md.d.ts +288 -0
  12. package/dist/lib/components/DataGrid/AdvancedFilterBuilder.d.ts +12 -0
  13. package/dist/lib/components/DataGrid/CellRenderers.d.ts +64 -0
  14. package/dist/lib/components/DataGrid/ColumnChooser.d.ts +12 -0
  15. package/dist/lib/components/DataGrid/ColumnFilters.d.ts +16 -0
  16. package/dist/lib/components/DataGrid/ContextMenu.d.ts +10 -0
  17. package/dist/lib/components/DataGrid/DataGrid.d.ts +22 -0
  18. package/dist/lib/components/DataGrid/DensityToggle.d.ts +23 -0
  19. package/dist/lib/components/DataGrid/DragHandle.d.ts +7 -0
  20. package/dist/lib/components/DataGrid/DraggableRow.d.ts +14 -0
  21. package/dist/lib/components/DataGrid/ExportMenu.d.ts +12 -0
  22. package/dist/lib/components/DataGrid/FacetedSearch.d.ts +29 -0
  23. package/dist/lib/components/DataGrid/FilteredSearchBar.d.ts +36 -0
  24. package/dist/lib/components/DataGrid/FocusTrap.d.ts +12 -0
  25. package/dist/lib/components/DataGrid/GridApiDemo.d.ts +6 -0
  26. package/dist/lib/components/DataGrid/GridBody.d.ts +42 -0
  27. package/dist/lib/components/DataGrid/GridFooter.d.ts +18 -0
  28. package/dist/lib/components/DataGrid/GridHeader.d.ts +18 -0
  29. package/dist/lib/components/DataGrid/GridPagination.d.ts +10 -0
  30. package/dist/lib/components/DataGrid/GroupByPanel.d.ts +9 -0
  31. package/dist/lib/components/DataGrid/GroupRow.d.ts +31 -0
  32. package/dist/lib/components/DataGrid/InfiniteScrollDataGrid.d.ts +39 -0
  33. package/dist/lib/components/DataGrid/LayoutPresetsManager.d.ts +11 -0
  34. package/dist/lib/components/DataGrid/MarketDataEngine.d.ts +165 -0
  35. package/dist/lib/components/DataGrid/MarketDataGrid.d.ts +33 -0
  36. package/dist/lib/components/DataGrid/MarketDataGridUtils.d.ts +13 -0
  37. package/dist/lib/components/DataGrid/ScreenReaderAnnouncer.d.ts +8 -0
  38. package/dist/lib/components/DataGrid/ServerSideDataSource.d.ts +136 -0
  39. package/dist/lib/components/DataGrid/ThemeSelector.d.ts +12 -0
  40. package/dist/lib/components/DataGrid/Tooltip.d.ts +15 -0
  41. package/dist/lib/components/DataGrid/TreeRow.d.ts +31 -0
  42. package/dist/lib/components/DataGrid/VirtualScroller.d.ts +35 -0
  43. package/dist/lib/components/DataGrid/WebSocketMockFeed.d.ts +121 -0
  44. package/dist/lib/components/DataGrid/aggregationUtils.d.ts +25 -0
  45. package/dist/lib/components/DataGrid/contextMenuUtils.d.ts +36 -0
  46. package/dist/lib/components/DataGrid/demos/TooltipDemo.d.ts +1 -0
  47. package/dist/lib/components/DataGrid/densityModes.d.ts +42 -0
  48. package/dist/lib/components/DataGrid/dragRowUtils.d.ts +98 -0
  49. package/dist/lib/components/DataGrid/exportUtils.d.ts +30 -0
  50. package/dist/lib/components/DataGrid/filterUtils.d.ts +17 -0
  51. package/dist/lib/components/DataGrid/gridApi.d.ts +142 -0
  52. package/dist/lib/components/DataGrid/gridApi.types.d.ts +348 -0
  53. package/dist/lib/components/DataGrid/gridReducer.d.ts +4 -0
  54. package/dist/lib/components/DataGrid/groupingUtils.d.ts +17 -0
  55. package/dist/lib/components/DataGrid/index.d.ts +41 -0
  56. package/dist/lib/components/DataGrid/layoutPersistence.d.ts +95 -0
  57. package/dist/lib/components/DataGrid/themes.d.ts +113 -0
  58. package/dist/lib/components/DataGrid/treeDataUtils.d.ts +97 -0
  59. package/dist/lib/components/DataGrid/types.d.ts +536 -0
  60. package/dist/lib/components/DataGrid/useContextMenu.d.ts +31 -0
  61. package/dist/lib/components/DataGrid/useDensityMode.d.ts +36 -0
  62. package/dist/lib/components/DataGrid/useFocusTrap.d.ts +14 -0
  63. package/dist/lib/components/DataGrid/useMarketData.d.ts +57 -0
  64. package/dist/lib/components/DataGrid/useScreenReaderAnnouncements.d.ts +23 -0
  65. package/dist/lib/components/DataGrid/useTooltip.d.ts +21 -0
  66. package/dist/lib/components/DemoGridPage.d.ts +2 -0
  67. package/dist/lib/components/DensityModeDemo.d.ts +12 -0
  68. package/dist/lib/components/FacetedSearchDemo.d.ts +8 -0
  69. package/dist/lib/components/FeatureGallery.d.ts +2 -0
  70. package/dist/lib/components/FilteredSearchDemo.d.ts +7 -0
  71. package/dist/lib/components/GridApiDemoPage.d.ts +2 -0
  72. package/dist/lib/components/HomePage.d.ts +1 -0
  73. package/dist/lib/components/InfiniteScrollDemo.d.ts +13 -0
  74. package/dist/lib/components/LayoutPersistenceDemo.d.ts +2 -0
  75. package/dist/lib/components/LiveMarketDemo.d.ts +18 -0
  76. package/dist/lib/components/MarketDataExamples.d.ts +42 -0
  77. package/dist/lib/components/RowDraggingDemo.d.ts +3 -0
  78. package/dist/lib/components/RowPinningDemo.d.ts +12 -0
  79. package/dist/lib/components/ThemesDemo.d.ts +17 -0
  80. package/dist/lib/components/TooltipDemo.d.ts +1 -0
  81. package/dist/lib/components/TreeDataDemo.d.ts +3 -0
  82. package/dist/lib/components/VirtualScrollDemo.d.ts +13 -0
  83. package/dist/lib/index.cjs +12233 -0
  84. package/dist/lib/index.css +465 -0
  85. package/dist/lib/index.d.ts +1 -0
  86. package/dist/lib/index.js +11827 -0
  87. package/dist/lib/layoutPersistence-2MPTAEYI.js +20 -0
  88. package/dist/lib/main.d.ts +1 -0
  89. package/package.json +2 -2
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ /**
3
+ * Cell Renderer Components
4
+ *
5
+ * Reusable custom cell renderer components for common use cases:
6
+ * - StatusChip: Badge component for status indicators
7
+ * - ProgressBar: Visual progress bar
8
+ * - IconCell: Cell with icon
9
+ * - ImageCell: Cell with image
10
+ * - ButtonCell: Actionable button in cell
11
+ * - BadgeCell: Generic badge component
12
+ */
13
+ interface StatusChipProps {
14
+ status: string;
15
+ }
16
+ export declare const StatusChip: React.FC<StatusChipProps>;
17
+ interface ProgressBarProps {
18
+ value: number;
19
+ color?: string;
20
+ showLabel?: boolean;
21
+ }
22
+ export declare const ProgressBar: React.FC<ProgressBarProps>;
23
+ interface IconCellProps {
24
+ icon: string;
25
+ text?: string;
26
+ iconColor?: string;
27
+ }
28
+ export declare const IconCell: React.FC<IconCellProps>;
29
+ interface ImageCellProps {
30
+ src: string;
31
+ alt: string;
32
+ text?: string;
33
+ size?: number;
34
+ }
35
+ export declare const ImageCell: React.FC<ImageCellProps>;
36
+ interface ButtonCellProps {
37
+ label: string;
38
+ onClick: (e: React.MouseEvent) => void;
39
+ variant?: 'primary' | 'secondary' | 'danger';
40
+ disabled?: boolean;
41
+ }
42
+ export declare const ButtonCell: React.FC<ButtonCellProps>;
43
+ interface BadgeCellProps {
44
+ text: string;
45
+ color?: string;
46
+ backgroundColor?: string;
47
+ }
48
+ export declare const BadgeCell: React.FC<BadgeCellProps>;
49
+ interface PriorityIndicatorProps {
50
+ priority: 'low' | 'medium' | 'high' | 'critical';
51
+ }
52
+ export declare const PriorityIndicator: React.FC<PriorityIndicatorProps>;
53
+ interface RatingProps {
54
+ rating: number;
55
+ maxRating?: number;
56
+ }
57
+ export declare const Rating: React.FC<RatingProps>;
58
+ interface CurrencyCellProps {
59
+ amount: number;
60
+ currency?: string;
61
+ locale?: string;
62
+ }
63
+ export declare const CurrencyCell: React.FC<CurrencyCellProps>;
64
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { Column } from './types';
3
+ interface ColumnChooserProps {
4
+ columns: Column[];
5
+ columnOrder: string[];
6
+ hiddenColumns: string[];
7
+ onToggleVisibility: (field: string) => void;
8
+ onReorderColumns: (fromIndex: number, toIndex: number) => void;
9
+ onResetLayout: () => void;
10
+ }
11
+ export declare const ColumnChooser: React.FC<ColumnChooserProps>;
12
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { Column, FilterConfig, GridAction, Row } from './types';
3
+ interface ColumnFiltersProps {
4
+ columns: Column[];
5
+ displayColumnOrder: string[];
6
+ columnWidths: {
7
+ [field: string]: number;
8
+ };
9
+ filterConfig: FilterConfig;
10
+ dispatch: React.Dispatch<GridAction>;
11
+ pinnedLeft: string[];
12
+ pinnedRight: string[];
13
+ rows: Row[];
14
+ }
15
+ export declare const ColumnFilters: React.FC<ColumnFiltersProps>;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { ContextMenuProps } from './types';
3
+ import './ContextMenu.css';
4
+ /**
5
+ * ContextMenu Component
6
+ *
7
+ * A customizable right-click context menu for the DataGrid.
8
+ * Supports nested submenus, separators, disabled items, and custom menu items.
9
+ */
10
+ export declare const ContextMenu: React.FC<ContextMenuProps>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { DataGridProps } from './types';
3
+ import type { GridApi } from './gridApi.types';
4
+ /**
5
+ * DataGrid Component
6
+ *
7
+ * A feature-rich data grid component with sorting, filtering, pagination,
8
+ * column resizing, column reordering, row selection, cell editing, and keyboard navigation.
9
+ *
10
+ * Features:
11
+ * - Sortable columns (click header to sort asc/desc/none)
12
+ * - Column filtering (text filter for each column)
13
+ * - Pagination with configurable page size (10, 20, 50)
14
+ * - Column resizing (drag column border to resize)
15
+ * - Column reorder (drag and drop column headers)
16
+ * - Row selection (single click, Ctrl+click for multi, Shift+click for range)
17
+ * - Editable cells (double-click to edit, Enter to confirm, Escape to cancel)
18
+ * - Keyboard navigation (arrow keys to move focus, Enter to edit)
19
+ * - Sticky header (header stays visible when scrolling)
20
+ * - Grid API: Programmatic control via ref (AG Grid-inspired API)
21
+ */
22
+ export declare const DataGrid: React.ForwardRefExoticComponent<DataGridProps & React.RefAttributes<GridApi>>;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import type { DensityMode } from './densityModes';
3
+ export interface DensityToggleProps {
4
+ value: DensityMode;
5
+ onChange: (mode: DensityMode) => void;
6
+ className?: string;
7
+ disabled?: boolean;
8
+ }
9
+ /**
10
+ * DensityToggle Component
11
+ *
12
+ * A segmented control for switching between Compact, Normal, and Comfortable density modes.
13
+ * Displays as a horizontal button group with clear visual feedback.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <DensityToggle
18
+ * value={densityMode}
19
+ * onChange={setDensityMode}
20
+ * />
21
+ * ```
22
+ */
23
+ export declare const DensityToggle: React.FC<DensityToggleProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface DragHandleProps {
3
+ position?: 'left' | 'right';
4
+ isDragging?: boolean;
5
+ }
6
+ export declare const DragHandle: React.FC<DragHandleProps>;
7
+ export default DragHandle;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { Row, DragRowConfig } from './types';
3
+ interface DraggableRowProps {
4
+ row: Row;
5
+ rowIndex: number;
6
+ config: DragRowConfig;
7
+ sourceTableId?: string;
8
+ onRowReorder?: (rows: Row[]) => void;
9
+ rows: Row[];
10
+ style?: React.CSSProperties;
11
+ children: React.ReactNode;
12
+ }
13
+ export declare const DraggableRow: React.FC<DraggableRowProps>;
14
+ export default DraggableRow;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { Column, Row } from './types';
3
+ interface ExportMenuProps {
4
+ columns: Column[];
5
+ fullDataset: Row[];
6
+ filteredData: Row[];
7
+ selectedRows: Set<string | number>;
8
+ currentPageData: Row[];
9
+ onExport?: (exported: boolean) => void;
10
+ }
11
+ export declare const ExportMenu: React.FC<ExportMenuProps>;
12
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * FacetedSearch Component
3
+ *
4
+ * A filter panel that shows value counts for categorical fields.
5
+ * Perfect for e-commerce and analytics dashboards.
6
+ * Provides instant visual feedback about data distribution and filtering options.
7
+ */
8
+ import React from 'react';
9
+ import type { Column, Row, FilterConfig } from './types';
10
+ export interface FacetConfig {
11
+ field: string;
12
+ label?: string;
13
+ maxItems?: number;
14
+ sortBy?: 'count' | 'value' | 'alpha';
15
+ expanded?: boolean;
16
+ }
17
+ export interface FacetedSearchProps {
18
+ columns: Column[];
19
+ rows: Row[];
20
+ facetConfigs: FacetConfig[];
21
+ filterConfig: FilterConfig;
22
+ onFilterChange: (field: string, values: any[] | null) => void;
23
+ onClearAll?: () => void;
24
+ className?: string;
25
+ showSearch?: boolean;
26
+ collapsible?: boolean;
27
+ }
28
+ export declare const FacetedSearch: React.FC<FacetedSearchProps>;
29
+ export default FacetedSearch;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * FilteredSearchBar Component
3
+ *
4
+ * Advanced search bar with token-based filtering (similar to GitLab/GitHub)
5
+ * Features:
6
+ * - Token/pill-based filters
7
+ * - Autocomplete dropdown
8
+ * - Multi-criteria search
9
+ * - Visual feedback with colored tokens
10
+ * - Keyboard navigation
11
+ */
12
+ import React from 'react';
13
+ export interface SearchToken {
14
+ id: string;
15
+ field: string;
16
+ label: string;
17
+ value: string | string[];
18
+ operator?: 'equals' | 'contains' | 'startsWith' | 'in';
19
+ color?: string;
20
+ }
21
+ export interface FilterOption {
22
+ field: string;
23
+ label: string;
24
+ type: 'text' | 'select' | 'multiselect' | 'date' | 'number';
25
+ options?: string[];
26
+ placeholder?: string;
27
+ color?: string;
28
+ }
29
+ export interface FilteredSearchBarProps {
30
+ filters: FilterOption[];
31
+ onSearch: (tokens: SearchToken[]) => void;
32
+ placeholder?: string;
33
+ maxTokens?: number;
34
+ }
35
+ export declare const FilteredSearchBar: React.FC<FilteredSearchBarProps>;
36
+ export default FilteredSearchBar;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface FocusTrapProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ enabled?: boolean;
7
+ initialFocus?: 'first' | 'last' | HTMLElement | null;
8
+ returnFocus?: boolean;
9
+ escapeDeactivates?: boolean;
10
+ onEscape?: () => void;
11
+ }
12
+ export declare const FocusTrap: React.FC<FocusTrapProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /**
3
+ * Grid API Demo Component
4
+ * Demonstrates how to use the GridApi ref to programmatically control the grid
5
+ */
6
+ export declare const GridApiDemo: React.FC;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import type { Column, Row, GridAction, EditState, FocusState, GroupedRow, AggregateConfig, VirtualScrollConfig, TreeNode, TreeConfig, DragRowConfig } from './types';
3
+ interface GridBodyProps {
4
+ columns: Column[];
5
+ rows: (Row | GroupedRow | TreeNode)[];
6
+ pinnedRowsTop?: (Row | GroupedRow | TreeNode)[];
7
+ pinnedRowsBottom?: (Row | GroupedRow | TreeNode)[];
8
+ columnOrder: string[];
9
+ displayColumnOrder: string[];
10
+ columnWidths: {
11
+ [field: string]: number;
12
+ };
13
+ selectedRows: Set<string | number>;
14
+ editState: EditState;
15
+ focusState: FocusState | null;
16
+ dispatch: React.Dispatch<GridAction>;
17
+ onRowClick?: (row: Row) => void;
18
+ onCellEdit?: (rowIndex: number, field: string, value: any) => void;
19
+ pinnedLeft: string[];
20
+ pinnedRight: string[];
21
+ showGroupFooters?: boolean;
22
+ groupAggregates?: Map<string, {
23
+ [key: string]: number | null;
24
+ }>;
25
+ aggregateConfigs?: AggregateConfig[];
26
+ virtualScrollConfig?: VirtualScrollConfig;
27
+ treeConfig?: TreeConfig;
28
+ dragRowConfig?: DragRowConfig;
29
+ tableId?: string;
30
+ onRowReorder?: (rows: Row[]) => void;
31
+ onScroll?: (scrollTop: number, scrollLeft: number) => void;
32
+ currentPage?: number;
33
+ pageSize?: number;
34
+ totalRows?: number;
35
+ onContextMenu?: (event: React.MouseEvent, row: Row, column: Column, rowIndex: number, columnIndex: number) => void;
36
+ onCellMouseEnter?: (event: React.MouseEvent, row: Row, column: Column, value: any) => void;
37
+ onCellMouseLeave?: () => void;
38
+ onRowMouseEnter?: (event: React.MouseEvent, row: Row, rowIndex: number) => void;
39
+ onRowMouseLeave?: () => void;
40
+ }
41
+ export declare const GridBody: React.FC<GridBodyProps>;
42
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { Column, AggregateConfig } from './types';
3
+ interface GridFooterProps {
4
+ columns: Column[];
5
+ displayColumnOrder: string[];
6
+ columnWidths: {
7
+ [field: string]: number;
8
+ };
9
+ aggregates: {
10
+ [key: string]: number | null;
11
+ };
12
+ aggregateConfigs: AggregateConfig[];
13
+ pinnedLeft: string[];
14
+ pinnedRight: string[];
15
+ label?: string;
16
+ }
17
+ export declare const GridFooter: React.FC<GridFooterProps>;
18
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { Column, GridAction, SortConfig } from './types';
3
+ interface GridHeaderProps {
4
+ columns: Column[];
5
+ columnOrder: string[];
6
+ displayColumnOrder: string[];
7
+ columnWidths: {
8
+ [field: string]: number;
9
+ };
10
+ sortConfig: SortConfig;
11
+ dispatch: React.Dispatch<GridAction>;
12
+ pinnedLeft: string[];
13
+ pinnedRight: string[];
14
+ showColumnPinning: boolean;
15
+ onContextMenu?: (event: React.MouseEvent, column: Column, columnIndex: number) => void;
16
+ }
17
+ export declare const GridHeader: React.FC<GridHeaderProps>;
18
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { GridAction } from './types';
3
+ interface GridPaginationProps {
4
+ currentPage: number;
5
+ pageSize: number;
6
+ totalRows: number;
7
+ dispatch: React.Dispatch<GridAction>;
8
+ }
9
+ export declare const GridPagination: React.FC<GridPaginationProps>;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { Column, GridAction } from './types';
3
+ interface GroupByPanelProps {
4
+ columns: Column[];
5
+ groupBy: string[];
6
+ dispatch: React.Dispatch<GridAction>;
7
+ }
8
+ export declare const GroupByPanel: React.FC<GroupByPanelProps>;
9
+ export {};
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import type { GroupedRow, Column, GridAction, AggregateConfig } from './types';
3
+ interface GroupRowProps {
4
+ group: GroupedRow;
5
+ columns: Column[];
6
+ columnOrder: string[];
7
+ displayColumnOrder: string[];
8
+ columnWidths: {
9
+ [field: string]: number;
10
+ };
11
+ dispatch: React.Dispatch<GridAction>;
12
+ pinnedLeft: string[];
13
+ pinnedRight: string[];
14
+ }
15
+ export declare const GroupRow: React.FC<GroupRowProps>;
16
+ interface GroupFooterRowProps {
17
+ group: GroupedRow;
18
+ columns: Column[];
19
+ displayColumnOrder: string[];
20
+ columnWidths: {
21
+ [field: string]: number;
22
+ };
23
+ aggregates: {
24
+ [key: string]: number | null;
25
+ };
26
+ aggregateConfigs: AggregateConfig[];
27
+ pinnedLeft: string[];
28
+ pinnedRight: string[];
29
+ }
30
+ export declare const GroupFooterRow: React.FC<GroupFooterRowProps>;
31
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * InfiniteScrollDataGrid Component
3
+ *
4
+ * DataGrid with server-side infinite scrolling support.
5
+ * Handles massive datasets (100M+ rows) with:
6
+ * - Server-side data fetching
7
+ * - Server-side filtering
8
+ * - Server-side sorting
9
+ * - Local block caching
10
+ * - Virtual scrolling
11
+ */
12
+ import React from 'react';
13
+ import type { Column, Row, VirtualScrollConfig } from './types';
14
+ import type { ServerSideDataSourceConfig } from './ServerSideDataSource';
15
+ import { ServerSideDataSource } from './ServerSideDataSource';
16
+ import type { ThemeName } from './themes';
17
+ export interface InfiniteScrollDataGridProps {
18
+ columns: Column[];
19
+ dataSource: ServerSideDataSource | ServerSideDataSourceConfig;
20
+ pageSize?: number;
21
+ showColumnPinning?: boolean;
22
+ virtualScrollConfig?: VirtualScrollConfig;
23
+ theme?: ThemeName;
24
+ onRowClick?: (row: Row) => void;
25
+ onCellEdit?: (rowIndex: number, field: string, value: unknown) => void;
26
+ onSelectionChange?: (selectedIds: (string | number)[]) => void;
27
+ }
28
+ /**
29
+ * InfiniteScrollDataGrid
30
+ *
31
+ * A DataGrid component optimized for infinite scrolling with server-side data source.
32
+ */
33
+ export declare const InfiniteScrollDataGrid: React.FC<InfiniteScrollDataGridProps>;
34
+ /**
35
+ * ThemedInfiniteScrollDataGrid - Legacy alias for backward compatibility
36
+ * @deprecated Use InfiniteScrollDataGrid directly with theme prop instead
37
+ */
38
+ export declare const ThemedInfiniteScrollDataGrid: React.FC<InfiniteScrollDataGridProps>;
39
+ export default InfiniteScrollDataGrid;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { LayoutPreset } from './types';
3
+ import { LayoutPersistenceManager } from './layoutPersistence';
4
+ interface LayoutPresetsManagerProps {
5
+ manager: LayoutPersistenceManager;
6
+ currentLayout: LayoutPreset['layout'];
7
+ onLoadPreset: (layout: LayoutPreset['layout']) => void;
8
+ onResetLayout: () => void;
9
+ }
10
+ export declare const LayoutPresetsManager: React.FC<LayoutPresetsManagerProps>;
11
+ export {};
@@ -0,0 +1,165 @@
1
+ /**
2
+ * MarketDataEngine.ts
3
+ *
4
+ * High-performance market data update engine for handling 1000+ updates/sec
5
+ * with minimal React re-renders and optimal DOM patching.
6
+ *
7
+ * Features:
8
+ * - RequestAnimationFrame batching for smooth 60fps updates
9
+ * - Diff buffer for tracking changed cells
10
+ * - Direct DOM manipulation to bypass React reconciliation
11
+ * - Cell flash animations (green/red for up/down)
12
+ * - Memory-efficient row cache
13
+ * - CPU usage monitoring and auto-throttling
14
+ */
15
+ export interface CellUpdate {
16
+ rowId: string | number;
17
+ field: string;
18
+ oldValue: any;
19
+ newValue: any;
20
+ timestamp: number;
21
+ }
22
+ export interface FlashAnimation {
23
+ cellKey: string;
24
+ direction: 'up' | 'down';
25
+ startTime: number;
26
+ duration: number;
27
+ }
28
+ export interface MarketDataRow {
29
+ id: string | number;
30
+ [key: string]: any;
31
+ }
32
+ export interface MarketDataEngineConfig {
33
+ flashDuration?: number;
34
+ batchInterval?: number;
35
+ enableFlash?: boolean;
36
+ maxUpdatesPerFrame?: number;
37
+ cpuThreshold?: number;
38
+ enableLiveSorting?: boolean;
39
+ enableRankingMovement?: boolean;
40
+ }
41
+ export interface RowUpdate {
42
+ rowId: string | number;
43
+ updates: {
44
+ [field: string]: any;
45
+ };
46
+ timestamp: number;
47
+ }
48
+ /**
49
+ * MarketDataEngine
50
+ *
51
+ * Manages high-frequency data updates with minimal performance impact.
52
+ * Uses RAF batching and direct DOM manipulation to achieve sub-millisecond latencies.
53
+ */
54
+ export declare class MarketDataEngine {
55
+ private config;
56
+ private rowCache;
57
+ private updateBuffer;
58
+ private flashAnimations;
59
+ private rafId;
60
+ private lastUpdateTime;
61
+ private isPaused;
62
+ private isThrottled;
63
+ private updateCallbacks;
64
+ private cellUpdateCallbacks;
65
+ private frameCount;
66
+ private lastFrameTime;
67
+ private avgFrameTime;
68
+ constructor(config?: MarketDataEngineConfig);
69
+ /**
70
+ * Initialize the engine with row data
71
+ */
72
+ initialize(rows: MarketDataRow[]): void;
73
+ /**
74
+ * Process incoming market data updates
75
+ * This method is optimized for high-frequency calls
76
+ */
77
+ processUpdate(update: RowUpdate): void;
78
+ /**
79
+ * Process updates in batches using RAF
80
+ */
81
+ private processFrame;
82
+ /**
83
+ * Apply DOM updates directly without React re-renders
84
+ */
85
+ private applyDOMUpdates;
86
+ /**
87
+ * Get DOM element for a specific cell
88
+ */
89
+ private getCellElement;
90
+ /**
91
+ * Update cell content in DOM
92
+ */
93
+ private updateCellContent;
94
+ /**
95
+ * Apply flash animation to cell
96
+ */
97
+ private applyFlashAnimation;
98
+ /**
99
+ * Clean up expired flash animations
100
+ */
101
+ private cleanupFlashAnimations;
102
+ /**
103
+ * Format cell value for display
104
+ */
105
+ private formatCellValue;
106
+ /**
107
+ * Check if field values are numeric for flash animation
108
+ */
109
+ private isNumericField;
110
+ /**
111
+ * Subscribe to row data updates
112
+ */
113
+ onUpdate(callback: (rows: MarketDataRow[]) => void): () => void;
114
+ /**
115
+ * Subscribe to individual cell updates
116
+ */
117
+ onCellUpdate(callback: (update: CellUpdate) => void): () => void;
118
+ /**
119
+ * Get current row data from cache
120
+ */
121
+ getRows(): MarketDataRow[];
122
+ /**
123
+ * Get specific row from cache
124
+ */
125
+ getRow(rowId: string | number): MarketDataRow | undefined;
126
+ /**
127
+ * Pause live updates (data ingestion continues)
128
+ */
129
+ pause(): void;
130
+ /**
131
+ * Resume live updates
132
+ */
133
+ resume(): void;
134
+ /**
135
+ * Check if updates are paused
136
+ */
137
+ isPausedState(): boolean;
138
+ /**
139
+ * Check if engine is throttled due to CPU load
140
+ */
141
+ isThrottledState(): boolean;
142
+ /**
143
+ * Get performance metrics
144
+ */
145
+ getMetrics(): {
146
+ avgFrameTime: number;
147
+ fps: number;
148
+ pendingUpdates: number;
149
+ activeFlashes: number;
150
+ rowCount: number;
151
+ isThrottled: boolean;
152
+ };
153
+ /**
154
+ * Clear all data and reset engine
155
+ */
156
+ clear(): void;
157
+ /**
158
+ * Destroy engine and clean up
159
+ */
160
+ destroy(): void;
161
+ }
162
+ /**
163
+ * Create a market data engine instance
164
+ */
165
+ export declare function createMarketDataEngine(config?: MarketDataEngineConfig): MarketDataEngine;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * MarketDataGrid.tsx
3
+ *
4
+ * High-performance DataGrid wrapper optimized for live market data.
5
+ * Integrates MarketDataEngine with React DataGrid component.
6
+ *
7
+ * Features:
8
+ * - Ultra-low latency updates
9
+ * - Cell flash animations
10
+ * - Density mode for compact display
11
+ * - Market-specific column formatting
12
+ * - Live sorting and ranking
13
+ */
14
+ import React from 'react';
15
+ import type { Column, Row, MarketDataConfig } from './types';
16
+ import { MarketDataEngine } from './MarketDataEngine';
17
+ import './MarketDataGrid.css';
18
+ export interface MarketDataGridProps {
19
+ columns: Column[];
20
+ rows: Row[];
21
+ engine: MarketDataEngine | null;
22
+ config?: MarketDataConfig;
23
+ className?: string;
24
+ onCellClick?: (rowId: string | number, field: string, value: any) => void;
25
+ onRowClick?: (row: Row) => void;
26
+ }
27
+ /**
28
+ * MarketDataGrid Component
29
+ *
30
+ * Optimized grid for displaying live market data with minimal latency.
31
+ * Uses direct DOM manipulation for cell updates to bypass React reconciliation.
32
+ */
33
+ export declare const MarketDataGrid: React.FC<MarketDataGridProps>;