@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,36 +1,36 @@
|
|
|
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
|
-
import React, { useRef } from "react";
|
|
13
|
-
import { Modal, ModalHeading, ModalBody, ModalClose, } from "@insync-stageplayer/ui-components";
|
|
14
|
-
import { MeasurementsChooser, } from "./MeasurementsChooser";
|
|
15
|
-
import { useTheme as useSelectedTheme } from "@insync-stageplayer/ui-components";
|
|
16
|
-
import { CloseIcon } from "./Icon/CloseIcon";
|
|
17
|
-
/**
|
|
18
|
-
* A modal wrapper around MeasurementsChooser.
|
|
19
|
-
* @param props
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
export const ModalMeasurementsChooser = (_a) => {
|
|
23
|
-
var { open, onClose } = _a, rest = __rest(_a, ["open", "onClose"]);
|
|
24
|
-
const modalTarget = useRef(document.body);
|
|
25
|
-
const selectedTheme = useSelectedTheme();
|
|
26
|
-
return (React.createElement(Modal, { visible: open, target: modalTarget },
|
|
27
|
-
React.createElement(ModalHeading, null, selectedTheme.name === "noldus" ? (React.createElement(React.Fragment, null,
|
|
28
|
-
"Select a Signal",
|
|
29
|
-
React.createElement("span", { onClick: onClose },
|
|
30
|
-
React.createElement(CloseIcon, null)))) : (React.createElement(React.Fragment, null,
|
|
31
|
-
"Select a signal",
|
|
32
|
-
React.createElement(ModalClose, { onClick: onClose })))),
|
|
33
|
-
React.createElement(ModalBody, { style: { width: "50vw" } },
|
|
34
|
-
React.createElement(MeasurementsChooser, Object.assign({}, rest)))));
|
|
35
|
-
};
|
|
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
|
+
import React, { useRef } from "react";
|
|
13
|
+
import { Modal, ModalHeading, ModalBody, ModalClose, } from "@insync-stageplayer/ui-components";
|
|
14
|
+
import { MeasurementsChooser, } from "./MeasurementsChooser";
|
|
15
|
+
import { useTheme as useSelectedTheme } from "@insync-stageplayer/ui-components";
|
|
16
|
+
import { CloseIcon } from "./Icon/CloseIcon";
|
|
17
|
+
/**
|
|
18
|
+
* A modal wrapper around MeasurementsChooser.
|
|
19
|
+
* @param props
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export const ModalMeasurementsChooser = (_a) => {
|
|
23
|
+
var { open, onClose } = _a, rest = __rest(_a, ["open", "onClose"]);
|
|
24
|
+
const modalTarget = useRef(document.body);
|
|
25
|
+
const selectedTheme = useSelectedTheme();
|
|
26
|
+
return (React.createElement(Modal, { visible: open, target: modalTarget },
|
|
27
|
+
React.createElement(ModalHeading, null, selectedTheme.name === "noldus" ? (React.createElement(React.Fragment, null,
|
|
28
|
+
"Select a Signal",
|
|
29
|
+
React.createElement("span", { onClick: onClose },
|
|
30
|
+
React.createElement(CloseIcon, null)))) : (React.createElement(React.Fragment, null,
|
|
31
|
+
"Select a signal",
|
|
32
|
+
React.createElement(ModalClose, { onClick: onClose })))),
|
|
33
|
+
React.createElement(ModalBody, { style: { width: "50vw" } },
|
|
34
|
+
React.createElement(MeasurementsChooser, Object.assign({}, rest)))));
|
|
35
|
+
};
|
|
36
36
|
//# sourceMappingURL=ModalMeasurementChooser.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const useUnitConversion: () => {
|
|
2
|
+
convertData: (fromUnit: string, toUnit: string, data: number[]) => (number | undefined)[];
|
|
3
|
+
unitOfType: (unit: string) => "position" | "force" | "angle" | "mass" | "speed" | "angleVelocity" | undefined;
|
|
4
|
+
getSupportedUnits: () => {
|
|
5
|
+
force: readonly ["n", "kn", "mt", "tn"];
|
|
6
|
+
position: readonly ["m", "km", "nm"];
|
|
7
|
+
angle: readonly ["rad", "deg"];
|
|
8
|
+
mass: readonly ["kg", "t"];
|
|
9
|
+
speed: readonly ["ms", "kmh", "kn", "bft"];
|
|
10
|
+
angleVelocity: readonly ["rads", "degs", "degmin", "rpm"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=UnitConversion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnitConversion.d.ts","sourceRoot":"","sources":["../../src/conversion/UnitConversion.ts"],"names":[],"mappings":"AAgEA,eAAO,MAAM,iBAAiB;4BACG,MAAM,UAAU,MAAM,QAAQ,MAAM,EAAE;uBAuB3C,MAAM;;;;;;;;;CA6BjC,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
// Supported force units
|
|
2
|
+
const forceUnits = ["n", "kn", "mt", "tn"];
|
|
3
|
+
// Conversion functions for force units
|
|
4
|
+
const NTokN = (value) => value / 1000;
|
|
5
|
+
const NTomt = (value) => value / 9806.65;
|
|
6
|
+
const NTotn = (value) => value / 9806.65;
|
|
7
|
+
const kNToN = (value) => value * 1000;
|
|
8
|
+
const kNTomt = (value) => value / 9.80665;
|
|
9
|
+
const kNTotn = (value) => value / 9.80665;
|
|
10
|
+
const mtToN = (value) => value * 9806.65;
|
|
11
|
+
const mtTokN = (value) => value * 9.80665;
|
|
12
|
+
const mtTotn = (value) => value;
|
|
13
|
+
const tnToN = (value) => value * 9806.65;
|
|
14
|
+
const tnTokN = (value) => value * 9.80665;
|
|
15
|
+
const tnTomt = (value) => value;
|
|
16
|
+
// Supported position units
|
|
17
|
+
const positionUnits = ["m", "km", "nm"];
|
|
18
|
+
// Conversion functions for position units
|
|
19
|
+
const mTokm = (value) => value / 1000;
|
|
20
|
+
const mToNM = (value) => value / 1852;
|
|
21
|
+
const kmTom = (value) => value * 1000;
|
|
22
|
+
const kmToNM = (value) => value / 1.852;
|
|
23
|
+
const NMTom = (value) => value * 1852;
|
|
24
|
+
const NMTokm = (value) => value * 1.852;
|
|
25
|
+
// Supported angle units
|
|
26
|
+
const angleUNits = ["rad", "deg"];
|
|
27
|
+
// Conversion functions for angle units
|
|
28
|
+
const radTodeg = (value) => value * (180 / Math.PI);
|
|
29
|
+
const degTorad = (value) => value * (Math.PI / 180);
|
|
30
|
+
// Supported mass units
|
|
31
|
+
const massUnits = ["kg", "t"];
|
|
32
|
+
// Conversion functions for mass units
|
|
33
|
+
const kgTot = (value) => value / 1000;
|
|
34
|
+
const tTokg = (value) => value * 1000;
|
|
35
|
+
// Supported speed units
|
|
36
|
+
const SpeedUnits = ["ms", "kmh", "kn", "bft"];
|
|
37
|
+
// Conversion functions for speed units
|
|
38
|
+
const msTokmh = (value) => value * 3.6;
|
|
39
|
+
const msTokn = (value) => value * 1.94384;
|
|
40
|
+
const kmhToms = (value) => value / 3.6;
|
|
41
|
+
const kmhTokn = (value) => value / 1.8520042;
|
|
42
|
+
const knToms = (value) => value / 1.94384;
|
|
43
|
+
const knTokmh = (value) => value * 1.8520042;
|
|
44
|
+
// Supported angle speed units
|
|
45
|
+
const angleVelocityUnits = ["rads", "degs", "degmin", "rpm"];
|
|
46
|
+
// Conversion functions for angle speed units
|
|
47
|
+
const radsTodegs = (value) => value * (180 / Math.PI);
|
|
48
|
+
const radsTodegmin = (value) => value * (180 / Math.PI) * 60;
|
|
49
|
+
const degsToRads = (value) => (value * Math.PI) / 180;
|
|
50
|
+
const degsTodegmin = (value) => value / 60;
|
|
51
|
+
const degminTorads = (value) => (value * Math.PI) / 180 / 60;
|
|
52
|
+
const degminTodegs = (value) => value * 60;
|
|
53
|
+
export const useUnitConversion = () => {
|
|
54
|
+
const convertData = (fromUnit, toUnit, data) => {
|
|
55
|
+
const simplifiedFromUnit = fromUnit.replace(/[^a-zA-Z]/g, "").toLowerCase();
|
|
56
|
+
const simplifiedToUnit = toUnit.replace(/[^a-zA-Z]/g, "").toLowerCase();
|
|
57
|
+
if (forceUnits.some((unit) => unit === simplifiedFromUnit)) {
|
|
58
|
+
return forceConversion(simplifiedFromUnit, simplifiedToUnit, data);
|
|
59
|
+
}
|
|
60
|
+
else if (positionUnits.some((unit) => unit === simplifiedFromUnit)) {
|
|
61
|
+
return positionConversion(simplifiedFromUnit, simplifiedToUnit, data);
|
|
62
|
+
}
|
|
63
|
+
else if (angleUNits.some((unit) => unit === simplifiedFromUnit)) {
|
|
64
|
+
return angleConversion(simplifiedFromUnit, simplifiedToUnit, data);
|
|
65
|
+
}
|
|
66
|
+
else if (massUnits.some((unit) => unit === simplifiedFromUnit)) {
|
|
67
|
+
return massConversion(simplifiedFromUnit, simplifiedToUnit, data);
|
|
68
|
+
}
|
|
69
|
+
else if (SpeedUnits.some((unit) => unit === simplifiedFromUnit)) {
|
|
70
|
+
return speedConversion(simplifiedFromUnit, simplifiedToUnit, data);
|
|
71
|
+
}
|
|
72
|
+
else if (angleVelocityUnits.some((unit) => unit === simplifiedFromUnit)) {
|
|
73
|
+
return angleVelocityConversion(simplifiedFromUnit, simplifiedToUnit, data);
|
|
74
|
+
}
|
|
75
|
+
return data; // If no conversion is applicable, return the original data
|
|
76
|
+
};
|
|
77
|
+
const unitOfType = (unit) => {
|
|
78
|
+
if (forceUnits.some((u) => u === unit)) {
|
|
79
|
+
return "force";
|
|
80
|
+
}
|
|
81
|
+
else if (positionUnits.some((u) => u === unit)) {
|
|
82
|
+
return "position";
|
|
83
|
+
}
|
|
84
|
+
else if (angleUNits.some((u) => u === unit)) {
|
|
85
|
+
return "angle";
|
|
86
|
+
}
|
|
87
|
+
else if (massUnits.some((u) => u === unit)) {
|
|
88
|
+
return "mass";
|
|
89
|
+
}
|
|
90
|
+
else if (SpeedUnits.some((u) => u === unit)) {
|
|
91
|
+
return "speed";
|
|
92
|
+
}
|
|
93
|
+
else if (angleVelocityUnits.some((u) => u === unit)) {
|
|
94
|
+
return "angleVelocity";
|
|
95
|
+
}
|
|
96
|
+
return undefined; // If no matching unit type found
|
|
97
|
+
};
|
|
98
|
+
const getSupportedUnits = () => {
|
|
99
|
+
return {
|
|
100
|
+
force: forceUnits,
|
|
101
|
+
position: positionUnits,
|
|
102
|
+
angle: angleUNits,
|
|
103
|
+
mass: massUnits,
|
|
104
|
+
speed: SpeedUnits,
|
|
105
|
+
angleVelocity: angleVelocityUnits,
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
return { convertData, unitOfType, getSupportedUnits };
|
|
109
|
+
};
|
|
110
|
+
const forceConversion = (fromUnit, toUnit, data) => {
|
|
111
|
+
// Check if to unit is in the same category of this type
|
|
112
|
+
if (forceUnits.some((unit) => unit === toUnit)) {
|
|
113
|
+
return data.map((value) => {
|
|
114
|
+
if (fromUnit === "n") {
|
|
115
|
+
if (toUnit === "kn")
|
|
116
|
+
return NTokN(value);
|
|
117
|
+
if (toUnit === "mt")
|
|
118
|
+
return NTomt(value);
|
|
119
|
+
if (toUnit === "tn")
|
|
120
|
+
return NTotn(value);
|
|
121
|
+
}
|
|
122
|
+
else if (fromUnit === "kn") {
|
|
123
|
+
if (toUnit === "n")
|
|
124
|
+
return kNToN(value);
|
|
125
|
+
if (toUnit === "mt")
|
|
126
|
+
return kNTomt(value);
|
|
127
|
+
if (toUnit === "tn")
|
|
128
|
+
return kNTotn(value);
|
|
129
|
+
}
|
|
130
|
+
else if (fromUnit === "mt") {
|
|
131
|
+
if (toUnit === "n")
|
|
132
|
+
return mtToN(value);
|
|
133
|
+
if (toUnit === "kn")
|
|
134
|
+
return mtTokN(value);
|
|
135
|
+
if (toUnit === "tn")
|
|
136
|
+
return mtTotn(value);
|
|
137
|
+
}
|
|
138
|
+
else if (fromUnit === "tn") {
|
|
139
|
+
if (toUnit === "n")
|
|
140
|
+
return tnToN(value);
|
|
141
|
+
if (toUnit === "kn")
|
|
142
|
+
return tnTokN(value);
|
|
143
|
+
if (toUnit === "mt")
|
|
144
|
+
return tnTomt(value);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// if no matching units found, return the original data
|
|
149
|
+
return data;
|
|
150
|
+
};
|
|
151
|
+
const positionConversion = (fromUnit, toUnit, data) => {
|
|
152
|
+
// Check if to unit is in the same category of this type
|
|
153
|
+
if (positionUnits.some((unit) => unit === toUnit)) {
|
|
154
|
+
return data.map((value) => {
|
|
155
|
+
if (fromUnit === "m") {
|
|
156
|
+
if (toUnit === "km")
|
|
157
|
+
return mTokm(value);
|
|
158
|
+
if (toUnit === "nm")
|
|
159
|
+
return mToNM(value);
|
|
160
|
+
}
|
|
161
|
+
else if (fromUnit === "km") {
|
|
162
|
+
if (toUnit === "m")
|
|
163
|
+
return kmTom(value);
|
|
164
|
+
if (toUnit === "nm")
|
|
165
|
+
return kmToNM(value);
|
|
166
|
+
}
|
|
167
|
+
else if (fromUnit === "nm") {
|
|
168
|
+
if (toUnit === "m")
|
|
169
|
+
return NMTom(value);
|
|
170
|
+
if (toUnit === "km")
|
|
171
|
+
return NMTokm(value);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
// if no matching units found, return the original data
|
|
176
|
+
return data;
|
|
177
|
+
};
|
|
178
|
+
const angleConversion = (fromUnit, toUnit, data) => {
|
|
179
|
+
// Check if to unit is in the same category of this type
|
|
180
|
+
if (angleUNits.some((unit) => unit === toUnit)) {
|
|
181
|
+
return data.map((value) => {
|
|
182
|
+
if (fromUnit === "rad") {
|
|
183
|
+
if (toUnit === "deg")
|
|
184
|
+
return radTodeg(value);
|
|
185
|
+
}
|
|
186
|
+
else if (fromUnit === "deg") {
|
|
187
|
+
if (toUnit === "rad")
|
|
188
|
+
return degTorad(value);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
// if no matching units found, return the original data
|
|
193
|
+
return data;
|
|
194
|
+
};
|
|
195
|
+
const massConversion = (fromUnit, toUnit, data) => {
|
|
196
|
+
// Check if to unit is in the same category of this type
|
|
197
|
+
if (massUnits.some((unit) => unit === toUnit)) {
|
|
198
|
+
return data.map((value) => {
|
|
199
|
+
if (fromUnit === "kg") {
|
|
200
|
+
if (toUnit === "t")
|
|
201
|
+
return kgTot(value);
|
|
202
|
+
}
|
|
203
|
+
else if (fromUnit === "t") {
|
|
204
|
+
if (toUnit === "kg")
|
|
205
|
+
return tTokg(value);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
// if no matching units found, return the original data
|
|
210
|
+
return data;
|
|
211
|
+
};
|
|
212
|
+
const speedConversion = (fromUnit, toUnit, data) => {
|
|
213
|
+
// Check if to unit is in the same category of this type
|
|
214
|
+
if (SpeedUnits.some((unit) => unit === toUnit)) {
|
|
215
|
+
return data.map((value) => {
|
|
216
|
+
if (fromUnit === "ms") {
|
|
217
|
+
if (toUnit === "kmh")
|
|
218
|
+
return msTokmh(value);
|
|
219
|
+
if (toUnit === "kn")
|
|
220
|
+
return msTokn(value);
|
|
221
|
+
}
|
|
222
|
+
else if (fromUnit === "kmh") {
|
|
223
|
+
if (toUnit === "ms")
|
|
224
|
+
return kmhToms(value);
|
|
225
|
+
if (toUnit === "kn")
|
|
226
|
+
return kmhTokn(value);
|
|
227
|
+
}
|
|
228
|
+
else if (fromUnit === "kn") {
|
|
229
|
+
if (toUnit === "ms")
|
|
230
|
+
return knToms(value);
|
|
231
|
+
if (toUnit === "kmh")
|
|
232
|
+
return knTokmh(value);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
// if no matching units found, return the original data
|
|
237
|
+
return data;
|
|
238
|
+
};
|
|
239
|
+
const angleVelocityConversion = (fromUnit, toUnit, data) => {
|
|
240
|
+
// Check if to unit is in the same category of this type
|
|
241
|
+
if (angleVelocityUnits.some((unit) => unit === toUnit)) {
|
|
242
|
+
return data.map((value) => {
|
|
243
|
+
if (fromUnit === "rads") {
|
|
244
|
+
if (toUnit === "degs")
|
|
245
|
+
return radsTodegs(value);
|
|
246
|
+
if (toUnit === "degmin")
|
|
247
|
+
return radsTodegmin(value);
|
|
248
|
+
}
|
|
249
|
+
else if (fromUnit === "degs") {
|
|
250
|
+
if (toUnit === "rads")
|
|
251
|
+
return degsToRads(value);
|
|
252
|
+
if (toUnit === "degmin")
|
|
253
|
+
return degsTodegmin(value);
|
|
254
|
+
}
|
|
255
|
+
else if (fromUnit === "degmin") {
|
|
256
|
+
if (toUnit === "rads")
|
|
257
|
+
return degminTorads(value);
|
|
258
|
+
if (toUnit === "degs")
|
|
259
|
+
return degminTodegs(value);
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
// if no matching units found, return the original data
|
|
264
|
+
return data;
|
|
265
|
+
};
|
|
266
|
+
//# sourceMappingURL=UnitConversion.js.map
|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M,IAAI,QAAQ,KAAK,MAAM,EAAE;gBAC9B,IAAI,MAAM,KAAK,MAAM;oBAAE,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;gBAChD,IAAI,MAAM,KAAK,QAAQ;oBAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;aACrD;iBAAM,IAAI,QAAQ,KAAK,QAAQ,EAAE;gBAChC,IAAI,MAAM,KAAK,MAAM;oBAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;gBAClD,IAAI,MAAM,KAAK,MAAM;oBAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;aACnD;QACH,CAAC,CAAC,CAAC;KACJ;IACD,uDAAuD;IACvD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export declare const useMarkerDefinationData: (props: any) => Promise<any> | undefined;
|
|
2
|
-
export declare const useMarkerEventData: (props: any) => Promise<any> | undefined;
|
|
3
|
-
export declare const scoreMarkerEvent: (props: any) => Promise<any> | undefined;
|
|
4
|
-
export declare const deleteMarkerEvent: (props: any) => Promise<any> | undefined;
|
|
1
|
+
export declare const useMarkerDefinationData: (props: any) => Promise<any> | undefined;
|
|
2
|
+
export declare const useMarkerEventData: (props: any) => Promise<any> | undefined;
|
|
3
|
+
export declare const scoreMarkerEvent: (props: any) => Promise<any> | undefined;
|
|
4
|
+
export declare const deleteMarkerEvent: (props: any) => Promise<any> | undefined;
|
|
5
|
+
export declare const updateMarkerEvent: (props: any) => Promise<any> | undefined;
|
|
6
|
+
export declare const useMarkerGroupSearch: (props: any) => Promise<any> | undefined;
|
|
5
7
|
//# sourceMappingURL=useMarkerData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMarkerData.d.ts","sourceRoot":"","sources":["../../src/hooks/useMarkerData.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,UAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"useMarkerData.d.ts","sourceRoot":"","sources":["../../src/hooks/useMarkerData.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,UAAW,GAAG,6BAgBjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,GAAG,6BAa5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,GAAG,6BAa1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,GAAG,6BAa3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,GAAG,6BAa3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,GAAG,6BAa9C,CAAC"}
|
|
@@ -1,64 +1,94 @@
|
|
|
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
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
|
11
|
-
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
12
|
-
export const useMarkerDefinationData = (props) => {
|
|
13
|
-
const { apiReqSent, markerData, dataType } = props;
|
|
14
|
-
const { client } = useMeasurementsModule();
|
|
15
|
-
if (!apiReqSent) {
|
|
16
|
-
return client
|
|
17
|
-
.fetchReqData({ markerData, dataType })
|
|
18
|
-
.then((markerList) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
11
|
+
import { useMeasurementsModule } from "./useMeasurementsModule";
|
|
12
|
+
export const useMarkerDefinationData = (props) => {
|
|
13
|
+
const { apiReqSent, markerData, dataType } = props;
|
|
14
|
+
const { client } = useMeasurementsModule();
|
|
15
|
+
if (!apiReqSent) {
|
|
16
|
+
return client
|
|
17
|
+
.fetchReqData({ markerData, dataType })
|
|
18
|
+
.then((markerList) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
var _a;
|
|
20
|
+
if ((yield (markerList === null || markerList === void 0 ? void 0 : markerList.code)) === 200) {
|
|
21
|
+
if ((_a = markerList.group) === null || _a === void 0 ? void 0 : _a.params) {
|
|
22
|
+
return markerList.group;
|
|
23
|
+
}
|
|
24
|
+
return markerList.markerDefinitionData;
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export const useMarkerEventData = (props) => {
|
|
30
|
+
const { apiReqSent, markerData, dataType } = props;
|
|
31
|
+
const { client } = useMeasurementsModule();
|
|
32
|
+
if (!apiReqSent) {
|
|
33
|
+
return client
|
|
34
|
+
.fetchReqData({ markerData, dataType })
|
|
35
|
+
.then((markerList) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
+
if ((yield (markerList === null || markerList === void 0 ? void 0 : markerList.code)) === 200) {
|
|
37
|
+
return markerList.eventData;
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export const scoreMarkerEvent = (props) => {
|
|
43
|
+
const { markerData, dataType, scoreMark } = props;
|
|
44
|
+
const { client } = useMeasurementsModule();
|
|
45
|
+
if (scoreMark && markerData && markerData.file) {
|
|
46
|
+
return client
|
|
47
|
+
.fetchReqData({ markerData, dataType })
|
|
48
|
+
.then((markerEvent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
if ((yield (markerEvent === null || markerEvent === void 0 ? void 0 : markerEvent.code)) === 200) {
|
|
50
|
+
return markerEvent;
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export const deleteMarkerEvent = (props) => {
|
|
56
|
+
const { markerData, dataType, removeMarkerEvent } = props;
|
|
57
|
+
const { client } = useMeasurementsModule();
|
|
58
|
+
if (removeMarkerEvent && markerData && markerData.file) {
|
|
59
|
+
return client
|
|
60
|
+
.fetchReqData({ markerData, dataType })
|
|
61
|
+
.then((markerEvent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
|
+
if ((yield (markerEvent === null || markerEvent === void 0 ? void 0 : markerEvent.code)) === 200) {
|
|
63
|
+
return markerEvent;
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export const updateMarkerEvent = (props) => {
|
|
69
|
+
const { markerData, dataType, updateMarkerState } = props;
|
|
70
|
+
const { client } = useMeasurementsModule();
|
|
71
|
+
if (updateMarkerState && markerData && markerData.file) {
|
|
72
|
+
return client
|
|
73
|
+
.fetchReqData({ markerData, dataType })
|
|
74
|
+
.then((markerEvent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
+
if ((yield (markerEvent === null || markerEvent === void 0 ? void 0 : markerEvent.code)) === 200) {
|
|
76
|
+
return markerEvent;
|
|
77
|
+
}
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
export const useMarkerGroupSearch = (props) => {
|
|
82
|
+
const { apiReqSent, markerData, dataType } = props;
|
|
83
|
+
const { client } = useMeasurementsModule();
|
|
84
|
+
if (!apiReqSent) {
|
|
85
|
+
return client
|
|
86
|
+
.fetchReqData({ markerData, dataType })
|
|
87
|
+
.then((results) => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
+
if ((yield (results === null || results === void 0 ? void 0 : results.code)) === 200) {
|
|
89
|
+
return results.groups;
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
};
|
|
64
94
|
//# sourceMappingURL=useMarkerData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMarkerData.js","sourceRoot":"","sources":["../../src/hooks/useMarkerData.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAA+C;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAU,EAAE,EAAE;IACpD,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnD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aACvB;QACH,CAAC,CAAA,CAAC,CAAC;KACN;AACH,CAAC,CAAC"}
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import { MeasurementsTypes } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* A hook to retrieve a single measurement by id. Returns an async result.
|
|
4
|
-
*
|
|
5
|
-
* Also returns actions to mutate a measurement.
|
|
6
|
-
*
|
|
7
|
-
* @param measurementId The id of the measurement we want to retrieve.
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare const useMeasurement: (measurementId?: string) => {
|
|
11
|
-
measurement:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { MeasurementsTypes } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* A hook to retrieve a single measurement by id. Returns an async result.
|
|
4
|
+
*
|
|
5
|
+
* Also returns actions to mutate a measurement.
|
|
6
|
+
*
|
|
7
|
+
* @param measurementId The id of the measurement we want to retrieve.
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare const useMeasurement: (measurementId?: string) => {
|
|
11
|
+
measurement: {
|
|
12
|
+
id: string;
|
|
13
|
+
color?: string | undefined;
|
|
14
|
+
file: string;
|
|
15
|
+
frequency: number;
|
|
16
|
+
name: string;
|
|
17
|
+
unit: string;
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
yaxisLeftPos: string;
|
|
21
|
+
index: string[];
|
|
22
|
+
start: number;
|
|
23
|
+
end: number;
|
|
24
|
+
colorPerDataViewer?: {
|
|
25
|
+
byId: {
|
|
26
|
+
[key: string]: string;
|
|
27
|
+
};
|
|
28
|
+
} | undefined;
|
|
29
|
+
dataScale: number;
|
|
30
|
+
sampleRate: number;
|
|
31
|
+
minX: number;
|
|
32
|
+
minY: number;
|
|
33
|
+
maxX: number;
|
|
34
|
+
maxY: number;
|
|
35
|
+
} | undefined;
|
|
36
|
+
loading: boolean;
|
|
37
|
+
error: Error | undefined;
|
|
38
|
+
actions: {
|
|
39
|
+
readonly updateMeasurement: (changes: Partial<MeasurementsTypes.Measurement>) => void;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
18
42
|
//# sourceMappingURL=useMeasurement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMeasurement.d.ts","sourceRoot":"","sources":["../../src/hooks/useMeasurement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,mBAAoB,MAAM
|
|
1
|
+
{"version":3,"file":"useMeasurement.d.ts","sourceRoot":"","sources":["../../src/hooks/useMeasurement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,mBAAoB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAgBpB,QAAQ,kBAAkB,WAAW,CAAC;;CAiBtE,CAAC"}
|