victory-core 36.9.2-next.3 → 37.0.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/CHANGELOG.md +28 -10
- package/README.md +1 -1
- package/dist/victory-core.js +4449 -6196
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +17 -17
- package/es/types/callbacks.d.ts +36 -36
- package/es/types/prop-types.d.ts +129 -129
- package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/es/victory-accessible-group/victory-accessible-group.js +9 -15
- package/es/victory-animation/util.d.ts +66 -66
- package/es/victory-animation/util.js +28 -47
- package/es/victory-animation/victory-animation.d.ts +34 -34
- package/es/victory-animation/victory-animation.js +51 -67
- package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/es/victory-clip-container/victory-clip-container.js +153 -229
- package/es/victory-container/victory-container.d.ts +68 -68
- package/es/victory-container/victory-container.js +157 -216
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-label/victory-label.js +246 -323
- package/es/victory-portal/portal-context.d.ts +11 -11
- package/es/victory-portal/portal-context.js +1 -2
- package/es/victory-portal/portal.d.ts +20 -20
- package/es/victory-portal/portal.js +30 -76
- package/es/victory-portal/victory-portal.d.ts +26 -26
- package/es/victory-portal/victory-portal.js +47 -104
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/arc.js +44 -47
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/background.js +14 -17
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/border.js +20 -24
- package/es/victory-primitives/circle.d.ts +3 -3
- package/es/victory-primitives/circle.js +13 -27
- package/es/victory-primitives/clip-path.d.ts +7 -7
- package/es/victory-primitives/clip-path.js +3 -7
- package/es/victory-primitives/index.d.ts +14 -14
- package/es/victory-primitives/line-segment.d.ts +11 -11
- package/es/victory-primitives/line-segment.js +20 -24
- package/es/victory-primitives/line.d.ts +3 -3
- package/es/victory-primitives/line.js +13 -27
- package/es/victory-primitives/path.d.ts +3 -3
- package/es/victory-primitives/path.js +13 -27
- package/es/victory-primitives/point.d.ts +13 -13
- package/es/victory-primitives/point.js +36 -40
- package/es/victory-primitives/rect.d.ts +3 -3
- package/es/victory-primitives/rect.js +13 -27
- package/es/victory-primitives/text.d.ts +8 -8
- package/es/victory-primitives/text.js +15 -28
- package/es/victory-primitives/tspan.d.ts +3 -3
- package/es/victory-primitives/tspan.js +13 -26
- package/es/victory-primitives/types.d.ts +7 -7
- package/es/victory-primitives/whisker.d.ts +15 -15
- package/es/victory-primitives/whisker.js +43 -47
- package/es/victory-theme/grayscale.d.ts +2 -2
- package/es/victory-theme/grayscale.js +22 -22
- package/es/victory-theme/material.d.ts +2 -2
- package/es/victory-theme/material.js +46 -46
- package/es/victory-theme/types.d.ts +238 -238
- package/es/victory-theme/victory-theme.d.ts +5 -5
- package/es/victory-theme/victory-theme.js +3 -3
- package/es/victory-transition/victory-transition.d.ts +53 -53
- package/es/victory-transition/victory-transition.js +126 -206
- package/es/victory-util/add-events.d.ts +126 -126
- package/es/victory-util/add-events.js +265 -380
- package/es/victory-util/axis.d.ts +50 -50
- package/es/victory-util/axis.js +133 -222
- package/es/victory-util/collection.d.ts +15 -8
- package/es/victory-util/collection.js +24 -36
- package/es/victory-util/common-props.d.ts +79 -79
- package/es/victory-util/data.d.ts +74 -74
- package/es/victory-util/data.js +159 -214
- package/es/victory-util/default-transitions.d.ts +4 -4
- package/es/victory-util/default-transitions.js +33 -51
- package/es/victory-util/domain.d.ts +90 -90
- package/es/victory-util/domain.js +122 -171
- package/es/victory-util/events.d.ts +64 -64
- package/es/victory-util/events.js +168 -258
- package/es/victory-util/helpers.d.ts +96 -91
- package/es/victory-util/helpers.js +162 -176
- package/es/victory-util/hooks/index.d.ts +2 -2
- package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/es/victory-util/hooks/use-animation-state.js +61 -99
- package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/es/victory-util/hooks/use-previous-props.js +2 -2
- package/es/victory-util/immutable.d.ts +11 -11
- package/es/victory-util/immutable.js +6 -8
- package/es/victory-util/index.d.ts +26 -26
- package/es/victory-util/label-helpers.d.ts +26 -26
- package/es/victory-util/label-helpers.js +128 -130
- package/es/victory-util/line-helpers.d.ts +4 -4
- package/es/victory-util/line-helpers.js +29 -41
- package/es/victory-util/log.d.ts +1 -1
- package/es/victory-util/log.js +1 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -9
- package/es/victory-util/point-path-helpers.js +89 -49
- package/es/victory-util/scale.d.ts +9 -9
- package/es/victory-util/scale.js +24 -42
- package/es/victory-util/selection.d.ts +28 -28
- package/es/victory-util/selection.js +39 -40
- package/es/victory-util/style.d.ts +18 -18
- package/es/victory-util/style.js +8 -13
- package/es/victory-util/textsize.d.ts +35 -35
- package/es/victory-util/textsize.js +80 -154
- package/es/victory-util/timer-context.d.ts +11 -11
- package/es/victory-util/timer-context.js +2 -2
- package/es/victory-util/timer.d.ts +16 -16
- package/es/victory-util/timer.js +40 -76
- package/es/victory-util/transitions.d.ts +48 -48
- package/es/victory-util/transitions.js +110 -150
- package/es/victory-util/type-helpers.d.ts +9 -9
- package/es/victory-util/type-helpers.js +2 -3
- package/es/victory-util/user-props.d.ts +26 -26
- package/es/victory-util/user-props.js +24 -49
- package/es/victory-util/wrapper.d.ts +33 -37
- package/es/victory-util/wrapper.js +182 -245
- package/lib/index.d.ts +17 -17
- package/lib/index.js +0 -30
- package/lib/types/callbacks.d.ts +36 -36
- package/lib/types/prop-types.d.ts +129 -129
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/lib/victory-accessible-group/victory-accessible-group.js +9 -19
- package/lib/victory-animation/util.d.ts +66 -66
- package/lib/victory-animation/util.js +28 -63
- package/lib/victory-animation/victory-animation.d.ts +34 -34
- package/lib/victory-animation/victory-animation.js +54 -83
- package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/lib/victory-clip-container/victory-clip-container.js +156 -243
- package/lib/victory-container/victory-container.d.ts +68 -68
- package/lib/victory-container/victory-container.js +160 -232
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-label/victory-label.js +248 -344
- package/lib/victory-portal/portal-context.d.ts +11 -11
- package/lib/victory-portal/portal-context.js +1 -6
- package/lib/victory-portal/portal.d.ts +20 -20
- package/lib/victory-portal/portal.js +31 -81
- package/lib/victory-portal/victory-portal.d.ts +26 -26
- package/lib/victory-portal/victory-portal.js +50 -116
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/arc.js +48 -57
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/background.js +16 -28
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/border.js +22 -34
- package/lib/victory-primitives/circle.d.ts +3 -3
- package/lib/victory-primitives/circle.js +16 -36
- package/lib/victory-primitives/clip-path.d.ts +7 -7
- package/lib/victory-primitives/clip-path.js +3 -11
- package/lib/victory-primitives/index.d.ts +14 -14
- package/lib/victory-primitives/index.js +0 -28
- package/lib/victory-primitives/line-segment.d.ts +11 -11
- package/lib/victory-primitives/line-segment.js +22 -34
- package/lib/victory-primitives/line.d.ts +3 -3
- package/lib/victory-primitives/line.js +16 -36
- package/lib/victory-primitives/path.d.ts +3 -3
- package/lib/victory-primitives/path.js +16 -36
- package/lib/victory-primitives/point.d.ts +13 -13
- package/lib/victory-primitives/point.js +38 -52
- package/lib/victory-primitives/rect.d.ts +3 -3
- package/lib/victory-primitives/rect.js +16 -36
- package/lib/victory-primitives/text.d.ts +8 -8
- package/lib/victory-primitives/text.js +15 -33
- package/lib/victory-primitives/tspan.d.ts +3 -3
- package/lib/victory-primitives/tspan.js +13 -31
- package/lib/victory-primitives/types.d.ts +7 -7
- package/lib/victory-primitives/whisker.d.ts +15 -15
- package/lib/victory-primitives/whisker.js +45 -57
- package/lib/victory-theme/grayscale.d.ts +2 -2
- package/lib/victory-theme/grayscale.js +23 -24
- package/lib/victory-theme/material.d.ts +2 -2
- package/lib/victory-theme/material.js +47 -48
- package/lib/victory-theme/types.d.ts +238 -238
- package/lib/victory-theme/victory-theme.d.ts +5 -5
- package/lib/victory-theme/victory-theme.js +2 -7
- package/lib/victory-transition/victory-transition.d.ts +53 -53
- package/lib/victory-transition/victory-transition.js +129 -224
- package/lib/victory-util/add-events.d.ts +126 -126
- package/lib/victory-util/add-events.js +265 -382
- package/lib/victory-util/axis.d.ts +50 -50
- package/lib/victory-util/axis.js +135 -242
- package/lib/victory-util/collection.d.ts +15 -8
- package/lib/victory-util/collection.js +24 -43
- package/lib/victory-util/common-props.d.ts +79 -79
- package/lib/victory-util/data.d.ts +74 -74
- package/lib/victory-util/data.js +160 -239
- package/lib/victory-util/default-transitions.d.ts +4 -4
- package/lib/victory-util/default-transitions.js +33 -54
- package/lib/victory-util/domain.d.ts +90 -90
- package/lib/victory-util/domain.js +123 -193
- package/lib/victory-util/events.d.ts +64 -64
- package/lib/victory-util/events.js +167 -274
- package/lib/victory-util/helpers.d.ts +96 -91
- package/lib/victory-util/helpers.js +166 -204
- package/lib/victory-util/hooks/index.d.ts +2 -2
- package/lib/victory-util/hooks/index.js +0 -2
- package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/lib/victory-util/hooks/use-animation-state.js +63 -113
- package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/lib/victory-util/hooks/use-previous-props.js +2 -7
- package/lib/victory-util/immutable.d.ts +11 -11
- package/lib/victory-util/immutable.js +6 -18
- package/lib/victory-util/index.d.ts +26 -26
- package/lib/victory-util/index.js +2 -51
- package/lib/victory-util/label-helpers.d.ts +26 -26
- package/lib/victory-util/label-helpers.js +130 -141
- package/lib/victory-util/line-helpers.d.ts +4 -4
- package/lib/victory-util/line-helpers.js +31 -49
- package/lib/victory-util/log.d.ts +1 -1
- package/lib/victory-util/log.js +1 -2
- package/lib/victory-util/point-path-helpers.d.ts +9 -9
- package/lib/victory-util/point-path-helpers.js +91 -63
- package/lib/victory-util/scale.d.ts +9 -9
- package/lib/victory-util/scale.js +26 -57
- package/lib/victory-util/selection.d.ts +28 -28
- package/lib/victory-util/selection.js +41 -49
- package/lib/victory-util/style.d.ts +18 -18
- package/lib/victory-util/style.js +8 -16
- package/lib/victory-util/textsize.d.ts +35 -35
- package/lib/victory-util/textsize.js +80 -157
- package/lib/victory-util/timer-context.d.ts +11 -11
- package/lib/victory-util/timer-context.js +2 -8
- package/lib/victory-util/timer.d.ts +16 -16
- package/lib/victory-util/timer.js +40 -76
- package/lib/victory-util/transitions.d.ts +48 -48
- package/lib/victory-util/transitions.js +110 -152
- package/lib/victory-util/type-helpers.d.ts +9 -9
- package/lib/victory-util/type-helpers.js +2 -9
- package/lib/victory-util/user-props.d.ts +26 -26
- package/lib/victory-util/user-props.js +25 -59
- package/lib/victory-util/wrapper.d.ts +33 -37
- package/lib/victory-util/wrapper.js +184 -279
- package/package.json +6 -3
- package/src/types/prop-types.ts +0 -7
- package/src/victory-container/victory-container.tsx +195 -171
- package/src/victory-portal/portal-context.ts +4 -5
- package/src/victory-portal/portal.tsx +42 -5
- package/src/victory-portal/victory-portal.tsx +71 -34
- package/src/victory-util/add-events.tsx +6 -4
- package/src/victory-util/axis.tsx +12 -3
- package/src/victory-util/collection.tsx +13 -0
- package/src/victory-util/helpers.ts +11 -0
- package/src/victory-util/index.ts +0 -1
- package/src/victory-util/wrapper.tsx +1 -0
- package/src/victory-util/merge-refs.ts +0 -13
|
@@ -4,252 +4,157 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VictoryTransition = void 0;
|
|
7
|
-
|
|
8
7
|
var _pick2 = _interopRequireDefault(require("lodash/pick"));
|
|
9
|
-
|
|
10
8
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _victoryAnimation = require("../victory-animation/victory-animation");
|
|
15
|
-
|
|
16
11
|
var Collection = _interopRequireWildcard(require("../victory-util/collection"));
|
|
17
|
-
|
|
18
12
|
var Helpers = _interopRequireWildcard(require("../victory-util/helpers"));
|
|
19
|
-
|
|
20
13
|
var _timerContext = _interopRequireDefault(require("../victory-util/timer-context"));
|
|
21
|
-
|
|
22
14
|
var Transitions = _interopRequireWildcard(require("../victory-util/transitions"));
|
|
23
|
-
|
|
24
15
|
var _reactFastCompare = _interopRequireDefault(require("react-fast-compare"));
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
19
|
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); }
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
|
-
|
|
44
|
-
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); }; }
|
|
45
|
-
|
|
46
|
-
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); }
|
|
47
|
-
|
|
48
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
49
|
-
|
|
50
|
-
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; } }
|
|
51
|
-
|
|
52
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
|
-
|
|
54
|
-
var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
55
|
-
_inherits(VictoryTransition, _React$Component);
|
|
56
|
-
|
|
57
|
-
var _super = _createSuper(VictoryTransition);
|
|
58
|
-
|
|
59
|
-
function VictoryTransition(props, context) {
|
|
60
|
-
var _this;
|
|
61
|
-
|
|
62
|
-
_classCallCheck(this, VictoryTransition);
|
|
63
|
-
|
|
64
|
-
_this = _super.call(this, props, context);
|
|
65
|
-
_this.continuous = void 0;
|
|
66
|
-
_this.timer = void 0;
|
|
67
|
-
_this.transitionProps = void 0;
|
|
68
|
-
_this.state = {
|
|
20
|
+
class VictoryTransition extends _react.default.Component {
|
|
21
|
+
static displayName = "VictoryTransition";
|
|
22
|
+
static contextType = _timerContext.default;
|
|
23
|
+
constructor(props, context) {
|
|
24
|
+
super(props, context);
|
|
25
|
+
this.state = {
|
|
69
26
|
nodesShouldLoad: false,
|
|
70
27
|
nodesDoneLoad: false
|
|
71
28
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return _this;
|
|
29
|
+
const child = this.props.children;
|
|
30
|
+
const polar = child.props.polar;
|
|
31
|
+
this.continuous = !polar && child.type && child.type.continuous === true;
|
|
32
|
+
this.timer = this.context.transitionTimer;
|
|
77
33
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
key: "shouldComponentUpdate",
|
|
88
|
-
value: function shouldComponentUpdate(nextProps) {
|
|
89
|
-
var _this2 = this;
|
|
90
|
-
|
|
91
|
-
if (!(0, _reactFastCompare.default)(this.props, nextProps)) {
|
|
92
|
-
this.timer.bypassAnimation();
|
|
93
|
-
this.setState(this.getTransitionState(this.props, nextProps), function () {
|
|
94
|
-
return _this2.timer.resumeAnimation();
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
}, {
|
|
101
|
-
key: "componentWillUnmount",
|
|
102
|
-
value: function componentWillUnmount() {
|
|
103
|
-
this.timer.stop();
|
|
34
|
+
componentDidMount() {
|
|
35
|
+
this.setState({
|
|
36
|
+
nodesShouldLoad: true
|
|
37
|
+
}); // eslint-disable-line react/no-did-mount-set-state
|
|
38
|
+
}
|
|
39
|
+
shouldComponentUpdate(nextProps) {
|
|
40
|
+
if (!(0, _reactFastCompare.default)(this.props, nextProps)) {
|
|
41
|
+
this.timer.bypassAnimation();
|
|
42
|
+
this.setState(this.getTransitionState(this.props, nextProps), () => this.timer.resumeAnimation());
|
|
104
43
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var oldChildren = _react.default.Children.toArray(props.children);
|
|
122
|
-
|
|
123
|
-
var nextChildren = _react.default.Children.toArray(nextProps.children);
|
|
124
|
-
|
|
125
|
-
var _Transitions$getIniti = Transitions.getInitialTransitionState(oldChildren, nextChildren),
|
|
126
|
-
nodesWillExit = _Transitions$getIniti.nodesWillExit,
|
|
127
|
-
nodesWillEnter = _Transitions$getIniti.nodesWillEnter,
|
|
128
|
-
childrenTransitions = _Transitions$getIniti.childrenTransitions,
|
|
129
|
-
nodesShouldEnter = _Transitions$getIniti.nodesShouldEnter;
|
|
130
|
-
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
componentWillUnmount() {
|
|
47
|
+
this.timer.stop();
|
|
48
|
+
}
|
|
49
|
+
getTransitionState(props, nextProps) {
|
|
50
|
+
const {
|
|
51
|
+
animate
|
|
52
|
+
} = props;
|
|
53
|
+
if (!animate) {
|
|
54
|
+
return {};
|
|
55
|
+
} else if (animate.parentState) {
|
|
56
|
+
const state = animate.parentState;
|
|
57
|
+
const oldProps = state.nodesWillExit ? props : null;
|
|
131
58
|
return {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
childrenTransitions: childrenTransitions,
|
|
135
|
-
nodesShouldEnter: nodesShouldEnter,
|
|
136
|
-
oldProps: nodesWillExit ? props : null,
|
|
137
|
-
nextProps: nextProps
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
}, {
|
|
141
|
-
key: "getDomainFromChildren",
|
|
142
|
-
value: function getDomainFromChildren(props, axis) {
|
|
143
|
-
var getChildDomains = function (children) {
|
|
144
|
-
return children.reduce(function (memo, child) {
|
|
145
|
-
if (child.type && Helpers.isFunction(child.type.getDomain)) {
|
|
146
|
-
var childDomain = child.props && child.type.getDomain(child.props, axis);
|
|
147
|
-
return childDomain ? memo.concat(childDomain) : memo;
|
|
148
|
-
} else if (child.props && child.props.children) {
|
|
149
|
-
return memo.concat(getChildDomains(_react.default.Children.toArray(child.props.children)));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return memo;
|
|
153
|
-
}, []);
|
|
59
|
+
oldProps,
|
|
60
|
+
nextProps
|
|
154
61
|
};
|
|
155
|
-
|
|
156
|
-
var child = _react.default.Children.toArray(props.children)[0];
|
|
157
|
-
|
|
158
|
-
var childProps = child.props || {};
|
|
159
|
-
var domain = Array.isArray(childProps.domain) ? childProps.domain : childProps.domain && childProps.domain[axis];
|
|
160
|
-
|
|
161
|
-
if (!childProps.children && domain) {
|
|
162
|
-
return domain;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
var childDomains = getChildDomains([child]);
|
|
166
|
-
return childDomains.length === 0 ? [0, 1] : [Collection.getMinValue(childDomains), Collection.getMaxValue(childDomains)];
|
|
167
62
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
63
|
+
const oldChildren = _react.default.Children.toArray(props.children);
|
|
64
|
+
const nextChildren = _react.default.Children.toArray(nextProps.children);
|
|
65
|
+
const {
|
|
66
|
+
nodesWillExit,
|
|
67
|
+
nodesWillEnter,
|
|
68
|
+
childrenTransitions,
|
|
69
|
+
nodesShouldEnter
|
|
70
|
+
} = Transitions.getInitialTransitionState(oldChildren, nextChildren);
|
|
71
|
+
return {
|
|
72
|
+
nodesWillExit,
|
|
73
|
+
nodesWillEnter,
|
|
74
|
+
childrenTransitions,
|
|
75
|
+
nodesShouldEnter,
|
|
76
|
+
oldProps: nodesWillExit ? props : null,
|
|
77
|
+
nextProps
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
getDomainFromChildren(props, axis) {
|
|
81
|
+
const getChildDomains = children => {
|
|
82
|
+
return children.reduce((memo, child) => {
|
|
83
|
+
if (child.type && Helpers.isFunction(child.type.getDomain)) {
|
|
84
|
+
const childDomain = child.props && child.type.getDomain(child.props, axis);
|
|
85
|
+
return childDomain ? memo.concat(childDomain) : memo;
|
|
86
|
+
} else if (child.props && child.props.children) {
|
|
87
|
+
return memo.concat(getChildDomains(_react.default.Children.toArray(child.props.children)));
|
|
88
|
+
}
|
|
89
|
+
return memo;
|
|
90
|
+
}, []);
|
|
91
|
+
};
|
|
92
|
+
const child = _react.default.Children.toArray(props.children)[0];
|
|
93
|
+
const childProps = child.props || {};
|
|
94
|
+
const domain = Array.isArray(childProps.domain) ? childProps.domain : childProps.domain && childProps.domain[axis];
|
|
95
|
+
if (!childProps.children && domain) {
|
|
96
|
+
return domain;
|
|
176
97
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (parentState && parentState.nodesWillExit) {
|
|
185
|
-
return this.continuous || parentState.continuous ? parentState.nextProps || this.state.nextProps || props : props;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return this.continuous && this.state.nodesWillExit ? this.state.nextProps || props : props;
|
|
98
|
+
const childDomains = getChildDomains([child]);
|
|
99
|
+
return childDomains.length === 0 ? [0, 1] : [Collection.getMinValue(childDomains), Collection.getMaxValue(childDomains)];
|
|
100
|
+
}
|
|
101
|
+
pickProps() {
|
|
102
|
+
if (!this.state) {
|
|
103
|
+
return this.props;
|
|
189
104
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
var clipWidth = this.transitionProps ? this.transitionProps.clipWidth : undefined;
|
|
199
|
-
return clipWidth !== undefined ? clipWidth : getDefaultClipWidth();
|
|
105
|
+
return this.state.nodesWillExit ? this.state.oldProps || this.props : this.props;
|
|
106
|
+
}
|
|
107
|
+
pickDomainProps(props) {
|
|
108
|
+
const parentState = props.animate?.parentState;
|
|
109
|
+
if (parentState && parentState.nodesWillExit) {
|
|
110
|
+
return this.continuous || parentState.continuous ? parentState.nextProps || this.state.nextProps || props : props;
|
|
200
111
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
animate: null,
|
|
237
|
-
animating: true,
|
|
238
|
-
groupComponent: groupComponent
|
|
239
|
-
}, newProps, combinedProps));
|
|
240
|
-
}
|
|
241
|
-
|
|
112
|
+
return this.continuous && this.state.nodesWillExit ? this.state.nextProps || props : props;
|
|
113
|
+
}
|
|
114
|
+
getClipWidth(props, child) {
|
|
115
|
+
const getDefaultClipWidth = () => {
|
|
116
|
+
const range = Helpers.getRange(child.props, "x");
|
|
117
|
+
return range ? Math.abs(range[1] - range[0]) : props.width;
|
|
118
|
+
};
|
|
119
|
+
const clipWidth = this.transitionProps ? this.transitionProps.clipWidth : undefined;
|
|
120
|
+
return clipWidth !== undefined ? clipWidth : getDefaultClipWidth();
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
const props = this.pickProps();
|
|
124
|
+
const getTransitionProps = this.props.animate?.getTransitions ? this.props.animate.getTransitions : Transitions.getTransitionPropsFactory(props, this.state, newState => this.setState(newState));
|
|
125
|
+
const child = _react.default.Children.toArray(props.children)[0];
|
|
126
|
+
const transitionProps = getTransitionProps(child);
|
|
127
|
+
this.transitionProps = transitionProps;
|
|
128
|
+
const domain = {
|
|
129
|
+
x: this.getDomainFromChildren(this.pickDomainProps(props), "x"),
|
|
130
|
+
y: this.getDomainFromChildren(props, "y")
|
|
131
|
+
};
|
|
132
|
+
const clipWidth = this.getClipWidth(props, child);
|
|
133
|
+
const combinedProps = (0, _defaults2.default)({
|
|
134
|
+
domain,
|
|
135
|
+
clipWidth
|
|
136
|
+
}, transitionProps, child.props);
|
|
137
|
+
const animationWhitelist = props.animationWhitelist || [];
|
|
138
|
+
const whitelist = animationWhitelist.concat(["clipWidth"]);
|
|
139
|
+
const propsToAnimate = whitelist.length ? (0, _pick2.default)(combinedProps, whitelist) : combinedProps;
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_victoryAnimation.VictoryAnimation, _extends({}, combinedProps.animate, {
|
|
141
|
+
data: propsToAnimate
|
|
142
|
+
}), newProps => {
|
|
143
|
+
if (child.props.groupComponent) {
|
|
144
|
+
const groupComponent = this.continuous ? /*#__PURE__*/_react.default.cloneElement(child.props.groupComponent, {
|
|
145
|
+
clipWidth: newProps.clipWidth || 0
|
|
146
|
+
}) : child.props.groupComponent;
|
|
242
147
|
return /*#__PURE__*/_react.default.cloneElement(child, (0, _defaults2.default)({
|
|
243
148
|
animate: null,
|
|
244
|
-
animating: true
|
|
149
|
+
animating: true,
|
|
150
|
+
groupComponent
|
|
245
151
|
}, newProps, combinedProps));
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
VictoryTransition
|
|
255
|
-
VictoryTransition.contextType = _timerContext.default;
|
|
152
|
+
}
|
|
153
|
+
return /*#__PURE__*/_react.default.cloneElement(child, (0, _defaults2.default)({
|
|
154
|
+
animate: null,
|
|
155
|
+
animating: true
|
|
156
|
+
}, newProps, combinedProps));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.VictoryTransition = VictoryTransition;
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
export declare type MixinOptions = {
|
|
7
|
-
components?: Array<{
|
|
8
|
-
name: string;
|
|
9
|
-
index?: string | number;
|
|
10
|
-
}>;
|
|
11
|
-
};
|
|
12
|
-
export interface EventMixinCommonProps extends VictoryCommonProps, VictoryDatableProps, VictoryLabelableProps {
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* These methods will be implemented by the Mixin,
|
|
16
|
-
* and are accessible to the Wrapped Component.
|
|
17
|
-
*
|
|
18
|
-
* To make your Wrapped Component type-safe, use "interface merging" like so:
|
|
19
|
-
* @example
|
|
20
|
-
* interface MyComponent extends EventsMixinClass<MyProps> {}
|
|
21
|
-
* class MyComponent extends React.Component<MyProps> { ... }
|
|
22
|
-
*/
|
|
23
|
-
export interface EventsMixinClass<TProps> {
|
|
24
|
-
renderContainer(component: React.ReactElement, children: React.ReactElement | React.ReactElement[]): React.ReactElement;
|
|
25
|
-
cacheValues<TThis>(this: TThis, obj: Partial<TThis>): void;
|
|
26
|
-
getEventState: typeof Events.getEventState;
|
|
27
|
-
renderData(props: TProps): any;
|
|
28
|
-
renderContinuousData(props: TProps): any;
|
|
29
|
-
animateComponent(props: TProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
30
|
-
getComponentProps(component: React.ReactNode, type: string, index: string | number): TProps;
|
|
31
|
-
dataKeys: string[];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* These fields are calculated by the Mixin
|
|
35
|
-
*/
|
|
36
|
-
export interface EventMixinCalculatedValues {
|
|
37
|
-
componentEvents: Array<ComponentEvent>;
|
|
38
|
-
getSharedEventState: (key: string, value: string) => unknown;
|
|
39
|
-
baseProps: Record<string, object>;
|
|
40
|
-
dataKeys: string[];
|
|
41
|
-
hasEvents: unknown;
|
|
42
|
-
events: unknown;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* These are the common roles that we care about internally.
|
|
46
|
-
*/
|
|
47
|
-
export declare type VictoryComponentCommonRole = "container" | "group" | "histogram" | "label" | "line" | "portal" | "stack" | "tooltip" | "voronoi";
|
|
48
|
-
/**
|
|
49
|
-
* A component can have any "role",
|
|
50
|
-
* but there are certain ones that we actually care about internally
|
|
51
|
-
*/
|
|
52
|
-
export declare type VictoryComponentRole = VictoryComponentCommonRole | string;
|
|
53
|
-
/**
|
|
54
|
-
* Static component fields used by Victory for common behavior
|
|
55
|
-
*/
|
|
56
|
-
export interface VictoryComponentConfiguration<TProps> {
|
|
57
|
-
getBaseProps?(props: TProps): EventMixinCalculatedValues["baseProps"];
|
|
58
|
-
role?: VictoryComponentRole;
|
|
59
|
-
expectedComponents?: Array<keyof TProps | string>;
|
|
60
|
-
getChildren?: (props: TProps, childComponents?: Array<React.ReactNode>, calculatedProps?: TProps) => void;
|
|
61
|
-
animationWhitelist?: Array<keyof TProps | string>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* This represents the class itself, including static fields
|
|
65
|
-
*/
|
|
66
|
-
export interface WrappedComponentClass<TProps> extends VictoryComponentConfiguration<TProps> {
|
|
67
|
-
new (props: TProps): React.Component<TProps>;
|
|
68
|
-
}
|
|
69
|
-
export declare function addEvents<TBase extends WrappedComponentClass<TProps>, TProps extends EventMixinCommonProps>(WrappedComponent: TBase, options?: MixinOptions): {
|
|
70
|
-
new (props: TProps): {
|
|
71
|
-
state: {};
|
|
72
|
-
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
|
|
73
|
-
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
|
|
74
|
-
getEvents: (p: any, target: any, eventKey: any) => any;
|
|
75
|
-
externalMutations: {} | undefined;
|
|
76
|
-
calculatedState: {};
|
|
77
|
-
globalEvents: {};
|
|
78
|
-
prevGlobalEventKeys: string[];
|
|
79
|
-
boundGlobalEvents: {};
|
|
80
|
-
shouldComponentUpdate(nextProps: TProps): boolean;
|
|
81
|
-
componentDidMount(): void;
|
|
82
|
-
componentDidUpdate(prevProps: any): void;
|
|
83
|
-
componentWillUnmount(): void;
|
|
84
|
-
addGlobalListener(key: any): void;
|
|
85
|
-
removeGlobalListener(key: any): void;
|
|
86
|
-
getStateChanges(props: any): {};
|
|
87
|
-
applyExternalMutations(props: any, externalMutations: any): void;
|
|
88
|
-
getCalculatedValues(props: any): EventMixinCalculatedValues;
|
|
89
|
-
getExternalMutations(props: TProps): {} | undefined;
|
|
90
|
-
cacheValues(obj: any): void;
|
|
91
|
-
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
|
|
92
|
-
getAllEvents(props: any): any;
|
|
93
|
-
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
94
|
-
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
95
|
-
animateComponent(props: TProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
96
|
-
renderContinuousData(props: TProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
97
|
-
renderData(props: any, shouldRenderDatum?: (datum: any) => boolean): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
98
|
-
context: unknown;
|
|
99
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
100
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
101
|
-
render(): React.ReactNode;
|
|
102
|
-
readonly props: Readonly<TProps>;
|
|
103
|
-
refs: {
|
|
104
|
-
[key: string]: React.ReactInstance;
|
|
105
|
-
};
|
|
106
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
107
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
108
|
-
componentWillMount?(): void;
|
|
109
|
-
UNSAFE_componentWillMount?(): void;
|
|
110
|
-
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
111
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
112
|
-
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
113
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
114
|
-
componentEvents: ComponentEvent[];
|
|
115
|
-
getSharedEventState: (key: string, value: string) => unknown;
|
|
116
|
-
baseProps: Record<string, object>;
|
|
117
|
-
dataKeys: string[];
|
|
118
|
-
hasEvents: unknown;
|
|
119
|
-
events: unknown;
|
|
120
|
-
};
|
|
121
|
-
getBaseProps?(props: TProps): Record<string, object>;
|
|
122
|
-
role?: string | undefined;
|
|
123
|
-
expectedComponents?: (string | keyof TProps)[] | undefined;
|
|
124
|
-
getChildren?: ((props: TProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: TProps | undefined) => void) | undefined;
|
|
125
|
-
animationWhitelist?: (string | keyof TProps)[] | undefined;
|
|
126
|
-
} & TBase;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VictoryLabelableProps } from "../types/prop-types";
|
|
3
|
+
import { VictoryCommonProps, VictoryDatableProps } from "./common-props";
|
|
4
|
+
import type { ComponentEvent } from "./events";
|
|
5
|
+
import * as Events from "./events";
|
|
6
|
+
export declare type MixinOptions = {
|
|
7
|
+
components?: Array<{
|
|
8
|
+
name: string;
|
|
9
|
+
index?: string | number;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export interface EventMixinCommonProps extends VictoryCommonProps, VictoryDatableProps, VictoryLabelableProps {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* These methods will be implemented by the Mixin,
|
|
16
|
+
* and are accessible to the Wrapped Component.
|
|
17
|
+
*
|
|
18
|
+
* To make your Wrapped Component type-safe, use "interface merging" like so:
|
|
19
|
+
* @example
|
|
20
|
+
* interface MyComponent extends EventsMixinClass<MyProps> {}
|
|
21
|
+
* class MyComponent extends React.Component<MyProps> { ... }
|
|
22
|
+
*/
|
|
23
|
+
export interface EventsMixinClass<TProps> {
|
|
24
|
+
renderContainer(component: React.ReactElement, children: React.ReactElement | React.ReactElement[]): React.ReactElement;
|
|
25
|
+
cacheValues<TThis>(this: TThis, obj: Partial<TThis>): void;
|
|
26
|
+
getEventState: typeof Events.getEventState;
|
|
27
|
+
renderData(props: TProps): any;
|
|
28
|
+
renderContinuousData(props: TProps): any;
|
|
29
|
+
animateComponent(props: TProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
30
|
+
getComponentProps(component: React.ReactNode, type: string, index: string | number): TProps;
|
|
31
|
+
dataKeys: string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* These fields are calculated by the Mixin
|
|
35
|
+
*/
|
|
36
|
+
export interface EventMixinCalculatedValues {
|
|
37
|
+
componentEvents: Array<ComponentEvent>;
|
|
38
|
+
getSharedEventState: (key: string, value: string) => unknown;
|
|
39
|
+
baseProps: Record<string, object>;
|
|
40
|
+
dataKeys: string[];
|
|
41
|
+
hasEvents: unknown;
|
|
42
|
+
events: unknown;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* These are the common roles that we care about internally.
|
|
46
|
+
*/
|
|
47
|
+
export declare type VictoryComponentCommonRole = "container" | "group" | "histogram" | "label" | "line" | "portal" | "stack" | "tooltip" | "voronoi";
|
|
48
|
+
/**
|
|
49
|
+
* A component can have any "role",
|
|
50
|
+
* but there are certain ones that we actually care about internally
|
|
51
|
+
*/
|
|
52
|
+
export declare type VictoryComponentRole = VictoryComponentCommonRole | string;
|
|
53
|
+
/**
|
|
54
|
+
* Static component fields used by Victory for common behavior
|
|
55
|
+
*/
|
|
56
|
+
export interface VictoryComponentConfiguration<TProps> {
|
|
57
|
+
getBaseProps?(props: TProps): EventMixinCalculatedValues["baseProps"];
|
|
58
|
+
role?: VictoryComponentRole;
|
|
59
|
+
expectedComponents?: Array<keyof TProps | string>;
|
|
60
|
+
getChildren?: (props: TProps, childComponents?: Array<React.ReactNode>, calculatedProps?: TProps) => void;
|
|
61
|
+
animationWhitelist?: Array<keyof TProps | string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* This represents the class itself, including static fields
|
|
65
|
+
*/
|
|
66
|
+
export interface WrappedComponentClass<TProps> extends VictoryComponentConfiguration<TProps> {
|
|
67
|
+
new (props: TProps): React.Component<TProps>;
|
|
68
|
+
}
|
|
69
|
+
export declare function addEvents<TBase extends WrappedComponentClass<TProps>, TProps extends EventMixinCommonProps>(WrappedComponent: TBase, options?: MixinOptions): {
|
|
70
|
+
new (props: TProps): {
|
|
71
|
+
state: {};
|
|
72
|
+
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
|
|
73
|
+
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
|
|
74
|
+
getEvents: (p: any, target: any, eventKey: any) => any;
|
|
75
|
+
externalMutations: {} | undefined;
|
|
76
|
+
calculatedState: {};
|
|
77
|
+
globalEvents: {};
|
|
78
|
+
prevGlobalEventKeys: string[];
|
|
79
|
+
boundGlobalEvents: {};
|
|
80
|
+
shouldComponentUpdate(nextProps: TProps): boolean;
|
|
81
|
+
componentDidMount(): void;
|
|
82
|
+
componentDidUpdate(prevProps: any): void;
|
|
83
|
+
componentWillUnmount(): void;
|
|
84
|
+
addGlobalListener(key: any): void;
|
|
85
|
+
removeGlobalListener(key: any): void;
|
|
86
|
+
getStateChanges(props: any): {};
|
|
87
|
+
applyExternalMutations(props: any, externalMutations: any): void;
|
|
88
|
+
getCalculatedValues(props: any): EventMixinCalculatedValues;
|
|
89
|
+
getExternalMutations(props: TProps): {} | undefined;
|
|
90
|
+
cacheValues(obj: any): void;
|
|
91
|
+
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
|
|
92
|
+
getAllEvents(props: any): any;
|
|
93
|
+
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
94
|
+
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
95
|
+
animateComponent(props: TProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
96
|
+
renderContinuousData(props: TProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
97
|
+
renderData(props: any, shouldRenderDatum?: (datum: any) => boolean): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
98
|
+
context: unknown;
|
|
99
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
100
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
101
|
+
render(): React.ReactNode;
|
|
102
|
+
readonly props: Readonly<TProps>;
|
|
103
|
+
refs: {
|
|
104
|
+
[key: string]: React.ReactInstance;
|
|
105
|
+
};
|
|
106
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
107
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
|
|
108
|
+
componentWillMount?(): void;
|
|
109
|
+
UNSAFE_componentWillMount?(): void;
|
|
110
|
+
componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
111
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
|
|
112
|
+
componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
113
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
114
|
+
componentEvents: ComponentEvent[];
|
|
115
|
+
getSharedEventState: (key: string, value: string) => unknown;
|
|
116
|
+
baseProps: Record<string, object>;
|
|
117
|
+
dataKeys: string[];
|
|
118
|
+
hasEvents: unknown;
|
|
119
|
+
events: unknown;
|
|
120
|
+
};
|
|
121
|
+
getBaseProps?(props: TProps): Record<string, object>;
|
|
122
|
+
role?: string | undefined;
|
|
123
|
+
expectedComponents?: (string | keyof TProps)[] | undefined;
|
|
124
|
+
getChildren?: ((props: TProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: TProps | undefined) => void) | undefined;
|
|
125
|
+
animationWhitelist?: (string | keyof TProps)[] | undefined;
|
|
126
|
+
} & TBase;
|
|
127
127
|
//# sourceMappingURL=add-events.d.ts.map
|