@insync-stageplayer/measurements 0.4.5 → 0.4.8

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.
Files changed (85) hide show
  1. package/lib/AsyncSubject.d.ts +23 -23
  2. package/lib/AsyncSubject.js +64 -64
  3. package/lib/client/MeasurementDataClient.d.ts +124 -124
  4. package/lib/client/MeasurementDataClient.d.ts.map +1 -1
  5. package/lib/client/MeasurementDataClient.js +99 -99
  6. package/lib/client/MeasurementDataClient.js.map +1 -1
  7. package/lib/client/OnlineMeasurementDataClient.d.ts +42 -42
  8. package/lib/client/OnlineMeasurementDataClient.d.ts.map +1 -1
  9. package/lib/client/OnlineMeasurementDataClient.js +166 -166
  10. package/lib/client/OnlineMeasurementDataClient.js.map +1 -1
  11. package/lib/client/debug.d.ts +1 -1
  12. package/lib/client/debug.d.ts.map +1 -1
  13. package/lib/client/debug.js +4 -4
  14. package/lib/client/debug.js.map +1 -1
  15. package/lib/client/index.d.ts +2 -2
  16. package/lib/client/index.js +2 -2
  17. package/lib/client/offline/OfflineMeasurementDataClient.d.ts +14 -14
  18. package/lib/client/offline/OfflineMeasurementDataClient.js +41 -41
  19. package/lib/client/offline/offline.d.ts +16 -16
  20. package/lib/client/offline/offline.js +79 -79
  21. package/lib/client/sbf.d.ts +34 -34
  22. package/lib/client/sbf.js +88 -88
  23. package/lib/components/MeasurementsChooser.d.ts +34 -34
  24. package/lib/components/MeasurementsChooser.d.ts.map +1 -1
  25. package/lib/components/MeasurementsChooser.js +95 -88
  26. package/lib/components/MeasurementsChooser.js.map +1 -1
  27. package/lib/components/MeasurementsModuleProvider.d.ts +34 -34
  28. package/lib/components/MeasurementsModuleProvider.d.ts.map +1 -1
  29. package/lib/components/MeasurementsModuleProvider.js +73 -73
  30. package/lib/components/MeasurementsModuleProvider.js.map +1 -1
  31. package/lib/components/MeasurementsTable/CheckboxCell.d.ts +18 -18
  32. package/lib/components/MeasurementsTable/CheckboxCell.js +15 -15
  33. package/lib/components/MeasurementsTable/ColorCell.d.ts +29 -29
  34. package/lib/components/MeasurementsTable/ColorCell.js +57 -57
  35. package/lib/components/MeasurementsTable/ColorPicker.d.ts +3 -3
  36. package/lib/components/MeasurementsTable/ColorPicker.js +10 -10
  37. package/lib/components/MeasurementsTable/ColumnResizer.d.ts +4 -4
  38. package/lib/components/MeasurementsTable/ColumnResizer.js +5 -5
  39. package/lib/components/MeasurementsTable/ColumnSorting.d.ts +13 -13
  40. package/lib/components/MeasurementsTable/ColumnSorting.js +9 -9
  41. package/lib/components/MeasurementsTable/MeasurementsTable.d.ts +55 -55
  42. package/lib/components/MeasurementsTable/MeasurementsTable.d.ts.map +1 -1
  43. package/lib/components/MeasurementsTable/MeasurementsTable.js +182 -180
  44. package/lib/components/MeasurementsTable/MeasurementsTable.js.map +1 -1
  45. package/lib/components/MeasurementsTable/SelectedContext.d.ts +9 -9
  46. package/lib/components/MeasurementsTable/SelectedContext.js +9 -9
  47. package/lib/components/MeasurementsTable/TextColumnFilter.d.ts +8 -8
  48. package/lib/components/MeasurementsTable/TextColumnFilter.d.ts.map +1 -1
  49. package/lib/components/MeasurementsTable/TextColumnFilter.js +15 -15
  50. package/lib/components/MeasurementsTable/TextColumnFilter.js.map +1 -1
  51. package/lib/components/MeasurementsTable/filters.d.ts +2 -2
  52. package/lib/components/MeasurementsTable/filters.js +9 -9
  53. package/lib/components/MeasurementsTable/index.d.ts +1 -1
  54. package/lib/components/MeasurementsTable/index.js +1 -1
  55. package/lib/components/ModalMeasurementChooser.d.ts +19 -19
  56. package/lib/components/ModalMeasurementChooser.d.ts.map +1 -1
  57. package/lib/components/ModalMeasurementChooser.js +29 -29
  58. package/lib/components/ModalMeasurementChooser.js.map +1 -1
  59. package/lib/hooks/useDataScaleValue.d.ts +3 -0
  60. package/lib/hooks/useDataScaleValue.d.ts.map +1 -0
  61. package/lib/hooks/useDataScaleValue.js +9 -0
  62. package/lib/hooks/useDataScaleValue.js.map +1 -0
  63. package/lib/hooks/useMeasurement.d.ts +17 -17
  64. package/lib/hooks/useMeasurement.js +41 -41
  65. package/lib/hooks/useMeasurements.d.ts +9 -9
  66. package/lib/hooks/useMeasurements.js +16 -16
  67. package/lib/hooks/useMeasurementsModule.d.ts +18 -18
  68. package/lib/hooks/useMeasurementsModule.js +12 -12
  69. package/lib/hooks/useTimedMeasurementData.d.ts +26 -26
  70. package/lib/hooks/useTimedMeasurementData.d.ts.map +1 -1
  71. package/lib/hooks/useTimedMeasurementData.js +123 -125
  72. package/lib/hooks/useTimedMeasurementData.js.map +1 -1
  73. package/lib/hooks/useWindowedMeasurementData.d.ts +25 -25
  74. package/lib/hooks/useWindowedMeasurementData.js +119 -119
  75. package/lib/index.d.ts +12 -12
  76. package/lib/index.js +12 -12
  77. package/lib/redux/measurements.slice.d.ts +107 -107
  78. package/lib/redux/measurements.slice.d.ts.map +1 -1
  79. package/lib/redux/measurements.slice.js +71 -71
  80. package/lib/redux/measurements.slice.js.map +1 -1
  81. package/lib/redux/reducer.d.ts +8 -8
  82. package/lib/redux/reducer.js +2 -2
  83. package/lib/types.d.ts +65 -65
  84. package/lib/types.js +46 -46
  85. package/package.json +6 -6
