@rokoyfa/calendar 1.2.0 → 1.3.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/CHANGELOG.md +22 -0
- package/DEVELOPER_GUIDE.md +1045 -0
- package/README.md +41 -190
- package/api/openapi.yaml +395 -4
- package/demo/calendar.config.jsonc +183 -0
- package/demo/calendar.config.yaml +180 -0
- package/dist-lib/cdn/browser-BSbYkIQu.js +130 -0
- package/dist-lib/cdn/browser-BSbYkIQu.js.map +1 -0
- package/dist-lib/cdn/calendar-widget.js +14 -11
- package/dist-lib/cdn/calendar-widget.js.map +1 -1
- package/dist-lib/cdn/de-Dqga3QZG.js +2 -0
- package/dist-lib/cdn/de-Dqga3QZG.js.map +1 -0
- package/dist-lib/cdn/es-BWSfTMjh.js +2 -0
- package/dist-lib/cdn/es-BWSfTMjh.js.map +1 -0
- package/dist-lib/cdn/fr-N9gwLjVq.js +2 -0
- package/dist-lib/cdn/fr-N9gwLjVq.js.map +1 -0
- package/dist-lib/cdn/it-B5Ib2xLn.js +2 -0
- package/dist-lib/cdn/it-B5Ib2xLn.js.map +1 -0
- package/dist-lib/cdn/nl-CjI7Uc8l.js +2 -0
- package/dist-lib/cdn/nl-CjI7Uc8l.js.map +1 -0
- package/dist-lib/cdn/pl-FRu3yQhc.js +2 -0
- package/dist-lib/cdn/pl-FRu3yQhc.js.map +1 -0
- package/dist-lib/cdn/pt-DBKJ-3Is.js +2 -0
- package/dist-lib/cdn/pt-DBKJ-3Is.js.map +1 -0
- package/dist-lib/npm/{de-Cuz-uz3s.js → de-DhWrY8Ae.js} +111 -3
- package/dist-lib/npm/de-DhWrY8Ae.js.map +1 -0
- package/dist-lib/npm/{es-BnRzdU90.js → es-Bj8leuD5.js} +111 -3
- package/dist-lib/npm/es-Bj8leuD5.js.map +1 -0
- package/dist-lib/npm/{fr-B-nmvStg.js → fr-DzAFZ0jh.js} +111 -3
- package/dist-lib/npm/fr-DzAFZ0jh.js.map +1 -0
- package/dist-lib/npm/index.js +3876 -1400
- package/dist-lib/npm/index.js.map +1 -1
- package/dist-lib/npm/{it-DMTpE4GO.js → it-lEmGP5yo.js} +111 -3
- package/dist-lib/npm/it-lEmGP5yo.js.map +1 -0
- package/dist-lib/npm/{nl-DQkyEt9Z.js → nl-d1h63dvm.js} +111 -3
- package/dist-lib/npm/nl-d1h63dvm.js.map +1 -0
- package/dist-lib/npm/{pl-CcjU41yx.js → pl-DynFKadb.js} +111 -3
- package/dist-lib/npm/pl-DynFKadb.js.map +1 -0
- package/dist-lib/npm/{pt-Dulais2f.js → pt-foL7jDsE.js} +111 -3
- package/dist-lib/npm/pt-foL7jDsE.js.map +1 -0
- package/dist-lib/npm/types/components/Icons.d.ts +2 -0
- package/dist-lib/npm/types/config/routes.d.ts +1 -0
- package/dist-lib/npm/types/context/HostBridge.d.ts +38 -0
- package/dist-lib/npm/types/context/HostContext.d.ts +39 -2
- package/dist-lib/npm/types/data/restDataSource.d.ts +3 -1
- package/dist-lib/npm/types/data/tenantDataSource.d.ts +3 -1
- package/dist-lib/npm/types/data/types.d.ts +4 -1
- package/dist-lib/npm/types/features/attachments/components/AttachmentsField.d.ts +8 -0
- package/dist-lib/npm/types/features/attachments/hooks/useAttachments.d.ts +11 -0
- package/dist-lib/npm/types/features/attachments/index.d.ts +2 -0
- package/dist-lib/npm/types/features/authorization/components/account/DataExportSection.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/index.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/types/auth.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +7 -1
- package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +3 -1
- package/dist-lib/npm/types/features/calendar/constants/views.d.ts +2 -2
- package/dist-lib/npm/types/features/calendar/hooks/useEventNavigation.d.ts +4 -0
- package/dist-lib/npm/types/features/calendar/hooks/useHostController.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/hooks/useLiveEvents.d.ts +11 -0
- package/dist-lib/npm/types/features/calendar/hooks/useSegmentAttributes.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/settings/ShareSection.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/settings/TrashSection.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/index.d.ts +1 -1
- package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +3 -0
- package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +3 -0
- package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +4 -0
- package/dist-lib/npm/types/features/categories/components/CategoriesSection.d.ts +6 -0
- package/dist-lib/npm/types/features/categories/components/CategoryField.d.ts +9 -0
- package/dist-lib/npm/types/features/categories/components/CategoryFilterModal.d.ts +10 -0
- package/dist-lib/npm/types/features/categories/hooks/useCategories.d.ts +9 -0
- package/dist-lib/npm/types/features/categories/index.d.ts +4 -0
- package/dist-lib/npm/types/features/events/components/DeleteEventModal.d.ts +2 -1
- package/dist-lib/npm/types/features/events/components/EventModal.d.ts +11 -3
- package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +4 -1
- package/dist-lib/npm/types/features/events/index.d.ts +2 -2
- package/dist-lib/npm/types/features/events/utils/icalExchange.d.ts +4 -1
- package/dist-lib/npm/types/features/storage/index.d.ts +6 -1
- package/dist-lib/npm/types/features/storage/repositories/LocalCategoryRepository.d.ts +14 -0
- package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +8 -2
- package/dist-lib/npm/types/features/storage/repositories/RemoteAttachmentRepository.d.ts +11 -0
- package/dist-lib/npm/types/features/storage/repositories/RemoteCategoryRepository.d.ts +10 -0
- package/dist-lib/npm/types/features/storage/repositories/RemoteChatRepository.d.ts +2 -1
- package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +9 -3
- package/dist-lib/npm/types/features/storage/repositories/RemoteSharedCalendarRepository.d.ts +9 -0
- package/dist-lib/npm/types/features/storage/types/storage.d.ts +30 -2
- package/dist-lib/npm/types/features/storage/utils/liveSocket.d.ts +10 -0
- package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +9 -0
- package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +44 -0
- package/dist-lib/npm/types/i18n/messages/en/core.d.ts +1 -0
- package/dist-lib/npm/types/i18n/messages/en/events.d.ts +37 -0
- package/dist-lib/npm/types/i18n/messages/en/index.d.ts +99 -1
- package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +7 -0
- package/dist-lib/npm/types/i18n/messages/index.d.ts +99 -1
- package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
- package/dist-lib/npm/types/lib/IsolatedRoot.d.ts +3 -1
- package/dist-lib/npm/types/lib/appearance.d.ts +3 -0
- package/dist-lib/npm/types/lib/config.d.ts +16 -27
- package/dist-lib/npm/types/lib/configFile.d.ts +6 -0
- package/dist-lib/npm/types/lib/defaults.d.ts +29 -1
- package/dist-lib/npm/types/lib/element.d.ts +15 -1
- package/dist-lib/npm/types/lib/handle.d.ts +15 -0
- package/dist-lib/npm/types/lib/index.d.ts +6 -2
- package/dist-lib/npm/types/lib/options.d.ts +47 -0
- package/dist-lib/npm/types/lib/useCalendarOptions.d.ts +11 -0
- package/dist-lib/npm/types/pages/SharedCalendarPage.d.ts +1 -0
- package/dist-lib/npm/types/utils/api.d.ts +1 -0
- package/dist-lib/npm/types/utils/appError.d.ts +1 -1
- package/dist-lib/npm/types/utils/attachment.d.ts +31 -0
- package/dist-lib/npm/types/utils/calendarView.d.ts +1 -0
- package/dist-lib/npm/types/utils/category.d.ts +18 -0
- package/dist-lib/npm/types/utils/conflict.d.ts +1 -0
- package/dist-lib/npm/types/utils/dataExport.d.ts +13 -0
- package/dist-lib/npm/types/utils/event.d.ts +6 -1
- package/dist-lib/npm/types/utils/eventChange.d.ts +13 -0
- package/dist-lib/npm/types/utils/ical.d.ts +6 -1
- package/dist-lib/npm/types/utils/sharedCalendar.d.ts +13 -0
- package/dist-lib/npm/types/utils/trash.d.ts +14 -0
- package/package.json +8 -2
- package/schema/calendar-config.schema.json +297 -0
- package/dist-lib/cdn/de-BjzK4Pgn.js +0 -2
- package/dist-lib/cdn/de-BjzK4Pgn.js.map +0 -1
- package/dist-lib/cdn/es-TA5DvEsw.js +0 -2
- package/dist-lib/cdn/es-TA5DvEsw.js.map +0 -1
- package/dist-lib/cdn/fr-Dx-nmhQ7.js +0 -2
- package/dist-lib/cdn/fr-Dx-nmhQ7.js.map +0 -1
- package/dist-lib/cdn/it-D_2eA3dT.js +0 -2
- package/dist-lib/cdn/it-D_2eA3dT.js.map +0 -1
- package/dist-lib/cdn/nl-dC1zae2Z.js +0 -2
- package/dist-lib/cdn/nl-dC1zae2Z.js.map +0 -1
- package/dist-lib/cdn/pl-9TYRPoy1.js +0 -2
- package/dist-lib/cdn/pl-9TYRPoy1.js.map +0 -1
- package/dist-lib/cdn/pt-CvBN-qx1.js +0 -2
- package/dist-lib/cdn/pt-CvBN-qx1.js.map +0 -1
- package/dist-lib/npm/de-Cuz-uz3s.js.map +0 -1
- package/dist-lib/npm/es-BnRzdU90.js.map +0 -1
- package/dist-lib/npm/fr-B-nmvStg.js.map +0 -1
- package/dist-lib/npm/it-DMTpE4GO.js.map +0 -1
- package/dist-lib/npm/nl-DQkyEt9Z.js.map +0 -1
- package/dist-lib/npm/pl-CcjU41yx.js.map +0 -1
- package/dist-lib/npm/pt-Dulais2f.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to `@rokoyfa/calendar`. Versions follow [Semantic Versioning
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
- Accessibility: arrow keys, `Home` and `End` move between events, days and month cells are labelled groups, events are announced with time, place, calendar, own response and attachments, and the period title is announced when it changes. Contrast now meets WCAG AA in both themes: darker muted text, no faded days outside the month, and dark text on event colors and the accent in dark mode (`--calendar-on-accent` defaults to dark there)
|
|
8
|
+
- Data export (GDPR Art. 20): a "Data" tab in the settings downloads the user's own data as JSON, from `GET /auth/me/export` when signed in or from the browser storage in local mode. New feature switch `dataExport` and optional `AuthRepository.exportData()`
|
|
9
|
+
- Trash: deleted events stay in the trash of their calendar for 30 days and can be restored in the calendar settings, or deleted for good. Undo after deleting now restores the event with the same id, so attachments and chat are kept. `DELETE /events/:id` moves to the trash, new endpoints `GET /calendars/:id/trash`, `POST /events/:id/restore` and `DELETE /trash/:id`, the trash is its own tab also for the personal calendar (whose settings now have tabs), with 20 entries at a time and a search from 8 entries on, new feature switch `trash` and optional `events.listTrash`, `restore` and `purge` for custom adapters
|
|
10
|
+
- Live updates: changes by other people, or in other tabs, show up at once. The backend sends `event.changed` over the existing WebSocket, and an open dialog says when its event was changed or deleted in the meantime. New feature switch `liveUpdates`, new `restDataSource` option `liveUpdates` and optional `events.subscribe` for custom adapters
|
|
11
|
+
- Protection against editing at the same time: events carry a `version`, saving and deleting send it as `If-Match`, and the backend answers `412` with `eventChanged` when someone else changed the event in the meantime. The dialog then offers to save anyway or to load the current version, and undo no longer overwrites other people's changes. Custom adapters receive the version in `events.update` and `events.remove`
|
|
12
|
+
- Attachments: files can be uploaded to events in the event dialog (also while creating one and by drag and drop), downloaded by everyone who can see the event and deleted by those who may edit it. Events with attachments show a paperclip. New feature switch `attachments`, new endpoints in `api/openapi.yaml`, and events carry `attachmentCount` and `createdBy`
|
|
13
|
+
- Categories per calendar: managed in the calendar settings, assigned in the event dialog, with a filter in the header. Events carry `categoryIds`. New feature switch `categories`
|
|
14
|
+
- Public read-only links: a calendar can be shared with anyone without sign-in, opened at `/shared/:token`. New feature switch `publicLinks`
|
|
15
|
+
- Read-only mode: `readOnly` / `read-only` shows events without letting anyone change them
|
|
16
|
+
- Control from the host page: `goToDate()`, `setView()`, `next()`, `previous()`, `today()`, `openEvent()`, `createEvent()`, `refresh()` and `getState()` on the element and through `ref`, plus `view-change` / `onViewChange`
|
|
17
|
+
- Look and feel: accent color, font, corner radius and more through `--calendar-*` CSS properties or the `appearance` option, and a compact density
|
|
18
|
+
- New REST endpoints for categories and sharing in `api/openapi.yaml`
|
|
19
|
+
- The event dialog has an Appearance tab for color and categories; categories can be created right there. The dialog is 620 px wide on larger screens
|
|
20
|
+
- Categories are exported to `.ics` files as `CATEGORIES` and matched by name on import, creating missing ones when allowed
|
|
21
|
+
- Every optional feature can be switched off through `features` or `feature-*` attributes: chat, attendees, recurrence, reminders, links, map links, holidays, search, undo, duplicate, shortcuts, subscriptions, import and export, e-mail settings, time zones and custom colors. A feature that is off makes no backend calls, so no WebSocket is opened without chat
|
|
22
|
+
- `views` limits the views a user can switch between
|
|
23
|
+
- Configuration file: `config` takes the URL of a JSON or YAML file, or an object, with all serializable options. Props and attributes win over the file. A JSON Schema is included as `@rokoyfa/calendar/config.schema.json`
|
|
24
|
+
- `restDataSource` and `tenantDataSource` accept `chat: false`
|
|
25
|
+
- Configuration files in JSON may contain comments, and `.jsonc` is recognised. Commented example files for YAML and JSON are in `demo/`
|
|
26
|
+
- New [Developer Guide](DEVELOPER_GUIDE.md) with embedding, options, configuration, exported types and the backend contract. The README is now a short overview
|
|
27
|
+
- The chat types `ChatRepository`, `ChatMessage`, `ChatKey`, `ChatPage`, `ChatUnread` and `ChatEvent` are exported
|
|
28
|
+
- Text overrides of the wrong type (a text where a function is expected) are ignored instead of breaking the page
|
|
7
29
|
- The event dialog is split into tabs: General, Repeat, Attendees and Details
|
|
8
30
|
- Locations and links: optional `location` and up to 10 website or other links in the Details tab. Locations are shown in the calendar, links too when the event is tall enough (with a globe icon, open in a new tab), both are searchable and exported to iCalendar
|
|
9
31
|
- Reminders: choose in the event dialog how long before an event to be reminded. Shown as a browser notification or a notice in the calendar while it is open. Reminders are personal per user
|