@super-calendar/native 2.7.0 → 2.8.1

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
@@ -1,8 +1,8 @@
1
- import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, 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 RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-DMOC5aNL.mjs";
1
+ import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, 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 RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-VgJarTO_.mjs";
2
2
  import { Locale } from "date-fns";
3
3
  import { ComponentType, ReactElement, ReactNode } from "react";
4
4
  import { SharedValue, useSharedValue } from "react-native-reanimated";
5
- import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, 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, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
5
+ import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, 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
6
  import { StyleProp, ViewStyle } from "react-native";
7
7
  //#region src/components/YearView.d.ts
8
8
  /**
@@ -201,6 +201,13 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
201
201
  * drag-to-move and drag-to-resize working while hiding the visible indicator.
202
202
  */
203
203
  showDragHandle?: boolean;
204
+ /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
205
+ eventStartEditable?: boolean;
206
+ /** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
207
+ eventDurationEditable?: boolean;
208
+ /** Allow a dragged/resized event to overlap another (default true). Set false to
209
+ * reject a drop that would collide, snapping the event back. */
210
+ eventOverlap?: boolean;
204
211
  onPressEvent: (event: CalendarEvent<T>) => void;
205
212
  onLongPressEvent?: (event: CalendarEvent<T>) => void;
206
213
  /**
@@ -219,7 +226,7 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
219
226
  /** Optional header above the grid (e.g. weekday labels). Rendered full-width. */
220
227
  renderHeader?: (days: Date[]) => React.ReactNode;
221
228
  };
222
- 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, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
229
+ 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, 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;
223
230
  /**
224
231
  * The timetable view used in day, 3days, week, and custom modes: an
225
232
  * hour-by-hour grid with positioned event boxes, an all-day lane, pinch-to-zoom
@@ -388,6 +395,12 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
388
395
  showAllDayEventCell?: boolean;
389
396
  /** Tint weekend columns (default true). Set false to treat weekends normally. */
390
397
  highlightWeekends?: boolean;
398
+ /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
399
+ eventStartEditable?: boolean;
400
+ /** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
401
+ eventDurationEditable?: boolean;
402
+ /** Reject drags/resizes that would overlap another event (default true = allowed). */
403
+ eventOverlap?: boolean;
391
404
  /** Show the ISO week number in the week/day header gutter. Default false. */
392
405
  showWeekNumber?: boolean;
393
406
  /** Prefix for the week-number label (e.g. "W"). Default "W". */
@@ -481,7 +494,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
481
494
  * }
482
495
  * ```
483
496
  */
484
- 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, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, 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;
497
+ 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, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, 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;
485
498
  //#endregion
486
499
  //#region src/components/DefaultEvent.d.ts
487
500
  /**
@@ -603,6 +616,14 @@ interface ResourceTimelineProps<T = unknown> {
603
616
  renderBusinessHours?: (band: BusinessHoursBand$1 & {
604
617
  resource: Resource;
605
618
  }) => ReactNode;
619
+ /**
620
+ * Render each resource's header cell yourself (an avatar, a subtitle, a status
621
+ * dot). Receives the resource and its index; return the cell's content. The board
622
+ * keeps the header cell's sizing so columns stay aligned, so this replaces only
623
+ * the label content. Falls back to the resource title (or id). Applies to both
624
+ * orientations: the top header cells when vertical, the row labels when horizontal.
625
+ */
626
+ renderResourceHeader?: (resource: Resource, index: number) => ReactNode;
606
627
  /** Snap dragged events to this many minutes (default 15). */
607
628
  dragStepMinutes?: number;
608
629
  /** Show the current-time line when `date` is today (default true). */
@@ -630,6 +651,6 @@ interface ResourceTimelineProps<T = unknown> {
630
651
  * />
631
652
  * ```
632
653
  */
633
- declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, dragStepMinutes, showNowIndicator, now: nowProp, timeZone }: ResourceTimelineProps<T>): ReactElement;
654
+ declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, showNowIndicator, now: nowProp, timeZone }: ResourceTimelineProps<T>): ReactElement;
634
655
  //#endregion
