react-open-source-grid 1.5.0 → 1.5.2
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/dist/assets/components/AccessibilityDemo.d.ts +8 -0
- package/dist/assets/components/ApiReferencePage.d.ts +2 -0
- package/dist/assets/components/BenchmarkDemo.d.ts +2 -0
- package/dist/assets/components/CellRenderersDemo.d.ts +16 -0
- package/dist/assets/components/CodeBlock.d.ts +10 -0
- package/dist/assets/components/ColumnFiltersDemo.d.ts +5 -0
- package/dist/assets/components/CompleteApiReferencePage.d.ts +2 -0
- package/dist/assets/components/ContextMenuDemo.d.ts +12 -0
- package/dist/assets/components/DataGrid/ARCHITECTURE.md.d.ts +288 -0
- package/dist/assets/components/DataGrid/AdvancedFilterBuilder.d.ts +12 -0
- package/dist/assets/components/DataGrid/CellRenderers.d.ts +64 -0
- package/dist/assets/components/DataGrid/ColumnChooser.d.ts +12 -0
- package/dist/assets/components/DataGrid/ColumnFilters.d.ts +16 -0
- package/dist/assets/components/DataGrid/ContextMenu.d.ts +10 -0
- package/dist/assets/components/DataGrid/DataGrid.d.ts +22 -0
- package/dist/assets/components/DataGrid/DensityToggle.d.ts +23 -0
- package/dist/assets/components/DataGrid/DragHandle.d.ts +7 -0
- package/dist/assets/components/DataGrid/DraggableRow.d.ts +14 -0
- package/dist/assets/components/DataGrid/ExportMenu.d.ts +12 -0
- package/dist/assets/components/DataGrid/FacetedSearch.d.ts +29 -0
- package/dist/assets/components/DataGrid/FilteredSearchBar.d.ts +36 -0
- package/dist/assets/components/DataGrid/FocusTrap.d.ts +12 -0
- package/dist/assets/components/DataGrid/GridApiDemo.d.ts +6 -0
- package/dist/assets/components/DataGrid/GridBody.d.ts +42 -0
- package/dist/assets/components/DataGrid/GridFooter.d.ts +18 -0
- package/dist/assets/components/DataGrid/GridHeader.d.ts +18 -0
- package/dist/assets/components/DataGrid/GridPagination.d.ts +10 -0
- package/dist/assets/components/DataGrid/GroupByPanel.d.ts +9 -0
- package/dist/assets/components/DataGrid/GroupRow.d.ts +31 -0
- package/dist/assets/components/DataGrid/InfiniteScrollDataGrid.d.ts +39 -0
- package/dist/assets/components/DataGrid/LayoutPresetsManager.d.ts +11 -0
- package/dist/assets/components/DataGrid/MarketDataEngine.d.ts +165 -0
- package/dist/assets/components/DataGrid/MarketDataGrid.d.ts +33 -0
- package/dist/assets/components/DataGrid/MarketDataGridUtils.d.ts +13 -0
- package/dist/assets/components/DataGrid/ScreenReaderAnnouncer.d.ts +8 -0
- package/dist/assets/components/DataGrid/ServerSideDataSource.d.ts +136 -0
- package/dist/assets/components/DataGrid/ThemeSelector.d.ts +12 -0
- package/dist/assets/components/DataGrid/Tooltip.d.ts +15 -0
- package/dist/assets/components/DataGrid/TreeRow.d.ts +31 -0
- package/dist/assets/components/DataGrid/VirtualScroller.d.ts +35 -0
- package/dist/assets/components/DataGrid/WebSocketMockFeed.d.ts +121 -0
- package/dist/assets/components/DataGrid/aggregationUtils.d.ts +25 -0
- package/dist/assets/components/DataGrid/contextMenuUtils.d.ts +36 -0
- package/dist/assets/components/DataGrid/demos/TooltipDemo.d.ts +1 -0
- package/dist/assets/components/DataGrid/densityModes.d.ts +42 -0
- package/dist/assets/components/DataGrid/dragRowUtils.d.ts +98 -0
- package/dist/assets/components/DataGrid/exportUtils.d.ts +30 -0
- package/dist/assets/components/DataGrid/filterUtils.d.ts +17 -0
- package/dist/assets/components/DataGrid/gridApi.d.ts +142 -0
- package/dist/assets/components/DataGrid/gridApi.types.d.ts +348 -0
- package/dist/assets/components/DataGrid/gridReducer.d.ts +4 -0
- package/dist/assets/components/DataGrid/groupingUtils.d.ts +17 -0
- package/dist/assets/components/DataGrid/index.d.ts +41 -0
- package/dist/assets/components/DataGrid/layoutPersistence.d.ts +95 -0
- package/dist/assets/components/DataGrid/themes.d.ts +113 -0
- package/dist/assets/components/DataGrid/treeDataUtils.d.ts +97 -0
- package/dist/assets/components/DataGrid/types.d.ts +536 -0
- package/dist/assets/components/DataGrid/useContextMenu.d.ts +31 -0
- package/dist/assets/components/DataGrid/useDensityMode.d.ts +36 -0
- package/dist/assets/components/DataGrid/useFocusTrap.d.ts +14 -0
- package/dist/assets/components/DataGrid/useMarketData.d.ts +57 -0
- package/dist/assets/components/DataGrid/useScreenReaderAnnouncements.d.ts +23 -0
- package/dist/assets/components/DataGrid/useTooltip.d.ts +21 -0
- package/dist/assets/components/DemoGridPage.d.ts +2 -0
- package/dist/assets/components/DensityModeDemo.d.ts +12 -0
- package/dist/assets/components/FacetedSearchDemo.d.ts +8 -0
- package/dist/assets/components/FeatureGallery.d.ts +2 -0
- package/dist/assets/components/FilteredSearchDemo.d.ts +7 -0
- package/dist/assets/components/GridApiDemoPage.d.ts +2 -0
- package/dist/assets/components/HomePage.d.ts +1 -0
- package/dist/assets/components/InfiniteScrollDemo.d.ts +13 -0
- package/dist/assets/components/LayoutPersistenceDemo.d.ts +2 -0
- package/dist/assets/components/LiveMarketDemo.d.ts +18 -0
- package/dist/assets/components/MarketDataExamples.d.ts +42 -0
- package/dist/assets/components/RowDraggingDemo.d.ts +3 -0
- package/dist/assets/components/RowPinningDemo.d.ts +12 -0
- package/dist/assets/components/ThemesDemo.d.ts +17 -0
- package/dist/assets/components/TooltipDemo.d.ts +1 -0
- package/dist/assets/components/TreeDataDemo.d.ts +3 -0
- package/dist/assets/components/VirtualScrollDemo.d.ts +13 -0
- package/dist/assets/{index-BCK5Ko4P.js → index-bQ7aqGuU.js} +2 -2
- package/dist/assets/index.js +1 -1
- package/dist/assets/{layoutPersistence-BHB0W18y.js → layoutPersistence-B2lMGbE7.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +17 -4
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useMarketData.ts
|
|
3
|
+
*
|
|
4
|
+
* React hook for managing market data subscriptions, WebSocket connections,
|
|
5
|
+
* and integrating with MarketDataEngine.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - WebSocket connection management
|
|
9
|
+
* - Auto-reconnect with exponential backoff
|
|
10
|
+
* - Data ingestion pipeline
|
|
11
|
+
* - Subscription management
|
|
12
|
+
* - Connection state tracking
|
|
13
|
+
*/
|
|
14
|
+
import { MarketDataEngine } from './MarketDataEngine';
|
|
15
|
+
import type { RowUpdate, MarketDataRow } from './MarketDataEngine';
|
|
16
|
+
export interface WebSocketConfig {
|
|
17
|
+
url: string;
|
|
18
|
+
reconnect?: boolean;
|
|
19
|
+
reconnectDelay?: number;
|
|
20
|
+
maxReconnectDelay?: number;
|
|
21
|
+
reconnectAttempts?: number;
|
|
22
|
+
onConnect?: () => void;
|
|
23
|
+
onDisconnect?: () => void;
|
|
24
|
+
onError?: (error: Event) => void;
|
|
25
|
+
onMessage?: (data: any) => void;
|
|
26
|
+
}
|
|
27
|
+
export interface MarketDataSubscription {
|
|
28
|
+
symbols: string[];
|
|
29
|
+
onUpdate?: (update: RowUpdate) => void;
|
|
30
|
+
}
|
|
31
|
+
export type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'reconnecting' | 'failed';
|
|
32
|
+
export interface UseMarketDataOptions {
|
|
33
|
+
engine: MarketDataEngine;
|
|
34
|
+
wsConfig?: WebSocketConfig;
|
|
35
|
+
initialData?: MarketDataRow[];
|
|
36
|
+
autoConnect?: boolean;
|
|
37
|
+
subscription?: MarketDataSubscription;
|
|
38
|
+
}
|
|
39
|
+
export interface UseMarketDataReturn {
|
|
40
|
+
rows: MarketDataRow[];
|
|
41
|
+
connectionState: ConnectionState;
|
|
42
|
+
isConnected: boolean;
|
|
43
|
+
connect: () => void;
|
|
44
|
+
disconnect: () => void;
|
|
45
|
+
subscribe: (symbols: string[]) => void;
|
|
46
|
+
unsubscribe: (symbols: string[]) => void;
|
|
47
|
+
sendMessage: (message: any) => void;
|
|
48
|
+
metrics: {
|
|
49
|
+
updatesPerSecond: number;
|
|
50
|
+
totalUpdates: number;
|
|
51
|
+
reconnectCount: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Hook for managing market data with WebSocket connection and engine integration
|
|
56
|
+
*/
|
|
57
|
+
export declare function useMarketData(options: UseMarketDataOptions): UseMarketDataReturn;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useScreenReaderAnnouncements Hook
|
|
3
|
+
*
|
|
4
|
+
* Manages live region announcements for screen readers.
|
|
5
|
+
* Provides accessible feedback for grid actions like sorting, filtering, selection, and navigation.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export declare const useScreenReaderAnnouncements: () => {
|
|
9
|
+
announcementRef: React.RefObject<string>;
|
|
10
|
+
announce: (message: string, options?: {
|
|
11
|
+
priority?: "polite" | "assertive";
|
|
12
|
+
delay?: number;
|
|
13
|
+
}) => void;
|
|
14
|
+
announceSorting: (columnName: string, direction: "asc" | "desc" | null) => void;
|
|
15
|
+
announceSelection: (count: number) => void;
|
|
16
|
+
announceFiltering: (columnName: string, hasFilter: boolean, resultCount?: number) => void;
|
|
17
|
+
announcePagination: (currentPage: number, totalPages: number, rowCount: number) => void;
|
|
18
|
+
announceFocus: (rowIndex: number, columnName: string, value?: any) => void;
|
|
19
|
+
announceEditing: (columnName: string, isStarting: boolean) => void;
|
|
20
|
+
announceRowReorder: (fromIndex: number, toIndex: number) => void;
|
|
21
|
+
announceColumnVisibility: (columnName: string, isVisible: boolean) => void;
|
|
22
|
+
announceLoading: (isLoading: boolean, message?: string) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TooltipState, TooltipConfig, Row, Column } from './types';
|
|
2
|
+
interface UseTooltipProps {
|
|
3
|
+
config?: TooltipConfig;
|
|
4
|
+
}
|
|
5
|
+
interface TooltipHandlers {
|
|
6
|
+
onCellMouseEnter: (event: React.MouseEvent, row: Row, column: Column, value: any) => void;
|
|
7
|
+
onCellMouseLeave: () => void;
|
|
8
|
+
onRowMouseEnter: (event: React.MouseEvent, row: Row, rowIndex: number) => void;
|
|
9
|
+
onRowMouseLeave: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* useTooltip Hook
|
|
13
|
+
*
|
|
14
|
+
* Manages tooltip state with hover detection, delay handling, and smart positioning.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useTooltip: ({ config }?: UseTooltipProps) => {
|
|
17
|
+
tooltipState: TooltipState;
|
|
18
|
+
tooltipHandlers: TooltipHandlers;
|
|
19
|
+
hideTooltip: () => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* DensityModeDemo - Showcase of DataGrid Density Modes
|
|
4
|
+
*
|
|
5
|
+
* Demonstrates:
|
|
6
|
+
* - Compact mode: Minimal spacing for maximum data density
|
|
7
|
+
* - Normal mode: Balanced spacing for general use
|
|
8
|
+
* - Comfortable mode: Generous spacing for accessibility
|
|
9
|
+
* - Persistent density preference (localStorage)
|
|
10
|
+
* - Segmented control UI
|
|
11
|
+
*/
|
|
12
|
+
export declare const DensityModeDemo: React.FC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HomePage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InfiniteScrollDemo Component
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates infinite scrolling with server-side data source
|
|
5
|
+
* handling 100M+ rows with:
|
|
6
|
+
* - Server-side filtering
|
|
7
|
+
* - Server-side sorting
|
|
8
|
+
* - Block caching
|
|
9
|
+
* - Virtual scrolling
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
export declare const InfiniteScrollDemo: React.FC;
|
|
13
|
+
export default InfiniteScrollDemo;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LiveMarketDemo.tsx
|
|
3
|
+
*
|
|
4
|
+
* Full demo page showcasing high-performance market data grid with:
|
|
5
|
+
* - Live streaming data (WebSocket mock feed)
|
|
6
|
+
* - 50 symbols with continuous updates
|
|
7
|
+
* - Pause/Resume controls
|
|
8
|
+
* - Performance metrics
|
|
9
|
+
* - Connection status
|
|
10
|
+
* - Density mode toggle
|
|
11
|
+
* - Flash animations
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import './LiveMarketDemo.css';
|
|
15
|
+
/**
|
|
16
|
+
* LiveMarketDemo Component
|
|
17
|
+
*/
|
|
18
|
+
export declare const LiveMarketDemo: React.FC;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MARKET_DATA_EXAMPLE.tsx
|
|
3
|
+
*
|
|
4
|
+
* Complete working example of Market Data Mode implementation.
|
|
5
|
+
* Copy this file to get started quickly with live market data.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* Simple Market Data Example
|
|
10
|
+
*
|
|
11
|
+
* This example demonstrates:
|
|
12
|
+
* - Creating a market data engine
|
|
13
|
+
* - Setting up a mock WebSocket feed
|
|
14
|
+
* - Configuring columns for market data
|
|
15
|
+
* - Rendering the grid with live updates
|
|
16
|
+
*/
|
|
17
|
+
export declare const SimpleMarketExample: React.FC;
|
|
18
|
+
/**
|
|
19
|
+
* Advanced Market Data Example
|
|
20
|
+
*
|
|
21
|
+
* This example demonstrates:
|
|
22
|
+
* - Full control panel with pause/resume
|
|
23
|
+
* - Performance metrics display
|
|
24
|
+
* - Density mode toggle
|
|
25
|
+
* - Flash animation toggle
|
|
26
|
+
* - Connection status
|
|
27
|
+
*/
|
|
28
|
+
export declare const AdvancedMarketExample: React.FC;
|
|
29
|
+
/**
|
|
30
|
+
* Real WebSocket Example
|
|
31
|
+
*
|
|
32
|
+
* This example shows how to connect to a real WebSocket server.
|
|
33
|
+
* Replace the URL with your actual WebSocket endpoint.
|
|
34
|
+
*/
|
|
35
|
+
export declare const RealWebSocketExample: React.FC;
|
|
36
|
+
/**
|
|
37
|
+
* Custom Formatting Example
|
|
38
|
+
*
|
|
39
|
+
* Shows how to customize cell rendering for market data.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CustomFormattingExample: React.FC;
|
|
42
|
+
export default SimpleMarketExample;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* RowPinningDemo - Demonstrates row pinning feature
|
|
4
|
+
*
|
|
5
|
+
* This demo showcases:
|
|
6
|
+
* - Pin rows to top or bottom
|
|
7
|
+
* - Pinned rows remain sticky during scroll
|
|
8
|
+
* - Works with sorting and filtering
|
|
9
|
+
* - Works with virtual scrolling
|
|
10
|
+
* - Context menu integration
|
|
11
|
+
*/
|
|
12
|
+
export declare const RowPinningDemo: React.FC;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ThemesDemo - Showcase of DataGrid Theme System
|
|
4
|
+
*
|
|
5
|
+
* Demonstrates all available themes:
|
|
6
|
+
* - Quartz (Modern White)
|
|
7
|
+
* - Alpine (Classic Business)
|
|
8
|
+
* - Material
|
|
9
|
+
* - Dark Mode
|
|
10
|
+
* - Nord (Arctic)
|
|
11
|
+
* - Dracula
|
|
12
|
+
* - Solarized Light
|
|
13
|
+
* - Solarized Dark
|
|
14
|
+
* - Monokai
|
|
15
|
+
* - One Dark
|
|
16
|
+
*/
|
|
17
|
+
export declare const ThemesDemo: React.FC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TooltipDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* VirtualScrollDemo - Demonstrates virtual scrolling with large datasets
|
|
4
|
+
*
|
|
5
|
+
* This demo showcases:
|
|
6
|
+
* - 50,000+ rows
|
|
7
|
+
* - 200+ columns
|
|
8
|
+
* - Ultra-fast rendering with windowing
|
|
9
|
+
* - Dynamic row heights
|
|
10
|
+
* - Cell recycling
|
|
11
|
+
*/
|
|
12
|
+
export declare const VirtualScrollDemo: React.FC;
|
|
13
|
+
export default VirtualScrollDemo;
|