@dayflow/core 3.5.3 → 3.6.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.ts CHANGED
@@ -480,6 +480,7 @@ declare enum ViewType {
480
480
  WEEK = "week",
481
481
  MONTH = "month",
482
482
  YEAR = "year",
483
+ AGENDA = "agenda",
483
484
  RESOURCE = "resource"
484
485
  }
485
486
  type CalendarViewType = ViewType | string;
@@ -776,6 +777,7 @@ interface CalendarConfig {
776
777
  day: Record<string, unknown>;
777
778
  week: Record<string, unknown>;
778
779
  month: Record<string, unknown>;
780
+ agenda: Record<string, unknown>;
779
781
  };
780
782
  }
781
783
  interface UseCalendarReturn {
@@ -1157,6 +1159,10 @@ type WeekViewProps = BaseViewProps<WeekViewConfig>;
1157
1159
  * Month view specific Props
1158
1160
  */
1159
1161
  type MonthViewProps = BaseViewProps<MonthViewConfig>;
1162
+ /**
1163
+ * Agenda view specific Props
1164
+ */
1165
+ type AgendaViewProps = BaseViewProps<AgendaViewConfig>;
1160
1166
  /**
1161
1167
  * Year view specific Props
1162
1168
  */
@@ -1197,11 +1203,12 @@ interface WeekViewConfig extends ViewFactoryConfig {
1197
1203
  gridDateClick?: 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1198
1204
  /**
1199
1205
  * Action when a date cell is double-clicked.
1200
- * - 'day-view' (default): navigate to the Day View
1206
+ * - 'create-event' (default): create a 1-hour timed event at the clicked position (hour)
1207
+ * - 'day-view': navigate to the Day View
1201
1208
  * - 'none': no action
1202
1209
  * - function: custom handler
1203
1210
  */
1204
- gridDateDoubleClick?: 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1211
+ gridDateDoubleClick?: 'create-event' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1205
1212
  }
1206
1213
  /**
1207
1214
  * Month scroll / navigation configuration
@@ -1227,17 +1234,41 @@ interface MonthViewConfig extends ViewFactoryConfig {
1227
1234
  /** Scroll / navigation behavior for the month view */
1228
1235
  scroll?: MonthScrollConfig;
1229
1236
  showEventDots?: boolean;
1237
+ /** Height in pixels of each event row in the month grid. Default: 16 */
1238
+ eventHeight?: number;
1230
1239
  /**
1231
1240
  * Action when a date cell is clicked.
1232
1241
  */
1233
1242
  gridDateClick?: 'week-view' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1234
1243
  /**
1235
1244
  * Action when a date cell is double-clicked.
1236
- * - 'week-view' (default): navigate to the Week View
1245
+ * - 'create-event' (default): create a timed event from 9:00 to 10:00 on the clicked date
1246
+ * - 'week-view': navigate to the Week View
1247
+ * - 'day-view': navigate to the Day View
1237
1248
  * - 'none': no action
1238
1249
  * - function: custom handler
1239
1250
  */
1240
- gridDateDoubleClick?: 'week-view' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1251
+ gridDateDoubleClick?: 'create-event' | 'week-view' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1252
+ }
1253
+ /**
1254
+ * Agenda view factory configuration
1255
+ */
1256
+ interface AgendaViewConfig extends ViewFactoryConfig {
1257
+ /** Number of days rendered in one agenda page. */
1258
+ daysToShow?: number;
1259
+ /** Whether empty dates should still render a section in the list. */
1260
+ showEmptyDays?: boolean;
1261
+ /**
1262
+ * Action when a date section is clicked.
1263
+ */
1264
+ gridDateClick?: 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1265
+ /**
1266
+ * Action when a date section is double-clicked.
1267
+ * - 'day-view' (default): navigate to the Day View
1268
+ * - 'none': no action
1269
+ * - function: custom handler
1270
+ */
1271
+ gridDateDoubleClick?: 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1241
1272
  }
1242
1273
  /**
1243
1274
  * Year view factory configuration
@@ -1255,11 +1286,12 @@ interface YearViewConfig extends ViewFactoryConfig {
1255
1286
  gridDateClick?: 'popup' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1256
1287
  /**
1257
1288
  * Grid mode: action when a date cell is double-clicked.
1258
- * - 'day-view' (default): navigate to the Day View
1289
+ * - 'create-event' (default): create a timed event from 9:00 to 10:00 on the clicked date
1290
+ * - 'day-view': navigate to the Day View
1259
1291
  * - 'none': no action
1260
1292
  * - function: custom handler
1261
1293
  */
