victory-stack 36.8.4 → 36.8.5

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.
@@ -1,6 +1,5 @@
1
1
  import _orderBy from "lodash/orderBy";
2
2
  import _keys from "lodash/keys";
3
- import _assign from "lodash/assign";
4
3
 
5
4
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
5
 
@@ -117,7 +116,7 @@ function addLayoutData(props, datasets, index) {
117
116
  var xOffset = props.xOffset || 0;
118
117
  return datasets[index].map(function (datum) {
119
118
  var yOffset = getY0(datum, index, datasets) || 0;
120
- return _assign({}, datum, {
119
+ return Object.assign({}, datum, {
121
120
  _y0: !(datum._y instanceof Date) ? yOffset : yOffset ? new Date(yOffset) : datum._y,
122
121
  _y1: datum._y === null ? null : datum._y instanceof Date ? new Date(Number(datum._y) + Number(yOffset)) : datum._y + yOffset,
123
122
  _x1: datum._x === null ? null : datum._x instanceof Date ? new Date(Number(datum._x) + Number(xOffset)) : datum._x + xOffset
@@ -153,10 +152,10 @@ export function getCalculatedProps(initialProps, childComponents) {
153
152
  });
154
153
  });
155
154
  var domain = {
156
- x: Wrapper.getDomain(_assign({}, props, {
155
+ x: Wrapper.getDomain(Object.assign({}, props, {
157
156
  categories: categories
158
157
  }), "x", clonedChildren),
159
- y: Wrapper.getDomain(_assign({}, props, {
158
+ y: Wrapper.getDomain(Object.assign({}, props, {
160
159
  categories: categories
161
160
  }), "y", clonedChildren)
162
161
  };
@@ -272,7 +271,7 @@ export function getChildren(initialProps, childComponents, calculatedProps) {
272
271
  var style = Wrapper.getChildStyle(child, index, newCalculatedProps);
273
272
  var labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
274
273
  var name = child.props.name || "".concat(parentName, "-").concat(role, "-").concat(index);
275
- return /*#__PURE__*/React.cloneElement(child, _assign({
274
+ return /*#__PURE__*/React.cloneElement(child, Object.assign({
276
275
  key: "".concat(name, "-key-").concat(index),
277
276
  labels: labels,
278
277
  name: name,
@@ -1,6 +1,5 @@
1
1
  import _isEmpty from "lodash/isEmpty";
2
2
  import _defaults from "lodash/defaults";
3
- import _assign from "lodash/assign";
4
3
 
5
4
  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; }
6
5
 
@@ -59,10 +58,9 @@ var VictoryStackBase = function (initialProps) {
59
58
  var newChildren = React.useMemo(function () {
60
59
  var children = getChildren(props, childComponents, calculatedProps);
61
60
  var orderedChildren = children.map(function (child, index) {
62
- var childProps = _assign({
61
+ var childProps = Object.assign({
63
62
  animate: getAnimationProps(props, child, index)
64
63
  }, child.props);
65
-
66
64
  return /*#__PURE__*/React.cloneElement(child, childProps);
67
65
  });
68
66
  /*
@@ -12,8 +12,6 @@ var _orderBy2 = _interopRequireDefault(require("lodash/orderBy"));
12
12
 
13
13
  var _keys2 = _interopRequireDefault(require("lodash/keys"));
14
14
 
15
- var _assign2 = _interopRequireDefault(require("lodash/assign"));
16
-
17
15
  var _react = _interopRequireDefault(require("react"));
18
16
 
19
17
  var _victoryCore = require("victory-core");
@@ -131,7 +129,7 @@ function addLayoutData(props, datasets, index) {
131
129
  var xOffset = props.xOffset || 0;
132
130
  return datasets[index].map(function (datum) {
133
131
  var yOffset = getY0(datum, index, datasets) || 0;
134
- return (0, _assign2.default)({}, datum, {
132
+ return Object.assign({}, datum, {
135
133
  _y0: !(datum._y instanceof Date) ? yOffset : yOffset ? new Date(yOffset) : datum._y,
136
134
  _y1: datum._y === null ? null : datum._y instanceof Date ? new Date(Number(datum._y) + Number(yOffset)) : datum._y + yOffset,
137
135
  _x1: datum._x === null ? null : datum._x instanceof Date ? new Date(Number(datum._x) + Number(xOffset)) : datum._x + xOffset
@@ -173,10 +171,10 @@ function getCalculatedProps(initialProps, childComponents) {
173
171
  });
174
172
  });
175
173
  var domain = {
176
- x: _victoryCore.Wrapper.getDomain((0, _assign2.default)({}, props, {
174
+ x: _victoryCore.Wrapper.getDomain(Object.assign({}, props, {
177
175
  categories: categories
178
176
  }), "x", clonedChildren),
179
- y: _victoryCore.Wrapper.getDomain((0, _assign2.default)({}, props, {
177
+ y: _victoryCore.Wrapper.getDomain(Object.assign({}, props, {
180
178
  categories: categories
181
179
  }), "y", clonedChildren)
182
180
  };
@@ -300,7 +298,7 @@ function getChildren(initialProps, childComponents, calculatedProps) {
300
298
 
301
299
  var labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
302
300
  var name = child.props.name || "".concat(parentName, "-").concat(role, "-").concat(index);
303
- return /*#__PURE__*/_react.default.cloneElement(child, (0, _assign2.default)({
301
+ return /*#__PURE__*/_react.default.cloneElement(child, Object.assign({
304
302
  key: "".concat(name, "-key-").concat(index),
305
303
  labels: labels,
306
304
  name: name,
@@ -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 = (0, _assign2.default)({
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.4",
3
+ "version": "36.8.5",
4
4
  "description": "Stack Layout Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -23,8 +23,8 @@
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.4",
27
- "victory-shared-events": "^36.8.4"
26
+ "victory-core": "^36.8.5",
27
+ "victory-shared-events": "^36.8.5"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=16.6.0"
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-use-before-define */
2
- import { assign, keys, orderBy } from "lodash";
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,
@@ -1,4 +1,4 @@
1
- import { assign, defaults, isEmpty } from "lodash";
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
  );