635
- export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, 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, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
656
+ export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, 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 MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, 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, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, 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 RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-DCPDsnvq.js";
1
+ import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, 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 RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-CjwX3Nt1.js";
2
2
  import { Locale } from "date-fns";
3
3
  import { ComponentType, ReactElement, ReactNode } from "react";
4
4
  import { StyleProp, ViewStyle } from "react-native";
5
5
  import { SharedValue, useSharedValue } from "react-native-reanimated";
6
- import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, 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, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
6
+ import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, 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
8
8
  /**
9
9
  * The styleable parts of {@link YearView}. `dayText` and `eventDot` are the
@@ -201,6 +201,13 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
201
201
  * drag-to-move and drag-to-resize working while hiding the visible indicator.
202
202
  */
203
203
  showDragHandle?: boolean;
204
+ /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
205
+ eventStartEditable?: boolean;
206
+ /** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
207
+ eventDurationEditable?: boolean;
208
+ /** Allow a dragged/resized event to overlap another (default true). Set false to
209
+ * reject a drop that would collide, snapping the event back. */
210
+ eventOverlap?: boolean;
204
211
  onPressEvent: (event: CalendarEvent<T>) => void;
205
212
  onLongPressEvent?: (event: CalendarEvent<T>) => void;
206
213
  /**
@@ -219,7 +226,7 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
219
226
  /** Optional header above the grid (e.g. weekday labels). Rendered full-width. */
220
227
  renderHeader?: (days: Date[]) => React.ReactNode;
221
228
  };
222
- 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, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
229
+ 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, 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;
223
230
  /**
224
231
  * The timetable view used in day, 3days, week, and custom modes: an
225
232
  * hour-by-hour grid with positioned event boxes, an all-day lane, pinch-to-zoom
@@ -388,6 +395,12 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
388
395
  showAllDayEventCell?: boolean;
389
396
  /** Tint weekend columns (default true). Set false to treat weekends normally. */
390
397
  highlightWeekends?: boolean;
398
+ /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
399
+ eventStartEditable?: boolean;
400
+ /** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
401
+ eventDurationEditable?: boolean;
402
+ /** Reject drags/resizes that would overlap another event (default true = allowed). */
403
+ eventOverlap?: boolean;
391
404
  /** Show the ISO week number in the week/day header gutter. Default false. */
392
405
  showWeekNumber?: boolean;
393
406
  /** Prefix for the week-number label (e.g. "W"). Default "W". */
@@ -481,7 +494,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
481
494
  * }
482
495
  * ```
483
496
  */
484
- 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, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, 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;
497
+ 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, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, 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;
485
498
  //#endregion
486
499
  //#region src/components/DefaultEvent.d.ts
487
500
  /**
@@ -603,6 +616,14 @@ interface ResourceTimelineProps<T = unknown> {
603
616
  renderBusinessHours?: (band: BusinessHoursBand$1 & {
604
617
  resource: Resource;
605
618
  }) => ReactNode;
619
+ /**
620
+ * Render each resource's header cell yourself (an avatar, a subtitle, a status
621
+ * dot). Receives the resource and its index; return the cell's content. The board
622
+ * keeps the header cell's sizing so columns stay aligned, so this replaces only
623
+ * the label content. Falls back to the resource title (or id). Applies to both
624
+ * orientations: the top header cells when vertical, the row labels when horizontal.
625
+ */
626
+ renderResourceHeader?: (resource: Resource, index: number) => ReactNode;
606
627
  /** Snap dragged events to this many minutes (default 15). */
607
628
  dragStepMinutes?: number;
608
629
  /** Show the current-time line when `date` is today (default true). */
@@ -630,6 +651,6 @@ interface ResourceTimelineProps<T = unknown> {
630
651
  * />
631
652
  * ```
632
653
  */
633
- declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, dragStepMinutes, showNowIndicator, now: nowProp, timeZone }: ResourceTimelineProps<T>): ReactElement;
654
+ declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, showNowIndicator, now: nowProp, timeZone }: ResourceTimelineProps<T>): ReactElement;
634
655
  //#endregion
