@types/react-dates
Advanced tools
Comparing version 16.0.7 to 16.0.8
// Type definitions for react-dates v16.0.0 | ||
// Project: https://github.com/airbnb/react-dates | ||
// Definitions by: Artur Ampilogov <https://github.com/Artur-A> | ||
// Definitions by: Artur Ampilogov <https://github.com/Artur-A> | ||
// Nathan Holland <https://github.com/NathanNZ> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -24,4 +25,62 @@ // TypeScript Version: 2.6 | ||
type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; | ||
type CalendarInfoPositionShape = 'top' | 'bottom' | 'before' | 'after'; | ||
//https://github.com/airbnb/react-dates/blob/v16.0.1/src/defaultPhrases.js | ||
type SingleDatePickerPhrases = { | ||
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, | ||
}; | ||
//https://github.com/airbnb/react-dates/blob/v16.0.1/src/defaultPhrases.js | ||
type DateRangePickerPhrases = { | ||
calendarLabel?: 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, | ||
chooseAvailableStartDate?: (date: string) => string, | ||
chooseAvailableEndDate?: (date: string) => string, | ||
chooseAvailableDate?: (date: string) => string, | ||
dateIsUnavailable?: (date: string) => string, | ||
dateIsSelected?: (date: string) => string | ||
}; | ||
//https://github.com/airbnb/react-dates/blob/v16.0.1/src/shapes/DateRangePickerShape.js | ||
interface DateRangePickerShape { | ||
@@ -65,3 +124,3 @@ // REQUIRED props | ||
initialVisibleMonth?: () => momentPropTypes.momentObj, | ||
firstDayOfWeek? : 0 | 1 | 2 | 3 | 4 | 5 | 6, | ||
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6, | ||
numberOfMonths?: number, | ||
@@ -97,31 +156,3 @@ keepOpenOnDateSelect?: boolean, | ||
weekDayFormat?: string, | ||
phrases?: { | ||
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 | ||
} | ||
phrases?: DateRangePickerPhrases | ||
} | ||
@@ -132,2 +163,3 @@ | ||
//https://github.com/airbnb/react-dates/blob/v16.0.1/src/shapes/SingleDatePickerShape.js | ||
interface SingleDatePickerShape { | ||
@@ -166,3 +198,3 @@ // REQUIRED props | ||
initialVisibleMonth?: () => momentPropTypes.momentObj, | ||
firstDayOfWeek? : 0 | 1 | 2 | 3 | 4 | 5 | 6, | ||
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6, | ||
numberOfMonths?: number, | ||
@@ -176,3 +208,3 @@ keepOpenOnDateSelect?: boolean, | ||
verticalSpacing?: number, | ||
verticalHeight?: number| null, | ||
verticalHeight?: number | null, | ||
@@ -198,29 +230,3 @@ // navigation related props | ||
monthFormat?: string, | ||
phrases?: { | ||
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, | ||
}, | ||
phrases?: SingleDatePickerPhrases | ||
} | ||
@@ -230,4 +236,3 @@ type SingleDatePicker = React.ClassicComponentClass<SingleDatePickerShape>; | ||
//https://github.com/airbnb/react-dates/blob/v16.0.1/src/components/DayPickerRangeController.jsx | ||
interface DayPickerRangeControllerShape { | ||
@@ -277,29 +282,3 @@ // REQUIRED props | ||
monthFormat?: string, | ||
phrases?: { | ||
calendarLabel?: 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, | ||
chooseAvailableStartDate?: (date: string) => string, | ||
chooseAvailableEndDate?: (date: string) => string, | ||
chooseAvailableDate?: (date: string) => string, | ||
dateIsUnavailable?: (date: string) => string, | ||
dateIsSelected?: (date: string) => string, | ||
} | ||
phrases?: DateRangePickerPhrases | ||
} | ||
@@ -310,5 +289,59 @@ | ||
//https://github.com/airbnb/react-dates/blob/97bf16e72dbf5ce88f0181c49212080061a83f69/src/components/DayPickerSingleDateController.jsx | ||
interface DayPickerSingleDateControllerShape { | ||
date: momentPropTypes.momentObj | null, | ||
onDateChange: (date: momentPropTypes.momentObj | null) => void, | ||
focused: boolean, | ||
onFocusChange: (arg: { focused: boolean | null }) => void, | ||
onClose?: (final: { date: momentPropTypes.momentObj }) => void, | ||
keepOpenOnDateSelect?: boolean, | ||
isOutsideRange?: (day: any) => boolean, | ||
isDayBlocked?: (day: any) => boolean, | ||
isDayHighlighted?: (day: any) => boolean, | ||
// DayPicker props | ||
renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element), | ||
enableOutsideDays?: boolean, | ||
numberOfMonths?: number, | ||
orientation?: ScrollableOrientationShape, | ||
withPortal?: boolean, | ||
initialVisibleMonth?: () => momentPropTypes.momentObj, | ||
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6, | ||
hideKeyboardShortcutsPanel?: boolean, | ||
daySize?: number, | ||
verticalHeight?: number, | ||
noBorder?: boolean, | ||
transitionDuration?: number, | ||
navPrev?: string | JSX.Element, | ||
navNext?: string | JSX.Element, | ||
onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, | ||
onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, | ||
onOutsideClick?: (e: any) => void, | ||
renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), | ||
renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), | ||
renderCalendarInfo?: () => (string | JSX.Element), | ||
calendarInfoPosition?: CalendarInfoPositionShape, | ||
// accessibility | ||
onBlur?: () => void, | ||
isFocused?: boolean, | ||
showKeyboardShortcuts?: boolean, | ||
// i18n | ||
monthFormat?: string, | ||
weekDayFormat?: string, | ||
phrases?: SingleDatePickerPhrases, | ||
dayAriaLabelFormat?: string, | ||
isRTL?: boolean, | ||
} | ||
type DayPickerSingleDateController = React.ClassicComponentClass<DayPickerSingleDateControllerShape>; | ||
var DayPickerSingleDateController: React.ClassicComponentClass<DayPickerSingleDateControllerShape>; | ||
var isInclusivelyAfterDay: (a: moment.Moment, b: moment.Moment) => boolean; | ||
@@ -315,0 +348,0 @@ var isInclusivelyBeforeDay: (a: moment.Moment, b: moment.Moment) => boolean; |
{ | ||
"name": "@types/react-dates", | ||
"version": "16.0.7", | ||
"version": "16.0.8", | ||
"description": "TypeScript definitions for react-dates", | ||
@@ -11,2 +11,7 @@ "license": "MIT", | ||
"githubUsername": "Artur-A" | ||
}, | ||
{ | ||
"name": "Nathan Holland", | ||
"url": "https://github.com/NathanNZ", | ||
"githubUsername": "NathanNZ" | ||
} | ||
@@ -24,4 +29,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "7cba943d5c794c87e029942c9bae362aa62c230f022f6aa8902440580fa994b8", | ||
"typesPublisherContentHash": "24321ccf493e2458527ebffa7562c7fe7b40c36f22d7e0a15a21c2c0993eb38e", | ||
"typeScriptVersion": "2.6" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Sun, 27 May 2018 14:13:13 GMT | ||
* Last updated: Fri, 01 Jun 2018 22:02:05 GMT | ||
* Dependencies: react, moment | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Artur Ampilogov <https://github.com/Artur-A>. | ||
These definitions were written by Artur Ampilogov <https://github.com/Artur-A>, Nathan Holland <https://github.com/NathanNZ>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16741
304