Socket
Socket
Sign inDemoInstall

react-calendar

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-calendar - npm Package Compare versions

Comparing version 2.15.0 to 2.15.1

20

dist/Calendar.js

@@ -427,7 +427,15 @@ 'use strict';

var nextState = {
activeStartDate: getActiveStartDate(nextProps)
};
var nextState = {};
/**
* If the next activeStartDate is different from the current one, update
* activeStartDate (for display) and activeStartDateProps (for future comparisons)
*/
var nextActiveStartDate = getActiveStartDate(nextProps);
if (datesAreDifferent(nextActiveStartDate, prevState.activeStartDateProps)) {
nextState.activeStartDate = nextActiveStartDate;
nextState.activeStartDateProps = nextActiveStartDate;
}
/**
* If the next view is different from the current one, and the previously set view is not

@@ -437,4 +445,5 @@ * valid based on minDetail and maxDetail, get a new one.

var nextView = getView(nextProps.view, minDetail, maxDetail);
if (nextView !== prevState.view && !isViewAllowed(prevState.view, minDetail, maxDetail)) {
if (nextView !== prevState.viewProps && !isViewAllowed(prevState.view, minDetail, maxDetail)) {
nextState.view = nextView;
nextState.viewProps = nextView;
}

@@ -447,3 +456,3 @@

*/
var values = [nextProps.value, prevState.value];
var values = [nextProps.value, prevState.valueProps];
if (nextState.view || // Allowed view changed

@@ -456,2 +465,3 @@ datesAreDifferent.apply(undefined, _toConsumableArray(values.map(function (value) {

nextState.value = nextProps.value;
nextState.valueProps = nextProps.value;
}

@@ -458,0 +468,0 @@

@@ -0,0 +0,0 @@ declare module "react-calendar/dist/entry.nostyle" {

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ declare module "react-calendar" {

{
"name": "react-calendar",
"version": "2.15.0",
"version": "2.15.1",
"description": "Ultimate calendar for your React app.",

@@ -85,4 +85,4 @@ "main": "dist/entry.js",

"less": "^2.7.3",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.4.0",
"react-dom": "^16.4.0"
},

@@ -89,0 +89,0 @@ "peerDependencies": {

@@ -0,0 +0,0 @@ ![downloads](https://img.shields.io/npm/dt/react-calendar.svg) ![build](https://img.shields.io/travis/wojtekmaj/react-calendar/master.svg) ![dependencies](https://img.shields.io/david/wojtekmaj/react-calendar.svg

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -161,7 +161,15 @@ import React, { Component } from 'react';

const nextState = {
activeStartDate: getActiveStartDate(nextProps),
};
const nextState = {};
/**
* If the next activeStartDate is different from the current one, update
* activeStartDate (for display) and activeStartDateProps (for future comparisons)
*/
const nextActiveStartDate = getActiveStartDate(nextProps);
if (datesAreDifferent(nextActiveStartDate, prevState.activeStartDateProps)) {
nextState.activeStartDate = nextActiveStartDate;
nextState.activeStartDateProps = nextActiveStartDate;
}
/**
* If the next view is different from the current one, and the previously set view is not

@@ -171,4 +179,5 @@ * valid based on minDetail and maxDetail, get a new one.

const nextView = getView(nextProps.view, minDetail, maxDetail);
if (nextView !== prevState.view && !isViewAllowed(prevState.view, minDetail, maxDetail)) {
if (nextView !== prevState.viewProps && !isViewAllowed(prevState.view, minDetail, maxDetail)) {
nextState.view = nextView;
nextState.viewProps = nextView;
}

@@ -181,3 +190,3 @@

*/
const values = [nextProps.value, prevState.value];
const values = [nextProps.value, prevState.valueProps];
if (

@@ -189,2 +198,3 @@ nextState.view || // Allowed view changed

nextState.value = nextProps.value;
nextState.valueProps = nextProps.value;
}

@@ -191,0 +201,0 @@

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { Component } from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import Calendar from './Calendar';

@@ -0,0 +0,0 @@ import Calendar from './Calendar';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import React, { Component } from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ import { getDefaultLocale } from './locales';

@@ -0,0 +0,0 @@ /* Simple getters - getting a property of a given point in time */

@@ -0,0 +0,0 @@ import once from 'lodash.once';

@@ -0,0 +0,0 @@ import PropTypes from 'prop-types';

@@ -0,0 +0,0 @@ import { getRange } from './dates';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React, { PureComponent } from 'react';

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc