@insync-stageplayer/measurements 0.4.6 → 0.4.7
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 +124 -124
- package/lib/client/MeasurementDataClient.js +99 -99
- package/lib/client/OnlineMeasurementDataClient.d.ts +42 -42
- package/lib/client/OnlineMeasurementDataClient.js +166 -166
- package/lib/client/debug.d.ts +1 -1
- package/lib/client/debug.js +4 -4
- package/lib/client/index.d.ts +2 -2
- package/lib/client/index.js +2 -2
- package/lib/client/offline/OfflineMeasurementDataClient.d.ts +14 -14
- package/lib/client/offline/OfflineMeasurementDataClient.js +41 -41
- package/lib/client/offline/offline.d.ts +16 -16
- package/lib/client/offline/offline.js +79 -79
- package/lib/client/sbf.d.ts +34 -34
- package/lib/client/sbf.js +88 -88
- package/lib/components/MeasurementsChooser.d.ts +34 -34
- package/lib/components/MeasurementsChooser.js +95 -95
- package/lib/components/MeasurementsModuleProvider.d.ts +34 -34
- package/lib/components/MeasurementsModuleProvider.js +73 -73
- package/lib/components/MeasurementsTable/CheckboxCell.d.ts +18 -18
- package/lib/components/MeasurementsTable/CheckboxCell.js +15 -15
- package/lib/components/MeasurementsTable/ColorCell.d.ts +29 -29
- package/lib/components/MeasurementsTable/ColorCell.js +57 -57
- package/lib/components/MeasurementsTable/ColorPicker.d.ts +3 -3
- package/lib/components/MeasurementsTable/ColorPicker.js +10 -10
- package/lib/components/MeasurementsTable/ColumnResizer.d.ts +4 -4
- package/lib/components/MeasurementsTable/ColumnResizer.js +5 -5
- package/lib/components/MeasurementsTable/ColumnSorting.d.ts +13 -13
- package/lib/components/MeasurementsTable/ColumnSorting.js +9 -9
- package/lib/components/MeasurementsTable/MeasurementsTable.d.ts +55 -55
- package/lib/components/MeasurementsTable/MeasurementsTable.js +182 -182
- package/lib/components/MeasurementsTable/SelectedContext.d.ts +9 -9
- package/lib/components/MeasurementsTable/SelectedContext.js +9 -9
- package/lib/components/MeasurementsTable/TextColumnFilter.d.ts +8 -8
- package/lib/components/MeasurementsTable/TextColumnFilter.js +15 -15
- package/lib/components/MeasurementsTable/filters.d.ts +2 -2
- package/lib/components/MeasurementsTable/filters.js +9 -9
- package/lib/components/MeasurementsTable/index.d.ts +1 -1
- package/lib/components/MeasurementsTable/index.js +1 -1
- package/lib/components/ModalMeasurementChooser.d.ts +19 -19
- package/lib/components/ModalMeasurementChooser.js +29 -29
- package/lib/hooks/useMeasurement.d.ts +17 -17
- package/lib/hooks/useMeasurement.js +41 -41
- package/lib/hooks/useMeasurements.d.ts +9 -9
- package/lib/hooks/useMeasurements.js +16 -16
- package/lib/hooks/useMeasurementsModule.d.ts +18 -18
- package/lib/hooks/useMeasurementsModule.js +12 -12
- package/lib/hooks/useTimedMeasurementData.d.ts +26 -26
- package/lib/hooks/useTimedMeasurementData.js +123 -123
- package/lib/hooks/useWindowedMeasurementData.d.ts +25 -25
- package/lib/hooks/useWindowedMeasurementData.js +119 -119
- package/lib/index.d.ts +12 -12
- package/lib/index.js +12 -12
- package/lib/redux/measurements.slice.d.ts +107 -107
- package/lib/redux/measurements.slice.js +71 -71
- package/lib/redux/reducer.d.ts +8 -8
- package/lib/redux/reducer.js +2 -2
- package/lib/types.d.ts +65 -65
- package/lib/types.js +46 -46
- package/package.json +6 -6
|
@@ -1,72 +1,72 @@
|
|
|
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
|
-
};
|
|
35
|
-
const measurementsSlice = createSlice({
|
|
36
|
-
name: "measurements",
|
|
37
|
-
initialState: measurementsAdapter.getInitialState({
|
|
38
|
-
error: undefined,
|
|
39
|
-
loading: false,
|
|
40
|
-
didInvalidate: true,
|
|
41
|
-
measurementScale: 1,
|
|
42
|
-
files: [],
|
|
43
|
-
colors: [
|
|
44
|
-
"#1f77b4",
|
|
45
|
-
"#ff7f0e",
|
|
46
|
-
"#2ca02c",
|
|
47
|
-
"#d62728",
|
|
48
|
-
"#9467bd",
|
|
49
|
-
"#8c564b",
|
|
50
|
-
"#e377c2",
|
|
51
|
-
"#7f7f7f",
|
|
52
|
-
"#bcbd22",
|
|
53
|
-
"#17becf",
|
|
54
|
-
],
|
|
55
|
-
}),
|
|
56
|
-
reducers,
|
|
57
|
-
});
|
|
58
|
-
export const { setFiles, createMeasurement, updateMeasurement, updateMeasurements, invalidate, measurementsReceived, measurementsLoading, measurementsError, } = measurementsSlice.actions;
|
|
59
|
-
/**
|
|
60
|
-
* Selects (from the state) the index of the color that should be applied to the next measurements
|
|
61
|
-
* @param state The state from which the value should be selected.
|
|
62
|
-
* @returns
|
|
63
|
-
*/
|
|
64
|
-
export const selectLastColorIndex = (state) => {
|
|
65
|
-
const index = state.ids.reduce((acc, curr) => {
|
|
66
|
-
const measurement = state.entities[curr];
|
|
67
|
-
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);
|
|
68
|
-
}, -1);
|
|
69
|
-
return index;
|
|
70
|
-
};
|
|
71
|
-
export default measurementsSlice.reducer;
|
|
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
|
+
};
|
|
35
|
+
const measurementsSlice = createSlice({
|
|
36
|
+
name: "measurements",
|
|
37
|
+
initialState: measurementsAdapter.getInitialState({
|
|
38
|
+
error: undefined,
|
|
39
|
+
loading: false,
|
|
40
|
+
didInvalidate: true,
|
|
41
|
+
measurementScale: 1,
|
|
42
|
+
files: [],
|
|
43
|
+
colors: [
|
|
44
|
+
"#1f77b4",
|
|
45
|
+
"#ff7f0e",
|
|
46
|
+
"#2ca02c",
|
|
47
|
+
"#d62728",
|
|
48
|
+
"#9467bd",
|
|
49
|
+
"#8c564b",
|
|
50
|
+
"#e377c2",
|
|
51
|
+
"#7f7f7f",
|
|
52
|
+
"#bcbd22",
|
|
53
|
+
"#17becf",
|
|
54
|
+
],
|
|
55
|
+
}),
|
|
56
|
+
reducers,
|
|
57
|
+
});
|
|
58
|
+
export const { setFiles, createMeasurement, updateMeasurement, updateMeasurements, invalidate, measurementsReceived, measurementsLoading, measurementsError, } = measurementsSlice.actions;
|
|
59
|
+
/**
|
|
60
|
+
* Selects (from the state) the index of the color that should be applied to the next measurements
|
|
61
|
+
* @param state The state from which the value should be selected.
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
export const selectLastColorIndex = (state) => {
|
|
65
|
+
const index = state.ids.reduce((acc, curr) => {
|
|
66
|
+
const measurement = state.entities[curr];
|
|
67
|
+
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);
|
|
68
|
+
}, -1);
|
|
69
|
+
return index;
|
|
70
|
+
};
|
|
71
|
+
export default measurementsSlice.reducer;
|
|
72
72
|
//# sourceMappingURL=measurements.slice.js.map
|
package/lib/redux/reducer.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const measurementsModuleReducer: import("redux").Reducer<import("@reduxjs/toolkit").EntityState<import("..").MeasurementsTypes.Measurement> & {
|
|
2
|
-
error: Error | undefined;
|
|
3
|
-
loading: boolean;
|
|
4
|
-
didInvalidate: boolean;
|
|
5
|
-
measurementScale: number;
|
|
6
|
-
files: import("./measurements.slice").MeasurementsFile[];
|
|
7
|
-
colors: string[];
|
|
8
|
-
}, import("redux").AnyAction>;
|
|
1
|
+
export declare const measurementsModuleReducer: import("redux").Reducer<import("@reduxjs/toolkit").EntityState<import("..").MeasurementsTypes.Measurement> & {
|
|
2
|
+
error: Error | undefined;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
didInvalidate: boolean;
|
|
5
|
+
measurementScale: number;
|
|
6
|
+
files: import("./measurements.slice").MeasurementsFile[];
|
|
7
|
+
colors: string[];
|
|
8
|
+
}, import("redux").AnyAction>;
|
|
9
9
|
//# sourceMappingURL=reducer.d.ts.map
|
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/types.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
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
|
-
index: string[];
|
|
12
|
-
start: number;
|
|
13
|
-
end: number;
|
|
14
|
-
};
|
|
15
|
-
type Request = {
|
|
16
|
-
action: string;
|
|
17
|
-
id: string;
|
|
18
|
-
params: {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
type Response<T = unknown> = {
|
|
23
|
-
code: number;
|
|
24
|
-
id: string;
|
|
25
|
-
data: {
|
|
26
|
-
id: string;
|
|
27
|
-
} & T;
|
|
28
|
-
};
|
|
29
|
-
type DataResponseData = {
|
|
30
|
-
file: string;
|
|
31
|
-
measurements: {
|
|
32
|
-
[key: string]: [number, number][];
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
type MetadataResponseMeasurement = {
|
|
36
|
-
type: "measurement";
|
|
37
|
-
} & Pick<Measurement, "name" | "min" | "max" | "unit" | "frequency">;
|
|
38
|
-
type MetadataResponseGroup = {
|
|
39
|
-
type: "group";
|
|
40
|
-
name: string;
|
|
41
|
-
children: MetadataResponseNode[];
|
|
42
|
-
};
|
|
43
|
-
type MetadataResponseNode = MetadataResponseMeasurement | MetadataResponseGroup;
|
|
44
|
-
type MetadataResponseData = {
|
|
45
|
-
metadata: MetadataResponseGroup;
|
|
46
|
-
};
|
|
47
|
-
type ErrorResponseData = {
|
|
48
|
-
error: {
|
|
49
|
-
message: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
type DataResponse = Response<DataResponseData>;
|
|
53
|
-
type MetadataResponse = Response<MetadataResponseData>;
|
|
54
|
-
type ErrorResponse = Response<ErrorResponseData>;
|
|
55
|
-
type DataMap = {
|
|
56
|
-
[key: string]: (number | "NaN")[][];
|
|
57
|
-
};
|
|
58
|
-
function isObject(input: unknown): boolean;
|
|
59
|
-
function isResponse<T = unknown>(input: unknown): input is Response<T>;
|
|
60
|
-
function isErrorResponse(input: unknown): input is ErrorResponse;
|
|
61
|
-
function isDataResponse(input: unknown): input is DataResponse;
|
|
62
|
-
function isMetadataResponseGroup(input: unknown): input is MetadataResponseGroup;
|
|
63
|
-
function isMetadataResponseMeasurement(input: unknown): input is MetadataResponseMeasurement;
|
|
64
|
-
function isMetadataResponseNode(input: unknown): input is MetadataResponseNode;
|
|
65
|
-
}
|
|
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
|
+
index: string[];
|
|
12
|
+
start: number;
|
|
13
|
+
end: number;
|
|
14
|
+
};
|
|
15
|
+
type Request = {
|
|
16
|
+
action: string;
|
|
17
|
+
id: string;
|
|
18
|
+
params: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type Response<T = unknown> = {
|
|
23
|
+
code: number;
|
|
24
|
+
id: string;
|
|
25
|
+
data: {
|
|
26
|
+
id: string;
|
|
27
|
+
} & T;
|
|
28
|
+
};
|
|
29
|
+
type DataResponseData = {
|
|
30
|
+
file: string;
|
|
31
|
+
measurements: {
|
|
32
|
+
[key: string]: [number, number][];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type MetadataResponseMeasurement = {
|
|
36
|
+
type: "measurement";
|
|
37
|
+
} & Pick<Measurement, "name" | "min" | "max" | "unit" | "frequency">;
|
|
38
|
+
type MetadataResponseGroup = {
|
|
39
|
+
type: "group";
|
|
40
|
+
name: string;
|
|
41
|
+
children: MetadataResponseNode[];
|
|
42
|
+
};
|
|
43
|
+
type MetadataResponseNode = MetadataResponseMeasurement | MetadataResponseGroup;
|
|
44
|
+
type MetadataResponseData = {
|
|
45
|
+
metadata: MetadataResponseGroup;
|
|
46
|
+
};
|
|
47
|
+
type ErrorResponseData = {
|
|
48
|
+
error: {
|
|
49
|
+
message: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type DataResponse = Response<DataResponseData>;
|
|
53
|
+
type MetadataResponse = Response<MetadataResponseData>;
|
|
54
|
+
type ErrorResponse = Response<ErrorResponseData>;
|
|
55
|
+
type DataMap = {
|
|
56
|
+
[key: string]: (number | "NaN")[][];
|
|
57
|
+
};
|
|
58
|
+
function isObject(input: unknown): boolean;
|
|
59
|
+
function isResponse<T = unknown>(input: unknown): input is Response<T>;
|
|
60
|
+
function isErrorResponse(input: unknown): input is ErrorResponse;
|
|
61
|
+
function isDataResponse(input: unknown): input is DataResponse;
|
|
62
|
+
function isMetadataResponseGroup(input: unknown): input is MetadataResponseGroup;
|
|
63
|
+
function isMetadataResponseMeasurement(input: unknown): input is MetadataResponseMeasurement;
|
|
64
|
+
function isMetadataResponseNode(input: unknown): input is MetadataResponseNode;
|
|
65
|
+
}
|
|
66
66
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
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 isMetadataResponseGroup(input) {
|
|
31
|
-
const _input = input;
|
|
32
|
-
return (isObject(_input) &&
|
|
33
|
-
_input.type === "group" &&
|
|
34
|
-
Array.isArray(_input.children));
|
|
35
|
-
}
|
|
36
|
-
MeasurementsTypes.isMetadataResponseGroup = isMetadataResponseGroup;
|
|
37
|
-
function isMetadataResponseMeasurement(input) {
|
|
38
|
-
const _input = input;
|
|
39
|
-
return isObject(_input) && _input.type === "measurement";
|
|
40
|
-
}
|
|
41
|
-
MeasurementsTypes.isMetadataResponseMeasurement = isMetadataResponseMeasurement;
|
|
42
|
-
function isMetadataResponseNode(input) {
|
|
43
|
-
return (isMetadataResponseGroup(input) || isMetadataResponseMeasurement(input));
|
|
44
|
-
}
|
|
45
|
-
MeasurementsTypes.isMetadataResponseNode = isMetadataResponseNode;
|
|
46
|
-
})(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 isMetadataResponseGroup(input) {
|
|
31
|
+
const _input = input;
|
|
32
|
+
return (isObject(_input) &&
|
|
33
|
+
_input.type === "group" &&
|
|
34
|
+
Array.isArray(_input.children));
|
|
35
|
+
}
|
|
36
|
+
MeasurementsTypes.isMetadataResponseGroup = isMetadataResponseGroup;
|
|
37
|
+
function isMetadataResponseMeasurement(input) {
|
|
38
|
+
const _input = input;
|
|
39
|
+
return isObject(_input) && _input.type === "measurement";
|
|
40
|
+
}
|
|
41
|
+
MeasurementsTypes.isMetadataResponseMeasurement = isMetadataResponseMeasurement;
|
|
42
|
+
function isMetadataResponseNode(input) {
|
|
43
|
+
return (isMetadataResponseGroup(input) || isMetadataResponseMeasurement(input));
|
|
44
|
+
}
|
|
45
|
+
MeasurementsTypes.isMetadataResponseNode = isMetadataResponseNode;
|
|
46
|
+
})(MeasurementsTypes || (MeasurementsTypes = {}));
|
|
47
47
|
//# sourceMappingURL=types.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insync-stageplayer/measurements",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
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,9 +29,9 @@
|
|
|
29
29
|
"storybook": "start-storybook -p 6006"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@insync-stageplayer/common": "^0.4.
|
|
33
|
-
"@insync-stageplayer/time": "^0.4.
|
|
34
|
-
"@insync-stageplayer/ui-components": "^0.4.
|
|
32
|
+
"@insync-stageplayer/common": "^0.4.7",
|
|
33
|
+
"@insync-stageplayer/time": "^0.4.7",
|
|
34
|
+
"@insync-stageplayer/ui-components": "^0.4.7",
|
|
35
35
|
"@reduxjs/toolkit": "^1.5.1",
|
|
36
36
|
"@types/randomcolor": "^0.5.5",
|
|
37
37
|
"insync-date": "^1.1.2",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"mock-socket": "^9.0.3"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"sbfreader": "^1.0.0-alpha.
|
|
54
|
+
"sbfreader": "^1.0.0-alpha.5"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "ea3d4ab99b347a3223c669c5eb9792f834b6fad1"
|
|
57
57
|
}
|