@dayflow/core 2.0.6 → 2.0.7

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.
Files changed (34) hide show
  1. package/dist/components/calendarEvent/components/MonthRegularContent.d.ts +1 -1
  2. package/dist/components/calendarEvent/components/RegularEventContent.d.ts +1 -1
  3. package/dist/components/calendarEvent/types.d.ts +1 -2
  4. package/dist/components/common/DefaultEventDetailPanel.d.ts +1 -1
  5. package/dist/components/contextMenu/components/EventContextMenu.d.ts +13 -0
  6. package/dist/components/contextMenu/components/GridContextMenu.d.ts +13 -0
  7. package/dist/components/contextMenu/components/Primitives.d.ts +41 -0
  8. package/dist/components/contextMenu/index.d.ts +4 -0
  9. package/dist/components/contextMenu/utils.d.ts +5 -0
  10. package/dist/components/dayView/DayContent.d.ts +1 -1
  11. package/dist/components/dayView/RightPanel.d.ts +1 -1
  12. package/dist/components/monthView/WeekComponent.d.ts +1 -2
  13. package/dist/components/weekView/AllDayRow.d.ts +1 -1
  14. package/dist/components/weekView/TimeGrid.d.ts +1 -1
  15. package/dist/components/yearView/DefaultYearView.d.ts +5 -2
  16. package/dist/components/yearView/FixedWeekYearView.d.ts +5 -2
  17. package/dist/components/yearView/YearDayCell.d.ts +1 -0
  18. package/dist/components/yearView/YearMultiDayEvent.d.ts +1 -2
  19. package/dist/components/yearView/YearRowComponent.d.ts +1 -2
  20. package/dist/hooks/useCalendarDrop.d.ts +1 -2
  21. package/dist/hooks/useKeyboardShortcuts.d.ts +12 -0
  22. package/dist/index.esm.js +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/locale/types.d.ts +1 -1
  25. package/dist/styles.css +29 -33
  26. package/dist/types/factory.d.ts +23 -22
  27. package/dist/utils/clipboardStore.d.ts +10 -0
  28. package/dist/utils/temporal.d.ts +8 -8
  29. package/dist/utils/temporalTypeGuards.d.ts +10 -10
  30. package/dist/views/DayView.d.ts +1 -10
  31. package/dist/views/MonthView.d.ts +1 -8
  32. package/dist/views/WeekView.d.ts +1 -8
  33. package/dist/views/YearView.d.ts +5 -2
  34. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Event } from '@/types';
3
- import { CalendarApp } from '@/core';
3
+ import { CalendarApp } from '@/types';
4
4
  interface MonthRegularContentProps {
5
5
  event: Event;
6
6
  app?: CalendarApp;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Event } from '@/types';
