victory-core 36.6.0 → 36.6.3
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 +27 -0
- package/dist/victory-core.js +5 -3
- package/es/index.js +1 -2
- package/es/types/callbacks.d.ts +2 -1
- package/es/types/callbacks.js +1 -2
- package/es/types/prop-types.js +1 -2
- package/es/victory-accessible-group/victory-accessible-group.js +1 -2
- package/es/victory-animation/util.js +1 -2
- package/es/victory-animation/victory-animation.js +1 -2
- package/es/victory-clip-container/victory-clip-container.js +1 -2
- package/es/victory-container/victory-container.js +1 -2
- package/es/victory-label/victory-label.d.ts +4 -8
- package/es/victory-label/victory-label.js +1 -2
- package/es/victory-portal/portal-context.js +1 -2
- package/es/victory-portal/portal.js +1 -2
- package/es/victory-portal/victory-portal.js +1 -2
- package/es/victory-primitives/arc.js +1 -2
- package/es/victory-primitives/background.js +1 -2
- package/es/victory-primitives/border.js +1 -2
- package/es/victory-primitives/circle.js +1 -2
- package/es/victory-primitives/clip-path.js +1 -2
- package/es/victory-primitives/index.js +1 -2
- package/es/victory-primitives/line-segment.js +1 -2
- package/es/victory-primitives/line.js +1 -2
- package/es/victory-primitives/path.js +1 -2
- package/es/victory-primitives/point.js +1 -2
- package/es/victory-primitives/rect.js +1 -2
- package/es/victory-primitives/text.js +1 -2
- package/es/victory-primitives/tspan.js +1 -2
- package/es/victory-primitives/types.js +1 -2
- package/es/victory-primitives/whisker.js +1 -2
- package/es/victory-state/defaults.js +1 -2
- package/es/victory-state/helpers/get-axis-data.js +1 -2
- package/es/victory-state/helpers/get-data.js +1 -2
- package/es/victory-state/helpers/get-domain.js +1 -2
- package/es/victory-state/helpers/get-range.js +1 -2
- package/es/victory-state/helpers/get-scale.js +1 -2
- package/es/victory-state/index.js +1 -2
- package/es/victory-state/types.js +1 -2
- package/es/victory-state/victory-provider.js +1 -2
- package/es/victory-theme/grayscale.js +1 -2
- package/es/victory-theme/material.js +1 -2
- package/es/victory-theme/types.js +1 -2
- package/es/victory-theme/victory-theme.js +1 -2
- package/es/victory-transition/victory-transition.js +1 -2
- package/es/victory-util/add-events.d.ts +25 -7
- package/es/victory-util/add-events.js +1 -2
- package/es/victory-util/axis.js +1 -2
- package/es/victory-util/collection.js +1 -2
- package/es/victory-util/common-props.js +1 -2
- package/es/victory-util/data.js +1 -2
- package/es/victory-util/default-transitions.js +1 -2
- package/es/victory-util/domain.js +1 -2
- package/es/victory-util/events.d.ts +1 -1
- package/es/victory-util/events.js +1 -2
- package/es/victory-util/helpers.d.ts +2 -1
- package/es/victory-util/helpers.js +1 -2
- package/es/victory-util/hooks/index.js +1 -2
- package/es/victory-util/hooks/use-animation-state.js +1 -2
- package/es/victory-util/hooks/use-previous-props.js +1 -2
- package/es/victory-util/immutable.js +1 -2
- package/es/victory-util/index.js +1 -2
- package/es/victory-util/label-helpers.js +1 -2
- package/es/victory-util/line-helpers.js +1 -2
- package/es/victory-util/log.js +1 -2
- package/es/victory-util/point-path-helpers.js +1 -2
- package/es/victory-util/prop-types.js +1 -2
- package/es/victory-util/scale.js +1 -2
- package/es/victory-util/selection.d.ts +1 -1
- package/es/victory-util/selection.js +2 -3
- package/es/victory-util/style.js +1 -2
- package/es/victory-util/textsize.js +1 -2
- package/es/victory-util/timer-context.js +1 -2
- package/es/victory-util/timer.js +1 -2
- package/es/victory-util/transitions.js +1 -2
- package/es/victory-util/type-helpers.js +1 -2
- package/es/victory-util/user-props.d.ts +1 -1
- package/es/victory-util/user-props.js +4 -3
- package/es/victory-util/with-container.d.ts +1 -1
- package/es/victory-util/with-container.js +1 -2
- package/es/victory-util/wrapper.d.ts +1 -1
- package/es/victory-util/wrapper.js +1 -2
- package/lib/index.js +1 -2
- package/lib/types/callbacks.d.ts +2 -1
- package/lib/types/callbacks.js +1 -2
- package/lib/types/prop-types.js +1 -2
- package/lib/victory-accessible-group/victory-accessible-group.js +1 -2
- package/lib/victory-animation/util.js +1 -2
- package/lib/victory-animation/victory-animation.js +1 -2
- package/lib/victory-clip-container/victory-clip-container.js +1 -2
- package/lib/victory-container/victory-container.js +1 -2
- package/lib/victory-label/victory-label.d.ts +4 -8
- package/lib/victory-label/victory-label.js +1 -2
- package/lib/victory-portal/portal-context.js +1 -2
- package/lib/victory-portal/portal.js +1 -2
- package/lib/victory-portal/victory-portal.js +1 -2
- package/lib/victory-primitives/arc.js +1 -2
- package/lib/victory-primitives/background.js +1 -2
- package/lib/victory-primitives/border.js +1 -2
- package/lib/victory-primitives/circle.js +1 -2
- package/lib/victory-primitives/clip-path.js +1 -2
- package/lib/victory-primitives/index.js +1 -2
- package/lib/victory-primitives/line-segment.js +1 -2
- package/lib/victory-primitives/line.js +1 -2
- package/lib/victory-primitives/path.js +1 -2
- package/lib/victory-primitives/point.js +1 -2
- package/lib/victory-primitives/rect.js +1 -2
- package/lib/victory-primitives/text.js +1 -2
- package/lib/victory-primitives/tspan.js +1 -2
- package/lib/victory-primitives/types.js +1 -2
- package/lib/victory-primitives/whisker.js +1 -2
- package/lib/victory-state/defaults.js +1 -2
- package/lib/victory-state/helpers/get-axis-data.js +1 -2
- package/lib/victory-state/helpers/get-data.js +1 -2
- package/lib/victory-state/helpers/get-domain.js +1 -2
- package/lib/victory-state/helpers/get-range.js +1 -2
- package/lib/victory-state/helpers/get-scale.js +1 -2
- package/lib/victory-state/index.js +1 -2
- package/lib/victory-state/types.js +1 -2
- package/lib/victory-state/victory-provider.js +1 -2
- package/lib/victory-theme/grayscale.js +1 -2
- package/lib/victory-theme/material.js +1 -2
- package/lib/victory-theme/types.js +1 -2
- package/lib/victory-theme/victory-theme.js +1 -2
- package/lib/victory-transition/victory-transition.js +1 -2
- package/lib/victory-util/add-events.d.ts +25 -7
- package/lib/victory-util/add-events.js +1 -2
- package/lib/victory-util/axis.js +1 -2
- package/lib/victory-util/collection.js +1 -2
- package/lib/victory-util/common-props.js +1 -2
- package/lib/victory-util/data.js +1 -2
- package/lib/victory-util/default-transitions.js +1 -2
- package/lib/victory-util/domain.js +1 -2
- package/lib/victory-util/events.d.ts +1 -1
- package/lib/victory-util/events.js +1 -2
- package/lib/victory-util/helpers.d.ts +2 -1
- package/lib/victory-util/helpers.js +1 -2
- package/lib/victory-util/hooks/index.js +1 -2
- package/lib/victory-util/hooks/use-animation-state.js +1 -2
- package/lib/victory-util/hooks/use-previous-props.js +1 -2
- package/lib/victory-util/immutable.js +1 -2
- package/lib/victory-util/index.js +1 -2
- package/lib/victory-util/label-helpers.js +1 -2
- package/lib/victory-util/line-helpers.js +1 -2
- package/lib/victory-util/log.js +1 -2
- package/lib/victory-util/point-path-helpers.js +1 -2
- package/lib/victory-util/prop-types.js +1 -2
- package/lib/victory-util/scale.js +1 -2
- package/lib/victory-util/selection.d.ts +1 -1
- package/lib/victory-util/selection.js +7 -4
- package/lib/victory-util/style.js +1 -2
- package/lib/victory-util/textsize.js +1 -2
- package/lib/victory-util/timer-context.js +1 -2
- package/lib/victory-util/timer.js +1 -2
- package/lib/victory-util/transitions.js +1 -2
- package/lib/victory-util/type-helpers.js +1 -2
- package/lib/victory-util/user-props.d.ts +1 -1
- package/lib/victory-util/user-props.js +4 -3
- package/lib/victory-util/with-container.d.ts +1 -1
- package/lib/victory-util/with-container.js +1 -2
- package/lib/victory-util/wrapper.d.ts +1 -1
- package/lib/victory-util/wrapper.js +1 -2
- package/package.json +34 -17
- package/src/types/callbacks.ts +3 -1
- package/src/victory-label/victory-label.tsx +4 -3
- package/src/victory-util/add-events.tsx +45 -6
- package/src/victory-util/events.ts +2 -1
- package/src/victory-util/helpers.ts +5 -1
- package/src/victory-util/selection.ts +3 -1
- package/src/victory-util/user-props.ts +2 -1
- package/src/victory-util/with-container.tsx +2 -2
- package/src/victory-util/wrapper.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# victory-core
|
|
2
2
|
|
|
3
|
+
## 36.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Do not generate \*.js.map sourcemaps (fixes [#2346](https://github.com/FormidableLabs/victory/issues/2346)) ([#2432](https://github.com/FormidableLabs/victory/pull/2432))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`4bfc65df5`](https://github.com/FormidableLabs/victory/commit/4bfc65df5a10aa6a10084882ed5c6d0d894dec6f)]:
|
|
10
|
+
- victory-vendor@36.6.3
|
|
11
|
+
|
|
12
|
+
## 36.6.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies []:
|
|
17
|
+
- victory-vendor@36.6.2
|
|
18
|
+
|
|
19
|
+
## 36.6.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- - Removed Template Literal Types to increase TS compatibility (fixes [#2418](https://github.com/FormidableLabs/victory/issues/2418)) ([#2420](https://github.com/FormidableLabs/victory/pull/2420))
|
|
24
|
+
- Improved type for `VictoryLabelProps["textAnchor"]` (fixes [#2361](https://github.com/FormidableLabs/victory/issues/2361))
|
|
25
|
+
- Fixed exported types for `VictoryAxis`, `VictoryBoxPlot`, `VictoryErrorBar`, and `VictoryScatter` (fixes [#2411](https://github.com/FormidableLabs/victory/issues/2411))
|
|
26
|
+
- Migrate `victory-cursor-container` to TS (fixes [#2402](https://github.com/FormidableLabs/victory/issues/2402))
|
|
27
|
+
- Updated dependencies []:
|
|
28
|
+
- victory-vendor@36.6.1
|
|
29
|
+
|
|
3
30
|
## 36.6.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/dist/victory-core.js
CHANGED
|
@@ -8914,7 +8914,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8914
8914
|
/* harmony export */ "getParentSVG": () => (/* binding */ getParentSVG),
|
|
8915
8915
|
/* harmony export */ "getSVGEventCoordinates": () => (/* binding */ getSVGEventCoordinates)
|
|
8916
8916
|
/* harmony export */ });
|
|
8917
|
-
/* harmony import */ var
|
|
8917
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
8918
8918
|
|
|
8919
8919
|
|
|
8920
8920
|
// Private Functions
|
|
@@ -9021,7 +9021,7 @@ function getBounds(props) {
|
|
|
9021
9021
|
var point2 = getDataCoordinates(props, scale, x2, y2);
|
|
9022
9022
|
|
|
9023
9023
|
var makeBound = function (a, b) {
|
|
9024
|
-
return [
|
|
9024
|
+
return [_collection__WEBPACK_IMPORTED_MODULE_0__.getMinValue([a, b]), _collection__WEBPACK_IMPORTED_MODULE_0__.getMaxValue([a, b])];
|
|
9025
9025
|
};
|
|
9026
9026
|
|
|
9027
9027
|
return {
|
|
@@ -10065,7 +10065,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
10065
10065
|
var USER_PROPS_SAFELIST = {
|
|
10066
10066
|
startsWith: ["data-", "aria-"],
|
|
10067
10067
|
exactMatch: []
|
|
10068
|
-
};
|
|
10068
|
+
}; // Normally we'd use Template Literal Types, but we're avoiding it to maximize TS compatibility with TS < 4.1
|
|
10069
|
+
|
|
10070
|
+
// `data-${string}` | `aria-${string}`;
|
|
10069
10071
|
|
|
10070
10072
|
/**
|
|
10071
10073
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
package/es/index.js
CHANGED
|
@@ -14,5 +14,4 @@ export * from "./victory-portal/victory-portal";
|
|
|
14
14
|
export * from "./victory-primitives";
|
|
15
15
|
export { Border as Box } from "./victory-primitives";
|
|
16
16
|
export * from "./victory-util";
|
|
17
|
-
export * from "./victory-state";
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
17
|
+
export * from "./victory-state";
|
package/es/types/callbacks.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface CallbackArgs {
|
|
|
12
12
|
data?: Datum[];
|
|
13
13
|
datum?: Datum;
|
|
14
14
|
horizontal?: boolean;
|
|
15
|
-
index
|
|
15
|
+
index?: ID;
|
|
16
16
|
x?: number;
|
|
17
17
|
y?: number;
|
|
18
18
|
scale?: {
|
|
@@ -34,4 +34,5 @@ export declare type VictoryOrientationCallback = (args: CallbackArgs) => Orienta
|
|
|
34
34
|
export declare type NumberOrCallback = number | VictoryNumberCallback;
|
|
35
35
|
export declare type PaddingOrCallback = number | BlockProps | VictoryPaddingCallback;
|
|
36
36
|
export declare type OrientationOrCallback = OrientationTypes | VictoryOrientationCallback;
|
|
37
|
+
export declare type ValueOrCallback<TValue> = TValue | ((args: CallbackArgs) => TValue);
|
|
37
38
|
//# sourceMappingURL=callbacks.d.ts.map
|
package/es/types/callbacks.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=callbacks.js.map
|
|
1
|
+
export {};
|
package/es/types/prop-types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=prop-types.js.map
|
|
1
|
+
export {};
|
|
@@ -275,5 +275,4 @@ VictoryClipContainer.defaultProps = {
|
|
|
275
275
|
rectComponent: /*#__PURE__*/React.createElement(Rect, null),
|
|
276
276
|
clipPathComponent: /*#__PURE__*/React.createElement(ClipPath, null),
|
|
277
277
|
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
278
|
-
};
|
|
279
|
-
//# sourceMappingURL=victory-clip-container.js.map
|
|
278
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { NumberOrCallback, StringOrCallback, StringOrNumberOrCallback } from "../types/callbacks";
|
|
2
|
+
import { NumberOrCallback, StringOrCallback, StringOrNumberOrCallback, ValueOrCallback } from "../types/callbacks";
|
|
3
3
|
import { PaddingProps, VerticalAnchorType, VictoryLabelStyleObject } from "../victory-theme/victory-theme";
|
|
4
4
|
export declare type TextAnchorType = "start" | "middle" | "end" | "inherit";
|
|
5
5
|
export declare type OriginType = {
|
|
@@ -34,15 +34,11 @@ export interface VictoryLabelProps {
|
|
|
34
34
|
tabIndex?: NumberOrCallback;
|
|
35
35
|
text?: string[] | StringOrNumberOrCallback;
|
|
36
36
|
textComponent?: React.ReactElement;
|
|
37
|
-
textAnchor?: TextAnchorType
|
|
38
|
-
(): TextAnchorType;
|
|
39
|
-
};
|
|
37
|
+
textAnchor?: ValueOrCallback<TextAnchorType>;
|
|
40
38
|
title?: string;
|
|
41
|
-
transform?: string | object
|
|
39
|
+
transform?: ValueOrCallback<string | object>;
|
|
42
40
|
tspanComponent?: React.ReactElement;
|
|
43
|
-
verticalAnchor?: VerticalAnchorType
|
|
44
|
-
(): VerticalAnchorType;
|
|
45
|
-
};
|
|
41
|
+
verticalAnchor?: ValueOrCallback<VerticalAnchorType>;
|
|
46
42
|
x?: number;
|
|
47
43
|
y?: number;
|
|
48
44
|
dx?: StringOrNumberOrCallback;
|
|
@@ -117,5 +117,4 @@ VictoryPortal.propTypes = {
|
|
|
117
117
|
VictoryPortal.defaultProps = {
|
|
118
118
|
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
119
119
|
};
|
|
120
|
-
VictoryPortal.contextType = PortalContext;
|
|
121
|
-
//# sourceMappingURL=victory-portal.js.map
|
|
120
|
+
VictoryPortal.contextType = PortalContext;
|
|
@@ -11,5 +11,4 @@ export var ClipPath = function (props) {
|
|
|
11
11
|
ClipPath.propTypes = {
|
|
12
12
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
13
13
|
clipId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=clip-path.js.map
|
|
14
|
+
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
export {};
|
|
@@ -26,7 +26,7 @@ export interface EventsMixinClass<TProps> {
|
|
|
26
26
|
getEventState: typeof Events.getEventState;
|
|
27
27
|
renderData(props: TProps): any;
|
|
28
28
|
renderContinuousData(props: TProps): any;
|
|
29
|
-
animateComponent(props: TProps, defaultAnimationWhitelist:
|
|
29
|
+
animateComponent(props: TProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
30
30
|
getComponentProps(component: React.ReactElement, type: string, index: number): TProps;
|
|
31
31
|
dataKeys: string[];
|
|
32
32
|
}
|
|
@@ -41,14 +41,30 @@ export interface EventMixinCalculatedValues {
|
|
|
41
41
|
hasEvents: unknown;
|
|
42
42
|
events: unknown;
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* These are the common roles that we care about internally.
|
|
46
|
+
*/
|
|
47
|
+
export declare type VictoryComponentCommonRole = "container" | "group" | "histogram" | "label" | "line" | "portal" | "stack" | "tooltip" | "voronoi";
|
|
48
|
+
/**
|
|
49
|
+
* A component can have any "role",
|
|
50
|
+
* but there are certain ones that we actually care about internally
|
|
51
|
+
*/
|
|
52
|
+
export declare type VictoryComponentRole = VictoryComponentCommonRole | string;
|
|
53
|
+
/**
|
|
54
|
+
* Static component fields used by Victory for common behavior
|
|
55
|
+
*/
|
|
56
|
+
export interface VictoryComponentConfiguration<TProps> {
|
|
57
|
+
getBaseProps?(props: TProps): EventMixinCalculatedValues["baseProps"];
|
|
58
|
+
role?: VictoryComponentRole;
|
|
59
|
+
expectedComponents?: Array<keyof TProps | string>;
|
|
60
|
+
getChildren?: (props: TProps, childComponents?: Array<React.ReactNode>, calculatedProps?: TProps) => void;
|
|
61
|
+
animationWhitelist?: Array<keyof TProps | string>;
|
|
62
|
+
}
|
|
44
63
|
/**
|
|
45
64
|
* This represents the class itself, including static fields
|
|
46
65
|
*/
|
|
47
|
-
export interface WrappedComponentClass<TProps> {
|
|
66
|
+
export interface WrappedComponentClass<TProps> extends VictoryComponentConfiguration<TProps> {
|
|
48
67
|
new (props: TProps): React.Component<TProps>;
|
|
49
|
-
getBaseProps?(props: TProps): EventMixinCalculatedValues["baseProps"];
|
|
50
|
-
role?: string;
|
|
51
|
-
expectedComponents?: string[];
|
|
52
68
|
}
|
|
53
69
|
export declare function addEvents<TBase extends WrappedComponentClass<TProps>, TProps extends EventMixinCommonProps>(WrappedComponent: TBase, options?: MixinOptions): {
|
|
54
70
|
new (props: TProps): {
|
|
@@ -76,7 +92,7 @@ export declare function addEvents<TBase extends WrappedComponentClass<TProps>, T
|
|
|
76
92
|
getAllEvents(props: any): any;
|
|
77
93
|
getComponentProps(component: any, type: any, index: any): any;
|
|
78
94
|
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
79
|
-
animateComponent(props: TProps, defaultAnimationWhitelist: string[]):
|
|
95
|
+
animateComponent(props: TProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
80
96
|
renderContinuousData(props: TProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
81
97
|
renderData(props: any, shouldRenderDatum?: (datum: any) => boolean): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
82
98
|
context: unknown;
|
|
@@ -104,6 +120,8 @@ export declare function addEvents<TBase extends WrappedComponentClass<TProps>, T
|
|
|
104
120
|
};
|
|
105
121
|
getBaseProps?(props: TProps): Record<string, object>;
|
|
106
122
|
role?: string | undefined;
|
|
107
|
-
expectedComponents?: string[] | undefined;
|
|
123
|
+
expectedComponents?: (string | keyof TProps)[] | undefined;
|
|
124
|
+
getChildren?: ((props: TProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: TProps | undefined) => void) | undefined;
|
|
125
|
+
animationWhitelist?: (string | keyof TProps)[] | undefined;
|
|
108
126
|
} & TBase;
|
|
109
127
|
//# sourceMappingURL=add-events.d.ts.map
|
package/es/victory-util/axis.js
CHANGED
|
@@ -59,5 +59,4 @@ export function getMinValue(arr) {
|
|
|
59
59
|
var array = arr.concat(values);
|
|
60
60
|
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
61
61
|
: Math.min.apply(Math, _toConsumableArray(array));
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=collection.js.map
|
|
62
|
+
}
|
package/es/victory-util/data.js
CHANGED
|
@@ -454,5 +454,4 @@ export function isDataComponent(component) {
|
|
|
454
454
|
|
|
455
455
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
456
456
|
return _includes(whitelist, role);
|
|
457
|
-
}
|
|
458
|
-
//# sourceMappingURL=data.js.map
|
|
457
|
+
}
|
|
@@ -409,5 +409,4 @@ export function isDomainComponent(component) {
|
|
|
409
409
|
|
|
410
410
|
var whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
411
411
|
return _includes(whitelist, role);
|
|
412
|
-
}
|
|
413
|
-
//# sourceMappingURL=domain.js.map
|
|
412
|
+
}
|
|
@@ -6,7 +6,7 @@ export interface ComponentEvent {
|
|
|
6
6
|
eventKey?: ComponentEventKey | ComponentEventKey[];
|
|
7
7
|
eventHandlers: ComponentEventHandlers;
|
|
8
8
|
}
|
|
9
|
-
export declare type ComponentEventName =
|
|
9
|
+
export declare type ComponentEventName = string;
|
|
10
10
|
export interface ComponentEventHandlers {
|
|
11
11
|
[k: ComponentEventName]: ComponentEventHandler;
|
|
12
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { CallbackArgs, ValueOrCallback } from "../types/callbacks";
|
|
2
3
|
/**
|
|
3
4
|
* creates an object with some keys excluded
|
|
4
5
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -23,7 +24,7 @@ export declare function getPadding(props: any, name?: string): {
|
|
|
23
24
|
export declare function isTooltip(component: any): boolean;
|
|
24
25
|
export declare function getDefaultStyles(props: any, role: any): any;
|
|
25
26
|
export declare function getStyles(style: any, defaultStyles: any): any;
|
|
26
|
-
export declare function evaluateProp(prop:
|
|
27
|
+
export declare function evaluateProp<TValue>(prop: ValueOrCallback<TValue>, props: CallbackArgs): TValue;
|
|
27
28
|
export declare function evaluateStyle(style: any, props: any): any;
|
|
28
29
|
export declare function degreesToRadians(degrees: any): any;
|
|
29
30
|
export declare function radiansToDegrees(radians: any): any;
|
package/es/victory-util/index.js
CHANGED
|
@@ -44,5 +44,4 @@ import * as _UserProps from "./user-props";
|
|
|
44
44
|
export { _UserProps as UserProps };
|
|
45
45
|
import * as _Wrapper from "./wrapper";
|
|
46
46
|
export { _Wrapper as Wrapper };
|
|
47
|
-
export * from "./with-container";
|
|
48
|
-
//# sourceMappingURL=index.js.map
|
|
47
|
+
export * from "./with-container";
|