1262
- gridDateDoubleClick?: 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1294
+ gridDateDoubleClick?: 'create-event' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1263
1295
  /**
1264
1296
  * Grid mode: render custom popup content.
1265
1297
  * Receives the clicked date and its events; return null/undefined to use the default popup.
@@ -2956,12 +2988,15 @@ declare const createWeekView: ViewFactory<WeekViewConfig>;
2956
2988
 
2957
2989
  declare const createMonthView: ViewFactory<MonthViewConfig>;
2958
2990
 
2991
+ declare const createAgendaView: ViewFactory<AgendaViewConfig>;
2992
+
2959
2993
  declare const createYearView: ViewFactory<YearViewConfig>;
2960
2994
 
2961
2995
  declare function createStandardViews(config?: {
2962
2996
  day?: Partial<DayViewConfig>;
2963
2997
  week?: Partial<WeekViewConfig>;
2964
2998
  month?: Partial<MonthViewConfig>;
2999
+ agenda?: Partial<AgendaViewConfig>;
2965
3000
  }): CalendarView[];
2966
3001
 
2967
3002
  declare function createEventsPlugin(config?: EventsPluginConfig): CalendarPlugin;
@@ -3195,9 +3230,11 @@ interface CalendarEventProps {
3195
3230
  resizeHandleOrientation?: 'vertical' | 'horizontal';
3196
3231
  /** App-level timezone used to project event times for display (Month/Year view). */
3197
3232
  appTimeZone?: string;
3233
+ /** Height in pixels of each event row in the month grid (month multi-day events only). */
3234
+ monthEventHeight?: number;
3198
3235
  }
3199
3236
 
3200
- declare const _default: ({ event, layout, isAllDay, allDayHeight, calendarRef, isBeingDragged, isBeingResized, viewType, isMultiDay, segment, yearSegment, columnsPerRow, segmentIndex, hourHeight, firstHour, selectedEventId, detailPanelEventId, onMoveStart, onResizeStart, onEventUpdate, onEventDelete, newlyCreatedEventId, onDetailPanelOpen, onEventSelect, onEventLongPress, onDetailPanelToggle, useEventDetailPanel, multiDaySegmentInfo, app, isMobile, isSlidingView, enableTouch, hideTime, timeFormat, styleOverride, className, disableDefaultStyle, renderVisualContent, resizeHandleOrientation, appTimeZone, }: CalendarEventProps) => preact.JSX.Element;
3237
+ declare const _default: ({ event, layout, isAllDay, allDayHeight, calendarRef, isBeingDragged, isBeingResized, viewType, isMultiDay, segment, yearSegment, columnsPerRow, segmentIndex, hourHeight, firstHour, selectedEventId, detailPanelEventId, onMoveStart, onResizeStart, onEventUpdate, onEventDelete, newlyCreatedEventId, onDetailPanelOpen, onEventSelect, onEventLongPress, onDetailPanelToggle, useEventDetailPanel, multiDaySegmentInfo, app, isMobile, isSlidingView, enableTouch, hideTime, timeFormat, styleOverride, className, disableDefaultStyle, renderVisualContent, resizeHandleOrientation, appTimeZone, monthEventHeight, }: CalendarEventProps) => preact.JSX.Element;
3201
3238
 
