@types/react-calendar
Advanced tools
Comparing version 3.4.5 to 3.5.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-calendar 3.4 | ||
// Type definitions for react-calendar 3.5 | ||
// Project: https://github.com/wojtekmaj/react-calendar | ||
@@ -8,5 +8,5 @@ // Definitions by: Stéphane Saquet <https://github.com/Guymestef> | ||
import { MouseEvent, ChangeEvent, MutableRefObject, RefObject } from 'react'; | ||
import { ReactNode, MouseEvent, ChangeEvent, MutableRefObject, RefObject } from 'react'; | ||
export type CalendarType = "ISO 8601" | 'US' | 'Arabic' | 'Hebrew'; | ||
export type CalendarType = 'ISO 8601' | 'US' | 'Arabic' | 'Hebrew'; | ||
export type Detail = 'month' | 'year' | 'decade' | 'century'; | ||
@@ -38,5 +38,7 @@ export type DateCallback = (value: Date, event: MouseEvent<HTMLButtonElement>) => void; | ||
formatYear?: FormatterCallback | undefined; | ||
inputRef?: (( | ||
ref: HTMLInputElement | null, | ||
) => void) | RefObject<HTMLInputElement> | MutableRefObject<HTMLInputElement | null> | undefined; | ||
inputRef?: | ||
| ((ref: HTMLInputElement | null) => void) | ||
| RefObject<HTMLInputElement> | ||
| MutableRefObject<HTMLInputElement | null> | ||
| undefined; | ||
locale?: string | undefined; | ||
@@ -48,8 +50,5 @@ maxDate?: Date | undefined; | ||
navigationAriaLabel?: string | undefined; | ||
navigationLabel?: ((props: { | ||
date: Date; | ||
label: string; | ||
locale: string; | ||
view: Detail; | ||
}) => string | JSX.Element | null) | undefined; | ||
navigationLabel?: | ||
| ((props: { date: Date; label: string; locale: string; view: Detail }) => string | JSX.Element | null) | ||
| undefined; | ||
nextAriaLabel?: string | undefined; | ||
@@ -73,3 +72,3 @@ nextLabel?: string | JSX.Element | null | undefined; | ||
prev2Label?: string | JSX.Element | null | undefined; | ||
returnValue?: "start" | "end" | "range" | undefined; | ||
returnValue?: 'start' | 'end' | 'range' | undefined; | ||
showDoubleView?: boolean | undefined; | ||
@@ -110,2 +109,3 @@ showFixedNumberOfWeeks?: boolean | undefined; | ||
export function CenturyView(props: DetailViewProps): JSX.Element; | ||
export function Navigation(props: NavigationProps): JSX.Element; | ||
@@ -127,1 +127,35 @@ export interface DetailViewProps { | ||
} | ||
export type ViewType = 'century' | 'decade' | 'year' | 'month'; | ||
export interface NavigationLabelType { | ||
date: Date; | ||
label: string; | ||
locale: string; | ||
view: ViewType; | ||
} | ||
export interface NavigationProps { | ||
activeStartDate: Date; | ||
drillUp: () => void; | ||
formatMonthYear?: (locale: string, date: Date) => void; | ||
formatYear?: (locale: string, date: Date) => void; | ||
locale?: string; | ||
maxDate?: Date; | ||
minDate?: Date; | ||
navigationAriaLabel?: ReactNode; | ||
navigationAriaLive?: ReactNode; | ||
navigationLabel?: (props: NavigationLabelType) => string; | ||
next2AriaLabel?: string; | ||
next2Label?: ReactNode; | ||
nextAriaLabel?: string; | ||
nextLabel?: ReactNode; | ||
prev2AriaLabel?: string; | ||
prev2Label?: ReactNode; | ||
prevAriaLabel?: ReactNode; | ||
prevLabel?: ReactNode; | ||
setActiveStartDate: (activeStartDate: Date) => void; | ||
showDoubleView?: boolean; | ||
view: ViewType; | ||
views: ViewType[]; | ||
} |
{ | ||
"name": "@types/react-calendar", | ||
"version": "3.4.5", | ||
"version": "3.5.0", | ||
"description": "TypeScript definitions for react-calendar", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-calendar", | ||
}, | ||
"typesPublisherContentHash": "b6f680d3f7dfb90aa6140378fe5508d00d3fa868419dc6644caf1f09125be3a9", | ||
"typeScriptVersion": "3.8" | ||
"typesPublisherContentHash": "243536af21520ec21e9fe35748e5254f4f11b0ad61dbe635aa1d8328a2fa2359", | ||
"typeScriptVersion": "3.9" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 19 Jan 2022 20:02:18 GMT | ||
* Last updated: Wed, 02 Mar 2022 17:31:50 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: none |
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
9201
143