@rfkit/charts 1.1.28 → 1.1.30
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 +2 -0
- package/components/AxisY/spectrum/useRanging/ranging.d.ts +2 -6
- package/components/AxisYByCanvas/index.d.ts +6 -0
- package/components/AxisYByCanvas/useCanvasAxisY.d.ts +30 -0
- package/components/Dropdown/index.d.ts +4 -1
- package/components/EventBus/tools.d.ts +1 -0
- package/config/constants.d.ts +28 -0
- package/engine/fluorescence.d.ts +38 -0
- package/engine/index.d.ts +2 -1
- package/engine/type.d.ts +2 -0
- package/index.d.ts +1 -1
- package/index.js +1512 -673
- package/modules/Fluorescence/Switch/index.d.ts +3 -0
- package/modules/Fluorescence/index.d.ts +6 -0
- package/modules/Fluorescence/render.d.ts +42 -0
- package/modules/Spectrum/render.d.ts +1 -0
- package/package.json +1 -1
- package/store/reducer.d.ts +2 -0
- package/types/publish.d.ts +5 -1
- package/types/store.d.ts +8 -0
- package/utils/index.d.ts +1 -0
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ export enum ChartType {
|
|
|
40
40
|
ScanDF360 = 'ScanDF360',
|
|
41
41
|
DDC = 'ddc',
|
|
42
42
|
Lite = 'lite',
|
|
43
|
+
LiteNormalized = 'liteNormalized',
|
|
43
44
|
LevelStream = 'levelStream',
|
|
44
45
|
// IQ图
|
|
45
46
|
IQEye = 'iqEye',
|
|
@@ -57,6 +58,7 @@ export enum ChartType {
|
|
|
57
58
|
<Spectrum type="scanDF360" publish={handlePublishChange} /> // 扫描测向概率统计
|
|
58
59
|
<Spectrum type="ddc" publish={handlePublishChange} channel onChannelChange /> // DCC
|
|
59
60
|
<Spectrum type="lite" publish={handlePublishChange} /> // 精简模式
|
|
61
|
+
<Spectrum type="liteNormalized" publish={handlePublishChange} /> // 精简模式(Y轴范围0-1)
|
|
60
62
|
|
|
61
63
|
// DDC特殊参数
|
|
62
64
|
export interface Props {
|
|
@@ -27,12 +27,7 @@ export default class Range {
|
|
|
27
27
|
* 边界移动
|
|
28
28
|
*/
|
|
29
29
|
moveBoundary(isUP: boolean, isTop: boolean): void;
|
|
30
|
-
moveWheel(
|
|
31
|
-
range: AxisYRange;
|
|
32
|
-
step: number;
|
|
33
|
-
mouseY: number;
|
|
34
|
-
isAdd: boolean;
|
|
35
|
-
}): void;
|
|
30
|
+
moveWheel(e: React.WheelEvent): void;
|
|
36
31
|
/**
|
|
37
32
|
* 根据步进移动
|
|
38
33
|
*/
|
|
@@ -51,3 +46,4 @@ export default class Range {
|
|
|
51
46
|
*/
|
|
52
47
|
export declare const useRangeAutoFocus: (id: string, func?: RecursiveFunction) => (...args: any[]) => void;
|
|
53
48
|
export declare const useRangeMove: (globalID: string, func?: RecursiveFunction) => (...args: any[]) => void;
|
|
49
|
+
export declare const useRangeSet: (globalID: string, func?: RecursiveFunction) => (...args: any[]) => void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type Range from '../AxisY/spectrum/useRanging/ranging';
|
|
2
|
+
interface CanvasAxisYOptions {
|
|
3
|
+
ranging?: Range;
|
|
4
|
+
}
|
|
5
|
+
interface TickData {
|
|
6
|
+
value: number;
|
|
7
|
+
position: number;
|
|
8
|
+
textPosition: number;
|
|
9
|
+
label: string;
|
|
10
|
+
isAdjusted?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function useCanvasAxisY(options?: CanvasAxisYOptions): {
|
|
13
|
+
canvasRef: import("react").RefObject<HTMLCanvasElement>;
|
|
14
|
+
containerRef: import("react").RefObject<HTMLDivElement>;
|
|
15
|
+
isDragging: boolean;
|
|
16
|
+
range: {
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
};
|
|
20
|
+
handleMouseDown: (e: React.MouseEvent) => void;
|
|
21
|
+
handleMouseMove: (e: React.MouseEvent) => void;
|
|
22
|
+
handleMouseUp: () => void;
|
|
23
|
+
handleMouseLeave: () => void;
|
|
24
|
+
handleWheel: (e: React.WheelEvent) => void;
|
|
25
|
+
ticksData: {
|
|
26
|
+
majorTicks: TickData[];
|
|
27
|
+
minorTicks: TickData[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -2,12 +2,15 @@ import type React from 'react';
|
|
|
2
2
|
export interface DropdownOption {
|
|
3
3
|
value: string | number | null;
|
|
4
4
|
label: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
render?: () => React.ReactNode;
|
|
5
7
|
}
|
|
6
8
|
interface DropdownProps {
|
|
7
9
|
value: string | number | null;
|
|
8
10
|
options: DropdownOption[];
|
|
9
11
|
onChange: (value: string | number | null) => void;
|
|
10
|
-
placeholder?: string;
|
|
12
|
+
placeholder?: string | React.ReactNode;
|
|
13
|
+
closeOnSelect?: boolean;
|
|
11
14
|
}
|
|
12
15
|
declare const Dropdown: React.FC<DropdownProps>;
|
|
13
16
|
export default Dropdown;
|
|
@@ -23,6 +23,7 @@ export declare const createLongPressEventManager: (id: string, name?: string, fu
|
|
|
23
23
|
export declare const calculateEventRelativePosition: (e: React.MouseEvent<HTMLElement> | React.WheelEvent<HTMLElement>) => TopRightBottomLeft;
|
|
24
24
|
export declare const EVENT_PRIORITY_LEVELS: {
|
|
25
25
|
void: number;
|
|
26
|
+
eventBus: number;
|
|
26
27
|
signal: number;
|
|
27
28
|
zoom: number;
|
|
28
29
|
dragFrame: number;
|
package/config/constants.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare enum ChartType {
|
|
|
18
18
|
ScanDF360 = "scanDF360",
|
|
19
19
|
DDC = "ddc",
|
|
20
20
|
Lite = "lite",
|
|
21
|
+
LiteNormalized = "liteNormalized",
|
|
21
22
|
LevelStream = "levelStream",
|
|
22
23
|
IQEye = "iqEye",
|
|
23
24
|
IQLine = "iqLine",
|
|
@@ -29,6 +30,7 @@ export declare enum ChartType {
|
|
|
29
30
|
export declare enum ModuleType {
|
|
30
31
|
Spectrum = "spectrum",
|
|
31
32
|
Heatmap = "heatmap",
|
|
33
|
+
Fluorescence = "fluorescence",
|
|
32
34
|
Occupancy = "occupancy",
|
|
33
35
|
LevelStream = "levelStream",
|
|
34
36
|
Dial = "dial",
|
|
@@ -47,6 +49,7 @@ export declare enum PSType {
|
|
|
47
49
|
Occupancy = "occupancy",
|
|
48
50
|
LevelStream = "levelStream",
|
|
49
51
|
Heatmap = "heatmap",
|
|
52
|
+
Fluorescence = "fluorescence",
|
|
50
53
|
IQ = "iq",
|
|
51
54
|
Dial = "dial",
|
|
52
55
|
Gauge = "gauge",
|
|
@@ -102,6 +105,31 @@ export declare enum ToolType {
|
|
|
102
105
|
Frame = "frame",
|
|
103
106
|
Area = "area"
|
|
104
107
|
}
|
|
108
|
+
export declare enum ToolsBarItemType {
|
|
109
|
+
AutorangingSwitch = "AutorangingSwitch",
|
|
110
|
+
UnitSwitch = "UnitSwitch",
|
|
111
|
+
StepSwitch = "StepSwitch",
|
|
112
|
+
GradientRibbon = "GradientRibbon",
|
|
113
|
+
HeatmapCaptureSwitch = "HeatmapCaptureSwitch",
|
|
114
|
+
TimeRangeSwitch = "TimeRangeSwitch",
|
|
115
|
+
SpacerLine = "SpacerLine",
|
|
116
|
+
Reset = "Reset",
|
|
117
|
+
StationAllocationSwitch = "StationAllocationSwitch",
|
|
118
|
+
SeriesControl = "SeriesControl",
|
|
119
|
+
FrequencyAllocationSwitch = "FrequencyAllocationSwitch",
|
|
120
|
+
ZoomSwitch = "ZoomSwitch",
|
|
121
|
+
LimitSwitch = "LimitSwitch",
|
|
122
|
+
MarkersSwitch = "MarkersSwitch",
|
|
123
|
+
FrequencyTagLineSwitch = "FrequencyTagLineSwitch",
|
|
124
|
+
SignalAnalysisSwitch = "SignalAnalysisSwitch",
|
|
125
|
+
StripeSwitch = "StripeSwitch",
|
|
126
|
+
CursorSwitch = "CursorSwitch",
|
|
127
|
+
CursorFindRowSwitch = "CursorFindRowSwitch",
|
|
128
|
+
SignalSwitch = "SignalSwitch",
|
|
129
|
+
SegmentsDisplayControl = "SegmentsDisplayControl",
|
|
130
|
+
SeriesDisplayControl = "SeriesDisplayControl",
|
|
131
|
+
FluorescenceSwitch = "FluorescenceSwitch"
|
|
132
|
+
}
|
|
105
133
|
export declare enum SeriesType {
|
|
106
134
|
RealData = "realData",
|
|
107
135
|
MaxData = "maxData",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AxisYRange, RecursiveObject } from '../types';
|
|
2
|
+
import Engine from './engine';
|
|
3
|
+
import type { StateProps } from './type';
|
|
4
|
+
export default class Fluorescence extends Engine {
|
|
5
|
+
init(props: StateProps): void;
|
|
6
|
+
updateProps(e: RecursiveObject): void;
|
|
7
|
+
clearImageData(): void;
|
|
8
|
+
clearRect(): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
private drawBlocks;
|
|
12
|
+
resize(): void;
|
|
13
|
+
setRange(range: AxisYRange): void;
|
|
14
|
+
render(data: {
|
|
15
|
+
fluorescenceData: Map<number, number>[];
|
|
16
|
+
fluorescenceMaxCount: number;
|
|
17
|
+
}): void;
|
|
18
|
+
interpolateColor(colors: any[], ratio: number): {
|
|
19
|
+
r: number;
|
|
20
|
+
g: number;
|
|
21
|
+
b: number;
|
|
22
|
+
a: number;
|
|
23
|
+
};
|
|
24
|
+
private colorCache;
|
|
25
|
+
hexToRgb(hex: string): {
|
|
26
|
+
r: number;
|
|
27
|
+
g: number;
|
|
28
|
+
b: number;
|
|
29
|
+
};
|
|
30
|
+
private lastRenderParams;
|
|
31
|
+
private intensityMatrixCache;
|
|
32
|
+
private gridCentersCache;
|
|
33
|
+
private weightLookupCache;
|
|
34
|
+
private colorLookupCache;
|
|
35
|
+
private blockPositionsCache;
|
|
36
|
+
private lastBlockRenderParams;
|
|
37
|
+
draw(): void;
|
|
38
|
+
}
|
package/engine/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Dial from './dial';
|
|
2
|
+
import Fluorescence from './fluorescence';
|
|
2
3
|
import Gauge from './gauge';
|
|
3
4
|
import Heatmap from './heatmap';
|
|
4
5
|
import IQ from './iq';
|
|
@@ -8,5 +9,5 @@ import Series from './series';
|
|
|
8
9
|
import { GraphicType, OrientationType, type StateProps } from './type';
|
|
9
10
|
import WebGLEngine from './webglEngine';
|
|
10
11
|
import WebGLSeries from './webglSeries';
|
|
11
|
-
export { Heatmap, Series, IQ, IQEye, OrientationType, GraphicType, Dial, Radar, Gauge, WebGLEngine, WebGLSeries };
|
|
12
|
+
export { Heatmap, Fluorescence, Series, IQ, IQEye, OrientationType, GraphicType, Dial, Radar, Gauge, WebGLEngine, WebGLSeries };
|
|
12
13
|
export type { StateProps };
|
package/engine/type.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { setFrequencyAllocationToCache } from './components/FrequencyAllocation/tools';
|
|
2
|
-
export { ChartType, MarkerEventType, OptionKey, PSType, SegmentsEvent, SeriesType } from './config';
|
|
2
|
+
export { ChartType, MarkerEventType, OptionKey, PSType, SegmentsEvent, SeriesType, ToolsBarItemType } from './config';
|
|
3
3
|
export { default as useSafePublish } from './hooks/useSafePublish';
|
|
4
4
|
export { Dial, Gauge, Heatmap, IQ, LevelStream, Occupancy, Spectrum } from './lib';
|
|
5
5
|
export type { AxisXProps, AxisYRange, ChartRef, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
|