@super-calendar/native 2.10.0 → 2.11.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/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import { Locale } from "date-fns";
3
3
  import { ComponentType, ReactElement, ReactNode } from "react";
4
4
  import { SharedValue, useSharedValue } from "react-native-reanimated";
5
5
  import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, daySelectionState, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
6
- import { StyleProp, ViewStyle } from "react-native";
6
+ import { ScrollViewProps, StyleProp, ViewStyle } from "react-native";
7
7
  //#region src/components/YearView.d.ts
8
8
  /**
9
9
  * The styleable parts of {@link YearView}. `dayText` and `eventDot` are the
@@ -59,8 +59,10 @@ type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
59
59
  * the last, exclusive). A plain tap still fires `onPressDay`, not this.
60
60
  */
61
61
  onCreateEvent?: (start: Date, end: Date) => void;
62
+ /** Pull-to-refresh control, mounted on the year's scroll view. */
63
+ refreshControl?: ScrollViewProps["refreshControl"];
62
64
  };
63
- declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
65
+ declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, refreshControl, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
64
66
  /**
65
67
  * A year at a glance: the twelve months as compact mini grids, with today
66
68
  * highlighted and a dot under days that hold events. Tap a day or a month
@@ -100,13 +102,15 @@ type AgendaProps<T> = SlotStyleProps<AgendaSlot> & {
100
102
  activeDate?: Date;
101
103
  /** Drawn between rows of the agenda list. */
102
104
  itemSeparatorComponent?: ComponentType<unknown> | null;
105
+ /** Pull-to-refresh control, mounted on the list's scroll view. */
106
+ refreshControl?: ScrollViewProps["refreshControl"];
103
107
  };
104
108
  /**
105
109
  * A vertical, day-grouped list of events (no time grid). Events are sorted by
106
110
  * start, grouped under a date header per day. The consumer controls which
107
111
  * events (and therefore which date range) are shown.
108
112
  */
109
- declare function Agenda<T>({ events, locale, renderEvent, keyExtractor, onPressEvent, onLongPressEvent, onPressDay, activeDate, itemSeparatorComponent, classNames, styles: styleOverrides }: AgendaProps<T>): ReactElement;
113
+ declare function Agenda<T>({ events, locale, renderEvent, keyExtractor, onPressEvent, onLongPressEvent, onPressDay, activeDate, itemSeparatorComponent, refreshControl, classNames, styles: styleOverrides }: AgendaProps<T>): ReactElement;
110
114
  //#endregion
111
115
  //#region src/components/TimeGrid.d.ts
112
116
  /** Default height in pixels of one hour row on the time grid. */
@@ -118,12 +122,12 @@ type HourRenderer = (hour: number, ampm: boolean) => React.ReactNode;
118
122
  * where the structure matches; `columnHeaderDateText`, `weekendShade` and
119
123
  * `daySeparator` are native-only (the dom grid styles those through its
120
124
  * `dayColumn`/`columnHeaderDate` elements). Slots rendered as Reanimated views
121
- * (`gridLines` sub-hour dividers, `businessHours`, `weekendShade`,
122
- * `daySeparator`, `event`, `nowIndicator`, `createGhost`) always honour the
123
- * `styles` map; their `className` reaches the element but needs a Tailwind
124
- * runtime that styles Animated components.
125
+ * (`businessHours`, `weekendShade`, `daySeparator`, `event`,
126
+ * `nowIndicator`, `createGhost`) always honour the `styles` map; their
127
+ * `className` reaches the element but needs a Tailwind runtime that styles
128
+ * Animated components.
125
129
  */
126
- type TimeGridSlot = "header" | "weekNumber" | "columnHeader" | "columnHeaderWeekday" | "columnHeaderDate" | "columnHeaderDateText" | "allDayLane" | "allDayLabel" | "allDayColumn" | "allDayEvent" | "hourLabel" | "gridLines" | "businessHours" | "backgroundEvent" | "weekendShade" | "daySeparator" | "event" | "nowIndicator" | "createGhost";
130
+ type TimeGridSlot = "header" | "weekNumber" | "columnHeader" | "columnHeaderWeekday" | "columnHeaderDate" | "columnHeaderDateText" | "allDayLane" | "allDayLabel" | "allDayColumn" | "allDayEvent" | "hourGutter" | "hourLabel" | "gridLines" | "businessHours" | "backgroundEvent" | "weekendShade" | "daySeparator" | "event" | "nowIndicator" | "createGhost";
127
131
  /** Props for {@link TimeGrid}, the day/week timetable view. */
