victory-cursor-container 37.0.2 → 37.1.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 +8 -0
- package/dist/victory-cursor-container.js +451 -740
- package/dist/victory-cursor-container.min.js +1 -1
- package/es/victory-cursor-container.d.ts +63 -112
- package/es/victory-cursor-container.js +155 -140
- package/lib/victory-cursor-container.d.ts +63 -112
- package/lib/victory-cursor-container.js +158 -141
- package/package.json +2 -2
- package/src/victory-cursor-container.tsx +185 -164
|
@@ -1,153 +1,168 @@
|
|
|
1
1
|
import _isObject from "lodash/isObject";
|
|
2
2
|
import _defaults from "lodash/defaults";
|
|
3
|
+
/* eslint-disable complexity */
|
|
3
4
|
import React from "react";
|
|
4
|
-
import {
|
|
5
|
+
import { Helpers, VictoryLabel, LineSegment, VictoryContainer } from "victory-core";
|
|
5
6
|
import { CursorHelpers } from "./cursor-helpers";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
onTouchMove: (evt, targetProps) => {
|
|
33
|
-
return props.disable ? {} : CursorHelpers.onMouseMove(evt, targetProps);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}];
|
|
7
|
+
export const VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS = {
|
|
8
|
+
cursorLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, null),
|
|
9
|
+
cursorLabelOffset: {
|
|
10
|
+
x: 5,
|
|
11
|
+
y: -10
|
|
12
|
+
},
|
|
13
|
+
cursorComponent: /*#__PURE__*/React.createElement(LineSegment, null)
|
|
14
|
+
};
|
|
15
|
+
export const useVictoryCursorContainer = initialProps => {
|
|
16
|
+
const props = {
|
|
17
|
+
...VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS,
|
|
18
|
+
...initialProps
|
|
19
|
+
};
|
|
20
|
+
const {
|
|
21
|
+
children
|
|
22
|
+
} = props;
|
|
23
|
+
const getCursorPosition = () => {
|
|
24
|
+
const {
|
|
25
|
+
cursorValue,
|
|
26
|
+
defaultCursorValue,
|
|
27
|
+
domain,
|
|
28
|
+
cursorDimension
|
|
29
|
+
} = props;
|
|
30
|
+
if (cursorValue) {
|
|
31
|
+
return cursorValue;
|
|
37
32
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
cursorDimension
|
|
44
|
-
} = props;
|
|
45
|
-
if (cursorValue) {
|
|
46
|
-
return cursorValue;
|
|
47
|
-
}
|
|
48
|
-
if (typeof defaultCursorValue === "number") {
|
|
49
|
-
return {
|
|
50
|
-
x: (domain.x[0] + domain.x[1]) / 2,
|
|
51
|
-
y: (domain.y[0] + domain.y[1]) / 2,
|
|
33
|
+
if (typeof defaultCursorValue === "number") {
|
|
34
|
+
return {
|
|
35
|
+
x: (domain.x[0] + domain.x[1]) / 2,
|
|
36
|
+
y: (domain.y[0] + domain.y[1]) / 2,
|
|
37
|
+
...(cursorDimension ? {
|
|
52
38
|
[cursorDimension]: defaultCursorValue
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return defaultCursorValue;
|
|
39
|
+
} : {})
|
|
40
|
+
};
|
|
56
41
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
return defaultCursorValue;
|
|
43
|
+
};
|
|
44
|
+
const getCursorLabelOffset = () => {
|
|
45
|
+
const {
|
|
46
|
+
cursorLabelOffset
|
|
47
|
+
} = props;
|
|
48
|
+
if (typeof cursorLabelOffset === "number") {
|
|
49
|
+
return {
|
|
50
|
+
x: cursorLabelOffset,
|
|
51
|
+
y: cursorLabelOffset
|
|
52
|
+
};
|
|
68
53
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
return Helpers.getPadding(props);
|
|
54
|
+
return cursorLabelOffset;
|
|
55
|
+
};
|
|
56
|
+
const getPadding = () => {
|
|
57
|
+
if (props.padding === undefined) {
|
|
58
|
+
const child = Array.isArray(props.children) ? props.children.find(c => {
|
|
59
|
+
return _isObject(c.props) && c.props.padding !== undefined;
|
|
60
|
+
}) : props.children;
|
|
61
|
+
return Helpers.getPadding(child?.props);
|
|
77
62
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const cursorStyle = Object.assign({
|
|
122
|
-
stroke: "black"
|
|
123
|
-
}, cursorComponent.props.style);
|
|
124
|
-
if (cursorDimension === "x" || cursorDimension === undefined) {
|
|
125
|
-
newElements.push( /*#__PURE__*/React.cloneElement(cursorComponent, {
|
|
126
|
-
key: `${name}-x-cursor`,
|
|
127
|
-
x1: cursorCoordinates.x,
|
|
128
|
-
x2: cursorCoordinates.x,
|
|
129
|
-
y1: padding.top,
|
|
130
|
-
y2: height - padding.bottom,
|
|
131
|
-
style: cursorStyle
|
|
132
|
-
}));
|
|
133
|
-
}
|
|
134
|
-
if (cursorDimension === "y" || cursorDimension === undefined) {
|
|
135
|
-
newElements.push( /*#__PURE__*/React.cloneElement(cursorComponent, {
|
|
136
|
-
key: `${name}-y-cursor`,
|
|
137
|
-
x1: padding.left,
|
|
138
|
-
x2: width - padding.right,
|
|
139
|
-
y1: cursorCoordinates.y,
|
|
140
|
-
y2: cursorCoordinates.y,
|
|
141
|
-
style: cursorStyle
|
|
142
|
-
}));
|
|
63
|
+
return Helpers.getPadding(props);
|
|
64
|
+
};
|
|
65
|
+
const getCursorElements = () => {
|
|
66
|
+
// eslint-disable-line max-statements
|
|
67
|
+
const {
|
|
68
|
+
scale,
|
|
69
|
+
cursorLabelComponent,
|
|
70
|
+
cursorLabel,
|
|
71
|
+
cursorComponent,
|
|
72
|
+
width,
|
|
73
|
+
height,
|
|
74
|
+
name,
|
|
75
|
+
horizontal,
|
|
76
|
+
theme
|
|
77
|
+
} = props;
|
|
78
|
+
const cursorDimension = CursorHelpers.getDimension(props);
|
|
79
|
+
const cursorValue = getCursorPosition();
|
|
80
|
+
const cursorLabelOffset = getCursorLabelOffset();
|
|
81
|
+
if (!cursorValue) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
const newElements = [];
|
|
85
|
+
const padding = getPadding();
|
|
86
|
+
const cursorCoordinates = scale && "x" in scale && "y" in scale && typeof scale.y === "function" && typeof scale.x === "function" ? {
|
|
87
|
+
x: horizontal ? scale.y(cursorValue.y) : scale.x(cursorValue.x),
|
|
88
|
+
y: horizontal ? scale.x(cursorValue.x) : scale.y(cursorValue.y)
|
|
89
|
+
} : {
|
|
90
|
+
x: cursorValue.x,
|
|
91
|
+
y: cursorValue.y
|
|
92
|
+
};
|
|
93
|
+
if (cursorLabel) {
|
|
94
|
+
let labelProps = _defaults({
|
|
95
|
+
active: true
|
|
96
|
+
}, cursorLabelComponent.props, {
|
|
97
|
+
x: cursorCoordinates.x + cursorLabelOffset.x,
|
|
98
|
+
y: cursorCoordinates.y + cursorLabelOffset.y,
|
|
99
|
+
datum: cursorValue,
|
|
100
|
+
active: true,
|
|
101
|
+
key: `${name}-cursor-label`
|
|
102
|
+
});
|
|
103
|
+
if (Helpers.isTooltip(cursorLabelComponent)) {
|
|
104
|
+
const tooltipTheme = theme && theme.tooltip || {};
|
|
105
|
+
labelProps = _defaults({}, labelProps, tooltipTheme);
|
|
143
106
|
}
|
|
144
|
-
|
|
107
|
+
newElements.push( /*#__PURE__*/React.cloneElement(cursorLabelComponent, _defaults({}, labelProps, {
|
|
108
|
+
text: Helpers.evaluateProp(cursorLabel, labelProps)
|
|
109
|
+
})));
|
|
110
|
+
}
|
|
111
|
+
const cursorStyle = Object.assign({
|
|
112
|
+
stroke: "black"
|
|
113
|
+
}, cursorComponent.props.style);
|
|
114
|
+
if (cursorDimension === "x" || cursorDimension === undefined) {
|
|
115
|
+
newElements.push( /*#__PURE__*/React.cloneElement(cursorComponent, {
|
|
116
|
+
key: `${name}-x-cursor`,
|
|
117
|
+
x1: cursorCoordinates.x,
|
|
118
|
+
x2: cursorCoordinates.x,
|
|
119
|
+
y1: padding.top,
|
|
120
|
+
y2: (typeof height === "number" ? height : 0) - padding.bottom,
|
|
121
|
+
style: cursorStyle
|
|
122
|
+
}));
|
|
145
123
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
124
|
+
if (cursorDimension === "y" || cursorDimension === undefined) {
|
|
125
|
+
newElements.push( /*#__PURE__*/React.cloneElement(cursorComponent, {
|
|
126
|
+
key: `${name}-y-cursor`,
|
|
127
|
+
x1: padding.left,
|
|
128
|
+
x2: (typeof width === "number" ? width : 0) - padding.right,
|
|
129
|
+
y1: cursorCoordinates.y,
|
|
130
|
+
y2: cursorCoordinates.y,
|
|
131
|
+
style: cursorStyle
|
|
132
|
+
}));
|
|
150
133
|
}
|
|
134
|
+
return newElements;
|
|
135
|
+
};
|
|
136
|
+
return {
|
|
137
|
+
props,
|
|
138
|
+
children: [...React.Children.toArray(children), ...getCursorElements()]
|
|
151
139
|
};
|
|
152
|
-
}
|
|
153
|
-
export const VictoryCursorContainer =
|
|
140
|
+
};
|
|
141
|
+
export const VictoryCursorContainer = initialProps => {
|
|
142
|
+
const {
|
|
143
|
+
props,
|
|
144
|
+
children
|
|
145
|
+
} = useVictoryCursorContainer(initialProps);
|
|
146
|
+
return /*#__PURE__*/React.createElement(VictoryContainer, props, children);
|
|
147
|
+
};
|
|
148
|
+
VictoryCursorContainer.role = "container";
|
|
149
|
+
VictoryCursorContainer.defaultEvents = initialProps => {
|
|
150
|
+
const props = {
|
|
151
|
+
...VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS,
|
|
152
|
+
...initialProps
|
|
153
|
+
};
|
|
154
|
+
const createEventHandler = (handler, disabled) =>
|
|
155
|
+
// eslint-disable-next-line max-params
|
|
156
|
+
(event, targetProps, eventKey, context) => disabled || props.disable ? {} : handler(event, {
|
|
157
|
+
...props,
|
|
158
|
+
...targetProps
|
|
159
|
+
}, eventKey, context);
|
|
160
|
+
return [{
|
|
161
|
+
target: "parent",
|
|
162
|
+
eventHandlers: {
|
|
163
|
+
onMouseLeave: createEventHandler(CursorHelpers.onMouseLeave),
|
|
164
|
+
onMouseMove: createEventHandler(CursorHelpers.onMouseMove),
|
|
165
|
+
onTouchMove: createEventHandler(CursorHelpers.onMouseMove)
|
|
166
|
+
}
|
|
167
|
+
}];
|
|
168
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor, VictoryEventHandler, DomainTuple, PaddingProps } from "victory-core";
|
|
3
3
|
export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
|
|
4
4
|
export interface VictoryCursorContainerProps extends VictoryContainerProps {
|
|
5
5
|
cursorComponent?: React.ReactElement;
|
|
@@ -9,126 +9,77 @@ export interface VictoryCursorContainerProps extends VictoryContainerProps {
|
|
|
9
9
|
cursorLabelOffset?: CursorCoordinatesPropType;
|
|
10
10
|
defaultCursorValue?: CursorCoordinatesPropType;
|
|
11
11
|
disable?: boolean;
|
|
12
|
+
horizontal?: boolean;
|
|
13
|
+
padding?: PaddingProps;
|
|
12
14
|
onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
|
|
13
15
|
}
|
|
14
|
-
declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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;
|
|
16
|
+
export declare const VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS: {
|
|
17
|
+
cursorLabelComponent: JSX.Element;
|
|
18
|
+
cursorLabelOffset: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
50
21
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
22
|
+
cursorComponent: JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
export declare const useVictoryCursorContainer: (initialProps: VictoryCursorContainerProps) => {
|
|
25
|
+
props: {
|
|
26
|
+
cursorValue: CoordinatesPropType | null;
|
|
27
|
+
domain: {
|
|
28
|
+
x: DomainTuple;
|
|
29
|
+
y: DomainTuple;
|
|
57
30
|
};
|
|
58
31
|
cursorComponent: JSX.Element;
|
|
59
|
-
|
|
60
|
-
|
|
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: {
|
|
32
|
+
cursorDimension?: "x" | "y" | undefined;
|
|
33
|
+
cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
|
|
111
34
|
cursorLabelComponent: JSX.Element;
|
|
112
|
-
cursorLabelOffset:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
35
|
+
cursorLabelOffset: CursorCoordinatesPropType;
|
|
36
|
+
defaultCursorValue?: CursorCoordinatesPropType | undefined;
|
|
37
|
+
disable?: boolean | undefined;
|
|
38
|
+
horizontal?: boolean | undefined;
|
|
39
|
+
padding?: PaddingProps | undefined;
|
|
40
|
+
onCursorChange?: ((value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void) | undefined;
|
|
41
|
+
"aria-describedby"?: string | undefined;
|
|
42
|
+
"aria-labelledby"?: string | undefined;
|
|
43
|
+
children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
|
|
44
|
+
className?: string | undefined;
|
|
45
|
+
containerId?: string | number | undefined;
|
|
46
|
+
containerRef?: React.Ref<HTMLElement> | undefined;
|
|
47
|
+
desc?: string | undefined;
|
|
48
|
+
events?: React.DOMAttributes<any> | undefined;
|
|
49
|
+
height?: number | undefined;
|
|
50
|
+
name?: string | undefined;
|
|
51
|
+
origin?: import("victory-core").OriginType | undefined;
|
|
52
|
+
polar?: boolean | undefined;
|
|
53
|
+
portalComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
54
|
+
portalZIndex?: number | undefined;
|
|
55
|
+
preserveAspectRatio?: string | undefined;
|
|
56
|
+
responsive?: boolean | undefined;
|
|
57
|
+
role?: string | undefined;
|
|
58
|
+
scale?: {
|
|
59
|
+
x?: import("victory-core").D3Scale<any> | undefined;
|
|
60
|
+
y?: import("victory-core").D3Scale<any> | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
style?: React.CSSProperties | undefined;
|
|
63
|
+
tabIndex?: number | undefined;
|
|
64
|
+
theme?: import("victory-core").VictoryThemeDefinition | undefined;
|
|
65
|
+
title?: string | undefined;
|
|
66
|
+
width?: number | undefined;
|
|
67
|
+
ouiaId?: string | number | undefined;
|
|
68
|
+
ouiaSafe?: boolean | undefined;
|
|
69
|
+
ouiaType?: string | undefined;
|
|
122
70
|
};
|
|
123
|
-
|
|
71
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
72
|
+
};
|
|
73
|
+
export declare const VictoryCursorContainer: {
|
|
74
|
+
(initialProps: VictoryCursorContainerProps): JSX.Element;
|
|
75
|
+
role: string;
|
|
76
|
+
defaultEvents(initialProps: VictoryCursorContainerProps): {
|
|
124
77
|
target: string;
|
|
125
78
|
eventHandlers: {
|
|
126
|
-
onMouseLeave:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
onTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
79
|
+
onMouseLeave: VictoryEventHandler;
|
|
80
|
+
onMouseMove: VictoryEventHandler;
|
|
81
|
+
onTouchMove: VictoryEventHandler;
|
|
130
82
|
};
|
|
131
83
|
}[];
|
|
132
|
-
}
|
|
133
|
-
export {};
|
|
84
|
+
};
|
|
134
85
|
//# sourceMappingURL=victory-cursor-container.d.ts.map
|