victory-errorbar 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.
package/es/error-bar.js CHANGED
@@ -1,5 +1,3 @@
1
- import _assign from "lodash/assign";
2
-
3
1
  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; }
4
2
 
5
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -91,11 +89,11 @@ var evaluateProps = function (props) {
91
89
  */
92
90
  var ariaLabel = Helpers.evaluateProp(props.ariaLabel, props);
93
91
  var id = Helpers.evaluateProp(props.id, props);
94
- var style = Helpers.evaluateStyle(_assign({
92
+ var style = Helpers.evaluateStyle(Object.assign({
95
93
  stroke: "black"
96
94
  }, props.style), props);
97
95
  var tabIndex = Helpers.evaluateProp(props.tabIndex, props);
98
- return _assign({}, props, {
96
+ return Object.assign({}, props, {
99
97
  ariaLabel: ariaLabel,
100
98
  id: id,
101
99
  style: style,
@@ -158,9 +158,7 @@ var getLabelProps = function (dataProps, text, style) {
158
158
 
159
159
  export var getBaseProps = function (initialProps, fallbackProps) {
160
160
  var modifiedProps = Helpers.modifyProps(initialProps, fallbackProps, "errorbar");
161
-
162
- var props = _assign({}, modifiedProps, getCalculatedValues(modifiedProps));
163
-
161
+ var props = Object.assign({}, modifiedProps, getCalculatedValues(modifiedProps));
164
162
  var borderWidth = props.borderWidth,
165
163
  data = props.data,
166
164
  domain = props.domain,
@@ -230,7 +228,7 @@ export var getBaseProps = function (initialProps, fallbackProps) {
230
228
  var text = LabelHelpers.getText(props, datum, index);
231
229
 
232
230
  if (text !== undefined && text !== null || labels && (events || sharedEvents)) {
233
- childProps[eventKey].labels = getLabelProps(_assign({}, props, dataProps), text, style);
231
+ childProps[eventKey].labels = getLabelProps(Object.assign({}, props, dataProps), text, style);
234
232
  }
235
233
 
236
234
  return childProps;
package/lib/error-bar.js CHANGED
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ErrorBar = void 0;
7
7
 
8
- var _assign2 = _interopRequireDefault(require("lodash/assign"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
12
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -103,13 +101,13 @@ var evaluateProps = function (props) {
103
101
 
104
102
  var id = _victoryCore.Helpers.evaluateProp(props.id, props);
105
103
 
106
- var style = _victoryCore.Helpers.evaluateStyle((0, _assign2.default)({
104
+ var style = _victoryCore.Helpers.evaluateStyle(Object.assign({
107
105
  stroke: "black"
108
106
  }, props.style), props);
109
107
 
110
108
  var tabIndex = _victoryCore.Helpers.evaluateProp(props.tabIndex, props);
111
109
 
112
- return (0, _assign2.default)({}, props, {
110
+ return Object.assign({}, props, {
113
111
  ariaLabel: ariaLabel,
114
112
  id: id,
115
113
  style: style,
@@ -183,7 +183,7 @@ var getLabelProps = function (dataProps, text, style) {
183
183
  var getBaseProps = function (initialProps, fallbackProps) {
184
184
  var modifiedProps = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "errorbar");
185
185
 
186
- var props = (0, _assign2.default)({}, modifiedProps, getCalculatedValues(modifiedProps));
186
+ var props = Object.assign({}, modifiedProps, getCalculatedValues(modifiedProps));
187
187
  var borderWidth = props.borderWidth,
188
188
  data = props.data,
189
189
  domain = props.domain,
@@ -254,7 +254,7 @@ var getBaseProps = function (initialProps, fallbackProps) {
254
254
  var text = _victoryCore.LabelHelpers.getText(props, datum, index);
255
255
 
256
256
  if (text !== undefined && text !== null || labels && (events || sharedEvents)) {
257
- childProps[eventKey].labels = getLabelProps((0, _assign2.default)({}, props, dataProps), text, style);
257
+ childProps[eventKey].labels = getLabelProps(Object.assign({}, props, dataProps), text, style);
258
258
  }
259
259
 
260
260
  return childProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-errorbar",
3
- "version": "36.8.4",
3
+ "version": "36.8.5",
4
4
  "description": "Error Bar Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
24
  "prop-types": "^15.8.1",
25
- "victory-core": "^36.8.4"
25
+ "victory-core": "^36.8.5"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.6.0"
package/src/error-bar.tsx CHANGED
@@ -9,7 +9,6 @@ import {
9
9
  VictoryCommonPrimitiveProps,
10
10
  EventsMixinClass,
11
11
  } from "victory-core";
12
- import { assign } from "lodash";
13
12
 
14
13
  const renderBorder = (props, error, type) => {
15
14
  const vertical = type === "right" || type === "left";
@@ -79,12 +78,12 @@ const evaluateProps = (props) => {
79
78
  const ariaLabel = Helpers.evaluateProp(props.ariaLabel, props);
80
79
  const id = Helpers.evaluateProp(props.id, props);
81
80
  const style = Helpers.evaluateStyle(
82
- assign({ stroke: "black" }, props.style),
81
+ Object.assign({ stroke: "black" }, props.style),
83
82
  props,
84
83
  );
85
84
  const tabIndex = Helpers.evaluateProp(props.tabIndex, props);
86
85
 
87
- return assign({}, props, { ariaLabel, id, style, tabIndex });
86
+ return Object.assign({}, props, { ariaLabel, id, style, tabIndex });
88
87
  };
89
88
 
90
89
  export interface ErrorBarProps extends VictoryCommonPrimitiveProps {
@@ -171,7 +171,11 @@ export const getBaseProps = (initialProps, fallbackProps) => {
171
171
  fallbackProps,
172
172
  "errorbar",
173
173
  );
174
- const props = assign({}, modifiedProps, getCalculatedValues(modifiedProps));
174
+ const props = Object.assign(
175
+ {},
176
+ modifiedProps,
177
+ getCalculatedValues(modifiedProps),
178
+ );
175
179
  const {
176
180
  borderWidth,
177
181
  data,
@@ -242,7 +246,7 @@ export const getBaseProps = (initialProps, fallbackProps) => {
242
246
  (labels && (events || sharedEvents))
243
247
  ) {
244
248
  childProps[eventKey].labels = getLabelProps(
245
- assign({}, props, dataProps),
249
+ Object.assign({}, props, dataProps),
246
250
  text,
247
251
  style,
248
252
  );