@dayflow/core 3.3.0 → 3.3.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 +55 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.components.css +41 -0
- package/dist/styles.css +49 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ interface CalendarType {
|
|
|
41
41
|
isDefault?: boolean;
|
|
42
42
|
/** Whether events of this type should be visible */
|
|
43
43
|
isVisible?: boolean;
|
|
44
|
+
/** Whether this calendar was created by subscribing to a remote ICS URL */
|
|
45
|
+
subscribed?: boolean;
|
|
46
|
+
/** The source of this calendar (e.g., 'Google Calendar', 'iCloud', 'Outlook') */
|
|
47
|
+
source?: string;
|
|
44
48
|
}
|
|
45
49
|
/**
|
|
46
50
|
* Theme mode
|
|
@@ -182,7 +186,7 @@ declare function getCalendarColorsForHex(hex: string): {
|
|
|
182
186
|
};
|
|
183
187
|
|
|
184
188
|
type LocaleCode = string;
|
|
185
|
-
type TranslationKey = 'allDay' | 'noEvents' | 'more' | 'eventTitle' | 'dateRange' | 'timeRange' | 'note' | 'addNotePlaceholder' | 'setAsAllDay' | 'setAsTimed' | 'delete' | 'confirm' | 'cancel' | 'today' | 'day' | 'week' | 'month' | 'year' | 'newEvent' | 'newAllDayEvent' | 'newCalendarEvent' | 'newAllDayCalendarEvent' | 'save' | 'deleteCalendar' | 'deleteCalendarMessage' | 'merge' | 'confirmDeleteTitle' | 'confirmDeleteMessage' | 'mergeConfirmTitle' | 'mergeConfirmMessage' | 'expandSidebar' | 'collapseSidebar' | 'calendars' | 'createCalendar' | 'calendarNamePlaceholder' | 'customColor' | 'create' | 'calendarOptions' | 'untitled' | 'search' | 'noResults' | 'calendar' | 'starts' | 'ends' | 'notes' | 'titlePlaceholder' | 'notesPlaceholder' | 'editEvent' | 'viewEvent' | 'done' | 'quickCreateEvent' | 'quickCreatePlaceholder' | 'noSuggestions' | 'newCalendar' | 'refreshAll' | 'tomorrow' | 'importCalendar' | 'exportCalendar' | 'addSchedule' | 'importCalendarMessage' | 'ok' | 'cut' | 'copy' | 'pasteHere' | 'eventSummary';
|
|
189
|
+
type TranslationKey = 'allDay' | 'noEvents' | 'more' | 'eventTitle' | 'dateRange' | 'timeRange' | 'note' | 'addNotePlaceholder' | 'setAsAllDay' | 'setAsTimed' | 'delete' | 'confirm' | 'cancel' | 'today' | 'day' | 'week' | 'month' | 'year' | 'newEvent' | 'newAllDayEvent' | 'newCalendarEvent' | 'newAllDayCalendarEvent' | 'save' | 'deleteCalendar' | 'deleteCalendarMessage' | 'merge' | 'confirmDeleteTitle' | 'confirmDeleteMessage' | 'mergeConfirmTitle' | 'mergeConfirmMessage' | 'expandSidebar' | 'collapseSidebar' | 'calendars' | 'createCalendar' | 'calendarNamePlaceholder' | 'customColor' | 'create' | 'calendarOptions' | 'untitled' | 'search' | 'noResults' | 'calendar' | 'starts' | 'ends' | 'notes' | 'titlePlaceholder' | 'notesPlaceholder' | 'editEvent' | 'viewEvent' | 'done' | 'quickCreateEvent' | 'quickCreatePlaceholder' | 'noSuggestions' | 'newCalendar' | 'refreshAll' | 'tomorrow' | 'importCalendar' | 'exportCalendar' | 'addSchedule' | 'importCalendarMessage' | 'ok' | 'cut' | 'copy' | 'pasteHere' | 'eventSummary' | 'subscribeCalendar' | 'subscribeCalendarTitle' | 'calendarUrl' | 'calendarUrlPlaceholder' | 'subscribe' | 'fetchingCalendar' | 'subscribeError';
|
|
186
190
|
type LocaleDict = Partial<Record<TranslationKey, string>>;
|
|
187
191
|
type LocaleMessages = Partial<Record<TranslationKey, string>>;
|
|
188
192
|
interface Locale {
|
|
@@ -420,6 +424,11 @@ interface EventContentSlotArgs {
|
|
|
420
424
|
* Calendar application configuration
|
|
421
425
|
* Used to initialize CalendarApp
|
|
422
426
|
*/
|
|
427
|
+
/**
|
|
428
|
+
* Comparator function for sorting all-day events across all views.
|
|
429
|
+
* Return negative if `a` should appear before `b`, positive if after, 0 if equal.
|
|
430
|
+
*/
|
|
431
|
+
type AllDaySortComparator = (a: Event, b: Event) => number;
|
|
423
432
|
interface CalendarAppConfig {
|
|
424
433
|
views: CalendarView[];
|
|
425
434
|
plugins?: CalendarPlugin[];
|
|
@@ -436,6 +445,8 @@ interface CalendarAppConfig {
|
|
|
436
445
|
customMobileEventRenderer?: MobileEventRenderer;
|
|
437
446
|
locale?: string | Locale;
|
|
438
447
|
readOnly?: boolean | ReadOnlyConfig;
|
|
448
|
+
/** Custom sort comparator for all-day events, applied in day/week/month/year views. */
|
|
449
|
+
allDaySortComparator?: AllDaySortComparator;
|
|
439
450
|
}
|
|
440
451
|
/**
|
|
441
452
|
* Read-only configuration
|
|
@@ -460,6 +471,7 @@ interface CalendarAppState {
|
|
|
460
471
|
selectedEventId?: string | null;
|
|
461
472
|
readOnly: boolean | ReadOnlyConfig;
|
|
462
473
|
overrides: string[];
|
|
474
|
+
allDaySortComparator?: AllDaySortComparator;
|
|
463
475
|
}
|
|
464
476
|
/**
|
|
465
477
|
* Calendar application instance
|
|
@@ -711,6 +723,11 @@ interface UnifiedDragRef extends DragRef {
|
|
|
711
723
|
eventDurationDays?: number;
|
|
712
724
|
currentSegmentDays?: number;
|
|
713
725
|
startDragDayIndex?: number;
|
|
726
|
+
initialIndicatorLeft?: number;
|
|
727
|
+
initialIndicatorTop?: number;
|
|
728
|
+
initialIndicatorWidth?: number;
|
|
729
|
+
initialIndicatorHeight?: number;
|
|
730
|
+
indicatorContainer?: HTMLElement | null;
|
|
714
731
|
calendarId?: string;
|
|
715
732
|
title?: string;
|
|
716
733
|
}
|
|
@@ -2743,6 +2760,39 @@ declare function downloadICS(events: Event[], options?: ICSExportOptions): void;
|
|
|
2743
2760
|
*/
|
|
2744
2761
|
declare function importICSFile(file: File, options?: ICSImportOptions): Promise<ICSImportResult>;
|
|
2745
2762
|
|
|
2763
|
+
declare const getAllDayRangeMetrics: (event: Event) => {
|
|
2764
|
+
startDay: Date;
|
|
2765
|
+
endDay: Date;
|
|
2766
|
+
isMultiDay: boolean;
|
|
2767
|
+
};
|
|
2768
|
+
/**
|
|
2769
|
+
* Sort all-day events alphabetically by title.
|
|
2770
|
+
* Exported so React consumers can pass a stable comparator reference.
|
|
2771
|
+
*/
|
|
2772
|
+
declare const sortAllDayByTitle: (a: Event, b: Event) => number;
|
|
2773
|
+
declare const compareAllDayDisplayPriority: (a: Event, b: Event, comparator?: (a: Event, b: Event) => number) => number;
|
|
2774
|
+
declare const createAllDayDisplayComparator: (events: Event[], comparator?: (a: Event, b: Event) => number) => (a: Event, b: Event) => number;
|
|
2775
|
+
|
|
2776
|
+
interface RestoreTimedDragOptions {
|
|
2777
|
+
wasOriginallyAllDay: boolean;
|
|
2778
|
+
mouseHour: number;
|
|
2779
|
+
hourOffset: number | null | undefined;
|
|
2780
|
+
duration: number;
|
|
2781
|
+
originalStartHour: number;
|
|
2782
|
+
originalEndHour: number;
|
|
2783
|
+
firstHour: number;
|
|
2784
|
+
lastHour: number;
|
|
2785
|
+
minDuration: number;
|
|
2786
|
+
roundToTimeStep: (hour: number) => number;
|
|
2787
|
+
}
|
|
2788
|
+
interface RestoredTimedDragState {
|
|
2789
|
+
startHour: number;
|
|
2790
|
+
endHour: number;
|
|
2791
|
+
duration: number;
|
|
2792
|
+
hourOffset: number;
|
|
2793
|
+
}
|
|
2794
|
+
declare const restoreTimedDragFromAllDayTransition: ({ wasOriginallyAllDay, mouseHour, hourOffset, duration, originalStartHour, originalEndHour, firstHour, lastHour, minDuration, roundToTimeStep, }: RestoreTimedDragOptions) => RestoredTimedDragState;
|
|
2795
|
+
|
|
2746
2796
|
/**
|
|
2747
2797
|
* Core translation function.
|
|
2748
2798
|
* 1. Try Intl API for standard terms.
|
|
@@ -2923,11 +2973,13 @@ interface IconProps {
|
|
|
2923
2973
|
height?: number;
|
|
2924
2974
|
}
|
|
2925
2975
|
declare const ChevronRight: ({ className, width, height, }: IconProps) => preact.JSX.Element;
|
|
2976
|
+
declare const ChevronDown: ({ className, width, height, }: IconProps) => preact.JSX.Element;
|
|
2926
2977
|
declare const Plus: ({ className, width, height }: IconProps) => preact.JSX.Element;
|
|
2927
2978
|
declare const Check: ({ className, width, height }: IconProps) => preact.JSX.Element;
|
|
2928
2979
|
declare const ChevronsUpDown: ({ className, width, height, }: IconProps) => preact.JSX.Element;
|
|
2929
2980
|
declare const PanelRightClose: ({ className, width, height, }: IconProps) => preact.JSX.Element;
|
|
2930
2981
|
declare const PanelRightOpen: ({ className, width, height, }: IconProps) => preact.JSX.Element;
|
|
2982
|
+
declare const AudioLines: ({ className, width, height, }: IconProps) => preact.JSX.Element;
|
|
2931
2983
|
|
|
2932
2984
|
/**
|
|
2933
2985
|
* Cancel button
|
|
@@ -2954,5 +3006,5 @@ declare const sidebarHeaderToggle = "df-sidebar-header-toggle flex h-8 w-8 items
|
|
|
2954
3006
|
*/
|
|
2955
3007
|
declare const sidebarHeaderTitle = "df-sidebar-header-title text-sm font-semibold text-gray-700 dark:text-gray-200";
|
|
2956
3008
|
|
|
2957
|
-
export { BlossomColorPicker, CalendarApp, CalendarRegistry, CalendarRenderer, Check, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, LAYOUT_CONFIG, LOCALES, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildParseRegExp, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, conditionalTheme, convertDateEvent, convertDateEventWithTimeZone, convertToDayFlowEvent, createAllDayEvent, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, 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, formatTemporal, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getCalendarColorsForHex, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getTestEvents, getTimezoneDisplayLabel, getWeekDaysLabels, getWeekNumber, getWeekRange, getZoneId, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, mergeClasses, mergeFormatTemplate, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, parseVEventLines, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, t, temporalToDate, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
|
|
2958
|
-
export type { BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarHeaderProps, CalendarPlugin, CalendarType, CalendarView, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, 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, SubtreeAnalysis, SupportedLang, 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, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearViewConfig, YearViewProps, useDragProps, useDragReturn };
|
|
3009
|
+
export { AudioLines, BlossomColorPicker, CalendarApp, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, LAYOUT_CONFIG, LOCALES, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildParseRegExp, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, conditionalTheme, convertDateEvent, convertDateEventWithTimeZone, convertToDayFlowEvent, createAllDayDisplayComparator, createAllDayEvent, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, 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, formatTemporal, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getAllDayRangeMetrics, getCalendarColorsForHex, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getTestEvents, getTimezoneDisplayLabel, getWeekDaysLabels, getWeekNumber, getWeekRange, getZoneId, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, mergeClasses, mergeFormatTemplate, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, parseVEventLines, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, t, temporalToDate, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
|
|
3010
|
+
export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarHeaderProps, CalendarPlugin, CalendarType, CalendarView, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, 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, SubtreeAnalysis, SupportedLang, 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, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearViewConfig, YearViewProps, useDragProps, useDragReturn };
|