@rfkit/charts 1.0.104 → 1.1.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/README.md +7 -2
- package/components/Band/index.d.ts +1 -1
- package/components/Markers/index.d.ts +2 -2
- package/config/constants.d.ts +6 -4
- package/config/setting.d.ts +3 -2
- package/hooks/useChartComponent.d.ts +17 -0
- package/hooks/usePublish.d.ts +2 -1
- package/hooks/useSafePublish.d.ts +13 -0
- package/hooks/useSpectrumAnalyzer/useTemplateComparison.d.ts +1 -1
- package/index.d.ts +3 -2
- package/index.js +410 -253
- package/lib/Dial/Chart.d.ts +1 -2
- package/lib/Dial/index.d.ts +2 -1
- package/lib/Gauge/Chart.d.ts +1 -2
- package/lib/Gauge/index.d.ts +2 -1
- package/lib/Heatmap/Chart.d.ts +1 -2
- package/lib/Heatmap/index.d.ts +2 -1
- package/lib/IQ/Chart.d.ts +1 -2
- package/lib/IQ/index.d.ts +2 -1
- package/lib/LevelStream/Chart.d.ts +1 -2
- package/lib/LevelStream/index.d.ts +1 -1
- package/lib/Occupancy/Chart.d.ts +1 -2
- package/lib/Occupancy/index.d.ts +1 -1
- package/lib/SpatialSpectrum/Chart.d.ts +1 -2
- package/lib/SpatialSpectrum/index.d.ts +2 -2
- package/lib/Spectrum/Chart.d.ts +1 -2
- package/lib/Spectrum/index.d.ts +1 -1
- package/modules/Spectrum/render.d.ts +1 -0
- package/package.json +1 -1
- package/store/reducer.d.ts +2 -2
- package/types/common.d.ts +4 -1
- package/types/publish.d.ts +10 -4
- package/types/store.d.ts +4 -3
package/lib/Dial/Chart.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ParamsProps
|
|
2
|
+
import type { ParamsProps } from '../../types';
|
|
3
3
|
export interface Props extends ParamsProps {
|
|
4
|
-
publish?: RecursiveFunction;
|
|
5
4
|
}
|
|
6
5
|
declare const Chart: React.FC<Props>;
|
|
7
6
|
export default Chart;
|
package/lib/Dial/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import type { Props } from './Chart';
|
|
2
|
-
declare const Dial: React.
|
|
3
|
+
declare const Dial: React.ForwardRefExoticComponent<Omit<Omit<Props, "publish">, "ref"> & React.RefAttributes<import("../..").Publish>>;
|
|
3
4
|
export default Dial;
|
package/lib/Gauge/Chart.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ParamsProps
|
|
2
|
+
import type { ParamsProps } from '../../types';
|
|
3
3
|
export interface Props extends ParamsProps {
|
|
4
4
|
axisY?: {
|
|
5
5
|
range?: [number, number];
|
|
6
6
|
};
|
|
7
|
-
publish?: RecursiveFunction;
|
|
8
7
|
onChange?: (limit: number) => void;
|
|
9
8
|
}
|
|
10
9
|
declare const Chart: React.FC<Props>;
|
package/lib/Gauge/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import type { Props } from './Chart';
|
|
2
|
-
declare const Gauge: React.
|
|
3
|
+
declare const Gauge: React.ForwardRefExoticComponent<Omit<Omit<Props, "publish">, "ref"> & React.RefAttributes<import("../..").Publish>>;
|
|
3
4
|
export default Gauge;
|
package/lib/Heatmap/Chart.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ParamsProps
|
|
2
|
+
import type { ParamsProps } from '../../types';
|
|
3
3
|
export interface Props extends ParamsProps {
|
|
4
4
|
heatmapDefaultData?: Array<Array<number>>;
|
|
5
|
-
publish?: RecursiveFunction;
|
|
6
5
|
}
|
|
7
6
|
declare const Chart: React.FC<Props>;
|
|
8
7
|
export default Chart;
|
package/lib/Heatmap/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import type { Props } from './Chart';
|
|
2
|
-
declare const Heatmap: React.
|
|
3
|
+
declare const Heatmap: React.ForwardRefExoticComponent<Omit<Omit<Props, "publish">, "ref"> & React.RefAttributes<import("../..").Publish>>;
|
|
3
4
|
export default Heatmap;
|
package/lib/IQ/Chart.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { ChartType } from '../../config';
|
|
3
|
-
import type { ParamsProps
|
|
3
|
+
import type { ParamsProps } from '../../types';
|
|
4
4
|
export interface Props extends ParamsProps {
|
|
5
5
|
type: ChartType;
|
|
6
|
-
publish?: RecursiveFunction;
|
|
7
6
|
}
|
|
8
7
|
declare const Chart: React.FC<Props>;
|
|
9
8
|
export default Chart;
|
package/lib/IQ/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ParamsProps
|
|
2
|
+
import type { ParamsProps } from '../../types';
|
|
3
3
|
export interface Props extends ParamsProps {
|
|
4
|
-
publish?: RecursiveFunction;
|
|
5
4
|
statisticsTime?: number;
|
|
6
5
|
}
|
|
7
6
|
declare const Chart: React.FC<Props>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { Props } from './Chart';
|
|
3
|
-
declare const LevelStream: React.
|
|
3
|
+
declare const LevelStream: React.ForwardRefExoticComponent<Omit<Omit<Props, "publish">, "ref"> & React.RefAttributes<import("../..").Publish>>;
|
|
4
4
|
export default LevelStream;
|
package/lib/Occupancy/Chart.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ParamsProps
|
|
2
|
+
import type { ParamsProps } from '../../types';
|
|
3
3
|
export interface Props extends ParamsProps {
|
|
4
|
-
publish?: RecursiveFunction;
|
|
5
4
|
}
|
|
6
5
|
declare const Chart: React.FC<Props>;
|
|
7
6
|
export default Chart;
|
package/lib/Occupancy/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { Props } from './Chart';
|
|
3
|
-
declare const Occupancy: React.
|
|
3
|
+
declare const Occupancy: React.ForwardRefExoticComponent<Omit<Omit<Props, "publish">, "ref"> & React.RefAttributes<import("../..").Publish>>;
|
|
4
4
|
export default Occupancy;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { ParamsProps
|
|
2
|
+
import type { ParamsProps } from '../../types';
|
|
3
3
|
interface Props extends ParamsProps {
|
|
4
|
-
publish?: RecursiveFunction;
|
|
5
4
|
}
|
|
6
5
|
declare const Chart: React.FC<Props>;
|
|
7
6
|
export default Chart;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ParamsProps } from '../../types';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const SpatialSpectrum: import("react").ForwardRefExoticComponent<Omit<Omit<ParamsProps, "publish">, "ref"> & import("react").RefAttributes<import("../../types").Publish>>;
|
|
3
|
+
export default SpatialSpectrum;
|
package/lib/Spectrum/Chart.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type Props as SpectrumChartTypeProps } from '../../hooks/useSpectrumChartType';
|
|
2
2
|
import { type Props as SpectrumRuleProps } from '../../hooks/useSpectrumRule';
|
|
3
|
-
import type { ParamsProps,
|
|
3
|
+
import type { ParamsProps, RecursiveObject } from '../../types';
|
|
4
4
|
export interface Props extends SpectrumChartTypeProps, SpectrumRuleProps, ParamsProps {
|
|
5
5
|
selecter?: RecursiveObject;
|
|
6
|
-
publish?: RecursiveFunction;
|
|
7
6
|
occupancyElementID?: string;
|
|
8
7
|
}
|
|
9
8
|
declare const Chart: React.FC<Props>;
|
package/lib/Spectrum/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { Props } from './Chart';
|
|
3
|
-
declare const Spectrum: React.
|
|
3
|
+
declare const Spectrum: React.ForwardRefExoticComponent<Omit<Omit<Props, "publish">, "ref"> & React.RefAttributes<import("../..").Publish>>;
|
|
4
4
|
export default Spectrum;
|
package/package.json
CHANGED
package/store/reducer.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const defaultState: () => {
|
|
|
30
30
|
levelStream?: import("../types").LevelStreamProps;
|
|
31
31
|
timeRange?: number;
|
|
32
32
|
stationInfo: import("../types").StationInfoProps;
|
|
33
|
-
publish?: import("..").
|
|
33
|
+
publish?: import("..").Publish;
|
|
34
34
|
};
|
|
35
35
|
export declare const reducer: (state: StoreState, action: DispatchAction) => {
|
|
36
36
|
[x: string]: unknown;
|
|
@@ -62,5 +62,5 @@ export declare const reducer: (state: StoreState, action: DispatchAction) => {
|
|
|
62
62
|
levelStream?: import("../types").LevelStreamProps;
|
|
63
63
|
timeRange?: number;
|
|
64
64
|
stationInfo: import("../types").StationInfoProps;
|
|
65
|
-
publish?: import("..").
|
|
65
|
+
publish?: import("..").Publish;
|
|
66
66
|
};
|
package/types/common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphicType } from '../engine';
|
|
2
|
-
import type { RecursiveObject, SetSeries } from './';
|
|
2
|
+
import type { Publish, RecursiveObject, SetSeries } from './';
|
|
3
3
|
export type AxisYRange = [number, number];
|
|
4
4
|
export interface AxisXRange {
|
|
5
5
|
start: number;
|
|
@@ -93,3 +93,6 @@ export interface StationInfoType {
|
|
|
93
93
|
startFrequency: number;
|
|
94
94
|
stopFrequency: number;
|
|
95
95
|
}
|
|
96
|
+
export interface ChartRef {
|
|
97
|
+
publish: Publish;
|
|
98
|
+
}
|
package/types/publish.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MarkerEventType, OptionKey, PSType, SegmentsEvent } from '../config';
|
|
2
|
+
import type { rawData } from '../utils/subscription';
|
|
2
3
|
import type { SegmentsOriginal, SeriesConfig, SpectrumBandwidth, StationInfoType } from './common';
|
|
3
4
|
import type { ParamsProps } from './store';
|
|
4
5
|
export interface SetOption {
|
|
@@ -37,7 +38,7 @@ export interface SetChannels {
|
|
|
37
38
|
export interface SetMarker {
|
|
38
39
|
pstype: PSType.Marker;
|
|
39
40
|
event: MarkerEventType;
|
|
40
|
-
data: number;
|
|
41
|
+
data: number[];
|
|
41
42
|
heatmapMode?: boolean;
|
|
42
43
|
}
|
|
43
44
|
export interface SpectrumExtraData {
|
|
@@ -47,8 +48,11 @@ export interface PublishSpectrum {
|
|
|
47
48
|
pstype: PSType.Spectrum;
|
|
48
49
|
data?: Float32Array;
|
|
49
50
|
maxData?: Float32Array;
|
|
51
|
+
minData?: Float32Array;
|
|
52
|
+
avgData?: Float32Array;
|
|
53
|
+
backgroundNoiseData?: Float32Array;
|
|
54
|
+
templateData?: Float32Array;
|
|
50
55
|
extraData?: SpectrumExtraData;
|
|
51
|
-
template?: Float32Array;
|
|
52
56
|
timestamp?: number;
|
|
53
57
|
offset?: number;
|
|
54
58
|
segmentOffset?: number;
|
|
@@ -70,7 +74,7 @@ export interface PublishLevelStream {
|
|
|
70
74
|
export interface PublishIQ {
|
|
71
75
|
pstype: PSType.IQ;
|
|
72
76
|
IData: number[];
|
|
73
|
-
|
|
77
|
+
QData: number[];
|
|
74
78
|
}
|
|
75
79
|
export interface PublishDial {
|
|
76
80
|
pstype?: PSType.Dial;
|
|
@@ -95,5 +99,7 @@ export interface Render {
|
|
|
95
99
|
[key: string]: unknown;
|
|
96
100
|
}
|
|
97
101
|
export type PublishData = SetOption | SetSeries | SetSpectrumBandwidth | SetSegments | SetChannels | SetMarker | SetAntennaFactor | SetStationInfo | PublishSpectrum | PublishHeatmap | PublishOccupancy | PublishLevelStream | PublishIQ | PublishDial | PublishGauge | Reset | Render;
|
|
98
|
-
export type Publish = (p: PublishData) => void
|
|
102
|
+
export type Publish = ((p: PublishData) => void) & {
|
|
103
|
+
getSourceData: () => rawData;
|
|
104
|
+
};
|
|
99
105
|
export {};
|
package/types/store.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TimestampedFloat32Array } from '@rfkit/spectrum-analyzer';
|
|
2
2
|
import type { SeriesType } from '../config';
|
|
3
|
-
import type { AxisXRange, AxisYRange,
|
|
3
|
+
import type { AxisXRange, AxisYRange, Publish, RecursiveObject, SegmentsType, SeriesConfig, StationInfoType, TopRightBottomLeft } from './';
|
|
4
4
|
export interface SystemConfig {
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
@@ -43,6 +43,7 @@ export interface SeriesProps {
|
|
|
43
43
|
weaken: boolean | number;
|
|
44
44
|
zoomMinSimulateWave: boolean;
|
|
45
45
|
dataRate: number;
|
|
46
|
+
forceDisplay: boolean;
|
|
46
47
|
data: Map<string, SeriesConfig>;
|
|
47
48
|
legendExternal: SeriesType[];
|
|
48
49
|
enableMetrics?: boolean;
|
|
@@ -256,7 +257,7 @@ export interface StoreState {
|
|
|
256
257
|
timeRange?: number;
|
|
257
258
|
stationInfo: StationInfoProps;
|
|
258
259
|
[key: string]: unknown;
|
|
259
|
-
publish?:
|
|
260
|
+
publish?: Publish;
|
|
260
261
|
}
|
|
261
262
|
export interface DispatchAction {
|
|
262
263
|
type?: string;
|
|
@@ -288,6 +289,6 @@ export interface ParamsProps {
|
|
|
288
289
|
toolsBar?: Partial<ToolsBarProps>;
|
|
289
290
|
band?: Partial<BandProps>;
|
|
290
291
|
levelStream?: Partial<LevelStreamProps>;
|
|
291
|
-
publish?:
|
|
292
|
+
publish?: Publish;
|
|
292
293
|
[key: string]: unknown;
|
|
293
294
|
}
|