vue3-calendar-component
Version:
A comprehensive Vue 3 Calendar component with Vuetify 3, TypeScript, and advanced features
247 lines • 9.84 kB
TypeScript
import type { Dayjs } from 'dayjs';
import type { CalendarEventInternal, EventDropHandler } from '@/plugin/types';
export declare function useDragAndDrop(onEventDrop?: EventDropHandler): {
draggedEvent: import("vue").ComputedRef<{
startDate: {
clone: () => Dayjs;
isValid: () => boolean;
year: {
(): number;
(value: number): Dayjs;
};
month: {
(): number;
(value: number): Dayjs;
};
date: {
(): number;
(value: number): Dayjs;
};
day: {
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
(value: number): Dayjs;
};
hour: {
(): number;
(value: number): Dayjs;
};
minute: {
(): number;
(value: number): Dayjs;
};
second: {
(): number;
(value: number): Dayjs;
};
millisecond: {
(): number;
(value: number): Dayjs;
};
set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
get: (unit: import("dayjs").UnitType) => number;
add: {
(value: number, unit?: import("dayjs").ManipulateType): Dayjs;
(duration: plugin.Duration): Dayjs;
};
subtract: {
(value: number, unit?: import("dayjs").ManipulateType): Dayjs;
(duration: plugin.Duration): Dayjs;
};
startOf: {
(unit: import("dayjs").OpUnitType): Dayjs;
(unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
};
endOf: {
(unit: import("dayjs").OpUnitType): Dayjs;
(unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
};
format: (template?: string) => string;
diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
valueOf: () => number;
unix: () => number;
daysInMonth: () => number;
toDate: () => Date;
toJSON: () => string;
toISOString: () => string;
toString: () => string;
utcOffset: {
(): number;
(offset: number | string, keepLocalTime?: boolean): Dayjs;
};
isBefore: {
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
};
isSame: {
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
};
isAfter: {
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
};
locale: {
(): string;
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
};
isoWeekYear: () => number;
isoWeek: {
(): number;
(value: number): Dayjs;
};
isoWeekday: {
(): number;
(value: number): Dayjs;
};
fromNow: (withoutSuffix?: boolean) => string;
from: (compared: import("dayjs").ConfigType, withoutSuffix?: boolean) => string;
toNow: (withoutSuffix?: boolean) => string;
to: (compared: import("dayjs").ConfigType, withoutSuffix?: boolean) => string;
tz: (timezone?: string, keepLocalTime?: boolean) => Dayjs;
offsetName: (type?: "short" | "long") => string | undefined;
utc: (keepLocalTime?: boolean) => Dayjs;
local: () => Dayjs;
isUTC: () => boolean;
week: {
(): number;
(value: number): Dayjs;
};
};
endDate: {
clone: () => Dayjs;
isValid: () => boolean;
year: {
(): number;
(value: number): Dayjs;
};
month: {
(): number;
(value: number): Dayjs;
};
date: {
(): number;
(value: number): Dayjs;
};
day: {
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
(value: number): Dayjs;
};
hour: {
(): number;
(value: number): Dayjs;
};
minute: {
(): number;
(value: number): Dayjs;
};
second: {
(): number;
(value: number): Dayjs;
};
millisecond: {
(): number;
(value: number): Dayjs;
};
set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
get: (unit: import("dayjs").UnitType) => number;
add: {
(value: number, unit?: import("dayjs").ManipulateType): Dayjs;
(duration: plugin.Duration): Dayjs;
};
subtract: {
(value: number, unit?: import("dayjs").ManipulateType): Dayjs;
(duration: plugin.Duration): Dayjs;
};
startOf: {
(unit: import("dayjs").OpUnitType): Dayjs;
(unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
};
endOf: {
(unit: import("dayjs").OpUnitType): Dayjs;
(unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
};
format: (template?: string) => string;
diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
valueOf: () => number;
unix: () => number;
daysInMonth: () => number;
toDate: () => Date;
toJSON: () => string;
toISOString: () => string;
toString: () => string;
utcOffset: {
(): number;
(offset: number | string, keepLocalTime?: boolean): Dayjs;
};
isBefore: {
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
};
isSame: {
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
};
isAfter: {
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
(date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
};
locale: {
(): string;
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
};
isoWeekYear: () => number;
isoWeek: {
(): number;
(value: number): Dayjs;
};
isoWeekday: {
(): number;
(value: number): Dayjs;
};
fromNow: (withoutSuffix?: boolean) => string;
from: (compared: import("dayjs").ConfigType, withoutSuffix?: boolean) => string;
toNow: (withoutSuffix?: boolean) => string;
to: (compared: import("dayjs").ConfigType, withoutSuffix?: boolean) => string;
tz: (timezone?: string, keepLocalTime?: boolean) => Dayjs;
offsetName: (type?: "short" | "long") => string | undefined;
utc: (keepLocalTime?: boolean) => Dayjs;
local: () => Dayjs;
isUTC: () => boolean;
week: {
(): number;
(value: number): Dayjs;
};
};
isAllDay: boolean;
id: string;
title: string;
start: string | Date | any;
end?: string | Date | any;
allDay?: boolean | undefined;
color?: string | undefined;
backgroundColor?: string | undefined;
borderColor?: string | undefined;
textColor?: string | undefined;
icon?: string | undefined;
status?: import("@/plugin/types").EventStatus | undefined;
subtitle?: string | undefined;
description?: string | undefined;
location?: string | undefined;
recurring?: {
frequency: "daily" | "weekly" | "monthly" | "yearly";
interval?: number | undefined;
count?: number | undefined;
until?: string | Date | any;
byDay?: number[] | undefined;
byMonth?: number[] | undefined;
} | undefined;
data?: Record<string, any> | undefined;
} | null>;
isDragging: import("vue").ComputedRef<boolean>;
handleDragStart: (event: CalendarEventInternal, element: HTMLElement) => void;
handleDragEnd: () => void;
handleDrop: (newStart: Dayjs, newEnd?: Dayjs) => Promise<void>;
handleDragOver: (element: HTMLElement) => void;
handleDragLeave: (element: HTMLElement) => void;
};
//# sourceMappingURL=useDragAndDrop.d.ts.map