Socket
Socket
Sign inDemoInstall

@types/react-dates

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-dates - npm Package Compare versions

Comparing version 7.0.1 to 10.0.0

react-dates/LICENSE

404

react-dates/index.d.ts

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

// Type definitions for react-dates v7.0.1
// Type definitions for react-dates v10.0.1
// Project: https://github.com/airbnb/react-dates
// Definitions by: Artur Ampilogov <https://github.com/Artur-A>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
// TypeScript Version: 2.2

@@ -13,3 +13,3 @@ import * as React from "react";

declare namespace momentPropTypes{
type momentObj = any;
type momentObj = moment.Moment;
type momentString = any;

@@ -22,3 +22,3 @@ type momentDurationObj = any;

type AnchorDirectionShape = 'left' | 'right';
type FocusedInputShape = 'startDate' | 'endDate' | null;
type FocusedInputShape = 'startDate' | 'endDate';
type OrientationShape = 'horizontal' | 'vertical';

@@ -29,44 +29,83 @@ type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable';

interface DateRangePickerShape{
startDate?: momentPropTypes.momentObj,
endDate?: momentPropTypes.momentObj,
focusedInput?: FocusedInputShape,
// REQUIRED props
startDate: momentPropTypes.momentObj | null,
endDate: momentPropTypes.momentObj | null,
onDatesChange: (arg: { startDate: momentPropTypes.momentObj | null,
endDate: momentPropTypes.momentObj | null }
) => void,
focusedInput: FocusedInputShape | null,
onFocusChange: (arg: FocusedInputShape | null) => void,
// input related props
startDateId?: string,
startDatePlaceholderText?: string,
endDateId?: string,
endDatePlaceholderText?: string,
disabled?: boolean,
required?: boolean,
screenReaderInputMessage?: string,
minimumNights?: number,
isDayBlocked?: (day: any) => boolean,
isOutsideRange?: (day: any) => boolean,
enableOutsideDays?: boolean,
reopenPickerOnClearDates?: boolean,
keepOpenOnDateSelect?: boolean,
numberOfMonths?: number,
showClearDates?: boolean,
disabled?: boolean,
required?: boolean,
showDefaultInputIcon?: boolean,
customInputIcon?: string | JSX.Element,
customArrowIcon?: string | JSX.Element,
customCloseIcon?: string | JSX.Element,
// calendar presentation and interaction related props
orientation?: OrientationShape,
anchorDirection?: AnchorDirectionShape,
horizontalMargin?: number,
// portal options
withPortal?: boolean,
withFullScreenPortal?: boolean,
initialVisibleMonth?: () => momentPropTypes.momentObj,
numberOfMonths?: number,
keepOpenOnDateSelect?: boolean,
reopenPickerOnClearDates?: boolean,
renderCalendarInfo?: () => (string | JSX.Element),
startDateId?: string,
startDatePlaceholderText?: string,
endDateId?: string,
endDatePlaceholderText?: string,
initialVisibleMonth?: () => moment.Moment,
onDatesChange?: (arg: { startDate: any, endDate: any }) => void,
onFocusChange?: (arg: FocusedInputShape) => void,
// navigation related props
navPrev?: string | JSX.Element,
navNext?: string | JSX.Element,
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
renderDay?: (day: any) => (string | JSX.Element),
// day presentation and interaction related props
renderDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
minimumNights?: number,
enableOutsideDays?: boolean,
isDayBlocked?: (day: any) => boolean,
isOutsideRange?: (day: any) => boolean,
isDayHighlighted?: (day: any) => boolean,
// i18n
// internationalization props
displayFormat?: (string | (()=> string)),
monthFormat?: string,
phrases?: {
closeDatePicker: string | JSX.Element,
clearDates: string | JSX.Element,
closeDatePicker: string,
clearDates: string,
focusStartDate: string,
jumpToPrevMonth: string,
jumpToNextMonth: string,
keyboardShortcuts: string,
showKeyboardShortcutsPanel: string,
hideKeyboardShortcutsPanel: string,
openThisPanel: string,
enterKey: string,
leftArrowRightArrow: string,
upArrowDownArrow: string,
pageUpPageDown: string,
homeEnd: string,
escape: string,
questionMark: string,
selectFocusedDate: string,
moveFocusByOneDay: string,
moveFocusByOneWeek: string,
moveFocusByOneMonth: string,
moveFocustoStartAndEndOfWeek: string,
returnFocusToInput: string,
keyboardNavigationInstructions: string,
chooseAvailableStartDate: (date: string) => string,
chooseAvailableEndDate: (date: string) => string,
dateIsUnavailable: (date: string) => string
}

@@ -79,42 +118,73 @@ }

interface SingleDatePickerShape{
// REQUIRED props
date: momentPropTypes.momentObj | null,
onDateChange: (date: momentPropTypes.momentObj | null) => void,
focused: boolean,
onFocusChange: (arg: { focused: boolean | null }) => void,
id: string,
// input related props
placeholder?: string,
date?: momentPropTypes.momentObj,
focused?: boolean,
showClearDate?: boolean,
reopenPickerOnClearDates?: boolean,
keepOpenOnDateSelect?: boolean,
disabled?: boolean,
required?: boolean,
screenReaderInputMessage?: string,
showClearDate?: boolean,
customCloseIcon?: string | JSX.Element,
onDateChange?: (date: any) => void,
onFocusChange?: (arg: { focused: boolean | null }) => void,
isDayBlocked?: (day: any) => boolean,
isOutsideRange?: (day: any) => boolean,
enableOutsideDays?: boolean,
numberOfMonths?: number,
// calendar presentation and interaction related props
orientation?: OrientationShape,
initialVisibleMonth?: () => moment.Moment,
anchorDirection?: AnchorDirectionShape,
horizontalMargin?: number,
withPortal?: boolean,
withFullScreenPortal?: boolean,
initialVisibleMonth?: () => momentPropTypes.momentObj,
numberOfMonths?: number,
keepOpenOnDateSelect?: boolean,
reopenPickerOnClearDates?: boolean,
renderCalendarInfo?: () => (string | JSX.Element),
// navigation related props
navPrev?: string | JSX.Element,
navNext?: string | JSX.Element,
// portal options
withPortal?: boolean,
withFullScreenPortal?: boolean,
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
renderDay?: (day: any) => (string | JSX.Element),
// day presentation and interaction related props
renderDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
enableOutsideDays?: boolean,
isDayBlocked?: (day: any) => boolean,
isOutsideRange?: (day: any) => boolean,
isDayHighlighted?: (day: any) => boolean,
// i18n
// internationalization props
displayFormat?: (string | (()=> string)),
monthFormat?: string,
phrases?: {
closeDatePicker: string | JSX.Element,
closeDatePicker: string,
clearDate: string,
jumpToPrevMonth: string,
jumpToNextMonth: string,
keyboardShortcuts: string,
showKeyboardShortcutsPanel: string,
hideKeyboardShortcutsPanel: string,
openThisPanel: string,
enterKey: string,
leftArrowRightArrow: string,
upArrowDownArrow: string,
pageUpPageDown: string,
homeEnd: string,
escape: string,
questionMark: string,
selectFocusedDate: string,
moveFocusByOneDay: string,
moveFocusByOneWeek: string,
moveFocusByOneMonth: string,
moveFocustoStartAndEndOfWeek: string,
returnFocusToInput: string,
keyboardNavigationInstructions: string,
chooseAvailableDate: (date: string) => string,
dateIsUnavailable: (date: string) => string,
},

@@ -127,150 +197,30 @@ }

interface DateRangePickerInputControllerShape {
startDate?: momentPropTypes.momentObj,
startDateId?: string,
startDatePlaceholderText?: string,
isStartDateFocused?: boolean,
interface DayPickerRangeControllerShape {
// REQUIRED props
startDate: momentPropTypes.momentObj | null,
endDate: momentPropTypes.momentObj | null,
onDatesChange: (arg: { startDate: momentPropTypes.momentObj | null,
endDate: momentPropTypes.momentObj | null }
) => void,
focusedInput: FocusedInputShape | null,
onFocusChange: (arg: FocusedInputShape | null) => void,
endDate?: momentPropTypes.momentObj,
endDateId?: string,
endDatePlaceholderText?: string,
isEndDateFocused?: boolean,
screenReaderMessage?: string,
showClearDates?: boolean,
showCaret?: boolean,
showDefaultInputIcon?: boolean,
disabled?: boolean,
required?: boolean,
keepOpenOnDateSelect?: boolean,
reopenPickerOnClearDates?: boolean,
withFullScreenPortal?: boolean,
isOutsideRange?: (day: any) => boolean,
displayFormat?: (string | (()=> string)),
onFocusChange?: (arg: FocusedInputShape) => void,
onDatesChange?: (arg: { startDate: any, endDate: any }) => void,
customInputIcon?: string | JSX.Element,
customArrowIcon?: string | JSX.Element,
// i18n
phrases?: {
clearDates: string | JSX.Element,
}
}
type DateRangePickerInputController = React.ClassicComponentClass<DateRangePickerInputControllerShape>;
var DateRangePickerInputController: React.ClassicComponentClass<DateRangePickerInputControllerShape>;
interface DateRangePickerInputShape{
startDateId?: string,
startDatePlaceholderText?: string,
screenReaderMessage?: string,
endDateId?: string,
endDatePlaceholderText?: string,
onStartDateFocus?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onEndDateFocus?: (e: React.EventHandler<React.FocusEvent<HTMLInputElement>>) => void,
onStartDateChange?: (e: React.EventHandler<React.FormEvent<HTMLInputElement>>) => void,
onEndDateChange?: (e: React.EventHandler<React.FormEvent<HTMLInputElement>>) => void,
onStartDateShiftTab?: (e: React.EventHandler<React.KeyboardEvent<HTMLInputElement>>) => void,
onEndDateTab?: (e: React.EventHandler<React.KeyboardEvent<HTMLInputElement>>) => void,
onClearDates?: (e: React.EventHandler<React.MouseEvent<HTMLButtonElement>>) => void,
startDate?: string,
startDateValue?: string,
endDate?: string,
endDateValue?: string,
isStartDateFocused?: boolean,
isEndDateFocused?: boolean,
showClearDates?: boolean,
disabled?: boolean,
required?: boolean,
showCaret?: boolean,
showDefaultInputIcon?: boolean,
customInputIcon?: string | JSX.Element,
customArrowIcon?: string | JSX.Element,
// i18n
phrases?:{
clearDates: string | JSX.Element,
},
}
type DateRangePickerInput = React.ClassicComponentClass<DateRangePickerInputShape>;
var DateRangePickerInput: React.ClassicComponentClass<DateRangePickerInputShape>;
interface SingleDatePickerInputShape{
id: string,
placeholder?: string, // also used as label
displayValue?: string,
inputValue?: string,
screenReaderMessage?: string,
focused?: boolean,
disabled?: boolean,
required?: boolean,
showCaret?: boolean,
showClearDate?: boolean,
onChange?: (e: React.EventHandler<React.FormEvent<HTMLInputElement>>) => void,
onClearDate?: (e: React.EventHandler<React.MouseEvent<HTMLButtonElement>>) => void,
onFocus?: (e: React.EventHandler<React.FocusEvent<HTMLInputElement>>) => void,
onKeyDownShiftTab?: (e: React.EventHandler<React.KeyboardEvent<HTMLInputElement>>) => void,
onKeyDownTab?: (e: React.EventHandler<React.KeyboardEvent<HTMLInputElement>>) => void,
// i18n
phrases?: {
clearDate: string | JSX.Element,
}
}
type SingleDatePickerInput = React.ClassicComponentClass<SingleDatePickerInputShape>;
var SingleDatePickerInput: React.ClassicComponentClass<SingleDatePickerInputShape>;
interface DayPickerShape{
// calendar presentation and interaction related props
enableOutsideDays?: boolean,
numberOfMonths?: number,
modifiers?: any,
orientation?: ScrollableOrientationShape,
withPortal?: boolean,
hidden?: boolean,
initialVisibleMonth?: () => moment.Moment,
initialVisibleMonth?: () => momentPropTypes.momentObj,
renderCalendarInfo?: () => (string | JSX.Element),
onOutsideClick?: (e: any) => void,
keepOpenOnDateSelect?: boolean,
// navigation related props
navPrev?: string | JSX.Element,
navNext?: string | JSX.Element,
onDayClick?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseEnter?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseLeave?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onOutsideClick?: (e: MouseEvent) => void,
renderDay?: (day: any) => (string | JSX.Element),
// i18n
monthFormat?: string,
}
type DayPicker = React.ClassicComponentClass<DayPickerShape>;
var DayPicker: React.ClassicComponentClass<DayPickerShape>;
interface DayPickerRangeControllerShape{
startDate?: momentPropTypes.momentObj,
endDate?: momentPropTypes.momentObj,
onDatesChange?: (arg: { startDate: any, endDate: any }) => void,
focusedInput?: FocusedInputShape,
onFocusChange?: (arg: FocusedInputShape) => void,
keepOpenOnDateSelect?: boolean,
// day presentation and interaction related props
renderDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
minimumNights?: number,

@@ -281,21 +231,11 @@ isOutsideRange?: (day: any) => boolean,

// DayPicker props
enableOutsideDays?: boolean,
numberOfMonths?: number,
orientation?: ScrollableOrientationShape,
withPortal?: boolean,
hidden?: boolean,
initialVisibleMonth?: () => moment.Moment,
navPrev?: string | JSX.Element,
navNext?: string | JSX.Element,
onPrevMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onNextMonthClick?: (e: React.EventHandler<React.MouseEvent<HTMLSpanElement>>) => void,
onOutsideClick?: (e: MouseEvent) => void,
renderDay?: (day: any) => (string | JSX.Element),
// i18n
// internationalization props
monthFormat?: string,
phrases?: {
focusStartDate: string,
clearDates: string,
keyboardNavigationInstructions: string,
}
}
type DayPickerRangeController = React.ClassicComponentClass<DayPickerRangeControllerShape>;

@@ -305,58 +245,4 @@ var DayPickerRangeController: React.ClassicComponentClass<DayPickerRangeControllerShape>;

interface CalendarMonthGridShape{
enableOutsideDays?: boolean,
firstVisibleMonthIndex?: number,
initialMonth?: momentPropTypes.momentObj,
isAnimating?: boolean,
numberOfMonths?: number,
modifiers?: any,
orientation?: ScrollableOrientationShape,
onDayClick?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseEnter?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseLeave?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onMonthTransitionEnd?: ()=> void,
renderDay?: (day: any) => (string | JSX.Element),
transformValue?: string,
// i18n
monthFormat?: string,
}
type CalendarMonthGrid = React.ClassicComponentClass<CalendarMonthGridShape>;
var CalendarMonthGrid: React.ClassicComponentClass<CalendarMonthGridShape>;
interface CalendarMonthShape{
month?: momentPropTypes.momentObj,
isVisible?: boolean,
enableOutsideDays?: boolean,
modifiers?: any,
orientation?: ScrollableOrientationShape,
onDayClick?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseEnter?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseLeave?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
renderDay?: (day: any) => (string | JSX.Element),
// i18n
monthFormat?: string,
}
type CalendarMonth = React.ClassicComponentClass<CalendarMonthShape>;
var CalendarMonth: React.ClassicComponentClass<CalendarMonthShape>;
interface CalendarDayShape{
day?: momentPropTypes.momentObj,
isOutsideDay?: boolean,
modifiers?: any,
onDayClick?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseEnter?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
onDayMouseLeave?: (day: any, e: React.EventHandler<React.MouseEvent<HTMLTableDataCellElement>>) => void,
renderDay?: (day: any) => (string | JSX.Element),
}
type CalendarDay = React.ClassicComponentClass<CalendarDayShape>;
var CalendarDay: React.ClassicComponentClass<CalendarDayShape>;
var isInclusivelyAfterDay: (a: moment.Moment, b: moment.Moment) => boolean;

@@ -363,0 +249,0 @@ var isInclusivelyBeforeDay: (a: moment.Moment, b: moment.Moment) => boolean;

{
"name": "@types/react-dates",
"version": "7.0.1",
"version": "10.0.0",
"description": "TypeScript definitions for react-dates",

@@ -23,4 +23,4 @@ "license": "MIT",

"peerDependencies": {},
"typesPublisherContentHash": "649793209b6ef1b56b6f0fc49f2912c98ce9db820a4cb5ec6f04b22579bfc464",
"typeScriptVersion": "2.1"
"typesPublisherContentHash": "c5a20c115868afff3bd268c42ed587b4b59243afb7ae5c35501a9b4e8146eb54",
"typeScriptVersion": "2.2"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/react-dates
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dates
Additional Details
* Last updated: Thu, 23 Mar 2017 21:16:34 GMT
* Last updated: Tue, 18 Apr 2017 15:11:46 GMT
* Dependencies: react, moment

@@ -14,0 +14,0 @@ * Global values: none

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