@insync-stageplayer/measurements 0.4.8 → 0.4.13
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/lib/AsyncSubject.d.ts +23 -23
- package/lib/AsyncSubject.js +64 -64
- package/lib/client/MeasurementDataClient.d.ts +126 -124
- package/lib/client/MeasurementDataClient.d.ts.map +1 -1
- package/lib/client/MeasurementDataClient.js +99 -99
- package/lib/client/MeasurementDataClient.js.map +1 -1
- package/lib/client/OnlineMeasurementDataClient.d.ts +43 -42
- package/lib/client/OnlineMeasurementDataClient.d.ts.map +1 -1
- package/lib/client/OnlineMeasurementDataClient.js +181 -166
- package/lib/client/OnlineMeasurementDataClient.js.map +1 -1
- package/lib/client/debug.d.ts +1 -1
- package/lib/client/debug.js +4 -4
- package/lib/client/index.d.ts +2 -2
- package/lib/client/index.js +2 -2
- package/lib/client/offline/OfflineMeasurementDataClient.d.ts +15 -14
- package/lib/client/offline/OfflineMeasurementDataClient.d.ts.map +1 -1
- package/lib/client/offline/OfflineMeasurementDataClient.js +44 -41
- package/lib/client/offline/OfflineMeasurementDataClient.js.map +1 -1
- package/lib/client/offline/offline.d.ts +16 -16
- package/lib/client/offline/offline.js +79 -79
- package/lib/client/sbf.d.ts +34 -34
- package/lib/client/sbf.js +88 -88
- package/lib/components/Icon/CloseIcon.d.ts +7 -0
- package/lib/components/Icon/CloseIcon.d.ts.map +1 -0
- package/lib/components/Icon/CloseIcon.js +32 -0
- package/lib/components/Icon/CloseIcon.js.map +1 -0
- package/lib/components/MeasurementsChooser.d.ts +34 -34
- package/lib/components/MeasurementsChooser.js +95 -95
- package/lib/components/MeasurementsModuleProvider.d.ts +34 -34
- package/lib/components/MeasurementsModuleProvider.d.ts.map +1 -1
- package/lib/components/MeasurementsModuleProvider.js +73 -73
- package/lib/components/MeasurementsModuleProvider.js.map +1 -1
- package/lib/components/MeasurementsTable/CheckboxCell.d.ts +18 -18
- package/lib/components/MeasurementsTable/CheckboxCell.js +15 -15
- package/lib/components/MeasurementsTable/ColorCell.d.ts +29 -29
- package/lib/components/MeasurementsTable/ColorCell.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/ColorCell.js +58 -57
- package/lib/components/MeasurementsTable/ColorCell.js.map +1 -1
- package/lib/components/MeasurementsTable/ColorPicker.d.ts +3 -3
- package/lib/components/MeasurementsTable/ColorPicker.js +10 -10
- package/lib/components/MeasurementsTable/ColumnResizer.d.ts +4 -4
- package/lib/components/MeasurementsTable/ColumnResizer.js +5 -5
- package/lib/components/MeasurementsTable/ColumnSorting.d.ts +13 -13
- package/lib/components/MeasurementsTable/ColumnSorting.js +9 -9
- package/lib/components/MeasurementsTable/MeasurementsTable.d.ts +55 -55
- package/lib/components/MeasurementsTable/MeasurementsTable.js +182 -182
- package/lib/components/MeasurementsTable/MeasurementsTable.js.map +1 -1
- package/lib/components/MeasurementsTable/SelectedContext.d.ts +9 -9
- package/lib/components/MeasurementsTable/SelectedContext.js +9 -9
- package/lib/components/MeasurementsTable/TextColumnFilter.d.ts +8 -8
- package/lib/components/MeasurementsTable/TextColumnFilter.js +15 -15
- package/lib/components/MeasurementsTable/filters.d.ts +2 -2
- package/lib/components/MeasurementsTable/filters.js +9 -9
- package/lib/components/MeasurementsTable/index.d.ts +1 -1
- package/lib/components/MeasurementsTable/index.js +1 -1
- package/lib/components/ModalMeasurementChooser.d.ts +19 -19
- package/lib/components/ModalMeasurementChooser.d.ts.map +1 -1
- package/lib/components/ModalMeasurementChooser.js +33 -29
- package/lib/components/ModalMeasurementChooser.js.map +1 -1
- package/lib/hooks/useMeasurement.d.ts +17 -17
- package/lib/hooks/useMeasurement.d.ts.map +1 -1
- package/lib/hooks/useMeasurement.js +41 -41
- package/lib/hooks/useMeasurements.d.ts +9 -9
- package/lib/hooks/useMeasurements.js +16 -16
- package/lib/hooks/useMeasurementsModule.d.ts +18 -18
- package/lib/hooks/useMeasurementsModule.js +12 -12
- package/lib/hooks/useOverlayMeasurementData.d.ts +2 -0
- package/lib/hooks/useOverlayMeasurementData.d.ts.map +1 -0
- package/lib/hooks/useOverlayMeasurementData.js +42 -0
- package/lib/hooks/useOverlayMeasurementData.js.map +1 -0
- package/lib/hooks/useTimedMeasurementData.d.ts +26 -26
- package/lib/hooks/useTimedMeasurementData.js +123 -123
- package/lib/hooks/useWindowedMeasurementData.d.ts +25 -25
- package/lib/hooks/useWindowedMeasurementData.js +119 -119
- package/lib/index.d.ts +13 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -12
- package/lib/index.js.map +1 -1
- package/lib/redux/measurements.slice.d.ts +107 -107
- package/lib/redux/measurements.slice.d.ts.map +1 -1
- package/lib/redux/measurements.slice.js +71 -71
- package/lib/redux/measurements.slice.js.map +1 -1
- package/lib/redux/reducer.d.ts +8 -8
- package/lib/redux/reducer.js +2 -2
- package/lib/types.d.ts +66 -65
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +51 -46
- package/lib/types.js.map +1 -1
- package/package.json +5 -5
- package/lib/hooks/useDataScaleValue.d.ts +0 -3
- package/lib/hooks/useDataScaleValue.d.ts.map +0 -1
- package/lib/hooks/useDataScaleValue.js +0 -9
- package/lib/hooks/useDataScaleValue.js.map +0 -1
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Contains components to render a ColorCell inside the MeasurementsTable.
|
|
14
|
-
*/
|
|
15
|
-
import React, { useRef, useState, useCallback, Suspense } from "react";
|
|
16
|
-
import { Popout, IndeterminateLoadingIndicator, } from "@insync-stageplayer/ui-components";
|
|
17
|
-
import styled from "styled-components";
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Contains components to render a ColorCell inside the MeasurementsTable.
|
|
14
|
+
*/
|
|
15
|
+
import React, { useRef, useState, useCallback, Suspense } from "react";
|
|
16
|
+
import { Popout, IndeterminateLoadingIndicator, } from "@insync-stageplayer/ui-components";
|
|
17
|
+
import styled from "styled-components";
|
|
18
|
+
import useClickAway from "react-use/lib/useClickAway";
|
|
19
|
+
import useDebounce from "react-use/lib/useDebounce";
|
|
20
|
+
/**
|
|
21
|
+
* A lazily loaded component. The ColorPicker uses an external library which is quite big.
|
|
22
|
+
* So we want to use React.lazy so that we can split up the code in webpack.
|
|
23
|
+
*/
|
|
24
|
+
const LoadingColorPicker = React.lazy(() => import("./ColorPicker"));
|
|
25
|
+
/**
|
|
26
|
+
* Will display a loading indicator while we're lazily loading ColorPicker.
|
|
27
|
+
* @param props
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
const LoadableColorPicker = (props) => {
|
|
31
|
+
return (React.createElement(Suspense, { fallback: React.createElement(IndeterminateLoadingIndicator, null, "Loading...") },
|
|
32
|
+
React.createElement(LoadingColorPicker, Object.assign({}, props))));
|
|
33
|
+
};
|
|
33
34
|
const StyledDiv = styled.div `
|
|
34
35
|
height: 1em;
|
|
35
36
|
width: 1em;
|
|
36
37
|
border-radius: 0.2em;
|
|
37
38
|
cursor: pointer;
|
|
38
39
|
background-color: ${(props) => props.color ? props.color : props.theme.colors.action.active};
|
|
39
|
-
`;
|
|
40
|
-
/**
|
|
41
|
-
* Displays a color input inside MeasurementsTable. Will display a color picker when clicked.
|
|
42
|
-
* @param props
|
|
43
|
-
* @returns
|
|
44
|
-
*/
|
|
45
|
-
export const ColorCell = (props) => {
|
|
46
|
-
const { color, onChange, onChangeColorPickerVisibility, showColorPicker } = props, rest = __rest(props, ["color", "onChange", "onChangeColorPickerVisibility", "showColorPicker"]);
|
|
47
|
-
const pickerRef = useRef(null);
|
|
48
|
-
const [changedColor, setChangedColor] = useState(undefined);
|
|
49
|
-
const handleColorChange = useCallback((v) => {
|
|
50
|
-
setChangedColor(v.hex);
|
|
51
|
-
}, []);
|
|
52
|
-
useClickAway(pickerRef, () => {
|
|
53
|
-
onChangeColorPickerVisibility(false);
|
|
54
|
-
});
|
|
55
|
-
// Debounce the onChange callback, otherwise might result in many unneccesary rerenders.
|
|
56
|
-
useDebounce(() => {
|
|
57
|
-
if (changedColor && onChange) {
|
|
58
|
-
onChange && onChange(changedColor);
|
|
59
|
-
}
|
|
60
|
-
}, 250, [changedColor]);
|
|
61
|
-
return (React.createElement(Popout, { content: React.createElement("div", { ref: pickerRef },
|
|
62
|
-
React.createElement(LoadableColorPicker, { onChange: handleColorChange, disableAlpha: true, color: changedColor || color })), visible: showColorPicker }, ({ ref: popoutRef }) => (React.createElement(StyledDiv, Object.assign({ ref: popoutRef, color: changedColor || color, tabIndex: 0, role: "button", "aria-pressed": "false", onFocus: () => onChangeColorPickerVisibility(true) }, rest)))));
|
|
63
|
-
};
|
|
40
|
+
`;
|
|
41
|
+
/**
|
|
42
|
+
* Displays a color input inside MeasurementsTable. Will display a color picker when clicked.
|
|
43
|
+
* @param props
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export const ColorCell = (props) => {
|
|
47
|
+
const { color, onChange, onChangeColorPickerVisibility, showColorPicker } = props, rest = __rest(props, ["color", "onChange", "onChangeColorPickerVisibility", "showColorPicker"]);
|
|
48
|
+
const pickerRef = useRef(null);
|
|
49
|
+
const [changedColor, setChangedColor] = useState(undefined);
|
|
50
|
+
const handleColorChange = useCallback((v) => {
|
|
51
|
+
setChangedColor(v.hex);
|
|
52
|
+
}, []);
|
|
53
|
+
useClickAway(pickerRef, () => {
|
|
54
|
+
onChangeColorPickerVisibility(false);
|
|
55
|
+
});
|
|
56
|
+
// Debounce the onChange callback, otherwise might result in many unneccesary rerenders.
|
|
57
|
+
useDebounce(() => {
|
|
58
|
+
if (changedColor && onChange) {
|
|
59
|
+
onChange && onChange(changedColor);
|
|
60
|
+
}
|
|
61
|
+
}, 250, [changedColor]);
|
|
62
|
+
return (React.createElement(Popout, { content: React.createElement("div", { ref: pickerRef },
|
|
63
|
+
React.createElement(LoadableColorPicker, { onChange: handleColorChange, disableAlpha: true, color: changedColor || color })), visible: showColorPicker }, ({ ref: popoutRef }) => (React.createElement(StyledDiv, Object.assign({ ref: popoutRef, color: changedColor || color, tabIndex: 0, role: "button", "aria-pressed": "false", onFocus: () => onChangeColorPickerVisibility(true) }, rest)))));
|
|
64
|
+
};
|
|
64
65
|
//# sourceMappingURL=ColorCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorCell.js","sourceRoot":"","sources":["../../../src/components/MeasurementsTable/ColorCell.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;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M,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const ColorPicker: (props: any) => JSX.Element;
|
|
3
|
-
export default ColorPicker;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ColorPicker: (props: any) => JSX.Element;
|
|
3
|
+
export default ColorPicker;
|
|
4
4
|
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A wrapper around react-color library.
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { ChromePicker } from "react-color";
|
|
6
|
-
const ColorPicker = (props) => {
|
|
7
|
-
return (React.createElement("div", { style: { zIndex: 9999 } },
|
|
8
|
-
React.createElement(ChromePicker, Object.assign({}, props))));
|
|
9
|
-
};
|
|
10
|
-
export default ColorPicker;
|
|
1
|
+
/**
|
|
2
|
+
* A wrapper around react-color library.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { ChromePicker } from "react-color";
|
|
6
|
+
const ColorPicker = (props) => {
|
|
7
|
+
return (React.createElement("div", { style: { zIndex: 9999 } },
|
|
8
|
+
React.createElement(ChromePicker, Object.assign({}, props))));
|
|
9
|
+
};
|
|
10
|
+
export default ColorPicker;
|
|
11
11
|
//# sourceMappingURL=ColorPicker.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableResizerProps } from "react-table";
|
|
2
|
-
export declare const ColumnResizer: import("styled-components").StyledComponent<"div", import("@insync-stageplayer/ui-components").Theme, TableResizerProps & {
|
|
3
|
-
resizing: boolean;
|
|
4
|
-
}, never>;
|
|
1
|
+
import { TableResizerProps } from "react-table";
|
|
2
|
+
export declare const ColumnResizer: import("styled-components").StyledComponent<"div", import("@insync-stageplayer/ui-components").Theme, TableResizerProps & {
|
|
3
|
+
resizing: boolean;
|
|
4
|
+
}, never>;
|
|
5
5
|
//# sourceMappingURL=ColumnResizer.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A styled TableResizer handle.
|
|
3
|
-
*/
|
|
4
|
-
import { styled } from "@insync-stageplayer/ui-components";
|
|
1
|
+
/**
|
|
2
|
+
* A styled TableResizer handle.
|
|
3
|
+
*/
|
|
4
|
+
import { styled } from "@insync-stageplayer/ui-components";
|
|
5
5
|
export const ColumnResizer = styled.div `
|
|
6
6
|
cursor: col-resize;
|
|
7
7
|
display: inline-block;
|
|
@@ -13,5 +13,5 @@ export const ColumnResizer = styled.div `
|
|
|
13
13
|
transform: translateX(50%);
|
|
14
14
|
z-index: 1;
|
|
15
15
|
touch-action: none;
|
|
16
|
-
`;
|
|
16
|
+
`;
|
|
17
17
|
//# sourceMappingURL=ColumnResizer.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HeaderGroup } from "react-table";
|
|
3
|
-
import { MeasurementsTypes } from "../../types";
|
|
4
|
-
declare type ColumnSortingProps = {
|
|
5
|
-
column: HeaderGroup<MeasurementsTypes.Measurement>;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Displays the current column sorting state as an arrow.
|
|
9
|
-
* @param props
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare const ColumnSorting: (props: ColumnSortingProps) => JSX.Element | null;
|
|
13
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HeaderGroup } from "react-table";
|
|
3
|
+
import { MeasurementsTypes } from "../../types";
|
|
4
|
+
declare type ColumnSortingProps = {
|
|
5
|
+
column: HeaderGroup<MeasurementsTypes.Measurement>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Displays the current column sorting state as an arrow.
|
|
9
|
+
* @param props
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const ColumnSorting: (props: ColumnSortingProps) => JSX.Element | null;
|
|
13
|
+
export {};
|
|
14
14
|
//# sourceMappingURL=ColumnSorting.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Displays the current column sorting state as an arrow.
|
|
4
|
-
* @param props
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export const ColumnSorting = (props) => {
|
|
8
|
-
return props.column.isSorted ? (React.createElement("span", null, props.column.isSortedDesc ? ` ↓` : ` ↑`)) : null;
|
|
9
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Displays the current column sorting state as an arrow.
|
|
4
|
+
* @param props
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export const ColumnSorting = (props) => {
|
|
8
|
+
return props.column.isSorted ? (React.createElement("span", null, props.column.isSortedDesc ? ` ↓` : ` ↑`)) : null;
|
|
9
|
+
};
|
|
10
10
|
//# sourceMappingURL=ColumnSorting.js.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A component that displays a list of measurements. Provides searching/sorting/selecting capabilities.
|
|
3
|
-
*
|
|
4
|
-
* Also allows a user to change the colors of measurements.
|
|
5
|
-
*/
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { MeasurementsTypes } from "../..";
|
|
8
|
-
import "bootstrap/dist/css/bootstrap.css";
|
|
9
|
-
declare type MeasurementsTableProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
10
|
-
/**
|
|
11
|
-
* If set to `true` only a single measurement can be selected (will render a radio instead of checkboxes).
|
|
12
|
-
*/
|
|
13
|
-
single?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* The measurements we want to display in the table.
|
|
16
|
-
*/
|
|
17
|
-
measurements: MeasurementsTypes.Measurement[];
|
|
18
|
-
/**
|
|
19
|
-
* The currently selected measurements (this is a controlled component).
|
|
20
|
-
*/
|
|
21
|
-
selected?: string[];
|
|
22
|
-
/**
|
|
23
|
-
* The widths of the columns in percentages.
|
|
24
|
-
*/
|
|
25
|
-
widths?: number[];
|
|
26
|
-
/**
|
|
27
|
-
* Callback when a measurement is selected.
|
|
28
|
-
* @param selected The selected measurements.
|
|
29
|
-
*/
|
|
30
|
-
onChange?: (selected: string[]) => void;
|
|
31
|
-
/**
|
|
32
|
-
* A function that can be used to format the frequency displayed in the frequency column.
|
|
33
|
-
* @param v The raw frequency number.
|
|
34
|
-
*/
|
|
35
|
-
formatFrequency?: (v: number) => string;
|
|
36
|
-
/**
|
|
37
|
-
* Callback when color of meaurement is changed.
|
|
38
|
-
*/
|
|
39
|
-
onColorChange?: (id: string, color: string) => void;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* A component to render a list of measurements in a table. This table provides functionalities like:
|
|
43
|
-
*
|
|
44
|
-
* Please read up here https://react-table.tanstack.com/ for more information as to how this component works internally.
|
|
45
|
-
*
|
|
46
|
-
* - Sorting
|
|
47
|
-
* - Resizable columns
|
|
48
|
-
* - Changing measurement colors
|
|
49
|
-
* - Searching measurements
|
|
50
|
-
* - Selecting measurements
|
|
51
|
-
* @param props
|
|
52
|
-
* @returns
|
|
53
|
-
*/
|
|
54
|
-
export declare const MeasurementsTable: (props: MeasurementsTableProps) => JSX.Element;
|
|
55
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* A component that displays a list of measurements. Provides searching/sorting/selecting capabilities.
|
|
3
|
+
*
|
|
4
|
+
* Also allows a user to change the colors of measurements.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { MeasurementsTypes } from "../..";
|
|
8
|
+
import "bootstrap/dist/css/bootstrap.css";
|
|
9
|
+
declare type MeasurementsTableProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
10
|
+
/**
|
|
11
|
+
* If set to `true` only a single measurement can be selected (will render a radio instead of checkboxes).
|
|
12
|
+
*/
|
|
13
|
+
single?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The measurements we want to display in the table.
|
|
16
|
+
*/
|
|
17
|
+
measurements: MeasurementsTypes.Measurement[];
|
|
18
|
+
/**
|
|
19
|
+
* The currently selected measurements (this is a controlled component).
|
|
20
|
+
*/
|
|
21
|
+
selected?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* The widths of the columns in percentages.
|
|
24
|
+
*/
|
|
25
|
+
widths?: number[];
|
|
26
|
+
/**
|
|
27
|
+
* Callback when a measurement is selected.
|
|
28
|
+
* @param selected The selected measurements.
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (selected: string[]) => void;
|
|
31
|
+
/**
|
|
32
|
+
* A function that can be used to format the frequency displayed in the frequency column.
|
|
33
|
+
* @param v The raw frequency number.
|
|
34
|
+
*/
|
|
35
|
+
formatFrequency?: (v: number) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Callback when color of meaurement is changed.
|
|
38
|
+
*/
|
|
39
|
+
onColorChange?: (id: string, color: string) => void;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A component to render a list of measurements in a table. This table provides functionalities like:
|
|
43
|
+
*
|
|
44
|
+
* Please read up here https://react-table.tanstack.com/ for more information as to how this component works internally.
|
|
45
|
+
*
|
|
46
|
+
* - Sorting
|
|
47
|
+
* - Resizable columns
|
|
48
|
+
* - Changing measurement colors
|
|
49
|
+
* - Searching measurements
|
|
50
|
+
* - Selecting measurements
|
|
51
|
+
* @param props
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
export declare const MeasurementsTable: (props: MeasurementsTableProps) => JSX.Element;
|
|
55
|
+
export {};
|
|
56
56
|
//# sourceMappingURL=MeasurementsTable.d.ts.map
|