@types/react-big-calendar
Advanced tools
Comparing version 0.15.0 to 0.17.0
@@ -1,4 +0,5 @@ | ||
// Type definitions for react-big-calendar 0.15.0 | ||
// Type definitions for react-big-calendar 0.17.0 | ||
// Project: https://github.com/intljusticemission/react-big-calendar | ||
// Definitions by: Piotr Witek <http://piotrwitek.github.io> | ||
// Austin Turner <https://github.com/paustint> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -10,41 +11,168 @@ // TypeScript Version: 2.3 | ||
type stringOrDate = string | Date; | ||
export type stringOrDate = string | Date; | ||
export type View = 'month' | 'week' | 'work_week' | 'day' | 'agenda'; | ||
export type Navigate = 'PREV' | 'NEXT' | 'TODAY' | 'DATE'; | ||
export interface Format { | ||
/** | ||
* Format for the day of the month heading in the Month view. | ||
* e.g. "01", "02", "03", etc | ||
*/ | ||
dateFormat?: string, | ||
interface CalendarEvent { | ||
title: string; | ||
allDay: boolean; | ||
start: Date; | ||
end: Date; | ||
desc: string; | ||
/** | ||
* A day of the week format for Week and Day headings, | ||
* e.g. "Wed 01/04" | ||
* | ||
*/ | ||
dayFormat?: string, | ||
/** | ||
* Week day name format for the Month week day headings, | ||
* e.g: "Sun", "Mon", "Tue", etc | ||
* | ||
*/ | ||
weekdayFormat?: string, | ||
/** | ||
* The timestamp cell formats in Week and Time views, e.g. "4:00 AM" | ||
*/ | ||
timeGutterFormat?: string, | ||
/** | ||
* Toolbar header format for the Month view, e.g "2015 April" | ||
* | ||
*/ | ||
monthHeaderFormat?: string, | ||
/** | ||
* Toolbar header format for the Week views, e.g. "Mar 29 - Apr 04" | ||
*/ | ||
dayRangeHeaderFormat?: string, | ||
/** | ||
* Toolbar header format for the Day view, e.g. "Wednesday Apr 01" | ||
*/ | ||
dayHeaderFormat?: string, | ||
/** | ||
* Toolbar header format for the Agenda view, e.g. "4/1/2015 — 5/1/2015" | ||
*/ | ||
agendaHeaderFormat?: string, | ||
/** | ||
* A time range format for selecting time slots, e.g "8:00am — 2:00pm" | ||
*/ | ||
selectRangeFormat?: string, | ||
agendaDateFormat?: string, | ||
agendaTimeFormat?: string, | ||
agendaTimeRangeFormat?: string, | ||
/** | ||
* Time range displayed on events. | ||
*/ | ||
eventTimeRangeFormat?: string, | ||
/** | ||
* An optional event time range for events that continue onto another day | ||
*/ | ||
eventTimeRangeStartFormat?: string, | ||
/** | ||
* An optional event time range for events that continue from another day | ||
*/ | ||
eventTimeRangeEndFormat?: string, | ||
} | ||
export interface Components { | ||
event?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
eventWrapper?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
dayWrapper?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
dateCellWrapper?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
toolbar?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
agenda?: { | ||
date?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
time?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
event?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
}, | ||
day?: { | ||
header?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
event?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
}, | ||
week?: { | ||
header?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
event?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
}, | ||
month?: { | ||
header?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
dateHeader?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
event?: React.SFC | React.Component | React.ComponentClass | JSX.Element, | ||
}, | ||
} | ||
export interface Messages { | ||
allDay?: string; | ||
previous?: string; | ||
next?: string; | ||
today?: string; | ||
month?: string; | ||
week?: string; | ||
day?: string; | ||
agenda?: string; | ||
date?: string; | ||
time?: string; | ||
event?: string; | ||
showMore?: string; | ||
} | ||
interface BigCalendarProps extends React.Props<BigCalendar> { | ||
date?: stringOrDate; | ||
view?: string; | ||
now?: Date; | ||
view?: View; | ||
events?: Object[]; | ||
onNavigate?: Function; | ||
onView?: Function; | ||
onSelectSlot?: (slotInfo: { start: stringOrDate, end: stringOrDate, slots: Date[] | string[] }) => void; | ||
onSelectEvent?: (event: CalendarEvent) => void; | ||
onSelecting?: (slotInfo: { start: stringOrDate, end: stringOrDate }) => boolean; | ||
views?: Object; | ||
onNavigate?: (action: Navigate, newDate: Date) => void; | ||
onView?: (view: View) => void; | ||
onDrillDown?: (date: Date, view: View) => void; | ||
onSelectSlot?: (slotInfo: { start: stringOrDate, end: stringOrDate, slots: Date[] | string[], action: 'select' | 'click' | 'doubleClick' }) => void; | ||
onDoubleClickEvent?: (event: Object, e: React.SyntheticEvent<HTMLElement>) => void; | ||
onSelectEvent?: (event: Object, e: React.SyntheticEvent<HTMLElement>) => void; | ||
onSelecting?: (range: { start: stringOrDate, end: stringOrDate }) => boolean | undefined | null; | ||
selected?: any; | ||
views?: View[] | { | ||
month: boolean | React.SFC | React.Component, | ||
week: boolean | React.SFC | React.Component, | ||
myweek: boolean | React.SFC | React.Component, | ||
}; | ||
drilldownView?: View | null; | ||
getDrilldownView?: ((targetDate: Date, currentViewName: View, configuredViewNames: View[]) => void) | null; | ||
length?: number; | ||
toolbar?: boolean; | ||
popup?: boolean; | ||
popupOffset?: number | { x: number, y: number }; | ||
selectable?: boolean; | ||
selectable?: boolean | 'ignoreEvents'; | ||
longPressThreshold?: number; | ||
step?: number; | ||
timeslots?: number; | ||
rtl?: boolean; | ||
eventPropGetter?: (event: Object, start: stringOrDate, end: stringOrDate, isSelected: boolean) => void; | ||
titleAccessor?: string | ((row: Object) => string); | ||
allDayAccessor?: string | ((row: Object) => boolean); | ||
startAccessor?: string | ((row: Object) => Date); | ||
endAccessor?: string | ((row: Object) => Date); | ||
eventPropGetter?: (event: Object, 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 }; | ||
showMultiDayTimes?: boolean; | ||
min?: stringOrDate; | ||
max?: stringOrDate; | ||
scrollToTime?: stringOrDate; | ||
formats?: Object; | ||
components?: Object; | ||
messages?: Object; | ||
timeslots?: number; | ||
defaultView?: string; | ||
scrollToTime?: Date; | ||
culture?: string; | ||
formats?: Format; | ||
components?: Components; | ||
messages?: Messages; | ||
titleAccessor?: string | ((event: any) => string); | ||
allDayAccessor?: string | ((event: any) => boolean); | ||
startAccessor?: string | ((event: any) => Date); | ||
endAccessor?: string | ((event: any) => Date); | ||
resourceAccessor?: string | ((event: any) => any); | ||
resources?: any[]; | ||
resourceIdAccessor?: string | ((event: any) => any); | ||
resourceTitleAccessor?: string | ((event: any) => string); | ||
defaultView?: View; | ||
defaultDate?: Date; | ||
className?: string; | ||
@@ -51,0 +179,0 @@ elementProps?: React.HTMLAttributes<HTMLElement>; |
{ | ||
"name": "@types/react-big-calendar", | ||
"version": "0.15.0", | ||
"version": "0.17.0", | ||
"description": "TypeScript definitions for react-big-calendar", | ||
@@ -10,2 +10,7 @@ "license": "MIT", | ||
"url": "http://piotrwitek.github.io" | ||
}, | ||
{ | ||
"name": "Austin Turner", | ||
"url": "https://github.com/paustint", | ||
"githubUsername": "paustint" | ||
} | ||
@@ -22,4 +27,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "6afe0499601e780a5c4b8b82863770140834e81c1e7a3dbf70a5d670843f9356", | ||
"typesPublisherContentHash": "0b0492e7e4f21204e942902ef00c6e9bd4c29cb762be59a26967e587a3bda7d9", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Tue, 26 Sep 2017 00:11:47 GMT | ||
* Last updated: Fri, 12 Jan 2018 18:52:17 GMT | ||
* Dependencies: react | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Piotr Witek <http://piotrwitek.github.io>. | ||
These definitions were written by Piotr Witek <http://piotrwitek.github.io>, Austin Turner <https://github.com/paustint>. |
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
9678
174