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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "usePreviousProps", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _usePreviousProps.usePreviousProps;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "useAnimationState", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _useAnimationState.useAnimationState;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _usePreviousProps = require("./use-previous-props");
|
|
20
|
+
|
|
21
|
+
var _useAnimationState = require("./use-animation-state");
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useAnimationState =
|
|
6
|
+
exports.useAnimationState = void 0;
|
|
7
7
|
|
|
8
8
|
var _some2 = _interopRequireDefault(require("lodash/some"));
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
-
var Collection = _interopRequireWildcard(require("
|
|
14
|
+
var Collection = _interopRequireWildcard(require("../collection"));
|
|
15
15
|
|
|
16
|
-
var Transitions = _interopRequireWildcard(require("
|
|
16
|
+
var Transitions = _interopRequireWildcard(require("../transitions"));
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
19
19
|
|
|
@@ -31,17 +31,6 @@ function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d =
|
|
|
31
31
|
|
|
32
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
33
|
|
|
34
|
-
var usePreviousProps = function (props) {
|
|
35
|
-
var ref = _react.default.useRef();
|
|
36
|
-
|
|
37
|
-
_react.default.useEffect(function () {
|
|
38
|
-
ref.current = props;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
return ref.current || {};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
exports.usePreviousProps = usePreviousProps;
|
|
45
34
|
var INITIAL_STATE = {
|
|
46
35
|
nodesShouldLoad: false,
|
|
47
36
|
nodesDoneLoad: false,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.usePreviousProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var usePreviousProps = function (props) {
|
|
13
|
+
var ref = _react.default.useRef();
|
|
14
|
+
|
|
15
|
+
_react.default.useEffect(function () {
|
|
16
|
+
ref.current = props;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return ref.current || {};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.usePreviousProps = usePreviousProps;
|
|
@@ -13,7 +13,9 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
13
13
|
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
15
15
|
|
|
16
|
-
var Timer =
|
|
16
|
+
var Timer =
|
|
17
|
+
/*#__PURE__*/
|
|
18
|
+
function () {
|
|
17
19
|
function Timer() {
|
|
18
20
|
_classCallCheck(this, Timer);
|
|
19
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-core",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.2.0",
|
|
4
4
|
"description": "Victory Core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "00c362fcd3e8f3880e14d3ba42873c34dd69c577"
|
|
42
42
|
}
|
package/src/index.js
CHANGED
|
@@ -44,7 +44,7 @@ export * as Wrapper from "./victory-util/wrapper";
|
|
|
44
44
|
export * as Axis from "./victory-util/axis";
|
|
45
45
|
export { default as TimerContext } from "./victory-util/timer-context";
|
|
46
46
|
export { default as PortalContext } from "./victory-portal/portal-context";
|
|
47
|
-
export * from "./victory-util/hooks";
|
|
47
|
+
export * as Hooks from "./victory-util/hooks";
|
|
48
48
|
export * as LineHelpers from "./victory-util/line-helpers";
|
|
49
49
|
// TODO: Fix this default export
|
|
50
50
|
export { default as PointPathHelpers } from "./victory-util/point-path-helpers";
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { defaults, some } from "lodash";
|
|
3
3
|
|
|
4
|
-
import * as Collection from "
|
|
5
|
-
import * as Transitions from "
|
|
6
|
-
|
|
7
|
-
export const usePreviousProps = (props) => {
|
|
8
|
-
const ref = React.useRef();
|
|
9
|
-
React.useEffect(() => {
|
|
10
|
-
ref.current = props;
|
|
11
|
-
});
|
|
12
|
-
return ref.current || {};
|
|
13
|
-
};
|
|
4
|
+
import * as Collection from "../collection";
|
|
5
|
+
import * as Transitions from "../transitions";
|
|
14
6
|
|
|
15
7
|
const INITIAL_STATE = {
|
|
16
8
|
nodesShouldLoad: false,
|