victory-stack 36.8.4 → 36.8.5-next.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 +10 -0
- package/dist/victory-stack.js +404 -628
- package/dist/victory-stack.min.js +1 -1
- package/es/helper-methods.d.ts +52 -52
- package/es/helper-methods.js +4 -5
- package/es/index.d.ts +1 -1
- package/es/victory-stack.d.ts +75 -75
- package/es/victory-stack.js +1 -3
- package/lib/helper-methods.d.ts +52 -52
- package/lib/helper-methods.js +4 -6
- package/lib/index.d.ts +1 -1
- package/lib/victory-stack.d.ts +75 -75
- package/lib/victory-stack.js +1 -3
- package/package.json +7 -7
- package/src/helper-methods.tsx +5 -5
- package/src/victory-stack.tsx +2 -2
package/lib/victory-stack.js
CHANGED
|
@@ -9,8 +9,6 @@ var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
|
9
9
|
|
|
10
10
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
11
11
|
|
|
12
|
-
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
13
|
-
|
|
14
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
13
|
|
|
16
14
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -82,7 +80,7 @@ var VictoryStackBase = function (initialProps) {
|
|
|
82
80
|
var newChildren = _react.default.useMemo(function () {
|
|
83
81
|
var children = (0, _helperMethods.getChildren)(props, childComponents, calculatedProps);
|
|
84
82
|
var orderedChildren = children.map(function (child, index) {
|
|
85
|
-
var childProps =
|
|
83
|
+
var childProps = Object.assign({
|
|
86
84
|
animate: getAnimationProps(props, child, index)
|
|
87
85
|
}, child.props);
|
|
88
86
|
return /*#__PURE__*/_react.default.cloneElement(child, childProps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-stack",
|
|
3
|
-
"version": "36.8.
|
|
3
|
+
"version": "36.8.5-next.0",
|
|
4
4
|
"description": "Stack Layout Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"prop-types": "^15.8.1",
|
|
25
25
|
"react-fast-compare": "^3.2.0",
|
|
26
|
-
"victory-core": "^36.8.
|
|
27
|
-
"victory-shared-events": "^36.8.
|
|
26
|
+
"victory-core": "^36.8.5-next.0",
|
|
27
|
+
"victory-shared-events": "^36.8.5-next.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": ">=16.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"victory-bar": "
|
|
34
|
-
"victory-histogram": "
|
|
35
|
-
"victory-stack": "
|
|
33
|
+
"victory-bar": "36.8.5-next.0",
|
|
34
|
+
"victory-histogram": "36.8.5-next.0",
|
|
35
|
+
"victory-stack": "36.8.5-next.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
|
-
"provenance":
|
|
38
|
+
"provenance": false
|
|
39
39
|
},
|
|
40
40
|
"wireit": {
|
|
41
41
|
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
package/src/helper-methods.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-use-before-define */
|
|
2
|
-
import {
|
|
2
|
+
import { keys, orderBy } from "lodash";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Helpers, Scale, Wrapper } from "victory-core";
|
|
5
5
|
import isEqual from "react-fast-compare";
|
|
@@ -85,7 +85,7 @@ function addLayoutData(props, datasets, index) {
|
|
|
85
85
|
const xOffset = props.xOffset || 0;
|
|
86
86
|
return datasets[index].map((datum) => {
|
|
87
87
|
const yOffset = getY0(datum, index, datasets) || 0;
|
|
88
|
-
return assign({}, datum, {
|
|
88
|
+
return Object.assign({}, datum, {
|
|
89
89
|
_y0: !(datum._y instanceof Date)
|
|
90
90
|
? yOffset
|
|
91
91
|
: yOffset
|
|
@@ -130,12 +130,12 @@ export function getCalculatedProps(initialProps, childComponents) {
|
|
|
130
130
|
});
|
|
131
131
|
const domain = {
|
|
132
132
|
x: Wrapper.getDomain(
|
|
133
|
-
assign({}, props, { categories }),
|
|
133
|
+
Object.assign({}, props, { categories }),
|
|
134
134
|
"x",
|
|
135
135
|
clonedChildren,
|
|
136
136
|
),
|
|
137
137
|
y: Wrapper.getDomain(
|
|
138
|
-
assign({}, props, { categories }),
|
|
138
|
+
Object.assign({}, props, { categories }),
|
|
139
139
|
"y",
|
|
140
140
|
clonedChildren,
|
|
141
141
|
),
|
|
@@ -250,7 +250,7 @@ export function getChildren(initialProps, childComponents, calculatedProps) {
|
|
|
250
250
|
const name = child.props.name || `${parentName}-${role}-${index}`;
|
|
251
251
|
return React.cloneElement(
|
|
252
252
|
child,
|
|
253
|
-
assign(
|
|
253
|
+
Object.assign(
|
|
254
254
|
{
|
|
255
255
|
key: `${name}-key-${index}`,
|
|
256
256
|
labels,
|
package/src/victory-stack.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defaults, isEmpty } from "lodash";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import {
|
|
@@ -93,7 +93,7 @@ const VictoryStackBase = (initialProps: VictoryStackProps) => {
|
|
|
93
93
|
const newChildren = React.useMemo(() => {
|
|
94
94
|
const children = getChildren(props, childComponents, calculatedProps);
|
|
95
95
|
const orderedChildren = children.map((child, index) => {
|
|
96
|
-
const childProps = assign(
|
|
96
|
+
const childProps = Object.assign(
|
|
97
97
|
{ animate: getAnimationProps(props, child, index) },
|
|
98
98
|
child.props,
|
|
99
99
|
);
|