@rokoyfa/calendar 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/LICENSE +21 -0
  3. package/README.md +159 -3
  4. package/api/openapi.yaml +919 -0
  5. package/dist-lib/cdn/calendar-widget.js +14 -0
  6. package/dist-lib/cdn/calendar-widget.js.map +1 -0
  7. package/dist-lib/cdn/de-BPZBZXaZ.js +2 -0
  8. package/dist-lib/cdn/de-BPZBZXaZ.js.map +1 -0
  9. package/dist-lib/cdn/es-DsIckdik.js +2 -0
  10. package/dist-lib/cdn/es-DsIckdik.js.map +1 -0
  11. package/dist-lib/cdn/fr-DWAs3O6J.js +2 -0
  12. package/dist-lib/cdn/fr-DWAs3O6J.js.map +1 -0
  13. package/dist-lib/cdn/it-CbhjxqIb.js +2 -0
  14. package/dist-lib/cdn/it-CbhjxqIb.js.map +1 -0
  15. package/dist-lib/cdn/nl-mjTHznX5.js +2 -0
  16. package/dist-lib/cdn/nl-mjTHznX5.js.map +1 -0
  17. package/dist-lib/cdn/pl-CXT0jb2D.js +2 -0
  18. package/dist-lib/cdn/pl-CXT0jb2D.js.map +1 -0
  19. package/dist-lib/cdn/pt-D0oXlVdU.js +2 -0
  20. package/dist-lib/cdn/pt-D0oXlVdU.js.map +1 -0
  21. package/dist-lib/npm/de-CCzGjeTd.js +573 -0
  22. package/dist-lib/npm/de-CCzGjeTd.js.map +1 -0
  23. package/dist-lib/npm/es-Ciaf66rH.js +559 -0
  24. package/dist-lib/npm/es-Ciaf66rH.js.map +1 -0
  25. package/dist-lib/npm/fr-CAqNm10Z.js +559 -0
  26. package/dist-lib/npm/fr-CAqNm10Z.js.map +1 -0
  27. package/dist-lib/npm/index.d.ts +1 -0
  28. package/dist-lib/npm/index.js +13277 -0
  29. package/dist-lib/npm/index.js.map +1 -0
  30. package/dist-lib/npm/it-Cqqdu2ua.js +565 -0
  31. package/dist-lib/npm/it-Cqqdu2ua.js.map +1 -0
  32. package/dist-lib/npm/nl-CkchSA8q.js +559 -0
  33. package/dist-lib/npm/nl-CkchSA8q.js.map +1 -0
  34. package/dist-lib/npm/pl-CCBDUr8k.js +565 -0
  35. package/dist-lib/npm/pl-CCBDUr8k.js.map +1 -0
  36. package/dist-lib/npm/pt-DucaCaoY.js +566 -0
  37. package/dist-lib/npm/pt-DucaCaoY.js.map +1 -0
  38. package/dist-lib/npm/types/components/Button.d.ts +17 -0
  39. package/dist-lib/npm/types/components/ChoiceChip.d.ts +13 -0
  40. package/dist-lib/npm/types/components/ConfirmModal.d.ts +11 -0
  41. package/dist-lib/npm/types/components/DateTimeField.d.ts +15 -0
  42. package/dist-lib/npm/types/components/Form.d.ts +8 -0
  43. package/dist-lib/npm/types/components/FormField.d.ts +10 -0
  44. package/dist-lib/npm/types/components/IconButton.d.ts +11 -0
  45. package/dist-lib/npm/types/components/Icons.d.ts +10 -0
  46. package/dist-lib/npm/types/components/Modal.d.ts +10 -0
  47. package/dist-lib/npm/types/components/NumberField.d.ts +12 -0
  48. package/dist-lib/npm/types/components/PageLayout.d.ts +13 -0
  49. package/dist-lib/npm/types/components/PageSection.d.ts +10 -0
  50. package/dist-lib/npm/types/components/PasswordField.d.ts +4 -0
  51. package/dist-lib/npm/types/components/SegmentedControl.d.ts +11 -0
  52. package/dist-lib/npm/types/components/SegmentedField.d.ts +11 -0
  53. package/dist-lib/npm/types/components/SelectField.d.ts +13 -0
  54. package/dist-lib/npm/types/components/StatusMessage.d.ts +13 -0
  55. package/dist-lib/npm/types/components/Stepper.d.ts +9 -0
  56. package/dist-lib/npm/types/components/Switch.d.ts +8 -0
  57. package/dist-lib/npm/types/components/Tabs.d.ts +14 -0
  58. package/dist-lib/npm/types/components/TeamsGate.d.ts +4 -0
  59. package/dist-lib/npm/types/components/TextField.d.ts +9 -0
  60. package/dist-lib/npm/types/config/calendars.d.ts +1 -0
  61. package/dist-lib/npm/types/config/routes.d.ts +18 -0
  62. package/dist-lib/npm/types/context/HostContext.d.ts +11 -0
  63. package/dist-lib/npm/types/context/RootElementContext.d.ts +2 -0
  64. package/dist-lib/npm/types/data/index.d.ts +4 -0
  65. package/dist-lib/npm/types/data/localDataSource.d.ts +3 -0
  66. package/dist-lib/npm/types/data/restDataSource.d.ts +11 -0
  67. package/dist-lib/npm/types/data/tenantDataSource.d.ts +10 -0
  68. package/dist-lib/npm/types/data/types.d.ts +21 -0
  69. package/dist-lib/npm/types/features/authorization/components/AccountMenu.d.ts +6 -0
  70. package/dist-lib/npm/types/features/authorization/components/AuthFields.d.ts +26 -0
  71. package/dist-lib/npm/types/features/authorization/components/AuthGate.d.ts +7 -0
  72. package/dist-lib/npm/types/features/authorization/components/ContinueLink.d.ts +1 -0
  73. package/dist-lib/npm/types/features/authorization/components/EmailVerificationBanner.d.ts +1 -0
  74. package/dist-lib/npm/types/features/authorization/components/ForgotPasswordPage.d.ts +1 -0
  75. package/dist-lib/npm/types/features/authorization/components/LoginPage.d.ts +1 -0
  76. package/dist-lib/npm/types/features/authorization/components/RegisterPage.d.ts +1 -0
  77. package/dist-lib/npm/types/features/authorization/components/ResendVerificationButton.d.ts +4 -0
  78. package/dist-lib/npm/types/features/authorization/components/ResetPasswordPage.d.ts +1 -0
  79. package/dist-lib/npm/types/features/authorization/components/VerifyEmailPage.d.ts +1 -0
  80. package/dist-lib/npm/types/features/authorization/components/account/AccountSettings.d.ts +1 -0
  81. package/dist-lib/npm/types/features/authorization/components/account/DeleteAccountSection.d.ts +1 -0
  82. package/dist-lib/npm/types/features/authorization/components/account/EmailSection.d.ts +4 -0
  83. package/dist-lib/npm/types/features/authorization/components/account/PasswordSection.d.ts +1 -0
  84. package/dist-lib/npm/types/features/authorization/components/account/ProfileSection.d.ts +4 -0
  85. package/dist-lib/npm/types/features/authorization/context/AuthContext.d.ts +2 -0
  86. package/dist-lib/npm/types/features/authorization/context/AuthProvider.d.ts +8 -0
  87. package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +18 -0
  88. package/dist-lib/npm/types/features/authorization/index.d.ts +14 -0
  89. package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +18 -0
  90. package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +18 -0
  91. package/dist-lib/npm/types/features/authorization/types/auth.d.ts +52 -0
  92. package/dist-lib/npm/types/features/authorization/utils/validation.d.ts +22 -0
  93. package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +14 -0
  94. package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +16 -0
  95. package/dist-lib/npm/types/features/calendar/components/DayColumn.d.ts +21 -0
  96. package/dist-lib/npm/types/features/calendar/components/EventBlock.d.ts +10 -0
  97. package/dist-lib/npm/types/features/calendar/components/EventChip.d.ts +10 -0
  98. package/dist-lib/npm/types/features/calendar/components/EventTitle.d.ts +8 -0
  99. package/dist-lib/npm/types/features/calendar/components/MiniMonth.d.ts +9 -0
  100. package/dist-lib/npm/types/features/calendar/components/MonthGrid.d.ts +8 -0
  101. package/dist-lib/npm/types/features/calendar/components/MonthView.d.ts +2 -0
  102. package/dist-lib/npm/types/features/calendar/components/NowIndicator.d.ts +6 -0
  103. package/dist-lib/npm/types/features/calendar/components/TimeColumn.d.ts +1 -0
  104. package/dist-lib/npm/types/features/calendar/components/TimeGridView.d.ts +2 -0
  105. package/dist-lib/npm/types/features/calendar/components/YearView.d.ts +2 -0
  106. package/dist-lib/npm/types/features/calendar/constants/grid.d.ts +4 -0
  107. package/dist-lib/npm/types/features/calendar/constants/views.d.ts +7 -0
  108. package/dist-lib/npm/types/features/calendar/context/DragContext.d.ts +2 -0
  109. package/dist-lib/npm/types/features/calendar/context/EventSourcesContext.d.ts +3 -0
  110. package/dist-lib/npm/types/features/calendar/hooks/useCalendarView.d.ts +19 -0
  111. package/dist-lib/npm/types/features/calendar/hooks/useEventDrag.d.ts +15 -0
  112. package/dist-lib/npm/types/features/calendar/hooks/useEventSource.d.ts +2 -0
  113. package/dist-lib/npm/types/features/calendar/hooks/useNow.d.ts +1 -0
  114. package/dist-lib/npm/types/features/calendar/hooks/useSlotSelection.d.ts +6 -0
  115. package/dist-lib/npm/types/features/calendar/index.d.ts +4 -0
  116. package/dist-lib/npm/types/features/calendar/types/editor.d.ts +5 -0
  117. package/dist-lib/npm/types/features/calendar/types/eventLayout.d.ts +14 -0
  118. package/dist-lib/npm/types/features/calendar/types/eventSource.d.ts +6 -0
  119. package/dist-lib/npm/types/features/calendar/types/view.d.ts +27 -0
  120. package/dist-lib/npm/types/features/calendar/utils/allDay.d.ts +12 -0
  121. package/dist-lib/npm/types/features/calendar/utils/eventDrag.d.ts +12 -0
  122. package/dist-lib/npm/types/features/calendar/utils/eventGeometry.d.ts +3 -0
  123. package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +16 -0
  124. package/dist-lib/npm/types/features/calendar/utils/layoutEvents.d.ts +3 -0
  125. package/dist-lib/npm/types/features/calendar/utils/segmentEvents.d.ts +5 -0
  126. package/dist-lib/npm/types/features/calendar/utils/slotSelection.d.ts +17 -0
  127. package/dist-lib/npm/types/features/calendars/components/ActiveCalendarIndicator.d.ts +1 -0
  128. package/dist-lib/npm/types/features/calendars/components/CalendarPreview.d.ts +4 -0
  129. package/dist-lib/npm/types/features/calendars/components/CalendarSettings.d.ts +1 -0
  130. package/dist-lib/npm/types/features/calendars/components/CalendarSwitcher.d.ts +1 -0
  131. package/dist-lib/npm/types/features/calendars/components/InvitationList.d.ts +1 -0
  132. package/dist-lib/npm/types/features/calendars/components/create/ColorStep.d.ts +7 -0
  133. package/dist-lib/npm/types/features/calendars/components/create/CreateCalendarPage.d.ts +1 -0
  134. package/dist-lib/npm/types/features/calendars/components/create/DetailsStep.d.ts +12 -0
  135. package/dist-lib/npm/types/features/calendars/components/create/MembersStep.d.ts +8 -0
  136. package/dist-lib/npm/types/features/calendars/components/create/ReviewStep.d.ts +4 -0
  137. package/dist-lib/npm/types/features/calendars/components/settings/CalendarSettingsPage.d.ts +1 -0
  138. package/dist-lib/npm/types/features/calendars/components/settings/DangerSection.d.ts +9 -0
  139. package/dist-lib/npm/types/features/calendars/components/settings/GeneralSection.d.ts +4 -0
  140. package/dist-lib/npm/types/features/calendars/components/settings/MembersSection.d.ts +11 -0
  141. package/dist-lib/npm/types/features/calendars/components/settings/RoleOverview.d.ts +1 -0
  142. package/dist-lib/npm/types/features/calendars/components/settings/TeamInvitationsSection.d.ts +12 -0
  143. package/dist-lib/npm/types/features/calendars/components/settings/TransferOwnershipModal.d.ts +8 -0
  144. package/dist-lib/npm/types/features/calendars/constants/calendars.d.ts +9 -0
  145. package/dist-lib/npm/types/features/calendars/context/CalendarsContext.d.ts +2 -0
  146. package/dist-lib/npm/types/features/calendars/context/CalendarsProvider.d.ts +8 -0
  147. package/dist-lib/npm/types/features/calendars/hooks/useCalendars.d.ts +1 -0
  148. package/dist-lib/npm/types/features/calendars/hooks/useTeam.d.ts +12 -0
  149. package/dist-lib/npm/types/features/calendars/index.d.ts +12 -0
  150. package/dist-lib/npm/types/features/calendars/repositories/LocalCalendarRepository.d.ts +20 -0
  151. package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +23 -0
  152. package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +91 -0
  153. package/dist-lib/npm/types/features/calendars/utils/draft.d.ts +7 -0
  154. package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +13 -0
  155. package/dist-lib/npm/types/features/events/components/ColorPicker.d.ts +7 -0
  156. package/dist-lib/npm/types/features/events/components/CustomColorSettings.d.ts +1 -0
  157. package/dist-lib/npm/types/features/events/components/DeleteEventModal.d.ts +8 -0
  158. package/dist-lib/npm/types/features/events/components/EventModal.d.ts +11 -0
  159. package/dist-lib/npm/types/features/events/components/RecurrenceFields.d.ts +9 -0
  160. package/dist-lib/npm/types/features/events/components/RecurrenceScopeModal.d.ts +8 -0
  161. package/dist-lib/npm/types/features/events/components/ScopeButtons.d.ts +10 -0
  162. package/dist-lib/npm/types/features/events/components/TimeZoneField.d.ts +6 -0
  163. package/dist-lib/npm/types/features/events/constants/colors.d.ts +3 -0
  164. package/dist-lib/npm/types/features/events/hooks/useCustomColors.d.ts +8 -0
  165. package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +15 -0
  166. package/dist-lib/npm/types/features/events/index.d.ts +7 -0
  167. package/dist-lib/npm/types/features/events/types/eventModal.d.ts +1 -0
  168. package/dist-lib/npm/types/features/events/utils/scopeOptions.d.ts +3 -0
  169. package/dist-lib/npm/types/features/events/utils/seriesActions.d.ts +4 -0
  170. package/dist-lib/npm/types/features/preferences/components/PreferencesSettings.d.ts +1 -0
  171. package/dist-lib/npm/types/features/preferences/context/PreferencesContext.d.ts +6 -0
  172. package/dist-lib/npm/types/features/preferences/context/PreferencesProvider.d.ts +4 -0
  173. package/dist-lib/npm/types/features/preferences/hooks/usePreferences.d.ts +1 -0
  174. package/dist-lib/npm/types/features/preferences/index.d.ts +3 -0
  175. package/dist-lib/npm/types/features/storage/components/LocalImportPrompt.d.ts +5 -0
  176. package/dist-lib/npm/types/features/storage/context/StorageContext.d.ts +2 -0
  177. package/dist-lib/npm/types/features/storage/context/StorageProvider.d.ts +8 -0
  178. package/dist-lib/npm/types/features/storage/hooks/useStorage.d.ts +7 -0
  179. package/dist-lib/npm/types/features/storage/index.d.ts +10 -0
  180. package/dist-lib/npm/types/features/storage/repositories/LocalColorRepository.d.ts +9 -0
  181. package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +13 -0
  182. package/dist-lib/npm/types/features/storage/repositories/LocalPreferencesRepository.d.ts +8 -0
  183. package/dist-lib/npm/types/features/storage/repositories/RemoteColorRepository.d.ts +10 -0
  184. package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +12 -0
  185. package/dist-lib/npm/types/features/storage/repositories/RemotePreferencesRepository.d.ts +9 -0
  186. package/dist-lib/npm/types/features/storage/types/storage.d.ts +35 -0
  187. package/dist-lib/npm/types/features/storage/utils/copyEvents.d.ts +3 -0
  188. package/dist-lib/npm/types/features/storage/utils/localStorageList.d.ts +5 -0
  189. package/dist-lib/npm/types/features/storage/utils/localStorageValue.d.ts +9 -0
  190. package/dist-lib/npm/types/hooks/useArrowKeyNavigation.d.ts +6 -0
  191. package/dist-lib/npm/types/hooks/useAsyncAction.d.ts +6 -0
  192. package/dist-lib/npm/types/hooks/useAsyncResource.d.ts +9 -0
  193. package/dist-lib/npm/types/hooks/useForm.d.ts +21 -0
  194. package/dist-lib/npm/types/hooks/useFormState.d.ts +8 -0
  195. package/dist-lib/npm/types/hooks/useRequiredContext.d.ts +2 -0
  196. package/dist-lib/npm/types/hooks/useTabParam.d.ts +3 -0
  197. package/dist-lib/npm/types/i18n/I18nContext.d.ts +16 -0
  198. package/dist-lib/npm/types/i18n/I18nProvider.d.ts +9 -0
  199. package/dist-lib/npm/types/i18n/errorMessage.d.ts +2 -0
  200. package/dist-lib/npm/types/i18n/format.d.ts +28 -0
  201. package/dist-lib/npm/types/i18n/index.d.ts +8 -0
  202. package/dist-lib/npm/types/i18n/locale.d.ts +21 -0
  203. package/dist-lib/npm/types/i18n/messages/de/auth.d.ts +2 -0
  204. package/dist-lib/npm/types/i18n/messages/de/calendar.d.ts +3 -0
  205. package/dist-lib/npm/types/i18n/messages/de/calendars.d.ts +2 -0
  206. package/dist-lib/npm/types/i18n/messages/de/core.d.ts +7 -0
  207. package/dist-lib/npm/types/i18n/messages/de/events.d.ts +2 -0
  208. package/dist-lib/npm/types/i18n/messages/de/index.d.ts +2 -0
  209. package/dist-lib/npm/types/i18n/messages/de/settings.d.ts +2 -0
  210. package/dist-lib/npm/types/i18n/messages/de/storage.d.ts +2 -0
  211. package/dist-lib/npm/types/i18n/messages/en/auth.d.ts +97 -0
  212. package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +34 -0
  213. package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +179 -0
  214. package/dist-lib/npm/types/i18n/messages/en/core.d.ts +86 -0
  215. package/dist-lib/npm/types/i18n/messages/en/events.d.ts +46 -0
  216. package/dist-lib/npm/types/i18n/messages/en/index.d.ts +468 -0
  217. package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +19 -0
  218. package/dist-lib/npm/types/i18n/messages/en/storage.d.ts +7 -0
  219. package/dist-lib/npm/types/i18n/messages/es/index.d.ts +2 -0
  220. package/dist-lib/npm/types/i18n/messages/fr/index.d.ts +2 -0
  221. package/dist-lib/npm/types/i18n/messages/index.d.ts +473 -0
  222. package/dist-lib/npm/types/i18n/messages/it/index.d.ts +2 -0
  223. package/dist-lib/npm/types/i18n/messages/nl/index.d.ts +2 -0
  224. package/dist-lib/npm/types/i18n/messages/pl/index.d.ts +2 -0
  225. package/dist-lib/npm/types/i18n/messages/pt/index.d.ts +2 -0
  226. package/dist-lib/npm/types/i18n/messages/types.d.ts +7 -0
  227. package/dist-lib/npm/types/i18n/useI18n.d.ts +3 -0
  228. package/dist-lib/npm/types/i18n/useLocaleGetter.d.ts +1 -0
  229. package/dist-lib/npm/types/i18n/weekInfo.d.ts +5 -0
  230. package/dist-lib/npm/types/lib/CalendarApp.d.ts +14 -0
  231. package/dist-lib/npm/types/lib/CalendarWidget.d.ts +2 -0
  232. package/dist-lib/npm/types/lib/IsolatedRoot.d.ts +9 -0
  233. package/dist-lib/npm/types/lib/config.d.ts +31 -0
  234. package/dist-lib/npm/types/lib/defaults.d.ts +13 -0
  235. package/dist-lib/npm/types/lib/element.d.ts +19 -0
  236. package/dist-lib/npm/types/lib/eventCallbacks.d.ts +11 -0
  237. package/dist-lib/npm/types/lib/index.d.ts +17 -0
  238. package/dist-lib/npm/types/lib/linkParam.d.ts +2 -0
  239. package/dist-lib/npm/types/lib/version.d.ts +1 -0
  240. package/dist-lib/npm/types/pages/CalendarPage.d.ts +1 -0
  241. package/dist-lib/npm/types/pages/SettingsPage.d.ts +1 -0
  242. package/dist-lib/npm/types/router.d.ts +7 -0
  243. package/dist-lib/npm/types/utils/api.d.ts +32 -0
  244. package/dist-lib/npm/types/utils/apiError.d.ts +26 -0
  245. package/dist-lib/npm/types/utils/appError.d.ts +10 -0
  246. package/dist-lib/npm/types/utils/calendarView.d.ts +3 -0
  247. package/dist-lib/npm/types/utils/classNames.d.ts +2 -0
  248. package/dist-lib/npm/types/utils/color.d.ts +5 -0
  249. package/dist-lib/npm/types/utils/date.d.ts +44 -0
  250. package/dist-lib/npm/types/utils/dom.d.ts +3 -0
  251. package/dist-lib/npm/types/utils/event.d.ts +86 -0
  252. package/dist-lib/npm/types/utils/number.d.ts +1 -0
  253. package/dist-lib/npm/types/utils/object.d.ts +3 -0
  254. package/dist-lib/npm/types/utils/preferences.d.ts +14 -0
  255. package/dist-lib/npm/types/utils/recurrence.d.ts +33 -0
  256. package/dist-lib/npm/types/utils/series.d.ts +9 -0
  257. package/dist-lib/npm/types/utils/timeZone.d.ts +11 -0
  258. package/dist-lib/npm/types/utils/validation.d.ts +6 -0
  259. package/package.json +88 -6
