Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-persian-dates

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-persian-dates - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

37

dist/index.es.js

@@ -256,8 +256,4 @@ import React, { PureComponent, Component } from 'react';

value: function componentDidMount() {
var _this2 = this;
if (this.props.status === 'singleDate' || this.props.status === 'firstDay') {
setTimeout(function () {
return _this2.dayRef.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });
}, 500);
this.props.scrollToSelectedDay(this.dayRef);
}

@@ -268,3 +264,3 @@ }

value: function render() {
var _this3 = this;
var _this2 = this;

@@ -291,3 +287,3 @@ var _props = this.props,

{ className: 'dayWrapper', ref: function ref(_ref) {
_this3.dayRef = _ref;
_this2.dayRef = _ref;
} },

@@ -329,2 +325,3 @@ React.createElement(

disabled: PropTypes.bool,
scrollToSelectedDay: PropTypes.func,
status: PropTypes.string,

@@ -336,2 +333,8 @@ persianDate: PropTypes.array,

Day.defaultProps = {
scrollToSelectedDay: function scrollToSelectedDay() {
return undefined;
}
};
var Month = function (_PureComponent) {

@@ -357,3 +360,5 @@ inherits(Month, _PureComponent);

value: function renderMonth(month) {
var onSelect = this.props.onSelect;
var _props = this.props,
onSelect = _props.onSelect,
scrollToSelectedDay = _props.scrollToSelectedDay;

@@ -367,3 +372,4 @@ return month.map(function (day, index) {

key: '' + index,
onSelect: onSelect
onSelect: onSelect,
scrollToSelectedDay: scrollToSelectedDay
});

@@ -377,5 +383,5 @@ });

var _props = this.props,
month = _props.month,
monthTitle = _props.monthTitle;
var _props2 = this.props,
month = _props2.month,
monthTitle = _props2.monthTitle;

@@ -415,3 +421,4 @@ var monthArray = this.chunkArray(month, 7);

monthTitle: PropTypes.string,
onSelect: PropTypes.func
onSelect: PropTypes.func,
scrollToSelectedDay: PropTypes.func
};

@@ -463,3 +470,4 @@

monthTitle: monthTitle,
onSelect: _this2.changeSelection
onSelect: _this2.changeSelection,
scrollToSelectedDay: _this2.props.scrollToSelectedDay
});

@@ -569,2 +577,3 @@ })

onSelect: PropTypes.func,
scrollToSelectedDay: PropTypes.func,
selectFrom: PropTypes.instanceOf(Date),

@@ -571,0 +580,0 @@ startDate: PropTypes.instanceOf(Date),

@@ -261,8 +261,4 @@ 'use strict';

value: function componentDidMount() {
var _this2 = this;
if (this.props.status === 'singleDate' || this.props.status === 'firstDay') {
setTimeout(function () {
return _this2.dayRef.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });
}, 500);
this.props.scrollToSelectedDay(this.dayRef);
}

@@ -273,3 +269,3 @@ }

value: function render() {
var _this3 = this;
var _this2 = this;

@@ -296,3 +292,3 @@ var _props = this.props,

{ className: 'dayWrapper', ref: function ref(_ref) {
_this3.dayRef = _ref;
_this2.dayRef = _ref;
} },

@@ -334,2 +330,3 @@ React__default.createElement(

disabled: PropTypes.bool,
scrollToSelectedDay: PropTypes.func,
status: PropTypes.string,

@@ -341,2 +338,8 @@ persianDate: PropTypes.array,

Day.defaultProps = {
scrollToSelectedDay: function scrollToSelectedDay() {
return undefined;
}
};
var Month = function (_PureComponent) {

@@ -362,3 +365,5 @@ inherits(Month, _PureComponent);

value: function renderMonth(month) {
var onSelect = this.props.onSelect;
var _props = this.props,
onSelect = _props.onSelect,
scrollToSelectedDay = _props.scrollToSelectedDay;

@@ -372,3 +377,4 @@ return month.map(function (day, index) {

key: '' + index,
onSelect: onSelect
onSelect: onSelect,
scrollToSelectedDay: scrollToSelectedDay
});

@@ -382,5 +388,5 @@ });

var _props = this.props,
month = _props.month,
monthTitle = _props.monthTitle;
var _props2 = this.props,
month = _props2.month,
monthTitle = _props2.monthTitle;

@@ -420,3 +426,4 @@ var monthArray = this.chunkArray(month, 7);

monthTitle: PropTypes.string,
onSelect: PropTypes.func
onSelect: PropTypes.func,
scrollToSelectedDay: PropTypes.func
};

@@ -468,3 +475,4 @@

monthTitle: monthTitle,
onSelect: _this2.changeSelection
onSelect: _this2.changeSelection,
scrollToSelectedDay: _this2.props.scrollToSelectedDay
});

@@ -574,2 +582,3 @@ })

onSelect: PropTypes.func,
scrollToSelectedDay: PropTypes.func,
selectFrom: PropTypes.instanceOf(Date),

@@ -576,0 +585,0 @@ startDate: PropTypes.instanceOf(Date),

{
"name": "react-persian-dates",
"version": "1.0.8",
"version": "1.0.9",
"description": "",

@@ -5,0 +5,0 @@ "author": "majid-amiri",

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