@@ -1,24 +1,24 @@
1
- /**
2
- * An RxJS subject that represents an async action with a result that can fail.
3
- */
4
- import { Observable } from "rxjs";
5
- /**
6
- * The state of async action being performed.
7
- */
8
- export declare type AsyncState<T> = {
9
- loading: boolean;
10
- error?: Error;
11
- data?: T;
12
- };
13
- export declare type AsyncSubject<T> = {
14
- loadingStart: () => void;
15
- loadingSuccess: (data: T) => void;
16
- loadingError: (error: Error) => void;
17
- state: Observable<AsyncState<T>>;
18
- };
19
- /**
20
- * Factory function for creating an AsyncSubject.
21
- * @returns
22
- */
23
- export declare const createAsyncSubject: <T>() => AsyncSubject<T>;
1
+ /**
2
+ * An RxJS subject that represents an async action with a result that can fail.
3
+ */
4
+ import { Observable } from "rxjs";
5
+ /**
6
+ * The state of async action being performed.
7
+ */
8
+ export declare type AsyncState<T> = {
9
+ loading: boolean;
10
+ error?: Error;
11
+ data?: T;
12
+ };
13
+ export declare type AsyncSubject<T> = {
14
+ loadingStart: () => void;
15
+ loadingSuccess: (data: T) => void;
16
+ loadingError: (error: Error) => void;
17
+ state: Observable<AsyncState<T>>;
18
+ };
19
+ /**
20
+ * Factory function for creating an AsyncSubject.
21
+ * @returns
22
+ */
23
+ export declare const createAsyncSubject: <T>() => AsyncSubject<T>;
24
24
  //# sourceMappingURL=AsyncSubject.d.ts.map
@@ -1,65 +1,65 @@
1
- /**
2
- * An RxJS subject that represents an async action with a result that can fail.
3
- */
4
- import { ReplaySubject } from "rxjs";
5
- import { scan } from "rxjs/operators";
6
- /**
7
- * Redux-like action creators.
8
- * @returns
9
- */
10
- const createAsyncActions = () => ({
11
- /**
12
- * Creates an action that's dispatched when loading starts.
13
- * @returns
14
- */
15
- asyncStart: () => ({
16
- type: "LOADING",
17
- }),
18
- /**
19
- * Createes an action that's dispatched when loading completes.
20
- * @param data
21
- * @returns
22
- */
23
- asyncSuccess: (data) => ({
24
- type: "LOADING_FINISH",
25
- data,
26
- }),
27
- /**
28
- * Creates an action that's dispatched when loading has an error.
29
- * @param error
30
- * @returns
31
- */
32
- asyncError: (error) => ({
33
- type: "LOADING_ERROR",
34
- error,
35
- }),
36
- });
37
- /**
38
- * Factory function for creating an AsyncSubject.
39
- * @returns
40
- */
41
- export const createAsyncSubject = () => {
42
- const actions = createAsyncActions();
43
- const subject = new ReplaySubject();
44
- const state = subject.pipe(scan((state, action) => {
45
- switch (action.type) {
46
- case "LOADING":
47
- return Object.assign(Object.assign({}, state), { data: undefined, loading: true });
48
- case "LOADING_FINISH":
49
- return Object.assign(Object.assign({}, state), { loading: false, data: action.data });
50
- case "LOADING_ERROR":
51
- return Object.assign(Object.assign({}, state), { loading: false, error: action.error });
52
- default:
53
- return state;
54
- }
55
- }, { loading: false }));
56
- return {
57
- loadingStart: () => {
58
- subject.next(actions.asyncStart());
59
- },
60
- loadingSuccess: (data) => subject.next(actions.asyncSuccess(data)),
61
- loadingError: (error) => subject.next(actions.asyncError(error)),
62
- state,
63
- };
64
- };
1
+ /**
2
+ * An RxJS subject that represents an async action with a result that can fail.
3
+ */
4
+ import { ReplaySubject } from "rxjs";
5
+ import { scan } from "rxjs/operators";
6
+ /**
7
+ * Redux-like action creators.
8
+ * @returns
9
+ */
10
+ const createAsyncActions = () => ({
11
+ /**
12
+ * Creates an action that's dispatched when loading starts.
13
+ * @returns
14
+ */
15
+ asyncStart: () => ({
16
+ type: "LOADING",
17
+ }),
18
+ /**
19
+ * Createes an action that's dispatched when loading completes.
20
+ * @param data
21
+ * @returns
22
+ */
23
+ asyncSuccess: (data) => ({
24
+ type: "LOADING_FINISH",
25
+ data,
26
+ }),
27
+ /**
28
+ * Creates an action that's dispatched when loading has an error.
29
+ * @param error
30
+ * @returns
31
+ */
32
+ asyncError: (error) => ({
33
+ type: "LOADING_ERROR",
34
+ error,
35
+ }),
36
+ });
37
+ /**
38
+ * Factory function for creating an AsyncSubject.
39
+ * @returns
40
+ */
41
+ export const createAsyncSubject = () => {
42
+ const actions = createAsyncActions();
43
+ const subject = new ReplaySubject();
44
+ const state = subject.pipe(scan((state, action) => {
45
+ switch (action.type) {
46
+ case "LOADING":
47
+ return Object.assign(Object.assign({}, state), { data: undefined, loading: true });
48
+ case "LOADING_FINISH":
49
+ return Object.assign(Object.assign({}, state), { loading: false, data: action.data });
50
+ case "LOADING_ERROR":
51
+ return Object.assign(Object.assign({}, state), { loading: false, error: action.error });
52
+ default:
53
+ return state;
54
+ }
55
+ }, { loading: false }));
56
+ return {
57
+ loadingStart: () => {
58
+ subject.next(actions.asyncStart());
59
+ },
60
+ loadingSuccess: (data) => subject.next(actions.asyncSuccess(data)),
61
+ loadingError: (error) => subject.next(actions.asyncError(error)),
62
+ state,
63
+ };
64
+ };
65
65
  //# sourceMappingURL=AsyncSubject.js.map
