Socket
Book a DemoInstallSign in
Socket

@nivo/sankey

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nivo/sankey - npm Package Compare versions

Comparing version

to
0.61.2

165

dist/nivo-sankey.cjs.js

@@ -79,3 +79,4 @@ 'use strict';

tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
legends: PropTypes.arrayOf(PropTypes.shape(legends.LegendPropShape)).isRequired
legends: PropTypes.arrayOf(PropTypes.shape(legends.LegendPropShape)).isRequired,
layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['links', 'nodes', 'labels', 'legends']), PropTypes.func])).isRequired
};

@@ -117,3 +118,4 @@ var SankeyDefaultProps = {

onClick: core.noop,
legends: []
legends: [],
layers: ['links', 'nodes', 'labels', 'legends']
};

@@ -986,3 +988,4 @@

legends$1 = _ref.legends,
legendData = _ref.legendData;
legendData = _ref.legendData,
layers = _ref.layers;
var isCurrentNode = function isCurrentNode() {

@@ -1037,2 +1040,87 @@ return false;

hideTooltip = _ref8.hideTooltip;
var layerProps = {
links: links,
nodes: nodes,
margin: margin,
width: width,
height: height,
outerWidth: outerWidth,
outerHeight: outerHeight
};
var layerById = {
links: React__default.createElement(SankeyLinks$1, {
key: "links",
links: links,
layout: layout,
linkContract: linkContract,
linkOpacity: linkOpacity,
linkHoverOpacity: linkHoverOpacity,
linkHoverOthersOpacity: linkHoverOthersOpacity,
linkBlendMode: linkBlendMode,
enableLinkGradient: enableLinkGradient,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentLink: setCurrentLink,
currentNode: currentNode,
currentLink: currentLink,
isCurrentLink: isCurrentLink,
onClick: onClick,
tooltip: linkTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}),
nodes: React__default.createElement(SankeyNodes$1, {
key: "nodes",
nodes: nodes,
nodeOpacity: nodeOpacity,
nodeHoverOpacity: nodeHoverOpacity,
nodeHoverOthersOpacity: nodeHoverOthersOpacity,
nodeBorderWidth: nodeBorderWidth,
getNodeBorderColor: getNodeBorderColor,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentNode: setCurrentNode,
currentNode: currentNode,
currentLink: currentLink,
isCurrentNode: isCurrentNode,
onClick: onClick,
tooltip: nodeTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}),
labels: null,
legends: legends$1.map(function (legend, i) {
return React__default.createElement(legends.BoxLegendSvg, _extends$2({
key: "legend".concat(i)
}, legend, {
containerWidth: width,
containerHeight: height,
data: legendData,
theme: theme
}));
})
};
if (enableLabels) {
layerById.labels = React__default.createElement(SankeyLabels$1, {
key: "labels",
nodes: nodes,
layout: layout,
width: width,
height: height,
labelPosition: labelPosition,
labelPadding: labelPadding,
labelOrientation: labelOrientation,
getLabelTextColor: getLabelTextColor,
theme: theme,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
});
}
return React__default.createElement(core.SvgWrapper, {

@@ -1043,66 +1131,9 @@ width: outerWidth,

theme: theme
}, React__default.createElement(SankeyLinks$1, {
links: links,
layout: layout,
linkContract: linkContract,
linkOpacity: linkOpacity,
linkHoverOpacity: linkHoverOpacity,
linkHoverOthersOpacity: linkHoverOthersOpacity,
linkBlendMode: linkBlendMode,
enableLinkGradient: enableLinkGradient,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentLink: setCurrentLink,
currentNode: currentNode,
currentLink: currentLink,
isCurrentLink: isCurrentLink,
onClick: onClick,
tooltip: linkTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), React__default.createElement(SankeyNodes$1, {
nodes: nodes,
nodeOpacity: nodeOpacity,
nodeHoverOpacity: nodeHoverOpacity,
nodeHoverOthersOpacity: nodeHoverOthersOpacity,
nodeBorderWidth: nodeBorderWidth,
getNodeBorderColor: getNodeBorderColor,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentNode: setCurrentNode,
currentNode: currentNode,
currentLink: currentLink,
isCurrentNode: isCurrentNode,
onClick: onClick,
tooltip: nodeTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), enableLabels && React__default.createElement(SankeyLabels$1, {
nodes: nodes,
layout: layout,
width: width,
height: height,
labelPosition: labelPosition,
labelPadding: labelPadding,
labelOrientation: labelOrientation,
getLabelTextColor: getLabelTextColor,
theme: theme,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), legends$1.map(function (legend, i) {
return React__default.createElement(legends.BoxLegendSvg, _extends$2({
key: i
}, legend, {
containerWidth: width,
containerHeight: height,
data: legendData,
theme: theme
}));
}, layers.map(function (layer, i) {
if (typeof layer === 'function') {
return React__default.createElement(React.Fragment, {
key: i
}, layer(layerProps));
}
return layerById[layer];
}));

@@ -1109,0 +1140,0 @@ });

@@ -72,3 +72,4 @@ import _uniq from 'lodash/uniq';

tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
legends: PropTypes.arrayOf(PropTypes.shape(LegendPropShape)).isRequired
legends: PropTypes.arrayOf(PropTypes.shape(LegendPropShape)).isRequired,
layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['links', 'nodes', 'labels', 'legends']), PropTypes.func])).isRequired
};

