victory-brush-line 36.9.2-next.3 → 36.9.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 +2 -11
- package/README.md +2 -2
- package/dist/victory-brush-line.js +30 -1
- package/es/index.d.ts +1 -1
- package/es/victory-brush-line.d.ts +190 -190
- package/lib/index.d.ts +1 -1
- package/lib/victory-brush-line.d.ts +190 -190
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
# victory-brush-line
|
|
2
2
|
|
|
3
|
-
## 36.9.2
|
|
3
|
+
## 36.9.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- Updated dependencies [7da790934]
|
|
9
|
-
- Updated dependencies [3f2da66e3]
|
|
10
|
-
- Updated dependencies [c13308624]
|
|
11
|
-
- Updated dependencies [65d02419f]
|
|
12
|
-
- Updated dependencies [7efd582cc]
|
|
13
|
-
- Updated dependencies [9cdaf2c08]
|
|
14
|
-
- Updated dependencies [f6f7cc515]
|
|
15
|
-
- Updated dependencies [6e34169a5]
|
|
16
|
-
- victory-core@36.9.2-next.3
|
|
7
|
+
- Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
|
|
17
8
|
|
|
18
9
|
## 36.9.1
|
|
19
10
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`victory-brush-line@^30.0.0` exports `VictoryBrushLine`
|
|
4
4
|
|
|
5
|
-
To view documentation for `VictoryBrushLine` please see https://
|
|
5
|
+
To view documentation for `VictoryBrushLine` please see https://commerce.nearform.com/open-source/victory/docs/victory-brush-line
|
|
6
6
|
|
|
7
|
-
To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-brush-line.md
|
|
7
|
+
To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-brush-line.md
|
|
@@ -5248,6 +5248,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5248
5248
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
5249
5249
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
5250
5250
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
5251
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
5251
5252
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
5252
5253
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
5253
5254
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -5289,6 +5290,22 @@ function containsOnlyStrings(collection) {
|
|
|
5289
5290
|
return typeof value === "string";
|
|
5290
5291
|
});
|
|
5291
5292
|
}
|
|
5293
|
+
/**
|
|
5294
|
+
* Creates an array of array values not included in the other given arrays
|
|
5295
|
+
* @param a The array to inspect
|
|
5296
|
+
* @param b The values to exclude
|
|
5297
|
+
* @returns The new array of filtered values
|
|
5298
|
+
*/
|
|
5299
|
+
|
|
5300
|
+
function difference(a, b) {
|
|
5301
|
+
if (a && b) {
|
|
5302
|
+
return a.filter(function (value) {
|
|
5303
|
+
return !b.includes(value);
|
|
5304
|
+
});
|
|
5305
|
+
}
|
|
5306
|
+
|
|
5307
|
+
return [];
|
|
5308
|
+
}
|
|
5292
5309
|
function isArrayOfArrays(collection) {
|
|
5293
5310
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
5294
5311
|
}
|
|
@@ -6283,6 +6300,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6283
6300
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
6284
6301
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
6285
6302
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
6303
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
6286
6304
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
6287
6305
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
6288
6306
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -6333,6 +6351,18 @@ function getPolarRange(props, axis) {
|
|
|
6333
6351
|
return [props.innerRadius || 0, getRadius(props)];
|
|
6334
6352
|
} // Exported Functions
|
|
6335
6353
|
|
|
6354
|
+
/**
|
|
6355
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
6356
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
6357
|
+
*/
|
|
6358
|
+
|
|
6359
|
+
|
|
6360
|
+
function invert(original) {
|
|
6361
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
6362
|
+
acc[current[1]] = current[0];
|
|
6363
|
+
return acc;
|
|
6364
|
+
}, {});
|
|
6365
|
+
}
|
|
6336
6366
|
/**
|
|
6337
6367
|
* creates an object with some keys excluded
|
|
6338
6368
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -6341,7 +6371,6 @@ function getPolarRange(props, axis) {
|
|
|
6341
6371
|
* @returns {Object} new object with same properties as originalObject
|
|
6342
6372
|
*/
|
|
6343
6373
|
|
|
6344
|
-
|
|
6345
6374
|
function omit(originalObject) {
|
|
6346
6375
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
6347
6376
|
// code based on babel's _objectWithoutProperties
|
package/es/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./victory-brush-line";
|
|
1
|
+
export * from "./victory-brush-line";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DomainTuple, VictoryStyleObject } from "victory-core";
|
|
3
|
-
export declare type VictoryBrushLineTargetType = "data" | "labels" | "parent";
|
|
4
|
-
export interface VictoryBrushLineProps {
|
|
5
|
-
allowDrag?: boolean;
|
|
6
|
-
allowDraw?: boolean;
|
|
7
|
-
allowResize?: boolean;
|
|
8
|
-
brushAreaComponent?: React.ReactElement;
|
|
9
|
-
brushAreaStyle?: VictoryStyleObject;
|
|
10
|
-
brushAreaWidth?: number;
|
|
11
|
-
brushComponent?: React.ReactElement;
|
|
12
|
-
brushDomain?: DomainTuple;
|
|
13
|
-
brushStyle?: VictoryStyleObject;
|
|
14
|
-
brushWidth?: number;
|
|
15
|
-
className?: string;
|
|
16
|
-
dimension?: "x" | "y";
|
|
17
|
-
events?: React.DOMAttributes<any>;
|
|
18
|
-
disable?: boolean;
|
|
19
|
-
groupComponent?: React.ReactElement;
|
|
20
|
-
handleComponent?: React.ReactElement;
|
|
21
|
-
handleStyle?: VictoryStyleObject;
|
|
22
|
-
handleWidth?: number;
|
|
23
|
-
id?: string | number;
|
|
24
|
-
lineComponent?: React.ReactElement;
|
|
25
|
-
name?: string;
|
|
26
|
-
onBrushDomainChange?: (domain: DomainTuple, props?: VictoryBrushLineProps) => void;
|
|
27
|
-
style?: VictoryStyleObject;
|
|
28
|
-
type?: string;
|
|
29
|
-
width?: number;
|
|
30
|
-
}
|
|
31
|
-
export declare class VictoryBrushLine<T extends VictoryBrushLineProps> extends React.Component<T> {
|
|
32
|
-
static defaultProps: {
|
|
33
|
-
allowDrag: boolean;
|
|
34
|
-
allowDraw: boolean;
|
|
35
|
-
allowResize: boolean;
|
|
36
|
-
brushAreaComponent: JSX.Element;
|
|
37
|
-
brushComponent: JSX.Element;
|
|
38
|
-
groupComponent: JSX.Element;
|
|
39
|
-
handleComponent: JSX.Element;
|
|
40
|
-
handleWidth: number;
|
|
41
|
-
lineComponent: JSX.Element;
|
|
42
|
-
width: number;
|
|
43
|
-
};
|
|
44
|
-
static defaultEvents: (props: any) => {
|
|
45
|
-
target: any;
|
|
46
|
-
eventHandlers: {
|
|
47
|
-
onMouseEnter: (evt: any, targetProps: any) => {
|
|
48
|
-
mutation: () => {
|
|
49
|
-
activeBrushes: {
|
|
50
|
-
brushArea: boolean;
|
|
51
|
-
brush: boolean;
|
|
52
|
-
minHandle: boolean;
|
|
53
|
-
maxHandle: boolean;
|
|
54
|
-
};
|
|
55
|
-
brushDomain: any;
|
|
56
|
-
parentSVG: any;
|
|
57
|
-
};
|
|
58
|
-
}[];
|
|
59
|
-
onMouseDown: (evt: any, targetProps: any) => {
|
|
60
|
-
mutation: () => {
|
|
61
|
-
parentSVG: any;
|
|
62
|
-
isSelecting: boolean;
|
|
63
|
-
activeHandle: any;
|
|
64
|
-
brushDomain: any;
|
|
65
|
-
startPosition: any;
|
|
66
|
-
activeBrushes: any;
|
|
67
|
-
};
|
|
68
|
-
}[] | {
|
|
69
|
-
mutation: () => {
|
|
70
|
-
isPanning: any;
|
|
71
|
-
startPosition: any;
|
|
72
|
-
brushDomain: any;
|
|
73
|
-
activeBrushes: any;
|
|
74
|
-
parentSVG: any;
|
|
75
|
-
};
|
|
76
|
-
}[] | {
|
|
77
|
-
mutation: () => {
|
|
78
|
-
isSelecting: any;
|
|
79
|
-
brushDomain: null;
|
|
80
|
-
startPosition: any;
|
|
81
|
-
activeBrushes: any;
|
|
82
|
-
parentSVG: any;
|
|
83
|
-
};
|
|
84
|
-
}[];
|
|
85
|
-
onMouseMove: (evt: any, targetProps: any) => {
|
|
86
|
-
mutation: () => {
|
|
87
|
-
activeBrushes: {
|
|
88
|
-
brushArea: boolean;
|
|
89
|
-
brush: boolean;
|
|
90
|
-
minHandle: boolean;
|
|
91
|
-
maxHandle: boolean;
|
|
92
|
-
};
|
|
93
|
-
brushDomain: any;
|
|
94
|
-
parentSVG: any;
|
|
95
|
-
};
|
|
96
|
-
}[] | {
|
|
97
|
-
mutation: () => {
|
|
98
|
-
startPosition: any;
|
|
99
|
-
isPanning: boolean;
|
|
100
|
-
brushDomain: any[];
|
|
101
|
-
activeBrushes: {
|
|
102
|
-
brush: boolean;
|
|
103
|
-
};
|
|
104
|
-
parentSVG: any;
|
|
105
|
-
};
|
|
106
|
-
}[] | {
|
|
107
|
-
mutation: () => {
|
|
108
|
-
brushDomain: any;
|
|
109
|
-
startPosition: any;
|
|
110
|
-
isSelecting: any;
|
|
111
|
-
activeHandle: any;
|
|
112
|
-
parentSVG: any;
|
|
113
|
-
activeBrushes: {
|
|
114
|
-
brush: boolean;
|
|
115
|
-
minHandle: boolean;
|
|
116
|
-
maxHandle: boolean;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
}[];
|
|
120
|
-
onMouseUp: (evt: any, targetProps: any) => {
|
|
121
|
-
mutation: () => {
|
|
122
|
-
isPanning: boolean;
|
|
123
|
-
isSelecting: boolean;
|
|
124
|
-
activeHandle: null;
|
|
125
|
-
startPosition: null;
|
|
126
|
-
brushDomain: any;
|
|
127
|
-
activeBrushes: any;
|
|
128
|
-
};
|
|
129
|
-
}[];
|
|
130
|
-
onMouseLeave: (evt: any, targetProps: any) => {
|
|
131
|
-
mutation: () => {
|
|
132
|
-
isPanning: boolean;
|
|
133
|
-
isSelecting: boolean;
|
|
134
|
-
activeHandle: null;
|
|
135
|
-
startPosition: null;
|
|
136
|
-
brushDomain: any;
|
|
137
|
-
activeBrushes: {};
|
|
138
|
-
};
|
|
139
|
-
}[];
|
|
140
|
-
};
|
|
141
|
-
}[] | undefined;
|
|
142
|
-
getRectDimensions(props: any, brushWidth: any, domain?: any): {
|
|
143
|
-
x: number;
|
|
144
|
-
y: number;
|
|
145
|
-
width: number;
|
|
146
|
-
height: number;
|
|
147
|
-
};
|
|
148
|
-
getHandleDimensions(props: any): {
|
|
149
|
-
min: {
|
|
150
|
-
x: number;
|
|
151
|
-
y: number;
|
|
152
|
-
width: any;
|
|
153
|
-
height: any;
|
|
154
|
-
};
|
|
155
|
-
max: {
|
|
156
|
-
x: number;
|
|
157
|
-
y: number;
|
|
158
|
-
width: any;
|
|
159
|
-
height: any;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
getCursor(props: any): "ew-resize" | "ns-resize" | "move" | "crosshair";
|
|
163
|
-
renderHandles(props: any): React.DetailedReactHTMLElement<{
|
|
164
|
-
key: string;
|
|
165
|
-
style: any;
|
|
166
|
-
} & {
|
|
167
|
-
x: number;
|
|
168
|
-
y: number;
|
|
169
|
-
width: any;
|
|
170
|
-
height: any;
|
|
171
|
-
}, HTMLElement>[] | null;
|
|
172
|
-
renderBrush(props: any): React.DetailedReactHTMLElement<{
|
|
173
|
-
style: any;
|
|
174
|
-
} & {
|
|
175
|
-
x: number;
|
|
176
|
-
y: number;
|
|
177
|
-
width: number;
|
|
178
|
-
height: number;
|
|
179
|
-
}, HTMLElement> | null;
|
|
180
|
-
renderBrushArea(props: any): React.DetailedReactHTMLElement<{
|
|
181
|
-
style: any;
|
|
182
|
-
} & {
|
|
183
|
-
x: number;
|
|
184
|
-
y: number;
|
|
185
|
-
width: number;
|
|
186
|
-
height: number;
|
|
187
|
-
}, HTMLElement>;
|
|
188
|
-
renderLine(props: any): React.DetailedReactHTMLElement<Pick<any, "scale" | "active" | "x1" | "x2" | "y1" | "y2" | "datum" | "style">, HTMLElement>;
|
|
189
|
-
render(): JSX.Element;
|
|
190
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DomainTuple, VictoryStyleObject } from "victory-core";
|
|
3
|
+
export declare type VictoryBrushLineTargetType = "data" | "labels" | "parent";
|
|
4
|
+
export interface VictoryBrushLineProps {
|
|
5
|
+
allowDrag?: boolean;
|
|
6
|
+
allowDraw?: boolean;
|
|
7
|
+
allowResize?: boolean;
|
|
8
|
+
brushAreaComponent?: React.ReactElement;
|
|
9
|
+
brushAreaStyle?: VictoryStyleObject;
|
|
10
|
+
brushAreaWidth?: number;
|
|
11
|
+
brushComponent?: React.ReactElement;
|
|
12
|
+
brushDomain?: DomainTuple;
|
|
13
|
+
brushStyle?: VictoryStyleObject;
|
|
14
|
+
brushWidth?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
dimension?: "x" | "y";
|
|
17
|
+
events?: React.DOMAttributes<any>;
|
|
18
|
+
disable?: boolean;
|
|
19
|
+
groupComponent?: React.ReactElement;
|
|
20
|
+
handleComponent?: React.ReactElement;
|
|
21
|
+
handleStyle?: VictoryStyleObject;
|
|
22
|
+
handleWidth?: number;
|
|
23
|
+
id?: string | number;
|
|
24
|
+
lineComponent?: React.ReactElement;
|
|
25
|
+
name?: string;
|
|
26
|
+
onBrushDomainChange?: (domain: DomainTuple, props?: VictoryBrushLineProps) => void;
|
|
27
|
+
style?: VictoryStyleObject;
|
|
28
|
+
type?: string;
|
|
29
|
+
width?: number;
|
|
30
|
+
}
|
|
31
|
+
export declare class VictoryBrushLine<T extends VictoryBrushLineProps> extends React.Component<T> {
|
|
32
|
+
static defaultProps: {
|
|
33
|
+
allowDrag: boolean;
|
|
34
|
+
allowDraw: boolean;
|
|
35
|
+
allowResize: boolean;
|
|
36
|
+
brushAreaComponent: JSX.Element;
|
|
37
|
+
brushComponent: JSX.Element;
|
|
38
|
+
groupComponent: JSX.Element;
|
|
39
|
+
handleComponent: JSX.Element;
|
|
40
|
+
handleWidth: number;
|
|
41
|
+
lineComponent: JSX.Element;
|
|
42
|
+
width: number;
|
|
43
|
+
};
|
|
44
|
+
static defaultEvents: (props: any) => {
|
|
45
|
+
target: any;
|
|
46
|
+
eventHandlers: {
|
|
47
|
+
onMouseEnter: (evt: any, targetProps: any) => {
|
|
48
|
+
mutation: () => {
|
|
49
|
+
activeBrushes: {
|
|
50
|
+
brushArea: boolean;
|
|
51
|
+
brush: boolean;
|
|
52
|
+
minHandle: boolean;
|
|
53
|
+
maxHandle: boolean;
|
|
54
|
+
};
|
|
55
|
+
brushDomain: any;
|
|
56
|
+
parentSVG: any;
|
|
57
|
+
};
|
|
58
|
+
}[];
|
|
59
|
+
onMouseDown: (evt: any, targetProps: any) => {
|
|
60
|
+
mutation: () => {
|
|
61
|
+
parentSVG: any;
|
|
62
|
+
isSelecting: boolean;
|
|
63
|
+
activeHandle: any;
|
|
64
|
+
brushDomain: any;
|
|
65
|
+
startPosition: any;
|
|
66
|
+
activeBrushes: any;
|
|
67
|
+
};
|
|
68
|
+
}[] | {
|
|
69
|
+
mutation: () => {
|
|
70
|
+
isPanning: any;
|
|
71
|
+
startPosition: any;
|
|
72
|
+
brushDomain: any;
|
|
73
|
+
activeBrushes: any;
|
|
74
|
+
parentSVG: any;
|
|
75
|
+
};
|
|
76
|
+
}[] | {
|
|
77
|
+
mutation: () => {
|
|
78
|
+
isSelecting: any;
|
|
79
|
+
brushDomain: null;
|
|
80
|
+
startPosition: any;
|
|
81
|
+
activeBrushes: any;
|
|
82
|
+
parentSVG: any;
|
|
83
|
+
};
|
|
84
|
+
}[];
|
|
85
|
+
onMouseMove: (evt: any, targetProps: any) => {
|
|
86
|
+
mutation: () => {
|
|
87
|
+
activeBrushes: {
|
|
88
|
+
brushArea: boolean;
|
|
89
|
+
brush: boolean;
|
|
90
|
+
minHandle: boolean;
|
|
91
|
+
maxHandle: boolean;
|
|
92
|
+
};
|
|
93
|
+
brushDomain: any;
|
|
94
|
+
parentSVG: any;
|
|
95
|
+
};
|
|
96
|
+
}[] | {
|
|
97
|
+
mutation: () => {
|
|
98
|
+
startPosition: any;
|
|
99
|
+
isPanning: boolean;
|
|
100
|
+
brushDomain: any[];
|
|
101
|
+
activeBrushes: {
|
|
102
|
+
brush: boolean;
|
|
103
|
+
};
|
|
104
|
+
parentSVG: any;
|
|
105
|
+
};
|
|
106
|
+
}[] | {
|
|
107
|
+
mutation: () => {
|
|
108
|
+
brushDomain: any;
|
|
109
|
+
startPosition: any;
|
|
110
|
+
isSelecting: any;
|
|
111
|
+
activeHandle: any;
|
|
112
|
+
parentSVG: any;
|
|
113
|
+
activeBrushes: {
|
|
114
|
+
brush: boolean;
|
|
115
|
+
minHandle: boolean;
|
|
116
|
+
maxHandle: boolean;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
onMouseUp: (evt: any, targetProps: any) => {
|
|
121
|
+
mutation: () => {
|
|
122
|
+
isPanning: boolean;
|
|
123
|
+
isSelecting: boolean;
|
|
124
|
+
activeHandle: null;
|
|
125
|
+
startPosition: null;
|
|
126
|
+
brushDomain: any;
|
|
127
|
+
activeBrushes: any;
|
|
128
|
+
};
|
|
129
|
+
}[];
|
|
130
|
+
onMouseLeave: (evt: any, targetProps: any) => {
|
|
131
|
+
mutation: () => {
|
|
132
|
+
isPanning: boolean;
|
|
133
|
+
isSelecting: boolean;
|
|
134
|
+
activeHandle: null;
|
|
135
|
+
startPosition: null;
|
|
136
|
+
brushDomain: any;
|
|
137
|
+
activeBrushes: {};
|
|
138
|
+
};
|
|
139
|
+
}[];
|
|
140
|
+
};
|
|
141
|
+
}[] | undefined;
|
|
142
|
+
getRectDimensions(props: any, brushWidth: any, domain?: any): {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
width: number;
|
|
146
|
+
height: number;
|
|
147
|
+
};
|
|
148
|
+
getHandleDimensions(props: any): {
|
|
149
|
+
min: {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
width: any;
|
|
153
|
+
height: any;
|
|
154
|
+
};
|
|
155
|
+
max: {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
width: any;
|
|
159
|
+
height: any;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
getCursor(props: any): "ew-resize" | "ns-resize" | "move" | "crosshair";
|
|
163
|
+
renderHandles(props: any): React.DetailedReactHTMLElement<{
|
|
164
|
+
key: string;
|
|
165
|
+
style: any;
|
|
166
|
+
} & {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
width: any;
|
|
170
|
+
height: any;
|
|
171
|
+
}, HTMLElement>[] | null;
|
|
172
|
+
renderBrush(props: any): React.DetailedReactHTMLElement<{
|
|
173
|
+
style: any;
|
|
174
|
+
} & {
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
width: number;
|
|
178
|
+
height: number;
|
|
179
|
+
}, HTMLElement> | null;
|
|
180
|
+
renderBrushArea(props: any): React.DetailedReactHTMLElement<{
|
|
181
|
+
style: any;
|
|
182
|
+
} & {
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
width: number;
|
|
186
|
+
height: number;
|
|
187
|
+
}, HTMLElement>;
|
|
188
|
+
renderLine(props: any): React.DetailedReactHTMLElement<Pick<any, "scale" | "active" | "x1" | "x2" | "y1" | "y2" | "datum" | "style">, HTMLElement>;
|
|
189
|
+
render(): JSX.Element;
|
|
190
|
+
}
|
|
191
191
|
//# sourceMappingURL=victory-brush-line.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./victory-brush-line";
|
|
1
|
+
export * from "./victory-brush-line";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DomainTuple, VictoryStyleObject } from "victory-core";
|
|
3
|
-
export declare type VictoryBrushLineTargetType = "data" | "labels" | "parent";
|
|
4
|
-
export interface VictoryBrushLineProps {
|
|
5
|
-
allowDrag?: boolean;
|
|
6
|
-
allowDraw?: boolean;
|
|
7
|
-
allowResize?: boolean;
|
|
8
|
-
brushAreaComponent?: React.ReactElement;
|
|
9
|
-
brushAreaStyle?: VictoryStyleObject;
|
|
10
|
-
brushAreaWidth?: number;
|
|
11
|
-
brushComponent?: React.ReactElement;
|
|
12
|
-
brushDomain?: DomainTuple;
|
|
13
|
-
brushStyle?: VictoryStyleObject;
|
|
14
|
-
brushWidth?: number;
|
|
15
|
-
className?: string;
|
|
16
|
-
dimension?: "x" | "y";
|
|
17
|
-
events?: React.DOMAttributes<any>;
|
|
18
|
-
disable?: boolean;
|
|
19
|
-
groupComponent?: React.ReactElement;
|
|
20
|
-
handleComponent?: React.ReactElement;
|
|
21
|
-
handleStyle?: VictoryStyleObject;
|
|
22
|
-
handleWidth?: number;
|
|
23
|
-
id?: string | number;
|
|
24
|
-
lineComponent?: React.ReactElement;
|
|
25
|
-
name?: string;
|
|
26
|
-
onBrushDomainChange?: (domain: DomainTuple, props?: VictoryBrushLineProps) => void;
|
|
27
|
-
style?: VictoryStyleObject;
|
|
28
|
-
type?: string;
|
|
29
|
-
width?: number;
|
|
30
|
-
}
|
|
31
|
-
export declare class VictoryBrushLine<T extends VictoryBrushLineProps> extends React.Component<T> {
|
|
32
|
-
static defaultProps: {
|
|
33
|
-
allowDrag: boolean;
|
|
34
|
-
allowDraw: boolean;
|
|
35
|
-
allowResize: boolean;
|
|
36
|
-
brushAreaComponent: JSX.Element;
|
|
37
|
-
brushComponent: JSX.Element;
|
|
38
|
-
groupComponent: JSX.Element;
|
|
39
|
-
handleComponent: JSX.Element;
|
|
40
|
-
handleWidth: number;
|
|
41
|
-
lineComponent: JSX.Element;
|
|
42
|
-
width: number;
|
|
43
|
-
};
|
|
44
|
-
static defaultEvents: (props: any) => {
|
|
45
|
-
target: any;
|
|
46
|
-
eventHandlers: {
|
|
47
|
-
onMouseEnter: (evt: any, targetProps: any) => {
|
|
48
|
-
mutation: () => {
|
|
49
|
-
activeBrushes: {
|
|
50
|
-
brushArea: boolean;
|
|
51
|
-
brush: boolean;
|
|
52
|
-
minHandle: boolean;
|
|
53
|
-
maxHandle: boolean;
|
|
54
|
-
};
|
|
55
|
-
brushDomain: any;
|
|
56
|
-
parentSVG: any;
|
|
57
|
-
};
|
|
58
|
-
}[];
|
|
59
|
-
onMouseDown: (evt: any, targetProps: any) => {
|
|
60
|
-
mutation: () => {
|
|
61
|
-
parentSVG: any;
|
|
62
|
-
isSelecting: boolean;
|
|
63
|
-
activeHandle: any;
|
|
64
|
-
brushDomain: any;
|
|
65
|
-
startPosition: any;
|
|
66
|
-
activeBrushes: any;
|
|
67
|
-
};
|
|
68
|
-
}[] | {
|
|
69
|
-
mutation: () => {
|
|
70
|
-
isPanning: any;
|
|
71
|
-
startPosition: any;
|
|
72
|
-
brushDomain: any;
|
|
73
|
-
activeBrushes: any;
|
|
74
|
-
parentSVG: any;
|
|
75
|
-
};
|
|
76
|
-
}[] | {
|
|
77
|
-
mutation: () => {
|
|
78
|
-
isSelecting: any;
|
|
79
|
-
brushDomain: null;
|
|
80
|
-
startPosition: any;
|
|
81
|
-
activeBrushes: any;
|
|
82
|
-
parentSVG: any;
|
|
83
|
-
};
|
|
84
|
-
}[];
|
|
85
|
-
onMouseMove: (evt: any, targetProps: any) => {
|
|
86
|
-
mutation: () => {
|
|
87
|
-
activeBrushes: {
|
|
88
|
-
brushArea: boolean;
|
|
89
|
-
brush: boolean;
|
|
90
|
-
minHandle: boolean;
|
|
91
|
-
maxHandle: boolean;
|
|
92
|
-
};
|
|
93
|
-
brushDomain: any;
|
|
94
|
-
parentSVG: any;
|
|
95
|
-
};
|
|
96
|
-
}[] | {
|
|
97
|
-
mutation: () => {
|
|
98
|
-
startPosition: any;
|
|
99
|
-
isPanning: boolean;
|
|
100
|
-
brushDomain: any[];
|
|
101
|
-
activeBrushes: {
|
|
102
|
-
brush: boolean;
|
|
103
|
-
};
|
|
104
|
-
parentSVG: any;
|
|
105
|
-
};
|
|
106
|
-
}[] | {
|
|
107
|
-
mutation: () => {
|
|
108
|
-
brushDomain: any;
|
|
109
|
-
startPosition: any;
|
|
110
|
-
isSelecting: any;
|
|
111
|
-
activeHandle: any;
|
|
112
|
-
parentSVG: any;
|
|
113
|
-
activeBrushes: {
|
|
114
|
-
brush: boolean;
|
|
115
|
-
minHandle: boolean;
|
|
116
|
-
maxHandle: boolean;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
}[];
|
|
120
|
-
onMouseUp: (evt: any, targetProps: any) => {
|
|
121
|
-
mutation: () => {
|
|
122
|
-
isPanning: boolean;
|
|
123
|
-
isSelecting: boolean;
|
|
124
|
-
activeHandle: null;
|
|
125
|
-
startPosition: null;
|
|
126
|
-
brushDomain: any;
|
|
127
|
-
activeBrushes: any;
|
|
128
|
-
};
|
|
129
|
-
}[];
|
|
130
|
-
onMouseLeave: (evt: any, targetProps: any) => {
|
|
131
|
-
mutation: () => {
|
|
132
|
-
isPanning: boolean;
|
|
133
|
-
isSelecting: boolean;
|
|
134
|
-
activeHandle: null;
|
|
135
|
-
startPosition: null;
|
|
136
|
-
brushDomain: any;
|
|
137
|
-
activeBrushes: {};
|
|
138
|
-
};
|
|
139
|
-
}[];
|
|
140
|
-
};
|
|
141
|
-
}[] | undefined;
|
|
142
|
-
getRectDimensions(props: any, brushWidth: any, domain?: any): {
|
|
143
|
-
x: number;
|
|
144
|
-
y: number;
|
|
145
|
-
width: number;
|
|
146
|
-
height: number;
|
|
147
|
-
};
|
|
148
|
-
getHandleDimensions(props: any): {
|
|
149
|
-
min: {
|
|
150
|
-
x: number;
|
|
151
|
-
y: number;
|
|
152
|
-
width: any;
|
|
153
|
-
height: any;
|
|
154
|
-
};
|
|
155
|
-
max: {
|
|
156
|
-
x: number;
|
|
157
|
-
y: number;
|
|
158
|
-
width: any;
|
|
159
|
-
height: any;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
getCursor(props: any): "ew-resize" | "ns-resize" | "move" | "crosshair";
|
|
163
|
-
renderHandles(props: any): React.DetailedReactHTMLElement<{
|
|
164
|
-
key: string;
|
|
165
|
-
style: any;
|
|
166
|
-
} & {
|
|
167
|
-
x: number;
|
|
168
|
-
y: number;
|
|
169
|
-
width: any;
|
|
170
|
-
height: any;
|
|
171
|
-
}, HTMLElement>[] | null;
|
|
172
|
-
renderBrush(props: any): React.DetailedReactHTMLElement<{
|
|
173
|
-
style: any;
|
|
174
|
-
} & {
|
|
175
|
-
x: number;
|
|
176
|
-
y: number;
|
|
177
|
-
width: number;
|
|
178
|
-
height: number;
|
|
179
|
-
}, HTMLElement> | null;
|
|
180
|
-
renderBrushArea(props: any): React.DetailedReactHTMLElement<{
|
|
181
|
-
style: any;
|
|
182
|
-
} & {
|
|
183
|
-
x: number;
|
|
184
|
-
y: number;
|
|
185
|
-
width: number;
|
|
186
|
-
height: number;
|
|
187
|
-
}, HTMLElement>;
|
|
188
|
-
renderLine(props: any): React.DetailedReactHTMLElement<Pick<any, "scale" | "active" | "x1" | "x2" | "y1" | "y2" | "datum" | "style">, HTMLElement>;
|
|
189
|
-
render(): JSX.Element;
|
|
190
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DomainTuple, VictoryStyleObject } from "victory-core";
|
|
3
|
+
export declare type VictoryBrushLineTargetType = "data" | "labels" | "parent";
|
|
4
|
+
export interface VictoryBrushLineProps {
|
|
5
|
+
allowDrag?: boolean;
|
|
6
|
+
allowDraw?: boolean;
|
|
7
|
+
allowResize?: boolean;
|
|
8
|
+
brushAreaComponent?: React.ReactElement;
|
|
9
|
+
brushAreaStyle?: VictoryStyleObject;
|
|
10
|
+
brushAreaWidth?: number;
|
|
11
|
+
brushComponent?: React.ReactElement;
|
|
12
|
+
brushDomain?: DomainTuple;
|
|
13
|
+
brushStyle?: VictoryStyleObject;
|
|
14
|
+
brushWidth?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
dimension?: "x" | "y";
|
|
17
|
+
events?: React.DOMAttributes<any>;
|
|
18
|
+
disable?: boolean;
|
|
19
|
+
groupComponent?: React.ReactElement;
|
|
20
|
+
handleComponent?: React.ReactElement;
|
|
21
|
+
handleStyle?: VictoryStyleObject;
|
|
22
|
+
handleWidth?: number;
|
|
23
|
+
id?: string | number;
|
|
24
|
+
lineComponent?: React.ReactElement;
|
|
25
|
+
name?: string;
|
|
26
|
+
onBrushDomainChange?: (domain: DomainTuple, props?: VictoryBrushLineProps) => void;
|
|
27
|
+
style?: VictoryStyleObject;
|
|
28
|
+
type?: string;
|
|
29
|
+
width?: number;
|
|
30
|
+
}
|
|
31
|
+
export declare class VictoryBrushLine<T extends VictoryBrushLineProps> extends React.Component<T> {
|
|
32
|
+
static defaultProps: {
|
|
33
|
+
allowDrag: boolean;
|
|
34
|
+
allowDraw: boolean;
|
|
35
|
+
allowResize: boolean;
|
|
36
|
+
brushAreaComponent: JSX.Element;
|
|
37
|
+
brushComponent: JSX.Element;
|
|
38
|
+
groupComponent: JSX.Element;
|
|
39
|
+
handleComponent: JSX.Element;
|
|
40
|
+
handleWidth: number;
|
|
41
|
+
lineComponent: JSX.Element;
|
|
42
|
+
width: number;
|
|
43
|
+
};
|
|
44
|
+
static defaultEvents: (props: any) => {
|
|
45
|
+
target: any;
|
|
46
|
+
eventHandlers: {
|
|
47
|
+
onMouseEnter: (evt: any, targetProps: any) => {
|
|
48
|
+
mutation: () => {
|
|
49
|
+
activeBrushes: {
|
|
50
|
+
brushArea: boolean;
|
|
51
|
+
brush: boolean;
|
|
52
|
+
minHandle: boolean;
|
|
53
|
+
maxHandle: boolean;
|
|
54
|
+
};
|
|
55
|
+
brushDomain: any;
|
|
56
|
+
parentSVG: any;
|
|
57
|
+
};
|
|
58
|
+
}[];
|
|
59
|
+
onMouseDown: (evt: any, targetProps: any) => {
|
|
60
|
+
mutation: () => {
|
|
61
|
+
parentSVG: any;
|
|
62
|
+
isSelecting: boolean;
|
|
63
|
+
activeHandle: any;
|
|
64
|
+
brushDomain: any;
|
|
65
|
+
startPosition: any;
|
|
66
|
+
activeBrushes: any;
|
|
67
|
+
};
|
|
68
|
+
}[] | {
|
|
69
|
+
mutation: () => {
|
|
70
|
+
isPanning: any;
|
|
71
|
+
startPosition: any;
|
|
72
|
+
brushDomain: any;
|
|
73
|
+
activeBrushes: any;
|
|
74
|
+
parentSVG: any;
|
|
75
|
+
};
|
|
76
|
+
}[] | {
|
|
77
|
+
mutation: () => {
|
|
78
|
+
isSelecting: any;
|
|
79
|
+
brushDomain: null;
|
|
80
|
+
startPosition: any;
|
|
81
|
+
activeBrushes: any;
|
|
82
|
+
parentSVG: any;
|
|
83
|
+
};
|
|
84
|
+
}[];
|
|
85
|
+
onMouseMove: (evt: any, targetProps: any) => {
|
|
86
|
+
mutation: () => {
|
|
87
|
+
activeBrushes: {
|
|
88
|
+
brushArea: boolean;
|
|
89
|
+
brush: boolean;
|
|
90
|
+
minHandle: boolean;
|
|
91
|
+
maxHandle: boolean;
|
|
92
|
+
};
|
|
93
|
+
brushDomain: any;
|
|
94
|
+
parentSVG: any;
|
|
95
|
+
};
|
|
96
|
+
}[] | {
|
|
97
|
+
mutation: () => {
|
|
98
|
+
startPosition: any;
|
|
99
|
+
isPanning: boolean;
|
|
100
|
+
brushDomain: any[];
|
|
101
|
+
activeBrushes: {
|
|
102
|
+
brush: boolean;
|
|
103
|
+
};
|
|
104
|
+
parentSVG: any;
|
|
105
|
+
};
|
|
106
|
+
}[] | {
|
|
107
|
+
mutation: () => {
|
|
108
|
+
brushDomain: any;
|
|
109
|
+
startPosition: any;
|
|
110
|
+
isSelecting: any;
|
|
111
|
+
activeHandle: any;
|
|
112
|
+
parentSVG: any;
|
|
113
|
+
activeBrushes: {
|
|
114
|
+
brush: boolean;
|
|
115
|
+
minHandle: boolean;
|
|
116
|
+
maxHandle: boolean;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
onMouseUp: (evt: any, targetProps: any) => {
|
|
121
|
+
mutation: () => {
|
|
122
|
+
isPanning: boolean;
|
|
123
|
+
isSelecting: boolean;
|
|
124
|
+
activeHandle: null;
|
|
125
|
+
startPosition: null;
|
|
126
|
+
brushDomain: any;
|
|
127
|
+
activeBrushes: any;
|
|
128
|
+
};
|
|
129
|
+
}[];
|
|
130
|
+
onMouseLeave: (evt: any, targetProps: any) => {
|
|
131
|
+
mutation: () => {
|
|
132
|
+
isPanning: boolean;
|
|
133
|
+
isSelecting: boolean;
|
|
134
|
+
activeHandle: null;
|
|
135
|
+
startPosition: null;
|
|
136
|
+
brushDomain: any;
|
|
137
|
+
activeBrushes: {};
|
|
138
|
+
};
|
|
139
|
+
}[];
|
|
140
|
+
};
|
|
141
|
+
}[] | undefined;
|
|
142
|
+
getRectDimensions(props: any, brushWidth: any, domain?: any): {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
width: number;
|
|
146
|
+
height: number;
|
|
147
|
+
};
|
|
148
|
+
getHandleDimensions(props: any): {
|
|
149
|
+
min: {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
width: any;
|
|
153
|
+
height: any;
|
|
154
|
+
};
|
|
155
|
+
max: {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
width: any;
|
|
159
|
+
height: any;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
getCursor(props: any): "ew-resize" | "ns-resize" | "move" | "crosshair";
|
|
163
|
+
renderHandles(props: any): React.DetailedReactHTMLElement<{
|
|
164
|
+
key: string;
|
|
165
|
+
style: any;
|
|
166
|
+
} & {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
width: any;
|
|
170
|
+
height: any;
|
|
171
|
+
}, HTMLElement>[] | null;
|
|
172
|
+
renderBrush(props: any): React.DetailedReactHTMLElement<{
|
|
173
|
+
style: any;
|
|
174
|
+
} & {
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
width: number;
|
|
178
|
+
height: number;
|
|
179
|
+
}, HTMLElement> | null;
|
|
180
|
+
renderBrushArea(props: any): React.DetailedReactHTMLElement<{
|
|
181
|
+
style: any;
|
|
182
|
+
} & {
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
width: number;
|
|
186
|
+
height: number;
|
|
187
|
+
}, HTMLElement>;
|
|
188
|
+
renderLine(props: any): React.DetailedReactHTMLElement<Pick<any, "scale" | "active" | "x1" | "x2" | "y1" | "y2" | "datum" | "style">, HTMLElement>;
|
|
189
|
+
render(): JSX.Element;
|
|
190
|
+
}
|
|
191
191
|
//# sourceMappingURL=victory-brush-line.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-brush-line",
|
|
3
|
-
"version": "36.9.2
|
|
3
|
+
"version": "36.9.2",
|
|
4
4
|
"description": "Interactive Brush Line Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "https://github.com/FormidableLabs/victory"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://
|
|
15
|
+
"homepage": "https://commerce.nearform.com/open-source/victory",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"main": "lib/index.js",
|
|
18
18
|
"module": "es/index.js",
|
|
@@ -22,11 +22,14 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"react-fast-compare": "^3.2.0",
|
|
25
|
-
"victory-core": "^36.9.2
|
|
25
|
+
"victory-core": "^36.9.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 ####": {},
|