Skip to content

Commit

Permalink
Build with rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
theLAZYmd authored and theLAZYmd committed Apr 1, 2021
1 parent e394e8c commit 31406fe
Show file tree
Hide file tree
Showing 46 changed files with 36,559 additions and 365 deletions.
14 changes: 14 additions & 0 deletions build/Cell.d.ts
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;
22 changes: 22 additions & 0 deletions build/Event.d.ts
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;
}
26 changes: 26 additions & 0 deletions build/Frame.d.ts
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;
13 changes: 13 additions & 0 deletions build/Key.d.ts
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;
11 changes: 11 additions & 0 deletions build/contexts.d.ts
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 {};
22 changes: 22 additions & 0 deletions build/hooks/useEvents.d.ts
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 {};
36 changes: 36 additions & 0 deletions build/index.d.ts
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;
Loading

0 comments on commit 31406fe

Please sign in to comment.