victory-core 36.1.0 → 36.2.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 +852 -728
- package/dist/victory-core.min.js +1 -1
- package/es/index.js +2 -1
- package/es/victory-accessible-group/victory-accessible-group.js +3 -1
- package/es/victory-animation/victory-animation.js +3 -1
- package/es/victory-clip-container/victory-clip-container.js +3 -1
- package/es/victory-container/victory-container.js +3 -1
- package/es/victory-portal/portal.js +3 -1
- package/es/victory-portal/victory-portal.js +3 -1
- package/es/victory-transition/victory-transition.js +3 -1
- package/es/victory-util/add-events.js +308 -305
- package/es/victory-util/hooks/index.js +2 -0
- package/es/victory-util/{hooks.js → hooks/use-animation-state.js} +2 -9
- package/es/victory-util/hooks/use-previous-props.js +8 -0
- package/es/victory-util/timer.js +3 -1
- package/lib/index.js +4 -62
- package/lib/victory-accessible-group/victory-accessible-group.js +3 -1
- package/lib/victory-animation/victory-animation.js +3 -1
- package/lib/victory-clip-container/victory-clip-container.js +3 -1
- package/lib/victory-container/victory-container.js +3 -1
- package/lib/victory-portal/portal.js +3 -1
- package/lib/victory-portal/victory-portal.js +3 -1
- package/lib/victory-transition/victory-transition.js +3 -1
- package/lib/victory-util/add-events.js +304 -301
- package/lib/victory-util/hooks/index.js +21 -0
- package/lib/victory-util/{hooks.js → hooks/use-animation-state.js} +3 -14
- package/lib/victory-util/hooks/use-previous-props.js +22 -0
- package/lib/victory-util/timer.js +3 -1
- package/package.json +2 -2
- package/src/index.js +1 -1
- package/src/victory-util/hooks/index.js +2 -0
- package/src/victory-util/{hooks.js → hooks/use-animation-state.js} +2 -10
- package/src/victory-util/hooks/use-previous-props.js +9 -0
|
@@ -14,15 +14,8 @@ function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d =
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
|
|
16
16
|
import React from "react";
|
|
17
|
-
import * as Collection from "
|
|
18
|
-
import * as Transitions from "
|
|
19
|
-
export var usePreviousProps = function (props) {
|
|
20
|
-
var ref = React.useRef();
|
|
21
|
-
React.useEffect(function () {
|
|
22
|
-
ref.current = props;
|
|
23
|
-
});
|
|
24
|
-
return ref.current || {};
|
|
25
|
-
};
|
|
17
|
+
import * as Collection from "../collection";
|
|
18
|
+
import * as Transitions from "../transitions";
|
|
26
19
|
var INITIAL_STATE = {
|
|
27
20
|
nodesShouldLoad: false,
|
|
28
21
|
nodesDoneLoad: false,
|
package/es/victory-util/timer.js
CHANGED
|
@@ -6,7 +6,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
6
6
|
|
|
7
7
|
import { timer, now } from "d3-timer";
|
|
8
8
|
|
|
9
|
-
var Timer =
|
|
9
|
+
var Timer =
|
|
10
|
+
/*#__PURE__*/
|
|
11
|
+
function () {
|
|
10
12
|
function Timer() {
|
|
11
13
|
_classCallCheck(this, Timer);
|
|
12
14
|
|
package/lib/index.js
CHANGED
|
@@ -3,55 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
VictoryAccessibleGroup: true,
|
|
8
|
-
VictoryAnimation: true,
|
|
9
|
-
VictoryContainer: true,
|
|
10
|
-
VictoryLabel: true,
|
|
11
|
-
VictoryTransition: true,
|
|
12
|
-
VictoryClipContainer: true,
|
|
13
|
-
VictoryTheme: true,
|
|
14
|
-
VictoryPortal: true,
|
|
15
|
-
Portal: true,
|
|
16
|
-
Arc: true,
|
|
17
|
-
Background: true,
|
|
18
|
-
Border: true,
|
|
19
|
-
Box: true,
|
|
20
|
-
Circle: true,
|
|
21
|
-
ClipPath: true,
|
|
22
|
-
Line: true,
|
|
23
|
-
LineSegment: true,
|
|
24
|
-
Path: true,
|
|
25
|
-
Point: true,
|
|
26
|
-
Rect: true,
|
|
27
|
-
Text: true,
|
|
28
|
-
TSpan: true,
|
|
29
|
-
Whisker: true,
|
|
30
|
-
addEvents: true,
|
|
31
|
-
Collection: true,
|
|
32
|
-
Data: true,
|
|
33
|
-
DefaultTransitions: true,
|
|
34
|
-
Domain: true,
|
|
35
|
-
Events: true,
|
|
36
|
-
Helpers: true,
|
|
37
|
-
Immutable: true,
|
|
38
|
-
LabelHelpers: true,
|
|
39
|
-
Log: true,
|
|
40
|
-
PropTypes: true,
|
|
41
|
-
Scale: true,
|
|
42
|
-
Selection: true,
|
|
43
|
-
Style: true,
|
|
44
|
-
TextSize: true,
|
|
45
|
-
Timer: true,
|
|
46
|
-
Transitions: true,
|
|
47
|
-
CommonProps: true,
|
|
48
|
-
Wrapper: true,
|
|
49
|
-
Axis: true,
|
|
50
|
-
TimerContext: true,
|
|
51
|
-
PortalContext: true,
|
|
52
|
-
LineHelpers: true,
|
|
53
|
-
PointPathHelpers: true
|
|
54
|
-
};
|
|
55
6
|
Object.defineProperty(exports, "VictoryAccessibleGroup", {
|
|
56
7
|
enumerable: true,
|
|
57
8
|
get: function () {
|
|
@@ -220,7 +171,7 @@ Object.defineProperty(exports, "PointPathHelpers", {
|
|
|
220
171
|
return _pointPathHelpers.default;
|
|
221
172
|
}
|
|
222
173
|
});
|
|
223
|
-
exports.LineHelpers = exports.Axis = exports.Wrapper = exports.CommonProps = exports.Transitions = exports.TextSize = exports.Style = exports.Selection = exports.Scale = exports.PropTypes = exports.Log = exports.LabelHelpers = exports.Immutable = exports.Helpers = exports.Events = exports.Domain = exports.DefaultTransitions = exports.Data = exports.Collection = void 0;
|
|
174
|
+
exports.LineHelpers = exports.Hooks = exports.Axis = exports.Wrapper = exports.CommonProps = exports.Transitions = exports.TextSize = exports.Style = exports.Selection = exports.Scale = exports.PropTypes = exports.Log = exports.LabelHelpers = exports.Immutable = exports.Helpers = exports.Events = exports.Domain = exports.DefaultTransitions = exports.Data = exports.Collection = void 0;
|
|
224
175
|
|
|
225
176
|
var _victoryAccessibleGroup = _interopRequireDefault(require("./victory-accessible-group/victory-accessible-group"));
|
|
226
177
|
|
|
@@ -346,18 +297,9 @@ var _timerContext = _interopRequireDefault(require("./victory-util/timer-context
|
|
|
346
297
|
|
|
347
298
|
var _portalContext = _interopRequireDefault(require("./victory-portal/portal-context"));
|
|
348
299
|
|
|
349
|
-
var
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
if (key === "default" || key === "__esModule") return;
|
|
353
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
354
|
-
Object.defineProperty(exports, key, {
|
|
355
|
-
enumerable: true,
|
|
356
|
-
get: function () {
|
|
357
|
-
return _hooks[key];
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
});
|
|
300
|
+
var _Hooks = _interopRequireWildcard(require("./victory-util/hooks"));
|
|
301
|
+
|
|
302
|
+
exports.Hooks = _Hooks;
|
|
361
303
|
|
|
362
304
|
var _LineHelpers = _interopRequireWildcard(require("./victory-util/line-helpers"));
|
|
363
305
|
|
|
@@ -23,7 +23,9 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
23
23
|
|
|
24
24
|
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, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
25
25
|
|
|
26
|
-
var VictoryAccessibleGroup =
|
|
26
|
+
var VictoryAccessibleGroup =
|
|
27
|
+
/*#__PURE__*/
|
|
28
|
+
function (_React$Component) {
|
|
27
29
|
_inherits(VictoryAccessibleGroup, _React$Component);
|
|
28
30
|
|
|
29
31
|
function VictoryAccessibleGroup() {
|
|
@@ -41,7 +41,9 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
41
41
|
|
|
42
42
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
43
|
|
|
44
|
-
var VictoryAnimation =
|
|
44
|
+
var VictoryAnimation =
|
|
45
|
+
/*#__PURE__*/
|
|
46
|
+
function (_React$Component) {
|
|
45
47
|
_inherits(VictoryAnimation, _React$Component);
|
|
46
48
|
|
|
47
49
|
function VictoryAnimation(props, context) {
|
|
@@ -55,7 +55,9 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
55
55
|
|
|
56
56
|
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, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
57
57
|
|
|
58
|
-
var VictoryClipContainer =
|
|
58
|
+
var VictoryClipContainer =
|
|
59
|
+
/*#__PURE__*/
|
|
60
|
+
function (_React$Component) {
|
|
59
61
|
_inherits(VictoryClipContainer, _React$Component);
|
|
60
62
|
|
|
61
63
|
function VictoryClipContainer(props) {
|
|
@@ -51,7 +51,9 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
51
51
|
|
|
52
52
|
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, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
53
53
|
|
|
54
|
-
var VictoryContainer =
|
|
54
|
+
var VictoryContainer =
|
|
55
|
+
/*#__PURE__*/
|
|
56
|
+
function (_React$Component) {
|
|
55
57
|
_inherits(VictoryContainer, _React$Component);
|
|
56
58
|
|
|
57
59
|
function VictoryContainer(props) {
|
|
@@ -29,7 +29,9 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
29
29
|
|
|
30
30
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
31
|
|
|
32
|
-
var Portal =
|
|
32
|
+
var Portal =
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
function (_React$Component) {
|
|
33
35
|
_inherits(Portal, _React$Component);
|
|
34
36
|
|
|
35
37
|
function Portal(props) {
|
|
@@ -33,7 +33,9 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
33
33
|
|
|
34
34
|
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, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
35
35
|
|
|
36
|
-
var VictoryPortal =
|
|
36
|
+
var VictoryPortal =
|
|
37
|
+
/*#__PURE__*/
|
|
38
|
+
function (_React$Component) {
|
|
37
39
|
_inherits(VictoryPortal, _React$Component);
|
|
38
40
|
|
|
39
41
|
function VictoryPortal() {
|
|
@@ -47,7 +47,9 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
47
47
|
|
|
48
48
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
49
49
|
|
|
50
|
-
var VictoryTransition =
|
|
50
|
+
var VictoryTransition =
|
|
51
|
+
/*#__PURE__*/
|
|
52
|
+
function (_React$Component) {
|
|
51
53
|
_inherits(VictoryTransition, _React$Component);
|
|
52
54
|
|
|
53
55
|
function VictoryTransition(props, context) {
|