victory-core 36.3.2 → 36.4.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 +14175 -14191
- package/dist/victory-core.min.js +1 -1
- package/es/victory-accessible-group/victory-accessible-group.js +38 -40
- package/es/victory-animation/util.js +1 -1
- package/es/victory-animation/victory-animation.js +46 -48
- package/es/victory-clip-container/victory-clip-container.js +71 -73
- package/es/victory-container/victory-container.js +82 -92
- package/es/victory-label/victory-label.js +29 -24
- package/es/victory-portal/portal-context.js +1 -1
- package/es/victory-portal/portal.js +28 -26
- package/es/victory-portal/victory-portal.js +31 -41
- package/es/victory-primitives/arc.js +6 -4
- package/es/victory-primitives/background.js +8 -6
- package/es/victory-primitives/border.js +6 -4
- package/es/victory-primitives/circle.js +8 -4
- package/es/victory-primitives/clip-path.js +1 -1
- package/es/victory-primitives/line-segment.js +6 -4
- package/es/victory-primitives/line.js +8 -4
- package/es/victory-primitives/path.js +7 -3
- package/es/victory-primitives/point.js +6 -4
- package/es/victory-primitives/rect.js +8 -4
- package/es/victory-primitives/text.js +7 -3
- package/es/victory-primitives/tspan.js +1 -1
- package/es/victory-primitives/whisker.js +9 -7
- package/es/victory-transition/victory-transition.js +30 -32
- package/es/victory-util/add-events.js +326 -317
- package/es/victory-util/axis.js +12 -5
- package/es/victory-util/collection.js +8 -4
- package/es/victory-util/data.js +9 -5
- package/es/victory-util/domain.js +8 -4
- package/es/victory-util/events.js +8 -4
- package/es/victory-util/helpers.js +1 -1
- package/es/victory-util/hooks/use-animation-state.js +11 -5
- package/es/victory-util/line-helpers.js +1 -1
- package/es/victory-util/scale.js +19 -19
- package/es/victory-util/textsize.js +11 -7
- package/es/victory-util/timer-context.js +1 -1
- package/es/victory-util/timer.js +3 -5
- package/es/victory-util/user-props.js +31 -4
- package/es/victory-util/wrapper.js +18 -12
- package/lib/index.js +68 -58
- package/lib/victory-accessible-group/victory-accessible-group.js +38 -40
- package/lib/victory-animation/util.js +2 -2
- package/lib/victory-animation/victory-animation.js +49 -49
- package/lib/victory-clip-container/victory-clip-container.js +74 -74
- package/lib/victory-container/victory-container.js +85 -93
- package/lib/victory-label/victory-label.js +35 -27
- package/lib/victory-portal/portal-context.js +1 -1
- package/lib/victory-portal/portal.js +31 -27
- package/lib/victory-portal/victory-portal.js +34 -42
- package/lib/victory-primitives/arc.js +9 -5
- package/lib/victory-primitives/background.js +11 -7
- package/lib/victory-primitives/border.js +9 -5
- package/lib/victory-primitives/circle.js +8 -4
- package/lib/victory-primitives/clip-path.js +1 -1
- package/lib/victory-primitives/line-segment.js +9 -5
- package/lib/victory-primitives/line.js +8 -4
- package/lib/victory-primitives/path.js +7 -3
- package/lib/victory-primitives/point.js +9 -5
- package/lib/victory-primitives/rect.js +8 -4
- package/lib/victory-primitives/text.js +7 -3
- package/lib/victory-primitives/tspan.js +1 -1
- package/lib/victory-primitives/whisker.js +12 -8
- package/lib/victory-transition/victory-transition.js +33 -33
- package/lib/victory-util/add-events.js +325 -313
- package/lib/victory-util/axis.js +20 -11
- package/lib/victory-util/collection.js +11 -7
- package/lib/victory-util/common-props.js +4 -2
- package/lib/victory-util/data.js +13 -7
- package/lib/victory-util/default-transitions.js +1 -1
- package/lib/victory-util/domain.js +11 -5
- package/lib/victory-util/events.js +17 -11
- package/lib/victory-util/helpers.js +14 -14
- 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 -3
- package/lib/victory-util/label-helpers.js +6 -4
- package/lib/victory-util/line-helpers.js +4 -2
- package/lib/victory-util/prop-types.js +5 -3
- package/lib/victory-util/scale.js +24 -21
- package/lib/victory-util/selection.js +6 -4
- package/lib/victory-util/textsize.js +12 -8
- package/lib/victory-util/timer-context.js +1 -1
- package/lib/victory-util/timer.js +3 -5
- package/lib/victory-util/user-props.js +31 -4
- package/lib/victory-util/wrapper.js +31 -23
- package/package.json +4 -11
- package/src/victory-animation/util.js +1 -1
- package/src/victory-animation/victory-animation.js +1 -1
- package/src/victory-label/victory-label.js +6 -6
- package/src/victory-util/axis.js +3 -0
- package/src/victory-util/line-helpers.js +1 -1
- package/src/victory-util/scale.js +18 -9
- package/src/victory-util/timer.js +1 -1
- package/src/victory-util/user-props.js +18 -1
|
@@ -2,45 +2,55 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
2
2
|
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
4
|
|
|
5
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
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); }
|
|
8
|
+
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
|
|
11
|
+
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); }; }
|
|
12
|
+
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
8
14
|
|
|
9
15
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10
16
|
|
|
11
|
-
function
|
|
17
|
+
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; } }
|
|
18
|
+
|
|
19
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
+
|
|
21
|
+
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; }
|
|
12
22
|
|
|
13
23
|
import React from "react";
|
|
14
24
|
import PropTypes from "prop-types";
|
|
15
25
|
|
|
16
|
-
var VictoryAccessibleGroup =
|
|
17
|
-
/*#__PURE__*/
|
|
18
|
-
function (_React$Component) {
|
|
26
|
+
var VictoryAccessibleGroup = /*#__PURE__*/function (_React$Component) {
|
|
19
27
|
_inherits(VictoryAccessibleGroup, _React$Component);
|
|
20
28
|
|
|
29
|
+
var _super = _createSuper(VictoryAccessibleGroup);
|
|
30
|
+
|
|
21
31
|
function VictoryAccessibleGroup() {
|
|
22
32
|
_classCallCheck(this, VictoryAccessibleGroup);
|
|
23
33
|
|
|
24
|
-
return
|
|
34
|
+
return _super.apply(this, arguments);
|
|
25
35
|
}
|
|
26
36
|
|
|
27
37
|
_createClass(VictoryAccessibleGroup, [{
|
|
28
38
|
key: "render",
|
|
29
39
|
value: function render() {
|
|
30
|
-
var
|
|
31
|
-
desc =
|
|
32
|
-
children =
|
|
33
|
-
className =
|
|
34
|
-
tabIndex =
|
|
40
|
+
var _this$props = this.props,
|
|
41
|
+
desc = _this$props.desc,
|
|
42
|
+
children = _this$props.children,
|
|
43
|
+
className = _this$props.className,
|
|
44
|
+
tabIndex = _this$props.tabIndex;
|
|
35
45
|
var descId = desc && (this.props["aria-describedby"] || desc.split(" ").join("-"));
|
|
36
|
-
return desc ? React.createElement("g", {
|
|
46
|
+
return desc ? /*#__PURE__*/React.createElement("g", {
|
|
37
47
|
"aria-label": this.props["aria-label"],
|
|
38
48
|
"aria-describedby": descId,
|
|
39
49
|
className: className,
|
|
40
50
|
tabIndex: tabIndex
|
|
41
|
-
}, React.createElement("desc", {
|
|
51
|
+
}, /*#__PURE__*/React.createElement("desc", {
|
|
42
52
|
id: descId
|
|
43
|
-
}, desc), children) : React.createElement("g", {
|
|
53
|
+
}, desc), children) : /*#__PURE__*/React.createElement("g", {
|
|
44
54
|
"aria-label": this.props["aria-label"],
|
|
45
55
|
"aria-describedby": this.props["aria-describedby"],
|
|
46
56
|
className: className,
|
|
@@ -52,31 +62,19 @@ function (_React$Component) {
|
|
|
52
62
|
return VictoryAccessibleGroup;
|
|
53
63
|
}(React.Component);
|
|
54
64
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
writable: true,
|
|
65
|
-
value: {
|
|
66
|
-
"aria-describedby": PropTypes.string,
|
|
67
|
-
"aria-label": PropTypes.string,
|
|
68
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
69
|
-
className: PropTypes.string,
|
|
70
|
-
desc: PropTypes.string,
|
|
71
|
-
tabIndex: PropTypes.number
|
|
72
|
-
}
|
|
65
|
+
_defineProperty(VictoryAccessibleGroup, "displayName", "VictoryAccessibleGroup");
|
|
66
|
+
|
|
67
|
+
_defineProperty(VictoryAccessibleGroup, "propTypes", {
|
|
68
|
+
"aria-describedby": PropTypes.string,
|
|
69
|
+
"aria-label": PropTypes.string,
|
|
70
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
71
|
+
className: PropTypes.string,
|
|
72
|
+
desc: PropTypes.string,
|
|
73
|
+
tabIndex: PropTypes.number
|
|
73
74
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
writable: true,
|
|
78
|
-
value: {
|
|
79
|
-
className: "VictoryAccessibleGroup"
|
|
80
|
-
}
|
|
75
|
+
|
|
76
|
+
_defineProperty(VictoryAccessibleGroup, "defaultProps", {
|
|
77
|
+
className: "VictoryAccessibleGroup"
|
|
81
78
|
});
|
|
79
|
+
|
|
82
80
|
export default VictoryAccessibleGroup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _orderBy from "lodash/orderBy";
|
|
2
2
|
import _isPlainObject from "lodash/isPlainObject";
|
|
3
|
-
import { interpolate } from "d3-interpolate";
|
|
3
|
+
import { interpolate } from "victory-vendor/d3-interpolate";
|
|
4
4
|
export var isInterpolatable = function (obj) {
|
|
5
5
|
// d3 turns null into 0 and undefined into NaN, which we don't want.
|
|
6
6
|
if (obj !== null) {
|
|
@@ -1,42 +1,56 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
2
|
|
|
3
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
|
|
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; }
|
|
8
12
|
|
|
9
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
14
|
|
|
11
15
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
12
16
|
|
|
13
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
|
|
19
|
+
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); }
|
|
20
|
+
|
|
21
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
22
|
|
|
15
|
-
function
|
|
23
|
+
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); }; }
|
|
16
24
|
|
|
17
|
-
function
|
|
25
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
18
26
|
|
|
19
27
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
28
|
|
|
29
|
+
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; } }
|
|
30
|
+
|
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
32
|
+
|
|
33
|
+
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; }
|
|
34
|
+
|
|
21
35
|
/*global setTimeout:false */
|
|
22
36
|
import React from "react";
|
|
23
37
|
import PropTypes from "prop-types";
|
|
24
|
-
import * as d3Ease from "d3-ease";
|
|
38
|
+
import * as d3Ease from "victory-vendor/d3-ease";
|
|
25
39
|
import { victoryInterpolator } from "./util";
|
|
26
40
|
import TimerContext from "../victory-util/timer-context";
|
|
27
41
|
import isEqual from "react-fast-compare";
|
|
28
42
|
|
|
29
|
-
var VictoryAnimation =
|
|
30
|
-
/*#__PURE__*/
|
|
31
|
-
function (_React$Component) {
|
|
43
|
+
var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
|
|
32
44
|
_inherits(VictoryAnimation, _React$Component);
|
|
33
45
|
|
|
46
|
+
var _super = _createSuper(VictoryAnimation);
|
|
47
|
+
|
|
34
48
|
function VictoryAnimation(props, context) {
|
|
35
49
|
var _this;
|
|
36
50
|
|
|
37
51
|
_classCallCheck(this, VictoryAnimation);
|
|
38
52
|
|
|
39
|
-
_this =
|
|
53
|
+
_this = _super.call(this, props, context);
|
|
40
54
|
/* defaults */
|
|
41
55
|
|
|
42
56
|
_this.state = {
|
|
@@ -98,10 +112,10 @@ function (_React$Component) {
|
|
|
98
112
|
this.queue.push(this.props.data);
|
|
99
113
|
/* If an array was supplied */
|
|
100
114
|
} else {
|
|
101
|
-
var
|
|
115
|
+
var _this$queue;
|
|
102
116
|
|
|
103
117
|
/* Extend the tween queue */
|
|
104
|
-
(
|
|
118
|
+
(_this$queue = this.queue).push.apply(_this$queue, _toConsumableArray(this.props.data));
|
|
105
119
|
}
|
|
106
120
|
/* Start traversing the tween queue */
|
|
107
121
|
|
|
@@ -210,40 +224,24 @@ function (_React$Component) {
|
|
|
210
224
|
return VictoryAnimation;
|
|
211
225
|
}(React.Component);
|
|
212
226
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
writable: true,
|
|
223
|
-
value: {
|
|
224
|
-
children: PropTypes.func,
|
|
225
|
-
data: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
|
226
|
-
delay: PropTypes.number,
|
|
227
|
-
duration: PropTypes.number,
|
|
228
|
-
easing: PropTypes.oneOf(["back", "backIn", "backOut", "backInOut", "bounce", "bounceIn", "bounceOut", "bounceInOut", "circle", "circleIn", "circleOut", "circleInOut", "linear", "linearIn", "linearOut", "linearInOut", "cubic", "cubicIn", "cubicOut", "cubicInOut", "elastic", "elasticIn", "elasticOut", "elasticInOut", "exp", "expIn", "expOut", "expInOut", "poly", "polyIn", "polyOut", "polyInOut", "quad", "quadIn", "quadOut", "quadInOut", "sin", "sinIn", "sinOut", "sinInOut"]),
|
|
229
|
-
onEnd: PropTypes.func
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
Object.defineProperty(VictoryAnimation, "defaultProps", {
|
|
233
|
-
configurable: true,
|
|
234
|
-
enumerable: true,
|
|
235
|
-
writable: true,
|
|
236
|
-
value: {
|
|
237
|
-
data: {},
|
|
238
|
-
delay: 0,
|
|
239
|
-
duration: 1000,
|
|
240
|
-
easing: "quadInOut"
|
|
241
|
-
}
|
|
227
|
+
_defineProperty(VictoryAnimation, "displayName", "VictoryAnimation");
|
|
228
|
+
|
|
229
|
+
_defineProperty(VictoryAnimation, "propTypes", {
|
|
230
|
+
children: PropTypes.func,
|
|
231
|
+
data: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
|
232
|
+
delay: PropTypes.number,
|
|
233
|
+
duration: PropTypes.number,
|
|
234
|
+
easing: PropTypes.oneOf(["back", "backIn", "backOut", "backInOut", "bounce", "bounceIn", "bounceOut", "bounceInOut", "circle", "circleIn", "circleOut", "circleInOut", "linear", "linearIn", "linearOut", "linearInOut", "cubic", "cubicIn", "cubicOut", "cubicInOut", "elastic", "elasticIn", "elasticOut", "elasticInOut", "exp", "expIn", "expOut", "expInOut", "poly", "polyIn", "polyOut", "polyInOut", "quad", "quadIn", "quadOut", "quadInOut", "sin", "sinIn", "sinOut", "sinInOut"]),
|
|
235
|
+
onEnd: PropTypes.func
|
|
242
236
|
});
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
237
|
+
|
|
238
|
+
_defineProperty(VictoryAnimation, "defaultProps", {
|
|
239
|
+
data: {},
|
|
240
|
+
delay: 0,
|
|
241
|
+
duration: 1000,
|
|
242
|
+
easing: "quadInOut"
|
|
248
243
|
});
|
|
244
|
+
|
|
245
|
+
_defineProperty(VictoryAnimation, "contextType", TimerContext);
|
|
246
|
+
|
|
249
247
|
export { VictoryAnimation as default };
|
|
@@ -3,29 +3,43 @@ import _isObject from "lodash/isObject";
|
|
|
3
3
|
import _defaults from "lodash/defaults";
|
|
4
4
|
import _assign from "lodash/assign";
|
|
5
5
|
|
|
6
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
7
|
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
11
|
|
|
12
|
-
function
|
|
12
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
17
21
|
|
|
18
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
23
|
|
|
20
24
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
21
25
|
|
|
22
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
23
29
|
|
|
24
|
-
function
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
+
|
|
32
|
+
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); }; }
|
|
33
|
+
|
|
34
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
35
|
|
|
26
36
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
37
|
|
|
28
|
-
function
|
|
38
|
+
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; } }
|
|
39
|
+
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
29
43
|
|
|
30
44
|
import React from "react";
|
|
31
45
|
import PropTypes from "prop-types";
|
|
@@ -35,17 +49,17 @@ import ClipPath from "../victory-primitives/clip-path";
|
|
|
35
49
|
import Circle from "../victory-primitives/circle";
|
|
36
50
|
import Rect from "../victory-primitives/rect";
|
|
37
51
|
|
|
38
|
-
var VictoryClipContainer =
|
|
39
|
-
/*#__PURE__*/
|
|
40
|
-
function (_React$Component) {
|
|
52
|
+
var VictoryClipContainer = /*#__PURE__*/function (_React$Component) {
|
|
41
53
|
_inherits(VictoryClipContainer, _React$Component);
|
|
42
54
|
|
|
55
|
+
var _super = _createSuper(VictoryClipContainer);
|
|
56
|
+
|
|
43
57
|
function VictoryClipContainer(props) {
|
|
44
58
|
var _this;
|
|
45
59
|
|
|
46
60
|
_classCallCheck(this, VictoryClipContainer);
|
|
47
61
|
|
|
48
|
-
_this =
|
|
62
|
+
_this = _super.call(this, props);
|
|
49
63
|
_this.clipId = !_isObject(props) || props.clipId === undefined ? _uniqueId("victory-clip-") : props.clipId;
|
|
50
64
|
return _this;
|
|
51
65
|
}
|
|
@@ -94,7 +108,7 @@ function (_React$Component) {
|
|
|
94
108
|
clipPath: "url(#".concat(clipId, ")")
|
|
95
109
|
}, events);
|
|
96
110
|
|
|
97
|
-
return React.cloneElement(groupComponent, _objectSpread({}, groupProps, {
|
|
111
|
+
return /*#__PURE__*/React.cloneElement(groupComponent, _objectSpread(_objectSpread({}, groupProps), {}, {
|
|
98
112
|
"aria-label": props["aria-label"],
|
|
99
113
|
tabIndex: tabIndex
|
|
100
114
|
}), [clipComponent].concat(_toConsumableArray(React.Children.toArray(children))));
|
|
@@ -109,7 +123,7 @@ function (_React$Component) {
|
|
|
109
123
|
className = props.className,
|
|
110
124
|
groupComponent = props.groupComponent,
|
|
111
125
|
tabIndex = props.tabIndex;
|
|
112
|
-
return React.cloneElement(groupComponent, _assign({
|
|
126
|
+
return /*#__PURE__*/React.cloneElement(groupComponent, _assign({
|
|
113
127
|
className: className,
|
|
114
128
|
style: style,
|
|
115
129
|
transform: transform,
|
|
@@ -151,7 +165,7 @@ function (_React$Component) {
|
|
|
151
165
|
cx: origin.x - left,
|
|
152
166
|
cy: origin.y - top
|
|
153
167
|
};
|
|
154
|
-
child = React.cloneElement(circleComponent, circleProps);
|
|
168
|
+
child = /*#__PURE__*/React.cloneElement(circleComponent, circleProps);
|
|
155
169
|
} else {
|
|
156
170
|
var rectProps = {
|
|
157
171
|
x: translateX - left,
|
|
@@ -159,10 +173,10 @@ function (_React$Component) {
|
|
|
159
173
|
width: Math.max(clipWidth + left + right, 0),
|
|
160
174
|
height: Math.max(clipHeight + top + bottom, 0)
|
|
161
175
|
};
|
|
162
|
-
child = React.cloneElement(rectComponent, rectProps);
|
|
176
|
+
child = /*#__PURE__*/React.cloneElement(rectComponent, rectProps);
|
|
163
177
|
}
|
|
164
178
|
|
|
165
|
-
return React.cloneElement(clipPathComponent, _assign({
|
|
179
|
+
return /*#__PURE__*/React.cloneElement(clipPathComponent, _assign({
|
|
166
180
|
key: "clip-path-".concat(clipId)
|
|
167
181
|
}, props, {
|
|
168
182
|
clipId: clipId
|
|
@@ -225,61 +239,45 @@ function (_React$Component) {
|
|
|
225
239
|
return VictoryClipContainer;
|
|
226
240
|
}(React.Component);
|
|
227
241
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
groupComponent: PropTypes.element,
|
|
261
|
-
origin: PropTypes.shape({
|
|
262
|
-
x: CustomPropTypes.nonNegative,
|
|
263
|
-
y: CustomPropTypes.nonNegative
|
|
264
|
-
}),
|
|
265
|
-
polar: PropTypes.bool,
|
|
266
|
-
radius: CustomPropTypes.nonNegative,
|
|
267
|
-
style: PropTypes.object,
|
|
268
|
-
tabIndex: PropTypes.number,
|
|
269
|
-
transform: PropTypes.string,
|
|
270
|
-
translateX: PropTypes.number,
|
|
271
|
-
translateY: PropTypes.number
|
|
272
|
-
}
|
|
242
|
+
_defineProperty(VictoryClipContainer, "displayName", "VictoryClipContainer");
|
|
243
|
+
|
|
244
|
+
_defineProperty(VictoryClipContainer, "role", "container");
|
|
245
|
+
|
|
246
|
+
_defineProperty(VictoryClipContainer, "propTypes", {
|
|
247
|
+
"aria-label": PropTypes.string,
|
|
248
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
249
|
+
circleComponent: PropTypes.element,
|
|
250
|
+
className: PropTypes.string,
|
|
251
|
+
clipHeight: CustomPropTypes.nonNegative,
|
|
252
|
+
clipId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
253
|
+
clipPadding: PropTypes.shape({
|
|
254
|
+
top: PropTypes.number,
|
|
255
|
+
bottom: PropTypes.number,
|
|
256
|
+
left: PropTypes.number,
|
|
257
|
+
right: PropTypes.number
|
|
258
|
+
}),
|
|
259
|
+
clipPathComponent: PropTypes.element,
|
|
260
|
+
clipWidth: CustomPropTypes.nonNegative,
|
|
261
|
+
events: PropTypes.object,
|
|
262
|
+
groupComponent: PropTypes.element,
|
|
263
|
+
origin: PropTypes.shape({
|
|
264
|
+
x: CustomPropTypes.nonNegative,
|
|
265
|
+
y: CustomPropTypes.nonNegative
|
|
266
|
+
}),
|
|
267
|
+
polar: PropTypes.bool,
|
|
268
|
+
radius: CustomPropTypes.nonNegative,
|
|
269
|
+
style: PropTypes.object,
|
|
270
|
+
tabIndex: PropTypes.number,
|
|
271
|
+
transform: PropTypes.string,
|
|
272
|
+
translateX: PropTypes.number,
|
|
273
|
+
translateY: PropTypes.number
|
|
273
274
|
});
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
rectComponent: React.createElement(Rect, null),
|
|
281
|
-
clipPathComponent: React.createElement(ClipPath, null),
|
|
282
|
-
groupComponent: React.createElement("g", null)
|
|
283
|
-
}
|
|
275
|
+
|
|
276
|
+
_defineProperty(VictoryClipContainer, "defaultProps", {
|
|
277
|
+
circleComponent: /*#__PURE__*/React.createElement(Circle, null),
|
|
278
|
+
rectComponent: /*#__PURE__*/React.createElement(Rect, null),
|
|
279
|
+
clipPathComponent: /*#__PURE__*/React.createElement(ClipPath, null),
|
|
280
|
+
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
284
281
|
});
|
|
282
|
+
|
|
285
283
|
export { VictoryClipContainer as default };
|