3
- import { CalendarApp } from '@/core';
3
+ import { CalendarApp } from '@/types';
4
4
  interface RegularEventContentProps {
5
5
  event: Event;
6
6
  app?: CalendarApp;
@@ -1,5 +1,4 @@
1
- import { Event, EventLayout, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
2
- import { CalendarApp } from '@/core';
1
+ import { Event, EventLayout, EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
3
2
  import { MultiDayEventSegment } from '../monthView/WeekComponent';
4
3
  export interface CalendarEventProps {
5
4
  event: Event;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { EventDetailPanelProps } from '../../types';
3
- import { CalendarApp } from '@/core';
3
+ import { CalendarApp } from '@/types';
4
4
  interface DefaultEventDetailPanelProps extends EventDetailPanelProps {
5
5
  app?: CalendarApp;
6
6
  }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { Event, CalendarApp } from '@/types';
3
+ interface EventContextMenuProps {
4
+ event: Event;
5
+ x: number;
6
+ y: number;
7
+ onClose: () => void;
8
+ app: CalendarApp;
9
+ onDetailPanelToggle?: (id: string | null) => void;
10
+ detailPanelKey: string;
11
+ }
12
+ declare const EventContextMenu: React.FC<EventContextMenuProps>;
13
+ export default EventContextMenu;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { CalendarApp, ViewType } from '@/types';
3
+ interface GridContextMenuProps {
4
+ x: number;
5
+ y: number;
6
+ date: Date;
7
+ onClose: () => void;
8
+ app: CalendarApp;
9
+ onCreateEvent: () => void;
10
+ viewType?: ViewType;
11
+ }
12
+ declare const GridContextMenu: React.FC<GridContextMenuProps>;
13
+ export default GridContextMenu;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ interface ContextMenuProps {
3
+ x: number;
4
+ y: number;
5
+ onClose: () => void;
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ }
9
+ export declare const ContextMenu: React.ForwardRefExoticComponent<ContextMenuProps & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const ContextMenuItem: React.FC<{
11
+ onClick: () => void;
12
+ children: React.ReactNode;
13
+ icon?: React.ReactNode;
14
+ danger?: boolean;
15
+ disabled?: boolean;
16
+ }>;
17
+ export declare const ContextMenuSeparator: React.FC;
18
+ export declare const ContextMenuLabel: React.FC<{
19
+ children: React.ReactNode;
20
+ }>;
21
+ interface ContextMenuSubProps {
22
+ children: React.ReactNode;
23
+ }
24
+ export declare const ContextMenuSub: React.FC<ContextMenuSubProps>;
25
+ interface ContextMenuSubTriggerProps {
26
+ children: React.ReactNode;
27
+ icon?: React.ReactNode;
28
+ isOpen?: boolean;
29
+ }
30
+ export declare const ContextMenuSubTrigger: React.FC<ContextMenuSubTriggerProps>;
31
+ interface ContextMenuSubContentProps {
32
+ children: React.ReactNode;
33
+ isOpen?: boolean;
34
+ }
35
+ export declare const ContextMenuSubContent: React.FC<ContextMenuSubContentProps>;
36
+ export declare const ContextMenuColorPicker: React.FC<{
37
+ selectedColor?: string;
38
+ onSelect: (color: string) => void;
39
+ onCustomColor?: () => void;
40
+ }>;
41
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './components/Primitives';
2
+ export { default as GridContextMenu } from './components/GridContextMenu';
3
+ export { default as EventContextMenu } from './components/EventContextMenu';
4
+ export * from './utils';
@@ -0,0 +1,5 @@
1
+ import { ViewType, CalendarApp } from '@/types';
2
+ /**
3
+ * Handle pasting an event from the clipboard store or system clipboard
4
+ */
5
+ export declare const handlePasteEvent: (app: CalendarApp, date: Date, viewType?: ViewType) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
2
+ import { CalendarApp } from '@/types';
3
3
  import { Event, EventLayout, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
4
4
  interface DayContentProps {
5
5
  app: CalendarApp;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
2
+ import { CalendarApp } from '@/types';
3
3
  import { Event } from '@/types';
4
4
  interface RightPanelProps {
5
5
  app: CalendarApp;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
3
- import { MonthEventDragState, Event, ViewType, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
2
+ import { MonthEventDragState, Event, ViewType, EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
4
3
  import { VirtualWeekItem } from '@/types/monthView';
5
4
  export interface MultiDayEventSegment {
6
5
  id: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
2
+ import { CalendarApp } from '@/types';
3
3
  import { Event, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
4
4
  interface AllDayRowProps {
5
5
  app: CalendarApp;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
2
+ import { CalendarApp } from '@/types';
3
3
  import { EventLayout, Event, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
4
4
  interface TimeGridProps {
5
5
  app: CalendarApp;
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
3
- import { EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
2
+ import { EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
4
3
  export interface YearViewProps {
5
4
  app: CalendarApp;
6
5
  calendarRef: React.RefObject<HTMLDivElement>;
7
6
  customDetailPanelContent?: EventDetailContentRenderer;
8
7
  customEventDetailDialog?: EventDetailDialogRenderer;
9
8
  config?: any;
9
+ selectedEventId?: string | null;
10
+ onEventSelect?: (eventId: string | null) => void;
11
+ detailPanelEventId?: string | null;
12
+ onDetailPanelToggle?: (eventId: string | null) => void;
10
13
  }
11
14
  export declare const DefaultYearView: React.FC<YearViewProps>;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { CalendarApp } from '@/core';
3
- import { EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
2
+ import { EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
4
3
  interface FixedWeekYearViewProps {
5
4
  app: CalendarApp;
6
5
  calendarRef: React.RefObject<HTMLDivElement>;
@@ -9,6 +8,10 @@ interface FixedWeekYearViewProps {
9
8
  config?: {
10
9
  showTimedEventsInYearView?: boolean;
11
10
  };
11
+ selectedEventId?: string | null;
12
+ onEventSelect?: (eventId: string | null) => void;
13
+ detailPanelEventId?: string | null;
14
+ onDetailPanelToggle?: (eventId: string | null) => void;
12
15
  }
13
16
  export declare const FixedWeekYearView: React.FC<FixedWeekYearViewProps>;
14
17
  export {};
@@ -7,6 +7,7 @@ interface YearDayCellProps {
7
7
  onCreateStart?: (e: React.MouseEvent | React.TouchEvent, targetDate: Date) => void;
8
8
  onMoreEventsClick?: (date: Date) => void;
9
9
  moreCount?: number;
10
+ onContextMenu?: (e: React.MouseEvent, date: Date) => void;
10
11
  }
11
12
  export declare const YearDayCell: React.FC<YearDayCellProps>;
12
13
  export {};
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { Event, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
2
+ import { Event, EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
3
3
  import { YearMultiDaySegment } from './utils';
4
- import { CalendarApp } from '@/core';
5
4
  interface YearMultiDayEventProps {
6
5
  segment: YearMultiDaySegment;
7
6
  columnsPerRow: number;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { Event, MonthEventDragState, EventDetailContentRenderer, EventDetailDialogRenderer } from '@/types';
3
- import { CalendarApp } from '@/core';
2
+ import { Event, MonthEventDragState, EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
4
3
  interface YearRowComponentProps {
5
4
  rowDays: Date[];
6
5
  events: Event[];
@@ -1,5 +1,4 @@
1
- import { CalendarApp } from '../core';
2
- import { Event, CalendarColors } from '../types';
1
+ import { Event, CalendarColors, CalendarApp } from '../types';
3
2
  export interface CalendarDropData {
4
3
  calendarId: string;
5
4
  calendarName: string;
@@ -0,0 +1,12 @@
1
+ import { CalendarApp } from '@/types';
2
+ interface UseKeyboardShortcutsProps {
3
+ app: CalendarApp;
4
+ selectedEventId: string | null;
5
+ setSelectedEventId: (id: string | null) => void;
6
+ detailPanelEventId: string | null;
7
+ setDetailPanelEventId: (id: string | null) => void;
8
+ isDrawerOpen: boolean;
9
+ setIsDrawerOpen: (open: boolean) => void;
10
+ }
11
+ export declare const useKeyboardShortcuts: ({ app, selectedEventId, setSelectedEventId, detailPanelEventId, setDetailPanelEventId, isDrawerOpen, setIsDrawerOpen, }: UseKeyboardShortcutsProps) => void;
12
+ export {};