@@ -1,125 +1,125 @@
1
- /**
2
- * Contains definition for MeasurementDataClient interface.
3
- */
4
- import { Observable } from "rxjs";
5
- import { MeasurementsTypes } from "../types";
6
- import { AsyncState } from "../AsyncSubject";
7
- import { NumberRange } from "@insync-stageplayer/common";
8
- export declare type FetchMeasurementDataArgs = {
9
- /**
10
- * File to retrieve data from.
11
- */
12
- file: string;
13
- /**
14
- * Measurements to retrieve data for.
15
- */
16
- measurements: string[];
17
- /**
18
- * Time from where data is being retrieved
19
- */
20
- offset: number;
21
- /**
22
- * The length of time of data being retrieved.
23
- */
24
- limit?: number;
25
- /**
26
- * The amount of points being retrieved over the selected range.
27
- */
28
- rows?: number;
29
- /**
30
- * The unit of our time (x) axis.
31
- */
32
- unit: "MICRO" | "MILLI" | "SECONDS";
33
- };
34
- export declare type CreateMeasurementDataObservableArgs = {
35
- /**
36
- * The file to read from.
37
- */
38
- file: string;
39
- /**
40
- * The observable emitting times.
41
- */
42
- time$: Observable<number>;
43
- /**
44
- * The measurements we want to retrieve a single row for.
45
- */
46
- measurements: string[];
47
- /**
48
- * The amount of rows we want
49
- */
50
- rows?: number;
51
- /**
52
- * The amount of time from the offset we want to retrieve data for
53
- */
54
- limit?: number;
55
- /**
56
- * The unit of our time (x) axis.
57
- */
58
- unit?: "MICRO" | "MILLI" | "SECONDS";
59
- };
60
- export declare type TemporalWindow = {
61
- from: number;
62
- length: number;
63
- };
64
- export declare type CreateWindowedMeasurementDataObservableArgs = Omit<CreateMeasurementDataObservableArgs, "duration"> & {
65
- /**
66
- * The visible amount of data, the currently emitted time will be in the middle of this.
67
- */
68
- visibleWindow: number;
69
- };
70
- export declare type MeasurementMetadata = {
71
- [key: string]: any;
72
- } & {
73
- frequency: number;
74
- name: string;
75
- unit: string;
76
- min: number;
77
- max: number;
78
- index: string[];
79
- file: string;
80
- };
81
- export declare type MeasurementDataResult = {
82
- measurementData: MeasurementsTypes.DataMap;
83
- range: NumberRange;
84
- };
85
- /**
86
- * Abstraction of a client with which MeasurementData can be retrieved.
87
- */
88
- export interface MeasurementDataClient {
89
- /**
90
- * Given a HDF5 file URI, returns normalized metadata about measurements contained in file.
91
- */
92
- fetchMetadata: (file: string) => Promise<MeasurementMetadata[]>;
93
- /**
94
- * Retrieves data for a specified list of measurements.
95
- */
96
- fetchMeasurementData: (args: FetchMeasurementDataArgs) => Promise<MeasurementsTypes.DataMap>;
97
- /**
98
- * Given a timer$ that emits times, returns an observable that will emit a specified amount of rows for specified time window from last emitted time.
99
- */
100
- createMeasurementDataObservable: (args: CreateMeasurementDataObservableArgs) => Observable<AsyncState<MeasurementDataResult>>;
101
- /**
102
- * Given a timer$ that emits times, returns an observable that will emit windowed data.
103
- *
104
- * Windowed means that a visibleWindow argument should be provided. The function will retrieve 4 times the amount
105
- * of time inside the visibleWindow. Treshold will be placed at 1/4 and 3/4 of the total amount of time. The cursor
106
- * (current time emitted by timer$) is placed in the middle of the total time. While the timer is ticking it might
107
- * pass one of the tresholds. When this happens, will attempt to retrieve new data.
108
- *
109
- */
110
- createWindowedMeasurementDataObservable: (args: CreateWindowedMeasurementDataObservableArgs) => Observable<AsyncState<MeasurementDataResult>>;
111
- }
112
- /**
113
- * Partially implemented class. Should be extended by implementation. This class will already implement the observables.
114
- * Only fetchMeasurementData and fetchMetadata should be implemented according to spec.
115
- */
116
- export declare abstract class AbstractMeasurementDataClient implements MeasurementDataClient {
117
- abstract fetchMeasurementData: MeasurementDataClient["fetchMeasurementData"];
118
- abstract fetchMetadata: MeasurementDataClient["fetchMetadata"];
119
- createMeasurementDataObservable: (args: CreateMeasurementDataObservableArgs) => Observable<AsyncState<MeasurementDataResult>>;
120
- createWindowedMeasurementDataObservable: (args: CreateWindowedMeasurementDataObservableArgs) => Observable<AsyncState<{
121
- measurementData: MeasurementsTypes.DataMap;
122
- range: NumberRange;
123
- }>>;
124
- }
1
+ /**
2
+ * Contains definition for MeasurementDataClient interface.
3
+ */
4
+ import { Observable } from "rxjs";
5
+ import { MeasurementsTypes } from "../types";
6
+ import { AsyncState } from "../AsyncSubject";
7
+ import { NumberRange } from "@insync-stageplayer/common";
8
+ export declare type FetchMeasurementDataArgs = {
9
+ /**
10
+ * File to retrieve data from.
11
+ */
12
+ file: string;
13
+ /**
14
+ * Measurements to retrieve data for.
15
+ */
16
+ measurements: string[];
17
+ /**
18
+ * Time from where data is being retrieved
19
+ */
20
+ offset: number;
21
+ /**
22
+ * The length of time of data being retrieved.
23
+ */
24
+ limit?: number;
25
+ /**
26
+ * The amount of points being retrieved over the selected range.
27
+ */
28
+ rows?: number;
29
+ /**
30
+ * The unit of our time (x) axis.
31
+ */
32
+ unit: "MICRO" | "MILLI" | "SECONDS";
33
+ };
34
+ export declare type CreateMeasurementDataObservableArgs = {
35
+ /**
36
+ * The file to read from.
37
+ */
38
+ file: string;
39
+ /**
40
+ * The observable emitting times.
41
+ */
42
+ time$: Observable<number>;
43
+ /**
44
+ * The measurements we want to retrieve a single row for.
45
+ */
46
+ measurements: string[];
47
+ /**
48
+ * The amount of rows we want
49
+ */
50
+ rows?: number;
51
+ /**
52
+ * The amount of time from the offset we want to retrieve data for
53
+ */
54
+ limit?: number;
55
+ /**
56
+ * The unit of our time (x) axis.
57
+ */
58
+ unit?: "MICRO" | "MILLI" | "SECONDS";
59
+ };
60
+ export declare type TemporalWindow = {
61
+ from: number;
62
+ length: number;
63
+ };
64
+ export declare type CreateWindowedMeasurementDataObservableArgs = Omit<CreateMeasurementDataObservableArgs, "duration"> & {
65
+ /**
66
+ * The visible amount of data, the currently emitted time will be in the middle of this.
67
+ */
68
+ visibleWindow: number;
69
+ };
70
+ export declare type MeasurementMetadata = {
71
+ [key: string]: any;
72
+ } & {
73
+ frequency: number;
74
+ name: string;
75
+ unit: string;
76
+ min: number;
77
+ max: number;
78
+ index: string[];
79
+ file: string;
80
+ };
81
+ export declare type MeasurementDataResult = {
82
+ measurementData: MeasurementsTypes.DataMap;
83
+ range: NumberRange;
84
+ };
85
+ /**
86
+ * Abstraction of a client with which MeasurementData can be retrieved.
87
+ */
88
+ export interface MeasurementDataClient {
89
+ /**
90
+ * Given a HDF5 file URI, returns normalized metadata about measurements contained in file.
91
+ */
92
+ fetchMetadata: (file: string) => Promise<MeasurementMetadata[]>;
93
+ /**
94
+ * Retrieves data for a specified list of measurements.
95
+ */
96
+ fetchMeasurementData: (args: FetchMeasurementDataArgs) => Promise<MeasurementsTypes.DataMap>;
97
+ /**
98
+ * Given a timer$ that emits times, returns an observable that will emit a specified amount of rows for specified time window from last emitted time.
99
+ */
100
+ createMeasurementDataObservable: (args: CreateMeasurementDataObservableArgs) => Observable<AsyncState<MeasurementDataResult>>;
101
+ /**
102
+ * Given a timer$ that emits times, returns an observable that will emit windowed data.
103
+ *
104
+ * Windowed means that a visibleWindow argument should be provided. The function will retrieve 4 times the amount
105
+ * of time inside the visibleWindow. Treshold will be placed at 1/4 and 3/4 of the total amount of time. The cursor
106
+ * (current time emitted by timer$) is placed in the middle of the total time. While the timer is ticking it might
107
+ * pass one of the tresholds. When this happens, will attempt to retrieve new data.
108
+ *
109
+ */
110
+ createWindowedMeasurementDataObservable: (args: CreateWindowedMeasurementDataObservableArgs) => Observable<AsyncState<MeasurementDataResult>>;
111
+ }
112
+ /**
113
+ * Partially implemented class. Should be extended by implementation. This class will already implement the observables.
114
+ * Only fetchMeasurementData and fetchMetadata should be implemented according to spec.
115
+ */
116
+ export declare abstract class AbstractMeasurementDataClient implements MeasurementDataClient {
117
+ abstract fetchMeasurementData: MeasurementDataClient["fetchMeasurementData"];
118
+ abstract fetchMetadata: MeasurementDataClient["fetchMetadata"];
119
+ createMeasurementDataObservable: (args: CreateMeasurementDataObservableArgs) => Observable<AsyncState<MeasurementDataResult>>;
120
+ createWindowedMeasurementDataObservable: (args: CreateWindowedMeasurementDataObservableArgs) => Observable<AsyncState<{
121
+ measurementData: MeasurementsTypes.DataMap;
122
+ range: NumberRange;
123
+ }>>;
124
+ }
125
125
  //# sourceMappingURL=MeasurementDataClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MeasurementDataClient.d.ts","sourceRoot":"","sources":["../../src/client/MeasurementDataClient.ts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C;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,eAAe,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAC3C,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAChE;;OAEG;IACH,oBAAoB,EAAE,CACpB,IAAI,EAAE,wBAAwB,KAC3B,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACxC;;OAEG;IACH,+BAA+B,EAAE,CAC/B,IAAI,EAAE,mCAAmC,KACtC,UAAU,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACnD;;;;;;;;OAQG;IACH,uCAAuC,EAAE,CACvC,IAAI,EAAE,2CAA2C,KAC9C,UAAU,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;CACpD;AAED;;;GAGG;AACH,8BAAsB,6BACpB,YAAW,qBAAqB;IAEhC,QAAQ,CAAC,oBAAoB,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;IAE7E,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAC;IAE/D,+BAA+B,SACvB,mCAAmC,mDAqDzC;IAEF,uCAAuC,SAC/B,2CAA2C;yBAM5B,kBAAkB,OAAO;eACnC,WAAW;QAiEtB;CACH"}