@@ -110,3 +111,4 @@ var SankeyDefaultProps = {

onClick: noop,
legends: []
legends: [],
layers: ['links', 'nodes', 'labels', 'legends']
};

@@ -979,3 +981,4 @@

legends = _ref.legends,
legendData = _ref.legendData;
legendData = _ref.legendData,
layers = _ref.layers;
var isCurrentNode = function isCurrentNode() {

@@ -1030,2 +1033,87 @@ return false;

hideTooltip = _ref8.hideTooltip;
var layerProps = {
links: links,
nodes: nodes,
margin: margin,
width: width,
height: height,
outerWidth: outerWidth,
outerHeight: outerHeight
};
var layerById = {
links: React.createElement(SankeyLinks$1, {
key: "links",
links: links,
layout: layout,
linkContract: linkContract,
linkOpacity: linkOpacity,
linkHoverOpacity: linkHoverOpacity,
linkHoverOthersOpacity: linkHoverOthersOpacity,
linkBlendMode: linkBlendMode,
enableLinkGradient: enableLinkGradient,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentLink: setCurrentLink,
currentNode: currentNode,
currentLink: currentLink,
isCurrentLink: isCurrentLink,
onClick: onClick,
tooltip: linkTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}),
nodes: React.createElement(SankeyNodes$1, {
key: "nodes",
nodes: nodes,
nodeOpacity: nodeOpacity,
nodeHoverOpacity: nodeHoverOpacity,
nodeHoverOthersOpacity: nodeHoverOthersOpacity,
nodeBorderWidth: nodeBorderWidth,
getNodeBorderColor: getNodeBorderColor,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentNode: setCurrentNode,
currentNode: currentNode,
currentLink: currentLink,
isCurrentNode: isCurrentNode,
onClick: onClick,
tooltip: nodeTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}),
labels: null,
legends: legends.map(function (legend, i) {
return React.createElement(BoxLegendSvg, _extends$2({
key: "legend".concat(i)
}, legend, {
containerWidth: width,
containerHeight: height,
data: legendData,
theme: theme
}));
})
};
if (enableLabels) {
layerById.labels = React.createElement(SankeyLabels$1, {
key: "labels",
nodes: nodes,
layout: layout,
width: width,
height: height,
labelPosition: labelPosition,
labelPadding: labelPadding,
labelOrientation: labelOrientation,
getLabelTextColor: getLabelTextColor,
theme: theme,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
});
}
return React.createElement(SvgWrapper, {

@@ -1036,66 +1124,9 @@ width: outerWidth,

theme: theme
}, React.createElement(SankeyLinks$1, {
links: links,
layout: layout,
linkContract: linkContract,
linkOpacity: linkOpacity,
linkHoverOpacity: linkHoverOpacity,
linkHoverOthersOpacity: linkHoverOthersOpacity,
linkBlendMode: linkBlendMode,
enableLinkGradient: enableLinkGradient,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentLink: setCurrentLink,
currentNode: currentNode,
currentLink: currentLink,
isCurrentLink: isCurrentLink,
onClick: onClick,
tooltip: linkTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), React.createElement(SankeyNodes$1, {
nodes: nodes,
nodeOpacity: nodeOpacity,
nodeHoverOpacity: nodeHoverOpacity,
nodeHoverOthersOpacity: nodeHoverOthersOpacity,
nodeBorderWidth: nodeBorderWidth,
getNodeBorderColor: getNodeBorderColor,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentNode: setCurrentNode,
currentNode: currentNode,
currentLink: currentLink,
isCurrentNode: isCurrentNode,
onClick: onClick,
tooltip: nodeTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), enableLabels && React.createElement(SankeyLabels$1, {
nodes: nodes,
layout: layout,
width: width,
height: height,
labelPosition: labelPosition,
labelPadding: labelPadding,
labelOrientation: labelOrientation,
getLabelTextColor: getLabelTextColor,
theme: theme,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), legends.map(function (legend, i) {
return React.createElement(BoxLegendSvg, _extends$2({
key: i
}, legend, {
containerWidth: width,
containerHeight: height,
data: legendData,
theme: theme
}));
}, layers.map(function (layer, i) {
if (typeof layer === 'function') {
return React.createElement(Fragment, {
key: i
}, layer(layerProps));
}
return layerById[layer];
}));

@@ -1102,0 +1133,0 @@ });

@@ -71,3 +71,4 @@ (function (global, factory) {

tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
legends: PropTypes.arrayOf(PropTypes.shape(legends.LegendPropShape)).isRequired
legends: PropTypes.arrayOf(PropTypes.shape(legends.LegendPropShape)).isRequired,
layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['links', 'nodes', 'labels', 'legends']), PropTypes.func])).isRequired
};

