@rfkit/charts 1.1.14 → 1.1.16

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.
@@ -1,25 +1,38 @@
1
+ interface CounterState {
2
+ id: string;
3
+ count: number;
4
+ all: string[];
5
+ include: string[];
6
+ markers: Record<string | number, unknown[]>;
7
+ }
8
+ interface CounterProps {
9
+ id?: string;
10
+ count?: number;
11
+ all?: string[];
12
+ include?: string[];
13
+ markers?: Record<string | number, unknown[]>;
14
+ }
1
15
  export default class Counter {
2
- [x: string]: any;
3
- constructor(props: any);
4
- add(): any;
5
- remove(no: any): boolean;
16
+ private state;
17
+ constructor(props?: CounterProps);
18
+ add(): string | false;
19
+ remove(no: string): boolean;
6
20
  clear(): void;
7
- destroy(cache: string | any[]): void;
21
+ destroy(cache: string[]): void;
8
22
  /**
9
23
  * 混合onChange,可能包含多个markers实例公用counter
10
24
  *
11
- * @memberof Counter
25
+ * @param id 实例ID
26
+ * @param markers 标记数组
27
+ * @param onChange 变更回调函数
28
+ * @param operationType 操作类型
12
29
  */
13
- onMixChange(id: string | number, markers: any, onChange: (arg0: any, arg1: any[], arg2?: string) => void, operationType?: string): void;
14
30
  /**
15
31
  * 更新状态
16
32
  *
17
- * @param {*} p
18
- * @memberof Range
33
+ * @param p 状态更新参数
19
34
  */
20
- setState(p: {
21
- all: any;
22
- include: any;
23
- count: any;
24
- }): void;
35
+ setState(p: Partial<CounterState>): void;
36
+ onMixChange(id: string | number, markers: unknown[], onChange: (markers: unknown[], mix: unknown[], operationType?: string) => void, operationType?: string): void;
25
37
  }
38
+ export {};
@@ -1,28 +1,35 @@
1
1
  /**
2
2
  * 处理唯一选中
3
3
  */
4
+ type SelecterCallback = (event: {
5
+ select: boolean;
6
+ parentID: string;
7
+ attribute: Record<string, unknown>;
8
+ }) => void;
9
+ interface MarkerAttribute {
10
+ select: boolean;
11
+ [key: string]: unknown;
12
+ }
4
13
  export default class Selecter {
5
- [x: string]: any;
14
+ private state;
6
15
  constructor();
7
16
  /**
8
17
  * 设置当前选中
9
18
  *
10
- * @param {*} parentID 实例的id
11
- * @param {*} id 被选中的marker的id
12
- * @returns
13
- * @memberof Select
19
+ * @param parentID 实例的id
20
+ * @param id 被选中的marker的id
21
+ * @param attribute 标记属性
14
22
  */
15
- set(parentID: string, id: any, attribute: {
16
- select: any;
17
- }): void;
23
+ set(parentID: string, id: string, attribute: MarkerAttribute): void;
18
24
  /**
19
25
  * 取消选中
20
- * @param {*} parentID
26
+ * @param parentID 实例的id
21
27
  */
22
- cancel(parentID: string | number): void;
28
+ cancel(parentID: string): void;
23
29
  /**
24
30
  * 订阅变更
25
- * @param {*} func
31
+ * @param func 回调函数
26
32
  */
27
- subscription(func: any): void;
33
+ subscription(func: SelecterCallback): void;
28
34
  }
35
+ export {};
@@ -53,10 +53,14 @@ export declare const setMarkerMove: (e: MarkerType, segments: SegmentsType, func
53
53
  */
54
54
  export declare const setMarkerBatchAdd: (e: {
55
55
  data: any;
56
+ clear?: boolean;
57
+ [key: string]: any;
56
58
  }, segments: SegmentsType, func: (arg0: {
57
59
  pstype: string;
58
60
  event: string;
59
61
  data: number[];
62
+ clear?: boolean;
63
+ [key: string]: any;
60
64
  }) => void) => void;
61
65
  /**
62
66
  * 峰值算法
@@ -2,6 +2,7 @@ import type React from 'react';
2
2
  import type { ReactNode } from 'react';
3
3
  interface Props {
4
4
  style?: React.CSSProperties;
5
+ className?: string;
5
6
  title?: string;
6
7
  children: ReactNode;
7
8
  onClick?: (e: any) => void;
@@ -1,2 +1,6 @@
1
- declare const SeriesControl: React.FC;
1
+ import { ChartType } from '../../../config';
2
+ interface Props {
3
+ type?: ChartType;
4
+ }
5
+ declare const SeriesControl: React.FC<Props>;
2
6
  export default SeriesControl;
@@ -57,6 +57,7 @@ export declare enum PSType {
57
57
  Marker = "marker",
58
58
  Reset = "reset",
59
59
  Resize = "resize",
60
+ Clear = "clear",
60
61
  Option = "option",
61
62
  Render = "render"
62
63
  }