@rfkit/charts 1.2.23 → 1.2.25
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 +1 -1
- package/components/AxisY/heatmap/components/Ticks/index.d.ts +3 -3
- package/components/HeatmapCapture/tools.d.ts +2 -6
- package/components/Tooltip/index.d.ts +3 -1
- package/engine/engine.d.ts +1 -2
- package/engine/fluorescence.d.ts +2 -3
- package/engine/heatmap.d.ts +2 -3
- package/engine/index.d.ts +3 -5
- package/engine/series.d.ts +2 -3
- package/engine/type.d.ts +13 -0
- package/engine/utils.d.ts +2 -0
- package/engine/webglExample.d.ts +2 -2
- package/engine/webglSeries.d.ts +2 -3
- package/index.js +721 -1245
- package/modules/Fluorescence/render.d.ts +2 -3
- package/package.json +1 -1
- package/types/common.d.ts +1 -1
- package/types/publish.d.ts +22 -5
- package/types/store.d.ts +4 -9
- package/utils/index.d.ts +10 -3
- package/components/AxisY/heatmap/components/FullTicks/index.d.ts +0 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fluorescence as Chart } from '../../engine';
|
|
2
|
-
import type { RecursiveObject } from '../../types';
|
|
3
2
|
interface FluorescenceRenderProps {
|
|
4
3
|
id: string;
|
|
5
4
|
globalID: string;
|
|
@@ -21,10 +20,10 @@ export default class FluorescenceRender {
|
|
|
21
20
|
/**
|
|
22
21
|
* 更新属性
|
|
23
22
|
*
|
|
24
|
-
* @param
|
|
23
|
+
* @param props
|
|
25
24
|
* @memberof FluorescenceRender
|
|
26
25
|
*/
|
|
27
|
-
updateProps(props:
|
|
26
|
+
updateProps(props: Record<string, unknown>): void;
|
|
28
27
|
/**
|
|
29
28
|
* 更新数据
|
|
30
29
|
*
|
package/package.json
CHANGED
package/types/common.d.ts
CHANGED
package/types/publish.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { MarkerEventType, OptionKey, PSType, SegmentsEvent } from '../config';
|
|
2
2
|
import type { rawData } from '../utils/subscription';
|
|
3
3
|
import type { SegmentsOriginal, SeriesConfig, SpectrumBandwidth, StationInfoType } from './common';
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecursiveObject } from './base';
|
|
5
|
+
import type { BandProps, MarkerType, ParamsProps, SignalData, SignalDataType } from './store';
|
|
5
6
|
export interface SetOption {
|
|
6
7
|
pstype: PSType.Option;
|
|
7
8
|
key: OptionKey;
|
|
@@ -56,14 +57,14 @@ export interface PublishSpectrum {
|
|
|
56
57
|
templateData?: Float32Array;
|
|
57
58
|
templateTolerance?: number;
|
|
58
59
|
extraData?: SpectrumExtraData;
|
|
59
|
-
timestamp?:
|
|
60
|
+
timestamp?: string;
|
|
60
61
|
offset?: number;
|
|
61
62
|
segmentOffset?: number;
|
|
62
63
|
}
|
|
63
64
|
export interface PublishHeatmap {
|
|
64
65
|
pstype: PSType.Heatmap;
|
|
65
66
|
data: number[][];
|
|
66
|
-
timestamps:
|
|
67
|
+
timestamps: string[];
|
|
67
68
|
}
|
|
68
69
|
export interface PublishFluorescence {
|
|
69
70
|
pstype: PSType.Fluorescence;
|
|
@@ -77,7 +78,7 @@ export interface PublishOccupancy {
|
|
|
77
78
|
export interface PublishLevelStream {
|
|
78
79
|
pstype: PSType.LevelStream;
|
|
79
80
|
data: number;
|
|
80
|
-
timestamp:
|
|
81
|
+
timestamp: string;
|
|
81
82
|
}
|
|
82
83
|
export interface PublishIQ {
|
|
83
84
|
pstype: PSType.IQ;
|
|
@@ -99,6 +100,22 @@ export interface PublishGauge {
|
|
|
99
100
|
value?: number;
|
|
100
101
|
limit?: number;
|
|
101
102
|
}
|
|
103
|
+
export interface AutorangingEvent {
|
|
104
|
+
pstype: 'autoranging';
|
|
105
|
+
}
|
|
106
|
+
export interface PointsEvent {
|
|
107
|
+
pstype: 'points';
|
|
108
|
+
data: number[];
|
|
109
|
+
}
|
|
110
|
+
export interface BandEvent extends BandProps {
|
|
111
|
+
pstype: 'band';
|
|
112
|
+
}
|
|
113
|
+
export interface ScopeEvent extends RecursiveObject {
|
|
114
|
+
pstype: 'scope';
|
|
115
|
+
frequency: number;
|
|
116
|
+
bandwidth: number;
|
|
117
|
+
index?: number;
|
|
118
|
+
}
|
|
102
119
|
export interface Reset extends Finally {
|
|
103
120
|
pstype: PSType.Reset;
|
|
104
121
|
}
|
|
@@ -112,7 +129,7 @@ export interface Render {
|
|
|
112
129
|
pstype: PSType.Render;
|
|
113
130
|
[key: string]: unknown;
|
|
114
131
|
}
|
|
115
|
-
export type PublishData = SetOption | SetSeries | SetSpectrumBandwidth | SetSegments | SetChannels | SetMarker | SetAntennaFactor | SetSignal | PublishSpectrum | PublishHeatmap | PublishFluorescence | PublishOccupancy | PublishLevelStream | PublishIQ | PublishDial | PublishGauge | Reset | Clear | Resize | Render;
|
|
132
|
+
export type PublishData = SetOption | SetSeries | SetSpectrumBandwidth | SetSegments | SetChannels | SetMarker | SetAntennaFactor | SetSignal | PublishSpectrum | PublishHeatmap | PublishFluorescence | PublishOccupancy | PublishLevelStream | PublishIQ | PublishDial | PublishGauge | AutorangingEvent | PointsEvent | BandEvent | ScopeEvent | Reset | Clear | Resize | Render;
|
|
116
133
|
export type Publish = ((p: PublishData) => void) & {
|
|
117
134
|
getSourceData: () => rawData;
|
|
118
135
|
};
|
package/types/store.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ export interface AxisYProps {
|
|
|
25
25
|
type?: string;
|
|
26
26
|
hidden?: string[];
|
|
27
27
|
linkage?: boolean;
|
|
28
|
-
heatmapFullTicks?: boolean;
|
|
29
28
|
onChange?: (e: RecursiveObject) => void;
|
|
30
29
|
}
|
|
31
30
|
export interface AxisXProps {
|
|
@@ -105,14 +104,11 @@ export declare enum HeatmapCaptureType {
|
|
|
105
104
|
export interface HeatmapSliderData {
|
|
106
105
|
startIndex: number;
|
|
107
106
|
endIndex: number;
|
|
108
|
-
startTimestamp:
|
|
109
|
-
|
|
110
|
-
endTimestamp: number;
|
|
111
|
-
endTimestampFormat: string;
|
|
112
|
-
duration: number;
|
|
113
|
-
durationFormat: string;
|
|
107
|
+
startTimestamp: string;
|
|
108
|
+
endTimestamp: string;
|
|
114
109
|
}
|
|
115
110
|
export interface HeatmapSlider2DData extends HeatmapSliderData {
|
|
111
|
+
duration: number;
|
|
116
112
|
startCol: number;
|
|
117
113
|
endCol: number;
|
|
118
114
|
startFrequency: number;
|
|
@@ -135,8 +131,7 @@ export interface HeatmapAreaData extends HeatmapSliderData {
|
|
|
135
131
|
}
|
|
136
132
|
export interface HeatmapRowIndexData {
|
|
137
133
|
data: TimestampedFloat32Array;
|
|
138
|
-
timestamp:
|
|
139
|
-
timestampFormat: string;
|
|
134
|
+
timestamp: string;
|
|
140
135
|
rowIndex: number;
|
|
141
136
|
}
|
|
142
137
|
export interface HeatmapCaptureProps {
|
package/utils/index.d.ts
CHANGED
|
@@ -6,7 +6,14 @@ import type { RecursiveObject, SegmentsOriginal, SegmentsType } from '../types';
|
|
|
6
6
|
* @returns {string}
|
|
7
7
|
*/
|
|
8
8
|
export declare const createGUID: () => string;
|
|
9
|
-
export
|
|
9
|
+
export interface TimestampFormatOptions {
|
|
10
|
+
dateSeparator?: string;
|
|
11
|
+
timeSeparator?: string;
|
|
12
|
+
timeOnly?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const formatTimestamp: (input?: number | Date, options?: TimestampFormatOptions) => string;
|
|
15
|
+
export declare const dateTimeToTimestamp: (dateTimeStr: unknown, // 改为 unknown 类型,强制运行时检查
|
|
16
|
+
sep1?: string, sep2?: string, isTimeOnly?: boolean) => number;
|
|
10
17
|
/**
|
|
11
18
|
* 节流
|
|
12
19
|
*/
|
|
@@ -83,7 +90,7 @@ export declare function getThemeFillStyle(): {
|
|
|
83
90
|
* @param params 要混合的参数
|
|
84
91
|
* @returns 混合后的对象
|
|
85
92
|
*/
|
|
86
|
-
export declare const mergeObjects: (
|
|
93
|
+
export declare const mergeObjects: <T extends RecursiveObject>(source: T, params: RecursiveObject) => T;
|
|
87
94
|
export declare function getMidIndex(indexStart: number, indexEnd: number): number;
|
|
88
95
|
export declare const getFrequencyToFixed: (frequency: number, fixedNum?: number) => string;
|
|
89
96
|
export declare const createChartRenderID: ({ moduleType, globalID }: {
|
|
@@ -96,7 +103,7 @@ export declare const createChartRenderID: ({ moduleType, globalID }: {
|
|
|
96
103
|
* @param timestamps 可选的时间戳数组
|
|
97
104
|
* @returns 转换后的TimestampedFloat32Array数组
|
|
98
105
|
*/
|
|
99
|
-
export declare const convertToTimestampedArrays: (data: number[][], timestamps?: Array<
|
|
106
|
+
export declare const convertToTimestampedArrays: (data: number[][], timestamps?: Array<string>) => TimestampedFloat32Array[];
|
|
100
107
|
/**
|
|
101
108
|
* 防抖函数
|
|
102
109
|
* @param fn 需要防抖的函数
|