victory-stack 37.3.2 → 37.3.4

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,3 +1,4 @@
1
+ import { Helpers } from "victory-core";
1
2
  export declare function getCalculatedProps(initialProps: any, childComponents: any): {
2
3
  datasets: any;
3
4
  categories: any;
@@ -35,12 +36,7 @@ export declare function useMemoizedProps(initialProps: any): {
35
36
  export declare function getChildProps(props: any, calculatedProps: any): {
36
37
  height: any;
37
38
  width: any;
38
- padding: {
39
- top: any;
40
- bottom: any;
41
- left: any;
42
- right: any;
43
- };
39
+ padding: Helpers.ElementPadding;
44
40
  standalone: boolean;
45
41
  theme: any;
46
42
  categories: any;
@@ -1,4 +1,4 @@
1
- import _orderBy from "lodash/orderBy";
1
+ import orderBy from "lodash/orderBy";
2
2
  import React from "react";
3
3
  import { Helpers, Scale, Wrapper } from "victory-core";
4
4
  import isEqual from "react-fast-compare";
@@ -20,7 +20,7 @@ function fillData(props, datasets) {
20
20
  return prev;
21
21
  }, {});
22
22
  const xKeys = Object.keys(xMap).map(k => Number(k));
23
- const xArr = _orderBy(xKeys);
23
+ const xArr = orderBy(xKeys);
24
24
  return datasets.map(dataset => {
25
25
  let indexOffset = 0;
26
26
  const isDate = dataset[0] && dataset[0]._x instanceof Date;
@@ -189,7 +189,7 @@ export function getChildProps(props, calculatedProps) {
189
189
  return {
190
190
  height: props.height,
191
191
  width: props.width,
192
- padding: Helpers.getPadding(props),
192
+ padding: Helpers.getPadding(props.padding),
193
193
  standalone: false,
194
194
  theme: props.theme,
195
195
  categories,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { CategoryPropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
- export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
3
+ export type VictoryStackTTargetType = "data" | "labels" | "parent";
4
4
  export interface VictoryStackProps extends VictoryCommonProps, VictoryMultiLabelableProps {
5
5
  bins?: number | number[] | Date[];
6
6
  categories?: CategoryPropType;
@@ -1,6 +1,6 @@
1
- import _isEmpty from "lodash/isEmpty";
2
- import _defaults from "lodash/defaults";
3
1
  import React from "react";
2
+ import defaults from "lodash/defaults";
3
+ import isEmpty from "lodash/isEmpty";
4
4
  import { Helpers, Hooks, UserProps, VictoryContainer, VictoryTheme, Wrapper } from "victory-core";
5
5
  import { VictorySharedEvents } from "victory-shared-events";
6
6
  import { getChildren, useMemoizedProps } from "./helper-methods";
@@ -21,7 +21,7 @@ const VictoryStackBase = initialProps => {
21
21
  const {
22
22
  role
23
23
  } = VictoryStack;
24
- const propsWithDefaults = React.useMemo(() => _defaults({}, initialProps, defaultProps), [initialProps]);
24
+ const propsWithDefaults = React.useMemo(() => defaults({}, initialProps, defaultProps), [initialProps]);
25
25
  const {
26
26
  setAnimationState,
27
27
  getAnimationProps,
@@ -84,7 +84,7 @@ const VictoryStackBase = initialProps => {
84
84
  const userProps = React.useMemo(() => UserProps.getSafeUserProps(propsWithDefaults), [propsWithDefaults]);
85
85
  const container = React.useMemo(() => {
86
86
  if (standalone) {
87
- const defaultContainerProps = _defaults({}, containerComponent.props, containerProps, userProps);
87
+ const defaultContainerProps = defaults({}, containerComponent.props, containerProps, userProps);
88
88
  return /*#__PURE__*/React.cloneElement(containerComponent, defaultContainerProps);
89
89
  }
90
90
  return /*#__PURE__*/React.cloneElement(groupComponent, userProps);
@@ -101,7 +101,7 @@ const VictoryStackBase = initialProps => {
101
101
  }
102
102
  };
103
103
  }, [setAnimationState, previousProps, propsWithDefaults]);
104
- if (!_isEmpty(events)) {
104
+ if (!isEmpty(events)) {
105
105
  return /*#__PURE__*/React.createElement(VictorySharedEvents, {
106
106
  container: container,
107
107
  eventKey: eventKey,
@@ -1,3 +1,4 @@
1
+ import { Helpers } from "victory-core";
1
2
  export declare function getCalculatedProps(initialProps: any, childComponents: any): {
2
3
  datasets: any;
3
4
  categories: any;
@@ -35,12 +36,7 @@ export declare function useMemoizedProps(initialProps: any): {
35
36
  export declare function getChildProps(props: any, calculatedProps: any): {
36
37
  height: any;
37
38
  width: any;
38
- padding: {
39
- top: any;
40
- bottom: any;
41
- left: any;
42
- right: any;
43
- };
39
+ padding: Helpers.ElementPadding;
44
40
  standalone: boolean;
45
41
  theme: any;
46
42
  categories: any;
@@ -7,7 +7,7 @@ exports.getCalculatedProps = getCalculatedProps;
7
7
  exports.getChildProps = getChildProps;
8
8
  exports.getChildren = getChildren;
9
9
  exports.useMemoizedProps = useMemoizedProps;
10
- var _orderBy2 = _interopRequireDefault(require("lodash/orderBy"));
10
+ var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
11
11
  var _react = _interopRequireDefault(require("react"));
12
12
  var _victoryCore = require("victory-core");
13
13
  var _reactFastCompare = _interopRequireDefault(require("react-fast-compare"));
@@ -30,7 +30,7 @@ function fillData(props, datasets) {
30
30
  return prev;
31
31
  }, {});
32
32
  const xKeys = Object.keys(xMap).map(k => Number(k));
33
- const xArr = (0, _orderBy2.default)(xKeys);
33
+ const xArr = (0, _orderBy.default)(xKeys);
34
34
  return datasets.map(dataset => {
35
35
  let indexOffset = 0;
36
36
  const isDate = dataset[0] && dataset[0]._x instanceof Date;
@@ -199,7 +199,7 @@ function getChildProps(props, calculatedProps) {
199
199
  return {
200
200
  height: props.height,
201
201
  width: props.width,
202
- padding: _victoryCore.Helpers.getPadding(props),
202
+ padding: _victoryCore.Helpers.getPadding(props.padding),
203
203
  standalone: false,
204
204
  theme: props.theme,
205
205
  categories,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { CategoryPropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
- export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
3
+ export type VictoryStackTTargetType = "data" | "labels" | "parent";
4
4
  export interface VictoryStackProps extends VictoryCommonProps, VictoryMultiLabelableProps {
5
5
  bins?: number | number[] | Date[];
6
6
  categories?: CategoryPropType;
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VictoryStack = void 0;
7
- var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
8
- var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
9
7
  var _react = _interopRequireDefault(require("react"));
8
+ var _defaults = _interopRequireDefault(require("lodash/defaults"));
9
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
10
10
  var _victoryCore = require("victory-core");
11
11
  var _victorySharedEvents = require("victory-shared-events");
12
12
  var _helperMethods = require("./helper-methods");
@@ -28,7 +28,7 @@ const VictoryStackBase = initialProps => {
28
28
  const {
29
29
  role
30
30
  } = VictoryStack;
31
- const propsWithDefaults = _react.default.useMemo(() => (0, _defaults2.default)({}, initialProps, defaultProps), [initialProps]);
31
+ const propsWithDefaults = _react.default.useMemo(() => (0, _defaults.default)({}, initialProps, defaultProps), [initialProps]);
32
32
  const {
33
33
  setAnimationState,
34
34
  getAnimationProps,
@@ -91,7 +91,7 @@ const VictoryStackBase = initialProps => {
91
91
  const userProps = _react.default.useMemo(() => _victoryCore.UserProps.getSafeUserProps(propsWithDefaults), [propsWithDefaults]);
92
92
  const container = _react.default.useMemo(() => {
93
93
  if (standalone) {
94
- const defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps, userProps);
94
+ const defaultContainerProps = (0, _defaults.default)({}, containerComponent.props, containerProps, userProps);
95
95
  return /*#__PURE__*/_react.default.cloneElement(containerComponent, defaultContainerProps);
96
96
  }
97
97
  return /*#__PURE__*/_react.default.cloneElement(groupComponent, userProps);
@@ -108,7 +108,7 @@ const VictoryStackBase = initialProps => {
108
108
  }
109
109
  };
110
110
  }, [setAnimationState, previousProps, propsWithDefaults]);
111
- if (!(0, _isEmpty2.default)(events)) {
111
+ if (!(0, _isEmpty.default)(events)) {
112
112
  return /*#__PURE__*/_react.default.createElement(_victorySharedEvents.VictorySharedEvents, {
113
113
  container: container,
114
114
  eventKey: eventKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-stack",
3
- "version": "37.3.2",
3
+ "version": "37.3.4",
4
4
  "description": "Stack Layout Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
24
  "react-fast-compare": "^3.2.0",
25
- "victory-core": "37.3.2",
26
- "victory-shared-events": "37.3.2"
25
+ "victory-core": "37.3.4",
26
+ "victory-shared-events": "37.3.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": ">=16.6.0"
@@ -196,32 +196,6 @@
196
196
  "pnpm-lock.yaml"
197
197
  ]
198
198
  },
199
- "format": {
200
- "command": "nps format:pkg",
201
- "files": [
202
- "src/**",
203
- "*.json",
204
- "../../.prettierignore",
205
- "../../.prettierrc.json"
206
- ],
207
- "output": [],
208
- "packageLocks": [
209
- "pnpm-lock.yaml"
210
- ]
211
- },
212
- "format:fix": {
213
- "command": "pnpm run format || nps format:pkg:fix",
214
- "files": [
215
- "src/**",
216
- "*.json",
217
- "../../.prettierignore",
218
- "../../.prettierrc.json"
219
- ],
220
- "output": [],
221
- "packageLocks": [
222
- "pnpm-lock.yaml"
223
- ]
224
- },
225
199
  "lint": {
226
200
  "command": "eslint src",
227
201
  "files": [
@@ -296,8 +270,6 @@
296
270
  "check": "wireit",
297
271
  "types:check": "wireit",
298
272
  "types:create": "wireit",
299
- "format": "wireit",
300
- "format:fix": "wireit",
301
273
  "lint": "wireit",
302
274
  "lint:fix": "wireit",
303
275
  "jest": "wireit"
@@ -1,4 +1,4 @@
1
- import { orderBy } from "lodash";
1
+ import orderBy from "lodash/orderBy";
2
2
  import React from "react";
3
3
  import { Helpers, Scale, Wrapper } from "victory-core";
4
4
  import isEqual from "react-fast-compare";
@@ -211,7 +211,7 @@ export function getChildProps(props, calculatedProps) {
211
211
  return {
212
212
  height: props.height,
213
213
  width: props.width,
214
- padding: Helpers.getPadding(props),
214
+ padding: Helpers.getPadding(props.padding),
215
215
  standalone: false,
216
216
  theme: props.theme,
217
217
  categories,
@@ -1,5 +1,7 @@
1
- import { defaults, isEmpty } from "lodash";
2
1
  import React from "react";
2
+ import defaults from "lodash/defaults";
3
+ import isEmpty from "lodash/isEmpty";
4
+
3
5
  import {
4
6
  CategoryPropType,
5
7
  DomainPropType,