@ilamy/calendar 0.1.3 → 0.1.4
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 +1 -41
- package/dist/index.cjs +377 -361
- package/dist/index.d.cts +39 -35
- package/dist/index.d.ts +39 -35
- package/dist/index.js +291 -280
- package/package.json +16 -13
package/dist/index.d.cts
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
1
|
import React2 from "react";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
interface CalendarEvent {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
start: dayjs.Dayjs;
|
|
7
|
-
originalStart?: dayjs.Dayjs;
|
|
8
|
-
originalEnd?: dayjs.Dayjs;
|
|
9
|
-
end: dayjs.Dayjs;
|
|
10
|
-
color?: string;
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
location?: string;
|
|
14
|
-
height?: number;
|
|
15
|
-
all_day?: boolean;
|
|
16
|
-
recurrence?: {
|
|
17
|
-
frequency: "daily" | "weekly" | "monthly" | "yearly"
|
|
18
|
-
interval: number
|
|
19
|
-
endDate?: dayjs.Dayjs
|
|
20
|
-
count?: number
|
|
21
|
-
daysOfWeek?: number[]
|
|
22
|
-
exceptions?: dayjs.Dayjs[]
|
|
23
|
-
};
|
|
24
|
-
isRecurring?: boolean;
|
|
25
|
-
parentEventId?: string;
|
|
26
|
-
isException?: boolean;
|
|
27
|
-
}
|
|
28
|
-
interface ProcessedCalendarEvent extends CalendarEvent {
|
|
29
|
-
left: number;
|
|
30
|
-
width: number;
|
|
31
|
-
top: number;
|
|
32
|
-
height: number;
|
|
33
|
-
}
|
|
34
|
-
type WeekDays = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
35
|
-
import dayjs2 from "dayjs";
|
|
36
3
|
import "dayjs/locale/af";
|
|
37
4
|
import "dayjs/locale/am";
|
|
38
5
|
import "dayjs/locale/ar-dz";
|
|
@@ -176,12 +143,48 @@ import "dayjs/locale/zh-cn";
|
|
|
176
143
|
import "dayjs/locale/zh-hk";
|
|
177
144
|
import "dayjs/locale/zh-tw";
|
|
178
145
|
import "dayjs/locale/zh";
|
|
146
|
+
interface CalendarEvent {
|
|
147
|
+
id: string;
|
|
148
|
+
title: string;
|
|
149
|
+
start: dayjs.Dayjs;
|
|
150
|
+
originalStart?: dayjs.Dayjs;
|
|
151
|
+
originalEnd?: dayjs.Dayjs;
|
|
152
|
+
end: dayjs.Dayjs;
|
|
153
|
+
color?: string;
|
|
154
|
+
backgroundColor?: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
location?: string;
|
|
157
|
+
height?: number;
|
|
158
|
+
allDay?: boolean;
|
|
159
|
+
recurrence?: {
|
|
160
|
+
frequency: "daily" | "weekly" | "monthly" | "yearly"
|
|
161
|
+
interval: number
|
|
162
|
+
endDate?: dayjs.Dayjs
|
|
163
|
+
count?: number
|
|
164
|
+
daysOfWeek?: number[]
|
|
165
|
+
exceptions?: dayjs.Dayjs[]
|
|
166
|
+
};
|
|
167
|
+
isRecurring?: boolean;
|
|
168
|
+
parentEventId?: string;
|
|
169
|
+
isException?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Custom data associated with the event
|
|
172
|
+
*/
|
|
173
|
+
data?: Record<string, any>;
|
|
174
|
+
}
|
|
175
|
+
interface ProcessedCalendarEvent extends CalendarEvent {
|
|
176
|
+
left: number;
|
|
177
|
+
width: number;
|
|
178
|
+
top: number;
|
|
179
|
+
height: number;
|
|
180
|
+
}
|
|
181
|
+
type WeekDays = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
179
182
|
interface CalendarProps {
|
|
180
183
|
events?: CalendarEvent[];
|
|
181
184
|
firstDayOfWeek?: WeekDays;
|
|
182
185
|
renderEvent?: (event: CalendarEvent) => React2.ReactNode;
|
|
183
186
|
onEventClick?: (event: CalendarEvent) => void;
|
|
184
|
-
onCellClick?: (startDate:
|
|
187
|
+
onCellClick?: (startDate: dayjs.Dayjs, endDate: dayjs.Dayjs) => void;
|
|
185
188
|
onViewChange?: (view: "month" | "week" | "day" | "year") => void;
|
|
186
189
|
locale?: string;
|
|
187
190
|
timezone?: string;
|
|
@@ -189,7 +192,8 @@ interface CalendarProps {
|
|
|
189
192
|
disableEventClick?: boolean;
|
|
190
193
|
disableDragAndDrop?: boolean;
|
|
191
194
|
dayMaxEvents?: number;
|
|
192
|
-
|
|
195
|
+
stickyViewHeader?: boolean;
|
|
196
|
+
viewHeaderClassName?: string;
|
|
193
197
|
}
|
|
194
198
|
declare const IlamyCalendar: React2.FC<CalendarProps>;
|
|
195
199
|
declare const usePublicCalendarContext: () => {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
1
|
import React2 from "react";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
interface CalendarEvent {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
start: dayjs.Dayjs;
|
|
7
|
-
originalStart?: dayjs.Dayjs;
|
|
8
|
-
originalEnd?: dayjs.Dayjs;
|
|
9
|
-
end: dayjs.Dayjs;
|
|
10
|
-
color?: string;
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
location?: string;
|
|
14
|
-
height?: number;
|
|
15
|
-
all_day?: boolean;
|
|
16
|
-
recurrence?: {
|
|
17
|
-
frequency: "daily" | "weekly" | "monthly" | "yearly"
|
|
18
|
-
interval: number
|
|
19
|
-
endDate?: dayjs.Dayjs
|
|
20
|
-
count?: number
|
|
21
|
-
daysOfWeek?: number[]
|
|
22
|
-
exceptions?: dayjs.Dayjs[]
|
|
23
|
-
};
|
|
24
|
-
isRecurring?: boolean;
|
|
25
|
-
parentEventId?: string;
|
|
26
|
-
isException?: boolean;
|
|
27
|
-
}
|
|
28
|
-
interface ProcessedCalendarEvent extends CalendarEvent {
|
|
29
|
-
left: number;
|
|
30
|
-
width: number;
|
|
31
|
-
top: number;
|
|
32
|
-
height: number;
|
|
33
|
-
}
|
|
34
|
-
type WeekDays = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
35
|
-
import dayjs2 from "dayjs";
|
|
36
3
|
import "dayjs/locale/af";
|
|
37
4
|
import "dayjs/locale/am";
|
|
38
5
|
import "dayjs/locale/ar-dz";
|
|
@@ -176,12 +143,48 @@ import "dayjs/locale/zh-cn";
|
|
|
176
143
|
import "dayjs/locale/zh-hk";
|
|
177
144
|
import "dayjs/locale/zh-tw";
|
|
178
145
|
import "dayjs/locale/zh";
|
|
146
|
+
interface CalendarEvent {
|
|
147
|
+
id: string;
|
|
148
|
+
title: string;
|
|
149
|
+
start: dayjs.Dayjs;
|
|
150
|
+
originalStart?: dayjs.Dayjs;
|
|
151
|
+
originalEnd?: dayjs.Dayjs;
|
|
152
|
+
end: dayjs.Dayjs;
|
|
153
|
+
color?: string;
|
|
154
|
+
backgroundColor?: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
location?: string;
|
|
157
|
+
height?: number;
|
|
158
|
+
allDay?: boolean;
|
|
159
|
+
recurrence?: {
|
|
160
|
+
frequency: "daily" | "weekly" | "monthly" | "yearly"
|
|
161
|
+
interval: number
|
|
162
|
+
endDate?: dayjs.Dayjs
|
|
163
|
+
count?: number
|
|
164
|
+
daysOfWeek?: number[]
|
|
165
|
+
exceptions?: dayjs.Dayjs[]
|
|
166
|
+
};
|
|
167
|
+
isRecurring?: boolean;
|
|
168
|
+
parentEventId?: string;
|
|
169
|
+
isException?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Custom data associated with the event
|
|
172
|
+
*/
|
|
173
|
+
data?: Record<string, any>;
|
|
174
|
+
}
|
|
175
|
+
interface ProcessedCalendarEvent extends CalendarEvent {
|
|
176
|
+
left: number;
|
|
177
|
+
width: number;
|
|
178
|
+
top: number;
|
|
179
|
+
height: number;
|
|
180
|
+
}
|
|
181
|
+
type WeekDays = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
179
182
|
interface CalendarProps {
|
|
180
183
|
events?: CalendarEvent[];
|
|
181
184
|
firstDayOfWeek?: WeekDays;
|
|
182
185
|
renderEvent?: (event: CalendarEvent) => React2.ReactNode;
|
|
183
186
|
onEventClick?: (event: CalendarEvent) => void;
|
|
184
|
-
onCellClick?: (startDate:
|
|
187
|
+
onCellClick?: (startDate: dayjs.Dayjs, endDate: dayjs.Dayjs) => void;
|
|
185
188
|
onViewChange?: (view: "month" | "week" | "day" | "year") => void;
|
|
186
189
|
locale?: string;
|
|
187
190
|
timezone?: string;
|
|
@@ -189,7 +192,8 @@ interface CalendarProps {
|
|
|
189
192
|
disableEventClick?: boolean;
|
|
190
193
|
disableDragAndDrop?: boolean;
|
|
191
194
|
dayMaxEvents?: number;
|
|
192
|
-
|
|
195
|
+
stickyViewHeader?: boolean;
|
|
196
|
+
viewHeaderClassName?: string;
|
|
193
197
|
}
|
|
194
198
|
declare const IlamyCalendar: React2.FC<CalendarProps>;
|
|
195
199
|
declare const usePublicCalendarContext: () => {};
|