128
132
  type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
129
133
  mode: TimeGridMode;
@@ -165,6 +169,11 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
165
169
  timeslots?: number;
166
170
  /** Show the all-day lane above the grid. Default true. */
167
171
  showAllDayEventCell?: boolean;
172
+ /** Pull-to-refresh control, mounted on the grid's vertical scroll view. */
173
+ refreshControl?: ScrollViewProps["refreshControl"];
174
+ /** Show the "all-day" text label in the hour column. Default false; the lane
175
+ * still reserves its row, it just isn't labelled. */
176
+ showAllDayLabel?: boolean;
168
177
  /** Tint Saturday/Sunday columns with the weekend background. Default true. Set
169
178
  * false to treat weekends like any other day. */
170
179
  highlightWeekends?: boolean;
@@ -178,6 +187,8 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
178
187
  * band stays non-interactive and hidden from assistive tech.
179
188
  */
180
189
  renderBusinessHours?: (band: BusinessHoursBand) => React.ReactNode;
190
+ /** A component that draws a background event's band; see `Calendar`. */
191
+ renderBackgroundEvent?: RenderEvent<T>;
181
192
  /** Show the ISO week number in the header gutter. Default false. */
182
193
  showWeekNumber?: boolean;
183
194
  /** Element rendered between the day header and the grid. */
@@ -253,7 +264,7 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
253
264
  /** Optional header above the grid (e.g. weekday labels). Rendered full-width. */
254
265
  renderHeader?: (days: Date[]) => React.ReactNode;
255
266
  };
256
- declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events, cellHeight, hourHeight, weekStartsOn, weekdayFormat, renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes, hourColumnWidth: hourColumnWidthProp, hideHours, timeslots, showAllDayEventCell, highlightWeekends, calendarCellStyle, businessHours, renderBusinessHours, showWeekNumber, headerComponent, minHour, maxHour, ampm, isRTL, minHourHeight, maxHourHeight, minEventHeight, eventGap, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, eventStartEditable, eventDurationEditable, eventOverlap, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
267
+ declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events, cellHeight, hourHeight, weekStartsOn, weekdayFormat, renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes, hourColumnWidth: hourColumnWidthProp, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, showWeekNumber, headerComponent, minHour, maxHour, ampm, isRTL, minHourHeight, maxHourHeight, minEventHeight, eventGap, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, eventStartEditable, eventDurationEditable, eventOverlap, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
257
268
  /**
258
269
  * The timetable view used in day, 3days, week, and custom modes: an
259
270
  * hour-by-hour grid with positioned event boxes, an all-day lane, pinch-to-zoom
@@ -433,6 +444,18 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
433
444
  * band stays non-interactive and hidden from assistive tech.
434
445
  */
435
446
  renderBusinessHours?: (band: BusinessHoursBand) => React.ReactNode;
447
+ /**
448
+ * Week/day grid only: a component that draws a `display: "background"` event's
449
+ * band in place of the themed shade. Rendered as a real component, like
450
+ * `renderEvent`, so it may use hooks. It receives `event`, `mode`, a live
451
+ * `boxHeight`, `continuesBefore` / `continuesAfter` for a multi-day event, and
452
+ * `onPress` / `onLongPress`, which fire `onPressEvent` / `onLongPressEvent`.
453
+ * The band lets touches through to what you render and stops hiding itself
454
+ * from assistive tech, so a pressable there works; cell presses and
455
+ * drag-to-create are unreachable underneath it. Without this prop the band
456
+ * stays a shaded, non-interactive range. The resource timeline keeps the shade.
457
+ */
458
+ renderBackgroundEvent?: RenderEvent<T>;
436
459
  /** Stable key per event. Defaults to start-time + index. */
437
460
  keyExtractor?: EventKeyExtractor<T>;
438
461
  /** Partial theme merged over the defaults. */
@@ -460,11 +483,26 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
460
483
  /** Sub-hour divider lines per hour on the week/day grid (e.g. 2 = half-hours). Default 1. */
461
484
  timeslots?: number;
462
485
  /**
463
- * Show the all-day lane above the week/day grid. Default true. When false the
464
- * lane is never rendered, so all-day events (see `ICalendarEvent.allDay` and
465
- * whole-day spans) are not shown on the time grid.
486
+ * Show the all-day lane above the week/day grid. Default true: the lane is
487
+ * sized to the week's all-day events, collapsing to nothing when there are
488
+ * none, and its height follows the week as you swipe. When false the lane is
489
+ * never rendered, so
490
+ * all-day events (see `ICalendarEvent.allDay` and whole-day spans) are not
491
+ * shown on the time grid.
466
492
  */
