Socket
Socket
Sign inDemoInstall

@cnakazawa/react-native-calendars

Package Overview
Dependencies
7
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.22.0 to 1.22.1

6

package.json
{
"name": "@cnakazawa/react-native-calendars",
"version": "1.22.0",
"version": "1.22.1",
"main": "src/index.js",

@@ -25,5 +25,5 @@ "description": "React Native Calendar Components",

"dependencies": {
"@cnakazawa/xdate": "^0.8.2",
"lodash": "^4.0.0",
"prop-types": "^15.5.10"
"prop-types": "^15.5.10",
"xdate": "^0.8.0"
},

@@ -30,0 +30,0 @@ "devDependencies": {

import React, {Component} from 'react';
import {FlatList, Platform, Dimensions, ActivityIndicator, View} from 'react-native';
import PropTypes from 'prop-types';
import XDate from '@cnakazawa/xdate';
import XDate from 'xdate';

@@ -67,5 +67,5 @@ import {xdateToData, parseDate} from '../interface';

super(props);
this.style = styleConstructor(props.theme);
this.viewabilityConfig = {

@@ -78,3 +78,3 @@ itemVisiblePercentThreshold: 20

const date = parseDate(props.current) || XDate();
for (let i = 0; i <= this.props.pastScrollRange + this.props.futureScrollRange; i++) {

@@ -119,3 +119,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) {

@@ -148,3 +148,3 @@ let week = 0;

const nextCurrent = parseDate(props.current);
if (nextCurrent && current && nextCurrent.getTime() !== current.getTime()) {

@@ -156,3 +156,3 @@ this.scrollToMonth(nextCurrent);

const newrows = [];
for (let i = 0; i < rowclone.length; i++) {

@@ -184,7 +184,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) {

@@ -200,3 +200,3 @@ val = this.state.openDate.clone().addMonths(i - this.props.pastScrollRange, true);

}
if (this.props.onVisibleMonthsChange) {

@@ -216,6 +216,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}

@@ -228,3 +228,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

@@ -252,3 +252,3 @@ };

this.scrollToMonth(this.state.currentMonth);
if (!doNotTriggerListeners) {

@@ -269,3 +269,3 @@ const currMont = this.state.currentMonth.clone();

const useStaticHeader = staticHeader && horizontal;
if (useStaticHeader) {

@@ -272,0 +272,0 @@ let indicator;

@@ -1,2 +0,1 @@

import _ from 'lodash';
import PropTypes from 'prop-types';

@@ -13,2 +12,4 @@ import React, {Component} from 'react';

const isEqual = require('lodash/isEqual');
class Day extends Component {

@@ -52,3 +53,3 @@ static displayName = 'IGNORE';

if (!_.isEqual(this.markingStyle, newMarkingStyle)) {
if (!isEqual(this.markingStyle, newMarkingStyle)) {
this.markingStyle = newMarkingStyle;

@@ -55,0 +56,0 @@ return true;

import React, {Component} from 'react';
import {ActivityIndicator} from 'react-native';
import {View, Text} from 'react-native';
import XDate from '@cnakazawa/xdate';
import XDate from 'xdate';
import PropTypes from 'prop-types';

@@ -9,3 +9,2 @@ import styleConstructor from './style';

class CalendarHeader extends Component {

@@ -12,0 +11,0 @@ static displayName = 'IGNORE';

import React, {Component} from 'react';
import {View, ViewPropTypes} from 'react-native';
import PropTypes from 'prop-types';
import XDate from '@cnakazawa/xdate';
import XDate from 'xdate';

@@ -85,5 +85,5 @@ import dateutils from '../dateutils';

super(props);
this.style = styleConstructor(this.props.theme);
this.state = {

@@ -249,3 +249,3 @@ currentMonth: props.current ? parseDate(props.current) : XDate()

}
let indicator;

@@ -252,0 +252,0 @@ const current = parseDate(this.props.current);

@@ -1,6 +0,7 @@

const _ = require('lodash');
const isEqual = require('lodash/isEqual');
const get = require('lodash/get');
function shouldUpdate(a, b, paths) {
for (let i = 0; i < paths.length; i++) {
const equals = _.isEqual(_.get(a, paths[i]), _.get(b, paths[i]));
const equals = isEqual(get(a, paths[i]), get(b, paths[i]));
if (!equals) {

@@ -7,0 +8,0 @@ return true;

@@ -1,2 +0,2 @@

const XDate = require('@cnakazawa/xdate');
const XDate = require('xdate');

@@ -3,0 +3,0 @@ function sameMonth(a, b) {

export { default as Calendar } from './calendar';
export { default as CalendarList } from './calendar-list';
export { default as LocaleConfig } from '@cnakazawa/xdate';
export { default as LocaleConfig } from 'xdate';

@@ -1,2 +0,2 @@

const XDate = require('@cnakazawa/xdate');
const XDate = require('xdate');

@@ -3,0 +3,0 @@ function padNumber(n) {

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