@rfkit/charts 1.0.98 → 1.0.100

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 (46) hide show
  1. package/README.md +0 -2
  2. package/components/AxisY/heatmap/index.d.ts +1 -1
  3. package/components/AxisY/occupancy/components/Ticks/index.d.ts +1 -1
  4. package/components/AxisY/spectrum/index.d.ts +1 -1
  5. package/components/AxisY/spectrum/useRanging/index.d.ts +1 -1
  6. package/components/Cursor/tools.d.ts +2 -2
  7. package/components/FrequencyAllocation/Tooltip/index.d.ts +1 -1
  8. package/components/FrequencyAllocation/types.d.ts +1 -0
  9. package/components/FrequencyMarkerLine/index.d.ts +1 -1
  10. package/components/HeatmapCapture/tools.d.ts +1 -1
  11. package/components/Markers/index.d.ts +2 -2
  12. package/components/Markers/lib/tools.d.ts +3 -3
  13. package/components/Square/index.d.ts +2 -1
  14. package/components/StationAllocation/SegmentContainer.d.ts +1 -0
  15. package/components/ToolsBar/IconBox.d.ts +2 -1
  16. package/config/constants.d.ts +1 -1
  17. package/engine/dial.d.ts +1 -1
  18. package/engine/gauge.d.ts +1 -1
  19. package/engine/heatmap.d.ts +1 -1
  20. package/engine/index.d.ts +5 -5
  21. package/engine/radar.d.ts +1 -1
  22. package/engine/series.d.ts +2 -2
  23. package/engine/webglExample.d.ts +1 -1
  24. package/engine/webglSeries.d.ts +1 -1
  25. package/hooks/useChannel.d.ts +1 -1
  26. package/hooks/useSpectrumAnalyzer/useTemplateComparison.d.ts +4 -22
  27. package/hooks/useSpectrumChartType.d.ts +1 -1
  28. package/hooks/useSpectrumRule.d.ts +1 -2
  29. package/index.d.ts +5 -5
  30. package/index.js +8847 -8801
  31. package/lib/IQ/Chart.d.ts +1 -2
  32. package/lib/Spectrum/Chart.d.ts +1 -1
  33. package/lib/index.d.ts +4 -4
  34. package/modules/Occupancy/TotalLine/index.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/store/Params.d.ts +1 -1
  37. package/store/constants.d.ts +1 -1
  38. package/store/context.d.ts +1 -1
  39. package/store/data/frequencyAllocation.d.ts +1 -0
  40. package/store/hooks/useStore.d.ts +1 -1
  41. package/store/index.d.ts +1 -1
  42. package/types/index.d.ts +1 -1
  43. package/types/store.d.ts +2 -1
  44. package/utils/converter.d.ts +1 -1
  45. package/utils/index.d.ts +2 -2
  46. package/utils/subscription.d.ts +1 -1
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # rfkit-charts
2
2
 
