@super-calendar/dom 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 +62 -6
- package/dist/index.d.ts +62 -6
- package/dist/index.js +481 -144
- package/dist/index.mjs +483 -147
- package/package.json +2 -2
- package/src/Calendar.tsx +38 -8
- package/src/ResourceTimeline.tsx +192 -3
- package/src/YearView.tsx +283 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -121,6 +121,47 @@ interface AgendaProps<T = unknown> extends SlotStyleProps<AgendaSlot> {
|
|
|
121
121
|
*/
|
|
122
122
|
declare function Agenda<T = unknown>({ events, locale, ampm, activeDate, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, onPressEvent, onPressDay, className, style, classNames, styles }: AgendaProps<T>): ReactElement;
|
|
123
123
|
//#endregion
|
|
124
|
+
//#region src/YearView.d.ts
|
|
125
|
+
/**
|
|
126
|
+
* Styleable parts of {@link YearView}. Pass a class or inline style per slot
|
|
127
|
+
* via the `classNames` / `styles` props; day cells carry `data-today` and
|
|
128
|
+
* `data-events` state attributes for variants.
|
|
129
|
+
*/
|
|
130
|
+
type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "eventDot";
|
|
131
|
+
/** Props for {@link YearView}, the twelve mini-month year grid. */
|
|
132
|
+
interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
|
|
133
|
+
/** Any date inside the year to render. */
|
|
134
|
+
date: Date;
|
|
135
|
+
/** Days holding at least one event get a dot. Omit for a plain year. */
|
|
136
|
+
events?: CalendarEvent$1<T>[];
|
|
137
|
+
/** First day of the week. Sunday = 0 (default) … Saturday = 6. */
|
|
138
|
+
weekStartsOn?: WeekStartsOn$1;
|
|
139
|
+
locale?: Locale;
|
|
140
|
+
/** Highlight this date instead of the real "today". */
|
|
141
|
+
activeDate?: Date;
|
|
142
|
+
/**
|
|
143
|
+
* Smallest width a mini month may take before the grid drops a column
|
|
144
|
+
* (default 150). The grid fits as many columns as the container allows.
|
|
145
|
+
*/
|
|
146
|
+
minMonthWidth?: number;
|
|
147
|
+
/** Tap a day cell (e.g. to drill into the day or month view). */
|
|
148
|
+
onPressDay?: (date: Date) => void;
|
|
149
|
+
/** Tap a month's title (e.g. to jump to that month's view). */
|
|
150
|
+
onPressMonth?: (month: Date) => void;
|
|
151
|
+
/** Theme overrides; falls back to the default light theme. */
|
|
152
|
+
theme?: Partial<DomCalendarTheme>;
|
|
153
|
+
/** Class applied to the root element. */
|
|
154
|
+
className?: string;
|
|
155
|
+
/** Inline styles applied to the root element. */
|
|
156
|
+
style?: CSSProperties;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A year at a glance: the twelve months as compact mini grids, with today
|
|
160
|
+
* highlighted and a dot under days that hold events. It's the view `Calendar`
|
|
161
|
+
* renders for `mode="year"`.
|
|
162
|
+
*/
|
|
163
|
+
declare function YearView<T = unknown>({ date, events, weekStartsOn, locale, activeDate, minMonthWidth, onPressDay, onPressMonth, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
|
|
164
|
+
//#endregion
|
|
124
165
|
//#region src/MonthView.d.ts
|
|
125
166
|
/**
|
|
126
167
|
* Styleable parts of {@link MonthView}. Pass a class or inline style per slot via
|
|
@@ -357,14 +398,14 @@ declare function TimeGrid<T = unknown>({ date, events, mode, numberOfDays, weekS
|
|
|
357
398
|
* for the active `mode` apply; the rest are ignored. See {@link MonthViewSlot},
|
|
358
399
|
* {@link TimeGridSlot}, and {@link AgendaSlot}.
|
|
359
400
|
*/
|
|
360
|
-
type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot;
|
|
401
|
+
type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot | YearViewSlot;
|
|
361
402
|
/** Props for {@link Calendar}. */
|
|
362
403
|
interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotStyleProps<CalendarSlot> {
|
|
363
404
|
/**
|
|
364
405
|
* The view to render (default "week"). `month` renders a month grid, `schedule`
|
|
365
406
|
* a day-grouped agenda list, and the others a time grid.
|
|
366
407
|
*/
|
|
367
|
-
mode?:
|
|
408
|
+
mode?: CalendarMode$1;
|
|
368
409
|
/** Controlled anchor date. Change it (e.g. from your own header) to navigate. */
|
|
369
410
|
date: Date;
|
|
370
411
|
/**
|
|
@@ -471,6 +512,8 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
471
512
|
keyboardDayNavigation?: boolean;
|
|
472
513
|
/** Tap a day cell. */
|
|
473
514
|
onPressDay?: (date: Date) => void;
|
|
515
|
+
/** Tap a month's title in the year view — e.g. jump to that month. */
|
|
516
|
+
onPressMonth?: (month: Date) => void;
|
|
474
517
|
/** Tap the "+N more" overflow row. */
|
|
475
518
|
onPressMore?: (events: CalendarEvent$1<T>[], date: Date) => void;
|
|
476
519
|
/** Custom month chip renderer. */
|
|
@@ -489,7 +532,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
489
532
|
* <Calendar mode="week" date={new Date()} events={events} />
|
|
490
533
|
* ```
|
|
491
534
|
*/
|
|
492
|
-
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, showNowIndicator, showAllDayEventCell, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
|
|
535
|
+
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, showNowIndicator, showAllDayEventCell, 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;
|
|
493
536
|
//#endregion
|
|
494
537
|
//#region src/MonthList.d.ts
|
|
495
538
|
/**
|
|
@@ -627,7 +670,7 @@ declare function DateRangePicker({ value, onChange, formatLabel, weekStartsOn, h
|
|
|
627
670
|
* Styleable parts of {@link ResourceTimeline}. Pass a class or inline style per
|
|
628
671
|
* slot via the `classNames` / `styles` props.
|
|
629
672
|
*/
|
|
630
|
-
type ResourceTimelineSlot = "header" | "corner" | "timeAxis" | "hourTick" | "resourceLabel" | "row" | "track" | "gridLines" | "event" | "eventBox";
|
|
673
|
+
type ResourceTimelineSlot = "header" | "corner" | "timeAxis" | "hourTick" | "resourceLabel" | "row" | "track" | "gridLines" | "businessHours" | "event" | "eventBox" | "createGhost";
|
|
631
674
|
/** A schedulable lane (room, person, machine) that events are grouped under. */
|
|
632
675
|
interface Resource {
|
|
633
676
|
/** Stable id events reference via their `resourceId`. */
|
|
@@ -689,6 +732,19 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
689
732
|
* proposed new start/end. Return `false` to reject the drop (it snaps back).
|
|
690
733
|
*/
|
|
691
734
|
onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
|
|
735
|
+
/** Tap empty lane space; called with the snapped time and the lane's resource. */
|
|
736
|
+
onPressCell?: (at: Date, resource: Resource) => void;
|
|
737
|
+
/** Drag empty lane space to create; called with the swept start/end and the lane's resource. */
|
|
738
|
+
onCreateEvent?: (start: Date, end: Date, resource: Resource) => void;
|
|
739
|
+
/**
|
|
740
|
+
* Shade the hours outside this window, per lane. Same shape as the Calendar's
|
|
741
|
+
* `businessHours` plus the lane's resource, so per-resource opening hours work
|
|
742
|
+
* (return `null` for a fully closed lane). A date-only function is accepted.
|
|
743
|
+
*/
|
|
744
|
+
businessHours?: (date: Date, resource: Resource) => {
|
|
745
|
+
start: number;
|
|
746
|
+
end: number;
|
|
747
|
+
} | null;
|
|
692
748
|
/** Snap dragged events to this many minutes (default 15). */
|
|
693
749
|
dragStepMinutes?: number;
|
|
694
750
|
/** Class applied to the root element. */
|
|
@@ -712,6 +768,6 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
712
768
|
* />
|
|
713
769
|
* ```
|
|
714
770
|
*/
|
|
715
|
-
declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, dragStepMinutes, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
771
|
+
declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, onPressCell, onCreateEvent, businessHours, dragStepMinutes, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
716
772
|
//#endregion
|
|
717
|
-
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, 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, buildMonthGrid, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useMonthGrid, weekdayFormatToken };
|
|
773
|
+
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, 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, buildMonthGrid, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useMonthGrid, weekdayFormatToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,47 @@ interface AgendaProps<T = unknown> extends SlotStyleProps<AgendaSlot> {
|
|
|
121
121
|
*/
|
|
122
122
|
declare function Agenda<T = unknown>({ events, locale, ampm, activeDate, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, onPressEvent, onPressDay, className, style, classNames, styles }: AgendaProps<T>): ReactElement;
|
|
123
123
|
//#endregion
|
|
124
|
+
//#region src/YearView.d.ts
|
|
125
|
+
/**
|
|
126
|
+
* Styleable parts of {@link YearView}. Pass a class or inline style per slot
|
|
127
|
+
* via the `classNames` / `styles` props; day cells carry `data-today` and
|
|
128
|
+
* `data-events` state attributes for variants.
|
|
129
|
+
*/
|
|
130
|
+
type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "eventDot";
|
|
131
|
+
/** Props for {@link YearView}, the twelve mini-month year grid. */
|
|
132
|
+
interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
|
|
133
|
+
/** Any date inside the year to render. */
|
|
134
|
+
date: Date;
|
|
135
|
+
/** Days holding at least one event get a dot. Omit for a plain year. */
|
|
136
|
+
events?: CalendarEvent$1<T>[];
|
|
137
|
+
/** First day of the week. Sunday = 0 (default) … Saturday = 6. */
|
|
138
|
+
weekStartsOn?: WeekStartsOn$1;
|
|
139
|
+
locale?: Locale;
|
|
140
|
+
/** Highlight this date instead of the real "today". */
|
|
141
|
+
activeDate?: Date;
|
|
142
|
+
/**
|
|
143
|
+
* Smallest width a mini month may take before the grid drops a column
|
|
144
|
+
* (default 150). The grid fits as many columns as the container allows.
|
|
145
|
+
*/
|
|
146
|
+
minMonthWidth?: number;
|
|
147
|
+
/** Tap a day cell (e.g. to drill into the day or month view). */
|
|
148
|
+
onPressDay?: (date: Date) => void;
|
|
149
|
+
/** Tap a month's title (e.g. to jump to that month's view). */
|
|
150
|
+
onPressMonth?: (month: Date) => void;
|
|
151
|
+
/** Theme overrides; falls back to the default light theme. */
|
|
152
|
+
theme?: Partial<DomCalendarTheme>;
|
|
153
|
+
/** Class applied to the root element. */
|
|
154
|
+
className?: string;
|
|
155
|
+
/** Inline styles applied to the root element. */
|
|
156
|
+
style?: CSSProperties;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A year at a glance: the twelve months as compact mini grids, with today
|
|
160
|
+
* highlighted and a dot under days that hold events. It's the view `Calendar`
|
|
161
|
+
* renders for `mode="year"`.
|
|
162
|
+
*/
|
|
163
|
+
declare function YearView<T = unknown>({ date, events, weekStartsOn, locale, activeDate, minMonthWidth, onPressDay, onPressMonth, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
|
|
164
|
+
//#endregion
|
|
124
165
|
//#region src/MonthView.d.ts
|
|
125
166
|
/**
|
|
126
167
|
* Styleable parts of {@link MonthView}. Pass a class or inline style per slot via
|
|
@@ -357,14 +398,14 @@ declare function TimeGrid<T = unknown>({ date, events, mode, numberOfDays, weekS
|
|
|
357
398
|
* for the active `mode` apply; the rest are ignored. See {@link MonthViewSlot},
|
|
358
399
|
* {@link TimeGridSlot}, and {@link AgendaSlot}.
|
|
359
400
|
*/
|
|
360
|
-
type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot;
|
|
401
|
+
type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot | YearViewSlot;
|
|
361
402
|
/** Props for {@link Calendar}. */
|
|
362
403
|
interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotStyleProps<CalendarSlot> {
|
|
363
404
|
/**
|
|
364
405
|
* The view to render (default "week"). `month` renders a month grid, `schedule`
|
|
365
406
|
* a day-grouped agenda list, and the others a time grid.
|
|
366
407
|
*/
|
|
367
|
-
mode?:
|
|
408
|
+
mode?: CalendarMode$1;
|
|
368
409
|
/** Controlled anchor date. Change it (e.g. from your own header) to navigate. */
|
|
369
410
|
date: Date;
|
|
370
411
|
/**
|
|
@@ -471,6 +512,8 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
471
512
|
keyboardDayNavigation?: boolean;
|
|
472
513
|
/** Tap a day cell. */
|
|
473
514
|
onPressDay?: (date: Date) => void;
|
|
515
|
+
/** Tap a month's title in the year view — e.g. jump to that month. */
|
|
516
|
+
onPressMonth?: (month: Date) => void;
|
|
474
517
|
/** Tap the "+N more" overflow row. */
|
|
475
518
|
onPressMore?: (events: CalendarEvent$1<T>[], date: Date) => void;
|
|
476
519
|
/** Custom month chip renderer. */
|
|
@@ -489,7 +532,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
489
532
|
* <Calendar mode="week" date={new Date()} events={events} />
|
|
490
533
|
* ```
|
|
491
534
|
*/
|
|
492
|
-
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, showNowIndicator, showAllDayEventCell, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
|
|
535
|
+
declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, showNowIndicator, showAllDayEventCell, 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;
|
|
493
536
|
//#endregion
|
|
494
537
|
//#region src/MonthList.d.ts
|
|
495
538
|
/**
|
|
@@ -627,7 +670,7 @@ declare function DateRangePicker({ value, onChange, formatLabel, weekStartsOn, h
|
|
|
627
670
|
* Styleable parts of {@link ResourceTimeline}. Pass a class or inline style per
|
|
628
671
|
* slot via the `classNames` / `styles` props.
|
|
629
672
|
*/
|
|
630
|
-
type ResourceTimelineSlot = "header" | "corner" | "timeAxis" | "hourTick" | "resourceLabel" | "row" | "track" | "gridLines" | "event" | "eventBox";
|
|
673
|
+
type ResourceTimelineSlot = "header" | "corner" | "timeAxis" | "hourTick" | "resourceLabel" | "row" | "track" | "gridLines" | "businessHours" | "event" | "eventBox" | "createGhost";
|
|
631
674
|
/** A schedulable lane (room, person, machine) that events are grouped under. */
|
|
632
675
|
interface Resource {
|
|
633
676
|
/** Stable id events reference via their `resourceId`. */
|
|
@@ -689,6 +732,19 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
689
732
|
* proposed new start/end. Return `false` to reject the drop (it snaps back).
|
|
690
733
|
*/
|
|
691
734
|
onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
|
|
735
|
+
/** Tap empty lane space; called with the snapped time and the lane's resource. */
|
|
736
|
+
onPressCell?: (at: Date, resource: Resource) => void;
|
|
737
|
+
/** Drag empty lane space to create; called with the swept start/end and the lane's resource. */
|
|
738
|
+
onCreateEvent?: (start: Date, end: Date, resource: Resource) => void;
|
|
739
|
+
/**
|
|
740
|
+
* Shade the hours outside this window, per lane. Same shape as the Calendar's
|
|
741
|
+
* `businessHours` plus the lane's resource, so per-resource opening hours work
|
|
742
|
+
* (return `null` for a fully closed lane). A date-only function is accepted.
|
|
743
|
+
*/
|
|
744
|
+
businessHours?: (date: Date, resource: Resource) => {
|
|
745
|
+
start: number;
|
|
746
|
+
end: number;
|
|
747
|
+
} | null;
|
|
692
748
|
/** Snap dragged events to this many minutes (default 15). */
|
|
693
749
|
dragStepMinutes?: number;
|
|
694
750
|
/** Class applied to the root element. */
|
|
@@ -712,6 +768,6 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
|
|
|
712
768
|
* />
|
|
713
769
|
* ```
|
|
714
770
|
*/
|
|
715
|
-
declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, dragStepMinutes, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
771
|
+
declare function ResourceTimeline<T = unknown>({ date, orientation, resources, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, onPressCell, onCreateEvent, businessHours, dragStepMinutes, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
|
|
716
772
|
//#endregion
|
|
717
|
-
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, 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, buildMonthGrid, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useMonthGrid, weekdayFormatToken };
|
|
773
|
+
export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, 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, buildMonthGrid, darkDomTheme, daySelectionState, defaultDomTheme, expandRecurringEvents, getViewDays, isAllDayEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, mergeDomTheme, nextDateRange, parseICalendar, toICalendar, useDateRange, useMonthGrid, weekdayFormatToken };
|