@insync-stageplayer/measurements 0.5.37 → 0.6.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/lib/AsyncSubject.d.ts +23 -23
- package/lib/AsyncSubject.js +64 -64
- package/lib/client/MeasurementDataClient.d.ts +135 -130
- 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 +44 -44
- package/lib/client/OnlineMeasurementDataClient.d.ts.map +1 -1
- package/lib/client/OnlineMeasurementDataClient.js +211 -211
- 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 +3 -3
- package/lib/client/index.js +3 -3
- package/lib/client/offline/OfflineMeasurementDataClient.d.ts +16 -16
- package/lib/client/offline/OfflineMeasurementDataClient.js +47 -47
- package/lib/client/offline/offline.d.ts +16 -16
- package/lib/client/offline/offline.js +82 -82
- package/lib/client/sbf.d.ts +35 -35
- package/lib/client/sbf.js +88 -88
- package/lib/client/signalviewer/SignalViewerDataClient.d.ts +37 -37
- package/lib/client/signalviewer/SignalViewerDataClient.d.ts.map +1 -1
- package/lib/client/signalviewer/SignalViewerDataClient.js +163 -164
- package/lib/client/signalviewer/SignalViewerDataClient.js.map +1 -1
- package/lib/client/signalviewer/SignalViewerDataClient.worker.d.ts +79 -73
- package/lib/client/signalviewer/SignalViewerDataClient.worker.d.ts.map +1 -1
- package/lib/client/signalviewer/SignalViewerDataClient.worker.js +342 -211
- package/lib/client/signalviewer/SignalViewerDataClient.worker.js.map +1 -1
- package/lib/components/Icon/CloseIcon.d.ts +6 -6
- package/lib/components/Icon/CloseIcon.js +24 -24
- package/lib/components/Icon/Icon.test.d.ts +1 -1
- package/lib/components/Icon/Icon.test.js +11 -11
- package/lib/components/MeasurementsChooser.d.ts +38 -38
- package/lib/components/MeasurementsChooser.d.ts.map +1 -1
- package/lib/components/MeasurementsChooser.js +178 -181
- package/lib/components/MeasurementsChooser.js.map +1 -1
- package/lib/components/MeasurementsModuleProvider.d.ts +34 -34
- package/lib/components/MeasurementsModuleProvider.d.ts.map +1 -1
- package/lib/components/MeasurementsModuleProvider.js +100 -79
- package/lib/components/MeasurementsModuleProvider.js.map +1 -1
- package/lib/components/MeasurementsTable/CheckboxCell.d.ts +35 -35
- package/lib/components/MeasurementsTable/CheckboxCell.js +28 -28
- 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 -58
- package/lib/components/MeasurementsTable/ColorPicker.d.ts +6 -3
- package/lib/components/MeasurementsTable/ColorPicker.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/ColumnSorting.js +10 -10
- package/lib/components/MeasurementsTable/MeasurementsTable.d.ts +72 -72
- package/lib/components/MeasurementsTable/MeasurementsTable.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTable.js +229 -217
- package/lib/components/MeasurementsTable/MeasurementsTable.js.map +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTable.test.d.ts +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTable.test.js +102 -102
- package/lib/components/MeasurementsTable/MeasurementsTableNoldus.d.ts +72 -72
- package/lib/components/MeasurementsTable/MeasurementsTableNoldus.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTableNoldus.js +193 -193
- package/lib/components/MeasurementsTable/SelectedContext.d.ts +10 -10
- package/lib/components/MeasurementsTable/SelectedContext.js +10 -10
- package/lib/components/MeasurementsTable/TextColumnFilter.d.ts +8 -8
- package/lib/components/MeasurementsTable/TextColumnFilter.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/TextColumnFilter.js +15 -15
- package/lib/components/MeasurementsTable/filters.d.ts +3 -3
- package/lib/components/MeasurementsTable/filters.js +9 -9
- package/lib/components/MeasurementsTable/index.d.ts +2 -2
- package/lib/components/MeasurementsTable/index.js +2 -2
- package/lib/components/ModalMeasurementChooser.d.ts +19 -19
- package/lib/components/ModalMeasurementChooser.js +35 -35
- package/lib/conversion/UnitConversion.d.ts +13 -0
- package/lib/conversion/UnitConversion.d.ts.map +1 -0
- package/lib/conversion/UnitConversion.js +266 -0
- package/lib/conversion/UnitConversion.js.map +1 -0
- package/lib/hooks/useMarkerData.d.ts +6 -4
- package/lib/hooks/useMarkerData.d.ts.map +1 -1
- package/lib/hooks/useMarkerData.js +93 -63
- package/lib/hooks/useMarkerData.js.map +1 -1
- package/lib/hooks/useMeasurement.d.ts +41 -17
- package/lib/hooks/useMeasurement.d.ts.map +1 -1
- package/lib/hooks/useMeasurement.js +41 -41
- package/lib/hooks/useMeasurements.d.ts +11 -11
- package/lib/hooks/useMeasurements.js +22 -22
- package/lib/hooks/useMeasurementsModule.d.ts +20 -20
- package/lib/hooks/useMeasurementsModule.js +12 -12
- package/lib/hooks/useOverlayMeasurementData.d.ts +1 -1
- package/lib/hooks/useOverlayMeasurementData.js +23 -23
- package/lib/hooks/useTimedMeasurementData.d.ts +26 -26
- package/lib/hooks/useTimedMeasurementData.d.ts.map +1 -1
- package/lib/hooks/useTimedMeasurementData.js +125 -125
- package/lib/hooks/useTimedMeasurementData.js.map +1 -1
- package/lib/hooks/useWindowedMeasurementData.d.ts +25 -25
- package/lib/hooks/useWindowedMeasurementData.d.ts.map +1 -1
- package/lib/hooks/useWindowedMeasurementData.js +120 -120
- package/lib/hooks/useWindowedMeasurementData.js.map +1 -1
- package/lib/index.d.ts +15 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +15 -14
- package/lib/index.js.map +1 -1
- package/lib/redux/measurements.slice.d.ts +75 -122
- package/lib/redux/measurements.slice.d.ts.map +1 -1
- package/lib/redux/measurements.slice.js +90 -89
- package/lib/redux/measurements.slice.js.map +1 -1
- package/lib/redux/reducer.d.ts +3 -10
- package/lib/redux/reducer.d.ts.map +1 -1
- package/lib/redux/reducer.js +2 -2
- package/lib/redux/reducer.js.map +1 -1
- package/lib/types.d.ts +93 -93
- package/lib/types.js +51 -51
- package/package.json +7 -10
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { useDispatch, useSelector } from "react-redux";
|
|
2
|
-
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
3
|
-
import { updateMeasurement } from "../redux/measurements.slice";
|
|
4
|
-
/**
|
|
5
|
-
* A hook to retrieve a single measurement by id. Returns an async result.
|
|
6
|
-
*
|
|
7
|
-
* Also returns actions to mutate a measurement.
|
|
8
|
-
*
|
|
9
|
-
* @param measurementId The id of the measurement we want to retrieve.
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export const useMeasurement = (measurementId) => {
|
|
13
|
-
// Retrieve the selectors for the measurements module slice in redux.
|
|
14
|
-
const { selector, entitiesSelectors } = useMeasurementsModule();
|
|
15
|
-
const dispatch = useDispatch();
|
|
16
|
-
const { error, loading } = useSelector((s) => {
|
|
17
|
-
const state = selector(s);
|
|
18
|
-
return state;
|
|
19
|
-
});
|
|
20
|
-
const measurement = useSelector((s) => {
|
|
21
|
-
return measurementId
|
|
22
|
-
? entitiesSelectors.measurements.selectById(s, measurementId)
|
|
23
|
-
: undefined;
|
|
24
|
-
});
|
|
25
|
-
const actions = {
|
|
26
|
-
updateMeasurement: (changes) => {
|
|
27
|
-
if (!measurementId)
|
|
28
|
-
return;
|
|
29
|
-
dispatch(updateMeasurement({
|
|
30
|
-
id: measurementId,
|
|
31
|
-
changes,
|
|
32
|
-
}));
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
return {
|
|
36
|
-
measurement,
|
|
37
|
-
loading,
|
|
38
|
-
error,
|
|
39
|
-
actions,
|
|
40
|
-
};
|
|
41
|
-
};
|
|
1
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
2
|
+
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
3
|
+
import { updateMeasurement } from "../redux/measurements.slice";
|
|
4
|
+
/**
|
|
5
|
+
* A hook to retrieve a single measurement by id. Returns an async result.
|
|
6
|
+
*
|
|
7
|
+
* Also returns actions to mutate a measurement.
|
|
8
|
+
*
|
|
9
|
+
* @param measurementId The id of the measurement we want to retrieve.
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export const useMeasurement = (measurementId) => {
|
|
13
|
+
// Retrieve the selectors for the measurements module slice in redux.
|
|
14
|
+
const { selector, entitiesSelectors } = useMeasurementsModule();
|
|
15
|
+
const dispatch = useDispatch();
|
|
16
|
+
const { error, loading } = useSelector((s) => {
|
|
17
|
+
const state = selector(s);
|
|
18
|
+
return state;
|
|
19
|
+
});
|
|
20
|
+
const measurement = useSelector((s) => {
|
|
21
|
+
return measurementId
|
|
22
|
+
? entitiesSelectors.measurements.selectById(s, measurementId)
|
|
23
|
+
: undefined;
|
|
24
|
+
});
|
|
25
|
+
const actions = {
|
|
26
|
+
updateMeasurement: (changes) => {
|
|
27
|
+
if (!measurementId)
|
|
28
|
+
return;
|
|
29
|
+
dispatch(updateMeasurement({
|
|
30
|
+
id: measurementId,
|
|
31
|
+
changes,
|
|
32
|
+
}));
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
measurement,
|
|
37
|
+
loading,
|
|
38
|
+
error,
|
|
39
|
+
actions,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
42
|
//# sourceMappingURL=useMeasurement.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A hook retrieve all measurements. Returns an async result.
|
|
3
|
-
*/
|
|
4
|
-
export declare const useMeasurements: () => {
|
|
5
|
-
measurements: import("..").MeasurementsTypes.Measurement[];
|
|
6
|
-
loading: boolean;
|
|
7
|
-
error: Error | undefined;
|
|
8
|
-
didInvalidate: boolean;
|
|
9
|
-
globallyUniqueMeasurementColors: boolean;
|
|
10
|
-
dataScale: number;
|
|
11
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* A hook retrieve all measurements. Returns an async result.
|
|
3
|
+
*/
|
|
4
|
+
export declare const useMeasurements: () => {
|
|
5
|
+
measurements: import("..").MeasurementsTypes.Measurement[];
|
|
6
|
+
loading: boolean;
|
|
7
|
+
error: Error | undefined;
|
|
8
|
+
didInvalidate: boolean;
|
|
9
|
+
globallyUniqueMeasurementColors: boolean;
|
|
10
|
+
dataScale: number;
|
|
11
|
+
};
|
|
12
12
|
//# sourceMappingURL=useMeasurements.d.ts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { useSelector } from "react-redux";
|
|
2
|
-
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
3
|
-
/**
|
|
4
|
-
* A hook retrieve all measurements. Returns an async result.
|
|
5
|
-
*/
|
|
6
|
-
export const useMeasurements = () => {
|
|
7
|
-
const { selector, entitiesSelectors } = useMeasurementsModule();
|
|
8
|
-
const { error, loading, didInvalidate, globallyUniqueMeasurementColors, dataScale, } = useSelector((s) => {
|
|
9
|
-
const state = selector(s);
|
|
10
|
-
return state;
|
|
11
|
-
});
|
|
12
|
-
// if (error) console.error(error);
|
|
13
|
-
const measurements = useSelector(entitiesSelectors.measurements.selectAll);
|
|
14
|
-
return {
|
|
15
|
-
measurements,
|
|
16
|
-
loading,
|
|
17
|
-
error,
|
|
18
|
-
didInvalidate,
|
|
19
|
-
globallyUniqueMeasurementColors,
|
|
20
|
-
dataScale,
|
|
21
|
-
};
|
|
22
|
-
};
|
|
1
|
+
import { useSelector } from "react-redux";
|
|
2
|
+
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
3
|
+
/**
|
|
4
|
+
* A hook retrieve all measurements. Returns an async result.
|
|
5
|
+
*/
|
|
6
|
+
export const useMeasurements = () => {
|
|
7
|
+
const { selector, entitiesSelectors } = useMeasurementsModule();
|
|
8
|
+
const { error, loading, didInvalidate, globallyUniqueMeasurementColors, dataScale, } = useSelector((s) => {
|
|
9
|
+
const state = selector(s);
|
|
10
|
+
return state;
|
|
11
|
+
});
|
|
12
|
+
// if (error) console.error(error);
|
|
13
|
+
const measurements = useSelector(entitiesSelectors.measurements.selectAll);
|
|
14
|
+
return {
|
|
15
|
+
measurements,
|
|
16
|
+
loading,
|
|
17
|
+
error,
|
|
18
|
+
didInvalidate,
|
|
19
|
+
globallyUniqueMeasurementColors,
|
|
20
|
+
dataScale,
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
23
|
//# sourceMappingURL=useMeasurements.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Consumes the MeasurementsModuleContext and returns its value.
|
|
3
|
-
* @returns
|
|
4
|
-
**/
|
|
5
|
-
export declare const useMeasurementsModule: () => {
|
|
6
|
-
client: import("..").MeasurementDataClient;
|
|
7
|
-
selector: (state: any) => import("@reduxjs/toolkit").EntityState<import("..").MeasurementsTypes.Measurement> & {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
colors: string[];
|
|
14
|
-
globallyUniqueMeasurementColors: boolean;
|
|
15
|
-
dataScale: number;
|
|
16
|
-
};
|
|
17
|
-
entitiesSelectors: {
|
|
18
|
-
measurements: import("@reduxjs/toolkit").EntitySelectors<import("..").MeasurementsTypes.Measurement, unknown>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Consumes the MeasurementsModuleContext and returns its value.
|
|
3
|
+
* @returns
|
|
4
|
+
**/
|
|
5
|
+
export declare const useMeasurementsModule: () => {
|
|
6
|
+
client: import("..").MeasurementDataClient;
|
|
7
|
+
selector: (state: any) => import("@reduxjs/toolkit").EntityState<import("..").MeasurementsTypes.Measurement, string> & {
|
|
8
|
+
files: import("../redux/measurements.slice").MeasurementsFile[];
|
|
9
|
+
measurementScale: number;
|
|
10
|
+
error: Error | undefined;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
didInvalidate: boolean;
|
|
13
|
+
colors: string[];
|
|
14
|
+
globallyUniqueMeasurementColors: boolean;
|
|
15
|
+
dataScale: number;
|
|
16
|
+
};
|
|
17
|
+
entitiesSelectors: {
|
|
18
|
+
measurements: import("@reduxjs/toolkit").EntitySelectors<import("..").MeasurementsTypes.Measurement, unknown, string>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
21
|
//# sourceMappingURL=useMeasurementsModule.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MeasurementsModuleContext } from "..";
|
|
3
|
-
/**
|
|
4
|
-
* Consumes the MeasurementsModuleContext and returns its value.
|
|
5
|
-
* @returns
|
|
6
|
-
**/
|
|
7
|
-
export const useMeasurementsModule = () => {
|
|
8
|
-
const context = React.useContext(MeasurementsModuleContext);
|
|
9
|
-
if (!context)
|
|
10
|
-
throw new Error("No MeasurementsModuleContext found, did you wrap these components in a MeasurementsModuleProvider?");
|
|
11
|
-
return context;
|
|
12
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MeasurementsModuleContext } from "..";
|
|
3
|
+
/**
|
|
4
|
+
* Consumes the MeasurementsModuleContext and returns its value.
|
|
5
|
+
* @returns
|
|
6
|
+
**/
|
|
7
|
+
export const useMeasurementsModule = () => {
|
|
8
|
+
const context = React.useContext(MeasurementsModuleContext);
|
|
9
|
+
if (!context)
|
|
10
|
+
throw new Error("No MeasurementsModuleContext found, did you wrap these components in a MeasurementsModuleProvider?");
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
13
13
|
//# sourceMappingURL=useMeasurementsModule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useOverlayMeasurementData: (props: any) => Promise<any> | undefined;
|
|
1
|
+
export declare const useOverlayMeasurementData: (props: any) => Promise<any> | undefined;
|
|
2
2
|
//# sourceMappingURL=useOverlayMeasurementData.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
11
|
-
export const useOverlayMeasurementData = (props) => {
|
|
12
|
-
const { apiReqSent, overlayData, dataType } = props;
|
|
13
|
-
const { client } = useMeasurementsModule();
|
|
14
|
-
if (!apiReqSent) {
|
|
15
|
-
return client
|
|
16
|
-
.fetchOverlayData({ overlayData, dataType })
|
|
17
|
-
.then((overlays) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
if (overlays.code === 200) {
|
|
19
|
-
return overlays.overlayData;
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
};
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
11
|
+
export const useOverlayMeasurementData = (props) => {
|
|
12
|
+
const { apiReqSent, overlayData, dataType } = props;
|
|
13
|
+
const { client } = useMeasurementsModule();
|
|
14
|
+
if (!apiReqSent) {
|
|
15
|
+
return client
|
|
16
|
+
.fetchOverlayData({ overlayData, dataType })
|
|
17
|
+
.then((overlays) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
if (overlays.code === 200) {
|
|
19
|
+
return overlays.overlayData;
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
24
|
//# sourceMappingURL=useOverlayMeasurementData.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { MeasurementsTypes } from "../types";
|
|
2
|
-
import { Timer } from "@insync-stageplayer/time";
|
|
3
|
-
import { NumberRange } from "@insync-stageplayer/common";
|
|
4
|
-
import { AsyncState } from "../AsyncSubject";
|
|
5
|
-
import { CreateMeasurementDataObservableArgs } from "../client";
|
|
6
|
-
/**
|
|
7
|
-
* Options for the useTimedMeasurementData hook.
|
|
8
|
-
*/
|
|
9
|
-
export declare type UseTimedMeasurementDataOptions = Omit<CreateMeasurementDataObservableArgs, "file" | "time$"> & {
|
|
10
|
-
/**
|
|
11
|
-
* A timer emitting times. The files will be offset to this timer.
|
|
12
|
-
*/
|
|
13
|
-
timer: Timer;
|
|
14
|
-
};
|
|
15
|
-
declare type StateValue = {
|
|
16
|
-
measurementData: MeasurementsTypes.DataMap;
|
|
17
|
-
range: NumberRange;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Returns measurement data for a time. The current time is provided by options.timer which is
|
|
21
|
-
* an instance of a Timer defined in @insync-stageplayer/time.
|
|
22
|
-
* @param options
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
export declare const useTimedMeasurementData: (options: UseTimedMeasurementDataOptions) => AsyncState<StateValue>;
|
|
26
|
-
export {};
|
|
1
|
+
import { MeasurementsTypes } from "../types";
|
|
2
|
+
import { Timer } from "@insync-stageplayer/time";
|
|
3
|
+
import { NumberRange } from "@insync-stageplayer/common";
|
|
4
|
+
import { AsyncState } from "../AsyncSubject";
|
|
5
|
+
import { CreateMeasurementDataObservableArgs } from "../client";
|
|
6
|
+
/**
|
|
7
|
+
* Options for the useTimedMeasurementData hook.
|
|
8
|
+
*/
|
|
9
|
+
export declare type UseTimedMeasurementDataOptions = Omit<CreateMeasurementDataObservableArgs, "file" | "time$"> & {
|
|
10
|
+
/**
|
|
11
|
+
* A timer emitting times. The files will be offset to this timer.
|
|
12
|
+
*/
|
|
13
|
+
timer: Timer;
|
|
14
|
+
};
|
|
15
|
+
declare type StateValue = {
|
|
16
|
+
measurementData: MeasurementsTypes.DataMap;
|
|
17
|
+
range: NumberRange;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Returns measurement data for a time. The current time is provided by options.timer which is
|
|
21
|
+
* an instance of a Timer defined in @insync-stageplayer/time.
|
|
22
|
+
* @param options
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare const useTimedMeasurementData: (options: UseTimedMeasurementDataOptions) => AsyncState<StateValue>;
|
|
26
|
+
export {};
|
|
27
27
|
//# sourceMappingURL=useTimedMeasurementData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimedMeasurementData.d.ts","sourceRoot":"","sources":["../../src/hooks/useTimedMeasurementData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useTimedMeasurementData.d.ts","sourceRoot":"","sources":["../../src/hooks/useTimedMeasurementData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAU7C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAKhE;;GAEG;AACH,oBAAY,8BAA8B,GAAG,IAAI,CAC/C,mCAAmC,EACnC,MAAM,GAAG,OAAO,CACjB,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,aAAK,UAAU,GAAG;IAChB,eAAe,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAC3C,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,YACzB,8BAA8B,2BAuKxC,CAAC"}
|
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import { useEffect, useState, useMemo } from "react";
|
|
2
|
-
import { filter, groupBy, map, scan, switchMap, toArray } from "rxjs/operators";
|
|
3
|
-
import { useMeasurements } from "./useMeasurements";
|
|
4
|
-
import { from } from "rxjs";
|
|
5
|
-
import { useSelector } from "react-redux";
|
|
6
|
-
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
7
|
-
/**
|
|
8
|
-
* Returns measurement data for a time. The current time is provided by options.timer which is
|
|
9
|
-
* an instance of a Timer defined in @insync-stageplayer/time.
|
|
10
|
-
* @param options
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export const useTimedMeasurementData = (options) => {
|
|
14
|
-
const { client, selector } = useMeasurementsModule();
|
|
15
|
-
const { rows, measurements, limit, timer, unit } = options;
|
|
16
|
-
/**
|
|
17
|
-
* Create a map with files, we need these to get the start time of a file. So that we can create a timer with an offset.
|
|
18
|
-
*/
|
|
19
|
-
const files = useSelector((s) => selector(s).files);
|
|
20
|
-
const filesById = useMemo(() => {
|
|
21
|
-
return files.reduce((acc, c) => (Object.assign(Object.assign({}, acc), { [c.path]: c })), {});
|
|
22
|
-
}, [files]);
|
|
23
|
-
/**
|
|
24
|
-
* The scale of the model for which the measurement data was recorded.
|
|
25
|
-
*/
|
|
26
|
-
const measurementScale = useSelector((s) => selector(s).measurementScale);
|
|
27
|
-
const dataScale = useSelector((s) => selector(s).dataScale);
|
|
28
|
-
const { measurements: allMeasurements, loading, didInvalidate, } = useMeasurements();
|
|
29
|
-
const [state, setState] = useState({
|
|
30
|
-
loading: false,
|
|
31
|
-
});
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (loading || didInvalidate)
|
|
34
|
-
return;
|
|
35
|
-
const observable$ = from(allMeasurements).pipe(filter((m) => measurements.includes(m)),
|
|
36
|
-
// Request are on a per file basis.
|
|
37
|
-
groupBy((m) => m.file),
|
|
38
|
-
//
|
|
39
|
-
// The measurements in the app have an ID like (ROOT:/32322/WAVE) that
|
|
40
|
-
// is incompatible with the IDs of the API (just WAVE). So we keep track of a map
|
|
41
|
-
// that contains the mapping from the IDs used by the API to the ones used in the
|
|
42
|
-
// app so we can map them back later.
|
|
43
|
-
//
|
|
44
|
-
const nameIdMap = allMeasurements.reduce((acc, c) => {
|
|
45
|
-
return Object.assign(Object.assign({}, acc), { [c.
|
|
46
|
-
}, {});
|
|
47
|
-
// Retrieve the file in which theses measurements are stored.
|
|
48
|
-
const fileObj = filesById[grouped.key];
|
|
49
|
-
const start = fileObj.timing.start;
|
|
50
|
-
// We'll map the timer to have an offset and for the time to be scaled using the measurement scale.
|
|
51
|
-
const time$ = timer.state.pipe(map((timerState) => {
|
|
52
|
-
const offset = timerState.time - start;
|
|
53
|
-
const time = offset * Math.sqrt(measurementScale / dataScale);
|
|
54
|
-
return time;
|
|
55
|
-
}));
|
|
56
|
-
return client
|
|
57
|
-
.createMeasurementDataObservable({
|
|
58
|
-
rows,
|
|
59
|
-
limit,
|
|
60
|
-
measurements,
|
|
61
|
-
time$,
|
|
62
|
-
unit,
|
|
63
|
-
file: grouped.key,
|
|
64
|
-
})
|
|
65
|
-
.pipe(
|
|
66
|
-
// This is where we map back the IDs
|
|
67
|
-
map((v) => {
|
|
68
|
-
var _a;
|
|
69
|
-
return (Object.assign(Object.assign({}, v), {
|
|
70
|
-
// We add a file property so we can retrieve for which file this loading is.
|
|
71
|
-
file: grouped.key, data: Object.assign(Object.assign({}, v.data), { measurementData: ((_a = v.data) === null || _a === void 0 ? void 0 : _a.measurementData)
|
|
72
|
-
? Object.keys(v.data.measurementData).reduce((acc, c) => {
|
|
73
|
-
var _a, _b;
|
|
74
|
-
if ((_a = v.data) === null || _a === void 0 ? void 0 : _a.measurementData[c]) {
|
|
75
|
-
return Object.assign(Object.assign({}, acc), { [nameIdMap[c]]: (_b = v.data) === null || _b === void 0 ? void 0 : _b.measurementData[c] });
|
|
76
|
-
}
|
|
77
|
-
return acc;
|
|
78
|
-
}, {})
|
|
79
|
-
: undefined }) }));
|
|
80
|
-
}));
|
|
81
|
-
}))),
|
|
82
|
-
// We accumulate the data from all the files here.
|
|
83
|
-
scan((acc, c) => {
|
|
84
|
-
var _a, _b;
|
|
85
|
-
const loadingFiles = c.loading
|
|
86
|
-
? [...acc.loadingFiles, c.file]
|
|
87
|
-
: acc.loadingFiles.filter((f) => f !== c.file);
|
|
88
|
-
return {
|
|
89
|
-
loadingFiles,
|
|
90
|
-
data: Object.assign(Object.assign(Object.assign({}, acc.data), c.data), {
|
|
91
|
-
// We'll only return the new range if all files have finished loading.
|
|
92
|
-
range: loadingFiles.length > 0 || !c.data.range
|
|
93
|
-
? acc.data.range
|
|
94
|
-
: c.data.range, measurementData: Object.assign(Object.assign({}, (_a = acc.data) === null || _a === void 0 ? void 0 : _a.measurementData), (_b = c.data) === null || _b === void 0 ? void 0 : _b.measurementData) }),
|
|
95
|
-
error: c.error,
|
|
96
|
-
};
|
|
97
|
-
}, {
|
|
98
|
-
loadingFiles: [],
|
|
99
|
-
data: {},
|
|
100
|
-
}),
|
|
101
|
-
// We should not retrieve measurement data if still loading. So we clear the data here if some file is still loading.
|
|
102
|
-
map((state) => {
|
|
103
|
-
const loading = state.loadingFiles.length > 0;
|
|
104
|
-
return Object.assign(Object.assign({}, state), { loading, data: state.data });
|
|
105
|
-
}));
|
|
106
|
-
const subscription = observable$.subscribe(setState);
|
|
107
|
-
return () => {
|
|
108
|
-
subscription.unsubscribe();
|
|
109
|
-
};
|
|
110
|
-
}, [
|
|
111
|
-
measurements,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
rows,
|
|
115
|
-
limit,
|
|
116
|
-
filesById,
|
|
117
|
-
timer,
|
|
118
|
-
measurementScale,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
]);
|
|
124
|
-
return state;
|
|
125
|
-
};
|
|
1
|
+
import { useEffect, useState, useMemo } from "react";
|
|
2
|
+
import { filter, groupBy, map, scan, mergeMap, switchMap, toArray, } from "rxjs/operators";
|
|
3
|
+
import { useMeasurements } from "./useMeasurements";
|
|
4
|
+
import { from } from "rxjs";
|
|
5
|
+
import { useSelector } from "react-redux";
|
|
6
|
+
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
7
|
+
/**
|
|
8
|
+
* Returns measurement data for a time. The current time is provided by options.timer which is
|
|
9
|
+
* an instance of a Timer defined in @insync-stageplayer/time.
|
|
10
|
+
* @param options
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export const useTimedMeasurementData = (options) => {
|
|
14
|
+
const { client, selector } = useMeasurementsModule();
|
|
15
|
+
const { rows, measurements, limit, timer, unit } = options;
|
|
16
|
+
/**
|
|
17
|
+
* Create a map with files, we need these to get the start time of a file. So that we can create a timer with an offset.
|
|
18
|
+
*/
|
|
19
|
+
const files = useSelector((s) => selector(s).files);
|
|
20
|
+
const filesById = useMemo(() => {
|
|
21
|
+
return files.reduce((acc, c) => (Object.assign(Object.assign({}, acc), { [c.path]: c })), {});
|
|
22
|
+
}, [files]);
|
|
23
|
+
/**
|
|
24
|
+
* The scale of the model for which the measurement data was recorded.
|
|
25
|
+
*/
|
|
26
|
+
const measurementScale = useSelector((s) => selector(s).measurementScale);
|
|
27
|
+
const dataScale = useSelector((s) => selector(s).dataScale);
|
|
28
|
+
const { measurements: allMeasurements, loading, didInvalidate, } = useMeasurements();
|
|
29
|
+
const [state, setState] = useState({
|
|
30
|
+
loading: false,
|
|
31
|
+
});
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (loading || didInvalidate)
|
|
34
|
+
return;
|
|
35
|
+
const observable$ = from(allMeasurements).pipe(filter((m) => measurements.includes(m)),
|
|
36
|
+
// Request are on a per file basis.
|
|
37
|
+
groupBy((m) => m.file), mergeMap((grouped) => grouped.pipe(toArray(), switchMap((allMeasurements) => {
|
|
38
|
+
//
|
|
39
|
+
// The measurements in the app have an ID like (ROOT:/32322/WAVE) that
|
|
40
|
+
// is incompatible with the IDs of the API (just WAVE). So we keep track of a map
|
|
41
|
+
// that contains the mapping from the IDs used by the API to the ones used in the
|
|
42
|
+
// app so we can map them back later.
|
|
43
|
+
//
|
|
44
|
+
const nameIdMap = allMeasurements.reduce((acc, c) => {
|
|
45
|
+
return Object.assign(Object.assign({}, acc), { [c.index.join("/")]: c.id });
|
|
46
|
+
}, {});
|
|
47
|
+
// Retrieve the file in which theses measurements are stored.
|
|
48
|
+
const fileObj = filesById[grouped.key];
|
|
49
|
+
const start = fileObj.timing.start;
|
|
50
|
+
// We'll map the timer to have an offset and for the time to be scaled using the measurement scale.
|
|
51
|
+
const time$ = timer.state.pipe(map((timerState) => {
|
|
52
|
+
const offset = timerState.time - start;
|
|
53
|
+
const time = offset * Math.sqrt(measurementScale / dataScale);
|
|
54
|
+
return time;
|
|
55
|
+
}));
|
|
56
|
+
return client
|
|
57
|
+
.createMeasurementDataObservable({
|
|
58
|
+
rows,
|
|
59
|
+
limit,
|
|
60
|
+
measurements,
|
|
61
|
+
time$,
|
|
62
|
+
unit,
|
|
63
|
+
file: grouped.key,
|
|
64
|
+
})
|
|
65
|
+
.pipe(
|
|
66
|
+
// This is where we map back the IDs
|
|
67
|
+
map((v) => {
|
|
68
|
+
var _a;
|
|
69
|
+
return (Object.assign(Object.assign({}, v), {
|
|
70
|
+
// We add a file property so we can retrieve for which file this loading is.
|
|
71
|
+
file: grouped.key, data: Object.assign(Object.assign({}, v.data), { measurementData: ((_a = v.data) === null || _a === void 0 ? void 0 : _a.measurementData)
|
|
72
|
+
? Object.keys(v.data.measurementData).reduce((acc, c) => {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
if ((_a = v.data) === null || _a === void 0 ? void 0 : _a.measurementData[c]) {
|
|
75
|
+
return Object.assign(Object.assign({}, acc), { [nameIdMap[c]]: (_b = v.data) === null || _b === void 0 ? void 0 : _b.measurementData[c] });
|
|
76
|
+
}
|
|
77
|
+
return acc;
|
|
78
|
+
}, {})
|
|
79
|
+
: undefined }) }));
|
|
80
|
+
}));
|
|
81
|
+
}))),
|
|
82
|
+
// We accumulate the data from all the files here.
|
|
83
|
+
scan((acc, c) => {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
const loadingFiles = c.loading
|
|
86
|
+
? [...acc.loadingFiles, c.file]
|
|
87
|
+
: acc.loadingFiles.filter((f) => f !== c.file);
|
|
88
|
+
return {
|
|
89
|
+
loadingFiles,
|
|
90
|
+
data: Object.assign(Object.assign(Object.assign({}, acc.data), c.data), {
|
|
91
|
+
// We'll only return the new range if all files have finished loading.
|
|
92
|
+
range: loadingFiles.length > 0 || !c.data.range
|
|
93
|
+
? acc.data.range
|
|
94
|
+
: c.data.range, measurementData: Object.assign(Object.assign({}, (_a = acc.data) === null || _a === void 0 ? void 0 : _a.measurementData), (_b = c.data) === null || _b === void 0 ? void 0 : _b.measurementData) }),
|
|
95
|
+
error: c.error,
|
|
96
|
+
};
|
|
97
|
+
}, {
|
|
98
|
+
loadingFiles: [],
|
|
99
|
+
data: {},
|
|
100
|
+
}),
|
|
101
|
+
// We should not retrieve measurement data if still loading. So we clear the data here if some file is still loading.
|
|
102
|
+
map((state) => {
|
|
103
|
+
const loading = state.loadingFiles.length > 0;
|
|
104
|
+
return Object.assign(Object.assign({}, state), { loading, data: state.data });
|
|
105
|
+
}));
|
|
106
|
+
const subscription = observable$.subscribe(setState);
|
|
107
|
+
return () => {
|
|
108
|
+
subscription.unsubscribe();
|
|
109
|
+
};
|
|
110
|
+
}, [
|
|
111
|
+
measurements,
|
|
112
|
+
client,
|
|
113
|
+
allMeasurements,
|
|
114
|
+
rows,
|
|
115
|
+
limit,
|
|
116
|
+
filesById,
|
|
117
|
+
timer,
|
|
118
|
+
measurementScale,
|
|
119
|
+
unit,
|
|
120
|
+
loading,
|
|
121
|
+
didInvalidate,
|
|
122
|
+
dataScale,
|
|
123
|
+
]);
|
|
124
|
+
return state;
|
|
125
|
+
};
|
|
126
126
|
//# sourceMappingURL=useTimedMeasurementData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimedMeasurementData.js","sourceRoot":"","sources":["../../src/hooks/useTimedMeasurementData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,
|
|
1
|
+
{"version":3,"file":"useTimedMeasurementData.js","sourceRoot":"","sources":["../../src/hooks/useTimedMeasurementData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EACL,MAAM,EACN,OAAO,EACP,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,GACR,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,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