Skip to content

Commit

Permalink
cleanup agenda related code
Browse files Browse the repository at this point in the history
  • Loading branch information
rinick committed May 14, 2024
1 parent 9e5acf7 commit a1f8e48
Show file tree
Hide file tree
Showing 8 changed files with 669 additions and 218 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# react-big-calendar
# ticlo-big-calendar

This project is forked from https://github.com/jquense/react-big-calendar
It's intended to be used only by the [ticlo](https://github.com/ticlo/ticlo) project

An events calendar component built for React and designed for modern browsers (read: not IE) and uses flexbox over the classic tables-caption approach.

Expand Down
196 changes: 0 additions & 196 deletions es/Agenda.js

This file was deleted.

2 changes: 2 additions & 0 deletions es/Views.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ var _constants = require("./utils/constants");
var _Month = _interopRequireDefault(require("./Month"));
var _Day = _interopRequireDefault(require("./Day"));
var _Week = _interopRequireDefault(require("./Week"));
// import WorkWeek from './WorkWeek'

var VIEWS = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.views.MONTH, _Month.default), _constants.views.WEEK, _Week.default), _constants.views.DAY, _Day.default);
var _default = exports.default = VIEWS;
59 changes: 59 additions & 0 deletions es/addons/dragAndDrop/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import * as React from "react";
import { CalendarProps, Components, Event, stringOrDate } from "../../index";

export type DragAction = "resize" | "move";

export type DragDirection = "UP" | "DOWN" | "LEFT" | "RIGHT";

export interface EventInteractionArgs<TEvent> {
event: TEvent;
start: stringOrDate;
end: stringOrDate;
isAllDay?: boolean;
resourceId?: string | number;
}

export interface OnDragStartArgs<TEvent> {
event: TEvent;
action: DragAction;
direction: DragDirection;
}

export interface DragFromOutsideItemArgs {
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;
}

interface DragAndDropCalendarProps<TEvent extends object = Event, TResource extends object = object>
extends CalendarProps<TEvent, TResource>, withDragAndDropProps<TEvent, TResource>
{}

declare class DragAndDropCalendar<TEvent extends object = Event, TResource extends object = object>
extends React.Component<DragAndDropCalendarProps<TEvent, TResource>>
{}

declare function withDragAndDrop<TEvent extends object = Event, TResource extends object = object>(
calendar: React.ComponentType<CalendarProps<TEvent, TResource>>,
): React.ComponentType<DragAndDropCalendarProps<TEvent, TResource>>;

export default withDragAndDrop;

// Turn off automatic exports
export {};
Loading

0 comments on commit a1f8e48

Please sign in to comment.