victory-box-plot 36.8.3 → 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.
@@ -1,13 +1,4 @@
1
- import {
2
- orderBy,
3
- defaults,
4
- assign,
5
- uniq,
6
- groupBy,
7
- keys,
8
- isNaN,
9
- isNil,
10
- } from "lodash";
1
+ import { orderBy, defaults, uniq, groupBy, keys, isNaN, isNil } from "lodash";
11
2
  import { Helpers, Scale, Domain, Data, Collection } from "victory-core";
12
3
  import {
13
4
  min as d3Min,
@@ -51,7 +42,7 @@ const getSummaryStatistics = (data) => {
51
42
  _max: nanToNull(d3Max(dependentVars)),
52
43
  };
53
44
 
54
- return assign({}, data[0], quartiles, { _y: data[0]._y });
45
+ return Object.assign({}, data[0], quartiles, { _y: data[0]._y });
55
46
  };
56
47
 
57
48
  const processData = (data) => {
@@ -73,7 +64,7 @@ const processData = (data) => {
73
64
  the depedentVarArray and process each datum separately */
74
65
  return data.map((datum) => {
75
66
  const dataArray = datum[sortKey].map((d) =>
76
- assign({}, datum, { [sortKey]: d }),
67
+ Object.assign({}, datum, { [sortKey]: d }),
77
68
  );
78
69
  const sortedData = orderBy(dataArray, sortKey);
79
70
  return getSummaryStatistics(sortedData);
@@ -463,7 +454,11 @@ export const getBaseProps = (initialProps, fallbackProps) => {
463
454
  fallbackProps,
464
455
  "boxplot",
465
456
  );
466
- const props = assign({}, modifiedProps, getCalculatedValues(modifiedProps));
457
+ const props = Object.assign(
458
+ {},
459
+ modifiedProps,
460
+ getCalculatedValues(modifiedProps),
461
+ );
467
462
  const {
468
463
  groupComponent,
469
464
  width,
@@ -511,7 +506,7 @@ export const getBaseProps = (initialProps, fallbackProps) => {
511
506
  q1: boxScale(datum._q1),
512
507
  q3: boxScale(datum._q3),
513
508
  };
514
- const dataProps = assign({ index, datum, positions }, props);
509
+ const dataProps = Object.assign({ index, datum, positions }, props);
515
510
  const dataObj = TYPES.reduce((memo, type) => {
516
511
  memo[type] = getDataProps(dataProps, type);
517
512
  return memo;
@@ -528,7 +523,7 @@ export const getBaseProps = (initialProps, fallbackProps) => {
528
523
  ) {
529
524
  const target = `${type}Labels`;
530
525
  acc[eventKey][target] = getLabelProps(
531
- assign({}, props, dataProps),
526
+ Object.assign({}, props, dataProps),
532
527
  labelText,
533
528
  type,
534
529
  );
@@ -283,7 +283,7 @@ class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
283
283
  whiskerWidth: PropTypes.number,
284
284
  };
285
285
 
286
- static defaultProps = {
286
+ static defaultProps: VictoryBoxPlotProps = {
287
287
  containerComponent: <VictoryContainer />,
288
288
  data: defaultData,
289
289
  dataComponent: <Box />,