3
- [![npm version](https://img.shields.io/badge/npm-v1.0.0-blue)](http://url/-/web/detail/@rfkit/charts) [![gitlab](https://img.shields.io/badge/gitlab-yellow)](http://gitlab.gitlab.com/fe/charts)
4
-
5
3
  服务于无线电监测产品的 web 图表组件库
6
4
 
7
5
  ## 安装
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
- import GradientRibbon from './type/Default/GradientRibbon';
3
2
  import type { RenderChartType } from '../../../types';
3
+ import GradientRibbon from './type/Default/GradientRibbon';
4
4
  export { GradientRibbon };
5
5
  interface Props {
6
6
  id: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  interface Props {
3
3
  inside?: boolean;
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
- import { useRangeAutoFocus } from './useRanging/ranging';
3
2
  import type { RenderChartType } from '../../../types';
3
+ import { useRangeAutoFocus } from './useRanging/ranging';
4
4
  interface Props {
5
5
  chart: RenderChartType;
6
6
  }
@@ -1,5 +1,5 @@
1
- import Ranging from './ranging';
2
1
  import type { RenderChartType } from '../../../../types';
2
+ import Ranging from './ranging';
3
3
  interface Props {
4
4
  chart: RenderChartType;
5
5
  }
@@ -4,7 +4,7 @@ export declare const CURSOR_SETACTIVE: (globalID: string, func?: RecursiveFuncti
4
4
  /**
5
5
  * 将位置信息转换为视觉left
6
6
  */
7
- export declare function convertCoordToVisualLeft({ coord, zoom, segments, }: {
7
+ export declare function convertCoordToVisualLeft({ coord, zoom, segments }: {
8
8
  coord: {
9
9
  left: number;
10
10
  };
@@ -21,7 +21,7 @@ export declare function convertCoordToVisualLeft({ coord, zoom, segments, }: {
21
21
  /**
22
22
  * 将视觉left转换为真实left
23
23
  */
24
- export declare function convertVisualLeftToRealLeft({ visualLeft, zoom, segments, }: {
24
+ export declare function convertVisualLeftToRealLeft({ visualLeft, zoom, segments }: {
25
25
  visualLeft: number;
26
26
  zoom: {
27
27
  interval: {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  interface TooltipProps {
3
3
  title: string;
4
4
  description?: string;
@@ -12,6 +12,7 @@ export interface FrequencyBand {
12
12
  color: string;
13
13
  title: string;
14
14
  description?: string;
15
+ gradientColors?: [string, string];
15
16
  }
16
17
  export interface TooltipState {
17
18
  visible: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ToolType } from '../../config';
3
- import FrequencyMarkerSwitch from './Switch';
4
3
  import FrequencyMarkerLineBoard from './Board';
4
+ import FrequencyMarkerSwitch from './Switch';
5
5
  export { FrequencyMarkerSwitch, FrequencyMarkerLineBoard };
6
6
  export declare const COMPONENT_KEY = ToolType.FrequencyMarkerLine;
7
7
  interface Props {
@@ -28,6 +28,6 @@ export declare const defaultAreaInfoResult: {
28
28
  bandwidthFormat: string;
29
29
  data: number[][];
30
30
  };
31
- export default function calculateAreaInfo({ endLeft, startLeft, startTop, endTop, frequencyFormat, globalID, }: AreaInfoParams): HeatmapAreaData;
31
+ export default function calculateAreaInfo({ endLeft, startLeft, startTop, endTop, frequencyFormat, globalID }: AreaInfoParams): HeatmapAreaData;
32
32
  export declare const heatmapCaptureUpdate: (globalID: string, func?: (props: Partial<HeatmapCaptureProps>) => void) => (...args: any[]) => void;
33
33
  export {};
@@ -1,8 +1,8 @@
1
1
  import type React from 'react';
2
- import { MARKER_UPDATE_PARAMS, MARKER_UPDATE_ATTRIBUTE, MARKER_UPDATE_RESET, startstop2frequency, bandwidthfrequency2frequency } from './lib/tools';
3
2
  import Counter from './lib/Counter.js';
4
3
  import Selecter from './lib/Selecter.js';
5
- export { Counter, Selecter, startstop2frequency, bandwidthfrequency2frequency, MARKER_UPDATE_PARAMS, MARKER_UPDATE_ATTRIBUTE, MARKER_UPDATE_RESET, };
4
+ import { bandwidthfrequency2frequency, MARKER_UPDATE_ATTRIBUTE, MARKER_UPDATE_PARAMS, MARKER_UPDATE_RESET, startstop2frequency } from './lib/tools';
5
+ export { Counter, Selecter, startstop2frequency, bandwidthfrequency2frequency, MARKER_UPDATE_PARAMS, MARKER_UPDATE_ATTRIBUTE, MARKER_UPDATE_RESET };
6
6
  interface Props {
7
7
  id: string;
8
8
  counter?: any;
@@ -2,11 +2,11 @@ import type { MarkerType, RecursiveFunction, SegmentsType } from '../../../types
2
2
  export declare const MARKER_UPDATE_PARAMS: (id: string, func?: RecursiveFunction) => (...args: any[]) => void;
3
3
  export declare const MARKER_UPDATE_ATTRIBUTE: (id: string, func?: RecursiveFunction) => (...args: any[]) => void;
4
4
  export declare const MARKER_UPDATE_RESET: (id: string, func?: RecursiveFunction) => (...args: any[]) => void;
5
- export declare function startstop2frequency({ start, stop, }: {
5
+ export declare function startstop2frequency({ start, stop }: {
6
6
  start: number;
7
7
  stop: number;
8
8
  }): (x: number, len: number) => number;
9
- export declare function bandwidthfrequency2frequency({ frequency, bandwidth, }: {
9
+ export declare function bandwidthfrequency2frequency({ frequency, bandwidth }: {
10
10
  frequency: number;
11
11
  bandwidth: number;
12
12
  }): (x: number, len: number) => number;
@@ -43,7 +43,7 @@ interface ZoomLeftResult {
43
43
  * @param segments - 数据段信息
44
44
  * @returns 返回缩放后的位置信息
45
45
  */
46
- export declare function splitZoomLeft({ left, zoom, segments, }: ZoomLeftParams): ZoomLeftResult;
46
+ export declare function splitZoomLeft({ left, zoom, segments }: ZoomLeftParams): ZoomLeftResult;
47
47
  /**
48
48
  * 移动marker
49
49
  */
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import type React from 'react';
2
+ import { type ReactNode } from 'react';
2
3
  interface Props {
3
4
  children: ReactNode;
4
5
  }
@@ -12,6 +12,7 @@ interface SegmentContainerProps {
12
12
  stationPositions: StationPosition[];
13
13
  currentFrequency: number;
14
14
  segmentIndex: number;
15
+ isCurrentSegment: boolean;
15
16
  }
16
17
  declare const SegmentContainer: React.FC<SegmentContainerProps>;
17
18
  export default SegmentContainer;
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import type React from 'react';
2
+ import type { ReactNode } from 'react';
2
3
  interface Props {
3
4
  style?: React.CSSProperties;
4
5
  title?: string;
@@ -107,5 +107,5 @@ export declare enum SeriesType {
107
107
  MinData = "minData",
108
108
  AvgData = "avgData",
109
109
  ThresholdData = "threshold",
110
- TemplateData = "templateData"
110
+ TemplateData = "template"
111
111
  }
package/engine/dial.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { StateProps } from './type';
2
1
  import Engine from './engine';
2
+ import type { StateProps } from './type';
3
3
  export default class Dial extends Engine {
4
4
  init(props: StateProps): void;
5
5
  clear(): void;
package/engine/gauge.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { StateProps } from './type';
2
1
  import Engine from './engine';
2
+ import type { StateProps } from './type';
3
3
  interface Data {
4
4
  value: number;
5
5
  limit: number;
@@ -1,6 +1,6 @@
1
+ import type { AxisYRange } from '../types';
1
2
  import Engine from './engine';
2
3
  import type { StateProps } from './type';
3
- import type { AxisYRange } from '../types';
4
4
  export default class Heatmap extends Engine {
5
5
  init(props: StateProps): void;
6
6
  updateProps(e: any): void;
package/engine/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import Series from './series';
1
+ import Dial from './dial';
2
+ import Gauge from './gauge';
2
3
  import Heatmap from './heatmap';
3
4
  import IQ from './iq';
4
5
  import IQEye from './iqEye';
5
- import Dial from './dial';
6
6
  import Radar from './radar';
7
- import Gauge from './gauge';
7
+ import Series from './series';
8
+ import { GraphicType, OrientationType, type StateProps } from './type';
8
9
  import WebGLEngine from './webglEngine';
9
10
  import WebGLSeries from './webglSeries';
10
- import { OrientationType, GraphicType, type StateProps } from './type';
11
- export { Heatmap, Series, IQ, IQEye, OrientationType, GraphicType, Dial, Radar, Gauge, WebGLEngine, WebGLSeries, };
11
+ export { Heatmap, Series, IQ, IQEye, OrientationType, GraphicType, Dial, Radar, Gauge, WebGLEngine, WebGLSeries };
12
12
  export type { StateProps };
package/engine/radar.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { StateProps } from './type';
2
1
  import Engine from './engine';
2
+ import type { StateProps } from './type';
3
3
  export default class Dial extends Engine {
4
4
  init(props: StateProps): void;
5
5
  clear(): void;
@@ -1,6 +1,6 @@
1
- import { type StateProps } from './type';
2
- import Engine from './engine';
3
1
  import type { AxisYRange, RecursiveObject, SeriesConfig } from '../types';
2
+ import Engine from './engine';
3
+ import { type StateProps } from './type';
4
4
  export default class Series extends Engine {
5
5
  init(props: StateProps): void;
6
6
  updateProps(e: RecursiveObject): void;
@@ -1,5 +1,5 @@
1
- import { WebGLSeries } from './index';
2
1
  import type { SeriesConfig } from '../types';
2
+ import { WebGLSeries } from './index';
3
3
  /**
4
4
  * WebGL Series 使用示例
5
5
  *
@@ -1,6 +1,6 @@
1
+ import type { AxisYRange, RecursiveObject, SeriesConfig } from '../types';
1
2
  import { type StateProps } from './type';
2
3
  import WebGLEngine from './webglEngine';
3
- import type { AxisYRange, RecursiveObject, SeriesConfig } from '../types';
4
4
  export default class WebGLSeries extends WebGLEngine {
5
5
  private vertexData;
6
6
  private colorData;
@@ -1,5 +1,5 @@
1
- import type { SetChannels } from '../types';
2
1
  import { MarkerEventType } from '../config';
2
+ import type { SetChannels } from '../types';
3
3
  export interface Props {
4
4
  channel?: number;
5
5
  onChannelChange?: (c: {
@@ -1,26 +1,8 @@
1
- import { type RefObject } from 'react';
2
- import type { SelectedSignal } from '../../types';
3
- interface UseTemplateComparisonProps {
4
- frequencyFormat: RefObject<(x: number) => string>;
5
- onChange: RefObject<(e: SelectedSignal) => void>;
6
- globalID: string;
7
- }
8
- interface ExceedingSegment {
9
- maxValue: number;
10
- minValue: number;
11
- avgValue: number;
12
- startFrequency: number;
13
- stopFrequency: number;
14
- centerFrequency: number;
15
- bandwidth: number;
16
- timestamp: number;
17
- }
1
+ import { SpectrumOutputData } from '../../../../spectrum-flow/dist';
18
2
  /**
19
3
  * 模板数据比较 Hook
20
- * 用于检测数据是否超出模板阈值,并输出相关信息
4
+ * 用于处理模板超出数据的转换
21
5
  */
22
- export default function useTemplateComparison({ frequencyFormat, onChange, globalID, }: UseTemplateComparisonProps): {
23
- findExceedingSegments: (dataArray: Float32Array, templateArray: Float32Array, timestamp: number) => ExceedingSegment[];
24
- processExceedingData: (data: Float32Array, templateData: Float32Array, timestamp: number) => void;
6
+ export default function useTemplateComparison(): {
7
+ updateTemplateOverData: (templateOverData: SpectrumOutputData["templateOverData"]) => void;
25
8
  };
26
- export {};
@@ -3,7 +3,7 @@ export interface Props {
3
3
  type: ChartType;
4
4
  heatmapElementID?: string;
5
5
  }
6
- export default function useSpectrumChartType({ type, heatmapElementID, }: Props): {
6
+ export default function useSpectrumChartType({ type, heatmapElementID }: Props): {
7
7
  enableMetrics: boolean;
8
8
  enableWaterfall: boolean;
9
9
  };
@@ -1,6 +1,5 @@
1
- import type { PublishData } from '../types';
2
1
  import { type Props as ChannelProps } from './useChannel';
3
- import type { RecursiveFunction } from '../types';
2
+ import type { PublishData, RecursiveFunction } from '../types';
4
3
  export declare const SET_SEGMENTS_DISPLAY: (globalID: string, func?: RecursiveFunction) => (...args: any[]) => void;
5
4
  export interface Props extends ChannelProps {
6
5
  }
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { Spectrum, LevelStream, IQ, Gauge, Dial, Heatmap, Occupancy, } from './lib';
2
- export type { RecursiveObject, // 递归对象 后期会删除
3
- RecursiveFunction, // 递归方法 后期会删除
4
- AxisYRange, AxisXProps, SeriesConfig, SegmentsOriginal, SpectrumBandwidth, MarkerType, SetSeries, SetSpectrumBandwidth, SetSegments, SetAntennaFactor, SetChannels, SetMarker, SpectrumExtraData, PublishSpectrum, PublishHeatmap, PublishOccupancy, PublishLevelStream, PublishIQ, PublishDial, PublishGauge, Reset, Render, PublishData, Publish, } from './types';
1
+ export { ChartType, MarkerEventType, OptionKey, PSType, SegmentsEvent, SeriesType } from './config';
2
+ export { Dial, Gauge, Heatmap, IQ, LevelStream, Occupancy, Spectrum } from './lib';
3
+ export type { AxisXProps, AxisYRange, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
4
+ RecursiveObject, // 递归对象 后期会删除
5
+ Render, Reset, SegmentsOriginal, SeriesConfig, SetAntennaFactor, SetChannels, SetMarker, SetSegments, SetSeries, SetSpectrumBandwidth, SpectrumBandwidth, SpectrumExtraData } from './types';
5
6
  export { HeatmapCaptureType } from './types';
6
- export { PSType, ChartType, SegmentsEvent, MarkerEventType, SeriesType, OptionKey, } from './config';