635
- export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, 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, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
656
+ export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, 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 MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, 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, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_MonthList = require("./MonthList-CJs1vq5T.js");
24
+ const require_MonthList = require("./MonthList-C-vBotP0.js");
25
25
  let date_fns = require("date-fns");
26
26
  let react = require("react");
27
27
  let react_native_reanimated = require("react-native-reanimated");
@@ -619,7 +619,7 @@ function DragGhost({ x, y, w, h, visible, event, mode, renderEvent }) {
619
619
  });
620
620
  }
621
621
  const HOUR_LABEL_TOP_INSET = 12;
622
- function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWidth, dayIndex, dayCount, dayOrdinals, mode, daysPerPage, renderEvent, snapMinutes, onPress, onLongPress, onDragEvent, onDragStart, onEdgeAdvance, showDragHandle }) {
622
+ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWidth, dayIndex, dayCount, dayOrdinals, mode, daysPerPage, renderEvent, snapMinutes, onPress, onLongPress, onDragEvent, onDragStart, onEdgeAdvance, showDragHandle, eventStartEditable, eventDurationEditable }) {
623
623
  const RenderEventComponent = renderEvent;
624
624
  const theme = require_MonthList.useCalendarTheme();
625
625
  const slot = require_MonthList.useSlots();
@@ -630,11 +630,15 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
630
630
  const ghostXSV = edgePaging?.ghostX;
631
631
  const ghostYSV = edgePaging?.ghostY;
632
632
  const commitLiftedDrop = edgePaging?.commitLiftedDrop;
633
- const draggable = onDragEvent != null && !positioned.event.disabled && positioned.event.draggable !== false;
634
- const resizable = draggable && !positioned.continuesAfter;
633
+ const editable = onDragEvent != null && !positioned.event.disabled && positioned.event.draggable !== false;
634
+ const canMove = editable && (positioned.event.startEditable ?? eventStartEditable);
635
+ const canResize = editable && (positioned.event.durationEditable ?? eventDurationEditable);
636
+ const resizable = canResize && !positioned.continuesAfter;
637
+ const resizableFromStart = canResize && !positioned.continuesBefore && !isWeb$1;
635
638
  const moveOffset = (0, react_native_reanimated.useSharedValue)(0);
636
639
  const moveOffsetX = (0, react_native_reanimated.useSharedValue)(0);
637
640
  const resizeDelta = (0, react_native_reanimated.useSharedValue)(0);
641
+ const resizeStartDelta = (0, react_native_reanimated.useSharedValue)(0);
638
642
  const dragZ = (0, react_native_reanimated.useSharedValue)(0);
639
643
  const edgeDir = (0, react_native_reanimated.useSharedValue)(0);
640
644
  const lifted = (0, react_native_reanimated.useSharedValue)(0);
@@ -644,9 +648,9 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
644
648
  const liveAbsY = (0, react_native_reanimated.useSharedValue)(0);
645
649
  const startHours = positioned.startHours;
646
650
  const durationHours = positioned.durationHours;
647
- const boxHeight = (0, react_native_reanimated.useDerivedValue)(() => Math.max(durationHours * cellHeight.value + resizeDelta.value, MIN_EVENT_HEIGHT), [durationHours]);
651
+ const boxHeight = (0, react_native_reanimated.useDerivedValue)(() => Math.max(durationHours * cellHeight.value + resizeDelta.value - resizeStartDelta.value, MIN_EVENT_HEIGHT), [durationHours]);
648
652
  const boxStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({
649
- top: (startHours - minHour) * cellHeight.value + moveOffset.value,
653
+ top: (startHours - minHour) * cellHeight.value + moveOffset.value + resizeStartDelta.value,
650
654
  height: boxHeight.value,
651
655
  transform: [{ translateX: moveOffsetX.value }],
652
656
  zIndex: dragZ.value
@@ -659,12 +663,14 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
659
663
  moveOffset.value = 0;
660
664
  moveOffsetX.value = 0;
661
665
  resizeDelta.value = 0;
666
+ resizeStartDelta.value = 0;
662
667
  }, [
663
668
  positioned.startHours,
664
669
  positioned.durationHours,
665
670
  moveOffset,
666
671
  moveOffsetX,
667
- resizeDelta
672
+ resizeDelta,
673
+ resizeStartDelta
668
674
  ]);
669
675
  const latest = (0, react.useRef)({
670
676
  event: positioned.event,
@@ -680,10 +686,12 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
680
686
  moveOffset.value = 0;
681
687
  moveOffsetX.value = 0;
682
688
  resizeDelta.value = 0;
689
+ resizeStartDelta.value = 0;
683
690
  }, [
684
691
  moveOffset,
685
692
  moveOffsetX,
686
- resizeDelta
693
+ resizeDelta,
694
+ resizeStartDelta
687
695
  ]);
688
696
  const commitDrag = (0, react.useCallback)((deltaStartMin, deltaEndMin) => {
689
697
  const { event, onDragEvent: handler } = latest.current;
@@ -739,7 +747,7 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
739
747
  onEdgeAdvance
740
748
  ]);
741
749
  const moveGesture = (0, react.useMemo)(() => {
742
- const pan = react_native_gesture_handler.Gesture.Pan().enabled(draggable).onStart((event) => {
750
+ const pan = react_native_gesture_handler.Gesture.Pan().enabled(canMove).onStart((event) => {
743
751
  dragZ.value = DRAG_EVENT_Z;
744
752
  edgeDir.value = 0;
745
753
  lifted.value = 0;
@@ -794,7 +802,7 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
794
802
  });
795
803
  return isWeb$1 ? pan.activeOffsetX([-8, DRAG_ACTIVATE_PX$1]).activeOffsetY([-8, DRAG_ACTIVATE_PX$1]) : pan.activateAfterLongPress(MOVE_ACTIVATE_MS$1);
796
804
  }, [
797
- draggable,
805
+ canMove,
798
806
  snapMinutes,
799
807
  cellHeight,
800
808
  moveOffset,
@@ -847,19 +855,42 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
847
855
  commitDrag,
848
856
  notifyDragStart
849
857
  ]);
858
+ const resizeStartGesture = (0, react.useMemo)(() => react_native_gesture_handler.Gesture.Pan().enabled(resizableFromStart).onStart(() => {
859
+ dragZ.value = DRAG_EVENT_Z;
860
+ (0, react_native_reanimated.runOnJS)(notifyDragStart)();
861
+ }).onUpdate((event) => {
862
+ resizeStartDelta.value = event.translationY;
863
+ }).onEnd((event) => {
864
+ const delta = (0, _super_calendar_core.snapDeltaMinutes)(event.translationY, cellHeight.value, snapMinutes);
865
+ if (delta === 0) {
866
+ resizeStartDelta.value = 0;
867
+ return;
868
+ }
869
+ resizeStartDelta.value = delta / MINUTES_PER_HOUR$1 * cellHeight.value;
870
+ (0, react_native_reanimated.runOnJS)(commitDrag)(delta, 0);
871
+ }).onFinalize(() => {
872
+ dragZ.value = 0;
873
+ }), [
874
+ resizableFromStart,
875
+ snapMinutes,
876
+ cellHeight,
877
+ resizeStartDelta,
878
+ dragZ,
879
+ commitDrag,
880
+ notifyDragStart
881
+ ]);
850
882
  const handlePress = () => onPress(positioned.event);
851
- const handleLongPress = !draggable && onLongPress ? () => onLongPress(positioned.event) : void 0;
883
+ const handleLongPress = !canMove && onLongPress ? () => onLongPress(positioned.event) : void 0;
852
884
  const unit = (n) => `${n} minute${n === 1 ? "" : "s"}`;
853
885
  const pageUnit = mode === "week" ? "week" : daysPerPage === 1 ? "day" : `${daysPerPage} day${daysPerPage === 1 ? "" : "s"}`;
854
- const accessibilityActions = draggable ? [
855
- {
886
+ const dragActions = [
887
+ ...canMove ? [{
856
888
  name: "move-later",
857
889
  label: `Move ${unit(snapMinutes)} later`
858
- },
859
- {
890
+ }, {
860
891
  name: "move-earlier",
861
892
  label: `Move ${unit(snapMinutes)} earlier`
862
- },
893
+ }] : [],
863
894
  ...resizable ? [{
864
895
  name: "extend",
865
896
  label: `Extend by ${unit(snapMinutes)}`
@@ -867,16 +898,16 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
867
898
  name: "shrink",
868
899
  label: `Shorten by ${unit(snapMinutes)}`
869
900
  }] : [],
870
- {
901
+ ...canMove ? [{
871
902
  name: "move-next-page",
872
903
  label: `Move to next ${pageUnit}`
873
- },
874
- {
904
+ }, {
875
905
  name: "move-previous-page",
876
906
  label: `Move to previous ${pageUnit}`
877
- }
878
- ] : void 0;
879
- const handleAccessibilityAction = draggable ? (e) => {
907
+ }] : []
908
+ ];
909
+ const accessibilityActions = dragActions.length ? dragActions : void 0;
910
+ const handleAccessibilityAction = accessibilityActions ? (e) => {
880
911
  switch (e.nativeEvent.actionName) {
881
912
  case "move-later":
882
913
  commitDrag(snapMinutes, snapMinutes);
@@ -908,25 +939,35 @@ function AnimatedEventBox({ positioned, cellHeight, minHour, left, width, dayWid
908
939
  const box = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native_reanimated.default.View, {
909
940
  ...eventSlot,
910
941
  style: [eventSlot.style, boxStyle],
911
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderEventComponent, {
912
- event: positioned.event,
913
- mode,
914
- boxHeight,
915
- continuesBefore: positioned.continuesBefore,
916
- continuesAfter: positioned.continuesAfter,
917
- accessibilityActions,
918
- onAccessibilityAction: handleAccessibilityAction,
919
- onPress: handlePress,
920
- onLongPress: handleLongPress
921
- }), resizable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_gesture_handler.GestureDetector, {
922
- gesture: resizeGesture,
923
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
924
- style: styles$1.resizeHandle,
925
- children: showDragHandle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, { style: [styles$1.resizeGrip, { backgroundColor: theme.colors.eventText }] }) : null
926
- })
927
- }) : null]
942
+ children: [
943
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderEventComponent, {
944
+ event: positioned.event,
945
+ mode,
946
+ boxHeight,
947
+ continuesBefore: positioned.continuesBefore,
948
+ continuesAfter: positioned.continuesAfter,
949
+ accessibilityActions,
950
+ onAccessibilityAction: handleAccessibilityAction,
951
+ onPress: handlePress,
952
+ onLongPress: handleLongPress
953
+ }),
954
+ resizableFromStart ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_gesture_handler.GestureDetector, {
955
+ gesture: resizeStartGesture,
956
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
957
+ style: styles$1.resizeHandleTop,
958
+ children: showDragHandle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, { style: [styles$1.resizeGrip, { backgroundColor: theme.colors.eventText }] }) : null
959
+ })
960
+ }) : null,
961
+ resizable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_gesture_handler.GestureDetector, {
962
+ gesture: resizeGesture,
963
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
964
+ style: styles$1.resizeHandle,
965
+ children: showDragHandle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, { style: [styles$1.resizeGrip, { backgroundColor: theme.colors.eventText }] }) : null
966
+ })
967
+ }) : null
968
+ ]
928
969
  });
