victory-brush-container 37.0.1-next.2 → 37.0.2
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 +4 -3
- package/es/brush-helpers.d.ts +70 -70
- package/es/index.d.ts +2 -2
- package/es/victory-brush-container.d.ts +205 -205
- package/lib/brush-helpers.d.ts +70 -70
- package/lib/index.d.ts +2 -2
- package/lib/victory-brush-container.d.ts +205 -205
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# victory-brush-container
|
|
2
2
|
|
|
3
|
-
## 37.0.
|
|
3
|
+
## 37.0.2
|
|
4
|
+
|
|
5
|
+
## 37.0.1
|
|
4
6
|
|
|
5
7
|
### Patch Changes
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
- victory-core@37.0.1-next.2
|
|
9
|
+
- Fix the signature of class static functions in components ([#2840](https://github.com/FormidableLabs/victory/pull/2840))
|
|
9
10
|
|
|
10
11
|
## 37.0.0
|
|
11
12
|
|
package/es/brush-helpers.d.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
export declare const BrushHelpers: {
|
|
3
|
-
onMouseDown: (evt: any, targetProps: any) => {};
|
|
4
|
-
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
5
|
-
onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
|
|
6
|
-
getDimension(props: any): any;
|
|
7
|
-
withinBounds(point: any, bounds: any, padding?: any): boolean;
|
|
8
|
-
getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
|
|
9
|
-
x1: number;
|
|
10
|
-
x2: number;
|
|
11
|
-
y1: number;
|
|
12
|
-
y2: number;
|
|
13
|
-
};
|
|
14
|
-
getHandles(props: any, domainBox: any): {
|
|
15
|
-
left: false | {
|
|
16
|
-
x1: number;
|
|
17
|
-
x2: number;
|
|
18
|
-
y1: any;
|
|
19
|
-
y2: any;
|
|
20
|
-
};
|
|
21
|
-
right: false | {
|
|
22
|
-
x1: number;
|
|
23
|
-
x2: number;
|
|
24
|
-
y1: any;
|
|
25
|
-
y2: any;
|
|
26
|
-
};
|
|
27
|
-
top: false | {
|
|
28
|
-
x1: any;
|
|
29
|
-
x2: any;
|
|
30
|
-
y1: number;
|
|
31
|
-
y2: number;
|
|
32
|
-
};
|
|
33
|
-
bottom: false | {
|
|
34
|
-
x1: any;
|
|
35
|
-
x2: any;
|
|
36
|
-
y1: number;
|
|
37
|
-
y2: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
|
|
41
|
-
getResizeMutation(box: any, handles: any): any;
|
|
42
|
-
getMinimumDomain(): {
|
|
43
|
-
x: number[];
|
|
44
|
-
y: number[];
|
|
45
|
-
};
|
|
46
|
-
getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
|
|
47
|
-
getSelectionMutation(point: any, box: any, brushDimension: any): {
|
|
48
|
-
x1: any;
|
|
49
|
-
y1: any;
|
|
50
|
-
x2: any;
|
|
51
|
-
y2: any;
|
|
52
|
-
};
|
|
53
|
-
panBox(props: any, point: any): {
|
|
54
|
-
x1: number;
|
|
55
|
-
x2: number;
|
|
56
|
-
y1: number;
|
|
57
|
-
y2: number;
|
|
58
|
-
};
|
|
59
|
-
constrainBox(box: any, fullDomainBox: any): {
|
|
60
|
-
x1: number;
|
|
61
|
-
y1: number;
|
|
62
|
-
x2: any;
|
|
63
|
-
y2: any;
|
|
64
|
-
};
|
|
65
|
-
constrainPoint(point: any, fullDomainBox: any): {
|
|
66
|
-
x: number;
|
|
67
|
-
y: number;
|
|
68
|
-
};
|
|
69
|
-
hasMoved(props: any): boolean;
|
|
70
|
-
};
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
export declare const BrushHelpers: {
|
|
3
|
+
onMouseDown: (evt: any, targetProps: any) => {};
|
|
4
|
+
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
5
|
+
onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
|
|
6
|
+
getDimension(props: any): any;
|
|
7
|
+
withinBounds(point: any, bounds: any, padding?: any): boolean;
|
|
8
|
+
getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
|
|
9
|
+
x1: number;
|
|
10
|
+
x2: number;
|
|
11
|
+
y1: number;
|
|
12
|
+
y2: number;
|
|
13
|
+
};
|
|
14
|
+
getHandles(props: any, domainBox: any): {
|
|
15
|
+
left: false | {
|
|
16
|
+
x1: number;
|
|
17
|
+
x2: number;
|
|
18
|
+
y1: any;
|
|
19
|
+
y2: any;
|
|
20
|
+
};
|
|
21
|
+
right: false | {
|
|
22
|
+
x1: number;
|
|
23
|
+
x2: number;
|
|
24
|
+
y1: any;
|
|
25
|
+
y2: any;
|
|
26
|
+
};
|
|
27
|
+
top: false | {
|
|
28
|
+
x1: any;
|
|
29
|
+
x2: any;
|
|
30
|
+
y1: number;
|
|
31
|
+
y2: number;
|
|
32
|
+
};
|
|
33
|
+
bottom: false | {
|
|
34
|
+
x1: any;
|
|
35
|
+
x2: any;
|
|
36
|
+
y1: number;
|
|
37
|
+
y2: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
|
|
41
|
+
getResizeMutation(box: any, handles: any): any;
|
|
42
|
+
getMinimumDomain(): {
|
|
43
|
+
x: number[];
|
|
44
|
+
y: number[];
|
|
45
|
+
};
|
|
46
|
+
getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
|
|
47
|
+
getSelectionMutation(point: any, box: any, brushDimension: any): {
|
|
48
|
+
x1: any;
|
|
49
|
+
y1: any;
|
|
50
|
+
x2: any;
|
|
51
|
+
y2: any;
|
|
52
|
+
};
|
|
53
|
+
panBox(props: any, point: any): {
|
|
54
|
+
x1: number;
|
|
55
|
+
x2: number;
|
|
56
|
+
y1: number;
|
|
57
|
+
y2: number;
|
|
58
|
+
};
|
|
59
|
+
constrainBox(box: any, fullDomainBox: any): {
|
|
60
|
+
x1: number;
|
|
61
|
+
y1: number;
|
|
62
|
+
x2: any;
|
|
63
|
+
y2: any;
|
|
64
|
+
};
|
|
65
|
+
constrainPoint(point: any, fullDomainBox: any): {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
};
|
|
69
|
+
hasMoved(props: any): boolean;
|
|
70
|
+
};
|
|
71
71
|
//# sourceMappingURL=brush-helpers.d.ts.map
|
package/es/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./victory-brush-container";
|
|
2
|
-
export * from "./brush-helpers";
|
|
1
|
+
export * from "./victory-brush-container";
|
|
2
|
+
export * from "./brush-helpers";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,206 +1,206 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryContainer, DomainTuple, VictoryContainerProps } from "victory-core";
|
|
3
|
-
export interface VictoryBrushContainerProps extends VictoryContainerProps {
|
|
4
|
-
allowDrag?: boolean;
|
|
5
|
-
allowDraw?: boolean;
|
|
6
|
-
allowResize?: boolean;
|
|
7
|
-
brushComponent?: React.ReactElement;
|
|
8
|
-
brushDimension?: "x" | "y";
|
|
9
|
-
brushDomain?: {
|
|
10
|
-
x?: DomainTuple;
|
|
11
|
-
y?: DomainTuple;
|
|
12
|
-
};
|
|
13
|
-
brushStyle?: React.CSSProperties;
|
|
14
|
-
defaultBrushArea?: "all" | "none" | "disable" | "move";
|
|
15
|
-
disable?: boolean;
|
|
16
|
-
handleComponent?: React.ReactElement;
|
|
17
|
-
handleStyle?: React.CSSProperties;
|
|
18
|
-
handleWidth?: number;
|
|
19
|
-
onBrushCleared?: (domain: {
|
|
20
|
-
x: DomainTuple;
|
|
21
|
-
y: DomainTuple;
|
|
22
|
-
}, props: VictoryBrushContainerProps) => void;
|
|
23
|
-
onBrushDomainChange?: (domain: {
|
|
24
|
-
x: DomainTuple;
|
|
25
|
-
y: DomainTuple;
|
|
26
|
-
}, props: VictoryBrushContainerProps) => void;
|
|
27
|
-
onBrushDomainChangeEnd?: (domain: {
|
|
28
|
-
x: DomainTuple;
|
|
29
|
-
y: DomainTuple;
|
|
30
|
-
}, props: VictoryBrushContainerProps) => void;
|
|
31
|
-
}
|
|
32
|
-
declare type ComponentClass<TProps> = {
|
|
33
|
-
new (props: TProps): React.Component<TProps>;
|
|
34
|
-
};
|
|
35
|
-
export declare function brushContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryBrushContainerProps>(Base: TBase): {
|
|
36
|
-
new (props: TProps): {
|
|
37
|
-
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
38
|
-
key: string;
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
x: number;
|
|
42
|
-
y: number;
|
|
43
|
-
cursor: string;
|
|
44
|
-
style: any;
|
|
45
|
-
}, HTMLElement> | null;
|
|
46
|
-
getCursorPointers(props: any): {
|
|
47
|
-
yProps: string;
|
|
48
|
-
xProps: string;
|
|
49
|
-
};
|
|
50
|
-
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
51
|
-
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
52
|
-
key: string;
|
|
53
|
-
width: number;
|
|
54
|
-
height: number;
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
cursor: string;
|
|
58
|
-
style: any;
|
|
59
|
-
}, HTMLElement> | null)[];
|
|
60
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
61
|
-
context: unknown;
|
|
62
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
63
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
64
|
-
render(): React.ReactNode;
|
|
65
|
-
readonly props: Readonly<TProps>;
|
|
66
|
-
state: Readonly<{}>;
|
|
67
|
-
refs: {
|
|
68
|
-
[key: string]: React.ReactInstance;
|
|
69
|
-
};
|
|
70
|
-
componentDidMount?(): void;
|
|
71
|
-
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
72
|
-
componentWillUnmount?(): void;
|
|
73
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
74
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
75
|
-
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
76
|
-
componentWillMount?(): void;
|
|
77
|
-
UNSAFE_componentWillMount?(): void;
|
|
78
|
-
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
79
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
80
|
-
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
81
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
|
-
};
|
|
83
|
-
displayName: string;
|
|
84
|
-
defaultProps: {
|
|
85
|
-
allowDrag: boolean;
|
|
86
|
-
allowDraw: boolean;
|
|
87
|
-
allowResize: boolean;
|
|
88
|
-
brushComponent: JSX.Element;
|
|
89
|
-
brushStyle: {
|
|
90
|
-
stroke: string;
|
|
91
|
-
fill: string;
|
|
92
|
-
fillOpacity: number;
|
|
93
|
-
};
|
|
94
|
-
handleComponent: JSX.Element;
|
|
95
|
-
handleStyle: {
|
|
96
|
-
stroke: string;
|
|
97
|
-
fill: string;
|
|
98
|
-
};
|
|
99
|
-
handleWidth: number;
|
|
100
|
-
mouseMoveThreshold: number;
|
|
101
|
-
className: string;
|
|
102
|
-
portalComponent: JSX.Element;
|
|
103
|
-
portalZIndex: number;
|
|
104
|
-
responsive: boolean;
|
|
105
|
-
role: string;
|
|
106
|
-
};
|
|
107
|
-
defaultEvents(props: any): {
|
|
108
|
-
target: string;
|
|
109
|
-
eventHandlers: {
|
|
110
|
-
onMouseDown: (evt: any, targetProps: any) => {};
|
|
111
|
-
onTouchStart: (evt: any, targetProps: any) => {};
|
|
112
|
-
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
113
|
-
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
114
|
-
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
115
|
-
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
116
|
-
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
117
|
-
};
|
|
118
|
-
}[];
|
|
119
|
-
} & TBase;
|
|
120
|
-
export declare const VictoryBrushContainer: {
|
|
121
|
-
new (props: VictoryBrushContainerProps): {
|
|
122
|
-
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
123
|
-
key: string;
|
|
124
|
-
width: number;
|
|
125
|
-
height: number;
|
|
126
|
-
x: number;
|
|
127
|
-
y: number;
|
|
128
|
-
cursor: string;
|
|
129
|
-
style: any;
|
|
130
|
-
}, HTMLElement> | null;
|
|
131
|
-
getCursorPointers(props: any): {
|
|
132
|
-
yProps: string;
|
|
133
|
-
xProps: string;
|
|
134
|
-
};
|
|
135
|
-
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
136
|
-
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
137
|
-
key: string;
|
|
138
|
-
width: number;
|
|
139
|
-
height: number;
|
|
140
|
-
x: number;
|
|
141
|
-
y: number;
|
|
142
|
-
cursor: string;
|
|
143
|
-
style: any;
|
|
144
|
-
}, HTMLElement> | null)[];
|
|
145
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
146
|
-
context: unknown;
|
|
147
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryBrushContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
148
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
149
|
-
render(): React.ReactNode;
|
|
150
|
-
readonly props: Readonly<VictoryBrushContainerProps>;
|
|
151
|
-
state: Readonly<{}>;
|
|
152
|
-
refs: {
|
|
153
|
-
[key: string]: React.ReactInstance;
|
|
154
|
-
};
|
|
155
|
-
componentDidMount?(): void;
|
|
156
|
-
shouldComponentUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
157
|
-
componentWillUnmount?(): void;
|
|
158
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
159
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>): any;
|
|
160
|
-
componentDidUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
161
|
-
componentWillMount?(): void;
|
|
162
|
-
UNSAFE_componentWillMount?(): void;
|
|
163
|
-
componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
164
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
165
|
-
componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
166
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
167
|
-
};
|
|
168
|
-
displayName: string;
|
|
169
|
-
defaultProps: {
|
|
170
|
-
allowDrag: boolean;
|
|
171
|
-
allowDraw: boolean;
|
|
172
|
-
allowResize: boolean;
|
|
173
|
-
brushComponent: JSX.Element;
|
|
174
|
-
brushStyle: {
|
|
175
|
-
stroke: string;
|
|
176
|
-
fill: string;
|
|
177
|
-
fillOpacity: number;
|
|
178
|
-
};
|
|
179
|
-
handleComponent: JSX.Element;
|
|
180
|
-
handleStyle: {
|
|
181
|
-
stroke: string;
|
|
182
|
-
fill: string;
|
|
183
|
-
};
|
|
184
|
-
handleWidth: number;
|
|
185
|
-
mouseMoveThreshold: number;
|
|
186
|
-
className: string;
|
|
187
|
-
portalComponent: JSX.Element;
|
|
188
|
-
portalZIndex: number;
|
|
189
|
-
responsive: boolean;
|
|
190
|
-
role: string;
|
|
191
|
-
};
|
|
192
|
-
defaultEvents(props: any): {
|
|
193
|
-
target: string;
|
|
194
|
-
eventHandlers: {
|
|
195
|
-
onMouseDown: (evt: any, targetProps: any) => {};
|
|
196
|
-
onTouchStart: (evt: any, targetProps: any) => {};
|
|
197
|
-
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
198
|
-
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
199
|
-
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
200
|
-
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
201
|
-
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
202
|
-
};
|
|
203
|
-
}[];
|
|
204
|
-
} & typeof VictoryContainer;
|
|
205
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryContainer, DomainTuple, VictoryContainerProps } from "victory-core";
|
|
3
|
+
export interface VictoryBrushContainerProps extends VictoryContainerProps {
|
|
4
|
+
allowDrag?: boolean;
|
|
5
|
+
allowDraw?: boolean;
|
|
6
|
+
allowResize?: boolean;
|
|
7
|
+
brushComponent?: React.ReactElement;
|
|
8
|
+
brushDimension?: "x" | "y";
|
|
9
|
+
brushDomain?: {
|
|
10
|
+
x?: DomainTuple;
|
|
11
|
+
y?: DomainTuple;
|
|
12
|
+
};
|
|
13
|
+
brushStyle?: React.CSSProperties;
|
|
14
|
+
defaultBrushArea?: "all" | "none" | "disable" | "move";
|
|
15
|
+
disable?: boolean;
|
|
16
|
+
handleComponent?: React.ReactElement;
|
|
17
|
+
handleStyle?: React.CSSProperties;
|
|
18
|
+
handleWidth?: number;
|
|
19
|
+
onBrushCleared?: (domain: {
|
|
20
|
+
x: DomainTuple;
|
|
21
|
+
y: DomainTuple;
|
|
22
|
+
}, props: VictoryBrushContainerProps) => void;
|
|
23
|
+
onBrushDomainChange?: (domain: {
|
|
24
|
+
x: DomainTuple;
|
|
25
|
+
y: DomainTuple;
|
|
26
|
+
}, props: VictoryBrushContainerProps) => void;
|
|
27
|
+
onBrushDomainChangeEnd?: (domain: {
|
|
28
|
+
x: DomainTuple;
|
|
29
|
+
y: DomainTuple;
|
|
30
|
+
}, props: VictoryBrushContainerProps) => void;
|
|
31
|
+
}
|
|
32
|
+
declare type ComponentClass<TProps> = {
|
|
33
|
+
new (props: TProps): React.Component<TProps>;
|
|
34
|
+
};
|
|
35
|
+
export declare function brushContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryBrushContainerProps>(Base: TBase): {
|
|
36
|
+
new (props: TProps): {
|
|
37
|
+
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
38
|
+
key: string;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
cursor: string;
|
|
44
|
+
style: any;
|
|
45
|
+
}, HTMLElement> | null;
|
|
46
|
+
getCursorPointers(props: any): {
|
|
47
|
+
yProps: string;
|
|
48
|
+
xProps: string;
|
|
49
|
+
};
|
|
50
|
+
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
51
|
+
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
52
|
+
key: string;
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
cursor: string;
|
|
58
|
+
style: any;
|
|
59
|
+
}, HTMLElement> | null)[];
|
|
60
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
61
|
+
context: unknown;
|
|
62
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
63
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
64
|
+
render(): React.ReactNode;
|
|
65
|
+
readonly props: Readonly<TProps>;
|
|
66
|
+
state: Readonly<{}>;
|
|
67
|
+
refs: {
|
|
68
|
+
[key: string]: React.ReactInstance;
|
|
69
|
+
};
|
|
70
|
+
componentDidMount?(): void;
|
|
71
|
+
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
72
|
+
componentWillUnmount?(): void;
|
|
73
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
74
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
75
|
+
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
76
|
+
componentWillMount?(): void;
|
|
77
|
+
UNSAFE_componentWillMount?(): void;
|
|
78
|
+
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
79
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
80
|
+
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
81
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
|
+
};
|
|
83
|
+
displayName: string;
|
|
84
|
+
defaultProps: {
|
|
85
|
+
allowDrag: boolean;
|
|
86
|
+
allowDraw: boolean;
|
|
87
|
+
allowResize: boolean;
|
|
88
|
+
brushComponent: JSX.Element;
|
|
89
|
+
brushStyle: {
|
|
90
|
+
stroke: string;
|
|
91
|
+
fill: string;
|
|
92
|
+
fillOpacity: number;
|
|
93
|
+
};
|
|
94
|
+
handleComponent: JSX.Element;
|
|
95
|
+
handleStyle: {
|
|
96
|
+
stroke: string;
|
|
97
|
+
fill: string;
|
|
98
|
+
};
|
|
99
|
+
handleWidth: number;
|
|
100
|
+
mouseMoveThreshold: number;
|
|
101
|
+
className: string;
|
|
102
|
+
portalComponent: JSX.Element;
|
|
103
|
+
portalZIndex: number;
|
|
104
|
+
responsive: boolean;
|
|
105
|
+
role: string;
|
|
106
|
+
};
|
|
107
|
+
defaultEvents(props: any): {
|
|
108
|
+
target: string;
|
|
109
|
+
eventHandlers: {
|
|
110
|
+
onMouseDown: (evt: any, targetProps: any) => {};
|
|
111
|
+
onTouchStart: (evt: any, targetProps: any) => {};
|
|
112
|
+
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
113
|
+
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
114
|
+
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
115
|
+
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
116
|
+
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
117
|
+
};
|
|
118
|
+
}[];
|
|
119
|
+
} & TBase;
|
|
120
|
+
export declare const VictoryBrushContainer: {
|
|
121
|
+
new (props: VictoryBrushContainerProps): {
|
|
122
|
+
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
123
|
+
key: string;
|
|
124
|
+
width: number;
|
|
125
|
+
height: number;
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
cursor: string;
|
|
129
|
+
style: any;
|
|
130
|
+
}, HTMLElement> | null;
|
|
131
|
+
getCursorPointers(props: any): {
|
|
132
|
+
yProps: string;
|
|
133
|
+
xProps: string;
|
|
134
|
+
};
|
|
135
|
+
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
136
|
+
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
137
|
+
key: string;
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
x: number;
|
|
141
|
+
y: number;
|
|
142
|
+
cursor: string;
|
|
143
|
+
style: any;
|
|
144
|
+
}, HTMLElement> | null)[];
|
|
145
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
146
|
+
context: unknown;
|
|
147
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryBrushContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
148
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
149
|
+
render(): React.ReactNode;
|
|
150
|
+
readonly props: Readonly<VictoryBrushContainerProps>;
|
|
151
|
+
state: Readonly<{}>;
|
|
152
|
+
refs: {
|
|
153
|
+
[key: string]: React.ReactInstance;
|
|
154
|
+
};
|
|
155
|
+
componentDidMount?(): void;
|
|
156
|
+
shouldComponentUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
157
|
+
componentWillUnmount?(): void;
|
|
158
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
159
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>): any;
|
|
160
|
+
componentDidUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
161
|
+
componentWillMount?(): void;
|
|
162
|
+
UNSAFE_componentWillMount?(): void;
|
|
163
|
+
componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
164
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
165
|
+
componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
166
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
167
|
+
};
|
|
168
|
+
displayName: string;
|
|
169
|
+
defaultProps: {
|
|
170
|
+
allowDrag: boolean;
|
|
171
|
+
allowDraw: boolean;
|
|
172
|
+
allowResize: boolean;
|
|
173
|
+
brushComponent: JSX.Element;
|
|
174
|
+
brushStyle: {
|
|
175
|
+
stroke: string;
|
|
176
|
+
fill: string;
|
|
177
|
+
fillOpacity: number;
|
|
178
|
+
};
|
|
179
|
+
handleComponent: JSX.Element;
|
|
180
|
+
handleStyle: {
|
|
181
|
+
stroke: string;
|
|
182
|
+
fill: string;
|
|
183
|
+
};
|
|
184
|
+
handleWidth: number;
|
|
185
|
+
mouseMoveThreshold: number;
|
|
186
|
+
className: string;
|
|
187
|
+
portalComponent: JSX.Element;
|
|
188
|
+
portalZIndex: number;
|
|
189
|
+
responsive: boolean;
|
|
190
|
+
role: string;
|
|
191
|
+
};
|
|
192
|
+
defaultEvents(props: any): {
|
|
193
|
+
target: string;
|
|
194
|
+
eventHandlers: {
|
|
195
|
+
onMouseDown: (evt: any, targetProps: any) => {};
|
|
196
|
+
onTouchStart: (evt: any, targetProps: any) => {};
|
|
197
|
+
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
198
|
+
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
199
|
+
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
200
|
+
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
201
|
+
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
202
|
+
};
|
|
203
|
+
}[];
|
|
204
|
+
} & typeof VictoryContainer;
|
|
205
|
+
export {};
|
|
206
206
|
//# sourceMappingURL=victory-brush-container.d.ts.map
|
package/lib/brush-helpers.d.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
export declare const BrushHelpers: {
|
|
3
|
-
onMouseDown: (evt: any, targetProps: any) => {};
|
|
4
|
-
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
5
|
-
onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
|
|
6
|
-
getDimension(props: any): any;
|
|
7
|
-
withinBounds(point: any, bounds: any, padding?: any): boolean;
|
|
8
|
-
getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
|
|
9
|
-
x1: number;
|
|
10
|
-
x2: number;
|
|
11
|
-
y1: number;
|
|
12
|
-
y2: number;
|
|
13
|
-
};
|
|
14
|
-
getHandles(props: any, domainBox: any): {
|
|
15
|
-
left: false | {
|
|
16
|
-
x1: number;
|
|
17
|
-
x2: number;
|
|
18
|
-
y1: any;
|
|
19
|
-
y2: any;
|
|
20
|
-
};
|
|
21
|
-
right: false | {
|
|
22
|
-
x1: number;
|
|
23
|
-
x2: number;
|
|
24
|
-
y1: any;
|
|
25
|
-
y2: any;
|
|
26
|
-
};
|
|
27
|
-
top: false | {
|
|
28
|
-
x1: any;
|
|
29
|
-
x2: any;
|
|
30
|
-
y1: number;
|
|
31
|
-
y2: number;
|
|
32
|
-
};
|
|
33
|
-
bottom: false | {
|
|
34
|
-
x1: any;
|
|
35
|
-
x2: any;
|
|
36
|
-
y1: number;
|
|
37
|
-
y2: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
|
|
41
|
-
getResizeMutation(box: any, handles: any): any;
|
|
42
|
-
getMinimumDomain(): {
|
|
43
|
-
x: number[];
|
|
44
|
-
y: number[];
|
|
45
|
-
};
|
|
46
|
-
getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
|
|
47
|
-
getSelectionMutation(point: any, box: any, brushDimension: any): {
|
|
48
|
-
x1: any;
|
|
49
|
-
y1: any;
|
|
50
|
-
x2: any;
|
|
51
|
-
y2: any;
|
|
52
|
-
};
|
|
53
|
-
panBox(props: any, point: any): {
|
|
54
|
-
x1: number;
|
|
55
|
-
x2: number;
|
|
56
|
-
y1: number;
|
|
57
|
-
y2: number;
|
|
58
|
-
};
|
|
59
|
-
constrainBox(box: any, fullDomainBox: any): {
|
|
60
|
-
x1: number;
|
|
61
|
-
y1: number;
|
|
62
|
-
x2: any;
|
|
63
|
-
y2: any;
|
|
64
|
-
};
|
|
65
|
-
constrainPoint(point: any, fullDomainBox: any): {
|
|
66
|
-
x: number;
|
|
67
|
-
y: number;
|
|
68
|
-
};
|
|
69
|
-
hasMoved(props: any): boolean;
|
|
70
|
-
};
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
export declare const BrushHelpers: {
|
|
3
|
+
onMouseDown: (evt: any, targetProps: any) => {};
|
|
4
|
+
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
5
|
+
onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
|
|
6
|
+
getDimension(props: any): any;
|
|
7
|
+
withinBounds(point: any, bounds: any, padding?: any): boolean;
|
|
8
|
+
getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
|
|
9
|
+
x1: number;
|
|
10
|
+
x2: number;
|
|
11
|
+
y1: number;
|
|
12
|
+
y2: number;
|
|
13
|
+
};
|
|
14
|
+
getHandles(props: any, domainBox: any): {
|
|
15
|
+
left: false | {
|
|
16
|
+
x1: number;
|
|
17
|
+
x2: number;
|
|
18
|
+
y1: any;
|
|
19
|
+
y2: any;
|
|
20
|
+
};
|
|
21
|
+
right: false | {
|
|
22
|
+
x1: number;
|
|
23
|
+
x2: number;
|
|
24
|
+
y1: any;
|
|
25
|
+
y2: any;
|
|
26
|
+
};
|
|
27
|
+
top: false | {
|
|
28
|
+
x1: any;
|
|
29
|
+
x2: any;
|
|
30
|
+
y1: number;
|
|
31
|
+
y2: number;
|
|
32
|
+
};
|
|
33
|
+
bottom: false | {
|
|
34
|
+
x1: any;
|
|
35
|
+
x2: any;
|
|
36
|
+
y1: number;
|
|
37
|
+
y2: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
|
|
41
|
+
getResizeMutation(box: any, handles: any): any;
|
|
42
|
+
getMinimumDomain(): {
|
|
43
|
+
x: number[];
|
|
44
|
+
y: number[];
|
|
45
|
+
};
|
|
46
|
+
getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
|
|
47
|
+
getSelectionMutation(point: any, box: any, brushDimension: any): {
|
|
48
|
+
x1: any;
|
|
49
|
+
y1: any;
|
|
50
|
+
x2: any;
|
|
51
|
+
y2: any;
|
|
52
|
+
};
|
|
53
|
+
panBox(props: any, point: any): {
|
|
54
|
+
x1: number;
|
|
55
|
+
x2: number;
|
|
56
|
+
y1: number;
|
|
57
|
+
y2: number;
|
|
58
|
+
};
|
|
59
|
+
constrainBox(box: any, fullDomainBox: any): {
|
|
60
|
+
x1: number;
|
|
61
|
+
y1: number;
|
|
62
|
+
x2: any;
|
|
63
|
+
y2: any;
|
|
64
|
+
};
|
|
65
|
+
constrainPoint(point: any, fullDomainBox: any): {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
};
|
|
69
|
+
hasMoved(props: any): boolean;
|
|
70
|
+
};
|
|
71
71
|
//# sourceMappingURL=brush-helpers.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./victory-brush-container";
|
|
2
|
-
export * from "./brush-helpers";
|
|
1
|
+
export * from "./victory-brush-container";
|
|
2
|
+
export * from "./brush-helpers";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,206 +1,206 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VictoryContainer, DomainTuple, VictoryContainerProps } from "victory-core";
|
|
3
|
-
export interface VictoryBrushContainerProps extends VictoryContainerProps {
|
|
4
|
-
allowDrag?: boolean;
|
|
5
|
-
allowDraw?: boolean;
|
|
6
|
-
allowResize?: boolean;
|
|
7
|
-
brushComponent?: React.ReactElement;
|
|
8
|
-
brushDimension?: "x" | "y";
|
|
9
|
-
brushDomain?: {
|
|
10
|
-
x?: DomainTuple;
|
|
11
|
-
y?: DomainTuple;
|
|
12
|
-
};
|
|
13
|
-
brushStyle?: React.CSSProperties;
|
|
14
|
-
defaultBrushArea?: "all" | "none" | "disable" | "move";
|
|
15
|
-
disable?: boolean;
|
|
16
|
-
handleComponent?: React.ReactElement;
|
|
17
|
-
handleStyle?: React.CSSProperties;
|
|
18
|
-
handleWidth?: number;
|
|
19
|
-
onBrushCleared?: (domain: {
|
|
20
|
-
x: DomainTuple;
|
|
21
|
-
y: DomainTuple;
|
|
22
|
-
}, props: VictoryBrushContainerProps) => void;
|
|
23
|
-
onBrushDomainChange?: (domain: {
|
|
24
|
-
x: DomainTuple;
|
|
25
|
-
y: DomainTuple;
|
|
26
|
-
}, props: VictoryBrushContainerProps) => void;
|
|
27
|
-
onBrushDomainChangeEnd?: (domain: {
|
|
28
|
-
x: DomainTuple;
|
|
29
|
-
y: DomainTuple;
|
|
30
|
-
}, props: VictoryBrushContainerProps) => void;
|
|
31
|
-
}
|
|
32
|
-
declare type ComponentClass<TProps> = {
|
|
33
|
-
new (props: TProps): React.Component<TProps>;
|
|
34
|
-
};
|
|
35
|
-
export declare function brushContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryBrushContainerProps>(Base: TBase): {
|
|
36
|
-
new (props: TProps): {
|
|
37
|
-
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
38
|
-
key: string;
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
x: number;
|
|
42
|
-
y: number;
|
|
43
|
-
cursor: string;
|
|
44
|
-
style: any;
|
|
45
|
-
}, HTMLElement> | null;
|
|
46
|
-
getCursorPointers(props: any): {
|
|
47
|
-
yProps: string;
|
|
48
|
-
xProps: string;
|
|
49
|
-
};
|
|
50
|
-
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
51
|
-
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
52
|
-
key: string;
|
|
53
|
-
width: number;
|
|
54
|
-
height: number;
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
cursor: string;
|
|
58
|
-
style: any;
|
|
59
|
-
}, HTMLElement> | null)[];
|
|
60
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
61
|
-
context: unknown;
|
|
62
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
63
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
64
|
-
render(): React.ReactNode;
|
|
65
|
-
readonly props: Readonly<TProps>;
|
|
66
|
-
state: Readonly<{}>;
|
|
67
|
-
refs: {
|
|
68
|
-
[key: string]: React.ReactInstance;
|
|
69
|
-
};
|
|
70
|
-
componentDidMount?(): void;
|
|
71
|
-
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
72
|
-
componentWillUnmount?(): void;
|
|
73
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
74
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
75
|
-
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
76
|
-
componentWillMount?(): void;
|
|
77
|
-
UNSAFE_componentWillMount?(): void;
|
|
78
|
-
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
79
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
80
|
-
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
81
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
|
-
};
|
|
83
|
-
displayName: string;
|
|
84
|
-
defaultProps: {
|
|
85
|
-
allowDrag: boolean;
|
|
86
|
-
allowDraw: boolean;
|
|
87
|
-
allowResize: boolean;
|
|
88
|
-
brushComponent: JSX.Element;
|
|
89
|
-
brushStyle: {
|
|
90
|
-
stroke: string;
|
|
91
|
-
fill: string;
|
|
92
|
-
fillOpacity: number;
|
|
93
|
-
};
|
|
94
|
-
handleComponent: JSX.Element;
|
|
95
|
-
handleStyle: {
|
|
96
|
-
stroke: string;
|
|
97
|
-
fill: string;
|
|
98
|
-
};
|
|
99
|
-
handleWidth: number;
|
|
100
|
-
mouseMoveThreshold: number;
|
|
101
|
-
className: string;
|
|
102
|
-
portalComponent: JSX.Element;
|
|
103
|
-
portalZIndex: number;
|
|
104
|
-
responsive: boolean;
|
|
105
|
-
role: string;
|
|
106
|
-
};
|
|
107
|
-
defaultEvents(props: any): {
|
|
108
|
-
target: string;
|
|
109
|
-
eventHandlers: {
|
|
110
|
-
onMouseDown: (evt: any, targetProps: any) => {};
|
|
111
|
-
onTouchStart: (evt: any, targetProps: any) => {};
|
|
112
|
-
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
113
|
-
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
114
|
-
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
115
|
-
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
116
|
-
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
117
|
-
};
|
|
118
|
-
}[];
|
|
119
|
-
} & TBase;
|
|
120
|
-
export declare const VictoryBrushContainer: {
|
|
121
|
-
new (props: VictoryBrushContainerProps): {
|
|
122
|
-
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
123
|
-
key: string;
|
|
124
|
-
width: number;
|
|
125
|
-
height: number;
|
|
126
|
-
x: number;
|
|
127
|
-
y: number;
|
|
128
|
-
cursor: string;
|
|
129
|
-
style: any;
|
|
130
|
-
}, HTMLElement> | null;
|
|
131
|
-
getCursorPointers(props: any): {
|
|
132
|
-
yProps: string;
|
|
133
|
-
xProps: string;
|
|
134
|
-
};
|
|
135
|
-
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
136
|
-
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
137
|
-
key: string;
|
|
138
|
-
width: number;
|
|
139
|
-
height: number;
|
|
140
|
-
x: number;
|
|
141
|
-
y: number;
|
|
142
|
-
cursor: string;
|
|
143
|
-
style: any;
|
|
144
|
-
}, HTMLElement> | null)[];
|
|
145
|
-
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
146
|
-
context: unknown;
|
|
147
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryBrushContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
148
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
149
|
-
render(): React.ReactNode;
|
|
150
|
-
readonly props: Readonly<VictoryBrushContainerProps>;
|
|
151
|
-
state: Readonly<{}>;
|
|
152
|
-
refs: {
|
|
153
|
-
[key: string]: React.ReactInstance;
|
|
154
|
-
};
|
|
155
|
-
componentDidMount?(): void;
|
|
156
|
-
shouldComponentUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
157
|
-
componentWillUnmount?(): void;
|
|
158
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
159
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>): any;
|
|
160
|
-
componentDidUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
161
|
-
componentWillMount?(): void;
|
|
162
|
-
UNSAFE_componentWillMount?(): void;
|
|
163
|
-
componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
164
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
165
|
-
componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
166
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
167
|
-
};
|
|
168
|
-
displayName: string;
|
|
169
|
-
defaultProps: {
|
|
170
|
-
allowDrag: boolean;
|
|
171
|
-
allowDraw: boolean;
|
|
172
|
-
allowResize: boolean;
|
|
173
|
-
brushComponent: JSX.Element;
|
|
174
|
-
brushStyle: {
|
|
175
|
-
stroke: string;
|
|
176
|
-
fill: string;
|
|
177
|
-
fillOpacity: number;
|
|
178
|
-
};
|
|
179
|
-
handleComponent: JSX.Element;
|
|
180
|
-
handleStyle: {
|
|
181
|
-
stroke: string;
|
|
182
|
-
fill: string;
|
|
183
|
-
};
|
|
184
|
-
handleWidth: number;
|
|
185
|
-
mouseMoveThreshold: number;
|
|
186
|
-
className: string;
|
|
187
|
-
portalComponent: JSX.Element;
|
|
188
|
-
portalZIndex: number;
|
|
189
|
-
responsive: boolean;
|
|
190
|
-
role: string;
|
|
191
|
-
};
|
|
192
|
-
defaultEvents(props: any): {
|
|
193
|
-
target: string;
|
|
194
|
-
eventHandlers: {
|
|
195
|
-
onMouseDown: (evt: any, targetProps: any) => {};
|
|
196
|
-
onTouchStart: (evt: any, targetProps: any) => {};
|
|
197
|
-
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
198
|
-
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
199
|
-
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
200
|
-
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
201
|
-
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
202
|
-
};
|
|
203
|
-
}[];
|
|
204
|
-
} & typeof VictoryContainer;
|
|
205
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryContainer, DomainTuple, VictoryContainerProps } from "victory-core";
|
|
3
|
+
export interface VictoryBrushContainerProps extends VictoryContainerProps {
|
|
4
|
+
allowDrag?: boolean;
|
|
5
|
+
allowDraw?: boolean;
|
|
6
|
+
allowResize?: boolean;
|
|
7
|
+
brushComponent?: React.ReactElement;
|
|
8
|
+
brushDimension?: "x" | "y";
|
|
9
|
+
brushDomain?: {
|
|
10
|
+
x?: DomainTuple;
|
|
11
|
+
y?: DomainTuple;
|
|
12
|
+
};
|
|
13
|
+
brushStyle?: React.CSSProperties;
|
|
14
|
+
defaultBrushArea?: "all" | "none" | "disable" | "move";
|
|
15
|
+
disable?: boolean;
|
|
16
|
+
handleComponent?: React.ReactElement;
|
|
17
|
+
handleStyle?: React.CSSProperties;
|
|
18
|
+
handleWidth?: number;
|
|
19
|
+
onBrushCleared?: (domain: {
|
|
20
|
+
x: DomainTuple;
|
|
21
|
+
y: DomainTuple;
|
|
22
|
+
}, props: VictoryBrushContainerProps) => void;
|
|
23
|
+
onBrushDomainChange?: (domain: {
|
|
24
|
+
x: DomainTuple;
|
|
25
|
+
y: DomainTuple;
|
|
26
|
+
}, props: VictoryBrushContainerProps) => void;
|
|
27
|
+
onBrushDomainChangeEnd?: (domain: {
|
|
28
|
+
x: DomainTuple;
|
|
29
|
+
y: DomainTuple;
|
|
30
|
+
}, props: VictoryBrushContainerProps) => void;
|
|
31
|
+
}
|
|
32
|
+
declare type ComponentClass<TProps> = {
|
|
33
|
+
new (props: TProps): React.Component<TProps>;
|
|
34
|
+
};
|
|
35
|
+
export declare function brushContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryBrushContainerProps>(Base: TBase): {
|
|
36
|
+
new (props: TProps): {
|
|
37
|
+
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
38
|
+
key: string;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
cursor: string;
|
|
44
|
+
style: any;
|
|
45
|
+
}, HTMLElement> | null;
|
|
46
|
+
getCursorPointers(props: any): {
|
|
47
|
+
yProps: string;
|
|
48
|
+
xProps: string;
|
|
49
|
+
};
|
|
50
|
+
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
51
|
+
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
52
|
+
key: string;
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
cursor: string;
|
|
58
|
+
style: any;
|
|
59
|
+
}, HTMLElement> | null)[];
|
|
60
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
61
|
+
context: unknown;
|
|
62
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
63
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
64
|
+
render(): React.ReactNode;
|
|
65
|
+
readonly props: Readonly<TProps>;
|
|
66
|
+
state: Readonly<{}>;
|
|
67
|
+
refs: {
|
|
68
|
+
[key: string]: React.ReactInstance;
|
|
69
|
+
};
|
|
70
|
+
componentDidMount?(): void;
|
|
71
|
+
shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
72
|
+
componentWillUnmount?(): void;
|
|
73
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
74
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
75
|
+
componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
76
|
+
componentWillMount?(): void;
|
|
77
|
+
UNSAFE_componentWillMount?(): void;
|
|
78
|
+
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
79
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
80
|
+
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
81
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
|
+
};
|
|
83
|
+
displayName: string;
|
|
84
|
+
defaultProps: {
|
|
85
|
+
allowDrag: boolean;
|
|
86
|
+
allowDraw: boolean;
|
|
87
|
+
allowResize: boolean;
|
|
88
|
+
brushComponent: JSX.Element;
|
|
89
|
+
brushStyle: {
|
|
90
|
+
stroke: string;
|
|
91
|
+
fill: string;
|
|
92
|
+
fillOpacity: number;
|
|
93
|
+
};
|
|
94
|
+
handleComponent: JSX.Element;
|
|
95
|
+
handleStyle: {
|
|
96
|
+
stroke: string;
|
|
97
|
+
fill: string;
|
|
98
|
+
};
|
|
99
|
+
handleWidth: number;
|
|
100
|
+
mouseMoveThreshold: number;
|
|
101
|
+
className: string;
|
|
102
|
+
portalComponent: JSX.Element;
|
|
103
|
+
portalZIndex: number;
|
|
104
|
+
responsive: boolean;
|
|
105
|
+
role: string;
|
|
106
|
+
};
|
|
107
|
+
defaultEvents(props: any): {
|
|
108
|
+
target: string;
|
|
109
|
+
eventHandlers: {
|
|
110
|
+
onMouseDown: (evt: any, targetProps: any) => {};
|
|
111
|
+
onTouchStart: (evt: any, targetProps: any) => {};
|
|
112
|
+
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
113
|
+
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
114
|
+
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
115
|
+
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
116
|
+
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
117
|
+
};
|
|
118
|
+
}[];
|
|
119
|
+
} & TBase;
|
|
120
|
+
export declare const VictoryBrushContainer: {
|
|
121
|
+
new (props: VictoryBrushContainerProps): {
|
|
122
|
+
getSelectBox(props: any, coordinates: any): React.DetailedReactHTMLElement<{
|
|
123
|
+
key: string;
|
|
124
|
+
width: number;
|
|
125
|
+
height: number;
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
cursor: string;
|
|
129
|
+
style: any;
|
|
130
|
+
}, HTMLElement> | null;
|
|
131
|
+
getCursorPointers(props: any): {
|
|
132
|
+
yProps: string;
|
|
133
|
+
xProps: string;
|
|
134
|
+
};
|
|
135
|
+
getHandles(props: any, domain: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | null;
|
|
136
|
+
getRect(props: any): (React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | React.DetailedReactHTMLElement<{
|
|
137
|
+
key: string;
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
x: number;
|
|
141
|
+
y: number;
|
|
142
|
+
cursor: string;
|
|
143
|
+
style: any;
|
|
144
|
+
}, HTMLElement> | null)[];
|
|
145
|
+
getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null)[];
|
|
146
|
+
context: unknown;
|
|
147
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryBrushContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
148
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
149
|
+
render(): React.ReactNode;
|
|
150
|
+
readonly props: Readonly<VictoryBrushContainerProps>;
|
|
151
|
+
state: Readonly<{}>;
|
|
152
|
+
refs: {
|
|
153
|
+
[key: string]: React.ReactInstance;
|
|
154
|
+
};
|
|
155
|
+
componentDidMount?(): void;
|
|
156
|
+
shouldComponentUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
157
|
+
componentWillUnmount?(): void;
|
|
158
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
159
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>): any;
|
|
160
|
+
componentDidUpdate?(prevProps: Readonly<VictoryBrushContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
161
|
+
componentWillMount?(): void;
|
|
162
|
+
UNSAFE_componentWillMount?(): void;
|
|
163
|
+
componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
164
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryBrushContainerProps>, nextContext: any): void;
|
|
165
|
+
componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
166
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryBrushContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
167
|
+
};
|
|
168
|
+
displayName: string;
|
|
169
|
+
defaultProps: {
|
|
170
|
+
allowDrag: boolean;
|
|
171
|
+
allowDraw: boolean;
|
|
172
|
+
allowResize: boolean;
|
|
173
|
+
brushComponent: JSX.Element;
|
|
174
|
+
brushStyle: {
|
|
175
|
+
stroke: string;
|
|
176
|
+
fill: string;
|
|
177
|
+
fillOpacity: number;
|
|
178
|
+
};
|
|
179
|
+
handleComponent: JSX.Element;
|
|
180
|
+
handleStyle: {
|
|
181
|
+
stroke: string;
|
|
182
|
+
fill: string;
|
|
183
|
+
};
|
|
184
|
+
handleWidth: number;
|
|
185
|
+
mouseMoveThreshold: number;
|
|
186
|
+
className: string;
|
|
187
|
+
portalComponent: JSX.Element;
|
|
188
|
+
portalZIndex: number;
|
|
189
|
+
responsive: boolean;
|
|
190
|
+
role: string;
|
|
191
|
+
};
|
|
192
|
+
defaultEvents(props: any): {
|
|
193
|
+
target: string;
|
|
194
|
+
eventHandlers: {
|
|
195
|
+
onMouseDown: (evt: any, targetProps: any) => {};
|
|
196
|
+
onTouchStart: (evt: any, targetProps: any) => {};
|
|
197
|
+
onGlobalMouseMove: (evt: any, targetProps: any) => {} | undefined;
|
|
198
|
+
onGlobalTouchMove: (evt: any, targetProps: any) => {} | undefined;
|
|
199
|
+
onGlobalMouseUp: (evt: any, targetProps: any) => {};
|
|
200
|
+
onGlobalTouchEnd: (evt: any, targetProps: any) => {};
|
|
201
|
+
onGlobalTouchCancel: (evt: any, targetProps: any) => {};
|
|
202
|
+
};
|
|
203
|
+
}[];
|
|
204
|
+
} & typeof VictoryContainer;
|
|
205
|
+
export {};
|
|
206
206
|
//# sourceMappingURL=victory-brush-container.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-brush-container",
|
|
3
|
-
"version": "37.0.
|
|
3
|
+
"version": "37.0.2",
|
|
4
4
|
"description": "Interactive Brush Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -22,11 +22,14 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"react-fast-compare": "^3.2.0",
|
|
25
|
-
"victory-core": "^37.0.
|
|
25
|
+
"victory-core": "^37.0.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=16.6.0"
|
|
29
29
|
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"provenance": true
|
|
32
|
+
},
|
|
30
33
|
"wireit": {
|
|
31
34
|
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
|
32
35
|
"### DO NOT MODIFY THESE MANUALLY ####": {},
|