@diamondlightsource/davidia 0.1.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/LICENSE +21 -0
- package/dist/index.d.ts +1796 -0
- package/dist/index.js +89207 -0
- package/dist/style.css +1 -0
- package/package.json +77 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1796 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
import { Aspect } from '@h5web/lib';
|
|
4
|
+
import { AxisScaleType } from '@h5web/lib';
|
|
5
|
+
import type { Camera } from 'three';
|
|
6
|
+
import { ColorMap } from '@h5web/lib';
|
|
7
|
+
import { ColorScaleType } from '@h5web/lib';
|
|
8
|
+
import { CommonInteractionProps } from '@h5web/lib';
|
|
9
|
+
import type { ComponentType } from 'react';
|
|
10
|
+
import { CustomDomain } from '@h5web/lib';
|
|
11
|
+
import { Domain } from '@h5web/lib';
|
|
12
|
+
import type { HistogramParams } from '@h5web/lib';
|
|
13
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
14
|
+
import { Matrix3 } from 'three';
|
|
15
|
+
import { ModifierKey } from '@h5web/lib';
|
|
16
|
+
import type { NdArray } from 'ndarray';
|
|
17
|
+
import type { ReactNode } from 'react';
|
|
18
|
+
import { ScaleType } from '@h5web/lib';
|
|
19
|
+
import { Size } from '@h5web/lib';
|
|
20
|
+
import type { SVGAttributes } from 'react';
|
|
21
|
+
import { SVGProps } from 'react';
|
|
22
|
+
import type { TypedArray } from 'ndarray';
|
|
23
|
+
import { Vector3 } from 'three';
|
|
24
|
+
import { VisCanvasContextValue } from '@h5web/lib';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* Renders a labelled input for angle.
|
|
29
|
+
* @param {AngleInputProps} props - The component props.
|
|
30
|
+
* @returns {JSX.Element<T>} The rendered component.
|
|
31
|
+
*/
|
|
32
|
+
export declare function AngleInput(props: AngleInputProps): JSX_2.Element;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* The props for the `AngleInput` component.
|
|
37
|
+
* @interface AngleInputProps
|
|
38
|
+
* @member {OrientableSelection} selection - The selection for which the angle is being configured.
|
|
39
|
+
* @member {(s: OrientableSelection) => void} updateSelection - Function to handle updating angle of selection.
|
|
40
|
+
* @member {boolean} [disabled] - If input component is disabled.
|
|
41
|
+
*/
|
|
42
|
+
declare interface AngleInputProps {
|
|
43
|
+
selection: OrientableSelection;
|
|
44
|
+
updateSelection: (s: OrientableSelection) => void;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* Renders a plot.
|
|
51
|
+
* @param {AnyPlotProps} props - The component props.
|
|
52
|
+
* @returns {JSX.Element} The rendered component.
|
|
53
|
+
*/
|
|
54
|
+
export declare function AnyPlot(props: AnyPlotProps): JSX_2.Element | null;
|
|
55
|
+
|
|
56
|
+
export declare type AnyPlotProps = LinePlotProps | ImagePlotProps | HeatmapPlotProps | ScatterPlotProps | SurfacePlotProps | TableDisplayProps;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* An append line data message.
|
|
60
|
+
* @interface {object} AppendLineDataMessage
|
|
61
|
+
* @extends {DataMessage}
|
|
62
|
+
* @member {LineData[]} al_data - The line data to append.
|
|
63
|
+
*/
|
|
64
|
+
export declare interface AppendLineDataMessage extends DataMessage {
|
|
65
|
+
/** The line data to append */
|
|
66
|
+
al_data: LineData[];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Renders the configuration options for the aspect ratio.
|
|
71
|
+
* @param {AspectConfigModalProps} props - The component props.
|
|
72
|
+
* @returns {(JSX.Element | null)[]} {Modal} The rendered component.
|
|
73
|
+
*/
|
|
74
|
+
export declare function AspectConfigModal(props: AspectConfigModalProps): (JSX.Element | null)[];
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The props for the `AspectConfigModal` component.
|
|
78
|
+
* @interface {object} AspectConfigModalProps
|
|
79
|
+
* @member {string} title - The title of the modal and the label on the modal's button.
|
|
80
|
+
* @member {IIconType} [icon] - The icon to display on the modal's button.
|
|
81
|
+
* @member {Aspect} aspect - The current value of the aspect.
|
|
82
|
+
* @member {(value: Aspect) => void} setAspect - The function to update aspect state.
|
|
83
|
+
* @member {ReactNode} [children] - The children to render inside the modal.
|
|
84
|
+
*/
|
|
85
|
+
export declare interface AspectConfigModalProps {
|
|
86
|
+
/**
|
|
87
|
+
* The title of the modal and the label on the modal's button */
|
|
88
|
+
title: string;
|
|
89
|
+
/**
|
|
90
|
+
* The icon to display on the modal's button (optional) */
|
|
91
|
+
icon?: IIconType;
|
|
92
|
+
/**
|
|
93
|
+
* The current value of the aspect */
|
|
94
|
+
aspect: Aspect;
|
|
95
|
+
/**
|
|
96
|
+
* The function to update aspect state */
|
|
97
|
+
setAspect: (value: Aspect) => void;
|
|
98
|
+
/**
|
|
99
|
+
* The children to render inside the modal (optional) */
|
|
100
|
+
children?: ReactNode;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Represents axes parameters.
|
|
105
|
+
* @interface {object} AxesParameters
|
|
106
|
+
* @member {string} [x_label] - The label for the x-axis.
|
|
107
|
+
* @member {string} [y_label] - The label for the y-axis.
|
|
108
|
+
* @member {AxisScaleType} [x_scale] - The x-axis scale type.
|
|
109
|
+
* @member {AxisScaleType} [y_scale] - The y-axis scale type.
|
|
110
|
+
* @member {MP_NDArray} [x_values] - The x-axis values.
|
|
111
|
+
* @member {MP_NDArray} [y_values] - The y-axis values.
|
|
112
|
+
* @member {string} [title] - The plot title.
|
|
113
|
+
*/
|
|
114
|
+
export declare interface AxesParameters {
|
|
115
|
+
/** The label for the x-axis */
|
|
116
|
+
x_label?: string;
|
|
117
|
+
/** The label for the y-axis */
|
|
118
|
+
y_label?: string;
|
|
119
|
+
/** The x-axis scale type */
|
|
120
|
+
x_scale?: AxisScaleType;
|
|
121
|
+
/** The y-axis scale type */
|
|
122
|
+
y_scale?: AxisScaleType;
|
|
123
|
+
/** The x-axis values */
|
|
124
|
+
x_values?: MP_NDArray;
|
|
125
|
+
/** The y-axis values */
|
|
126
|
+
y_values?: MP_NDArray;
|
|
127
|
+
/** The plot title */
|
|
128
|
+
title?: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** export class to make an axis selection */
|
|
132
|
+
export declare class AxialSelection extends BaseSelection {
|
|
133
|
+
readonly defaultColour = "#882255";
|
|
134
|
+
length: number;
|
|
135
|
+
dimension: number;
|
|
136
|
+
constructor(start: [number, number], length: number, dimension: number);
|
|
137
|
+
_getPoint(fraction?: number): Vector3;
|
|
138
|
+
getPoints(): Vector3[];
|
|
139
|
+
toString(): string;
|
|
140
|
+
static clicks(): number[];
|
|
141
|
+
static isShape(s: AxialSelection | SelectionBase): s is AxialSelection;
|
|
142
|
+
_setFromPoints(points: Vector3[]): void;
|
|
143
|
+
static createFromPoints(points: Vector3[], dimension: number): AxialSelection;
|
|
144
|
+
static createFromSelection(s: AxialSelection): AxialSelection;
|
|
145
|
+
onHandleChange(i: number, pos: [number | undefined, number | undefined]): AxialSelection;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Renders the configuration options for an axial selection.
|
|
150
|
+
* @param {AxialSelectionConfigProps} props - The component props.
|
|
151
|
+
* @returns {JSX.Element} The rendered component.
|
|
152
|
+
*/
|
|
153
|
+
export declare function AxialSelectionConfig(props: AxialSelectionConfigProps): JSX_2.Element;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The props for the `AxialSelectionConfig` component.
|
|
157
|
+
* @interface {object} AxialSelectionConfigProps
|
|
158
|
+
* @member {AxialSelection} selection - The axial selection to configure.
|
|
159
|
+
* @member {(s: SelectionBase | null, b?: boolean, c?: boolean) => void} updateSelection - The function to call to update the selections state.
|
|
160
|
+
* @member {boolean} [disabled] - Indicates whether the component is disabled.
|
|
161
|
+
*/
|
|
162
|
+
export declare interface AxialSelectionConfigProps {
|
|
163
|
+
/** The axial selection to configure */
|
|
164
|
+
selection: AxialSelection;
|
|
165
|
+
/** The function to call to update the selections state */
|
|
166
|
+
updateSelection: (s: SelectionBase | null, b?: boolean, c?: boolean) => void;
|
|
167
|
+
/** Indicates whether the component is disabled (optional) */
|
|
168
|
+
disabled?: boolean;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Renders the configuration options for an axis.
|
|
173
|
+
* @param {AxisConfigModalProps} props - The component props.
|
|
174
|
+
* @returns {JSX.Element} The rendered component.
|
|
175
|
+
* @template S
|
|
176
|
+
*/
|
|
177
|
+
export declare function AxisConfigModal<S extends ScaleType>(props: AxisConfigModalProps<S>): (JSX_2.Element | null)[];
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The props for the `AxisConfigModal` component.
|
|
181
|
+
* @interface {object} AxisConfigModalProps
|
|
182
|
+
* @member {string} title - The title of the modal.
|
|
183
|
+
* @member {IIconType} [icon] - The icon to display in the modal.
|
|
184
|
+
* @member {string} [label] - The label for the axis.
|
|
185
|
+
* @member {(value: string) => void} [setLabel] - The function to call when the label is updated.
|
|
186
|
+
* @member {S} [scaleType] - The type of scale to use for the axis.
|
|
187
|
+
* @member {(value: S) => void} [setScaleType] - The function to call when the scale type is updated.
|
|
188
|
+
* @member {EnumArray<S>} scaleOptions - The available scale options.
|
|
189
|
+
* @member {ColorMap} [colourMap] - The color map for the axis.
|
|
190
|
+
* @member {(value: ColorMap) => void} [setColourMap] - The function to call when the color map is updated.
|
|
191
|
+
* @member {boolean} [invertColourMap] - A boolean value indicating whether to invert the color map.
|
|
192
|
+
* @member {() => void} [toggleColourMapInversion] - The function to call when the color map inversion is toggled.
|
|
193
|
+
* @member {Domain} [domain] - The domain for the axis.
|
|
194
|
+
* @member {CustomDomain} [customDomain] - The custom domain for the axis.
|
|
195
|
+
* @member {(value: CustomDomain) => void} [setCustomDomain] - The function to call when the custom domain is updated.
|
|
196
|
+
* @member {TypedArray} [values] - The values for the axis.
|
|
197
|
+
* @member {ReactNode} [children] - The children to render inside the modal.
|
|
198
|
+
*/
|
|
199
|
+
export declare interface AxisConfigModalProps<S extends ScaleType> {
|
|
200
|
+
/** The title of the modal */
|
|
201
|
+
title: string;
|
|
202
|
+
/** The icon to display in the modal (optional) */
|
|
203
|
+
icon?: IIconType;
|
|
204
|
+
/** The label for the axis (optional) */
|
|
205
|
+
label?: string;
|
|
206
|
+
/** The function to call when the label is updated (optional) */
|
|
207
|
+
setLabel?: (value: string) => void;
|
|
208
|
+
/** The type of scale to use for the axis (optional) */
|
|
209
|
+
scaleType?: S;
|
|
210
|
+
/** The function to call when the scale type is updated (optional) */
|
|
211
|
+
setScaleType?: (value: S) => void;
|
|
212
|
+
/** The available scale options */
|
|
213
|
+
scaleOptions: EnumArray<S>;
|
|
214
|
+
/** The color map for the axis (optional) */
|
|
215
|
+
colourMap?: ColorMap;
|
|
216
|
+
/** The function to call when the color map is updated (optional) */
|
|
217
|
+
setColourMap?: (value: ColorMap) => void;
|
|
218
|
+
/** A boolean value indicating whether to invert the color map (optional) */
|
|
219
|
+
invertColourMap?: boolean;
|
|
220
|
+
/** The function to call when the color map inversion is toggled (optional) */
|
|
221
|
+
toggleColourMapInversion?: () => void;
|
|
222
|
+
/** The domain for the axis (optional) */
|
|
223
|
+
domain?: Domain;
|
|
224
|
+
/** The custom domain for the axis (optional) */
|
|
225
|
+
customDomain?: CustomDomain;
|
|
226
|
+
/** The function to call when the custom domain is updated (optional) */
|
|
227
|
+
setCustomDomain?: (value: CustomDomain) => void;
|
|
228
|
+
/** The values for the axis (optional) */
|
|
229
|
+
values?: TypedArray;
|
|
230
|
+
/** The children to render inside the modal (optional) */
|
|
231
|
+
children?: ReactNode;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** export class for all selections */
|
|
235
|
+
export declare class BaseSelection implements SelectionBase {
|
|
236
|
+
id: string;
|
|
237
|
+
name: string;
|
|
238
|
+
colour?: string;
|
|
239
|
+
alpha: number;
|
|
240
|
+
fixed: boolean;
|
|
241
|
+
start: [number, number];
|
|
242
|
+
asDashed?: boolean;
|
|
243
|
+
vStart: Vector3;
|
|
244
|
+
constructor(start: [number, number]);
|
|
245
|
+
toString(): string;
|
|
246
|
+
getPoints(): Vector3[];
|
|
247
|
+
setProperties(other: BaseSelection): void;
|
|
248
|
+
setName(name: string): void;
|
|
249
|
+
setFixed(fixed: boolean): void;
|
|
250
|
+
static createFromSelection(s: BaseSelection): BaseSelection;
|
|
251
|
+
onHandleChange(i: number, pos: [number | undefined, number | undefined]): BaseSelection;
|
|
252
|
+
static isShape(s: BaseSelection | SelectionBase): s is BaseSelection;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* A baton approval request message.
|
|
257
|
+
* @interface {object} BatonApprovalRequestMessage
|
|
258
|
+
* @member {string} requester - The uuid of the client requesting the baton.
|
|
259
|
+
*/
|
|
260
|
+
export declare interface BatonApprovalRequestMessage {
|
|
261
|
+
/** The uuid of the client requesting the baton */
|
|
262
|
+
requester: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
*
|
|
267
|
+
* Renders the configuration options for the baton.
|
|
268
|
+
* @export
|
|
269
|
+
* @param {BatonProps} props - The component props.
|
|
270
|
+
* @returns {JSX.Element} The rendered component.
|
|
271
|
+
*/
|
|
272
|
+
export declare function BatonConfigModal(props: BatonProps): (JSX_2.Element | null)[];
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* A baton message.
|
|
276
|
+
* @interface {object} BatonMessage
|
|
277
|
+
* @member {string} baton - The uuid of the current baton holder.
|
|
278
|
+
* @member {string[]} uuids - The uuids of all clients.
|
|
279
|
+
*/
|
|
280
|
+
export declare interface BatonMessage {
|
|
281
|
+
/** The uuid of the current baton holder */
|
|
282
|
+
baton: string;
|
|
283
|
+
/** The uuids of all the clients */
|
|
284
|
+
uuids: string[];
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Baton props.
|
|
289
|
+
* @interface {object} BatonProps
|
|
290
|
+
* @member {string} uuid - The universally unique identifier (uuid) of the client.
|
|
291
|
+
* @member {string | null} uuid - The uuid of the current baton holder.
|
|
292
|
+
* @member {string[]} others - The other uuids.
|
|
293
|
+
* @member {boolean} hasBaton - If client holds baton.
|
|
294
|
+
* @member {() => void} requestBaton - Handles baton request.
|
|
295
|
+
* @member {(s: string) => void} approveBaton - Approves passing baton to client with given uuid.
|
|
296
|
+
*/
|
|
297
|
+
export declare interface BatonProps {
|
|
298
|
+
/** The universally unique identifier (uuid) of the client */
|
|
299
|
+
uuid: string;
|
|
300
|
+
/** The uuid of the current baton holder */
|
|
301
|
+
batonUuid: string | null;
|
|
302
|
+
/** The other uuids */
|
|
303
|
+
others: string[];
|
|
304
|
+
/** If client holds baton */
|
|
305
|
+
hasBaton: boolean;
|
|
306
|
+
/** Handles baton request */
|
|
307
|
+
requestBaton: () => void;
|
|
308
|
+
/** Approves passing baton to client with given uuid */
|
|
309
|
+
approveBaton: (s: string) => void;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* A baton request message.
|
|
314
|
+
* @interface {object} BatonRequestMessage
|
|
315
|
+
* @member {string} uuid - The universally unique identifier.
|
|
316
|
+
*/
|
|
317
|
+
export declare interface BatonRequestMessage {
|
|
318
|
+
/** The universally unique identifier */
|
|
319
|
+
uuid: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/** export class to select a circular sector */
|
|
323
|
+
export declare class CircularSectorialSelection extends BaseSelection {
|
|
324
|
+
readonly defaultColour = "#117733";
|
|
325
|
+
radii: [number, number];
|
|
326
|
+
angles: [number, number];
|
|
327
|
+
constructor(start: [number, number], radii: [number, number], angles: [number, number]);
|
|
328
|
+
static clicks(): number[];
|
|
329
|
+
static isShape(s: CircularSectorialSelection | SelectionBase): s is CircularSectorialSelection;
|
|
330
|
+
static createFromPoints(points: Vector3[]): CircularSectorialSelection;
|
|
331
|
+
static createFromSelection(s: CircularSectorialSelection): CircularSectorialSelection;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/** export class to select a circle */
|
|
335
|
+
export declare class CircularSelection extends BaseSelection {
|
|
336
|
+
readonly defaultColour = "#332288";
|
|
337
|
+
radius: number;
|
|
338
|
+
constructor(start: [number, number], radius: number);
|
|
339
|
+
static clicks(): number[];
|
|
340
|
+
static isShape(s: CircularSelection | SelectionBase): s is CircularSelection;
|
|
341
|
+
static createFromPoints(points: Vector3[]): CircularSelection;
|
|
342
|
+
static createFromSelection(s: CircularSelection): CircularSelection;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* A clear plots message.
|
|
347
|
+
* @interface {object} ClearPlotsMessage
|
|
348
|
+
* @member {string} plot_id - The plot ID.
|
|
349
|
+
*/
|
|
350
|
+
export declare interface ClearPlotsMessage {
|
|
351
|
+
/** The plot ID */
|
|
352
|
+
plot_id: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
*
|
|
357
|
+
* Renders a button to clear selections.
|
|
358
|
+
* @param {ClearSelectionsBtnProps} props - The component props.
|
|
359
|
+
* @returns {JSX.Element} The rendered component.
|
|
360
|
+
*/
|
|
361
|
+
export declare function ClearSelectionsBtn(props: ClearSelectionsBtnProps): JSX.Element;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The props for the `ClearSelectionsBtn` component.
|
|
365
|
+
* @interface {object} ClearSelectionsBtnProps
|
|
366
|
+
* @member {BaseSelection[]} selections - The current selections.
|
|
367
|
+
* @member {(s: SelectionBase | null, b?: boolean, c?: boolean) => void} updateSelections - The function to call to update the selections state.
|
|
368
|
+
* @member {string | null} currentSelectionID - The ID of the current selection.
|
|
369
|
+
* @member {(s: string | null) => void} updateCurrentSelectionID - The function to call to update the current selection ID.
|
|
370
|
+
* @member {boolean} [disabled] - Indicates whether the component is disabled.
|
|
371
|
+
*/
|
|
372
|
+
export declare interface ClearSelectionsBtnProps {
|
|
373
|
+
/** The current selections */
|
|
374
|
+
selections: BaseSelection[];
|
|
375
|
+
/** The function to call to update the selections state */
|
|
376
|
+
updateSelections: (s: SelectionBase | null, b?: boolean, d?: boolean) => void;
|
|
377
|
+
/** The ID of the current selection */
|
|
378
|
+
currentSelectionID: string | null;
|
|
379
|
+
/** The function to call to update the current selection ID */
|
|
380
|
+
updateCurrentSelectionID: (s: string | null) => void;
|
|
381
|
+
/** Indicates whether the component is disabled (optional) */
|
|
382
|
+
disabled?: boolean;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* A clear selections message.
|
|
387
|
+
* @interface {object} ClearSelectionsMessage
|
|
388
|
+
* @member {string[]} selection_ids - The selection IDs.
|
|
389
|
+
*/
|
|
390
|
+
export declare interface ClearSelectionsMessage {
|
|
391
|
+
/** The selection IDs */
|
|
392
|
+
selection_ids: string[];
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* A client selection message.
|
|
397
|
+
* @interface {object} ClientSelectionMessage
|
|
398
|
+
* @member {SelectionBase} selection - The selection.
|
|
399
|
+
*/
|
|
400
|
+
export declare interface ClientSelectionMessage {
|
|
401
|
+
/** The selection */
|
|
402
|
+
selection: SelectionBase;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
* Renders a connected plot.
|
|
408
|
+
* @param {ConnectedPlotProps} props - The component props.
|
|
409
|
+
* @returns {JSX.Element} The rendered component.
|
|
410
|
+
*/
|
|
411
|
+
export declare function ConnectedPlot(props: ConnectedPlotProps): JSX_2.Element;
|
|
412
|
+
|
|
413
|
+
export declare namespace ConnectedPlot {
|
|
414
|
+
var defaultProps: ConnectedPlotProps;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The props for the `ConnectedPlot` component.
|
|
419
|
+
* @interface {object} ConnectedPlotProps
|
|
420
|
+
* @member {string} plot_id - The plot ID.
|
|
421
|
+
* @member {string} hostname - The hostname.
|
|
422
|
+
* @member {string} port - The port.
|
|
423
|
+
* @member {string} uuid - The uuid.
|
|
424
|
+
*/
|
|
425
|
+
export declare interface ConnectedPlotProps {
|
|
426
|
+
/** The plot ID */
|
|
427
|
+
plot_id: string;
|
|
428
|
+
/** The hostname */
|
|
429
|
+
hostname: string;
|
|
430
|
+
/** The port */
|
|
431
|
+
port: string;
|
|
432
|
+
/** The universally unique identifier */
|
|
433
|
+
uuid: string;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export declare function createHistogramParams(values: TypedArray | undefined, domain: Domain | undefined, colourMap: ColorMap | undefined, invertColourMap: boolean | undefined): HistogramParams | undefined;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* A data message.
|
|
440
|
+
* @interface {object} DataMessage
|
|
441
|
+
* @member {AxesParameters} axes_parameters - The axes parameters.
|
|
442
|
+
*/
|
|
443
|
+
export declare interface DataMessage {
|
|
444
|
+
/** The axes parameters */
|
|
445
|
+
axes_parameters: AxesParameters;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Represents Axes parameters.
|
|
450
|
+
* @interface {object} DAxesParameters
|
|
451
|
+
* @member {string} [xLabel] - the x-axis label.
|
|
452
|
+
* @member {string} [yLabel] - the y-axis label.
|
|
453
|
+
* @member {AxisScaleType} [xScale] - the x-axis scale type.
|
|
454
|
+
* @member {AxisScaleType} [yScale] - the y-axis scale type.
|
|
455
|
+
* @member {NdArray<TypedArray>} [xValues] - the x-axis values.
|
|
456
|
+
* @member {NdArray<TypedArray>} [yValues] - the y-axis values.
|
|
457
|
+
* @member {string} [title] - the plot title.
|
|
458
|
+
*/
|
|
459
|
+
export declare interface DAxesParameters {
|
|
460
|
+
/** The x-axis label (optional) */
|
|
461
|
+
xLabel?: string;
|
|
462
|
+
/** The y-axis label (optional) */
|
|
463
|
+
yLabel?: string;
|
|
464
|
+
/** The x-axis scale type (optional) */
|
|
465
|
+
xScale?: AxisScaleType;
|
|
466
|
+
/** The y-axis scale type (optional) */
|
|
467
|
+
yScale?: AxisScaleType;
|
|
468
|
+
/** The x-axis values (optional) */
|
|
469
|
+
xValues?: NdArray<TypedArray>;
|
|
470
|
+
/** The y-axis values (optional) */
|
|
471
|
+
yValues?: NdArray<TypedArray>;
|
|
472
|
+
/** The plot title (optional) */
|
|
473
|
+
title?: string;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export declare type DecodedMessage = MultiLineDataMessage | AppendLineDataMessage | ImageDataMessage | ScatterDataMessage | SurfaceDataMessage | TableDataMessage | UpdateSelectionsMessage | SelectionsMessage | ClearSelectionsMessage | ClearPlotsMessage | BatonMessage | BatonApprovalRequestMessage;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Represents line data.
|
|
480
|
+
* @interface {object} DLineData
|
|
481
|
+
* @member {string} key - The object key.
|
|
482
|
+
* @member {string} [colour] - The line colour.
|
|
483
|
+
* @member {NdArray<TypedArray>} x - x coordinates.
|
|
484
|
+
* @member {[number, number]} dx - x data domain.
|
|
485
|
+
* @member {NdArray<TypedArray>} y - y coordinates.
|
|
486
|
+
* @member {[number, number]} dy - y data domain.
|
|
487
|
+
* @member {boolean} line_on - If line is visible.
|
|
488
|
+
* @member {number} [point_size] - The size of data points.
|
|
489
|
+
* @member {boolean} [default_indices] - Line uses default generated x-axis values.
|
|
490
|
+
*/
|
|
491
|
+
export declare interface DLineData {
|
|
492
|
+
/** The object key */
|
|
493
|
+
key: string;
|
|
494
|
+
/** The line colour (optional) */
|
|
495
|
+
colour?: string;
|
|
496
|
+
/** x coordinates */
|
|
497
|
+
x: NdArray<TypedArray>;
|
|
498
|
+
/** x data domain */
|
|
499
|
+
dx: [number, number];
|
|
500
|
+
/** y coordinates */
|
|
501
|
+
y: NdArray<TypedArray>;
|
|
502
|
+
/** y data domain */
|
|
503
|
+
dy: [number, number];
|
|
504
|
+
/** If line is visible */
|
|
505
|
+
line_on: boolean;
|
|
506
|
+
/** The size of the data points (optional) */
|
|
507
|
+
point_size?: number;
|
|
508
|
+
/** Line uses default generated x-axis values (optional) */
|
|
509
|
+
default_indices?: boolean;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
* Renders the configuration options for a domain.
|
|
515
|
+
* @param {DomainConfigProps} props - The component props.
|
|
516
|
+
* @returns {JSX.Element} The rendered component.
|
|
517
|
+
*/
|
|
518
|
+
export declare function DomainConfig(props: DomainConfigProps): JSX_2.Element;
|
|
519
|
+
|
|
520
|
+
export declare namespace DomainConfig {
|
|
521
|
+
var displayName: string;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* The props for the `DomainConfig` component.
|
|
526
|
+
* @interface {object} DomainConfigProps
|
|
527
|
+
* @member {dataDomain} Domain - The domain to configure.
|
|
528
|
+
* @member {CustomDomain} customDomain - The custom domain.
|
|
529
|
+
* @member {ColorScaleType} scaleType - The type of the colour scale.
|
|
530
|
+
* @member {(domain: CustomDomain) => void} onCustomDomainChange - Handles custom domain change.
|
|
531
|
+
* @member {() => HistogramParams | undefined} [histogramFunction] - Returns histogram params.
|
|
532
|
+
*/
|
|
533
|
+
export declare interface DomainConfigProps {
|
|
534
|
+
/** The domain to configure */
|
|
535
|
+
dataDomain: Domain;
|
|
536
|
+
/** The custom domain */
|
|
537
|
+
customDomain: CustomDomain;
|
|
538
|
+
/** The type of the colour scale */
|
|
539
|
+
scaleType: ColorScaleType;
|
|
540
|
+
/** Handles custom domain change */
|
|
541
|
+
onCustomDomainChange: (domain: CustomDomain) => void;
|
|
542
|
+
/** Returns histogram params (optional) */
|
|
543
|
+
histogramFunction?: () => HistogramParams | undefined;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export declare function DvdAxisBox(props: DvdAxisBoxProps): JSX_2.Element;
|
|
547
|
+
|
|
548
|
+
export declare interface DvdAxisBoxProps extends SVGProps<SVGPolygonElement> {
|
|
549
|
+
size: Size;
|
|
550
|
+
coords: Vector3[];
|
|
551
|
+
isFixed?: boolean;
|
|
552
|
+
axis: number;
|
|
553
|
+
onHandleChange?: HandleChangeFunction;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export declare function DvdDragHandle(props: DvdDragHandleProps): JSX_2.Element;
|
|
557
|
+
|
|
558
|
+
export declare interface DvdDragHandleProps extends SVGProps<SVGElement> {
|
|
559
|
+
name: string;
|
|
560
|
+
size: Size;
|
|
561
|
+
i: number;
|
|
562
|
+
nx: number;
|
|
563
|
+
ny: number;
|
|
564
|
+
onHandleChange?: HandleChangeFunction;
|
|
565
|
+
restrictX?: boolean;
|
|
566
|
+
restrictY?: boolean;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export declare function DvdPolyline(props: DvdPolylineProps): JSX_2.Element;
|
|
570
|
+
|
|
571
|
+
export declare interface DvdPolylineProps extends SVGProps<SVGPolylineElement> {
|
|
572
|
+
size: Size;
|
|
573
|
+
coords: Vector3[];
|
|
574
|
+
isClosed?: boolean;
|
|
575
|
+
isFixed?: boolean;
|
|
576
|
+
onHandleChange?: HandleChangeFunction;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/** export class to select an ellipse */
|
|
580
|
+
export declare class EllipticalSelection extends OrientableSelection {
|
|
581
|
+
readonly defaultColour = "#999933";
|
|
582
|
+
semi_axes: [number, number];
|
|
583
|
+
constructor(start: [number, number], semi_axes: [number, number], angle?: number);
|
|
584
|
+
static clicks(): number[];
|
|
585
|
+
static isShape(s: EllipticalSelection | SelectionBase): s is EllipticalSelection;
|
|
586
|
+
static createFromPoints(points: Vector3[]): EllipticalSelection;
|
|
587
|
+
static createFromSelection(s: EllipticalSelection): EllipticalSelection;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare type EnumArray<T> = Array<T[keyof T]>;
|
|
591
|
+
|
|
592
|
+
export declare function findSelection(selections: SelectionBase[], id: string | null): SelectionBase | undefined;
|
|
593
|
+
|
|
594
|
+
export declare function getClicks(selectionType: SelectionType): number[];
|
|
595
|
+
|
|
596
|
+
export declare function getSelectionLabel(selection: SelectionBase | null, selectionIcons?: {
|
|
597
|
+
line: string;
|
|
598
|
+
rectangle: string;
|
|
599
|
+
polyline: string;
|
|
600
|
+
polygon: string;
|
|
601
|
+
circle: string;
|
|
602
|
+
ellipse: string;
|
|
603
|
+
sector: string;
|
|
604
|
+
horizontalAxis: string;
|
|
605
|
+
verticalAxis: string;
|
|
606
|
+
unknown: string;
|
|
607
|
+
}): string;
|
|
608
|
+
|
|
609
|
+
export declare function getSelectionLabelFromID(selections: SelectionBase[], id: string | null, selectionIcons: {
|
|
610
|
+
line: string;
|
|
611
|
+
rectangle: string;
|
|
612
|
+
polyline: string;
|
|
613
|
+
polygon: string;
|
|
614
|
+
circle: string;
|
|
615
|
+
ellipse: string;
|
|
616
|
+
sector: string;
|
|
617
|
+
horizontalAxis: string;
|
|
618
|
+
verticalAxis: string;
|
|
619
|
+
unknown: string;
|
|
620
|
+
}): string;
|
|
621
|
+
|
|
622
|
+
export declare function getSelectionType(selection: SelectionBase): SelectionType;
|
|
623
|
+
|
|
624
|
+
export declare const HANDLE_SIZE = 8;
|
|
625
|
+
|
|
626
|
+
declare type HandleChangeFunction = (i: number, pos: [number | undefined, number | undefined], b?: boolean) => BaseSelection;
|
|
627
|
+
|
|
628
|
+
declare type _HandleChangeFunction = (i: number, position: [number | undefined, number | undefined]) => SelectionBase;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Represents heatmap data.
|
|
632
|
+
* @interface {object} HeatmapData
|
|
633
|
+
* @extends {ImageData}
|
|
634
|
+
* @member {Domain} domain - The heatmap data domain.
|
|
635
|
+
* @member {string} heatmap_scale - The heatmap scale.
|
|
636
|
+
* @member {ColorMap} colourMap - The colour map.
|
|
637
|
+
*/
|
|
638
|
+
export declare interface HeatmapData extends ImageData_2 {
|
|
639
|
+
/** The heatmap data domain */
|
|
640
|
+
domain: Domain;
|
|
641
|
+
/** The heatmap scale */
|
|
642
|
+
heatmap_scale: string;
|
|
643
|
+
/** The colour map */
|
|
644
|
+
colourMap: ColorMap;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
*
|
|
649
|
+
* Renders a heatmap plot.
|
|
650
|
+
* @param {HeatmapPlotProps} props - The component props.
|
|
651
|
+
* @returns {JSX.Element} The rendered component.
|
|
652
|
+
*/
|
|
653
|
+
export declare function HeatmapPlot(props: HeatmapPlotProps): JSX_2.Element;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* The props for the `HeatmapPlot` component.
|
|
657
|
+
* @interface {object} HeatmapPlotProps
|
|
658
|
+
* @extends {PlotSelectionProps}
|
|
659
|
+
* @member {Domain} domain - The data domain.
|
|
660
|
+
* @member {ColorScaleType} heatmapScale - The colour scale type.
|
|
661
|
+
* @member {ColorMap} [colourMap] - The colour map.
|
|
662
|
+
*/
|
|
663
|
+
export declare interface HeatmapPlotProps extends ImagePlotProps {
|
|
664
|
+
/** The data domain */
|
|
665
|
+
domain: Domain;
|
|
666
|
+
/** The colour scale type */
|
|
667
|
+
heatmapScale: ColorScaleType;
|
|
668
|
+
/** The colour map (optional) */
|
|
669
|
+
colourMap?: ColorMap;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export declare type IIconType = ComponentType<SVGAttributes<SVGElement>>;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Represents image data.
|
|
676
|
+
* @interface {object} ImageData
|
|
677
|
+
* @member {string} key - The key.
|
|
678
|
+
* @member {MP_NDArray} values - The image data values.
|
|
679
|
+
* @member {Aspect} aspect - The aspect ratio.
|
|
680
|
+
*/
|
|
681
|
+
declare interface ImageData_2 {
|
|
682
|
+
/** The key */
|
|
683
|
+
key: string;
|
|
684
|
+
/** The image data values */
|
|
685
|
+
values: MP_NDArray;
|
|
686
|
+
/** The aspect ratio (optional) */
|
|
687
|
+
aspect?: Aspect;
|
|
688
|
+
}
|
|
689
|
+
export { ImageData_2 as ImageData }
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* An image data message.
|
|
693
|
+
* @interface {object} ImageDataMessage
|
|
694
|
+
* @extends {DataMessage}
|
|
695
|
+
* @member {ImageData} im_data - The image data.
|
|
696
|
+
*/
|
|
697
|
+
export declare interface ImageDataMessage extends DataMessage {
|
|
698
|
+
/** The image data */
|
|
699
|
+
im_data: ImageData_2;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
*
|
|
704
|
+
* Renders an image plot.
|
|
705
|
+
* @param {ImagePlotProps} props - The component props.
|
|
706
|
+
* @returns {JSX.Element} The rendered component.
|
|
707
|
+
*/
|
|
708
|
+
export declare function ImagePlot(props: ImagePlotProps): JSX_2.Element;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* The props for the `ImagePlot` component.
|
|
712
|
+
* @interface {object} ImagePlotProps
|
|
713
|
+
* @extends {ImagePlotProps}
|
|
714
|
+
* @member {NdArray<TypedArray>} values - The image data.
|
|
715
|
+
* @member {DAxesParameters} axesParameters - The axes parameters.
|
|
716
|
+
* @member {Aspect} [aspect] - The image plot aspect.
|
|
717
|
+
*/
|
|
718
|
+
export declare interface ImagePlotProps extends PlotSelectionProps {
|
|
719
|
+
/** The image data */
|
|
720
|
+
values: NdArray<TypedArray>;
|
|
721
|
+
/** The axes parameters */
|
|
722
|
+
axesParameters: DAxesParameters;
|
|
723
|
+
/** The image plot aspect (optional) */
|
|
724
|
+
aspect?: Aspect;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
*
|
|
729
|
+
* Renders a toggle button for interaction mode.
|
|
730
|
+
* @param {InteractionModeToggleProps} props - The component props.
|
|
731
|
+
* @returns {JSX.Element} The rendered component.
|
|
732
|
+
*/
|
|
733
|
+
export declare function InteractionModeToggle(props: InteractionModeToggleProps): JSX_2.Element;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* The props for the `InteractionModeToggle` component.
|
|
737
|
+
* @interface {object} InteractionModeToggleProps
|
|
738
|
+
* @member {InteractionModeType} value - The interaction mode.
|
|
739
|
+
* @member {(value: string) => void} onModeChange - Handles change of mode.
|
|
740
|
+
* @member {boolean} hasBaton - If client holds baton.
|
|
741
|
+
*/
|
|
742
|
+
export declare interface InteractionModeToggleProps {
|
|
743
|
+
/** The interaction mode */
|
|
744
|
+
value: InteractionModeType;
|
|
745
|
+
/** Handles change of mode */
|
|
746
|
+
onModeChange: (value: InteractionModeType) => void;
|
|
747
|
+
/** If client holds baton */
|
|
748
|
+
hasBaton: boolean;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
export declare enum InteractionModeType {
|
|
752
|
+
panAndWheelZoom = "panAndWheelZoom",
|
|
753
|
+
selectToZoom = "selectToZoom",
|
|
754
|
+
selectRegion = "selectRegion"
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
*
|
|
759
|
+
* Renders a labelled input box.
|
|
760
|
+
* @template T
|
|
761
|
+
* @param {LabelledInputProps<T>} props - The component props.
|
|
762
|
+
* @returns {JSX.Element} The rendered component.
|
|
763
|
+
*/
|
|
764
|
+
export declare function LabelledInput<T>(props: LabelledInputProps<T>): JSX_2.Element;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* The props for the `LabelledInput<T>` component.
|
|
768
|
+
* @template T
|
|
769
|
+
* @interface {object} LabelledInputProps<T>
|
|
770
|
+
* @member {(value: T) => void} updateValue - Updates value.
|
|
771
|
+
* @member {(value: string) => [boolean, T]} [isValid] - Checks if value is valid.
|
|
772
|
+
* @member {string} label - The input label.
|
|
773
|
+
* @member {T} input - The input value.
|
|
774
|
+
* @member {number} [decimalPlaces] - The number of decimal places to display.
|
|
775
|
+
* @member {object} [inputAttribs] - Input attributes.
|
|
776
|
+
* @member {string} [submitLabel] - Label on submit button.
|
|
777
|
+
* @member {boolean} [disabled] - If input is diabled.
|
|
778
|
+
* @member {boolean} [enableEnterKey] - If enter key is enabled.
|
|
779
|
+
* @member {boolean} [resetButton] - If reset button is enabled.
|
|
780
|
+
*/
|
|
781
|
+
export declare interface LabelledInputProps<T> {
|
|
782
|
+
/** Updates value */
|
|
783
|
+
updateValue: (value: T) => void;
|
|
784
|
+
/** Checks if value is valid (optional) */
|
|
785
|
+
isValid?: (value: string) => [boolean, T];
|
|
786
|
+
/** The input label */
|
|
787
|
+
label: string;
|
|
788
|
+
/** The input value */
|
|
789
|
+
input: T;
|
|
790
|
+
/** The number of decimal places to display (optional) */
|
|
791
|
+
decimalPlaces?: number;
|
|
792
|
+
/** Input attributes (optional) */
|
|
793
|
+
inputAttribs?: object;
|
|
794
|
+
/** Label on submit button (optional) */
|
|
795
|
+
submitLabel?: string;
|
|
796
|
+
/** If input is disabled (optional) */
|
|
797
|
+
disabled?: boolean;
|
|
798
|
+
/** If enter key is enabled (optional) */
|
|
799
|
+
enableEnterKey?: boolean;
|
|
800
|
+
/** If reset button is enabled (optional) */
|
|
801
|
+
resetButton?: boolean;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/** export class to select a line */
|
|
805
|
+
export declare class LinearSelection extends OrientableSelection {
|
|
806
|
+
readonly defaultColour = "#44aa99";
|
|
807
|
+
length: number;
|
|
808
|
+
constructor(start?: [number, number], length?: number, angle?: number);
|
|
809
|
+
_getPoint(fraction?: number): Vector3;
|
|
810
|
+
getPoints(): Vector3[];
|
|
811
|
+
toString(): string;
|
|
812
|
+
static clicks(): number[];
|
|
813
|
+
static isShape(s: LinearSelection | SelectionBase): s is LinearSelection;
|
|
814
|
+
_setFromPoints(points: Vector3[]): void;
|
|
815
|
+
static createFromPoints(points: Vector3[]): LinearSelection;
|
|
816
|
+
static createFromSelection(s: LinearSelection): LinearSelection;
|
|
817
|
+
onHandleChange(i: number, pos: [number | undefined, number | undefined]): LinearSelection;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
*
|
|
822
|
+
* Renders the configuration options for a linear selection.
|
|
823
|
+
* @param {LinearSelectionConfigProps} props - The component props.
|
|
824
|
+
* @returns {JSX.Element} The rendered component.
|
|
825
|
+
*/
|
|
826
|
+
export declare function LinearSelectionConfig(props: LinearSelectionConfigProps): JSX_2.Element;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* The props for the `LinearSelectionConfig` component.
|
|
830
|
+
* @interface {object} LinearSelectionConfigProps
|
|
831
|
+
* @member {LinearSelection} selection - The linear selection to configure.
|
|
832
|
+
* @member {(s: SelectionBase | null, b?: boolean, c?: boolean) => void} updateSelection - Handle updating selection.
|
|
833
|
+
* @member {boolean} [disabled] - If input is diabled.
|
|
834
|
+
*/
|
|
835
|
+
export declare interface LinearSelectionConfigProps {
|
|
836
|
+
/** The linear selection to configure */
|
|
837
|
+
selection: LinearSelection;
|
|
838
|
+
/** Handle updating selection */
|
|
839
|
+
updateSelection: (s: SelectionBase | null, b?: boolean, c?: boolean) => void;
|
|
840
|
+
/** If input is disabled (optional) */
|
|
841
|
+
disabled?: boolean;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Represents line data.
|
|
846
|
+
* @interface {object} LineData
|
|
847
|
+
* @member {string} key - The key.
|
|
848
|
+
* @member {string} [colour] - The line colour.
|
|
849
|
+
* @member {MP_NDArray} x - The x data.
|
|
850
|
+
* @member {MP_NDArray} y - The y data.
|
|
851
|
+
* @member {boolean} line_on - If line is visible.
|
|
852
|
+
* @member {number} [point_size] - The data point size.
|
|
853
|
+
*/
|
|
854
|
+
export declare interface LineData {
|
|
855
|
+
/** The key */
|
|
856
|
+
key: string;
|
|
857
|
+
/** The line colour (optional) */
|
|
858
|
+
colour?: string;
|
|
859
|
+
/** The x data */
|
|
860
|
+
x: MP_NDArray;
|
|
861
|
+
/** The y data */
|
|
862
|
+
y: MP_NDArray;
|
|
863
|
+
/** If line is visible */
|
|
864
|
+
line_on: boolean;
|
|
865
|
+
/** The data point size (optional) */
|
|
866
|
+
point_size?: number;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
*
|
|
871
|
+
* Renders a line plot.
|
|
872
|
+
* @param {LinePlotProps} props - The component props.
|
|
873
|
+
* @returns {JSX.Element} The rendered component.
|
|
874
|
+
*/
|
|
875
|
+
export declare function LinePlot(props: LinePlotProps): JSX_2.Element;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* The props for the `LinePlot` component.
|
|
879
|
+
* @interface {object} LinePlotProps
|
|
880
|
+
* @extends {LinePlotProps}
|
|
881
|
+
* @member {DLineData[]} data - The line data.
|
|
882
|
+
* @member {Domain} xDomain - The x data domain.
|
|
883
|
+
* @member {Domain} yDomain - The y data domain.
|
|
884
|
+
* @member {DAxesParameters} axesParameters - The axes parameters.
|
|
885
|
+
*/
|
|
886
|
+
export declare interface LinePlotProps extends PlotSelectionProps {
|
|
887
|
+
/** The line data */
|
|
888
|
+
data: DLineData[];
|
|
889
|
+
/** The x data domain */
|
|
890
|
+
xDomain: Domain;
|
|
891
|
+
/** The y data domain */
|
|
892
|
+
yDomain: Domain;
|
|
893
|
+
/** The axes parameters */
|
|
894
|
+
axesParameters: DAxesParameters;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export declare function makeShapes(size: Size, selections: SelectionBase[], showHandles: boolean, update?: (s: SelectionBase) => void): JSX_2.Element[] | undefined;
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
*
|
|
901
|
+
* Renders a modal component.
|
|
902
|
+
* @param {ModalProps} props - The component props.
|
|
903
|
+
* @returns {JSX.Element} The rendered component.
|
|
904
|
+
*/
|
|
905
|
+
export declare function Modal(props: ModalProps): (JSX_2.Element | null)[];
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* The props for the `Modal` component.
|
|
909
|
+
* @interface {object} ModalProps
|
|
910
|
+
* @member {string} title - The title of the modal.
|
|
911
|
+
* @member {IIcontype} [icon] - The icon to display.
|
|
912
|
+
* @member {ReactNode} [button] - The button to display.
|
|
913
|
+
* @member {ReactNode} [children] - Any child components.
|
|
914
|
+
*/
|
|
915
|
+
export declare interface ModalProps {
|
|
916
|
+
/** The title of the modal */
|
|
917
|
+
title: string;
|
|
918
|
+
/** The icon to display (optional) */
|
|
919
|
+
icon?: IIconType;
|
|
920
|
+
/** The button to display (optional) */
|
|
921
|
+
button?: ReactNode;
|
|
922
|
+
/** Any child components (optional) */
|
|
923
|
+
children?: ReactNode;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
*
|
|
928
|
+
* Renders a modeless.
|
|
929
|
+
* @param {ModelessProps} props - The component props.
|
|
930
|
+
* @returns {JSX.Element} The rendered component.
|
|
931
|
+
*/
|
|
932
|
+
export declare function Modeless(props: ModelessProps): (JSX_2.Element | null)[];
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
*
|
|
936
|
+
* The props for the `Modeless` component.
|
|
937
|
+
* @interface {object} ModalProps
|
|
938
|
+
* @member {string} title - The title of the modeless.
|
|
939
|
+
* @member {ReactNode} [button] - The button to display.
|
|
940
|
+
* @member {boolean} showModeless - If the modeless is shown.
|
|
941
|
+
* @member {(s: boolean) => void} [setShowModeless] - Handles showModeless toggle.
|
|
942
|
+
* @member {ReactNode} [children] - Any child components.
|
|
943
|
+
*/
|
|
944
|
+
export declare interface ModelessProps {
|
|
945
|
+
/** The title of the modeless */
|
|
946
|
+
title: string;
|
|
947
|
+
/** The button to display (optional) */
|
|
948
|
+
button?: ReactNode;
|
|
949
|
+
/** If the modeless is shown */
|
|
950
|
+
showModeless: boolean;
|
|
951
|
+
/** Handles showModeless toggle */
|
|
952
|
+
setShowModeless: (s: boolean) => void;
|
|
953
|
+
/** Any child components (optional) */
|
|
954
|
+
children?: ReactNode;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* An MP_NDArray.
|
|
959
|
+
* @interface {object} MP_NDArray
|
|
960
|
+
* @member {boolean} nd - If it is an n-dimensional array.
|
|
961
|
+
* @member {string} [dtype] - The data type.
|
|
962
|
+
* @member {number[]} [shape] - The shape of the data.
|
|
963
|
+
* @member {ArrayBuffer} [data] - The data.
|
|
964
|
+
*/
|
|
965
|
+
export declare interface MP_NDArray {
|
|
966
|
+
/** If it is an n-dimensional array */
|
|
967
|
+
nd: boolean;
|
|
968
|
+
/** The data type */
|
|
969
|
+
dtype: string;
|
|
970
|
+
/** The shape of the data */
|
|
971
|
+
shape: number[];
|
|
972
|
+
/** The data */
|
|
973
|
+
data: ArrayBuffer;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export declare type MsgType = 'status' | 'new_multiline_data' | 'append_line_data' | 'new_image_data' | 'new_scatter_data' | 'new_surface_data' | 'new_table_data' | 'new_selection_data' | 'append_selection_data' | 'baton_request' | 'baton_approval' | 'clear_selection_data' | 'clear_data' | 'client_new_selection' | 'client_update_selection';
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
*
|
|
980
|
+
* Renders a tool with which to create a multiclick selection.
|
|
981
|
+
* @param {Props} props - The component props.
|
|
982
|
+
*/
|
|
983
|
+
export declare function MulticlickSelectionTool(props: MulticlickSelectionToolProps): JSX_2.Element | null;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* The props for the `MultiClickSelectionTool` component.
|
|
987
|
+
* @interface {object} Props
|
|
988
|
+
* @extends CommonInteractionProps
|
|
989
|
+
* @member {string} [id] - The ID.
|
|
990
|
+
* @member {number} [minPoints] - The minimum number of points. Default = 2, must be >= 1.
|
|
991
|
+
* @member {number} [maxPoints] - The maximum number of points. Defaults to minPoints, must be >= minPoints or -1 = unlimited.
|
|
992
|
+
* @member {number} [maxMovement] - The maximum movement between pointer up/down to ignore, default = 1.
|
|
993
|
+
* @member {(rawSelection: Selection, camera: Camera, context: VisCanvasContextValue) => Selection} [transform] - The transform.
|
|
994
|
+
* @member {(selection: Selection) => boolean} [validate] - Validates selection.
|
|
995
|
+
* @member {() => void} [onSelectionStart] - Handles start of selection.
|
|
996
|
+
* @member {(selection: Selection | undefined, rawSelection: Selection, isValid: boolean) => void} [onSelectionChange] - Handles selection changing.
|
|
997
|
+
* @member {{(selection: Selection | undefined, isValid: boolean) => void}} [onSelectionEnd] - Handles end of selection.
|
|
998
|
+
* @member {(selection: Selection) => void} [onValidSelection] - Handles valid selections.
|
|
999
|
+
* @member {(selection: Selection, rawSelection: Selection, isValid: boolean, isComplete: boolean) => ReactNode} [children] - Any child components.
|
|
1000
|
+
*/
|
|
1001
|
+
export declare interface MulticlickSelectionToolProps extends CommonInteractionProps {
|
|
1002
|
+
/** The ID (optional) */
|
|
1003
|
+
id?: string;
|
|
1004
|
+
/** The minimum number of points. Default = 2, must be >= 1 (optional) */
|
|
1005
|
+
minPoints?: number;
|
|
1006
|
+
/** The maximum number of points. Defaults to minPoints, must be >= minPoints or -1 = unlimited (optional) */
|
|
1007
|
+
maxPoints?: number;
|
|
1008
|
+
/** The maximum movement between pointer up/down to ignore, default = 1 (optional) */
|
|
1009
|
+
maxMovement?: number;
|
|
1010
|
+
/** The transform (optional) */
|
|
1011
|
+
transform?: (rawSelection: Selection_2, camera: Camera, context: VisCanvasContextValue) => Selection_2;
|
|
1012
|
+
/** Validates selection (optional) */
|
|
1013
|
+
validate?: (selection: Selection_2) => boolean;
|
|
1014
|
+
/** Handles selection starting (optional) */
|
|
1015
|
+
onSelectionStart?: () => void;
|
|
1016
|
+
/** Handles selection changing (optional) */
|
|
1017
|
+
onSelectionChange?: (selection: Selection_2 | undefined, rawSelection: Selection_2, isValid: boolean) => void;
|
|
1018
|
+
/** Handles end of selection (optional) */
|
|
1019
|
+
onSelectionEnd?: (selection: Selection_2 | undefined, isValid: boolean) => void;
|
|
1020
|
+
/** handles valid selections (optional) */
|
|
1021
|
+
onValidSelection?: (selection: Selection_2) => void;
|
|
1022
|
+
/** Any child components */
|
|
1023
|
+
children: (selection: Selection_2, rawSelection: Selection_2, isValid: boolean, isComplete: boolean) => ReactNode;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* A multiline data message.
|
|
1028
|
+
* @interface {object} MultiLineDataMessage
|
|
1029
|
+
* @extends {DataMessage}
|
|
1030
|
+
* @member {LineData[]} ml_data - The multiline data.
|
|
1031
|
+
*/
|
|
1032
|
+
export declare interface MultiLineDataMessage extends DataMessage {
|
|
1033
|
+
/** The multiline data */
|
|
1034
|
+
ml_data: LineData[];
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/** export class for all orientable selections */
|
|
1038
|
+
export declare class OrientableSelection extends BaseSelection {
|
|
1039
|
+
angle: number;
|
|
1040
|
+
transform: Matrix3;
|
|
1041
|
+
invTransform: Matrix3;
|
|
1042
|
+
constructor(start: [number, number], angle?: number);
|
|
1043
|
+
setAngle(angle: number): void;
|
|
1044
|
+
static isShape(s: OrientableSelection | SelectionBase): s is OrientableSelection;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* A plot message.
|
|
1049
|
+
* @interface {object} PlotMessage
|
|
1050
|
+
* @member {string} plot_id - The plot ID.
|
|
1051
|
+
* @member {MsgType} type - The message type.
|
|
1052
|
+
* @member {unknown} params - The message parameters.
|
|
1053
|
+
* @member {unknown} plot_config - The plot configuration.
|
|
1054
|
+
*/
|
|
1055
|
+
export declare interface PlotMessage {
|
|
1056
|
+
/** The plot ID */
|
|
1057
|
+
plot_id: string;
|
|
1058
|
+
/** The message type */
|
|
1059
|
+
type: MsgType;
|
|
1060
|
+
/** The message parameters */
|
|
1061
|
+
params: unknown;
|
|
1062
|
+
/** The plot configureation */
|
|
1063
|
+
plot_config: unknown;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* The props for the `PlotSelectionProps` component.
|
|
1068
|
+
* @interface {object} PlotSelectionProps
|
|
1069
|
+
* @member {(selection: SelectionBase | null, broadcast?: boolean, clear?: boolean) => void} addSelection - Handles adding selection.
|
|
1070
|
+
* @member {SelectionBase[]} selections - The selections.
|
|
1071
|
+
* @member {BatonProps} [batonProps] - The baton props.
|
|
1072
|
+
*/
|
|
1073
|
+
export declare interface PlotSelectionProps {
|
|
1074
|
+
/** Handles adding selection */
|
|
1075
|
+
addSelection?: (selection: SelectionBase | null, broadcast?: boolean, clear?: boolean) => void;
|
|
1076
|
+
/** The selections */
|
|
1077
|
+
selections: SelectionBase[];
|
|
1078
|
+
/** The baton props */
|
|
1079
|
+
batonProps?: BatonProps;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
*
|
|
1084
|
+
* Renders a plot toolbar.
|
|
1085
|
+
* @param {PlotToolbarProps} props - The component props.
|
|
1086
|
+
* @returns {JSX.Element} The rendered component.
|
|
1087
|
+
*/
|
|
1088
|
+
export declare function PlotToolbar(props: PlotToolbarProps): JSX_2.Element;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* The props for the `PlotToolbar` component.
|
|
1092
|
+
* @param {boolean} showGrid - If the grid should be shown.
|
|
1093
|
+
* @param {() => void} toggleShowGrid - Toggles the grid.
|
|
1094
|
+
* @param {string} title - The title.
|
|
1095
|
+
* @param {(t:string) => void} setTitle - A function that sets the title.
|
|
1096
|
+
* @param {InteractionModeType} [mode] - The mode.
|
|
1097
|
+
* @param {(m:InteractionModeType) => void} [setMode] - An optional function that sets the mode.
|
|
1098
|
+
* @param {Domain} [xDomain] - A domain value for the x-axis.
|
|
1099
|
+
* @param {CustomDomain} [xCustomDomain] - A custom domain value for the x-axis.
|
|
1100
|
+
* @param {(d: CustomDomain) => void} [setXCustomDomain] - A function that sets the custom domain value for the x-axis.
|
|
1101
|
+
* @param {string} xLabel - The label for the x-axis.
|
|
1102
|
+
* @param {(l: string) => void} setXLabel - A function that sets the label for the x-axis.
|
|
1103
|
+
* @param {AxisScaleType} [xScaleType] - An axis scale type for the x-axis.
|
|
1104
|
+
* @param {(s: AxisScaleType) => void} [setXScaleType] - An optional function that sets the axis scale type for the x-axis.
|
|
1105
|
+
* @param {Domain} [yDomain] - A domain value for the y-axis.
|
|
1106
|
+
* @param {CustomDomain} [yCustomDomain] - A custom domain value for the y-axis.
|
|
1107
|
+
* @param {(d: CustomDomain) => void} [setYCustomDomain] - A function that sets the custom domain value for the y-axis.
|
|
1108
|
+
* @param {string} yLabel - The label for the y-axis.
|
|
1109
|
+
* @param {(l: string) => void} setYLabel - Function that sets the label for the y-axis.
|
|
1110
|
+
* @param {BatonProps} [batonProps] - The baton properties.
|
|
1111
|
+
* @param {AxisScaleType} [yScaleType] - Axis scale type for the y-axis.
|
|
1112
|
+
* @param {(s: AxisScaleType) => void} [setYScaleType] - A function that sets the axis scale type for the y-axis.
|
|
1113
|
+
* @param {Aspect} [aspect] - An aspect value.
|
|
1114
|
+
* @param {(a: Aspect) => void} [setAspect] - A function that sets the aspect value.
|
|
1115
|
+
* @param {SelectionType} [selectionType] - Selection type.
|
|
1116
|
+
* @param {(s: SelectionType) => void} [setSelectionType] - Function that sets the selection type.
|
|
1117
|
+
* @param {Domain} [dDomain] - Domain value for the d-axis.
|
|
1118
|
+
* @param {CustomDomain} [dCustomDomain] - Custom domain value for the d-axis.
|
|
1119
|
+
* @param {(d: CustomDomain) => void} [setDCustomDomain] - Sets the custom domain value for the d-axis.
|
|
1120
|
+
* @param {TypedArray} [values] - Values.
|
|
1121
|
+
* @param {ColorScaleType} [dScaleType] - The color scale type for the d-axis.
|
|
1122
|
+
* @param {(s: ColorScaleType) => void} [setDScaleType] - Sets the color scale type for the d-axis.
|
|
1123
|
+
* @param {ColorMap} [colourMap] - The color map.
|
|
1124
|
+
* @param {(c: ColorMap) => void} [setColourMap] - A function that sets the color map.
|
|
1125
|
+
* @param {boolean} invertColourMap - Whether to invert the color map.
|
|
1126
|
+
* @param {() => void} toggleInvertColourMap - A function that toggles the color map inversion.
|
|
1127
|
+
* @param {SelectionBase[]} [selections] - Selections.
|
|
1128
|
+
* @param {(s: SelectionBase | null, b?: boolean, c?: boolean ) => void} [updateSelections] - A function that updates the selections.
|
|
1129
|
+
* @param {reactNode} [children] - Any child components.
|
|
1130
|
+
*/
|
|
1131
|
+
export declare interface PlotToolbarProps {
|
|
1132
|
+
/** If the grid should be shown */
|
|
1133
|
+
showGrid: boolean;
|
|
1134
|
+
/** Toggles the grid */
|
|
1135
|
+
toggleShowGrid: () => void;
|
|
1136
|
+
/** The title */
|
|
1137
|
+
title: string;
|
|
1138
|
+
/** A function that sets the title */
|
|
1139
|
+
setTitle: (t: string) => void;
|
|
1140
|
+
/** The mode (optional) */
|
|
1141
|
+
mode?: InteractionModeType;
|
|
1142
|
+
/** An optional function that sets the mode */
|
|
1143
|
+
setMode?: (m: InteractionModeType) => void;
|
|
1144
|
+
/** A domain value for the x-axis (optional) */
|
|
1145
|
+
xDomain?: Domain;
|
|
1146
|
+
/** A custom domain value for the x-axis (optional) */
|
|
1147
|
+
xCustomDomain?: CustomDomain;
|
|
1148
|
+
/** A function that sets the custom domain value for the x-axis (optional) */
|
|
1149
|
+
setXCustomDomain?: (d: CustomDomain) => void;
|
|
1150
|
+
/** The label for the x-axis */
|
|
1151
|
+
xLabel: string;
|
|
1152
|
+
/** A function that sets the label for the x-axis */
|
|
1153
|
+
setXLabel: (l: string) => void;
|
|
1154
|
+
/** An axis scale type for the x-axis (optional) */
|
|
1155
|
+
xScaleType?: AxisScaleType;
|
|
1156
|
+
/** An optional function that sets the axis scale type for the x-axis */
|
|
1157
|
+
setXScaleType?: (s: AxisScaleType) => void;
|
|
1158
|
+
/** A domain value for the y-axis (optional) */
|
|
1159
|
+
yDomain?: Domain;
|
|
1160
|
+
/** A custom domain value for the y-axis (optional) */
|
|
1161
|
+
yCustomDomain?: CustomDomain;
|
|
1162
|
+
/** A function that sets the custom domain value for the y-axis (optional) */
|
|
1163
|
+
setYCustomDomain?: (d: CustomDomain) => void;
|
|
1164
|
+
/** The label for the y-axis */
|
|
1165
|
+
yLabel: string;
|
|
1166
|
+
/** A function that sets the label for the y-axis */
|
|
1167
|
+
setYLabel: (l: string) => void;
|
|
1168
|
+
/** The baton properties */
|
|
1169
|
+
batonProps?: BatonProps;
|
|
1170
|
+
/** An axis scale type for the y-axis (optional) */
|
|
1171
|
+
yScaleType?: AxisScaleType;
|
|
1172
|
+
/** A function that sets the axis scale type for the y-axis (optional) */
|
|
1173
|
+
setYScaleType?: (s: AxisScaleType) => void;
|
|
1174
|
+
/** An aspect value (optional) */
|
|
1175
|
+
aspect?: Aspect;
|
|
1176
|
+
/** A function that sets the aspect value (optional) */
|
|
1177
|
+
setAspect?: (a: Aspect) => void;
|
|
1178
|
+
/** A selection type (optional) */
|
|
1179
|
+
selectionType?: SelectionType;
|
|
1180
|
+
/** A function that sets the selection type (optional) */
|
|
1181
|
+
setSelectionType?: (s: SelectionType) => void;
|
|
1182
|
+
/** A domain value for the d-axis (optional) */
|
|
1183
|
+
dDomain?: Domain;
|
|
1184
|
+
/** A custom domain value for the d-axis (optional) */
|
|
1185
|
+
dCustomDomain?: CustomDomain;
|
|
1186
|
+
/** A function that sets the custom domain value for the d-axis (optional) */
|
|
1187
|
+
setDCustomDomain?: (d: CustomDomain) => void;
|
|
1188
|
+
/** Values (optional) */
|
|
1189
|
+
values?: TypedArray;
|
|
1190
|
+
/** A color scale type for the d-axis (optional) */
|
|
1191
|
+
dScaleType?: ColorScaleType;
|
|
1192
|
+
/** A function that sets the color scale type for the d-axis (optional) */
|
|
1193
|
+
setDScaleType?: (s: ColorScaleType) => void;
|
|
1194
|
+
/** A color map (optional) */
|
|
1195
|
+
colourMap?: ColorMap;
|
|
1196
|
+
/** A function that sets the color map (optional) */
|
|
1197
|
+
setColourMap?: (c: ColorMap) => void;
|
|
1198
|
+
/** Whether to invert the color map */
|
|
1199
|
+
invertColourMap?: boolean;
|
|
1200
|
+
/** A function that toggles the color map inversion */
|
|
1201
|
+
toggleInvertColourMap?: () => void;
|
|
1202
|
+
/** Selections (optional) */
|
|
1203
|
+
selections?: SelectionBase[];
|
|
1204
|
+
/** A function that updates the selections (optional) */
|
|
1205
|
+
updateSelections?: (s: SelectionBase | null, b?: boolean, c?: boolean) => void;
|
|
1206
|
+
/** Any child components (optional) */
|
|
1207
|
+
children?: ReactNode;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
*
|
|
1212
|
+
* The props for the `PointInput` component.
|
|
1213
|
+
* @interface PointInputProps
|
|
1214
|
+
* @member {number} i - The point number.
|
|
1215
|
+
* @member {[number, number]} point - The coordinates of the point.
|
|
1216
|
+
* @member {(p: [number, number]) => void} updatePoint - Function to handle updating of point.
|
|
1217
|
+
* @member {boolean} [disabled] - If input component is disabled.
|
|
1218
|
+
*/
|
|
1219
|
+
declare interface PointInputProps {
|
|
1220
|
+
/** The point number */
|
|
1221
|
+
i: number;
|
|
1222
|
+
/** The coordinates of the point */
|
|
1223
|
+
point: [number, number];
|
|
1224
|
+
/** Function to handle updating of point */
|
|
1225
|
+
updatePoint: (p: [number, number]) => void;
|
|
1226
|
+
/** If input component is disabled (optional) */
|
|
1227
|
+
disabled?: boolean;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
export declare type Points = Vector3[];
|
|
1231
|
+
|
|
1232
|
+
export declare function pointsToSelection(selections: SelectionBase[], selectionType: SelectionType, points: Vector3[], alpha: number, colour?: string): BaseSelection;
|
|
1233
|
+
|
|
1234
|
+
export declare function pointsToShape(selectionType: SelectionType, points: Vector3[], axesFlipped: [boolean, boolean], alpha: number, size: Size, colour?: string): JSX_2.Element | null;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
*
|
|
1238
|
+
* Renders a labelled input for point x.
|
|
1239
|
+
* @param {PointInputProps} props - The component props.
|
|
1240
|
+
* @returns {JSX.Element} The rendered component.
|
|
1241
|
+
*/
|
|
1242
|
+
export declare function PointXInput(props: PointInputProps): JSX_2.Element;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
*
|
|
1246
|
+
* Renders a labelled input for point y.
|
|
1247
|
+
* @param {PointInputProps} props - The component props.
|
|
1248
|
+
* @returns {JSX.Element} The rendered component.
|
|
1249
|
+
*/
|
|
1250
|
+
export declare function PointYInput(props: PointInputProps): JSX_2.Element;
|
|
1251
|
+
|
|
1252
|
+
export declare function polar(xy: Vector3): [number, number];
|
|
1253
|
+
|
|
1254
|
+
/** export class to select a polygon */
|
|
1255
|
+
export declare class PolygonalSelection extends BaseSelection {
|
|
1256
|
+
readonly defaultOpenColour = "#88ccee";
|
|
1257
|
+
readonly defaultClosedColour = "#ffa07a";
|
|
1258
|
+
readonly defaultColour = "#88ccee";
|
|
1259
|
+
points: [number, number][];
|
|
1260
|
+
closed: boolean;
|
|
1261
|
+
constructor(points: [number, number][], closed?: boolean);
|
|
1262
|
+
getPoints(): Vector3[];
|
|
1263
|
+
getPoint(i: number): Vector3 | null;
|
|
1264
|
+
static clicks(): number[];
|
|
1265
|
+
static isShape(s: PolygonalSelection | SelectionBase): s is PolygonalSelection;
|
|
1266
|
+
static createFromPoints(closed: boolean, points: Vector3[]): PolygonalSelection;
|
|
1267
|
+
static createFromSelection(s: PolygonalSelection): PolygonalSelection;
|
|
1268
|
+
onHandleChange(i: number, pos: [number | undefined, number | undefined]): PolygonalSelection;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
*
|
|
1273
|
+
* Renders configuration for polygonal selection.
|
|
1274
|
+
* @param {PolygonalSelectionConfigProps} props - The component props.
|
|
1275
|
+
* @returns {JSX.Element} The rendered component.
|
|
1276
|
+
*/
|
|
1277
|
+
export declare function PolygonalSelectionConfig(props: PolygonalSelectionConfigProps): JSX_2.Element;
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* The props for the `PolygonalSelectionConfig` component.
|
|
1281
|
+
* @interface {object} PolygonalSelectionConfigProps
|
|
1282
|
+
* @member {PolygonalSelection} selection - The polygonal selection to configure.
|
|
1283
|
+
* @member {(s: SelectionBase | null, b?: boolean, c?: boolean) => void} [updateSelection] - Handles update of selection.
|
|
1284
|
+
* @member {boolean} [disabled] - If disabled.
|
|
1285
|
+
*/
|
|
1286
|
+
export declare interface PolygonalSelectionConfigProps {
|
|
1287
|
+
/** The polygonal selection to configure */
|
|
1288
|
+
selection: PolygonalSelection;
|
|
1289
|
+
/** Handles update of selection */
|
|
1290
|
+
updateSelection: (s: SelectionBase | null, b?: boolean, c?: boolean) => void;
|
|
1291
|
+
/** If disabled */
|
|
1292
|
+
disabled?: boolean;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
export declare function recreateSelection(selection: SelectionBase): AxialSelection | CircularSelection | CircularSectorialSelection | EllipticalSelection | LinearSelection | PolygonalSelection | RectangularSelection | null;
|
|
1296
|
+
|
|
1297
|
+
/** export class to select a rectangle */
|
|
1298
|
+
export declare class RectangularSelection extends OrientableSelection {
|
|
1299
|
+
readonly defaultColour = "#ddcc77";
|
|
1300
|
+
lengths: [number, number];
|
|
1301
|
+
constructor(start: [number, number], lengths: [number, number], angle?: number);
|
|
1302
|
+
getPoints(): Vector3[];
|
|
1303
|
+
getPoint(i: number): Vector3 | null;
|
|
1304
|
+
toString(): string;
|
|
1305
|
+
static clicks(): number[];
|
|
1306
|
+
static isShape(s: RectangularSelection | SelectionBase): s is RectangularSelection;
|
|
1307
|
+
static createFromPoints(axesFlipped: [boolean, boolean], points: Vector3[]): RectangularSelection;
|
|
1308
|
+
static createFromSelection(s: RectangularSelection): RectangularSelection;
|
|
1309
|
+
onHandleChange(i: number, pos: [number | undefined, number | undefined]): RectangularSelection;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
*
|
|
1314
|
+
* Renders the configuration options for a rectangular selection.
|
|
1315
|
+
* @param {RectangularSelectionConfigProps} props - The component props.
|
|
1316
|
+
* @returns {JSX.Element} The rendered component.
|
|
1317
|
+
*/
|
|
1318
|
+
export declare function RectangularSelectionConfig(props: RectangularSelectionConfigProps): JSX_2.Element;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* The props for the `RectangularSelectionConfig` component.
|
|
1322
|
+
* @interface {object} RectangularSelectionConfigProps
|
|
1323
|
+
* @member {RectangularSelection} selection - The rectangular selection to configure.
|
|
1324
|
+
* @member {(s: SelectionBase | null, b?: boolean, c?: boolean) => void} [updateSelection] - Handles update of selection.
|
|
1325
|
+
* @member {boolean} [disabled] - If disabled.
|
|
1326
|
+
*/
|
|
1327
|
+
export declare interface RectangularSelectionConfigProps {
|
|
1328
|
+
/** The rectangular selection to configure */
|
|
1329
|
+
selection: RectangularSelection;
|
|
1330
|
+
/** Handles update of selection */
|
|
1331
|
+
updateSelection: (s: SelectionBase | null, b?: boolean, c?: boolean) => void;
|
|
1332
|
+
/** If disabled */
|
|
1333
|
+
disabled?: boolean;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Represents scatter data.
|
|
1338
|
+
* @interface {object} ScatterData
|
|
1339
|
+
* @member {string} key - The key.
|
|
1340
|
+
* @member {MP_NDArray} xData - The x data.
|
|
1341
|
+
* @member {MP_NDArray} yData - The y data.
|
|
1342
|
+
* @member {MP_NDArray} dataArray - The z data.
|
|
1343
|
+
* @member {Domain} domain - The z data domain.
|
|
1344
|
+
* @member {ColorMap} [colourMap] - The colour map.
|
|
1345
|
+
*/
|
|
1346
|
+
declare interface ScatterData {
|
|
1347
|
+
/** The key */
|
|
1348
|
+
key: string;
|
|
1349
|
+
/** The x data */
|
|
1350
|
+
xData: MP_NDArray;
|
|
1351
|
+
/** The y data */
|
|
1352
|
+
yData: MP_NDArray;
|
|
1353
|
+
/** The z data */
|
|
1354
|
+
dataArray: MP_NDArray;
|
|
1355
|
+
/** The z data domain */
|
|
1356
|
+
domain: Domain;
|
|
1357
|
+
/** The colour map */
|
|
1358
|
+
colourMap?: ColorMap;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* A scatter data message.
|
|
1363
|
+
* @interface {object} ScatterDataMessage
|
|
1364
|
+
* @extends {DataMessage}
|
|
1365
|
+
* @member {ScatterData} sc_data - The scatter data.
|
|
1366
|
+
*/
|
|
1367
|
+
export declare interface ScatterDataMessage extends DataMessage {
|
|
1368
|
+
/** The scatter data */
|
|
1369
|
+
sc_data: ScatterData;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
*
|
|
1374
|
+
* Renders a scatter plot.
|
|
1375
|
+
* @param {ScatterPlotProps} props - The component props.
|
|
1376
|
+
* @returns {JSX.Element} The rendered component.
|
|
1377
|
+
*/
|
|
1378
|
+
export declare function ScatterPlot(props: ScatterPlotProps): JSX_2.Element;
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* The props for the `ScatterPlotProps` component.
|
|
1382
|
+
* @interface {object} ScatterPlotProps
|
|
1383
|
+
* @extends {PlotSelectionProps}
|
|
1384
|
+
* @member {NdArray<TypedArray>} xData - The x data values for the scatter plot.
|
|
1385
|
+
* @member {NdArray<TypedArray>} yData - The y data values for the scatter plot.
|
|
1386
|
+
* @member {NdArray<TypedArray>} dataArray - The z data values for the scatter plot.
|
|
1387
|
+
* @member {Domain} domain - The domain of the z axis.
|
|
1388
|
+
* @member {DAxesParameters} axesParameters - The axes parameters.
|
|
1389
|
+
* @member {ColorMap} [colourMap] - The colour map.
|
|
1390
|
+
*/
|
|
1391
|
+
export declare interface ScatterPlotProps extends PlotSelectionProps {
|
|
1392
|
+
/** The x data values for the scatter plot */
|
|
1393
|
+
xData: NdArray<TypedArray>;
|
|
1394
|
+
/** The y data values for the scatter plot */
|
|
1395
|
+
yData: NdArray<TypedArray>;
|
|
1396
|
+
/** The z data values for the scatter plot */
|
|
1397
|
+
dataArray: NdArray<TypedArray>;
|
|
1398
|
+
/** The domain of the z axis */
|
|
1399
|
+
domain: Domain;
|
|
1400
|
+
/** The axes parameters */
|
|
1401
|
+
axesParameters: DAxesParameters;
|
|
1402
|
+
/** The colour map (optional) */
|
|
1403
|
+
colourMap?: ColorMap;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Represents a selection.
|
|
1408
|
+
* @interface {object} Selection
|
|
1409
|
+
* @member {Points} html - The html points.
|
|
1410
|
+
* @member {Points} world - The world points.
|
|
1411
|
+
* @member {Points} data - The data points.
|
|
1412
|
+
*/
|
|
1413
|
+
declare interface Selection_2 {
|
|
1414
|
+
/** The html points */
|
|
1415
|
+
html: Points;
|
|
1416
|
+
/** The world points */
|
|
1417
|
+
world: Points;
|
|
1418
|
+
/** The data points */
|
|
1419
|
+
data: Points;
|
|
1420
|
+
}
|
|
1421
|
+
export { Selection_2 as Selection }
|
|
1422
|
+
|
|
1423
|
+
export declare const SELECTION_ICONS: {
|
|
1424
|
+
line: string;
|
|
1425
|
+
rectangle: string;
|
|
1426
|
+
polyline: string;
|
|
1427
|
+
polygon: string;
|
|
1428
|
+
circle: string;
|
|
1429
|
+
ellipse: string;
|
|
1430
|
+
sector: string;
|
|
1431
|
+
horizontalAxis: string;
|
|
1432
|
+
verticalAxis: string;
|
|
1433
|
+
unknown: string;
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
export declare interface SelectionBase {
|
|
1437
|
+
readonly id: string;
|
|
1438
|
+
name: string;
|
|
1439
|
+
colour?: string;
|
|
1440
|
+
alpha: number;
|
|
1441
|
+
fixed: boolean;
|
|
1442
|
+
start: [number, number];
|
|
1443
|
+
asDashed?: boolean;
|
|
1444
|
+
getPoints?: () => Vector3[];
|
|
1445
|
+
onHandleChange: _HandleChangeFunction;
|
|
1446
|
+
toString: () => string;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
*
|
|
1451
|
+
* Renders a selection component.
|
|
1452
|
+
* @param {SelectionComponentProps} props - The component props.
|
|
1453
|
+
* @returns {JSX.Element | null} The rendered component.
|
|
1454
|
+
*/
|
|
1455
|
+
export declare function SelectionComponent(props: SelectionComponentProps): JSX_2.Element;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* The props for the `SelectionComponent` component.
|
|
1459
|
+
* @interface {object} SelectionComponentProps
|
|
1460
|
+
* @extends {PlotSelectionProps}
|
|
1461
|
+
* @member {SelectionType} [selectionType] - The selection type.
|
|
1462
|
+
* @member {ModifierKey | ModifierKey[]} modifierKey - The modifier key(s).
|
|
1463
|
+
* @member {BatonProps} [batonProps] - The baton props.
|
|
1464
|
+
* @member {boolean} [disabled] - If disabled.
|
|
1465
|
+
*/
|
|
1466
|
+
export declare interface SelectionComponentProps extends PlotSelectionProps {
|
|
1467
|
+
/** The selection type (optional) */
|
|
1468
|
+
selectionType?: SelectionType;
|
|
1469
|
+
/** The modifier key(s) */
|
|
1470
|
+
modifierKey: ModifierKey | ModifierKey[];
|
|
1471
|
+
/** The baton props */
|
|
1472
|
+
batonProps?: BatonProps;
|
|
1473
|
+
/** If disabled (optional) */
|
|
1474
|
+
disabled?: boolean;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
*
|
|
1479
|
+
* Renders the configuration options for a selection.
|
|
1480
|
+
* @param {SelectionConfigProps} props - The component props.
|
|
1481
|
+
* @returns {JSX.Element} The rendered component.
|
|
1482
|
+
*/
|
|
1483
|
+
export declare function SelectionConfig(props: SelectionConfigProps): (JSX_2.Element | null)[];
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* The props for the `SelectionConfig` component.
|
|
1487
|
+
* @interface {object} SelectionConfigProps
|
|
1488
|
+
* @member {string} title - The modal title.
|
|
1489
|
+
* @member {BaseSelection[]} selections - The current selections.
|
|
1490
|
+
* @member {(s: SelectionBase | null, b?: boolean, c?: boolean) => void} updateSelections - Handles updating selections.
|
|
1491
|
+
* @member {string | null} currentSelectionID - The ID of the current selection.
|
|
1492
|
+
* @member {(s: string | null) => void} updateCurrentSelectionID - Handles updating current selection ID.
|
|
1493
|
+
* @member {SelectionType} showSelectionConfig - If the selection config is shown.
|
|
1494
|
+
* @member {(s: boolean) => void} updateShowSelectionConfig - Handles updating showSelectionConfig.
|
|
1495
|
+
* @member {boolean} hasBaton - If has control of the baton.
|
|
1496
|
+
* @member {IIConType} [icon] - The icon.
|
|
1497
|
+
* @member {string} [label] - The label.
|
|
1498
|
+
* @member {Domain} [domain] - The data domain.
|
|
1499
|
+
* @member {CustomDomain} [customDomain] - The custom data domain.
|
|
1500
|
+
*/
|
|
1501
|
+
export declare interface SelectionConfigProps {
|
|
1502
|
+
/** The modal title */
|
|
1503
|
+
title: string;
|
|
1504
|
+
/** The current selections */
|
|
1505
|
+
selections: BaseSelection[];
|
|
1506
|
+
/** Handles updating selections */
|
|
1507
|
+
updateSelections: (s: SelectionBase | null, b?: boolean, c?: boolean) => void;
|
|
1508
|
+
/** The ID of the current selection (optional) */
|
|
1509
|
+
currentSelectionID: string | null;
|
|
1510
|
+
/** Handles updating current selection ID */
|
|
1511
|
+
updateCurrentSelectionID: (s: string | null) => void;
|
|
1512
|
+
/** If the selection config is shown */
|
|
1513
|
+
showSelectionConfig: boolean;
|
|
1514
|
+
/** Handles updating showSelectionConfig */
|
|
1515
|
+
updateShowSelectionConfig: (s: boolean) => void;
|
|
1516
|
+
/** If has control of the baton */
|
|
1517
|
+
hasBaton: boolean;
|
|
1518
|
+
/** The icon (optional) */
|
|
1519
|
+
icon?: IIconType;
|
|
1520
|
+
/** The label (optional) */
|
|
1521
|
+
label?: string;
|
|
1522
|
+
/** The data domain (optional) */
|
|
1523
|
+
domain?: Domain;
|
|
1524
|
+
/** The custom data domain (optional) */
|
|
1525
|
+
customDomain?: CustomDomain;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
*
|
|
1530
|
+
* The props for the `SelectionDropdown` component.
|
|
1531
|
+
* @interface SelectionDropdownProps
|
|
1532
|
+
* @member {SelectionType} value - The chosen selection type.
|
|
1533
|
+
* @member {(selectionType: SelectionType) => void} onSelectionTypeChange - Function that handles change in chosen selection type.
|
|
1534
|
+
* @member {boolean} disabled - If component is disabled.
|
|
1535
|
+
* @member {SelectionType[]} [options] - The set of selection type options that are available in the dropdown.
|
|
1536
|
+
*/
|
|
1537
|
+
export declare interface SelectionDropdownProps {
|
|
1538
|
+
/** The chosen selection type */
|
|
1539
|
+
value: SelectionType;
|
|
1540
|
+
/** Function that handles change in chosen selection type */
|
|
1541
|
+
onSelectionTypeChange: (selectionType: SelectionType) => void;
|
|
1542
|
+
/** If component is disabled */
|
|
1543
|
+
disabled: boolean;
|
|
1544
|
+
/** The set of selection type options that are available in the dropdown */
|
|
1545
|
+
options?: SelectionType[];
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
*
|
|
1550
|
+
* Renders a dropdown for choosing selection.
|
|
1551
|
+
* @param {SelectionIDDropdownProps} props - The component props.
|
|
1552
|
+
* @returns {JSX.Element} The rendered component.
|
|
1553
|
+
*/
|
|
1554
|
+
export declare function SelectionIDDropdown(props: SelectionIDDropdownProps): JSX_2.Element;
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
*
|
|
1558
|
+
* The props for the `SelectionIDDropdown` component.
|
|
1559
|
+
* @interface SelectionIDDropdownProps
|
|
1560
|
+
* @member {SelectionBase[]} selections - The selections.
|
|
1561
|
+
* @member {string | null} selectionID - The ID of the highlighted selection.
|
|
1562
|
+
* @member {(s: string) => void} onSelectionIDChange - Function that handles change in chosen selection ID.
|
|
1563
|
+
* @member {string[]} [options] - The selections from which to choose.
|
|
1564
|
+
*/
|
|
1565
|
+
export declare interface SelectionIDDropdownProps {
|
|
1566
|
+
/** The selections */
|
|
1567
|
+
selections: SelectionBase[];
|
|
1568
|
+
/** The ID of the highlighted selection */
|
|
1569
|
+
selectionID: string | null;
|
|
1570
|
+
/** Function that handles change in chosen selection ID */
|
|
1571
|
+
onSelectionIDChange: (s: string) => void;
|
|
1572
|
+
/** The selections from which to choose */
|
|
1573
|
+
options?: string[];
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* A selections message.
|
|
1578
|
+
* @interface {object} SelectionsMessage
|
|
1579
|
+
* @member {SelectionBase[]} set_selections - The selections.
|
|
1580
|
+
*/
|
|
1581
|
+
export declare interface SelectionsMessage {
|
|
1582
|
+
/** The selections */
|
|
1583
|
+
set_selections: SelectionBase[];
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
export declare enum SelectionType {
|
|
1587
|
+
line = "line",
|
|
1588
|
+
rectangle = "rectangle",
|
|
1589
|
+
polyline = "polyline",
|
|
1590
|
+
polygon = "polygon",
|
|
1591
|
+
circle = "circle",
|
|
1592
|
+
ellipse = "ellipse",
|
|
1593
|
+
sector = "sector",
|
|
1594
|
+
horizontalAxis = "horizontalAxis",
|
|
1595
|
+
verticalAxis = "verticalAxis",
|
|
1596
|
+
unknown = "unknown"
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
*
|
|
1601
|
+
* Renders a dropdown for choosing selection type.
|
|
1602
|
+
* @param {SelectionDropdownProps} props - The component props.
|
|
1603
|
+
* @returns {JSX.Element} The rendered component.
|
|
1604
|
+
*/
|
|
1605
|
+
export declare function SelectionTypeDropdown(props: SelectionDropdownProps): JSX_2.Element;
|
|
1606
|
+
|
|
1607
|
+
export declare type StatusType = 'ready' | 'busy';
|
|
1608
|
+
|
|
1609
|
+
/**
|
|
1610
|
+
*
|
|
1611
|
+
* Represents surface data.
|
|
1612
|
+
* @interface SurfaceData
|
|
1613
|
+
* @member {string} key - The key.
|
|
1614
|
+
* @member {MP_NDArray} values - The surface data values.
|
|
1615
|
+
* @member {Domain} domain - The surface data domain.
|
|
1616
|
+
* @member {string} surface_scale - The surface data scale.
|
|
1617
|
+
* @member {ColorMap} colourMap - The surface colour map.
|
|
1618
|
+
*/
|
|
1619
|
+
export declare interface SurfaceData {
|
|
1620
|
+
/** The key */
|
|
1621
|
+
key: string;
|
|
1622
|
+
/** The surface data values */
|
|
1623
|
+
values: MP_NDArray;
|
|
1624
|
+
/** The surface data domain */
|
|
1625
|
+
domain: Domain;
|
|
1626
|
+
/** The surface data scale */
|
|
1627
|
+
surface_scale: string;
|
|
1628
|
+
/** The surface colour map */
|
|
1629
|
+
colourMap: ColorMap;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* A surface data message.
|
|
1634
|
+
* @interface {object} SurfaceDataMessage
|
|
1635
|
+
* @extends {DataMessage}
|
|
1636
|
+
* @member {SurfaceData} su_data - The surface data.
|
|
1637
|
+
*/
|
|
1638
|
+
export declare interface SurfaceDataMessage extends DataMessage {
|
|
1639
|
+
/** The surface data */
|
|
1640
|
+
su_data: SurfaceData;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/**
|
|
1644
|
+
*
|
|
1645
|
+
* Renders a surface plot.
|
|
1646
|
+
* @param {SurfacePlotProps} props - The component props.
|
|
1647
|
+
* @returns {JSX.Element} The rendered component.
|
|
1648
|
+
*/
|
|
1649
|
+
export declare function SurfacePlot(props: SurfacePlotProps): JSX_2.Element;
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* The props for the `SurfacePlot` component.
|
|
1653
|
+
* @interface {object} SurfacePlotProps
|
|
1654
|
+
* @extends {PlotSelectionProps}
|
|
1655
|
+
* @member {NdArray<TypedArray>} values - The data values for the surface plot.
|
|
1656
|
+
* @member {Domain} domain - The domain of the surface data.
|
|
1657
|
+
* @member {DAxesParameters} axesParameters - The axes parameters.
|
|
1658
|
+
* @member {ColorScaleType} surfaceScale - The colour scale type.
|
|
1659
|
+
* @member {ColorMap} [colourMap] - The colour map.
|
|
1660
|
+
*/
|
|
1661
|
+
export declare interface SurfacePlotProps extends PlotSelectionProps {
|
|
1662
|
+
/** The data values for the surface plot */
|
|
1663
|
+
values: NdArray<TypedArray>;
|
|
1664
|
+
/** The domain of the surface data */
|
|
1665
|
+
domain: Domain;
|
|
1666
|
+
/** The axes parameters */
|
|
1667
|
+
axesParameters: DAxesParameters;
|
|
1668
|
+
/** The colour scale type */
|
|
1669
|
+
surfaceScale: ColorScaleType;
|
|
1670
|
+
/** The colour map (optional) */
|
|
1671
|
+
colourMap?: ColorMap;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
*
|
|
1676
|
+
* Represents table data.
|
|
1677
|
+
* @interface TableData
|
|
1678
|
+
* @member {string} key - The key.
|
|
1679
|
+
* @member {MP_NDArray} values - The table data values.
|
|
1680
|
+
* @member {number} cellWidth - The individual cell width.
|
|
1681
|
+
* @member {TableDisplayParams} [displayParams] - The table display parameters.
|
|
1682
|
+
*/
|
|
1683
|
+
declare interface TableData {
|
|
1684
|
+
/** The key */
|
|
1685
|
+
key: string;
|
|
1686
|
+
/** The table data values */
|
|
1687
|
+
dataArray: MP_NDArray;
|
|
1688
|
+
/** The individual cell width */
|
|
1689
|
+
cellWidth: number;
|
|
1690
|
+
/** The table display parameters (optional) */
|
|
1691
|
+
displayParams?: TableDisplayParams;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* A table data message.
|
|
1696
|
+
* @interface {object} TableDataMessage
|
|
1697
|
+
* @extends {DataMessage}
|
|
1698
|
+
* @member {TableData} ta_data - The table data.
|
|
1699
|
+
*/
|
|
1700
|
+
export declare interface TableDataMessage extends DataMessage {
|
|
1701
|
+
/** The table data */
|
|
1702
|
+
ta_data: TableData;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
*
|
|
1707
|
+
* Renders a table display.
|
|
1708
|
+
* @param {TableDisplayProps} props - The component props.
|
|
1709
|
+
* @returns {JSX.Element} The rendered component.
|
|
1710
|
+
*/
|
|
1711
|
+
export declare function TableDisplay(props: TableDisplayProps): JSX_2.Element;
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* The parameters for a `TableDisplay`.
|
|
1715
|
+
* @interface {object} TableDisplayParams
|
|
1716
|
+
* @member {TableDisplayType} [displayType] - The table display type.
|
|
1717
|
+
* @member {number} [numberDigits] - The number of digits to display for each data value.
|
|
1718
|
+
*/
|
|
1719
|
+
export declare interface TableDisplayParams {
|
|
1720
|
+
/** The table display type (optional) */
|
|
1721
|
+
displayType?: TableDisplayType;
|
|
1722
|
+
/** The number of digits to display for each data value (optional) */
|
|
1723
|
+
numberDigits?: number;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* The props for the `TableDisplay` component.
|
|
1728
|
+
* @interface {object} TableDisplayProps
|
|
1729
|
+
* @extends {PlotSelectionProps}
|
|
1730
|
+
* @member {number} cellWidth - The cell width.
|
|
1731
|
+
* @member {NdArray<TypedArray>} dataArray - The data for the table display.
|
|
1732
|
+
* @member {TableDisplayParams} [displayParams] - The parameters for the table display.
|
|
1733
|
+
*/
|
|
1734
|
+
export declare interface TableDisplayProps extends PlotSelectionProps {
|
|
1735
|
+
/** The cell width */
|
|
1736
|
+
cellWidth: number;
|
|
1737
|
+
/** The data for the table display */
|
|
1738
|
+
dataArray: NdArray<TypedArray>;
|
|
1739
|
+
/** The parameters for the table display (optional) */
|
|
1740
|
+
displayParams?: TableDisplayParams;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
export declare type TableDisplayType = 'scientific' | 'standard';
|
|
1744
|
+
|
|
1745
|
+
/**
|
|
1746
|
+
* An update selections message.
|
|
1747
|
+
* @interface {object} UpdateSelectionsMessage
|
|
1748
|
+
* @member {SelectionBase[]} update_selections - The selections to update.
|
|
1749
|
+
*/
|
|
1750
|
+
export declare interface UpdateSelectionsMessage {
|
|
1751
|
+
/** The selections to update */
|
|
1752
|
+
update_selections: SelectionBase[];
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
export declare function validateHtml(html: Points, selectionType: SelectionType): boolean;
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
*
|
|
1759
|
+
* Renders a labelled inout for x.
|
|
1760
|
+
* @param {XInputProps} props - The component props.
|
|
1761
|
+
* @returns {JSX.Element} The rendered component.
|
|
1762
|
+
*/
|
|
1763
|
+
export declare function XInput(props: XInputProps): JSX_2.Element;
|
|
1764
|
+
|
|
1765
|
+
declare interface XInputProps {
|
|
1766
|
+
selection: BaseSelection;
|
|
1767
|
+
updateSelection: (s: BaseSelection) => void;
|
|
1768
|
+
disabled?: boolean;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
*
|
|
1773
|
+
* Renders a labelled input for y.
|
|
1774
|
+
* @param {YInputProps} props - The component props.
|
|
1775
|
+
* @returns {JSX.Element} The rendered component.
|
|
1776
|
+
*/
|
|
1777
|
+
export declare function YInput(props: YInputProps): JSX_2.Element;
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
*
|
|
1781
|
+
* The props for the `YInput` component.
|
|
1782
|
+
* @interface YInputProps
|
|
1783
|
+
* @member {BaseSelection} selection - The selection for which the y values are being configured.
|
|
1784
|
+
* @member {(s: BaseSelection) => void} updateSelection - Function to handle updating y of selection.
|
|
1785
|
+
* @member {boolean} [disabled] - If input component is disabled.
|
|
1786
|
+
*/
|
|
1787
|
+
declare interface YInputProps {
|
|
1788
|
+
/** The selection for which the y values are being configured */
|
|
1789
|
+
selection: BaseSelection;
|
|
1790
|
+
/** Function to handle updating y of selection */
|
|
1791
|
+
updateSelection: (s: BaseSelection) => void;
|
|
1792
|
+
/** If input component is disabled (optional) */
|
|
1793
|
+
disabled?: boolean;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
export { }
|