lsvp-react-calendar-heatmap
Advanced tools
Comparing version 1.9.1 to 1.9.2
@@ -298,2 +298,5 @@ 'use strict'; | ||
} | ||
function isLocalTimeBeforeGMT() { | ||
return new Date().getTimezoneOffset() > 0; | ||
} | ||
@@ -579,5 +582,7 @@ var SQUARE_SIZE = 10; | ||
key: "renderSquare", | ||
value: function renderSquare(dayIndex, index) { | ||
value: function renderSquare(dayIndex, idx) { | ||
var _this2 = this; | ||
// to fix a bug in this library, not ideal | ||
var index = isLocalTimeBeforeGMT() ? idx - 1 : idx; | ||
var indexOutOfRange = index < this.getNumEmptyDaysAtStart() || index >= this.getNumEmptyDaysAtStart() + this.getDateDifferenceInDays(); | ||
@@ -595,3 +600,5 @@ | ||
var value = this.getValueForIndex(index); | ||
var rect = React.createElement(React.Fragment, null, React.createElement("rect", _extends({ | ||
var rect = React.createElement(React.Fragment, { | ||
key: "square_".concat(index) | ||
}, React.createElement("rect", _extends({ | ||
key: index, | ||
@@ -598,0 +605,0 @@ width: SQUARE_SIZE, |
@@ -294,2 +294,5 @@ import React from 'react'; | ||
} | ||
function isLocalTimeBeforeGMT() { | ||
return new Date().getTimezoneOffset() > 0; | ||
} | ||
@@ -575,5 +578,7 @@ var SQUARE_SIZE = 10; | ||
key: "renderSquare", | ||
value: function renderSquare(dayIndex, index) { | ||
value: function renderSquare(dayIndex, idx) { | ||
var _this2 = this; | ||
// to fix a bug in this library, not ideal | ||
var index = isLocalTimeBeforeGMT() ? idx - 1 : idx; | ||
var indexOutOfRange = index < this.getNumEmptyDaysAtStart() || index >= this.getNumEmptyDaysAtStart() + this.getDateDifferenceInDays(); | ||
@@ -591,3 +596,5 @@ | ||
var value = this.getValueForIndex(index); | ||
var rect = React.createElement(React.Fragment, null, React.createElement("rect", _extends({ | ||
var rect = React.createElement(React.Fragment, { | ||
key: "square_".concat(index) | ||
}, React.createElement("rect", _extends({ | ||
key: index, | ||
@@ -594,0 +601,0 @@ width: SQUARE_SIZE, |
@@ -300,2 +300,5 @@ (function (global, factory) { | ||
} | ||
function isLocalTimeBeforeGMT() { | ||
return new Date().getTimezoneOffset() > 0; | ||
} | ||
@@ -581,5 +584,7 @@ var SQUARE_SIZE = 10; | ||
key: "renderSquare", | ||
value: function renderSquare(dayIndex, index) { | ||
value: function renderSquare(dayIndex, idx) { | ||
var _this2 = this; | ||
// to fix a bug in this library, not ideal | ||
var index = isLocalTimeBeforeGMT() ? idx - 1 : idx; | ||
var indexOutOfRange = index < this.getNumEmptyDaysAtStart() || index >= this.getNumEmptyDaysAtStart() + this.getDateDifferenceInDays(); | ||
@@ -597,3 +602,5 @@ | ||
var value = this.getValueForIndex(index); | ||
var rect = React.createElement(React.Fragment, null, React.createElement("rect", _extends({ | ||
var rect = React.createElement(React.Fragment, { | ||
key: "square_".concat(index) | ||
}, React.createElement("rect", _extends({ | ||
key: index, | ||
@@ -600,0 +607,0 @@ width: SQUARE_SIZE, |
{ | ||
"name": "lsvp-react-calendar-heatmap", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"description": "A calendar heatmap component built on SVG, inspired by Github's commit calendar graph. Forked by LSVP", | ||
@@ -5,0 +5,0 @@ "author": "Bill Zdon", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
150164
2130