@cnakazawa/react-native-calendars
Advanced tools
Comparing version 1.22.4 to 1.22.5
{ | ||
"name": "@cnakazawa/react-native-calendars", | ||
"version": "1.22.4", | ||
"version": "1.22.5", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "React Native Calendar Components", |
@@ -35,2 +35,3 @@ import React, {Component} from 'react'; | ||
scrollEnabled: PropTypes.bool, | ||
nestedScrollEnabled: PropTypes.bool, | ||
/** Enable or disable vertical scroll indicator. Default = false */ | ||
@@ -62,2 +63,3 @@ showScrollIndicator: PropTypes.bool, | ||
scrollEnabled: true, | ||
nestedScrollEnabled: false, | ||
scrollsToTop: false, | ||
@@ -69,5 +71,5 @@ removeClippedSubviews: Platform.OS === 'android' ? false : true | ||
super(props); | ||
this.style = styleConstructor(props.theme); | ||
this.viewabilityConfig = { | ||
@@ -80,3 +82,3 @@ itemVisiblePercentThreshold: 20 | ||
const date = parseDate(props.current) || XDate(); | ||
for (let i = 0; i <= this.props.pastScrollRange + this.props.futureScrollRange; i++) { | ||
@@ -121,3 +123,3 @@ const rangeDate = date.clone().addMonths(i - this.props.pastScrollRange, true); | ||
let scrollAmount = (size * this.props.pastScrollRange) + (diffMonths * size) + (offset || 0); | ||
if (!this.props.horizontal) { | ||
@@ -150,3 +152,3 @@ let week = 0; | ||
const nextCurrent = parseDate(props.current); | ||
if (nextCurrent && current && nextCurrent.getTime() !== current.getTime()) { | ||
@@ -158,3 +160,3 @@ this.scrollToMonth(nextCurrent); | ||
const newrows = []; | ||
for (let i = 0; i < rowclone.length; i++) { | ||
@@ -186,7 +188,7 @@ let val = this.state.texts[i]; | ||
const visibleMonths = []; | ||
for (let i = 0; i < rowclone.length; i++) { | ||
let val = rowclone[i]; | ||
const rowShouldBeRendered = rowIsCloseToViewable(i, 1); | ||
if (rowShouldBeRendered && !rowclone[i].getTime) { | ||
@@ -202,3 +204,3 @@ val = this.state.openDate.clone().addMonths(i - this.props.pastScrollRange, true); | ||
} | ||
if (this.props.onVisibleMonthsChange) { | ||
@@ -218,6 +220,6 @@ this.props.onVisibleMonthsChange(visibleMonths); | ||
scrollToMonth={this.scrollToMonth.bind(this)} | ||
item={item} | ||
calendarHeight={this.props.calendarHeight} | ||
calendarWidth={this.props.horizontal ? this.props.calendarWidth : undefined} | ||
{...this.props} | ||
item={item} | ||
calendarHeight={this.props.calendarHeight} | ||
calendarWidth={this.props.horizontal ? this.props.calendarWidth : undefined} | ||
{...this.props} | ||
style={this.props.calendarStyle} | ||
@@ -230,3 +232,3 @@ /> | ||
return { | ||
length: this.props.horizontal ? this.props.calendarWidth : this.props.calendarHeight, | ||
length: this.props.horizontal ? this.props.calendarWidth : this.props.calendarHeight, | ||
offset: (this.props.horizontal ? this.props.calendarWidth : this.props.calendarHeight) * index, index | ||
@@ -254,3 +256,3 @@ }; | ||
this.scrollToMonth(this.state.currentMonth); | ||
if (!doNotTriggerListeners) { | ||
@@ -271,3 +273,3 @@ const currMont = this.state.currentMonth.clone(); | ||
const useStaticHeader = staticHeader && horizontal; | ||
if (useStaticHeader) { | ||
@@ -322,2 +324,3 @@ let indicator; | ||
scrollEnabled={this.props.scrollEnabled} | ||
nestedScrollEnabled={this.props.nestedScrollEnabled} | ||
keyExtractor={(item, index) => String(index)} | ||
@@ -324,0 +327,0 @@ initialScrollIndex={this.state.openDate ? this.getMonthIndex(this.state.openDate) : false} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
88817
1989
1