UNPKG

timeline-calendar-react

Version:

A timeline calendar component for React, built with TypeScript and Vite.

24 lines (23 loc) 1.56 kB
import { RangeType, UserWithRangeType, User, Department, RangesWithUser, EventType, StatusType, Theme, Locale } from './types'; export declare const createDayLabel: (n: number, lang: Locale) => string; export declare function debounce(func: () => void, ms: number): () => void; export interface IRange extends Partial<RangeType> { isStart: boolean; width?: number; isAllMonth?: boolean; isStartPrevMonth?: boolean; isEndNextMonth?: boolean; } export declare const isSameDate: (date1: string, date2: string) => boolean; export declare const defaultTheme: Theme; export declare const eventColors: string[]; export declare const defaultColors: Record<Theme, Record<string, string>>; export declare const getRange: (start: number, end: number, currentDate: string) => number[]; export declare const stringToEvent: (events: string[]) => EventType[] | StatusType[]; type ValueType = "label" | "color"; type ArrayType = StatusType[] | EventType[] | Map<number, string>; export declare const getValue: (defaultValue: string, attribute?: number | string, type?: ValueType, array?: ArrayType) => string | undefined; export declare const searchReg: (value: string) => RegExp; export declare const compareUserWithRanges: (users: User[] | null, events: RangeType[] | null, selectedEvents?: EventType[], selectedStatuses?: StatusType[], searchTerm?: string, departments?: Department[]) => UserWithRangeType[]; export declare const compareRangesWithUser: (events: RangeType[] | null, users: User[], departments?: Department[]) => RangesWithUser[]; export {};