@tetrascience-npm/tetrascience-react-ui 0.4.0-beta.9.1 → 0.4.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 +58 -4
- package/dist/athena.d.ts +167 -0
- package/dist/databricks.d.ts +129 -0
- package/dist/exceptions-DN25pCDi.cjs +2 -0
- package/dist/exceptions-DN25pCDi.cjs.map +1 -0
- package/dist/exceptions-jCQ6h5C8.js +33 -0
- package/dist/exceptions-jCQ6h5C8.js.map +1 -0
- package/dist/index.cjs +2021 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2165 -2020
- package/dist/index.js +9461 -2
- package/dist/index.js.map +1 -0
- package/dist/logo.png +0 -0
- package/dist/providers/athena.cjs +2 -0
- package/dist/providers/athena.cjs.map +1 -0
- package/dist/providers/athena.d.ts +7 -77
- package/dist/providers/athena.js +160 -0
- package/dist/providers/athena.js.map +1 -0
- package/dist/providers/databricks.cjs +2 -0
- package/dist/providers/databricks.cjs.map +1 -0
- package/dist/providers/databricks.d.ts +7 -41
- package/dist/providers/databricks.js +85 -0
- package/dist/providers/databricks.js.map +1 -0
- package/dist/providers/snowflake.cjs +2 -0
- package/dist/providers/snowflake.cjs.map +1 -0
- package/dist/providers/snowflake.d.ts +7 -38
- package/dist/providers/snowflake.js +122 -0
- package/dist/providers/snowflake.js.map +1 -0
- package/dist/server.cjs +2 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.ts +537 -522
- package/dist/server.js +266 -0
- package/dist/server.js.map +1 -0
- package/dist/{providers/types-Ck4uFaGp.d.ts → snowflake.d.ts} +125 -82
- package/dist/vite.svg +1 -0
- package/package.json +32 -52
- package/dist/cjs/index.js +0 -2001
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/providers/athena.js +0 -2
- package/dist/cjs/providers/athena.js.map +0 -1
- package/dist/cjs/providers/databricks.js +0 -2
- package/dist/cjs/providers/databricks.js.map +0 -1
- package/dist/cjs/providers/exceptions-CYktpdqW.js +0 -2
- package/dist/cjs/providers/exceptions-CYktpdqW.js.map +0 -1
- package/dist/cjs/providers/snowflake.js +0 -2
- package/dist/cjs/providers/snowflake.js.map +0 -1
- package/dist/cjs/server.js +0 -2
- package/dist/cjs/server.js.map +0 -1
- package/dist/esm/index.js +0 -2001
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/providers/athena.js +0 -2
- package/dist/esm/providers/athena.js.map +0 -1
- package/dist/esm/providers/databricks.js +0 -2
- package/dist/esm/providers/databricks.js.map +0 -1
- package/dist/esm/providers/exceptions-C3uFWZB2.js +0 -2
- package/dist/esm/providers/exceptions-C3uFWZB2.js.map +0 -1
- package/dist/esm/providers/snowflake.js +0 -2
- package/dist/esm/providers/snowflake.js.map +0 -1
- package/dist/esm/server.js +0 -2
- package/dist/esm/server.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2027 +1,2172 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ClassAttributes } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { ExtraProps } from 'react-markdown';
|
|
4
|
+
import { HTMLAttributes } from 'react';
|
|
5
|
+
import { JSX } from 'react/jsx-runtime';
|
|
6
|
+
import { OnChange } from '@monaco-editor/react';
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
import { SearchEqlRequest } from '@tetrascience-npm/ts-connectors-sdk';
|
|
9
|
+
|
|
10
|
+
export declare const AppHeader: default_2.FC<AppHeaderProps>;
|
|
11
|
+
|
|
12
|
+
export declare interface AppHeaderProps {
|
|
13
|
+
hostname: string;
|
|
14
|
+
userProfile: UserProfileProps;
|
|
15
|
+
onHomeClick?: () => void;
|
|
16
|
+
onSettingsClick?: () => void;
|
|
17
|
+
onUserProfileClick?: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare const AppLayout: default_2.FC<AppLayoutProps>;
|
|
21
|
+
|
|
22
|
+
export declare interface AppLayoutProps {
|
|
23
|
+
userProfile: {
|
|
24
|
+
name: string;
|
|
25
|
+
avatar?: string;
|
|
26
|
+
};
|
|
27
|
+
hostname: string;
|
|
28
|
+
organization: {
|
|
29
|
+
name: string;
|
|
30
|
+
subtext?: string;
|
|
31
|
+
logo?: default_2.ReactNode;
|
|
32
|
+
};
|
|
33
|
+
children?: default_2.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare interface AreaDataSeries {
|
|
37
|
+
x: number[];
|
|
38
|
+
y: number[];
|
|
39
|
+
name: string;
|
|
40
|
+
color: string;
|
|
41
|
+
fill?: "tozeroy" | "tonexty" | "toself";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare const AreaGraph: default_2.FC<AreaGraphProps>;
|
|
45
|
+
|
|
46
|
+
export declare interface AreaGraphProps {
|
|
47
|
+
dataSeries: AreaDataSeries[];
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
xRange?: [number, number];
|
|
51
|
+
yRange?: [number, number];
|
|
52
|
+
variant?: AreaGraphVariant;
|
|
53
|
+
xTitle?: string;
|
|
54
|
+
yTitle?: string;
|
|
55
|
+
title?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare type AreaGraphVariant = "normal" | "stacked";
|
|
59
|
+
|
|
60
|
+
export declare const AssistantModal: default_2.FC<AssistantModalProps>;
|
|
61
|
+
|
|
62
|
+
export declare interface AssistantModalProps {
|
|
63
|
+
open: boolean;
|
|
64
|
+
title: string;
|
|
65
|
+
prompt: string;
|
|
66
|
+
initialCode?: string;
|
|
67
|
+
userQuery?: string;
|
|
68
|
+
onUserQueryChange?: (value: string) => void;
|
|
69
|
+
onCopy: (code: string) => void;
|
|
70
|
+
onLaunch: (code: string) => void;
|
|
71
|
+
onSend: (input: string) => void;
|
|
72
|
+
onCancel: () => void;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Axis configuration
|
|
77
|
+
*/
|
|
78
|
+
export declare interface AxisConfig {
|
|
79
|
+
/** Axis label */
|
|
80
|
+
title?: string;
|
|
81
|
+
/** Scale type (linear or log) */
|
|
82
|
+
scale?: ScaleType;
|
|
83
|
+
/** Fixed axis range [min, max] */
|
|
84
|
+
range?: [number, number];
|
|
85
|
+
/** Auto-range with optional padding percentage (0-1) */
|
|
86
|
+
autoRange?: boolean;
|
|
87
|
+
/** Padding percentage for auto-range (default: 0.1 = 10%) */
|
|
88
|
+
autoRangePadding?: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare const Badge: default_2.FC<BadgeProps>;
|
|
92
|
+
|
|
93
|
+
export declare interface BadgeProps {
|
|
94
|
+
children: default_2.ReactNode;
|
|
95
|
+
size?: BadgeSize;
|
|
96
|
+
variant?: BadgeVariant;
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
iconLeft?: default_2.ReactNode;
|
|
99
|
+
iconRight?: default_2.ReactNode;
|
|
100
|
+
className?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare type BadgeSize = "small" | "medium";
|
|
104
|
+
|
|
105
|
+
declare type BadgeVariant = "default" | "primary";
|
|
106
|
+
|
|
107
|
+
export declare interface BarDataSeries {
|
|
108
|
+
x: number[];
|
|
109
|
+
y: number[];
|
|
110
|
+
name: string;
|
|
111
|
+
color: string;
|
|
112
|
+
error_y?: {
|
|
113
|
+
type: "data";
|
|
114
|
+
array: number[];
|
|
115
|
+
visible: boolean;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare const BarGraph: default_2.FC<BarGraphProps>;
|
|
120
|
+
|
|
121
|
+
export declare interface BarGraphProps {
|
|
122
|
+
dataSeries: BarDataSeries[];
|
|
123
|
+
width?: number;
|
|
124
|
+
height?: number;
|
|
125
|
+
xRange?: [number, number];
|
|
126
|
+
yRange?: [number, number];
|
|
127
|
+
variant?: BarGraphVariant;
|
|
128
|
+
xTitle?: string;
|
|
129
|
+
yTitle?: string;
|
|
130
|
+
title?: string;
|
|
131
|
+
barWidth?: number;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare type BarGraphVariant = "group" | "stack" | "overlay";
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Baseline correction method
|
|
138
|
+
*/
|
|
139
|
+
export declare type BaselineCorrectionMethod = "none" | "linear" | "rolling";
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Global boundary marker style setting
|
|
143
|
+
* - "none": No boundary markers displayed
|
|
144
|
+
* - "enabled": Show boundary markers using per-peak settings (startMarker/endMarker) or defaults
|
|
145
|
+
*/
|
|
146
|
+
export declare type BoundaryMarkerStyle = "none" | "enabled";
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Individual boundary marker type for a single boundary point
|
|
150
|
+
*/
|
|
151
|
+
declare type BoundaryMarkerType = "none" | "triangle" | "diamond";
|
|
152
|
+
|
|
153
|
+
export declare interface BoxDataSeries {
|
|
154
|
+
y: number[];
|
|
155
|
+
name: string;
|
|
156
|
+
color: string;
|
|
157
|
+
x?: string[] | number[];
|
|
158
|
+
boxpoints?: "all" | "outliers" | "suspectedoutliers" | false;
|
|
159
|
+
jitter?: number;
|
|
160
|
+
pointpos?: number;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export declare const Boxplot: default_2.FC<BoxplotProps>;
|
|
164
|
+
|
|
165
|
+
export declare interface BoxplotProps {
|
|
166
|
+
dataSeries: BoxDataSeries[];
|
|
167
|
+
width?: number;
|
|
168
|
+
height?: number;
|
|
169
|
+
xRange?: [number, number];
|
|
170
|
+
yRange?: [number, number];
|
|
171
|
+
xTitle?: string;
|
|
172
|
+
yTitle?: string;
|
|
173
|
+
title?: string;
|
|
174
|
+
showPoints?: boolean;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Construct a full TDP URL by joining a base URL with a path.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* buildTdpUrl("https://tetrascience.com/my-org", "/file/abc-123")
|
|
182
|
+
* // "https://tetrascience.com/my-org/file/abc-123"
|
|
183
|
+
*
|
|
184
|
+
* @param baseUrl - The TDP base URL (origin + optional org prefix)
|
|
185
|
+
* @param path - The TDP page path (e.g., "/file/abc-123")
|
|
186
|
+
* @returns The full TDP URL, or null if construction fails
|
|
187
|
+
*/
|
|
188
|
+
export declare function buildTdpUrl(baseUrl: string, path: string): string | null;
|
|
189
|
+
|
|
190
|
+
export declare const Button: ({ children, variant, size, loading, leftIcon, rightIcon, noPadding, fullWidth, disabled, ref, ...rest }: ButtonProps) => JSX.Element;
|
|
191
|
+
|
|
192
|
+
export declare const ButtonControl: default_2.FC<ButtonControlProps>;
|
|
193
|
+
|
|
194
|
+
export declare const ButtonControlGroup: default_2.FC<ButtonControlGroupProps>;
|
|
195
|
+
|
|
196
|
+
export declare interface ButtonControlGroupProps {
|
|
197
|
+
controls: ButtonControlItem[];
|
|
198
|
+
selectedId?: string;
|
|
199
|
+
onChange?: (id: string) => void;
|
|
200
|
+
vertical?: boolean;
|
|
201
|
+
disabled?: boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
declare interface ButtonControlItem extends ButtonControlProps {
|
|
205
|
+
id: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare interface ButtonControlProps {
|
|
209
|
+
icon?: default_2.ReactNode;
|
|
210
|
+
selected?: boolean;
|
|
211
|
+
disabled?: boolean;
|
|
212
|
+
onClick?: () => void;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
216
|
+
children: default_2.ReactNode;
|
|
217
|
+
variant?: ButtonVariant;
|
|
218
|
+
size?: ButtonSize;
|
|
219
|
+
loading?: boolean;
|
|
220
|
+
leftIcon?: default_2.ReactNode;
|
|
221
|
+
rightIcon?: default_2.ReactNode;
|
|
222
|
+
noPadding?: boolean;
|
|
223
|
+
fullWidth?: boolean;
|
|
224
|
+
ref?: default_2.Ref<HTMLButtonElement>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare type ButtonSize = "small" | "medium";
|
|
228
|
+
|
|
229
|
+
declare type ButtonVariant = "primary" | "secondary" | "tertiary";
|
|
230
|
+
|
|
231
|
+
export declare const Card: ({ children, title, size, variant, className, fullWidth, ref, ...rest }: CardProps) => JSX.Element;
|
|
232
|
+
|
|
233
|
+
export declare interface CardProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
234
|
+
children: default_2.ReactNode;
|
|
235
|
+
title?: default_2.ReactNode;
|
|
236
|
+
size?: CardSize;
|
|
237
|
+
variant?: CardVariant;
|
|
238
|
+
className?: string;
|
|
239
|
+
fullWidth?: boolean;
|
|
240
|
+
ref?: default_2.Ref<HTMLDivElement>;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export declare const CardSidebar: ({ title, description, buttonText, linkText, status, onButtonClick, onLinkClick, className, ref, }: CardSidebarProps) => JSX.Element;
|
|
244
|
+
|
|
245
|
+
export declare interface CardSidebarProps {
|
|
246
|
+
title: string;
|
|
247
|
+
description?: string;
|
|
248
|
+
buttonText?: string;
|
|
249
|
+
linkText?: string;
|
|
250
|
+
status?: CardSidebarStatus;
|
|
251
|
+
onButtonClick?: () => void;
|
|
252
|
+
onLinkClick?: () => void;
|
|
253
|
+
className?: string;
|
|
254
|
+
ref?: default_2.Ref<HTMLDivElement>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare type CardSidebarStatus = "default" | "active" | "hover" | "disabled";
|
|
258
|
+
|
|
259
|
+
declare type CardSize = "small" | "medium" | "large";
|
|
260
|
+
|
|
261
|
+
declare type CardVariant = "default" | "outlined" | "elevated";
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Chart color palette for consistent graph styling
|
|
265
|
+
* Uses the primary graph colors from the design system
|
|
266
|
+
*/
|
|
267
|
+
export declare const CHART_COLORS: readonly [string, string, string, string, string, string, string, string, string, string, string, string];
|
|
268
|
+
|
|
269
|
+
export declare const Checkbox: ({ checked, onChange, disabled, className, onClick, label, noPadding, ref, }: CheckboxProps) => JSX.Element;
|
|
270
|
+
|
|
271
|
+
export declare interface CheckboxProps {
|
|
272
|
+
checked?: boolean;
|
|
273
|
+
onChange?: (checked: boolean) => void;
|
|
274
|
+
disabled?: boolean;
|
|
275
|
+
className?: string;
|
|
276
|
+
onClick?: (e: default_2.MouseEvent) => void;
|
|
277
|
+
label?: default_2.ReactNode;
|
|
278
|
+
noPadding?: boolean;
|
|
279
|
+
ref?: default_2.Ref<HTMLInputElement>;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export declare const Chromatogram: default_2.FC<ChromatogramProps>;
|
|
283
|
+
|
|
284
|
+
export declare const ChromatogramChart: default_2.FC<ChromatogramChartProps>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Props for ChromatogramChart component
|
|
288
|
+
*/
|
|
289
|
+
export declare interface ChromatogramChartProps {
|
|
290
|
+
/** Array of data series to display */
|
|
291
|
+
series: ChromatogramSeries[];
|
|
292
|
+
/** Chart width in pixels */
|
|
293
|
+
width?: number;
|
|
294
|
+
/** Chart height in pixels */
|
|
295
|
+
height?: number;
|
|
296
|
+
/** Chart title */
|
|
297
|
+
title?: string;
|
|
298
|
+
/** X-axis label */
|
|
299
|
+
xAxisTitle?: string;
|
|
300
|
+
/** Y-axis label */
|
|
301
|
+
yAxisTitle?: string;
|
|
302
|
+
/** Peak annotations to display */
|
|
303
|
+
annotations?: PeakAnnotation[];
|
|
304
|
+
/** Fixed x-axis range [min, max] */
|
|
305
|
+
xRange?: [number, number];
|
|
306
|
+
/** Fixed y-axis range [min, max] */
|
|
307
|
+
yRange?: [number, number];
|
|
308
|
+
/** Show legend (default: true) */
|
|
309
|
+
showLegend?: boolean;
|
|
310
|
+
/** Show vertical grid lines (default: true) */
|
|
311
|
+
showGridX?: boolean;
|
|
312
|
+
/** Show horizontal grid lines (default: true) */
|
|
313
|
+
showGridY?: boolean;
|
|
314
|
+
/** Show data point markers (default: false) */
|
|
315
|
+
showMarkers?: boolean;
|
|
316
|
+
/** Marker size when showMarkers is true (default: 4) */
|
|
317
|
+
markerSize?: number;
|
|
318
|
+
/** Show crosshairs on hover (default: false) */
|
|
319
|
+
showCrosshairs?: boolean;
|
|
320
|
+
/** Baseline correction method (default: "none") */
|
|
321
|
+
baselineCorrection?: BaselineCorrectionMethod;
|
|
322
|
+
/** Rolling baseline window size (default: 50) */
|
|
323
|
+
baselineWindowSize?: number;
|
|
324
|
+
/** Peak detection algorithm options - if provided, enables automatic peak detection */
|
|
325
|
+
peakDetectionOptions?: PeakDetectionOptions;
|
|
326
|
+
/** Show peak areas as annotations (default: false) */
|
|
327
|
+
showPeakAreas?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Show peak boundary markers (default: "none").
|
|
330
|
+
* - "none": No boundary markers displayed
|
|
331
|
+
* - "enabled": Show boundary markers using per-peak startMarker/endMarker settings
|
|
332
|
+
*
|
|
333
|
+
* Per-peak marker defaults: startMarker="triangle", endMarker="diamond"
|
|
334
|
+
*/
|
|
335
|
+
boundaryMarkers?: BoundaryMarkerStyle;
|
|
336
|
+
/**
|
|
337
|
+
* Retention time threshold for grouping overlapping annotations (default: 0.4 minutes).
|
|
338
|
+
* Peaks closer than this threshold will have their annotations staggered to avoid overlap.
|
|
339
|
+
*/
|
|
340
|
+
annotationOverlapThreshold?: number;
|
|
341
|
+
/** Show export button in modebar (default: true) */
|
|
342
|
+
showExportButton?: boolean;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export declare interface ChromatogramProps {
|
|
346
|
+
data?: PeakData[];
|
|
347
|
+
width?: number;
|
|
348
|
+
height?: number;
|
|
349
|
+
positionInterval?: number;
|
|
350
|
+
colorA?: string;
|
|
351
|
+
colorT?: string;
|
|
352
|
+
colorG?: string;
|
|
353
|
+
colorC?: string;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Type definitions for ChromatogramChart component
|
|
358
|
+
*/
|
|
359
|
+
/**
|
|
360
|
+
* Data series for chromatogram visualization
|
|
361
|
+
*/
|
|
362
|
+
export declare interface ChromatogramSeries {
|
|
363
|
+
/** Retention time values (x-axis) */
|
|
364
|
+
x: number[];
|
|
365
|
+
/** Signal intensity values (y-axis) */
|
|
366
|
+
y: number[];
|
|
367
|
+
/** Series label for legend */
|
|
368
|
+
name: string;
|
|
369
|
+
/** Optional color override (auto-assigned from CHART_COLORS if not provided) */
|
|
370
|
+
color?: string;
|
|
371
|
+
/** Optional metadata for the trace (displayed in tooltip on hover) */
|
|
372
|
+
metadata?: Record<string, unknown>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare type CodeComponentProps = ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & ExtraProps & {
|
|
376
|
+
inline?: boolean;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export declare const CodeEditor: default_2.FC<CodeEditorProps>;
|
|
380
|
+
|
|
381
|
+
export declare interface CodeEditorProps {
|
|
382
|
+
value: string;
|
|
383
|
+
onChange: OnChange;
|
|
384
|
+
language?: string;
|
|
385
|
+
theme?: "light" | "dark";
|
|
386
|
+
height?: string | number;
|
|
387
|
+
width?: string | number;
|
|
388
|
+
options?: Record<string, unknown>;
|
|
389
|
+
label?: string;
|
|
390
|
+
onCopy?: (code: string) => void;
|
|
391
|
+
onLaunch?: (code: string) => void;
|
|
392
|
+
disabled?: boolean;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Renders an 'Edit code' button that opens a modal with a Monaco code editor.
|
|
397
|
+
*/
|
|
398
|
+
export declare const CodeScriptEditorButton: ({ initialCode, onCodeSave, language, buttonText, modalTitle, buttonProps, modalProps, disabled, }: CodeScriptEditorButtonProps) => JSX.Element;
|
|
399
|
+
|
|
400
|
+
export declare interface CodeScriptEditorButtonProps {
|
|
401
|
+
initialCode?: string;
|
|
402
|
+
onCodeSave?: (newCode: string) => void;
|
|
403
|
+
language?: string;
|
|
404
|
+
buttonText?: string;
|
|
405
|
+
modalTitle?: string;
|
|
406
|
+
buttonProps?: React.ComponentProps<typeof Button>;
|
|
407
|
+
modalProps?: Omit<React.ComponentProps<typeof Modal>, "isOpen" | "onConfirm" | "onClose">;
|
|
408
|
+
disabled?: boolean;
|
|
409
|
+
isEditMode?: boolean;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Color mapping configuration
|
|
414
|
+
*/
|
|
415
|
+
export declare interface ColorMapping {
|
|
416
|
+
/** Type of mapping: data-driven or static */
|
|
417
|
+
type: "static" | "continuous" | "categorical";
|
|
418
|
+
/** Static color value (for type: "static") */
|
|
419
|
+
value?: string;
|
|
420
|
+
/** Data field to map (for type: "continuous" | "categorical") */
|
|
421
|
+
field?: string;
|
|
422
|
+
/** Color scale for continuous mapping */
|
|
423
|
+
colorScale?: string | Array<[number, string]>;
|
|
424
|
+
/** Discrete colors for categorical mapping */
|
|
425
|
+
categoryColors?: Record<string, string>;
|
|
426
|
+
/** Min/max values for continuous mapping (auto-calculated if not provided) */
|
|
427
|
+
min?: number;
|
|
428
|
+
max?: number;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Centralized color tokens that map to CSS variables
|
|
433
|
+
* This provides TypeScript support while leveraging CSS custom properties
|
|
434
|
+
*/
|
|
435
|
+
export declare const COLORS: {
|
|
436
|
+
readonly BLACK_50: string;
|
|
437
|
+
readonly BLACK_100: string;
|
|
438
|
+
readonly BLACK_200: string;
|
|
439
|
+
readonly BLACK_300: string;
|
|
440
|
+
readonly BLACK_400: string;
|
|
441
|
+
readonly BLACK_500: string;
|
|
442
|
+
readonly BLACK_600: string;
|
|
443
|
+
readonly BLACK_700: string;
|
|
444
|
+
readonly BLACK_800: string;
|
|
445
|
+
readonly BLACK_900: string;
|
|
446
|
+
readonly BLACK: string;
|
|
447
|
+
readonly BLACK_OPACITY_20: "rgba(26, 26, 26, 0.2)";
|
|
448
|
+
readonly WHITE_50: string;
|
|
449
|
+
readonly WHITE_100: string;
|
|
450
|
+
readonly WHITE_200: string;
|
|
451
|
+
readonly WHITE_300: string;
|
|
452
|
+
readonly WHITE_400: string;
|
|
453
|
+
readonly WHITE_500: string;
|
|
454
|
+
readonly WHITE_600: string;
|
|
455
|
+
readonly WHITE_700: string;
|
|
456
|
+
readonly WHITE_800: string;
|
|
457
|
+
readonly WHITE_900: string;
|
|
458
|
+
readonly WHITE: string;
|
|
459
|
+
readonly BLUE_50: string;
|
|
460
|
+
readonly BLUE_100: string;
|
|
461
|
+
readonly BLUE_200: string;
|
|
462
|
+
readonly BLUE_300: string;
|
|
463
|
+
readonly BLUE_400: string;
|
|
464
|
+
readonly BLUE_500: string;
|
|
465
|
+
readonly BLUE_600: string;
|
|
466
|
+
readonly BLUE_700: string;
|
|
467
|
+
readonly BLUE_800: string;
|
|
468
|
+
readonly BLUE_900: string;
|
|
469
|
+
readonly BLUE: string;
|
|
470
|
+
readonly GREY_50: string;
|
|
471
|
+
readonly GREY_100: string;
|
|
472
|
+
readonly GREY_200: string;
|
|
473
|
+
readonly GREY_300: string;
|
|
474
|
+
readonly GREY_400: string;
|
|
475
|
+
readonly GREY_500: string;
|
|
476
|
+
readonly GREY_600: string;
|
|
477
|
+
readonly GREY_700: string;
|
|
478
|
+
readonly GREY_800: string;
|
|
479
|
+
readonly GREY_900: string;
|
|
480
|
+
readonly GREY: string;
|
|
481
|
+
readonly ORANGE: string;
|
|
482
|
+
readonly RED: string;
|
|
483
|
+
readonly GREEN: string;
|
|
484
|
+
readonly YELLOW: string;
|
|
485
|
+
readonly PURPLE: string;
|
|
486
|
+
readonly GREEN_BG: string;
|
|
487
|
+
readonly GREEN_SUCCESS: string;
|
|
488
|
+
readonly ORANGE_BG: string;
|
|
489
|
+
readonly ORANGE_CAUTION: string;
|
|
490
|
+
readonly RED_BG: string;
|
|
491
|
+
readonly RED_ERROR: string;
|
|
492
|
+
readonly GRAPH_SECONDARY_BROWN: string;
|
|
493
|
+
readonly GRAPH_SECONDARY_PINK: string;
|
|
494
|
+
readonly GRAPH_SECONDARY_TEAL: string;
|
|
495
|
+
readonly GRAPH_SECONDARY_DARK_BLUE: string;
|
|
496
|
+
readonly GRAPH_SECONDARY_BLACK: string;
|
|
497
|
+
readonly GRAPH_SECONDARY_GREY: string;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Color scale definition for the heatmap visualization mode.
|
|
502
|
+
*
|
|
503
|
+
* Can be:
|
|
504
|
+
* - A named Plotly colorscale (e.g., "Viridis", "Blues", "Hot")
|
|
505
|
+
* - An array of [position, color] tuples where position is 0-1
|
|
506
|
+
*
|
|
507
|
+
* @example
|
|
508
|
+
* // Named colorscale
|
|
509
|
+
* colorScale="Viridis"
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* // Custom gradient
|
|
513
|
+
* colorScale={[
|
|
514
|
+
* [0, "#313695"], // Dark blue at min
|
|
515
|
+
* [0.5, "#ffffbf"], // Yellow at midpoint
|
|
516
|
+
* [1, "#a50026"], // Dark red at max
|
|
517
|
+
* ]}
|
|
518
|
+
*/
|
|
519
|
+
export declare type ColorScale = string | Array<[number, string]>;
|
|
520
|
+
|
|
521
|
+
export declare type ColorToken = keyof typeof COLORS;
|
|
522
|
+
|
|
523
|
+
/** Common props shared by both search modes */
|
|
524
|
+
declare interface CommonTdpSearchProps {
|
|
525
|
+
/** Default search term (default query) */
|
|
526
|
+
defaultQuery?: string;
|
|
527
|
+
/** Display fields/columns for the results table */
|
|
528
|
+
columns: TdpSearchColumn[];
|
|
529
|
+
/** UI filters displayed as dropdowns (for user selection) */
|
|
530
|
+
filters?: TdpSearchFilter[];
|
|
531
|
+
/** Default sort configuration (sort options) */
|
|
532
|
+
defaultSort?: TdpSearchSort;
|
|
533
|
+
/**
|
|
534
|
+
* Additional search parameters to pass to the SDK's searchEql method.
|
|
535
|
+
* Allows customization of expression, selectedPipelineIds, selectedSourceTypes, etc.
|
|
536
|
+
*/
|
|
537
|
+
advancedSearchParams?: Partial<Omit<SearchEqlRequest, "searchTerm" | "from" | "size" | "sort" | "order">>;
|
|
538
|
+
/** Results per page. Defaults to 10 */
|
|
539
|
+
pageSize?: number;
|
|
540
|
+
/** Search input placeholder text */
|
|
541
|
+
searchPlaceholder?: string;
|
|
542
|
+
/** Custom CSS class */
|
|
543
|
+
className?: string;
|
|
544
|
+
/** Callback fired when search is executed with the query and results */
|
|
545
|
+
onSearch?: (query: SearchEqlRequest, results: SearchResult[]) => void;
|
|
546
|
+
/** Replace the entire search bar (input + button) */
|
|
547
|
+
renderSearchBar?: (props: TdpSearchBarRenderProps) => default_2.ReactNode;
|
|
548
|
+
/** Replace the filters row */
|
|
549
|
+
renderFilters?: (props: TdpFiltersRenderProps) => default_2.ReactNode;
|
|
550
|
+
/** Replace the results table (and pagination) */
|
|
551
|
+
renderResults?: (props: TdpResultsRenderProps) => default_2.ReactNode;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Default category colors (cycle through these)
|
|
556
|
+
*/
|
|
557
|
+
export declare const DEFAULT_CATEGORY_COLORS: string[];
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Default color scale for continuous color mapping
|
|
561
|
+
*/
|
|
562
|
+
export declare const DEFAULT_COLOR_SCALE: Array<[number, string]>;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Default sizes
|
|
566
|
+
*/
|
|
567
|
+
export declare const DEFAULT_MARKER_SIZE = 8;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Default downsampling configuration
|
|
571
|
+
*/
|
|
572
|
+
export declare const DEFAULT_MAX_POINTS = 5000;
|
|
573
|
+
|
|
574
|
+
export declare const DEFAULT_SIZE_RANGE: [number, number];
|
|
575
|
+
|
|
576
|
+
export declare const defaultTheme: Theme;
|
|
577
|
+
|
|
578
|
+
export declare const DotPlot: default_2.FC<DotPlotProps>;
|
|
579
|
+
|
|
580
|
+
export declare interface DotPlotDataSeries {
|
|
581
|
+
x: number[];
|
|
582
|
+
y: number[];
|
|
583
|
+
name: string;
|
|
584
|
+
color?: string;
|
|
585
|
+
symbol?: MarkerSymbol_2;
|
|
586
|
+
size?: number;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export declare type DotPlotProps = {
|
|
590
|
+
dataSeries: DotPlotDataSeries | DotPlotDataSeries[];
|
|
591
|
+
width?: number;
|
|
592
|
+
height?: number;
|
|
593
|
+
title?: string;
|
|
594
|
+
xTitle?: string;
|
|
595
|
+
yTitle?: string;
|
|
596
|
+
variant?: DotPlotVariant;
|
|
597
|
+
markerSize?: number;
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
export declare type DotPlotVariant = "default" | "stacked";
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Downsampling configuration for performance optimization
|
|
604
|
+
*/
|
|
605
|
+
export declare interface DownsamplingConfig {
|
|
606
|
+
/** Enable downsampling */
|
|
607
|
+
enabled: boolean;
|
|
608
|
+
/** Target number of points to display */
|
|
609
|
+
maxPoints?: number;
|
|
610
|
+
/** Downsampling strategy */
|
|
611
|
+
strategy?: "lttb";
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
export declare const Dropdown: default_2.FC<DropdownProps>;
|
|
615
|
+
|
|
616
|
+
export declare interface DropdownOption {
|
|
617
|
+
value: string;
|
|
618
|
+
label: string;
|
|
619
|
+
disabled?: boolean;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export declare interface DropdownProps {
|
|
623
|
+
options: DropdownOption[];
|
|
624
|
+
value?: string;
|
|
625
|
+
placeholder?: string;
|
|
626
|
+
disabled?: boolean;
|
|
627
|
+
error?: boolean;
|
|
628
|
+
size?: DropdownSize;
|
|
629
|
+
onChange?: (value: string) => void;
|
|
630
|
+
onOpen?: () => void;
|
|
631
|
+
onClose?: () => void;
|
|
632
|
+
width?: string;
|
|
633
|
+
menuWidth?: string;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
declare type DropdownSize = "xsmall" | "small";
|
|
637
|
+
|
|
638
|
+
export declare const ErrorAlert: default_2.FC<ErrorAlertProps>;
|
|
639
|
+
|
|
640
|
+
export declare interface ErrorAlertProps {
|
|
641
|
+
/** The error object to display. Can be Error, AxiosError, string, or any other type. */
|
|
642
|
+
error: unknown;
|
|
643
|
+
/** Optional title for the error alert. Defaults to 'An Error Occurred'. */
|
|
644
|
+
title?: default_2.ReactNode;
|
|
645
|
+
/** Optional callback function when the alert is closed. */
|
|
646
|
+
onClose?: () => void;
|
|
647
|
+
/** Set to true to show technical details expanded by default. Defaults to false. */
|
|
648
|
+
showDetailsDefault?: boolean;
|
|
649
|
+
/** Custom message to show when error is null/undefined (optional, component renders nothing by default) */
|
|
650
|
+
noErrorContent?: default_2.ReactNode;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export declare const FormField: ({ label, infoText, supportiveText, showSupportiveCheck, className, ref, ...inputProps }: FormFieldProps) => JSX.Element;
|
|
654
|
+
|
|
655
|
+
export declare interface FormFieldProps extends Omit<InputProps, "className"> {
|
|
656
|
+
label: string;
|
|
657
|
+
infoText?: string;
|
|
658
|
+
supportiveText?: string;
|
|
659
|
+
showSupportiveCheck?: boolean;
|
|
660
|
+
className?: string;
|
|
661
|
+
ref?: default_2.Ref<HTMLInputElement>;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* TDP Navigation Utilities
|
|
666
|
+
*
|
|
667
|
+
* Pure utility functions for constructing and navigating to TDP URLs.
|
|
668
|
+
* These work independently of React and can be used in any context.
|
|
669
|
+
*
|
|
670
|
+
* Data apps run inside iframes within TDP. These utilities help resolve
|
|
671
|
+
* the TDP base URL from the iframe context and construct navigation URLs.
|
|
672
|
+
*/
|
|
673
|
+
/**
|
|
674
|
+
* Extract the TDP base URL from `document.referrer`.
|
|
675
|
+
*
|
|
676
|
+
* In production, data apps run inside iframes within TDP. The browser
|
|
677
|
+
* provides `document.referrer` containing the parent TDP page URL.
|
|
678
|
+
* This function strips the known route path to get the base URL
|
|
679
|
+
* (origin + org slug path prefix).
|
|
680
|
+
*
|
|
681
|
+
* @example
|
|
682
|
+
* // referrer: "https://tetrascience-uat.com/my-org/data-workspace/abc"
|
|
683
|
+
* getTdpBaseUrlFromReferrer() // "https://tetrascience-uat.com/my-org"
|
|
684
|
+
*
|
|
685
|
+
* @returns The TDP base URL, or null if detection fails
|
|
686
|
+
*/
|
|
687
|
+
export declare function getTdpBaseUrlFromReferrer(): string | null;
|
|
688
|
+
|
|
689
|
+
export declare const Heatmap: default_2.FC<HeatmapProps>;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Props for the Heatmap component
|
|
693
|
+
* @deprecated Use PlateMap component instead. Heatmap is now a wrapper around PlateMap for backward compatibility.
|
|
694
|
+
*/
|
|
695
|
+
export declare interface HeatmapProps {
|
|
696
|
+
/** 2D array of numeric values */
|
|
697
|
+
data?: number[][];
|
|
698
|
+
/** Custom x-axis labels (column labels) */
|
|
699
|
+
xLabels?: string[] | number[];
|
|
700
|
+
/** Custom y-axis labels (row labels) */
|
|
701
|
+
yLabels?: string[] | number[];
|
|
702
|
+
/** Chart title */
|
|
703
|
+
title?: string;
|
|
704
|
+
/** X-axis title */
|
|
705
|
+
xTitle?: string;
|
|
706
|
+
/** Y-axis title */
|
|
707
|
+
yTitle?: string;
|
|
708
|
+
/** Color scale - string name or array of [position, color] pairs */
|
|
709
|
+
colorscale?: string | Array<[number, string]>;
|
|
710
|
+
/** Chart width in pixels */
|
|
711
|
+
width?: number;
|
|
712
|
+
/** Chart height in pixels */
|
|
713
|
+
height?: number;
|
|
714
|
+
/** Show color scale legend */
|
|
715
|
+
showScale?: boolean;
|
|
716
|
+
/** Number of decimal places for values */
|
|
717
|
+
precision?: number;
|
|
718
|
+
/** Minimum value for color scale */
|
|
719
|
+
zmin?: number;
|
|
720
|
+
/** Maximum value for color scale */
|
|
721
|
+
zmax?: number;
|
|
722
|
+
/** Value unit suffix */
|
|
723
|
+
valueUnit?: string;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export declare const Histogram: default_2.FC<HistogramProps>;
|
|
727
|
+
|
|
728
|
+
export declare interface HistogramDataSeries {
|
|
729
|
+
x: number[];
|
|
730
|
+
name: string;
|
|
731
|
+
color?: string;
|
|
732
|
+
autobinx?: boolean;
|
|
733
|
+
xbins?: {
|
|
734
|
+
start: number;
|
|
735
|
+
end: number;
|
|
736
|
+
size: number;
|
|
737
|
+
};
|
|
738
|
+
opacity?: number;
|
|
739
|
+
showDistributionLine?: boolean;
|
|
740
|
+
lineWidth?: number;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export declare type HistogramProps = {
|
|
744
|
+
dataSeries: HistogramDataSeries | HistogramDataSeries[];
|
|
745
|
+
width?: number;
|
|
746
|
+
height?: number;
|
|
747
|
+
title?: string;
|
|
748
|
+
xTitle?: string;
|
|
749
|
+
yTitle?: string;
|
|
750
|
+
bargap?: number;
|
|
751
|
+
showDistributionLine?: boolean;
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
export declare const Icon: (props: IconsProps) => JSX.Element;
|
|
755
|
+
|
|
756
|
+
export declare enum IconName {
|
|
757
|
+
BARS_3_BOTTOM_LEFT = "bars-3-bottom-left",
|
|
758
|
+
BUILDING = "building",
|
|
759
|
+
BULK_CHECK = "bulk-check",
|
|
760
|
+
CHECK = "check",
|
|
761
|
+
CHECK_CIRCLE = "check-circle",
|
|
762
|
+
CHECK_SQUARE = "check-square",
|
|
763
|
+
CHEVRON_DOWN = "chevron-down",
|
|
764
|
+
CLOSE = "close",
|
|
765
|
+
CODE = "code",
|
|
766
|
+
COMPUTER = "computer",
|
|
767
|
+
COPY = "copy",
|
|
768
|
+
CUBE = "cube",
|
|
769
|
+
DATABASE = "database",
|
|
770
|
+
EXCLAMATION_CIRCLE = "exclamation-circle",
|
|
771
|
+
EXCLAMATION_TRIANGLE = "exclamation-triangle",
|
|
772
|
+
GEAR = "gear",
|
|
773
|
+
GLobe = "globe",
|
|
774
|
+
HASHTAG = "hashtag",
|
|
775
|
+
HOME = "home",
|
|
776
|
+
INBOX = "inbox",
|
|
777
|
+
INFORMATION_CIRCLE = "information-circle",
|
|
778
|
+
INFORMATION_CIRCLE_MICRO = "information-circle-micro",
|
|
779
|
+
LAMP = "lamp",
|
|
780
|
+
LOCK_OPEN = "lock-open",
|
|
781
|
+
MINUS = "minus",
|
|
782
|
+
PAPER_PLANE = "paper-plane",
|
|
783
|
+
PENCIL = "pencil",
|
|
784
|
+
PIE_CHART = "pie-chart",
|
|
785
|
+
PIPELINE = "pipeline",
|
|
786
|
+
PLUS = "plus",
|
|
787
|
+
PROFILE = "profile",
|
|
788
|
+
QUESTION_CIRCLE = "question-circle",
|
|
789
|
+
ROCKET_LAUNCH = "rocket-launch",
|
|
790
|
+
SEARCH = "search",
|
|
791
|
+
SEARCH_DOCUMENT = "search-document",
|
|
792
|
+
SEARCH_SQL = "search-sql",
|
|
793
|
+
SITEMAP = "sitemap",
|
|
794
|
+
TETRASCIENCE_ICON = "tetrascience-icon",
|
|
795
|
+
TEXT = "text",
|
|
796
|
+
TRASH = "trash",
|
|
797
|
+
VIEWFINDER_CIRCLE = "viewfinder-circle"
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export declare interface IconProps {
|
|
801
|
+
fill?: string;
|
|
802
|
+
width?: string;
|
|
803
|
+
height?: string;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
export declare interface IconsProps {
|
|
807
|
+
fill?: string;
|
|
808
|
+
width?: string;
|
|
809
|
+
height?: string;
|
|
810
|
+
name: IconName;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export declare const Input: ({ size, iconLeft, iconRight, error, disabled, ref, ...rest }: InputProps) => JSX.Element;
|
|
814
|
+
|
|
815
|
+
export declare interface InputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
816
|
+
size?: InputSize;
|
|
817
|
+
iconLeft?: default_2.ReactNode;
|
|
818
|
+
iconRight?: default_2.ReactNode;
|
|
819
|
+
error?: boolean;
|
|
820
|
+
disabled?: boolean;
|
|
821
|
+
ref?: default_2.Ref<HTMLInputElement>;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
declare type InputSize = "xsmall" | "small";
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* InteractiveScatter component for visualizing scatter plot data with advanced interactions.
|
|
828
|
+
*
|
|
829
|
+
* **Features:**
|
|
830
|
+
* - Data-driven and static styling (color, shape, size)
|
|
831
|
+
* - Interactive selection (click, box, lasso)
|
|
832
|
+
* - Keyboard modifiers for click-selection modes (Shift/Ctrl)
|
|
833
|
+
* - Customizable tooltips with rich content support
|
|
834
|
+
* - Axis customization (ranges, log/linear scales)
|
|
835
|
+
* - Performance optimizations for large datasets
|
|
836
|
+
* - Selection propagation via callbacks
|
|
837
|
+
*
|
|
838
|
+
* **Selection Modes (click selection only):**
|
|
839
|
+
* - Default click: Replace selection
|
|
840
|
+
* - Shift + click: Add to selection
|
|
841
|
+
* - Ctrl/Cmd + click: Remove from selection
|
|
842
|
+
* - Shift + Ctrl + click: Toggle selection
|
|
843
|
+
*
|
|
844
|
+
* Box/lasso selection always replaces the current selection because
|
|
845
|
+
* Plotly does not expose the original keyboard event for drag operations.
|
|
846
|
+
*/
|
|
847
|
+
export declare const InteractiveScatter: default_2.FC<InteractiveScatterProps>;
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* Props for InteractiveScatter component
|
|
851
|
+
*/
|
|
852
|
+
export declare interface InteractiveScatterProps {
|
|
853
|
+
/**
|
|
854
|
+
* Array of data points to plot
|
|
855
|
+
*/
|
|
856
|
+
data: ScatterPoint[];
|
|
857
|
+
/**
|
|
858
|
+
* Chart title
|
|
859
|
+
*/
|
|
860
|
+
title?: string;
|
|
861
|
+
/**
|
|
862
|
+
* X-axis configuration
|
|
863
|
+
*/
|
|
864
|
+
xAxis?: AxisConfig;
|
|
865
|
+
/**
|
|
866
|
+
* Y-axis configuration
|
|
867
|
+
*/
|
|
868
|
+
yAxis?: AxisConfig;
|
|
869
|
+
/**
|
|
870
|
+
* Color mapping configuration
|
|
871
|
+
*/
|
|
872
|
+
colorMapping?: ColorMapping;
|
|
873
|
+
/**
|
|
874
|
+
* Shape mapping configuration
|
|
875
|
+
*/
|
|
876
|
+
shapeMapping?: ShapeMapping;
|
|
877
|
+
/**
|
|
878
|
+
* Size mapping configuration
|
|
879
|
+
*/
|
|
880
|
+
sizeMapping?: SizeMapping;
|
|
881
|
+
/**
|
|
882
|
+
* Tooltip configuration
|
|
883
|
+
*/
|
|
884
|
+
tooltip?: TooltipConfig;
|
|
885
|
+
/**
|
|
886
|
+
* Enable click selection
|
|
887
|
+
* @default true
|
|
888
|
+
*/
|
|
889
|
+
enableClickSelection?: boolean;
|
|
890
|
+
/**
|
|
891
|
+
* Enable box selection (drag to select rectangular region)
|
|
892
|
+
* @default true
|
|
893
|
+
*/
|
|
894
|
+
enableBoxSelection?: boolean;
|
|
895
|
+
/**
|
|
896
|
+
* Enable lasso selection (freeform selection)
|
|
897
|
+
* @default true
|
|
898
|
+
*/
|
|
899
|
+
enableLassoSelection?: boolean;
|
|
900
|
+
/**
|
|
901
|
+
* Controlled selection state.
|
|
902
|
+
* If provided, component operates in controlled mode.
|
|
903
|
+
*/
|
|
904
|
+
selectedIds?: Set<string | number>;
|
|
905
|
+
/**
|
|
906
|
+
* Callback when selection changes
|
|
907
|
+
*/
|
|
908
|
+
onSelectionChange?: (selectedIds: Set<string | number>, mode: SelectionMode_2) => void;
|
|
909
|
+
/**
|
|
910
|
+
* Callback when a point is clicked
|
|
911
|
+
*/
|
|
912
|
+
onPointClick?: (point: ScatterPoint, event: MouseEvent) => void;
|
|
913
|
+
/**
|
|
914
|
+
* Downsampling configuration for large datasets
|
|
915
|
+
*/
|
|
916
|
+
downsampling?: DownsamplingConfig;
|
|
917
|
+
/**
|
|
918
|
+
* Chart width in pixels
|
|
919
|
+
* @default 800
|
|
920
|
+
*/
|
|
921
|
+
width?: number;
|
|
922
|
+
/**
|
|
923
|
+
* Chart height in pixels
|
|
924
|
+
* @default 600
|
|
925
|
+
*/
|
|
926
|
+
height?: number;
|
|
927
|
+
/**
|
|
928
|
+
* Show the continuous color-scale bar when using a continuous `colorMapping`.
|
|
929
|
+
* Has no effect for categorical or static mappings.
|
|
930
|
+
* @default true
|
|
931
|
+
*/
|
|
932
|
+
showColorBar?: boolean;
|
|
933
|
+
/**
|
|
934
|
+
* Custom CSS class name
|
|
935
|
+
*/
|
|
936
|
+
className?: string;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export declare const Label: default_2.FC<LabelProps>;
|
|
940
|
+
|
|
941
|
+
export declare interface LabelProps {
|
|
942
|
+
children: default_2.ReactNode;
|
|
943
|
+
infoText?: string;
|
|
944
|
+
className?: string;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export declare const LaunchContent: default_2.FC<LaunchContentProps>;
|
|
948
|
+
|
|
949
|
+
export declare interface LaunchContentProps {
|
|
950
|
+
initialCode?: string;
|
|
951
|
+
onDeploy?: () => void;
|
|
952
|
+
versions?: string[];
|
|
953
|
+
currentVersion?: string;
|
|
954
|
+
onVersionChange?: (version: string) => void;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Configuration for auto-generated layers when using WellData with `values`.
|
|
959
|
+
*
|
|
960
|
+
* When wells have multiple values (via the `values` property), layers are
|
|
961
|
+
* auto-generated from the unique keys. Use LayerConfig to customize the
|
|
962
|
+
* display name, visualization mode, and color scale for each layer.
|
|
963
|
+
*
|
|
964
|
+
* @example
|
|
965
|
+
* // Configure layers for wells with { values: { "Raw": 100, "Normalized": 0.5 } }
|
|
966
|
+
* const layerConfigs: LayerConfig[] = [
|
|
967
|
+
* { id: "Raw", name: "Raw Data", colorScale: "Blues" },
|
|
968
|
+
* { id: "Normalized", name: "Normalized Values", valueMin: 0, valueMax: 1 },
|
|
969
|
+
* ];
|
|
970
|
+
*/
|
|
971
|
+
declare interface LayerConfig {
|
|
972
|
+
/** Layer ID (must match a key in WellData.values) */
|
|
973
|
+
id: string;
|
|
974
|
+
/** Display name for the layer (defaults to id if not provided) */
|
|
975
|
+
name?: string;
|
|
976
|
+
/** Visualization mode for this layer */
|
|
977
|
+
visualizationMode?: VisualizationMode;
|
|
978
|
+
/** Color scale for this layer (for heatmap mode) */
|
|
979
|
+
colorScale?: ColorScale;
|
|
980
|
+
/** Minimum value for color scaling */
|
|
981
|
+
valueMin?: number;
|
|
982
|
+
/** Maximum value for color scaling */
|
|
983
|
+
valueMax?: number;
|
|
984
|
+
/** Value unit suffix for tooltips and colorbar (e.g., "RFU", "%"). A space is automatically added before the unit. */
|
|
985
|
+
valueUnit?: string;
|
|
986
|
+
/**
|
|
987
|
+
* Custom colors for categorical visualization mode.
|
|
988
|
+
* Keys are category values (strings from `values`), values are hex colors.
|
|
989
|
+
* Merged with DEFAULT_CATEGORY_COLORS.
|
|
990
|
+
*/
|
|
991
|
+
categoryColors?: Record<string, string>;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Configuration for legend styling and positioning.
|
|
996
|
+
*
|
|
997
|
+
* @example
|
|
998
|
+
* // Legend on the bottom with custom styling
|
|
999
|
+
* legendConfig={{
|
|
1000
|
+
* position: "bottom",
|
|
1001
|
+
* fontSize: 14,
|
|
1002
|
+
* itemSpacing: 12,
|
|
1003
|
+
* swatchSize: 20,
|
|
1004
|
+
* }}
|
|
1005
|
+
*/
|
|
1006
|
+
declare interface LegendConfig {
|
|
1007
|
+
/**
|
|
1008
|
+
* Position of the legend relative to the plate.
|
|
1009
|
+
* @default "right"
|
|
1010
|
+
*/
|
|
1011
|
+
position?: LegendPosition;
|
|
1012
|
+
/**
|
|
1013
|
+
* Font size for legend labels in pixels.
|
|
1014
|
+
* @default 12
|
|
1015
|
+
*/
|
|
1016
|
+
fontSize?: number;
|
|
1017
|
+
/**
|
|
1018
|
+
* Spacing between legend items in pixels.
|
|
1019
|
+
* @default 4
|
|
1020
|
+
*/
|
|
1021
|
+
itemSpacing?: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* Size of the color swatch in pixels.
|
|
1024
|
+
* @default 16
|
|
1025
|
+
*/
|
|
1026
|
+
swatchSize?: number;
|
|
1027
|
+
/**
|
|
1028
|
+
* Title to display above the legend.
|
|
1029
|
+
*/
|
|
1030
|
+
title?: string;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Position for the legend display.
|
|
1035
|
+
* - `"right"`: Legend appears to the right of the plate (default)
|
|
1036
|
+
* - `"bottom"`: Legend appears below the plate
|
|
1037
|
+
* - `"left"`: Legend appears to the left of the plate
|
|
1038
|
+
* - `"top"`: Legend appears above the plate
|
|
1039
|
+
*/
|
|
1040
|
+
declare type LegendPosition = "right" | "bottom" | "left" | "top";
|
|
1041
|
+
|
|
1042
|
+
export declare interface LineDataSeries {
|
|
1043
|
+
x: number[];
|
|
1044
|
+
y: number[];
|
|
1045
|
+
name: string;
|
|
1046
|
+
color: string;
|
|
1047
|
+
symbol?: MarkerSymbol;
|
|
1048
|
+
error_y?: {
|
|
1049
|
+
type: "data";
|
|
1050
|
+
array: number[];
|
|
1051
|
+
visible: boolean;
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export declare const LineGraph: default_2.FC<LineGraphProps>;
|
|
1056
|
+
|
|
1057
|
+
export declare type LineGraphProps = {
|
|
1058
|
+
dataSeries: LineDataSeries[];
|
|
1059
|
+
width?: number;
|
|
1060
|
+
height?: number;
|
|
1061
|
+
xRange?: [number, number];
|
|
1062
|
+
yRange?: [number, number];
|
|
1063
|
+
variant?: LineGraphVariant;
|
|
1064
|
+
xTitle?: string;
|
|
1065
|
+
yTitle?: string;
|
|
1066
|
+
title?: string;
|
|
1067
|
+
};
|
|
1068
|
+
|
|
1069
|
+
export declare type LineGraphVariant = "lines" | "lines+markers" | "lines+markers+error_bars";
|
|
1070
|
+
|
|
1071
|
+
export declare const Main: default_2.FC<MainProps>;
|
|
1072
|
+
|
|
1073
|
+
export declare interface MainProps {
|
|
1074
|
+
userProfile: {
|
|
1075
|
+
name: string;
|
|
1076
|
+
avatar?: string;
|
|
1077
|
+
};
|
|
1078
|
+
hostname: string;
|
|
1079
|
+
organization: {
|
|
1080
|
+
name: string;
|
|
1081
|
+
subtext?: string;
|
|
1082
|
+
logo?: default_2.ReactNode;
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
export declare const MarkdownDisplay: ({ markdown, codeRenderer }: MarkdownDisplayProps) => JSX.Element;
|
|
1087
|
+
|
|
1088
|
+
export declare type MarkdownDisplayProps = {
|
|
1089
|
+
markdown: string;
|
|
1090
|
+
codeRenderer?: (props: CodeComponentProps) => default_2.ReactElement;
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Marker shape for scatter points
|
|
1095
|
+
*/
|
|
1096
|
+
export declare type MarkerShape = "circle" | "square" | "diamond" | "cross" | "x" | "triangle-up" | "triangle-down" | "star";
|
|
1097
|
+
|
|
1098
|
+
export declare type MarkerSymbol = "circle" | "circle-open" | "circle-dot" | "circle-open-dot" | "square" | "square-open" | "square-dot" | "square-open-dot" | "diamond" | "diamond-open" | "diamond-dot" | "diamond-open-dot" | "cross" | "cross-open" | "cross-dot" | "cross-open-dot" | "x" | "x-open" | "x-dot" | "x-open-dot" | "triangle-up" | "triangle-up-open" | "triangle-up-dot" | "triangle-up-open-dot" | "triangle-down" | "triangle-down-open" | "triangle-down-dot" | "triangle-down-open-dot" | "triangle-left" | "triangle-left-open" | "triangle-left-dot" | "triangle-left-open-dot" | "triangle-right" | "triangle-right-open" | "triangle-right-dot" | "triangle-right-open-dot" | "triangle-ne" | "triangle-ne-open" | "triangle-ne-dot" | "triangle-ne-open-dot" | "triangle-se" | "triangle-se-open" | "triangle-se-dot" | "triangle-se-open-dot" | "triangle-sw" | "triangle-sw-open" | "triangle-sw-dot" | "triangle-sw-open-dot" | "triangle-nw" | "triangle-nw-open" | "triangle-nw-dot" | "triangle-nw-open-dot" | "pentagon" | "pentagon-open" | "pentagon-dot" | "pentagon-open-dot" | "hexagon" | "hexagon-open" | "hexagon-dot" | "hexagon-open-dot" | "hexagon2" | "hexagon2-open" | "hexagon2-dot" | "hexagon2-open-dot" | "octagon" | "octagon-open" | "octagon-dot" | "octagon-open-dot" | "star" | "star-open" | "star-dot" | "star-open-dot" | "hexagram" | "hexagram-open" | "hexagram-dot" | "hexagram-open-dot" | "star-triangle-up" | "star-triangle-up-open" | "star-triangle-up-dot" | "star-triangle-up-open-dot" | "star-triangle-down" | "star-triangle-down-open" | "star-triangle-down-dot" | "star-triangle-down-open-dot" | "star-square" | "star-square-open" | "star-square-dot" | "star-square-open-dot" | "star-diamond" | "star-diamond-open" | "star-diamond-dot" | "star-diamond-open-dot" | "diamond-tall" | "diamond-tall-open" | "diamond-tall-dot" | "diamond-tall-open-dot" | "diamond-wide" | "diamond-wide-open" | "diamond-wide-dot" | "diamond-wide-open-dot" | "hourglass" | "hourglass-open" | "bowtie" | "bowtie-open" | "circle-cross" | "circle-cross-open" | "circle-x" | "circle-x-open" | "square-cross" | "square-cross-open" | "square-x" | "square-x-open" | "diamond-cross" | "diamond-cross-open" | "diamond-x" | "diamond-x-open" | "cross-thin" | "cross-thin-open" | "x-thin" | "x-thin-open" | "asterisk" | "asterisk-open" | "hash" | "hash-open" | "hash-dot" | "hash-open-dot" | "y-up" | "y-up-open" | "y-down" | "y-down-open" | "y-left" | "y-left-open" | "y-right" | "y-right-open" | "line-ew" | "line-ew-open" | "line-ns" | "line-ns-open" | "line-ne" | "line-ne-open" | "line-nw" | "line-nw-open" | "arrow" | "arrow-open" | "arrow-wide" | "arrow-wide-open";
|
|
1099
|
+
|
|
1100
|
+
declare type MarkerSymbol_2 = "circle" | "square" | "diamond" | "triangle-up" | "triangle-down" | "star";
|
|
1101
|
+
|
|
1102
|
+
export declare const Menu: default_2.FC<MenuProps>;
|
|
1103
|
+
|
|
1104
|
+
export declare const MenuItem: ({ label, checked, showCheckbox, onClick, onCheckChange, active, className, ref, }: MenuItemProps) => JSX.Element;
|
|
1105
|
+
|
|
1106
|
+
declare interface MenuItemData extends Omit<MenuItemProps, "onClick" | "onCheckChange"> {
|
|
1107
|
+
id: string;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
export declare interface MenuItemProps {
|
|
1111
|
+
label: string;
|
|
1112
|
+
checked?: boolean;
|
|
1113
|
+
showCheckbox?: boolean;
|
|
1114
|
+
onClick?: () => void;
|
|
1115
|
+
onCheckChange?: (checked: boolean) => void;
|
|
1116
|
+
active?: boolean;
|
|
1117
|
+
className?: string;
|
|
1118
|
+
ref?: default_2.Ref<HTMLDivElement>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export declare interface MenuProps {
|
|
1122
|
+
title?: string;
|
|
1123
|
+
items: MenuItemData[];
|
|
1124
|
+
onItemClick?: (itemId: string) => void;
|
|
1125
|
+
onItemCheckChange?: (itemId: string, checked: boolean) => void;
|
|
1126
|
+
activeItemId?: string | null;
|
|
1127
|
+
className?: string;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
export declare const Modal: ({ isOpen, onClose, onCloseLabel, onConfirm, onConfirmLabel, children, width, className, hideActions, title, }: ModalProps) => false | JSX.Element;
|
|
1131
|
+
|
|
1132
|
+
export declare interface ModalProps {
|
|
1133
|
+
isOpen: boolean;
|
|
1134
|
+
onClose: () => void;
|
|
1135
|
+
onCloseLabel?: string;
|
|
1136
|
+
onConfirm: () => void;
|
|
1137
|
+
onConfirmLabel?: string;
|
|
1138
|
+
children: ReactNode;
|
|
1139
|
+
width?: string;
|
|
1140
|
+
className?: string;
|
|
1141
|
+
hideActions?: boolean;
|
|
1142
|
+
title?: string;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
export declare const Navbar: default_2.FC<NavbarProps>;
|
|
1146
|
+
|
|
1147
|
+
export declare interface NavbarProps {
|
|
1148
|
+
organization: OrganizationInfo;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Navigate to a TDP URL.
|
|
1153
|
+
*
|
|
1154
|
+
* - `{ newTab: true }` opens the URL in a new browser tab.
|
|
1155
|
+
* - Default: sends a `postMessage` to the parent TDP frame (same-tab navigation
|
|
1156
|
+
* when inside an iframe), or navigates the current window (standalone).
|
|
1157
|
+
*
|
|
1158
|
+
* @param url - Full TDP URL to navigate to
|
|
1159
|
+
* @param options - Navigation options
|
|
1160
|
+
*/
|
|
1161
|
+
export declare function navigateToTdpUrl(url: string, options?: TdpNavigationOptions): void;
|
|
1162
|
+
|
|
1163
|
+
declare interface OrganizationInfo {
|
|
1164
|
+
name: string;
|
|
1165
|
+
subtext?: string;
|
|
1166
|
+
logo?: default_2.ReactNode;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Peak annotation for labeling peaks on the chromatogram.
|
|
1171
|
+
* Used for both user-provided annotations and auto-detected peaks.
|
|
1172
|
+
*/
|
|
1173
|
+
export declare interface PeakAnnotation {
|
|
1174
|
+
/** Retention time of the peak (x-axis position) */
|
|
1175
|
+
x: number;
|
|
1176
|
+
/** Signal intensity at peak (y-axis position) */
|
|
1177
|
+
y: number;
|
|
1178
|
+
/** Label text (e.g., compound name). If not provided, auto-generated from computed area. */
|
|
1179
|
+
text?: string;
|
|
1180
|
+
/** Vertical arrow offset in pixels (negative = above peak, default: -30) */
|
|
1181
|
+
ay?: number;
|
|
1182
|
+
/** Horizontal arrow offset in pixels (default: 0) */
|
|
1183
|
+
ax?: number;
|
|
1184
|
+
/** Start retention time for peak boundary */
|
|
1185
|
+
startX?: number;
|
|
1186
|
+
/** End retention time for peak boundary */
|
|
1187
|
+
endX?: number;
|
|
1188
|
+
/** Marker style for start boundary (default: "triangle") */
|
|
1189
|
+
startMarker?: BoundaryMarkerType;
|
|
1190
|
+
/** Marker style for end boundary (default: "diamond") */
|
|
1191
|
+
endMarker?: BoundaryMarkerType;
|
|
1192
|
+
/* Excluded from this release type: _computed */
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
/* Excluded from this release type: PeakComputedFields */
|
|
1196
|
+
|
|
1197
|
+
export declare interface PeakData {
|
|
1198
|
+
position: number;
|
|
1199
|
+
base?: string;
|
|
1200
|
+
peakA: number;
|
|
1201
|
+
peakT: number;
|
|
1202
|
+
peakG: number;
|
|
1203
|
+
peakC: number;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Peak detection algorithm options
|
|
1208
|
+
*/
|
|
1209
|
+
export declare interface PeakDetectionOptions {
|
|
1210
|
+
/** Minimum peak height threshold (absolute or relative to max, default: 0.05) */
|
|
1211
|
+
minHeight?: number;
|
|
1212
|
+
/** Minimum distance between peaks in data points (default: 5) */
|
|
1213
|
+
minDistance?: number;
|
|
1214
|
+
/** Prominence threshold - how much a peak stands out from neighbors (default: 0.02) */
|
|
1215
|
+
prominence?: number;
|
|
1216
|
+
/** Use relative threshold as percentage of max signal (default: true) */
|
|
1217
|
+
relativeThreshold?: boolean;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export declare const PieChart: default_2.FC<PieChartProps>;
|
|
1221
|
+
|
|
1222
|
+
export declare type PieChartProps = {
|
|
1223
|
+
dataSeries: PieDataSeries;
|
|
1224
|
+
width?: number;
|
|
1225
|
+
height?: number;
|
|
1226
|
+
title?: string;
|
|
1227
|
+
textInfo?: PieTextInfo;
|
|
1228
|
+
hole?: number;
|
|
1229
|
+
rotation?: number;
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1232
|
+
export declare interface PieDataSeries {
|
|
1233
|
+
labels: string[];
|
|
1234
|
+
values: number[];
|
|
1235
|
+
name: string;
|
|
1236
|
+
colors?: string[];
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
export declare type PieTextInfo = "none" | "label" | "percent" | "value" | "label+percent" | "label+value" | "value+percent" | "label+value+percent";
|
|
1240
|
+
|
|
1241
|
+
declare const PLATE_FORMAT_1536: "1536";
|
|
1242
|
+
|
|
1243
|
+
declare const PLATE_FORMAT_384: "384";
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Plate format string constants for standard microplate configurations.
|
|
1247
|
+
*/
|
|
1248
|
+
declare const PLATE_FORMAT_96: "96";
|
|
1249
|
+
|
|
1250
|
+
declare const PLATE_FORMAT_CUSTOM: "custom";
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Plate format presets for standard microplate configurations.
|
|
1254
|
+
* - `"96"`: 8 rows × 12 columns (wells A1-H12)
|
|
1255
|
+
* - `"384"`: 16 rows × 24 columns (wells A1-P24)
|
|
1256
|
+
* - `"1536"`: 32 rows × 48 columns (wells A1-AF48)
|
|
1257
|
+
* - `"custom"`: User-defined dimensions via `rows` and `columns` props
|
|
1258
|
+
*/
|
|
1259
|
+
export declare type PlateFormat = typeof PLATE_FORMAT_96 | typeof PLATE_FORMAT_384 | typeof PLATE_FORMAT_1536 | typeof PLATE_FORMAT_CUSTOM;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* PlateMap component for visualizing well plate data as a heatmap or categorical display.
|
|
1263
|
+
*
|
|
1264
|
+
* **Supported Plate Formats:**
|
|
1265
|
+
* - 96-well (8 rows × 12 columns, wells A1-H12)
|
|
1266
|
+
* - 384-well (16 rows × 24 columns, wells A1-P24)
|
|
1267
|
+
* - 1536-well (32 rows × 48 columns, wells A1-AF48)
|
|
1268
|
+
* - Custom dimensions with user-specified rows/columns
|
|
1269
|
+
*
|
|
1270
|
+
* **Visualization Modes:**
|
|
1271
|
+
* - `"heatmap"`: Continuous color gradient for quantitative values
|
|
1272
|
+
* - `"categorical"`: Discrete colors for well types (sample, control, empty)
|
|
1273
|
+
*
|
|
1274
|
+
* **Features:**
|
|
1275
|
+
* - Multiple data layers with independent visualization settings
|
|
1276
|
+
* - Control region highlighting with borders and fill colors
|
|
1277
|
+
* - Configurable color scales, tooltips, and click interactions
|
|
1278
|
+
* - Support for WellData arrays with multi-layer visualization
|
|
1279
|
+
*
|
|
1280
|
+
* **Data Format:**
|
|
1281
|
+
* - **WellData array**: `[{ wellId: "A1", values: { RFU: 100 }, tooltipData: {...} }, ...]`
|
|
1282
|
+
*
|
|
1283
|
+
*/
|
|
1284
|
+
export declare const PlateMap: default_2.FC<PlateMapProps>;
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* Props for PlateMap component
|
|
1288
|
+
*/
|
|
1289
|
+
export declare interface PlateMapProps {
|
|
1290
|
+
/**
|
|
1291
|
+
* Well data array as WellData objects with wellId and values.
|
|
1292
|
+
*
|
|
1293
|
+
* If wells have multiple values (via `values` property), layers are
|
|
1294
|
+
* auto-generated for each unique key, enabling layer toggling.
|
|
1295
|
+
*/
|
|
1296
|
+
data?: WellData[];
|
|
1297
|
+
/**
|
|
1298
|
+
* Configuration for auto-generated layers when using WellData with `values`.
|
|
1299
|
+
* Use this to customize display names, colors, and ranges for each layer.
|
|
1300
|
+
* Only used when `data` contains wells with `values` property.
|
|
1301
|
+
*/
|
|
1302
|
+
layerConfigs?: LayerConfig[];
|
|
1303
|
+
/**
|
|
1304
|
+
* Initial layer ID to display when the component mounts.
|
|
1305
|
+
* If not provided, defaults to the first layer.
|
|
1306
|
+
*/
|
|
1307
|
+
initialLayerId?: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Optional callback notified when the active layer changes.
|
|
1310
|
+
* This is purely informational - the component manages layer state internally.
|
|
1311
|
+
* Use this for logging, analytics, or syncing with external state.
|
|
1312
|
+
*/
|
|
1313
|
+
onLayerChange?: (layerId: string) => void;
|
|
1314
|
+
/** Plate format preset (default: "96") */
|
|
1315
|
+
plateFormat?: PlateFormat;
|
|
1316
|
+
/** Number of rows for custom format (default: 8 for 96-well, 16 for 384-well) */
|
|
1317
|
+
rows?: number;
|
|
1318
|
+
/** Number of columns for custom format (default: 12 for 96-well, 24 for 384-well) */
|
|
1319
|
+
columns?: number;
|
|
1320
|
+
/**
|
|
1321
|
+
* Visualization mode (default: "heatmap")
|
|
1322
|
+
* - "heatmap": Display quantitative values with color gradient
|
|
1323
|
+
* - "categorical": Display well types with discrete colors
|
|
1324
|
+
*/
|
|
1325
|
+
visualizationMode?: VisualizationMode;
|
|
1326
|
+
/**
|
|
1327
|
+
* Custom colors for categorical visualization mode.
|
|
1328
|
+
* Keys are well types, values are hex colors.
|
|
1329
|
+
* Merged with DEFAULT_CATEGORY_COLORS.
|
|
1330
|
+
*/
|
|
1331
|
+
categoryColors?: Record<string, string>;
|
|
1332
|
+
/**
|
|
1333
|
+
* Regions to highlight on the plate (e.g., controls, sample areas, empty wells).
|
|
1334
|
+
* Each region can specify wells and styling for visual distinction.
|
|
1335
|
+
*/
|
|
1336
|
+
regions?: PlateRegion[];
|
|
1337
|
+
/** Chart title */
|
|
1338
|
+
title?: string;
|
|
1339
|
+
/** X-axis title (e.g., "Columns") */
|
|
1340
|
+
xTitle?: string;
|
|
1341
|
+
/** Y-axis title (e.g., "Rows") */
|
|
1342
|
+
yTitle?: string;
|
|
1343
|
+
/** Custom x-axis labels (overrides auto-generated column numbers) */
|
|
1344
|
+
xLabels?: string[] | number[];
|
|
1345
|
+
/** Custom y-axis labels (overrides auto-generated row letters) */
|
|
1346
|
+
yLabels?: string[] | number[];
|
|
1347
|
+
/** Color scale for the heatmap (only used in heatmap mode) */
|
|
1348
|
+
colorScale?: ColorScale;
|
|
1349
|
+
/** Minimum value for color scale (auto-calculated if not provided) */
|
|
1350
|
+
valueMin?: number;
|
|
1351
|
+
/** Maximum value for color scale (auto-calculated if not provided) */
|
|
1352
|
+
valueMax?: number;
|
|
1353
|
+
/** Color for empty/null wells (default: "#f0f0f0") */
|
|
1354
|
+
emptyWellColor?: string;
|
|
1355
|
+
/** Show color bar legend for heatmap mode (default: true) */
|
|
1356
|
+
showColorBar?: boolean;
|
|
1357
|
+
/** Show categorical legend for categorical mode (default: true) */
|
|
1358
|
+
showLegend?: boolean;
|
|
1359
|
+
/**
|
|
1360
|
+
* Configuration for legend positioning and styling.
|
|
1361
|
+
* Applies to both heatmap colorbar and categorical legend.
|
|
1362
|
+
*
|
|
1363
|
+
* @example
|
|
1364
|
+
* // Position legend at bottom with larger text
|
|
1365
|
+
* legendConfig={{ position: "bottom", fontSize: 14 }}
|
|
1366
|
+
*/
|
|
1367
|
+
legendConfig?: LegendConfig;
|
|
1368
|
+
/** Chart width in pixels (default: 800) */
|
|
1369
|
+
width?: number;
|
|
1370
|
+
/** Chart height in pixels (default: 500) */
|
|
1371
|
+
height?: number;
|
|
1372
|
+
/** Number of decimal places for values (default: 0) */
|
|
1373
|
+
precision?: number;
|
|
1374
|
+
/**
|
|
1375
|
+
* Marker shape for wells (default: "circle")
|
|
1376
|
+
* - "circle": Round markers, ideal for plate-based data
|
|
1377
|
+
* - "square": Square markers, ideal for generic heatmaps
|
|
1378
|
+
*/
|
|
1379
|
+
markerShape?: "circle" | "square";
|
|
1380
|
+
/**
|
|
1381
|
+
* Callback when a well/cell is clicked.
|
|
1382
|
+
* @param wellData - The full well data object including wellId, values, and tooltipData
|
|
1383
|
+
*/
|
|
1384
|
+
onWellClick?: (wellData: WellData) => void;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* A region to highlight on the plate (e.g., controls, sample areas, empty wells)
|
|
1389
|
+
*/
|
|
1390
|
+
declare interface PlateRegion {
|
|
1391
|
+
/** Unique identifier for the region */
|
|
1392
|
+
id: string;
|
|
1393
|
+
/** Display name for the region (shown in legend) */
|
|
1394
|
+
name: string;
|
|
1395
|
+
/**
|
|
1396
|
+
* Wells included in this region using range notation.
|
|
1397
|
+
* Format: "StartWell:EndWell" (e.g., "A1:B6" for a rectangular block from A1 to B6)
|
|
1398
|
+
*/
|
|
1399
|
+
wells: string;
|
|
1400
|
+
/** Border color for the region highlight */
|
|
1401
|
+
borderColor?: string;
|
|
1402
|
+
/** Border width in pixels (default: 2) */
|
|
1403
|
+
borderWidth?: number;
|
|
1404
|
+
/** Optional fill color with transparency (e.g., "rgba(255, 0, 0, 0.1)") */
|
|
1405
|
+
fillColor?: string;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Constants for plot layout
|
|
1410
|
+
*/
|
|
1411
|
+
export declare const PLOT_CONSTANTS: {
|
|
1412
|
+
MARGIN_LEFT: number;
|
|
1413
|
+
MARGIN_RIGHT: number;
|
|
1414
|
+
MARGIN_TOP: number;
|
|
1415
|
+
MARGIN_BOTTOM: number;
|
|
1416
|
+
TITLE_FONT_SIZE: number;
|
|
1417
|
+
AXIS_TITLE_FONT_SIZE: number;
|
|
1418
|
+
AXIS_TICK_FONT_SIZE: number;
|
|
1419
|
+
LEGEND_FONT_SIZE: number;
|
|
1420
|
+
FONT_FAMILY: string;
|
|
1421
|
+
GRID_WIDTH: number;
|
|
1422
|
+
AXIS_LINE_WIDTH: number;
|
|
1423
|
+
AUTO_RANGE_PADDING: number;
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
export declare const PopConfirm: default_2.FC<PopConfirmProps>;
|
|
1427
|
+
|
|
1428
|
+
declare type PopConfirmPlacement = "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
1429
|
+
|
|
1430
|
+
export declare interface PopConfirmProps {
|
|
1431
|
+
title?: ReactNode;
|
|
1432
|
+
description?: ReactNode;
|
|
1433
|
+
onConfirm?: (e?: default_2.MouseEvent<HTMLElement>) => void;
|
|
1434
|
+
onCancel?: (e?: default_2.MouseEvent<HTMLElement>) => void;
|
|
1435
|
+
okText?: string;
|
|
1436
|
+
cancelText?: string;
|
|
1437
|
+
placement?: PopConfirmPlacement;
|
|
1438
|
+
children: ReactNode;
|
|
1439
|
+
className?: string;
|
|
1440
|
+
okButtonProps?: default_2.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
1441
|
+
cancelButtonProps?: default_2.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
export declare const ProtocolConfiguration: default_2.FC<ProtocolConfigurationProps>;
|
|
1445
|
+
|
|
1446
|
+
export declare interface ProtocolConfigurationProps {
|
|
1447
|
+
className?: string;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
export declare const ProtocolYamlCard: default_2.FC<ProtocolYamlCardProps>;
|
|
1451
|
+
|
|
1452
|
+
export declare interface ProtocolYamlCardProps {
|
|
1453
|
+
title: string;
|
|
1454
|
+
newVersionMode: boolean;
|
|
1455
|
+
onToggleNewVersionMode: (checked: boolean) => void;
|
|
1456
|
+
versionOptions: DropdownOption[];
|
|
1457
|
+
selectedVersion: string;
|
|
1458
|
+
onVersionChange: (value: string) => void;
|
|
1459
|
+
onDeploy: () => void;
|
|
1460
|
+
yaml: string;
|
|
1461
|
+
onYamlChange: (value: string) => void;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
export declare const PythonEditorModal: default_2.FC<PythonEditorModalProps>;
|
|
1465
|
+
|
|
1466
|
+
export declare interface PythonEditorModalProps {
|
|
1467
|
+
open: boolean;
|
|
1468
|
+
initialValue?: string;
|
|
1469
|
+
title?: string;
|
|
1470
|
+
onSave: (value: string) => void;
|
|
1471
|
+
onCancel: () => void;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Scale type for axes
|
|
1476
|
+
*/
|
|
1477
|
+
export declare type ScaleType = "linear" | "log";
|
|
1478
|
+
|
|
1479
|
+
export declare interface ScatterDataPoint {
|
|
1480
|
+
x: number;
|
|
1481
|
+
y: number;
|
|
1482
|
+
additionalInfo?: Record<string, string | number>;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
export declare interface ScatterDataSeries {
|
|
1486
|
+
x: number[];
|
|
1487
|
+
y: number[];
|
|
1488
|
+
name: string;
|
|
1489
|
+
color: string;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export declare const ScatterGraph: default_2.FC<ScatterGraphProps>;
|
|
1493
|
+
|
|
1494
|
+
export declare interface ScatterGraphProps {
|
|
1495
|
+
dataSeries: ScatterDataSeries[];
|
|
1496
|
+
width?: number;
|
|
1497
|
+
height?: number;
|
|
1498
|
+
xRange?: [number, number];
|
|
1499
|
+
yRange?: [number, number];
|
|
1500
|
+
xTitle?: string;
|
|
1501
|
+
yTitle?: string;
|
|
1502
|
+
title?: string;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* A single data point in the scatter plot
|
|
1507
|
+
*/
|
|
1508
|
+
export declare interface ScatterPoint {
|
|
1509
|
+
/** Unique identifier for the point */
|
|
1510
|
+
id: string | number;
|
|
1511
|
+
/** X-axis value */
|
|
1512
|
+
x: number;
|
|
1513
|
+
/** Y-axis value */
|
|
1514
|
+
y: number;
|
|
1515
|
+
/** Optional label for the point */
|
|
1516
|
+
label?: string;
|
|
1517
|
+
/** Additional metadata for tooltips and styling */
|
|
1518
|
+
metadata?: Record<string, unknown>;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
/** Transformed search result (flattened from Elasticsearch hit format) */
|
|
1522
|
+
export declare interface SearchResult {
|
|
1523
|
+
id: string;
|
|
1524
|
+
_score?: number | null;
|
|
1525
|
+
[key: string]: any;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
export declare const SelectField: ({ label, infoText, supportiveText, showSupportiveCheck, className, ref, ...dropdownProps }: SelectFieldProps) => JSX.Element;
|
|
1529
|
+
|
|
1530
|
+
export declare interface SelectFieldProps extends Omit<DropdownProps, "className"> {
|
|
1531
|
+
label: string;
|
|
1532
|
+
infoText?: string;
|
|
1533
|
+
supportiveText?: string;
|
|
1534
|
+
showSupportiveCheck?: boolean;
|
|
1535
|
+
className?: string;
|
|
1536
|
+
ref?: default_2.Ref<HTMLDivElement>;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* Selection mode keyboard modifiers
|
|
1541
|
+
*/
|
|
1542
|
+
export declare const SELECTION_MODIFIERS: {
|
|
1543
|
+
readonly ADD: "shiftKey";
|
|
1544
|
+
readonly REMOVE: "ctrlKey";
|
|
1545
|
+
readonly TOGGLE: "both";
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Data format for selection propagation between components
|
|
1550
|
+
*/
|
|
1551
|
+
export declare interface SelectionEvent {
|
|
1552
|
+
/** Array of selected point IDs */
|
|
1553
|
+
selectedIds: Set<string | number>;
|
|
1554
|
+
/** Selection mode used */
|
|
1555
|
+
mode: SelectionMode_2;
|
|
1556
|
+
/** Source component identifier (optional) */
|
|
1557
|
+
source?: string;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* Selection mode for interactive selection
|
|
1562
|
+
*/
|
|
1563
|
+
declare type SelectionMode_2 = "replace" | "add" | "remove" | "toggle";
|
|
1564
|
+
export { SelectionMode_2 as SelectionMode }
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* Selection state
|
|
1568
|
+
*/
|
|
1569
|
+
export declare interface SelectionState {
|
|
1570
|
+
/** Array of selected point IDs */
|
|
1571
|
+
selectedIds: Set<string | number>;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Shape mapping configuration
|
|
1576
|
+
*/
|
|
1577
|
+
export declare interface ShapeMapping {
|
|
1578
|
+
/** Type of mapping: data-driven or static */
|
|
1579
|
+
type: "static" | "categorical";
|
|
1580
|
+
/** Static shape value (for type: "static") */
|
|
1581
|
+
value?: MarkerShape;
|
|
1582
|
+
/** Data field to map (for type: "categorical") */
|
|
1583
|
+
field?: string;
|
|
1584
|
+
/** Shape mapping for categorical values */
|
|
1585
|
+
categoryShapes?: Record<string, MarkerShape>;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
export declare const Sidebar: default_2.FC<SidebarProps>;
|
|
1589
|
+
|
|
1590
|
+
declare interface SidebarItemProps {
|
|
1591
|
+
icon: IconName;
|
|
1592
|
+
label: string;
|
|
1593
|
+
active?: boolean;
|
|
1594
|
+
onClick?: () => void;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
export declare interface SidebarProps {
|
|
1598
|
+
items: SidebarItemProps[];
|
|
1599
|
+
activeItem?: string;
|
|
1600
|
+
onItemClick?: (label: string) => void;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* Size mapping configuration
|
|
1605
|
+
*/
|
|
1606
|
+
export declare interface SizeMapping {
|
|
1607
|
+
/** Type of mapping: data-driven or static */
|
|
1608
|
+
type: "static" | "continuous" | "categorical";
|
|
1609
|
+
/** Static size value (for type: "static") */
|
|
1610
|
+
value?: number;
|
|
1611
|
+
/** Data field to map (for type: "continuous" | "categorical") */
|
|
1612
|
+
field?: string;
|
|
1613
|
+
/** Size range for continuous mapping */
|
|
1614
|
+
sizeRange?: [number, number];
|
|
1615
|
+
/** Discrete sizes for categorical mapping */
|
|
1616
|
+
categorySizes?: Record<string, number>;
|
|
1617
|
+
/** Min/max values for continuous mapping (auto-calculated if not provided) */
|
|
1618
|
+
min?: number;
|
|
1619
|
+
max?: number;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
export declare const SupportiveText: default_2.FC<SupportiveTextProps>;
|
|
1623
|
+
|
|
1624
|
+
export declare interface SupportiveTextProps {
|
|
1625
|
+
children: default_2.ReactNode;
|
|
1626
|
+
showCheck?: boolean;
|
|
1627
|
+
className?: string;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
export declare const Tab: default_2.FC<TabProps>;
|
|
1631
|
+
|
|
1632
|
+
export declare const TabGroup: default_2.FC<TabGroupProps>;
|
|
1633
|
+
|
|
1634
|
+
export declare interface TabGroupProps {
|
|
1635
|
+
tabs: TabItem[];
|
|
1636
|
+
activeTab?: string;
|
|
1637
|
+
onChange?: (tabId: string) => void;
|
|
1638
|
+
disabled?: boolean;
|
|
1639
|
+
size?: TabSize;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
declare interface TabItem extends Omit<TabProps, "active" | "onClick"> {
|
|
1643
|
+
id: string;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
export declare function Table<T extends Record<string, any>>({ columns, data, pageSize, rowKey, selectable, onRowSelect, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSort: controlledOnSort, currentPage: controlledCurrentPage, onPageChange: controlledOnPageChange, totalItems, selectedRows: controlledSelectedRows, className, }: TableProps<T>): JSX.Element;
|
|
1647
|
+
|
|
1648
|
+
export declare namespace Table {
|
|
1649
|
+
var displayName: string;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
export declare const TableCell: ({ children, align, width, className, ref, ...props }: TableCellProps) => JSX.Element;
|
|
1653
|
+
|
|
1654
|
+
export declare interface TableCellProps extends default_2.TdHTMLAttributes<HTMLTableCellElement> {
|
|
1655
|
+
children?: default_2.ReactNode;
|
|
1656
|
+
align?: "left" | "center" | "right";
|
|
1657
|
+
width?: string;
|
|
1658
|
+
className?: string;
|
|
1659
|
+
ref?: default_2.Ref<HTMLTableCellElement>;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
export declare interface TableColumn<T = any> {
|
|
1663
|
+
key: string;
|
|
1664
|
+
header: string;
|
|
1665
|
+
sortable?: boolean;
|
|
1666
|
+
filterable?: boolean;
|
|
1667
|
+
filterOptions?: DropdownOption[];
|
|
1668
|
+
width?: string;
|
|
1669
|
+
align?: "left" | "center" | "right";
|
|
1670
|
+
render?: (value: any, row: T, index: number) => default_2.ReactNode;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
export declare const TableHeaderCell: ({ children, sortable, sortDirection, onSort, filterable, filterOptions, filterValue, onFilterChange, width, className, ref, ...props }: TableHeaderCellProps) => JSX.Element;
|
|
1674
|
+
|
|
1675
|
+
export declare interface TableHeaderCellProps extends default_2.ThHTMLAttributes<HTMLTableCellElement> {
|
|
1676
|
+
children?: default_2.ReactNode;
|
|
1677
|
+
sortable?: boolean;
|
|
1678
|
+
sortDirection?: "asc" | "desc" | null;
|
|
1679
|
+
onSort?: () => void;
|
|
1680
|
+
filterable?: boolean;
|
|
1681
|
+
filterOptions?: DropdownOption[];
|
|
1682
|
+
filterValue?: string;
|
|
1683
|
+
onFilterChange?: (value: string) => void;
|
|
1684
|
+
width?: string;
|
|
1685
|
+
className?: string;
|
|
1686
|
+
ref?: default_2.Ref<HTMLTableCellElement>;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
export declare interface TableProps<T = any> {
|
|
1690
|
+
columns: TableColumn<T>[];
|
|
1691
|
+
data: T[];
|
|
1692
|
+
pageSize?: number;
|
|
1693
|
+
rowKey?: keyof T | ((row: T) => string | number);
|
|
1694
|
+
selectable?: boolean;
|
|
1695
|
+
onRowSelect?: (selectedRows: T[]) => void;
|
|
1696
|
+
sortKey?: string;
|
|
1697
|
+
sortDirection?: "asc" | "desc";
|
|
1698
|
+
onSort?: (key: string, direction: "asc" | "desc") => void;
|
|
1699
|
+
currentPage?: number;
|
|
1700
|
+
onPageChange?: (page: number) => void;
|
|
1701
|
+
totalItems?: number;
|
|
1702
|
+
selectedRows?: T[];
|
|
1703
|
+
className?: string;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
export declare interface TabProps {
|
|
1707
|
+
label: string;
|
|
1708
|
+
active?: boolean;
|
|
1709
|
+
disabled?: boolean;
|
|
1710
|
+
size?: TabSize;
|
|
1711
|
+
onClick?: () => void;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
export declare type TabSize = "small" | "medium";
|
|
1715
|
+
|
|
1716
|
+
/** Props passed to the renderFilters render prop */
|
|
1717
|
+
export declare interface TdpFiltersRenderProps {
|
|
1718
|
+
filters: TdpSearchFilter[];
|
|
1719
|
+
filterValues: Record<string, string>;
|
|
1720
|
+
onFilterChange: (key: string, value: string) => void;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* A link component that navigates to TDP pages.
|
|
1725
|
+
*
|
|
1726
|
+
* Renders a standard `<a>` tag with the correct href for right-click
|
|
1727
|
+
* "Open in new tab" support, accessibility, and SEO.
|
|
1728
|
+
*
|
|
1729
|
+
* Must be used inside a `<TdpNavigationProvider>`.
|
|
1730
|
+
*
|
|
1731
|
+
* @example
|
|
1732
|
+
* ```tsx
|
|
1733
|
+
* import { TDPLink, tdpPaths } from '@tetrascience-npm/tetrascience-react-ui';
|
|
1734
|
+
*
|
|
1735
|
+
* <TDPLink path={tdpPaths.fileDetails("abc-123")}>
|
|
1736
|
+
* View File Details
|
|
1737
|
+
* </TDPLink>
|
|
1738
|
+
*
|
|
1739
|
+
* <TDPLink path="/search?q=test" navigationOptions={{ newTab: false }}>
|
|
1740
|
+
* Search in TDP (same tab)
|
|
1741
|
+
* </TDPLink>
|
|
1742
|
+
* ```
|
|
1743
|
+
*/
|
|
1744
|
+
export declare const TDPLink: default_2.FC<TDPLinkProps>;
|
|
1745
|
+
|
|
1746
|
+
/** Props for the TDPLink component */
|
|
1747
|
+
export declare interface TDPLinkProps extends Omit<default_2.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
1748
|
+
/** TDP page path (e.g., "/file/abc-123" or use tdpPaths helpers) */
|
|
1749
|
+
path: string;
|
|
1750
|
+
/** Navigation behavior. Default: { newTab: true } */
|
|
1751
|
+
navigationOptions?: TdpNavigationOptions;
|
|
1752
|
+
children: default_2.ReactNode;
|
|
1753
|
+
ref?: default_2.Ref<HTMLAnchorElement>;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
export declare const TdpNavigationContext: default_2.Context<TdpNavigationContextValue | null>;
|
|
1757
|
+
|
|
1758
|
+
export declare interface TdpNavigationContextValue {
|
|
1759
|
+
/** The resolved TDP base URL (origin + org path prefix), or null if not resolved */
|
|
1760
|
+
tdpBaseUrl: string | null;
|
|
1761
|
+
/** Construct a full TDP URL from a path. Returns null if base URL is not resolved. */
|
|
1762
|
+
getTdpUrl: (path: string) => string | null;
|
|
1763
|
+
/** Navigate to a TDP page. */
|
|
1764
|
+
navigateToTdp: (path: string, options?: TdpNavigationOptions) => void;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
export declare interface TdpNavigationOptions {
|
|
1768
|
+
/** Open in a new tab instead of navigating the parent TDP frame. Default: false */
|
|
1769
|
+
newTab?: boolean;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Provider that resolves the TDP base URL and exposes navigation helpers.
|
|
1774
|
+
*
|
|
1775
|
+
* Resolution order:
|
|
1776
|
+
* 1. Explicit `tdpBaseUrl` prop (if provided)
|
|
1777
|
+
* 2. `document.referrer` parsing (production iframe)
|
|
1778
|
+
*
|
|
1779
|
+
* @example
|
|
1780
|
+
* ```tsx
|
|
1781
|
+
* <TdpNavigationProvider tdpBaseUrl="https://tetrascience.com/my-org">
|
|
1782
|
+
* <App />
|
|
1783
|
+
* </TdpNavigationProvider>
|
|
1784
|
+
* ```
|
|
1785
|
+
*/
|
|
1786
|
+
export declare const TdpNavigationProvider: default_2.FC<TdpNavigationProviderProps>;
|
|
1787
|
+
|
|
1788
|
+
/** Props for the TdpNavigationProvider component */
|
|
1789
|
+
export declare interface TdpNavigationProviderProps {
|
|
1790
|
+
/**
|
|
1791
|
+
* Explicit TDP base URL override. Skips auto-detection when provided.
|
|
1792
|
+
*/
|
|
1793
|
+
tdpBaseUrl?: string;
|
|
1794
|
+
children: default_2.ReactNode;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Convenience helpers for constructing common TDP page paths.
|
|
1799
|
+
* Returns path strings for use with `getTdpUrl()` or `buildTdpUrl()`.
|
|
1800
|
+
*
|
|
1801
|
+
* @example
|
|
1802
|
+
* const { getTdpUrl } = useTdpNavigation();
|
|
1803
|
+
* const url = getTdpUrl(tdpPaths.fileDetails("abc-123"));
|
|
1804
|
+
*/
|
|
1805
|
+
export declare const tdpPaths: {
|
|
1806
|
+
fileDetails: (fileId: string) => string;
|
|
1807
|
+
pipelineEdit: (pipelineId: string) => string;
|
|
1808
|
+
pipelineDetails: (pipelineId: string) => string;
|
|
1809
|
+
search: (query?: string) => string;
|
|
1810
|
+
dataWorkspace: () => string;
|
|
1811
|
+
dataApps: () => string;
|
|
1812
|
+
artifact: (type: string, namespace: string, slug: string) => string;
|
|
1813
|
+
};
|
|
1814
|
+
|
|
1815
|
+
/** Props passed to the renderResults render prop */
|
|
1816
|
+
export declare interface TdpResultsRenderProps {
|
|
1817
|
+
results: SearchResult[];
|
|
1818
|
+
total: number;
|
|
1819
|
+
currentPage: number;
|
|
1820
|
+
pageSize: number;
|
|
1821
|
+
columns: TdpSearchColumn[];
|
|
1822
|
+
onPageChange: (page: number) => void;
|
|
1823
|
+
sortKey: string | null;
|
|
1824
|
+
sortDirection: "asc" | "desc";
|
|
1825
|
+
onSort: (key: string, direction: "asc" | "desc") => void;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* TdpSearch Component
|
|
1830
|
+
*
|
|
1831
|
+
* A reusable search component for querying the TDP.
|
|
1832
|
+
*
|
|
1833
|
+
* @example
|
|
1834
|
+
* ```tsx
|
|
1835
|
+
* <TdpSearch
|
|
1836
|
+
* columns={[
|
|
1837
|
+
* { key: "id", header: "ID" },
|
|
1838
|
+
* { key: "filePath", header: "File Path", sortable: true }
|
|
1839
|
+
* ]}
|
|
1840
|
+
* defaultQuery="sample-data"
|
|
1841
|
+
* pageSize={20}
|
|
1842
|
+
* />
|
|
1843
|
+
* ```
|
|
1844
|
+
*/
|
|
1845
|
+
export declare const TdpSearch: default_2.FC<TdpSearchProps>;
|
|
1846
|
+
|
|
1847
|
+
/** Props passed to the renderSearchBar render prop */
|
|
1848
|
+
export declare interface TdpSearchBarRenderProps {
|
|
1849
|
+
query: string;
|
|
1850
|
+
setQuery: (query: string) => void;
|
|
1851
|
+
onSearch: () => void;
|
|
1852
|
+
isLoading: boolean;
|
|
1853
|
+
placeholder: string;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
/** Configuration for column display */
|
|
1857
|
+
export declare interface TdpSearchColumn {
|
|
1858
|
+
key: string;
|
|
1859
|
+
header: string;
|
|
1860
|
+
sortable?: boolean;
|
|
1861
|
+
width?: string;
|
|
1862
|
+
align?: "left" | "center" | "right";
|
|
1863
|
+
render?: (value: any, row: SearchResult, index: number) => default_2.ReactNode;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
/** Search connection configuration */
|
|
1867
|
+
export declare interface TdpSearchConfig {
|
|
1868
|
+
/**
|
|
1869
|
+
* When true, calls the TDP API directly from the browser
|
|
1870
|
+
* When false/omitted, proxies the request through your backend `apiEndpoint`
|
|
1871
|
+
*/
|
|
1872
|
+
standalone?: boolean;
|
|
1873
|
+
/** TDP API base URL (required when standalone is true) */
|
|
1874
|
+
baseUrl?: string;
|
|
1875
|
+
/** Backend API endpoint for search (used when standalone is false). Defaults to '/api/search' */
|
|
1876
|
+
apiEndpoint?: string;
|
|
1877
|
+
/** Common | authentication token */
|
|
1878
|
+
authToken?: string;
|
|
1879
|
+
/** Common | organization slug */
|
|
1880
|
+
orgSlug?: string;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
/** Configuration for a search filter */
|
|
1884
|
+
export declare interface TdpSearchFilter {
|
|
1885
|
+
key: string;
|
|
1886
|
+
label: string;
|
|
1887
|
+
options: DropdownOption[];
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
export declare type TdpSearchProps = CommonTdpSearchProps & TdpSearchConfig;
|
|
1891
|
+
|
|
1892
|
+
/** Sort configuration */
|
|
1893
|
+
export declare interface TdpSearchSort {
|
|
1894
|
+
field: string;
|
|
1895
|
+
order: "asc" | "desc";
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
export declare const Textarea: ({ size, error, disabled, fullWidth, rows, ref, ...rest }: TextareaProps) => JSX.Element;
|
|
1899
|
+
|
|
1900
|
+
export declare interface TextareaProps extends Omit<default_2.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
1901
|
+
size?: TextareaSize;
|
|
1902
|
+
error?: boolean;
|
|
1903
|
+
disabled?: boolean;
|
|
1904
|
+
fullWidth?: boolean;
|
|
1905
|
+
rows?: number;
|
|
1906
|
+
ref?: default_2.Ref<HTMLTextAreaElement>;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
declare type TextareaSize = "xsmall" | "small";
|
|
1910
|
+
|
|
1911
|
+
export declare interface Theme {
|
|
1912
|
+
colors?: ThemeColors;
|
|
1913
|
+
radius?: ThemeRadius;
|
|
1914
|
+
spacing?: ThemeSpacing;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* Theme type definitions for TetraScience UI Kit
|
|
1919
|
+
*/
|
|
1920
|
+
export declare interface ThemeColors {
|
|
1921
|
+
primary?: string;
|
|
1922
|
+
primaryHover?: string;
|
|
1923
|
+
primaryActive?: string;
|
|
1924
|
+
background?: string;
|
|
1925
|
+
text?: string;
|
|
1926
|
+
border?: string;
|
|
1927
|
+
cardBackground?: string;
|
|
1928
|
+
cardBorder?: string;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
/**
|
|
1932
|
+
* ThemeProvider component that sets CSS custom properties for theming
|
|
1933
|
+
*
|
|
1934
|
+
* This provider merges the provided theme with the default theme and
|
|
1935
|
+
* sets CSS variables on a wrapper element, making them available to both
|
|
1936
|
+
* styled-components and SCSS styles within the provider's scope.
|
|
1937
|
+
*
|
|
1938
|
+
* @example
|
|
1939
|
+
* ```tsx
|
|
1940
|
+
* import { ThemeProvider, Button } from '@tetrascience-npm/tetrascience-react-ui';
|
|
1941
|
+
*
|
|
1942
|
+
* const customTheme = {
|
|
1943
|
+
* colors: {
|
|
1944
|
+
* primary: '#FF0000',
|
|
1945
|
+
* },
|
|
1946
|
+
* radius: {
|
|
1947
|
+
* medium: '12px',
|
|
1948
|
+
* }
|
|
1949
|
+
* };
|
|
1950
|
+
*
|
|
1951
|
+
* <ThemeProvider theme={customTheme}>
|
|
1952
|
+
* <Button>Click me</Button>
|
|
1953
|
+
* </ThemeProvider>
|
|
1954
|
+
* ```
|
|
1955
|
+
*/
|
|
1956
|
+
export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
|
|
1957
|
+
|
|
1958
|
+
export declare interface ThemeProviderProps {
|
|
1959
|
+
theme?: Theme;
|
|
1960
|
+
children: default_2.ReactNode;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
export declare interface ThemeRadius {
|
|
1964
|
+
small?: string;
|
|
1965
|
+
medium?: string;
|
|
1966
|
+
large?: string;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
export declare interface ThemeSpacing {
|
|
1970
|
+
small?: string;
|
|
1971
|
+
medium?: string;
|
|
1972
|
+
large?: string;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
export declare const Toast: default_2.FC<ToastProps>;
|
|
1976
|
+
|
|
1977
|
+
export declare interface ToastContainerProps {
|
|
1978
|
+
position: ToastPosition;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
export declare const ToastManager: default_2.FC<ToastManagerProps>;
|
|
1982
|
+
|
|
1983
|
+
export declare interface ToastManagerProps {
|
|
1984
|
+
position?: ToastPosition;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
declare type ToastPosition = "top" | "bottom";
|
|
1988
|
+
|
|
1989
|
+
export declare interface ToastProps {
|
|
1990
|
+
type?: ToastType;
|
|
1991
|
+
heading: string;
|
|
1992
|
+
description?: string;
|
|
1993
|
+
className?: string;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
export declare type ToastType = "info" | "success" | "warning" | "danger" | "default";
|
|
1997
|
+
|
|
1998
|
+
export declare const Toggle: default_2.FC<ToggleProps>;
|
|
1999
|
+
|
|
2000
|
+
export declare interface ToggleProps {
|
|
2001
|
+
checked?: boolean;
|
|
2002
|
+
onChange?: (checked: boolean) => void;
|
|
2003
|
+
disabled?: boolean;
|
|
2004
|
+
label?: string;
|
|
2005
|
+
className?: string;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
2009
|
+
|
|
2010
|
+
/**
|
|
2011
|
+
* Tooltip configuration
|
|
2012
|
+
*/
|
|
2013
|
+
export declare interface TooltipConfig {
|
|
2014
|
+
/** Enable/disable tooltips */
|
|
2015
|
+
enabled?: boolean;
|
|
2016
|
+
/** Custom tooltip content function */
|
|
2017
|
+
content?: (point: ScatterPoint) => string;
|
|
2018
|
+
/** Fields to display in default tooltip */
|
|
2019
|
+
fields?: string[];
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
declare type TooltipPlacement = "top" | "right" | "bottom" | "left";
|
|
2023
|
+
|
|
2024
|
+
export declare interface TooltipProps {
|
|
2025
|
+
content: ReactNode;
|
|
2026
|
+
children: ReactNode;
|
|
2027
|
+
placement?: TooltipPlacement;
|
|
2028
|
+
className?: string;
|
|
2029
|
+
delay?: number;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
declare interface UserProfileProps {
|
|
2033
|
+
name: string;
|
|
2034
|
+
avatar?: string;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
export declare function useSearch(config: UseSearchConfig): UseSearchResult;
|
|
2038
|
+
|
|
2039
|
+
export declare type UseSearchConfig = {
|
|
2040
|
+
pageSize: number;
|
|
2041
|
+
} & TdpSearchConfig;
|
|
2042
|
+
|
|
2043
|
+
export declare interface UseSearchResult {
|
|
2044
|
+
results: SearchResult[];
|
|
2045
|
+
total: number;
|
|
2046
|
+
currentPage: number;
|
|
2047
|
+
isLoading: boolean;
|
|
2048
|
+
error: string | null;
|
|
2049
|
+
executeSearch: (searchRequest: Omit<SearchEqlRequest, "from" | "size">, page?: number) => Promise<SearchResult[]>;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* Standalone hook for TDP navigation (no provider required).
|
|
2054
|
+
*
|
|
2055
|
+
* For simple use cases where you don't need a TdpNavigationProvider.
|
|
2056
|
+
* If multiple components need navigation, prefer the provider approach.
|
|
2057
|
+
*
|
|
2058
|
+
* @example
|
|
2059
|
+
* ```tsx
|
|
2060
|
+
* function MyComponent() {
|
|
2061
|
+
* const { getTdpUrl, navigateToTdp } = useTdpNavigation({
|
|
2062
|
+
* tdpBaseUrl: "https://tetrascience.com/my-org",
|
|
2063
|
+
* });
|
|
2064
|
+
*
|
|
2065
|
+
* return (
|
|
2066
|
+
* <a href={getTdpUrl("/file/abc") ?? "#"} target="_blank" rel="noopener noreferrer">
|
|
2067
|
+
* View File
|
|
2068
|
+
* </a>
|
|
2069
|
+
* );
|
|
2070
|
+
* }
|
|
2071
|
+
* ```
|
|
2072
|
+
*/
|
|
2073
|
+
export declare function useTdpNavigation(options?: UseTdpNavigationOptions): UseTdpNavigationReturn;
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* Access TDP navigation helpers from the nearest TdpNavigationProvider.
|
|
2077
|
+
*
|
|
2078
|
+
* @throws Error if used outside a TdpNavigationProvider
|
|
2079
|
+
*
|
|
2080
|
+
* @example
|
|
2081
|
+
* ```tsx
|
|
2082
|
+
* const { getTdpUrl, navigateToTdp } = useTdpNavigationContext();
|
|
2083
|
+
* ```
|
|
2084
|
+
*/
|
|
2085
|
+
export declare function useTdpNavigationContext(): TdpNavigationContextValue;
|
|
2086
|
+
|
|
2087
|
+
export declare interface UseTdpNavigationOptions {
|
|
2088
|
+
/** Explicit TDP base URL override */
|
|
2089
|
+
tdpBaseUrl?: string;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
export declare interface UseTdpNavigationReturn {
|
|
2093
|
+
/** The resolved TDP base URL, or null */
|
|
2094
|
+
tdpBaseUrl: string | null;
|
|
2095
|
+
/** Construct a full TDP URL from a path */
|
|
2096
|
+
getTdpUrl: (path: string) => string | null;
|
|
2097
|
+
/** Navigate to a TDP page */
|
|
2098
|
+
navigateToTdp: (path: string, options?: TdpNavigationOptions) => void;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* Visualization mode for the plate map.
|
|
2103
|
+
* - `"heatmap"`: Displays quantitative values as a continuous color gradient.
|
|
2104
|
+
* Use for OD readings, fluorescence intensity, or other numeric measurements.
|
|
2105
|
+
* - `"categorical"`: Displays well types with discrete colors.
|
|
2106
|
+
* Use for showing sample types, control positions, or experimental conditions.
|
|
2107
|
+
*/
|
|
2108
|
+
declare type VisualizationMode = "heatmap" | "categorical";
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* Well data for individual wells.
|
|
2112
|
+
*
|
|
2113
|
+
* @example
|
|
2114
|
+
* // Well with a single numeric value
|
|
2115
|
+
* { wellId: "A1", values: { "Fluorescence": 1500 } }
|
|
2116
|
+
*
|
|
2117
|
+
* @example
|
|
2118
|
+
* // Well with multiple values (creates multiple layers)
|
|
2119
|
+
* { wellId: "A1", values: { "Raw": 1500, "Normalized": 0.85, "Status": "positive" } }
|
|
2120
|
+
*
|
|
2121
|
+
* @example
|
|
2122
|
+
* // Well with tooltip-only data
|
|
2123
|
+
* { wellId: "A1", values: { "Value": 500 }, tooltipData: { compound: "Drug A", concentration: "10µM" } }
|
|
2124
|
+
*/
|
|
2125
|
+
export declare interface WellData {
|
|
2126
|
+
/**
|
|
2127
|
+
* Well identifier in standard microplate notation.
|
|
2128
|
+
* - Single letter + number for 96/384-well: "A1", "H12", "P24"
|
|
2129
|
+
* - Double letter + number for 1536-well: "A1", "AA1", "AF48"
|
|
2130
|
+
* Case-insensitive ("a1" and "A1" are equivalent).
|
|
2131
|
+
*/
|
|
2132
|
+
wellId: string;
|
|
2133
|
+
/**
|
|
2134
|
+
* Named values for the well. Each key can become a visualization layer.
|
|
2135
|
+
*
|
|
2136
|
+
* - Numeric values: Displayed using heatmap visualization
|
|
2137
|
+
* - String values: Displayed using categorical visualization
|
|
2138
|
+
* - null: Empty/no data for that property
|
|
2139
|
+
*
|
|
2140
|
+
* All values are shown in the tooltip regardless of which layer is active.
|
|
2141
|
+
*
|
|
2142
|
+
* @example
|
|
2143
|
+
* // Well with multiple measurement values (numeric)
|
|
2144
|
+
* { wellId: "A1", values: { "Raw": 1500, "Normalized": 0.85, "Z-Score": 1.2 } }
|
|
2145
|
+
*
|
|
2146
|
+
* @example
|
|
2147
|
+
* // Well with categorical values (string)
|
|
2148
|
+
* { wellId: "A1", values: { "Status": "positive", "QC": "pass" } }
|
|
2149
|
+
*
|
|
2150
|
+
* @example
|
|
2151
|
+
* // Mixed numeric and categorical
|
|
2152
|
+
* { wellId: "A1", values: { "Fluorescence": 1500, "Status": "positive" } }
|
|
2153
|
+
*/
|
|
2154
|
+
values?: Record<string, string | number | null>;
|
|
2155
|
+
/**
|
|
2156
|
+
* Optional data for tooltip display only (not visualized as layers).
|
|
2157
|
+
* Keys become labels, values are displayed.
|
|
2158
|
+
*
|
|
2159
|
+
* @example
|
|
2160
|
+
* { tooltipData: { sampleId: "S001", compound: "Drug A", concentration: "10µM" } }
|
|
2161
|
+
*/
|
|
2162
|
+
tooltipData?: Record<string, unknown>;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
export { }
|
|
6
2166
|
|
|
7
|
-
type BadgeSize = "small" | "medium";
|
|
8
|
-
type BadgeVariant = "default" | "primary";
|
|
9
|
-
interface BadgeProps {
|
|
10
|
-
children: React$1.ReactNode;
|
|
11
|
-
size?: BadgeSize;
|
|
12
|
-
variant?: BadgeVariant;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
iconLeft?: React$1.ReactNode;
|
|
15
|
-
iconRight?: React$1.ReactNode;
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
|
-
declare const Badge: React$1.FC<BadgeProps>;
|
|
19
|
-
|
|
20
|
-
type ButtonSize = "small" | "medium";
|
|
21
|
-
type ButtonVariant = "primary" | "secondary" | "tertiary";
|
|
22
|
-
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
23
|
-
children: React$1.ReactNode;
|
|
24
|
-
variant?: ButtonVariant;
|
|
25
|
-
size?: ButtonSize;
|
|
26
|
-
loading?: boolean;
|
|
27
|
-
leftIcon?: React$1.ReactNode;
|
|
28
|
-
rightIcon?: React$1.ReactNode;
|
|
29
|
-
noPadding?: boolean;
|
|
30
|
-
fullWidth?: boolean;
|
|
31
|
-
ref?: React$1.Ref<HTMLButtonElement>;
|
|
32
|
-
}
|
|
33
|
-
declare const Button: ({ children, variant, size, loading, leftIcon, rightIcon, noPadding, fullWidth, disabled, ref, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
34
|
-
|
|
35
|
-
interface ButtonControlProps {
|
|
36
|
-
icon?: React$1.ReactNode;
|
|
37
|
-
selected?: boolean;
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
onClick?: () => void;
|
|
40
|
-
}
|
|
41
|
-
declare const ButtonControl: React$1.FC<ButtonControlProps>;
|
|
42
|
-
|
|
43
|
-
type CardSize = "small" | "medium" | "large";
|
|
44
|
-
type CardVariant = "default" | "outlined" | "elevated";
|
|
45
|
-
interface CardProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
46
|
-
children: React$1.ReactNode;
|
|
47
|
-
title?: React$1.ReactNode;
|
|
48
|
-
size?: CardSize;
|
|
49
|
-
variant?: CardVariant;
|
|
50
|
-
className?: string;
|
|
51
|
-
fullWidth?: boolean;
|
|
52
|
-
ref?: React$1.Ref<HTMLDivElement>;
|
|
53
|
-
}
|
|
54
|
-
declare const Card: ({ children, title, size, variant, className, fullWidth, ref, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
55
|
-
|
|
56
|
-
interface CheckboxProps {
|
|
57
|
-
checked?: boolean;
|
|
58
|
-
onChange?: (checked: boolean) => void;
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
className?: string;
|
|
61
|
-
onClick?: (e: React$1.MouseEvent) => void;
|
|
62
|
-
label?: React$1.ReactNode;
|
|
63
|
-
noPadding?: boolean;
|
|
64
|
-
ref?: React$1.Ref<HTMLInputElement>;
|
|
65
|
-
}
|
|
66
|
-
declare const Checkbox: ({ checked, onChange, disabled, className, onClick, label, noPadding, ref, }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
67
|
-
|
|
68
|
-
interface CodeEditorProps {
|
|
69
|
-
value: string;
|
|
70
|
-
onChange: OnChange;
|
|
71
|
-
language?: string;
|
|
72
|
-
theme?: "light" | "dark";
|
|
73
|
-
height?: string | number;
|
|
74
|
-
width?: string | number;
|
|
75
|
-
options?: Record<string, unknown>;
|
|
76
|
-
label?: string;
|
|
77
|
-
onCopy?: (code: string) => void;
|
|
78
|
-
onLaunch?: (code: string) => void;
|
|
79
|
-
disabled?: boolean;
|
|
80
|
-
}
|
|
81
|
-
declare const CodeEditor: React$1.FC<CodeEditorProps>;
|
|
82
|
-
|
|
83
|
-
type DropdownSize = "xsmall" | "small";
|
|
84
|
-
interface DropdownOption {
|
|
85
|
-
value: string;
|
|
86
|
-
label: string;
|
|
87
|
-
disabled?: boolean;
|
|
88
|
-
}
|
|
89
|
-
interface DropdownProps {
|
|
90
|
-
options: DropdownOption[];
|
|
91
|
-
value?: string;
|
|
92
|
-
placeholder?: string;
|
|
93
|
-
disabled?: boolean;
|
|
94
|
-
error?: boolean;
|
|
95
|
-
size?: DropdownSize;
|
|
96
|
-
onChange?: (value: string) => void;
|
|
97
|
-
onOpen?: () => void;
|
|
98
|
-
onClose?: () => void;
|
|
99
|
-
width?: string;
|
|
100
|
-
menuWidth?: string;
|
|
101
|
-
}
|
|
102
|
-
declare const Dropdown: React$1.FC<DropdownProps>;
|
|
103
|
-
|
|
104
|
-
interface ErrorAlertProps {
|
|
105
|
-
/** The error object to display. Can be Error, AxiosError, string, or any other type. */
|
|
106
|
-
error: unknown;
|
|
107
|
-
/** Optional title for the error alert. Defaults to 'An Error Occurred'. */
|
|
108
|
-
title?: React$1.ReactNode;
|
|
109
|
-
/** Optional callback function when the alert is closed. */
|
|
110
|
-
onClose?: () => void;
|
|
111
|
-
/** Set to true to show technical details expanded by default. Defaults to false. */
|
|
112
|
-
showDetailsDefault?: boolean;
|
|
113
|
-
/** Custom message to show when error is null/undefined (optional, component renders nothing by default) */
|
|
114
|
-
noErrorContent?: React$1.ReactNode;
|
|
115
|
-
}
|
|
116
|
-
declare const ErrorAlert: React$1.FC<ErrorAlertProps>;
|
|
117
|
-
|
|
118
|
-
interface IconsProps {
|
|
119
|
-
fill?: string;
|
|
120
|
-
width?: string;
|
|
121
|
-
height?: string;
|
|
122
|
-
name: IconName;
|
|
123
|
-
}
|
|
124
|
-
interface IconProps {
|
|
125
|
-
fill?: string;
|
|
126
|
-
width?: string;
|
|
127
|
-
height?: string;
|
|
128
|
-
}
|
|
129
|
-
declare enum IconName {
|
|
130
|
-
BARS_3_BOTTOM_LEFT = "bars-3-bottom-left",
|
|
131
|
-
BUILDING = "building",
|
|
132
|
-
BULK_CHECK = "bulk-check",
|
|
133
|
-
CHECK = "check",
|
|
134
|
-
CHECK_CIRCLE = "check-circle",
|
|
135
|
-
CHECK_SQUARE = "check-square",
|
|
136
|
-
CHEVRON_DOWN = "chevron-down",
|
|
137
|
-
CLOSE = "close",
|
|
138
|
-
CODE = "code",
|
|
139
|
-
COMPUTER = "computer",
|
|
140
|
-
COPY = "copy",
|
|
141
|
-
CUBE = "cube",
|
|
142
|
-
DATABASE = "database",
|
|
143
|
-
EXCLAMATION_CIRCLE = "exclamation-circle",
|
|
144
|
-
EXCLAMATION_TRIANGLE = "exclamation-triangle",
|
|
145
|
-
GEAR = "gear",
|
|
146
|
-
GLobe = "globe",
|
|
147
|
-
HASHTAG = "hashtag",
|
|
148
|
-
HOME = "home",
|
|
149
|
-
INBOX = "inbox",
|
|
150
|
-
INFORMATION_CIRCLE = "information-circle",
|
|
151
|
-
INFORMATION_CIRCLE_MICRO = "information-circle-micro",
|
|
152
|
-
LAMP = "lamp",
|
|
153
|
-
LOCK_OPEN = "lock-open",
|
|
154
|
-
MINUS = "minus",
|
|
155
|
-
PAPER_PLANE = "paper-plane",
|
|
156
|
-
PENCIL = "pencil",
|
|
157
|
-
PIE_CHART = "pie-chart",
|
|
158
|
-
PIPELINE = "pipeline",
|
|
159
|
-
PLUS = "plus",
|
|
160
|
-
PROFILE = "profile",
|
|
161
|
-
QUESTION_CIRCLE = "question-circle",
|
|
162
|
-
ROCKET_LAUNCH = "rocket-launch",
|
|
163
|
-
SEARCH = "search",
|
|
164
|
-
SEARCH_DOCUMENT = "search-document",
|
|
165
|
-
SEARCH_SQL = "search-sql",
|
|
166
|
-
SITEMAP = "sitemap",
|
|
167
|
-
TETRASCIENCE_ICON = "tetrascience-icon",
|
|
168
|
-
TEXT = "text",
|
|
169
|
-
TRASH = "trash",
|
|
170
|
-
VIEWFINDER_CIRCLE = "viewfinder-circle"
|
|
171
|
-
}
|
|
172
|
-
declare const Icon: (props: IconsProps) => react_jsx_runtime.JSX.Element;
|
|
173
|
-
|
|
174
|
-
type InputSize = "xsmall" | "small";
|
|
175
|
-
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
176
|
-
size?: InputSize;
|
|
177
|
-
iconLeft?: React$1.ReactNode;
|
|
178
|
-
iconRight?: React$1.ReactNode;
|
|
179
|
-
error?: boolean;
|
|
180
|
-
disabled?: boolean;
|
|
181
|
-
ref?: React$1.Ref<HTMLInputElement>;
|
|
182
|
-
}
|
|
183
|
-
declare const Input: ({ size, iconLeft, iconRight, error, disabled, ref, ...rest }: InputProps) => react_jsx_runtime.JSX.Element;
|
|
184
|
-
|
|
185
|
-
interface LabelProps {
|
|
186
|
-
children: React$1.ReactNode;
|
|
187
|
-
infoText?: string;
|
|
188
|
-
className?: string;
|
|
189
|
-
}
|
|
190
|
-
declare const Label: React$1.FC<LabelProps>;
|
|
191
|
-
|
|
192
|
-
type CodeComponentProps = ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & ExtraProps & {
|
|
193
|
-
inline?: boolean;
|
|
194
|
-
};
|
|
195
|
-
type MarkdownDisplayProps = {
|
|
196
|
-
markdown: string;
|
|
197
|
-
codeRenderer?: (props: CodeComponentProps) => React$1.ReactElement;
|
|
198
|
-
};
|
|
199
|
-
declare const MarkdownDisplay: ({ markdown, codeRenderer }: MarkdownDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
200
|
-
|
|
201
|
-
interface MenuItemProps {
|
|
202
|
-
label: string;
|
|
203
|
-
checked?: boolean;
|
|
204
|
-
showCheckbox?: boolean;
|
|
205
|
-
onClick?: () => void;
|
|
206
|
-
onCheckChange?: (checked: boolean) => void;
|
|
207
|
-
active?: boolean;
|
|
208
|
-
className?: string;
|
|
209
|
-
ref?: React$1.Ref<HTMLDivElement>;
|
|
210
|
-
}
|
|
211
|
-
declare const MenuItem: ({ label, checked, showCheckbox, onClick, onCheckChange, active, className, ref, }: MenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
212
|
-
|
|
213
|
-
interface ModalProps {
|
|
214
|
-
isOpen: boolean;
|
|
215
|
-
onClose: () => void;
|
|
216
|
-
onCloseLabel?: string;
|
|
217
|
-
onConfirm: () => void;
|
|
218
|
-
onConfirmLabel?: string;
|
|
219
|
-
children: ReactNode;
|
|
220
|
-
width?: string;
|
|
221
|
-
className?: string;
|
|
222
|
-
hideActions?: boolean;
|
|
223
|
-
title?: string;
|
|
224
|
-
}
|
|
225
|
-
declare const Modal: ({ isOpen, onClose, onCloseLabel, onConfirm, onConfirmLabel, children, width, className, hideActions, title, }: ModalProps) => false | react_jsx_runtime.JSX.Element;
|
|
226
|
-
|
|
227
|
-
type PopConfirmPlacement = "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
228
|
-
interface PopConfirmProps {
|
|
229
|
-
title?: ReactNode;
|
|
230
|
-
description?: ReactNode;
|
|
231
|
-
onConfirm?: (e?: React$1.MouseEvent<HTMLElement>) => void;
|
|
232
|
-
onCancel?: (e?: React$1.MouseEvent<HTMLElement>) => void;
|
|
233
|
-
okText?: string;
|
|
234
|
-
cancelText?: string;
|
|
235
|
-
placement?: PopConfirmPlacement;
|
|
236
|
-
children: ReactNode;
|
|
237
|
-
className?: string;
|
|
238
|
-
okButtonProps?: React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
239
|
-
cancelButtonProps?: React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
240
|
-
}
|
|
241
|
-
declare const PopConfirm: React$1.FC<PopConfirmProps>;
|
|
242
|
-
|
|
243
|
-
interface SupportiveTextProps {
|
|
244
|
-
children: React$1.ReactNode;
|
|
245
|
-
showCheck?: boolean;
|
|
246
|
-
className?: string;
|
|
247
|
-
}
|
|
248
|
-
declare const SupportiveText: React$1.FC<SupportiveTextProps>;
|
|
249
|
-
|
|
250
|
-
type TabSize = "small" | "medium";
|
|
251
|
-
interface TabProps {
|
|
252
|
-
label: string;
|
|
253
|
-
active?: boolean;
|
|
254
|
-
disabled?: boolean;
|
|
255
|
-
size?: TabSize;
|
|
256
|
-
onClick?: () => void;
|
|
257
|
-
}
|
|
258
|
-
declare const Tab: React$1.FC<TabProps>;
|
|
259
|
-
|
|
260
|
-
interface TableCellProps extends React$1.TdHTMLAttributes<HTMLTableCellElement> {
|
|
261
|
-
children?: React$1.ReactNode;
|
|
262
|
-
align?: "left" | "center" | "right";
|
|
263
|
-
width?: string;
|
|
264
|
-
className?: string;
|
|
265
|
-
ref?: React$1.Ref<HTMLTableCellElement>;
|
|
266
|
-
}
|
|
267
|
-
declare const TableCell: ({ children, align, width, className, ref, ...props }: TableCellProps) => react_jsx_runtime.JSX.Element;
|
|
268
|
-
|
|
269
|
-
interface TableHeaderCellProps extends React$1.ThHTMLAttributes<HTMLTableCellElement> {
|
|
270
|
-
children?: React$1.ReactNode;
|
|
271
|
-
sortable?: boolean;
|
|
272
|
-
sortDirection?: "asc" | "desc" | null;
|
|
273
|
-
onSort?: () => void;
|
|
274
|
-
filterable?: boolean;
|
|
275
|
-
filterOptions?: DropdownOption[];
|
|
276
|
-
filterValue?: string;
|
|
277
|
-
onFilterChange?: (value: string) => void;
|
|
278
|
-
width?: string;
|
|
279
|
-
className?: string;
|
|
280
|
-
ref?: React$1.Ref<HTMLTableCellElement>;
|
|
281
|
-
}
|
|
282
|
-
declare const TableHeaderCell: ({ children, sortable, sortDirection, onSort, filterable, filterOptions, filterValue, onFilterChange, width, className, ref, ...props }: TableHeaderCellProps) => react_jsx_runtime.JSX.Element;
|
|
283
|
-
|
|
284
|
-
type TextareaSize = "xsmall" | "small";
|
|
285
|
-
interface TextareaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
286
|
-
size?: TextareaSize;
|
|
287
|
-
error?: boolean;
|
|
288
|
-
disabled?: boolean;
|
|
289
|
-
fullWidth?: boolean;
|
|
290
|
-
rows?: number;
|
|
291
|
-
ref?: React$1.Ref<HTMLTextAreaElement>;
|
|
292
|
-
}
|
|
293
|
-
declare const Textarea: ({ size, error, disabled, fullWidth, rows, ref, ...rest }: TextareaProps) => react_jsx_runtime.JSX.Element;
|
|
294
|
-
|
|
295
|
-
type ToastType = "info" | "success" | "warning" | "danger" | "default";
|
|
296
|
-
interface ToastProps {
|
|
297
|
-
type?: ToastType;
|
|
298
|
-
heading: string;
|
|
299
|
-
description?: string;
|
|
300
|
-
className?: string;
|
|
301
|
-
}
|
|
302
|
-
declare const Toast: React$1.FC<ToastProps>;
|
|
303
|
-
|
|
304
|
-
interface ToggleProps {
|
|
305
|
-
checked?: boolean;
|
|
306
|
-
onChange?: (checked: boolean) => void;
|
|
307
|
-
disabled?: boolean;
|
|
308
|
-
label?: string;
|
|
309
|
-
className?: string;
|
|
310
|
-
}
|
|
311
|
-
declare const Toggle: React$1.FC<ToggleProps>;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* TDP Navigation Utilities
|
|
315
|
-
*
|
|
316
|
-
* Pure utility functions for constructing and navigating to TDP URLs.
|
|
317
|
-
* These work independently of React and can be used in any context.
|
|
318
|
-
*
|
|
319
|
-
* Data apps run inside iframes within TDP. These utilities help resolve
|
|
320
|
-
* the TDP base URL from the iframe context and construct navigation URLs.
|
|
321
|
-
*/
|
|
322
|
-
/**
|
|
323
|
-
* Extract the TDP base URL from `document.referrer`.
|
|
324
|
-
*
|
|
325
|
-
* In production, data apps run inside iframes within TDP. The browser
|
|
326
|
-
* provides `document.referrer` containing the parent TDP page URL.
|
|
327
|
-
* This function strips the known route path to get the base URL
|
|
328
|
-
* (origin + org slug path prefix).
|
|
329
|
-
*
|
|
330
|
-
* @example
|
|
331
|
-
* // referrer: "https://tetrascience-uat.com/my-org/data-workspace/abc"
|
|
332
|
-
* getTdpBaseUrlFromReferrer() // "https://tetrascience-uat.com/my-org"
|
|
333
|
-
*
|
|
334
|
-
* @returns The TDP base URL, or null if detection fails
|
|
335
|
-
*/
|
|
336
|
-
declare function getTdpBaseUrlFromReferrer(): string | null;
|
|
337
|
-
/**
|
|
338
|
-
* Construct a full TDP URL by joining a base URL with a path.
|
|
339
|
-
*
|
|
340
|
-
* @example
|
|
341
|
-
* buildTdpUrl("https://tetrascience.com/my-org", "/file/abc-123")
|
|
342
|
-
* // "https://tetrascience.com/my-org/file/abc-123"
|
|
343
|
-
*
|
|
344
|
-
* @param baseUrl - The TDP base URL (origin + optional org prefix)
|
|
345
|
-
* @param path - The TDP page path (e.g., "/file/abc-123")
|
|
346
|
-
* @returns The full TDP URL, or null if construction fails
|
|
347
|
-
*/
|
|
348
|
-
declare function buildTdpUrl(baseUrl: string, path: string): string | null;
|
|
349
|
-
interface TdpNavigationOptions {
|
|
350
|
-
/** Open in a new tab instead of navigating the parent TDP frame. Default: false */
|
|
351
|
-
newTab?: boolean;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Navigate to a TDP URL.
|
|
355
|
-
*
|
|
356
|
-
* - `{ newTab: true }` opens the URL in a new browser tab.
|
|
357
|
-
* - Default: sends a `postMessage` to the parent TDP frame (same-tab navigation
|
|
358
|
-
* when inside an iframe), or navigates the current window (standalone).
|
|
359
|
-
*
|
|
360
|
-
* @param url - Full TDP URL to navigate to
|
|
361
|
-
* @param options - Navigation options
|
|
362
|
-
*/
|
|
363
|
-
declare function navigateToTdpUrl(url: string, options?: TdpNavigationOptions): void;
|
|
364
|
-
/**
|
|
365
|
-
* Convenience helpers for constructing common TDP page paths.
|
|
366
|
-
* Returns path strings for use with `getTdpUrl()` or `buildTdpUrl()`.
|
|
367
|
-
*
|
|
368
|
-
* @example
|
|
369
|
-
* const { getTdpUrl } = useTdpNavigation();
|
|
370
|
-
* const url = getTdpUrl(tdpPaths.fileDetails("abc-123"));
|
|
371
|
-
*/
|
|
372
|
-
declare const tdpPaths: {
|
|
373
|
-
fileDetails: (fileId: string) => string;
|
|
374
|
-
pipelineEdit: (pipelineId: string) => string;
|
|
375
|
-
pipelineDetails: (pipelineId: string) => string;
|
|
376
|
-
search: (query?: string) => string;
|
|
377
|
-
dataWorkspace: () => string;
|
|
378
|
-
dataApps: () => string;
|
|
379
|
-
artifact: (type: string, namespace: string, slug: string) => string;
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
interface TdpNavigationContextValue {
|
|
383
|
-
/** The resolved TDP base URL (origin + org path prefix), or null if not resolved */
|
|
384
|
-
tdpBaseUrl: string | null;
|
|
385
|
-
/** Construct a full TDP URL from a path. Returns null if base URL is not resolved. */
|
|
386
|
-
getTdpUrl: (path: string) => string | null;
|
|
387
|
-
/** Navigate to a TDP page. */
|
|
388
|
-
navigateToTdp: (path: string, options?: TdpNavigationOptions) => void;
|
|
389
|
-
}
|
|
390
|
-
declare const TdpNavigationContext: React$1.Context<TdpNavigationContextValue | null>;
|
|
391
|
-
/**
|
|
392
|
-
* Access TDP navigation helpers from the nearest TdpNavigationProvider.
|
|
393
|
-
*
|
|
394
|
-
* @throws Error if used outside a TdpNavigationProvider
|
|
395
|
-
*
|
|
396
|
-
* @example
|
|
397
|
-
* ```tsx
|
|
398
|
-
* const { getTdpUrl, navigateToTdp } = useTdpNavigationContext();
|
|
399
|
-
* ```
|
|
400
|
-
*/
|
|
401
|
-
declare function useTdpNavigationContext(): TdpNavigationContextValue;
|
|
402
|
-
/** Props for the TdpNavigationProvider component */
|
|
403
|
-
interface TdpNavigationProviderProps {
|
|
404
|
-
/**
|
|
405
|
-
* Explicit TDP base URL override. Skips auto-detection when provided.
|
|
406
|
-
*/
|
|
407
|
-
tdpBaseUrl?: string;
|
|
408
|
-
children: React$1.ReactNode;
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Provider that resolves the TDP base URL and exposes navigation helpers.
|
|
412
|
-
*
|
|
413
|
-
* Resolution order:
|
|
414
|
-
* 1. Explicit `tdpBaseUrl` prop (if provided)
|
|
415
|
-
* 2. `document.referrer` parsing (production iframe)
|
|
416
|
-
*
|
|
417
|
-
* @example
|
|
418
|
-
* ```tsx
|
|
419
|
-
* <TdpNavigationProvider tdpBaseUrl="https://tetrascience.com/my-org">
|
|
420
|
-
* <App />
|
|
421
|
-
* </TdpNavigationProvider>
|
|
422
|
-
* ```
|
|
423
|
-
*/
|
|
424
|
-
declare const TdpNavigationProvider: React$1.FC<TdpNavigationProviderProps>;
|
|
425
|
-
interface UseTdpNavigationOptions {
|
|
426
|
-
/** Explicit TDP base URL override */
|
|
427
|
-
tdpBaseUrl?: string;
|
|
428
|
-
}
|
|
429
|
-
interface UseTdpNavigationReturn {
|
|
430
|
-
/** The resolved TDP base URL, or null */
|
|
431
|
-
tdpBaseUrl: string | null;
|
|
432
|
-
/** Construct a full TDP URL from a path */
|
|
433
|
-
getTdpUrl: (path: string) => string | null;
|
|
434
|
-
/** Navigate to a TDP page */
|
|
435
|
-
navigateToTdp: (path: string, options?: TdpNavigationOptions) => void;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Standalone hook for TDP navigation (no provider required).
|
|
439
|
-
*
|
|
440
|
-
* For simple use cases where you don't need a TdpNavigationProvider.
|
|
441
|
-
* If multiple components need navigation, prefer the provider approach.
|
|
442
|
-
*
|
|
443
|
-
* @example
|
|
444
|
-
* ```tsx
|
|
445
|
-
* function MyComponent() {
|
|
446
|
-
* const { getTdpUrl, navigateToTdp } = useTdpNavigation({
|
|
447
|
-
* tdpBaseUrl: "https://tetrascience.com/my-org",
|
|
448
|
-
* });
|
|
449
|
-
*
|
|
450
|
-
* return (
|
|
451
|
-
* <a href={getTdpUrl("/file/abc") ?? "#"} target="_blank" rel="noopener noreferrer">
|
|
452
|
-
* View File
|
|
453
|
-
* </a>
|
|
454
|
-
* );
|
|
455
|
-
* }
|
|
456
|
-
* ```
|
|
457
|
-
*/
|
|
458
|
-
declare function useTdpNavigation(options?: UseTdpNavigationOptions): UseTdpNavigationReturn;
|
|
459
|
-
/** Props for the TDPLink component */
|
|
460
|
-
interface TDPLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
461
|
-
/** TDP page path (e.g., "/file/abc-123" or use tdpPaths helpers) */
|
|
462
|
-
path: string;
|
|
463
|
-
/** Navigation behavior. Default: { newTab: true } */
|
|
464
|
-
navigationOptions?: TdpNavigationOptions;
|
|
465
|
-
children: React$1.ReactNode;
|
|
466
|
-
ref?: React$1.Ref<HTMLAnchorElement>;
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* A link component that navigates to TDP pages.
|
|
470
|
-
*
|
|
471
|
-
* Renders a standard `<a>` tag with the correct href for right-click
|
|
472
|
-
* "Open in new tab" support, accessibility, and SEO.
|
|
473
|
-
*
|
|
474
|
-
* Must be used inside a `<TdpNavigationProvider>`.
|
|
475
|
-
*
|
|
476
|
-
* @example
|
|
477
|
-
* ```tsx
|
|
478
|
-
* import { TDPLink, tdpPaths } from '@tetrascience-npm/tetrascience-react-ui';
|
|
479
|
-
*
|
|
480
|
-
* <TDPLink path={tdpPaths.fileDetails("abc-123")}>
|
|
481
|
-
* View File Details
|
|
482
|
-
* </TDPLink>
|
|
483
|
-
*
|
|
484
|
-
* <TDPLink path="/search?q=test" navigationOptions={{ newTab: false }}>
|
|
485
|
-
* Search in TDP (same tab)
|
|
486
|
-
* </TDPLink>
|
|
487
|
-
* ```
|
|
488
|
-
*/
|
|
489
|
-
declare const TDPLink: React$1.FC<TDPLinkProps>;
|
|
490
|
-
|
|
491
|
-
type TooltipPlacement = "top" | "right" | "bottom" | "left";
|
|
492
|
-
interface TooltipProps {
|
|
493
|
-
content: ReactNode;
|
|
494
|
-
children: ReactNode;
|
|
495
|
-
placement?: TooltipPlacement;
|
|
496
|
-
className?: string;
|
|
497
|
-
delay?: number;
|
|
498
|
-
}
|
|
499
|
-
declare const Tooltip: React$1.FC<TooltipProps>;
|
|
500
|
-
|
|
501
|
-
interface UserProfileProps {
|
|
502
|
-
name: string;
|
|
503
|
-
avatar?: string;
|
|
504
|
-
}
|
|
505
|
-
interface AppHeaderProps {
|
|
506
|
-
hostname: string;
|
|
507
|
-
userProfile: UserProfileProps;
|
|
508
|
-
onHomeClick?: () => void;
|
|
509
|
-
onSettingsClick?: () => void;
|
|
510
|
-
onUserProfileClick?: () => void;
|
|
511
|
-
}
|
|
512
|
-
declare const AppHeader: React$1.FC<AppHeaderProps>;
|
|
513
|
-
|
|
514
|
-
interface AssistantModalProps {
|
|
515
|
-
open: boolean;
|
|
516
|
-
title: string;
|
|
517
|
-
prompt: string;
|
|
518
|
-
initialCode?: string;
|
|
519
|
-
userQuery?: string;
|
|
520
|
-
onUserQueryChange?: (value: string) => void;
|
|
521
|
-
onCopy: (code: string) => void;
|
|
522
|
-
onLaunch: (code: string) => void;
|
|
523
|
-
onSend: (input: string) => void;
|
|
524
|
-
onCancel: () => void;
|
|
525
|
-
}
|
|
526
|
-
declare const AssistantModal: React$1.FC<AssistantModalProps>;
|
|
527
|
-
|
|
528
|
-
interface ButtonControlItem extends ButtonControlProps {
|
|
529
|
-
id: string;
|
|
530
|
-
}
|
|
531
|
-
interface ButtonControlGroupProps {
|
|
532
|
-
controls: ButtonControlItem[];
|
|
533
|
-
selectedId?: string;
|
|
534
|
-
onChange?: (id: string) => void;
|
|
535
|
-
vertical?: boolean;
|
|
536
|
-
disabled?: boolean;
|
|
537
|
-
}
|
|
538
|
-
declare const ButtonControlGroup: React$1.FC<ButtonControlGroupProps>;
|
|
539
|
-
|
|
540
|
-
type CardSidebarStatus = "default" | "active" | "hover" | "disabled";
|
|
541
|
-
interface CardSidebarProps {
|
|
542
|
-
title: string;
|
|
543
|
-
description?: string;
|
|
544
|
-
buttonText?: string;
|
|
545
|
-
linkText?: string;
|
|
546
|
-
status?: CardSidebarStatus;
|
|
547
|
-
onButtonClick?: () => void;
|
|
548
|
-
onLinkClick?: () => void;
|
|
549
|
-
className?: string;
|
|
550
|
-
ref?: React$1.Ref<HTMLDivElement>;
|
|
551
|
-
}
|
|
552
|
-
declare const CardSidebar: ({ title, description, buttonText, linkText, status, onButtonClick, onLinkClick, className, ref, }: CardSidebarProps) => react_jsx_runtime.JSX.Element;
|
|
553
|
-
|
|
554
|
-
interface CodeScriptEditorButtonProps {
|
|
555
|
-
initialCode?: string;
|
|
556
|
-
onCodeSave?: (newCode: string) => void;
|
|
557
|
-
language?: string;
|
|
558
|
-
buttonText?: string;
|
|
559
|
-
modalTitle?: string;
|
|
560
|
-
buttonProps?: React.ComponentProps<typeof Button>;
|
|
561
|
-
modalProps?: Omit<React.ComponentProps<typeof Modal>, "isOpen" | "onConfirm" | "onClose">;
|
|
562
|
-
disabled?: boolean;
|
|
563
|
-
isEditMode?: boolean;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Renders an 'Edit code' button that opens a modal with a Monaco code editor.
|
|
567
|
-
*/
|
|
568
|
-
declare const CodeScriptEditorButton: ({ initialCode, onCodeSave, language, buttonText, modalTitle, buttonProps, modalProps, disabled, }: CodeScriptEditorButtonProps) => react_jsx_runtime.JSX.Element;
|
|
569
|
-
|
|
570
|
-
interface FormFieldProps extends Omit<InputProps, "className"> {
|
|
571
|
-
label: string;
|
|
572
|
-
infoText?: string;
|
|
573
|
-
supportiveText?: string;
|
|
574
|
-
showSupportiveCheck?: boolean;
|
|
575
|
-
className?: string;
|
|
576
|
-
ref?: React$1.Ref<HTMLInputElement>;
|
|
577
|
-
}
|
|
578
|
-
declare const FormField: ({ label, infoText, supportiveText, showSupportiveCheck, className, ref, ...inputProps }: FormFieldProps) => react_jsx_runtime.JSX.Element;
|
|
579
|
-
|
|
580
|
-
interface LaunchContentProps {
|
|
581
|
-
initialCode?: string;
|
|
582
|
-
onDeploy?: () => void;
|
|
583
|
-
versions?: string[];
|
|
584
|
-
currentVersion?: string;
|
|
585
|
-
onVersionChange?: (version: string) => void;
|
|
586
|
-
}
|
|
587
|
-
declare const LaunchContent: React$1.FC<LaunchContentProps>;
|
|
588
|
-
|
|
589
|
-
interface MenuItemData extends Omit<MenuItemProps, "onClick" | "onCheckChange"> {
|
|
590
|
-
id: string;
|
|
591
|
-
}
|
|
592
|
-
interface MenuProps {
|
|
593
|
-
title?: string;
|
|
594
|
-
items: MenuItemData[];
|
|
595
|
-
onItemClick?: (itemId: string) => void;
|
|
596
|
-
onItemCheckChange?: (itemId: string, checked: boolean) => void;
|
|
597
|
-
activeItemId?: string | null;
|
|
598
|
-
className?: string;
|
|
599
|
-
}
|
|
600
|
-
declare const Menu: React$1.FC<MenuProps>;
|
|
601
|
-
|
|
602
|
-
interface OrganizationInfo {
|
|
603
|
-
name: string;
|
|
604
|
-
subtext?: string;
|
|
605
|
-
logo?: React$1.ReactNode;
|
|
606
|
-
}
|
|
607
|
-
interface NavbarProps {
|
|
608
|
-
organization: OrganizationInfo;
|
|
609
|
-
}
|
|
610
|
-
declare const Navbar: React$1.FC<NavbarProps>;
|
|
611
|
-
|
|
612
|
-
interface ProtocolConfigurationProps {
|
|
613
|
-
className?: string;
|
|
614
|
-
}
|
|
615
|
-
declare const ProtocolConfiguration: React$1.FC<ProtocolConfigurationProps>;
|
|
616
|
-
|
|
617
|
-
interface ProtocolYamlCardProps {
|
|
618
|
-
title: string;
|
|
619
|
-
newVersionMode: boolean;
|
|
620
|
-
onToggleNewVersionMode: (checked: boolean) => void;
|
|
621
|
-
versionOptions: DropdownOption[];
|
|
622
|
-
selectedVersion: string;
|
|
623
|
-
onVersionChange: (value: string) => void;
|
|
624
|
-
onDeploy: () => void;
|
|
625
|
-
yaml: string;
|
|
626
|
-
onYamlChange: (value: string) => void;
|
|
627
|
-
}
|
|
628
|
-
declare const ProtocolYamlCard: React$1.FC<ProtocolYamlCardProps>;
|
|
629
|
-
|
|
630
|
-
interface PythonEditorModalProps {
|
|
631
|
-
open: boolean;
|
|
632
|
-
initialValue?: string;
|
|
633
|
-
title?: string;
|
|
634
|
-
onSave: (value: string) => void;
|
|
635
|
-
onCancel: () => void;
|
|
636
|
-
}
|
|
637
|
-
declare const PythonEditorModal: React$1.FC<PythonEditorModalProps>;
|
|
638
|
-
|
|
639
|
-
interface SelectFieldProps extends Omit<DropdownProps, "className"> {
|
|
640
|
-
label: string;
|
|
641
|
-
infoText?: string;
|
|
642
|
-
supportiveText?: string;
|
|
643
|
-
showSupportiveCheck?: boolean;
|
|
644
|
-
className?: string;
|
|
645
|
-
ref?: React$1.Ref<HTMLDivElement>;
|
|
646
|
-
}
|
|
647
|
-
declare const SelectField: ({ label, infoText, supportiveText, showSupportiveCheck, className, ref, ...dropdownProps }: SelectFieldProps) => react_jsx_runtime.JSX.Element;
|
|
648
|
-
|
|
649
|
-
interface SidebarItemProps {
|
|
650
|
-
icon: IconName;
|
|
651
|
-
label: string;
|
|
652
|
-
active?: boolean;
|
|
653
|
-
onClick?: () => void;
|
|
654
|
-
}
|
|
655
|
-
interface SidebarProps {
|
|
656
|
-
items: SidebarItemProps[];
|
|
657
|
-
activeItem?: string;
|
|
658
|
-
onItemClick?: (label: string) => void;
|
|
659
|
-
}
|
|
660
|
-
declare const Sidebar: React$1.FC<SidebarProps>;
|
|
661
|
-
|
|
662
|
-
interface TableColumn<T = any> {
|
|
663
|
-
key: string;
|
|
664
|
-
header: string;
|
|
665
|
-
sortable?: boolean;
|
|
666
|
-
filterable?: boolean;
|
|
667
|
-
filterOptions?: DropdownOption[];
|
|
668
|
-
width?: string;
|
|
669
|
-
align?: "left" | "center" | "right";
|
|
670
|
-
render?: (value: any, row: T, index: number) => React$1.ReactNode;
|
|
671
|
-
}
|
|
672
|
-
interface TableProps<T = any> {
|
|
673
|
-
columns: TableColumn<T>[];
|
|
674
|
-
data: T[];
|
|
675
|
-
pageSize?: number;
|
|
676
|
-
rowKey?: keyof T | ((row: T) => string | number);
|
|
677
|
-
selectable?: boolean;
|
|
678
|
-
onRowSelect?: (selectedRows: T[]) => void;
|
|
679
|
-
sortKey?: string;
|
|
680
|
-
sortDirection?: "asc" | "desc";
|
|
681
|
-
onSort?: (key: string, direction: "asc" | "desc") => void;
|
|
682
|
-
currentPage?: number;
|
|
683
|
-
onPageChange?: (page: number) => void;
|
|
684
|
-
totalItems?: number;
|
|
685
|
-
selectedRows?: T[];
|
|
686
|
-
className?: string;
|
|
687
|
-
}
|
|
688
|
-
declare function Table<T extends Record<string, any>>({ columns, data, pageSize, rowKey, selectable, onRowSelect, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSort: controlledOnSort, currentPage: controlledCurrentPage, onPageChange: controlledOnPageChange, totalItems, selectedRows: controlledSelectedRows, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
689
|
-
declare namespace Table {
|
|
690
|
-
var displayName: string;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
interface TabItem extends Omit<TabProps, "active" | "onClick"> {
|
|
694
|
-
id: string;
|
|
695
|
-
}
|
|
696
|
-
interface TabGroupProps {
|
|
697
|
-
tabs: TabItem[];
|
|
698
|
-
activeTab?: string;
|
|
699
|
-
onChange?: (tabId: string) => void;
|
|
700
|
-
disabled?: boolean;
|
|
701
|
-
size?: TabSize;
|
|
702
|
-
}
|
|
703
|
-
declare const TabGroup: React$1.FC<TabGroupProps>;
|
|
704
2167
|
|
|
705
2168
|
declare module "styled-components" {
|
|
706
2169
|
interface DefaultTheme {
|
|
707
2170
|
position: ToastPosition;
|
|
708
2171
|
}
|
|
709
2172
|
}
|
|
710
|
-
type ToastPosition = "top" | "bottom";
|
|
711
|
-
interface ToastContainerProps {
|
|
712
|
-
position: ToastPosition;
|
|
713
|
-
}
|
|
714
|
-
interface ToastManagerProps {
|
|
715
|
-
position?: ToastPosition;
|
|
716
|
-
}
|
|
717
|
-
declare const ToastManager: React$1.FC<ToastManagerProps>;
|
|
718
|
-
|
|
719
|
-
interface AppLayoutProps {
|
|
720
|
-
userProfile: {
|
|
721
|
-
name: string;
|
|
722
|
-
avatar?: string;
|
|
723
|
-
};
|
|
724
|
-
hostname: string;
|
|
725
|
-
organization: {
|
|
726
|
-
name: string;
|
|
727
|
-
subtext?: string;
|
|
728
|
-
logo?: React$1.ReactNode;
|
|
729
|
-
};
|
|
730
|
-
children?: React$1.ReactNode;
|
|
731
|
-
}
|
|
732
|
-
declare const AppLayout: React$1.FC<AppLayoutProps>;
|
|
733
|
-
|
|
734
|
-
interface AreaDataSeries {
|
|
735
|
-
x: number[];
|
|
736
|
-
y: number[];
|
|
737
|
-
name: string;
|
|
738
|
-
color: string;
|
|
739
|
-
fill?: "tozeroy" | "tonexty" | "toself";
|
|
740
|
-
}
|
|
741
|
-
type AreaGraphVariant = "normal" | "stacked";
|
|
742
|
-
interface AreaGraphProps {
|
|
743
|
-
dataSeries: AreaDataSeries[];
|
|
744
|
-
width?: number;
|
|
745
|
-
height?: number;
|
|
746
|
-
xRange?: [number, number];
|
|
747
|
-
yRange?: [number, number];
|
|
748
|
-
variant?: AreaGraphVariant;
|
|
749
|
-
xTitle?: string;
|
|
750
|
-
yTitle?: string;
|
|
751
|
-
title?: string;
|
|
752
|
-
}
|
|
753
|
-
declare const AreaGraph: React$1.FC<AreaGraphProps>;
|
|
754
|
-
|
|
755
|
-
interface BarDataSeries {
|
|
756
|
-
x: number[];
|
|
757
|
-
y: number[];
|
|
758
|
-
name: string;
|
|
759
|
-
color: string;
|
|
760
|
-
error_y?: {
|
|
761
|
-
type: "data";
|
|
762
|
-
array: number[];
|
|
763
|
-
visible: boolean;
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
type BarGraphVariant = "group" | "stack" | "overlay";
|
|
767
|
-
interface BarGraphProps {
|
|
768
|
-
dataSeries: BarDataSeries[];
|
|
769
|
-
width?: number;
|
|
770
|
-
height?: number;
|
|
771
|
-
xRange?: [number, number];
|
|
772
|
-
yRange?: [number, number];
|
|
773
|
-
variant?: BarGraphVariant;
|
|
774
|
-
xTitle?: string;
|
|
775
|
-
yTitle?: string;
|
|
776
|
-
title?: string;
|
|
777
|
-
barWidth?: number;
|
|
778
|
-
}
|
|
779
|
-
declare const BarGraph: React$1.FC<BarGraphProps>;
|
|
780
|
-
|
|
781
|
-
interface BoxDataSeries {
|
|
782
|
-
y: number[];
|
|
783
|
-
name: string;
|
|
784
|
-
color: string;
|
|
785
|
-
x?: string[] | number[];
|
|
786
|
-
boxpoints?: "all" | "outliers" | "suspectedoutliers" | false;
|
|
787
|
-
jitter?: number;
|
|
788
|
-
pointpos?: number;
|
|
789
|
-
}
|
|
790
|
-
interface BoxplotProps {
|
|
791
|
-
dataSeries: BoxDataSeries[];
|
|
792
|
-
width?: number;
|
|
793
|
-
height?: number;
|
|
794
|
-
xRange?: [number, number];
|
|
795
|
-
yRange?: [number, number];
|
|
796
|
-
xTitle?: string;
|
|
797
|
-
yTitle?: string;
|
|
798
|
-
title?: string;
|
|
799
|
-
showPoints?: boolean;
|
|
800
|
-
}
|
|
801
|
-
declare const Boxplot: React$1.FC<BoxplotProps>;
|
|
802
|
-
|
|
803
|
-
interface PeakData {
|
|
804
|
-
position: number;
|
|
805
|
-
base?: string;
|
|
806
|
-
peakA: number;
|
|
807
|
-
peakT: number;
|
|
808
|
-
peakG: number;
|
|
809
|
-
peakC: number;
|
|
810
|
-
}
|
|
811
|
-
interface ChromatogramProps {
|
|
812
|
-
data?: PeakData[];
|
|
813
|
-
width?: number;
|
|
814
|
-
height?: number;
|
|
815
|
-
positionInterval?: number;
|
|
816
|
-
colorA?: string;
|
|
817
|
-
colorT?: string;
|
|
818
|
-
colorG?: string;
|
|
819
|
-
colorC?: string;
|
|
820
|
-
}
|
|
821
|
-
declare const Chromatogram: React$1.FC<ChromatogramProps>;
|
|
822
|
-
|
|
823
|
-
/**
|
|
824
|
-
* Type definitions for ChromatogramChart component
|
|
825
|
-
*/
|
|
826
|
-
/**
|
|
827
|
-
* Data series for chromatogram visualization
|
|
828
|
-
*/
|
|
829
|
-
interface ChromatogramSeries {
|
|
830
|
-
/** Retention time values (x-axis) */
|
|
831
|
-
x: number[];
|
|
832
|
-
/** Signal intensity values (y-axis) */
|
|
833
|
-
y: number[];
|
|
834
|
-
/** Series label for legend */
|
|
835
|
-
name: string;
|
|
836
|
-
/** Optional color override (auto-assigned from CHART_COLORS if not provided) */
|
|
837
|
-
color?: string;
|
|
838
|
-
/** Optional metadata for the trace (displayed in tooltip on hover) */
|
|
839
|
-
metadata?: Record<string, unknown>;
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* Individual boundary marker type for a single boundary point
|
|
843
|
-
*/
|
|
844
|
-
type BoundaryMarkerType = "none" | "triangle" | "diamond";
|
|
845
|
-
/**
|
|
846
|
-
* Internal computed fields for peak annotations.
|
|
847
|
-
* These are populated by the component during processing.
|
|
848
|
-
* @internal
|
|
849
|
-
*/
|
|
850
|
-
interface PeakComputedFields {
|
|
851
|
-
/** Peak area calculated using trapezoidal integration */
|
|
852
|
-
area?: number;
|
|
853
|
-
/** Peak index in the data array */
|
|
854
|
-
index?: number;
|
|
855
|
-
/** Start index of peak boundary in the data array */
|
|
856
|
-
startIndex?: number;
|
|
857
|
-
/** End index of peak boundary in the data array */
|
|
858
|
-
endIndex?: number;
|
|
859
|
-
/** Peak width at half maximum */
|
|
860
|
-
widthAtHalfMax?: number;
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* Peak annotation for labeling peaks on the chromatogram.
|
|
864
|
-
* Used for both user-provided annotations and auto-detected peaks.
|
|
865
|
-
*/
|
|
866
|
-
interface PeakAnnotation {
|
|
867
|
-
/** Retention time of the peak (x-axis position) */
|
|
868
|
-
x: number;
|
|
869
|
-
/** Signal intensity at peak (y-axis position) */
|
|
870
|
-
y: number;
|
|
871
|
-
/** Label text (e.g., compound name). If not provided, auto-generated from computed area. */
|
|
872
|
-
text?: string;
|
|
873
|
-
/** Vertical arrow offset in pixels (negative = above peak, default: -30) */
|
|
874
|
-
ay?: number;
|
|
875
|
-
/** Horizontal arrow offset in pixels (default: 0) */
|
|
876
|
-
ax?: number;
|
|
877
|
-
/** Start retention time for peak boundary */
|
|
878
|
-
startX?: number;
|
|
879
|
-
/** End retention time for peak boundary */
|
|
880
|
-
endX?: number;
|
|
881
|
-
/** Marker style for start boundary (default: "triangle") */
|
|
882
|
-
startMarker?: BoundaryMarkerType;
|
|
883
|
-
/** Marker style for end boundary (default: "diamond") */
|
|
884
|
-
endMarker?: BoundaryMarkerType;
|
|
885
|
-
/**
|
|
886
|
-
* Internal computed fields populated by the component.
|
|
887
|
-
* @internal Do not set these directly - they are computed from startX/endX or auto-detection.
|
|
888
|
-
*/
|
|
889
|
-
_computed?: PeakComputedFields;
|
|
890
|
-
}
|
|
891
|
-
/**
|
|
892
|
-
* Baseline correction method
|
|
893
|
-
*/
|
|
894
|
-
type BaselineCorrectionMethod = "none" | "linear" | "rolling";
|
|
895
|
-
/**
|
|
896
|
-
* Global boundary marker style setting
|
|
897
|
-
* - "none": No boundary markers displayed
|
|
898
|
-
* - "enabled": Show boundary markers using per-peak settings (startMarker/endMarker) or defaults
|
|
899
|
-
*/
|
|
900
|
-
type BoundaryMarkerStyle = "none" | "enabled";
|
|
901
|
-
/**
|
|
902
|
-
* Peak detection algorithm options
|
|
903
|
-
*/
|
|
904
|
-
interface PeakDetectionOptions {
|
|
905
|
-
/** Minimum peak height threshold (absolute or relative to max, default: 0.05) */
|
|
906
|
-
minHeight?: number;
|
|
907
|
-
/** Minimum distance between peaks in data points (default: 5) */
|
|
908
|
-
minDistance?: number;
|
|
909
|
-
/** Prominence threshold - how much a peak stands out from neighbors (default: 0.02) */
|
|
910
|
-
prominence?: number;
|
|
911
|
-
/** Use relative threshold as percentage of max signal (default: true) */
|
|
912
|
-
relativeThreshold?: boolean;
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* Props for ChromatogramChart component
|
|
916
|
-
*/
|
|
917
|
-
interface ChromatogramChartProps {
|
|
918
|
-
/** Array of data series to display */
|
|
919
|
-
series: ChromatogramSeries[];
|
|
920
|
-
/** Chart width in pixels */
|
|
921
|
-
width?: number;
|
|
922
|
-
/** Chart height in pixels */
|
|
923
|
-
height?: number;
|
|
924
|
-
/** Chart title */
|
|
925
|
-
title?: string;
|
|
926
|
-
/** X-axis label */
|
|
927
|
-
xAxisTitle?: string;
|
|
928
|
-
/** Y-axis label */
|
|
929
|
-
yAxisTitle?: string;
|
|
930
|
-
/** Peak annotations to display */
|
|
931
|
-
annotations?: PeakAnnotation[];
|
|
932
|
-
/** Fixed x-axis range [min, max] */
|
|
933
|
-
xRange?: [number, number];
|
|
934
|
-
/** Fixed y-axis range [min, max] */
|
|
935
|
-
yRange?: [number, number];
|
|
936
|
-
/** Show legend (default: true) */
|
|
937
|
-
showLegend?: boolean;
|
|
938
|
-
/** Show vertical grid lines (default: true) */
|
|
939
|
-
showGridX?: boolean;
|
|
940
|
-
/** Show horizontal grid lines (default: true) */
|
|
941
|
-
showGridY?: boolean;
|
|
942
|
-
/** Show data point markers (default: false) */
|
|
943
|
-
showMarkers?: boolean;
|
|
944
|
-
/** Marker size when showMarkers is true (default: 4) */
|
|
945
|
-
markerSize?: number;
|
|
946
|
-
/** Show crosshairs on hover (default: false) */
|
|
947
|
-
showCrosshairs?: boolean;
|
|
948
|
-
/** Baseline correction method (default: "none") */
|
|
949
|
-
baselineCorrection?: BaselineCorrectionMethod;
|
|
950
|
-
/** Rolling baseline window size (default: 50) */
|
|
951
|
-
baselineWindowSize?: number;
|
|
952
|
-
/** Peak detection algorithm options - if provided, enables automatic peak detection */
|
|
953
|
-
peakDetectionOptions?: PeakDetectionOptions;
|
|
954
|
-
/** Show peak areas as annotations (default: false) */
|
|
955
|
-
showPeakAreas?: boolean;
|
|
956
|
-
/**
|
|
957
|
-
* Show peak boundary markers (default: "none").
|
|
958
|
-
* - "none": No boundary markers displayed
|
|
959
|
-
* - "enabled": Show boundary markers using per-peak startMarker/endMarker settings
|
|
960
|
-
*
|
|
961
|
-
* Per-peak marker defaults: startMarker="triangle", endMarker="diamond"
|
|
962
|
-
*/
|
|
963
|
-
boundaryMarkers?: BoundaryMarkerStyle;
|
|
964
|
-
/**
|
|
965
|
-
* Retention time threshold for grouping overlapping annotations (default: 0.4 minutes).
|
|
966
|
-
* Peaks closer than this threshold will have their annotations staggered to avoid overlap.
|
|
967
|
-
*/
|
|
968
|
-
annotationOverlapThreshold?: number;
|
|
969
|
-
/** Show export button in modebar (default: true) */
|
|
970
|
-
showExportButton?: boolean;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
declare const ChromatogramChart: React$1.FC<ChromatogramChartProps>;
|
|
974
|
-
|
|
975
|
-
type MarkerSymbol$1 = "circle" | "square" | "diamond" | "triangle-up" | "triangle-down" | "star";
|
|
976
|
-
interface DotPlotDataSeries {
|
|
977
|
-
x: number[];
|
|
978
|
-
y: number[];
|
|
979
|
-
name: string;
|
|
980
|
-
color?: string;
|
|
981
|
-
symbol?: MarkerSymbol$1;
|
|
982
|
-
size?: number;
|
|
983
|
-
}
|
|
984
|
-
type DotPlotVariant = "default" | "stacked";
|
|
985
|
-
type DotPlotProps = {
|
|
986
|
-
dataSeries: DotPlotDataSeries | DotPlotDataSeries[];
|
|
987
|
-
width?: number;
|
|
988
|
-
height?: number;
|
|
989
|
-
title?: string;
|
|
990
|
-
xTitle?: string;
|
|
991
|
-
yTitle?: string;
|
|
992
|
-
variant?: DotPlotVariant;
|
|
993
|
-
markerSize?: number;
|
|
994
|
-
};
|
|
995
|
-
declare const DotPlot: React$1.FC<DotPlotProps>;
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* Props for the Heatmap component
|
|
999
|
-
* @deprecated Use PlateMap component instead. Heatmap is now a wrapper around PlateMap for backward compatibility.
|
|
1000
|
-
*/
|
|
1001
|
-
interface HeatmapProps {
|
|
1002
|
-
/** 2D array of numeric values */
|
|
1003
|
-
data?: number[][];
|
|
1004
|
-
/** Custom x-axis labels (column labels) */
|
|
1005
|
-
xLabels?: string[] | number[];
|
|
1006
|
-
/** Custom y-axis labels (row labels) */
|
|
1007
|
-
yLabels?: string[] | number[];
|
|
1008
|
-
/** Chart title */
|
|
1009
|
-
title?: string;
|
|
1010
|
-
/** X-axis title */
|
|
1011
|
-
xTitle?: string;
|
|
1012
|
-
/** Y-axis title */
|
|
1013
|
-
yTitle?: string;
|
|
1014
|
-
/** Color scale - string name or array of [position, color] pairs */
|
|
1015
|
-
colorscale?: string | Array<[number, string]>;
|
|
1016
|
-
/** Chart width in pixels */
|
|
1017
|
-
width?: number;
|
|
1018
|
-
/** Chart height in pixels */
|
|
1019
|
-
height?: number;
|
|
1020
|
-
/** Show color scale legend */
|
|
1021
|
-
showScale?: boolean;
|
|
1022
|
-
/** Number of decimal places for values */
|
|
1023
|
-
precision?: number;
|
|
1024
|
-
/** Minimum value for color scale */
|
|
1025
|
-
zmin?: number;
|
|
1026
|
-
/** Maximum value for color scale */
|
|
1027
|
-
zmax?: number;
|
|
1028
|
-
/** Value unit suffix */
|
|
1029
|
-
valueUnit?: string;
|
|
1030
|
-
}
|
|
1031
|
-
declare const Heatmap: React$1.FC<HeatmapProps>;
|
|
1032
|
-
|
|
1033
|
-
interface HistogramDataSeries {
|
|
1034
|
-
x: number[];
|
|
1035
|
-
name: string;
|
|
1036
|
-
color?: string;
|
|
1037
|
-
autobinx?: boolean;
|
|
1038
|
-
xbins?: {
|
|
1039
|
-
start: number;
|
|
1040
|
-
end: number;
|
|
1041
|
-
size: number;
|
|
1042
|
-
};
|
|
1043
|
-
opacity?: number;
|
|
1044
|
-
showDistributionLine?: boolean;
|
|
1045
|
-
lineWidth?: number;
|
|
1046
|
-
}
|
|
1047
|
-
type HistogramProps = {
|
|
1048
|
-
dataSeries: HistogramDataSeries | HistogramDataSeries[];
|
|
1049
|
-
width?: number;
|
|
1050
|
-
height?: number;
|
|
1051
|
-
title?: string;
|
|
1052
|
-
xTitle?: string;
|
|
1053
|
-
yTitle?: string;
|
|
1054
|
-
bargap?: number;
|
|
1055
|
-
showDistributionLine?: boolean;
|
|
1056
|
-
};
|
|
1057
|
-
declare const Histogram: React$1.FC<HistogramProps>;
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* A single data point in the scatter plot
|
|
1061
|
-
*/
|
|
1062
|
-
interface ScatterPoint {
|
|
1063
|
-
/** Unique identifier for the point */
|
|
1064
|
-
id: string | number;
|
|
1065
|
-
/** X-axis value */
|
|
1066
|
-
x: number;
|
|
1067
|
-
/** Y-axis value */
|
|
1068
|
-
y: number;
|
|
1069
|
-
/** Optional label for the point */
|
|
1070
|
-
label?: string;
|
|
1071
|
-
/** Additional metadata for tooltips and styling */
|
|
1072
|
-
metadata?: Record<string, unknown>;
|
|
1073
|
-
}
|
|
1074
|
-
/**
|
|
1075
|
-
* Scale type for axes
|
|
1076
|
-
*/
|
|
1077
|
-
type ScaleType = "linear" | "log";
|
|
1078
|
-
/**
|
|
1079
|
-
* Marker shape for scatter points
|
|
1080
|
-
*/
|
|
1081
|
-
type MarkerShape = "circle" | "square" | "diamond" | "cross" | "x" | "triangle-up" | "triangle-down" | "star";
|
|
1082
|
-
/**
|
|
1083
|
-
* Selection mode for interactive selection
|
|
1084
|
-
*/
|
|
1085
|
-
type SelectionMode = "replace" | "add" | "remove" | "toggle";
|
|
1086
|
-
/**
|
|
1087
|
-
* Color mapping configuration
|
|
1088
|
-
*/
|
|
1089
|
-
interface ColorMapping {
|
|
1090
|
-
/** Type of mapping: data-driven or static */
|
|
1091
|
-
type: "static" | "continuous" | "categorical";
|
|
1092
|
-
/** Static color value (for type: "static") */
|
|
1093
|
-
value?: string;
|
|
1094
|
-
/** Data field to map (for type: "continuous" | "categorical") */
|
|
1095
|
-
field?: string;
|
|
1096
|
-
/** Color scale for continuous mapping */
|
|
1097
|
-
colorScale?: string | Array<[number, string]>;
|
|
1098
|
-
/** Discrete colors for categorical mapping */
|
|
1099
|
-
categoryColors?: Record<string, string>;
|
|
1100
|
-
/** Min/max values for continuous mapping (auto-calculated if not provided) */
|
|
1101
|
-
min?: number;
|
|
1102
|
-
max?: number;
|
|
1103
|
-
}
|
|
1104
|
-
/**
|
|
1105
|
-
* Shape mapping configuration
|
|
1106
|
-
*/
|
|
1107
|
-
interface ShapeMapping {
|
|
1108
|
-
/** Type of mapping: data-driven or static */
|
|
1109
|
-
type: "static" | "categorical";
|
|
1110
|
-
/** Static shape value (for type: "static") */
|
|
1111
|
-
value?: MarkerShape;
|
|
1112
|
-
/** Data field to map (for type: "categorical") */
|
|
1113
|
-
field?: string;
|
|
1114
|
-
/** Shape mapping for categorical values */
|
|
1115
|
-
categoryShapes?: Record<string, MarkerShape>;
|
|
1116
|
-
}
|
|
1117
|
-
/**
|
|
1118
|
-
* Size mapping configuration
|
|
1119
|
-
*/
|
|
1120
|
-
interface SizeMapping {
|
|
1121
|
-
/** Type of mapping: data-driven or static */
|
|
1122
|
-
type: "static" | "continuous" | "categorical";
|
|
1123
|
-
/** Static size value (for type: "static") */
|
|
1124
|
-
value?: number;
|
|
1125
|
-
/** Data field to map (for type: "continuous" | "categorical") */
|
|
1126
|
-
field?: string;
|
|
1127
|
-
/** Size range for continuous mapping */
|
|
1128
|
-
sizeRange?: [number, number];
|
|
1129
|
-
/** Discrete sizes for categorical mapping */
|
|
1130
|
-
categorySizes?: Record<string, number>;
|
|
1131
|
-
/** Min/max values for continuous mapping (auto-calculated if not provided) */
|
|
1132
|
-
min?: number;
|
|
1133
|
-
max?: number;
|
|
1134
|
-
}
|
|
1135
|
-
/**
|
|
1136
|
-
* Axis configuration
|
|
1137
|
-
*/
|
|
1138
|
-
interface AxisConfig {
|
|
1139
|
-
/** Axis label */
|
|
1140
|
-
title?: string;
|
|
1141
|
-
/** Scale type (linear or log) */
|
|
1142
|
-
scale?: ScaleType;
|
|
1143
|
-
/** Fixed axis range [min, max] */
|
|
1144
|
-
range?: [number, number];
|
|
1145
|
-
/** Auto-range with optional padding percentage (0-1) */
|
|
1146
|
-
autoRange?: boolean;
|
|
1147
|
-
/** Padding percentage for auto-range (default: 0.1 = 10%) */
|
|
1148
|
-
autoRangePadding?: number;
|
|
1149
|
-
}
|
|
1150
|
-
/**
|
|
1151
|
-
* Tooltip configuration
|
|
1152
|
-
*/
|
|
1153
|
-
interface TooltipConfig {
|
|
1154
|
-
/** Enable/disable tooltips */
|
|
1155
|
-
enabled?: boolean;
|
|
1156
|
-
/** Custom tooltip content function */
|
|
1157
|
-
content?: (point: ScatterPoint) => string;
|
|
1158
|
-
/** Fields to display in default tooltip */
|
|
1159
|
-
fields?: string[];
|
|
1160
|
-
}
|
|
1161
|
-
/**
|
|
1162
|
-
* Selection state
|
|
1163
|
-
*/
|
|
1164
|
-
interface SelectionState {
|
|
1165
|
-
/** Array of selected point IDs */
|
|
1166
|
-
selectedIds: Set<string | number>;
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* Downsampling configuration for performance optimization
|
|
1170
|
-
*/
|
|
1171
|
-
interface DownsamplingConfig {
|
|
1172
|
-
/** Enable downsampling */
|
|
1173
|
-
enabled: boolean;
|
|
1174
|
-
/** Target number of points to display */
|
|
1175
|
-
maxPoints?: number;
|
|
1176
|
-
/** Downsampling strategy */
|
|
1177
|
-
strategy?: "lttb";
|
|
1178
|
-
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Props for InteractiveScatter component
|
|
1181
|
-
*/
|
|
1182
|
-
interface InteractiveScatterProps {
|
|
1183
|
-
/**
|
|
1184
|
-
* Array of data points to plot
|
|
1185
|
-
*/
|
|
1186
|
-
data: ScatterPoint[];
|
|
1187
|
-
/**
|
|
1188
|
-
* Chart title
|
|
1189
|
-
*/
|
|
1190
|
-
title?: string;
|
|
1191
|
-
/**
|
|
1192
|
-
* X-axis configuration
|
|
1193
|
-
*/
|
|
1194
|
-
xAxis?: AxisConfig;
|
|
1195
|
-
/**
|
|
1196
|
-
* Y-axis configuration
|
|
1197
|
-
*/
|
|
1198
|
-
yAxis?: AxisConfig;
|
|
1199
|
-
/**
|
|
1200
|
-
* Color mapping configuration
|
|
1201
|
-
*/
|
|
1202
|
-
colorMapping?: ColorMapping;
|
|
1203
|
-
/**
|
|
1204
|
-
* Shape mapping configuration
|
|
1205
|
-
*/
|
|
1206
|
-
shapeMapping?: ShapeMapping;
|
|
1207
|
-
/**
|
|
1208
|
-
* Size mapping configuration
|
|
1209
|
-
*/
|
|
1210
|
-
sizeMapping?: SizeMapping;
|
|
1211
|
-
/**
|
|
1212
|
-
* Tooltip configuration
|
|
1213
|
-
*/
|
|
1214
|
-
tooltip?: TooltipConfig;
|
|
1215
|
-
/**
|
|
1216
|
-
* Enable click selection
|
|
1217
|
-
* @default true
|
|
1218
|
-
*/
|
|
1219
|
-
enableClickSelection?: boolean;
|
|
1220
|
-
/**
|
|
1221
|
-
* Enable box selection (drag to select rectangular region)
|
|
1222
|
-
* @default true
|
|
1223
|
-
*/
|
|
1224
|
-
enableBoxSelection?: boolean;
|
|
1225
|
-
/**
|
|
1226
|
-
* Enable lasso selection (freeform selection)
|
|
1227
|
-
* @default true
|
|
1228
|
-
*/
|
|
1229
|
-
enableLassoSelection?: boolean;
|
|
1230
|
-
/**
|
|
1231
|
-
* Controlled selection state.
|
|
1232
|
-
* If provided, component operates in controlled mode.
|
|
1233
|
-
*/
|
|
1234
|
-
selectedIds?: Set<string | number>;
|
|
1235
|
-
/**
|
|
1236
|
-
* Callback when selection changes
|
|
1237
|
-
*/
|
|
1238
|
-
onSelectionChange?: (selectedIds: Set<string | number>, mode: SelectionMode) => void;
|
|
1239
|
-
/**
|
|
1240
|
-
* Callback when a point is clicked
|
|
1241
|
-
*/
|
|
1242
|
-
onPointClick?: (point: ScatterPoint, event: MouseEvent) => void;
|
|
1243
|
-
/**
|
|
1244
|
-
* Downsampling configuration for large datasets
|
|
1245
|
-
*/
|
|
1246
|
-
downsampling?: DownsamplingConfig;
|
|
1247
|
-
/**
|
|
1248
|
-
* Chart width in pixels
|
|
1249
|
-
* @default 800
|
|
1250
|
-
*/
|
|
1251
|
-
width?: number;
|
|
1252
|
-
/**
|
|
1253
|
-
* Chart height in pixels
|
|
1254
|
-
* @default 600
|
|
1255
|
-
*/
|
|
1256
|
-
height?: number;
|
|
1257
|
-
/**
|
|
1258
|
-
* Show the continuous color-scale bar when using a continuous `colorMapping`.
|
|
1259
|
-
* Has no effect for categorical or static mappings.
|
|
1260
|
-
* @default true
|
|
1261
|
-
*/
|
|
1262
|
-
showColorBar?: boolean;
|
|
1263
|
-
/**
|
|
1264
|
-
* Custom CSS class name
|
|
1265
|
-
*/
|
|
1266
|
-
className?: string;
|
|
1267
|
-
}
|
|
1268
|
-
/**
|
|
1269
|
-
* Data format for selection propagation between components
|
|
1270
|
-
*/
|
|
1271
|
-
interface SelectionEvent {
|
|
1272
|
-
/** Array of selected point IDs */
|
|
1273
|
-
selectedIds: Set<string | number>;
|
|
1274
|
-
/** Selection mode used */
|
|
1275
|
-
mode: SelectionMode;
|
|
1276
|
-
/** Source component identifier (optional) */
|
|
1277
|
-
source?: string;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
/**
|
|
1281
|
-
* InteractiveScatter component for visualizing scatter plot data with advanced interactions.
|
|
1282
|
-
*
|
|
1283
|
-
* **Features:**
|
|
1284
|
-
* - Data-driven and static styling (color, shape, size)
|
|
1285
|
-
* - Interactive selection (click, box, lasso)
|
|
1286
|
-
* - Keyboard modifiers for click-selection modes (Shift/Ctrl)
|
|
1287
|
-
* - Customizable tooltips with rich content support
|
|
1288
|
-
* - Axis customization (ranges, log/linear scales)
|
|
1289
|
-
* - Performance optimizations for large datasets
|
|
1290
|
-
* - Selection propagation via callbacks
|
|
1291
|
-
*
|
|
1292
|
-
* **Selection Modes (click selection only):**
|
|
1293
|
-
* - Default click: Replace selection
|
|
1294
|
-
* - Shift + click: Add to selection
|
|
1295
|
-
* - Ctrl/Cmd + click: Remove from selection
|
|
1296
|
-
* - Shift + Ctrl + click: Toggle selection
|
|
1297
|
-
*
|
|
1298
|
-
* Box/lasso selection always replaces the current selection because
|
|
1299
|
-
* Plotly does not expose the original keyboard event for drag operations.
|
|
1300
|
-
*/
|
|
1301
|
-
declare const InteractiveScatter: React$1.FC<InteractiveScatterProps>;
|
|
1302
|
-
|
|
1303
|
-
/**
|
|
1304
|
-
* Default color scale for continuous color mapping
|
|
1305
|
-
*/
|
|
1306
|
-
declare const DEFAULT_COLOR_SCALE: Array<[number, string]>;
|
|
1307
|
-
/**
|
|
1308
|
-
* Default category colors (cycle through these)
|
|
1309
|
-
*/
|
|
1310
|
-
declare const DEFAULT_CATEGORY_COLORS: string[];
|
|
1311
|
-
/**
|
|
1312
|
-
* Default sizes
|
|
1313
|
-
*/
|
|
1314
|
-
declare const DEFAULT_MARKER_SIZE = 8;
|
|
1315
|
-
declare const DEFAULT_SIZE_RANGE: [number, number];
|
|
1316
|
-
/**
|
|
1317
|
-
* Default downsampling configuration
|
|
1318
|
-
*/
|
|
1319
|
-
declare const DEFAULT_MAX_POINTS = 5000;
|
|
1320
|
-
/**
|
|
1321
|
-
* Constants for plot layout
|
|
1322
|
-
*/
|
|
1323
|
-
declare const PLOT_CONSTANTS: {
|
|
1324
|
-
MARGIN_LEFT: number;
|
|
1325
|
-
MARGIN_RIGHT: number;
|
|
1326
|
-
MARGIN_TOP: number;
|
|
1327
|
-
MARGIN_BOTTOM: number;
|
|
1328
|
-
TITLE_FONT_SIZE: number;
|
|
1329
|
-
AXIS_TITLE_FONT_SIZE: number;
|
|
1330
|
-
AXIS_TICK_FONT_SIZE: number;
|
|
1331
|
-
LEGEND_FONT_SIZE: number;
|
|
1332
|
-
FONT_FAMILY: string;
|
|
1333
|
-
GRID_WIDTH: number;
|
|
1334
|
-
AXIS_LINE_WIDTH: number;
|
|
1335
|
-
AUTO_RANGE_PADDING: number;
|
|
1336
|
-
};
|
|
1337
|
-
/**
|
|
1338
|
-
* Selection mode keyboard modifiers
|
|
1339
|
-
*/
|
|
1340
|
-
declare const SELECTION_MODIFIERS: {
|
|
1341
|
-
readonly ADD: "shiftKey";
|
|
1342
|
-
readonly REMOVE: "ctrlKey";
|
|
1343
|
-
readonly TOGGLE: "both";
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
|
-
type MarkerSymbol = "circle" | "circle-open" | "circle-dot" | "circle-open-dot" | "square" | "square-open" | "square-dot" | "square-open-dot" | "diamond" | "diamond-open" | "diamond-dot" | "diamond-open-dot" | "cross" | "cross-open" | "cross-dot" | "cross-open-dot" | "x" | "x-open" | "x-dot" | "x-open-dot" | "triangle-up" | "triangle-up-open" | "triangle-up-dot" | "triangle-up-open-dot" | "triangle-down" | "triangle-down-open" | "triangle-down-dot" | "triangle-down-open-dot" | "triangle-left" | "triangle-left-open" | "triangle-left-dot" | "triangle-left-open-dot" | "triangle-right" | "triangle-right-open" | "triangle-right-dot" | "triangle-right-open-dot" | "triangle-ne" | "triangle-ne-open" | "triangle-ne-dot" | "triangle-ne-open-dot" | "triangle-se" | "triangle-se-open" | "triangle-se-dot" | "triangle-se-open-dot" | "triangle-sw" | "triangle-sw-open" | "triangle-sw-dot" | "triangle-sw-open-dot" | "triangle-nw" | "triangle-nw-open" | "triangle-nw-dot" | "triangle-nw-open-dot" | "pentagon" | "pentagon-open" | "pentagon-dot" | "pentagon-open-dot" | "hexagon" | "hexagon-open" | "hexagon-dot" | "hexagon-open-dot" | "hexagon2" | "hexagon2-open" | "hexagon2-dot" | "hexagon2-open-dot" | "octagon" | "octagon-open" | "octagon-dot" | "octagon-open-dot" | "star" | "star-open" | "star-dot" | "star-open-dot" | "hexagram" | "hexagram-open" | "hexagram-dot" | "hexagram-open-dot" | "star-triangle-up" | "star-triangle-up-open" | "star-triangle-up-dot" | "star-triangle-up-open-dot" | "star-triangle-down" | "star-triangle-down-open" | "star-triangle-down-dot" | "star-triangle-down-open-dot" | "star-square" | "star-square-open" | "star-square-dot" | "star-square-open-dot" | "star-diamond" | "star-diamond-open" | "star-diamond-dot" | "star-diamond-open-dot" | "diamond-tall" | "diamond-tall-open" | "diamond-tall-dot" | "diamond-tall-open-dot" | "diamond-wide" | "diamond-wide-open" | "diamond-wide-dot" | "diamond-wide-open-dot" | "hourglass" | "hourglass-open" | "bowtie" | "bowtie-open" | "circle-cross" | "circle-cross-open" | "circle-x" | "circle-x-open" | "square-cross" | "square-cross-open" | "square-x" | "square-x-open" | "diamond-cross" | "diamond-cross-open" | "diamond-x" | "diamond-x-open" | "cross-thin" | "cross-thin-open" | "x-thin" | "x-thin-open" | "asterisk" | "asterisk-open" | "hash" | "hash-open" | "hash-dot" | "hash-open-dot" | "y-up" | "y-up-open" | "y-down" | "y-down-open" | "y-left" | "y-left-open" | "y-right" | "y-right-open" | "line-ew" | "line-ew-open" | "line-ns" | "line-ns-open" | "line-ne" | "line-ne-open" | "line-nw" | "line-nw-open" | "arrow" | "arrow-open" | "arrow-wide" | "arrow-wide-open";
|
|
1347
|
-
interface LineDataSeries {
|
|
1348
|
-
x: number[];
|
|
1349
|
-
y: number[];
|
|
1350
|
-
name: string;
|
|
1351
|
-
color: string;
|
|
1352
|
-
symbol?: MarkerSymbol;
|
|
1353
|
-
error_y?: {
|
|
1354
|
-
type: "data";
|
|
1355
|
-
array: number[];
|
|
1356
|
-
visible: boolean;
|
|
1357
|
-
};
|
|
1358
|
-
}
|
|
1359
|
-
type LineGraphVariant = "lines" | "lines+markers" | "lines+markers+error_bars";
|
|
1360
|
-
type LineGraphProps = {
|
|
1361
|
-
dataSeries: LineDataSeries[];
|
|
1362
|
-
width?: number;
|
|
1363
|
-
height?: number;
|
|
1364
|
-
xRange?: [number, number];
|
|
1365
|
-
yRange?: [number, number];
|
|
1366
|
-
variant?: LineGraphVariant;
|
|
1367
|
-
xTitle?: string;
|
|
1368
|
-
yTitle?: string;
|
|
1369
|
-
title?: string;
|
|
1370
|
-
};
|
|
1371
|
-
declare const LineGraph: React$1.FC<LineGraphProps>;
|
|
1372
|
-
|
|
1373
|
-
interface MainProps {
|
|
1374
|
-
userProfile: {
|
|
1375
|
-
name: string;
|
|
1376
|
-
avatar?: string;
|
|
1377
|
-
};
|
|
1378
|
-
hostname: string;
|
|
1379
|
-
organization: {
|
|
1380
|
-
name: string;
|
|
1381
|
-
subtext?: string;
|
|
1382
|
-
logo?: React$1.ReactNode;
|
|
1383
|
-
};
|
|
1384
|
-
}
|
|
1385
|
-
declare const Main: React$1.FC<MainProps>;
|
|
1386
|
-
|
|
1387
|
-
interface PieDataSeries {
|
|
1388
|
-
labels: string[];
|
|
1389
|
-
values: number[];
|
|
1390
|
-
name: string;
|
|
1391
|
-
colors?: string[];
|
|
1392
|
-
}
|
|
1393
|
-
type PieTextInfo = "none" | "label" | "percent" | "value" | "label+percent" | "label+value" | "value+percent" | "label+value+percent";
|
|
1394
|
-
type PieChartProps = {
|
|
1395
|
-
dataSeries: PieDataSeries;
|
|
1396
|
-
width?: number;
|
|
1397
|
-
height?: number;
|
|
1398
|
-
title?: string;
|
|
1399
|
-
textInfo?: PieTextInfo;
|
|
1400
|
-
hole?: number;
|
|
1401
|
-
rotation?: number;
|
|
1402
|
-
};
|
|
1403
|
-
declare const PieChart: React$1.FC<PieChartProps>;
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* Plate format string constants for standard microplate configurations.
|
|
1407
|
-
*/
|
|
1408
|
-
declare const PLATE_FORMAT_96: "96";
|
|
1409
|
-
declare const PLATE_FORMAT_384: "384";
|
|
1410
|
-
declare const PLATE_FORMAT_1536: "1536";
|
|
1411
|
-
declare const PLATE_FORMAT_CUSTOM: "custom";
|
|
1412
|
-
/**
|
|
1413
|
-
* Plate format presets for standard microplate configurations.
|
|
1414
|
-
* - `"96"`: 8 rows × 12 columns (wells A1-H12)
|
|
1415
|
-
* - `"384"`: 16 rows × 24 columns (wells A1-P24)
|
|
1416
|
-
* - `"1536"`: 32 rows × 48 columns (wells A1-AF48)
|
|
1417
|
-
* - `"custom"`: User-defined dimensions via `rows` and `columns` props
|
|
1418
|
-
*/
|
|
1419
|
-
type PlateFormat = typeof PLATE_FORMAT_96 | typeof PLATE_FORMAT_384 | typeof PLATE_FORMAT_1536 | typeof PLATE_FORMAT_CUSTOM;
|
|
1420
|
-
/**
|
|
1421
|
-
* Visualization mode for the plate map.
|
|
1422
|
-
* - `"heatmap"`: Displays quantitative values as a continuous color gradient.
|
|
1423
|
-
* Use for OD readings, fluorescence intensity, or other numeric measurements.
|
|
1424
|
-
* - `"categorical"`: Displays well types with discrete colors.
|
|
1425
|
-
* Use for showing sample types, control positions, or experimental conditions.
|
|
1426
|
-
*/
|
|
1427
|
-
type VisualizationMode = "heatmap" | "categorical";
|
|
1428
|
-
/**
|
|
1429
|
-
* Color scale definition for the heatmap visualization mode.
|
|
1430
|
-
*
|
|
1431
|
-
* Can be:
|
|
1432
|
-
* - A named Plotly colorscale (e.g., "Viridis", "Blues", "Hot")
|
|
1433
|
-
* - An array of [position, color] tuples where position is 0-1
|
|
1434
|
-
*
|
|
1435
|
-
* @example
|
|
1436
|
-
* // Named colorscale
|
|
1437
|
-
* colorScale="Viridis"
|
|
1438
|
-
*
|
|
1439
|
-
* @example
|
|
1440
|
-
* // Custom gradient
|
|
1441
|
-
* colorScale={[
|
|
1442
|
-
* [0, "#313695"], // Dark blue at min
|
|
1443
|
-
* [0.5, "#ffffbf"], // Yellow at midpoint
|
|
1444
|
-
* [1, "#a50026"], // Dark red at max
|
|
1445
|
-
* ]}
|
|
1446
|
-
*/
|
|
1447
|
-
type ColorScale = string | Array<[number, string]>;
|
|
1448
|
-
/**
|
|
1449
|
-
* Position for the legend display.
|
|
1450
|
-
* - `"right"`: Legend appears to the right of the plate (default)
|
|
1451
|
-
* - `"bottom"`: Legend appears below the plate
|
|
1452
|
-
* - `"left"`: Legend appears to the left of the plate
|
|
1453
|
-
* - `"top"`: Legend appears above the plate
|
|
1454
|
-
*/
|
|
1455
|
-
type LegendPosition = "right" | "bottom" | "left" | "top";
|
|
1456
|
-
/**
|
|
1457
|
-
* Well data for individual wells.
|
|
1458
|
-
*
|
|
1459
|
-
* @example
|
|
1460
|
-
* // Well with a single numeric value
|
|
1461
|
-
* { wellId: "A1", values: { "Fluorescence": 1500 } }
|
|
1462
|
-
*
|
|
1463
|
-
* @example
|
|
1464
|
-
* // Well with multiple values (creates multiple layers)
|
|
1465
|
-
* { wellId: "A1", values: { "Raw": 1500, "Normalized": 0.85, "Status": "positive" } }
|
|
1466
|
-
*
|
|
1467
|
-
* @example
|
|
1468
|
-
* // Well with tooltip-only data
|
|
1469
|
-
* { wellId: "A1", values: { "Value": 500 }, tooltipData: { compound: "Drug A", concentration: "10µM" } }
|
|
1470
|
-
*/
|
|
1471
|
-
interface WellData {
|
|
1472
|
-
/**
|
|
1473
|
-
* Well identifier in standard microplate notation.
|
|
1474
|
-
* - Single letter + number for 96/384-well: "A1", "H12", "P24"
|
|
1475
|
-
* - Double letter + number for 1536-well: "A1", "AA1", "AF48"
|
|
1476
|
-
* Case-insensitive ("a1" and "A1" are equivalent).
|
|
1477
|
-
*/
|
|
1478
|
-
wellId: string;
|
|
1479
|
-
/**
|
|
1480
|
-
* Named values for the well. Each key can become a visualization layer.
|
|
1481
|
-
*
|
|
1482
|
-
* - Numeric values: Displayed using heatmap visualization
|
|
1483
|
-
* - String values: Displayed using categorical visualization
|
|
1484
|
-
* - null: Empty/no data for that property
|
|
1485
|
-
*
|
|
1486
|
-
* All values are shown in the tooltip regardless of which layer is active.
|
|
1487
|
-
*
|
|
1488
|
-
* @example
|
|
1489
|
-
* // Well with multiple measurement values (numeric)
|
|
1490
|
-
* { wellId: "A1", values: { "Raw": 1500, "Normalized": 0.85, "Z-Score": 1.2 } }
|
|
1491
|
-
*
|
|
1492
|
-
* @example
|
|
1493
|
-
* // Well with categorical values (string)
|
|
1494
|
-
* { wellId: "A1", values: { "Status": "positive", "QC": "pass" } }
|
|
1495
|
-
*
|
|
1496
|
-
* @example
|
|
1497
|
-
* // Mixed numeric and categorical
|
|
1498
|
-
* { wellId: "A1", values: { "Fluorescence": 1500, "Status": "positive" } }
|
|
1499
|
-
*/
|
|
1500
|
-
values?: Record<string, string | number | null>;
|
|
1501
|
-
/**
|
|
1502
|
-
* Optional data for tooltip display only (not visualized as layers).
|
|
1503
|
-
* Keys become labels, values are displayed.
|
|
1504
|
-
*
|
|
1505
|
-
* @example
|
|
1506
|
-
* { tooltipData: { sampleId: "S001", compound: "Drug A", concentration: "10µM" } }
|
|
1507
|
-
*/
|
|
1508
|
-
tooltipData?: Record<string, unknown>;
|
|
1509
|
-
}
|
|
1510
|
-
/**
|
|
1511
|
-
* Configuration for auto-generated layers when using WellData with `values`.
|
|
1512
|
-
*
|
|
1513
|
-
* When wells have multiple values (via the `values` property), layers are
|
|
1514
|
-
* auto-generated from the unique keys. Use LayerConfig to customize the
|
|
1515
|
-
* display name, visualization mode, and color scale for each layer.
|
|
1516
|
-
*
|
|
1517
|
-
* @example
|
|
1518
|
-
* // Configure layers for wells with { values: { "Raw": 100, "Normalized": 0.5 } }
|
|
1519
|
-
* const layerConfigs: LayerConfig[] = [
|
|
1520
|
-
* { id: "Raw", name: "Raw Data", colorScale: "Blues" },
|
|
1521
|
-
* { id: "Normalized", name: "Normalized Values", valueMin: 0, valueMax: 1 },
|
|
1522
|
-
* ];
|
|
1523
|
-
*/
|
|
1524
|
-
interface LayerConfig {
|
|
1525
|
-
/** Layer ID (must match a key in WellData.values) */
|
|
1526
|
-
id: string;
|
|
1527
|
-
/** Display name for the layer (defaults to id if not provided) */
|
|
1528
|
-
name?: string;
|
|
1529
|
-
/** Visualization mode for this layer */
|
|
1530
|
-
visualizationMode?: VisualizationMode;
|
|
1531
|
-
/** Color scale for this layer (for heatmap mode) */
|
|
1532
|
-
colorScale?: ColorScale;
|
|
1533
|
-
/** Minimum value for color scaling */
|
|
1534
|
-
valueMin?: number;
|
|
1535
|
-
/** Maximum value for color scaling */
|
|
1536
|
-
valueMax?: number;
|
|
1537
|
-
/** Value unit suffix for tooltips and colorbar (e.g., "RFU", "%"). A space is automatically added before the unit. */
|
|
1538
|
-
valueUnit?: string;
|
|
1539
|
-
/**
|
|
1540
|
-
* Custom colors for categorical visualization mode.
|
|
1541
|
-
* Keys are category values (strings from `values`), values are hex colors.
|
|
1542
|
-
* Merged with DEFAULT_CATEGORY_COLORS.
|
|
1543
|
-
*/
|
|
1544
|
-
categoryColors?: Record<string, string>;
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* Configuration for legend styling and positioning.
|
|
1548
|
-
*
|
|
1549
|
-
* @example
|
|
1550
|
-
* // Legend on the bottom with custom styling
|
|
1551
|
-
* legendConfig={{
|
|
1552
|
-
* position: "bottom",
|
|
1553
|
-
* fontSize: 14,
|
|
1554
|
-
* itemSpacing: 12,
|
|
1555
|
-
* swatchSize: 20,
|
|
1556
|
-
* }}
|
|
1557
|
-
*/
|
|
1558
|
-
interface LegendConfig {
|
|
1559
|
-
/**
|
|
1560
|
-
* Position of the legend relative to the plate.
|
|
1561
|
-
* @default "right"
|
|
1562
|
-
*/
|
|
1563
|
-
position?: LegendPosition;
|
|
1564
|
-
/**
|
|
1565
|
-
* Font size for legend labels in pixels.
|
|
1566
|
-
* @default 12
|
|
1567
|
-
*/
|
|
1568
|
-
fontSize?: number;
|
|
1569
|
-
/**
|
|
1570
|
-
* Spacing between legend items in pixels.
|
|
1571
|
-
* @default 4
|
|
1572
|
-
*/
|
|
1573
|
-
itemSpacing?: number;
|
|
1574
|
-
/**
|
|
1575
|
-
* Size of the color swatch in pixels.
|
|
1576
|
-
* @default 16
|
|
1577
|
-
*/
|
|
1578
|
-
swatchSize?: number;
|
|
1579
|
-
/**
|
|
1580
|
-
* Title to display above the legend.
|
|
1581
|
-
*/
|
|
1582
|
-
title?: string;
|
|
1583
|
-
}
|
|
1584
|
-
/**
|
|
1585
|
-
* A region to highlight on the plate (e.g., controls, sample areas, empty wells)
|
|
1586
|
-
*/
|
|
1587
|
-
interface PlateRegion {
|
|
1588
|
-
/** Unique identifier for the region */
|
|
1589
|
-
id: string;
|
|
1590
|
-
/** Display name for the region (shown in legend) */
|
|
1591
|
-
name: string;
|
|
1592
|
-
/**
|
|
1593
|
-
* Wells included in this region using range notation.
|
|
1594
|
-
* Format: "StartWell:EndWell" (e.g., "A1:B6" for a rectangular block from A1 to B6)
|
|
1595
|
-
*/
|
|
1596
|
-
wells: string;
|
|
1597
|
-
/** Border color for the region highlight */
|
|
1598
|
-
borderColor?: string;
|
|
1599
|
-
/** Border width in pixels (default: 2) */
|
|
1600
|
-
borderWidth?: number;
|
|
1601
|
-
/** Optional fill color with transparency (e.g., "rgba(255, 0, 0, 0.1)") */
|
|
1602
|
-
fillColor?: string;
|
|
1603
|
-
}
|
|
1604
|
-
/**
|
|
1605
|
-
* Props for PlateMap component
|
|
1606
|
-
*/
|
|
1607
|
-
interface PlateMapProps {
|
|
1608
|
-
/**
|
|
1609
|
-
* Well data array as WellData objects with wellId and values.
|
|
1610
|
-
*
|
|
1611
|
-
* If wells have multiple values (via `values` property), layers are
|
|
1612
|
-
* auto-generated for each unique key, enabling layer toggling.
|
|
1613
|
-
*/
|
|
1614
|
-
data?: WellData[];
|
|
1615
|
-
/**
|
|
1616
|
-
* Configuration for auto-generated layers when using WellData with `values`.
|
|
1617
|
-
* Use this to customize display names, colors, and ranges for each layer.
|
|
1618
|
-
* Only used when `data` contains wells with `values` property.
|
|
1619
|
-
*/
|
|
1620
|
-
layerConfigs?: LayerConfig[];
|
|
1621
|
-
/**
|
|
1622
|
-
* Initial layer ID to display when the component mounts.
|
|
1623
|
-
* If not provided, defaults to the first layer.
|
|
1624
|
-
*/
|
|
1625
|
-
initialLayerId?: string;
|
|
1626
|
-
/**
|
|
1627
|
-
* Optional callback notified when the active layer changes.
|
|
1628
|
-
* This is purely informational - the component manages layer state internally.
|
|
1629
|
-
* Use this for logging, analytics, or syncing with external state.
|
|
1630
|
-
*/
|
|
1631
|
-
onLayerChange?: (layerId: string) => void;
|
|
1632
|
-
/** Plate format preset (default: "96") */
|
|
1633
|
-
plateFormat?: PlateFormat;
|
|
1634
|
-
/** Number of rows for custom format (default: 8 for 96-well, 16 for 384-well) */
|
|
1635
|
-
rows?: number;
|
|
1636
|
-
/** Number of columns for custom format (default: 12 for 96-well, 24 for 384-well) */
|
|
1637
|
-
columns?: number;
|
|
1638
|
-
/**
|
|
1639
|
-
* Visualization mode (default: "heatmap")
|
|
1640
|
-
* - "heatmap": Display quantitative values with color gradient
|
|
1641
|
-
* - "categorical": Display well types with discrete colors
|
|
1642
|
-
*/
|
|
1643
|
-
visualizationMode?: VisualizationMode;
|
|
1644
|
-
/**
|
|
1645
|
-
* Custom colors for categorical visualization mode.
|
|
1646
|
-
* Keys are well types, values are hex colors.
|
|
1647
|
-
* Merged with DEFAULT_CATEGORY_COLORS.
|
|
1648
|
-
*/
|
|
1649
|
-
categoryColors?: Record<string, string>;
|
|
1650
|
-
/**
|
|
1651
|
-
* Regions to highlight on the plate (e.g., controls, sample areas, empty wells).
|
|
1652
|
-
* Each region can specify wells and styling for visual distinction.
|
|
1653
|
-
*/
|
|
1654
|
-
regions?: PlateRegion[];
|
|
1655
|
-
/** Chart title */
|
|
1656
|
-
title?: string;
|
|
1657
|
-
/** X-axis title (e.g., "Columns") */
|
|
1658
|
-
xTitle?: string;
|
|
1659
|
-
/** Y-axis title (e.g., "Rows") */
|
|
1660
|
-
yTitle?: string;
|
|
1661
|
-
/** Custom x-axis labels (overrides auto-generated column numbers) */
|
|
1662
|
-
xLabels?: string[] | number[];
|
|
1663
|
-
/** Custom y-axis labels (overrides auto-generated row letters) */
|
|
1664
|
-
yLabels?: string[] | number[];
|
|
1665
|
-
/** Color scale for the heatmap (only used in heatmap mode) */
|
|
1666
|
-
colorScale?: ColorScale;
|
|
1667
|
-
/** Minimum value for color scale (auto-calculated if not provided) */
|
|
1668
|
-
valueMin?: number;
|
|
1669
|
-
/** Maximum value for color scale (auto-calculated if not provided) */
|
|
1670
|
-
valueMax?: number;
|
|
1671
|
-
/** Color for empty/null wells (default: "#f0f0f0") */
|
|
1672
|
-
emptyWellColor?: string;
|
|
1673
|
-
/** Show color bar legend for heatmap mode (default: true) */
|
|
1674
|
-
showColorBar?: boolean;
|
|
1675
|
-
/** Show categorical legend for categorical mode (default: true) */
|
|
1676
|
-
showLegend?: boolean;
|
|
1677
|
-
/**
|
|
1678
|
-
* Configuration for legend positioning and styling.
|
|
1679
|
-
* Applies to both heatmap colorbar and categorical legend.
|
|
1680
|
-
*
|
|
1681
|
-
* @example
|
|
1682
|
-
* // Position legend at bottom with larger text
|
|
1683
|
-
* legendConfig={{ position: "bottom", fontSize: 14 }}
|
|
1684
|
-
*/
|
|
1685
|
-
legendConfig?: LegendConfig;
|
|
1686
|
-
/** Chart width in pixels (default: 800) */
|
|
1687
|
-
width?: number;
|
|
1688
|
-
/** Chart height in pixels (default: 500) */
|
|
1689
|
-
height?: number;
|
|
1690
|
-
/** Number of decimal places for values (default: 0) */
|
|
1691
|
-
precision?: number;
|
|
1692
|
-
/**
|
|
1693
|
-
* Marker shape for wells (default: "circle")
|
|
1694
|
-
* - "circle": Round markers, ideal for plate-based data
|
|
1695
|
-
* - "square": Square markers, ideal for generic heatmaps
|
|
1696
|
-
*/
|
|
1697
|
-
markerShape?: "circle" | "square";
|
|
1698
|
-
/**
|
|
1699
|
-
* Callback when a well/cell is clicked.
|
|
1700
|
-
* @param wellData - The full well data object including wellId, values, and tooltipData
|
|
1701
|
-
*/
|
|
1702
|
-
onWellClick?: (wellData: WellData) => void;
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
/**
|
|
1706
|
-
* PlateMap component for visualizing well plate data as a heatmap or categorical display.
|
|
1707
|
-
*
|
|
1708
|
-
* **Supported Plate Formats:**
|
|
1709
|
-
* - 96-well (8 rows × 12 columns, wells A1-H12)
|
|
1710
|
-
* - 384-well (16 rows × 24 columns, wells A1-P24)
|
|
1711
|
-
* - 1536-well (32 rows × 48 columns, wells A1-AF48)
|
|
1712
|
-
* - Custom dimensions with user-specified rows/columns
|
|
1713
|
-
*
|
|
1714
|
-
* **Visualization Modes:**
|
|
1715
|
-
* - `"heatmap"`: Continuous color gradient for quantitative values
|
|
1716
|
-
* - `"categorical"`: Discrete colors for well types (sample, control, empty)
|
|
1717
|
-
*
|
|
1718
|
-
* **Features:**
|
|
1719
|
-
* - Multiple data layers with independent visualization settings
|
|
1720
|
-
* - Control region highlighting with borders and fill colors
|
|
1721
|
-
* - Configurable color scales, tooltips, and click interactions
|
|
1722
|
-
* - Support for WellData arrays with multi-layer visualization
|
|
1723
|
-
*
|
|
1724
|
-
* **Data Format:**
|
|
1725
|
-
* - **WellData array**: `[{ wellId: "A1", values: { RFU: 100 }, tooltipData: {...} }, ...]`
|
|
1726
|
-
*
|
|
1727
|
-
*/
|
|
1728
|
-
declare const PlateMap: React$1.FC<PlateMapProps>;
|
|
1729
|
-
|
|
1730
|
-
interface ScatterDataPoint {
|
|
1731
|
-
x: number;
|
|
1732
|
-
y: number;
|
|
1733
|
-
additionalInfo?: Record<string, string | number>;
|
|
1734
|
-
}
|
|
1735
|
-
interface ScatterDataSeries {
|
|
1736
|
-
x: number[];
|
|
1737
|
-
y: number[];
|
|
1738
|
-
name: string;
|
|
1739
|
-
color: string;
|
|
1740
|
-
}
|
|
1741
|
-
interface ScatterGraphProps {
|
|
1742
|
-
dataSeries: ScatterDataSeries[];
|
|
1743
|
-
width?: number;
|
|
1744
|
-
height?: number;
|
|
1745
|
-
xRange?: [number, number];
|
|
1746
|
-
yRange?: [number, number];
|
|
1747
|
-
xTitle?: string;
|
|
1748
|
-
yTitle?: string;
|
|
1749
|
-
title?: string;
|
|
1750
|
-
}
|
|
1751
|
-
declare const ScatterGraph: React$1.FC<ScatterGraphProps>;
|
|
1752
|
-
|
|
1753
|
-
/** Transformed search result (flattened from Elasticsearch hit format) */
|
|
1754
|
-
interface SearchResult {
|
|
1755
|
-
id: string;
|
|
1756
|
-
_score?: number | null;
|
|
1757
|
-
[key: string]: any;
|
|
1758
|
-
}
|
|
1759
|
-
/** Configuration for a search filter */
|
|
1760
|
-
interface TdpSearchFilter {
|
|
1761
|
-
key: string;
|
|
1762
|
-
label: string;
|
|
1763
|
-
options: DropdownOption[];
|
|
1764
|
-
}
|
|
1765
|
-
/** Configuration for column display */
|
|
1766
|
-
interface TdpSearchColumn {
|
|
1767
|
-
key: string;
|
|
1768
|
-
header: string;
|
|
1769
|
-
sortable?: boolean;
|
|
1770
|
-
width?: string;
|
|
1771
|
-
align?: "left" | "center" | "right";
|
|
1772
|
-
render?: (value: any, row: SearchResult, index: number) => React$1.ReactNode;
|
|
1773
|
-
}
|
|
1774
|
-
/** Sort configuration */
|
|
1775
|
-
interface TdpSearchSort {
|
|
1776
|
-
field: string;
|
|
1777
|
-
order: "asc" | "desc";
|
|
1778
|
-
}
|
|
1779
|
-
/** Props passed to the renderSearchBar render prop */
|
|
1780
|
-
interface TdpSearchBarRenderProps {
|
|
1781
|
-
query: string;
|
|
1782
|
-
setQuery: (query: string) => void;
|
|
1783
|
-
onSearch: () => void;
|
|
1784
|
-
isLoading: boolean;
|
|
1785
|
-
placeholder: string;
|
|
1786
|
-
}
|
|
1787
|
-
/** Props passed to the renderFilters render prop */
|
|
1788
|
-
interface TdpFiltersRenderProps {
|
|
1789
|
-
filters: TdpSearchFilter[];
|
|
1790
|
-
filterValues: Record<string, string>;
|
|
1791
|
-
onFilterChange: (key: string, value: string) => void;
|
|
1792
|
-
}
|
|
1793
|
-
/** Props passed to the renderResults render prop */
|
|
1794
|
-
interface TdpResultsRenderProps {
|
|
1795
|
-
results: SearchResult[];
|
|
1796
|
-
total: number;
|
|
1797
|
-
currentPage: number;
|
|
1798
|
-
pageSize: number;
|
|
1799
|
-
columns: TdpSearchColumn[];
|
|
1800
|
-
onPageChange: (page: number) => void;
|
|
1801
|
-
sortKey: string | null;
|
|
1802
|
-
sortDirection: "asc" | "desc";
|
|
1803
|
-
onSort: (key: string, direction: "asc" | "desc") => void;
|
|
1804
|
-
}
|
|
1805
|
-
/** Search connection configuration */
|
|
1806
|
-
interface TdpSearchConfig {
|
|
1807
|
-
/**
|
|
1808
|
-
* When true, calls the TDP API directly from the browser
|
|
1809
|
-
* When false/omitted, proxies the request through your backend `apiEndpoint`
|
|
1810
|
-
*/
|
|
1811
|
-
standalone?: boolean;
|
|
1812
|
-
/** TDP API base URL (required when standalone is true) */
|
|
1813
|
-
baseUrl?: string;
|
|
1814
|
-
/** Backend API endpoint for search (used when standalone is false). Defaults to '/api/search' */
|
|
1815
|
-
apiEndpoint?: string;
|
|
1816
|
-
/** Common | authentication token */
|
|
1817
|
-
authToken?: string;
|
|
1818
|
-
/** Common | organization slug */
|
|
1819
|
-
orgSlug?: string;
|
|
1820
|
-
}
|
|
1821
|
-
/** Common props shared by both search modes */
|
|
1822
|
-
interface CommonTdpSearchProps {
|
|
1823
|
-
/** Default search term (default query) */
|
|
1824
|
-
defaultQuery?: string;
|
|
1825
|
-
/** Display fields/columns for the results table */
|
|
1826
|
-
columns: TdpSearchColumn[];
|
|
1827
|
-
/** UI filters displayed as dropdowns (for user selection) */
|
|
1828
|
-
filters?: TdpSearchFilter[];
|
|
1829
|
-
/** Default sort configuration (sort options) */
|
|
1830
|
-
defaultSort?: TdpSearchSort;
|
|
1831
|
-
/**
|
|
1832
|
-
* Additional search parameters to pass to the SDK's searchEql method.
|
|
1833
|
-
* Allows customization of expression, selectedPipelineIds, selectedSourceTypes, etc.
|
|
1834
|
-
*/
|
|
1835
|
-
advancedSearchParams?: Partial<Omit<SearchEqlRequest, "searchTerm" | "from" | "size" | "sort" | "order">>;
|
|
1836
|
-
/** Results per page. Defaults to 10 */
|
|
1837
|
-
pageSize?: number;
|
|
1838
|
-
/** Search input placeholder text */
|
|
1839
|
-
searchPlaceholder?: string;
|
|
1840
|
-
/** Custom CSS class */
|
|
1841
|
-
className?: string;
|
|
1842
|
-
/** Callback fired when search is executed with the query and results */
|
|
1843
|
-
onSearch?: (query: SearchEqlRequest, results: SearchResult[]) => void;
|
|
1844
|
-
/** Replace the entire search bar (input + button) */
|
|
1845
|
-
renderSearchBar?: (props: TdpSearchBarRenderProps) => React$1.ReactNode;
|
|
1846
|
-
/** Replace the filters row */
|
|
1847
|
-
renderFilters?: (props: TdpFiltersRenderProps) => React$1.ReactNode;
|
|
1848
|
-
/** Replace the results table (and pagination) */
|
|
1849
|
-
renderResults?: (props: TdpResultsRenderProps) => React$1.ReactNode;
|
|
1850
|
-
}
|
|
1851
|
-
type TdpSearchProps = CommonTdpSearchProps & TdpSearchConfig;
|
|
1852
|
-
type UseSearchConfig = {
|
|
1853
|
-
pageSize: number;
|
|
1854
|
-
} & TdpSearchConfig;
|
|
1855
|
-
interface UseSearchResult {
|
|
1856
|
-
results: SearchResult[];
|
|
1857
|
-
total: number;
|
|
1858
|
-
currentPage: number;
|
|
1859
|
-
isLoading: boolean;
|
|
1860
|
-
error: string | null;
|
|
1861
|
-
executeSearch: (searchRequest: Omit<SearchEqlRequest, "from" | "size">, page?: number) => Promise<SearchResult[]>;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
/**
|
|
1865
|
-
* TdpSearch Component
|
|
1866
|
-
*
|
|
1867
|
-
* A reusable search component for querying the TDP.
|
|
1868
|
-
*
|
|
1869
|
-
* @example
|
|
1870
|
-
* ```tsx
|
|
1871
|
-
* <TdpSearch
|
|
1872
|
-
* columns={[
|
|
1873
|
-
* { key: "id", header: "ID" },
|
|
1874
|
-
* { key: "filePath", header: "File Path", sortable: true }
|
|
1875
|
-
* ]}
|
|
1876
|
-
* defaultQuery="sample-data"
|
|
1877
|
-
* pageSize={20}
|
|
1878
|
-
* />
|
|
1879
|
-
* ```
|
|
1880
|
-
*/
|
|
1881
|
-
declare const TdpSearch: React$1.FC<TdpSearchProps>;
|
|
1882
|
-
|
|
1883
|
-
declare function useSearch(config: UseSearchConfig): UseSearchResult;
|
|
1884
|
-
|
|
1885
|
-
/**
|
|
1886
|
-
* Centralized color system for TetraScience UI
|
|
1887
|
-
* This utility provides access to CSS variables defined in colors.css
|
|
1888
|
-
* while maintaining TypeScript support and IntelliSense
|
|
1889
|
-
*/
|
|
1890
|
-
/**
|
|
1891
|
-
* Centralized color tokens that map to CSS variables
|
|
1892
|
-
* This provides TypeScript support while leveraging CSS custom properties
|
|
1893
|
-
*/
|
|
1894
|
-
declare const COLORS: {
|
|
1895
|
-
readonly BLACK_50: string;
|
|
1896
|
-
readonly BLACK_100: string;
|
|
1897
|
-
readonly BLACK_200: string;
|
|
1898
|
-
readonly BLACK_300: string;
|
|
1899
|
-
readonly BLACK_400: string;
|
|
1900
|
-
readonly BLACK_500: string;
|
|
1901
|
-
readonly BLACK_600: string;
|
|
1902
|
-
readonly BLACK_700: string;
|
|
1903
|
-
readonly BLACK_800: string;
|
|
1904
|
-
readonly BLACK_900: string;
|
|
1905
|
-
readonly BLACK: string;
|
|
1906
|
-
readonly BLACK_OPACITY_20: "rgba(26, 26, 26, 0.2)";
|
|
1907
|
-
readonly WHITE_50: string;
|
|
1908
|
-
readonly WHITE_100: string;
|
|
1909
|
-
readonly WHITE_200: string;
|
|
1910
|
-
readonly WHITE_300: string;
|
|
1911
|
-
readonly WHITE_400: string;
|
|
1912
|
-
readonly WHITE_500: string;
|
|
1913
|
-
readonly WHITE_600: string;
|
|
1914
|
-
readonly WHITE_700: string;
|
|
1915
|
-
readonly WHITE_800: string;
|
|
1916
|
-
readonly WHITE_900: string;
|
|
1917
|
-
readonly WHITE: string;
|
|
1918
|
-
readonly BLUE_50: string;
|
|
1919
|
-
readonly BLUE_100: string;
|
|
1920
|
-
readonly BLUE_200: string;
|
|
1921
|
-
readonly BLUE_300: string;
|
|
1922
|
-
readonly BLUE_400: string;
|
|
1923
|
-
readonly BLUE_500: string;
|
|
1924
|
-
readonly BLUE_600: string;
|
|
1925
|
-
readonly BLUE_700: string;
|
|
1926
|
-
readonly BLUE_800: string;
|
|
1927
|
-
readonly BLUE_900: string;
|
|
1928
|
-
readonly BLUE: string;
|
|
1929
|
-
readonly GREY_50: string;
|
|
1930
|
-
readonly GREY_100: string;
|
|
1931
|
-
readonly GREY_200: string;
|
|
1932
|
-
readonly GREY_300: string;
|
|
1933
|
-
readonly GREY_400: string;
|
|
1934
|
-
readonly GREY_500: string;
|
|
1935
|
-
readonly GREY_600: string;
|
|
1936
|
-
readonly GREY_700: string;
|
|
1937
|
-
readonly GREY_800: string;
|
|
1938
|
-
readonly GREY_900: string;
|
|
1939
|
-
readonly GREY: string;
|
|
1940
|
-
readonly ORANGE: string;
|
|
1941
|
-
readonly RED: string;
|
|
1942
|
-
readonly GREEN: string;
|
|
1943
|
-
readonly YELLOW: string;
|
|
1944
|
-
readonly PURPLE: string;
|
|
1945
|
-
readonly GREEN_BG: string;
|
|
1946
|
-
readonly GREEN_SUCCESS: string;
|
|
1947
|
-
readonly ORANGE_BG: string;
|
|
1948
|
-
readonly ORANGE_CAUTION: string;
|
|
1949
|
-
readonly RED_BG: string;
|
|
1950
|
-
readonly RED_ERROR: string;
|
|
1951
|
-
readonly GRAPH_SECONDARY_BROWN: string;
|
|
1952
|
-
readonly GRAPH_SECONDARY_PINK: string;
|
|
1953
|
-
readonly GRAPH_SECONDARY_TEAL: string;
|
|
1954
|
-
readonly GRAPH_SECONDARY_DARK_BLUE: string;
|
|
1955
|
-
readonly GRAPH_SECONDARY_BLACK: string;
|
|
1956
|
-
readonly GRAPH_SECONDARY_GREY: string;
|
|
1957
|
-
};
|
|
1958
|
-
/**
|
|
1959
|
-
* Chart color palette for consistent graph styling
|
|
1960
|
-
* Uses the primary graph colors from the design system
|
|
1961
|
-
*/
|
|
1962
|
-
declare const CHART_COLORS: readonly [string, string, string, string, string, string, string, string, string, string, string, string];
|
|
1963
|
-
type ColorToken = keyof typeof COLORS;
|
|
1964
|
-
|
|
1965
|
-
/**
|
|
1966
|
-
* Theme type definitions for TetraScience UI Kit
|
|
1967
|
-
*/
|
|
1968
|
-
interface ThemeColors {
|
|
1969
|
-
primary?: string;
|
|
1970
|
-
primaryHover?: string;
|
|
1971
|
-
primaryActive?: string;
|
|
1972
|
-
background?: string;
|
|
1973
|
-
text?: string;
|
|
1974
|
-
border?: string;
|
|
1975
|
-
cardBackground?: string;
|
|
1976
|
-
cardBorder?: string;
|
|
1977
|
-
}
|
|
1978
|
-
interface ThemeRadius {
|
|
1979
|
-
small?: string;
|
|
1980
|
-
medium?: string;
|
|
1981
|
-
large?: string;
|
|
1982
|
-
}
|
|
1983
|
-
interface ThemeSpacing {
|
|
1984
|
-
small?: string;
|
|
1985
|
-
medium?: string;
|
|
1986
|
-
large?: string;
|
|
1987
|
-
}
|
|
1988
|
-
interface Theme {
|
|
1989
|
-
colors?: ThemeColors;
|
|
1990
|
-
radius?: ThemeRadius;
|
|
1991
|
-
spacing?: ThemeSpacing;
|
|
1992
|
-
}
|
|
1993
|
-
declare const defaultTheme: Theme;
|
|
1994
|
-
|
|
1995
|
-
interface ThemeProviderProps {
|
|
1996
|
-
theme?: Theme;
|
|
1997
|
-
children: React$1.ReactNode;
|
|
1998
|
-
}
|
|
1999
|
-
/**
|
|
2000
|
-
* ThemeProvider component that sets CSS custom properties for theming
|
|
2001
|
-
*
|
|
2002
|
-
* This provider merges the provided theme with the default theme and
|
|
2003
|
-
* sets CSS variables on a wrapper element, making them available to both
|
|
2004
|
-
* styled-components and SCSS styles within the provider's scope.
|
|
2005
|
-
*
|
|
2006
|
-
* @example
|
|
2007
|
-
* ```tsx
|
|
2008
|
-
* import { ThemeProvider, Button } from '@tetrascience-npm/tetrascience-react-ui';
|
|
2009
|
-
*
|
|
2010
|
-
* const customTheme = {
|
|
2011
|
-
* colors: {
|
|
2012
|
-
* primary: '#FF0000',
|
|
2013
|
-
* },
|
|
2014
|
-
* radius: {
|
|
2015
|
-
* medium: '12px',
|
|
2016
|
-
* }
|
|
2017
|
-
* };
|
|
2018
|
-
*
|
|
2019
|
-
* <ThemeProvider theme={customTheme}>
|
|
2020
|
-
* <Button>Click me</Button>
|
|
2021
|
-
* </ThemeProvider>
|
|
2022
|
-
* ```
|
|
2023
|
-
*/
|
|
2024
|
-
declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
|
|
2025
|
-
|
|
2026
|
-
export { AppHeader, AppLayout, AreaGraph, AssistantModal, Badge, BarGraph, Boxplot, Button, ButtonControl, ButtonControlGroup, CHART_COLORS, COLORS, Card, CardSidebar, Checkbox, Chromatogram, ChromatogramChart, CodeEditor, CodeScriptEditorButton, DEFAULT_CATEGORY_COLORS, DEFAULT_COLOR_SCALE, DEFAULT_MARKER_SIZE, DEFAULT_MAX_POINTS, DEFAULT_SIZE_RANGE, DotPlot, Dropdown, ErrorAlert, FormField, Heatmap, Histogram, Icon, IconName, Input, InteractiveScatter, Label, LaunchContent, LineGraph, Main, MarkdownDisplay, Menu, MenuItem, Modal, Navbar, PLOT_CONSTANTS, PieChart, PlateMap, PopConfirm, ProtocolConfiguration, ProtocolYamlCard, PythonEditorModal, SELECTION_MODIFIERS, ScatterGraph, SelectField, Sidebar, SupportiveText, TDPLink, Tab, TabGroup, Table, TableCell, TableHeaderCell, TdpNavigationContext, TdpNavigationProvider, TdpSearch, Textarea, ThemeProvider, Toast, ToastManager, Toggle, Tooltip, buildTdpUrl, defaultTheme, getTdpBaseUrlFromReferrer, navigateToTdpUrl, tdpPaths, useSearch, useTdpNavigation, useTdpNavigationContext };
|
|
2027
|
-
export type { AppHeaderProps, AppLayoutProps, AreaDataSeries, AreaGraphProps, AreaGraphVariant, AssistantModalProps, AxisConfig, BadgeProps, BarDataSeries, BarGraphProps, BarGraphVariant, BaselineCorrectionMethod, BoundaryMarkerStyle, BoxDataSeries, BoxplotProps, ButtonControlGroupProps, ButtonControlProps, ButtonProps, CardProps, CardSidebarProps, CheckboxProps, ChromatogramChartProps, ChromatogramProps, ChromatogramSeries, CodeEditorProps, CodeScriptEditorButtonProps, ColorMapping, ColorScale, ColorToken, DotPlotDataSeries, DotPlotProps, DotPlotVariant, DownsamplingConfig, DropdownOption, DropdownProps, ErrorAlertProps, FormFieldProps, HeatmapProps, HistogramDataSeries, HistogramProps, IconProps, IconsProps, InputProps, InteractiveScatterProps, LabelProps, LaunchContentProps, LineDataSeries, LineGraphProps, LineGraphVariant, MainProps, MarkdownDisplayProps, MarkerShape, MarkerSymbol, MenuItemProps, MenuProps, ModalProps, NavbarProps, PeakAnnotation, PeakData, PeakDetectionOptions, PieChartProps, PieDataSeries, PieTextInfo, PlateFormat, PlateMapProps, PopConfirmProps, ProtocolConfigurationProps, ProtocolYamlCardProps, PythonEditorModalProps, ScaleType, ScatterDataPoint, ScatterDataSeries, ScatterGraphProps, ScatterPoint, SearchResult, SelectFieldProps, SelectionEvent, SelectionMode, SelectionState, ShapeMapping, SidebarProps, SizeMapping, SupportiveTextProps, TDPLinkProps, TabGroupProps, TabProps, TabSize, TableCellProps, TableColumn, TableHeaderCellProps, TableProps, TdpFiltersRenderProps, TdpNavigationContextValue, TdpNavigationOptions, TdpNavigationProviderProps, TdpResultsRenderProps, TdpSearchBarRenderProps, TdpSearchColumn, TdpSearchConfig, TdpSearchFilter, TdpSearchProps, TdpSearchSort, TextareaProps, Theme, ThemeColors, ThemeProviderProps, ThemeRadius, ThemeSpacing, ToastContainerProps, ToastManagerProps, ToastProps, ToastType, ToggleProps, TooltipConfig, TooltipProps, UseSearchConfig, UseSearchResult, UseTdpNavigationOptions, UseTdpNavigationReturn, WellData };
|