victory-group 37.3.2 → 37.3.3

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;
@@ -16,12 +17,7 @@ export declare function getCalculatedProps(initialProps: any, childComponents: a
16
17
  color: any;
17
18
  offset: any;
18
19
  origin: any;
19
- padding: {
20
- top: any;
21
- bottom: any;
22
- left: any;
23
- right: any;
24
- };
20
+ padding: Helpers.ElementPadding;
25
21
  };
26
22
  export declare function useMemoizedProps(initialProps: any): {
27
23
  datasets: any;
@@ -41,12 +37,7 @@ export declare function useMemoizedProps(initialProps: any): {
41
37
  color: any;
42
38
  offset: any;
43
39
  origin: any;
44
- padding: {
45
- top: any;
46
- bottom: any;
47
- left: any;
48
- right: any;
49
- };
40
+ padding: Helpers.ElementPadding;
50
41
  };
51
42
  export declare function getChildren(initialProps: any, childComponents?: any, calculatedProps?: any): any;
52
43
  //# sourceMappingURL=helper-methods.d.ts.map
@@ -41,7 +41,7 @@ export function getCalculatedProps(initialProps, childComponents) {
41
41
  y: baseScale.y.domain(domain.y).range(props.horizontal ? range.x : range.y)
42
42
  };
43
43
  const origin = polar ? props.origin : Helpers.getPolarOrigin(props);
44
- const padding = Helpers.getPadding(props);
44
+ const padding = Helpers.getPadding(props.padding);
45
45
  return {
46
46
  datasets,
47
47
  categories,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
- export declare type VictoryGroupTTargetType = "data" | "labels" | "parent";
3
+ export type VictoryGroupTTargetType = "data" | "labels" | "parent";
4
4
  export interface VictoryGroupProps extends VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps {
5
5
  children?: React.ReactNode;
6
6
  color?: string;
@@ -1,5 +1,5 @@
1
- import _isEmpty from "lodash/isEmpty";
2
- import _defaults from "lodash/defaults";
1
+ import defaults from "lodash/defaults";
2
+ import isEmpty from "lodash/isEmpty";
3
3
  import React from "react";
4
4
  import { Helpers, Hooks, UserProps, VictoryContainer, VictoryTheme, Wrapper } from "victory-core";
5
5
  import { VictorySharedEvents } from "victory-shared-events";
@@ -25,7 +25,7 @@ const VictoryGroupBase = initialProps => {
25
25
  setAnimationState,
26
26
  getProps
27
27
  } = Hooks.useAnimationState();
28
- const propsWithDefaults = React.useMemo(() => _defaults({}, initialProps, defaultProps), [initialProps]);
28
+ const propsWithDefaults = React.useMemo(() => defaults({}, initialProps, defaultProps), [initialProps]);
29
29
  const props = getProps(propsWithDefaults);
30
30
  const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
31
31
  const {
@@ -79,7 +79,7 @@ const VictoryGroupBase = initialProps => {
79
79
  const userProps = React.useMemo(() => UserProps.getSafeUserProps(propsWithDefaults), [propsWithDefaults]);
80
80
  const container = React.useMemo(() => {
81
81
  if (standalone) {
82
- const defaultContainerProps = _defaults({}, containerComponent.props, containerProps, userProps);
82
+ const defaultContainerProps = defaults({}, containerComponent.props, containerProps, userProps);
83
83
  return /*#__PURE__*/React.cloneElement(containerComponent, defaultContainerProps);
84
84
  }
85
85
  return /*#__PURE__*/React.cloneElement(groupComponent, userProps);
@@ -96,7 +96,7 @@ const VictoryGroupBase = initialProps => {
96
96
  }
97
97
  };
98
98
  }, [setAnimationState, previousProps, propsWithDefaults, props]);
99
- if (!_isEmpty(events)) {
99
+ if (!isEmpty(events)) {
100
100
  return /*#__PURE__*/React.createElement(VictorySharedEvents, {
101
101
  container: container,
102
102
  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;
@@ -16,12 +17,7 @@ export declare function getCalculatedProps(initialProps: any, childComponents: a
16
17
  color: any;
17
18
  offset: any;
18
19
  origin: any;
19
- padding: {
20
- top: any;
21
- bottom: any;
22
- left: any;
23
- right: any;
24
- };
20
+ padding: Helpers.ElementPadding;
25
21
  };
26
22
  export declare function useMemoizedProps(initialProps: any): {
27
23
  datasets: any;
@@ -41,12 +37,7 @@ export declare function useMemoizedProps(initialProps: any): {
41
37
  color: any;
42
38
  offset: any;
43
39
  origin: any;
44
- padding: {
45
- top: any;
46
- bottom: any;
47
- left: any;
48
- right: any;
49
- };
40
+ padding: Helpers.ElementPadding;
50
41
  };
51
42
  export declare function getChildren(initialProps: any, childComponents?: any, calculatedProps?: any): any;
52
43
  //# sourceMappingURL=helper-methods.d.ts.map
@@ -50,7 +50,7 @@ function getCalculatedProps(initialProps, childComponents) {
50
50
  y: baseScale.y.domain(domain.y).range(props.horizontal ? range.x : range.y)
51
51
  };
52
52
  const origin = polar ? props.origin : _victoryCore.Helpers.getPolarOrigin(props);
53
- const padding = _victoryCore.Helpers.getPadding(props);
53
+ const padding = _victoryCore.Helpers.getPadding(props.padding);
54
54
  return {
55
55
  datasets,
56
56
  categories,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
- export declare type VictoryGroupTTargetType = "data" | "labels" | "parent";
3
+ export type VictoryGroupTTargetType = "data" | "labels" | "parent";
4
4
  export interface VictoryGroupProps extends VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps {
5
5
  children?: React.ReactNode;
6
6
  color?: string;
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VictoryGroup = void 0;
7
- var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
8
- var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
7
+ var _defaults = _interopRequireDefault(require("lodash/defaults"));
8
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _victoryCore = require("victory-core");
11
11
  var _victorySharedEvents = require("victory-shared-events");
@@ -32,7 +32,7 @@ const VictoryGroupBase = initialProps => {
32
32
  setAnimationState,
33
33
  getProps
34
34
  } = _victoryCore.Hooks.useAnimationState();
35
- const propsWithDefaults = _react.default.useMemo(() => (0, _defaults2.default)({}, initialProps, defaultProps), [initialProps]);
35
+ const propsWithDefaults = _react.default.useMemo(() => (0, _defaults.default)({}, initialProps, defaultProps), [initialProps]);
36
36
  const props = getProps(propsWithDefaults);
37
37
  const modifiedProps = _victoryCore.Helpers.modifyProps(props, fallbackProps, role);
38
38
  const {
@@ -86,7 +86,7 @@ const VictoryGroupBase = initialProps => {
86
86
  const userProps = _react.default.useMemo(() => _victoryCore.UserProps.getSafeUserProps(propsWithDefaults), [propsWithDefaults]);
87
87
  const container = _react.default.useMemo(() => {
88
88
  if (standalone) {
89
- const defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps, userProps);
89
+ const defaultContainerProps = (0, _defaults.default)({}, containerComponent.props, containerProps, userProps);
90
90
  return /*#__PURE__*/_react.default.cloneElement(containerComponent, defaultContainerProps);
91
91
  }
92
92
  return /*#__PURE__*/_react.default.cloneElement(groupComponent, userProps);
@@ -103,7 +103,7 @@ const VictoryGroupBase = initialProps => {
103
103
  }
104
104
  };
105
105
  }, [setAnimationState, previousProps, propsWithDefaults, props]);
106
- if (!(0, _isEmpty2.default)(events)) {
106
+ if (!(0, _isEmpty.default)(events)) {
107
107
  return /*#__PURE__*/_react.default.createElement(_victorySharedEvents.VictorySharedEvents, {
108
108
  container: container,
109
109
  eventKey: eventKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-group",
3
- "version": "37.3.2",
3
+ "version": "37.3.3",
4
4
  "description": "Group 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.3",
26
+ "victory-shared-events": "37.3.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "victory-bar": "*"
@@ -192,32 +192,6 @@
192
192
  "pnpm-lock.yaml"
193
193
  ]
194
194
  },
195
- "format": {
196
- "command": "nps format:pkg",
197
- "files": [
198
- "src/**",
199
- "*.json",
200
- "../../.prettierignore",
201
- "../../.prettierrc.json"
202
- ],
203
- "output": [],
204
- "packageLocks": [
205
- "pnpm-lock.yaml"
206
- ]
207
- },
208
- "format:fix": {
209
- "command": "pnpm run format || nps format:pkg:fix",
210
- "files": [
211
- "src/**",
212
- "*.json",
213
- "../../.prettierignore",
214
- "../../.prettierrc.json"
215
- ],
216
- "output": [],
217
- "packageLocks": [
218
- "pnpm-lock.yaml"
219
- ]
220
- },
221
195
  "lint": {
222
196
  "command": "eslint src",
223
197
  "files": [
@@ -286,8 +260,6 @@
286
260
  "check": "wireit",
287
261
  "types:check": "wireit",
288
262
  "types:create": "wireit",
289
- "format": "wireit",
290
- "format:fix": "wireit",
291
263
  "lint": "wireit",
292
264
  "lint:fix": "wireit",
293
265
  "jest": "wireit"
@@ -43,7 +43,7 @@ export function getCalculatedProps(initialProps, childComponents) {
43
43
  };
44
44
 
45
45
  const origin = polar ? props.origin : Helpers.getPolarOrigin(props);
46
- const padding = Helpers.getPadding(props);
46
+ const padding = Helpers.getPadding(props.padding);
47
47
  return {
48
48
  datasets,
49
49
  categories,
@@ -1,4 +1,5 @@
1
- import { defaults, isEmpty } from "lodash";
1
+ import defaults from "lodash/defaults";
2
+ import isEmpty from "lodash/isEmpty";
2
3
  import React from "react";
3
4
  import {
4
5
  EventPropTypeInterface,