@super-calendar/native 2.8.2 → 2.9.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 +1 -0
- package/dist/{DefaultMonthEvent-C_T4thzu.d.ts → DefaultMonthEvent--9Jg6w-x.d.ts} +82 -3
- package/dist/{DefaultMonthEvent-Cewbec1K.d.mts → DefaultMonthEvent-BlnKHaq2.d.mts} +82 -3
- package/dist/{MonthList-DjAz4xoi.mjs → MonthList-CjKhzOJX.mjs} +356 -102
- package/dist/{MonthList-C-vBotP0.js → MonthList-DNT1LJkk.js} +355 -101
- package/dist/index.d.mts +85 -37
- package/dist/index.d.ts +85 -37
- package/dist/index.js +377 -60
- package/dist/index.mjs +378 -61
- package/dist/picker.d.mts +1 -1
- package/dist/picker.d.ts +1 -1
- package/dist/picker.js +1 -1
- package/dist/picker.mjs +1 -1
- package/package.json +2 -2
- package/src/components/Calendar.tsx +79 -16
- package/src/components/MonthPager.tsx +150 -62
- package/src/components/MonthView.tsx +415 -76
- package/src/components/TimeGrid.tsx +242 -31
- package/src/components/YearView.tsx +368 -81
- package/src/types.ts +19 -0
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ The React Native renderer for [super-calendar](https://github.com/afonsojramos/s
|
|
|
6
6
|
|
|
7
7
|
- 📆 Month grid plus day / 3-day / week / custom-N time grids and an agenda
|
|
8
8
|
- 🤏 Pinch-to-zoom week/day grid (UI thread, no re-renders)
|
|
9
|
+
- ✋ Drag to select, create, and move: by time on the week/day grid, by whole days on the month and year grids
|
|
9
10
|
- ♾️ Virtualized, snap-paging views via [`@legendapp/list`](https://legendapp.com/open-source/list/)
|
|
10
11
|
- 🧩 Bring-your-own event type (`CalendarEvent<T>`) and a `renderEvent` escape hatch
|
|
11
12
|
- 🪝 Headless `useMonthGrid` and `useDateRange` for fully custom UIs
|
|
@@ -111,6 +111,19 @@ declare const CalendarThemeProvider: import("react").Provider<CalendarTheme>;
|
|
|
111
111
|
declare const useCalendarTheme: () => CalendarTheme;
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/types.d.ts
|
|
114
|
+
/**
|
|
115
|
+
* Called when an event is dragged (moved or resized) to new start/end times.
|
|
116
|
+
* Return `false` to reject the drop — the event snaps back to where it started
|
|
117
|
+
* (e.g. to forbid overlaps or out-of-bounds slots). Any other return accepts it.
|
|
118
|
+
*/
|
|
119
|
+
type EventDragHandler<T> = (event: CalendarEvent<T>, start: Date, end: Date) => void | boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Called when a move or resize gesture begins, before any change is committed:
|
|
122
|
+
* on grab for a move (after the long-press), and when the resize drag starts.
|
|
123
|
+
* Handy for haptic feedback (e.g. `expo-haptics`). Requires drag to be enabled
|
|
124
|
+
* via `onDragEvent`.
|
|
125
|
+
*/
|
|
126
|
+
type EventDragStartHandler<T> = (event: CalendarEvent<T>) => void;
|
|
114
127
|
/**
|
|
115
128
|
* Props passed to a {@link RenderEvent} component for one event. Carries the
|
|
116
129
|
* event, the current mode, press handlers, and built-in renderer hints such as
|
|
@@ -289,16 +302,54 @@ type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
289
302
|
keyExtractor: EventKeyExtractor<T>;
|
|
290
303
|
onPressDay?: (date: Date) => void;
|
|
291
304
|
onLongPressDay?: (date: Date) => void;
|
|
305
|
+
/**
|
|
306
|
+
* Tap an empty day cell. Fires alongside `onPressDay` with the same day at
|
|
307
|
+
* midnight, so one handler can create events across month and week/day modes.
|
|
308
|
+
*/
|
|
309
|
+
onPressCell?: (date: Date) => void;
|
|
292
310
|
onPressEvent: (event: CalendarEvent$1<T>) => void;
|
|
293
311
|
onLongPressEvent?: (event: CalendarEvent$1<T>) => void;
|
|
294
312
|
onPressMore?: (events: CalendarEvent$1<T>[], date: Date) => void;
|
|
313
|
+
/**
|
|
314
|
+
* Enable drag-to-create: **long-press an empty day** and sweep across others
|
|
315
|
+
* (**press and drag** on the web), then release to fire this with the **all-day**
|
|
316
|
+
* range — `start` at midnight of the first day, `end` at midnight after the last
|
|
317
|
+
* (exclusive). A sweep that never leaves its day still yields that one day. A
|
|
318
|
+
* plain tap fires `onPressDay`/`onPressCell` instead.
|
|
319
|
+
*/
|
|
320
|
+
onCreateEvent?: (start: Date, end: Date) => void;
|
|
321
|
+
/**
|
|
322
|
+
* Reports the day span of a create sweep **as it happens**, as the ordered
|
|
323
|
+
* inclusive `[start, end]` days (both at midnight), so a selection highlight can
|
|
324
|
+
* follow the drag instead of appearing only on release. Pair it with
|
|
325
|
+
* `useDateRange`'s `selectRange` to drive `selectedRange`. Enables the sweep on
|
|
326
|
+
* its own, so it works without `onCreateEvent`.
|
|
327
|
+
*/
|
|
328
|
+
onSelectDrag?: (start: Date, end: Date) => void;
|
|
329
|
+
/**
|
|
330
|
+
* Enable drag-to-reschedule: **long-press an event bar** and drag it onto
|
|
331
|
+
* another day (**press and drag** on the web). Called on release with the event
|
|
332
|
+
* and its new `start`/`end`, both shifted by the whole days dragged, so the time
|
|
333
|
+
* of day and duration are preserved. Return `false` to reject the drop. Update
|
|
334
|
+
* your own event state in response.
|
|
335
|
+
*/
|
|
336
|
+
onDragEvent?: EventDragHandler<T>;
|
|
337
|
+
/**
|
|
338
|
+
* Fired the instant an event is picked up for a month drag, before anything is
|
|
339
|
+
* committed. Use it for haptic feedback. Inert unless `onDragEvent` is also set.
|
|
340
|
+
*/
|
|
341
|
+
onDragStart?: EventDragStartHandler<T>;
|
|
342
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
343
|
+
eventStartEditable?: boolean;
|
|
344
|
+
/** Reject a drop that would overlap another event (default true = allowed). */
|
|
345
|
+
eventOverlap?: boolean;
|
|
295
346
|
/**
|
|
296
347
|
* Replace the default date badge in each day cell. Receives the day; return
|
|
297
348
|
* your own date label. Event chips and the "+N more" label still render below.
|
|
298
349
|
*/
|
|
299
350
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
300
351
|
};
|
|
301
|
-
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
352
|
+
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, onDragEvent, onDragStart, eventStartEditable, eventOverlap, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
302
353
|
/**
|
|
303
354
|
* A single month rendered as a 7-column grid of day cells, each showing its
|
|
304
355
|
* event chips with a "+N more" overflow. Render it on its own for a static
|
|
@@ -339,20 +390,48 @@ type MonthPagerProps<T> = {
|
|
|
339
390
|
keyExtractor: EventKeyExtractor<T>;
|
|
340
391
|
onPressDay?: (date: Date) => void;
|
|
341
392
|
onLongPressDay?: (date: Date) => void;
|
|
393
|
+
/** Tap an empty day cell; receives the day at midnight. */
|
|
394
|
+
onPressCell?: (date: Date) => void;
|
|
342
395
|
onPressEvent: (event: CalendarEvent$1<T>) => void;
|
|
343
396
|
onLongPressEvent?: (event: CalendarEvent$1<T>) => void;
|
|
344
397
|
onPressMore?: (events: CalendarEvent$1<T>[], date: Date) => void;
|
|
398
|
+
/** Drag across empty day cells to sweep out an all-day span for a new event. */
|
|
399
|
+
onCreateEvent?: (start: Date, end: Date) => void;
|
|
400
|
+
/** Drag-to-select: reports the swept `[start, end]` days live. */
|
|
401
|
+
onSelectDrag?: (start: Date, end: Date) => void;
|
|
402
|
+
/** Days drawn as selected (a filled badge). */
|
|
403
|
+
selectedDates?: Date[];
|
|
404
|
+
/** A selected span: endpoints get a filled badge, the span gets the range band. */
|
|
405
|
+
selectedRange?: DateRange;
|
|
406
|
+
/** Fill the whole cell on selection instead of the default rounded pill band. */
|
|
407
|
+
fillCellOnSelection?: boolean;
|
|
408
|
+
/** Earliest selectable day (inclusive); earlier days render disabled. */
|
|
409
|
+
minDate?: Date;
|
|
410
|
+
/** Latest selectable day (inclusive); later days render disabled. */
|
|
411
|
+
maxDate?: Date;
|
|
412
|
+
/** Return true to render a specific day disabled (dimmed, taps ignored). */
|
|
413
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
414
|
+
/** Drag an event bar onto another day to reschedule it. */
|
|
415
|
+
onDragEvent?: EventDragHandler<T>;
|
|
416
|
+
/** Fired when a month drag picks an event up, before anything is committed. */
|
|
417
|
+
onDragStart?: EventDragStartHandler<T>;
|
|
418
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
419
|
+
eventStartEditable?: boolean;
|
|
420
|
+
/** Reject a drop that would overlap another event (default true = allowed). */
|
|
421
|
+
eventOverlap?: boolean;
|
|
345
422
|
onChangeDate: (date: Date) => void;
|
|
346
423
|
freeSwipe?: boolean;
|
|
347
424
|
swipeEnabled?: boolean;
|
|
348
425
|
showSixWeeks?: boolean;
|
|
426
|
+
/** Render the "MMMM yyyy" title above the weekday header. Default true. */
|
|
427
|
+
showTitle?: boolean;
|
|
349
428
|
activeDate?: Date;
|
|
350
429
|
/** Replace the weekday-label header above the month grid. Receives the week's days. */
|
|
351
430
|
renderHeaderForMonthView?: (weekDays: Date[]) => React.ReactNode;
|
|
352
431
|
/** Replace the default date badge in each day cell. Receives the day. */
|
|
353
432
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
354
433
|
} & SlotStyleProps<MonthViewSlot>;
|
|
355
|
-
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
434
|
+
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onDragEvent, onDragStart, eventStartEditable, eventOverlap, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, showTitle, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
356
435
|
/**
|
|
357
436
|
* A horizontally swipeable month carousel. Swipe left/right to page between
|
|
358
437
|
* months; the committed month is reported through `onChangeDate`. It is the
|
|
@@ -472,4 +551,4 @@ declare const MonthList: typeof MonthListInner;
|
|
|
472
551
|
*/
|
|
473
552
|
declare function DefaultMonthEvent<T>({ event, mode, isAllDay, ampm, showTime, ellipsizeTitle, allDayLabel, accessibilityLabel: accessibilityLabelProp, cellStyle, onPress, onLongPress }: RenderEventArgs<T>): ReactElement;
|
|
474
553
|
//#endregion
|
|
475
|
-
export {
|
|
554
|
+
export { CalendarTheme as A, RecurrenceFrequency as C, TimeGridMode as D, RenderEventArgs as E, mergeTheme as F, useCalendarTheme as I, PartialCalendarTheme as M, darkTheme as N, WeekStartsOn as O, defaultTheme as P, ICalendarEvent as S, RenderEvent as T, EventAccessibilityLabelContext as _, MonthPager as a, EventDragStartHandler as b, MonthViewProps as c, SlotDefault as d, SlotStyleProps as f, CalendarMode$1 as g, CalendarEvent$1 as h, MonthListSlot as i, CalendarThemeProvider as j, WeekdayFormat$1 as k, MonthViewSlot as l, BusinessHoursBand$1 as m, MonthList as n, MonthPagerProps as o, BusinessHours as p, MonthListProps as r, MonthView as s, DefaultMonthEvent as t, ResolvedSlot as u, EventAccessibilityLabeler$1 as v, RecurrenceRule as w, EventKeyExtractor as x, EventDragHandler as y };
|
|
@@ -111,6 +111,19 @@ declare const CalendarThemeProvider: import("react").Provider<CalendarTheme>;
|
|
|
111
111
|
declare const useCalendarTheme: () => CalendarTheme;
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/types.d.ts
|
|
114
|
+
/**
|
|
115
|
+
* Called when an event is dragged (moved or resized) to new start/end times.
|
|
116
|
+
* Return `false` to reject the drop — the event snaps back to where it started
|
|
117
|
+
* (e.g. to forbid overlaps or out-of-bounds slots). Any other return accepts it.
|
|
118
|
+
*/
|
|
119
|
+
type EventDragHandler<T> = (event: CalendarEvent<T>, start: Date, end: Date) => void | boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Called when a move or resize gesture begins, before any change is committed:
|
|
122
|
+
* on grab for a move (after the long-press), and when the resize drag starts.
|
|
123
|
+
* Handy for haptic feedback (e.g. `expo-haptics`). Requires drag to be enabled
|
|
124
|
+
* via `onDragEvent`.
|
|
125
|
+
*/
|
|
126
|
+
type EventDragStartHandler<T> = (event: CalendarEvent<T>) => void;
|
|
114
127
|
/**
|
|
115
128
|
* Props passed to a {@link RenderEvent} component for one event. Carries the
|
|
116
129
|
* event, the current mode, press handlers, and built-in renderer hints such as
|
|
@@ -289,16 +302,54 @@ type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
289
302
|
keyExtractor: EventKeyExtractor<T>;
|
|
290
303
|
onPressDay?: (date: Date) => void;
|
|
291
304
|
onLongPressDay?: (date: Date) => void;
|
|
305
|
+
/**
|
|
306
|
+
* Tap an empty day cell. Fires alongside `onPressDay` with the same day at
|
|
307
|
+
* midnight, so one handler can create events across month and week/day modes.
|
|
308
|
+
*/
|
|
309
|
+
onPressCell?: (date: Date) => void;
|
|
292
310
|
onPressEvent: (event: CalendarEvent$1<T>) => void;
|
|
293
311
|
onLongPressEvent?: (event: CalendarEvent$1<T>) => void;
|
|
294
312
|
onPressMore?: (events: CalendarEvent$1<T>[], date: Date) => void;
|
|
313
|
+
/**
|
|
314
|
+
* Enable drag-to-create: **long-press an empty day** and sweep across others
|
|
315
|
+
* (**press and drag** on the web), then release to fire this with the **all-day**
|
|
316
|
+
* range — `start` at midnight of the first day, `end` at midnight after the last
|
|
317
|
+
* (exclusive). A sweep that never leaves its day still yields that one day. A
|
|
318
|
+
* plain tap fires `onPressDay`/`onPressCell` instead.
|
|
319
|
+
*/
|
|
320
|
+
onCreateEvent?: (start: Date, end: Date) => void;
|
|
321
|
+
/**
|
|
322
|
+
* Reports the day span of a create sweep **as it happens**, as the ordered
|
|
323
|
+
* inclusive `[start, end]` days (both at midnight), so a selection highlight can
|
|
324
|
+
* follow the drag instead of appearing only on release. Pair it with
|
|
325
|
+
* `useDateRange`'s `selectRange` to drive `selectedRange`. Enables the sweep on
|
|
326
|
+
* its own, so it works without `onCreateEvent`.
|
|
327
|
+
*/
|
|
328
|
+
onSelectDrag?: (start: Date, end: Date) => void;
|
|
329
|
+
/**
|
|
330
|
+
* Enable drag-to-reschedule: **long-press an event bar** and drag it onto
|
|
331
|
+
* another day (**press and drag** on the web). Called on release with the event
|
|
332
|
+
* and its new `start`/`end`, both shifted by the whole days dragged, so the time
|
|
333
|
+
* of day and duration are preserved. Return `false` to reject the drop. Update
|
|
334
|
+
* your own event state in response.
|
|
335
|
+
*/
|
|
336
|
+
onDragEvent?: EventDragHandler<T>;
|
|
337
|
+
/**
|
|
338
|
+
* Fired the instant an event is picked up for a month drag, before anything is
|
|
339
|
+
* committed. Use it for haptic feedback. Inert unless `onDragEvent` is also set.
|
|
340
|
+
*/
|
|
341
|
+
onDragStart?: EventDragStartHandler<T>;
|
|
342
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
343
|
+
eventStartEditable?: boolean;
|
|
344
|
+
/** Reject a drop that would overlap another event (default true = allowed). */
|
|
345
|
+
eventOverlap?: boolean;
|
|
295
346
|
/**
|
|
296
347
|
* Replace the default date badge in each day cell. Receives the day; return
|
|
297
348
|
* your own date label. Event chips and the "+N more" label still render below.
|
|
298
349
|
*/
|
|
299
350
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
300
351
|
};
|
|
301
|
-
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
352
|
+
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, onDragEvent, onDragStart, eventStartEditable, eventOverlap, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
302
353
|
/**
|
|
303
354
|
* A single month rendered as a 7-column grid of day cells, each showing its
|
|
304
355
|
* event chips with a "+N more" overflow. Render it on its own for a static
|
|
@@ -339,20 +390,48 @@ type MonthPagerProps<T> = {
|
|
|
339
390
|
keyExtractor: EventKeyExtractor<T>;
|
|
340
391
|
onPressDay?: (date: Date) => void;
|
|
341
392
|
onLongPressDay?: (date: Date) => void;
|
|
393
|
+
/** Tap an empty day cell; receives the day at midnight. */
|
|
394
|
+
onPressCell?: (date: Date) => void;
|
|
342
395
|
onPressEvent: (event: CalendarEvent$1<T>) => void;
|
|
343
396
|
onLongPressEvent?: (event: CalendarEvent$1<T>) => void;
|
|
344
397
|
onPressMore?: (events: CalendarEvent$1<T>[], date: Date) => void;
|
|
398
|
+
/** Drag across empty day cells to sweep out an all-day span for a new event. */
|
|
399
|
+
onCreateEvent?: (start: Date, end: Date) => void;
|
|
400
|
+
/** Drag-to-select: reports the swept `[start, end]` days live. */
|
|
401
|
+
onSelectDrag?: (start: Date, end: Date) => void;
|
|
402
|
+
/** Days drawn as selected (a filled badge). */
|
|
403
|
+
selectedDates?: Date[];
|
|
404
|
+
/** A selected span: endpoints get a filled badge, the span gets the range band. */
|
|
405
|
+
selectedRange?: DateRange;
|
|
406
|
+
/** Fill the whole cell on selection instead of the default rounded pill band. */
|
|
407
|
+
fillCellOnSelection?: boolean;
|
|
408
|
+
/** Earliest selectable day (inclusive); earlier days render disabled. */
|
|
409
|
+
minDate?: Date;
|
|
410
|
+
/** Latest selectable day (inclusive); later days render disabled. */
|
|
411
|
+
maxDate?: Date;
|
|
412
|
+
/** Return true to render a specific day disabled (dimmed, taps ignored). */
|
|
413
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
414
|
+
/** Drag an event bar onto another day to reschedule it. */
|
|
415
|
+
onDragEvent?: EventDragHandler<T>;
|
|
416
|
+
/** Fired when a month drag picks an event up, before anything is committed. */
|
|
417
|
+
onDragStart?: EventDragStartHandler<T>;
|
|
418
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
419
|
+
eventStartEditable?: boolean;
|
|
420
|
+
/** Reject a drop that would overlap another event (default true = allowed). */
|
|
421
|
+
eventOverlap?: boolean;
|
|
345
422
|
onChangeDate: (date: Date) => void;
|
|
346
423
|
freeSwipe?: boolean;
|
|
347
424
|
swipeEnabled?: boolean;
|
|
348
425
|
showSixWeeks?: boolean;
|
|
426
|
+
/** Render the "MMMM yyyy" title above the weekday header. Default true. */
|
|
427
|
+
showTitle?: boolean;
|
|
349
428
|
activeDate?: Date;
|
|
350
429
|
/** Replace the weekday-label header above the month grid. Receives the week's days. */
|
|
351
430
|
renderHeaderForMonthView?: (weekDays: Date[]) => React.ReactNode;
|
|
352
431
|
/** Replace the default date badge in each day cell. Receives the day. */
|
|
353
432
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
354
433
|
} & SlotStyleProps<MonthViewSlot>;
|
|
355
|
-
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
434
|
+
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onDragEvent, onDragStart, eventStartEditable, eventOverlap, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, showTitle, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
356
435
|
/**
|
|
357
436
|
* A horizontally swipeable month carousel. Swipe left/right to page between
|
|
358
437
|
* months; the committed month is reported through `onChangeDate`. It is the
|
|
@@ -472,4 +551,4 @@ declare const MonthList: typeof MonthListInner;
|
|
|
472
551
|
*/
|
|
473
552
|
declare function DefaultMonthEvent<T>({ event, mode, isAllDay, ampm, showTime, ellipsizeTitle, allDayLabel, accessibilityLabel: accessibilityLabelProp, cellStyle, onPress, onLongPress }: RenderEventArgs<T>): ReactElement;
|
|
474
553
|
//#endregion
|
|
475
|
-
export {
|
|
554
|
+
export { CalendarTheme as A, RecurrenceFrequency as C, TimeGridMode as D, RenderEventArgs as E, mergeTheme as F, useCalendarTheme as I, PartialCalendarTheme as M, darkTheme as N, WeekStartsOn as O, defaultTheme as P, ICalendarEvent as S, RenderEvent as T, EventAccessibilityLabelContext as _, MonthPager as a, EventDragStartHandler as b, MonthViewProps as c, SlotDefault as d, SlotStyleProps as f, CalendarMode$1 as g, CalendarEvent$1 as h, MonthListSlot as i, CalendarThemeProvider as j, WeekdayFormat$1 as k, MonthViewSlot as l, BusinessHoursBand$1 as m, MonthList as n, MonthPagerProps as o, BusinessHours as p, MonthListProps as r, MonthView as s, DefaultMonthEvent as t, ResolvedSlot as u, EventAccessibilityLabeler$1 as v, RecurrenceRule as w, EventKeyExtractor as x, EventDragHandler as y };
|