victory-stack
Advanced tools
Comparing version 36.6.0 to 36.6.1
# victory-stack | ||
## 36.6.1 | ||
### Patch Changes | ||
- - Migrate `victory-stack` to TypeScript ([#2422](https://github.com/FormidableLabs/victory/pull/2422)) | ||
- Updated dependencies [[`d1f281104`](https://github.com/FormidableLabs/victory/commit/d1f281104c7598c43e220dafd57546ab03daeeb5)]: | ||
- victory-core@36.6.1 | ||
- victory-shared-events@36.6.1 | ||
## 36.6.0 | ||
@@ -4,0 +14,0 @@ |
@@ -194,3 +194,4 @@ import _orderBy from "lodash/orderBy"; | ||
var children = props.children; | ||
var modifiedChildren = React.Children.toArray(children).map(function (child) { | ||
var modifiedChildren = React.Children.toArray(children).map(function (_child) { | ||
var child = _child; | ||
return _objectSpread(_objectSpread({}, child), {}, { | ||
@@ -197,0 +198,0 @@ props: Helpers.omit(child.props, ["sharedEvents"]) |
@@ -1,35 +0,2 @@ | ||
import * as React from "react"; | ||
import { | ||
CategoryPropType, | ||
ColorScalePropType, | ||
DomainPropType, | ||
EventPropTypeInterface, | ||
StringOrNumberOrCallback, | ||
VictoryCommonProps, | ||
VictoryLabelableProps, | ||
VictoryMultiLabelableProps, | ||
VictoryStyleInterface, | ||
} from "victory-core"; | ||
export type VictoryStackTTargetType = "data" | "labels" | "parent"; | ||
export interface VictoryStackProps | ||
extends VictoryCommonProps, | ||
VictoryLabelableProps, | ||
VictoryMultiLabelableProps { | ||
bins?: number | number[] | Date[]; | ||
categories?: CategoryPropType; | ||
children?: React.ReactNode | React.ReactNode[]; | ||
colorScale?: ColorScalePropType; | ||
domain?: DomainPropType; | ||
events?: EventPropTypeInterface< | ||
VictoryStackTTargetType, | ||
StringOrNumberOrCallback | ||
>[]; | ||
eventKey?: StringOrNumberOrCallback; | ||
fillInMissingData?: boolean; | ||
style?: VictoryStyleInterface; | ||
xOffset?: number; | ||
} | ||
export class VictoryStack extends React.Component<VictoryStackProps, any> {} | ||
export * from "./victory-stack"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export { default as VictoryStack } from "./victory-stack"; | ||
export * from "./victory-stack"; | ||
//# sourceMappingURL=index.js.map |
@@ -23,5 +23,5 @@ import _isEmpty from "lodash/isEmpty"; | ||
var VictoryStack = function (initialProps) { | ||
var VictoryStackBase = function (initialProps) { | ||
// eslint-disable-next-line no-use-before-define | ||
var role = VictoryStackMemo.role; | ||
var role = VictoryStack.role; | ||
@@ -50,4 +50,3 @@ var _Hooks$useAnimationSt = Hooks.useAnimationState(), | ||
scale = calculatedProps.scale, | ||
style = calculatedProps.style, | ||
origin = calculatedProps.origin; | ||
style = calculatedProps.style; | ||
var newChildren = React.useMemo(function () { | ||
@@ -57,3 +56,3 @@ var children = getChildren(props, childComponents, calculatedProps); | ||
var childProps = _assign({ | ||
animate: getAnimationProps(props, child, index, "victory-stack") | ||
animate: getAnimationProps(props, child, index) | ||
}, child.props); | ||
@@ -83,3 +82,2 @@ | ||
polar: polar, | ||
origin: origin, | ||
name: name | ||
@@ -90,3 +88,3 @@ }; | ||
return {}; | ||
}, [standalone, domain, scale, width, height, theme, style, horizontal, polar, origin, name]); | ||
}, [standalone, domain, scale, width, height, theme, style, horizontal, polar, name]); | ||
var userProps = React.useMemo(function () { | ||
@@ -129,3 +127,3 @@ return UserProps.getSafeUserProps(initialProps); | ||
VictoryStack.propTypes = _objectSpread(_objectSpread({}, CommonProps.baseProps), {}, { | ||
VictoryStackBase.propTypes = _objectSpread(_objectSpread({}, CommonProps.baseProps), {}, { | ||
bins: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([CustomPropTypes.nonNegative, PropTypes.instanceOf(Date)])), CustomPropTypes.nonNegative]), | ||
@@ -149,3 +147,3 @@ categories: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.shape({ | ||
}); | ||
VictoryStack.defaultProps = { | ||
VictoryStackBase.defaultProps = { | ||
containerComponent: /*#__PURE__*/React.createElement(VictoryContainer, null), | ||
@@ -157,8 +155,9 @@ groupComponent: /*#__PURE__*/React.createElement("g", null), | ||
}; | ||
var VictoryStackMemo = /*#__PURE__*/React.memo(VictoryStack, isEqual); | ||
VictoryStackMemo.displayName = "VictoryStack"; | ||
VictoryStackMemo.role = "stack"; | ||
VictoryStackMemo.expectedComponents = ["groupComponent", "containerComponent", "labelComponent"]; | ||
VictoryStackMemo.getChildren = getChildren; | ||
export default VictoryStackMemo; | ||
var componentConfig = { | ||
role: "stack", | ||
expectedComponents: ["groupComponent", "containerComponent", "labelComponent"], | ||
getChildren: getChildren | ||
}; | ||
export var VictoryStack = Object.assign( /*#__PURE__*/React.memo(VictoryStackBase, isEqual), componentConfig); | ||
VictoryStack.displayName = "VictoryStack"; | ||
//# sourceMappingURL=victory-stack.js.map |
@@ -214,3 +214,4 @@ "use strict"; | ||
var modifiedChildren = _react.default.Children.toArray(children).map(function (child) { | ||
var modifiedChildren = _react.default.Children.toArray(children).map(function (_child) { | ||
var child = _child; | ||
return _objectSpread(_objectSpread({}, child), {}, { | ||
@@ -217,0 +218,0 @@ props: _victoryCore.Helpers.omit(child.props, ["sharedEvents"]) |
@@ -1,35 +0,2 @@ | ||
import * as React from "react"; | ||
import { | ||
CategoryPropType, | ||
ColorScalePropType, | ||
DomainPropType, | ||
EventPropTypeInterface, | ||
StringOrNumberOrCallback, | ||
VictoryCommonProps, | ||
VictoryLabelableProps, | ||
VictoryMultiLabelableProps, | ||
VictoryStyleInterface, | ||
} from "victory-core"; | ||
export type VictoryStackTTargetType = "data" | "labels" | "parent"; | ||
export interface VictoryStackProps | ||
extends VictoryCommonProps, | ||
VictoryLabelableProps, | ||
VictoryMultiLabelableProps { | ||
bins?: number | number[] | Date[]; | ||
categories?: CategoryPropType; | ||
children?: React.ReactNode | React.ReactNode[]; | ||
colorScale?: ColorScalePropType; | ||
domain?: DomainPropType; | ||
events?: EventPropTypeInterface< | ||
VictoryStackTTargetType, | ||
StringOrNumberOrCallback | ||
>[]; | ||
eventKey?: StringOrNumberOrCallback; | ||
fillInMissingData?: boolean; | ||
style?: VictoryStyleInterface; | ||
xOffset?: number; | ||
} | ||
export class VictoryStack extends React.Component<VictoryStackProps, any> {} | ||
export * from "./victory-stack"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,12 +6,15 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "VictoryStack", { | ||
enumerable: true, | ||
get: function () { | ||
return _victoryStack.default; | ||
} | ||
}); | ||
var _victoryStack = _interopRequireDefault(require("./victory-stack")); | ||
var _victoryStack = require("./victory-stack"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
Object.keys(_victoryStack).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _victoryStack[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _victoryStack[key]; | ||
} | ||
}); | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.default = void 0; | ||
exports.VictoryStack = void 0; | ||
@@ -41,5 +41,5 @@ var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty")); | ||
var VictoryStack = function (initialProps) { | ||
var VictoryStackBase = function (initialProps) { | ||
// eslint-disable-next-line no-use-before-define | ||
var role = VictoryStackMemo.role; | ||
var role = VictoryStack.role; | ||
@@ -72,4 +72,3 @@ var _Hooks$useAnimationSt = _victoryCore.Hooks.useAnimationState(), | ||
scale = calculatedProps.scale, | ||
style = calculatedProps.style, | ||
origin = calculatedProps.origin; | ||
style = calculatedProps.style; | ||
@@ -80,3 +79,3 @@ var newChildren = _react.default.useMemo(function () { | ||
var childProps = (0, _assign2.default)({ | ||
animate: getAnimationProps(props, child, index, "victory-stack") | ||
animate: getAnimationProps(props, child, index) | ||
}, child.props); | ||
@@ -106,3 +105,2 @@ return /*#__PURE__*/_react.default.cloneElement(child, childProps); | ||
polar: polar, | ||
origin: origin, | ||
name: name | ||
@@ -113,3 +111,3 @@ }; | ||
return {}; | ||
}, [standalone, domain, scale, width, height, theme, style, horizontal, polar, origin, name]); | ||
}, [standalone, domain, scale, width, height, theme, style, horizontal, polar, name]); | ||
@@ -156,3 +154,3 @@ var userProps = _react.default.useMemo(function () { | ||
VictoryStack.propTypes = _objectSpread(_objectSpread({}, _victoryCore.CommonProps.baseProps), {}, { | ||
VictoryStackBase.propTypes = _objectSpread(_objectSpread({}, _victoryCore.CommonProps.baseProps), {}, { | ||
bins: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.instanceOf(Date)])), _victoryCore.PropTypes.nonNegative]), | ||
@@ -176,3 +174,3 @@ categories: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.shape({ | ||
}); | ||
VictoryStack.defaultProps = { | ||
VictoryStackBase.defaultProps = { | ||
containerComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryContainer, null), | ||
@@ -184,11 +182,10 @@ groupComponent: /*#__PURE__*/_react.default.createElement("g", null), | ||
}; | ||
var VictoryStackMemo = /*#__PURE__*/_react.default.memo(VictoryStack, _reactFastCompare.default); | ||
VictoryStackMemo.displayName = "VictoryStack"; | ||
VictoryStackMemo.role = "stack"; | ||
VictoryStackMemo.expectedComponents = ["groupComponent", "containerComponent", "labelComponent"]; | ||
VictoryStackMemo.getChildren = _helperMethods.getChildren; | ||
var _default = VictoryStackMemo; | ||
exports.default = _default; | ||
var componentConfig = { | ||
role: "stack", | ||
expectedComponents: ["groupComponent", "containerComponent", "labelComponent"], | ||
getChildren: _helperMethods.getChildren | ||
}; | ||
var VictoryStack = Object.assign( /*#__PURE__*/_react.default.memo(VictoryStackBase, _reactFastCompare.default), componentConfig); | ||
exports.VictoryStack = VictoryStack; | ||
VictoryStack.displayName = "VictoryStack"; | ||
//# sourceMappingURL=victory-stack.js.map |
{ | ||
"name": "victory-stack", | ||
"version": "36.6.0", | ||
"version": "36.6.1", | ||
"description": "Stack Layout Component for Victory", | ||
@@ -26,4 +26,4 @@ "keywords": [ | ||
"react-fast-compare": "^3.2.0", | ||
"victory-core": "^36.6.0", | ||
"victory-shared-events": "^36.6.0" | ||
"victory-core": "^36.6.1", | ||
"victory-shared-events": "^36.6.1" | ||
}, | ||
@@ -34,3 +34,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"victory-histogram": "^36.6.0" | ||
"victory-bar": "*", | ||
"victory-histogram": "*", | ||
"victory-stack": "*" | ||
}, | ||
@@ -137,2 +139,10 @@ "wireit": { | ||
}, | ||
"check": { | ||
"dependencies": [ | ||
"types:check", | ||
"jest", | ||
"format", | ||
"lint" | ||
] | ||
}, | ||
"types:check": { | ||
@@ -149,2 +159,3 @@ "command": "nps types:pkg:check", | ||
"../victory-shared-events:types:create", | ||
"../victory-bar:types:create", | ||
"../victory-histogram:types:create", | ||
@@ -194,2 +205,15 @@ "../victory-vendor:types:create", | ||
}, | ||
"format:fix": { | ||
"command": "pnpm run format || nps format:pkg:fix", | ||
"files": [ | ||
"src/**", | ||
"*.json", | ||
"../../.prettierignore", | ||
"../../.prettierrc.json" | ||
], | ||
"output": [], | ||
"packageLocks": [ | ||
"pnpm-lock.yaml" | ||
] | ||
}, | ||
"lint": { | ||
@@ -206,2 +230,3 @@ "command": "nps lint:pkg", | ||
"../victory-shared-events:types:create", | ||
"../victory-bar:types:create", | ||
"../victory-histogram:types:create", | ||
@@ -215,15 +240,2 @@ "../victory-vendor:types:create", | ||
}, | ||
"format:fix": { | ||
"command": "pnpm run format || nps format:pkg:fix", | ||
"files": [ | ||
"src/**", | ||
"*.json", | ||
"../../.prettierignore", | ||
"../../.prettierrc.json" | ||
], | ||
"output": [], | ||
"packageLocks": [ | ||
"pnpm-lock.yaml" | ||
] | ||
}, | ||
"lint:fix": { | ||
@@ -240,2 +252,3 @@ "command": "pnpm run lint || nps lint:pkg:fix", | ||
"../victory-shared-events:types:create", | ||
"../victory-bar:types:create", | ||
"../victory-histogram:types:create", | ||
@@ -260,2 +273,3 @@ "../victory-vendor:types:create", | ||
"build:lib:cjs", | ||
"../victory-bar:build:lib:cjs", | ||
"../victory-histogram:build:lib:cjs", | ||
@@ -280,2 +294,3 @@ "../victory-vendor:build:lib:cjs", | ||
"build:dist:min": "wireit", | ||
"check": "wireit", | ||
"types:check": "wireit", | ||
@@ -282,0 +297,0 @@ "types:create": "wireit", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1031608
21
18327
3
3
Updatedvictory-core@^36.6.1