-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
theLAZYmd
authored and
theLAZYmd
committed
Apr 1, 2021
1 parent
e394e8c
commit 31406fe
Showing
46 changed files
with
36,559 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { CalendarEvent } from './Event'; | ||
export default function Cell({ maxEvents, styles, events, colorStatuses, colorNames }: { | ||
maxEvents: number; | ||
styles: { | ||
[key: string]: string; | ||
}; | ||
events: CalendarEvent[]; | ||
colorStatuses: { | ||
[key: string]: boolean; | ||
}; | ||
colorNames: { | ||
[key: string]: string; | ||
}; | ||
}): JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { CalendarSettings, GoogleEvent, GoogleLocation } from './interfaces'; | ||
export declare class CalendarEvent { | ||
link: string; | ||
title: string; | ||
status: string; | ||
start: Date; | ||
created: Date; | ||
end: Date; | ||
calendarName: string; | ||
color: string; | ||
rawLocation: GoogleLocation | string; | ||
locationReplacers: { | ||
[key: string]: string; | ||
}; | ||
rawDescription: string; | ||
map: string; | ||
constructor(event: GoogleEvent, calendarName: string, color: string, { locationReplacers, mapsLink }: Partial<CalendarSettings>); | ||
static fromGeneric(e: Partial<CalendarEvent>, calendarName: string, color: string, { locationReplacers, mapsLink }: Partial<CalendarSettings>): CalendarEvent; | ||
get location(): string; | ||
get facebookEvent(): string; | ||
get description(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { CalendarEvent } from './Event'; | ||
export interface CalendarFrameProps { | ||
events: { | ||
[timestamp: number]: CalendarEvent[]; | ||
}; | ||
colorNames?: { | ||
[color: string]: string; | ||
}; | ||
colorStatuses?: { | ||
[color: string]: boolean; | ||
}; | ||
start: Date; | ||
title?: string; | ||
weeks?: number; | ||
dayLabels?: string[]; | ||
noHighlightToday?: boolean; | ||
classNames?: { | ||
table?: string; | ||
firstColumn?: string; | ||
cell?: string; | ||
event?: string; | ||
}; | ||
startIndex?: number | string; | ||
maxEvents?: number; | ||
} | ||
export declare function CalendarFrame(props: CalendarFrameProps): JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export interface CalendarKeyProps { | ||
classNames?: { | ||
[key: string]: string; | ||
}; | ||
colorNames: { | ||
[color: string]: string; | ||
}; | ||
updateColorStatuses: (color: string) => void; | ||
colorStatuses: { | ||
[color: string]: boolean; | ||
}; | ||
} | ||
export declare function CalendarKey(props: CalendarKeyProps): JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React, { Context } from 'react'; | ||
import { ReactNode } from 'react'; | ||
import { CalendarSettings } from './interfaces'; | ||
declare type ContextValue<T> = [Context<T>, T]; | ||
export default function Contexts({ values, children }: { | ||
values: ContextValue<any>[]; | ||
children?: ReactNode; | ||
}): React.ReactElement<any, string | React.JSXElementConstructor<any>>; | ||
export declare const LinkComponentContext: React.Context<((...args: any[]) => JSX.Element) | null>; | ||
export declare const CalendarSettingsContext: React.Context<CalendarSettings>; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { CalendarEvent } from '../Event'; | ||
interface EventHookProps { | ||
calendars: { | ||
[key: string]: string; | ||
}; | ||
setColorStatuses: (colors: string[]) => void; | ||
start: Date; | ||
finish?: Date; | ||
timeZone?: string; | ||
events?: { | ||
[timestamp: number]: CalendarEvent[]; | ||
}; | ||
} | ||
export default function useEvents(props: EventHookProps): { | ||
colors: { | ||
[color: string]: string; | ||
}; | ||
events: { | ||
[timestamp: number]: CalendarEvent[]; | ||
}; | ||
}; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { CalendarSettings } from './interfaces'; | ||
import { CalendarFrameProps } from './Frame'; | ||
import { CalendarEvent } from './Event'; | ||
export * from './interfaces'; | ||
export * from './Event'; | ||
export * from './Key'; | ||
export * from './utils'; | ||
export interface OfflineCalendarProps { | ||
events: { | ||
[timestamp: number]: CalendarEvent[]; | ||
}; | ||
calendars: { | ||
[color: string]: string; | ||
}; | ||
settings?: undefined; | ||
} | ||
export interface OnlineCalendarProps { | ||
settings: CalendarSettings; | ||
events?: undefined; | ||
calendars: { | ||
[key: string]: string; | ||
}; | ||
} | ||
export interface CalendarProps { | ||
start: Date; | ||
finish?: Date; | ||
title?: string; | ||
timeZone?: string; | ||
classNames?: { | ||
[key: string]: string; | ||
}; | ||
days?: string[]; | ||
noUpdateHash?: boolean; | ||
customLinkComponent?: ((...args: any[]) => JSX.Element); | ||
} | ||
export default function Calendar(props: CalendarProps & Omit<CalendarFrameProps, 'events' | 'colorStatuses'> & (OfflineCalendarProps | OnlineCalendarProps)): JSX.Element; |
Oops, something went wrong.