From 8d0fe0d91cfdc7efb1428b341afa087a3fdb411a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Benitte?= Date: Thu, 19 Dec 2019 07:45:02 +0900 Subject: [PATCH] fix(prop-types): fix missing prop types on various packages --- packages/bar/src/BarItem.js | 4 ++++ packages/bump/src/area-bump/AnimatedArea.js | 1 + packages/bump/src/area-bump/StaticArea.js | 1 + packages/bump/src/bump/AnimatedLine.js | 1 + packages/bump/src/bump/StaticLine.js | 1 + packages/pie/src/PieSlice.js | 1 + packages/pie/src/PieTooltip.js | 1 + packages/sankey/src/SankeyLinksItem.js | 4 ++++ packages/sunburst/src/SunburstArc.js | 6 +++++- packages/swarmplot/src/SwarmPlotTooltip.js | 1 + packages/treemap/src/TreeMapNode.js | 1 + 11 files changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/bar/src/BarItem.js b/packages/bar/src/BarItem.js index 5948da77e..f1eedd163 100644 --- a/packages/bar/src/BarItem.js +++ b/packages/bar/src/BarItem.js @@ -87,6 +87,7 @@ BarItem.propTypes = { id: PropTypes.string.isRequired, value: PropTypes.number.isRequired, indexValue: PropTypes.string.isRequired, + fill: PropTypes.string, }).isRequired, x: PropTypes.number.isRequired, @@ -113,6 +114,9 @@ BarItem.propTypes = { theme: PropTypes.shape({ tooltip: PropTypes.shape({}).isRequired, + labels: PropTypes.shape({ + text: PropTypes.object.isRequired, + }).isRequired, }).isRequired, } diff --git a/packages/bump/src/area-bump/AnimatedArea.js b/packages/bump/src/area-bump/AnimatedArea.js index a127a8ebd..1fadd2a19 100644 --- a/packages/bump/src/area-bump/AnimatedArea.js +++ b/packages/bump/src/area-bump/AnimatedArea.js @@ -54,6 +54,7 @@ AnimatedArea.propTypes = { serie: PropTypes.shape({ id: PropTypes.string.isRequired, color: PropTypes.string.isRequired, + areaPoints: PropTypes.array.isRequired, style: PropTypes.shape({ fillOpacity: PropTypes.number.isRequired, borderWidth: PropTypes.number.isRequired, diff --git a/packages/bump/src/area-bump/StaticArea.js b/packages/bump/src/area-bump/StaticArea.js index 6b43226d2..4d6b7deed 100644 --- a/packages/bump/src/area-bump/StaticArea.js +++ b/packages/bump/src/area-bump/StaticArea.js @@ -40,6 +40,7 @@ StaticArea.propTypes = { serie: PropTypes.shape({ id: PropTypes.string.isRequired, color: PropTypes.string.isRequired, + areaPoints: PropTypes.array.isRequired, style: PropTypes.shape({ fillOpacity: PropTypes.number.isRequired, borderWidth: PropTypes.number.isRequired, diff --git a/packages/bump/src/bump/AnimatedLine.js b/packages/bump/src/bump/AnimatedLine.js index 02f99bacd..fd3cd49b7 100644 --- a/packages/bump/src/bump/AnimatedLine.js +++ b/packages/bump/src/bump/AnimatedLine.js @@ -68,6 +68,7 @@ AnimatedLine.propTypes = { serie: PropTypes.shape({ id: PropTypes.string.isRequired, color: PropTypes.string.isRequired, + linePoints: PropTypes.array.isRequired, style: PropTypes.shape({ lineWidth: PropTypes.number.isRequired, opacity: PropTypes.number.isRequired, diff --git a/packages/bump/src/bump/StaticLine.js b/packages/bump/src/bump/StaticLine.js index d31e3b152..7854b5d29 100644 --- a/packages/bump/src/bump/StaticLine.js +++ b/packages/bump/src/bump/StaticLine.js @@ -54,6 +54,7 @@ StaticLine.propTypes = { serie: PropTypes.shape({ id: PropTypes.string.isRequired, color: PropTypes.string.isRequired, + linePoints: PropTypes.array.isRequired, style: PropTypes.shape({ lineWidth: PropTypes.number.isRequired, opacity: PropTypes.number.isRequired, diff --git a/packages/pie/src/PieSlice.js b/packages/pie/src/PieSlice.js index 036d85f8f..15feeba2a 100644 --- a/packages/pie/src/PieSlice.js +++ b/packages/pie/src/PieSlice.js @@ -74,6 +74,7 @@ const PieSlice = ({ PieSlice.propTypes = { data: PropTypes.shape({ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, + label: PropTypes.string.isRequired, value: PropTypes.number.isRequired, }).isRequired, diff --git a/packages/pie/src/PieTooltip.js b/packages/pie/src/PieTooltip.js index 7de9c2194..1ffbefae9 100644 --- a/packages/pie/src/PieTooltip.js +++ b/packages/pie/src/PieTooltip.js @@ -30,6 +30,7 @@ const PieTooltip = ({ data, color, tooltipFormat, tooltip, theme }) => { PieTooltip.propTypes = { data: PropTypes.shape({ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, + label: PropTypes.string.isRequired, value: PropTypes.number.isRequired, }).isRequired, color: PropTypes.string.isRequired, diff --git a/packages/sankey/src/SankeyLinksItem.js b/packages/sankey/src/SankeyLinksItem.js index 90ad5a60e..143b4129e 100644 --- a/packages/sankey/src/SankeyLinksItem.js +++ b/packages/sankey/src/SankeyLinksItem.js @@ -43,10 +43,12 @@ TooltipContent.propTypes = { source: PropTypes.shape({ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, + color: PropTypes.string.isRequired, }).isRequired, target: PropTypes.shape({ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, + color: PropTypes.string.isRequired, }).isRequired, color: PropTypes.string.isRequired, value: PropTypes.number.isRequired, @@ -107,6 +109,8 @@ SankeyLinksItem.propTypes = { }).isRequired, color: PropTypes.string.isRequired, value: PropTypes.number.isRequired, + startColor: PropTypes.string, + endColor: PropTypes.string, }).isRequired, layout: PropTypes.oneOf(['horizontal', 'vertical']).isRequired, path: PropTypes.string.isRequired, diff --git a/packages/sunburst/src/SunburstArc.js b/packages/sunburst/src/SunburstArc.js index e59b5de89..51f340730 100644 --- a/packages/sunburst/src/SunburstArc.js +++ b/packages/sunburst/src/SunburstArc.js @@ -26,7 +26,11 @@ const SunburstArc = ({ node, path, borderWidth, borderColor, showTooltip, hideTo ) SunburstArc.propTypes = { - node: PropTypes.shape({}).isRequired, + node: PropTypes.shape({ + data: PropTypes.shape({ + color: PropTypes.string.isRequired, + }).isRequired, + }).isRequired, arcGenerator: PropTypes.func.isRequired, path: PropTypes.string.isRequired, borderWidth: PropTypes.number.isRequired, diff --git a/packages/swarmplot/src/SwarmPlotTooltip.js b/packages/swarmplot/src/SwarmPlotTooltip.js index 5dd1ab04b..a05a550a2 100644 --- a/packages/swarmplot/src/SwarmPlotTooltip.js +++ b/packages/swarmplot/src/SwarmPlotTooltip.js @@ -23,6 +23,7 @@ SwarmPlotTooltip.propTypes = { node: PropTypes.shape({ label: PropTypes.string.isRequired, value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, + formattedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, color: PropTypes.string.isRequired, }).isRequired, } diff --git a/packages/treemap/src/TreeMapNode.js b/packages/treemap/src/TreeMapNode.js index c012eea74..a3afa8b31 100644 --- a/packages/treemap/src/TreeMapNode.js +++ b/packages/treemap/src/TreeMapNode.js @@ -53,6 +53,7 @@ TreeMapNode.propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, color: PropTypes.string.isRequired, + fill: PropTypes.string, borderWidth: PropTypes.number.isRequired, borderColor: PropTypes.string.isRequired, labelTextColor: PropTypes.string.isRequired,