victory-brush-container 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 +8 -15
- package/README.md +2 -2
- package/dist/victory-brush-container.js +30 -1
- 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 +6 -3
- package/src/victory-brush-container.tsx +172 -175
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
# victory-brush-container
|
|
2
2
|
|
|
3
|
-
## 36.9.2
|
|
3
|
+
## 36.9.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Updated dependencies [c13308624]
|
|
15
|
-
- Updated dependencies [65d02419f]
|
|
16
|
-
- Updated dependencies [7efd582cc]
|
|
17
|
-
- Updated dependencies [9cdaf2c08]
|
|
18
|
-
- Updated dependencies [f6f7cc515]
|
|
19
|
-
- Updated dependencies [6e34169a5]
|
|
20
|
-
- victory-core@36.9.2-next.3
|
|
7
|
+
- Improve types for brush container and candlestick ([#2794](https://github.com/FormidableLabs/victory/pull/2794))
|
|
8
|
+
|
|
9
|
+
* Replace lodash array utils with native code ([#2810](https://github.com/FormidableLabs/victory/pull/2810))
|
|
10
|
+
|
|
11
|
+
- Replace lodash values and mapValues with native code ([#2808](https://github.com/FormidableLabs/victory/pull/2808))
|
|
12
|
+
|
|
13
|
+
* Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
|
|
21
14
|
|
|
22
15
|
## 36.9.1
|
|
23
16
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`victory-brush-container@^30.0.0` exports `VictoryBrushContainer`, `brushContainerMixin` and `BrushHelpers`
|
|
4
4
|
|
|
5
|
-
To view documentation for `VictoryBrushContainer` please see https://
|
|
5
|
+
To view documentation for `VictoryBrushContainer` please see https://commerce.nearform.com/open-source/victory/docs/victory-brush-container
|
|
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-container.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-container.md
|
|
@@ -3379,6 +3379,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3379
3379
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
3380
3380
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
3381
3381
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
3382
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
3382
3383
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
3383
3384
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
3384
3385
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -3420,6 +3421,22 @@ function containsOnlyStrings(collection) {
|
|
|
3420
3421
|
return typeof value === "string";
|
|
3421
3422
|
});
|
|
3422
3423
|
}
|
|
3424
|
+
/**
|
|
3425
|
+
* Creates an array of array values not included in the other given arrays
|
|
3426
|
+
* @param a The array to inspect
|
|
3427
|
+
* @param b The values to exclude
|
|
3428
|
+
* @returns The new array of filtered values
|
|
3429
|
+
*/
|
|
3430
|
+
|
|
3431
|
+
function difference(a, b) {
|
|
3432
|
+
if (a && b) {
|
|
3433
|
+
return a.filter(function (value) {
|
|
3434
|
+
return !b.includes(value);
|
|
3435
|
+
});
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
return [];
|
|
3439
|
+
}
|
|
3423
3440
|
function isArrayOfArrays(collection) {
|
|
3424
3441
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
3425
3442
|
}
|
|
@@ -3470,6 +3487,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3470
3487
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
3471
3488
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
3472
3489
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
3490
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
3473
3491
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
3474
3492
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
3475
3493
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -3520,6 +3538,18 @@ function getPolarRange(props, axis) {
|
|
|
3520
3538
|
return [props.innerRadius || 0, getRadius(props)];
|
|
3521
3539
|
} // Exported Functions
|
|
3522
3540
|
|
|
3541
|
+
/**
|
|
3542
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
3543
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
3544
|
+
*/
|
|
3545
|
+
|
|
3546
|
+
|
|
3547
|
+
function invert(original) {
|
|
3548
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
3549
|
+
acc[current[1]] = current[0];
|
|
3550
|
+
return acc;
|
|
3551
|
+
}, {});
|
|
3552
|
+
}
|
|
3523
3553
|
/**
|
|
3524
3554
|
* creates an object with some keys excluded
|
|
3525
3555
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -3528,7 +3558,6 @@ function getPolarRange(props, axis) {
|
|
|
3528
3558
|
* @returns {Object} new object with same properties as originalObject
|
|
3529
3559
|
*/
|
|
3530
3560
|
|
|
3531
|
-
|
|
3532
3561
|
function omit(originalObject) {
|
|
3533
3562
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
3534
3563
|
// code based on babel's _objectWithoutProperties
|
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
|