@@ -109,3 +110,4 @@ var SankeyDefaultProps = {

onClick: core.noop,
legends: []
legends: [],
layers: ['links', 'nodes', 'labels', 'legends']
};

@@ -978,3 +980,4 @@

legends$1 = _ref.legends,
legendData = _ref.legendData;
legendData = _ref.legendData,
layers = _ref.layers;
var isCurrentNode = function isCurrentNode() {

@@ -1029,2 +1032,87 @@ return false;

hideTooltip = _ref8.hideTooltip;
var layerProps = {
links: links,
nodes: nodes,
margin: margin,
width: width,
height: height,
outerWidth: outerWidth,
outerHeight: outerHeight
};
var layerById = {
links: React__default.createElement(SankeyLinks$1, {
key: "links",
links: links,
layout: layout,
linkContract: linkContract,
linkOpacity: linkOpacity,
linkHoverOpacity: linkHoverOpacity,
linkHoverOthersOpacity: linkHoverOthersOpacity,
linkBlendMode: linkBlendMode,
enableLinkGradient: enableLinkGradient,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentLink: setCurrentLink,
currentNode: currentNode,
currentLink: currentLink,
isCurrentLink: isCurrentLink,
onClick: onClick,
tooltip: linkTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}),
nodes: React__default.createElement(SankeyNodes$1, {
key: "nodes",
nodes: nodes,
nodeOpacity: nodeOpacity,
nodeHoverOpacity: nodeHoverOpacity,
nodeHoverOthersOpacity: nodeHoverOthersOpacity,
nodeBorderWidth: nodeBorderWidth,
getNodeBorderColor: getNodeBorderColor,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentNode: setCurrentNode,
currentNode: currentNode,
currentLink: currentLink,
isCurrentNode: isCurrentNode,
onClick: onClick,
tooltip: nodeTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}),
labels: null,
legends: legends$1.map(function (legend, i) {
return React__default.createElement(legends.BoxLegendSvg, _extends$2({
key: "legend".concat(i)
}, legend, {
containerWidth: width,
containerHeight: height,
data: legendData,
theme: theme
}));
})
};
if (enableLabels) {
layerById.labels = React__default.createElement(SankeyLabels$1, {
key: "labels",
nodes: nodes,
layout: layout,
width: width,
height: height,
labelPosition: labelPosition,
labelPadding: labelPadding,
labelOrientation: labelOrientation,
getLabelTextColor: getLabelTextColor,
theme: theme,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
});
}
return React__default.createElement(core.SvgWrapper, {

@@ -1035,66 +1123,9 @@ width: outerWidth,

theme: theme
}, React__default.createElement(SankeyLinks$1, {
links: links,
layout: layout,
linkContract: linkContract,
linkOpacity: linkOpacity,
linkHoverOpacity: linkHoverOpacity,
linkHoverOthersOpacity: linkHoverOthersOpacity,
linkBlendMode: linkBlendMode,
enableLinkGradient: enableLinkGradient,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentLink: setCurrentLink,
currentNode: currentNode,
currentLink: currentLink,
isCurrentLink: isCurrentLink,
onClick: onClick,
tooltip: linkTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), React__default.createElement(SankeyNodes$1, {
nodes: nodes,
nodeOpacity: nodeOpacity,
nodeHoverOpacity: nodeHoverOpacity,
nodeHoverOthersOpacity: nodeHoverOthersOpacity,
nodeBorderWidth: nodeBorderWidth,
getNodeBorderColor: getNodeBorderColor,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
setCurrentNode: setCurrentNode,
currentNode: currentNode,
currentLink: currentLink,
isCurrentNode: isCurrentNode,
onClick: onClick,
tooltip: nodeTooltip,
theme: theme,
tooltipFormat: tooltipFormat,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), enableLabels && React__default.createElement(SankeyLabels$1, {
nodes: nodes,
layout: layout,
width: width,
height: height,
labelPosition: labelPosition,
labelPadding: labelPadding,
labelOrientation: labelOrientation,
getLabelTextColor: getLabelTextColor,
theme: theme,
animate: animate,
motionDamping: motionDamping,
motionStiffness: motionStiffness
}), legends$1.map(function (legend, i) {
return React__default.createElement(legends.BoxLegendSvg, _extends$2({
key: i
}, legend, {
containerWidth: width,
containerHeight: height,
data: legendData,
theme: theme
}));
}, layers.map(function (layer, i) {
if (typeof layer === 'function') {
return React__default.createElement(React.Fragment, {
key: i
}, layer(layerProps));
}
return layerById[layer];
}));

@@ -1101,0 +1132,0 @@ });

{
"name": "@nivo/sankey",
"version": "0.61.1",
"version": "0.61.2",
"license": "MIT",

@@ -43,3 +43,3 @@ "author": {

},
"gitHead": "f5798d0d76263c3fbd4a2f1b96ff29b8a2119710"
"gitHead": "a9b51a3f0ca60cd3976497f25d1f2b131e403d28"
}
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.