kalendly 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +317 -681
- package/dist/core/index.js +3 -3
- package/dist/index.d.mts +48 -602
- package/dist/index.d.ts +48 -602
- package/dist/index.js +753 -2359
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +727 -2348
- package/dist/index.mjs.map +1 -1
- package/dist/{vanilla/index.umd.js → index.umd.js} +218 -218
- package/dist/index.umd.js.map +1 -0
- package/package.json +41 -91
- package/dist/react/index.d.mts +0 -251
- package/dist/react/index.d.ts +0 -251
- package/dist/react/index.js +0 -969
- package/dist/react/index.js.map +0 -1
- package/dist/react/index.mjs +0 -924
- package/dist/react/index.mjs.map +0 -1
- package/dist/react-native/index.d.mts +0 -642
- package/dist/react-native/index.d.ts +0 -642
- package/dist/react-native/index.js +0 -1649
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/index.mjs +0 -1615
- package/dist/react-native/index.mjs.map +0 -1
- package/dist/vanilla/index.d.mts +0 -271
- package/dist/vanilla/index.d.ts +0 -271
- package/dist/vanilla/index.js +0 -1064
- package/dist/vanilla/index.js.map +0 -1
- package/dist/vanilla/index.mjs +0 -1013
- package/dist/vanilla/index.mjs.map +0 -1
- package/dist/vanilla/index.umd.js.map +0 -1
- package/dist/vue/components/Calendar.vue.d.ts +0 -43
- package/dist/vue/components/Calendar.vue.d.ts.map +0 -1
- package/dist/vue/index.d.ts +0 -134
- package/dist/vue/index.d.ts.map +0 -1
- package/dist/vue/index.js +0 -1
- package/dist/vue/index.mjs +0 -717
- package/dist/vue/types.d.ts +0 -21
- package/dist/vue/types.d.ts.map +0 -1
package/dist/vanilla/index.d.ts
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
interface CalendarEvent {
|
|
2
|
-
id: string | number;
|
|
3
|
-
name: string;
|
|
4
|
-
date: string | Date;
|
|
5
|
-
startTime?: string;
|
|
6
|
-
endTime?: string;
|
|
7
|
-
allDay?: boolean;
|
|
8
|
-
description?: string;
|
|
9
|
-
color?: string;
|
|
10
|
-
category?: 'work' | 'personal' | 'meeting' | 'deadline' | 'appointment' | 'other';
|
|
11
|
-
location?: string;
|
|
12
|
-
url?: string;
|
|
13
|
-
status?: 'scheduled' | 'completed' | 'cancelled' | 'tentative';
|
|
14
|
-
priority?: 'low' | 'medium' | 'high';
|
|
15
|
-
attendees?: string[];
|
|
16
|
-
organizer?: string;
|
|
17
|
-
reminders?: number[];
|
|
18
|
-
recurring?: {
|
|
19
|
-
frequency: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
20
|
-
interval?: number;
|
|
21
|
-
endDate?: string | Date;
|
|
22
|
-
daysOfWeek?: number[];
|
|
23
|
-
};
|
|
24
|
-
notes?: string;
|
|
25
|
-
tags?: string[];
|
|
26
|
-
createdAt?: string | Date;
|
|
27
|
-
updatedAt?: string | Date;
|
|
28
|
-
[key: string]: unknown;
|
|
29
|
-
}
|
|
30
|
-
interface CalendarDate {
|
|
31
|
-
date: Date;
|
|
32
|
-
isCurrentMonth: boolean;
|
|
33
|
-
isToday: boolean;
|
|
34
|
-
hasEvents: boolean;
|
|
35
|
-
events: CalendarEvent[];
|
|
36
|
-
}
|
|
37
|
-
interface CalendarState {
|
|
38
|
-
currentYear: number;
|
|
39
|
-
currentMonth: number;
|
|
40
|
-
currentDate: number;
|
|
41
|
-
selectedDate: Date | null;
|
|
42
|
-
selectedDayIndex: number | null;
|
|
43
|
-
tasks: CalendarEvent[];
|
|
44
|
-
}
|
|
45
|
-
interface CategoryColorMap {
|
|
46
|
-
[category: string]: string;
|
|
47
|
-
}
|
|
48
|
-
interface CalendarConfig {
|
|
49
|
-
events: CalendarEvent[];
|
|
50
|
-
initialDate?: Date;
|
|
51
|
-
minYear?: number;
|
|
52
|
-
maxYear?: number;
|
|
53
|
-
weekStartsOn?: 0 | 1;
|
|
54
|
-
categoryColors?: CategoryColorMap;
|
|
55
|
-
}
|
|
56
|
-
interface CalendarActions {
|
|
57
|
-
next: () => void;
|
|
58
|
-
previous: () => void;
|
|
59
|
-
jump: (year: number, month: number) => void;
|
|
60
|
-
goToToday: () => void;
|
|
61
|
-
isCurrentMonth: () => boolean;
|
|
62
|
-
selectDate: (date: Date) => void;
|
|
63
|
-
updateTasks: () => void;
|
|
64
|
-
}
|
|
65
|
-
interface PopupPosition {
|
|
66
|
-
class: 'popup-left' | 'popup-right' | 'popup-center-top' | 'popup-center-bottom';
|
|
67
|
-
style?: Record<string, string | number>;
|
|
68
|
-
}
|
|
69
|
-
interface CalendarViewModel extends CalendarState {
|
|
70
|
-
months: string[];
|
|
71
|
-
days: string[];
|
|
72
|
-
years: number[];
|
|
73
|
-
monthAndYearText: string;
|
|
74
|
-
scheduleDay: string;
|
|
75
|
-
calendarDates: CalendarDate[][];
|
|
76
|
-
popupPositionClass: string;
|
|
77
|
-
}
|
|
78
|
-
type CalendarEventHandler = (event: CalendarEvent) => void;
|
|
79
|
-
interface CalendarProps {
|
|
80
|
-
events: CalendarEvent[];
|
|
81
|
-
initialDate?: Date;
|
|
82
|
-
minYear?: number;
|
|
83
|
-
maxYear?: number;
|
|
84
|
-
weekStartsOn?: 0 | 1;
|
|
85
|
-
useShortMonthNames?: boolean;
|
|
86
|
-
onDateSelect?: (date: Date) => void;
|
|
87
|
-
onEventClick?: CalendarEventHandler;
|
|
88
|
-
onMonthChange?: (year: number, month: number) => void;
|
|
89
|
-
}
|
|
90
|
-
interface CalendarTheme {
|
|
91
|
-
primary?: string;
|
|
92
|
-
secondary?: string;
|
|
93
|
-
tertiary?: string;
|
|
94
|
-
textColor?: string;
|
|
95
|
-
textLight?: string;
|
|
96
|
-
background?: string;
|
|
97
|
-
cellHover?: string;
|
|
98
|
-
borderColor?: string;
|
|
99
|
-
todayOutline?: string;
|
|
100
|
-
selectedBg?: string;
|
|
101
|
-
eventIndicator?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare const MONTHS: string[];
|
|
105
|
-
declare const MONTHS_FULL: string[];
|
|
106
|
-
declare const DAYS: string[];
|
|
107
|
-
declare function normalizeDate(date: Date): Date;
|
|
108
|
-
declare function isSameDay(date1: Date, date2: Date): boolean;
|
|
109
|
-
declare function isToday(date: Date): boolean;
|
|
110
|
-
declare function generateYears(minYear?: number, maxYear?: number): number[];
|
|
111
|
-
declare function getEventsForDate(events: CalendarEvent[], date: Date): CalendarEvent[];
|
|
112
|
-
declare function hasEvents(events: CalendarEvent[], date: Date): boolean;
|
|
113
|
-
declare function generateCalendarDates(year: number, month: number, events?: CalendarEvent[], weekStartsOn?: 0 | 1): CalendarDate[][];
|
|
114
|
-
declare function getPopupPositionClass(selectedDayIndex: number | null): string;
|
|
115
|
-
declare function getCellClasses(calendarDate: CalendarDate): string[];
|
|
116
|
-
declare function formatDateForDisplay(date: Date): string;
|
|
117
|
-
declare function getMonthYearText(year: number, month: number): string;
|
|
118
|
-
declare function formatTimeRange(event: CalendarEvent): string;
|
|
119
|
-
declare function formatAttendees(attendees?: string[]): string;
|
|
120
|
-
declare function sortEventsByTime(events: CalendarEvent[]): CalendarEvent[];
|
|
121
|
-
declare const DEFAULT_CATEGORY_COLORS: CategoryColorMap;
|
|
122
|
-
declare function getDefaultEventColor(category?: string, customColors?: CategoryColorMap): string;
|
|
123
|
-
declare function mergeCategoryColors(customColors?: CategoryColorMap): CategoryColorMap;
|
|
124
|
-
declare function isValidHexColor(color: string): boolean;
|
|
125
|
-
declare function getCategoryColor(category: string, customColors?: CategoryColorMap): string;
|
|
126
|
-
|
|
127
|
-
declare class CalendarEngine {
|
|
128
|
-
private state;
|
|
129
|
-
private config;
|
|
130
|
-
private listeners;
|
|
131
|
-
private categoryColors;
|
|
132
|
-
constructor(config: CalendarConfig);
|
|
133
|
-
/**
|
|
134
|
-
* Subscribe to state changes
|
|
135
|
-
*/
|
|
136
|
-
subscribe(listener: () => void): () => void;
|
|
137
|
-
/**
|
|
138
|
-
* Notify all listeners of state changes
|
|
139
|
-
*/
|
|
140
|
-
private notify;
|
|
141
|
-
/**
|
|
142
|
-
* Get current state
|
|
143
|
-
*/
|
|
144
|
-
getState(): CalendarState;
|
|
145
|
-
/**
|
|
146
|
-
* Get view model with computed properties
|
|
147
|
-
*/
|
|
148
|
-
getViewModel(): CalendarViewModel;
|
|
149
|
-
/**
|
|
150
|
-
* Get actions object
|
|
151
|
-
*/
|
|
152
|
-
getActions(): CalendarActions;
|
|
153
|
-
/**
|
|
154
|
-
* Navigate to next month
|
|
155
|
-
*/
|
|
156
|
-
private next;
|
|
157
|
-
/**
|
|
158
|
-
* Navigate to previous month
|
|
159
|
-
*/
|
|
160
|
-
private previous;
|
|
161
|
-
/**
|
|
162
|
-
* Jump to specific month and year
|
|
163
|
-
*/
|
|
164
|
-
private jump;
|
|
165
|
-
/**
|
|
166
|
-
* Navigate to current month (today)
|
|
167
|
-
*/
|
|
168
|
-
private goToToday;
|
|
169
|
-
/**
|
|
170
|
-
* Check if currently viewing today's month
|
|
171
|
-
*/
|
|
172
|
-
private isCurrentMonth;
|
|
173
|
-
/**
|
|
174
|
-
* Select a specific date
|
|
175
|
-
*/
|
|
176
|
-
private selectDate;
|
|
177
|
-
/**
|
|
178
|
-
* Update tasks for the currently selected date
|
|
179
|
-
*/
|
|
180
|
-
private updateTasks;
|
|
181
|
-
/**
|
|
182
|
-
* Update events configuration
|
|
183
|
-
*/
|
|
184
|
-
updateEvents(events: CalendarEvent[]): void;
|
|
185
|
-
/**
|
|
186
|
-
* Handle date cell click
|
|
187
|
-
*/
|
|
188
|
-
handleDateClick(date: Date, dayIndex?: number): void;
|
|
189
|
-
/**
|
|
190
|
-
* Check if date has events
|
|
191
|
-
*/
|
|
192
|
-
hasEventsForDate(date: Date): boolean;
|
|
193
|
-
/**
|
|
194
|
-
* Get events for a specific date
|
|
195
|
-
*/
|
|
196
|
-
getEventsForDate(date: Date): CalendarEvent[];
|
|
197
|
-
/**
|
|
198
|
-
* Clear selected date
|
|
199
|
-
*/
|
|
200
|
-
clearSelection(): void;
|
|
201
|
-
/**
|
|
202
|
-
* Get category color (with custom colors support)
|
|
203
|
-
*/
|
|
204
|
-
getCategoryColor(category?: string): string;
|
|
205
|
-
/**
|
|
206
|
-
* Update category colors dynamically
|
|
207
|
-
*/
|
|
208
|
-
updateCategoryColors(colors: CategoryColorMap): void;
|
|
209
|
-
/**
|
|
210
|
-
* Get all category colors
|
|
211
|
-
*/
|
|
212
|
-
getCategoryColors(): CategoryColorMap;
|
|
213
|
-
/**
|
|
214
|
-
* Register a new category with color
|
|
215
|
-
*/
|
|
216
|
-
registerCategory(name: string, color: string): void;
|
|
217
|
-
/**
|
|
218
|
-
* Destroy the engine and cleanup listeners
|
|
219
|
-
*/
|
|
220
|
-
destroy(): void;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
interface VanillaCalendarProps extends CalendarProps {
|
|
224
|
-
container: HTMLElement | string;
|
|
225
|
-
className?: string;
|
|
226
|
-
title?: string;
|
|
227
|
-
renderEvent?: (event: CalendarEvent) => string;
|
|
228
|
-
renderNoEvents?: () => string;
|
|
229
|
-
theme?: CalendarTheme;
|
|
230
|
-
}
|
|
231
|
-
interface VanillaCalendarInstance {
|
|
232
|
-
destroy: () => void;
|
|
233
|
-
updateEvents: (events: CalendarEvent[]) => void;
|
|
234
|
-
updateTheme: (theme: CalendarTheme) => void;
|
|
235
|
-
getCurrentDate: () => Date | null;
|
|
236
|
-
goToDate: (date: Date) => void;
|
|
237
|
-
getEngine: () => CalendarEngine;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
declare class VanillaCalendar implements VanillaCalendarInstance {
|
|
241
|
-
private engine;
|
|
242
|
-
private container;
|
|
243
|
-
private unsubscribe;
|
|
244
|
-
private props;
|
|
245
|
-
private actions;
|
|
246
|
-
private pickerOpen;
|
|
247
|
-
private yearInput;
|
|
248
|
-
private yearInputValid;
|
|
249
|
-
private clickOutsideHandler;
|
|
250
|
-
private delegatedClickHandler;
|
|
251
|
-
private delegatedInputHandler;
|
|
252
|
-
private delegatedBlurHandler;
|
|
253
|
-
private delegatedKeydownHandler;
|
|
254
|
-
private listenersAttached;
|
|
255
|
-
constructor(props: VanillaCalendarProps);
|
|
256
|
-
private applyTheme;
|
|
257
|
-
private init;
|
|
258
|
-
private render;
|
|
259
|
-
private attachEventListeners;
|
|
260
|
-
private updatePickerYear;
|
|
261
|
-
private dispatchMonthChange;
|
|
262
|
-
updateEvents(events: CalendarEvent[]): void;
|
|
263
|
-
updateTheme(theme: CalendarTheme): void;
|
|
264
|
-
getCurrentDate(): Date | null;
|
|
265
|
-
goToDate(date: Date): void;
|
|
266
|
-
getEngine(): CalendarEngine;
|
|
267
|
-
destroy(): void;
|
|
268
|
-
}
|
|
269
|
-
declare function createCalendar(props: VanillaCalendarProps): VanillaCalendarInstance;
|
|
270
|
-
|
|
271
|
-
export { type CalendarActions, type CalendarConfig, type CalendarDate, CalendarEngine, type CalendarEvent, type CalendarEventHandler, type CalendarProps, type CalendarState, type CalendarTheme, type CalendarViewModel, type CategoryColorMap, DAYS, DEFAULT_CATEGORY_COLORS, MONTHS, MONTHS_FULL, type PopupPosition, VanillaCalendar, type VanillaCalendarInstance, type VanillaCalendarProps, createCalendar, formatAttendees, formatDateForDisplay, formatTimeRange, generateCalendarDates, generateYears, getCategoryColor, getCellClasses, getDefaultEventColor, getEventsForDate, getMonthYearText, getPopupPositionClass, hasEvents, isSameDay, isToday, isValidHexColor, mergeCategoryColors, normalizeDate, sortEventsByTime };
|