@super-calendar/native 2.4.0 → 2.6.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
@@ -4,6 +4,53 @@ import { ComponentType, ReactElement } from "react";
4
4
  import { SharedValue, useSharedValue } from "react-native-reanimated";
5
5
  import { CalendarEvent as CalendarEvent$1, DateRange, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, PositionedEvent, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekdayFormat as WeekdayFormat$1, buildMonthGrid, buildMonthWeeks, daySelectionState, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useMonthGrid, weekdayFormatToken } from "@super-calendar/core";
6
6
  import { StyleProp, ViewStyle } from "react-native";
7
+ //#region src/components/YearView.d.ts
8
+ /**
9
+ * The styleable parts of {@link YearView}. `dayText` and `eventDot` are the
10
+ * text/marker inside a day cell (React Native text colour doesn't inherit).
11
+ */
12
+ type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "dayText" | "eventDot";
13
+ /** Props for {@link YearView}, the twelve mini-month year grid. */
14
+ type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
15
+ /** Any date inside the year to render. */
16
+ date: Date;
17
+ /** Days holding at least one event get a dot. Omit for a plain year. */
18
+ events?: CalendarEvent<T>[];
19
+ weekStartsOn: WeekStartsOn;
20
+ locale?: Locale;
21
+ /** Highlight this date instead of the real "today". */
22
+ activeDate?: Date;
23
+ /**
24
+ * Smallest width a mini month may take before the grid drops a column
25
+ * (default 150). The grid fits 2–4 columns from the measured width.
26
+ */
27
+ minMonthWidth?: number;
28
+ /** Tap a day cell (e.g. to drill into the day or month view). */
29
+ onPressDay?: (date: Date) => void;
30
+ /** Tap a month's title (e.g. to jump to that month's view). */
31
+ onPressMonth?: (month: Date) => void;
32
+ };
33
+ declare function YearViewInner<T>({ date, events, weekStartsOn, locale, activeDate, minMonthWidth, onPressDay, onPressMonth, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
34
+ /**
35
+ * A year at a glance: the twelve months as compact mini grids, with today
36
+ * highlighted and a dot under days that hold events. Tap a day or a month
37
+ * title to drill into a denser view. It's the view `Calendar` renders for
38
+ * `mode="year"`.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * import { YearView } from "@super-calendar/native";
43
+ *
44
+ * <YearView
45
+ * date={new Date()}
46
+ * events={events}
47
+ * weekStartsOn={1}
48
+ * onPressDay={(day) => console.log(day)}
49
+ * />
50
+ * ```
51
+ */
52
+ declare const YearView: typeof YearViewInner;
53
+ //#endregion
7
54
  //#region src/components/Agenda.d.ts
8
55
  /**
9
56
  * The styleable parts of {@link Agenda}. Mirrors the dom renderer's slot names;
@@ -182,7 +229,7 @@ declare const TimeGrid: typeof TimeGridInner;
182
229
  * month pager, the grid slots reach the time grid, and the agenda slots reach
183
230
  * the schedule view; slots for views that aren't rendered are ignored.
184
231
  */
185
- type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot;
232
+ type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot | YearViewSlot;
186
233
  /** Props for the {@link Calendar} component. */
187
234
  type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
188
235
  events: CalendarEvent<T>[];
@@ -217,8 +264,10 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
217
264
  * drag-to-move and drag-to-resize working while hiding the visible indicator.
218
265
  */
219
266
  showDragHandle?: boolean;
220
- /** Tap a day cell (month mode) — e.g. drill into the day view. */
267
+ /** Tap a day cell (month and year modes) — e.g. drill into the day view. */
221
268
  onPressDay?: (date: Date) => void;
269
+ /** Tap a month's title in the year view — e.g. jump to that month. */
270
+ onPressMonth?: (month: Date) => void;
222
271
  /** Long-press a day cell (month mode). */
223
272
  onLongPressDay?: (date: Date) => void;
224
273
  /** Tap the "+N more" overflow label in a month cell. */
@@ -397,7 +446,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
397
446
  * }
398
447
  * ```
399
448
  */
400
- declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, 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;
449
+ declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, 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;
401
450
  //#endregion
402
451
  //#region src/components/DefaultEvent.d.ts
403
452
  /**
@@ -465,12 +514,38 @@ interface ResourceTimelineProps<T = unknown> {
465
514
  renderEvent?: ComponentType<ResourceEventArgs<T>>;
466
515
  /** Tap an event. */
467
516
  onPressEvent?: (event: CalendarEvent$1<T>) => void;
517
+ /**
518
+ * Long-press an event. When `onDragEvent` is also set, a long-press picks the
519
+ * bar up to move instead, so this fires only for non-draggable bars.
520
+ */
521
+ onLongPressEvent?: (event: CalendarEvent$1<T>) => void;
468
522
  /**
469
523
  * Enables drag-to-move and edge-resize along the time axis: long-press a bar to
470
524
  * move it, or drag its right edge to resize. Called with the proposed new
471
525
  * start/end; return `false` to reject the drop (it snaps back).
472
526
  */
473
527
  onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
528
+ /** Tap empty lane space; called with the snapped time and the lane's resource. */
529
+ onPressCell?: (at: Date, resource: Resource) => void;
530
+ /**
531
+ * Long-press empty lane space. When `onCreateEvent` is also set, the long-press
532
+ * starts the create drag instead, so this fires only without it.
533
+ */
534
+ onLongPressCell?: (at: Date, resource: Resource) => void;
535
+ /**
536
+ * Long-press empty lane space, then drag along the time axis to sweep out a new
537
+ * event; called with the swept start/end and the lane's resource.
538
+ */
539
+ onCreateEvent?: (start: Date, end: Date, resource: Resource) => void;
540
+ /**
541
+ * Shade the hours outside this window, per lane. Same shape as the Calendar's
542
+ * `businessHours` plus the lane's resource, so per-resource opening hours work
543
+ * (return `null` for a fully closed lane). A date-only function is accepted.
544
+ */
545
+ businessHours?: (date: Date, resource: Resource) => {
546
+ start: number;
547
+ end: number;
548
+ } | null;
474
549
  /** Snap dragged events to this many minutes (default 15). */
475
550
  dragStepMinutes?: number;
476
551
  }
@@ -492,6 +567,6 @@ interface ResourceTimelineProps<T = unknown> {
492
567
  * />
493
568
  * ```
494
569
  */
495
- declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onDragEvent, dragStepMinutes }: ResourceTimelineProps<T>): ReactElement;
570
+ declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, dragStepMinutes }: ResourceTimelineProps<T>): ReactElement;
496
571
  //#endregion