package/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
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
+
5
+ ## 1.0.0 – 2026-11-11
6
+
7
+ First stable release. The public API is now frozen in the sense of SemVer.
8
+
9
+ **Upgrading from 0.1:** No changes are needed on the host page. Your own backend should store the new event fields `allDay` and `timeZone` and return them; events without them are read as before. `GET /events` is now called with a range one day wider on each side.
10
+
11
+
12
+ - All-day events: `allDay` in the event format, switch in the event dialog, all-day row above the day and week grid
13
+ - Time zones: events store an IANA `timeZone` (or `null` for the same local time everywhere), the dialog has a zone picker and shows the time in the viewer's zone, new prop `timeZone` / attribute `time-zone` sets the zone the calendar is shown in
14
+ - Move events by pressing and holding them for one second, then dragging (mouse and touch). In the day and week view the lower edge changes the end time. Recurring events ask whether to change this, the following or all events
15
+ - Events without `allDay`/`timeZone` keep working as floating timed events
16
+ - The visible range sent to the backend is one day wider on each side
17
+ - French, Spanish, Italian, Dutch, Polish and Portuguese, loaded on demand. Language names in the settings appear in their own language
18
+ - `messages` prop and property to override texts or add languages
19
+ - Automated tests with Vitest (`npm test`), run before every publish
20
+
21
+ ## 0.1.0 – 2026-11-10
22
+
23
+ First public release.
24
+
25
+ - `<Calendar />` React component and `<calendar-widget>` web component from one package, isolated in a Shadow DOM
26
+ - Day, week, month and year views, drag to select a time range, recurring events with "this / following / all" editing
27
+ - Data sources: `localDataSource`, `restDataSource`, `tenantDataSource` and custom adapters
28
+ - Accounts, team calendars with roles, invitations and ownership transfer when a backend is connected
29
+ - Sign-in through the host page with `getUserToken`
30
+ - English and German, region-aware week start, week numbers and time formats
31
+ - Host options `theme`, `initialView`, `features.teams`, `linkParam` and callbacks `onEventCreate`, `onEventUpdate`, `onEventDelete` (DOM events on the web component)
32
+ - REST contract as OpenAPI 3.1 in `api/openapi.yaml`
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rokoyfa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,159 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # @rokoyfa/calendar
2
+
3
+ An embeddable calendar for React apps and any other website. Day, week, month and year views, recurring events, team calendars with roles and invitations. English, German, French, Spanish, Italian, Dutch, Polish and Portuguese built in, more through your own texts. Runs without a backend (data stays in the browser) or against your own REST backend. Styles are isolated in a Shadow DOM, so the host page and the calendar never affect each other.
4
+
5
+ ## Setup
6
+
7
+ **Any website**, React is bundled:
8
+
9
+ ```html
10
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@rokoyfa/calendar@1/dist-lib/cdn/calendar-widget.js"></script>
11
+
12
+ <calendar-widget style="height: 700px"></calendar-widget>
13
+ ```
14
+
15
+ **React 19**:
16
+
17
+ ```bash
18
+ npm install @rokoyfa/calendar
19
+ ```
20
+
21
+ ```tsx
22
+ import { Calendar } from '@rokoyfa/calendar'
23
+
24
+ <Calendar style={{ height: 700 }} />
25
+ ```
26
+
27
+ Give the calendar a height, it fills its box. No CSS import is needed.
28
+
29
+ ## Examples
30
+
31
+ ```html
32
+ <!-- German, dark, month view -->
33
+ <calendar-widget locale="de-DE" theme="dark" initial-view="month" style="height: 600px"></calendar-widget>
34
+
35
+ <!-- Your backend with sign-in -->
36
+ <calendar-widget storage-mode="remote" auth api-base-url="https://api.example.com" style="height: 700px"></calendar-widget>
37
+ ```
38
+
39
+ ```tsx
40
+ <Calendar
41
+ storageMode="remote"
42
+ apiBaseUrl="https://api.example.com"
43
+ features={{ auth: true, teams: false }}
44
+ onEventCreate={(event) => console.log('created', event)}
45
+ />
46
+ ```
47
+
48
+ ```js
49
+ document.querySelector('calendar-widget').addEventListener('event-create', (e) => console.log(e.detail))
50
+ ```
51
+
52
+ | Prop | Attribute | Default | |
53
+ | --- | --- | --- | --- |
54
+ | `locale` | `locale` | browser | `en-US`, `de-DE`, `fr-FR`, `pt-BR`, … Formats follow the region |
55
+ | `messages` | property | – | Own texts per language, see below |
56
+ | `theme` | `theme` | system | `light`, `dark` |
57
+ | `initialView` | `initial-view` | user setting | `day`, `week`, `month`, `year` |
58
+ | `timeZone` | `time-zone` | browser | IANA zone the calendar is shown in, e.g. `Europe/Berlin` |
59
+ | `storageMode` | `storage-mode` | `local` | `local` or `remote` |
60
+ | `apiBaseUrl` | `api-base-url` | `/api` | Base URL of your backend |
61
+ | `features` | `auth`, `teams` | auth off, teams on | `teams="false"` turns team features off |
62
+ | `tenant`, `getUserToken` | `tenant`, property | – | Multi-tenant backend, sign-in through your own page |
63
+ | `dataSource` | property | – | Custom data adapter instead of REST |
64
+ | `onEventCreate` / `Update` / `Delete` | `event-create` / `-update` / `-delete` | – | After every stored change |
65
+
66
+ **Own texts and languages.** Override single texts or add a language. Missing texts fall back to the built-in language, or to English for a new one. The full list of keys is the `Messages` type.
67
+
68
+ ```js
69
+ document.querySelector('calendar-widget').messages = {
70
+ de: { calendar: { newEvent: 'Neuer Eintrag' } },
71
+ sv: { calendar: { today: 'Idag', newEvent: 'Ny händelse' }, views: { weekNumber: (week) => `V. ${week}` } },
72
+ }
73
+ ```
74
+
75
+ The CDN build loads languages other than English on demand from files next to `calendar-widget.js`. When hosting it yourself, copy the whole `dist-lib/cdn` folder.
76
+
77
+ **Demo:** [`demo/cdn.html`](demo/cdn.html) shows local mode with an event log, a dark German month view and a compact widget. Download it and open it in a browser, it loads the published package from jsDelivr.
78
+
79
+ ## Building your own backend
80
+
81
+ The full contract is [`api/openapi.yaml`](api/openapi.yaml) (OpenAPI 3.1, also shipped as `@rokoyfa/calendar/openapi.yaml`). The essentials:
82
+
83
+ ### Data types
84
+
85
+ ```ts
86
+ type CalendarEvent = EventInput & {
87
+ id: string
88
+ calendarId: string
89
+ createdAt: string // ISO date-time
90
+ updatedAt: string
91
+ }
92
+
93
+ type EventInput = {
94
+ title: string // 1–100 chars
95
+ startDate: string // 'YYYY-MM-DD'
96
+ start: string // 'HH:mm' in timeZone
97
+ endDate: string // inclusive for all-day events
98
+ end: string
99
+ allDay: boolean // start and end are '00:00'
100
+ timeZone: string | null // IANA zone, null = same local time everywhere (always null for all-day)
101
+ description: string // max 2000 chars
102
+ color: 'blue' | 'red' | 'green' | 'yellow' | `#${string}`
103
+ recurrence: Recurrence | null
104
+ excludedDates: string[] // occurrences removed from a series
105
+ seriesId: string | null // set on an occurrence detached from a series
106
+ originalDate: string | null // its original date in that series
107
+ }
108
+
109
+ type Recurrence = {
110
+ frequency: 'daily' | 'weekly' | 'monthly' | 'yearly'
111
+ interval: number // 1–99
112
+ weekdays: number[] // 0 = Monday … 6 = Sunday
113
+ monthlyMode: 'dayOfMonth' | 'weekdayOfMonth' | 'lastWeekdayOfMonth'
114
+ until: string | null // either until or count, or neither
115
+ count: number | null
116
+ }
117
+
118
+ type CalendarSummary = {
119
+ id: string; teamId: string; name: string; color: string
120
+ kind: 'personal' | 'team'; teamName: string | null; description: string
121
+ role: 'owner' | 'admin' | 'manager' | 'editor' | 'member' | 'contributor' | 'viewer'
122
+ showInPersonal: boolean; permissions: string[]
123
+ }
124
+
125
+ type User = { id: string; email: string; name: string; emailVerified: boolean }
126
+ type Preferences = { theme: 'system' | 'light' | 'dark'; defaultView: View; mobileDefaultView: View; locale: string }
127
+ type Problem = { code: string; message: string } // every error response
128
+ ```
129
+
130
+ The backend stores series as one event. The component expands occurrences itself.
131
+
132
+ ### When the component calls your backend
133
+
134
+ | Moment | Requests |
135
+ | --- | --- |
136
+ | Widget loads | `GET /auth/me` (only with `auth`), then `GET /preferences`, `GET /colors`, `GET /calendars`, `GET /invitations` |
137
+ | Visible range changes | `GET /events?from=…&to=…&calendarId=…` with the calendars shown. The range is one day wider than the view to cover time zone shifts. Return every event in the range **and** every series that can occur in it. |
138
+ | Create event | `POST /events` with `EventInput` + `calendarId` |
139
+ | Edit event / whole series | `PUT /events/:id` with the full `EventInput` |
140
+ | Edit only this occurrence | `PUT` the series with the date added to `excludedDates`, then `POST` a detached event with `seriesId` and `originalDate` |
141
+ | Edit this and following | `PUT` the series with `until` set to the day before (and `count: null`), `POST` a new series, `PUT` later detached events to relink them |
142
+ | Delete | single: `PUT` with `excludedDates` · following: `PUT` with `until`, `DELETE` its later detached events · all: `DELETE` detached events, then the series · plain: `DELETE /events/:id` |
143
+ | Settings, colors | `PATCH /preferences`, `POST /colors`, `DELETE /colors/:rrggbb` |
144
+ | Sign-in, teams, invitations | `/auth/*`, `/calendars`, `/teams/*`, `/invitations/*`, see the OpenAPI file |
145
+
146
+ Before editing "following" or "all" of a series, the component loads its detached events with `GET /events?seriesId=…`.
147
+
148
+ ### Rules for the backend
149
+
150
+ - **Sessions:** requests use `credentials: 'include'`. Set an `HttpOnly` cookie on sign-in. If the widget runs on another domain: CORS for that origin with `Access-Control-Allow-Credentials: true`, allowed headers `Content-Type`, `Accept`, `Accept-Language`, `Authorization`, `X-Calendar-Tenant`, and the cookie as `SameSite=None; Secure`. Answer `401` when the session is gone.
151
+ - **Errors:** always `{ code, message }`. Known codes such as `invalidCredentials`, `emailTaken`, `forbidden`, `lastOwner` are shown translated, others with `message`.
152
+ - **Language:** every request carries `Accept-Language`. Use it, or the stored `locale`, for emails.
153
+ - **Email links:** point them at the host page with the screen as parameter, e.g. `https://host.example/calendar?calendarPath=%2Freset-password%3Ftoken%3D…`.
154
+
155
+ Building, the test backend and all internals are described in German in [DEVELOPMENT.md](DEVELOPMENT.md).
156
+
157
+ ## License
158
+
159
+ [MIT](LICENSE) © Rokoyfa