@dayflow/core 2.0.7 → 3.0.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/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 +14 -24
- package/LICENSE +0 -21
- 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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dayflow/core",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A flexible and feature-rich calendar
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "A flexible and feature-rich calendar engine powered by Preact with drag-and-drop support, multiple views (Day, Week, Month, Year), and plugin architecture",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -23,15 +23,12 @@
|
|
|
23
23
|
"**/*.css"
|
|
24
24
|
],
|
|
25
25
|
"keywords": [
|
|
26
|
-
"react",
|
|
27
26
|
"calendar",
|
|
27
|
+
"preact",
|
|
28
28
|
"schedule",
|
|
29
29
|
"events",
|
|
30
30
|
"typescript",
|
|
31
31
|
"drag-drop",
|
|
32
|
-
"react-calendar",
|
|
33
|
-
"react-full-calendar",
|
|
34
|
-
"react-big-calendar",
|
|
35
32
|
"event-calendar",
|
|
36
33
|
"day-view",
|
|
37
34
|
"week-view",
|
|
@@ -51,51 +48,44 @@
|
|
|
51
48
|
},
|
|
52
49
|
"homepage": "https://github.com/dayflow-js/dayflow#readme",
|
|
53
50
|
"scripts": {
|
|
54
|
-
"dev": "vite --port 5529",
|
|
55
|
-
"
|
|
51
|
+
"dev": "vite --port 5529 --host",
|
|
52
|
+
"prebuild": "rimraf dist",
|
|
53
|
+
"build": "tsc -p tsconfig.build.json && rollup -c --bundleConfigAsCjs",
|
|
54
|
+
"postbuild": "rimraf dist/types",
|
|
56
55
|
"typecheck": "tsc --noEmit",
|
|
57
56
|
"test": "jest",
|
|
58
57
|
"test:watch": "jest --watch",
|
|
59
58
|
"test:coverage": "jest --coverage",
|
|
60
59
|
"prepublishOnly": "npm run typecheck && npm run test && npm run build"
|
|
61
60
|
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"lucide-react": ">=0.400.0",
|
|
64
|
-
"react": ">=18.0.0",
|
|
65
|
-
"react-dom": ">=18.0.0"
|
|
66
|
-
},
|
|
67
61
|
"dependencies": {
|
|
68
|
-
"@dayflow/blossom-color-picker": "^
|
|
69
|
-
"
|
|
62
|
+
"@dayflow/blossom-color-picker": "^2.0.1",
|
|
63
|
+
"preact": "^10.28.3",
|
|
70
64
|
"temporal-polyfill": "^0.3.0",
|
|
71
65
|
"tslib": "^2.8.1"
|
|
72
66
|
},
|
|
73
67
|
"devDependencies": {
|
|
68
|
+
"@preact/preset-vite": "^2.10.3",
|
|
74
69
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
75
70
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
76
71
|
"@rollup/plugin-terser": "^0.4.4",
|
|
77
72
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
78
73
|
"@tailwindcss/postcss": "^4.1.14",
|
|
79
74
|
"@testing-library/jest-dom": "^6.9.1",
|
|
80
|
-
"@testing-library/
|
|
75
|
+
"@testing-library/preact": "^3.2.4",
|
|
81
76
|
"@testing-library/user-event": "^14.6.1",
|
|
82
77
|
"@types/jest": "^29.5.14",
|
|
83
78
|
"@types/lodash": "^4.17.13",
|
|
84
79
|
"@types/node": "^22.10.2",
|
|
85
|
-
"@types/react": "^18.2.66",
|
|
86
|
-
"@types/react-color": "^3.0.13",
|
|
87
|
-
"@types/react-dom": "^18.2.22",
|
|
88
|
-
"@vitejs/plugin-react": "^4.7.0",
|
|
89
80
|
"autoprefixer": "^10.4.21",
|
|
90
81
|
"identity-obj-proxy": "^3.0.0",
|
|
91
82
|
"jest": "^29.7.0",
|
|
92
83
|
"jest-environment-jsdom": "^29.7.0",
|
|
93
|
-
"lucide-react": "^0.552.0",
|
|
94
84
|
"postcss": "^8.5.6",
|
|
95
|
-
"prettier": "^3.
|
|
96
|
-
"
|
|
97
|
-
"react-dom": "^18.3.1",
|
|
85
|
+
"prettier": "^3.8.1",
|
|
86
|
+
"rimraf": "^6.1.2",
|
|
98
87
|
"rollup": "^4.29.1",
|
|
88
|
+
"rollup-plugin-dts": "^6.3.0",
|
|
99
89
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
100
90
|
"rollup-plugin-postcss": "^4.0.2",
|
|
101
91
|
"rollup-plugin-visualizer": "^6.0.5",
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 DayFlow Contributors
|
|
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.ja.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# DayFlow
|
|
2
|
-
|
|
3
|
-
[English](README.md) | [中文](README.zh.md) | **日本語** | [はじめに & コントリビューション](CONTRIBUTING.md)
|
|
4
|
-
|
|
5
|
-
ドラッグ&ドロップ、マルチビュー、プラグインアーキテクチャをサポートする、柔軟で機能豊富なReactカレンダーコンポーネントライブラリ。
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/@dayflow/core)
|
|
8
|
-
[](https://github.com/dayflow-js/dayflow/pulls)
|
|
9
|
-
[](https://github.com/dayflow-js/dayflow/blob/main/LICENSE)
|
|
10
|
-
[](https://discord.gg/9vdFZKJqBb)
|
|
11
|
-
|
|
12
|
-
## 機能
|
|
13
|
-
|
|
14
|
-
### 月次、週次、日次、その他のビュータイプ
|
|
15
|
-
|
|
16
|
-
| 月次 | 週次 |
|
|
17
|
-
|-----------------------------------------|----------------------------------------|
|
|
18
|
-
|  |  |
|
|
19
|
-
|
|
20
|
-
| 日次 | イベントスタックレベル |
|
|
21
|
-
|---------------------------------------|------------------------------------------|
|
|
22
|
-
|  |  |
|
|
23
|
-
|
|
24
|
-
### デフォルトパネル(複数のイベント詳細パネルオプションが利用可能)
|
|
25
|
-
|
|
26
|
-
| 詳細ポップアップ | 詳細ダイアログ |
|
|
27
|
-
|-------------------------------------|--------------------------------------|
|
|
28
|
-
|  |  |
|
|
29
|
-
|
|
30
|
-
### ドラッグ&ドロップとリサイズも簡単
|
|
31
|
-
https://github.com/user-attachments/assets/726a5232-35a8-4fe3-8e7b-4de07c455353
|
|
32
|
-
|
|
33
|
-
https://github.com/user-attachments/assets/957317e5-02d8-4419-a74b-62b7d191e347
|
|
34
|
-
|
|
35
|
-
## コントリビューション
|
|
36
|
-
|
|
37
|
-
コントリビューションは大歓迎です!お気軽に Pull Request を送信してください。
|
|
38
|
-
|
|
39
|
-
## バグ報告
|
|
40
|
-
|
|
41
|
-
バグを見つけた場合は、[GitHub Issues](https://github.com/dayflow-js/dayflow/issues) で問題を報告してください。
|
|
42
|
-
|
|
43
|
-
## サポート
|
|
44
|
-
|
|
45
|
-
質問やサポートについては、GitHub で Issue を開くか、Discord に参加してください。
|
|
46
|
-
|
|
47
|
-
---
|
package/README.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# DayFlow
|
|
2
|
-
|
|
3
|
-
**English** | [中文](README.zh.md) | [日本語](README.ja.md) | [Getting Started & Contributing](CONTRIBUTING.md)
|
|
4
|
-
|
|
5
|
-
A flexible and feature-rich calendar component library for React applications with drag-and-drop support, multiple
|
|
6
|
-
views, and plugin architecture.
|
|
7
|
-
|
|
8
|
-
[](https://www.npmjs.com/package/@dayflow/core)
|
|
9
|
-
[](https://github.com/dayflow-js/dayflow/pulls)
|
|
10
|
-
[](https://github.com/dayflow-js/dayflow/blob/main/LICENSE)
|
|
11
|
-
[](https://discord.gg/9vdFZKJqBb)
|
|
12
|
-
|
|
13
|
-
## Features
|
|
14
|
-
|
|
15
|
-
### Monthly, Weekly, Daily and Various View Types
|
|
16
|
-
|
|
17
|
-
| Monthly | Weekly |
|
|
18
|
-
|------------------------------------------|----------------------------------------|
|
|
19
|
-
|  |  |
|
|
20
|
-
|
|
21
|
-
| Daily | Event Stack Level |
|
|
22
|
-
|---------------------------------------|------------------------------------------|
|
|
23
|
-
|  |  |
|
|
24
|
-
|
|
25
|
-
### Default Panel (with multiple Event Detail Panel options available)
|
|
26
|
-
|
|
27
|
-
| Detail Popup | Detail Dialog |
|
|
28
|
-
|-------------------------------------|--------------------------------------|
|
|
29
|
-
|  |  |
|
|
30
|
-
|
|
31
|
-
### Easy to resize and drag
|
|
32
|
-
https://github.com/user-attachments/assets/726a5232-35a8-4fe3-8e7b-4de07c455353
|
|
33
|
-
|
|
34
|
-
https://github.com/user-attachments/assets/957317e5-02d8-4419-a74b-62b7d191e347
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## Contributing
|
|
38
|
-
|
|
39
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
40
|
-
|
|
41
|
-
## Bug Reports
|
|
42
|
-
|
|
43
|
-
If you find a bug, please file an issue on [GitHub Issues](https://github.com/dayflow-js/dayflow/issues).
|
|
44
|
-
|
|
45
|
-
## Support
|
|
46
|
-
|
|
47
|
-
For questions and support, please open an issue on GitHub or go to discord.
|
|
48
|
-
|
|
49
|
-
---
|
package/README.zh.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# DayFlow
|
|
2
|
-
|
|
3
|
-
[English](README.md) | **中文** | [日本語](README.ja.md) | [快速开始 & 贡献](CONTRIBUTING.md)
|
|
4
|
-
|
|
5
|
-
一个灵活且功能丰富的 React 日历组件库,支持拖拽、多视图和插件架构。
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/@dayflow/core)
|
|
8
|
-
[](https://github.com/dayflow-js/dayflow/pulls)
|
|
9
|
-
[](https://github.com/dayflow-js/dayflow/blob/main/LICENSE)
|
|
10
|
-
[](https://discord.gg/9vdFZKJqBb)
|
|
11
|
-
|
|
12
|
-
## 功能特性
|
|
13
|
-
|
|
14
|
-
### 月视图、周视图、日视图及多种视图类型
|
|
15
|
-
|
|
16
|
-
| 月视图 | 周视图 |
|
|
17
|
-
|-----------------------------------------|----------------------------------------|
|
|
18
|
-
|  |  |
|
|
19
|
-
|
|
20
|
-
| 日视图 | 事件堆叠层级 |
|
|
21
|
-
|---------------------------------------|------------------------------------------|
|
|
22
|
-
|  |  |
|
|
23
|
-
|
|
24
|
-
### 默认面板(提供多种事件详情面板选项)
|
|
25
|
-
|
|
26
|
-
| 详情弹窗 | 详情对话框 |
|
|
27
|
-
|-------------------------------------|--------------------------------------|
|
|
28
|
-
|  |  |
|
|
29
|
-
|
|
30
|
-
### 轻松拖拽与缩放
|
|
31
|
-
https://github.com/user-attachments/assets/726a5232-35a8-4fe3-8e7b-4de07c455353
|
|
32
|
-
|
|
33
|
-
https://github.com/user-attachments/assets/957317e5-02d8-4419-a74b-62b7d191e347
|
|
34
|
-
|
|
35
|
-
## 贡献
|
|
36
|
-
|
|
37
|
-
欢迎贡献!请随意提交 Pull Request。
|
|
38
|
-
|
|
39
|
-
## Bug 反馈
|
|
40
|
-
|
|
41
|
-
如果您发现 Bug,请在 [GitHub Issues](https://github.com/dayflow-js/dayflow/issues) 上提交 issue。
|
|
42
|
-
|
|
43
|
-
## 支持
|
|
44
|
-
|
|
45
|
-
如有问题和支持需求,请在 GitHub 上打开 issue 或加入 discord。
|
|
46
|
-
|
|
47
|
-
---
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Event } from '@/types';
|
|
3
|
-
interface AllDayContentProps {
|
|
4
|
-
event: Event;
|
|
5
|
-
isEditable: boolean;
|
|
6
|
-
onResizeStart?: (e: React.MouseEvent<HTMLDivElement, MouseEvent> | React.TouchEvent<HTMLDivElement>, event: Event, direction: string) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const AllDayContent: React.FC<AllDayContentProps>;
|
|
9
|
-
export default AllDayContent;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Event } from '@/types';
|
|
3
|
-
import { CalendarApp } from '@/types';
|
|
4
|
-
interface MonthRegularContentProps {
|
|
5
|
-
event: Event;
|
|
6
|
-
app?: CalendarApp;
|
|
7
|
-
isEventSelected: boolean;
|
|
8
|
-
hideTime?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const MonthRegularContent: React.FC<MonthRegularContentProps>;
|
|
11
|
-
export default MonthRegularContent;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Event } from '@/types';
|
|
3
|
-
import { CalendarApp } from '@/types';
|
|
4
|
-
interface RegularEventContentProps {
|
|
5
|
-
event: Event;
|
|
6
|
-
app?: CalendarApp;
|
|
7
|
-
multiDaySegmentInfo?: {
|
|
8
|
-
startHour: number;
|
|
9
|
-
endHour: number;
|
|
10
|
-
isFirst: boolean;
|
|
11
|
-
isLast: boolean;
|
|
12
|
-
dayIndex?: number;
|
|
13
|
-
};
|
|
14
|
-
isEditable: boolean;
|
|
15
|
-
isTouchEnabled: boolean;
|
|
16
|
-
isEventSelected: boolean;
|
|
17
|
-
onResizeStart?: (e: React.MouseEvent<HTMLDivElement, MouseEvent> | React.TouchEvent<HTMLDivElement>, event: Event, direction: string) => void;
|
|
18
|
-
}
|
|
19
|
-
declare const RegularEventContent: React.FC<RegularEventContentProps>;
|
|
20
|
-
export default RegularEventContent;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Event, EventLayout, EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
|
|
2
|
-
import { MultiDayEventSegment } from '../monthView/WeekComponent';
|
|
3
|
-
export interface CalendarEventProps {
|
|
4
|
-
event: Event;
|
|
5
|
-
layout?: EventLayout;
|
|
6
|
-
isAllDay?: boolean;
|
|
7
|
-
allDayHeight?: number;
|
|
8
|
-
calendarRef: React.RefObject<HTMLDivElement>;
|
|
9
|
-
isBeingDragged?: boolean;
|
|
10
|
-
isBeingResized?: boolean;
|
|
11
|
-
isDayView?: boolean;
|
|
12
|
-
isMonthView?: boolean;
|
|
13
|
-
isMultiDay?: boolean;
|
|
14
|
-
segment?: MultiDayEventSegment;
|
|
15
|
-
segmentIndex?: number;
|
|
16
|
-
hourHeight: number;
|
|
17
|
-
firstHour: number;
|
|
18
|
-
newlyCreatedEventId?: string | null;
|
|
19
|
-
selectedEventId?: string | null;
|
|
20
|
-
detailPanelEventId?: string | null;
|
|
21
|
-
onMoveStart?: (e: React.MouseEvent<HTMLDivElement, MouseEvent> | React.TouchEvent<HTMLDivElement>, event: Event) => void;
|
|
22
|
-
onResizeStart?: (e: React.MouseEvent<HTMLDivElement, MouseEvent> | React.TouchEvent<HTMLDivElement>, event: Event, direction: string) => void;
|
|
23
|
-
onEventUpdate: (updatedEvent: Event) => void;
|
|
24
|
-
onEventDelete: (eventId: string) => void;
|
|
25
|
-
onDetailPanelOpen?: () => void;
|
|
26
|
-
onEventSelect?: (eventId: string | null) => void;
|
|
27
|
-
onEventLongPress?: (eventId: string) => void;
|
|
28
|
-
onDetailPanelToggle?: (eventId: string | null) => void;
|
|
29
|
-
/** Custom event detail content component (content only, will be wrapped in default panel) */
|
|
30
|
-
customDetailPanelContent?: EventDetailContentRenderer;
|
|
31
|
-
/** Custom event detail dialog component (Dialog mode) */
|
|
32
|
-
customEventDetailDialog?: EventDetailDialogRenderer;
|
|
33
|
-
/** Multi-day regular event segment information */
|
|
34
|
-
multiDaySegmentInfo?: {
|
|
35
|
-
startHour: number;
|
|
36
|
-
endHour: number;
|
|
37
|
-
isFirst: boolean;
|
|
38
|
-
isLast: boolean;
|
|
39
|
-
dayIndex?: number;
|
|
40
|
-
};
|
|
41
|
-
app?: CalendarApp;
|
|
42
|
-
/** Whether the current view is in mobile mode */
|
|
43
|
-
isMobile?: boolean;
|
|
44
|
-
/** Force enable touch interactions regardless of isMobile */
|
|
45
|
-
enableTouch?: boolean;
|
|
46
|
-
/** Whether to hide the time in the event display (Month view regular events only) */
|
|
47
|
-
hideTime?: boolean;
|
|
48
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CalendarRegistry } from '../../core/calendarRegistry';
|
|
3
|
-
export interface CalendarOption {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
export interface CalendarPickerProps {
|
|
8
|
-
options: CalendarOption[];
|
|
9
|
-
value: string;
|
|
10
|
-
onChange: (value: string) => void;
|
|
11
|
-
registry?: CalendarRegistry;
|
|
12
|
-
variant?: 'desktop' | 'mobile';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* CalendarPicker Component
|
|
16
|
-
* Used to select which calendar an event belongs to
|
|
17
|
-
*/
|
|
18
|
-
export declare const CalendarPicker: React.FC<CalendarPickerProps>;
|
|
19
|
-
export default CalendarPicker;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CalendarRegistry } from '../../core/calendarRegistry';
|
|
3
|
-
export interface ColorOption {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ColorPickerProps {
|
|
8
|
-
options: ColorOption[];
|
|
9
|
-
value: string;
|
|
10
|
-
onChange: (value: string) => void;
|
|
11
|
-
registry?: CalendarRegistry;
|
|
12
|
-
variant?: 'desktop' | 'mobile';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* ColorPicker Component
|
|
16
|
-
* Used to select label colors in calendar or task systems
|
|
17
|
-
*/
|
|
18
|
-
export declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
19
|
-
export default ColorPicker;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
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
|
-
}>;
|
|
16
|
-
export declare const ContextMenuSeparator: React.FC;
|
|
17
|
-
export declare const ContextMenuLabel: React.FC<{
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
}>;
|
|
20
|
-
export declare const ContextMenuColorPicker: React.FC<{
|
|
21
|
-
selectedColor?: string;
|
|
22
|
-
onSelect: (color: string) => void;
|
|
23
|
-
onCustomColor?: () => void;
|
|
24
|
-
}>;
|
|
25
|
-
export default ContextMenu;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EventDetailDialogProps } from '../../types/eventDetail';
|
|
3
|
-
import { CalendarApp } from '../../types';
|
|
4
|
-
interface DefaultEventDetailDialogProps extends EventDetailDialogProps {
|
|
5
|
-
app?: CalendarApp;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Default event detail dialog component (Dialog mode)
|
|
9
|
-
* Content is consistent with DefaultEventDetailPanel, but displayed using Dialog/Modal
|
|
10
|
-
*/
|
|
11
|
-
declare const DefaultEventDetailDialog: React.FC<DefaultEventDetailDialogProps>;
|
|
12
|
-
export default DefaultEventDetailDialog;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EventDetailPanelProps } from '../../types';
|
|
3
|
-
import { CalendarApp } from '@/types';
|
|
4
|
-
interface DefaultEventDetailPanelProps extends EventDetailPanelProps {
|
|
5
|
-
app?: CalendarApp;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Default event detail panel component
|
|
9
|
-
*/
|
|
10
|
-
declare const DefaultEventDetailPanel: React.FC<DefaultEventDetailPanelProps>;
|
|
11
|
-
export default DefaultEventDetailPanel;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EventDetailPanelProps, EventDetailContentRenderer } from '../../types/eventDetail';
|
|
3
|
-
/**
|
|
4
|
-
* Event detail panel wrapper for rendering custom content in the default panel
|
|
5
|
-
*/
|
|
6
|
-
interface EventDetailPanelWithContentProps extends EventDetailPanelProps {
|
|
7
|
-
/** Custom content renderer */
|
|
8
|
-
contentRenderer: EventDetailContentRenderer;
|
|
9
|
-
}
|
|
10
|
-
export declare const EventDetailPanelWithContent: React.FC<EventDetailPanelWithContentProps>;
|
|
11
|
-
export default EventDetailPanelWithContent;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface MiniCalendarProps {
|
|
3
|
-
visibleMonth: Date;
|
|
4
|
-
currentDate: Date;
|
|
5
|
-
showHeader?: boolean;
|
|
6
|
-
onMonthChange: (offset: number) => void;
|
|
7
|
-
onDateSelect: (date: Date) => void;
|
|
8
|
-
locale?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const MiniCalendar: React.FC<MiniCalendarProps>;
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CalendarApp } from '../../types';
|
|
3
|
-
interface QuickCreateEventPopupProps {
|
|
4
|
-
app: CalendarApp;
|
|
5
|
-
anchorRef: React.RefObject<HTMLElement>;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const QuickCreateEventPopup: React.FC<QuickCreateEventPopupProps>;
|
|
10
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CalendarApp } from '../../types';
|
|
3
|
-
export type ViewHeaderType = 'day' | 'week' | 'month' | 'year';
|
|
4
|
-
export type ViewSwitcherMode = 'buttons' | 'select';
|
|
5
|
-
interface ViewHeaderProps {
|
|
6
|
-
calendar: CalendarApp;
|
|
7
|
-
/** View type */
|
|
8
|
-
viewType: ViewHeaderType;
|
|
9
|
-
/** Current date */
|
|
10
|
-
currentDate: Date;
|
|
11
|
-
/** Previous period */
|
|
12
|
-
onPrevious?: () => void;
|
|
13
|
-
/** Next period */
|
|
14
|
-
onNext?: () => void;
|
|
15
|
-
/** Go to today */
|
|
16
|
-
onToday?: () => void;
|
|
17
|
-
/** Custom title (optional, takes priority over default title) */
|
|
18
|
-
customTitle?: string;
|
|
19
|
-
/** Custom subtitle (optional, only for Day view) */
|
|
20
|
-
customSubtitle?: string;
|
|
21
|
-
/** Whether to show TodayBox (default determined by viewType: day=false, week/month=true) */
|
|
22
|
-
showTodayBox?: boolean;
|
|
23
|
-
/** Sticky year for Year view (optional, only for Year view) */
|
|
24
|
-
stickyYear?: number | null;
|
|
25
|
-
/** Push-away offset for sticky year (in pixels) */
|
|
26
|
-
stickyYearOffset?: number;
|
|
27
|
-
/** Next year that's pushing the sticky year (optional, only for Year view) */
|
|
28
|
-
nextYear?: number | null;
|
|
29
|
-
/** Offset for the next year coming from below (in pixels) */
|
|
30
|
-
nextYearOffset?: number;
|
|
31
|
-
}
|
|
32
|
-
declare const ViewHeader: React.FC<ViewHeaderProps>;
|
|
33
|
-
export default ViewHeader;
|
|
@@ -1,13 +0,0 @@
|
|
|
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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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;
|
|
@@ -1,41 +0,0 @@
|
|
|
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 {};
|