@dayflow/core 3.5.0 → 3.5.2

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
@@ -226,6 +226,10 @@ interface Event {
226
226
  calendarIds?: string[];
227
227
  meta?: Record<string, unknown>;
228
228
  day?: number;
229
+ /** Original start hour (used for stable cross-day layout) */
230
+ _originalStartHour?: number;
231
+ /** Original end hour (used for stable cross-day layout) */
232
+ _originalEndHour?: number;
229
233
  }
230
234
 
231
235
  /**
@@ -532,6 +536,7 @@ interface CalendarCallbacks {
532
536
  onCalendarCreate?: (calendar: CalendarType) => void | Promise<void>;
533
537
  onCalendarDelete?: (calendarId: string) => void | Promise<void>;
534
538
  onCalendarMerge?: (sourceId: string, targetId: string) => void | Promise<void>;
539
+ onCalendarReorder?: (fromIndex: number, toIndex: number) => void | Promise<void>;
535
540
  onEventClick?: (event: Event) => void | Promise<void>;
536
541
  onEventDoubleClick?: (event: Event, e: MouseEvent) => boolean | undefined | Promise<boolean | undefined>;
537
542
  onMoreEventsClick?: (date: Date) => void | Promise<void>;
@@ -597,6 +602,7 @@ interface CalendarAppConfig {
597
602
  defaultCalendar?: string;
598
603
  theme?: ThemeConfig;
599
604
  useEventDetailDialog?: boolean;
605
+ useEventDetailPanel?: boolean;
600
606
  useCalendarHeader?: boolean;
601
607
  customMobileEventRenderer?: MobileEventRenderer;
602
608
  locale?: string | Locale;
@@ -696,6 +702,7 @@ interface ICalendarApp {
696
702
  triggerRender: () => void;
697
703
  getCalendarRegistry: () => CalendarRegistry;
698
704
  getUseEventDetailDialog: () => boolean;
705
+ getUseEventDetailPanel: () => boolean;
699
706
  getCustomMobileEventRenderer: () => MobileEventRenderer | undefined;
700
707
  updateConfig: (config: Partial<CalendarAppConfig>) => void;
701
708
  /** The resolved global display/edit timezone (IANA string). */
