v-event-calendar
Version:
Lightweight, Vue 3 Event Calendar With Event Scheduling, Multiple Views, Drag-&-Drop, Resizing and Customizable Styling
109 lines (107 loc) • 4.01 kB
TypeScript
import { CalendarEvent, CalendarView, CalendarViewConfig } from '../types';
interface CalendarViewProps {
events?: CalendarEvent[];
initialView?: CalendarView;
allowEventCreation?: boolean;
allowEventEditing?: boolean;
maxEventsPerDay?: number;
showWeekNumbers?: boolean;
config?: Partial<CalendarViewConfig>;
}
declare function __VLS_template(): {
header?(_: {
currentTitle: string;
view: CalendarView;
canGoNext: boolean;
goToDate: (date: Date) => void;
goToNext: () => void;
setView: (newView: CalendarView) => void;
goToToday: () => void;
canGoPrevious: boolean;
selectDate: (date: Date) => void;
goToPrevious: () => void;
currentDate: Date;
selectedDate: Date;
}): any;
event?(_: {
event: CalendarEvent;
displayTime: string;
view: "month" | "date" | "week";
isMultiDay: boolean;
isContained: boolean;
}): any;
};
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CalendarViewProps>, {
events: () => any[];
maxEventsPerDay: number;
initialView: string;
showWeekNumbers: boolean;
allowEventEditing: boolean;
allowEventCreation: boolean;
}>>, {
forceUpdate: () => void;
view: import('vue').Ref<CalendarView, CalendarView>;
canGoNext: import('vue').ComputedRef<boolean>;
goToDate: (date: Date) => void;
goToNext: () => void;
setView: (newView: CalendarView) => void;
title: string;
goToToday: () => void;
canGoPrevious: import('vue').ComputedRef<boolean>;
selectDate: (date: Date) => void;
goToPrevious: () => void;
currentDate: import('vue').Ref<Date, Date>;
selectedDate: import('vue').Ref<Date, Date>;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
dayClick: (date: Date) => void;
dateChange: (date: Date) => void;
eventClick: (event: CalendarEvent) => void;
viewChange: (view: CalendarView) => void;
eventCreate: (date: Date, start: string, end?: string, duration?: number) => void;
eventUpdate: (eventId: string, start: string, end?: string, duration?: number) => void;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CalendarViewProps>, {
events: () => any[];
maxEventsPerDay: number;
initialView: string;
showWeekNumbers: boolean;
allowEventEditing: boolean;
allowEventCreation: boolean;
}>>> & Readonly<{
onEventUpdate?: (eventId: string, start: string, end?: string, duration?: number) => any;
onDayClick?: (date: Date) => any;
onEventClick?: (event: CalendarEvent) => any;
onDateChange?: (date: Date) => any;
onViewChange?: (view: CalendarView) => any;
onEventCreate?: (date: Date, start: string, end?: string, duration?: number) => any;
}>, {
allowEventCreation: boolean;
maxEventsPerDay: number;
showWeekNumbers: boolean;
events: CalendarEvent[];
initialView: CalendarView;
allowEventEditing: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
export default _default;
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToRuntimeProps<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};