@super-calendar/dom 2.7.0 → 2.8.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 +32 -6
- package/dist/index.d.ts +32 -6
- package/dist/index.js +356 -248
- package/dist/index.mjs +352 -250
- package/package.json +2 -2
- package/src/Calendar.tsx +12 -0
- package/src/MonthView.tsx +392 -257
- package/src/ResourceTimeline.tsx +17 -4
- package/src/TimeGrid.tsx +66 -10
- package/src/index.ts +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
2
|
import { CSSProperties, ComponentType, ReactElement, ReactNode } from "react";
|
|
3
|
-
import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, ICalendarEvent, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, PositionedEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, daySelectionState, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
|
|
3
|
+
import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, ICalendarEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, daySelectionState, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
|
|
4
4
|
//#region src/slots.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Per-slot styling overrides. Give a slot a Tailwind/CSS class and/or an inline
|
|
@@ -203,7 +203,12 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
|
|
|
203
203
|
* announce. Defaults to the event title and day (e.g. "Standup, 15 July").
|
|
204
204
|
*/
|
|
205
205
|
eventAccessibilityLabel?: EventAccessibilityLabeler$1<T>;
|
|
206
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* Max event lanes (stacked rows) shown per week before the rest of a day's
|
|
208
|
+
* events collapse into a "+N more" row (default 3). Because multi-day events draw
|
|
209
|
+
* as one bar spanning a lane across the week, this caps lanes per row, not chips
|
|
210
|
+
* per day, so a long bar can push a lightly-booked day's own events into "+N more".
|
|
211
|
+
*/
|
|
207
212
|
maxVisibleEventCount?: number;
|
|
208
213
|
/** Template for the overflow row; `{moreCount}` is replaced (default "{moreCount} More"). */
|
|
209
214
|
moreLabel?: string;
|
|
@@ -354,6 +359,13 @@ interface TimeGridProps<T = unknown> extends SlotStyleProps<TimeGridSlot> {
|
|
|
354
359
|
/** Tint Saturday/Sunday columns with the weekend background (default true). Set
|
|
355
360
|
* false to treat weekends like any other day. */
|
|
356
361
|
highlightWeekends?: boolean;
|
|
362
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
363
|
+
eventStartEditable?: boolean;
|
|
364
|
+
/** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
|
|
365
|
+
eventDurationEditable?: boolean;
|
|
366
|
+
/** Allow a dragged/resized event to overlap another (default true). Set false to
|
|
367
|
+
* reject a drop that would collide, snapping the event back. */
|
|
368
|
+
eventOverlap?: boolean;
|
|
357
369
|
/** date-fns locale for the column headers and time labels. */
|
|
358
370
|
locale?: Locale;
|
|
359
371
|
/** Theme overrides; falls back to the default light theme. */
|
|
@@ -417,7 +429,7 @@ interface TimeGridProps<T = unknown> extends SlotStyleProps<TimeGridSlot> {
|
|
|
417
429
|
* <TimeGrid mode="week" date={new Date()} events={events} />
|
|
418
430
|
* ```
|
|
419
431
|
*/
|
|
420
|
-
declare function TimeGrid<T = unknown>({ date, events, mode, numberOfDays, weekStartsOn, weekdayFormat, hourHeight: initialHourHeight, scrollOffsetMinutes, zoomable, minHourHeight, maxHourHeight, dragStepMinutes, ampm, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, hiddenDays, keyboardEventNavigation, businessHours, renderBusinessHours, showNowIndicator, highlightWeekends, now: nowProp, timeZone, showAllDayEventCell, locale, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, hourComponent, onPressEvent, onPressDateHeader, onPressCell, onCreateEvent, onDragStart, onDragEvent, onChangeDate, className, style, classNames, styles }: TimeGridProps<T>): ReactElement;
|
|
432
|
+
declare function TimeGrid<T = unknown>({ date, events, mode, numberOfDays, weekStartsOn, weekdayFormat, hourHeight: initialHourHeight, scrollOffsetMinutes, zoomable, minHourHeight, maxHourHeight, dragStepMinutes, ampm, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, hiddenDays, keyboardEventNavigation, businessHours, renderBusinessHours, showNowIndicator, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, now: nowProp, timeZone, showAllDayEventCell, locale, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, hourComponent, onPressEvent, onPressDateHeader, onPressCell, onCreateEvent, onDragStart, onDragEvent, onChangeDate, className, style, classNames, styles }: TimeGridProps<T>): ReactElement;
|
|
421
433
|
//#endregion
|
|
422
434
|
//#region src/Calendar.d.ts
|
|
423
435
|
/**
|
|
@@ -513,6 +525,12 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
513
525
|
showAllDayEventCell?: boolean;
|
|
514
526
|
/** Tint weekend columns (default true). Set false to treat weekends normally. */
|
|
515
527
|
highlightWeekends?: boolean;
|
|
528
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
529
|
+
eventStartEditable?: boolean;
|
|
530
|
+
/** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
|
|
531
|
+
eventDurationEditable?: boolean;
|
|
532
|
+
/** Reject drags/resizes that would overlap another event (default true = allowed). */
|
|
533
|
+
eventOverlap?: boolean;
|
|
516
534
|
/** Snap dragged/created events to this many minutes. */
|
|
517
535
|
dragStepMinutes?: number;
|
|
518
536
|
/** Tap empty grid space. */
|
|
@@ -576,7 +594,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
576
594
|
* <Calendar mode="week" date={new Date()} events={events} />
|
|
577
595
|
* ```
|
|
578
596
|
*/
|
|
579
|
-
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
|
|
597
|
+
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
|
|
580
598
|
//#endregion
|
|
581
599
|
//#region src/MonthList.d.ts
|
|
582
600
|
/**
|
|
@@ -808,6 +826,14 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
808
826
|
renderBusinessHours?: (band: BusinessHoursBand$1 & {
|
|
809
827
|
resource: Resource;
|
|
810
828
|
}) => ReactNode;
|
|
829
|
+
/**
|
|
830
|
+
* Render each resource's header cell yourself (an avatar, a subtitle, a status
|
|
831
|
+
* dot). Receives the resource and its index; return the cell's content. The board
|
|
832
|
+
* keeps the header cell's sizing so columns stay aligned, so this replaces only
|
|
833
|
+
* the label content. Falls back to the resource title (or id). Applies to both
|
|
834
|
+
* orientations: the top header cells when vertical, the row labels when horizontal.
|
|
835
|
+
*/
|
|
836
|
+
renderResourceHeader?: (resource: Resource, index: number) => ReactNode;
|
|
811
837
|
/** Snap dragged events to this many minutes (default 15). */
|
|
812
838
|
dragStepMinutes?: number;
|
|
813
839
|
/** Show the current-time line when `date` is today (default true). */
|
|
@@ -837,6 +863,6 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
837
863
|
* />
|
|
838
864
|
* ```
|
|
839
865
|
*/
|
|
840
|
-
declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, onPressCell, onCreateEvent, businessHours, renderBusinessHours, dragStepMinutes, showNowIndicator, now: nowProp, timeZone, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
866
|
+
declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, onPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, showNowIndicator, now: nowProp, timeZone, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
841
867
|
//#endregion
|
|
842
|
-
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, DatePicker, type DatePickerProps, type DatePickerSlot, type DateRange, DateRangePicker, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type DomAgendaEvent, type DomAgendaEventArgs, type DomCalendarTheme, type DomMonthEvent, type DomMonthEventArgs, type DomRenderEvent, type DomRenderEventArgs, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type ICalEvent, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthView, type MonthViewProps, type MonthViewSlot, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type ResourceTimelineSlot, 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, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
|
|
868
|
+
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, DatePicker, type DatePickerProps, type DatePickerSlot, type DateRange, DateRangePicker, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type DomAgendaEvent, type DomAgendaEventArgs, type DomCalendarTheme, type DomMonthEvent, type DomMonthEventArgs, type DomRenderEvent, type DomRenderEventArgs, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthView, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type ResourceTimelineSlot, 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, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
2
|
import { CSSProperties, ComponentType, ReactElement, ReactNode } from "react";
|
|
3
|
-
import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, ICalendarEvent, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, PositionedEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, daySelectionState, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
|
|
3
|
+
import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, ICalendarEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, daySelectionState, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
|
|
4
4
|
//#region src/slots.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Per-slot styling overrides. Give a slot a Tailwind/CSS class and/or an inline
|
|
@@ -203,7 +203,12 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
|
|
|
203
203
|
* announce. Defaults to the event title and day (e.g. "Standup, 15 July").
|
|
204
204
|
*/
|
|
205
205
|
eventAccessibilityLabel?: EventAccessibilityLabeler$1<T>;
|
|
206
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* Max event lanes (stacked rows) shown per week before the rest of a day's
|
|
208
|
+
* events collapse into a "+N more" row (default 3). Because multi-day events draw
|
|
209
|
+
* as one bar spanning a lane across the week, this caps lanes per row, not chips
|
|
210
|
+
* per day, so a long bar can push a lightly-booked day's own events into "+N more".
|
|
211
|
+
*/
|
|
207
212
|
maxVisibleEventCount?: number;
|
|
208
213
|
/** Template for the overflow row; `{moreCount}` is replaced (default "{moreCount} More"). */
|
|
209
214
|
moreLabel?: string;
|
|
@@ -354,6 +359,13 @@ interface TimeGridProps<T = unknown> extends SlotStyleProps<TimeGridSlot> {
|
|
|
354
359
|
/** Tint Saturday/Sunday columns with the weekend background (default true). Set
|
|
355
360
|
* false to treat weekends like any other day. */
|
|
356
361
|
highlightWeekends?: boolean;
|
|
362
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
363
|
+
eventStartEditable?: boolean;
|
|
364
|
+
/** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
|
|
365
|
+
eventDurationEditable?: boolean;
|
|
366
|
+
/** Allow a dragged/resized event to overlap another (default true). Set false to
|
|
367
|
+
* reject a drop that would collide, snapping the event back. */
|
|
368
|
+
eventOverlap?: boolean;
|
|
357
369
|
/** date-fns locale for the column headers and time labels. */
|
|
358
370
|
locale?: Locale;
|
|
359
371
|
/** Theme overrides; falls back to the default light theme. */
|
|
@@ -417,7 +429,7 @@ interface TimeGridProps<T = unknown> extends SlotStyleProps<TimeGridSlot> {
|
|
|
417
429
|
* <TimeGrid mode="week" date={new Date()} events={events} />
|
|
418
430
|
* ```
|
|
419
431
|
*/
|
|
420
|
-
declare function TimeGrid<T = unknown>({ date, events, mode, numberOfDays, weekStartsOn, weekdayFormat, hourHeight: initialHourHeight, scrollOffsetMinutes, zoomable, minHourHeight, maxHourHeight, dragStepMinutes, ampm, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, hiddenDays, keyboardEventNavigation, businessHours, renderBusinessHours, showNowIndicator, highlightWeekends, now: nowProp, timeZone, showAllDayEventCell, locale, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, hourComponent, onPressEvent, onPressDateHeader, onPressCell, onCreateEvent, onDragStart, onDragEvent, onChangeDate, className, style, classNames, styles }: TimeGridProps<T>): ReactElement;
|
|
432
|
+
declare function TimeGrid<T = unknown>({ date, events, mode, numberOfDays, weekStartsOn, weekdayFormat, hourHeight: initialHourHeight, scrollOffsetMinutes, zoomable, minHourHeight, maxHourHeight, dragStepMinutes, ampm, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, hiddenDays, keyboardEventNavigation, businessHours, renderBusinessHours, showNowIndicator, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, now: nowProp, timeZone, showAllDayEventCell, locale, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, hourComponent, onPressEvent, onPressDateHeader, onPressCell, onCreateEvent, onDragStart, onDragEvent, onChangeDate, className, style, classNames, styles }: TimeGridProps<T>): ReactElement;
|
|
421
433
|
//#endregion
|
|
422
434
|
//#region src/Calendar.d.ts
|
|
423
435
|
/**
|
|
@@ -513,6 +525,12 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
513
525
|
showAllDayEventCell?: boolean;
|
|
514
526
|
/** Tint weekend columns (default true). Set false to treat weekends normally. */
|
|
515
527
|
highlightWeekends?: boolean;
|
|
528
|
+
/** Allow moving events by default (per-event `startEditable` overrides). Default true. */
|
|
529
|
+
eventStartEditable?: boolean;
|
|
530
|
+
/** Allow resizing events by default (per-event `durationEditable` overrides). Default true. */
|
|
531
|
+
eventDurationEditable?: boolean;
|
|
532
|
+
/** Reject drags/resizes that would overlap another event (default true = allowed). */
|
|
533
|
+
eventOverlap?: boolean;
|
|
516
534
|
/** Snap dragged/created events to this many minutes. */
|
|
517
535
|
dragStepMinutes?: number;
|
|
518
536
|
/** Tap empty grid space. */
|
|
@@ -576,7 +594,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
576
594
|
* <Calendar mode="week" date={new Date()} events={events} />
|
|
577
595
|
* ```
|
|
578
596
|
*/
|
|
579
|
-
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
|
|
597
|
+
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
|
|
580
598
|
//#endregion
|
|
581
599
|
//#region src/MonthList.d.ts
|
|
582
600
|
/**
|
|
@@ -808,6 +826,14 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
808
826
|
renderBusinessHours?: (band: BusinessHoursBand$1 & {
|
|
809
827
|
resource: Resource;
|
|
810
828
|
}) => ReactNode;
|
|
829
|
+
/**
|
|
830
|
+
* Render each resource's header cell yourself (an avatar, a subtitle, a status
|
|
831
|
+
* dot). Receives the resource and its index; return the cell's content. The board
|
|
832
|
+
* keeps the header cell's sizing so columns stay aligned, so this replaces only
|
|
833
|
+
* the label content. Falls back to the resource title (or id). Applies to both
|
|
834
|
+
* orientations: the top header cells when vertical, the row labels when horizontal.
|
|
835
|
+
*/
|
|
836
|
+
renderResourceHeader?: (resource: Resource, index: number) => ReactNode;
|
|
811
837
|
/** Snap dragged events to this many minutes (default 15). */
|
|
812
838
|
dragStepMinutes?: number;
|
|
813
839
|
/** Show the current-time line when `date` is today (default true). */
|
|
@@ -837,6 +863,6 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
837
863
|
* />
|
|
838
864
|
* ```
|
|
839
865
|
*/
|
|
840
|
-
declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, onPressCell, onCreateEvent, businessHours, renderBusinessHours, dragStepMinutes, showNowIndicator, now: nowProp, timeZone, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
866
|
+
declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, onPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, showNowIndicator, now: nowProp, timeZone, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
841
867
|
//#endregion
|
|
842
|
-
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, DatePicker, type DatePickerProps, type DatePickerSlot, type DateRange, DateRangePicker, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type DomAgendaEvent, type DomAgendaEventArgs, type DomCalendarTheme, type DomMonthEvent, type DomMonthEventArgs, type DomRenderEvent, type DomRenderEventArgs, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type ICalEvent, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthView, type MonthViewProps, type MonthViewSlot, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type ResourceTimelineSlot, 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, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
|
|
868
|
+
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, DatePicker, type DatePickerProps, type DatePickerSlot, type DateRange, DateRangePicker, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type DomAgendaEvent, type DomAgendaEventArgs, type DomCalendarTheme, type DomMonthEvent, type DomMonthEventArgs, type DomRenderEvent, type DomRenderEventArgs, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthView, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type ResourceTimelineSlot, 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, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
|