467
493
  showAllDayEventCell?: boolean;
494
+ /**
495
+ * Show the "all-day" text label in the week/day hour column. Default false: a
496
+ * week with no all-day events then shows no lane at all, rather than a label
497
+ * beside an empty row; with the label on, it slides away with the lane.
498
+ */
499
+ showAllDayLabel?: boolean;
500
+ /**
501
+ * Pull-to-refresh for the modes that scroll vertically: pass a `RefreshControl`
502
+ * element and it wraps the schedule list, the week/day grid's scroll view or
503
+ * the year view. Month pages scroll sideways, so it has no effect there.
504
+ */
505
+ refreshControl?: ScrollViewProps["refreshControl"];
468
506
  /** Tint weekend columns (default true). Set false to treat weekends normally. */
469
507
  highlightWeekends?: boolean;
470
508
  /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
@@ -571,7 +609,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
571
609
  * }
572
610
  * ```
573
611
  */
574
- declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, minEventHeight, eventGap, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, showTitle, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, headerComponent, minHour, maxHour, ampm, showTime, ellipsizeTitle, allDayLabel, scrollOffsetMinutes, showNowIndicator, locale, timeZone, activeDate, isRTL, freeSwipe, renderTimeGridHeader, renderHeaderForMonthView, renderCustomDateForMonth, itemSeparatorComponent, classNames, styles: styleOverrides }: CalendarProps<T>): ReactElement;
612
+ declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, minEventHeight, eventGap, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, showTitle, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, headerComponent, minHour, maxHour, ampm, showTime, ellipsizeTitle, allDayLabel, scrollOffsetMinutes, showNowIndicator, locale, timeZone, activeDate, isRTL, freeSwipe, renderTimeGridHeader, renderHeaderForMonthView, renderCustomDateForMonth, itemSeparatorComponent, classNames, styles: styleOverrides }: CalendarProps<T>): ReactElement;
575
613
  //#endregion
576
614
  //#region src/components/DefaultEvent.d.ts
577
615
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { A as CalendarTheme, C as RecurrenceFrequency, D as TimeGridMode, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, _ as EventAccessibilityLabelContext, a as MonthPager, b as EventDragStartHandler, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as CalendarThemeProvider, k as WeekdayFormat, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RecurrenceRule, x as EventKeyExtractor, y as EventDragHandler } from "./DefaultMonthEvent--9Jg6w-x.js";
2
2
  import { Locale } from "date-fns";
3
3
  import { ComponentType, ReactElement, ReactNode } from "react";
4
- import { StyleProp, ViewStyle } from "react-native";
4
+ import { ScrollViewProps, StyleProp, ViewStyle } from "react-native";
5
5
  import { SharedValue, useSharedValue } from "react-native-reanimated";
6
6
  import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, daySelectionState, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
7
7
  //#region src/components/YearView.d.ts
@@ -59,8 +59,10 @@ type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
59
59
  * the last, exclusive). A plain tap still fires `onPressDay`, not this.
60
60
  */
61
61
  onCreateEvent?: (start: Date, end: Date) => void;
62
+ /** Pull-to-refresh control, mounted on the year's scroll view. */
63
+ refreshControl?: ScrollViewProps["refreshControl"];
62
64
  };
63
- declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
65
+ declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, refreshControl, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
64
66
  /**
65
67
  * A year at a glance: the twelve months as compact mini grids, with today
66
68
  * highlighted and a dot under days that hold events. Tap a day or a month
@@ -100,13 +102,15 @@ type AgendaProps<T> = SlotStyleProps<AgendaSlot> & {
100
102
  activeDate?: Date;
101
103
  /** Drawn between rows of the agenda list. */
102
104
  itemSeparatorComponent?: ComponentType<unknown> | null;
105
+ /** Pull-to-refresh control, mounted on the list's scroll view. */
106
+ refreshControl?: ScrollViewProps["refreshControl"];
103
107
  };
104
108
  /**
105
109
  * A vertical, day-grouped list of events (no time grid). Events are sorted by
106
110
  * start, grouped under a date header per day. The consumer controls which
107
111
  * events (and therefore which date range) are shown.
108
112
  */
109
- declare function Agenda<T>({ events, locale, renderEvent, keyExtractor, onPressEvent, onLongPressEvent, onPressDay, activeDate, itemSeparatorComponent, classNames, styles: styleOverrides }: AgendaProps<T>): ReactElement;
113
+ declare function Agenda<T>({ events, locale, renderEvent, keyExtractor, onPressEvent, onLongPressEvent, onPressDay, activeDate, itemSeparatorComponent, refreshControl, classNames, styles: styleOverrides }: AgendaProps<T>): ReactElement;
110
114
  //#endregion
111
115
  //#region src/components/TimeGrid.d.ts
112
116
  /** Default height in pixels of one hour row on the time grid. */
@@ -118,12 +122,12 @@ type HourRenderer = (hour: number, ampm: boolean) => React.ReactNode;
118
122
  * where the structure matches; `columnHeaderDateText`, `weekendShade` and
119
123
  * `daySeparator` are native-only (the dom grid styles those through its
120
124
  * `dayColumn`/`columnHeaderDate` elements). Slots rendered as Reanimated views
121
- * (`gridLines` sub-hour dividers, `businessHours`, `weekendShade`,
122
- * `daySeparator`, `event`, `nowIndicator`, `createGhost`) always honour the
123
- * `styles` map; their `className` reaches the element but needs a Tailwind
124
- * runtime that styles Animated components.
125
+ * (`businessHours`, `weekendShade`, `daySeparator`, `event`,
126
+ * `nowIndicator`, `createGhost`) always honour the `styles` map; their
127
+ * `className` reaches the element but needs a Tailwind runtime that styles
128
+ * Animated components.
125
129
  */
126
- type TimeGridSlot = "header" | "weekNumber" | "columnHeader" | "columnHeaderWeekday" | "columnHeaderDate" | "columnHeaderDateText" | "allDayLane" | "allDayLabel" | "allDayColumn" | "allDayEvent" | "hourLabel" | "gridLines" | "businessHours" | "backgroundEvent" | "weekendShade" | "daySeparator" | "event" | "nowIndicator" | "createGhost";
130
+ type TimeGridSlot = "header" | "weekNumber" | "columnHeader" | "columnHeaderWeekday" | "columnHeaderDate" | "columnHeaderDateText" | "allDayLane" | "allDayLabel" | "allDayColumn" | "allDayEvent" | "hourGutter" | "hourLabel" | "gridLines" | "businessHours" | "backgroundEvent" | "weekendShade" | "daySeparator" | "event" | "nowIndicator" | "createGhost";
127
131
  /** Props for {@link TimeGrid}, the day/week timetable view. */
128
132
  type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
129
133
  mode: TimeGridMode;
@@ -165,6 +169,11 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
165
169
  timeslots?: number;
166
170
  /** Show the all-day lane above the grid. Default true. */
167
171
  showAllDayEventCell?: boolean;
172
+ /** Pull-to-refresh control, mounted on the grid's vertical scroll view. */
173
+ refreshControl?: ScrollViewProps["refreshControl"];
174
+ /** Show the "all-day" text label in the hour column. Default false; the lane
175
+ * still reserves its row, it just isn't labelled. */
176
+ showAllDayLabel?: boolean;
168
177
  /** Tint Saturday/Sunday columns with the weekend background. Default true. Set
169
178
  * false to treat weekends like any other day. */
170
179
  highlightWeekends?: boolean;
@@ -178,6 +187,8 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
178
187
  * band stays non-interactive and hidden from assistive tech.
179
188
  */
180
189
  renderBusinessHours?: (band: BusinessHoursBand) => React.ReactNode;
190
+ /** A component that draws a background event's band; see `Calendar`. */
191
+ renderBackgroundEvent?: RenderEvent<T>;
181
192
  /** Show the ISO week number in the header gutter. Default false. */
182
193
  showWeekNumber?: boolean;
183
194
  /** Element rendered between the day header and the grid. */
@@ -253,7 +264,7 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
253
264
  /** Optional header above the grid (e.g. weekday labels). Rendered full-width. */
254
265
  renderHeader?: (days: Date[]) => React.ReactNode;
255
266
  };
256
- declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events, cellHeight, hourHeight, weekStartsOn, weekdayFormat, renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes, hourColumnWidth: hourColumnWidthProp, hideHours, timeslots, showAllDayEventCell, highlightWeekends, calendarCellStyle, businessHours, renderBusinessHours, showWeekNumber, headerComponent, minHour, maxHour, ampm, isRTL, minHourHeight, maxHourHeight, minEventHeight, eventGap, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, eventStartEditable, eventDurationEditable, eventOverlap, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
267
+ declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events, cellHeight, hourHeight, weekStartsOn, weekdayFormat, renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes, hourColumnWidth: hourColumnWidthProp, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, showWeekNumber, headerComponent, minHour, maxHour, ampm, isRTL, minHourHeight, maxHourHeight, minEventHeight, eventGap, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, eventStartEditable, eventDurationEditable, eventOverlap, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
257
268
  /**
258
269
  * The timetable view used in day, 3days, week, and custom modes: an
259
270
  * hour-by-hour grid with positioned event boxes, an all-day lane, pinch-to-zoom
@@ -433,6 +444,18 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
433
444
  * band stays non-interactive and hidden from assistive tech.
434
445
  */
435
446
  renderBusinessHours?: (band: BusinessHoursBand) => React.ReactNode;
447
+ /**
448
+ * Week/day grid only: a component that draws a `display: "background"` event's
449
+ * band in place of the themed shade. Rendered as a real component, like
450
+ * `renderEvent`, so it may use hooks. It receives `event`, `mode`, a live
451
+ * `boxHeight`, `continuesBefore` / `continuesAfter` for a multi-day event, and
452
+ * `onPress` / `onLongPress`, which fire `onPressEvent` / `onLongPressEvent`.
453
+ * The band lets touches through to what you render and stops hiding itself
454
+ * from assistive tech, so a pressable there works; cell presses and
455
+ * drag-to-create are unreachable underneath it. Without this prop the band
456
+ * stays a shaded, non-interactive range. The resource timeline keeps the shade.
457
+ */
458
+ renderBackgroundEvent?: RenderEvent<T>;
436
459
  /** Stable key per event. Defaults to start-time + index. */
437
460
  keyExtractor?: EventKeyExtractor<T>;
438
461
  /** Partial theme merged over the defaults. */
@@ -460,11 +483,26 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
460
483
  /** Sub-hour divider lines per hour on the week/day grid (e.g. 2 = half-hours). Default 1. */
461
484
  timeslots?: number;
462
485
  /**
463
- * Show the all-day lane above the week/day grid. Default true. When false the
464
- * lane is never rendered, so all-day events (see `ICalendarEvent.allDay` and
465
- * whole-day spans) are not shown on the time grid.
486
+ * Show the all-day lane above the week/day grid. Default true: the lane is
487
+ * sized to the week's all-day events, collapsing to nothing when there are
488
+ * none, and its height follows the week as you swipe. When false the lane is
489
+ * never rendered, so
490
+ * all-day events (see `ICalendarEvent.allDay` and whole-day spans) are not
491
+ * shown on the time grid.
466
492
  */
467
493
  showAllDayEventCell?: boolean;
494
+ /**
495
+ * Show the "all-day" text label in the week/day hour column. Default false: a
496
+ * week with no all-day events then shows no lane at all, rather than a label
497
+ * beside an empty row; with the label on, it slides away with the lane.
498
+ */
499
+ showAllDayLabel?: boolean;
500
+ /**
501
+ * Pull-to-refresh for the modes that scroll vertically: pass a `RefreshControl`
502
+ * element and it wraps the schedule list, the week/day grid's scroll view or
503
+ * the year view. Month pages scroll sideways, so it has no effect there.
504
+ */
505
+ refreshControl?: ScrollViewProps["refreshControl"];
468
506
  /** Tint weekend columns (default true). Set false to treat weekends normally. */
469
507
  highlightWeekends?: boolean;
470
508
  /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
@@ -571,7 +609,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
571
609
  * }
572
610
  * ```
573
611
  */
574
- declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, minEventHeight, eventGap, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, showTitle, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, headerComponent, minHour, maxHour, ampm, showTime, ellipsizeTitle, allDayLabel, scrollOffsetMinutes, showNowIndicator, locale, timeZone, activeDate, isRTL, freeSwipe, renderTimeGridHeader, renderHeaderForMonthView, renderCustomDateForMonth, itemSeparatorComponent, classNames, styles: styleOverrides }: CalendarProps<T>): ReactElement;
612
+ declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, minEventHeight, eventGap, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, showTitle, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, headerComponent, minHour, maxHour, ampm, showTime, ellipsizeTitle, allDayLabel, scrollOffsetMinutes, showNowIndicator, locale, timeZone, activeDate, isRTL, freeSwipe, renderTimeGridHeader, renderHeaderForMonthView, renderCustomDateForMonth, itemSeparatorComponent, classNames, styles: styleOverrides }: CalendarProps<T>): ReactElement;
575
613
  //#endregion
576
614
  //#region src/components/DefaultEvent.d.ts
577
615
  /**