497
- export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, type CalendarTheme, CalendarThemeProvider, DEFAULT_HOUR_HEIGHT, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultEvent, DefaultMonthEvent, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalEvent, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type SlotDefault, type SlotStyleProps, TimeGrid, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useMonthGrid, weekdayFormatToken };
572
+ export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, type CalendarTheme, CalendarThemeProvider, DEFAULT_HOUR_HEIGHT, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultEvent, DefaultMonthEvent, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalEvent, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type SlotDefault, type SlotStyleProps, TimeGrid, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, YearView, type YearViewProps, type YearViewSlot, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useMonthGrid, weekdayFormatToken };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,53 @@ import { ComponentType, ReactElement } from "react";
4
4
  import { StyleProp, ViewStyle } from "react-native";
5
5
  import { SharedValue, useSharedValue } from "react-native-reanimated";
6
6
  import { CalendarEvent as CalendarEvent$1, DateRange, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, PositionedEvent, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekdayFormat as WeekdayFormat$1, buildMonthGrid, buildMonthWeeks, daySelectionState, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useMonthGrid, weekdayFormatToken } from "@super-calendar/core";
7
+ //#region src/components/YearView.d.ts
8
+ /**
9
+ * The styleable parts of {@link YearView}. `dayText` and `eventDot` are the
10
+ * text/marker inside a day cell (React Native text colour doesn't inherit).
11
+ */
12
+ type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "dayText" | "eventDot";
13
+ /** Props for {@link YearView}, the twelve mini-month year grid. */
14
+ type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
15
+ /** Any date inside the year to render. */
16
+ date: Date;
17
+ /** Days holding at least one event get a dot. Omit for a plain year. */
18
+ events?: CalendarEvent<T>[];
19
+ weekStartsOn: WeekStartsOn;
20
+ locale?: Locale;
21
+ /** Highlight this date instead of the real "today". */
22
+ activeDate?: Date;
23
+ /**
24
+ * Smallest width a mini month may take before the grid drops a column
25
+ * (default 150). The grid fits 2–4 columns from the measured width.
26
+ */
27
+ minMonthWidth?: number;
28
+ /** Tap a day cell (e.g. to drill into the day or month view). */
29
+ onPressDay?: (date: Date) => void;
30
+ /** Tap a month's title (e.g. to jump to that month's view). */
31
+ onPressMonth?: (month: Date) => void;
32
+ };
33
+ declare function YearViewInner<T>({ date, events, weekStartsOn, locale, activeDate, minMonthWidth, onPressDay, onPressMonth, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
34
+ /**
35
+ * A year at a glance: the twelve months as compact mini grids, with today
36
+ * highlighted and a dot under days that hold events. Tap a day or a month
37
+ * title to drill into a denser view. It's the view `Calendar` renders for
38
+ * `mode="year"`.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * import { YearView } from "@super-calendar/native";
43
+ *
44
+ * <YearView
45
+ * date={new Date()}
46
+ * events={events}
47
+ * weekStartsOn={1}
48
+ * onPressDay={(day) => console.log(day)}
49
+ * />
50
+ * ```
51
+ */
52
+ declare const YearView: typeof YearViewInner;
53
+ //#endregion
7
54
  //#region src/components/Agenda.d.ts
8
55
  /**
9
56
  * The styleable parts of {@link Agenda}. Mirrors the dom renderer's slot names;
@@ -182,7 +229,7 @@ declare const TimeGrid: typeof TimeGridInner;
182
229
  * month pager, the grid slots reach the time grid, and the agenda slots reach
183
230
  * the schedule view; slots for views that aren't rendered are ignored.
184
231
  */
185
- type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot;
232
+ type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot | YearViewSlot;
186
233
  /** Props for the {@link Calendar} component. */
187
234
  type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
188
235
  events: CalendarEvent<T>[];
@@ -217,8 +264,10 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
217
264
  * drag-to-move and drag-to-resize working while hiding the visible indicator.
218
265
  */
219
266
  showDragHandle?: boolean;
220
- /** Tap a day cell (month mode) — e.g. drill into the day view. */
267
+ /** Tap a day cell (month and year modes) — e.g. drill into the day view. */
221
268
  onPressDay?: (date: Date) => void;
269
+ /** Tap a month's title in the year view — e.g. jump to that month. */
270
+ onPressMonth?: (month: Date) => void;
222
271
  /** Long-press a day cell (month mode). */
223
272
  onLongPressDay?: (date: Date) => void;
224
273
  /** Tap the "+N more" overflow label in a month cell. */
@@ -397,7 +446,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
397
446
  * }
398
447
  * ```
399
448
  */
400
- declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, 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;
449
+ declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, 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;
401
450
  //#endregion
402
451
  //#region src/components/DefaultEvent.d.ts
403
452
  /**
@@ -465,12 +514,38 @@ interface ResourceTimelineProps<T = unknown> {
465
514
  renderEvent?: ComponentType<ResourceEventArgs<T>>;
466
515
  /** Tap an event. */
467
516
  onPressEvent?: (event: CalendarEvent$1<T>) => void;
517
+ /**
518
+ * Long-press an event. When `onDragEvent` is also set, a long-press picks the
519
+ * bar up to move instead, so this fires only for non-draggable bars.
520
+ */
521
+ onLongPressEvent?: (event: CalendarEvent$1<T>) => void;
468
522
  /**
469
523
  * Enables drag-to-move and edge-resize along the time axis: long-press a bar to
470
524
  * move it, or drag its right edge to resize. Called with the proposed new
471
525
  * start/end; return `false` to reject the drop (it snaps back).
472
526
  */
473
527
  onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
528
+ /** Tap empty lane space; called with the snapped time and the lane's resource. */
529
+ onPressCell?: (at: Date, resource: Resource) => void;
530
+ /**
531
+ * Long-press empty lane space. When `onCreateEvent` is also set, the long-press
532
+ * starts the create drag instead, so this fires only without it.
533
+ */
534
+ onLongPressCell?: (at: Date, resource: Resource) => void;
535
+ /**
536
+ * Long-press empty lane space, then drag along the time axis to sweep out a new
537
+ * event; called with the swept start/end and the lane's resource.
538
+ */
539
+ onCreateEvent?: (start: Date, end: Date, resource: Resource) => void;
540
+ /**
541
+ * Shade the hours outside this window, per lane. Same shape as the Calendar's
542
+ * `businessHours` plus the lane's resource, so per-resource opening hours work
543
+ * (return `null` for a fully closed lane). A date-only function is accepted.
544
+ */
545
+ businessHours?: (date: Date, resource: Resource) => {
546
+ start: number;
547
+ end: number;
548
+ } | null;
474
549
  /** Snap dragged events to this many minutes (default 15). */
475
550
  dragStepMinutes?: number;
476
551
  }
@@ -492,6 +567,6 @@ interface ResourceTimelineProps<T = unknown> {
492
567
  * />
493
568
  * ```
494
569
  */
495
- declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onDragEvent, dragStepMinutes }: ResourceTimelineProps<T>): ReactElement;
570
+ declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, dragStepMinutes }: ResourceTimelineProps<T>): ReactElement;
496
571
  //#endregion
497
- export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, type CalendarTheme, CalendarThemeProvider, DEFAULT_HOUR_HEIGHT, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultEvent, DefaultMonthEvent, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalEvent, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type SlotDefault, type SlotStyleProps, TimeGrid, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useMonthGrid, weekdayFormatToken };
572
+ export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, type CalendarTheme, CalendarThemeProvider, DEFAULT_HOUR_HEIGHT, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultEvent, DefaultMonthEvent, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalEvent, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type SlotDefault, type SlotStyleProps, TimeGrid, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, YearView, type YearViewProps, type YearViewSlot, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useMonthGrid, weekdayFormatToken };