victory-core 36.3.2 → 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 +15084 -15018
- 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 +35 -45
- package/es/victory-animation/util.d.ts +66 -0
- package/es/victory-animation/util.js +3 -2
- package/es/victory-animation/victory-animation.d.ts +69 -0
- package/es/victory-animation/victory-animation.js +92 -102
- package/es/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/es/victory-clip-container/victory-clip-container.js +75 -82
- package/es/victory-container/victory-container.d.ts +99 -0
- package/es/victory-container/victory-container.js +97 -107
- package/es/victory-label/victory-label.d.ts +61 -0
- package/es/victory-label/victory-label.js +43 -31
- 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 +44 -50
- package/es/victory-portal/victory-portal.d.ts +31 -0
- package/es/victory-portal/victory-portal.js +38 -47
- package/es/victory-primitives/arc.d.ts +21 -0
- package/es/victory-primitives/arc.js +9 -9
- package/es/victory-primitives/background.d.ts +22 -0
- package/es/victory-primitives/background.js +12 -12
- package/es/victory-primitives/border.d.ts +18 -0
- package/es/victory-primitives/border.js +9 -9
- package/es/victory-primitives/circle.d.ts +2 -0
- package/es/victory-primitives/circle.js +17 -10
- 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 +9 -9
- package/es/victory-primitives/line.d.ts +2 -0
- package/es/victory-primitives/line.js +17 -10
- package/es/victory-primitives/path.d.ts +2 -0
- package/es/victory-primitives/path.js +15 -8
- package/es/victory-primitives/point.d.ts +21 -0
- package/es/victory-primitives/point.js +15 -23
- package/es/victory-primitives/rect.d.ts +2 -0
- package/es/victory-primitives/rect.js +17 -10
- package/es/victory-primitives/text.d.ts +16 -0
- package/es/victory-primitives/text.js +13 -8
- 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 +12 -12
- 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 +38 -44
- package/es/victory-util/add-events.js +328 -319
- package/es/victory-util/axis.js +12 -6
- package/es/victory-util/collection.js +7 -5
- package/es/victory-util/common-props.js +2 -2
- package/es/victory-util/data.js +8 -6
- package/es/victory-util/default-transitions.js +0 -1
- package/es/victory-util/domain.js +7 -5
- package/es/victory-util/events.js +8 -4
- package/es/victory-util/helpers.js +1 -3
- package/es/victory-util/hooks/use-animation-state.js +11 -5
- package/es/victory-util/immutable.js +0 -1
- package/es/victory-util/label-helpers.js +0 -2
- package/es/victory-util/line-helpers.js +1 -1
- 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/scale.js +19 -19
- 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/textsize.js +11 -7
- package/es/victory-util/timer-context.d.ts +11 -0
- package/es/victory-util/timer-context.js +1 -1
- package/es/victory-util/timer.d.ts +16 -0
- package/es/victory-util/timer.js +16 -13
- package/es/victory-util/types.d.ts +188 -0
- package/es/victory-util/types.js +1 -0
- package/es/victory-util/user-props.js +44 -4
- package/es/victory-util/wrapper.js +18 -12
- package/lib/index.d.ts +38 -941
- package/lib/index.js +201 -189
- 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 +37 -45
- package/lib/victory-animation/util.d.ts +66 -0
- package/lib/victory-animation/util.js +4 -3
- package/lib/victory-animation/victory-animation.d.ts +69 -0
- package/lib/victory-animation/victory-animation.js +97 -102
- package/lib/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/lib/victory-clip-container/victory-clip-container.js +81 -82
- package/lib/victory-container/victory-container.d.ts +99 -0
- package/lib/victory-container/victory-container.js +102 -107
- package/lib/victory-label/victory-label.d.ts +61 -0
- package/lib/victory-label/victory-label.js +49 -32
- package/lib/victory-portal/portal-context.d.ts +11 -0
- package/lib/victory-portal/portal-context.js +4 -5
- package/lib/victory-portal/portal.d.ts +28 -0
- package/lib/victory-portal/portal.js +49 -50
- package/lib/victory-portal/victory-portal.d.ts +31 -0
- package/lib/victory-portal/victory-portal.js +43 -47
- package/lib/victory-primitives/arc.d.ts +21 -0
- package/lib/victory-primitives/arc.js +13 -10
- package/lib/victory-primitives/background.d.ts +22 -0
- package/lib/victory-primitives/background.js +16 -13
- package/lib/victory-primitives/border.d.ts +18 -0
- package/lib/victory-primitives/border.js +13 -10
- package/lib/victory-primitives/circle.d.ts +2 -0
- package/lib/victory-primitives/circle.js +17 -8
- 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 +13 -10
- package/lib/victory-primitives/line.d.ts +2 -0
- package/lib/victory-primitives/line.js +17 -8
- package/lib/victory-primitives/path.d.ts +2 -0
- package/lib/victory-primitives/path.js +15 -6
- package/lib/victory-primitives/point.d.ts +21 -0
- package/lib/victory-primitives/point.js +21 -25
- package/lib/victory-primitives/rect.d.ts +2 -0
- package/lib/victory-primitives/rect.js +17 -8
- package/lib/victory-primitives/text.d.ts +16 -0
- package/lib/victory-primitives/text.js +14 -7
- 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 +16 -13
- 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 +43 -45
- package/lib/victory-util/add-events.js +326 -316
- package/lib/victory-util/axis.js +20 -11
- package/lib/victory-util/collection.js +10 -8
- package/lib/victory-util/common-props.js +6 -4
- package/lib/victory-util/data.js +13 -7
- package/lib/victory-util/default-transitions.js +1 -2
- package/lib/victory-util/domain.js +11 -5
- package/lib/victory-util/events.js +17 -11
- package/lib/victory-util/helpers.js +14 -16
- package/lib/victory-util/hooks/index.js +4 -4
- package/lib/victory-util/hooks/use-animation-state.js +14 -6
- package/lib/victory-util/immutable.js +3 -5
- package/lib/victory-util/label-helpers.js +6 -6
- package/lib/victory-util/line-helpers.js +4 -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/prop-types.js +5 -3
- package/lib/victory-util/scale.js +24 -21
- package/lib/victory-util/selection.d.ts +23 -0
- package/lib/victory-util/selection.js +5 -5
- package/lib/victory-util/style.js +0 -2
- package/lib/victory-util/textsize.d.ts +8 -0
- package/lib/victory-util/textsize.js +12 -8
- package/lib/victory-util/timer-context.d.ts +11 -0
- package/lib/victory-util/timer-context.js +1 -1
- package/lib/victory-util/timer.d.ts +16 -0
- package/lib/victory-util/timer.js +16 -13
- package/lib/victory-util/types.d.ts +188 -0
- package/lib/victory-util/types.js +1 -0
- package/lib/victory-util/user-props.js +53 -6
- package/lib/victory-util/wrapper.js +31 -23
- package/package.json +6 -13
- 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} +5 -4
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +90 -13
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +32 -6
- package/src/victory-container/{victory-container.js → victory-container.tsx} +70 -26
- package/src/victory-label/{victory-label.js → victory-label.tsx} +80 -19
- 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 +7 -5
- package/src/victory-util/axis.js +3 -1
- package/src/victory-util/collection.js +0 -1
- package/src/victory-util/common-props.js +2 -2
- 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/line-helpers.js +1 -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 +18 -10
- 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} +20 -5
- package/src/victory-util/transitions.js +0 -1
- package/src/victory-util/types.ts +247 -0
- package/src/victory-util/user-props.js +31 -1
- 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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./arc";
|
|
2
|
+
export * from "./background";
|
|
3
|
+
export * from "./border";
|
|
4
|
+
export * from "./circle";
|
|
5
|
+
export * from "./clip-path";
|
|
6
|
+
export * from "./line";
|
|
7
|
+
export * from "./line-segment";
|
|
8
|
+
export * from "./path";
|
|
9
|
+
export * from "./point";
|
|
10
|
+
export * from "./rect";
|
|
11
|
+
export * from "./text";
|
|
12
|
+
export * from "./tspan";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
export * from "./whisker";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./arc";
|
|
2
|
+
export * from "./background";
|
|
3
|
+
export * from "./border";
|
|
4
|
+
export * from "./circle";
|
|
5
|
+
export * from "./clip-path";
|
|
6
|
+
export * from "./line";
|
|
7
|
+
export * from "./line-segment";
|
|
8
|
+
export * from "./path";
|
|
9
|
+
export * from "./point";
|
|
10
|
+
export * from "./rect";
|
|
11
|
+
export * from "./text";
|
|
12
|
+
export * from "./tspan";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
export * from "./whisker";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
export interface LineSegmentProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
datum?: any;
|
|
5
|
+
lineComponent?: React.ReactElement;
|
|
6
|
+
x1?: number;
|
|
7
|
+
x2?: number;
|
|
8
|
+
y1?: number;
|
|
9
|
+
y2?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const LineSegment: {
|
|
12
|
+
(props: LineSegmentProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
propTypes: any;
|
|
14
|
+
defaultProps: {
|
|
15
|
+
lineComponent: JSX.Element;
|
|
16
|
+
role: string;
|
|
17
|
+
shapeRendering: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
|
|
5
7
|
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; }
|
|
6
8
|
|
|
@@ -8,7 +10,7 @@ import React from "react";
|
|
|
8
10
|
import PropTypes from "prop-types";
|
|
9
11
|
import * as Helpers from "../victory-util/helpers";
|
|
10
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
11
|
-
import Line from "./line";
|
|
13
|
+
import { Line } from "./line";
|
|
12
14
|
|
|
13
15
|
var evaluateProps = function (props) {
|
|
14
16
|
/**
|
|
@@ -35,9 +37,9 @@ var evaluateProps = function (props) {
|
|
|
35
37
|
});
|
|
36
38
|
};
|
|
37
39
|
|
|
38
|
-
var LineSegment = function (props) {
|
|
40
|
+
export var LineSegment = function (props) {
|
|
39
41
|
props = evaluateProps(props);
|
|
40
|
-
return React.cloneElement(props.lineComponent, _objectSpread({}, props.events, {
|
|
42
|
+
return /*#__PURE__*/React.cloneElement(props.lineComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
41
43
|
"aria-label": props.ariaLabel,
|
|
42
44
|
style: props.style,
|
|
43
45
|
desc: props.desc,
|
|
@@ -53,8 +55,7 @@ var LineSegment = function (props) {
|
|
|
53
55
|
clipPath: props.clipPath
|
|
54
56
|
}));
|
|
55
57
|
};
|
|
56
|
-
|
|
57
|
-
LineSegment.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
58
|
+
LineSegment.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
58
59
|
datum: PropTypes.any,
|
|
59
60
|
lineComponent: PropTypes.element,
|
|
60
61
|
x1: PropTypes.number,
|
|
@@ -63,8 +64,7 @@ LineSegment.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
|
63
64
|
y2: PropTypes.number
|
|
64
65
|
});
|
|
65
66
|
LineSegment.defaultProps = {
|
|
66
|
-
lineComponent: React.createElement(Line, null),
|
|
67
|
+
lineComponent: /*#__PURE__*/React.createElement(Line, null),
|
|
67
68
|
role: "presentation",
|
|
68
69
|
shapeRendering: "auto"
|
|
69
|
-
};
|
|
70
|
-
export default LineSegment;
|
|
70
|
+
};
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
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); }
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
import React from "react";
|
|
10
|
+
export var Line = function (props) {
|
|
8
11
|
// eslint-disable-next-line react/prop-types
|
|
9
12
|
var desc = props.desc,
|
|
10
|
-
rest = _objectWithoutProperties(props,
|
|
13
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
11
14
|
|
|
12
|
-
return desc ?
|
|
15
|
+
return desc ?
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("line", _extends({
|
|
13
19
|
vectorEffect: "non-scaling-stroke"
|
|
14
|
-
}, rest), React.createElement("desc", null, desc)) :
|
|
20
|
+
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
23
|
+
React.createElement("line", _extends({
|
|
15
24
|
vectorEffect: "non-scaling-stroke"
|
|
16
25
|
}, rest));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default Line;
|
|
26
|
+
};
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
import React from "react";
|
|
8
|
+
export var Path = function (props) {
|
|
6
9
|
// eslint-disable-next-line react/prop-types
|
|
7
10
|
var desc = props.desc,
|
|
8
|
-
rest = _objectWithoutProperties(props,
|
|
9
|
-
|
|
10
|
-
return desc ? React.createElement("path", rest, React.createElement("desc", null, desc)) : React.createElement("path", rest);
|
|
11
|
-
};
|
|
11
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
return desc ?
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
16
|
+
React.createElement("path", rest, /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
17
|
+
/*#__PURE__*/
|
|
18
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
19
|
+
React.createElement("path", rest);
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
3
|
+
import { ScatterSymbolType } from "./types";
|
|
4
|
+
export interface PointProps extends VictoryCommonPrimitiveProps {
|
|
5
|
+
datum?: any;
|
|
6
|
+
getPath?: (x: number, y: number, size: number) => string;
|
|
7
|
+
pathComponent?: React.ReactElement;
|
|
8
|
+
size?: number | Function;
|
|
9
|
+
symbol?: ScatterSymbolType | Function;
|
|
10
|
+
x?: number;
|
|
11
|
+
y?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const Point: {
|
|
14
|
+
(props: PointProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
propTypes: any;
|
|
16
|
+
defaultProps: {
|
|
17
|
+
pathComponent: JSX.Element;
|
|
18
|
+
role: string;
|
|
19
|
+
shapeRendering: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
|
|
5
7
|
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; }
|
|
6
8
|
|
|
7
|
-
import React from "react";
|
|
8
9
|
import PropTypes from "prop-types";
|
|
10
|
+
import React from "react";
|
|
9
11
|
import * as Helpers from "../victory-util/helpers";
|
|
10
|
-
import pathHelpers from "../victory-util/point-path-helpers";
|
|
12
|
+
import * as pathHelpers from "../victory-util/point-path-helpers";
|
|
11
13
|
import * as CommonProps from "../victory-util/common-props";
|
|
12
|
-
import
|
|
14
|
+
import * as UserProps from "../victory-util/user-props";
|
|
15
|
+
import { Path } from "./path";
|
|
13
16
|
|
|
14
17
|
var getPath = function (props) {
|
|
15
18
|
var x = props.x,
|
|
@@ -21,17 +24,7 @@ var getPath = function (props) {
|
|
|
21
24
|
return props.getPath(x, y, size);
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
var pathFunctions =
|
|
25
|
-
circle: pathHelpers.circle,
|
|
26
|
-
square: pathHelpers.square,
|
|
27
|
-
diamond: pathHelpers.diamond,
|
|
28
|
-
triangleDown: pathHelpers.triangleDown,
|
|
29
|
-
triangleUp: pathHelpers.triangleUp,
|
|
30
|
-
plus: pathHelpers.plus,
|
|
31
|
-
minus: pathHelpers.minus,
|
|
32
|
-
star: pathHelpers.star,
|
|
33
|
-
cross: pathHelpers.cross
|
|
34
|
-
};
|
|
27
|
+
var pathFunctions = pathHelpers;
|
|
35
28
|
var symbolFunction = typeof pathFunctions[symbol] === "function" ? pathFunctions[symbol] : pathFunctions.circle;
|
|
36
29
|
return symbolFunction(x, y, size);
|
|
37
30
|
};
|
|
@@ -65,9 +58,10 @@ var evaluateProps = function (props) {
|
|
|
65
58
|
});
|
|
66
59
|
};
|
|
67
60
|
|
|
68
|
-
var Point = function (props) {
|
|
61
|
+
export var Point = function (props) {
|
|
69
62
|
props = evaluateProps(props);
|
|
70
|
-
|
|
63
|
+
var userProps = UserProps.getSafeUserProps(props);
|
|
64
|
+
return /*#__PURE__*/React.cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
71
65
|
"aria-label": props.ariaLabel,
|
|
72
66
|
d: getPath(props),
|
|
73
67
|
style: props.style,
|
|
@@ -78,10 +72,9 @@ var Point = function (props) {
|
|
|
78
72
|
className: props.className,
|
|
79
73
|
transform: props.transform,
|
|
80
74
|
clipPath: props.clipPath
|
|
81
|
-
}));
|
|
75
|
+
}, userProps));
|
|
82
76
|
};
|
|
83
|
-
|
|
84
|
-
Point.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
77
|
+
Point.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
85
78
|
datum: PropTypes.object,
|
|
86
79
|
getPath: PropTypes.func,
|
|
87
80
|
pathComponent: PropTypes.element,
|
|
@@ -91,8 +84,7 @@ Point.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
|
91
84
|
y: PropTypes.number
|
|
92
85
|
});
|
|
93
86
|
Point.defaultProps = {
|
|
94
|
-
pathComponent: React.createElement(Path, null),
|
|
87
|
+
pathComponent: /*#__PURE__*/React.createElement(Path, null),
|
|
95
88
|
role: "presentation",
|
|
96
89
|
shapeRendering: "auto"
|
|
97
|
-
};
|
|
98
|
-
export default Point;
|
|
90
|
+
};
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["desc"];
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
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); }
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
import React from "react";
|
|
10
|
+
export var Rect = function (props) {
|
|
8
11
|
// eslint-disable-next-line react/prop-types
|
|
9
12
|
var desc = props.desc,
|
|
10
|
-
rest = _objectWithoutProperties(props,
|
|
13
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
11
14
|
|
|
12
|
-
return desc ?
|
|
15
|
+
return desc ?
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("rect", _extends({
|
|
13
19
|
vectorEffect: "non-scaling-stroke"
|
|
14
|
-
}, rest), React.createElement("desc", null, desc)) :
|
|
20
|
+
}, rest), /*#__PURE__*/React.createElement("desc", null, desc)) :
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
23
|
+
React.createElement("rect", _extends({
|
|
15
24
|
vectorEffect: "non-scaling-stroke"
|
|
16
25
|
}, rest));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default Rect;
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { VictoryCommonPrimitiveProps } from "../victory-util/types";
|
|
4
|
+
export interface TextProps extends VictoryCommonPrimitiveProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
desc?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Text: {
|
|
10
|
+
(props: TextProps): JSX.Element;
|
|
11
|
+
propTypes: {
|
|
12
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
+
desc: PropTypes.Requireable<string>;
|
|
14
|
+
title: PropTypes.Requireable<string>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["children", "title", "desc"];
|
|
2
|
+
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
6
|
|
|
3
7
|
import React from "react";
|
|
4
8
|
import PropTypes from "prop-types";
|
|
5
|
-
|
|
6
|
-
var Text = function (props) {
|
|
9
|
+
export var Text = function (props) {
|
|
7
10
|
var children = props.children,
|
|
8
11
|
title = props.title,
|
|
9
12
|
desc = props.desc,
|
|
10
|
-
rest = _objectWithoutProperties(props,
|
|
13
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
11
14
|
|
|
12
|
-
return
|
|
15
|
+
return (
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// @ts-expect-error FIXME: "id cannot be a number"
|
|
18
|
+
React.createElement("text", rest, title && /*#__PURE__*/React.createElement("title", null, title), desc && /*#__PURE__*/React.createElement("desc", null, desc), children)
|
|
19
|
+
);
|
|
13
20
|
};
|
|
14
|
-
|
|
15
21
|
Text.propTypes = {
|
|
16
22
|
children: PropTypes.node,
|
|
17
23
|
desc: PropTypes.string,
|
|
18
24
|
title: PropTypes.string
|
|
19
|
-
};
|
|
20
|
-
export default Text;
|
|
25
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
6
|
|
|
5
7
|
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; }
|
|
6
8
|
|
|
@@ -8,7 +10,7 @@ import React from "react";
|
|
|
8
10
|
import PropTypes from "prop-types";
|
|
9
11
|
import * as Helpers from "../victory-util/helpers";
|
|
10
12
|
import * as CommonProps from "../victory-util/common-props";
|
|
11
|
-
import Line from "./line";
|
|
13
|
+
import { Line } from "./line";
|
|
12
14
|
|
|
13
15
|
var evaluateProps = function (props) {
|
|
14
16
|
/**
|
|
@@ -33,7 +35,7 @@ var evaluateProps = function (props) {
|
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
37
|
|
|
36
|
-
var Whisker = function (props) {
|
|
38
|
+
export var Whisker = function (props) {
|
|
37
39
|
props = evaluateProps(props);
|
|
38
40
|
var _props = props,
|
|
39
41
|
ariaLabel = _props.ariaLabel,
|
|
@@ -51,7 +53,7 @@ var Whisker = function (props) {
|
|
|
51
53
|
desc = _props.desc,
|
|
52
54
|
tabIndex = _props.tabIndex;
|
|
53
55
|
|
|
54
|
-
var baseProps = _objectSpread({}, events, {
|
|
56
|
+
var baseProps = _objectSpread(_objectSpread({}, events), {}, {
|
|
55
57
|
style: style,
|
|
56
58
|
desc: desc,
|
|
57
59
|
tabIndex: tabIndex,
|
|
@@ -62,16 +64,15 @@ var Whisker = function (props) {
|
|
|
62
64
|
shapeRendering: shapeRendering
|
|
63
65
|
});
|
|
64
66
|
|
|
65
|
-
return React.cloneElement(groupComponent, {}, [React.cloneElement(lineComponent, _assign({
|
|
67
|
+
return /*#__PURE__*/React.cloneElement(groupComponent, {}, [/*#__PURE__*/React.cloneElement(lineComponent, _assign({
|
|
66
68
|
key: "major-whisker",
|
|
67
69
|
"aria-label": ariaLabel
|
|
68
|
-
}, baseProps, majorWhisker)), React.cloneElement(lineComponent, _assign({
|
|
70
|
+
}, baseProps, majorWhisker)), /*#__PURE__*/React.cloneElement(lineComponent, _assign({
|
|
69
71
|
key: "minor-whisker",
|
|
70
72
|
"aria-label": ariaLabel
|
|
71
73
|
}, baseProps, minorWhisker))]);
|
|
72
74
|
};
|
|
73
|
-
|
|
74
|
-
Whisker.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
75
|
+
Whisker.propTypes = _objectSpread(_objectSpread({}, CommonProps.primitiveProps), {}, {
|
|
75
76
|
groupComponent: PropTypes.element,
|
|
76
77
|
lineComponent: PropTypes.element,
|
|
77
78
|
majorWhisker: PropTypes.shape({
|
|
@@ -88,9 +89,8 @@ Whisker.propTypes = _objectSpread({}, CommonProps.primitiveProps, {
|
|
|
88
89
|
})
|
|
89
90
|
});
|
|
90
91
|
Whisker.defaultProps = {
|
|
91
|
-
groupComponent: React.createElement("g", null),
|
|
92
|
-
lineComponent: React.createElement(Line, null),
|
|
92
|
+
groupComponent: /*#__PURE__*/React.createElement("g", null),
|
|
93
|
+
lineComponent: /*#__PURE__*/React.createElement(Line, null),
|
|
93
94
|
role: "presentation",
|
|
94
95
|
shapeRendering: "auto"
|
|
95
|
-
};
|
|
96
|
-
export default Whisker;
|
|
96
|
+
};
|