@uiw/react-heat-map
Advanced tools
Comparing version 1.3.0 to 1.3.1
import React from 'react'; | ||
import { RectDayDefaultProps } from './RectDay'; | ||
import { LegendProps } from './Legend'; | ||
@@ -9,3 +8,3 @@ export declare type HeatMapValue = { | ||
}; | ||
export declare type RectDayElement<T = SVGRectElement> = RectDayDefaultProps & React.SVGProps<T>; | ||
export declare type RectProps<T = SVGRectElement> = React.SVGProps<T>; | ||
export interface SVGProps extends React.SVGProps<SVGSVGElement> { | ||
@@ -17,7 +16,11 @@ startDate?: Date; | ||
space?: number; | ||
rectProps?: RectDayElement | RectDayDefaultProps; | ||
rectProps?: RectProps; | ||
legendRender?: LegendProps['legendRender']; | ||
rectRender?: <E = SVGRectElement>(data: E & RectDayDefaultProps & { | ||
fill?: string; | ||
}, valueItem?: HeatMapValue) => React.ReactElement | void; | ||
rectRender?: <E = SVGRectElement>(data: E & { | ||
key: number; | ||
}, valueItem: HeatMapValue & { | ||
column: number; | ||
row: number; | ||
index: number; | ||
}) => React.ReactElement | void; | ||
value?: Array<HeatMapValue>; | ||
@@ -24,0 +27,0 @@ weekLables?: string[] | false; |
@@ -28,3 +28,3 @@ "use strict"; | ||
var _RectDay = require("./RectDay"); | ||
var _Rect = require("./Rect"); | ||
@@ -140,11 +140,16 @@ var _utils = require("./utils"); | ||
var dayProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, rectProps), {}, { | ||
rectSize: rectSize, | ||
space: space, | ||
key: cidx, | ||
fill: '#EBEDF0', | ||
width: rectSize, | ||
height: rectSize, | ||
x: idx * (rectSize + space), | ||
y: (rectSize + space) * cidx | ||
}); | ||
var currentDate = new Date(initStartDate.getTime() + _utils.oneDayTime * (idx * 7 + cidx)); | ||
var date = (0, _utils.getDateToString)(currentDate); | ||
var dataProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data[date]), {}, { | ||
row: cidx, | ||
column: idx, | ||
fill: '#EBEDF0' | ||
index: idx * 7 + cidx | ||
}); | ||
var currentDate = new Date(initStartDate.getTime() + _utils.oneDayTime * (idx * 7 + cidx)); | ||
dayProps.date = (0, _utils.getDateToString)(currentDate); | ||
@@ -155,4 +160,4 @@ if (endDate instanceof Date && currentDate.getTime() > endDate.getTime()) { | ||
if (dayProps.date && data[dayProps.date] && panelColors && Object.keys(panelColors).length > 0) { | ||
dayProps.fill = (0, _utils.existColor)(data[dayProps.date].count || 0, nums, panelColors); | ||
if (date && data[date] && panelColors && Object.keys(panelColors).length > 0) { | ||
dayProps.fill = (0, _utils.existColor)(data[date].count || 0, nums, panelColors); | ||
} else if (panelColors && panelColors[0]) { | ||
@@ -163,3 +168,5 @@ dayProps.fill = panelColors[0]; | ||
if (rectRender && typeof rectRender === 'function') { | ||
var elm = rectRender(dayProps, data[dayProps.date]); | ||
var elm = rectRender((0, _objectSpread2.default)((0, _objectSpread2.default)({}, dayProps), {}, { | ||
key: cidx | ||
}), dataProps); | ||
@@ -171,3 +178,8 @@ if (elm && /*#__PURE__*/_react.default.isValidElement(elm)) { | ||
return /*#__PURE__*/_react.default.createElement(_RectDay.RectDay, dayProps); | ||
return /*#__PURE__*/_react.default.createElement(_Rect.Rect, (0, _extends2.default)({}, dayProps, { | ||
"data-date": date, | ||
"data-index": dataProps.index, | ||
"data-row": dataProps.row, | ||
"data-column": dataProps.column | ||
})); | ||
})); | ||
@@ -178,2 +190,2 @@ }))); | ||
module.exports = exports.default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TVkcudHN4Il0sIm5hbWVzIjpbIlNWRyIsInByb3BzIiwicmVjdFNpemUiLCJsZWdlbmRDZWxsU2l6ZSIsInNwYWNlIiwic3RhcnREYXRlIiwiRGF0ZSIsImVuZERhdGUiLCJyZWN0UHJvcHMiLCJyZWN0UmVuZGVyIiwibGVnZW5kUmVuZGVyIiwidmFsdWUiLCJ3ZWVrTGFibGVzIiwibW9udGhMYWJsZXMiLCJwYW5lbENvbG9yc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2xvcnM9e3BhbmVsQ29sb3JzfVxuICAgICAgICAgIHJlY3RTaXplPXtyZWN0U2l6ZX1cbiAgICAgICAgICBsZWdlbmRDZWxsU2l6ZT17bGVnZW5kQ2VsbFNpemV9XG4gICAgICAgICAgbGVmdFBhZD17bGVmdFBhZH1cbiAgICAgICAgICB0b3BQYWQ9e3RvcFBhZH1cbiAgICAgICAgICBzcGFjZT17c3BhY2V9XG4gICAgICAgIC8+XG4gICAgICApfVxuICAgICAgPExhYmxlc1dlZWsgd2Vla0xhYmxlcz17d2Vla0xhYmxlc30gcmVjdFNpemU9e3JlY3RTaXplfSBzcGFjZT17c3BhY2V9IHRvcFBhZD17dG9wUGFkfSAvPlxuICAgICAgPExhYmxlc01vbnRoXG4gICAgICAgIG1vbnRoTGFibGVzPXttb250aExhYmxlc31cbiAgICAgICAgcmVjdFNpemU9e3JlY3RTaXplfVxuICAgICAgICBzcGFjZT17c3BhY2V9XG4gICAgICAgIGxlZnRQYWQ9e2xlZnRQYWR9XG4gICAgICAgIGNvbE51bT17Z3JpZE51bX1cbiAgICAgICAgc3RhcnREYXRlPXtpbml0U3RhcnREYXRlfVxuICAgICAgLz5cbiAgICAgIDxnIHRyYW5zZm9ybT17YHRyYW5zbGF0ZSgke2xlZnRQYWR9LCAke3RvcFBhZH0pYH0+XG4gICAgICAgIHtbLi4uQXJyYXkoZ3JpZE51bSldLm1hcCgoXywgaWR4KSA9PiB7XG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxnIGtleT17aWR4fSBkYXRhLWNvbHVtbj17aWR4fT5cbiAgICAgICAgICAgICAge1suLi5BcnJheSg3KV0ubWFwKChfLCBjaWR4KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgZGF5UHJvcHM6IFJlY3REYXlFbGVtZW50ID0ge1xuICAgICAgICAgICAgICAgICAgLi4ucmVjdFByb3BzLFxuICAgICAgICAgICAgICAgICAgcmVjdFNpemUsXG4gICAgICAgICAgICAgICAgICBzcGFjZSxcbiAgICAgICAgICAgICAgICAgIGtleTogY2lkeCxcbiAgICAgICAgICAgICAgICAgIHJvdzogY2lkeCxcbiAgICAgICAgICAgICAgICAgIGNvbHVtbjogaWR4LFxuICAgICAgICAgICAgICAgICAgZmlsbDogJyNFQkVERjAnLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBuZXcgRGF0ZShpbml0U3RhcnREYXRlLmdldFRpbWUoKSArIG9uZURheVRpbWUgKiAoaWR4ICogNyArIGNpZHgpKTtcbiAgICAgICAgICAgICAgICBkYXlQcm9wcy5kYXRlID0gZ2V0RGF0ZVRvU3RyaW5nKGN1cnJlbnREYXRlKTtcbiAgICAgICAgICAgICAgICBpZiAoZW5kRGF0ZSBpbnN0YW5jZW9mIERhdGUgJiYgY3VycmVudERhdGUuZ2V0VGltZSgpID4gZW5kRGF0ZS5nZXRUaW1lKCkpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZGF5UHJvcHMuZGF0ZSAmJiBkYXRhW2RheVByb3BzLmRhdGVdICYmIHBhbmVsQ29sb3JzICYmIE9iamVjdC5rZXlzKHBhbmVsQ29sb3JzKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICBkYXlQcm9wcy5maWxsID0gZXhpc3RDb2xvcihkYXRhW2RheVByb3BzLmRhdGVdLmNvdW50IHx8IDAsIG51bXMsIHBhbmVsQ29sb3JzKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhbmVsQ29sb3JzICYmIHBhbmVsQ29sb3JzWzBdKSB7XG4gICAgICAgICAgICAgICAgICBkYXlQcm9wcy5maWxsID0gcGFuZWxDb2xvcnNbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChyZWN0UmVuZGVyICYmIHR5cGVvZiByZWN0UmVuZGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBlbG0gPSByZWN0UmVuZGVyKGRheVByb3BzLCBkYXRhW2RheVByb3BzLmRhdGVdKTtcbiAgICAgICAgICAgICAgICAgIGlmIChlbG0gJiYgUmVhY3QuaXNWYWxpZEVsZW1lbnQoZWxtKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWxtO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gPFJlY3REYXkgey4uLmRheVByb3BzfSAvPjtcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICA8L2c+XG4gICAgICAgICAgKTtcbiAgICAgICAgfSl9XG4gICAgICA8L2c+XG4gICAgPC9zdmc+XG4gICk7XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TVkcudHN4Il0sIm5hbWVzIjpbIlNWRyIsInByb3BzIiwicmVjdFNpemUiLCJsZWdlbmRDZWxsU2l6ZSIsInNwYWNlIiwic3RhcnREYXRlIiwiRGF0ZSIsImVuZERhdGUiLCJyZWN0UHJvcHMiLCJyZWN0UmVuZGVyIiwibGVnZW5kUmVuZGVyIiwidmFsdWUiLCJ3ZWVrTGFibGVzIiwibW9udGhMYWJsZXMiLCJwYW5lbENvbG9ycyIsIm90aGVyIiwiZ3JpZE51bSIsInNldEdyaWROdW0iLCJsZWZ0UGFkIiwic2V0TGVmdFBhZCIsInRvcFBhZCIsInNldFRvcFBhZCIsInN2Z1JlZiIsIlJlYWN0IiwiY3JlYXRlUmVmIiwibnVtcyIsIk9iamVjdCIsImtleXMiLCJtYXAiLCJpdGVtIiwicGFyc2VJbnQiLCJkYXRhIiwiY3VycmVudCIsIndpZHRoIiwiY2xpZW50V2lkdGgiLCJNYXRoIiwiZmxvb3IiLCJpbml0U3RhcnREYXRlIiwi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iAgICAgICAgICAgICAgICAgIC4uLnJlY3RQcm9wcyxcbiAgICAgICAgICAgICAgICAgIGtleTogY2lkeCxcbiAgICAgICAgICAgICAgICAgIGZpbGw6ICcjRUJFREYwJyxcbiAgICAgICAgICAgICAgICAgIHdpZHRoOiByZWN0U2l6ZSxcbiAgICAgICAgICAgICAgICAgIGhlaWdodDogcmVjdFNpemUsXG4gICAgICAgICAgICAgICAgICB4OiBpZHggKiAocmVjdFNpemUgKyBzcGFjZSksXG4gICAgICAgICAgICAgICAgICB5OiAocmVjdFNpemUgKyBzcGFjZSkgKiBjaWR4LFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBuZXcgRGF0ZShpbml0U3RhcnREYXRlLmdldFRpbWUoKSArIG9uZURheVRpbWUgKiAoaWR4ICogNyArIGNpZHgpKTtcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRlID0gZ2V0RGF0ZVRvU3RyaW5nKGN1cnJlbnREYXRlKTtcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhUHJvcHMgPSB7XG4gICAgICAgICAgICAgICAgICAuLi5kYXRhW2RhdGVdLFxuICAgICAgICAgICAgICAgICAgcm93OiBjaWR4LFxuICAgICAgICAgICAgICAgICAgY29sdW1uOiBpZHgsXG4gICAgICAgICAgICAgICAgICBpbmRleDogaWR4ICogNyArIGNpZHgsXG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIGlmIChlbmREYXRlIGluc3RhbmNlb2YgRGF0ZSAmJiBjdXJyZW50RGF0ZS5nZXRUaW1lKCkgPiBlbmREYXRlLmdldFRpbWUoKSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkYXRlICYmIGRhdGFbZGF0ZV0gJiYgcGFuZWxDb2xvcnMgJiYgT2JqZWN0LmtleXMocGFuZWxDb2xvcnMpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgIGRheVByb3BzLmZpbGwgPSBleGlzdENvbG9yKGRhdGFbZGF0ZV0uY291bnQgfHwgMCwgbnVtcywgcGFuZWxDb2xvcnMpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFuZWxDb2xvcnMgJiYgcGFuZWxDb2xvcnNbMF0pIHtcbiAgICAgICAgICAgICAgICAgIGRheVByb3BzLmZpbGwgPSBwYW5lbENvbG9yc1swXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJlY3RSZW5kZXIgJiYgdHlwZW9mIHJlY3RSZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGVsbSA9IHJlY3RSZW5kZXIoeyAuLi5kYXlQcm9wcywga2V5OiBjaWR4IH0sIGRhdGFQcm9wcyk7XG4gICAgICAgICAgICAgICAgICBpZiAoZWxtICYmIFJlYWN0LmlzVmFsaWRFbGVtZW50KGVsbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVsbTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIDxSZWN0XG4gICAgICAgICAgICAgICAgICAgIHsuLi5kYXlQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgZGF0YS1kYXRlPXtkYXRlfVxuICAgICAgICAgICAgICAgICAgICBkYXRhLWluZGV4PXtkYXRhUHJvcHMuaW5kZXh9XG4gICAgICAgICAgICAgICAgICAgIGRhdGEtcm93PXtkYXRhUHJvcHMucm93fVxuICAgICAgICAgICAgICAgICAgICBkYXRhLWNvbHVtbj17ZGF0YVByb3BzLmNvbHVtbn1cbiAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICA8L2c+XG4gICAgICAgICAgKTtcbiAgICAgICAgfSl9XG4gICAgICA8L2c+XG4gICAgPC9zdmc+XG4gICk7XG59XG4iXX0= |
import React from 'react'; | ||
import { RectDayDefaultProps } from './RectDay'; | ||
import { LegendProps } from './Legend'; | ||
@@ -9,3 +8,3 @@ export declare type HeatMapValue = { | ||
}; | ||
export declare type RectDayElement<T = SVGRectElement> = RectDayDefaultProps & React.SVGProps<T>; | ||
export declare type RectProps<T = SVGRectElement> = React.SVGProps<T>; | ||
export interface SVGProps extends React.SVGProps<SVGSVGElement> { | ||
@@ -17,7 +16,11 @@ startDate?: Date; | ||
space?: number; | ||
rectProps?: RectDayElement | RectDayDefaultProps; | ||
rectProps?: RectProps; | ||
legendRender?: LegendProps['legendRender']; | ||
rectRender?: <E = SVGRectElement>(data: E & RectDayDefaultProps & { | ||
fill?: string; | ||
}, valueItem?: HeatMapValue) => React.ReactElement | void; | ||
rectRender?: <E = SVGRectElement>(data: E & { | ||
key: number; | ||
}, valueItem: HeatMapValue & { | ||
column: number; | ||
row: number; | ||
index: number; | ||
}) => React.ReactElement | void; | ||
value?: Array<HeatMapValue>; | ||
@@ -24,0 +27,0 @@ weekLables?: string[] | false; |
@@ -9,3 +9,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import { LablesMonth } from './LablesMonth'; | ||
import { RectDay } from './RectDay'; | ||
import { Rect } from './Rect'; | ||
import { formatData, getDateToString, existColor, numberSort, isValidDate, oneDayTime } from './utils'; | ||
@@ -117,13 +117,19 @@ import Legend from './Legend'; | ||
var dayProps = _objectSpread(_objectSpread({}, rectProps), {}, { | ||
rectSize: rectSize, | ||
space: space, | ||
key: cidx, | ||
fill: '#EBEDF0', | ||
width: rectSize, | ||
height: rectSize, | ||
x: idx * (rectSize + space), | ||
y: (rectSize + space) * cidx | ||
}); | ||
var currentDate = new Date(initStartDate.getTime() + oneDayTime * (idx * 7 + cidx)); | ||
var date = getDateToString(currentDate); | ||
var dataProps = _objectSpread(_objectSpread({}, data[date]), {}, { | ||
row: cidx, | ||
column: idx, | ||
fill: '#EBEDF0' | ||
index: idx * 7 + cidx | ||
}); | ||
var currentDate = new Date(initStartDate.getTime() + oneDayTime * (idx * 7 + cidx)); | ||
dayProps.date = getDateToString(currentDate); | ||
if (endDate instanceof Date && currentDate.getTime() > endDate.getTime()) { | ||
@@ -133,4 +139,4 @@ return null; | ||
if (dayProps.date && data[dayProps.date] && panelColors && Object.keys(panelColors).length > 0) { | ||
dayProps.fill = existColor(data[dayProps.date].count || 0, nums, panelColors); | ||
if (date && data[date] && panelColors && Object.keys(panelColors).length > 0) { | ||
dayProps.fill = existColor(data[date].count || 0, nums, panelColors); | ||
} else if (panelColors && panelColors[0]) { | ||
@@ -141,3 +147,5 @@ dayProps.fill = panelColors[0]; | ||
if (rectRender && typeof rectRender === 'function') { | ||
var elm = rectRender(dayProps, data[dayProps.date]); | ||
var elm = rectRender(_objectSpread(_objectSpread({}, dayProps), {}, { | ||
key: cidx | ||
}), dataProps); | ||
@@ -149,6 +157,11 @@ if (elm && /*#__PURE__*/React.isValidElement(elm)) { | ||
return /*#__PURE__*/React.createElement(RectDay, dayProps); | ||
return /*#__PURE__*/React.createElement(Rect, _extends({}, dayProps, { | ||
"data-date": date, | ||
"data-index": dataProps.index, | ||
"data-row": dataProps.row, | ||
"data-column": dataProps.column | ||
})); | ||
})); | ||
}))); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TVkcudHN4Il0sIm5hbWVzIjpbIlJlYWN0IiwidXNlRWZmZWN0IiwidXNlTWVtbyIsInVzZVN0YXRlIiwiTGFibGVzV2VlayIsIkxhYmxlc01vbnRoIiwiUmVjdERheSIsImZvcm1hdERhdGEiLCJnZXREYXRlVG9TdHJpbmciLCJleGlzdENvbG9yIiwibnVtYmVyU29ydCIsImlzVmFsaWREYXRlIiwib25lRGF5VGltZSIsIkxlZ2VuZCIsIlNWRyIsInByb3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lcz17bW9udGhMYWJsZXN9XG4gICAgICAgIHJlY3RTaXplPXtyZWN0U2l6ZX1cbiAgICAgICAgc3BhY2U9e3NwYWNlfVxuICAgICAgICBsZWZ0UGFkPXtsZWZ0UGFkfVxuICAgICAgICBjb2xOdW09e2dyaWROdW19XG4gICAgICAgIHN0YXJ0RGF0ZT17aW5pdFN0YXJ0RGF0ZX1cbiAgICAgIC8+XG4gICAgICA8ZyB0cmFuc2Zvcm09e2B0cmFuc2xhdGUoJHtsZWZ0UGFkfSwgJHt0b3BQYWR9KWB9PlxuICAgICAgICB7Wy4uLkFycmF5KGdyaWROdW0pXS5tYXAoKF8sIGlkeCkgPT4ge1xuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZyBrZXk9e2lkeH0gZGF0YS1jb2x1bW49e2lkeH0+XG4gICAgICAgICAgICAgIHtbLi4uQXJyYXkoNyldLm1hcCgoXywgY2lkeCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGRheVByb3BzOiBSZWN0RGF5RWxlbWVudCA9IHtcbiAgICAgICAgICAgICAgICAgIC4uLnJlY3RQcm9wcyxcbiAgICAgICAgICAgICAgICAgIHJlY3RTaXplLFxuICAgICAgICAgICAgICAgICAgc3BhY2UsXG4gICAgICAgICAgICAgICAgICBrZXk6IGNpZHgsXG4gICAgICAgICAgICAgICAgICByb3c6IGNpZHgsXG4gICAgICAgICAgICAgICAgICBjb2x1bW46IGlkeCxcbiAgICAgICAgICAgICAgICAgIGZpbGw6ICcjRUJFREYwJyxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gbmV3IERhdGUoaW5pdFN0YXJ0RGF0ZS5nZXRUaW1lKCkgKyBvbmVEYXlUaW1lICogKGlkeCAqIDcgKyBjaWR4KSk7XG4gICAgICAgICAgICAgICAgZGF5UHJvcHMuZGF0ZSA9IGdldERhdGVUb1N0cmluZyhjdXJyZW50RGF0ZSk7XG4gICAgICAgICAgICAgICAgaWYgKGVuZERhdGUgaW5zdGFuY2VvZiBEYXRlICYmIGN1cnJlbnREYXRlLmdldFRpbWUoKSA+IGVuZERhdGUuZ2V0VGltZSgpKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGRheVByb3BzLmRhdGUgJiYgZGF0YVtkYXlQcm9wcy5kYXRlXSAmJiBwYW5lbENvbG9ycyAmJiBPYmplY3Qua2V5cyhwYW5lbENvbG9ycykubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgZGF5UHJvcHMuZmlsbCA9IGV4aXN0Q29sb3IoZGF0YVtkYXlQcm9wcy5kYXRlXS5jb3VudCB8fCAwLCBudW1zLCBwYW5lbENvbG9ycyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYW5lbENvbG9ycyAmJiBwYW5lbENvbG9yc1swXSkge1xuICAgICAgICAgICAgICAgICAgZGF5UHJvcHMuZmlsbCA9IHBhbmVsQ29sb3JzWzBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocmVjdFJlbmRlciAmJiB0eXBlb2YgcmVjdFJlbmRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZWxtID0gcmVjdFJlbmRlcihkYXlQcm9wcywgZGF0YVtkYXlQcm9wcy5kYXRlXSk7XG4gICAgICAgICAgICAgICAgICBpZiAoZWxtICYmIFJlYWN0LmlzVmFsaWRFbGVtZW50KGVsbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVsbTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDxSZWN0RGF5IHsuLi5kYXlQcm9wc30gLz47XG4gICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgPC9nPlxuICAgICAgICAgICk7XG4gICAgICAgIH0pfVxuICAgICAgPC9nPlxuICAgIDwvc3ZnPlxuICApO1xufVxuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TVkcudHN4Il0sIm5hbWVzIjpbIlJlYWN0IiwidXNlRWZmZWN0IiwidXNlTWVtbyIsInVzZVN0YXRlIiwiTGFibGVzV2VlayIsIkxhYmxlc01vbnRoIiwiUmVjdCIsImZvcm1hdERhdGEiLCJnZXREYXRlVG9TdHJpbmciLCJleGlzdENvbG9yIiwibnVtYmVyU29ydCIsImlzVmFsaWREYXRlIiwib25lRGF5VGltZSIsIkxlZ2VuZCIsIlNWRyIsInByb3BzIiwicmVjdFNpemUiLCJsZWdlbmRDZWxsU2l6ZSIsInNwYWNlIiwic3RhcnREYXRlIiwiRGF0ZSIsImVuZERhdGUiLCJyZWN0UHJvcHMiLCJyZWN0UmVuZGVyIiwibGVnZW5kUmVuZGVyIiwidmFsdWUiLCJ3ZWVrTGFibGVzIiwibW9udGhMYWJsZXMiLCJwYW5lbENvbG9ycyIsIm90aGVyIiwiZ3JpZE51bSIsInNldEdyaWROdW0iLCJsZWZ0UGFkIiwic2V0TGVmdFBhZCIsInRvcFBhZCIsInNldFRvcFBhZCIsInN2Z1JlZiIsImNyZWF0ZVJlZiIsIm51bXMiLCJPYmplY3QiLCJrZXlzIiwibWFwIiwiaXRlbSIsInBhcnNlSW50IiwiZGF0YSIsImN1cnJlbnQiLCJ3aWR0aCIsImNsaWVudFdpZHRoIiwiTWF0aCIsImZsb29yIiwiaW5pdFN0YXJ0RGF0ZSIsImdldERheSIsImdldFRpbWUiLCJuZXdEYXRlIiwiQXJyYXkiLCJfIiwiaWR4IiwiY2lkeCIsImRheVByb3BzIiwia2V5IiwiZmlsbCIsImhlaWdodCIsIngiLCJ5IiwiY3VycmVudERhdGUiLCJkYXRlIiwiZGF0YVByb3BzIiwicm93IiwiY29sdW1uI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GF0ZSgke2xlZnRQYWR9LCAke3RvcFBhZH0pYH0+XG4gICAgICAgIHtbLi4uQXJyYXkoZ3JpZE51bSldLm1hcCgoXywgaWR4KSA9PiB7XG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxnIGtleT17aWR4fSBkYXRhLWNvbHVtbj17aWR4fT5cbiAgICAgICAgICAgICAge1suLi5BcnJheSg3KV0ubWFwKChfLCBjaWR4KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgZGF5UHJvcHM6IFJlY3RQcm9wcyA9IHtcbiAgICAgICAgICAgICAgICAgIC4uLnJlY3RQcm9wcyxcbiAgICAgICAgICAgICAgICAgIGtleTogY2lkeCxcbiAgICAgICAgICAgICAgICAgIGZpbGw6ICcjRUJFREYwJyxcbiAgICAgICAgICAgICAgICAgIHdpZHRoOiByZWN0U2l6ZSxcbiAgICAgICAgICAgICAgICAgIGhlaWdodDogcmVjdFNpemUsXG4gICAgICAgICAgICAgICAgICB4OiBpZHggKiAocmVjdFNpemUgKyBzcGFjZSksXG4gICAgICAgICAgICAgICAgICB5OiAocmVjdFNpemUgKyBzcGFjZSkgKiBjaWR4LFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBuZXcgRGF0ZShpbml0U3RhcnREYXRlLmdldFRpbWUoKSArIG9uZURheVRpbWUgKiAoaWR4ICogNyArIGNpZHgpKTtcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRlID0gZ2V0RGF0ZVRvU3RyaW5nKGN1cnJlbnREYXRlKTtcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhUHJvcHMgPSB7XG4gICAgICAgICAgICAgICAgICAuLi5kYXRhW2RhdGVdLFxuICAgICAgICAgICAgICAgICAgcm93OiBjaWR4LFxuICAgICAgICAgICAgICAgICAgY29sdW1uOiBpZHgsXG4gICAgICAgICAgICAgICAgICBpbmRleDogaWR4ICogNyArIGNpZHgsXG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIGlmIChlbmREYXRlIGluc3RhbmNlb2YgRGF0ZSAmJiBjdXJyZW50RGF0ZS5nZXRUaW1lKCkgPiBlbmREYXRlLmdldFRpbWUoKSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkYXRlICYmIGRhdGFbZGF0ZV0gJiYgcGFuZWxDb2xvcnMgJiYgT2JqZWN0LmtleXMocGFuZWxDb2xvcnMpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgIGRheVByb3BzLmZpbGwgPSBleGlzdENvbG9yKGRhdGFbZGF0ZV0uY291bnQgfHwgMCwgbnVtcywgcGFuZWxDb2xvcnMpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFuZWxDb2xvcnMgJiYgcGFuZWxDb2xvcnNbMF0pIHtcbiAgICAgICAgICAgICAgICAgIGRheVByb3BzLmZpbGwgPSBwYW5lbENvbG9yc1swXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJlY3RSZW5kZXIgJiYgdHlwZW9mIHJlY3RSZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGVsbSA9IHJlY3RSZW5kZXIoeyAuLi5kYXlQcm9wcywga2V5OiBjaWR4IH0sIGRhdGFQcm9wcyk7XG4gICAgICAgICAgICAgICAgICBpZiAoZWxtICYmIFJlYWN0LmlzVmFsaWRFbGVtZW50KGVsbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVsbTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIDxSZWN0XG4gICAgICAgICAgICAgICAgICAgIHsuLi5kYXlQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgZGF0YS1kYXRlPXtkYXRlfVxuICAgICAgICAgICAgICAgICAgICBkYXRhLWluZGV4PXtkYXRhUHJvcHMuaW5kZXh9XG4gICAgICAgICAgICAgICAgICAgIGRhdGEtcm93PXtkYXRhUHJvcHMucm93fVxuICAgICAgICAgICAgICAgICAgICBkYXRhLWNvbHVtbj17ZGF0YVByb3BzLmNvbHVtbn1cbiAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICA8L2c+XG4gICAgICAgICAgKTtcbiAgICAgICAgfSl9XG4gICAgICA8L2c+XG4gICAgPC9zdmc+XG4gICk7XG59XG4iXX0= |
{ | ||
"name": "@uiw/react-heat-map", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "React component create calendar heatmap to visualize time series data, a la github contribution graph.", | ||
@@ -67,2 +67,3 @@ "homepage": "https://uiwjs.github.io/react-heat-map/", | ||
"@uiw/react-markdown-preview": "3.0.6", | ||
"@uiw/react-tooltip": "4.7.15", | ||
"@uiw/reset.css": "1.0.4", | ||
@@ -69,0 +70,0 @@ "compile-less-cli": "1.8.0", |
@@ -85,2 +85,3 @@ HeatMap 日历热图 | ||
``` | ||
## Set Rect Style | ||
@@ -97,4 +98,4 @@ | ||
{ date: '2016/01/11', count:2 }, | ||
...[...Array(17)].map((_, idx) => ({ date: `2016/01/${idx + 10}`, count: idx, content: '' })), | ||
...[...Array(17)].map((_, idx) => ({ date: `2016/02/${idx + 10}`, count: idx, content: '' })), | ||
...[...Array(17)].map((_, idx) => ({ date: `2016/01/${idx + 10}`, count: idx })), | ||
...[...Array(17)].map((_, idx) => ({ date: `2016/02/${idx + 10}`, count: idx })), | ||
{ date: '2016/04/12', count:2 }, | ||
@@ -128,2 +129,44 @@ { date: '2016/05/01', count:5 }, | ||
## Tooltip | ||
A simple text popup tip. | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
import Tooltip from '@uiw/react-tooltip'; | ||
import HeatMap from '@uiw/react-heat-map'; | ||
const value = [ | ||
{ date: '2016/01/11', count:2 }, | ||
...[...Array(17)].map((_, idx) => ({ date: `2016/01/${idx + 10}`, count: idx, })), | ||
...[...Array(17)].map((_, idx) => ({ date: `2016/02/${idx + 10}`, count: idx, })), | ||
{ date: '2016/04/12', count:2 }, | ||
{ date: '2016/05/01', count:5 }, | ||
{ date: '2016/05/02', count:5 }, | ||
{ date: '2016/05/03', count:1 }, | ||
{ date: '2016/05/04', count:11 }, | ||
{ date: '2016/05/08', count:32 }, | ||
]; | ||
const Demo = () => { | ||
return ( | ||
<HeatMap | ||
value={value} | ||
width={600} | ||
startDate={new Date('2016/01/01')} | ||
rectRender={(props, data) => { | ||
// if (!data.count) return <rect {...props} />; | ||
return ( | ||
<Tooltip key={props.key} placement="top" content={`count: ${data.count || 0}`}> | ||
<rect {...props} /> | ||
</Tooltip> | ||
); | ||
}} | ||
/> | ||
) | ||
}; | ||
ReactDOM.render(<Demo />, _mount_); | ||
``` | ||
## Props | ||
@@ -143,3 +186,3 @@ | ||
| panelColors | Backgroud color of active colors | `Record<number, string>` | `{ 0: '#EBEDF0', 8: '#7BC96F', 4: '#C6E48B', 12: '#239A3B', 32: '#196127' }` | | ||
| rectRender | Single `day` block re-render | `(data: SVGRectElement & RectDayDefaultProps & { fill?: string }, valueItem?: HeatMapValue) => React.ReactNode` | - | | ||
| rectRender | Single `day` block re-render | `<E = SVGRectElement>(data: E & { key: number }, valueItem: HeatMapValue & { column: number, row: number, index: number }) => React.ReactElement` | - | | ||
| legendRender | Single `legend` block re-render | `(props: React.SVGProps<SVGRectElement>) => React.ReactNode` | - | | ||
@@ -146,0 +189,0 @@ |
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
214
112437
19
36
898