3202
3239
  interface LayoutCalculationParams {
3203
3240
  containerWidth?: number;
@@ -3255,5 +3292,5 @@ declare const sidebarHeaderToggle = "df-sidebar-toggle";
3255
3292
  */
3256
3293
  declare const sidebarHeaderTitle = "df-sidebar-header-title";
3257
3294
 
3258
- export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, _default as CalendarEvent, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, DefaultEventDetailDialog, DefaultEventDetailPanel, EventContextMenu, EventLayoutCalculator, GridContextMenu, LAYOUT_CONFIG, LOCALES, Loader2, LoadingButton, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, analyzeMultiDayEventsForRow, buildColorBarGradient, buildDiagonalColorBarGradient, buildDiagonalPatternBackground, buildFixedWeekMonthsData, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, compareViews, convertToDayFlowEvent, createAllDayDisplayComparator, createAllDayEvent, createConfigSyncSnapshot, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, createNormalizedCalendarAppConfigGetter, createStandardViews, createTemporalWithHour, createTimedEvent, createTimezoneEvent, createTimezoneEvents, createWeekView, createYearView, dateToPlainDate, dateToPlainDateTime, dateToZonedDateTime, daysBetween, daysDifference, downloadICS, en, escapeICSValue, extractHourFromDate, extractHourFromTemporal, extractVEvents, foldLine, formatDate, formatDateConsistent, formatDateToICSTimestamp, formatEventTimeRange, formatICSDate, formatMonthYear, formatProperty, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getAllDayRangeMetrics, getCalendarColorsForHex, getCalendarEventBgColors, getCalendarLineColors, getCallbackConfigUpdate, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventIcon, getEventTextColor, getEventsForDay, getEventsForWeek, getFixedWeekTotalColumns, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getPrimaryCalendarId, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getSyncConfigUpdates, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, getWeekDaysLabels, getWeekNumber, getWeekRange, groupDaysIntoRows, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeTimeZoneValue, now, pad2, parseICS, parseICSDate, parseVEventLines, pickSyncableConfig, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, restoreVisualEventToCanonical, restoreVisualTimedTemporalToCanonical, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, subscribeCalendar, syncCalendarAppConfig, t, temporalToDate, temporalToVisualDate, temporalToVisualTemporal, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3259
- export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppConfigSyncSnapshot, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarEventProps, CalendarHeaderProps, CalendarPlugin, CalendarSearchEvent, CalendarSearchProps, CalendarType, CalendarView, CalendarViewType, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventContextMenuSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, FixedWeekMonthData, GridContextMenuSlotArgs, ICSDateParams, ICSExportOptions, ICSImportOptions, ICSImportResult, ICSParseError, ICSVEvent, ICalendarApp, Locale, LocaleCode, LocaleContextValue, LocaleDict, LocaleMessages, LocaleProviderProps, MobileEventProps, Mode, MonthDragState, MonthEventDragState, MonthEventSegment, MonthScrollConfig, MonthViewConfig, MonthViewProps, NestedLayer, RangeChangeReason, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubscribeResult, SubtreeAnalysis, SupportedLang, SyncableCalendarAppConfig, TComponent, TNode, ThemeColors, ThemeConfig, ThemeMode, TimeZoneValue, TitleBarSlotProps, TransferOperation, TranslationKey, UnifiedDragRef, UseCalendarAppReturn, UseCalendarReturn, UseDragCommonReturn, UseDragHandlersParams, UseDragHandlersReturn, UseDragManagerReturn, UseDragStateReturn, UseMonthDragParams, UseMonthDragReturn, UseVirtualMonthScrollProps, UseVirtualMonthScrollReturn, UseVirtualScrollProps, UseVirtualScrollReturn, UseWeekDayDragParams, UseWeekDayDragReturn, ViewAdapterProps, ViewConfigComparison, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearMultiDaySegment, YearViewConfig, YearViewProps, useDragProps, useDragReturn };
3295
+ export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, _default as CalendarEvent, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, DefaultEventDetailDialog, DefaultEventDetailPanel, EventContextMenu, EventLayoutCalculator, GridContextMenu, LAYOUT_CONFIG, LOCALES, Loader2, LoadingButton, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, analyzeMultiDayEventsForRow, buildColorBarGradient, buildDiagonalColorBarGradient, buildDiagonalPatternBackground, buildFixedWeekMonthsData, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, compareViews, convertToDayFlowEvent, createAgendaView, createAllDayDisplayComparator, createAllDayEvent, createConfigSyncSnapshot, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, createNormalizedCalendarAppConfigGetter, createStandardViews, createTemporalWithHour, createTimedEvent, createTimezoneEvent, createTimezoneEvents, createWeekView, createYearView, dateToPlainDate, dateToPlainDateTime, dateToZonedDateTime, daysBetween, daysDifference, downloadICS, en, escapeICSValue, extractHourFromDate, extractHourFromTemporal, extractVEvents, foldLine, formatDate, formatDateConsistent, formatDateToICSTimestamp, formatEventTimeRange, formatICSDate, formatMonthYear, formatProperty, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getAllDayRangeMetrics, getCalendarColorsForHex, getCalendarEventBgColors, getCalendarLineColors, getCallbackConfigUpdate, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventIcon, getEventTextColor, getEventsForDay, getEventsForWeek, getFixedWeekTotalColumns, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getPrimaryCalendarId, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getSyncConfigUpdates, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, getWeekDaysLabels, getWeekNumber, getWeekRange, groupDaysIntoRows, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeTimeZoneValue, now, pad2, parseICS, parseICSDate, parseVEventLines, pickSyncableConfig, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, restoreVisualEventToCanonical, restoreVisualTimedTemporalToCanonical, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, subscribeCalendar, syncCalendarAppConfig, t, temporalToDate, temporalToVisualDate, temporalToVisualTemporal, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3296
+ export type { AgendaViewConfig, AgendaViewProps, AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppConfigSyncSnapshot, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarEventProps, CalendarHeaderProps, CalendarPlugin, CalendarSearchEvent, CalendarSearchProps, CalendarType, CalendarView, CalendarViewType, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventContextMenuSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, FixedWeekMonthData, GridContextMenuSlotArgs, ICSDateParams, ICSExportOptions, ICSImportOptions, ICSImportResult, ICSParseError, ICSVEvent, ICalendarApp, Locale, LocaleCode, LocaleContextValue, LocaleDict, LocaleMessages, LocaleProviderProps, MobileEventProps, Mode, MonthDragState, MonthEventDragState, MonthEventSegment, MonthScrollConfig, MonthViewConfig, MonthViewProps, NestedLayer, RangeChangeReason, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubscribeResult, SubtreeAnalysis, SupportedLang, SyncableCalendarAppConfig, TComponent, TNode, ThemeColors, ThemeConfig, ThemeMode, TimeZoneValue, TitleBarSlotProps, TransferOperation, TranslationKey, UnifiedDragRef, UseCalendarAppReturn, UseCalendarReturn, UseDragCommonReturn, UseDragHandlersParams, UseDragHandlersReturn, UseDragManagerReturn, UseDragStateReturn, UseMonthDragParams, UseMonthDragReturn, UseVirtualMonthScrollProps, UseVirtualMonthScrollReturn, UseVirtualScrollProps, UseVirtualScrollReturn, UseWeekDayDragParams, UseWeekDayDragReturn, ViewAdapterProps, ViewConfigComparison, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearMultiDaySegment, YearViewConfig, YearViewProps, useDragProps, useDragReturn };