@@ -1,100 +1,100 @@
1
- /**
2
- * Contains definition for MeasurementDataClient interface.
3
- */
4
- import { of } from "rxjs";
5
- import { tap, exhaustMap, catchError, finalize, scan, distinct, debounceTime, } from "rxjs/operators";
6
- import { createAsyncSubject } from "../AsyncSubject";
7
- import { debug } from "./debug";
8
- /**
9
- * Partially implemented class. Should be extended by implementation. This class will already implement the observables.
10
- * Only fetchMeasurementData and fetchMetadata should be implemented according to spec.
11
- */
12
- export class AbstractMeasurementDataClient {
13
- constructor() {
14
- this.createMeasurementDataObservable = (args) => {
15
- const { time$, file, measurements: measurementIds, rows, limit, unit, } = args;
16
- const asyncSubject = createAsyncSubject();
17
- const sub = time$
18
- .pipe(tap(debug("time")), tap(() => {
19
- asyncSubject.loadingStart();
20
- }),
21
- /*
22
- * exhaustMap() will only emit when previous projected observable has completed. This makes sure we arn't sending out an excessive amount of requests to the endpoint.
23
- */
24
- exhaustMap((offset) => this.fetchMeasurementData({
25
- file,
26
- measurements: measurementIds,
27
- offset,
28
- unit: unit || "MILLI",
29
- rows,
30
- limit,
31
- }).then((measurementData) => ({
32
- measurementData,
33
- range: { from: offset, length: limit || 0 },
34
- }))), catchError((err) => {
35
- return of(new Error("Something went wrong: " + err));
36
- }), tap((data) => {
37
- if (data instanceof Error) {
38
- asyncSubject.loadingError(data);
39
- return;
40
- }
41
- asyncSubject.loadingSuccess(data);
42
- }))
43
- .subscribe();
44
- return asyncSubject.state.pipe(finalize(() => {
45
- sub.unsubscribe();
46
- }));
47
- };
48
- this.createWindowedMeasurementDataObservable = (args) => {
49
- const { time$, file, measurements, visibleWindow, unit, rows } = args;
50
- const asyncSubject = createAsyncSubject();
51
- const sub = time$
52
- .pipe(
53
- // We add a slight debounce, so that if there's a lot of requests after another, we only pick the latest.
54
- debounceTime(5), scan((acc, number) => {
55
- // We fetch 4 times the visible amount
56
- const total = visibleWindow * 4;
57
- // 1/4 of the total amount of time.
58
- const leftTreshold = acc.offset + visibleWindow;
59
- // 3/4 of the total amount of time.
60
- const rightTreshold = acc.offset + visibleWindow * 3;
61
- //If we pass 1/4 of the total amount of time we should get new data.
62
- const passedLeftTreshold = number < leftTreshold;
63
- // If we pass 3/4 of the total amount time also get new data.
64
- const passedRightTreshold = number > rightTreshold;
65
- return acc.offset === Infinity ||
66
- passedLeftTreshold ||
67
- passedRightTreshold
68
- ? {
69
- offset: number - total / 2,
70
- limit: total,
71
- rows: rows || 0 * 2,
72
- }
73
- : acc;
74
- }, { offset: Infinity, limit: 0, rows: 0 }), distinct(), tap(() => {
75
- asyncSubject.loadingStart();
76
- }), exhaustMap(({ offset, limit, rows: _rows }) => this.fetchMeasurementData({
77
- file,
78
- measurements,
79
- offset,
80
- limit,
81
- unit: unit || "MILLI",
82
- rows: _rows,
83
- }).then((measurementData) => ({
84
- measurementData,
85
- range: { from: offset, length: limit },
86
- }))), catchError((err) => {
87
- return of(new Error("Something went wrong: " + err));
88
- }), tap((data) => {
89
- if (data instanceof Error) {
90
- asyncSubject.loadingError(data);
91
- return;
92
- }
93
- asyncSubject.loadingSuccess(data);
94
- }))
95
- .subscribe();
96
- return asyncSubject.state.pipe(finalize(() => sub.unsubscribe()));
97
- };
98
- }
99
- }
1
+ /**
2
+ * Contains definition for MeasurementDataClient interface.
3
+ */
4
+ import { of } from "rxjs";
5
+ import { tap, exhaustMap, catchError, finalize, scan, distinct, debounceTime, } from "rxjs/operators";
6
+ import { createAsyncSubject } from "../AsyncSubject";
7
+ import { debug } from "./debug";
8
+ /**
9
+ * Partially implemented class. Should be extended by implementation. This class will already implement the observables.
10
+ * Only fetchMeasurementData and fetchMetadata should be implemented according to spec.
11
+ */
12
+ export class AbstractMeasurementDataClient {
13
+ constructor() {
14
+ this.createMeasurementDataObservable = (args) => {
15
+ const { time$, file, measurements: measurementIds, rows, limit, unit, } = args;
16
+ const asyncSubject = createAsyncSubject();
17
+ const sub = time$
18
+ .pipe(tap(debug("time")), tap(() => {
19
+ asyncSubject.loadingStart();
20
+ }),
21
+ /*
22
+ * exhaustMap() will only emit when previous projected observable has completed. This makes sure we arn't sending out an excessive amount of requests to the endpoint.
23
+ */
24
+ exhaustMap((offset) => this.fetchMeasurementData({
25
+ file,
26
+ measurements: measurementIds,
27
+ offset,
28
+ unit: unit || "MILLI",
29
+ rows,
30
+ limit,
31
+ }).then((measurementData) => ({
32
+ measurementData,
33
+ range: { from: offset, length: limit || 0 },
34
+ }))), catchError((err) => {
35
+ return of(new Error("Something went wrong: " + err));
36
+ }), tap((data) => {
37
+ if (data instanceof Error) {
38
+ asyncSubject.loadingError(data);
39
+ return;
40
+ }
41
+ asyncSubject.loadingSuccess(data);
42
+ }))
43
+ .subscribe();
44
+ return asyncSubject.state.pipe(finalize(() => {
45
+ sub.unsubscribe();
46
+ }));
47
+ };
48
+ this.createWindowedMeasurementDataObservable = (args) => {
49
+ const { time$, file, measurements, visibleWindow, unit, rows } = args;
50
+ const asyncSubject = createAsyncSubject();
51
+ const sub = time$
52
+ .pipe(
53
+ // We add a slight debounce, so that if there's a lot of requests after another, we only pick the latest.
54
+ debounceTime(5), scan((acc, number) => {
55
+ // We fetch 4 times the visible amount
56
+ const total = visibleWindow * 4;
57
+ // 1/4 of the total amount of time.
58
+ const leftTreshold = acc.offset + visibleWindow;
59
+ // 3/4 of the total amount of time.
60
+ const rightTreshold = acc.offset + visibleWindow * 3;
61
+ //If we pass 1/4 of the total amount of time we should get new data.
62
+ const passedLeftTreshold = number < leftTreshold;
63
+ // If we pass 3/4 of the total amount time also get new data.
64
+ const passedRightTreshold = number > rightTreshold;
65
+ return acc.offset === Infinity ||
66
+ passedLeftTreshold ||
67
+ passedRightTreshold
68
+ ? {
69
+ offset: number - total / 2,
70
+ limit: total,
71
+ rows: rows || 0 * 2,
72
+ }
73
+ : acc;
74
+ }, { offset: Infinity, limit: 0, rows: 0 }), distinct(), tap(() => {
75
+ asyncSubject.loadingStart();
76
+ }), exhaustMap(({ offset, limit, rows: _rows }) => this.fetchMeasurementData({
77
+ file,
78
+ measurements,
79
+ offset,
80
+ limit,
81
+ unit: unit || "MILLI",
82
+ rows: _rows,
83
+ }).then((measurementData) => ({
84
+ measurementData,
85
+ range: { from: offset, length: limit },
86
+ }))), catchError((err) => {
87
+ return of(new Error("Something went wrong: " + err));
88
+ }), tap((data) => {
89
+ if (data instanceof Error) {
90
+ asyncSubject.loadingError(data);
91
+ return;
92
+ }
93
+ asyncSubject.loadingSuccess(data);
94
+ }))
95
+ .subscribe();
96
+ return asyncSubject.state.pipe(finalize(() => sub.unsubscribe()));
97
+ };
98
+ }
99
+ }
100
100
  //# sourceMappingURL=MeasurementDataClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MeasurementDataClient.js","sourceRoot":"","sources":["../../src/client/MeasurementDataClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,EAAE,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EACL,GAAG,EACH,UAAU,EACV,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EAER,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAc,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAyHhC;;;GAGG;AACH,MAAM,OAAgB,6BAA6B;IAAnD;QAME,oCAA+B,GAAG,CAChC,IAAyC,EACzC,EAAE;YACF,MAAM,EACJ,KAAK,EACL,IAAI,EACJ,YAAY,EAAE,cAAc,EAC5B,IAAI,EACJ,KAAK,EACL,IAAI,GACL,GAAG,IAAI,CAAC;YAET,MAAM,YAAY,GAAG,kBAAkB,EAAyB,CAAC;YAEjE,MAAM,GAAG,GAAG,KAAK;iBACd,IAAI,CACH,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAClB,GAAG,CAAC,GAAG,EAAE;gBACP,YAAY,CAAC,YAAY,EAAE,CAAC;YAC9B,CAAC,CAAC;YACF;;eAEG;YACH,UAAU,CAAC,CAAC,MAAM,EAAE,EAAE,CACpB,IAAI,CAAC,oBAAoB,CAAC;gBACxB,IAAI;gBACJ,YAAY,EAAE,cAAc;gBAC5B,MAAM;gBACN,IAAI,EAAE,IAAI,IAAI,OAAO;gB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C,CAAC,EACF,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACX,IAAI,IAAI,YAAY,KAAK,EAAE;oBACzB,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;oBAChC,OAAO;iBACR;gBACD,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CACH;iBACA,SAAS,EAAE,CAAC;YAEf,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACpE,CAAC,CAAC;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"MeasurementDataClient.js","sourceRoot":"","sources":["../../src/client/MeasurementDataClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,EAAE,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EACL,GAAG,EACH,UAAU,EACV,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EAER,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAc,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAyHhC;;;GAGG;AACH,MAAM,OAAgB,6BAA6B;IAAnD;QAOE,oCAA+B,GAAG,CAChC,IAAyC,EACzC,EAAE;YACF,MAAM,EACJ,KAAK,EACL,IAAI,EACJ,YAAY,EAAE,cAAc,EAC5B,IAAI,EACJ,KAAK,EACL,IAAI,GACL,GAAG,IAAI,CAAC;YAET,MAAM,YAAY,GAAG,kBAAkB,EAAyB,CAAC;YAEjE,MAAM,GAAG,GAAG,KAAK;iBACd,IAAI,CACH,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAClB,GAAG,CAAC,GAAG,EAAE;gBACP,YAAY,CAAC,YAAY,EAAE,CAAC;YAC9B,CAAC,CAAC;YACF;;eAEG;YACH,UAAU,CAAC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