Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-big-calendar

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-big-calendar - npm Package Compare versions

Comparing version 1.6.4 to 1.6.5

175

react-big-calendar/index.d.ts

@@ -21,25 +21,25 @@ // Type definitions for react-big-calendar 1.6

// TypeScript Version: 2.8
import { Validator } from 'prop-types';
import * as React from 'react';
import {
milliseconds,
seconds,
minutes,
hours,
month,
startOf,
add,
endOf,
add,
eq,
neq,
gt,
gte,
gt,
hours,
inRange,
lt,
lte,
lt,
inRange,
max,
milliseconds,
min,
max,
minutes,
month,
neq,
seconds,
startOf,
StartOfWeek,
Unit,
StartOfWeek,
} from 'date-arithmetic';
} from "date-arithmetic";
import { Validator } from "prop-types";
import * as React from "react";

@@ -60,33 +60,35 @@ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

export type ViewKey = 'MONTH' | 'WEEK' | 'WORK_WEEK' | 'DAY' | 'AGENDA';
export type View = 'month' | 'week' | 'work_week' | 'day' | 'agenda';
export type ViewProps<TEvent extends object = Event, TResource extends object = object> = Omit<
CalendarProps<TEvent, TResource>,
'elementProps' | 'className' | 'style' | 'view' | 'toolbar' | 'components' | 'formats' | 'messages' | 'culture'
> & {
date: stringOrDate; // date has always a value, in contrast to optional date in CalendarProps
export type ViewKey = "MONTH" | "WEEK" | "WORK_WEEK" | "DAY" | "AGENDA";
export type View = "month" | "week" | "work_week" | "day" | "agenda";
export type ViewProps<TEvent extends object = Event, TResource extends object = object> =
& Omit<
CalendarProps<TEvent, TResource>,
"elementProps" | "className" | "style" | "view" | "toolbar" | "components" | "formats" | "messages" | "culture"
>
& {
date: stringOrDate; // date has always a value, in contrast to optional date in CalendarProps
// props assigned from Calendar's this.state.context, see there if you want to improve the type defs:
accessors: any;
components: any;
getters: any;
localizer: any;
// props assigned from Calendar's this.state.context, see there if you want to improve the type defs:
accessors: any;
components: any;
getters: any;
localizer: any;
// props assigned from Calendar instance, see there if you want to improve the type defs:
getDrilldownView: any; // = this.getDrilldownView
onNavigate: any; // = this.handleNavigate
onDrillDown: any; // = this.handleDrillDown
onSelectEvent: any; // = this.handleSelectEvent
onDoubleClickEvent: any; // = this.handleDoubleClickEvent
onSelectSlot: any; // = this.handleSelectSlot
};
// props assigned from Calendar instance, see there if you want to improve the type defs:
getDrilldownView: any; // = this.getDrilldownView
onNavigate: any; // = this.handleNavigate
onDrillDown: any; // = this.handleDrillDown
onSelectEvent: any; // = this.handleSelectEvent
onDoubleClickEvent: any; // = this.handleDoubleClickEvent
onSelectSlot: any; // = this.handleSelectSlot
};
export type ViewsProps<TEvent extends object = Event, TResource extends object = object> =
| View[]
| {
work_week?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
day?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
agenda?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
month?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
week?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
};
work_week?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
day?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
agenda?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
month?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
week?: boolean | (React.ComponentType<any> & ViewStatic) | undefined;
};
export type DayLayoutFunction<TEvent extends object = Event> = (_: {

@@ -98,4 +100,4 @@ events: TEvent[];

}) => Array<{ event: TEvent; style: React.CSSProperties }>;
export type DayLayoutAlgorithm = 'overlap' | 'no-overlap';
export type NavigateAction = 'PREV' | 'NEXT' | 'TODAY' | 'DATE';
export type DayLayoutAlgorithm = "overlap" | "no-overlap";
export type NavigateAction = "PREV" | "NEXT" | "TODAY" | "DATE";
export interface Event {

@@ -127,3 +129,2 @@ allDay?: boolean | undefined;

* e.g. "Wed 01/04"
*
*/

@@ -135,3 +136,2 @@ dayFormat?: DateFormat | undefined;

* e.g: "Sun", "Mon", "Tue", etc
*
*/

@@ -147,3 +147,2 @@ weekdayFormat?: DateFormat | undefined;

* Toolbar header format for the Month view, e.g "2015 April"
*
*/

@@ -230,31 +229,31 @@ monthHeaderFormat?: DateFormat | undefined;

| {
date?: React.ComponentType | undefined;
time?: React.ComponentType | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
date?: React.ComponentType | undefined;
time?: React.ComponentType | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
| undefined;
day?:
| {
header?: React.ComponentType<HeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
header?: React.ComponentType<HeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
| undefined;
week?:
| {
header?: React.ComponentType<HeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
header?: React.ComponentType<HeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
| undefined;
work_week?:
| {
header?: React.ComponentType<HeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
header?: React.ComponentType<HeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
| undefined;
month?:
| {
header?: React.ComponentType<HeaderProps> | undefined;
dateHeader?: React.ComponentType<DateHeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
header?: React.ComponentType<HeaderProps> | undefined;
dateHeader?: React.ComponentType<DateHeaderProps> | undefined;
event?: React.ComponentType<EventProps<TEvent>> | undefined;
}
| undefined;

@@ -338,3 +337,3 @@ /**

slots: Date[];
action: 'select' | 'click' | 'doubleClick';
action: "select" | "click" | "doubleClick";
/** For "TimeGrid" views */

@@ -345,9 +344,9 @@ resourceId?: number | string | undefined;

| {
x: number;
y: number;
top: number;
bottom: number;
left: number;
right: number;
}
x: number;
y: number;
top: number;
bottom: number;
left: number;
right: number;
}
| undefined;

@@ -357,7 +356,7 @@ /** For "click" or "doubleClick" actions */

| {
x: number;
y: number;
clientX: number;
clientY: number;
}
x: number;
y: number;
clientX: number;
clientY: number;
}
| undefined;

@@ -489,3 +488,3 @@ }

popupOffset?: number | { x: number; y: number } | undefined;
selectable?: boolean | 'ignoreEvents' | undefined;
selectable?: boolean | "ignoreEvents" | undefined;
longPressThreshold?: number | undefined;

@@ -569,13 +568,13 @@ step?: number | undefined;

export const Navigate: {
PREVIOUS: 'PREV';
NEXT: 'NEXT';
TODAY: 'TODAY';
DATE: 'DATE';
PREVIOUS: "PREV";
NEXT: "NEXT";
TODAY: "TODAY";
DATE: "DATE";
};
export const Views: {
MONTH: 'month';
WEEK: 'week';
WORK_WEEK: 'work_week';
DAY: 'day';
AGENDA: 'agenda';
MONTH: "month";
WEEK: "week";
WORK_WEEK: "work_week";
DAY: "day";
AGENDA: "agenda";
};

@@ -604,3 +603,3 @@ export function move(View: ViewStatic | ViewKey, options: MoveOptions): Date;

selected?: object | undefined;
selectable?: boolean | 'ignoreEvents' | undefined;
selectable?: boolean | "ignoreEvents" | undefined;
longPressThreshold?: number | undefined;

@@ -607,0 +606,0 @@ onNavigate?: ((action: NavigateAction) => void) | undefined;

@@ -1,51 +0,53 @@

import { CalendarProps, Components, Event, stringOrDate } from '../../index';
import * as React from 'react';
import * as React from "react";
import { CalendarProps, Components, Event, stringOrDate } from "../../index";
export type DragAction = 'resize' | 'move';
export type DragAction = "resize" | "move";
export type DragDirection = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT';
export type DragDirection = "UP" | "DOWN" | "LEFT" | "RIGHT";
export interface EventInteractionArgs<TEvent> {
event: TEvent;
start: stringOrDate;
end: stringOrDate;
isAllDay: boolean;
event: TEvent;
start: stringOrDate;
end: stringOrDate;
isAllDay: boolean;
}
export interface OnDragStartArgs<TEvent> {
event: TEvent;
action: DragAction;
direction: DragDirection;
event: TEvent;
action: DragAction;
direction: DragDirection;
}
export interface DragFromOutsideItemArgs {
start: stringOrDate;
end: stringOrDate;
allDay: boolean;
start: stringOrDate;
end: stringOrDate;
allDay: boolean;
}
export interface withDragAndDropProps<TEvent extends object = Event, TResource extends object = object> {
onEventDrop?: ((args: EventInteractionArgs<TEvent>) => void) | undefined;
onEventResize?: ((args: EventInteractionArgs<TEvent>) => void) | undefined;
onDragStart?: ((args: OnDragStartArgs<TEvent>) => void) | undefined;
onDragOver?: ((event: React.DragEvent) => void) | undefined;
onDropFromOutside?: ((args: DragFromOutsideItemArgs) => void) | undefined;
dragFromOutsideItem?: (() => keyof TEvent | ((event: TEvent) => Date)) | undefined;
draggableAccessor?: keyof TEvent | ((event: TEvent) => boolean) | undefined;
resizableAccessor?: keyof TEvent | ((event: TEvent) => boolean) | undefined;
selectable?: true | false | 'ignoreEvents' | undefined;
resizable?: boolean | undefined;
components?: Components<TEvent, TResource> | undefined;
elementProps?: React.HTMLAttributes<HTMLElement> | undefined;
step?: number | undefined;
onEventDrop?: ((args: EventInteractionArgs<TEvent>) => void) | undefined;
onEventResize?: ((args: EventInteractionArgs<TEvent>) => void) | undefined;
onDragStart?: ((args: OnDragStartArgs<TEvent>) => void) | undefined;
onDragOver?: ((event: React.DragEvent) => void) | undefined;
onDropFromOutside?: ((args: DragFromOutsideItemArgs) => void) | undefined;
dragFromOutsideItem?: (() => keyof TEvent | ((event: TEvent) => Date)) | undefined;
draggableAccessor?: keyof TEvent | ((event: TEvent) => boolean) | undefined;
resizableAccessor?: keyof TEvent | ((event: TEvent) => boolean) | undefined;
selectable?: true | false | "ignoreEvents" | undefined;
resizable?: boolean | undefined;
components?: Components<TEvent, TResource> | undefined;
elementProps?: React.HTMLAttributes<HTMLElement> | undefined;
step?: number | undefined;
}
interface DragAndDropCalendarProps<TEvent extends object = Event, TResource extends object = object>
extends CalendarProps<TEvent, TResource>, withDragAndDropProps<TEvent, TResource> {}
extends CalendarProps<TEvent, TResource>, withDragAndDropProps<TEvent, TResource>
{}
declare class DragAndDropCalendar<TEvent extends object = Event, TResource extends object = object>
extends React.Component<DragAndDropCalendarProps<TEvent, TResource>> {}
extends React.Component<DragAndDropCalendarProps<TEvent, TResource>>
{}
declare function withDragAndDrop<TEvent extends object = Event, TResource extends object = object>(
calendar: React.ComponentType<CalendarProps<TEvent, TResource>>
calendar: React.ComponentType<CalendarProps<TEvent, TResource>>,
): React.ComponentType<DragAndDropCalendarProps<TEvent, TResource>>;

@@ -52,0 +54,0 @@

{
"name": "@types/react-big-calendar",
"version": "1.6.4",
"version": "1.6.5",
"description": "TypeScript definitions for react-big-calendar",

@@ -102,4 +102,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-big-calendar",

},
"typesPublisherContentHash": "1641a6c3da3d450fd7cc579b7012beb548788145d3df002be28e100e411867e3",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "4560223f0fb9ce67e07c100721c9bac59adeef397e5486706862bd5454b0ef5c",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 25 May 2023 20:34:37 GMT
* Last updated: Wed, 27 Sep 2023 07:12:04 GMT
* Dependencies: [@types/date-arithmetic](https://npmjs.com/package/@types/date-arithmetic), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/react](https://npmjs.com/package/@types/react)

@@ -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