@dayflow/core 2.0.7 → 3.0.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 +2555 -39
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +2126 -3107
- package/package.json +21 -32
- package/README.ja.md +0 -47
- package/README.md +0 -49
- package/README.zh.md +0 -47
- package/dist/components/calendarEvent/components/AllDayContent.d.ts +0 -9
- package/dist/components/calendarEvent/components/MonthAllDayContent.d.ts +0 -8
- package/dist/components/calendarEvent/components/MonthRegularContent.d.ts +0 -11
- package/dist/components/calendarEvent/components/RegularEventContent.d.ts +0 -20
- package/dist/components/calendarEvent/index.d.ts +0 -4
- package/dist/components/calendarEvent/types.d.ts +0 -48
- package/dist/components/common/CalendarHeader.d.ts +0 -4
- package/dist/components/common/CalendarPicker.d.ts +0 -19
- package/dist/components/common/ColorPicker.d.ts +0 -19
- package/dist/components/common/ContextMenu.d.ts +0 -25
- package/dist/components/common/CreateCalendarDialog.d.ts +0 -3
- package/dist/components/common/DefaultEventDetailDialog.d.ts +0 -12
- package/dist/components/common/DefaultEventDetailPanel.d.ts +0 -11
- package/dist/components/common/EventDetailPanelWithContent.d.ts +0 -11
- package/dist/components/common/MiniCalendar.d.ts +0 -11
- package/dist/components/common/QuickCreateEventPopup.d.ts +0 -10
- package/dist/components/common/TodayBox.d.ts +0 -7
- package/dist/components/common/ViewHeader.d.ts +0 -33
- package/dist/components/common/ViewSwitcher.d.ts +0 -8
- package/dist/components/contextMenu/components/EventContextMenu.d.ts +0 -13
- package/dist/components/contextMenu/components/GridContextMenu.d.ts +0 -13
- package/dist/components/contextMenu/components/Primitives.d.ts +0 -41
- package/dist/components/contextMenu/index.d.ts +0 -4
- package/dist/components/contextMenu/utils.d.ts +0 -5
- package/dist/components/dayView/DayContent.d.ts +0 -55
- package/dist/components/dayView/RightPanel.d.ts +0 -16
- package/dist/components/dayView/util.d.ts +0 -8
- package/dist/components/eventLayout/constants.d.ts +0 -8
- package/dist/components/eventLayout/index.d.ts +0 -129
- package/dist/components/eventLayout/types.d.ts +0 -23
- package/dist/components/eventLayout/utils.d.ts +0 -5
- package/dist/components/mobileEventDrawer/DefaultMobileEventDrawer.d.ts +0 -3
- package/dist/components/mobileEventDrawer/components/Switch.d.ts +0 -7
- package/dist/components/mobileEventDrawer/components/TimePickerWheel.d.ts +0 -7
- package/dist/components/mobileEventDrawer/index.d.ts +0 -3
- package/dist/components/monthView/MonthDragIndicator.d.ts +0 -12
- package/dist/components/monthView/MultiDayEvent.d.ts +0 -31
- package/dist/components/monthView/WeekComponent.d.ts +0 -52
- package/dist/components/monthView/util.d.ts +0 -11
- package/dist/components/rangePicker/components/CalendarGrid.d.ts +0 -13
- package/dist/components/rangePicker/components/CalendarHeader.d.ts +0 -11
- package/dist/components/rangePicker/components/RangePickerPanel.d.ts +0 -25
- package/dist/components/rangePicker/components/TimeSelector.d.ts +0 -21
- package/dist/components/rangePicker/constants.d.ts +0 -5
- package/dist/components/rangePicker/index.d.ts +0 -4
- package/dist/components/rangePicker/types.d.ts +0 -23
- package/dist/components/rangePicker/utils.d.ts +0 -2
- package/dist/components/search/MobileSearchDialog.d.ts +0 -14
- package/dist/components/search/SearchDrawer.d.ts +0 -13
- package/dist/components/search/SearchResultsList.d.ts +0 -11
- package/dist/components/sidebar/DefaultCalendarSidebar.d.ts +0 -4
- package/dist/components/sidebar/components/CalendarList.d.ts +0 -16
- package/dist/components/sidebar/components/DeleteCalendarDialog.d.ts +0 -14
- package/dist/components/sidebar/components/ImportCalendarDialog.d.ts +0 -11
- package/dist/components/sidebar/components/MergeCalendarDialog.d.ts +0 -9
- package/dist/components/sidebar/components/MergeMenuItem.d.ts +0 -9
- package/dist/components/sidebar/components/SidebarHeader.d.ts +0 -7
- package/dist/components/weekView/AllDayRow.d.ts +0 -49
- package/dist/components/weekView/DragIndicator/DefaultDragIndicator.d.ts +0 -2
- package/dist/components/weekView/DragIndicator/DragIndicatorComponent.d.ts +0 -7
- package/dist/components/weekView/TimeGrid.d.ts +0 -52
- package/dist/components/weekView/util.d.ts +0 -9
- package/dist/components/yearView/DefaultYearView.d.ts +0 -14
- package/dist/components/yearView/FixedWeekYearView.d.ts +0 -17
- package/dist/components/yearView/YearDayCell.d.ts +0 -13
- package/dist/components/yearView/YearMultiDayEvent.d.ts +0 -22
- package/dist/components/yearView/YearRowComponent.d.ts +0 -26
- package/dist/components/yearView/utils.d.ts +0 -19
- package/dist/contexts/ThemeContext.d.ts +0 -38
- package/dist/core/CalendarApp.d.ts +0 -85
- package/dist/core/DayFlowCalendar.d.ts +0 -20
- package/dist/core/calendarRegistry.d.ts +0 -121
- package/dist/core/config.d.ts +0 -60
- package/dist/core/index.d.ts +0 -6
- package/dist/core/useCalendarApp.d.ts +0 -2
- package/dist/factories/ViewAdapter.d.ts +0 -4
- package/dist/factories/createDayView.d.ts +0 -3
- package/dist/factories/createMonthView.d.ts +0 -3
- package/dist/factories/createWeekView.d.ts +0 -3
- package/dist/factories/createYearView.d.ts +0 -3
- package/dist/factories/index.d.ts +0 -10
- package/dist/hooks/drag/index.d.ts +0 -7
- package/dist/hooks/drag/useDrag.d.ts +0 -2
- package/dist/hooks/drag/useDragCommon.d.ts +0 -2
- package/dist/hooks/drag/useDragHandlers.d.ts +0 -2
- package/dist/hooks/drag/useDragManager.d.ts +0 -2
- package/dist/hooks/drag/useDragState.d.ts +0 -2
- package/dist/hooks/drag/useMonthDrag.d.ts +0 -2
- package/dist/hooks/drag/useWeekDayDrag.d.ts +0 -2
- package/dist/hooks/useCalendarDrop.d.ts +0 -19
- package/dist/hooks/useKeyboardShortcuts.d.ts +0 -12
- package/dist/hooks/virtualScroll/index.d.ts +0 -2
- package/dist/hooks/virtualScroll/useVirtualMonthScroll.d.ts +0 -7
- package/dist/hooks/virtualScroll/useVirtualScroll.d.ts +0 -48
- package/dist/locale/LocaleContext.d.ts +0 -10
- package/dist/locale/LocaleProvider.d.ts +0 -8
- package/dist/locale/index.d.ts +0 -7
- package/dist/locale/intl.d.ts +0 -16
- package/dist/locale/locales/de.d.ts +0 -3
- package/dist/locale/locales/en.d.ts +0 -3
- package/dist/locale/locales/es.d.ts +0 -3
- package/dist/locale/locales/fr.d.ts +0 -3
- package/dist/locale/locales/index.d.ts +0 -18
- package/dist/locale/locales/ja.d.ts +0 -3
- package/dist/locale/locales/ko.d.ts +0 -3
- package/dist/locale/locales/zh.d.ts +0 -3
- package/dist/locale/translator.d.ts +0 -9
- package/dist/locale/types.d.ts +0 -8
- package/dist/locale/useLocale.d.ts +0 -5
- package/dist/locale/utils.d.ts +0 -10
- package/dist/plugins/dragPlugin.d.ts +0 -5
- package/dist/plugins/eventsPlugin.d.ts +0 -3
- package/dist/plugins/index.d.ts +0 -6
- package/dist/setupTests.d.ts +0 -1
- package/dist/styles/classNames.d.ts +0 -381
- package/dist/types/calendar.d.ts +0 -26
- package/dist/types/calendarTypes.d.ts +0 -68
- package/dist/types/config.d.ts +0 -19
- package/dist/types/core.d.ts +0 -265
- package/dist/types/dragIndicator.d.ts +0 -160
- package/dist/types/event.d.ts +0 -18
- package/dist/types/eventDetail.d.ts +0 -74
- package/dist/types/factory.d.ts +0 -156
- package/dist/types/hook.d.ts +0 -103
- package/dist/types/index.d.ts +0 -13
- package/dist/types/layout.d.ts +0 -113
- package/dist/types/mobileEvent.d.ts +0 -21
- package/dist/types/monthView.d.ts +0 -65
- package/dist/types/plugin.d.ts +0 -80
- package/dist/types/search.d.ts +0 -35
- package/dist/utils/calendarDataUtils.d.ts +0 -83
- package/dist/utils/clipboardStore.d.ts +0 -10
- package/dist/utils/colorUtils.d.ts +0 -27
- package/dist/utils/compareUtils.d.ts +0 -5
- package/dist/utils/dateConstants.d.ts +0 -22
- package/dist/utils/dateFormat.d.ts +0 -15
- package/dist/utils/dateRangeUtils.d.ts +0 -24
- package/dist/utils/dateTimeUtils.d.ts +0 -49
- package/dist/utils/eventHelpers.d.ts +0 -143
- package/dist/utils/eventUtils.d.ts +0 -115
- package/dist/utils/helpers.d.ts +0 -27
- package/dist/utils/ics/icsDateUtils.d.ts +0 -37
- package/dist/utils/ics/icsGenerator.d.ts +0 -23
- package/dist/utils/ics/icsParser.d.ts +0 -15
- package/dist/utils/ics/index.d.ts +0 -16
- package/dist/utils/ics/types.d.ts +0 -91
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/logger.d.ts +0 -15
- package/dist/utils/rangePicker.d.ts +0 -8
- package/dist/utils/searchUtils.d.ts +0 -35
- package/dist/utils/styleUtils.d.ts +0 -24
- package/dist/utils/temporal.d.ts +0 -100
- package/dist/utils/temporalTypeGuards.d.ts +0 -63
- package/dist/utils/testDataUtils.d.ts +0 -14
- package/dist/utils/themeUtils.d.ts +0 -93
- package/dist/utils/throttle.d.ts +0 -11
- package/dist/utils/timeUtils.d.ts +0 -38
- package/dist/utils/utilityFunctions.d.ts +0 -11
- package/dist/views/DayView.d.ts +0 -4
- package/dist/views/MonthView.d.ts +0 -4
- package/dist/views/WeekView.d.ts +0 -4
- package/dist/views/YearView.d.ts +0 -15
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { CalendarSearchEvent } from '../types/search';
|
|
2
|
-
/**
|
|
3
|
-
* Helper to get date object from event start
|
|
4
|
-
* @param dateInput Date, string, or Temporal object
|
|
5
|
-
* @returns Date object
|
|
6
|
-
*/
|
|
7
|
-
export declare const getDateObj: (dateInput: any) => Date;
|
|
8
|
-
/**
|
|
9
|
-
* Helper to normalize date (reset time to 00:00:00)
|
|
10
|
-
* @param date Date object
|
|
11
|
-
* @returns Normalized Date object
|
|
12
|
-
*/
|
|
13
|
-
export declare const normalizeDate: (date: Date) => Date;
|
|
14
|
-
/**
|
|
15
|
-
* Helper to get header text and color for a date group in search results
|
|
16
|
-
* @param groupDate The date of the group
|
|
17
|
-
* @param today Reference today date (normalized)
|
|
18
|
-
* @param locale Locale string
|
|
19
|
-
* @param t Translation function
|
|
20
|
-
* @returns Object with title and colorClass
|
|
21
|
-
*/
|
|
22
|
-
export declare const getSearchHeaderInfo: (groupDate: Date, today: Date, locale: string, t: (key: any) => string) => {
|
|
23
|
-
title: string;
|
|
24
|
-
colorClass: string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Helper to group search results by date
|
|
28
|
-
* @param results List of search events
|
|
29
|
-
* @param today Reference today date (normalized)
|
|
30
|
-
* @returns Array of grouped events
|
|
31
|
-
*/
|
|
32
|
-
export declare const groupSearchResults: (results: CalendarSearchEvent[], today: Date) => Array<{
|
|
33
|
-
date: Date;
|
|
34
|
-
events: CalendarSearchEvent[];
|
|
35
|
-
}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Style Utility Functions
|
|
3
|
-
*
|
|
4
|
-
* This module provides utility functions for working with CSS styles.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Normalize a width value to a CSS string
|
|
8
|
-
*
|
|
9
|
-
* Converts numeric values to pixels and validates string values.
|
|
10
|
-
* Returns a default width if the input is invalid.
|
|
11
|
-
*
|
|
12
|
-
* @param width - Width as number (pixels) or CSS string
|
|
13
|
-
* @param defaultWidth - Default width to use if input is invalid (default: '240px')
|
|
14
|
-
* @returns Normalized CSS width string
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* normalizeCssWidth(300) // '300px'
|
|
19
|
-
* normalizeCssWidth('20rem') // '20rem'
|
|
20
|
-
* normalizeCssWidth('') // '240px'
|
|
21
|
-
* normalizeCssWidth(undefined) // '240px'
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare function normalizeCssWidth(width?: number | string, defaultWidth?: string): string;
|
package/dist/utils/temporal.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Temporal API utility functions
|
|
3
|
-
* Provides date-time processing, conversion, and compatibility support
|
|
4
|
-
*/
|
|
5
|
-
import { Temporal } from 'temporal-polyfill';
|
|
6
|
-
/**
|
|
7
|
-
* Check if value is Temporal.PlainDate
|
|
8
|
-
* Uses multiple methods to check, handling polyfill and serialization issues
|
|
9
|
-
*/
|
|
10
|
-
export declare function isPlainDate(date: any): date is Temporal.PlainDate;
|
|
11
|
-
/**
|
|
12
|
-
* Check if value is Temporal.ZonedDateTime
|
|
13
|
-
*/
|
|
14
|
-
export declare function isZonedDateTime(date: any): date is Temporal.ZonedDateTime;
|
|
15
|
-
/**
|
|
16
|
-
* Check if value is Date object
|
|
17
|
-
*/
|
|
18
|
-
export declare function isDate(value: any): value is Date;
|
|
19
|
-
/**
|
|
20
|
-
* Convert Date to Temporal.ZonedDateTime
|
|
21
|
-
* @param date Date object
|
|
22
|
-
* @param timeZone Timezone (defaults to system timezone)
|
|
23
|
-
* @returns Temporal.ZonedDateTime
|
|
24
|
-
*/
|
|
25
|
-
export declare function dateToZonedDateTime(date: Date, timeZone?: string): Temporal.ZonedDateTime;
|
|
26
|
-
/**
|
|
27
|
-
* Convert Date to Temporal.PlainDate
|
|
28
|
-
* @param date Date object
|
|
29
|
-
* @returns Temporal.PlainDate
|
|
30
|
-
*/
|
|
31
|
-
export declare function dateToPlainDate(date: Date): Temporal.PlainDate;
|
|
32
|
-
/**
|
|
33
|
-
* Convert Temporal.ZonedDateTime to Date
|
|
34
|
-
* @param zdt Temporal.ZonedDateTime
|
|
35
|
-
* @returns Date object
|
|
36
|
-
*/
|
|
37
|
-
export declare function zonedDateTimeToDate(zdt: Temporal.ZonedDateTime): Date;
|
|
38
|
-
/**
|
|
39
|
-
* Convert Temporal.PlainDate to Date
|
|
40
|
-
* @param plainDate Temporal.PlainDate
|
|
41
|
-
* @param timeZone Timezone (optional)
|
|
42
|
-
* @returns Date object (time set to 00:00:00)
|
|
43
|
-
*/
|
|
44
|
-
export declare function plainDateToDate(plainDate: Temporal.PlainDate, timeZone?: string): Date;
|
|
45
|
-
/**
|
|
46
|
-
* Convert Temporal (PlainDate | PlainDateTime | ZonedDateTime) or Date to Date
|
|
47
|
-
* @param temporal Temporal date-time object or native Date
|
|
48
|
-
* @param timeZone Timezone (optional, only used for PlainDate)
|
|
49
|
-
* @returns Date object
|
|
50
|
-
*/
|
|
51
|
-
export declare function temporalToDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, timeZone?: string): Date;
|
|
52
|
-
/**
|
|
53
|
-
* Extract hour number (with decimals) from Temporal object
|
|
54
|
-
* @param temporal Temporal time object
|
|
55
|
-
* @returns Hour number (0-24, supports decimals), returns 0 if PlainDate
|
|
56
|
-
*/
|
|
57
|
-
export declare function extractHourFromTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): number;
|
|
58
|
-
/**
|
|
59
|
-
* Create new Temporal object with specified hour
|
|
60
|
-
* @param temporal Base Temporal object
|
|
61
|
-
* @param hour Hour number (supports decimals)
|
|
62
|
-
* @returns New Temporal (PlainDateTime or ZonedDateTime)
|
|
63
|
-
*/
|
|
64
|
-
export declare function createTemporalWithHour(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, hour: number): Temporal.PlainDateTime | Temporal.ZonedDateTime;
|
|
65
|
-
/**
|
|
66
|
-
* Check if two Temporal dates are on the same day
|
|
67
|
-
*/
|
|
68
|
-
export declare function isSamePlainDate(date1: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, date2: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Check if event spans multiple days
|
|
71
|
-
*/
|
|
72
|
-
export declare function isMultiDayTemporalEvent(start: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, end: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Get start time of Temporal date (00:00:00)
|
|
75
|
-
*/
|
|
76
|
-
export declare function getStartOfTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, timeZone?: string): Temporal.ZonedDateTime;
|
|
77
|
-
/**
|
|
78
|
-
* Get end time of Temporal date (23:59:59.999)
|
|
79
|
-
*/
|
|
80
|
-
export declare function getEndOfTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, timeZone?: string): Temporal.ZonedDateTime;
|
|
81
|
-
/**
|
|
82
|
-
* Calculate days difference between two Temporal dates
|
|
83
|
-
*/
|
|
84
|
-
export declare function daysBetween(start: Temporal.PlainDate | Temporal.ZonedDateTime, end: Temporal.PlainDate | Temporal.ZonedDateTime): number;
|
|
85
|
-
/**
|
|
86
|
-
* Calculate days difference between two Date objects (ignoring time component)
|
|
87
|
-
*/
|
|
88
|
-
export declare function daysDifference(date1: Date, date2: Date): number;
|
|
89
|
-
/**
|
|
90
|
-
* Add specified days to a date
|
|
91
|
-
*/
|
|
92
|
-
export declare function addDays(date: Date, days: number): Date;
|
|
93
|
-
/**
|
|
94
|
-
* Get current time (Temporal.ZonedDateTime)
|
|
95
|
-
*/
|
|
96
|
-
export declare function now(timeZone?: string): Temporal.ZonedDateTime;
|
|
97
|
-
/**
|
|
98
|
-
* Get today's date (Temporal.PlainDate)
|
|
99
|
-
*/
|
|
100
|
-
export declare function today(timeZone?: string): Temporal.PlainDate;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Temporal Type Guards and Conversion Utilities
|
|
3
|
-
*
|
|
4
|
-
* This module provides type guards for distinguishing between different Temporal types
|
|
5
|
-
* and unified conversion functions for internal processing.
|
|
6
|
-
*/
|
|
7
|
-
import { Temporal } from 'temporal-polyfill';
|
|
8
|
-
/**
|
|
9
|
-
* Check if temporal is PlainDate (date only, no time)
|
|
10
|
-
*/
|
|
11
|
-
export declare function isPlainDate(temporal: any): temporal is Temporal.PlainDate;
|
|
12
|
-
/**
|
|
13
|
-
* Check if temporal is PlainDateTime (date + time, no timezone)
|
|
14
|
-
*/
|
|
15
|
-
export declare function isPlainDateTime(temporal: any): temporal is Temporal.PlainDateTime;
|
|
16
|
-
/**
|
|
17
|
-
* Check if temporal is ZonedDateTime (date + time + timezone)
|
|
18
|
-
*/
|
|
19
|
-
export declare function isZonedDateTime(temporal: any): temporal is Temporal.ZonedDateTime;
|
|
20
|
-
/**
|
|
21
|
-
* Convert any Temporal type or Date to Date (for internal processing)
|
|
22
|
-
* Handles all three Temporal types and native Date uniformly
|
|
23
|
-
*/
|
|
24
|
-
export declare function temporalToDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): Date;
|
|
25
|
-
/**
|
|
26
|
-
* Convert Date to PlainDate (for all-day events)
|
|
27
|
-
*/
|
|
28
|
-
export declare function dateToPlainDate(date: Date): Temporal.PlainDate;
|
|
29
|
-
/**
|
|
30
|
-
* Convert Date to PlainDateTime (for local events without timezone)
|
|
31
|
-
*/
|
|
32
|
-
export declare function dateToPlainDateTime(date: Date): Temporal.PlainDateTime;
|
|
33
|
-
/**
|
|
34
|
-
* Convert Date to ZonedDateTime (for timezone-aware events)
|
|
35
|
-
*/
|
|
36
|
-
export declare function dateToZonedDateTime(date: Date, timeZone: string): Temporal.ZonedDateTime;
|
|
37
|
-
/**
|
|
38
|
-
* Convert PlainDateTime to Date
|
|
39
|
-
*/
|
|
40
|
-
export declare function plainDateTimeToDate(pdt: Temporal.PlainDateTime): Date;
|
|
41
|
-
/**
|
|
42
|
-
* Convert PlainDate to Date (at midnight)
|
|
43
|
-
*/
|
|
44
|
-
export declare function plainDateToDate(pd: Temporal.PlainDate): Date;
|
|
45
|
-
/**
|
|
46
|
-
* Extract hour from any Temporal type (with decimal for minutes)
|
|
47
|
-
* @returns Hour number (0-24, with decimals, e.g., 14.5 = 14:30)
|
|
48
|
-
*/
|
|
49
|
-
export declare function extractHourFromTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): number;
|
|
50
|
-
/**
|
|
51
|
-
* Create a new Temporal with specified hour (supports PlainDateTime and ZonedDateTime)
|
|
52
|
-
* @param temporal Base temporal object
|
|
53
|
-
* @param hour Hour with decimals (e.g., 14.5 = 14:30)
|
|
54
|
-
*/
|
|
55
|
-
export declare function setHourInTemporal(temporal: Temporal.PlainDateTime | Temporal.ZonedDateTime, hour: number): Temporal.PlainDateTime | Temporal.ZonedDateTime;
|
|
56
|
-
/**
|
|
57
|
-
* Check if two Temporal objects represent the same day
|
|
58
|
-
*/
|
|
59
|
-
export declare function isSameTemporal(t1: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, t2: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Get PlainDate from any Temporal type or Date
|
|
62
|
-
*/
|
|
63
|
-
export declare function getPlainDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): Temporal.PlainDate;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Data Generation Utilities
|
|
3
|
-
*
|
|
4
|
-
* This module provides test/demo event data for calendar development and testing.
|
|
5
|
-
* The generated events are relative to the current week for consistent demo experience.
|
|
6
|
-
*/
|
|
7
|
-
import { Event } from '../types';
|
|
8
|
-
/**
|
|
9
|
-
* Generate test events for calendar demo/testing
|
|
10
|
-
* Events are generated relative to the current week (Monday-Sunday)
|
|
11
|
-
* Includes various overlapping events, all-day events, and edge cases
|
|
12
|
-
* @returns Array of test events
|
|
13
|
-
*/
|
|
14
|
-
export declare function getTestEvents(): Event[];
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Theme Utility Functions
|
|
3
|
-
*
|
|
4
|
-
* This module provides utility functions for working with theme-aware class names.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Combine class names with theme-specific variants
|
|
8
|
-
*
|
|
9
|
-
* @param base - Base class names (applied in both themes)
|
|
10
|
-
* @param light - Light mode specific class names
|
|
11
|
-
* @param dark - Dark mode specific class names (will be prefixed with 'dark:')
|
|
12
|
-
* @returns Combined class name string
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* themeCn('p-4 rounded', 'bg-white text-black', 'bg-gray-900 text-white')
|
|
17
|
-
* // Returns: 'p-4 rounded bg-white text-black dark:bg-gray-900 dark:text-white'
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare const themeCn: (base: string, light: string, dark: string) => string;
|
|
21
|
-
/**
|
|
22
|
-
* Common theme class combinations
|
|
23
|
-
*
|
|
24
|
-
* Pre-defined class combinations for common UI elements.
|
|
25
|
-
* Use these for consistency across the application.
|
|
26
|
-
*/
|
|
27
|
-
export declare const themeClasses: {
|
|
28
|
-
container: string;
|
|
29
|
-
card: string;
|
|
30
|
-
sidebar: string;
|
|
31
|
-
text: string;
|
|
32
|
-
textMuted: string;
|
|
33
|
-
textSubtle: string;
|
|
34
|
-
textEmphasis: string;
|
|
35
|
-
border: string;
|
|
36
|
-
borderLight: string;
|
|
37
|
-
borderStrong: string;
|
|
38
|
-
bgPrimary: string;
|
|
39
|
-
bgSecondary: string;
|
|
40
|
-
bgTertiary: string;
|
|
41
|
-
bgMuted: string;
|
|
42
|
-
hover: string;
|
|
43
|
-
hoverSubtle: string;
|
|
44
|
-
active: string;
|
|
45
|
-
focus: string;
|
|
46
|
-
input: string;
|
|
47
|
-
inputFocus: string;
|
|
48
|
-
buttonPrimary: string;
|
|
49
|
-
buttonSecondary: string;
|
|
50
|
-
buttonDanger: string;
|
|
51
|
-
buttonSuccess: string;
|
|
52
|
-
shadow: string;
|
|
53
|
-
shadowMd: string;
|
|
54
|
-
shadowLg: string;
|
|
55
|
-
divider: string;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Conditional theme class
|
|
59
|
-
*
|
|
60
|
-
* Returns different class names based on a condition.
|
|
61
|
-
*
|
|
62
|
-
* @param condition - Condition to evaluate
|
|
63
|
-
* @param whenTrue - Class names when condition is true
|
|
64
|
-
* @param whenFalse - Class names when condition is false
|
|
65
|
-
* @returns Class name string based on condition
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* conditionalTheme(isActive, 'bg-blue-500 dark:bg-blue-600', 'bg-gray-200 dark:bg-gray-700')
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
export declare const conditionalTheme: (condition: boolean, whenTrue: string, whenFalse: string) => string;
|
|
73
|
-
/**
|
|
74
|
-
* Merge multiple class names, filtering out falsy values
|
|
75
|
-
*
|
|
76
|
-
* @param classes - Array of class names or falsy values
|
|
77
|
-
* @returns Merged class name string
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```ts
|
|
81
|
-
* mergeClasses('p-4', isActive && 'bg-blue-500', 'rounded')
|
|
82
|
-
* // Returns: 'p-4 bg-blue-500 rounded' (if isActive is true)
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
|
-
export declare const mergeClasses: (...classes: (string | undefined | null | false)[]) => string;
|
|
86
|
-
/**
|
|
87
|
-
* Resolve the currently applied theme on the document.
|
|
88
|
-
*
|
|
89
|
-
* This inspects common override hooks (like `data-dayflow-theme-override` or
|
|
90
|
-
* manual `dark`/`light` classes) so host applications can force a theme even
|
|
91
|
-
* when DayFlow is configured in `auto` mode.
|
|
92
|
-
*/
|
|
93
|
-
export declare const resolveAppliedTheme: (effectiveTheme: "light" | "dark") => "light" | "dark";
|
package/dist/utils/throttle.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a throttled function that only invokes the provided function at most once
|
|
3
|
-
* per every wait milliseconds.
|
|
4
|
-
*
|
|
5
|
-
* @param func - The function to throttle
|
|
6
|
-
* @param wait - The number of milliseconds to throttle invocations to
|
|
7
|
-
* @returns The throttled function
|
|
8
|
-
*/
|
|
9
|
-
export declare function throttle<T extends (...args: any[]) => any>(func: T, wait: number): T & {
|
|
10
|
-
cancel: () => void;
|
|
11
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time Utilities
|
|
3
|
-
*
|
|
4
|
-
* This module provides utilities for time formatting, calculations, and time step operations.
|
|
5
|
-
* Handles 24-hour format, time rounding, and special cases like midnight crossings.
|
|
6
|
-
*/
|
|
7
|
-
import { Event } from '../types';
|
|
8
|
-
/**
|
|
9
|
-
* Time step for calendar grid (0.25 = 15 minutes)
|
|
10
|
-
*/
|
|
11
|
-
export declare const TIME_STEP = 0.25;
|
|
12
|
-
/**
|
|
13
|
-
* Format hours and minutes to HH:MM format
|
|
14
|
-
* @param hours Hour number (supports decimals, e.g., 14.5 = 14:30)
|
|
15
|
-
* @param minutes Optional minutes (if not provided, extracted from decimal hours)
|
|
16
|
-
* @returns Formatted time string (e.g., "14:30")
|
|
17
|
-
*/
|
|
18
|
-
export declare const formatTime: (hours: number, minutes?: number) => string;
|
|
19
|
-
/**
|
|
20
|
-
* Format event time range as a string
|
|
21
|
-
* @param event Event object
|
|
22
|
-
* @returns Formatted time range (e.g., "14:00 - 16:00" or "All day")
|
|
23
|
-
*/
|
|
24
|
-
export declare const formatEventTimeRange: (event: Event) => string;
|
|
25
|
-
/**
|
|
26
|
-
* Round hour to nearest time step
|
|
27
|
-
* @param hour Hour number
|
|
28
|
-
* @returns Rounded hour
|
|
29
|
-
*/
|
|
30
|
-
export declare const roundToTimeStep: (hour: number) => number;
|
|
31
|
-
/**
|
|
32
|
-
* Get event end hour (handles cross-day events less than 24 hours)
|
|
33
|
-
* When an event ends exactly at midnight of the next day and duration is less than 24 hours,
|
|
34
|
-
* it should be treated as 24:00 of the current day in week/day views to avoid displaying as next day 00:00.
|
|
35
|
-
* @param event Event object
|
|
36
|
-
* @returns End hour (0-24)
|
|
37
|
-
*/
|
|
38
|
-
export declare const getEventEndHour: (event: Event) => number;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* General Utility Functions
|
|
3
|
-
*
|
|
4
|
-
* This module provides general-purpose utility functions that don't fit
|
|
5
|
-
* into other specialized categories.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Generate unique key (using timestamp and random number combination)
|
|
9
|
-
* @returns Unique key string
|
|
10
|
-
*/
|
|
11
|
-
export declare function generateUniKey(): string;
|
package/dist/views/DayView.d.ts
DELETED
package/dist/views/WeekView.d.ts
DELETED
package/dist/views/YearView.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
|
|
3
|
-
interface YearViewProps {
|
|
4
|
-
app: CalendarApp;
|
|
5
|
-
calendarRef: React.RefObject<HTMLDivElement>;
|
|
6
|
-
customDetailPanelContent?: EventDetailContentRenderer;
|
|
7
|
-
customEventDetailDialog?: EventDetailDialogRenderer;
|
|
8
|
-
config?: any;
|
|
9
|
-
selectedEventId?: string | null;
|
|
10
|
-
onEventSelect?: (eventId: string | null) => void;
|
|
11
|
-
detailPanelEventId?: string | null;
|
|
12
|
-
onDetailPanelToggle?: (eventId: string | null) => void;
|
|
13
|
-
}
|
|
14
|
-
declare const YearView: React.FC<YearViewProps>;
|
|
15
|
-
export default YearView;
|