929
- if (!draggable) return box;
970
+ if (!canMove) return box;
930
971
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_gesture_handler.GestureDetector, {
931
972
  gesture: moveGesture,
932
973
  children: box
@@ -1029,7 +1070,7 @@ const ShadeBand = ({ cellHeight, startHour, endHour, minHour, left, width, color
1029
1070
  children
1030
1071
  });
1031
1072
  };
1032
- function TimetablePageInner({ mode, numberOfDays, hiddenDays, now: nowProp, nowTimeZone, date, events, cellHeight, hourHeight, committedCellHeight, scrollY, isActive, initialScrollY, onSettleOffset, weekStartsOn, weekEndsOn, width, hourColumnWidth, minHour, maxHour, ampm, timeslots, isRTL, showAllDayEventCell, highlightWeekends, showVerticalScrollIndicator, verticalScrollEnabled, hourComponent, calendarCellStyle, minHourHeight, maxHourHeight, showNowIndicator, businessHours, renderBusinessHours, renderEvent, keyExtractor, snapMinutes, showDragHandle, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onEdgeAdvance, onGridTop }) {
1073
+ function TimetablePageInner({ mode, numberOfDays, hiddenDays, now: nowProp, nowTimeZone, date, events, cellHeight, hourHeight, committedCellHeight, scrollY, isActive, initialScrollY, onSettleOffset, weekStartsOn, weekEndsOn, width, hourColumnWidth, minHour, maxHour, ampm, timeslots, isRTL, showAllDayEventCell, highlightWeekends, showVerticalScrollIndicator, verticalScrollEnabled, hourComponent, calendarCellStyle, minHourHeight, maxHourHeight, showNowIndicator, businessHours, renderBusinessHours, renderEvent, keyExtractor, snapMinutes, showDragHandle, eventStartEditable, eventDurationEditable, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onEdgeAdvance, onGridTop }) {
1033
1074
  const theme = require_MonthList.useCalendarTheme();
1034
1075
  const slot = require_MonthList.useSlots();
1035
1076
  const scrollRef = (0, react_native_reanimated.useAnimatedRef)();
@@ -1413,6 +1454,8 @@ function TimetablePageInner({ mode, numberOfDays, hiddenDays, now: nowProp, nowT
1413
1454
  renderEvent,
1414
1455
  snapMinutes,
1415
1456
  showDragHandle,
1457
+ eventStartEditable,
1458
+ eventDurationEditable,
1416
1459
  onPress: onPressEvent,
1417
1460
  onLongPress: onLongPressEvent,
1418
1461
  onDragEvent,
@@ -1439,7 +1482,7 @@ function TimetablePageInner({ mode, numberOfDays, hiddenDays, now: nowProp, nowT
1439
1482
  });
1440
1483
  }
1441
1484
  const TimetablePage = (0, react.memo)(TimetablePageInner);
1442
- function TimeGridInner({ mode, numberOfDays = 1, weekEndsOn, date, events, cellHeight, hourHeight = 48, weekStartsOn, weekdayFormat = "short", renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes = 0, hourColumnWidth: hourColumnWidthProp = DEFAULT_HOUR_COLUMN_WIDTH, hideHours = false, timeslots = 1, showAllDayEventCell = true, highlightWeekends = true, calendarCellStyle, businessHours, renderBusinessHours, showWeekNumber = false, headerComponent, minHour = 0, maxHour = HOURS_PER_DAY, ampm = false, isRTL = false, minHourHeight = DEFAULT_MIN_HOUR_HEIGHT, maxHourHeight = DEFAULT_MAX_HOUR_HEIGHT, showNowIndicator = true, locale, freeSwipe = false, swipeEnabled = true, showVerticalScrollIndicator = true, verticalScrollEnabled = true, weekNumberPrefix = "W", hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell = false, dragStepMinutes = DEFAULT_DRAG_STEP_MINUTES, showDragHandle = true, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }) {
1485
+ function TimeGridInner({ mode, numberOfDays = 1, weekEndsOn, date, events, cellHeight, hourHeight = 48, weekStartsOn, weekdayFormat = "short", renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes = 0, hourColumnWidth: hourColumnWidthProp = DEFAULT_HOUR_COLUMN_WIDTH, hideHours = false, timeslots = 1, showAllDayEventCell = true, highlightWeekends = true, calendarCellStyle, businessHours, renderBusinessHours, showWeekNumber = false, headerComponent, minHour = 0, maxHour = HOURS_PER_DAY, ampm = false, isRTL = false, minHourHeight = DEFAULT_MIN_HOUR_HEIGHT, maxHourHeight = DEFAULT_MAX_HOUR_HEIGHT, showNowIndicator = true, locale, freeSwipe = false, swipeEnabled = true, showVerticalScrollIndicator = true, verticalScrollEnabled = true, weekNumberPrefix = "W", hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell = false, dragStepMinutes = DEFAULT_DRAG_STEP_MINUTES, showDragHandle = true, eventStartEditable = true, eventDurationEditable = true, eventOverlap = true, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }) {
1443
1486
  const clampedMinHour = Math.max(0, Math.min(minHour, HOURS_PER_DAY - 1));
1444
1487
  const clampedMaxHour = Math.max(clampedMinHour + 1, Math.min(maxHour, HOURS_PER_DAY));
1445
1488
  const hourColumnWidth = hideHours ? 0 : hourColumnWidthProp;
@@ -1448,6 +1491,14 @@ function TimeGridInner({ mode, numberOfDays = 1, weekEndsOn, date, events, cellH
1448
1491
  eventAccessibilityLabel,
1449
1492
  ampm
1450
1493
  ]);
1494
+ const onDragEvent = (0, react.useMemo)(() => {
1495
+ if (!onDragEventProp || eventOverlap !== false) return onDragEventProp;
1496
+ return (event, start, end) => (0, _super_calendar_core.overlapsOtherEvents)(events, event, start, end) ? false : onDragEventProp(event, start, end);
1497
+ }, [
1498
+ onDragEventProp,
1499
+ eventOverlap,
1500
+ events
1501
+ ]);
1451
1502
  const { width, height } = (0, react_native.useWindowDimensions)();
1452
1503
  const listRef = (0, react.useRef)(null);
1453
1504
  const pagerRef = (0, react.useRef)(null);
@@ -1740,6 +1791,8 @@ function TimeGridInner({ mode, numberOfDays = 1, weekEndsOn, date, events, cellH
1740
1791
  keyExtractor,
1741
1792
  snapMinutes: Math.max(1, dragStepMinutes),
1742
1793
  showDragHandle,
1794
+ eventStartEditable,
1795
+ eventDurationEditable,
1743
1796
  onPressEvent,
1744
1797
  onLongPressEvent,
1745
1798
  onDragEvent,
@@ -1786,6 +1839,8 @@ function TimeGridInner({ mode, numberOfDays = 1, weekEndsOn, date, events, cellH
1786
1839
  keyExtractor,
1787
1840
  dragStepMinutes,
1788
1841
  showDragHandle,
1842
+ eventStartEditable,
1843
+ eventDurationEditable,
1789
1844
  onPressEvent,
1790
1845
  onLongPressEvent,
1791
1846
  onDragEvent,
@@ -2041,6 +2096,15 @@ const styles$1 = react_native.StyleSheet.create({
2041
2096
  alignItems: "center",
2042
2097
  justifyContent: "center"
2043
2098
  },
2099
+ resizeHandleTop: {
2100
+ position: "absolute",
2101
+ left: 0,
2102
+ right: 0,
2103
+ top: 0,
2104
+ height: RESIZE_HANDLE_HEIGHT,
2105
+ alignItems: "center",
2106
+ justifyContent: "center"
2107
+ },
2044
2108
  resizeGrip: {
2045
2109
  width: 24,
2046
2110
  height: 3,
@@ -2107,7 +2171,7 @@ function expansionRange(mode, date, weekStartsOn, numberOfDays, weekEndsOn) {
2107
2171
  * }
2108
2172
  * ```
2109
2173
  */
2110
- function Calendar({ 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 = 0, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent = DefaultEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor = defaultKeyExtractor, theme, cellHeight: cellHeightProp, hourHeight = 48, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, 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 }) {
2174
+ function Calendar({ 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 = 0, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent = DefaultEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, keyExtractor = defaultKeyExtractor, theme, cellHeight: cellHeightProp, hourHeight = 48, minHourHeight, maxHourHeight, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, 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 }) {
2111
2175
  const mergedTheme = (0, react.useMemo)(() => require_MonthList.mergeTheme(theme), [theme]);
2112
2176
  const internalCellHeight = (0, react_native_reanimated.useSharedValue)(hourHeight);
2113
2177
  const cellHeight = cellHeightProp ?? internalCellHeight;
@@ -2190,6 +2254,7 @@ function Calendar({ events, mode, date, onChangeDate, onChangeDateRange, onPress
2190
2254
  sortedMonthView,
2191
2255
  moreLabel,
2192
2256
  showAdjacentMonths,
2257
+ highlightWeekends,
2193
2258
  disableMonthEventCellPress,
2194
2259
  isRTL,
2195
2260
  showSixWeeks,
@@ -2253,6 +2318,9 @@ function Calendar({ events, mode, date, onChangeDate, onChangeDateRange, onPress
2253
2318
  timeslots,
2254
2319
  showAllDayEventCell,
2255
2320
  highlightWeekends,
2321
+ eventStartEditable,
2322
+ eventDurationEditable,
2323
+ eventOverlap,
2256
2324
  calendarCellStyle,
2257
2325
  businessHours,
2258
2326
  renderBusinessHours,
@@ -2663,7 +2731,7 @@ function LaneInteractionLayer({ resource, vertical, hourSize, startHour, date, s
2663
2731
  * />
2664
2732
  * ```
2665
2733
  */
2666
- function ResourceTimeline({ date, orientation = "horizontal", resources: allResources, resourcesPerPage, resourcePage = 0, events, resourceId = (event) => event.resourceId, startHour = 0, endHour = 24, hourWidth = 80, hourHeight = 48, rowHeight = 56, labelWidth = 140, ampm = false, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, dragStepMinutes = 15, showNowIndicator = true, now: nowProp, timeZone }) {
2734
+ function ResourceTimeline({ date, orientation = "horizontal", resources: allResources, resourcesPerPage, resourcePage = 0, events, resourceId = (event) => event.resourceId, startHour = 0, endHour = 24, hourWidth = 80, hourHeight = 48, rowHeight = 56, labelWidth = 140, ampm = false, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes = 15, showNowIndicator = true, now: nowProp, timeZone }) {
2667
2735
  const theme = require_MonthList.useCalendarTheme();
2668
2736
  const resources = (0, react.useMemo)(() => {
2669
2737
  if (!resourcesPerPage || resourcesPerPage <= 0) return allResources;
@@ -2735,9 +2803,9 @@ function ResourceTimeline({ date, orientation = "horizontal", resources: allReso
2735
2803
  style: styles.vroot,
2736
2804
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.View, {
2737
2805
  style: [styles.header, { borderBottomColor: theme.colors.gridLine }],
2738
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, { style: { width: GUTTER_WIDTH } }), resources.map((resource) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
2806
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, { style: { width: GUTTER_WIDTH } }), resources.map((resource, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
2739
2807
  style: [styles.vheaderCell, theme.containers.resourceLabel],
2740
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
2808
+ children: renderResourceHeader ? renderResourceHeader(resource, index) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
2741
2809
  numberOfLines: 1,
2742
2810
  style: [styles.vheaderText, { color: theme.colors.text }],
2743
2811
  allowFontScaling: false,
@@ -2921,7 +2989,7 @@ function ResourceTimeline({ date, orientation = "horizontal", resources: allReso
2921
2989
  },
2922
2990
  theme.containers.resourceLabel
2923
2991
  ],
2924
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
2992
+ children: renderResourceHeader ? renderResourceHeader(resource, laneIndex) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
2925
2993
  numberOfLines: 1,
2926
2994
  style: { color: theme.colors.text },
2927
2995
  allowFontScaling: false,
@@ -3264,6 +3332,12 @@ Object.defineProperty(exports, "layoutDayEvents", {
3264
3332
  return _super_calendar_core.layoutDayEvents;
3265
3333
  }
3266
3334
  });
3335
+ Object.defineProperty(exports, "layoutMonthWeek", {
3336
+ enumerable: true,
3337
+ get: function() {
3338
+ return _super_calendar_core.layoutMonthWeek;
3339
+ }
3340
+ });
3267
3341
  exports.mergeTheme = require_MonthList.mergeTheme;
3268
3342
  Object.defineProperty(exports, "minutesIntoDay", {
3269
3343
  enumerable: true,