victory-cursor-container 36.9.0 → 36.9.1-next.0
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/CHANGELOG.md +7 -0
- package/es/cursor-helpers.d.ts +32 -32
- package/es/index.d.ts +2 -2
- package/es/victory-cursor-container.d.ts +133 -134
- package/lib/cursor-helpers.d.ts +32 -32
- package/lib/index.d.ts +2 -2
- package/lib/victory-cursor-container.d.ts +133 -134
- package/package.json +2 -5
- package/src/victory-cursor-container.tsx +0 -1
package/CHANGELOG.md
CHANGED
package/es/cursor-helpers.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
import { Selection } from "victory-core";
|
|
3
|
-
declare class CursorHelpersClass {
|
|
4
|
-
getDimension(props: any): any;
|
|
5
|
-
withinBounds(point: any, bounds: any): boolean;
|
|
6
|
-
private handleMouseMove;
|
|
7
|
-
onMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {
|
|
8
|
-
target: string;
|
|
9
|
-
eventKey: string;
|
|
10
|
-
mutation: () => {
|
|
11
|
-
cursorValue: Selection.SVGCoordinateType | null;
|
|
12
|
-
parentSVG: any;
|
|
13
|
-
};
|
|
14
|
-
}[]>;
|
|
15
|
-
onMouseLeave: (evt: any, targetProps: any) => {
|
|
16
|
-
target: string;
|
|
17
|
-
eventKey: string;
|
|
18
|
-
mutation: () => {
|
|
19
|
-
cursorValue: Selection.SVGCoordinateType | null;
|
|
20
|
-
parentSVG: any;
|
|
21
|
-
};
|
|
22
|
-
}[];
|
|
23
|
-
onTouchEnd: (evt: any, targetProps: any) => {
|
|
24
|
-
target: string;
|
|
25
|
-
eventKey: string;
|
|
26
|
-
mutation: () => {
|
|
27
|
-
cursorValue: null;
|
|
28
|
-
};
|
|
29
|
-
}[];
|
|
30
|
-
}
|
|
31
|
-
export declare const CursorHelpers: CursorHelpersClass;
|
|
32
|
-
export {};
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { Selection } from "victory-core";
|
|
3
|
+
declare class CursorHelpersClass {
|
|
4
|
+
getDimension(props: any): any;
|
|
5
|
+
withinBounds(point: any, bounds: any): boolean;
|
|
6
|
+
private handleMouseMove;
|
|
7
|
+
onMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {
|
|
8
|
+
target: string;
|
|
9
|
+
eventKey: string;
|
|
10
|
+
mutation: () => {
|
|
11
|
+
cursorValue: Selection.SVGCoordinateType | null;
|
|
12
|
+
parentSVG: any;
|
|
13
|
+
};
|
|
14
|
+
}[]>;
|
|
15
|
+
onMouseLeave: (evt: any, targetProps: any) => {
|
|
16
|
+
target: string;
|
|
17
|
+
eventKey: string;
|
|
18
|
+
mutation: () => {
|
|
19
|
+
cursorValue: Selection.SVGCoordinateType | null;
|
|
20
|
+
parentSVG: any;
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
onTouchEnd: (evt: any, targetProps: any) => {
|
|
24
|
+
target: string;
|
|
25
|
+
eventKey: string;
|
|
26
|
+
mutation: () => {
|
|
27
|
+
cursorValue: null;
|
|
28
|
+
};
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
export declare const CursorHelpers: CursorHelpersClass;
|
|
32
|
+
export {};
|
|
33
33
|
//# sourceMappingURL=cursor-helpers.d.ts.map
|
package/es/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./cursor-helpers";
|
|
2
|
-
export * from "./victory-cursor-container";
|
|
1
|
+
export * from "./cursor-helpers";
|
|
2
|
+
export * from "./victory-cursor-container";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,135 +1,134 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryContainer, VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor } from "victory-core";
|
|
3
|
-
export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
|
|
4
|
-
export interface VictoryCursorContainerProps extends VictoryContainerProps {
|
|
5
|
-
cursorComponent?: React.ReactElement;
|
|
6
|
-
cursorDimension?: "x" | "y";
|
|
7
|
-
cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
|
|
8
|
-
cursorLabelComponent?: React.ReactElement;
|
|
9
|
-
cursorLabelOffset?: CursorCoordinatesPropType;
|
|
10
|
-
defaultCursorValue?: CursorCoordinatesPropType;
|
|
11
|
-
disable?: boolean;
|
|
12
|
-
onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
|
|
13
|
-
}
|
|
14
|
-
declare type ComponentClass<TProps> = {
|
|
15
|
-
new (props: TProps): React.Component<TProps>;
|
|
16
|
-
};
|
|
17
|
-
export declare function cursorContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryCursorContainerProps>(Base: TBase): {
|
|
18
|
-
new (props: TProps): {
|
|
19
|
-
getCursorPosition(props: any): any;
|
|
20
|
-
getCursorLabelOffset(props: any): any;
|
|
21
|
-
getPadding(props: any): {
|
|
22
|
-
top: any;
|
|
23
|
-
bottom: any;
|
|
24
|
-
left: any;
|
|
25
|
-
right: any;
|
|
26
|
-
};
|
|
27
|
-
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
28
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
29
|
-
context: unknown;
|
|
30
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
31
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
32
|
-
render(): React.ReactNode;
|
|
33
|
-
readonly props: Readonly<TProps>;
|
|
34
|
-
state: Readonly<{}>;
|
|
35
|
-
refs: {
|
|
36
|
-
[key: string]: React.ReactInstance;
|
|
37
|
-
};
|
|
38
|
-
componentDidMount?(): void;
|
|
39
|
-
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
40
|
-
componentWillUnmount?(): void;
|
|
41
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
43
|
-
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
44
|
-
componentWillMount?(): void;
|
|
45
|
-
UNSAFE_componentWillMount?(): void;
|
|
46
|
-
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
47
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
48
|
-
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
49
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
50
|
-
};
|
|
51
|
-
displayName: string;
|
|
52
|
-
defaultProps: {
|
|
53
|
-
cursorLabelComponent: JSX.Element;
|
|
54
|
-
cursorLabelOffset: {
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
};
|
|
58
|
-
cursorComponent: JSX.Element;
|
|
59
|
-
className: string;
|
|
60
|
-
portalComponent: JSX.Element;
|
|
61
|
-
portalZIndex: number;
|
|
62
|
-
responsive: boolean;
|
|
63
|
-
role: string;
|
|
64
|
-
};
|
|
65
|
-
defaultEvents: (props: any) => {
|
|
66
|
-
target: string;
|
|
67
|
-
eventHandlers: {
|
|
68
|
-
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
69
|
-
onTouchCancel: () => never[];
|
|
70
|
-
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
71
|
-
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
72
|
-
};
|
|
73
|
-
}[];
|
|
74
|
-
} & TBase;
|
|
75
|
-
export declare const VictoryCursorContainer: {
|
|
76
|
-
new (props: VictoryCursorContainerProps): {
|
|
77
|
-
getCursorPosition(props: any): any;
|
|
78
|
-
getCursorLabelOffset(props: any): any;
|
|
79
|
-
getPadding(props: any): {
|
|
80
|
-
top: any;
|
|
81
|
-
bottom: any;
|
|
82
|
-
left: any;
|
|
83
|
-
right: any;
|
|
84
|
-
};
|
|
85
|
-
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
86
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
87
|
-
context: unknown;
|
|
88
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryCursorContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
89
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
90
|
-
render(): React.ReactNode;
|
|
91
|
-
readonly props: Readonly<VictoryCursorContainerProps>;
|
|
92
|
-
state: Readonly<{}>;
|
|
93
|
-
refs: {
|
|
94
|
-
[key: string]: React.ReactInstance;
|
|
95
|
-
};
|
|
96
|
-
componentDidMount?(): void;
|
|
97
|
-
shouldComponentUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
98
|
-
componentWillUnmount?(): void;
|
|
99
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
100
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>): any;
|
|
101
|
-
componentDidUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
102
|
-
componentWillMount?(): void;
|
|
103
|
-
UNSAFE_componentWillMount?(): void;
|
|
104
|
-
componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
105
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
106
|
-
componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
107
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
108
|
-
};
|
|
109
|
-
displayName: string;
|
|
110
|
-
defaultProps: {
|
|
111
|
-
cursorLabelComponent: JSX.Element;
|
|
112
|
-
cursorLabelOffset: {
|
|
113
|
-
x: number;
|
|
114
|
-
y: number;
|
|
115
|
-
};
|
|
116
|
-
cursorComponent: JSX.Element;
|
|
117
|
-
className: string;
|
|
118
|
-
portalComponent: JSX.Element;
|
|
119
|
-
portalZIndex: number;
|
|
120
|
-
responsive: boolean;
|
|
121
|
-
role: string;
|
|
122
|
-
};
|
|
123
|
-
defaultEvents: (props: any) => {
|
|
124
|
-
target: string;
|
|
125
|
-
eventHandlers: {
|
|
126
|
-
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
127
|
-
onTouchCancel: () => never[];
|
|
128
|
-
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
129
|
-
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
130
|
-
};
|
|
131
|
-
}[];
|
|
132
|
-
} & typeof VictoryContainer;
|
|
133
|
-
export
|
|
134
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryContainer, VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor } from "victory-core";
|
|
3
|
+
export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
|
|
4
|
+
export interface VictoryCursorContainerProps extends VictoryContainerProps {
|
|
5
|
+
cursorComponent?: React.ReactElement;
|
|
6
|
+
cursorDimension?: "x" | "y";
|
|
7
|
+
cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
|
|
8
|
+
cursorLabelComponent?: React.ReactElement;
|
|
9
|
+
cursorLabelOffset?: CursorCoordinatesPropType;
|
|
10
|
+
defaultCursorValue?: CursorCoordinatesPropType;
|
|
11
|
+
disable?: boolean;
|
|
12
|
+
onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
|
|
13
|
+
}
|
|
14
|
+
declare type ComponentClass<TProps> = {
|
|
15
|
+
new (props: TProps): React.Component<TProps>;
|
|
16
|
+
};
|
|
17
|
+
export declare function cursorContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryCursorContainerProps>(Base: TBase): {
|
|
18
|
+
new (props: TProps): {
|
|
19
|
+
getCursorPosition(props: any): any;
|
|
20
|
+
getCursorLabelOffset(props: any): any;
|
|
21
|
+
getPadding(props: any): {
|
|
22
|
+
top: any;
|
|
23
|
+
bottom: any;
|
|
24
|
+
left: any;
|
|
25
|
+
right: any;
|
|
26
|
+
};
|
|
27
|
+
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
28
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
29
|
+
context: unknown;
|
|
30
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
31
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
32
|
+
render(): React.ReactNode;
|
|
33
|
+
readonly props: Readonly<TProps>;
|
|
34
|
+
state: Readonly<{}>;
|
|
35
|
+
refs: {
|
|
36
|
+
[key: string]: React.ReactInstance;
|
|
37
|
+
};
|
|
38
|
+
componentDidMount?(): void;
|
|
39
|
+
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
40
|
+
componentWillUnmount?(): void;
|
|
41
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
43
|
+
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
44
|
+
componentWillMount?(): void;
|
|
45
|
+
UNSAFE_componentWillMount?(): void;
|
|
46
|
+
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
47
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
48
|
+
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
49
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
50
|
+
};
|
|
51
|
+
displayName: string;
|
|
52
|
+
defaultProps: {
|
|
53
|
+
cursorLabelComponent: JSX.Element;
|
|
54
|
+
cursorLabelOffset: {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
};
|
|
58
|
+
cursorComponent: JSX.Element;
|
|
59
|
+
className: string;
|
|
60
|
+
portalComponent: JSX.Element;
|
|
61
|
+
portalZIndex: number;
|
|
62
|
+
responsive: boolean;
|
|
63
|
+
role: string;
|
|
64
|
+
};
|
|
65
|
+
defaultEvents: (props: any) => {
|
|
66
|
+
target: string;
|
|
67
|
+
eventHandlers: {
|
|
68
|
+
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
69
|
+
onTouchCancel: () => never[];
|
|
70
|
+
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
71
|
+
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
72
|
+
};
|
|
73
|
+
}[];
|
|
74
|
+
} & TBase;
|
|
75
|
+
export declare const VictoryCursorContainer: {
|
|
76
|
+
new (props: VictoryCursorContainerProps): {
|
|
77
|
+
getCursorPosition(props: any): any;
|
|
78
|
+
getCursorLabelOffset(props: any): any;
|
|
79
|
+
getPadding(props: any): {
|
|
80
|
+
top: any;
|
|
81
|
+
bottom: any;
|
|
82
|
+
left: any;
|
|
83
|
+
right: any;
|
|
84
|
+
};
|
|
85
|
+
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
86
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
87
|
+
context: unknown;
|
|
88
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryCursorContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
89
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
90
|
+
render(): React.ReactNode;
|
|
91
|
+
readonly props: Readonly<VictoryCursorContainerProps>;
|
|
92
|
+
state: Readonly<{}>;
|
|
93
|
+
refs: {
|
|
94
|
+
[key: string]: React.ReactInstance;
|
|
95
|
+
};
|
|
96
|
+
componentDidMount?(): void;
|
|
97
|
+
shouldComponentUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
98
|
+
componentWillUnmount?(): void;
|
|
99
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
100
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>): any;
|
|
101
|
+
componentDidUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
102
|
+
componentWillMount?(): void;
|
|
103
|
+
UNSAFE_componentWillMount?(): void;
|
|
104
|
+
componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
105
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
106
|
+
componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
107
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
108
|
+
};
|
|
109
|
+
displayName: string;
|
|
110
|
+
defaultProps: {
|
|
111
|
+
cursorLabelComponent: JSX.Element;
|
|
112
|
+
cursorLabelOffset: {
|
|
113
|
+
x: number;
|
|
114
|
+
y: number;
|
|
115
|
+
};
|
|
116
|
+
cursorComponent: JSX.Element;
|
|
117
|
+
className: string;
|
|
118
|
+
portalComponent: JSX.Element;
|
|
119
|
+
portalZIndex: number;
|
|
120
|
+
responsive: boolean;
|
|
121
|
+
role: string;
|
|
122
|
+
};
|
|
123
|
+
defaultEvents: (props: any) => {
|
|
124
|
+
target: string;
|
|
125
|
+
eventHandlers: {
|
|
126
|
+
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
127
|
+
onTouchCancel: () => never[];
|
|
128
|
+
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
129
|
+
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
130
|
+
};
|
|
131
|
+
}[];
|
|
132
|
+
} & typeof VictoryContainer;
|
|
133
|
+
export {};
|
|
135
134
|
//# sourceMappingURL=victory-cursor-container.d.ts.map
|
package/lib/cursor-helpers.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
import { Selection } from "victory-core";
|
|
3
|
-
declare class CursorHelpersClass {
|
|
4
|
-
getDimension(props: any): any;
|
|
5
|
-
withinBounds(point: any, bounds: any): boolean;
|
|
6
|
-
private handleMouseMove;
|
|
7
|
-
onMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {
|
|
8
|
-
target: string;
|
|
9
|
-
eventKey: string;
|
|
10
|
-
mutation: () => {
|
|
11
|
-
cursorValue: Selection.SVGCoordinateType | null;
|
|
12
|
-
parentSVG: any;
|
|
13
|
-
};
|
|
14
|
-
}[]>;
|
|
15
|
-
onMouseLeave: (evt: any, targetProps: any) => {
|
|
16
|
-
target: string;
|
|
17
|
-
eventKey: string;
|
|
18
|
-
mutation: () => {
|
|
19
|
-
cursorValue: Selection.SVGCoordinateType | null;
|
|
20
|
-
parentSVG: any;
|
|
21
|
-
};
|
|
22
|
-
}[];
|
|
23
|
-
onTouchEnd: (evt: any, targetProps: any) => {
|
|
24
|
-
target: string;
|
|
25
|
-
eventKey: string;
|
|
26
|
-
mutation: () => {
|
|
27
|
-
cursorValue: null;
|
|
28
|
-
};
|
|
29
|
-
}[];
|
|
30
|
-
}
|
|
31
|
-
export declare const CursorHelpers: CursorHelpersClass;
|
|
32
|
-
export {};
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { Selection } from "victory-core";
|
|
3
|
+
declare class CursorHelpersClass {
|
|
4
|
+
getDimension(props: any): any;
|
|
5
|
+
withinBounds(point: any, bounds: any): boolean;
|
|
6
|
+
private handleMouseMove;
|
|
7
|
+
onMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {
|
|
8
|
+
target: string;
|
|
9
|
+
eventKey: string;
|
|
10
|
+
mutation: () => {
|
|
11
|
+
cursorValue: Selection.SVGCoordinateType | null;
|
|
12
|
+
parentSVG: any;
|
|
13
|
+
};
|
|
14
|
+
}[]>;
|
|
15
|
+
onMouseLeave: (evt: any, targetProps: any) => {
|
|
16
|
+
target: string;
|
|
17
|
+
eventKey: string;
|
|
18
|
+
mutation: () => {
|
|
19
|
+
cursorValue: Selection.SVGCoordinateType | null;
|
|
20
|
+
parentSVG: any;
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
onTouchEnd: (evt: any, targetProps: any) => {
|
|
24
|
+
target: string;
|
|
25
|
+
eventKey: string;
|
|
26
|
+
mutation: () => {
|
|
27
|
+
cursorValue: null;
|
|
28
|
+
};
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
export declare const CursorHelpers: CursorHelpersClass;
|
|
32
|
+
export {};
|
|
33
33
|
//# sourceMappingURL=cursor-helpers.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./cursor-helpers";
|
|
2
|
-
export * from "./victory-cursor-container";
|
|
1
|
+
export * from "./cursor-helpers";
|
|
2
|
+
export * from "./victory-cursor-container";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,135 +1,134 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryContainer, VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor } from "victory-core";
|
|
3
|
-
export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
|
|
4
|
-
export interface VictoryCursorContainerProps extends VictoryContainerProps {
|
|
5
|
-
cursorComponent?: React.ReactElement;
|
|
6
|
-
cursorDimension?: "x" | "y";
|
|
7
|
-
cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
|
|
8
|
-
cursorLabelComponent?: React.ReactElement;
|
|
9
|
-
cursorLabelOffset?: CursorCoordinatesPropType;
|
|
10
|
-
defaultCursorValue?: CursorCoordinatesPropType;
|
|
11
|
-
disable?: boolean;
|
|
12
|
-
onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
|
|
13
|
-
}
|
|
14
|
-
declare type ComponentClass<TProps> = {
|
|
15
|
-
new (props: TProps): React.Component<TProps>;
|
|
16
|
-
};
|
|
17
|
-
export declare function cursorContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryCursorContainerProps>(Base: TBase): {
|
|
18
|
-
new (props: TProps): {
|
|
19
|
-
getCursorPosition(props: any): any;
|
|
20
|
-
getCursorLabelOffset(props: any): any;
|
|
21
|
-
getPadding(props: any): {
|
|
22
|
-
top: any;
|
|
23
|
-
bottom: any;
|
|
24
|
-
left: any;
|
|
25
|
-
right: any;
|
|
26
|
-
};
|
|
27
|
-
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
28
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
29
|
-
context: unknown;
|
|
30
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
31
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
32
|
-
render(): React.ReactNode;
|
|
33
|
-
readonly props: Readonly<TProps>;
|
|
34
|
-
state: Readonly<{}>;
|
|
35
|
-
refs: {
|
|
36
|
-
[key: string]: React.ReactInstance;
|
|
37
|
-
};
|
|
38
|
-
componentDidMount?(): void;
|
|
39
|
-
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
40
|
-
componentWillUnmount?(): void;
|
|
41
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
43
|
-
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
44
|
-
componentWillMount?(): void;
|
|
45
|
-
UNSAFE_componentWillMount?(): void;
|
|
46
|
-
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
47
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
48
|
-
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
49
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
50
|
-
};
|
|
51
|
-
displayName: string;
|
|
52
|
-
defaultProps: {
|
|
53
|
-
cursorLabelComponent: JSX.Element;
|
|
54
|
-
cursorLabelOffset: {
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
};
|
|
58
|
-
cursorComponent: JSX.Element;
|
|
59
|
-
className: string;
|
|
60
|
-
portalComponent: JSX.Element;
|
|
61
|
-
portalZIndex: number;
|
|
62
|
-
responsive: boolean;
|
|
63
|
-
role: string;
|
|
64
|
-
};
|
|
65
|
-
defaultEvents: (props: any) => {
|
|
66
|
-
target: string;
|
|
67
|
-
eventHandlers: {
|
|
68
|
-
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
69
|
-
onTouchCancel: () => never[];
|
|
70
|
-
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
71
|
-
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
72
|
-
};
|
|
73
|
-
}[];
|
|
74
|
-
} & TBase;
|
|
75
|
-
export declare const VictoryCursorContainer: {
|
|
76
|
-
new (props: VictoryCursorContainerProps): {
|
|
77
|
-
getCursorPosition(props: any): any;
|
|
78
|
-
getCursorLabelOffset(props: any): any;
|
|
79
|
-
getPadding(props: any): {
|
|
80
|
-
top: any;
|
|
81
|
-
bottom: any;
|
|
82
|
-
left: any;
|
|
83
|
-
right: any;
|
|
84
|
-
};
|
|
85
|
-
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
86
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
87
|
-
context: unknown;
|
|
88
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryCursorContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
89
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
90
|
-
render(): React.ReactNode;
|
|
91
|
-
readonly props: Readonly<VictoryCursorContainerProps>;
|
|
92
|
-
state: Readonly<{}>;
|
|
93
|
-
refs: {
|
|
94
|
-
[key: string]: React.ReactInstance;
|
|
95
|
-
};
|
|
96
|
-
componentDidMount?(): void;
|
|
97
|
-
shouldComponentUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
98
|
-
componentWillUnmount?(): void;
|
|
99
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
100
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>): any;
|
|
101
|
-
componentDidUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
102
|
-
componentWillMount?(): void;
|
|
103
|
-
UNSAFE_componentWillMount?(): void;
|
|
104
|
-
componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
105
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
106
|
-
componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
107
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
108
|
-
};
|
|
109
|
-
displayName: string;
|
|
110
|
-
defaultProps: {
|
|
111
|
-
cursorLabelComponent: JSX.Element;
|
|
112
|
-
cursorLabelOffset: {
|
|
113
|
-
x: number;
|
|
114
|
-
y: number;
|
|
115
|
-
};
|
|
116
|
-
cursorComponent: JSX.Element;
|
|
117
|
-
className: string;
|
|
118
|
-
portalComponent: JSX.Element;
|
|
119
|
-
portalZIndex: number;
|
|
120
|
-
responsive: boolean;
|
|
121
|
-
role: string;
|
|
122
|
-
};
|
|
123
|
-
defaultEvents: (props: any) => {
|
|
124
|
-
target: string;
|
|
125
|
-
eventHandlers: {
|
|
126
|
-
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
127
|
-
onTouchCancel: () => never[];
|
|
128
|
-
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
129
|
-
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
130
|
-
};
|
|
131
|
-
}[];
|
|
132
|
-
} & typeof VictoryContainer;
|
|
133
|
-
export
|
|
134
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryContainer, VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor } from "victory-core";
|
|
3
|
+
export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
|
|
4
|
+
export interface VictoryCursorContainerProps extends VictoryContainerProps {
|
|
5
|
+
cursorComponent?: React.ReactElement;
|
|
6
|
+
cursorDimension?: "x" | "y";
|
|
7
|
+
cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
|
|
8
|
+
cursorLabelComponent?: React.ReactElement;
|
|
9
|
+
cursorLabelOffset?: CursorCoordinatesPropType;
|
|
10
|
+
defaultCursorValue?: CursorCoordinatesPropType;
|
|
11
|
+
disable?: boolean;
|
|
12
|
+
onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
|
|
13
|
+
}
|
|
14
|
+
declare type ComponentClass<TProps> = {
|
|
15
|
+
new (props: TProps): React.Component<TProps>;
|
|
16
|
+
};
|
|
17
|
+
export declare function cursorContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryCursorContainerProps>(Base: TBase): {
|
|
18
|
+
new (props: TProps): {
|
|
19
|
+
getCursorPosition(props: any): any;
|
|
20
|
+
getCursorLabelOffset(props: any): any;
|
|
21
|
+
getPadding(props: any): {
|
|
22
|
+
top: any;
|
|
23
|
+
bottom: any;
|
|
24
|
+
left: any;
|
|
25
|
+
right: any;
|
|
26
|
+
};
|
|
27
|
+
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
28
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
29
|
+
context: unknown;
|
|
30
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
31
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
32
|
+
render(): React.ReactNode;
|
|
33
|
+
readonly props: Readonly<TProps>;
|
|
34
|
+
state: Readonly<{}>;
|
|
35
|
+
refs: {
|
|
36
|
+
[key: string]: React.ReactInstance;
|
|
37
|
+
};
|
|
38
|
+
componentDidMount?(): void;
|
|
39
|
+
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
40
|
+
componentWillUnmount?(): void;
|
|
41
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
43
|
+
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
44
|
+
componentWillMount?(): void;
|
|
45
|
+
UNSAFE_componentWillMount?(): void;
|
|
46
|
+
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
47
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
48
|
+
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
49
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
50
|
+
};
|
|
51
|
+
displayName: string;
|
|
52
|
+
defaultProps: {
|
|
53
|
+
cursorLabelComponent: JSX.Element;
|
|
54
|
+
cursorLabelOffset: {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
};
|
|
58
|
+
cursorComponent: JSX.Element;
|
|
59
|
+
className: string;
|
|
60
|
+
portalComponent: JSX.Element;
|
|
61
|
+
portalZIndex: number;
|
|
62
|
+
responsive: boolean;
|
|
63
|
+
role: string;
|
|
64
|
+
};
|
|
65
|
+
defaultEvents: (props: any) => {
|
|
66
|
+
target: string;
|
|
67
|
+
eventHandlers: {
|
|
68
|
+
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
69
|
+
onTouchCancel: () => never[];
|
|
70
|
+
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
71
|
+
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
72
|
+
};
|
|
73
|
+
}[];
|
|
74
|
+
} & TBase;
|
|
75
|
+
export declare const VictoryCursorContainer: {
|
|
76
|
+
new (props: VictoryCursorContainerProps): {
|
|
77
|
+
getCursorPosition(props: any): any;
|
|
78
|
+
getCursorLabelOffset(props: any): any;
|
|
79
|
+
getPadding(props: any): {
|
|
80
|
+
top: any;
|
|
81
|
+
bottom: any;
|
|
82
|
+
left: any;
|
|
83
|
+
right: any;
|
|
84
|
+
};
|
|
85
|
+
getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
86
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
|
|
87
|
+
context: unknown;
|
|
88
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryCursorContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
89
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
90
|
+
render(): React.ReactNode;
|
|
91
|
+
readonly props: Readonly<VictoryCursorContainerProps>;
|
|
92
|
+
state: Readonly<{}>;
|
|
93
|
+
refs: {
|
|
94
|
+
[key: string]: React.ReactInstance;
|
|
95
|
+
};
|
|
96
|
+
componentDidMount?(): void;
|
|
97
|
+
shouldComponentUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
98
|
+
componentWillUnmount?(): void;
|
|
99
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
100
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>): any;
|
|
101
|
+
componentDidUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
102
|
+
componentWillMount?(): void;
|
|
103
|
+
UNSAFE_componentWillMount?(): void;
|
|
104
|
+
componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
105
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
|
|
106
|
+
componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
107
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
108
|
+
};
|
|
109
|
+
displayName: string;
|
|
110
|
+
defaultProps: {
|
|
111
|
+
cursorLabelComponent: JSX.Element;
|
|
112
|
+
cursorLabelOffset: {
|
|
113
|
+
x: number;
|
|
114
|
+
y: number;
|
|
115
|
+
};
|
|
116
|
+
cursorComponent: JSX.Element;
|
|
117
|
+
className: string;
|
|
118
|
+
portalComponent: JSX.Element;
|
|
119
|
+
portalZIndex: number;
|
|
120
|
+
responsive: boolean;
|
|
121
|
+
role: string;
|
|
122
|
+
};
|
|
123
|
+
defaultEvents: (props: any) => {
|
|
124
|
+
target: string;
|
|
125
|
+
eventHandlers: {
|
|
126
|
+
onMouseLeave: (evt: any, targetProps: any) => {};
|
|
127
|
+
onTouchCancel: () => never[];
|
|
128
|
+
onMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
129
|
+
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
130
|
+
};
|
|
131
|
+
}[];
|
|
132
|
+
} & typeof VictoryContainer;
|
|
133
|
+
export {};
|
|
135
134
|
//# sourceMappingURL=victory-cursor-container.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-cursor-container",
|
|
3
|
-
"version": "36.9.0",
|
|
3
|
+
"version": "36.9.1-next.0",
|
|
4
4
|
"description": "Interactive Cursor Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,14 +21,11 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
|
-
"victory-core": "^36.9.0"
|
|
24
|
+
"victory-core": "^36.9.1-next.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": ">=16.6.0"
|
|
28
28
|
},
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"provenance": true
|
|
31
|
-
},
|
|
32
29
|
"wireit": {
|
|
33
30
|
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
|
34
31
|
"### DO NOT MODIFY THESE MANUALLY ####": {},
|