@object-ui/plugin-calendar 4.0.7 → 4.0.8
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/CHANGELOG.md +14 -0
- package/README.md +61 -0
- package/dist/index.js +912 -366
- package/dist/index.umd.cjs +1 -1
- package/dist/packages/plugin-calendar/src/CalendarView.d.ts +26 -1
- package/dist/packages/plugin-calendar/src/CalendarView.d.ts.map +1 -1
- package/dist/packages/plugin-calendar/src/ObjectCalendar.d.ts.map +1 -1
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @object-ui/plugin-calendar
|
|
2
2
|
|
|
3
|
+
## 4.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [3d58eaa]
|
|
8
|
+
- @object-ui/i18n@4.0.8
|
|
9
|
+
- @object-ui/components@4.0.8
|
|
10
|
+
- @object-ui/fields@4.0.8
|
|
11
|
+
- @object-ui/react@4.0.8
|
|
12
|
+
- @object-ui/plugin-detail@4.0.8
|
|
13
|
+
- @object-ui/types@4.0.8
|
|
14
|
+
- @object-ui/core@4.0.8
|
|
15
|
+
- @object-ui/mobile@4.0.8
|
|
16
|
+
|
|
3
17
|
## 4.0.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -6,11 +6,72 @@ Calendar view plugins for Object UI - includes both ObjectQL-integrated and stan
|
|
|
6
6
|
|
|
7
7
|
- **Calendar View** - Monthly calendar with event display
|
|
8
8
|
- **Event Management** - Create, edit, and delete events
|
|
9
|
+
- **Drag-and-Drop Rescheduling** - Move events to a different day in
|
|
10
|
+
month view, or drag vertically in week/day views to change start
|
|
11
|
+
time. Drag top/bottom edges to resize start/end times. Changes are
|
|
12
|
+
persisted via `dataSource.update()` automatically (override with the
|
|
13
|
+
`onEventDrop` prop).
|
|
14
|
+
- **Click-to-Create** - Click any day cell (month view) or click-drag
|
|
15
|
+
on the time grid (week/day views) to open a quick-create dialog
|
|
16
|
+
pre-filled with the selected date/range. New records are persisted
|
|
17
|
+
via `dataSource.create()` and inserted optimistically into the
|
|
18
|
+
calendar. Required picklist fields auto-default to their first
|
|
19
|
+
option.
|
|
9
20
|
- **ObjectQL Integration** - Connect to ObjectStack data sources
|
|
10
21
|
- **Standalone Mode** - Use with static data or custom backends
|
|
11
22
|
- **Responsive** - Mobile-friendly calendar layouts
|
|
12
23
|
- **Customizable** - Tailwind CSS styling support
|
|
13
24
|
|
|
25
|
+
## Drag-and-Drop
|
|
26
|
+
|
|
27
|
+
### Month view
|
|
28
|
+
|
|
29
|
+
| Gesture | Effect |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Drag the event pill body to another day cell | Shifts both `startDateField` and `endDateField` by the day delta. Grab cell → drop cell defines the delta, so dragging from any day of a multi-day span works as expected. |
|
|
32
|
+
| Drag the right-edge handle of a multi-day pill | Adjusts only `endDateField`; start is preserved. Refuses drops earlier than start. |
|
|
33
|
+
|
|
34
|
+
### Week / Day view (time grid)
|
|
35
|
+
|
|
36
|
+
The week and day views render a classic Google Calendar-style vertical
|
|
37
|
+
time grid with hour rows. Pointer-driven interactions:
|
|
38
|
+
|
|
39
|
+
| Gesture | Effect |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| Drag an event vertically | Shifts both `startDateField` and `endDateField` by the time delta (snapped to `slotMinutes`, default 30). |
|
|
42
|
+
| Drag the top edge of an event | Adjusts only `startDateField`; end is preserved. Refuses to drag past `end − slotMinutes`. |
|
|
43
|
+
| Drag the bottom edge of an event | Adjusts only `endDateField`; start is preserved. Refuses to drag past `start + slotMinutes`. |
|
|
44
|
+
| Click-drag on empty grid background | Opens the quick-create dialog with start/end pre-filled to the dragged time range. |
|
|
45
|
+
|
|
46
|
+
Pass `slotMinutes={15}` to change the snap granularity. Pass
|
|
47
|
+
`onTimeRangeSelect={(start, end) => …}` to handle drag-to-create
|
|
48
|
+
yourself instead of the default quick-create dialog.
|
|
49
|
+
|
|
50
|
+
When `ObjectCalendar` is bound to an object schema, the new dates are
|
|
51
|
+
persisted with `dataSource.update(objectName, id, patch)` automatically;
|
|
52
|
+
the local state is updated optimistically and rolled back if the
|
|
53
|
+
server call fails. To intercept (e.g. to confirm a status change) pass
|
|
54
|
+
`onEventDrop={(record, newStart, newEnd) => …}` — the default
|
|
55
|
+
persistence is skipped when you provide your own handler.
|
|
56
|
+
|
|
57
|
+
## Click-to-Create
|
|
58
|
+
|
|
59
|
+
Clicking an empty area of any day cell opens a small quick-create
|
|
60
|
+
dialog pre-filled with the clicked date. Type a title, press
|
|
61
|
+
<kbd>Enter</kbd> (or click **Create**), and the record is persisted
|
|
62
|
+
via `dataSource.create(objectName, payload)`. The payload includes:
|
|
63
|
+
|
|
64
|
+
- The configured `titleField` (defaults to `name`)
|
|
65
|
+
- `startDateField` and (if configured) `endDateField` set to the
|
|
66
|
+
clicked day
|
|
67
|
+
- Auto-defaults for any other required fields the user hasn't supplied
|
|
68
|
+
(first picklist option for `select`/`status`, `false` for booleans,
|
|
69
|
+
`0` for numerics, or the field's `defaultValue`)
|
|
70
|
+
|
|
71
|
+
The new record is optimistically inserted into local state so it
|
|
72
|
+
appears immediately. To override (e.g. open your own create form), pass
|
|
73
|
+
`onDateClick={(day) => …}` — the default behaviour is skipped.
|
|
74
|
+
|
|
14
75
|
## Installation
|
|
15
76
|
|
|
16
77
|
```bash
|