@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,90 +1,91 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates reducers and actions for the "slices" of state of this module.
|
|
3
|
-
*/
|
|
4
|
-
import { createEntityAdapter, createSlice, } from "@reduxjs/toolkit";
|
|
5
|
-
/**
|
|
6
|
-
* Please read up https://redux-toolkit.js.org/usage/usage-with-typescript#createentityadapter to understand what this is.
|
|
7
|
-
*/
|
|
8
|
-
export const measurementsAdapter = createEntityAdapter();
|
|
9
|
-
/**
|
|
10
|
-
* The reducers for the module.
|
|
11
|
-
*/
|
|
12
|
-
const reducers = {
|
|
13
|
-
createMeasurement: measurementsAdapter.addOne,
|
|
14
|
-
updateMeasurement: measurementsAdapter.updateOne,
|
|
15
|
-
updateMeasurements: measurementsAdapter.upsertMany,
|
|
16
|
-
setFiles: (state, action) => {
|
|
17
|
-
state.files = action.payload;
|
|
18
|
-
},
|
|
19
|
-
measurementsReceived: (state, action) => {
|
|
20
|
-
state.loading = false;
|
|
21
|
-
measurementsAdapter.upsertMany(state, action.payload);
|
|
22
|
-
},
|
|
23
|
-
measurementsLoading: (state) => {
|
|
24
|
-
state.loading = true;
|
|
25
|
-
state.didInvalidate = false;
|
|
26
|
-
},
|
|
27
|
-
measurementsError: (state, action) => {
|
|
28
|
-
state.loading = false;
|
|
29
|
-
state.error = action.payload;
|
|
30
|
-
},
|
|
31
|
-
invalidate: (state) => {
|
|
32
|
-
state.didInvalidate = true;
|
|
33
|
-
},
|
|
34
|
-
setGloballyUniqueMeasurementColors: (state, action) => {
|
|
35
|
-
state.globallyUniqueMeasurementColors = action.payload;
|
|
36
|
-
},
|
|
37
|
-
setDataScale: (state, action) => {
|
|
38
|
-
state.dataScale = action.payload;
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
const measurementsSlice = createSlice({
|
|
42
|
-
name: "measurements",
|
|
43
|
-
initialState: measurementsAdapter.getInitialState({
|
|
44
|
-
error: undefined,
|
|
45
|
-
loading: false,
|
|
46
|
-
didInvalidate: true,
|
|
47
|
-
measurementScale: 1,
|
|
48
|
-
files: [],
|
|
49
|
-
colors: [
|
|
50
|
-
"#1f77b4",
|
|
51
|
-
"#ff7f0e",
|
|
52
|
-
"#2ca02c",
|
|
53
|
-
"#d62728",
|
|
54
|
-
"#9467bd",
|
|
55
|
-
"#8c564b",
|
|
56
|
-
"#e377c2",
|
|
57
|
-
"#7f7f7f",
|
|
58
|
-
"#bcbd22",
|
|
59
|
-
"#17becf",
|
|
60
|
-
],
|
|
61
|
-
globallyUniqueMeasurementColors: true,
|
|
62
|
-
dataScale: 1,
|
|
63
|
-
}),
|
|
64
|
-
reducers,
|
|
65
|
-
});
|
|
66
|
-
export const { setFiles, createMeasurement, updateMeasurement, updateMeasurements, invalidate, measurementsReceived, measurementsLoading, measurementsError, setGloballyUniqueMeasurementColors, setDataScale, } = measurementsSlice.actions;
|
|
67
|
-
/**
|
|
68
|
-
* Selects (from the state) the index of the color that should be applied to the next measurements
|
|
69
|
-
* @param state The state from which the value should be selected.
|
|
70
|
-
* @returns
|
|
71
|
-
*/
|
|
72
|
-
export const selectLastColorIndex = (state) => {
|
|
73
|
-
const index = state.ids.reduce((acc, curr) => {
|
|
74
|
-
const measurement = state.entities[curr];
|
|
75
|
-
return Math.max((measurement === null || measurement === void 0 ? void 0 : measurement.color) ? state.colors.indexOf(measurement === null || measurement === void 0 ? void 0 : measurement.color) : -1, acc);
|
|
76
|
-
}, -1);
|
|
77
|
-
return index;
|
|
78
|
-
};
|
|
79
|
-
export const selectLastColorIndexPerDataViewer = (state, dataViewerId) => {
|
|
80
|
-
const index = state.ids.reduce((acc, curr) => {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
const measurement = state.entities[curr];
|
|
83
|
-
return Math.max(((_a = measurement === null || measurement === void 0 ? void 0 : measurement.colorPerDataViewer) === null || _a === void 0 ? void 0 : _a.byId[dataViewerId])
|
|
84
|
-
? state.colors.indexOf((_b = measurement === null || measurement === void 0 ? void 0 : measurement.colorPerDataViewer) === null || _b === void 0 ? void 0 : _b.byId[dataViewerId])
|
|
85
|
-
: -1, acc);
|
|
86
|
-
}, -1);
|
|
87
|
-
return index;
|
|
88
|
-
};
|
|
89
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Creates reducers and actions for the "slices" of state of this module.
|
|
3
|
+
*/
|
|
4
|
+
import { createEntityAdapter, createSlice, } from "@reduxjs/toolkit";
|
|
5
|
+
/**
|
|
6
|
+
* Please read up https://redux-toolkit.js.org/usage/usage-with-typescript#createentityadapter to understand what this is.
|
|
7
|
+
*/
|
|
8
|
+
export const measurementsAdapter = createEntityAdapter();
|
|
9
|
+
/**
|
|
10
|
+
* The reducers for the module.
|
|
11
|
+
*/
|
|
12
|
+
const reducers = {
|
|
13
|
+
createMeasurement: measurementsAdapter.addOne,
|
|
14
|
+
updateMeasurement: measurementsAdapter.updateOne,
|
|
15
|
+
updateMeasurements: measurementsAdapter.upsertMany,
|
|
16
|
+
setFiles: (state, action) => {
|
|
17
|
+
state.files = action.payload;
|
|
18
|
+
},
|
|
19
|
+
measurementsReceived: (state, action) => {
|
|
20
|
+
state.loading = false;
|
|
21
|
+
measurementsAdapter.upsertMany(state, action.payload);
|
|
22
|
+
},
|
|
23
|
+
measurementsLoading: (state) => {
|
|
24
|
+
state.loading = true;
|
|
25
|
+
state.didInvalidate = false;
|
|
26
|
+
},
|
|
27
|
+
measurementsError: (state, action) => {
|
|
28
|
+
state.loading = false;
|
|
29
|
+
state.error = action.payload;
|
|
30
|
+
},
|
|
31
|
+
invalidate: (state) => {
|
|
32
|
+
state.didInvalidate = true;
|
|
33
|
+
},
|
|
34
|
+
setGloballyUniqueMeasurementColors: (state, action) => {
|
|
35
|
+
state.globallyUniqueMeasurementColors = action.payload;
|
|
36
|
+
},
|
|
37
|
+
setDataScale: (state, action) => {
|
|
38
|
+
state.dataScale = action.payload;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const measurementsSlice = createSlice({
|
|
42
|
+
name: "measurements",
|
|
43
|
+
initialState: measurementsAdapter.getInitialState({
|
|
44
|
+
error: undefined,
|
|
45
|
+
loading: false,
|
|
46
|
+
didInvalidate: true,
|
|
47
|
+
measurementScale: 1,
|
|
48
|
+
files: [],
|
|
49
|
+
colors: [
|
|
50
|
+
"#1f77b4",
|
|
51
|
+
"#ff7f0e",
|
|
52
|
+
"#2ca02c",
|
|
53
|
+
"#d62728",
|
|
54
|
+
"#9467bd",
|
|
55
|
+
"#8c564b",
|
|
56
|
+
"#e377c2",
|
|
57
|
+
"#7f7f7f",
|
|
58
|
+
"#bcbd22",
|
|
59
|
+
"#17becf",
|
|
60
|
+
],
|
|
61
|
+
globallyUniqueMeasurementColors: true,
|
|
62
|
+
dataScale: 1,
|
|
63
|
+
}),
|
|
64
|
+
reducers,
|
|
65
|
+
});
|
|
66
|
+
export const { setFiles, createMeasurement, updateMeasurement, updateMeasurements, invalidate, measurementsReceived, measurementsLoading, measurementsError, setGloballyUniqueMeasurementColors, setDataScale, } = measurementsSlice.actions;
|
|
67
|
+
/**
|
|
68
|
+
* Selects (from the state) the index of the color that should be applied to the next measurements
|
|
69
|
+
* @param state The state from which the value should be selected.
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
export const selectLastColorIndex = (state) => {
|
|
73
|
+
const index = state.ids.reduce((acc, curr) => {
|
|
74
|
+
const measurement = state.entities[curr];
|
|
75
|
+
return Math.max((measurement === null || measurement === void 0 ? void 0 : measurement.color) ? state.colors.indexOf(measurement === null || measurement === void 0 ? void 0 : measurement.color) : -1, acc);
|
|
76
|
+
}, -1);
|
|
77
|
+
return index;
|
|
78
|
+
};
|
|
79
|
+
export const selectLastColorIndexPerDataViewer = (state, dataViewerId) => {
|
|
80
|
+
const index = state.ids.reduce((acc, curr) => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
const measurement = state.entities[curr];
|
|
83
|
+
return Math.max(((_a = measurement === null || measurement === void 0 ? void 0 : measurement.colorPerDataViewer) === null || _a === void 0 ? void 0 : _a.byId[dataViewerId])
|
|
84
|
+
? state.colors.indexOf((_b = measurement === null || measurement === void 0 ? void 0 : measurement.colorPerDataViewer) === null || _b === void 0 ? void 0 : _b.byId[dataViewerId])
|
|
85
|
+
: -1, acc);
|
|
86
|
+
}, -1);
|
|
87
|
+
return index;
|
|
88
|
+
};
|
|
89
|
+
const measurementsReducer = measurementsSlice.reducer;
|
|
90
|
+
export default measurementsReducer;
|
|
90
91
|
//# sourceMappingURL=measurements.slice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measurements.slice.js","sourceRoot":"","sources":["../../src/redux/measurements.slice.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,mBAAmB,EACnB,WAAW,GAGZ,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"measurements.slice.js","sourceRoot":"","sources":["../../src/redux/measurements.slice.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,mBAAmB,EACnB,WAAW,GAGZ,MAAM,kBAAkB,CAAC;AAyB1B;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,mBAAmB,EAAiC,CAAC;AAqCvD;;GAEG;AACH,MAAM,QAAQ,GAAG;IACf,iBAAiB,EAAE,mBAAmB,CAAC,MAAM;IAC7C,iBAAiB,EAAE,mBAAmB,CAAC,SAAS;IAChD,kBAAkB,EAAE,mBAAmB,CAAC,UAAU;IAClD,QAAQ,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A,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,kBAAkB,0CAAE,IAAI,CAAC,YAAY,CAAC;YACjD,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAClB,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,kBAAkB,0CAAE,IAAI,CAAC,YAAY,CAAC,CACpD;YACH,CAAC,CAAC,CAAC,CAAC,EACN,GAAG,CACJ,CAAC;IACJ,CAAC,EAAE,CAAC,CAAW,CAAC,CAAC;IAEjB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAIF,MAAM,mBAAmB,GACvB,iBAAiB,CAAC,OAAO,CAAC;AAE5B,eAAe,mBAAmB,CAAC"}
|
package/lib/redux/reducer.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
didInvalidate: boolean;
|
|
5
|
-
measurementScale: number;
|
|
6
|
-
files: import("./measurements.slice").MeasurementsFile[];
|
|
7
|
-
colors: string[];
|
|
8
|
-
globallyUniqueMeasurementColors: boolean;
|
|
9
|
-
dataScale: number;
|
|
10
|
-
}, import("redux").AnyAction>;
|
|
1
|
+
import { Reducer } from "redux";
|
|
2
|
+
import { MeasurementsModuleState } from "./measurements.slice";
|
|
3
|
+
export declare const measurementsModuleReducer: Reducer<MeasurementsModuleState>;
|
|
11
4
|
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/redux/reducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/redux/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,eAAO,MAAM,yBAAyB,EAAE,OAAO,CAAC,uBAAuB,CACrD,CAAC"}
|
package/lib/redux/reducer.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import measurementsSlice from "./measurements.slice";
|
|
2
|
-
export const measurementsModuleReducer = measurementsSlice;
|
|
1
|
+
import measurementsSlice from "./measurements.slice";
|
|
2
|
+
export const measurementsModuleReducer = measurementsSlice;
|
|
3
3
|
//# sourceMappingURL=reducer.js.map
|
package/lib/redux/reducer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/redux/reducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/redux/reducer.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAGrD,MAAM,CAAC,MAAM,yBAAyB,GACrC,iBAAiB,CAAC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
export declare module MeasurementsTypes {
|
|
2
|
-
type Measurement = {
|
|
3
|
-
id: string;
|
|
4
|
-
color?: string;
|
|
5
|
-
file: string;
|
|
6
|
-
frequency: number;
|
|
7
|
-
name: string;
|
|
8
|
-
unit: string;
|
|
9
|
-
min: number;
|
|
10
|
-
max: number;
|
|
11
|
-
yaxisLeftPos: string;
|
|
12
|
-
index: string[];
|
|
13
|
-
start: number;
|
|
14
|
-
end: number;
|
|
15
|
-
colorPerDataViewer?: {
|
|
16
|
-
byId: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
dataScale: number;
|
|
21
|
-
sampleRate: number;
|
|
22
|
-
minX: number;
|
|
23
|
-
minY: number;
|
|
24
|
-
maxX: number;
|
|
25
|
-
maxY: number;
|
|
26
|
-
};
|
|
27
|
-
type Request = {
|
|
28
|
-
action: string;
|
|
29
|
-
id: string;
|
|
30
|
-
params: {
|
|
31
|
-
[key: string]: any;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
type Response<T = unknown> = {
|
|
35
|
-
code: number;
|
|
36
|
-
id: string;
|
|
37
|
-
data: {
|
|
38
|
-
id: string;
|
|
39
|
-
} & T;
|
|
40
|
-
};
|
|
41
|
-
type DataResponseData = {
|
|
42
|
-
file: string;
|
|
43
|
-
measurements: {
|
|
44
|
-
[key: string]: [number, number][];
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type MetadataResponseMeasurement = {
|
|
48
|
-
type: "measurement";
|
|
49
|
-
} & Pick<Measurement, "name" | "min" | "max" | "yaxisLeftPos" | "unit" | "frequency" | "dataScale">;
|
|
50
|
-
type MetadataResponseSignal = Pick<Measurement, "name" | "min" | "max" | "yaxisLeftPos" | "unit" | "frequency" | "dataScale" | "sampleRate" | "minX" | "minY" | "maxX" | "maxY">;
|
|
51
|
-
type MetadataResponseGroups = {
|
|
52
|
-
groups: MetadataResponseGrp[];
|
|
53
|
-
};
|
|
54
|
-
type MetadataResponseGroup = {
|
|
55
|
-
type: "group";
|
|
56
|
-
name: string;
|
|
57
|
-
children: MetadataResponseNode[];
|
|
58
|
-
};
|
|
59
|
-
type MetadataResponseGrp = {
|
|
60
|
-
groupID: string;
|
|
61
|
-
name: string;
|
|
62
|
-
sampleRate: number;
|
|
63
|
-
dataScale: number;
|
|
64
|
-
signals: MetadataResponseSignal[];
|
|
65
|
-
};
|
|
66
|
-
type MetadataResponseNode = MetadataResponseMeasurement | MetadataResponseGroup;
|
|
67
|
-
type MetadataResponseDat = {
|
|
68
|
-
metadata: MetadataResponseGroups;
|
|
69
|
-
};
|
|
70
|
-
type MetadataResponseData = {
|
|
71
|
-
metadata: MetadataResponseGroup;
|
|
72
|
-
};
|
|
73
|
-
type ErrorResponseData = {
|
|
74
|
-
error: {
|
|
75
|
-
message: string;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
type DataResponse = Response<DataResponseData>;
|
|
79
|
-
type MetadataRespons = Response<MetadataResponseDat>;
|
|
80
|
-
type MetadataResponse = Response<MetadataResponseData>;
|
|
81
|
-
type ErrorResponse = Response<ErrorResponseData>;
|
|
82
|
-
type DataMap = {
|
|
83
|
-
[key: string]: (number | "NaN")[][];
|
|
84
|
-
};
|
|
85
|
-
function isObject(input: unknown): boolean;
|
|
86
|
-
function isResponse<T = unknown>(input: unknown): input is Response<T>;
|
|
87
|
-
function isErrorResponse(input: unknown): input is ErrorResponse;
|
|
88
|
-
function isDataResponse(input: unknown): input is DataResponse;
|
|
89
|
-
function isLayoutResponse(input: unknown): input is DataResponse;
|
|
90
|
-
function isMetadataResponseGroup(input: unknown): input is MetadataResponseGroup;
|
|
91
|
-
function isMetadataResponseMeasurement(input: unknown): input is MetadataResponseMeasurement;
|
|
92
|
-
function isMetadataResponseNode(input: unknown): input is MetadataResponseNode;
|
|
93
|
-
}
|
|
1
|
+
export declare module MeasurementsTypes {
|
|
2
|
+
type Measurement = {
|
|
3
|
+
id: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
file: string;
|
|
6
|
+
frequency: number;
|
|
7
|
+
name: string;
|
|
8
|
+
unit: string;
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
yaxisLeftPos: string;
|
|
12
|
+
index: string[];
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
colorPerDataViewer?: {
|
|
16
|
+
byId: {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
dataScale: number;
|
|
21
|
+
sampleRate: number;
|
|
22
|
+
minX: number;
|
|
23
|
+
minY: number;
|
|
24
|
+
maxX: number;
|
|
25
|
+
maxY: number;
|
|
26
|
+
};
|
|
27
|
+
type Request = {
|
|
28
|
+
action: string;
|
|
29
|
+
id: string;
|
|
30
|
+
params: {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
type Response<T = unknown> = {
|
|
35
|
+
code: number;
|
|
36
|
+
id: string;
|
|
37
|
+
data: {
|
|
38
|
+
id: string;
|
|
39
|
+
} & T;
|
|
40
|
+
};
|
|
41
|
+
type DataResponseData = {
|
|
42
|
+
file: string;
|
|
43
|
+
measurements: {
|
|
44
|
+
[key: string]: [number, number][];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
type MetadataResponseMeasurement = {
|
|
48
|
+
type: "measurement";
|
|
49
|
+
} & Pick<Measurement, "name" | "min" | "max" | "yaxisLeftPos" | "unit" | "frequency" | "dataScale">;
|
|
50
|
+
type MetadataResponseSignal = Pick<Measurement, "name" | "min" | "max" | "yaxisLeftPos" | "unit" | "frequency" | "dataScale" | "sampleRate" | "minX" | "minY" | "maxX" | "maxY">;
|
|
51
|
+
type MetadataResponseGroups = {
|
|
52
|
+
groups: MetadataResponseGrp[];
|
|
53
|
+
};
|
|
54
|
+
type MetadataResponseGroup = {
|
|
55
|
+
type: "group";
|
|
56
|
+
name: string;
|
|
57
|
+
children: MetadataResponseNode[];
|
|
58
|
+
};
|
|
59
|
+
type MetadataResponseGrp = {
|
|
60
|
+
groupID: string;
|
|
61
|
+
name: string;
|
|
62
|
+
sampleRate: number;
|
|
63
|
+
dataScale: number;
|
|
64
|
+
signals: MetadataResponseSignal[];
|
|
65
|
+
};
|
|
66
|
+
type MetadataResponseNode = MetadataResponseMeasurement | MetadataResponseGroup;
|
|
67
|
+
type MetadataResponseDat = {
|
|
68
|
+
metadata: MetadataResponseGroups;
|
|
69
|
+
};
|
|
70
|
+
type MetadataResponseData = {
|
|
71
|
+
metadata: MetadataResponseGroup;
|
|
72
|
+
};
|
|
73
|
+
type ErrorResponseData = {
|
|
74
|
+
error: {
|
|
75
|
+
message: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
type DataResponse = Response<DataResponseData>;
|
|
79
|
+
type MetadataRespons = Response<MetadataResponseDat>;
|
|
80
|
+
type MetadataResponse = Response<MetadataResponseData>;
|
|
81
|
+
type ErrorResponse = Response<ErrorResponseData>;
|
|
82
|
+
type DataMap = {
|
|
83
|
+
[key: string]: (number | "NaN")[][];
|
|
84
|
+
};
|
|
85
|
+
function isObject(input: unknown): boolean;
|
|
86
|
+
function isResponse<T = unknown>(input: unknown): input is Response<T>;
|
|
87
|
+
function isErrorResponse(input: unknown): input is ErrorResponse;
|
|
88
|
+
function isDataResponse(input: unknown): input is DataResponse;
|
|
89
|
+
function isLayoutResponse(input: unknown): input is DataResponse;
|
|
90
|
+
function isMetadataResponseGroup(input: unknown): input is MetadataResponseGroup;
|
|
91
|
+
function isMetadataResponseMeasurement(input: unknown): input is MetadataResponseMeasurement;
|
|
92
|
+
function isMetadataResponseNode(input: unknown): input is MetadataResponseNode;
|
|
93
|
+
}
|
|
94
94
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
export var MeasurementsTypes;
|
|
2
|
-
(function (MeasurementsTypes) {
|
|
3
|
-
function isObject(input) {
|
|
4
|
-
return typeof input === "object" && input !== null;
|
|
5
|
-
}
|
|
6
|
-
MeasurementsTypes.isObject = isObject;
|
|
7
|
-
function isResponse(input) {
|
|
8
|
-
const _input = input;
|
|
9
|
-
return (isObject(_input) &&
|
|
10
|
-
_input.code !== undefined &&
|
|
11
|
-
typeof _input.id === "string");
|
|
12
|
-
}
|
|
13
|
-
MeasurementsTypes.isResponse = isResponse;
|
|
14
|
-
function isErrorResponse(input) {
|
|
15
|
-
var _a, _b;
|
|
16
|
-
const _input = input;
|
|
17
|
-
return (isObject(_input) &&
|
|
18
|
-
((_a = _input.data) === null || _a === void 0 ? void 0 : _a.error) &&
|
|
19
|
-
typeof ((_b = _input.data) === null || _b === void 0 ? void 0 : _b.error.message) === "string");
|
|
20
|
-
}
|
|
21
|
-
MeasurementsTypes.isErrorResponse = isErrorResponse;
|
|
22
|
-
function isDataResponse(input) {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
const _input = input;
|
|
25
|
-
return (isObject(_input) &&
|
|
26
|
-
typeof ((_a = _input.data) === null || _a === void 0 ? void 0 : _a.measurements) === "object" &&
|
|
27
|
-
typeof ((_b = _input.data) === null || _b === void 0 ? void 0 : _b.file) === "string");
|
|
28
|
-
}
|
|
29
|
-
MeasurementsTypes.isDataResponse = isDataResponse;
|
|
30
|
-
function isLayoutResponse(input) {
|
|
31
|
-
const _input = input;
|
|
32
|
-
return isObject(_input) && typeof _input.overlayData === "object";
|
|
33
|
-
}
|
|
34
|
-
MeasurementsTypes.isLayoutResponse = isLayoutResponse;
|
|
35
|
-
function isMetadataResponseGroup(input) {
|
|
36
|
-
const _input = input;
|
|
37
|
-
return (isObject(_input) &&
|
|
38
|
-
_input.type === "group" &&
|
|
39
|
-
Array.isArray(_input.children));
|
|
40
|
-
}
|
|
41
|
-
MeasurementsTypes.isMetadataResponseGroup = isMetadataResponseGroup;
|
|
42
|
-
function isMetadataResponseMeasurement(input) {
|
|
43
|
-
const _input = input;
|
|
44
|
-
return isObject(_input) && _input.type === "measurement";
|
|
45
|
-
}
|
|
46
|
-
MeasurementsTypes.isMetadataResponseMeasurement = isMetadataResponseMeasurement;
|
|
47
|
-
function isMetadataResponseNode(input) {
|
|
48
|
-
return (isMetadataResponseGroup(input) || isMetadataResponseMeasurement(input));
|
|
49
|
-
}
|
|
50
|
-
MeasurementsTypes.isMetadataResponseNode = isMetadataResponseNode;
|
|
51
|
-
})(MeasurementsTypes || (MeasurementsTypes = {}));
|
|
1
|
+
export var MeasurementsTypes;
|
|
2
|
+
(function (MeasurementsTypes) {
|
|
3
|
+
function isObject(input) {
|
|
4
|
+
return typeof input === "object" && input !== null;
|
|
5
|
+
}
|
|
6
|
+
MeasurementsTypes.isObject = isObject;
|
|
7
|
+
function isResponse(input) {
|
|
8
|
+
const _input = input;
|
|
9
|
+
return (isObject(_input) &&
|
|
10
|
+
_input.code !== undefined &&
|
|
11
|
+
typeof _input.id === "string");
|
|
12
|
+
}
|
|
13
|
+
MeasurementsTypes.isResponse = isResponse;
|
|
14
|
+
function isErrorResponse(input) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const _input = input;
|
|
17
|
+
return (isObject(_input) &&
|
|
18
|
+
((_a = _input.data) === null || _a === void 0 ? void 0 : _a.error) &&
|
|
19
|
+
typeof ((_b = _input.data) === null || _b === void 0 ? void 0 : _b.error.message) === "string");
|
|
20
|
+
}
|
|
21
|
+
MeasurementsTypes.isErrorResponse = isErrorResponse;
|
|
22
|
+
function isDataResponse(input) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const _input = input;
|
|
25
|
+
return (isObject(_input) &&
|
|
26
|
+
typeof ((_a = _input.data) === null || _a === void 0 ? void 0 : _a.measurements) === "object" &&
|
|
27
|
+
typeof ((_b = _input.data) === null || _b === void 0 ? void 0 : _b.file) === "string");
|
|
28
|
+
}
|
|
29
|
+
MeasurementsTypes.isDataResponse = isDataResponse;
|
|
30
|
+
function isLayoutResponse(input) {
|
|
31
|
+
const _input = input;
|
|
32
|
+
return isObject(_input) && typeof _input.overlayData === "object";
|
|
33
|
+
}
|
|
34
|
+
MeasurementsTypes.isLayoutResponse = isLayoutResponse;
|
|
35
|
+
function isMetadataResponseGroup(input) {
|
|
36
|
+
const _input = input;
|
|
37
|
+
return (isObject(_input) &&
|
|
38
|
+
_input.type === "group" &&
|
|
39
|
+
Array.isArray(_input.children));
|
|
40
|
+
}
|
|
41
|
+
MeasurementsTypes.isMetadataResponseGroup = isMetadataResponseGroup;
|
|
42
|
+
function isMetadataResponseMeasurement(input) {
|
|
43
|
+
const _input = input;
|
|
44
|
+
return isObject(_input) && _input.type === "measurement";
|
|
45
|
+
}
|
|
46
|
+
MeasurementsTypes.isMetadataResponseMeasurement = isMetadataResponseMeasurement;
|
|
47
|
+
function isMetadataResponseNode(input) {
|
|
48
|
+
return (isMetadataResponseGroup(input) || isMetadataResponseMeasurement(input));
|
|
49
|
+
}
|
|
50
|
+
MeasurementsTypes.isMetadataResponseNode = isMetadataResponseNode;
|
|
51
|
+
})(MeasurementsTypes || (MeasurementsTypes = {}));
|
|
52
52
|
//# sourceMappingURL=types.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insync-stageplayer/measurements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Module for measurement data in stageplayer",
|
|
5
5
|
"author": "David Ammeraal <david.ammeraal@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Noterik/insync-stageplayer#readme",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"storybook": "start-storybook -p 6006"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@insync-stageplayer/common": "^0.
|
|
33
|
-
"@insync-stageplayer/time": "^0.
|
|
34
|
-
"@insync-stageplayer/ui-components": "^0.
|
|
35
|
-
"@reduxjs/toolkit": "^
|
|
32
|
+
"@insync-stageplayer/common": "^0.6.0",
|
|
33
|
+
"@insync-stageplayer/time": "^0.6.0",
|
|
34
|
+
"@insync-stageplayer/ui-components": "^0.6.0",
|
|
35
|
+
"@reduxjs/toolkit": "^2.11.2",
|
|
36
36
|
"@types/randomcolor": "^0.5.5",
|
|
37
37
|
"insync-date": "^1.1.2",
|
|
38
38
|
"randomcolor": "^0.6.2",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-table": "^7.6.3",
|
|
43
43
|
"redux": "^4.0.5",
|
|
44
44
|
"rxjs": "^6.6.6",
|
|
45
|
-
"styled-components": "^5.
|
|
45
|
+
"styled-components": "^5.3.11"
|
|
46
46
|
},
|
|
47
47
|
"bugs": {
|
|
48
48
|
"url": "https://github.com/Noterik/insync-stageplayer/issues"
|
|
@@ -50,8 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"mock-socket": "^9.0.3"
|
|
52
52
|
},
|
|
53
|
-
"
|
|
54
|
-
"sbfreader": "^1.0.0-alpha.5"
|
|
55
|
-
},
|
|
56
|
-
"gitHead": "8e2b1c35a61bfd8eb4796988d429f22019e8be43"
|
|
53
|
+
"gitHead": "7c3d8a81cc2ba118bf8572c3e1b8a1fe7f7409be"
|
|
57
54
|
}
|