@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.
- package/components/Markers/lib/Counter.d.ts +27 -14
- package/components/Markers/lib/Selecter.d.ts +19 -12
- package/components/Markers/lib/tools.d.ts +4 -0
- package/components/ToolsBar/IconBox.d.ts +1 -0
- package/components/ToolsBar/SeriesControl/index.d.ts +5 -1
- package/config/constants.d.ts +1 -0
- package/index.js +3001 -2945
- package/package.json +1 -1
- package/types/publish.d.ts +5 -1
|
@@ -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
|
-
|
|
3
|
-
constructor(props
|
|
4
|
-
add():
|
|
5
|
-
remove(no:
|
|
16
|
+
private state;
|
|
17
|
+
constructor(props?: CounterProps);
|
|
18
|
+
add(): string | false;
|
|
19
|
+
remove(no: string): boolean;
|
|
6
20
|
clear(): void;
|
|
7
|
-
destroy(cache: string
|
|
21
|
+
destroy(cache: string[]): void;
|
|
8
22
|
/**
|
|
9
23
|
* 混合onChange,可能包含多个markers实例公用counter
|
|
10
24
|
*
|
|
11
|
-
* @
|
|
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
|
|
18
|
-
* @memberof Range
|
|
33
|
+
* @param p 状态更新参数
|
|
19
34
|
*/
|
|
20
|
-
setState(p:
|
|
21
|
-
|
|
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
|
-
|
|
14
|
+
private state;
|
|
6
15
|
constructor();
|
|
7
16
|
/**
|
|
8
17
|
* 设置当前选中
|
|
9
18
|
*
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @
|
|
13
|
-
* @memberof Select
|
|
19
|
+
* @param parentID 实例的id
|
|
20
|
+
* @param id 被选中的marker的id
|
|
21
|
+
* @param attribute 标记属性
|
|
14
22
|
*/
|
|
15
|
-
set(parentID: string, id:
|
|
16
|
-
select: any;
|
|
17
|
-
}): void;
|
|
23
|
+
set(parentID: string, id: string, attribute: MarkerAttribute): void;
|
|
18
24
|
/**
|
|
19
25
|
* 取消选中
|
|
20
|
-
* @param
|
|
26
|
+
* @param parentID 实例的id
|
|
21
27
|
*/
|
|
22
|
-
cancel(parentID: string
|
|
28
|
+
cancel(parentID: string): void;
|
|
23
29
|
/**
|
|
24
30
|
* 订阅变更
|
|
25
|
-
* @param
|
|
31
|
+
* @param func 回调函数
|
|
26
32
|
*/
|
|
27
|
-
subscription(func:
|
|
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
|
* 峰值算法
|