@super-calendar/native 2.0.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/LICENSE +21 -0
- package/dist/DefaultMonthEvent-86XCNCge.d.ts +326 -0
- package/dist/DefaultMonthEvent-CpRoOloh.d.mts +326 -0
- package/dist/MonthList-BCfN-UGz.js +1089 -0
- package/dist/MonthList-CyrEJ_U6.mjs +1030 -0
- package/dist/index.d.mts +386 -0
- package/dist/index.d.ts +386 -0
- package/dist/index.js +1700 -0
- package/dist/index.mjs +1543 -0
- package/dist/picker.d.mts +3 -0
- package/dist/picker.d.ts +3 -0
- package/dist/picker.js +96 -0
- package/dist/picker.mjs +3 -0
- package/package.json +92 -0
- package/src/components/Agenda.tsx +133 -0
- package/src/components/AllDayLane.tsx +98 -0
- package/src/components/Calendar.tsx +456 -0
- package/src/components/DefaultEvent.tsx +223 -0
- package/src/components/DefaultMonthEvent.tsx +105 -0
- package/src/components/MonthList.tsx +570 -0
- package/src/components/MonthPager.tsx +377 -0
- package/src/components/MonthView.tsx +518 -0
- package/src/components/TimeGrid.tsx +1943 -0
- package/src/index.tsx +70 -0
- package/src/picker.tsx +55 -0
- package/src/theme.ts +86 -0
- package/src/types.ts +62 -0
- package/src/utils/useWebGridZoom.ts +59 -0
- package/src/utils/useWebPagerKeys.ts +56 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { C as defaultTheme, S as darkTheme, T as useCalendarTheme, _ as TimeGridMode, a as MonthPagerProps, b as CalendarThemeProvider, c as BusinessHours, d as EventKeyExtractor, f as ICalendarEvent, g as RenderEventArgs, h as RenderEvent, i as MonthPager, l as CalendarEvent, m as RecurrenceRule, n as MonthList, o as MonthView, p as RecurrenceFrequency, r as MonthListProps, s as MonthViewProps, t as DefaultMonthEvent, u as CalendarMode, v as WeekStartsOn, w as mergeTheme, x as PartialCalendarTheme, y as CalendarTheme } from "./DefaultMonthEvent-86XCNCge.js";
|
|
2
|
+
import { Locale } from "date-fns";
|
|
3
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
4
|
+
import { SharedValue, useSharedValue } from "react-native-reanimated";
|
|
5
|
+
import { DateRange, DateSelectionConstraints, DaySelectionState, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, PositionedEvent, UseDateRangeOptions, UseMonthGridOptions, buildMonthGrid, buildMonthWeeks, daySelectionState, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, minutesIntoDay, nextDateRange, toZonedTime, useDateRange, useMonthGrid } from "@super-calendar/core";
|
|
6
|
+
import { ComponentType } from "react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/TimeGrid.d.ts
|
|
9
|
+
declare const DEFAULT_HOUR_HEIGHT = 48;
|
|
10
|
+
/**
|
|
11
|
+
* Called when an event is dragged (moved or resized) to new start/end times.
|
|
12
|
+
* Return `false` to reject the drop — the event snaps back to where it started
|
|
13
|
+
* (e.g. to forbid overlaps or out-of-bounds slots). Any other return accepts it.
|
|
14
|
+
*/
|
|
15
|
+
type EventDragHandler<T> = (event: CalendarEvent<T>, start: Date, end: Date) => void | boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Called when a move or resize gesture begins, before any change is committed:
|
|
18
|
+
* on grab for a move (after the long-press), and when the resize drag starts.
|
|
19
|
+
* Handy for haptic feedback (e.g. `expo-haptics`). Requires drag to be enabled
|
|
20
|
+
* via `onDragEvent`.
|
|
21
|
+
*/
|
|
22
|
+
type EventDragStartHandler<T> = (event: CalendarEvent<T>) => void;
|
|
23
|
+
/** Replace the hour-axis label. Receives the hour (0–23) and the `ampm` flag. */
|
|
24
|
+
type HourRenderer = (hour: number, ampm: boolean) => React.ReactNode;
|
|
25
|
+
type TimeGridProps<T> = {
|
|
26
|
+
mode: TimeGridMode; /** Day columns to show in `custom` mode. Ignored by day/3days/week. Default 1. */
|
|
27
|
+
numberOfDays?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Last weekday of a `custom` partial-week view (0–6). When set, `custom` shows
|
|
30
|
+
* `weekStartsOn`…`weekEndsOn` of `date`'s week and pages by week, taking
|
|
31
|
+
* precedence over `numberOfDays`. Ignored by other modes.
|
|
32
|
+
*/
|
|
33
|
+
weekEndsOn?: WeekStartsOn;
|
|
34
|
+
date: Date;
|
|
35
|
+
events: CalendarEvent<T>[];
|
|
36
|
+
cellHeight: SharedValue<number>; /** Initial per-hour row height in px; seeds scroll/zoom without reading the shared value during render. */
|
|
37
|
+
hourHeight?: number;
|
|
38
|
+
weekStartsOn: WeekStartsOn;
|
|
39
|
+
renderEvent: RenderEvent<T>;
|
|
40
|
+
keyExtractor: EventKeyExtractor<T>;
|
|
41
|
+
scrollOffsetMinutes?: number;
|
|
42
|
+
hourColumnWidth?: number; /** Hide the left hour-axis column (lines stay, labels/gutter go). Default false. */
|
|
43
|
+
hideHours?: boolean; /** Sub-hour divider lines per hour (e.g. 2 = half-hours). Default 1 (none). */
|
|
44
|
+
timeslots?: number; /** Show the all-day lane above the grid. Default true. */
|
|
45
|
+
showAllDayEventCell?: boolean; /** Per-date style merged onto each day column. */
|
|
46
|
+
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
47
|
+
businessHours?: BusinessHours; /** Show the ISO week number in the header gutter. Default false. */
|
|
48
|
+
showWeekNumber?: boolean; /** Element rendered between the day header and the grid. */
|
|
49
|
+
headerComponent?: React.ReactNode; /** First hour shown (0–23). Default 0. */
|
|
50
|
+
minHour?: number; /** Last hour shown, exclusive (1–24). Default 24. */
|
|
51
|
+
maxHour?: number; /** Show hour labels in 12-hour AM/PM form. Default false (24h). */
|
|
52
|
+
ampm?: boolean; /** Reverse day-column order (right-to-left). Default false. */
|
|
53
|
+
isRTL?: boolean;
|
|
54
|
+
minHourHeight?: number;
|
|
55
|
+
maxHourHeight?: number;
|
|
56
|
+
showNowIndicator?: boolean;
|
|
57
|
+
locale?: Locale;
|
|
58
|
+
freeSwipe?: boolean; /** Allow swiping between pages. Default true. */
|
|
59
|
+
swipeEnabled?: boolean; /** Show the vertical scroll indicator on the time grid. Default true. */
|
|
60
|
+
showVerticalScrollIndicator?: boolean; /** Allow vertical scrolling of the time grid. Default true. */
|
|
61
|
+
verticalScrollEnabled?: boolean; /** Prefix for the week-number label (e.g. "W"). Default "W". */
|
|
62
|
+
weekNumberPrefix?: string; /** Replace the hour-axis label. Receives the hour (0–23) and `ampm`. */
|
|
63
|
+
hourComponent?: HourRenderer; /** Highlight this date in the header instead of the real "today". */
|
|
64
|
+
activeDate?: Date; /** After an empty-cell press, snap the pager back to the active page. Default false. */
|
|
65
|
+
resetPageOnPressCell?: boolean; /** Minutes a drag-to-move/resize snaps to. Default 15. */
|
|
66
|
+
dragStepMinutes?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Show the resize grip on draggable events. Default true. Set false to keep
|
|
69
|
+
* drag-to-move and drag-to-resize working while hiding the visible indicator.
|
|
70
|
+
*/
|
|
71
|
+
showDragHandle?: boolean;
|
|
72
|
+
onPressEvent: (event: CalendarEvent<T>) => void;
|
|
73
|
+
onLongPressEvent?: (event: CalendarEvent<T>) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Enable drag-to-move and drag-to-resize on the week/day grid. Called with the
|
|
76
|
+
* event's new start/end (snapped to `dragStepMinutes`); update your own state.
|
|
77
|
+
*/
|
|
78
|
+
onDragEvent?: EventDragHandler<T>; /** Fired the moment an event is grabbed for a move or resize (e.g. for haptics). */
|
|
79
|
+
onDragStart?: EventDragStartHandler<T>;
|
|
80
|
+
onPressCell?: (date: Date) => void;
|
|
81
|
+
onLongPressCell?: (date: Date) => void;
|
|
82
|
+
onCreateEvent?: (start: Date, end: Date) => void; /** Tap a day's column header (default header only). */
|
|
83
|
+
onPressDateHeader?: (date: Date) => void;
|
|
84
|
+
onChangeDate: (date: Date) => void; /** Optional header above the grid (e.g. weekday labels). Rendered full-width. */
|
|
85
|
+
renderHeader?: (days: Date[]) => React.ReactNode;
|
|
86
|
+
};
|
|
87
|
+
declare function TimeGridInner<T>({
|
|
88
|
+
mode,
|
|
89
|
+
numberOfDays,
|
|
90
|
+
weekEndsOn,
|
|
91
|
+
date,
|
|
92
|
+
events,
|
|
93
|
+
cellHeight,
|
|
94
|
+
hourHeight,
|
|
95
|
+
weekStartsOn,
|
|
96
|
+
renderEvent,
|
|
97
|
+
keyExtractor,
|
|
98
|
+
scrollOffsetMinutes,
|
|
99
|
+
hourColumnWidth: hourColumnWidthProp,
|
|
100
|
+
hideHours,
|
|
101
|
+
timeslots,
|
|
102
|
+
showAllDayEventCell,
|
|
103
|
+
calendarCellStyle,
|
|
104
|
+
businessHours,
|
|
105
|
+
showWeekNumber,
|
|
106
|
+
headerComponent,
|
|
107
|
+
minHour,
|
|
108
|
+
maxHour,
|
|
109
|
+
ampm,
|
|
110
|
+
isRTL,
|
|
111
|
+
minHourHeight,
|
|
112
|
+
maxHourHeight,
|
|
113
|
+
showNowIndicator,
|
|
114
|
+
locale,
|
|
115
|
+
freeSwipe,
|
|
116
|
+
swipeEnabled,
|
|
117
|
+
showVerticalScrollIndicator,
|
|
118
|
+
verticalScrollEnabled,
|
|
119
|
+
weekNumberPrefix,
|
|
120
|
+
hourComponent,
|
|
121
|
+
activeDate,
|
|
122
|
+
resetPageOnPressCell,
|
|
123
|
+
dragStepMinutes,
|
|
124
|
+
showDragHandle,
|
|
125
|
+
onPressEvent,
|
|
126
|
+
onLongPressEvent,
|
|
127
|
+
onDragEvent,
|
|
128
|
+
onDragStart,
|
|
129
|
+
onPressCell,
|
|
130
|
+
onLongPressCell,
|
|
131
|
+
onCreateEvent,
|
|
132
|
+
onPressDateHeader,
|
|
133
|
+
onChangeDate,
|
|
134
|
+
renderHeader
|
|
135
|
+
}: TimeGridProps<T>): import("react").JSX.Element;
|
|
136
|
+
declare const TimeGrid: typeof TimeGridInner;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/components/Calendar.d.ts
|
|
139
|
+
type CalendarProps<T> = {
|
|
140
|
+
events: CalendarEvent<T>[];
|
|
141
|
+
mode: CalendarMode;
|
|
142
|
+
date: Date;
|
|
143
|
+
onChangeDate: (date: Date) => void; /** Fired alongside `onChangeDate` with the `[start, end]` of the newly-visible range. */
|
|
144
|
+
onChangeDateRange?: (range: [Date, Date]) => void;
|
|
145
|
+
onPressEvent: (event: CalendarEvent<T>) => void; /** Long-press an event (month/week/day). */
|
|
146
|
+
onLongPressEvent?: (event: CalendarEvent<T>) => void;
|
|
147
|
+
/**
|
|
148
|
+
* Enable drag-to-move and drag-to-resize on the week/day grid. Called with the
|
|
149
|
+
* dragged event and its new start/end (snapped to `dragStepMinutes`); update
|
|
150
|
+
* your own event state in response. Long-press an event to move it (drag
|
|
151
|
+
* horizontally to change the day too); drag its bottom grip to resize. Return
|
|
152
|
+
* `false` to reject the drop (e.g. an overlap) and snap the event back.
|
|
153
|
+
*/
|
|
154
|
+
onDragEvent?: EventDragHandler<T>;
|
|
155
|
+
/**
|
|
156
|
+
* Fired when a move or resize gesture begins on the week/day grid, before any
|
|
157
|
+
* change is committed: on grab for a move (after the long-press), and when a
|
|
158
|
+
* resize drag starts. Use it to trigger haptic feedback, e.g.
|
|
159
|
+
* `Haptics.impactAsync()` from `expo-haptics`. Native-only and inert unless
|
|
160
|
+
* `onDragEvent` is also set.
|
|
161
|
+
*/
|
|
162
|
+
onDragStart?: EventDragStartHandler<T>; /** Minutes a drag-to-move/resize snaps to. Default 15. */
|
|
163
|
+
dragStepMinutes?: number;
|
|
164
|
+
/**
|
|
165
|
+
* Show the resize grip on draggable events. Default true. Set false to keep
|
|
166
|
+
* drag-to-move and drag-to-resize working while hiding the visible indicator.
|
|
167
|
+
*/
|
|
168
|
+
showDragHandle?: boolean; /** Tap a day cell (month mode) — e.g. drill into the day view. */
|
|
169
|
+
onPressDay?: (date: Date) => void; /** Long-press a day cell (month mode). */
|
|
170
|
+
onLongPressDay?: (date: Date) => void; /** Tap the "+N more" overflow label in a month cell. */
|
|
171
|
+
onPressMore?: (events: CalendarEvent<T>[], date: Date) => void; /** Tap empty space on the week/day grid; receives the date+time pressed. */
|
|
172
|
+
onPressCell?: (date: Date) => void; /** After an empty-cell press, snap the pager back to the active page. Default false. */
|
|
173
|
+
resetPageOnPressCell?: boolean; /** Long-press empty space on the week/day grid; receives the date+time. */
|
|
174
|
+
onLongPressCell?: (date: Date) => void;
|
|
175
|
+
/**
|
|
176
|
+
* Enable drag-to-create on the week/day grid: long-press empty space and drag
|
|
177
|
+
* to sweep out a new event's time range. Called on release with the snapped
|
|
178
|
+
* `start`/`end` (to `dragStepMinutes`); create your own event in response. A
|
|
179
|
+
* stationary press yields a one-step range. Native-only; supersedes
|
|
180
|
+
* `onLongPressCell` on empty space when set.
|
|
181
|
+
*/
|
|
182
|
+
onCreateEvent?: (start: Date, end: Date) => void; /** Tap a day's column header on the week/day grid (default header only). */
|
|
183
|
+
onPressDateHeader?: (date: Date) => void;
|
|
184
|
+
/**
|
|
185
|
+
* Max event chips per month cell before they collapse into "+N more". Omit to
|
|
186
|
+
* auto-fit as many as the cell height allows (default); set a number for a
|
|
187
|
+
* fixed cap. Pass an explicit value when using a custom `renderEvent`.
|
|
188
|
+
*/
|
|
189
|
+
maxVisibleEventCount?: number; /** Sort each month day's events by start. Default true. */
|
|
190
|
+
sortedMonthView?: boolean; /** Month overflow label template; `{moreCount}` is replaced. Default "{moreCount} More". */
|
|
191
|
+
moreLabel?: string; /** Show dimmed adjacent-month days in the month grid. Default true. */
|
|
192
|
+
showAdjacentMonths?: boolean; /** Ignore taps on month-cell events (day taps still fire). Default false. */
|
|
193
|
+
disableMonthEventCellPress?: boolean; /** First day of the week. Sunday = 0 (default) … Saturday = 6. */
|
|
194
|
+
weekStartsOn?: WeekStartsOn; /** Number of day columns when `mode="custom"`. Ignored by other modes. Default 1. */
|
|
195
|
+
numberOfDays?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Last weekday of a `custom` partial-week view (0–6). When set, `custom` shows
|
|
198
|
+
* `weekStartsOn`…`weekEndsOn` of the visible week and pages by week, taking
|
|
199
|
+
* precedence over `numberOfDays`. Ignored by other modes.
|
|
200
|
+
*/
|
|
201
|
+
weekEndsOn?: WeekStartsOn; /** Replace the built-in event box. Return a `flex: 1` element. */
|
|
202
|
+
renderEvent?: RenderEvent<T>; /** Per-event style merged onto the built-in event box (static or a function of the event). */
|
|
203
|
+
eventCellStyle?: StyleProp<ViewStyle> | ((event: CalendarEvent<T>) => StyleProp<ViewStyle>); /** Per-date style for month cells and week/day columns (e.g. shade specific dates). */
|
|
204
|
+
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
205
|
+
/**
|
|
206
|
+
* Week/day grid only: open hours per day for business-hours shading. Hours
|
|
207
|
+
* outside the returned `{ start, end }` are tinted; return `null` to shade the
|
|
208
|
+
* whole day (closed). Omit for no shading.
|
|
209
|
+
*/
|
|
210
|
+
businessHours?: BusinessHours; /** Stable key per event. Defaults to start-time + index. */
|
|
211
|
+
keyExtractor?: EventKeyExtractor<T>; /** Partial theme merged over the defaults. */
|
|
212
|
+
theme?: PartialCalendarTheme; /** Externally-owned per-hour row height (week/day). Created internally if omitted. */
|
|
213
|
+
cellHeight?: ReturnType<typeof useSharedValue<number>>; /** Initial per-hour row height in px (week/day). Default 48. */
|
|
214
|
+
hourHeight?: number;
|
|
215
|
+
minHourHeight?: number;
|
|
216
|
+
maxHourHeight?: number;
|
|
217
|
+
hourColumnWidth?: number; /** Hide the left hour-axis column on the week/day grid. Default false. */
|
|
218
|
+
hideHours?: boolean; /** Sub-hour divider lines per hour on the week/day grid (e.g. 2 = half-hours). Default 1. */
|
|
219
|
+
timeslots?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Show the all-day lane above the week/day grid. Default true. When false the
|
|
222
|
+
* lane is never rendered, so all-day events (see `ICalendarEvent.allDay` and
|
|
223
|
+
* whole-day spans) are not shown on the time grid.
|
|
224
|
+
*/
|
|
225
|
+
showAllDayEventCell?: boolean; /** Show the ISO week number in the week/day header gutter. Default false. */
|
|
226
|
+
showWeekNumber?: boolean; /** Prefix for the week-number label (e.g. "W"). Default "W". */
|
|
227
|
+
weekNumberPrefix?: string; /** Replace the hour-axis label on the week/day grid. Receives the hour (0–23) and `ampm`. */
|
|
228
|
+
hourComponent?: HourRenderer; /** Always render six week rows in month view, for a fixed-height grid. Default false. */
|
|
229
|
+
showSixWeeks?: boolean; /** Allow swiping between pages (all modes). Default true. */
|
|
230
|
+
swipeEnabled?: boolean; /** Show the vertical scroll indicator on the week/day grid. Default true. */
|
|
231
|
+
showVerticalScrollIndicator?: boolean; /** Allow vertical scrolling of the week/day grid. Default true. */
|
|
232
|
+
verticalScrollEnabled?: boolean; /** Element rendered between the day header and the week/day grid. */
|
|
233
|
+
headerComponent?: React.ReactNode; /** First hour shown on the week/day grid (0–23). Default 0. */
|
|
234
|
+
minHour?: number; /** Last hour shown on the week/day grid, exclusive (1–24). Default 24. */
|
|
235
|
+
maxHour?: number; /** Show hour labels (and built-in event times) in 12-hour AM/PM form. Default false (24h). */
|
|
236
|
+
ampm?: boolean; /** Show the time range in the built-in event renderer (day/week/schedule). Default true. */
|
|
237
|
+
showTime?: boolean; /** Add a trailing ellipsis (…) when an event title overflows in the built-in renderer; otherwise the text is clipped. Default false. */
|
|
238
|
+
ellipsizeTitle?: boolean; /** Label the built-in renderer shows for an all-day event in the schedule (and its screen-reader text). Default "All day". */
|
|
239
|
+
allDayLabel?: string; /** Initial vertical scroll, in minutes from midnight (week/day). */
|
|
240
|
+
scrollOffsetMinutes?: number; /** Show the current-time line on the week/day grid. Default true. */
|
|
241
|
+
showNowIndicator?: boolean; /** A date-fns `Locale` for weekday/date labels. Defaults to English. */
|
|
242
|
+
locale?: Locale; /** Highlight this date (header/cell/agenda) instead of the real "today". */
|
|
243
|
+
activeDate?: Date;
|
|
244
|
+
/**
|
|
245
|
+
* Lay the day columns out right-to-left (month, week/day grid and all-day lane).
|
|
246
|
+
* Cosmetic only: the hour gutter stays on the left and paging still advances
|
|
247
|
+
* with the system scroll direction. Default false. For full RTL (including
|
|
248
|
+
* scroll direction), also enable React Native's `I18nManager`.
|
|
249
|
+
*/
|
|
250
|
+
isRTL?: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Allow a fling to carry across several pages before snapping. Default false:
|
|
253
|
+
* one day/week/month per swipe.
|
|
254
|
+
*/
|
|
255
|
+
freeSwipe?: boolean; /** Custom header above the week/day grid. Receives the visible days. */
|
|
256
|
+
renderTimeGridHeader?: (days: Date[]) => React.ReactNode; /** Replace the weekday-label header above the month grid. Return `null` to hide it. */
|
|
257
|
+
renderHeaderForMonthView?: (weekDays: Date[]) => React.ReactNode;
|
|
258
|
+
/**
|
|
259
|
+
* Month mode only: replace the default date badge in each day cell. Receives
|
|
260
|
+
* the day; return your own date label (e.g. a number with a dot or badge).
|
|
261
|
+
* Event chips and the "+N more" label still render below it.
|
|
262
|
+
*/
|
|
263
|
+
renderCustomDateForMonth?: (date: Date) => React.ReactNode; /** Drawn between rows of the `schedule` (agenda) list. */
|
|
264
|
+
itemSeparatorComponent?: React.ComponentType<unknown> | null;
|
|
265
|
+
};
|
|
266
|
+
declare function Calendar<T>({
|
|
267
|
+
events,
|
|
268
|
+
mode,
|
|
269
|
+
date,
|
|
270
|
+
onChangeDate,
|
|
271
|
+
onChangeDateRange,
|
|
272
|
+
onPressEvent,
|
|
273
|
+
onLongPressEvent,
|
|
274
|
+
onDragEvent,
|
|
275
|
+
onDragStart,
|
|
276
|
+
dragStepMinutes,
|
|
277
|
+
showDragHandle,
|
|
278
|
+
onPressDay,
|
|
279
|
+
onLongPressDay,
|
|
280
|
+
onPressMore,
|
|
281
|
+
onPressCell,
|
|
282
|
+
resetPageOnPressCell,
|
|
283
|
+
onLongPressCell,
|
|
284
|
+
onCreateEvent,
|
|
285
|
+
onPressDateHeader,
|
|
286
|
+
maxVisibleEventCount,
|
|
287
|
+
sortedMonthView,
|
|
288
|
+
moreLabel,
|
|
289
|
+
showAdjacentMonths,
|
|
290
|
+
disableMonthEventCellPress,
|
|
291
|
+
weekStartsOn,
|
|
292
|
+
numberOfDays,
|
|
293
|
+
weekEndsOn,
|
|
294
|
+
renderEvent,
|
|
295
|
+
eventCellStyle,
|
|
296
|
+
calendarCellStyle,
|
|
297
|
+
businessHours,
|
|
298
|
+
keyExtractor,
|
|
299
|
+
theme,
|
|
300
|
+
cellHeight: cellHeightProp,
|
|
301
|
+
hourHeight,
|
|
302
|
+
minHourHeight,
|
|
303
|
+
maxHourHeight,
|
|
304
|
+
hourColumnWidth,
|
|
305
|
+
hideHours,
|
|
306
|
+
timeslots,
|
|
307
|
+
showAllDayEventCell,
|
|
308
|
+
showWeekNumber,
|
|
309
|
+
weekNumberPrefix,
|
|
310
|
+
hourComponent,
|
|
311
|
+
showSixWeeks,
|
|
312
|
+
swipeEnabled,
|
|
313
|
+
showVerticalScrollIndicator,
|
|
314
|
+
verticalScrollEnabled,
|
|
315
|
+
headerComponent,
|
|
316
|
+
minHour,
|
|
317
|
+
maxHour,
|
|
318
|
+
ampm,
|
|
319
|
+
showTime,
|
|
320
|
+
ellipsizeTitle,
|
|
321
|
+
allDayLabel,
|
|
322
|
+
scrollOffsetMinutes,
|
|
323
|
+
showNowIndicator,
|
|
324
|
+
locale,
|
|
325
|
+
activeDate,
|
|
326
|
+
isRTL,
|
|
327
|
+
freeSwipe,
|
|
328
|
+
renderTimeGridHeader,
|
|
329
|
+
renderHeaderForMonthView,
|
|
330
|
+
renderCustomDateForMonth,
|
|
331
|
+
itemSeparatorComponent
|
|
332
|
+
}: CalendarProps<T>): import("react").JSX.Element;
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/components/Agenda.d.ts
|
|
335
|
+
type AgendaProps<T> = {
|
|
336
|
+
events: CalendarEvent<T>[];
|
|
337
|
+
locale?: Locale;
|
|
338
|
+
renderEvent: RenderEvent<T>;
|
|
339
|
+
keyExtractor: EventKeyExtractor<T>;
|
|
340
|
+
onPressEvent: (event: CalendarEvent<T>) => void;
|
|
341
|
+
onLongPressEvent?: (event: CalendarEvent<T>) => void;
|
|
342
|
+
onPressDay?: (date: Date) => void; /** Highlight this date's header instead of the real "today". */
|
|
343
|
+
activeDate?: Date; /** Drawn between rows of the agenda list. */
|
|
344
|
+
itemSeparatorComponent?: ComponentType<unknown> | null;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* A vertical, day-grouped list of events (no time grid). Events are sorted by
|
|
348
|
+
* start, grouped under a date header per day. The consumer controls which
|
|
349
|
+
* events (and therefore which date range) are shown.
|
|
350
|
+
*/
|
|
351
|
+
declare function Agenda<T>({
|
|
352
|
+
events,
|
|
353
|
+
locale,
|
|
354
|
+
renderEvent,
|
|
355
|
+
keyExtractor,
|
|
356
|
+
onPressEvent,
|
|
357
|
+
onLongPressEvent,
|
|
358
|
+
onPressDay,
|
|
359
|
+
activeDate,
|
|
360
|
+
itemSeparatorComponent
|
|
361
|
+
}: AgendaProps<T>): import("react").JSX.Element;
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/components/DefaultEvent.d.ts
|
|
364
|
+
/**
|
|
365
|
+
* The built-in event renderer: a filled, rounded box showing the event title
|
|
366
|
+
* and (on the day/week grid, when the box is tall enough) its time range. The
|
|
367
|
+
* title fills the box in whole lines, never a half-cut last line, and clips
|
|
368
|
+
* without an ellipsis unless `ellipsizeTitle` is set. The time is secondary: it
|
|
369
|
+
* only shows once a full line is free beneath the title. Pass your own
|
|
370
|
+
* `renderEvent` to `<Calendar>` to replace it entirely.
|
|
371
|
+
*/
|
|
372
|
+
declare function DefaultEvent<T>({
|
|
373
|
+
event,
|
|
374
|
+
mode,
|
|
375
|
+
boxHeight,
|
|
376
|
+
isAllDay,
|
|
377
|
+
ampm,
|
|
378
|
+
showTime,
|
|
379
|
+
ellipsizeTitle,
|
|
380
|
+
allDayLabel,
|
|
381
|
+
cellStyle,
|
|
382
|
+
onPress,
|
|
383
|
+
onLongPress
|
|
384
|
+
}: RenderEventArgs<T>): import("react").JSX.Element;
|
|
385
|
+
//#endregion
|
|
386
|
+
export { Agenda, type AgendaProps, type BusinessHours, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarTheme, CalendarThemeProvider, DEFAULT_HOUR_HEIGHT, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultEvent, DefaultMonthEvent, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, TimeGrid, type TimeGridMode, type TimeGridProps, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, toZonedTime, useCalendarTheme, useDateRange, useMonthGrid };
|