Socket
Socket
Sign inDemoInstall

@visx/heatmap

Package Overview
Dependencies
11
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-alpha.0 to 3.0.0

63

esm/heatmaps/HeatmapCircle.js
import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "top", "left", "data", "gap", "radius", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -12,31 +10,30 @@ import cx from 'classnames';

var className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
_ref$radius = _ref.radius,
radius = _ref$radius === void 0 ? 6 : _ref$radius,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (column) {
return column && column.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (cell) {
return cell && cell.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "data", "gap", "radius", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"]);
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
_ref$radius = _ref.radius,
radius = _ref$radius === void 0 ? 6 : _ref$radius,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (column) {
return column == null ? void 0 : column.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (cell) {
return cell == null ? void 0 : cell.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var innerRadius = radius - gap;

@@ -43,0 +40,0 @@ var heatmap = data.map(function (columnDatum, column) {

import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "top", "left", "data", "binWidth", "binHeight", "x0", "gap", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -12,35 +10,34 @@ import cx from 'classnames';

var className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$binWidth = _ref.binWidth,
binWidth = _ref$binWidth === void 0 ? 6 : _ref$binWidth,
_ref$binHeight = _ref.binHeight,
binHeight = _ref$binHeight === void 0 ? 6 : _ref$binHeight,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? 0 : _ref$x,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (d) {
return d && d.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (d) {
return d && d.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "data", "binWidth", "binHeight", "x0", "gap", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"]);
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$binWidth = _ref.binWidth,
binWidth = _ref$binWidth === void 0 ? 6 : _ref$binWidth,
_ref$binHeight = _ref.binHeight,
binHeight = _ref$binHeight === void 0 ? 6 : _ref$binHeight,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? 0 : _ref$x,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (d) {
return d == null ? void 0 : d.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (d) {
return d == null ? void 0 : d.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var width = binWidth - gap;

@@ -47,0 +44,0 @@ var height = binHeight - gap;

@@ -41,3 +41,5 @@ import React from 'react';

};
export default function HeatmapCircle<ColumnDatum, BinDatum>({ className, top, left, data, gap, radius, xScale, yScale, colorScale, opacityScale, bins, count, children, ...restProps }: HeatmapCircleProps<ColumnDatum, BinDatum> & Omit<React.SVGProps<SVGCircleElement>, keyof HeatmapCircleProps<ColumnDatum, BinDatum> | 'r' | 'cx' | 'cy' | 'fill' | 'fillOpacity'>): JSX.Element;
export default function HeatmapCircle<ColumnDatum, BinDatum>({ className, top, left, data, gap, radius, xScale, yScale, colorScale, opacityScale, bins, // eslint-disable-line @typescript-eslint/no-explicit-any
count, // eslint-disable-line @typescript-eslint/no-explicit-any
children, ...restProps }: HeatmapCircleProps<ColumnDatum, BinDatum> & Omit<React.SVGProps<SVGCircleElement>, keyof HeatmapCircleProps<ColumnDatum, BinDatum> | 'r' | 'cx' | 'cy' | 'fill' | 'fillOpacity'>): JSX.Element;
//# sourceMappingURL=HeatmapCircle.d.ts.map

@@ -5,48 +5,40 @@ "use strict";

exports.default = HeatmapCircle;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _group = require("@visx/group");
var _excluded = ["className", "top", "left", "data", "gap", "radius", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function HeatmapCircle(_ref) {
var className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
_ref$radius = _ref.radius,
radius = _ref$radius === void 0 ? 6 : _ref$radius,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (column) {
return column && column.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (cell) {
return cell && cell.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "data", "gap", "radius", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"]);
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
_ref$radius = _ref.radius,
radius = _ref$radius === void 0 ? 6 : _ref$radius,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (column) {
return column == null ? void 0 : column.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (cell) {
return cell == null ? void 0 : cell.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var innerRadius = radius - gap;

@@ -92,3 +84,2 @@ var heatmap = data.map(function (columnDatum, column) {

}
HeatmapCircle.propTypes = {

@@ -95,0 +86,0 @@ data: _propTypes.default.array,

@@ -46,3 +46,5 @@ import React from 'react';

export declare type ComponentProps<ColumnDatum, BinDatum> = HeatmapRectProps<ColumnDatum, BinDatum> & Omit<React.SVGProps<SVGRectElement>, keyof HeatmapRectProps<ColumnDatum, BinDatum> | 'width' | 'height' | 'x' | 'y' | 'fill' | 'fillOpacity'>;
export default function HeatmapRect<ColumnDatum, BinDatum>({ className, top, left, data, binWidth, binHeight, x0, gap, xScale, yScale, colorScale, opacityScale, bins, count, children, ...restProps }: ComponentProps<ColumnDatum, BinDatum>): JSX.Element;
export default function HeatmapRect<ColumnDatum, BinDatum>({ className, top, left, data, binWidth, binHeight, x0, gap, xScale, yScale, colorScale, opacityScale, bins, // eslint-disable-line @typescript-eslint/no-explicit-any
count, // eslint-disable-line @typescript-eslint/no-explicit-any
children, ...restProps }: ComponentProps<ColumnDatum, BinDatum>): JSX.Element;
//# sourceMappingURL=HeatmapRect.d.ts.map

@@ -5,52 +5,44 @@ "use strict";

exports.default = HeatmapRect;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _group = require("@visx/group");
var _excluded = ["className", "top", "left", "data", "binWidth", "binHeight", "x0", "gap", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function HeatmapRect(_ref) {
var className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$binWidth = _ref.binWidth,
binWidth = _ref$binWidth === void 0 ? 6 : _ref$binWidth,
_ref$binHeight = _ref.binHeight,
binHeight = _ref$binHeight === void 0 ? 6 : _ref$binHeight,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? 0 : _ref$x,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (d) {
return d && d.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (d) {
return d && d.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "data", "binWidth", "binHeight", "x0", "gap", "xScale", "yScale", "colorScale", "opacityScale", "bins", "count", "children"]);
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$binWidth = _ref.binWidth,
binWidth = _ref$binWidth === void 0 ? 6 : _ref$binWidth,
_ref$binHeight = _ref.binHeight,
binHeight = _ref$binHeight === void 0 ? 6 : _ref$binHeight,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? 0 : _ref$x,
_ref$gap = _ref.gap,
gap = _ref$gap === void 0 ? 1 : _ref$gap,
xScale = _ref.xScale,
yScale = _ref.yScale,
_ref$colorScale = _ref.colorScale,
colorScale = _ref$colorScale === void 0 ? function () {
return undefined;
} : _ref$colorScale,
_ref$opacityScale = _ref.opacityScale,
opacityScale = _ref$opacityScale === void 0 ? function () {
return 1;
} : _ref$opacityScale,
_ref$bins = _ref.bins,
bins = _ref$bins === void 0 ? function (d) {
return d == null ? void 0 : d.bins;
} : _ref$bins,
_ref$count = _ref.count,
count = _ref$count === void 0 ? function (d) {
return d == null ? void 0 : d.count;
} : _ref$count,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var width = binWidth - gap;

@@ -98,3 +90,2 @@ var height = binHeight - gap;

}
HeatmapRect.propTypes = {

@@ -101,0 +92,0 @@ data: _propTypes.default.array,

@@ -5,11 +5,6 @@ "use strict";

exports.HeatmapRect = exports.HeatmapCircle = void 0;
var _HeatmapCircle = _interopRequireDefault(require("./heatmaps/HeatmapCircle"));
exports.HeatmapCircle = _HeatmapCircle.default;
var _HeatmapRect = _interopRequireDefault(require("./heatmaps/HeatmapRect"));
exports.HeatmapRect = _HeatmapRect.default;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -1,1 +0,3 @@

"use strict";
"use strict";
exports.__esModule = true;
{
"name": "@visx/heatmap",
"version": "3.0.0-alpha.0",
"version": "3.0.0",
"description": "visx heatmap",

@@ -34,11 +34,11 @@ "sideEffects": false,

"peerDependencies": {
"react": "^16.3.0-0 || ^17.0.0-0"
"react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0"
},
"dependencies": {
"@types/react": "*",
"@visx/group": "3.0.0-alpha.0",
"@visx/group": "3.0.0",
"classnames": "^2.3.1",
"prop-types": "^15.6.1"
},
"gitHead": "2f2fb26030b5f1328803b2bd7de171d66e088aff"
"gitHead": "2fbffbaee80b88302274266112f8ad9a241def33"
}

@@ -47,5 +47,5 @@ # @visx/heatmap

// Example accessors
const x = d => d.myBin;
const y = d => d.myBins;
const z = d => d.myCount;
const x = (d) => d.myBin;
const y = (d) => d.myBins;
const z = (d) => d.myCount;

@@ -52,0 +52,0 @@ // Example scale with an accessors

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc