victory-core 36.4.1 → 36.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/victory-core.js +874 -879
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +38 -941
- package/es/index.js +19 -28
- package/es/types.d.ts +33 -0
- package/es/types.js +1 -0
- package/es/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/es/victory-accessible-group/victory-accessible-group.js +8 -16
- package/es/victory-animation/util.d.ts +66 -0
- package/es/victory-animation/util.js +2 -1
- package/es/victory-animation/victory-animation.d.ts +69 -0
- package/es/victory-animation/victory-animation.js +59 -67
- package/es/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/es/victory-clip-container/victory-clip-container.js +15 -21
- package/es/victory-container/victory-container.d.ts +99 -0
- package/es/victory-container/victory-container.js +31 -31
- package/es/victory-label/victory-label.d.ts +61 -0
- package/es/victory-label/victory-label.js +13 -8
- package/es/victory-portal/portal-context.d.ts +11 -0
- package/es/victory-portal/portal-context.js +3 -4
- package/es/victory-portal/portal.d.ts +28 -0
- package/es/victory-portal/portal.js +25 -33
- package/es/victory-portal/victory-portal.d.ts +31 -0
- package/es/victory-portal/victory-portal.js +23 -22
- package/es/victory-primitives/arc.d.ts +21 -0
- package/es/victory-primitives/arc.js +3 -5
- package/es/victory-primitives/background.d.ts +22 -0
- package/es/victory-primitives/background.js +4 -6
- package/es/victory-primitives/border.d.ts +18 -0
- package/es/victory-primitives/border.js +3 -5
- package/es/victory-primitives/circle.d.ts +2 -0
- package/es/victory-primitives/circle.js +11 -8
- package/es/victory-primitives/clip-path.d.ts +14 -0
- package/es/victory-primitives/clip-path.js +6 -6
- package/es/victory-primitives/index.d.ts +14 -0
- package/es/victory-primitives/index.js +14 -0
- package/es/victory-primitives/line-segment.d.ts +19 -0
- package/es/victory-primitives/line-segment.js +3 -5
- package/es/victory-primitives/line.d.ts +2 -0
- package/es/victory-primitives/line.js +11 -8
- package/es/victory-primitives/path.d.ts +2 -0
- package/es/victory-primitives/path.js +9 -6
- package/es/victory-primitives/point.d.ts +21 -0
- package/es/victory-primitives/point.js +9 -19
- package/es/victory-primitives/rect.d.ts +2 -0
- package/es/victory-primitives/rect.js +11 -8
- package/es/victory-primitives/text.d.ts +16 -0
- package/es/victory-primitives/text.js +7 -6
- package/es/victory-primitives/tspan.d.ts +2 -0
- package/es/victory-primitives/tspan.js +7 -6
- package/es/victory-primitives/types.d.ts +7 -0
- package/es/victory-primitives/types.js +1 -0
- package/es/victory-primitives/whisker.d.ts +24 -0
- package/es/victory-primitives/whisker.js +3 -5
- package/es/victory-theme/grayscale.d.ts +2 -0
- package/es/victory-theme/grayscale.js +1 -1
- package/es/victory-theme/material.d.ts +2 -0
- package/es/victory-theme/material.js +1 -1
- package/es/victory-theme/victory-theme-definition.d.ts +244 -0
- package/es/victory-theme/victory-theme-definition.js +1 -0
- package/es/victory-theme/victory-theme.d.ts +5 -0
- package/es/victory-theme/victory-theme.js +6 -5
- package/es/victory-transition/victory-transition.d.ts +59 -0
- package/es/victory-transition/victory-transition.js +19 -23
- package/es/victory-util/add-events.js +6 -3
- package/es/victory-util/axis.js +0 -1
- package/es/victory-util/collection.js +0 -2
- package/es/victory-util/data.js +0 -2
- package/es/victory-util/default-transitions.js +0 -1
- package/es/victory-util/domain.js +0 -2
- package/es/victory-util/helpers.js +0 -2
- package/es/victory-util/immutable.js +0 -1
- package/es/victory-util/label-helpers.js +0 -2
- package/es/victory-util/log.js +0 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -0
- package/es/victory-util/point-path-helpers.js +59 -61
- package/es/victory-util/selection.d.ts +23 -0
- package/es/victory-util/selection.js +0 -2
- package/es/victory-util/style.js +0 -2
- package/es/victory-util/textsize.d.ts +8 -0
- package/es/victory-util/timer-context.d.ts +11 -0
- package/es/victory-util/timer.d.ts +16 -0
- package/es/victory-util/timer.js +13 -8
- package/es/victory-util/types.d.ts +188 -0
- package/es/victory-util/types.js +1 -0
- package/lib/index.d.ts +38 -941
- package/lib/index.js +195 -193
- package/lib/types.d.ts +33 -0
- package/lib/types.js +1 -0
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/lib/victory-accessible-group/victory-accessible-group.js +9 -15
- package/lib/victory-animation/util.d.ts +66 -0
- package/lib/victory-animation/util.js +2 -1
- package/lib/victory-animation/victory-animation.d.ts +69 -0
- package/lib/victory-animation/victory-animation.js +60 -65
- package/lib/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/lib/victory-clip-container/victory-clip-container.js +19 -22
- package/lib/victory-container/victory-container.d.ts +99 -0
- package/lib/victory-container/victory-container.js +34 -31
- package/lib/victory-label/victory-label.d.ts +61 -0
- package/lib/victory-label/victory-label.js +19 -13
- package/lib/victory-portal/portal-context.d.ts +11 -0
- package/lib/victory-portal/portal-context.js +3 -4
- package/lib/victory-portal/portal.d.ts +28 -0
- package/lib/victory-portal/portal.js +26 -31
- package/lib/victory-portal/victory-portal.d.ts +31 -0
- package/lib/victory-portal/victory-portal.js +24 -20
- package/lib/victory-primitives/arc.d.ts +21 -0
- package/lib/victory-primitives/arc.js +5 -6
- package/lib/victory-primitives/background.d.ts +22 -0
- package/lib/victory-primitives/background.js +7 -8
- package/lib/victory-primitives/border.d.ts +18 -0
- package/lib/victory-primitives/border.js +5 -6
- package/lib/victory-primitives/circle.d.ts +2 -0
- package/lib/victory-primitives/circle.js +11 -6
- package/lib/victory-primitives/clip-path.d.ts +14 -0
- package/lib/victory-primitives/clip-path.js +7 -5
- package/lib/victory-primitives/index.d.ts +14 -0
- package/lib/victory-primitives/index.js +187 -0
- package/lib/victory-primitives/line-segment.d.ts +19 -0
- package/lib/victory-primitives/line-segment.js +5 -6
- package/lib/victory-primitives/line.d.ts +2 -0
- package/lib/victory-primitives/line.js +11 -6
- package/lib/victory-primitives/path.d.ts +2 -0
- package/lib/victory-primitives/path.js +9 -4
- package/lib/victory-primitives/point.d.ts +21 -0
- package/lib/victory-primitives/point.js +13 -21
- package/lib/victory-primitives/rect.d.ts +2 -0
- package/lib/victory-primitives/rect.js +11 -6
- package/lib/victory-primitives/text.d.ts +16 -0
- package/lib/victory-primitives/text.js +8 -5
- package/lib/victory-primitives/tspan.d.ts +2 -0
- package/lib/victory-primitives/tspan.js +7 -4
- package/lib/victory-primitives/types.d.ts +7 -0
- package/lib/victory-primitives/types.js +1 -0
- package/lib/victory-primitives/whisker.d.ts +24 -0
- package/lib/victory-primitives/whisker.js +5 -6
- package/lib/victory-theme/grayscale.d.ts +2 -0
- package/lib/victory-theme/grayscale.js +3 -3
- package/lib/victory-theme/material.d.ts +2 -0
- package/lib/victory-theme/material.js +3 -3
- package/lib/victory-theme/victory-theme-definition.d.ts +244 -0
- package/lib/victory-theme/victory-theme-definition.js +1 -0
- package/lib/victory-theme/victory-theme.d.ts +5 -0
- package/lib/victory-theme/victory-theme.js +22 -8
- package/lib/victory-transition/victory-transition.d.ts +59 -0
- package/lib/victory-transition/victory-transition.js +21 -23
- package/lib/victory-util/add-events.js +8 -4
- package/lib/victory-util/collection.js +0 -2
- package/lib/victory-util/default-transitions.js +0 -1
- package/lib/victory-util/helpers.js +0 -2
- package/lib/victory-util/immutable.js +0 -2
- package/lib/victory-util/label-helpers.js +0 -2
- package/lib/victory-util/log.js +0 -1
- package/lib/victory-util/point-path-helpers.d.ts +9 -0
- package/lib/victory-util/point-path-helpers.js +86 -73
- package/lib/victory-util/selection.d.ts +23 -0
- package/lib/victory-util/selection.js +0 -2
- package/lib/victory-util/style.js +0 -2
- package/lib/victory-util/textsize.d.ts +8 -0
- package/lib/victory-util/timer-context.d.ts +11 -0
- package/lib/victory-util/timer.d.ts +16 -0
- package/lib/victory-util/timer.js +13 -8
- package/lib/victory-util/types.d.ts +188 -0
- package/lib/victory-util/types.js +1 -0
- package/package.json +4 -4
- package/src/index.ts +42 -0
- package/src/types.ts +45 -0
- package/src/victory-accessible-group/{victory-accessible-group.js → victory-accessible-group.tsx} +10 -3
- package/src/victory-animation/{util.js → util.ts} +4 -3
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +89 -12
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +29 -5
- package/src/victory-container/{victory-container.js → victory-container.tsx} +70 -26
- package/src/victory-label/{victory-label.js → victory-label.tsx} +71 -14
- package/src/victory-portal/portal-context.ts +14 -0
- package/src/victory-portal/{portal.js → portal.tsx} +23 -12
- package/src/victory-portal/{victory-portal.js → victory-portal.tsx} +21 -6
- package/src/victory-primitives/{arc.js → arc.tsx} +15 -5
- package/src/victory-primitives/{background.js → background.tsx} +17 -7
- package/src/victory-primitives/{border.js → border.tsx} +12 -5
- package/src/victory-primitives/{circle.js → circle.tsx} +4 -3
- package/src/victory-primitives/clip-path.tsx +25 -0
- package/src/victory-primitives/index.ts +14 -0
- package/src/victory-primitives/{line-segment.js → line-segment.tsx} +13 -5
- package/src/victory-primitives/{line.js → line.tsx} +4 -3
- package/src/victory-primitives/{path.js → path.tsx} +4 -3
- package/src/victory-primitives/{point.js → point.tsx} +25 -20
- package/src/victory-primitives/{rect.js → rect.tsx} +4 -2
- package/src/victory-primitives/{text.js → text.tsx} +9 -3
- package/src/victory-primitives/tspan.tsx +7 -0
- package/src/victory-primitives/types.ts +19 -0
- package/src/victory-primitives/{whisker.js → whisker.tsx} +20 -7
- package/src/victory-theme/{grayscale.js → grayscale.tsx} +2 -1
- package/src/victory-theme/{material.js → material.tsx} +2 -1
- package/src/victory-theme/victory-theme-definition.ts +261 -0
- package/src/victory-theme/victory-theme.tsx +5 -0
- package/src/victory-transition/{victory-transition.js → victory-transition.tsx} +68 -19
- package/src/victory-util/add-events.js +6 -1
- package/src/victory-util/axis.js +0 -1
- package/src/victory-util/collection.js +0 -1
- package/src/victory-util/data.js +0 -1
- package/src/victory-util/default-transitions.js +0 -1
- package/src/victory-util/domain.js +0 -1
- package/src/victory-util/events.js +1 -1
- package/src/victory-util/helpers.js +0 -1
- package/src/victory-util/immutable.js +0 -1
- package/src/victory-util/label-helpers.js +0 -1
- package/src/victory-util/log.js +0 -1
- package/src/victory-util/point-path-helpers.ts +119 -0
- package/src/victory-util/prop-types.js +0 -1
- package/src/victory-util/scale.js +0 -1
- package/src/victory-util/selection.d.ts +23 -0
- package/src/victory-util/selection.js +0 -1
- package/src/victory-util/style.js +0 -1
- package/src/victory-util/textsize.d.ts +8 -0
- package/src/victory-util/{timer-context.js → timer-context.ts} +0 -0
- package/src/victory-util/{timer.js → timer.ts} +19 -4
- package/src/victory-util/transitions.js +0 -1
- package/src/victory-util/types.ts +247 -0
- package/src/victory-util/wrapper.js +0 -1
- package/src/index.d.ts +0 -941
- package/src/index.js +0 -51
- package/src/victory-portal/portal-context.js +0 -10
- package/src/victory-primitives/clip-path.js +0 -18
- package/src/victory-primitives/tspan.js +0 -5
- package/src/victory-theme/victory-theme.js +0 -7
- package/src/victory-util/point-path-helpers.js +0 -121
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export var TSpan = function (props) {
|
|
3
|
+
return (
|
|
4
|
+
/*#__PURE__*/
|
|
5
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
6
|
+
React.createElement("tspan", props)
|
|
7
|
+
);
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
2
|
+
export declare type ScatterSymbolType = "circle" | "cross" | "diamond" | "plus" | "minus" | "square" | "star" | "triangleDown" | "triangleUp";
|
|
3
|
+
export interface VictoryPrimitiveShapeProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
desc?: string;
|
|
5
|
+
rx?: number;
|
|
6
|
+
ry?: number;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
export declare type WhiskerAxes = {
|
|
4
|
+
x1?: number;
|
|
5
|
+
x2?: number;
|
|
6
|
+
y1?: number;
|
|
7
|
+
y2?: number;
|
|
8
|
+
};
|
|
9
|
+
export interface WhiskerProps extends VictoryCommonPrimitiveProps {
|
|
10
|
+
groupComponent?: React.ReactElement;
|
|
11
|
+
lineComponent?: React.ReactElement;
|
|
12
|
+
majorWhisker?: WhiskerAxes;
|
|
13
|
+
minorWhisker?: WhiskerAxes;
|
|
14
|
+
}
|
|
15
|
+
export declare const Whisker: {
|
|
16
|
+
(props: WhiskerProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
propTypes: any;
|
|
18
|
+
defaultProps: {
|
|
19
|
+
groupComponent: JSX.Element;
|
|
20
|
+
lineComponent: JSX.Element;
|
|
21
|
+
role: string;
|
|
22
|
+
shapeRendering: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -10,7 +10,7 @@ import React from "react";
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import * as Helpers from "../victory-util/helpers";
|
|
12
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
13
|
-
import Line from "./line";
|
|
13
|
+
import { Line } from "./line";
|
|
14
14
|
|
|
15
15
|
var evaluateProps = function (props) {
|
|
16
16
|
/**
|
|
@@ -35,7 +35,7 @@ var evaluateProps = function (props) {
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
var Whisker = function (props) {
|
|
38
|
+
export var Whisker = function (props) {
|
|
39
39
|
props = evaluateProps(props);
|
|
40
40
|
var _props = props,
|
|
41
41
|
ariaLabel = _props.ariaLabel,
|
|
@@ -72,7 +72,6 @@ var Whisker = function (props) {
|
|
|
72
72
|
"aria-label": ariaLabel
|
|
73
73
|
}, baseProps, minorWhisker))]);
|
|
74
74
|
};
|
|
75
|
-
|
|
76
75
|
Whisker.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
77
76
|
groupComponent: PropTypes.element,
|
|
78
77
|
lineComponent: PropTypes.element,
|
|
@@ -94,5 +93,4 @@ Whisker.defaultProps = {
|
|
|
94
93
|
lineComponent: /*#__PURE__*/React.createElement(Line, null),
|
|
95
94
|
role: "presentation",
|
|
96
95
|
shapeRendering: "auto"
|
|
97
|
-
};
|
|
98
|
-
export default Whisker;
|
|
96
|
+
};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { VictoryCommonThemeProps, VictoryDatableProps } from "../index";
|
|
3
|
+
import { CallbackArgs, StringOrNumberOrCallback } from "../types";
|
|
4
|
+
export declare type BlockProps = {
|
|
5
|
+
top?: number;
|
|
6
|
+
bottom?: number;
|
|
7
|
+
left?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare type PaddingProps = number | BlockProps;
|
|
11
|
+
export declare type OrientationTypes = "top" | "bottom" | "left" | "right";
|
|
12
|
+
export declare type VictoryNumberCallback = (args: CallbackArgs) => number;
|
|
13
|
+
export declare type VictoryPaddingCallback = (args: CallbackArgs) => number | BlockProps;
|
|
14
|
+
export declare type VictoryOrientationCallback = (args: CallbackArgs) => OrientationTypes;
|
|
15
|
+
export declare type NumberOrCallback = number | VictoryNumberCallback;
|
|
16
|
+
export declare type PaddingOrCallback = number | BlockProps | VictoryPaddingCallback;
|
|
17
|
+
export declare type OrientationOrCallback = OrientationTypes | VictoryOrientationCallback;
|
|
18
|
+
export declare type VictoryStyleObject = {
|
|
19
|
+
[K in keyof React.CSSProperties]: StringOrNumberOrCallback;
|
|
20
|
+
};
|
|
21
|
+
export declare type LabelProps = React.CSSProperties & {
|
|
22
|
+
angle?: number;
|
|
23
|
+
verticalAnchor?: VerticalAnchorType;
|
|
24
|
+
};
|
|
25
|
+
export declare type VictoryLabelStyleObject = {
|
|
26
|
+
[K in keyof LabelProps]: StringOrNumberOrCallback;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Style interface used in components/themeing
|
|
30
|
+
*/
|
|
31
|
+
export interface VictoryStyleInterface {
|
|
32
|
+
parent?: VictoryStyleObject;
|
|
33
|
+
data?: VictoryStyleObject;
|
|
34
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
35
|
+
border?: VictoryStyleObject;
|
|
36
|
+
}
|
|
37
|
+
export declare type TickProps = React.CSSProperties & {
|
|
38
|
+
size?: number;
|
|
39
|
+
};
|
|
40
|
+
export declare type VictoryTickStyleObject = {
|
|
41
|
+
[K in keyof TickProps]: StringOrNumberOrCallback;
|
|
42
|
+
};
|
|
43
|
+
export interface VictoryAxisCommonProps {
|
|
44
|
+
axisComponent?: React.ReactElement;
|
|
45
|
+
axisLabelComponent?: React.ReactElement;
|
|
46
|
+
axisValue?: number | string | object | Date;
|
|
47
|
+
dependentAxis?: boolean;
|
|
48
|
+
disableInlineStyles?: boolean;
|
|
49
|
+
gridComponent?: React.ReactElement;
|
|
50
|
+
invertAxis?: boolean;
|
|
51
|
+
style?: {
|
|
52
|
+
parent?: VictoryStyleObject;
|
|
53
|
+
axis?: VictoryStyleObject;
|
|
54
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
55
|
+
grid?: VictoryStyleObject;
|
|
56
|
+
ticks?: VictoryTickStyleObject;
|
|
57
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
58
|
+
};
|
|
59
|
+
tickComponent?: React.ReactElement;
|
|
60
|
+
tickCount?: number;
|
|
61
|
+
tickLabelComponent?: React.ReactElement;
|
|
62
|
+
tickFormat?: any[] | {
|
|
63
|
+
(tick: any, index: number, ticks: any[]): string | number;
|
|
64
|
+
};
|
|
65
|
+
tickValues?: any[];
|
|
66
|
+
}
|
|
67
|
+
export declare type VerticalAnchorType = "start" | "middle" | "end";
|
|
68
|
+
export interface VictoryThemeDefinition {
|
|
69
|
+
area?: {
|
|
70
|
+
style?: {
|
|
71
|
+
data?: VictoryStyleObject;
|
|
72
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
73
|
+
};
|
|
74
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
75
|
+
axis?: {
|
|
76
|
+
style?: {
|
|
77
|
+
axis?: VictoryStyleObject;
|
|
78
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
79
|
+
grid?: VictoryStyleObject;
|
|
80
|
+
ticks?: VictoryTickStyleObject;
|
|
81
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
82
|
+
};
|
|
83
|
+
offsetX?: number;
|
|
84
|
+
offsetY?: number;
|
|
85
|
+
} & VictoryCommonThemeProps;
|
|
86
|
+
bar?: {
|
|
87
|
+
style?: {
|
|
88
|
+
data?: VictoryStyleObject;
|
|
89
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
90
|
+
};
|
|
91
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
92
|
+
boxplot?: {
|
|
93
|
+
style?: {
|
|
94
|
+
max?: VictoryStyleObject;
|
|
95
|
+
maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
96
|
+
median?: VictoryStyleObject;
|
|
97
|
+
medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
98
|
+
min?: VictoryStyleObject;
|
|
99
|
+
minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
100
|
+
q1?: VictoryStyleObject;
|
|
101
|
+
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
102
|
+
q3?: VictoryStyleObject;
|
|
103
|
+
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
104
|
+
};
|
|
105
|
+
boxWidth?: number;
|
|
106
|
+
} & VictoryCommonThemeProps;
|
|
107
|
+
candlestick?: {
|
|
108
|
+
style?: {
|
|
109
|
+
data?: VictoryStyleObject;
|
|
110
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
111
|
+
};
|
|
112
|
+
candleColors?: {
|
|
113
|
+
positive?: string;
|
|
114
|
+
negative?: string;
|
|
115
|
+
};
|
|
116
|
+
} & VictoryCommonThemeProps;
|
|
117
|
+
chart?: VictoryCommonThemeProps;
|
|
118
|
+
dependentAxis?: {
|
|
119
|
+
style?: {
|
|
120
|
+
axis?: VictoryStyleObject;
|
|
121
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
122
|
+
grid?: VictoryStyleObject;
|
|
123
|
+
ticks?: VictoryTickStyleObject;
|
|
124
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
125
|
+
};
|
|
126
|
+
offsetX?: number;
|
|
127
|
+
offsetY?: number;
|
|
128
|
+
orientation?: OrientationTypes;
|
|
129
|
+
} & VictoryCommonThemeProps;
|
|
130
|
+
errorbar?: {
|
|
131
|
+
borderWidth?: number;
|
|
132
|
+
style?: {
|
|
133
|
+
data?: VictoryStyleObject;
|
|
134
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
135
|
+
};
|
|
136
|
+
} & VictoryCommonThemeProps;
|
|
137
|
+
group?: {
|
|
138
|
+
style?: {
|
|
139
|
+
data?: VictoryStyleObject;
|
|
140
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
141
|
+
};
|
|
142
|
+
} & VictoryCommonThemeProps;
|
|
143
|
+
histogram?: {
|
|
144
|
+
style?: {
|
|
145
|
+
data?: VictoryStyleObject;
|
|
146
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
147
|
+
};
|
|
148
|
+
} & VictoryCommonThemeProps;
|
|
149
|
+
independentAxis?: {
|
|
150
|
+
style?: {
|
|
151
|
+
axis?: VictoryStyleObject;
|
|
152
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
153
|
+
grid?: VictoryStyleObject;
|
|
154
|
+
ticks?: VictoryTickStyleObject;
|
|
155
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
156
|
+
};
|
|
157
|
+
offsetX?: number;
|
|
158
|
+
offsetY?: number;
|
|
159
|
+
orientation?: OrientationTypes;
|
|
160
|
+
} & VictoryCommonThemeProps;
|
|
161
|
+
legend?: {
|
|
162
|
+
gutter?: number | BlockProps;
|
|
163
|
+
rowGutter?: number | BlockProps;
|
|
164
|
+
orientation?: string;
|
|
165
|
+
titleOrientation?: string;
|
|
166
|
+
style?: {
|
|
167
|
+
data?: VictoryStyleObject & {
|
|
168
|
+
type?: string;
|
|
169
|
+
};
|
|
170
|
+
border?: VictoryStyleObject;
|
|
171
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
172
|
+
title?: VictoryLabelStyleObject;
|
|
173
|
+
};
|
|
174
|
+
itemsPerRow?: number;
|
|
175
|
+
x?: number;
|
|
176
|
+
y?: number;
|
|
177
|
+
centerTitle?: boolean;
|
|
178
|
+
borderPadding?: number | BlockProps;
|
|
179
|
+
} & VictoryCommonThemeProps;
|
|
180
|
+
line?: {
|
|
181
|
+
style?: {
|
|
182
|
+
data?: VictoryStyleObject;
|
|
183
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
184
|
+
};
|
|
185
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
186
|
+
pie?: {
|
|
187
|
+
style?: {
|
|
188
|
+
data?: VictoryStyleObject;
|
|
189
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
190
|
+
};
|
|
191
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
192
|
+
polarAxis?: {
|
|
193
|
+
style?: {
|
|
194
|
+
axis?: VictoryStyleObject;
|
|
195
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
196
|
+
grid?: VictoryStyleObject;
|
|
197
|
+
ticks?: VictoryTickStyleObject;
|
|
198
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
199
|
+
};
|
|
200
|
+
} & VictoryCommonThemeProps;
|
|
201
|
+
polarDependentAxis?: {
|
|
202
|
+
style?: {
|
|
203
|
+
axis?: VictoryStyleObject;
|
|
204
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
205
|
+
grid?: VictoryStyleObject;
|
|
206
|
+
ticks?: VictoryTickStyleObject;
|
|
207
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
208
|
+
};
|
|
209
|
+
} & VictoryCommonThemeProps;
|
|
210
|
+
polarIndependentAxis?: {
|
|
211
|
+
style?: {
|
|
212
|
+
axis?: VictoryStyleObject;
|
|
213
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
214
|
+
grid?: VictoryStyleObject;
|
|
215
|
+
ticks?: VictoryTickStyleObject;
|
|
216
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
217
|
+
};
|
|
218
|
+
} & VictoryCommonThemeProps;
|
|
219
|
+
scatter?: {
|
|
220
|
+
style?: {
|
|
221
|
+
data?: VictoryStyleObject;
|
|
222
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
223
|
+
};
|
|
224
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
225
|
+
stack?: VictoryCommonThemeProps;
|
|
226
|
+
tooltip?: {
|
|
227
|
+
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
228
|
+
flyoutStyle?: VictoryStyleObject;
|
|
229
|
+
cornerRadius?: NumberOrCallback;
|
|
230
|
+
pointerLength?: NumberOrCallback;
|
|
231
|
+
flyoutPadding?: PaddingOrCallback;
|
|
232
|
+
flyoutWidth?: NumberOrCallback;
|
|
233
|
+
flyoutHeight?: NumberOrCallback;
|
|
234
|
+
orientation?: OrientationOrCallback;
|
|
235
|
+
pointerOrientation?: OrientationOrCallback;
|
|
236
|
+
};
|
|
237
|
+
voronoi?: {
|
|
238
|
+
style?: {
|
|
239
|
+
data?: VictoryStyleObject;
|
|
240
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
241
|
+
flyout?: VictoryStyleObject;
|
|
242
|
+
};
|
|
243
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
244
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
grayscale:
|
|
1
|
+
import { grayscale } from "./grayscale";
|
|
2
|
+
import { material } from "./material";
|
|
3
|
+
export * from "./victory-theme-definition";
|
|
4
|
+
export var VictoryTheme = {
|
|
5
|
+
grayscale: grayscale,
|
|
6
|
+
material: material
|
|
6
7
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import TimerContext from "../victory-util/timer-context";
|
|
4
|
+
import Timer from "../victory-util/timer";
|
|
5
|
+
declare type VictoryTransitionChild = React.ReactElement<{
|
|
6
|
+
polar?: boolean;
|
|
7
|
+
domain?: number[] | {
|
|
8
|
+
x: number[];
|
|
9
|
+
y: number[];
|
|
10
|
+
};
|
|
11
|
+
groupComponent?: React.ReactElement;
|
|
12
|
+
}, {
|
|
13
|
+
new (props: any): React.Component<any, any>;
|
|
14
|
+
continuous?: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
interface VictoryTransitionProps {
|
|
17
|
+
animate?: boolean | any;
|
|
18
|
+
animationWhitelist?: string[];
|
|
19
|
+
children: VictoryTransitionChild;
|
|
20
|
+
}
|
|
21
|
+
interface VictoryTransitionState {
|
|
22
|
+
oldProps?: VictoryTransitionProps | null;
|
|
23
|
+
nextProps?: VictoryTransitionProps;
|
|
24
|
+
nodesShouldLoad?: boolean;
|
|
25
|
+
nodesDoneLoad?: boolean;
|
|
26
|
+
nodesWillExit?: boolean;
|
|
27
|
+
nodesWillEnter?: boolean;
|
|
28
|
+
nodesShouldEnter?: boolean;
|
|
29
|
+
childrenTransitions?: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface VictoryTransition {
|
|
32
|
+
context: React.ContextType<typeof TimerContext>;
|
|
33
|
+
}
|
|
34
|
+
export declare class VictoryTransition extends React.Component<VictoryTransitionProps, VictoryTransitionState> {
|
|
35
|
+
static displayName: string;
|
|
36
|
+
static propTypes: {
|
|
37
|
+
animate: PropTypes.Requireable<boolean | object>;
|
|
38
|
+
animationWhitelist: PropTypes.Requireable<any[]>;
|
|
39
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
40
|
+
};
|
|
41
|
+
static contextType: React.Context<{
|
|
42
|
+
transitionTimer: Timer;
|
|
43
|
+
animationTimer: Timer;
|
|
44
|
+
}>;
|
|
45
|
+
private continuous;
|
|
46
|
+
private timer;
|
|
47
|
+
private transitionProps;
|
|
48
|
+
constructor(props: any, context: any);
|
|
49
|
+
componentDidMount(): void;
|
|
50
|
+
shouldComponentUpdate(nextProps: VictoryTransitionProps): boolean;
|
|
51
|
+
componentWillUnmount(): void;
|
|
52
|
+
private getTransitionState;
|
|
53
|
+
private getDomainFromChildren;
|
|
54
|
+
pickProps(): Readonly<VictoryTransitionProps>;
|
|
55
|
+
private pickDomainProps;
|
|
56
|
+
getClipWidth(props: any, child: any): any;
|
|
57
|
+
render(): JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _isObject from "lodash/isObject";
|
|
2
1
|
import _pick from "lodash/pick";
|
|
3
2
|
import _isFunction from "lodash/isFunction";
|
|
4
3
|
import _defaults from "lodash/defaults";
|
|
5
4
|
|
|
6
|
-
function _extends() { _extends = Object.assign
|
|
5
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
6
|
|
|
8
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
8
|
|
|
@@ -13,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
13
12
|
|
|
14
13
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
15
14
|
|
|
16
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
15
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
17
16
|
|
|
18
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
18
|
|
|
@@ -23,20 +22,17 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
23
22
|
|
|
24
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
24
|
|
|
26
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
-
|
|
28
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
26
|
|
|
30
27
|
import React from "react";
|
|
31
28
|
import PropTypes from "prop-types";
|
|
32
|
-
import VictoryAnimation from "../victory-animation/victory-animation";
|
|
29
|
+
import { VictoryAnimation } from "../victory-animation/victory-animation";
|
|
33
30
|
import * as Collection from "../victory-util/collection";
|
|
34
31
|
import * as Helpers from "../victory-util/helpers";
|
|
35
32
|
import TimerContext from "../victory-util/timer-context";
|
|
36
33
|
import * as Transitions from "../victory-util/transitions";
|
|
37
34
|
import isEqual from "react-fast-compare";
|
|
38
|
-
|
|
39
|
-
var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
35
|
+
export var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
40
36
|
_inherits(VictoryTransition, _React$Component);
|
|
41
37
|
|
|
42
38
|
var _super = _createSuper(VictoryTransition);
|
|
@@ -47,6 +43,9 @@ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
47
43
|
_classCallCheck(this, VictoryTransition);
|
|
48
44
|
|
|
49
45
|
_this = _super.call(this, props, context);
|
|
46
|
+
_this.continuous = void 0;
|
|
47
|
+
_this.timer = void 0;
|
|
48
|
+
_this.transitionProps = void 0;
|
|
50
49
|
_this.state = {
|
|
51
50
|
nodesShouldLoad: false,
|
|
52
51
|
nodesDoneLoad: false
|
|
@@ -54,7 +53,6 @@ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
54
53
|
var child = _this.props.children;
|
|
55
54
|
var polar = child.props.polar;
|
|
56
55
|
_this.continuous = !polar && child.type && child.type.continuous === true;
|
|
57
|
-
_this.getTransitionState = _this.getTransitionState.bind(_assertThisInitialized(_this));
|
|
58
56
|
_this.timer = _this.context.transitionTimer;
|
|
59
57
|
return _this;
|
|
60
58
|
}
|
|
@@ -158,10 +156,12 @@ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
158
156
|
}, {
|
|
159
157
|
key: "pickDomainProps",
|
|
160
158
|
value: function pickDomainProps(props) {
|
|
161
|
-
var
|
|
159
|
+
var _props$animate;
|
|
160
|
+
|
|
161
|
+
var parentState = (_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.parentState;
|
|
162
162
|
|
|
163
163
|
if (parentState && parentState.nodesWillExit) {
|
|
164
|
-
return this.
|
|
164
|
+
return this.continuous || parentState.continuous ? parentState.nextProps || this.state.nextProps || props : props;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
return this.continuous && this.state.nodesWillExit ? this.state.nextProps || props : props;
|
|
@@ -180,10 +180,11 @@ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
180
180
|
}, {
|
|
181
181
|
key: "render",
|
|
182
182
|
value: function render() {
|
|
183
|
-
var
|
|
183
|
+
var _this$props$animate,
|
|
184
|
+
_this3 = this;
|
|
184
185
|
|
|
185
186
|
var props = this.pickProps();
|
|
186
|
-
var getTransitionProps =
|
|
187
|
+
var getTransitionProps = (_this$props$animate = this.props.animate) !== null && _this$props$animate !== void 0 && _this$props$animate.getTransitions ? this.props.animate.getTransitions : Transitions.getTransitionPropsFactory(props, this.state, function (newState) {
|
|
187
188
|
return _this3.setState(newState);
|
|
188
189
|
});
|
|
189
190
|
var child = React.Children.toArray(props.children)[0];
|
|
@@ -227,15 +228,10 @@ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
227
228
|
|
|
228
229
|
return VictoryTransition;
|
|
229
230
|
}(React.Component);
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
_defineProperty(VictoryTransition, "propTypes", {
|
|
231
|
+
VictoryTransition.displayName = "VictoryTransition";
|
|
232
|
+
VictoryTransition.propTypes = {
|
|
234
233
|
animate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
235
234
|
animationWhitelist: PropTypes.array,
|
|
236
235
|
children: PropTypes.node
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
_defineProperty(VictoryTransition, "contextType", TimerContext);
|
|
240
|
-
|
|
241
|
-
export { VictoryTransition as default };
|
|
236
|
+
};
|
|
237
|
+
VictoryTransition.contextType = TimerContext;
|
|
@@ -28,7 +28,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
28
28
|
|
|
29
29
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
30
30
|
|
|
31
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
31
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
32
32
|
|
|
33
33
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
34
34
|
|
|
@@ -38,13 +38,16 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
38
38
|
|
|
39
39
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
40
40
|
|
|
41
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
42
|
|
|
43
43
|
/*global window:false */
|
|
44
44
|
import React from "react";
|
|
45
45
|
import * as Events from "./events";
|
|
46
46
|
import isEqual from "react-fast-compare";
|
|
47
|
-
import VictoryTransition from "../victory-transition/victory-transition";
|
|
47
|
+
import { VictoryTransition } from "../victory-transition/victory-transition"; // DISCLAIMER:
|
|
48
|
+
// This file is not currently tested, and it is first on the list of files
|
|
49
|
+
// to refactor in our current refactoring effort. Please do not make changes
|
|
50
|
+
// to this file without manual testing and/or refactoring and adding tests.
|
|
48
51
|
|
|
49
52
|
var datumHasXandY = function (datum) {
|
|
50
53
|
return !_isNil(datum._x) && !_isNil(datum._y);
|
package/es/victory-util/axis.js
CHANGED
|
@@ -23,7 +23,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
23
23
|
|
|
24
24
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
25
|
|
|
26
|
-
/* eslint-disable func-style */
|
|
27
26
|
import React from "react";
|
|
28
27
|
import * as Collection from "./collection";
|
|
29
28
|
import * as Domain from "./domain";
|
|
@@ -10,8 +10,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10
10
|
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
12
|
|
|
13
|
-
/* eslint-disable func-style */
|
|
14
|
-
|
|
15
13
|
/* eslint-disable no-use-before-define */
|
|
16
14
|
function isNonEmptyArray(collection) {
|
|
17
15
|
return Array.isArray(collection) && collection.length > 0;
|
package/es/victory-util/data.js
CHANGED
|
@@ -24,8 +24,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
24
24
|
|
|
25
25
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
26
26
|
|
|
27
|
-
/* eslint-disable func-style */
|
|
28
|
-
|
|
29
27
|
/* eslint-disable no-use-before-define */
|
|
30
28
|
import React from "react";
|
|
31
29
|
import * as Helpers from "./helpers";
|
|
@@ -17,8 +17,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
17
17
|
|
|
18
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
19
19
|
|
|
20
|
-
/* eslint-disable func-style */
|
|
21
|
-
|
|
22
20
|
/* eslint-disable no-use-before-define */
|
|
23
21
|
import React from "react";
|
|
24
22
|
import * as Data from "./data";
|
package/es/victory-util/log.js
CHANGED