@types/react-big-calendar
Advanced tools
Comparing version 0.20.0 to 0.20.1
@@ -8,2 +8,3 @@ // Type definitions for react-big-calendar 0.20 | ||
// Paul Potsides <https://github.com/strongpauly> | ||
// janb87 <https://github.com/janb87> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -14,5 +15,13 @@ // TypeScript Version: 2.8 | ||
export type DayPropGetter = (date: Date) => { className?: string, style?: React.CSSProperties }; | ||
export type EventPropGetter<T> = (event: T, start: stringOrDate, end: stringOrDate, isSelected: boolean) => { className?: string, style?: React.CSSProperties }; | ||
export type SlotPropGetter = (date: Date) => { className?: string, style?: React.CSSProperties }; | ||
export type stringOrDate = string | Date; | ||
export type ViewKey = 'MONTH' | 'WEEK' | 'WORK_WEEK' | 'DAY' | 'AGENDA'; | ||
export type View = 'month' | 'week' | 'work_week' | 'day' | 'agenda'; | ||
export type Views = View[] | { | ||
month: boolean | React.SFC | React.Component, | ||
week: boolean | React.SFC | React.Component, | ||
myweek: boolean | React.SFC | React.Component, | ||
}; | ||
export type Navigate = 'PREV' | 'NEXT' | 'TODAY' | 'DATE'; | ||
@@ -75,3 +84,3 @@ | ||
*/ | ||
agendaHeaderFormat?: DateFormat; | ||
agendaHeaderFormat?: DateRangeFormatFunction; | ||
@@ -111,3 +120,3 @@ /** | ||
event?: React.SFC | React.Component | React.ComponentClass | JSX.Element; | ||
eventWrapper?: React.SFC | React.Component | React.ComponentClass | JSX.Element; | ||
eventWrapper?: React.ComponentType<EventWrapperProps>; | ||
dayWrapper?: React.SFC | React.Component | React.ComponentClass | JSX.Element; | ||
@@ -119,3 +128,3 @@ dateCellWrapper?: React.SFC | React.Component | React.ComponentClass | JSX.Element; | ||
header?: React.ComponentType<HeaderProps>; | ||
toolbar?: React.SFC | React.Component | React.ComponentClass | JSX.Element; | ||
toolbar?: React.ComponentType<ToolbarProps>; | ||
agenda?: { | ||
@@ -141,2 +150,38 @@ date?: React.SFC | React.Component | React.ComponentClass | JSX.Element; | ||
export interface ToolbarProps { | ||
date: Date; | ||
view: View; | ||
views: Views; | ||
label: string; | ||
localizer: { messages: Messages }; | ||
onNavigate: (navigate: Navigate, date?: Date) => void; | ||
onView: (view: View) => void; | ||
children?: React.ReactNode; | ||
} | ||
export interface EventWrapperProps<T extends Event = Event> { | ||
// https://github.com/intljusticemission/react-big-calendar/blob/27a2656b40ac8729634d24376dff8ea781a66d50/src/TimeGridEvent.js#L28 | ||
style?: React.CSSProperties & { xOffset: number }; | ||
className: string; | ||
event: T; | ||
isRtl: boolean; | ||
getters: { | ||
eventProp?: EventPropGetter<T>; | ||
slotProp?: SlotPropGetter; | ||
dayProp?: DayPropGetter; | ||
}; | ||
onClick: (e: React.MouseEvent<HTMLElement>) => void; | ||
onDoubleClick: (e: React.MouseEvent<HTMLElement>) => void; | ||
accessors: { | ||
title?: (event: T) => string; | ||
tooltip?: (event: T) => string; | ||
end?: (event: T) => Date; | ||
start?: (event: T) => Date; | ||
}; | ||
selected: boolean; | ||
label: string; | ||
continuesEarlier: boolean; | ||
continuesLater: boolean; | ||
} | ||
export interface Messages { | ||
@@ -195,7 +240,3 @@ date?: string; | ||
selected?: any; | ||
views?: View[] | { | ||
month: boolean | React.SFC | React.Component, | ||
week: boolean | React.SFC | React.Component, | ||
myweek: boolean | React.SFC | React.Component, | ||
}; | ||
views?: Views; | ||
drilldownView?: View | null; | ||
@@ -212,5 +253,5 @@ getDrilldownView?: ((targetDate: Date, currentViewName: View, configuredViewNames: View[]) => void) | null; | ||
rtl?: boolean; | ||
eventPropGetter?: (event: T, start: stringOrDate, end: stringOrDate, isSelected: boolean) => { className?: string, style?: React.CSSProperties }; | ||
slotPropGetter?: (date: Date) => { className?: string, style?: object }; | ||
dayPropGetter?: (date: Date) => { className?: string, style?: object }; | ||
eventPropGetter?: EventPropGetter<T>; | ||
slotPropGetter?: SlotPropGetter; | ||
dayPropGetter?: DayPropGetter; | ||
showMultiDayTimes?: boolean; | ||
@@ -217,0 +258,0 @@ min?: stringOrDate; |
{ | ||
"name": "@types/react-big-calendar", | ||
"version": "0.20.0", | ||
"version": "0.20.1", | ||
"description": "TypeScript definitions for react-big-calendar", | ||
@@ -31,5 +31,11 @@ "license": "MIT", | ||
"githubUsername": "strongpauly" | ||
}, | ||
{ | ||
"name": "janb87", | ||
"url": "https://github.com/janb87", | ||
"githubUsername": "janb87" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
@@ -44,4 +50,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "f0e3ea7619c26c8453b9e7438bf8d01e6817da5c7870cde6f53456034fe8be79", | ||
"typesPublisherContentHash": "ce818e27af68bf3220593dd537cbf4dc3435ac80228825970d7b8612804c2bec", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 03 Oct 2018 17:56:18 GMT | ||
* Last updated: Tue, 20 Nov 2018 21:08:00 GMT | ||
* Dependencies: prop-types, react | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Piotr Witek <https://github.com/piotrwitek>, Austin Turner <https://github.com/paustint>, Krzysztof Bezrąk <https://github.com/pikpok>, Sebastian Silbermann <https://github.com/eps1lon>, Paul Potsides <https://github.com/strongpauly>. | ||
These definitions were written by Piotr Witek <https://github.com/piotrwitek>, Austin Turner <https://github.com/paustint>, Krzysztof Bezrąk <https://github.com/pikpok>, Sebastian Silbermann <https://github.com/eps1lon>, Paul Potsides <https://github.com/strongpauly>, janb87 <https://github.com/janb87>. |
Sorry, the diff of this file is not supported yet
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
13707
278