@dayflow/core 3.4.1 → 3.4.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 +52 -12
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +0 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as preact from 'preact';
|
|
2
|
-
import { ComponentChildren, AnyComponent,
|
|
2
|
+
import { ComponentChildren, AnyComponent, RefObject, JSX } from 'preact';
|
|
3
3
|
import { Temporal } from 'temporal-polyfill';
|
|
4
4
|
import * as preact_compat from 'preact/compat';
|
|
5
5
|
export { createPortal } from 'preact/compat';
|
|
@@ -149,6 +149,12 @@ declare class CalendarRegistry {
|
|
|
149
149
|
* Get the default calendar type
|
|
150
150
|
*/
|
|
151
151
|
getDefaultCalendar(): CalendarType;
|
|
152
|
+
/**
|
|
153
|
+
* Get the first writable (non-readOnly, non-subscription) calendar for event creation.
|
|
154
|
+
* Prefers the default calendar; falls back to the first writable calendar.
|
|
155
|
+
* Returns undefined if every calendar is read-only.
|
|
156
|
+
*/
|
|
157
|
+
getDefaultWritableCalendar(): CalendarType | undefined;
|
|
152
158
|
/**
|
|
153
159
|
* Set the current theme
|
|
154
160
|
*/
|
|
@@ -532,7 +538,7 @@ interface CalendarCallbacks {
|
|
|
532
538
|
interface CalendarHeaderProps {
|
|
533
539
|
calendar: ICalendarApp;
|
|
534
540
|
switcherMode?: ViewSwitcherMode;
|
|
535
|
-
onAddCalendar?: (e:
|
|
541
|
+
onAddCalendar?: (e: MouseEvent | TouchEvent | any) => void;
|
|
536
542
|
onSearchChange?: (value: string) => void;
|
|
537
543
|
/** Triggered when search icon is clicked (typically on mobile) */
|
|
538
544
|
onSearchClick?: () => void;
|
|
@@ -552,6 +558,17 @@ interface EventContentSlotArgs {
|
|
|
552
558
|
isDragging: boolean;
|
|
553
559
|
layout?: EventLayout;
|
|
554
560
|
}
|
|
561
|
+
/** Args passed to the eventContextMenu slot renderer. */
|
|
562
|
+
interface EventContextMenuSlotArgs {
|
|
563
|
+
event: Event;
|
|
564
|
+
onClose: () => void;
|
|
565
|
+
}
|
|
566
|
+
/** Args passed to the gridContextMenu slot renderer. */
|
|
567
|
+
interface GridContextMenuSlotArgs {
|
|
568
|
+
date: Date;
|
|
569
|
+
viewType?: ViewType;
|
|
570
|
+
onClose: () => void;
|
|
571
|
+
}
|
|
555
572
|
/**
|
|
556
573
|
* Calendar application configuration
|
|
557
574
|
* Used to initialize CalendarApp
|
|
@@ -1093,7 +1110,7 @@ interface EventDetailPanelProps {
|
|
|
1093
1110
|
/** Whether the event is all-day */
|
|
1094
1111
|
isAllDay: boolean;
|
|
1095
1112
|
/** Event visibility state */
|
|
1096
|
-
eventVisibility: 'visible' | 'sticky-top' | 'sticky-bottom';
|
|
1113
|
+
eventVisibility: 'visible' | 'sticky-top' | 'sticky-bottom' | 'sticky-left' | 'sticky-right';
|
|
1097
1114
|
/** Calendar container reference */
|
|
1098
1115
|
calendarRef: RefObject<HTMLDivElement>;
|
|
1099
1116
|
/** Selected event element reference */
|
|
@@ -1444,13 +1461,6 @@ interface DragPluginConfig {
|
|
|
1444
1461
|
supportedViews: ViewType[];
|
|
1445
1462
|
onEventDrop?: (updatedEvent: Event, originalEvent: Event) => void | Promise<void>;
|
|
1446
1463
|
onEventResize?: (updatedEvent: Event, originalEvent: Event) => void | Promise<void>;
|
|
1447
|
-
/**
|
|
1448
|
-
* Controls cursor position relative to the drag indicator when dragging all-day events
|
|
1449
|
-
* in month/year views.
|
|
1450
|
-
* - `true` (default): cursor anchors to the start (left edge) of the indicator
|
|
1451
|
-
* - `false`: cursor anchors to the center of the indicator
|
|
1452
|
-
*/
|
|
1453
|
-
allDayDragCursorAtStart?: boolean;
|
|
1454
1464
|
[key: string]: unknown;
|
|
1455
1465
|
}
|
|
1456
1466
|
/**
|
|
@@ -1616,6 +1626,7 @@ declare class CustomRenderingStore {
|
|
|
1616
1626
|
private renderings;
|
|
1617
1627
|
private overrides;
|
|
1618
1628
|
private listeners;
|
|
1629
|
+
private overrideListeners;
|
|
1619
1630
|
constructor(initialOverrides?: string[]);
|
|
1620
1631
|
/**
|
|
1621
1632
|
* Register a new custom rendering placeholder.
|
|
@@ -1640,7 +1651,13 @@ declare class CustomRenderingStore {
|
|
|
1640
1651
|
* Called by the framework adapter (React/Vue/etc.)
|
|
1641
1652
|
*/
|
|
1642
1653
|
subscribe(listener: CustomRenderingListener): () => void;
|
|
1654
|
+
/**
|
|
1655
|
+
* Subscribe only to override changes (setOverrides calls).
|
|
1656
|
+
* Used by ContentSlot components to avoid re-rendering on every register/unregister.
|
|
1657
|
+
*/
|
|
1658
|
+
subscribeToOverrides(listener: () => void): () => void;
|
|
1643
1659
|
private notify;
|
|
1660
|
+
private notifyOverrides;
|
|
1644
1661
|
}
|
|
1645
1662
|
|
|
1646
1663
|
declare class CalendarRenderer {
|
|
@@ -2812,6 +2829,29 @@ declare const restoreTimedDragFromAllDayTransition: ({ wasOriginallyAllDay, mous
|
|
|
2812
2829
|
|
|
2813
2830
|
declare function normalizeTimeZoneValue(timeZone?: TimeZoneValue): string | undefined;
|
|
2814
2831
|
|
|
2832
|
+
type SyncableCalendarAppConfig = Pick<CalendarAppConfig, 'allDaySortComparator' | 'calendars' | 'customMobileEventRenderer' | 'locale' | 'readOnly' | 'switcherMode' | 'theme' | 'timeZone' | 'useCalendarHeader' | 'useEventDetailDialog' | 'views'>;
|
|
2833
|
+
type CalendarAppConfigSyncSnapshot = {
|
|
2834
|
+
callbacks: CalendarAppConfig['callbacks'];
|
|
2835
|
+
syncableConfig: SyncableCalendarAppConfig;
|
|
2836
|
+
};
|
|
2837
|
+
type CalendarAppConfigUpdater = {
|
|
2838
|
+
updateConfig: (config: Partial<CalendarAppConfig>) => void;
|
|
2839
|
+
};
|
|
2840
|
+
declare function pickSyncableConfig(config: CalendarAppConfig): SyncableCalendarAppConfig;
|
|
2841
|
+
declare function createConfigSyncSnapshot(config: CalendarAppConfig): CalendarAppConfigSyncSnapshot;
|
|
2842
|
+
declare function getCallbackConfigUpdate(previous: CalendarAppConfig['callbacks'], next: CalendarAppConfig['callbacks']): Pick<CalendarAppConfig, 'callbacks'> | null;
|
|
2843
|
+
declare function getSyncConfigUpdates(previous: SyncableCalendarAppConfig, next: SyncableCalendarAppConfig): Partial<CalendarAppConfig>;
|
|
2844
|
+
declare function syncCalendarAppConfig(app: CalendarAppConfigUpdater, previousSnapshot: CalendarAppConfigSyncSnapshot, config: CalendarAppConfig): CalendarAppConfigSyncSnapshot;
|
|
2845
|
+
|
|
2846
|
+
type CalendarAppConfigGetter = () => CalendarAppConfig;
|
|
2847
|
+
declare function createNormalizedCalendarAppConfigGetter(getConfig: CalendarAppConfigGetter): () => CalendarAppConfig;
|
|
2848
|
+
|
|
2849
|
+
type ViewConfigComparison = {
|
|
2850
|
+
hasChanges: boolean;
|
|
2851
|
+
requiresRender: boolean;
|
|
2852
|
+
};
|
|
2853
|
+
declare const compareViews: (previousView: CalendarView | undefined, nextView: CalendarView) => ViewConfigComparison;
|
|
2854
|
+
|
|
2815
2855
|
interface SubscribeResult {
|
|
2816
2856
|
calendar: CalendarType;
|
|
2817
2857
|
events: Event[];
|
|
@@ -3210,5 +3250,5 @@ declare const sidebarHeaderToggle = "df-sidebar-header-toggle flex h-8 w-8 items
|
|
|
3210
3250
|
*/
|
|
3211
3251
|
declare const sidebarHeaderTitle = "df-sidebar-header-title text-sm font-semibold text-gray-700 dark:text-gray-200";
|
|
3212
3252
|
|
|
3213
|
-
export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, CalendarEvent, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, RangePicker as DayflowRangePicker, DefaultColorPicker, DefaultEventDetailDialog, DefaultEventDetailPanel, EventContextMenu, GridContextMenu, LAYOUT_CONFIG, LOCALES, Loader2, LoadingButton, 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, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, 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, normalizeTimeZoneValue, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, parseVEventLines, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, restoreVisualEventToCanonical, restoreVisualTimedTemporalToCanonical, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, subscribeCalendar, t, temporalToDate, temporalToVisualDate, temporalToVisualTemporal, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
|
|
3214
|
-
export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarEventProps, CalendarHeaderProps, CalendarPlugin, 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, 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, RangePickerProps, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubscribeResult, 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, ZonedRange, useDragProps, useDragReturn };
|
|
3253
|
+
export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, CalendarEvent, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, RangePicker as DayflowRangePicker, DefaultColorPicker, DefaultEventDetailDialog, DefaultEventDetailPanel, EventContextMenu, GridContextMenu, LAYOUT_CONFIG, LOCALES, Loader2, LoadingButton, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildParseRegExp, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, compareViews, conditionalTheme, convertDateEvent, convertDateEventWithTimeZone, 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, formatTemporal, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getAllDayRangeMetrics, getCalendarColorsForHex, getCallbackConfigUpdate, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getSyncConfigUpdates, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, 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, normalizeTimeZoneValue, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, 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, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
|
|
3254
|
+
export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppConfigSyncSnapshot, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarEventProps, CalendarHeaderProps, CalendarPlugin, 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, RangePickerProps, 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, ZonedRange, useDragProps, useDragReturn };
|