@dayflow/core 0.1.0
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/LICENSE +21 -0
- package/README.md +392 -0
- package/dist/Old/MonthView.d.ts +8 -0
- package/dist/Old/MonthView.d.ts.map +1 -0
- package/dist/Old/monthView/MonthDragIndicator.d.ts +13 -0
- package/dist/Old/monthView/MonthDragIndicator.d.ts.map +1 -0
- package/dist/Old/monthView/MultiDayEvent.d.ts +26 -0
- package/dist/Old/monthView/MultiDayEvent.d.ts.map +1 -0
- package/dist/Old/monthView/WeekComponent.d.ts +43 -0
- package/dist/Old/monthView/WeekComponent.d.ts.map +1 -0
- package/dist/Old/monthView/util.d.ts +6 -0
- package/dist/Old/monthView/util.d.ts.map +1 -0
- package/dist/Old/src/app/layout.d.ts +7 -0
- package/dist/Old/src/app/layout.d.ts.map +1 -0
- package/dist/Old/src/app/page.d.ts +2 -0
- package/dist/Old/src/app/page.d.ts.map +1 -0
- package/dist/Old/src/app/test/page.d.ts +2 -0
- package/dist/Old/src/app/test/page.d.ts.map +1 -0
- package/dist/Old/src/components/EventLayout.d.ts +134 -0
- package/dist/Old/src/components/EventLayout.d.ts.map +1 -0
- package/dist/Old/src/components/common/TodayBox.d.ts +8 -0
- package/dist/Old/src/components/common/TodayBox.d.ts.map +1 -0
- package/dist/Old/src/components/monthView/MonthDragIndicator.d.ts +13 -0
- package/dist/Old/src/components/monthView/MonthDragIndicator.d.ts.map +1 -0
- package/dist/Old/src/components/monthView/MultiDayEvent.d.ts +26 -0
- package/dist/Old/src/components/monthView/MultiDayEvent.d.ts.map +1 -0
- package/dist/Old/src/components/monthView/WeekComponent.d.ts +43 -0
- package/dist/Old/src/components/monthView/WeekComponent.d.ts.map +1 -0
- package/dist/Old/src/components/monthView/util.d.ts +6 -0
- package/dist/Old/src/components/monthView/util.d.ts.map +1 -0
- package/dist/Old/src/components/weekView/CalendarEvent.d.ts +29 -0
- package/dist/Old/src/components/weekView/CalendarEvent.d.ts.map +1 -0
- package/dist/Old/src/components/weekView/DragIndicator/DefaultDragIndicator.d.ts +3 -0
- package/dist/Old/src/components/weekView/DragIndicator/DefaultDragIndicator.d.ts.map +1 -0
- package/dist/Old/src/components/weekView/DragIndicator/DragIndicatorComponent.d.ts +8 -0
- package/dist/Old/src/components/weekView/DragIndicator/DragIndicatorComponent.d.ts.map +1 -0
- package/dist/Old/src/core/CalendarApp.d.ts +29 -0
- package/dist/Old/src/core/CalendarApp.d.ts.map +1 -0
- package/dist/Old/src/core/CalendarRenderer.d.ts +9 -0
- package/dist/Old/src/core/CalendarRenderer.d.ts.map +1 -0
- package/dist/Old/src/core/config.d.ts +61 -0
- package/dist/Old/src/core/config.d.ts.map +1 -0
- package/dist/Old/src/core/index.d.ts +8 -0
- package/dist/Old/src/core/index.d.ts.map +1 -0
- package/dist/Old/src/core/useCalendarAdapter.d.ts +4 -0
- package/dist/Old/src/core/useCalendarAdapter.d.ts.map +1 -0
- package/dist/Old/src/core/useCalendarApp.d.ts +3 -0
- package/dist/Old/src/core/useCalendarApp.d.ts.map +1 -0
- package/dist/Old/src/factories/ViewAdapter.d.ts +5 -0
- package/dist/Old/src/factories/ViewAdapter.d.ts.map +1 -0
- package/dist/Old/src/factories/createDayView.d.ts +12 -0
- package/dist/Old/src/factories/createDayView.d.ts.map +1 -0
- package/dist/Old/src/factories/createMonthView.d.ts +16 -0
- package/dist/Old/src/factories/createMonthView.d.ts.map +1 -0
- package/dist/Old/src/factories/createWeekView.d.ts +15 -0
- package/dist/Old/src/factories/createWeekView.d.ts.map +1 -0
- package/dist/Old/src/factories/createYearView.d.ts +10 -0
- package/dist/Old/src/factories/createYearView.d.ts.map +1 -0
- package/dist/Old/src/factories/index.d.ts +18 -0
- package/dist/Old/src/factories/index.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/index.d.ts +8 -0
- package/dist/Old/src/hooks/drag/index.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useDrag.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useDrag.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useDragCommon.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useDragCommon.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useDragHandlers.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useDragHandlers.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useDragManager.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useDragManager.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useDragState.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useDragState.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useMonthDrag.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useMonthDrag.d.ts.map +1 -0
- package/dist/Old/src/hooks/drag/useWeekDayDrag.d.ts +3 -0
- package/dist/Old/src/hooks/drag/useWeekDayDrag.d.ts.map +1 -0
- package/dist/Old/src/hooks/virtualScroll/index.d.ts +3 -0
- package/dist/Old/src/hooks/virtualScroll/index.d.ts.map +1 -0
- package/dist/Old/src/hooks/virtualScroll/useVirtualMonthScroll.d.ts +8 -0
- package/dist/Old/src/hooks/virtualScroll/useVirtualMonthScroll.d.ts.map +1 -0
- package/dist/Old/src/hooks/virtualScroll/useVirtualScroll.d.ts +49 -0
- package/dist/Old/src/hooks/virtualScroll/useVirtualScroll.d.ts.map +1 -0
- package/dist/Old/src/plugins/dragPlugin.d.ts +6 -0
- package/dist/Old/src/plugins/dragPlugin.d.ts.map +1 -0
- package/dist/Old/src/plugins/eventsPlugin.d.ts +4 -0
- package/dist/Old/src/plugins/eventsPlugin.d.ts.map +1 -0
- package/dist/Old/src/plugins/index.d.ts +7 -0
- package/dist/Old/src/plugins/index.d.ts.map +1 -0
- package/dist/Old/src/types/calendar.d.ts +27 -0
- package/dist/Old/src/types/calendar.d.ts.map +1 -0
- package/dist/Old/src/types/config.d.ts +20 -0
- package/dist/Old/src/types/config.d.ts.map +1 -0
- package/dist/Old/src/types/core.d.ts +148 -0
- package/dist/Old/src/types/core.d.ts.map +1 -0
- package/dist/Old/src/types/dragIndicator.d.ts +141 -0
- package/dist/Old/src/types/dragIndicator.d.ts.map +1 -0
- package/dist/Old/src/types/event.d.ts +27 -0
- package/dist/Old/src/types/event.d.ts.map +1 -0
- package/dist/Old/src/types/factory.d.ts +148 -0
- package/dist/Old/src/types/factory.d.ts.map +1 -0
- package/dist/Old/src/types/hook.d.ts +104 -0
- package/dist/Old/src/types/hook.d.ts.map +1 -0
- package/dist/Old/src/types/index.d.ts +11 -0
- package/dist/Old/src/types/index.d.ts.map +1 -0
- package/dist/Old/src/types/layout.d.ts +114 -0
- package/dist/Old/src/types/layout.d.ts.map +1 -0
- package/dist/Old/src/types/monthView.d.ts +62 -0
- package/dist/Old/src/types/monthView.d.ts.map +1 -0
- package/dist/Old/src/types/plugin.d.ts +78 -0
- package/dist/Old/src/types/plugin.d.ts.map +1 -0
- package/dist/Old/src/utils/dateFormat.d.ts +15 -0
- package/dist/Old/src/utils/dateFormat.d.ts.map +1 -0
- package/dist/Old/src/utils/helpers.d.ts +89 -0
- package/dist/Old/src/utils/helpers.d.ts.map +1 -0
- package/dist/Old/src/utils/index.d.ts +3 -0
- package/dist/Old/src/utils/index.d.ts.map +1 -0
- package/dist/Old/src/views/DayView.d.ts +8 -0
- package/dist/Old/src/views/DayView.d.ts.map +1 -0
- package/dist/Old/src/views/MonthView.d.ts +8 -0
- package/dist/Old/src/views/MonthView.d.ts.map +1 -0
- package/dist/Old/src/views/WeekView.d.ts +8 -0
- package/dist/Old/src/views/WeekView.d.ts.map +1 -0
- package/dist/Old/src/views/YearView.d.ts +8 -0
- package/dist/Old/src/views/YearView.d.ts.map +1 -0
- package/dist/Old/useVirtualMonthScroll.d.ts +8 -0
- package/dist/Old/useVirtualMonthScroll.d.ts.map +1 -0
- package/dist/components/EventLayout.d.ts +134 -0
- package/dist/components/EventLayout.d.ts.map +1 -0
- package/dist/components/common/ColorPicker.d.ts +17 -0
- package/dist/components/common/ColorPicker.d.ts.map +1 -0
- package/dist/components/common/DefaultEventDetailDialog.d.ts +9 -0
- package/dist/components/common/DefaultEventDetailDialog.d.ts.map +1 -0
- package/dist/components/common/DefaultEventDetailPanel.d.ts +8 -0
- package/dist/components/common/DefaultEventDetailPanel.d.ts.map +1 -0
- package/dist/components/common/EventDetailPanelWithContent.d.ts +12 -0
- package/dist/components/common/EventDetailPanelWithContent.d.ts.map +1 -0
- package/dist/components/common/RangePicker.d.ts +24 -0
- package/dist/components/common/RangePicker.d.ts.map +1 -0
- package/dist/components/common/TodayBox.d.ts +8 -0
- package/dist/components/common/TodayBox.d.ts.map +1 -0
- package/dist/components/common/ViewHeader.d.ts +28 -0
- package/dist/components/common/ViewHeader.d.ts.map +1 -0
- package/dist/components/common/ViewSwitcher.d.ts +9 -0
- package/dist/components/common/ViewSwitcher.d.ts.map +1 -0
- package/dist/components/monthView/MonthDragIndicator.d.ts +13 -0
- package/dist/components/monthView/MonthDragIndicator.d.ts.map +1 -0
- package/dist/components/monthView/MultiDayEvent.d.ts +26 -0
- package/dist/components/monthView/MultiDayEvent.d.ts.map +1 -0
- package/dist/components/monthView/WeekComponent.d.ts +46 -0
- package/dist/components/monthView/WeekComponent.d.ts.map +1 -0
- package/dist/components/monthView/util.d.ts +12 -0
- package/dist/components/monthView/util.d.ts.map +1 -0
- package/dist/components/sidebar/DefaultCalendarSidebar.d.ts +5 -0
- package/dist/components/sidebar/DefaultCalendarSidebar.d.ts.map +1 -0
- package/dist/components/weekView/CalendarEvent.d.ts +43 -0
- package/dist/components/weekView/CalendarEvent.d.ts.map +1 -0
- package/dist/components/weekView/DragIndicator/DefaultDragIndicator.d.ts +3 -0
- package/dist/components/weekView/DragIndicator/DefaultDragIndicator.d.ts.map +1 -0
- package/dist/components/weekView/DragIndicator/DragIndicatorComponent.d.ts +8 -0
- package/dist/components/weekView/DragIndicator/DragIndicatorComponent.d.ts.map +1 -0
- package/dist/core/CalendarApp.d.ts +43 -0
- package/dist/core/CalendarApp.d.ts.map +1 -0
- package/dist/core/CalendarRenderer.d.ts +15 -0
- package/dist/core/CalendarRenderer.d.ts.map +1 -0
- package/dist/core/DayFlowCalendar.d.ts +15 -0
- package/dist/core/DayFlowCalendar.d.ts.map +1 -0
- package/dist/core/calendarRegistry.d.ts +104 -0
- package/dist/core/calendarRegistry.d.ts.map +1 -0
- package/dist/core/config.d.ts +61 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/useCalendarAdapter.d.ts +4 -0
- package/dist/core/useCalendarAdapter.d.ts.map +1 -0
- package/dist/core/useCalendarApp.d.ts +3 -0
- package/dist/core/useCalendarApp.d.ts.map +1 -0
- package/dist/factories/ViewAdapter.d.ts +5 -0
- package/dist/factories/ViewAdapter.d.ts.map +1 -0
- package/dist/factories/createDayView.d.ts +12 -0
- package/dist/factories/createDayView.d.ts.map +1 -0
- package/dist/factories/createMonthView.d.ts +16 -0
- package/dist/factories/createMonthView.d.ts.map +1 -0
- package/dist/factories/createWeekView.d.ts +15 -0
- package/dist/factories/createWeekView.d.ts.map +1 -0
- package/dist/factories/createYearView.d.ts +10 -0
- package/dist/factories/createYearView.d.ts.map +1 -0
- package/dist/factories/index.d.ts +18 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/hooks/drag/index.d.ts +8 -0
- package/dist/hooks/drag/index.d.ts.map +1 -0
- package/dist/hooks/drag/useDrag.d.ts +3 -0
- package/dist/hooks/drag/useDrag.d.ts.map +1 -0
- package/dist/hooks/drag/useDragCommon.d.ts +3 -0
- package/dist/hooks/drag/useDragCommon.d.ts.map +1 -0
- package/dist/hooks/drag/useDragHandlers.d.ts +3 -0
- package/dist/hooks/drag/useDragHandlers.d.ts.map +1 -0
- package/dist/hooks/drag/useDragManager.d.ts +3 -0
- package/dist/hooks/drag/useDragManager.d.ts.map +1 -0
- package/dist/hooks/drag/useDragState.d.ts +3 -0
- package/dist/hooks/drag/useDragState.d.ts.map +1 -0
- package/dist/hooks/drag/useMonthDrag.d.ts +3 -0
- package/dist/hooks/drag/useMonthDrag.d.ts.map +1 -0
- package/dist/hooks/drag/useWeekDayDrag.d.ts +3 -0
- package/dist/hooks/drag/useWeekDayDrag.d.ts.map +1 -0
- package/dist/hooks/useEventCreator.d.ts +63 -0
- package/dist/hooks/useEventCreator.d.ts.map +1 -0
- package/dist/hooks/virtualScroll/index.d.ts +3 -0
- package/dist/hooks/virtualScroll/index.d.ts.map +1 -0
- package/dist/hooks/virtualScroll/useVirtualMonthScroll.d.ts +8 -0
- package/dist/hooks/virtualScroll/useVirtualMonthScroll.d.ts.map +1 -0
- package/dist/hooks/virtualScroll/useVirtualScroll.d.ts +49 -0
- package/dist/hooks/virtualScroll/useVirtualScroll.d.ts.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +125 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +126 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/dragPlugin.d.ts +6 -0
- package/dist/plugins/dragPlugin.d.ts.map +1 -0
- package/dist/plugins/eventsPlugin.d.ts +4 -0
- package/dist/plugins/eventsPlugin.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.d.ts.map +1 -0
- package/dist/styles/calendarClassNames.d.ts +155 -0
- package/dist/styles/calendarClassNames.d.ts.map +1 -0
- package/dist/styles/classNames.d.ts +297 -0
- package/dist/styles/classNames.d.ts.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/types/calendar.d.ts +27 -0
- package/dist/types/calendar.d.ts.map +1 -0
- package/dist/types/calendarTypes.d.ts +69 -0
- package/dist/types/calendarTypes.d.ts.map +1 -0
- package/dist/types/config.d.ts +20 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/core.d.ts +192 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/dragIndicator.d.ts +155 -0
- package/dist/types/dragIndicator.d.ts.map +1 -0
- package/dist/types/event.d.ts +17 -0
- package/dist/types/event.d.ts.map +1 -0
- package/dist/types/eventDetail.d.ts +73 -0
- package/dist/types/eventDetail.d.ts.map +1 -0
- package/dist/types/factory.d.ts +154 -0
- package/dist/types/factory.d.ts.map +1 -0
- package/dist/types/hook.d.ts +104 -0
- package/dist/types/hook.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/layout.d.ts +114 -0
- package/dist/types/layout.d.ts.map +1 -0
- package/dist/types/monthView.d.ts +64 -0
- package/dist/types/monthView.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +78 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/utils/calendarDataUtils.d.ts +84 -0
- package/dist/utils/calendarDataUtils.d.ts.map +1 -0
- package/dist/utils/colorResolver.d.ts +33 -0
- package/dist/utils/colorResolver.d.ts.map +1 -0
- package/dist/utils/colorUtils.d.ts +27 -0
- package/dist/utils/colorUtils.d.ts.map +1 -0
- package/dist/utils/compat.d.ts +60 -0
- package/dist/utils/compat.d.ts.map +1 -0
- package/dist/utils/dateConstants.d.ts +23 -0
- package/dist/utils/dateConstants.d.ts.map +1 -0
- package/dist/utils/dateFormat.d.ts +16 -0
- package/dist/utils/dateFormat.d.ts.map +1 -0
- package/dist/utils/dateRangeUtils.d.ts +25 -0
- package/dist/utils/dateRangeUtils.d.ts.map +1 -0
- package/dist/utils/dateTimeUtils.d.ts +50 -0
- package/dist/utils/dateTimeUtils.d.ts.map +1 -0
- package/dist/utils/eventHelpers.d.ts +144 -0
- package/dist/utils/eventHelpers.d.ts.map +1 -0
- package/dist/utils/eventUtils.d.ts +109 -0
- package/dist/utils/eventUtils.d.ts.map +1 -0
- package/dist/utils/helpers.d.ts +27 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +16 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/rangePicker.d.ts +9 -0
- package/dist/utils/rangePicker.d.ts.map +1 -0
- package/dist/utils/temporal.d.ts +101 -0
- package/dist/utils/temporal.d.ts.map +1 -0
- package/dist/utils/temporalTypeGuards.d.ts +64 -0
- package/dist/utils/temporalTypeGuards.d.ts.map +1 -0
- package/dist/utils/testDataUtils.d.ts +15 -0
- package/dist/utils/testDataUtils.d.ts.map +1 -0
- package/dist/utils/timeUtils.d.ts +39 -0
- package/dist/utils/timeUtils.d.ts.map +1 -0
- package/dist/utils/utilityFunctions.d.ts +12 -0
- package/dist/utils/utilityFunctions.d.ts.map +1 -0
- package/dist/views/DayView.d.ts +14 -0
- package/dist/views/DayView.d.ts.map +1 -0
- package/dist/views/MonthView.d.ts +14 -0
- package/dist/views/MonthView.d.ts.map +1 -0
- package/dist/views/WeekView.d.ts +14 -0
- package/dist/views/WeekView.d.ts.map +1 -0
- package/dist/views/YearView.d.ts +8 -0
- package/dist/views/YearView.d.ts.map +1 -0
- package/package.json +94 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jayce Li
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# DayFlow
|
|
2
|
+
|
|
3
|
+
A flexible and feature-rich calendar component library for React applications with drag-and-drop support, multiple views, and plugin architecture.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/dayflow)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## ✨ Features
|
|
9
|
+
|
|
10
|
+
- 📅 **Multiple Views**: Day, Week, Month, and Year views
|
|
11
|
+
- 🎨 **Customizable Styling**: Built with Tailwind CSS for easy customization
|
|
12
|
+
- 📱 **Responsive Design**: Works seamlessly on desktop, tablet, and mobile
|
|
13
|
+
- 🔌 **Plugin Architecture**: Extensible plugin system for custom functionality
|
|
14
|
+
- 🎯 **Drag & Drop Support**: Intuitive event management with drag and drop
|
|
15
|
+
- ⚡ **TypeScript Support**: Fully typed for better developer experience
|
|
16
|
+
- 🎨 **Event Management**: Create, update, delete, and organize events
|
|
17
|
+
- 🔄 **Virtual Scrolling**: High performance with large datasets
|
|
18
|
+
- 🎭 **Custom Renderers**: Customize event appearance and behavior
|
|
19
|
+
|
|
20
|
+
## 📦 Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install dayflow
|
|
24
|
+
# or
|
|
25
|
+
yarn add dayflow
|
|
26
|
+
# or
|
|
27
|
+
pnpm add dayflow
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 🚀 Quick Start
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { useCalendarApp, DayFlowCalendar } from 'dayflow';
|
|
34
|
+
import { createMonthView, createWeekView, createDayView } from 'dayflow';
|
|
35
|
+
// Import styles
|
|
36
|
+
import 'dayflow/dist/styles.css';
|
|
37
|
+
|
|
38
|
+
function App() {
|
|
39
|
+
const calendar = useCalendarApp({
|
|
40
|
+
views: [createMonthView(), createWeekView(), createDayView()],
|
|
41
|
+
initialDate: new Date(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return <DayFlowCalendar calendar={calendar} />;
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> **Note**: Don't forget to import the CSS file in your application to ensure proper styling.
|
|
49
|
+
|
|
50
|
+
## 📖 Basic Usage
|
|
51
|
+
|
|
52
|
+
### Creating a Calendar with Events
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import {
|
|
56
|
+
useCalendarApp,
|
|
57
|
+
DayFlowCalendar,
|
|
58
|
+
createMonthView,
|
|
59
|
+
} from 'dayflow';
|
|
60
|
+
import 'dayflow/dist/styles.css';
|
|
61
|
+
|
|
62
|
+
function MyCalendar() {
|
|
63
|
+
const calendar = useCalendarApp({
|
|
64
|
+
views: [createMonthView()],
|
|
65
|
+
initialDate: new Date(),
|
|
66
|
+
events: [
|
|
67
|
+
{
|
|
68
|
+
id: 1,
|
|
69
|
+
title: 'Team Meeting',
|
|
70
|
+
date: new Date(2025, 0, 15),
|
|
71
|
+
startHour: 10,
|
|
72
|
+
endHour: 11,
|
|
73
|
+
color: '#3b82f6',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 2,
|
|
77
|
+
title: 'Conference',
|
|
78
|
+
startDate: new Date(2025, 0, 20),
|
|
79
|
+
endDate: new Date(2025, 0, 22),
|
|
80
|
+
isAllDay: true,
|
|
81
|
+
color: '#10b981',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
return <DayFlowCalendar calendar={calendar} />;
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Using Multiple Views
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import {
|
|
94
|
+
useCalendarApp,
|
|
95
|
+
DayFlowCalendar,
|
|
96
|
+
createDayView,
|
|
97
|
+
createWeekView,
|
|
98
|
+
createMonthView,
|
|
99
|
+
createYearView,
|
|
100
|
+
ViewType,
|
|
101
|
+
} from 'dayflow';
|
|
102
|
+
import 'dayflow/dist/styles.css';
|
|
103
|
+
|
|
104
|
+
function MultiViewCalendar() {
|
|
105
|
+
const calendar = useCalendarApp({
|
|
106
|
+
views: [
|
|
107
|
+
createDayView(),
|
|
108
|
+
createWeekView(),
|
|
109
|
+
createMonthView(),
|
|
110
|
+
createYearView(),
|
|
111
|
+
],
|
|
112
|
+
initialView: ViewType.MONTH,
|
|
113
|
+
initialDate: new Date(),
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<div>
|
|
118
|
+
<div className="view-switcher">
|
|
119
|
+
<button onClick={() => calendar.changeView(ViewType.DAY)}>Day</button>
|
|
120
|
+
<button onClick={() => calendar.changeView(ViewType.WEEK)}>Week</button>
|
|
121
|
+
<button onClick={() => calendar.changeView(ViewType.MONTH)}>
|
|
122
|
+
Month
|
|
123
|
+
</button>
|
|
124
|
+
<button onClick={() => calendar.changeView(ViewType.YEAR)}>Year</button>
|
|
125
|
+
</div>
|
|
126
|
+
<DayFlowCalendar calendar={calendar} />
|
|
127
|
+
</div>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Event Callbacks
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
function CalendarWithCallbacks() {
|
|
136
|
+
const calendar = useCalendarApp({
|
|
137
|
+
views: [createMonthView()],
|
|
138
|
+
initialDate: new Date(),
|
|
139
|
+
onEventCreate: event => {
|
|
140
|
+
console.log('Event created:', event);
|
|
141
|
+
// Save to database
|
|
142
|
+
},
|
|
143
|
+
onEventUpdate: event => {
|
|
144
|
+
console.log('Event updated:', event);
|
|
145
|
+
// Update in database
|
|
146
|
+
},
|
|
147
|
+
onEventDelete: eventId => {
|
|
148
|
+
console.log('Event deleted:', eventId);
|
|
149
|
+
// Delete from database
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
return <DayFlowCalendar calendar={calendar} />;
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## 🎨 Customization
|
|
158
|
+
|
|
159
|
+
### Custom Event Colors
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
const events = [
|
|
163
|
+
{
|
|
164
|
+
id: 1,
|
|
165
|
+
title: 'Important Meeting',
|
|
166
|
+
date: new Date(),
|
|
167
|
+
startHour: 9,
|
|
168
|
+
endHour: 10,
|
|
169
|
+
color: '#ef4444', // Red
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 2,
|
|
173
|
+
title: 'Workshop',
|
|
174
|
+
date: new Date(),
|
|
175
|
+
startHour: 14,
|
|
176
|
+
endHour: 16,
|
|
177
|
+
color: '#8b5cf6', // Purple
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Custom Drag Indicator
|
|
183
|
+
|
|
184
|
+
```tsx
|
|
185
|
+
import { DragIndicatorRenderer } from 'dayflow';
|
|
186
|
+
|
|
187
|
+
const customRenderer: DragIndicatorRenderer = {
|
|
188
|
+
renderDefaultContent: props => (
|
|
189
|
+
<div className="custom-drag-indicator">{props.title}</div>
|
|
190
|
+
),
|
|
191
|
+
renderAllDayContent: props => (
|
|
192
|
+
<div className="custom-allday-indicator">All Day: {props.title}</div>
|
|
193
|
+
),
|
|
194
|
+
renderRegularContent: props => (
|
|
195
|
+
<div className="custom-regular-indicator">
|
|
196
|
+
{props.formatTime?.(props.drag.startHour)} - {props.title}
|
|
197
|
+
</div>
|
|
198
|
+
),
|
|
199
|
+
};
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## 📚 API Reference
|
|
203
|
+
|
|
204
|
+
### Core Hooks
|
|
205
|
+
|
|
206
|
+
#### `useCalendarApp(config)`
|
|
207
|
+
|
|
208
|
+
Creates a calendar application instance.
|
|
209
|
+
|
|
210
|
+
**Parameters:**
|
|
211
|
+
|
|
212
|
+
- `config.views`: Array of view factories
|
|
213
|
+
- `config.initialDate`: Initial date to display
|
|
214
|
+
- `config.initialView`: Initial view type
|
|
215
|
+
- `config.events`: Initial events array
|
|
216
|
+
- `config.onEventCreate`: Callback when event is created
|
|
217
|
+
- `config.onEventUpdate`: Callback when event is updated
|
|
218
|
+
- `config.onEventDelete`: Callback when event is deleted
|
|
219
|
+
|
|
220
|
+
**Returns:**
|
|
221
|
+
|
|
222
|
+
- Calendar application instance
|
|
223
|
+
|
|
224
|
+
### View Factories
|
|
225
|
+
|
|
226
|
+
- `createDayView()` - Creates a day view
|
|
227
|
+
- `createWeekView()` - Creates a week view
|
|
228
|
+
- `createMonthView()` - Creates a month view
|
|
229
|
+
- `createYearView()` - Creates a year view
|
|
230
|
+
|
|
231
|
+
### Components
|
|
232
|
+
|
|
233
|
+
- `DayFlowCalendar` - Main calendar rendering component
|
|
234
|
+
- `Event` - Individual event component
|
|
235
|
+
|
|
236
|
+
### Types
|
|
237
|
+
|
|
238
|
+
#### `Event`
|
|
239
|
+
|
|
240
|
+
```typescript
|
|
241
|
+
interface Event {
|
|
242
|
+
id: number;
|
|
243
|
+
title: string;
|
|
244
|
+
date: Date;
|
|
245
|
+
startHour: number;
|
|
246
|
+
endHour: number;
|
|
247
|
+
color?: string;
|
|
248
|
+
isAllDay?: boolean;
|
|
249
|
+
startDate?: Date;
|
|
250
|
+
endDate?: Date;
|
|
251
|
+
day?: number;
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### `ViewType`
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
enum ViewType {
|
|
259
|
+
DAY = 'day',
|
|
260
|
+
WEEK = 'week',
|
|
261
|
+
MONTH = 'month',
|
|
262
|
+
YEAR = 'year',
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## 🔌 Plugins
|
|
267
|
+
|
|
268
|
+
The library includes built-in plugins:
|
|
269
|
+
|
|
270
|
+
- **Events Plugin**: Manages event state and operations
|
|
271
|
+
- **Drag Plugin**: Provides drag-and-drop functionality
|
|
272
|
+
|
|
273
|
+
You can create custom plugins by implementing the `CalendarPlugin` interface.
|
|
274
|
+
|
|
275
|
+
## 🎯 Advanced Usage
|
|
276
|
+
|
|
277
|
+
### Custom Plugin
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
import { CalendarPlugin } from 'dayflow';
|
|
281
|
+
|
|
282
|
+
const myCustomPlugin: CalendarPlugin = {
|
|
283
|
+
name: 'myCustomPlugin',
|
|
284
|
+
initialize: context => {
|
|
285
|
+
// Plugin initialization
|
|
286
|
+
return {
|
|
287
|
+
// Plugin API
|
|
288
|
+
customMethod: () => {
|
|
289
|
+
console.log('Custom method called');
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
const calendar = useCalendarApp({
|
|
296
|
+
views: [createMonthView()],
|
|
297
|
+
plugins: [myCustomPlugin],
|
|
298
|
+
});
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Virtual Scrolling
|
|
302
|
+
|
|
303
|
+
The calendar automatically uses virtual scrolling for better performance with large datasets, especially in Month and Year views.
|
|
304
|
+
|
|
305
|
+
## 🧪 Testing
|
|
306
|
+
|
|
307
|
+
DayFlow includes comprehensive testing support:
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
# Run all tests
|
|
311
|
+
npm test
|
|
312
|
+
|
|
313
|
+
# Run tests in watch mode
|
|
314
|
+
npm run test:watch
|
|
315
|
+
|
|
316
|
+
# Generate coverage report
|
|
317
|
+
npm run test:coverage
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Example test:
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
import { CalendarApp } from 'dayflow';
|
|
324
|
+
import { ViewType } from 'dayflow/types';
|
|
325
|
+
|
|
326
|
+
describe('Calendar Events', () => {
|
|
327
|
+
it('should add an event', () => {
|
|
328
|
+
const app = new CalendarApp({
|
|
329
|
+
views: [createMonthView()],
|
|
330
|
+
events: [],
|
|
331
|
+
defaultView: ViewType.MONTH,
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
app.addEvent({
|
|
335
|
+
id: 'test-1',
|
|
336
|
+
title: 'Test Event',
|
|
337
|
+
start: new Date(),
|
|
338
|
+
end: new Date(),
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
expect(app.getAllEvents()).toHaveLength(1);
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
See the [Testing Guide](./docs/testing.md) for more information.
|
|
347
|
+
|
|
348
|
+
## ⚡ Performance
|
|
349
|
+
|
|
350
|
+
### Bundle Size
|
|
351
|
+
|
|
352
|
+
- ESM bundle: ~237KB (minified)
|
|
353
|
+
- Gzipped: ~65KB
|
|
354
|
+
- Tree-shakeable for optimal bundle size
|
|
355
|
+
|
|
356
|
+
### Optimization Tips
|
|
357
|
+
|
|
358
|
+
1. **Import only what you need**: Tree-shaking eliminates unused code
|
|
359
|
+
2. **Use virtual scrolling**: Automatically enabled for large datasets
|
|
360
|
+
3. **Lazy load views**: Use React.lazy() for code splitting
|
|
361
|
+
4. **Optimize events**: Filter events by visible date range
|
|
362
|
+
|
|
363
|
+
```typescript
|
|
364
|
+
// Good - Only import what you need
|
|
365
|
+
import { useCalendarApp } from 'dayflow';
|
|
366
|
+
import { createMonthView } from 'dayflow/factories';
|
|
367
|
+
|
|
368
|
+
// Analyze bundle size
|
|
369
|
+
npm run build // Generates bundle-analysis.html
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
See the [Performance Guide](./docs/optimization.md) for detailed optimization strategies.
|
|
373
|
+
|
|
374
|
+
## 🤝 Contributing
|
|
375
|
+
|
|
376
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
377
|
+
|
|
378
|
+
## 📄 License
|
|
379
|
+
|
|
380
|
+
MIT © [Jayce Li](https://github.com/JayceV552)
|
|
381
|
+
|
|
382
|
+
## 🐛 Bug Reports
|
|
383
|
+
|
|
384
|
+
If you find a bug, please file an issue on [GitHub Issues](https://github.com/JayceV552/DayFlow/issues).
|
|
385
|
+
|
|
386
|
+
## 📮 Support
|
|
387
|
+
|
|
388
|
+
For questions and support, please open an issue on GitHub.
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
Made with ❤️ by Jayce Li
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthView.d.ts","sourceRoot":"","sources":["../../src/Old/MonthView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,WAAW,EAAY,MAAM,QAAQ,CAAC;AAY/C,UAAU,cAAc;IACtB,GAAG,EAAE,WAAW,CAAC;CAClB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA+LvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WeekEvent } from '@/types';
|
|
3
|
+
interface MonthDragIndicatorProps {
|
|
4
|
+
event: WeekEvent;
|
|
5
|
+
isCreating: boolean;
|
|
6
|
+
targetDate: Date | null;
|
|
7
|
+
isMultiDay?: boolean;
|
|
8
|
+
startDate?: Date | null;
|
|
9
|
+
endDate?: Date | null;
|
|
10
|
+
}
|
|
11
|
+
declare const MonthDragIndicatorComponent: React.FC<MonthDragIndicatorProps>;
|
|
12
|
+
export default MonthDragIndicatorComponent;
|
|
13
|
+
//# sourceMappingURL=MonthDragIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthDragIndicator.d.ts","sourceRoot":"","sources":["../../../src/Old/monthView/MonthDragIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,UAAU,uBAAuB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACvB;AAUD,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqDlE,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WeekEvent } from '@/types';
|
|
3
|
+
export interface MultiDayEventSegment {
|
|
4
|
+
id: string;
|
|
5
|
+
originalEventId: number;
|
|
6
|
+
event: WeekEvent;
|
|
7
|
+
startDayIndex: number;
|
|
8
|
+
endDayIndex: number;
|
|
9
|
+
segmentType: 'start' | 'middle' | 'end' | 'single' | 'start-week-end' | 'end-week-start';
|
|
10
|
+
totalDays: number;
|
|
11
|
+
segmentIndex: number;
|
|
12
|
+
isFirstSegment: boolean;
|
|
13
|
+
isLastSegment: boolean;
|
|
14
|
+
yPosition?: number;
|
|
15
|
+
}
|
|
16
|
+
interface MultiDayEventProps {
|
|
17
|
+
segment: MultiDayEventSegment;
|
|
18
|
+
segmentIndex: number;
|
|
19
|
+
isDragging: boolean;
|
|
20
|
+
isSelected?: boolean;
|
|
21
|
+
onMoveStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, event: WeekEvent) => void;
|
|
22
|
+
onResizeStart?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, event: WeekEvent, direction: string) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const MultiDayEvent: React.NamedExoticComponent<MultiDayEventProps>;
|
|
25
|
+
export default MultiDayEvent;
|
|
26
|
+
//# sourceMappingURL=MultiDayEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiDayEvent.d.ts","sourceRoot":"","sources":["../../../src/Old/monthView/MultiDayEvent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;IACzF,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACzF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAChH;AAoBD,eAAO,MAAM,aAAa,gDAyHxB,CAAC;AAIH,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MonthEventDragState, WeekEvent } from '@/types';
|
|
3
|
+
import { VirtualWeekItem } from '@/types/monthView';
|
|
4
|
+
import { ViewType } from '@/core';
|
|
5
|
+
export interface MultiDayEventSegment {
|
|
6
|
+
id: string;
|
|
7
|
+
originalEventId: number;
|
|
8
|
+
event: WeekEvent;
|
|
9
|
+
startDayIndex: number;
|
|
10
|
+
endDayIndex: number;
|
|
11
|
+
segmentType: 'start' | 'middle' | 'end' | 'single' | 'start-week-end' | 'end-week-start';
|
|
12
|
+
totalDays: number;
|
|
13
|
+
segmentIndex: number;
|
|
14
|
+
isFirstSegment: boolean;
|
|
15
|
+
isLastSegment: boolean;
|
|
16
|
+
yPosition?: number;
|
|
17
|
+
}
|
|
18
|
+
interface WeekComponentProps {
|
|
19
|
+
currentMonth: string;
|
|
20
|
+
currentYear: number;
|
|
21
|
+
newlyCreatedEventId: number | null;
|
|
22
|
+
screenSize: 'mobile' | 'tablet' | 'desktop';
|
|
23
|
+
isScrolling: boolean;
|
|
24
|
+
isDragging: boolean;
|
|
25
|
+
item: VirtualWeekItem;
|
|
26
|
+
events: WeekEvent[];
|
|
27
|
+
dragState: MonthEventDragState;
|
|
28
|
+
calendarRef: React.RefObject<HTMLDivElement | null>;
|
|
29
|
+
onEventUpdate: (updatedEvent: WeekEvent) => void;
|
|
30
|
+
onEventDelete: (eventId: number) => void;
|
|
31
|
+
onMoveStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, event: WeekEvent) => void;
|
|
32
|
+
onCreateStart: (e: React.MouseEvent, targetDate: Date) => void;
|
|
33
|
+
onResizeStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, event: WeekEvent, direction: string) => void;
|
|
34
|
+
onDetailPanelOpen: () => void;
|
|
35
|
+
onMoreEventsClick?: (date: Date) => void;
|
|
36
|
+
onChangeView?: (view: ViewType) => void;
|
|
37
|
+
onSelectDate?: (date: Date) => void;
|
|
38
|
+
selectedEventId?: number | null;
|
|
39
|
+
onEventSelect?: (eventId: number | null) => void;
|
|
40
|
+
}
|
|
41
|
+
declare const WeekComponent: React.NamedExoticComponent<WeekComponentProps>;
|
|
42
|
+
export default WeekComponent;
|
|
43
|
+
//# sourceMappingURL=WeekComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WeekComponent.d.ts","sourceRoot":"","sources":["../../../src/Old/monthView/WeekComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIlC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;IACzF,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACpD,aAAa,EAAE,CAAC,YAAY,EAAE,SAAS,KAAK,IAAI,CAAC;IACjD,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACzF,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9G,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAClD;AAuID,QAAA,MAAM,aAAa,gDA2QjB,CAAC;AAIH,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WeekEvent } from "@/types";
|
|
2
|
+
import { MultiDayEventSegment } from "@/components/monthView/WeekComponent";
|
|
3
|
+
export declare const getEventIcon: (event: WeekEvent) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const daysDifference: (date1: Date, date2: Date) => number;
|
|
5
|
+
export declare const analyzeMultiDayEventsForWeek: (events: WeekEvent[], weekStart: Date) => MultiDayEventSegment[];
|
|
6
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/Old/monthView/util.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAG5E,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,4CAiB5C,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,OAAO,IAAI,EAAE,OAAO,IAAI,KAAG,MAKzD,CAAC;AAGF,eAAO,MAAM,4BAA4B,GAAI,QAAQ,SAAS,EAAE,EAAE,WAAW,IAAI,KAAG,oBAAoB,EA+DvG,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
export declare const metadata: Metadata;
|
|
4
|
+
export default function RootLayout({ children, }: Readonly<{
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/Old/src/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,eAAe,CAAC;AAYvB,eAAO,MAAM,QAAQ,EAAE,QAGtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,2CAUD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/Old/src/app/page.tsx"],"names":[],"mappings":"AAgGA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAE/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/Old/src/app/test/page.tsx"],"names":[],"mappings":"AA+FA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAE/B"}
|