@@ -1207,6 +1214,7 @@ interface BaseViewProps<TConfig = unknown> {
1207
1214
  onDetailPanelToggle?: (eventId: string | null) => void;
1208
1215
  customDetailPanelContent?: EventDetailContentRenderer;
1209
1216
  customEventDetailDialog?: EventDetailDialogRenderer;
1217
+ useEventDetailPanel?: boolean;
1210
1218
  calendarRef: RefObject<HTMLDivElement>;
1211
1219
  switcherMode?: ViewSwitcherMode;
1212
1220
  meta?: Record<string, unknown>;
@@ -1610,6 +1618,7 @@ declare class CalendarApp implements ICalendarApp {
1610
1618
  private navigation;
1611
1619
  private pluginManager;
1612
1620
  private useEventDetailDialog;
1621
+ private useEventDetailPanel;
1613
1622
  private useCalendarHeader;
1614
1623
  private customMobileEventRenderer?;
1615
1624
  constructor(config: CalendarAppConfig);
@@ -1672,6 +1681,7 @@ declare class CalendarApp implements ICalendarApp {
1672
1681
  getViewConfig: (viewType: CalendarViewType) => Record<string, unknown>;
1673
1682
  getCalendarRegistry: () => CalendarRegistry;
1674
1683
  getUseEventDetailDialog: () => boolean;
1684
+ getUseEventDetailPanel: () => boolean;
1675
1685
  getCustomMobileEventRenderer: () => MobileEventRenderer | undefined;
1676
1686
  getCalendarHeaderConfig: () => boolean;
1677
1687
  get timeZone(): string;
@@ -2815,7 +2825,7 @@ declare const restoreTimedDragFromAllDayTransition: ({ wasOriginallyAllDay, mous
2815
2825
 
2816
2826
  declare function normalizeTimeZoneValue(timeZone?: TimeZoneValue): string | undefined;
2817
2827
 
2818
- type SyncableCalendarAppConfig = Pick<CalendarAppConfig, 'allDaySortComparator' | 'calendars' | 'customMobileEventRenderer' | 'locale' | 'readOnly' | 'switcherMode' | 'theme' | 'timeZone' | 'useCalendarHeader' | 'useEventDetailDialog' | 'views'>;
2828
+ type SyncableCalendarAppConfig = Pick<CalendarAppConfig, 'allDaySortComparator' | 'calendars' | 'customMobileEventRenderer' | 'locale' | 'readOnly' | 'switcherMode' | 'theme' | 'timeZone' | 'useCalendarHeader' | 'useEventDetailDialog' | 'useEventDetailPanel' | 'views'>;
2819
2829
  type CalendarAppConfigSyncSnapshot = {
2820
2830
  callbacks: CalendarAppConfig['callbacks'];
2821
2831
  syncableConfig: SyncableCalendarAppConfig;
@@ -3061,6 +3071,7 @@ interface MultiDayEventSegment {
3061
3071
  isLastSegment: boolean;
3062
3072
  yPosition?: number;
3063
3073
  }
3074
+ declare const getEventIcon: (event: Event) => string | number | bigint | object | null;
3064
3075
 
3065
3076
  interface YearMultiDaySegment {
3066
3077
  id: string;
@@ -3071,6 +3082,35 @@ interface YearMultiDaySegment {
3071
3082
  isLastSegment: boolean;
3072
3083
  visualRowIndex: number;
3073
3084
  }
3085
+ /**
3086
+ * Groups an array of days into rows based on the number of columns per row.
3087
+ */
3088
+ declare function groupDaysIntoRows(yearDays: Date[], columnsPerRow: number): Date[][];
3089
+ /**
3090
+ * Analyzes events for a specific row of days and returns segments for multi-day events.
3091
+ * It also calculates the vertical layout (visualRowIndex) to prevent overlaps.
3092
+ */
3093
+ declare function analyzeMultiDayEventsForRow(events: Event[], rowDays: Date[], columnsPerRow: number, comparator?: (a: Event, b: Event) => number, appTimeZone?: string): YearMultiDaySegment[];
3094
+ interface MonthEventSegment extends YearMultiDaySegment {
3095
+ monthIndex: number;
3096
+ }
3097
+ interface FixedWeekMonthData {
3098
+ monthIndex: number;
3099
+ monthName: string;
3100
+ days: (Date | null)[];
3101
+ monthEvents: Event[];
3102
+ eventSegments: MonthEventSegment[];
3103
+ minHeight: number;
3104
+ }
3105
+ declare const getFixedWeekTotalColumns: (currentYear: number, startOfWeek: number) => number;
3106
+ declare const buildFixedWeekMonthsData: ({ currentYear, locale, totalColumns, yearEvents, startOfWeek, appTimeZone, }: {
3107
+ currentYear: number;
3108
+ locale: string;
3109
+ totalColumns: number;
3110
+ yearEvents: Event[];
3111
+ startOfWeek: number;
3112
+ appTimeZone?: string;
3113
+ }) => FixedWeekMonthData[];
3074
3114
 
3075
3115
  interface CalendarEventProps {
3076
3116
  event: Event;
@@ -3103,6 +3143,8 @@ interface CalendarEventProps {
3103
3143
  customDetailPanelContent?: EventDetailContentRenderer;
3104
3144
  /** Custom event detail dialog component (Dialog mode) */
3105
3145
  customEventDetailDialog?: EventDetailDialogRenderer;
3146
+ /** When false, suppresses the floating event detail panel entirely */
3147
+ useEventDetailPanel?: boolean;
3106
3148
  /** Multi-day regular event segment information */
3107
3149
  multiDaySegmentInfo?: {
3108
3150
  startHour: number;
@@ -3140,7 +3182,7 @@ interface CalendarEventProps {
3140
3182
  appTimeZone?: string;
3141
3183
  }
3142
3184
 
3143
- declare const CalendarEvent: ({ 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, customDetailPanelContent, customEventDetailDialog, multiDaySegmentInfo, app, isMobile, isSlidingView, enableTouch, hideTime, timeFormat, styleOverride, className, disableDefaultStyle, renderVisualContent, resizeHandleOrientation, appTimeZone, }: CalendarEventProps) => preact.JSX.Element;
3185
+ declare const CalendarEvent: ({ 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, customDetailPanelContent, customEventDetailDialog, useEventDetailPanel, multiDaySegmentInfo, app, isMobile, isSlidingView, enableTouch, hideTime, timeFormat, styleOverride, className, disableDefaultStyle, renderVisualContent, resizeHandleOrientation, appTimeZone, }: CalendarEventProps) => preact.JSX.Element;
3144
3186
 
3145
3187
  interface LayoutCalculationParams {
3146
3188
  containerWidth?: number;
@@ -3198,5 +3240,5 @@ declare const sidebarHeaderToggle = "df-sidebar-toggle";
3198
3240
  */
3199
3241
  declare const sidebarHeaderTitle = "df-sidebar-header-title";
3200
3242
 
3201
- export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, 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, buildColorBarGradient, buildDiagonalColorBarGradient, buildDiagonalPatternBackground, 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, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getPrimaryCalendarId, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getSyncConfigUpdates, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, getWeekDaysLabels, getWeekNumber, getWeekRange, 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 };
3202
- 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, GridContextMenuSlotArgs, ICSDateParams, ICSExportOptions, ICSImportOptions, ICSImportResult, ICSParseError, ICSVEvent, ICalendarApp, Locale, LocaleCode, LocaleContextValue, LocaleDict, LocaleMessages, LocaleProviderProps, MobileEventProps, MobileEventRenderer, Mode, MonthDragState, MonthEventDragState, 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, YearViewConfig, YearViewProps, useDragProps, useDragReturn };
3243
+ export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, 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 };
3244
+ 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, MobileEventRenderer, 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 };