@rokoyfa/calendar 1.1.0 → 1.2.1

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.
Files changed (191) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/DEVELOPER_GUIDE.md +743 -0
  3. package/README.md +39 -108
  4. package/api/openapi.yaml +359 -3
  5. package/demo/calendar.config.jsonc +149 -0
  6. package/demo/calendar.config.yaml +146 -0
  7. package/dist-lib/cdn/browser-BSbYkIQu.js +130 -0
  8. package/dist-lib/cdn/browser-BSbYkIQu.js.map +1 -0
  9. package/dist-lib/cdn/calendar-widget.js +12 -7
  10. package/dist-lib/cdn/calendar-widget.js.map +1 -1
  11. package/dist-lib/cdn/de-CjkGEfiE.js +2 -0
  12. package/dist-lib/cdn/de-CjkGEfiE.js.map +1 -0
  13. package/dist-lib/cdn/es-BrMRh6bn.js +2 -0
  14. package/dist-lib/cdn/es-BrMRh6bn.js.map +1 -0
  15. package/dist-lib/cdn/fr-Ckr8Uxxd.js +2 -0
  16. package/dist-lib/cdn/fr-Ckr8Uxxd.js.map +1 -0
  17. package/dist-lib/cdn/it-_2BGklYa.js +2 -0
  18. package/dist-lib/cdn/it-_2BGklYa.js.map +1 -0
  19. package/dist-lib/cdn/nl-BykoYBK7.js +2 -0
  20. package/dist-lib/cdn/nl-BykoYBK7.js.map +1 -0
  21. package/dist-lib/cdn/pl-as7f_-F8.js +2 -0
  22. package/dist-lib/cdn/pl-as7f_-F8.js.map +1 -0
  23. package/dist-lib/cdn/pt-BWJIdrI6.js +2 -0
  24. package/dist-lib/cdn/pt-BWJIdrI6.js.map +1 -0
  25. package/dist-lib/cdn/rolldown-runtime-CrjiCqGf.js +1 -0
  26. package/dist-lib/cdn/src-l8Q4aJRr.js +12 -0
  27. package/dist-lib/cdn/src-l8Q4aJRr.js.map +1 -0
  28. package/dist-lib/npm/{de-CCzGjeTd.js → de-lDO0Tv9y.js} +135 -8
  29. package/dist-lib/npm/de-lDO0Tv9y.js.map +1 -0
  30. package/dist-lib/npm/{es-Ciaf66rH.js → es-Cy3Mmj9C.js} +135 -8
  31. package/dist-lib/npm/es-Cy3Mmj9C.js.map +1 -0
  32. package/dist-lib/npm/{fr-CAqNm10Z.js → fr-Ci0ZM0nG.js} +135 -8
  33. package/dist-lib/npm/fr-Ci0ZM0nG.js.map +1 -0
  34. package/dist-lib/npm/index.js +6012 -2564
  35. package/dist-lib/npm/index.js.map +1 -1
  36. package/dist-lib/npm/{it-Cqqdu2ua.js → it-BiTHjgzI.js} +135 -8
  37. package/dist-lib/npm/it-BiTHjgzI.js.map +1 -0
  38. package/dist-lib/npm/{nl-CkchSA8q.js → nl-DZTwpAwV.js} +135 -8
  39. package/dist-lib/npm/nl-DZTwpAwV.js.map +1 -0
  40. package/dist-lib/npm/{pl-CCBDUr8k.js → pl-DeWLtyMR.js} +135 -8
  41. package/dist-lib/npm/pl-DeWLtyMR.js.map +1 -0
  42. package/dist-lib/npm/{pt-DucaCaoY.js → pt-CaqSW5TJ.js} +135 -8
  43. package/dist-lib/npm/pt-CaqSW5TJ.js.map +1 -0
  44. package/dist-lib/npm/types/components/Button.d.ts +1 -1
  45. package/dist-lib/npm/types/components/Icons.d.ts +5 -0
  46. package/dist-lib/npm/types/components/SegmentedControl.d.ts +2 -2
  47. package/dist-lib/npm/types/components/SegmentedField.d.ts +2 -11
  48. package/dist-lib/npm/types/components/StatusMessage.d.ts +0 -1
  49. package/dist-lib/npm/types/components/Tabs.d.ts +3 -1
  50. package/dist-lib/npm/types/config/routes.d.ts +1 -1
  51. package/dist-lib/npm/types/context/HostContext.d.ts +26 -3
  52. package/dist-lib/npm/types/context/TimeZoneContext.d.ts +3 -0
  53. package/dist-lib/npm/types/data/restDataSource.d.ts +5 -1
  54. package/dist-lib/npm/types/data/tenantDataSource.d.ts +4 -1
  55. package/dist-lib/npm/types/data/types.d.ts +3 -1
  56. package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +2 -1
  57. package/dist-lib/npm/types/features/authorization/hooks/useRedirectTarget.d.ts +4 -0
  58. package/dist-lib/npm/types/features/authorization/index.d.ts +1 -1
  59. package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +2 -0
  60. package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +2 -0
  61. package/dist-lib/npm/types/features/authorization/types/auth.d.ts +3 -0
  62. package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +14 -1
  63. package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +2 -1
  64. package/dist-lib/npm/types/features/calendar/components/DayColumn.d.ts +2 -1
  65. package/dist-lib/npm/types/features/calendar/components/EventLinks.d.ts +7 -0
  66. package/dist-lib/npm/types/features/calendar/components/EventLocation.d.ts +3 -0
  67. package/dist-lib/npm/types/features/calendar/components/EventSearchModal.d.ts +9 -0
  68. package/dist-lib/npm/types/features/calendar/components/EventTitle.d.ts +2 -1
  69. package/dist-lib/npm/types/features/calendar/components/MiniMonth.d.ts +2 -1
  70. package/dist-lib/npm/types/features/calendar/components/UndoNotice.d.ts +7 -0
  71. package/dist-lib/npm/types/features/calendar/constants/views.d.ts +4 -1
  72. package/dist-lib/npm/types/features/calendar/context/CurrentUserContext.d.ts +3 -0
  73. package/dist-lib/npm/types/features/calendar/context/HolidaysContext.d.ts +4 -0
  74. package/dist-lib/npm/types/features/calendar/hooks/useAttendeeCandidates.d.ts +3 -0
  75. package/dist-lib/npm/types/features/calendar/hooks/useEventDrag.d.ts +1 -1
  76. package/dist-lib/npm/types/features/calendar/hooks/useEventSearch.d.ts +7 -0
  77. package/dist-lib/npm/types/features/calendar/hooks/useEventSource.d.ts +2 -1
  78. package/dist-lib/npm/types/features/calendar/hooks/usePressDrag.d.ts +23 -0
  79. package/dist-lib/npm/types/features/calendar/hooks/useSegmentAttributes.d.ts +15 -0
  80. package/dist-lib/npm/types/features/calendar/hooks/useSlotSelection.d.ts +1 -4
  81. package/dist-lib/npm/types/features/calendar/index.d.ts +1 -2
  82. package/dist-lib/npm/types/features/calendar/types/editor.d.ts +3 -0
  83. package/dist-lib/npm/types/features/calendar/types/view.d.ts +1 -1
  84. package/dist-lib/npm/types/features/calendar/utils/eventDrag.d.ts +0 -1
  85. package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +0 -3
  86. package/dist-lib/npm/types/features/calendar/utils/search.d.ts +11 -0
  87. package/dist-lib/npm/types/features/calendars/components/ShowInPersonalSwitch.d.ts +4 -0
  88. package/dist-lib/npm/types/features/calendars/components/settings/ExchangeSection.d.ts +4 -0
  89. package/dist-lib/npm/types/features/calendars/components/settings/SubscribeSection.d.ts +4 -0
  90. package/dist-lib/npm/types/features/calendars/context/CalendarsProvider.d.ts +2 -1
  91. package/dist-lib/npm/types/features/calendars/index.d.ts +2 -2
  92. package/dist-lib/npm/types/features/calendars/repositories/LocalCalendarRepository.d.ts +12 -1
  93. package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +3 -0
  94. package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +5 -1
  95. package/dist-lib/npm/types/features/calendars/utils/activeCalendarStorage.d.ts +2 -0
  96. package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +1 -2
  97. package/dist-lib/npm/types/features/chat/components/ChatPanel.d.ts +8 -0
  98. package/dist-lib/npm/types/features/chat/components/ChatProvider.d.ts +13 -0
  99. package/dist-lib/npm/types/features/chat/components/UnreadBadge.d.ts +4 -0
  100. package/dist-lib/npm/types/features/chat/context/ChatContext.d.ts +14 -0
  101. package/dist-lib/npm/types/features/chat/hooks/useChatMessages.d.ts +13 -0
  102. package/dist-lib/npm/types/features/chat/hooks/useChatUnread.d.ts +7 -0
  103. package/dist-lib/npm/types/features/chat/index.d.ts +4 -0
  104. package/dist-lib/npm/types/features/chat/utils/time.d.ts +2 -0
  105. package/dist-lib/npm/types/features/events/components/AttendeesField.d.ts +15 -0
  106. package/dist-lib/npm/types/features/events/components/EventModal.d.ts +19 -3
  107. package/dist-lib/npm/types/features/events/components/LinksField.d.ts +8 -0
  108. package/dist-lib/npm/types/features/events/components/ReminderField.d.ts +6 -0
  109. package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +6 -3
  110. package/dist-lib/npm/types/features/events/index.d.ts +3 -1
  111. package/dist-lib/npm/types/features/events/utils/icalExchange.d.ts +11 -0
  112. package/dist-lib/npm/types/features/events/utils/undo.d.ts +7 -0
  113. package/dist-lib/npm/types/features/holidays/components/HolidaySettings.d.ts +1 -0
  114. package/dist-lib/npm/types/features/holidays/hooks/useHolidays.d.ts +3 -0
  115. package/dist-lib/npm/types/features/holidays/index.d.ts +2 -0
  116. package/dist-lib/npm/types/features/holidays/utils/holidayLibrary.d.ts +8 -0
  117. package/dist-lib/npm/types/features/preferences/components/NotificationSettings.d.ts +3 -0
  118. package/dist-lib/npm/types/features/preferences/index.d.ts +1 -0
  119. package/dist-lib/npm/types/features/reminders/ReminderNotices.d.ts +1 -0
  120. package/dist-lib/npm/types/features/reminders/useReminders.d.ts +2 -0
  121. package/dist-lib/npm/types/features/storage/hooks/useStorage.d.ts +1 -2
  122. package/dist-lib/npm/types/features/storage/index.d.ts +4 -2
  123. package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +2 -1
  124. package/dist-lib/npm/types/features/storage/repositories/RemoteChatRepository.d.ts +18 -0
  125. package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +5 -2
  126. package/dist-lib/npm/types/features/storage/repositories/RemoteHolidayRepository.d.ts +7 -0
  127. package/dist-lib/npm/types/features/storage/types/storage.d.ts +30 -2
  128. package/dist-lib/npm/types/hooks/useDebouncedValue.d.ts +1 -0
  129. package/dist-lib/npm/types/hooks/useForm.d.ts +5 -0
  130. package/dist-lib/npm/types/hooks/useFormState.d.ts +5 -0
  131. package/dist-lib/npm/types/hooks/useKeyboardShortcuts.d.ts +3 -0
  132. package/dist-lib/npm/types/hooks/useLocationUrl.d.ts +1 -0
  133. package/dist-lib/npm/types/i18n/format.d.ts +1 -0
  134. package/dist-lib/npm/types/i18n/index.d.ts +0 -1
  135. package/dist-lib/npm/types/i18n/locale.d.ts +0 -2
  136. package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +17 -0
  137. package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +25 -0
  138. package/dist-lib/npm/types/i18n/messages/en/core.d.ts +3 -0
  139. package/dist-lib/npm/types/i18n/messages/en/events.d.ts +64 -3
  140. package/dist-lib/npm/types/i18n/messages/en/index.d.ts +130 -3
  141. package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +21 -0
  142. package/dist-lib/npm/types/i18n/messages/index.d.ts +130 -3
  143. package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
  144. package/dist-lib/npm/types/lib/config.d.ts +9 -22
  145. package/dist-lib/npm/types/lib/configFile.d.ts +6 -0
  146. package/dist-lib/npm/types/lib/defaults.d.ts +25 -1
  147. package/dist-lib/npm/types/lib/element.d.ts +5 -1
  148. package/dist-lib/npm/types/lib/index.d.ts +6 -3
  149. package/dist-lib/npm/types/lib/options.d.ts +35 -0
  150. package/dist-lib/npm/types/lib/useCalendarOptions.d.ts +11 -0
  151. package/dist-lib/npm/types/pages/RespondPage.d.ts +1 -0
  152. package/dist-lib/npm/types/utils/api.d.ts +4 -5
  153. package/dist-lib/npm/types/utils/apiError.d.ts +0 -2
  154. package/dist-lib/npm/types/utils/appError.d.ts +2 -1
  155. package/dist-lib/npm/types/utils/calendarView.d.ts +1 -0
  156. package/dist-lib/npm/types/utils/chat.d.ts +44 -0
  157. package/dist-lib/npm/types/utils/color.d.ts +0 -1
  158. package/dist-lib/npm/types/utils/date.d.ts +0 -6
  159. package/dist-lib/npm/types/utils/event.d.ts +41 -5
  160. package/dist-lib/npm/types/utils/holidays.d.ts +18 -0
  161. package/dist-lib/npm/types/utils/ical.d.ts +11 -0
  162. package/dist-lib/npm/types/utils/location.d.ts +4 -0
  163. package/dist-lib/npm/types/utils/notifications.d.ts +3 -0
  164. package/dist-lib/npm/types/utils/preferences.d.ts +7 -1
  165. package/dist-lib/npm/types/utils/recurrence.d.ts +3 -4
  166. package/dist-lib/npm/types/utils/reminders.d.ts +13 -0
  167. package/dist-lib/npm/types/utils/timeZone.d.ts +1 -1
  168. package/package.json +10 -1
  169. package/schema/calendar-config.schema.json +232 -0
  170. package/dist-lib/cdn/de-BPZBZXaZ.js +0 -2
  171. package/dist-lib/cdn/de-BPZBZXaZ.js.map +0 -1
  172. package/dist-lib/cdn/es-DsIckdik.js +0 -2
  173. package/dist-lib/cdn/es-DsIckdik.js.map +0 -1
  174. package/dist-lib/cdn/fr-DWAs3O6J.js +0 -2
  175. package/dist-lib/cdn/fr-DWAs3O6J.js.map +0 -1
  176. package/dist-lib/cdn/it-CbhjxqIb.js +0 -2
  177. package/dist-lib/cdn/it-CbhjxqIb.js.map +0 -1
  178. package/dist-lib/cdn/nl-mjTHznX5.js +0 -2
  179. package/dist-lib/cdn/nl-mjTHznX5.js.map +0 -1
  180. package/dist-lib/cdn/pl-CXT0jb2D.js +0 -2
  181. package/dist-lib/cdn/pl-CXT0jb2D.js.map +0 -1
  182. package/dist-lib/cdn/pt-D0oXlVdU.js +0 -2
  183. package/dist-lib/cdn/pt-D0oXlVdU.js.map +0 -1
  184. package/dist-lib/npm/de-CCzGjeTd.js.map +0 -1
  185. package/dist-lib/npm/es-Ciaf66rH.js.map +0 -1
  186. package/dist-lib/npm/fr-CAqNm10Z.js.map +0 -1
  187. package/dist-lib/npm/it-Cqqdu2ua.js.map +0 -1
  188. package/dist-lib/npm/nl-CkchSA8q.js.map +0 -1
  189. package/dist-lib/npm/pl-CCBDUr8k.js.map +0 -1
  190. package/dist-lib/npm/pt-DucaCaoY.js.map +0 -1
  191. package/dist-lib/npm/types/hooks/useArrowKeyNavigation.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  All notable changes to `@rokoyfa/calendar`. Versions follow [Semantic Versioning](https://semver.org/). From 1.0 on, breaking changes to props, attributes, DOM events, exported types, the data adapter and the REST contract only come with a new major version.
4
4
 
5
+ ## Unreleased
6
+
7
+ - 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
8
+ - `views` limits the views a user can switch between
9
+ - 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`
10
+ - `restDataSource` and `tenantDataSource` accept `chat: false`
11
+ - Configuration files in JSON may contain comments, and `.jsonc` is recognised. Commented example files for YAML and JSON are in `demo/`
12
+ - New [Developer Guide](DEVELOPER_GUIDE.md) with embedding, options, configuration, exported types and the backend contract. The README is now a short overview
13
+ - The chat types `ChatRepository`, `ChatMessage`, `ChatKey`, `ChatPage`, `ChatUnread` and `ChatEvent` are exported
14
+ - Text overrides of the wrong type (a text where a function is expected) are ignored instead of breaking the page
15
+ - The event dialog is split into tabs: General, Repeat, Attendees and Details
16
+ - 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
17
+ - 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
18
+ - Search over title, location, description and links with jump to the event. Custom adapters can implement `search`, otherwise the component searches the last and next year
19
+ - iCalendar export and import (.ics) in the calendar settings. Importing again updates events with the same `uid`, recurring events, exceptions, reminders and attendees are kept
20
+ - Attendees in team calendars with responses yes, maybe and no, plus a button to invite all members at once. Unanswered events are striped, declined ones crossed out
21
+ - The calendar you were in is restored after a reload
22
+ - Chat per event in team calendars (one per occurrence for recurring events) with live updates over a WebSocket, unread badges, edit and delete, moderation for owners, admins and managers, and optional emails to attendees with a link straight into the chat
23
+ - Public holidays for over 200 countries and their regions, computed in the browser with date-holidays (loaded only when shown) or delivered by your backend (`holiday-source="backend"`, `GET /holidays`). Region from the new `holidays` attribute, the language, or the user's setting
24
+ - Calendar subscriptions: a secret link per user and calendar for Google Calendar, Outlook or Apple Calendar (`/calendars/:id/feed`, `/feeds/:token.ics`)
25
+ - Email settings (invitations, changes, reminders) in a new Notifications tab, and a page that saves the yes / maybe / no answer from an invitation email without signing in (`POST /events/respond`)
26
+ - Members without edit rights can set their own reminders on any event (`PUT /events/:id/reminders`)
27
+ - Locations open in Google Maps from the dialog, the calendar grid and the reply page. Another map service can be set with `map-url`, locations that are web addresses open directly
28
+ - Duplicate events from the event dialog
29
+ - Undo after deleting, moving or resizing events (notice at the bottom or Ctrl+Z / ⌘Z). Single events are deleted without a confirmation, recurring ones still ask which events
30
+ - Keyboard shortcuts: `T` today, `N` new event, `/` search, `D` `W` `M` `Y` views. The header tooltips show them
31
+ - Time zone setting: automatic (zone from the host, otherwise the system, recommended) or a fixed zone. Events are shown in it and new events start in it
32
+ - Search results show times in your own time zone and open events that move to another day there
33
+ - New event fields `uid`, `location`, `links`, `reminders`, `attendees`, preference `timeZone`, new endpoints `GET /events/search` and `POST /events/:id/response`. Older events and backends without them keep working
34
+
5
35
  ## 1.1.0 – 2026-11-11
6
36
 
7
37
  - Arrow keys switch to the previous or next day, week, month or year also right after loading and after closing a dialog, not only after clicking into the calendar. With several calendars on a page, the last used one reacts