@sunsama/event-calendar 0.2.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 +20 -0
- package/README.md +105 -0
- package/lib/commonjs/components/all-day-events.js +117 -0
- package/lib/commonjs/components/all-day-events.js.map +1 -0
- package/lib/commonjs/components/background-hours-content.js +43 -0
- package/lib/commonjs/components/background-hours-content.js.map +1 -0
- package/lib/commonjs/components/background-hours-layout.js +57 -0
- package/lib/commonjs/components/background-hours-layout.js.map +1 -0
- package/lib/commonjs/components/drag-bar.js +84 -0
- package/lib/commonjs/components/drag-bar.js.map +1 -0
- package/lib/commonjs/components/edit-event-container.js +114 -0
- package/lib/commonjs/components/edit-event-container.js.map +1 -0
- package/lib/commonjs/components/event-container.js +37 -0
- package/lib/commonjs/components/event-container.js.map +1 -0
- package/lib/commonjs/components/new-event-container.js +73 -0
- package/lib/commonjs/components/new-event-container.js.map +1 -0
- package/lib/commonjs/components/time-indicator.js +64 -0
- package/lib/commonjs/components/time-indicator.js.map +1 -0
- package/lib/commonjs/components/timed-event-container.js +91 -0
- package/lib/commonjs/components/timed-event-container.js.map +1 -0
- package/lib/commonjs/components/timed-events.js +68 -0
- package/lib/commonjs/components/timed-events.js.map +1 -0
- package/lib/commonjs/components/zoom-provider.js +109 -0
- package/lib/commonjs/components/zoom-provider.js.map +1 -0
- package/lib/commonjs/enums.js +2 -0
- package/lib/commonjs/enums.js.map +1 -0
- package/lib/commonjs/hooks/use-cloned-events.js +25 -0
- package/lib/commonjs/hooks/use-cloned-events.js.map +1 -0
- package/lib/commonjs/hooks/use-events-layout.js +34 -0
- package/lib/commonjs/hooks/use-events-layout.js.map +1 -0
- package/lib/commonjs/hooks/use-is-editing.js +83 -0
- package/lib/commonjs/hooks/use-is-editing.js.map +1 -0
- package/lib/commonjs/index.js +129 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/types.js +24 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/utils/calendar-layout.js +113 -0
- package/lib/commonjs/utils/calendar-layout.js.map +1 -0
- package/lib/commonjs/utils/compute-positioning.js +33 -0
- package/lib/commonjs/utils/compute-positioning.js.map +1 -0
- package/lib/commonjs/utils/date-utils.js +152 -0
- package/lib/commonjs/utils/date-utils.js.map +1 -0
- package/lib/commonjs/utils/double-tap-reset-zoom-gesture.js +19 -0
- package/lib/commonjs/utils/double-tap-reset-zoom-gesture.js.map +1 -0
- package/lib/commonjs/utils/generate-event-layouts.js +198 -0
- package/lib/commonjs/utils/generate-event-layouts.js.map +1 -0
- package/lib/commonjs/utils/globals.js +11 -0
- package/lib/commonjs/utils/globals.js.map +1 -0
- package/lib/commonjs/utils/pan-edit-event-gesture.js +41 -0
- package/lib/commonjs/utils/pan-edit-event-gesture.js.map +1 -0
- package/lib/module/components/all-day-events.js +110 -0
- package/lib/module/components/all-day-events.js.map +1 -0
- package/lib/module/components/background-hours-content.js +37 -0
- package/lib/module/components/background-hours-content.js.map +1 -0
- package/lib/module/components/background-hours-layout.js +51 -0
- package/lib/module/components/background-hours-layout.js.map +1 -0
- package/lib/module/components/drag-bar.js +78 -0
- package/lib/module/components/drag-bar.js.map +1 -0
- package/lib/module/components/edit-event-container.js +107 -0
- package/lib/module/components/edit-event-container.js.map +1 -0
- package/lib/module/components/event-container.js +33 -0
- package/lib/module/components/event-container.js.map +1 -0
- package/lib/module/components/new-event-container.js +67 -0
- package/lib/module/components/new-event-container.js.map +1 -0
- package/lib/module/components/time-indicator.js +57 -0
- package/lib/module/components/time-indicator.js.map +1 -0
- package/lib/module/components/timed-event-container.js +84 -0
- package/lib/module/components/timed-event-container.js.map +1 -0
- package/lib/module/components/timed-events.js +63 -0
- package/lib/module/components/timed-events.js.map +1 -0
- package/lib/module/components/zoom-provider.js +102 -0
- package/lib/module/components/zoom-provider.js.map +1 -0
- package/lib/module/enums.js +2 -0
- package/lib/module/enums.js.map +1 -0
- package/lib/module/hooks/use-cloned-events.js +21 -0
- package/lib/module/hooks/use-cloned-events.js.map +1 -0
- package/lib/module/hooks/use-events-layout.js +29 -0
- package/lib/module/hooks/use-events-layout.js.map +1 -0
- package/lib/module/hooks/use-is-editing.js +75 -0
- package/lib/module/hooks/use-is-editing.js.map +1 -0
- package/lib/module/index.js +124 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/types.js +20 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/calendar-layout.js +108 -0
- package/lib/module/utils/calendar-layout.js.map +1 -0
- package/lib/module/utils/compute-positioning.js +28 -0
- package/lib/module/utils/compute-positioning.js.map +1 -0
- package/lib/module/utils/date-utils.js +139 -0
- package/lib/module/utils/date-utils.js.map +1 -0
- package/lib/module/utils/double-tap-reset-zoom-gesture.js +15 -0
- package/lib/module/utils/double-tap-reset-zoom-gesture.js.map +1 -0
- package/lib/module/utils/generate-event-layouts.js +192 -0
- package/lib/module/utils/generate-event-layouts.js.map +1 -0
- package/lib/module/utils/globals.js +7 -0
- package/lib/module/utils/globals.js.map +1 -0
- package/lib/module/utils/pan-edit-event-gesture.js +37 -0
- package/lib/module/utils/pan-edit-event-gesture.js.map +1 -0
- package/lib/typescript/commonjs/components/all-day-events.d.ts +3 -0
- package/lib/typescript/commonjs/components/all-day-events.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/background-hours-content.d.ts +7 -0
- package/lib/typescript/commonjs/components/background-hours-content.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/background-hours-layout.d.ts +7 -0
- package/lib/typescript/commonjs/components/background-hours-layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/drag-bar.d.ts +14 -0
- package/lib/typescript/commonjs/components/drag-bar.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/edit-event-container.d.ts +7 -0
- package/lib/typescript/commonjs/components/edit-event-container.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/event-container.d.ts +7 -0
- package/lib/typescript/commonjs/components/event-container.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/new-event-container.d.ts +3 -0
- package/lib/typescript/commonjs/components/new-event-container.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/time-indicator.d.ts +3 -0
- package/lib/typescript/commonjs/components/time-indicator.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/timed-event-container.d.ts +9 -0
- package/lib/typescript/commonjs/components/timed-event-container.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/timed-events.d.ts +7 -0
- package/lib/typescript/commonjs/components/timed-events.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/zoom-provider.d.ts +7 -0
- package/lib/typescript/commonjs/components/zoom-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/enums.d.ts +2 -0
- package/lib/typescript/commonjs/enums.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/use-cloned-events.d.ts +11 -0
- package/lib/typescript/commonjs/hooks/use-cloned-events.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/use-events-layout.d.ts +13 -0
- package/lib/typescript/commonjs/hooks/use-events-layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/use-is-editing.d.ts +17 -0
- package/lib/typescript/commonjs/hooks/use-is-editing.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +27 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/types.d.ts +128 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/__tests___/compute-positioning.test.d.ts +2 -0
- package/lib/typescript/commonjs/utils/__tests___/compute-positioning.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/__tests___/date-utils.test.d.ts +2 -0
- package/lib/typescript/commonjs/utils/__tests___/date-utils.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/__tests___/generate-event-layout.test.d.ts +2 -0
- package/lib/typescript/commonjs/utils/__tests___/generate-event-layout.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/calendar-layout.d.ts +36 -0
- package/lib/typescript/commonjs/utils/calendar-layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/compute-positioning.d.ts +10 -0
- package/lib/typescript/commonjs/utils/compute-positioning.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/date-utils.d.ts +30 -0
- package/lib/typescript/commonjs/utils/date-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/double-tap-reset-zoom-gesture.d.ts +5 -0
- package/lib/typescript/commonjs/utils/double-tap-reset-zoom-gesture.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/generate-event-layouts.d.ts +15 -0
- package/lib/typescript/commonjs/utils/generate-event-layouts.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/globals.d.ts +5 -0
- package/lib/typescript/commonjs/utils/globals.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/pan-edit-event-gesture.d.ts +6 -0
- package/lib/typescript/commonjs/utils/pan-edit-event-gesture.d.ts.map +1 -0
- package/lib/typescript/module/components/all-day-events.d.ts +3 -0
- package/lib/typescript/module/components/all-day-events.d.ts.map +1 -0
- package/lib/typescript/module/components/background-hours-content.d.ts +7 -0
- package/lib/typescript/module/components/background-hours-content.d.ts.map +1 -0
- package/lib/typescript/module/components/background-hours-layout.d.ts +7 -0
- package/lib/typescript/module/components/background-hours-layout.d.ts.map +1 -0
- package/lib/typescript/module/components/drag-bar.d.ts +14 -0
- package/lib/typescript/module/components/drag-bar.d.ts.map +1 -0
- package/lib/typescript/module/components/edit-event-container.d.ts +7 -0
- package/lib/typescript/module/components/edit-event-container.d.ts.map +1 -0
- package/lib/typescript/module/components/event-container.d.ts +7 -0
- package/lib/typescript/module/components/event-container.d.ts.map +1 -0
- package/lib/typescript/module/components/new-event-container.d.ts +3 -0
- package/lib/typescript/module/components/new-event-container.d.ts.map +1 -0
- package/lib/typescript/module/components/time-indicator.d.ts +3 -0
- package/lib/typescript/module/components/time-indicator.d.ts.map +1 -0
- package/lib/typescript/module/components/timed-event-container.d.ts +9 -0
- package/lib/typescript/module/components/timed-event-container.d.ts.map +1 -0
- package/lib/typescript/module/components/timed-events.d.ts +7 -0
- package/lib/typescript/module/components/timed-events.d.ts.map +1 -0
- package/lib/typescript/module/components/zoom-provider.d.ts +7 -0
- package/lib/typescript/module/components/zoom-provider.d.ts.map +1 -0
- package/lib/typescript/module/enums.d.ts +2 -0
- package/lib/typescript/module/enums.d.ts.map +1 -0
- package/lib/typescript/module/hooks/use-cloned-events.d.ts +11 -0
- package/lib/typescript/module/hooks/use-cloned-events.d.ts.map +1 -0
- package/lib/typescript/module/hooks/use-events-layout.d.ts +13 -0
- package/lib/typescript/module/hooks/use-events-layout.d.ts.map +1 -0
- package/lib/typescript/module/hooks/use-is-editing.d.ts +17 -0
- package/lib/typescript/module/hooks/use-is-editing.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +27 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/types.d.ts +128 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/utils/__tests___/compute-positioning.test.d.ts +2 -0
- package/lib/typescript/module/utils/__tests___/compute-positioning.test.d.ts.map +1 -0
- package/lib/typescript/module/utils/__tests___/date-utils.test.d.ts +2 -0
- package/lib/typescript/module/utils/__tests___/date-utils.test.d.ts.map +1 -0
- package/lib/typescript/module/utils/__tests___/generate-event-layout.test.d.ts +2 -0
- package/lib/typescript/module/utils/__tests___/generate-event-layout.test.d.ts.map +1 -0
- package/lib/typescript/module/utils/calendar-layout.d.ts +36 -0
- package/lib/typescript/module/utils/calendar-layout.d.ts.map +1 -0
- package/lib/typescript/module/utils/compute-positioning.d.ts +10 -0
- package/lib/typescript/module/utils/compute-positioning.d.ts.map +1 -0
- package/lib/typescript/module/utils/date-utils.d.ts +30 -0
- package/lib/typescript/module/utils/date-utils.d.ts.map +1 -0
- package/lib/typescript/module/utils/double-tap-reset-zoom-gesture.d.ts +5 -0
- package/lib/typescript/module/utils/double-tap-reset-zoom-gesture.d.ts.map +1 -0
- package/lib/typescript/module/utils/generate-event-layouts.d.ts +15 -0
- package/lib/typescript/module/utils/generate-event-layouts.d.ts.map +1 -0
- package/lib/typescript/module/utils/globals.d.ts +5 -0
- package/lib/typescript/module/utils/globals.d.ts.map +1 -0
- package/lib/typescript/module/utils/pan-edit-event-gesture.d.ts +6 -0
- package/lib/typescript/module/utils/pan-edit-event-gesture.d.ts.map +1 -0
- package/package.json +195 -0
- package/src/components/all-day-events.tsx +134 -0
- package/src/components/background-hours-content.tsx +51 -0
- package/src/components/background-hours-layout.tsx +61 -0
- package/src/components/drag-bar.tsx +120 -0
- package/src/components/edit-event-container.tsx +158 -0
- package/src/components/event-container.tsx +44 -0
- package/src/components/new-event-container.tsx +90 -0
- package/src/components/time-indicator.tsx +72 -0
- package/src/components/timed-event-container.tsx +124 -0
- package/src/components/timed-events.tsx +72 -0
- package/src/components/zoom-provider.tsx +146 -0
- package/src/enums.ts +0 -0
- package/src/hooks/use-cloned-events.ts +26 -0
- package/src/hooks/use-events-layout.ts +55 -0
- package/src/hooks/use-is-editing.tsx +109 -0
- package/src/index.tsx +165 -0
- package/src/types.ts +163 -0
- package/src/utils/__tests___/compute-positioning.test.ts +255 -0
- package/src/utils/__tests___/date-utils.test.ts +41 -0
- package/src/utils/__tests___/generate-event-layout.test.ts +277 -0
- package/src/utils/calendar-layout.ts +139 -0
- package/src/utils/compute-positioning.ts +44 -0
- package/src/utils/date-utils.ts +238 -0
- package/src/utils/double-tap-reset-zoom-gesture.ts +23 -0
- package/src/utils/generate-event-layouts.ts +314 -0
- package/src/utils/globals.ts +8 -0
- package/src/utils/pan-edit-event-gesture.ts +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sunsama
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Event Calendar
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The Sunsama Event Calendar library is a React Native component designed to display and manage calendar events. It supports multiple calendars, real-time updates, and intuitive gestures for a seamless user experience.
|
|
5
|
+
|
|
6
|
+
We use this library in the Sunsama mobile app to display and manage events across multiple calendars. It is designed to be highly customizable and easy to integrate into any React Native project.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
- Displays events in a day-view layout.
|
|
10
|
+
- Supports multiple calendars.
|
|
11
|
+
- Gesture-based event interactions.
|
|
12
|
+
- Animated UI with **react-native-reanimated**.
|
|
13
|
+
- Compatible with **react-native-gesture-handler**.
|
|
14
|
+
- Customizable event styling.
|
|
15
|
+
- Editable events with restrictions.
|
|
16
|
+
- Timezone support.
|
|
17
|
+
- Zoom and drag interactions.
|
|
18
|
+
- Supports Expo Go and bare React Native projects.
|
|
19
|
+
|
|
20
|
+
## Screenshots
|
|
21
|
+
|
|
22
|
+
<div style="display: flex; justify-content: space-around;">
|
|
23
|
+
<div>
|
|
24
|
+
<h3>iOS</h3>
|
|
25
|
+
<img src="assets/screenshot-ios.png" alt="Event Calendar iOS" style="max-width: 45%; height: auto;">
|
|
26
|
+
</div>
|
|
27
|
+
<div>
|
|
28
|
+
<h3>Android</h3>
|
|
29
|
+
<img src="assets/screenshot-android.png" alt="Event Calendar Android" style="max-width: 45%; height: auto;">
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
To install the library, add it to your project using:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
npm install @sunsama/event-calendar
|
|
38
|
+
# or
|
|
39
|
+
yarn add @sunsama/event-calendar
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Ensure the following dependencies are also installed:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npm install react-native-reanimated react-native-gesture-handler
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
For a full implementation example, refer to the **example app** included in the repository.
|
|
50
|
+
|
|
51
|
+
### Gestures
|
|
52
|
+
|
|
53
|
+
The Event Calendar component supports the following gestures:
|
|
54
|
+
|
|
55
|
+
- Double tap: Resets the zoom level to the initial value.
|
|
56
|
+
- Pinch: Zooms in and out of the calendar.
|
|
57
|
+
- Drag: Moves the calendar vertically.
|
|
58
|
+
- Tap event: Opens the event details view.
|
|
59
|
+
- Hold & Drag: Create a new event.
|
|
60
|
+
|
|
61
|
+
Edit mode:
|
|
62
|
+
- Hold & Drag event: Moves event to different times, starts edit mode.
|
|
63
|
+
- Hold & Drag event edges: When in edit mode, resizes event.
|
|
64
|
+
- Tap event: Stops edit mode.
|
|
65
|
+
|
|
66
|
+
## Props
|
|
67
|
+
| Prop | Type | Required | Default | Description |
|
|
68
|
+
|-----------------------------|-------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------|
|
|
69
|
+
| `events` | `CalendarEvent[]` | Yes | | List of event objects. |
|
|
70
|
+
| `dayDate` | `String` | Yes | | The current date of the calendar in ISO string. |
|
|
71
|
+
| `renderEvent` | `Function` | Yes | | Custom renderer for event components. |
|
|
72
|
+
| `onCreateEvent` | `Function` | No | | Callback triggered when a new event is created. |
|
|
73
|
+
| `onPressEvent` | `Function` | No | | Callback triggered when an event is pressed. |
|
|
74
|
+
| `userCalendarId` | `String` | No | | The primary calendar ID for event sorting. |
|
|
75
|
+
| `timeFormat` | `String` | No | HH:mm | Defines the time format used in the calendar. See [moment.js](https://momentjs.com/docs/#/displaying/) documentation for examples. |
|
|
76
|
+
| `showTimeIndicator` | `Boolean` | No | False | Displays a line showing the current time. |
|
|
77
|
+
| `canCreateEvents` | `Boolean` | No | True | Allows users to create new events. |
|
|
78
|
+
| `canEditEvent` | `Function` or `Boolean` | No | True | Determines if an event is editable. You can supply a function to do this deterministically. |
|
|
79
|
+
| `maxAllDayEvents` | `Number` | No | 2 | Sets the maximum number of all-day events displayed before showing a 'show more' option. |
|
|
80
|
+
| `timezone` | `String` | No | UTC | Defines the timezone for event times. |
|
|
81
|
+
| `renderDragBars` | `Object` | No | | Custom drag handles for resizing events. |
|
|
82
|
+
| `onEventEdit` | `Function` | No | | Callback triggered when an event is edited. |
|
|
83
|
+
| `theme` | `Object` | No | | Allows overriding default calendar themes. |
|
|
84
|
+
| `initialZoomLevel` | `Number` | No | 0.8 | Defines the initial zoom level of the calendar. |
|
|
85
|
+
| `renderNewEventContainer` | `Function` | No | | Custom UI for new event creation. If none supplied it will show a semi-transparent bar you can theme. |
|
|
86
|
+
| `fiveMinuteInterval` | `Boolean` | No | False | Ensures event snapping to 5-minute increments. |
|
|
87
|
+
| `updateLocalStateAfterEdit` | `Boolean` | No | True | Optimistically updates local state after event editing. |
|
|
88
|
+
| `extraTimedComponents` | `Function` | No | | Allows rendering extra components in the calendar. These will be rendered before all the timed events. |
|
|
89
|
+
| `onZoomChange` | `Function` | No | | Callback triggered when the zoom level changes. |
|
|
90
|
+
|
|
91
|
+
## Dependencies
|
|
92
|
+
Ensure you have the following dependencies installed for proper functionality:
|
|
93
|
+
- `react-native-reanimated`
|
|
94
|
+
- `react-native-gesture-handler`
|
|
95
|
+
- `react-native-safe-area-context`
|
|
96
|
+
|
|
97
|
+
## Limitations
|
|
98
|
+
|
|
99
|
+
This library has been made specifically for the Sunsama mobile app and therefore it is very opinionated. This results in some limitations:
|
|
100
|
+
We only support features that are used in the Sunsama app. If you need a feature that is not supported, you can create a PR but we won't add new features unless it brings value to the Sunsama app.
|
|
101
|
+
We do fix bugs, however.
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
This project is licensed under the MIT License.
|
|
105
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _globals = require("src/utils/globals");
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _eventContainer = _interopRequireDefault(require("src/components/event-container"));
|
|
11
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const AllDayEvents = /*#__PURE__*/(0, _react.memo)(() => {
|
|
18
|
+
const {
|
|
19
|
+
layout,
|
|
20
|
+
theme,
|
|
21
|
+
maxAllDayEvents
|
|
22
|
+
} = (0, _react.useContext)(_globals.ConfigProvider);
|
|
23
|
+
const [showAllDayEvents, setShowAllDayEvents] = (0, _react.useState)(false);
|
|
24
|
+
const measuredHeight = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
25
|
+
const originalHeight = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
26
|
+
const onPress = (0, _react.useCallback)(() => {
|
|
27
|
+
const newState = !showAllDayEvents;
|
|
28
|
+
if (!newState) {
|
|
29
|
+
measuredHeight.value = (0, _reactNativeReanimated.withTiming)(originalHeight.value, {
|
|
30
|
+
duration: 250
|
|
31
|
+
}, () => {
|
|
32
|
+
(0, _reactNativeReanimated.runOnJS)(setShowAllDayEvents)(newState);
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
setShowAllDayEvents(newState);
|
|
36
|
+
}
|
|
37
|
+
}, [measuredHeight, originalHeight, showAllDayEvents]);
|
|
38
|
+
const allDayEvents = showAllDayEvents ? layout.allDayEventsLayout : layout.allDayEventsLayout.slice(0, maxAllDayEvents);
|
|
39
|
+
const restEventAmount = layout.allDayEventsLayout.length - allDayEvents.length;
|
|
40
|
+
|
|
41
|
+
// Called whenever the content inside changes layout
|
|
42
|
+
const onContentLayout = (0, _react.useCallback)(e => {
|
|
43
|
+
const {
|
|
44
|
+
height
|
|
45
|
+
} = e.nativeEvent.layout;
|
|
46
|
+
if (!originalHeight.value) {
|
|
47
|
+
originalHeight.value = height;
|
|
48
|
+
measuredHeight.value = height;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Animate from the old height to the new height
|
|
53
|
+
measuredHeight.value = (0, _reactNativeReanimated.withTiming)(height, {
|
|
54
|
+
duration: 250
|
|
55
|
+
});
|
|
56
|
+
}, [measuredHeight, originalHeight]);
|
|
57
|
+
|
|
58
|
+
// Apply the animated height to the wrapping container
|
|
59
|
+
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
60
|
+
return {
|
|
61
|
+
// This ensures the container’s height animates smoothly
|
|
62
|
+
height: measuredHeight.value
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
66
|
+
style: [styles.container, theme?.allDayContainer],
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
68
|
+
style: [styles.eventContainer, theme?.allDayEventContainer],
|
|
69
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
70
|
+
style: [animatedStyle, {
|
|
71
|
+
overflow: "hidden",
|
|
72
|
+
// so children get clipped during animation
|
|
73
|
+
backgroundColor: "lightgrey",
|
|
74
|
+
minHeight: 1
|
|
75
|
+
}],
|
|
76
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
77
|
+
onLayout: onContentLayout,
|
|
78
|
+
children: allDayEvents.map(allDayLayout => /*#__PURE__*/(0, _jsxRuntime.jsx)(_eventContainer.default, {
|
|
79
|
+
layout: allDayLayout
|
|
80
|
+
}, allDayLayout.event.id))
|
|
81
|
+
})
|
|
82
|
+
}), layout.allDayEventsLayout.length > maxAllDayEvents ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.Pressable, {
|
|
83
|
+
onPress: onPress,
|
|
84
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
85
|
+
style: [styles.moreContainer, theme?.allDayShowMoreContainer],
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
87
|
+
style: [styles.moreContainerText, theme?.allDayShowMoreText],
|
|
88
|
+
children: restEventAmount ? `${restEventAmount} more` : "Show less"
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
}) : null]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}, () => true);
|
|
95
|
+
var _default = exports.default = AllDayEvents;
|
|
96
|
+
const styles = _reactNative.StyleSheet.create({
|
|
97
|
+
container: {
|
|
98
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
99
|
+
borderColor: "black",
|
|
100
|
+
overflow: "hidden"
|
|
101
|
+
},
|
|
102
|
+
eventContainer: {
|
|
103
|
+
marginLeft: 50,
|
|
104
|
+
marginRight: 10,
|
|
105
|
+
borderLeftWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
106
|
+
borderColor: "black"
|
|
107
|
+
},
|
|
108
|
+
moreContainer: {
|
|
109
|
+
padding: 5
|
|
110
|
+
},
|
|
111
|
+
moreContainerText: {
|
|
112
|
+
fontSize: 12,
|
|
113
|
+
fontWeight: "bold",
|
|
114
|
+
color: "grey"
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=all-day-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_globals","_reactNative","_eventContainer","_interopRequireDefault","_reactNativeGestureHandler","_reactNativeReanimated","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AllDayEvents","memo","layout","theme","maxAllDayEvents","useContext","ConfigProvider","showAllDayEvents","setShowAllDayEvents","useState","measuredHeight","useSharedValue","originalHeight","onPress","useCallback","newState","value","withTiming","duration","runOnJS","allDayEvents","allDayEventsLayout","slice","restEventAmount","length","onContentLayout","height","nativeEvent","animatedStyle","useAnimatedStyle","jsx","View","style","styles","container","allDayContainer","children","jsxs","eventContainer","allDayEventContainer","overflow","backgroundColor","minHeight","onLayout","map","allDayLayout","event","id","Pressable","moreContainer","allDayShowMoreContainer","Text","moreContainerText","allDayShowMoreText","_default","exports","StyleSheet","create","borderBottomWidth","hairlineWidth","borderColor","marginLeft","marginRight","borderLeftWidth","padding","fontSize","fontWeight","color"],"sourceRoot":"../../../src","sources":["components/all-day-events.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAC,uBAAA,CAAAP,OAAA;AAKiC,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MA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IACR,CAAC;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAArE,OAAA,GAEac,YAAY;AAE3B,MAAMiC,MAAM,GAAGuB,uBAAU,CAACC,MAAM,CAAC;EAC/BvB,SAAS,EAAE;IACTwB,iBAAiB,EAAEF,uBAAU,CAACG,aAAa;IAC3CC,WAAW,EAAE,OAAO;IACpBpB,QAAQ,EAAE;EACZ,CAAC;EACDF,cAAc,EAAE;IACduB,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,eAAe,EAAEP,uBAAU,CAACG,aAAa;IACzCC,WAAW,EAAE;EACf,CAAC;EACDX,aAAa,EAAE;IACbe,OAAO,EAAE;EACX,CAAC;EACDZ,iBAAiB,EAAE;IACjBa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _globals = require("src/utils/globals");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const BackgroundHoursContent = /*#__PURE__*/(0, _react.memo)(({
|
|
15
|
+
hours
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
theme,
|
|
19
|
+
zoomLevel
|
|
20
|
+
} = (0, _react.useContext)(_globals.ConfigProvider);
|
|
21
|
+
const styleHourSize = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
22
|
+
return {
|
|
23
|
+
height: zoomLevel.value * 60
|
|
24
|
+
};
|
|
25
|
+
}, []);
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
27
|
+
children: hours.map(hour => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
28
|
+
style: [styles.hourContainer, hour === hours[hours.length - 1] ? styles.bottomBorder : undefined, theme?.backgroundHoursLayoutContainer, styleHourSize]
|
|
29
|
+
}, hour.increment))
|
|
30
|
+
});
|
|
31
|
+
}, () => true);
|
|
32
|
+
const styles = _reactNative.StyleSheet.create({
|
|
33
|
+
hourContainer: {
|
|
34
|
+
borderTopWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
35
|
+
marginRight: -20,
|
|
36
|
+
borderColor: "black"
|
|
37
|
+
},
|
|
38
|
+
bottomBorder: {
|
|
39
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var _default = exports.default = BackgroundHoursContent;
|
|
43
|
+
//# sourceMappingURL=background-hours-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_reactNative","_globals","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","BackgroundHoursContent","memo","hours","theme","zoomLevel","useContext","ConfigProvider","styleHourSize","useAnimatedStyle","height","value","jsx","Fragment","children","map","hour","View","style","styles","hourContainer","length","bottomBorder","undefined","backgroundHoursLayoutContainer","increment","StyleSheet","create","borderTopWidth","hairlineWidth","marginRight","borderColor","borderBottomWidth","_default","exports"],"sourceRoot":"../../../src","sources":["components/background-hours-content.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAmD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAA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,CAAC,EAAE;IAChBC,WAAW,EAAE;EACf,CAAC;EACDT,YAAY,EAAE;IACZU,iBAAiB,EAAEN,uBAAU,CAACG;EAChC;AACF,CAAC,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA/C,OAAA,GAEYc,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _globals = require("src/utils/globals");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const BackgroundHoursLayout = /*#__PURE__*/(0, _react.memo)(({
|
|
15
|
+
hours
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
theme,
|
|
19
|
+
zoomLevel
|
|
20
|
+
} = (0, _react.useContext)(_globals.ConfigProvider);
|
|
21
|
+
const styleHourSize = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
22
|
+
return {
|
|
23
|
+
height: zoomLevel.value * 60
|
|
24
|
+
};
|
|
25
|
+
}, []);
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
27
|
+
style: [styles.hourContainer, theme?.backgroundHoursContainer],
|
|
28
|
+
children: hours.map(hour => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
29
|
+
style: [styles.hourInnerContainer, theme?.backgroundHoursInnerContainer, styleHourSize],
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
31
|
+
style: [styles.hourText, theme?.backgroundHoursText],
|
|
32
|
+
children: hour.hourFormatted
|
|
33
|
+
})
|
|
34
|
+
}, hour.increment))
|
|
35
|
+
});
|
|
36
|
+
}, () => true);
|
|
37
|
+
const styles = _reactNative.StyleSheet.create({
|
|
38
|
+
hourContainer: {
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
flexGrow: 0,
|
|
41
|
+
flexShrink: 0,
|
|
42
|
+
flexBasis: 50,
|
|
43
|
+
paddingRight: 6
|
|
44
|
+
},
|
|
45
|
+
hourInnerContainer: {
|
|
46
|
+
marginTop: -12,
|
|
47
|
+
marginBottom: 12,
|
|
48
|
+
marginRight: 0
|
|
49
|
+
},
|
|
50
|
+
hourText: {
|
|
51
|
+
textAlign: "right",
|
|
52
|
+
color: "black",
|
|
53
|
+
fontSize: 10
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var _default = exports.default = BackgroundHoursLayout;
|
|
57
|
+
//# sourceMappingURL=background-hours-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_reactNative","_globals","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","BackgroundHoursLayout","memo","hours","theme","zoomLevel","useContext","ConfigProvider","styleHourSize","useAnimatedStyle","height","value","jsx","View","style","styles","hourContainer","backgroundHoursContainer","children","map","hour","hourInnerContainer","backgroundHoursInnerContainer","Text","hourText","backgroundHoursText","hourFormatted","increment","StyleSheet","create","flexDirection","flexGrow","flexShrink","flexBasis","paddingRight","marginTop","marginBottom","marginRight","textAlign","color","fontSize","_default","exports"],"sourceRoot":"../../../src","sources":["components/background-hours-layout.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAmD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAA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CACE,CAAC;AAEX,CAAC,EACD,MAAM,IACR,CAAC;AAED,MAAMZ,MAAM,GAAGa,uBAAU,CAACC,MAAM,CAAC;EAC/Bb,aAAa,EAAE;IACbc,aAAa,EAAE,QAAQ;IACvBC,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE,CAAC;IACbC,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE;EAChB,CAAC;EACDb,kBAAkB,EAAE;IAClBc,SAAS,EAAE,CAAC,EAAE;IACdC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE;EACf,CAAC;EACDb,QAAQ,EAAE;IACRc,SAAS,EAAE,OAAO;IAClBC,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvD,OAAA,GAEYc,qBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const DragBar = ({
|
|
15
|
+
top,
|
|
16
|
+
height,
|
|
17
|
+
render,
|
|
18
|
+
refMainContainer,
|
|
19
|
+
fiveMinuteInterval,
|
|
20
|
+
zoomLevel,
|
|
21
|
+
maximumHour
|
|
22
|
+
}) => {
|
|
23
|
+
const startY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
24
|
+
const gesturePan = _reactNativeGestureHandler.Gesture.Pan().blocksExternalGesture(refMainContainer).onStart(() => {
|
|
25
|
+
startY.value = top ? top.value : height.value;
|
|
26
|
+
}).onUpdate(({
|
|
27
|
+
translationY
|
|
28
|
+
}) => {
|
|
29
|
+
if (top) {
|
|
30
|
+
const originalY = top.value;
|
|
31
|
+
let freshUpdatedStartTime;
|
|
32
|
+
if (fiveMinuteInterval) {
|
|
33
|
+
// Set the updated time in 15 minute increments but make sure we never go lower
|
|
34
|
+
// than the first minute of the day
|
|
35
|
+
freshUpdatedStartTime = Math.max(0, startY.value + Math.floor(translationY / zoomLevel.value / 5) * (zoomLevel.value * 5));
|
|
36
|
+
} else {
|
|
37
|
+
// Set the updated time in 1 minute increments but make sure we never go lower
|
|
38
|
+
// than the first minute of the day
|
|
39
|
+
freshUpdatedStartTime = Math.max(0, startY.value + Math.floor(translationY / zoomLevel.value) * zoomLevel.value);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Make sure the event does not span after midnight, and if so make sure it
|
|
43
|
+
// is limited to exactly midnight
|
|
44
|
+
if (freshUpdatedStartTime > maximumHour.value - height.value) {
|
|
45
|
+
freshUpdatedStartTime = maximumHour.value - height.value;
|
|
46
|
+
}
|
|
47
|
+
top.value = freshUpdatedStartTime;
|
|
48
|
+
height.value = height.value + (originalY - top.value);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
let freshUpdatedEndTime;
|
|
52
|
+
if (fiveMinuteInterval) {
|
|
53
|
+
// Set the updated time in 15 minute increments but make sure we never go lower
|
|
54
|
+
// than the first minute of the day
|
|
55
|
+
freshUpdatedEndTime = Math.max(0, startY.value + Math.floor(translationY / zoomLevel.value / 5) * (zoomLevel.value * 5));
|
|
56
|
+
} else {
|
|
57
|
+
// Set the updated time in 1 minute increments but make sure we never go lower
|
|
58
|
+
// than the first minute of the day
|
|
59
|
+
freshUpdatedEndTime = Math.max(0, startY.value + Math.floor(translationY / zoomLevel.value) * zoomLevel.value);
|
|
60
|
+
}
|
|
61
|
+
height.value = freshUpdatedEndTime;
|
|
62
|
+
});
|
|
63
|
+
const styleDragBar = (0, _react.useMemo)(() => ({
|
|
64
|
+
bottom: !top ? 0 : undefined,
|
|
65
|
+
top: top ? 0 : undefined
|
|
66
|
+
}), [top]);
|
|
67
|
+
const renderedComponent = (0, _react.useMemo)(render, [render]);
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
69
|
+
gesture: gesturePan,
|
|
70
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
71
|
+
style: [styles.dragBar, styleDragBar],
|
|
72
|
+
children: renderedComponent
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
var _default = exports.default = DragBar;
|
|
77
|
+
const styles = _reactNative.StyleSheet.create({
|
|
78
|
+
dragBar: {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
left: 0,
|
|
81
|
+
right: 0
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=drag-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","_interopRequireWildcard","require","_react","_reactNativeGestureHandler","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DragBar","top","height","render","refMainContainer","fiveMinuteInterval","zoomLevel","maximumHour","startY","useSharedValue","gesturePan","Gesture","Pan","blocksExternalGesture","onStart","value","onUpdate","translationY","originalY","freshUpdatedStartTime","Math","max","floor","freshUpdatedEndTime","styleDragBar","useMemo","bottom","undefined","renderedComponent","jsx","GestureDetector","gesture","children","View","style","styles","dragBar","_default","exports","StyleSheet","create","position","left","right"],"sourceRoot":"../../../src","sources":["components/drag-bar.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAA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AAAH,cAAO,EAACtB,MAAM,EAAE,CAACA,MAAM,CAAC,CAAC;EAEnD,oBACE,IAAAxB,WAAA,CAAAkD,GAAA,EAACpD,0BAAA,CAAAqD,eAAe;IAACC,OAAO,EAAErB,UAAW;IAAAsB,QAAA,eACnC,IAAArD,WAAA,CAAAkD,GAAA,EAACxD,sBAAA,CAAAa,OAAQ,CAAC+C,IAAI;MAACC,KAAK,EAAE,CAACC,MAAM,CAACC,OAAO,EAAEZ,YAAY,CAAE;MAAAQ,QAAA,EAClDJ;IAAiB,CACL;EAAC,CACD,CAAC;AAEtB,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAApD,OAAA,GAEac,OAAO;AAEtB,MAAMmC,MAAM,GAAGI,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,OAAO,EAAE;IACPK,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useIsEditing = require("src/hooks/use-is-editing");
|
|
9
|
+
var _globals = require("src/utils/globals");
|
|
10
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
11
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
12
|
+
var _types = require("src/types");
|
|
13
|
+
var _panEditEventGesture = _interopRequireDefault(require("src/utils/pan-edit-event-gesture"));
|
|
14
|
+
var _dragBar = _interopRequireDefault(require("src/components/drag-bar"));
|
|
15
|
+
var _reactNative = require("react-native");
|
|
16
|
+
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
const EditEventContainer = /*#__PURE__*/(0, _react.memo)(({
|
|
22
|
+
refNewEvent
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
currentY,
|
|
26
|
+
isEditing: editingEvent,
|
|
27
|
+
setIsEditing
|
|
28
|
+
} = (0, _useIsEditing.useIsEditing)();
|
|
29
|
+
const {
|
|
30
|
+
maximumHour,
|
|
31
|
+
fiveMinuteInterval,
|
|
32
|
+
renderDragBars,
|
|
33
|
+
zoomLevel,
|
|
34
|
+
renderEvent,
|
|
35
|
+
timezone,
|
|
36
|
+
dayDate
|
|
37
|
+
} = (0, _react.useContext)(_globals.ConfigProvider);
|
|
38
|
+
const height = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
39
|
+
(0, _react.useEffect)(() => {
|
|
40
|
+
if (editingEvent) {
|
|
41
|
+
height.value = editingEvent.position.height * zoomLevel.value;
|
|
42
|
+
currentY.value = editingEvent.position.top * zoomLevel.value;
|
|
43
|
+
}
|
|
44
|
+
}, [height, editingEvent, currentY, zoomLevel]);
|
|
45
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => zoomLevel.value, zoom => {
|
|
46
|
+
if (editingEvent) {
|
|
47
|
+
height.value = editingEvent.position.height * zoom;
|
|
48
|
+
currentY.value = editingEvent.position.top * zoom;
|
|
49
|
+
}
|
|
50
|
+
}, [height, currentY, zoomLevel, editingEvent]);
|
|
51
|
+
const styleAnimatedPosition = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
52
|
+
if (!editingEvent) {
|
|
53
|
+
return {
|
|
54
|
+
opacity: 0
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
marginLeft: _reactNative.StyleSheet.hairlineWidth,
|
|
59
|
+
position: "absolute",
|
|
60
|
+
height: height.value,
|
|
61
|
+
top: currentY.value,
|
|
62
|
+
opacity: 1,
|
|
63
|
+
width: "100%"
|
|
64
|
+
};
|
|
65
|
+
}, [editingEvent]);
|
|
66
|
+
const startY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
67
|
+
const updatedStart = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
68
|
+
return currentY.value / zoomLevel.value;
|
|
69
|
+
}, []);
|
|
70
|
+
const updatedEnd = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
71
|
+
return (currentY.value + height.value) / zoomLevel.value;
|
|
72
|
+
}, []);
|
|
73
|
+
const endEventEditing = (0, _react.useCallback)((newStart, newEnd) => {
|
|
74
|
+
// Format the new start and end times
|
|
75
|
+
setIsEditing(null, {
|
|
76
|
+
updatedStart: _momentTimezone.default.tz(dayDate, timezone).minutes(newStart).format(),
|
|
77
|
+
updatedEnd: _momentTimezone.default.tz(dayDate, timezone).minutes(newEnd).format()
|
|
78
|
+
});
|
|
79
|
+
}, [dayDate, setIsEditing, timezone]);
|
|
80
|
+
const gestureTap = _reactNativeGestureHandler.Gesture.Tap().numberOfTaps(1).onStart(() => {
|
|
81
|
+
(0, _reactNativeReanimated.runOnJS)(endEventEditing)(updatedStart.value, updatedEnd.value);
|
|
82
|
+
});
|
|
83
|
+
const refMainContainer = (0, _react.useRef)();
|
|
84
|
+
if (!editingEvent) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
88
|
+
gesture: _reactNativeGestureHandler.Gesture.Simultaneous(gestureTap, (0, _panEditEventGesture.default)(startY, currentY, currentY, zoomLevel, maximumHour, height, refNewEvent, fiveMinuteInterval).withRef(refMainContainer)),
|
|
89
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
90
|
+
style: styleAnimatedPosition,
|
|
91
|
+
children: [renderEvent(editingEvent.event, _types.EventExtend.None, height, {
|
|
92
|
+
updatedEnd,
|
|
93
|
+
updatedStart
|
|
94
|
+
}), renderDragBars?.top ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dragBar.default, {
|
|
95
|
+
top: currentY,
|
|
96
|
+
height: height,
|
|
97
|
+
render: renderDragBars.top,
|
|
98
|
+
refMainContainer: refMainContainer,
|
|
99
|
+
zoomLevel: zoomLevel,
|
|
100
|
+
maximumHour: maximumHour,
|
|
101
|
+
fiveMinuteInterval: fiveMinuteInterval
|
|
102
|
+
}) : null, renderDragBars?.bottom ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dragBar.default, {
|
|
103
|
+
height: height,
|
|
104
|
+
render: renderDragBars.bottom,
|
|
105
|
+
refMainContainer: refMainContainer,
|
|
106
|
+
zoomLevel: zoomLevel,
|
|
107
|
+
maximumHour: maximumHour,
|
|
108
|
+
fiveMinuteInterval: fiveMinuteInterval
|
|
109
|
+
}) : null]
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
}, () => true);
|
|
113
|
+
var _default = exports.default = EditEventContainer;
|
|
114
|
+
//# sourceMappingURL=edit-event-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_useIsEditing","_globals","_reactNativeGestureHandler","_reactNativeReanimated","_interopRequireWildcard","_types","_panEditEventGesture","_interopRequireDefault","_dragBar","_reactNative","_momentTimezone","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EditEventContainer","memo","refNewEvent","currentY","isEditing","editingEvent","setIsEditing","useIsEditing","maximumHour","fiveMinuteInterval","renderDragBars","zoomLevel","renderEvent","timezone","dayDate","useContext","ConfigProvider","height","useSharedValue","useEffect","value","position","top","useAnimatedReaction","zoom","styleAnimatedPosition","useAnimatedStyle","opacity","marginLeft","StyleSheet","hairlineWidth","width","startY","updatedStart","useDerivedValue","updatedEnd","endEventEditing","useCallback","newStart","newEnd","moment","tz","minutes","format","gestureTap","Gesture","Tap","numberOfTaps","onStart","runOnJS","refMainContainer","useRef","jsx","GestureDetector","gesture","Simultaneous","gesturePan","withRef","children","jsxs","View","style","event","EventExtend","None","render","bottom","_default","exports"],"sourceRoot":"../../../src","sources":["components/edit-event-container.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AAOA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,QAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,eAAA,GAAAH,sBAAA,CAAAR,OAAA;AAAqC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAQ,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA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